commit 44b7532b8b464f606053562400719c9c21276037 Merge: 84c48e6 bc3bf8f Author: Linus Torvalds Date: Sat Jun 13 13:22:00 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: [SCSI] cnic: fix error: implicit declaration of function ‘__symbol_get’ [SCSI] cnic: fix undefined reference to `ip6_route_output' commit 84c48e6f43ae1771fc67fd8fcd777ff4b3b4465b Merge: 5c55b40 bb6e647 Author: Linus Torvalds Date: Sat Jun 13 13:18:32 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6: avr32: Fix oops on unaligned user access avr32: Add support for Mediama RMTx add-on board for ATNGW100 avr32: Change Atmel ATNGW100 config to add choice of add-on board Fix MIMC200 board LCD init avr32: Fix clash in ATMEL_USART_ flags avr32: remove obsolete hw_interrupt_type avr32: Solves problem with inverted MCI detect pin on Merisc board atmel-mci: Add support for inverted detect pin commit 5c55b40b27bc3249358dcfc86c0845be409ab7a6 Author: David Howells Date: Sat Jun 13 13:23:54 2009 +0100 FRV: Fix interaction with new generic header stuff Fix interaction with new generic header stuff as added by: commit 6103ec56c65c33774c7c38652c8204120c3c7519 Author: Arnd Bergmann Date: Wed May 13 22:56:27 2009 +0000 asm-generic: add generic ABI headers The problem is that asm/signal.h has been made to include asm-generic/signal.h, but the redundant stuff from asm/signal.h has not been discarded, leading to multiple redefinitions. Cc: Arnd Bergmann Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit d32f60ed54351ebdea8ae6fbfa0d26e93de29252 Merge: a2ee298 dd14be4 Author: Linus Torvalds Date: Sat Jun 13 13:15:59 2009 -0700 Merge branch 'next-i2c' of git://aeryn.fluff.org.uk/bjdooks/linux * 'next-i2c' of git://aeryn.fluff.org.uk/bjdooks/linux: i2c-ocores: Can add I2C devices to the bus i2c-s3c2410: move to using platform idtable to match devices i2c: OMAP3: Better noise suppression for fast/standard modes i2c: OMAP2/3: Fix scll/sclh calculations i2c: Blackfin TWI: implement I2C_FUNC_SMBUS_I2C_BLOCK functionality i2c: Blackfin TWI: fix transfer errors with repeat start i2c: Blackfin TWI: fix REPEAT START mode doesn't repeat i2c: Blackfin TWI: make sure we don't end up with a CLKDIV=0 commit a2ee2981ae2a7046b10980feae9f4ab813877106 Merge: 7603ef0 0d59597 Author: Linus Torvalds Date: Sat Jun 13 13:14:51 2009 -0700 Merge branch 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (80 commits) x86, mce: Add boot options for corrected errors x86, mce: Fix mce printing x86, mce: fix for mce counters x86, mce: support action-optional machine checks x86, mce: define MCE_VECTOR x86, mce: rename mce_notify_user to mce_notify_irq x86: fix panic with interrupts off (needed for MCE) x86, mce: export MCE severities coverage via debugfs x86, mce: implement new status bits x86, mce: print header/footer only once for multiple MCEs x86, mce: default to panic timeout for machine checks x86, mce: improve mce_get_rip x86, mce: make non Monarch panic message "Fatal machine check" too x86, mce: switch x86 machine check handler to Monarch election. x86, mce: implement panic synchronization x86, mce: implement bootstrapping for machine check wakeups x86, mce: check early in exception handler if panic is needed x86, mce: add table driven machine check grading x86, mce: remove TSC print heuristic x86, mce: log corrected errors when panicing ... commit 7603ef03a22a33d36d3c75d7c1aca1f957671ad3 Merge: 1904187 fd40261 Author: Linus Torvalds Date: Sat Jun 13 13:08:54 2009 -0700 Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs * 'for-linus' of git://oss.sgi.com/xfs/xfs: (23 commits) xfs: fix small mismerge in xfs_vn_mknod xfs: fix warnings with CONFIG_XFS_QUOTA disabled xfs: fix freeing memory in xfs_getbmap() xfs: use generic Posix ACL code xfs: remove SYNC_BDFLUSH xfs: remove SYNC_IOWAIT xfs: split xfs_sync_inodes xfs: use generic inode iterator in xfs_qm_dqrele_all_inodes xfs: introduce a per-ag inode iterator xfs: remove unused parameter from xfs_reclaim_inodes xfs: factor out inode validation for sync xfs: split inode flushing from xfs_sync_inodes_ag xfs: split inode data writeback from xfs_sync_inodes_ag xfs: kill xfs_qmops xfs: validate quota log items during log recovery xfs: update max log size xfs: prevent deadlock in xfs_qm_shake() xfs: fix overflow in xfs_growfs_data_private xfs: fix double unlock in xfs_swap_extents() xfs: fix getbmap vs mmap deadlock ... commit 1904187a694713b80d74186fe058377b067cc195 Merge: 32f44d6 f89d7ea Author: Linus Torvalds Date: Sat Jun 13 13:08:34 2009 -0700 Merge branch 'docs-next' of git://git.lwn.net/linux-2.6 * 'docs-next' of git://git.lwn.net/linux-2.6: Document the debugfs API Documentation: Add "how to write a good patch summary" to SubmittingPatches SubmittingPatches: fix typo docs: Encourage better changelogs in the development process document Document Reported-by in SubmittingPatches commit 32f44d62e463f66307513e90c09b4ceeac13cc22 Merge: f3ad116 08ced85 Author: Linus Torvalds Date: Sat Jun 13 13:08:01 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (35 commits) hwrng: timeriomem - Fix potential oops (request_mem_region/__devinit) crypto: api - Use formatting of module name crypto: testmgr - Allow hash test vectors longer than a page crypto: testmgr - Check all test vector lengths crypto: hifn_795x - fix __dev{init,exit} markings crypto: tcrypt - Do not exit on success in fips mode crypto: compress - Return produced bytes in crypto_{,de}compress_{update,final} hwrng: via_rng - Support VIA Nano hardware RNG on X86_64 builds hwrng: via_rng - Support VIA Nano hardware RNG hwrng: via_rng - The VIA Hardware RNG driver is for the CPU, not Chipset crypto: testmgr - Skip algs not flagged fips_allowed in fips mode crypto: testmgr - Mark algs allowed in fips mode crypto: testmgr - Add ctr(aes) test vectors crypto: testmgr - Dynamically allocate xbuf and axbuf crypto: testmgr - Print self-test pass notices in fips mode crypto: testmgr - Catch base cipher self-test failures in fips mode crypto: testmgr - Add ansi_cprng test vectors crypto: testmgr - Add infrastructure for ansi_cprng self-tests crypto: testmgr - Add self-tests for rfc4309(ccm(aes)) crypto: testmgr - Handle AEAD test vectors expected to fail verification ... commit bc3bf8fd330ce981ce632a1a4a283eee46838f32 Author: Ingo Molnar Date: Sat Jun 13 08:29:33 2009 +0200 [SCSI] cnic: fix error: implicit declaration of function ‘__symbol_get’ drivers/net/cnic.c: In function ‘init_bnx2_cnic’: drivers/net/cnic.c:2520: error: implicit declaration of function ‘__symbol_get’ drivers/net/cnic.c:2520: warning: assignment makes pointer from integer without a cast make[1]: *** [drivers/net/cnic.o] Error 1 make: *** [drivers/net/cnic.o] Error 2 Caused by not including linux/module.h Signed-off-by: Ingo Molnar Signed-off-by: James Bottomley commit faea56c9bb44f539da1ae0194184873fc2720b20 Author: Randy Dunlap Date: Fri Jun 12 11:43:48 2009 -0700 [SCSI] cnic: fix undefined reference to `ip6_route_output' Fix cnic build for case of CONFIG_INET=n. Fix cnic build for case of CONFIG_IPV6=m and CONFIG_CNIC=y. Fixes these build errors: cnic.c:(.text+0x236a1d): undefined reference to `ip_route_output_key' cnic.c:(.text+0x15a8e8): undefined reference to `ip6_route_output' Signed-off-by: Randy Dunlap Signed-off-by: James Bottomley commit bb6e647051a59dca5a72b3deef1e061d7c1c34da Author: Haavard Skinnemoen Date: Wed Jun 3 14:29:16 2009 +0200 avr32: Fix oops on unaligned user access The unaligned address exception handler (and others) does not scan the fixup tables before oopsing. This is bad because it means passing a badly aligned pointer from user space might crash the kernel. Fix this by scanning the fixup tables in _exception(). This should resolve the issue for unaligned addresses as well as other less common exceptions that might be happening during a userspace access. The page fault handler already does fixup processing. Signed-off-by: Haavard Skinnemoen commit fbe0b8d5822a88e2e769a318eaf3134da5881769 Merge: c878b7d 4024533 Author: Haavard Skinnemoen Date: Sat Jun 13 15:34:22 2009 +0200 Merge branch 'avr32-arch' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6 commit dd14be4c274fc484eccace03ae9726e516630331 Author: Richard Röjfors Date: Fri Jun 5 15:40:32 2009 +0200 i2c-ocores: Can add I2C devices to the bus There is sometimes a need for the ocores driver to add devices to the bus when installed. i2c_register_board_info can not always be used, because the I2C devices are not known at an early state, they could for instance be connected on a I2C bus on a PCI device which has the Open Cores IP. i2c_new_device can not be used in all cases either since the resulting bus nummer might be unknown. The solution is the pass a list of I2C devices in the platform data to the Open Cores driver. This is useful for MFD drivers. Signed-off-by: Richard Röjfors Signed-off-by: Ben Dooks commit 7d85ccd816535f56880f7dfdb4de056794376b2c Author: Ben Dooks Date: Fri Jun 12 10:45:29 2009 +0100 i2c-s3c2410: move to using platform idtable to match devices Change to using platform id table to match either of the two supported platform device names in the driver. This simplifies the driver init and exit code Note, log messages will now be prefixed with 's3c-i2c' instead of the driver name, so output will be of the form of: s3c-i2c s3c2440-i2c.0: slave address 0x10 Signed-off-by: Ben Dooks commit 84bf2c868f3ca996e5bbd3beb2ef502f457140f3 Author: Aaro Koskinen Date: Wed May 27 17:54:46 2009 +0300 i2c: OMAP3: Better noise suppression for fast/standard modes Use longer noise filter period for fast and standard mode. Based on an earlier patch by Eero Nurkkala. Signed-off-by: Aaro Koskinen Acked-by: Tony Lindgren Signed-off-by: Ben Dooks commit baf46b4e378d7950dff7ba30cfd50ff585987cb4 Author: Aaro Koskinen Date: Wed May 27 17:54:45 2009 +0300 i2c: OMAP2/3: Fix scll/sclh calculations Fix scll/sclh calculations for HS and fast modes. Currently the driver uses equal (roughly) low/high times which will result in too short low time. OMAP3430 TRM gives the following equations: F/S: tLow = (scll + 7) * internal_clk tHigh = (sclh + 5) * internal_clk HS: tLow = (scll + 7) * fclk tHigh = (sclh + 5) * fclk Furthermore, the I2C specification sets the following minimum values for HS tLow/tHigh for capacitive bus loads 100 pF (maximum speed 3400) and 400 pF (maximum speed 1700): speed tLow tHigh 3400 160 ns 60 ns 1700 320 ns 120 ns and for F/S: speed tLow tHigh 400 1300 ns 600 ns 100 4700 ns 4000 ns By using duty cycles 33/66 (HS, F) and 50/50 (S) we stay above these minimum values. Signed-off-by: Aaro Koskinen Acked-by: Tony Lindgren Signed-off-by: Ben Dooks commit e0cd2dd5dd2b7c6512e46ce0b4f119cd7b0c74a4 Author: Michael Hennerich Date: Wed May 27 09:24:10 2009 +0000 i2c: Blackfin TWI: implement I2C_FUNC_SMBUS_I2C_BLOCK functionality Some drivers need i2c_smbus_read_i2c_block_data() functionality, so add support for it to the Blackfin I2C bus driver. Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger [ben-linux@fluff.org: shortened subject] Signed-off-by: Ben Dooks commit 94327d009e3aa20214e9dfa486a1fd14445fe736 Author: Frank Shew Date: Tue May 19 07:23:49 2009 -0400 i2c: Blackfin TWI: fix transfer errors with repeat start We have a custom BF537 board with an I2C RTC (MAX DS3231) running uclinux 2007R1 for some time. Recently during migration to 2008R1.5-RC3 we losted access to the RTC. The RTC driver calls 'i2c_transfer()' which in turns calls 'bfin_twi_master_xfer()' in i2c-bfin-twi.c. Compared with 2007R1, it looks like the 2008R1.5 version of i2c-bin-twi.c has a new mode 'TWI_I2C-MODE_REPEAT' which corresponds to the Repeat Start Condition described in the HRM. However, according to the HRM, at XMIT or RECV interrupt and when the data count is 0, not only is the RESTART bit supposed to be set, but MDIR must also be set if the next operation is a receive sequence, and cleared if not. Currently there is no code that looks at the I2C_M_RD bit in the flag from the next cur_msg and set/clear the MDIR flag accordingly at the same time that the RSTART bit is set. Instead, MDIR is set or cleared (by OR'ing with 0?) after the RESTART bit has been cleared during handling of MCOMP interrupt. It appears that this is causing our failure with reading the RTC, as a quick patch to set/clear MDIR when RESTART is set seem to solve our problem. Signed-off-by: Frank Shew Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu [ben-linux@fluff.org: shorted subject] Signed-off-by: Ben Dooks commit 57a8f32eafa6f36ea3a128e8b13f353c5a3ca9b2 Author: Sonic Zhang Date: Tue May 19 07:21:58 2009 -0400 i2c: Blackfin TWI: fix REPEAT START mode doesn't repeat Avoid rewrite TWI MASTER_CTL reg when issue next message In i2c repeat transfer mode, byte count of next message should be filled into part of the TWI MASTER_CTL reg when interrupt MCOMP of last message transfer is triggered. But, other bits in this reg should not be touched. Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu [ben-linux@fluff.org: shorted subject] Signed-off-by: Ben Dooks commit 9528d1c7a541b481a0e80301dc8d545848104023 Author: Michael Hennerich Date: Mon May 18 08:14:41 2009 -0400 i2c: Blackfin TWI: make sure we don't end up with a CLKDIV=0 Make sure we don't end up with an invalid CLKDIV=0 in case someone specifies 20kHz SCL or less (5 * 1024 / 20 = 0x100). Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu [ben-linux@fluff.org: shortened subject line] Signed-off-by: Ben Dooks commit fd40261354802b0f05f6f67121235aa002e87069 Merge: f3ad116 e83f1eb Author: Felix Blyakher Date: Fri Jun 12 21:28:59 2009 -0500 Merge branch 'master' of git://oss.sgi.com/xfs/xfs into for-linus commit e83f1eb6bfc4004c19a99ee5f5aa65bd3fbecec3 Author: Christoph Hellwig Date: Fri Jun 12 11:19:11 2009 -0400 xfs: fix small mismerge in xfs_vn_mknod Identation got messed up when merging the current_umask changes with the generic ACL support. Signed-off-by: Christoph Hellwig Reviewed-by: Felix Blyakher Signed-off-by: Felix Blyakher commit 493b87e5ed352cf548e6456ddfc36576e28278ea Author: Christoph Hellwig Date: Fri Jun 12 11:34:55 2009 -0400 xfs: fix warnings with CONFIG_XFS_QUOTA disabled Fix warnings about unitialized dquot variables by making sure xfs_qm_vop_dqalloc touches it even when quotas are disabled. Signed-off-by: Christoph Hellwig Reviewed-by: Felix Blyakher Signed-off-by: Felix Blyakher commit f3ad116588151b3371ae4e092290e4f48e62b8bb Merge: d645727 420118c Author: Linus Torvalds Date: Fri Jun 12 18:21:19 2009 -0700 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/configfs * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/configfs: configfs: Rework configfs_depend_item() locking and make lockdep happy configfs: Silence lockdep on mkdir() and rmdir() commit d645727bdc2aed8e2e0e9496248f735481b5049a Merge: cd166bd 310d6b6 Author: Linus Torvalds Date: Fri Jun 12 18:18:05 2009 -0700 Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (30 commits) [S390] wire up sys_perf_counter_open [S390] wire up sys_rt_tgsigqueueinfo [S390] ftrace: add system call tracer support [S390] ftrace: add function graph tracer support [S390] ftrace: add function trace mcount test support [S390] ftrace: add dynamic ftrace support [S390] kprobes: use probe_kernel_write [S390] maccess: arch specific probe_kernel_write() implementation [S390] maccess: add weak attribute to probe_kernel_write [S390] profile_tick called twice [S390] dasd: forward internal errors to dasd_sleep_on caller [S390] dasd: sync after async probe [S390] dasd: check_characteristics cleanup [S390] dasd: no High Performance FICON in 31-bit mode [S390] dcssblk: revert devt conversion [S390] qdio: fix access beyond ARRAY_SIZE of irq_ptr->{in,out}put_qs [S390] vmalloc: add vmalloc kernel parameter support [S390] uaccess: use might_fault() instead of might_sleep() [S390] 3270: lock dependency fixes [S390] 3270: do not register with tty_register_device ... commit cd166bd0dde265a97dd9aa8e3451a2646d96d04b Merge: 6b70246 5b02ee3 Author: Linus Torvalds Date: Fri Jun 12 18:15:51 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: add generic lib/checksum.c asm-generic: add a generic uaccess.h asm-generic: add generic NOMMU versions of some headers asm-generic: add generic atomic.h and io.h asm-generic: add legacy I/O header files asm-generic: add generic versions of common headers asm-generic: make bitops.h usable asm-generic: make pci.h usable directly asm-generic: make get_rtc_time overridable asm-generic: rename page.h and uaccess.h asm-generic: rename atomic.h to atomic-long.h asm-generic: add a generic unistd.h asm-generic: add generic ABI headers asm-generic: add generic sysv ipc headers asm-generic: introduce asm/bitsperlong.h asm-generic: rename termios.h, signal.h and mman.h commit 6b702462cbe5b6f372966a53f4465d745d86b65c Merge: 947ec0b 3c24475 Author: Linus Torvalds Date: Fri Jun 12 18:09:18 2009 -0700 Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (50 commits) drm: include kernel list header file in hashtab header drm: Export hash table functionality. drm: Split out the mm declarations in a separate header. Add atomic operations. drm/radeon: add support for RV790. drm/radeon: add rv740 drm support. drm_calloc_large: check right size, check integer overflow, use GFP_ZERO drm: Eliminate magic I2C frobbing when reading EDID drm/i915: duplicate desired mode for use by fbcon. drm/via: vfree() no need checking before calling it drm: Replace DRM_DEBUG with DRM_DEBUG_DRIVER in i915 driver drm: Replace DRM_DEBUG with DRM_DEBUG_MODE in drm_mode drm/i915: Replace DRM_DEBUG with DRM_DEBUG_KMS in intel_sdvo drm/i915: replace DRM_DEBUG with DRM_DEBUG_KMS in intel_lvds drm: add separate drm debugging levels radeon: remove _DRM_DRIVER from the preadded sarea map drm: don't associate _DRM_DRIVER maps with a master drm: simplify kcalloc() call to kzalloc(). intelfb: fix spelling of "CLOCK" drm: fix LOCK_TEST_WITH_RETURN macro drm/i915: Hook connector to encoder during load detection (fixes tv/vga detect) ... commit 947ec0b0c1e7e80eef4fe64f7763a06d0cf04d2e Merge: c53567a 5818a6e Author: Linus Torvalds Date: Fri Jun 12 13:17:27 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: PM: Add empty suspend/resume device irq functions PM/Hibernate: Move NVS routines into a seperate file (v2). PM/Hibernate: Rename disk.c to hibernate.c PM: Separate suspend to RAM functionality from core Driver Core: Rework platform suspend/resume, print warning PM: Remove device_type suspend()/resume() PM/Hibernate: Move memory shrinking to snapshot.c (rev. 2) PM/Suspend: Do not shrink memory before suspend PM: Remove bus_type suspend_late()/resume_early() V2 PM core: rename suspend and resume functions PM: Rename device_power_down/up() PM: Remove unused asm/suspend.h x86: unify power/cpu_(32|64).c x86: unify power/cpu_(32|64) copyright notes x86: unify power/cpu_(32|64) regarding restoring processor state x86: unify power/cpu_(32|64) regarding saving processor state x86: unify power/cpu_(32|64) global variables x86: unify power/cpu_(32|64) headers PM: Warn if interrupts are enabled during suspend-resume of sysdevs PM/ACPI/x86: Fix sparse warning in arch/x86/kernel/acpi/sleep.c commit c53567ad4528b6efefc3fc22a354d20f6226a098 Merge: 4ddbac9 748285c Author: Linus Torvalds Date: Fri Jun 12 13:17:12 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm: dlm: use more NOFS allocation dlm: connect to nodes earlier dlm: fix use count with multiple joins dlm: Make name input parameter of {,dlm_}new_lockspace() const commit 4ddbac98980fe0a42cf57af5d1032e024aced6a1 Merge: 02a99ed 018df72 Author: Linus Torvalds Date: Fri Jun 12 13:16:52 2009 -0700 Merge branch 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf_counter: Start documenting HAVE_PERF_COUNTERS requirements perf_counter: Add forward/backward attribute ABI compatibility perf record: Explicity program a default counter perf_counter: Remove PERF_TYPE_RAW special casing perf_counter: PERF_TYPE_HW_CACHE is a hardware counter too powerpc, perf_counter: Fix performance counter event types perf_counter/x86: Add a quirk for Atom processors perf_counter tools: Remove one L1-data alias commit 02a99ed6207e9a1d787bb360ef97de023c7edf4a Merge: 2b10dc4 3447ef2 Author: Linus Torvalds Date: Fri Jun 12 13:15:17 2009 -0700 Merge branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze * 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze: (55 commits) microblaze: Don't use access_ok for unaligned microblaze: remove unused flat_stack_align() definition microblaze: Fix problem with early_printk in startup microblaze_mmu_v2: Makefiles microblaze_mmu_v2: Kconfig update microblaze_mmu_v2: stat.h MMU update microblaze_mmu_v2: Elf update microblaze_mmu_v2: Update dma.h for MMU microblaze_mmu_v2: Update cacheflush.h microblaze_mmu_v2: Update signal returning address microblaze_mmu_v2: Traps MMU update microblaze_mmu_v2: Enable fork syscall for MMU and add fork as vfork for noMMU microblaze_mmu_v2: Update linker script for MMU microblaze_mmu_v2: Add MMU related exceptions handling microblaze_mmu_v2: uaccess MMU update microblaze_mmu_v2: Update exception handling - MMU exception microblaze_mmu_v2: entry.S, entry.h microblaze_mmu_v2: Add CURRENT_TASK for entry.S microblaze_mmu_v2: MMU asm offset update microblaze_mmu_v2: Update tlb.h and tlbflush.h ... commit 2b10dc45d15150434d7f206264e912eacbff734b Merge: 47ea421 bf664c0 Author: Linus Torvalds Date: Fri Jun 12 13:14:30 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (62 commits) Blackfin: fix sparseirq/kstat_irqs fallout Blackfin: fix unused warnings after nommu update Blackfin: export the last exception cause via debugfs Blackfin: fix length checking in kgdb_ebin2mem Blackfin: kgdb: fix up error return values Blackfin: push access_ok() L1 attribute down Blackfin: punt duplicated search_exception_table() prototype Blackfin: add missing access_ok() checks to user functions Blackfin: convert early_printk EVT init to a loop Blackfin: document the lsl variants of the L1 allocator Blackfin: rename Blackfin relocs according to the toolchain Blackfin: check SIC defines rather than variant names Blackfin: add SSYNC to set_dma_sg() for descriptor fetching Blackfin: convert SMP to only use generic time framework Blackfin: bf548-ezkit/bf537-stamp: add resources for ADXL345/346 Blackfin: override default uClinux MTD addr/size Blackfin: fix command line corruption with DEBUG_DOUBLEFAULT Blackfin: fix handling of initial L1 reservation Blackfin: merge sram init functions Blackfin: drop unused reserve_pda() function ... commit 47ea421af7479b90c481c94826f1c716fcf672cf Merge: e349792 c3bb4d2 Author: Linus Torvalds Date: Fri Jun 12 13:14:15 2009 -0700 Merge branch 'for-linus' of git://linux-arm.org/linux-2.6 * 'for-linus' of git://linux-arm.org/linux-2.6: kmemleak: Add more info to the MAINTAINERS entry kmemleak: Remove the kmemleak.h include in drivers/char/vt.c commit 5818a6e2519b34cd6d0220d89f5729ab2725e1bf Author: Heiko Carstens Date: Thu Jun 11 21:59:21 2009 +0200 PM: Add empty suspend/resume device irq functions git commit 0a0c5168 "PM: Introduce functions for suspending and resuming device interrupts" introduced some helper functions. However these functions are only available for architectures which support GENERIC_HARDIRQS. Other architectures will see this build error: drivers/built-in.o: In function `sysdev_suspend': (.text+0x15138): undefined reference to `check_wakeup_irqs' drivers/built-in.o: In function `device_power_up': (.text+0x1cb66): undefined reference to `resume_device_irqs' drivers/built-in.o: In function `device_power_down': (.text+0x1cb92): undefined reference to `suspend_device_irqs' To fix this add some empty inline functions for !GENERIC_HARDIRQS. Signed-off-by: Heiko Carstens Signed-off-by: Rafael J. Wysocki commit fce2b111fae9151a53dabb36513b398d03337a19 Author: Cornelia Huck Date: Wed Jun 10 01:28:19 2009 +0200 PM/Hibernate: Move NVS routines into a seperate file (v2). The *_nvs_* routines in swsusp.c make use of the io*map() functions, which are only provided for HAS_IOMEM, thus breaking compilation if HAS_IOMEM is not set. Fix this by moving the *_nvs_* routines into hibernate_nvs.c, which is only compiled if HAS_IOMEM is set. [rjw: Change the name of the new file to hibernate_nvs.c, add the license line to the header comment.] Signed-off-by: Cornelia Huck Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki commit 8b759b84c8b3c27ccc8dd787294636297b3ebb40 Author: Rafael J. Wysocki Date: Wed Jun 10 01:27:49 2009 +0200 PM/Hibernate: Rename disk.c to hibernate.c Change the name of kernel/power/disk.c to kernel/power/hibernate.c in analogy with the file names introduced by the changes that separated the suspend to RAM and standby funtionality from the common PM functions. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek commit a9d7052363a6e06bb623ed1876c56c7ca5b2c6d8 Author: Rafael J. Wysocki Date: Wed Jun 10 01:27:12 2009 +0200 PM: Separate suspend to RAM functionality from core Move the suspend to RAM and standby code from kernel/power/main.c to two separate files, kernel/power/suspend.c containing the basic functions and kernel/power/suspend_test.c containing the automatic suspend test facility based on the RTC clock alarm. There are no changes in functionality related to these modifications. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek commit 783ea7d4eeefe895f2731fe73ac951e94418927b Author: Magnus Damm Date: Thu Jun 4 22:13:33 2009 +0200 Driver Core: Rework platform suspend/resume, print warning This patch reworks the platform driver code for legacy suspend and resume to avoid installing callbacks in struct device_driver. A warning is also added telling users to update the platform driver to use dev_pm_ops. The functions platform_legacy_suspend()/resume() directly call suspend and resume callbacks in struct platform_driver instead of wrapping things in platform_drv_suspend()/resume(). Signed-off-by: Magnus Damm Acked-by: Greg Kroah-Hartman Signed-off-by: Rafael J. Wysocki commit 00725787511e20dbd1fdc1fb233606120ae5c8cf Author: Magnus Damm Date: Thu Jun 4 22:13:25 2009 +0200 PM: Remove device_type suspend()/resume() This patch removes the legacy callbacks ->suspend() and ->resume() from struct device_type. These callbacks seem unused, and new code should instead make use of struct dev_pm_ops. Signed-off-by: Magnus Damm Acked-by: Greg Kroah-Hartman Signed-off-by: Rafael J. Wysocki commit fe419535d82724314bbf1244a0e740e4ea1bd3ae Author: Rafael J. Wysocki Date: Thu Jun 11 23:11:17 2009 +0200 PM/Hibernate: Move memory shrinking to snapshot.c (rev. 2) A future patch is going to modify the memory shrinking code so that it will make memory allocations to free memory instead of using an artificial memory shrinking mechanism for that. For this purpose it is convenient to move swsusp_shrink_memory() from kernel/power/swsusp.c to kernel/power/snapshot.c, because the new memory-shrinking code is going to use things that are local to kernel/power/snapshot.c . [rev. 2: Make some functions static and remove their headers from kernel/power/power.h] Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Acked-by: Wu Fengguang commit c6f37f12197ac3bd2e5a35f2f0e195ae63d437de Author: Rafael J. Wysocki Date: Sun May 24 22:16:31 2009 +0200 PM/Suspend: Do not shrink memory before suspend Remove the shrinking of memory from the suspend-to-RAM code, where it is not really necessary. Signed-off-by: Rafael J. Wysocki Acked-by: Nigel Cunningham Acked-by: Wu Fengguang commit e240b58c79144708530138e05f17c6d0d8d744a8 Author: Magnus Damm Date: Sun May 24 22:05:54 2009 +0200 PM: Remove bus_type suspend_late()/resume_early() V2 Remove the ->suspend_late() and ->resume_early() callbacks from struct bus_type V2. These callbacks are legacy stuff at this point and since there seem to be no in-tree users we may as well remove them. New users should use dev_pm_ops. Signed-off-by: Magnus Damm Acked-by: Pavel Machek Acked-by: Greg Kroah-Hartman Signed-off-by: Rafael J. Wysocki commit d161630297a20802d01c55847bfcba85d2118a9f Author: Alan Stern Date: Sun May 24 22:05:42 2009 +0200 PM core: rename suspend and resume functions This patch (as1241) renames a bunch of functions in the PM core. Rather than go through a boring list of name changes, suffice it to say that in the end we have a bunch of pairs of functions: device_resume_noirq dpm_resume_noirq device_resume dpm_resume device_complete dpm_complete device_suspend_noirq dpm_suspend_noirq device_suspend dpm_suspend device_prepare dpm_prepare in which device_X does the X operation on a single device and dpm_X invokes device_X for all devices in the dpm_list. In addition, the old dpm_power_up and device_resume_noirq have been combined into a single function (dpm_resume_noirq). Lastly, dpm_suspend_start and dpm_resume_end are the renamed versions of the former top-level device_suspend and device_resume routines. Signed-off-by: Alan Stern Acked-by: Magnus Damm Signed-off-by: Rafael J. Wysocki commit e39a71ef80877f4e30d808af9acceec80f4d2f7c Author: Magnus Damm Date: Fri May 15 00:53:26 2009 +0200 PM: Rename device_power_down/up() Rename the functions performing "_noirq" dev_pm_ops operations from device_power_down() and device_power_up() to device_suspend_noirq() and device_resume_noirq(). The new function names are chosen to show that the functions are responsible for calling the _noirq() versions to finalize the suspend/resume operation. The current function names do not perform power down/up anymore so the names may be misleading. Global function renames: - device_power_down() -> device_suspend_noirq() - device_power_up() -> device_resume_noirq() Static function renames: - suspend_device_noirq() -> __device_suspend_noirq() - resume_device_noirq() -> __device_resume_noirq() Signed-off-by: Magnus Damm Acked-by: Greg Kroah-Hartman Acked-by: Len Brown Signed-off-by: Rafael J. Wysocki commit 1380a37e3da5d9e14ea5c2a4c6ab2b307a2798ea Author: Magnus Damm Date: Fri May 15 00:52:00 2009 +0200 PM: Remove unused asm/suspend.h This patch removes unused asm/suspend.h files for the following architectures: alpha, arm, ia64, m68k, mips, s390, um Signed-off-by: Magnus Damm Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki commit 08687aec71bc9134fe336e561f6877bacf74fc0a Author: Sergio Luis Date: Tue Apr 28 00:27:22 2009 +0200 x86: unify power/cpu_(32|64).c This is the last unification step. Here we do remove one of the files and rename the left one as cpu.c, as both are now the same. Also update power/Makefile, telling it to build cpu.o, instead of cpu_(32|64).o Signed-off-by: Sergio Luis Signed-off-by: Lauro Salmito Signed-off-by: Rafael J. Wysocki commit 6d48becd33a7921694ba1955ba91604d648020f1 Author: Sergio Luis Date: Tue Apr 28 00:27:18 2009 +0200 x86: unify power/cpu_(32|64) copyright notes In this step, we do unify the copyright notes for both files cpu_32.c and cpu_64.c, making such files exactly the same. It's the last step before the actual unification, that will rename one of them to cpu.c and remove the other one. Signed-off-by: Sergio Luis Signed-off-by: Lauro Salmito Signed-off-by: Rafael J. Wysocki commit 3134d04b7790f7239b221f16c2d97db4d96ac3c0 Author: Sergio Luis Date: Tue Apr 28 00:27:05 2009 +0200 x86: unify power/cpu_(32|64) regarding restoring processor state In this step we do unify cpu_32.c and cpu_64.c functions that work on restoring the saved processor state. Also, we do eliminate the forward declaration of fix_processor_context() for X86_64, as it's not needed anymore. Signed-off-by: Sergio Luis Signed-off-by: Lauro Salmito Signed-off-by: Rafael J. Wysocki commit f9ebbe53e79c5978d0e8ead0843a3717b41ad3d5 Author: Sergio Luis Date: Tue Apr 28 00:27:00 2009 +0200 x86: unify power/cpu_(32|64) regarding saving processor state In this step we do unify cpu_32.c and cpu_64.c functions that work on saving the processor state. Signed-off-by: Sergio Luis Signed-off-by: Lauro Salmito Signed-off-by: Rafael J. Wysocki commit 833b2ca0795526898a66c7b6770273bb16567e19 Author: Sergio Luis Date: Tue Apr 28 00:26:50 2009 +0200 x86: unify power/cpu_(32|64) global variables Aiming total unification of cpu_32.c and cpu_64.c, in this step we do unify the global variables and existing forward declarations for such files. Signed-off-by: Sergio Luis Signed-off-by: Lauro Salmito Signed-off-by: Rafael J. Wysocki commit f6783d20d4b85b360b4a6f86bdbd9282a4a7004c Author: Sergio Luis Date: Tue Apr 28 00:26:22 2009 +0200 x86: unify power/cpu_(32|64) headers First step towards the unification of cpu_32.c and cpu_64.c. This commit unifies the headers of such files, making both of them use the same header files. It also remove the uneeded . Signed-off-by: Sergio Luis Signed-off-by: Lauro Salmito Signed-off-by: Rafael J. Wysocki commit 62b0124761b9c2e304ee07dcf4db46c4a3dfec11 Author: Rafael J. Wysocki Date: Sat Apr 18 13:45:13 2009 +0200 PM: Warn if interrupts are enabled during suspend-resume of sysdevs Sysdevs have to be suspended and resumed with interrupts disabled and things usually break in a way that's difficult to debug if one of sysdev drivers enables interrupts by mistake during suspend or resume. Add extra checks that will generate warnings in such cases. Signed-off-by: Rafael J. Wysocki commit ce4b3c55475e451cb489e857640396c37ca88974 Author: Jaswinder Singh Rajput Date: Sat Apr 18 13:44:57 2009 +0200 PM/ACPI/x86: Fix sparse warning in arch/x86/kernel/acpi/sleep.c One of the numbers in arch/x86/kernel/acpi/sleep.c is long, but it is not annotated appropriately, so sparese warns about it. Fix that. [rjw: added the changelog.] Signed-off-by: Rafael J. Wysocki commit e349792a385ed47390d156155b1a1e19af1bf163 Merge: 6d21491 e3f86d3 Author: Linus Torvalds Date: Fri Jun 12 11:16:27 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (290 commits) ALSA: pcm - Update document about xrun_debug proc file ALSA: lx6464es - support standard alsa module parameters ALSA: snd_usb_caiaq: set mixername ALSA: hda - add quirk for STAC92xx (SigmaTel STAC9205) ALSA: use card device as parent for jack input-devices ALSA: sound/ps3: Correct existing and add missing annotations ALSA: sound/ps3: Restructure driver source ALSA: sound/ps3: Fix checkpatch issues ASoC: Fix lm4857 control ALSA: ctxfi - Clear PCM resources at hw_params and hw_free ALSA: ctxfi - Check the presence of SRC instance in PCM pointer callbacks ALSA: ctxfi - Add missing start check in atc_pcm_playback_start() ALSA: ctxfi - Add use_system_timer module option ALSA: usb - Add boot quirk for C-Media 6206 USB Audio ALSA: ctxfi - Fix wrong model id for UAA ALSA: ctxfi - Clean up probe routines ALSA: hda - Fix the previous tagra-8ch patch ALSA: hda - Add 7.1 support for MSI GX620 ALSA: pcm - A helper function to compose PCM stream name for debug prints ALSA: emu10k1 - Fix minimum periods for efx playback ... commit e3f86d3d3ce350144562d9bd035dc8a274fce58e Merge: 056c1eb 2233123 Author: Takashi Iwai Date: Fri Jun 12 20:03:16 2009 +0200 Merge branch 'topic/ps3' into for-linus * topic/ps3: ALSA: sound/ps3: Correct existing and add missing annotations ALSA: sound/ps3: Restructure driver source ALSA: sound/ps3: Fix checkpatch issues commit 056c1ebf1121ca6c16652d0c3fa306622ee338ac Merge: be914cf 4f64e15 Author: Takashi Iwai Date: Fri Jun 12 20:03:15 2009 +0200 Merge branch 'topic/pcm-jiffies-check' into for-linus * topic/pcm-jiffies-check: ALSA: pcm - Update document about xrun_debug proc file commit be914cf91086ca7be9216a894cba0999ddbf541d Merge: 31d496a 1f3fff7 Author: Takashi Iwai Date: Fri Jun 12 20:03:13 2009 +0200 Merge branch 'topic/misc' into for-linus * topic/misc: ALSA: use card device as parent for jack input-devices commit 31d496aaee1dad6ac63770035793032f2062e336 Merge: f8be792 de0525c Author: Takashi Iwai Date: Fri Jun 12 20:03:11 2009 +0200 Merge branch 'topic/lx6464es' into for-linus * topic/lx6464es: ALSA: lx6464es - support standard alsa module parameters commit f8be792d515045a4ecfec0bc9cd883d1b070f132 Merge: 80986be a5c0f88 Author: Takashi Iwai Date: Fri Jun 12 20:03:09 2009 +0200 Merge branch 'topic/hda' into for-linus * topic/hda: ALSA: hda - add quirk for STAC92xx (SigmaTel STAC9205) commit 80986be4864239dde9bb69e90be7707344f03725 Merge: a6093a2 955f2d9 Author: Takashi Iwai Date: Fri Jun 12 20:03:06 2009 +0200 Merge branch 'topic/caiaq' into for-linus * topic/caiaq: ALSA: snd_usb_caiaq: set mixername commit a6093a24bc7da25ce851d22ce3a7bcf1eaca4a95 Merge: 85e013a 236e672 Author: Takashi Iwai Date: Fri Jun 12 20:03:04 2009 +0200 Merge branch 'topic/asoc' into for-linus * topic/asoc: ASoC: Fix lm4857 control commit 018df72dd01576ab199c6129233cdeaf1409958b Author: Mike Frysinger Date: Fri Jun 12 13:17:43 2009 -0400 perf_counter: Start documenting HAVE_PERF_COUNTERS requirements Help out arch porters who want to support perf counters by listing some basic requirements. Signed-off-by: Mike Frysinger Cc: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <1244827063-24046-1-git-send-email-vapier@gentoo.org> Signed-off-by: Ingo Molnar commit 6d21491838a2a9f22843c7530b118596ee9f4d77 Merge: c9b8af0 8429db5 Author: Linus Torvalds Date: Fri Jun 12 09:52:30 2009 -0700 Merge branch 'topic/slab/earlyboot-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 * 'topic/slab/earlyboot-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: slab: setup cpu caches later on when interrupts are enabled slab,slub: don't enable interrupts during early boot slab: fix gfp flag in setup_cpu_cache() x86: make zap_low_mapping could be used early irq: slab alloc for default irq_affinity memcg: fix page_cgroup fatal error in FLATMEM commit c9b8af00ff71f86ff3d092cc60ca673e1d0eae5b Merge: c59a264 82681a3 Author: Linus Torvalds Date: Fri Jun 12 09:50:42 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (154 commits) [SCSI] osd: Remove out-of-tree left overs [SCSI] libosd: Use REQ_QUIET requests. [SCSI] osduld: use filp_open() when looking up an osd-device [SCSI] libosd: Define an osd_dev wrapper to retrieve the request_queue [SCSI] libosd: osd_req_{read,write} takes a length parameter [SCSI] libosd: Let _osd_req_finalize_data_integrity receive number of out_bytes [SCSI] libosd: osd_req_{read,write}_kern new API [SCSI] libosd: Better printout of OSD target system information [SCSI] libosd: OSD2r05: Attribute definitions [SCSI] libosd: OSD2r05: Additional command enums [SCSI] mpt fusion: fix up doc book comments [SCSI] mpt fusion: Added support for Broadcast primitives Event handling [SCSI] mpt fusion: Queue full event handling [SCSI] mpt fusion: RAID device handling and Dual port Raid support is added [SCSI] mpt fusion: Put IOC into ready state if it not already in ready state [SCSI] mpt fusion: Code Cleanup patch [SCSI] mpt fusion: Rescan SAS topology added [SCSI] mpt fusion: SAS topology scan changes, expander events [SCSI] mpt fusion: Firmware event implementation using seperate WorkQueue [SCSI] mpt fusion: rewrite of ioctl_cmds internal generated function ... commit c59a264c9e932c828d533497e286b89e43c8d1be Merge: 6cb8a91 6e03a20 Author: Linus Torvalds Date: Fri Jun 12 09:44:30 2009 -0700 Merge git://git.infradead.org/~dwmw2/firmware-2.6 * git://git.infradead.org/~dwmw2/firmware-2.6: firmware: speed up request_firmware(), v3 commit 6cb8a911745616eee0bdd97a2e82eb9723e9599a Merge: 7f3591c 3ea4005 Author: Linus Torvalds Date: Fri Jun 12 09:43:44 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: GFS2: Remove lock_kernel from gfs2_put_super() GFS2: Add tracepoints commit 7f3591cfacf2d79c4f42238e46c7d053da8e020d Merge: 16ffc3e d1f0132 Author: Linus Torvalds Date: Fri Jun 12 09:32:26 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest: (31 commits) lguest: add support for indirect ring entries lguest: suppress notifications in example Launcher lguest: try to batch interrupts on network receive lguest: avoid sending interrupts to Guest when no activity occurs. lguest: implement deferred interrupts in example Launcher lguest: remove obsolete LHREQ_BREAK call lguest: have example Launcher service all devices in separate threads lguest: use eventfds for device notification eventfd: export eventfd_signal and eventfd_fget for lguest lguest: allow any process to send interrupts lguest: PAE fixes lguest: PAE support lguest: Add support for kvm_hypercall4() lguest: replace hypercall name LHCALL_SET_PMD with LHCALL_SET_PGD lguest: use native_set_* macros, which properly handle 64-bit entries when PAE is activated lguest: map switcher with executable page table entries lguest: fix writev returning short on console output lguest: clean up length-used value in example launcher lguest: Segment selectors are 16-bit long. Fix lg_cpu.ss1 definition. lguest: beyond ARRAY_SIZE of cpu->arch.gdt ... commit 16ffc3eeaa00d513b0076b7b2b96419f28acc912 Merge: c34752b e335385 Author: Linus Torvalds Date: Fri Jun 12 09:31:52 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-virtio * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-virtio: virtio: enhance id_matching for virtio drivers virtio: fix id_matching for virtio drivers virtio: handle short buffers in virtio_rng. virtio_blk: add missing __dev{init,exit} markings virtio: indirect ring entries (VIRTIO_RING_F_INDIRECT_DESC) virtio: teach virtio_has_feature() about transport features virtio: expose features in sysfs virtio_pci: optional MSI-X support virtio_pci: split up vp_interrupt virtio: find_vqs/del_vqs virtio operations virtio: add names to virtqueue struct, mapping from devices to queues. virtio: meet virtio spec by finalizing features before using device virtio: fix obsolete documentation on probe function commit c34752bc8b3196aee3115d1aa41972604ab0aea8 Merge: 65d52cc 151060a Author: Linus Torvalds Date: Fri Jun 12 09:31:20 2009 -0700 Merge branch 'cuse' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse * 'cuse' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: CUSE: implement CUSE - Character device in Userspace fuse: export symbols to be used by CUSE fuse: update fuse_conn_init() and separate out fuse_conn_kill() fuse: don't use inode in fuse_file_poll fuse: don't use inode in fuse_do_ioctl() helper fuse: don't use inode in fuse_sync_release() fuse: create fuse_do_open() helper for CUSE fuse: clean up args in fuse_finish_open() and fuse_release_fill() fuse: don't use inode in helpers called by fuse_direct_io() fuse: add members to struct fuse_file fuse: prepare fuse_direct_io() for CUSE fuse: clean up fuse_write_fill() fuse: use struct path in release structure fuse: misc cleanups commit 65d52cc9d47975f4fbd0a50e62f4a49be2c0514a Merge: d614aec 5933048 Author: Linus Torvalds Date: Fri Jun 12 09:30:36 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-module-and-param * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-module-and-param: module: cleanup FIXME comments about trimming exception table entries. module: trim exception table on init free. module: merge module_alloc() finally uml module: fix uml build process due to this merge x86 module: merge the rest functions with macros x86 module: merge the same functions in module_32.c and module_64.c uvesafb: improve parameter handling. module_param: allow 'bool' module_params to be bool, not just int. module_param: add __same_type convenience wrapper for __builtin_types_compatible_p module_param: split perm field into flags and perm module_param: invbool should take a 'bool', not an 'int' cyber2000fb.c: use proper method for stopping unload if CONFIG_ARCH_SHARK commit d614aec4752f8c61b2e7cb77806b6bd59aa50836 Merge: db8e7f1 ad7c52d Author: Linus Torvalds Date: Fri Jun 12 09:29:42 2009 -0700 Merge branch 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 * 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (29 commits) ide: re-implement ide_pci_init_one() on top of ide_pci_init_two() ide: unexport ide_find_dma_mode() ide: fix PowerMac bootup oops ide: skip probe if there are no devices on the port (v2) sl82c105: add printk() logging facility ide-tape: fix proc warning ide: add IDE_DFLAG_NIEN_QUIRK device flag ide: respect quirk_drives[] list on all controllers hpt366: enable all quirks for devices on quirk_drives[] list hpt366: sync quirk_drives[] list with pdc202xx_{new,old}.c ide: remove superfluous SELECT_MASK() call from do_rw_taskfile() ide: remove superfluous SELECT_MASK() call from ide_driveid_update() icside: remove superfluous ->maskproc method ide-tape: fix IDE_AFLAG_* atomic accesses ide-tape: change IDE_AFLAG_IGNORE_DSC non-atomically pdc202xx_old: kill resetproc() method pdc202xx_old: don't call pdc202xx_reset() on IRQ timeout pdc202xx_old: use ide_dma_test_irq() ide: preserve Host Protected Area by default (v2) ide-gd: implement block device ->set_capacity method (v2) ... commit db8e7f10ed67933ca272f4030eb7057b7f13de07 Merge: 8ebf975 1260866 Author: Linus Torvalds Date: Fri Jun 12 09:26:32 2009 -0700 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Provide _sdata in the vmlinux.lds.S file x86: handle initrd that extends into unusable memory commit 8429db5c6336083594036c30f49401405d536911 Author: Pekka Enberg Date: Fri Jun 12 15:58:59 2009 +0300 slab: setup cpu caches later on when interrupts are enabled Fixes the following boot-time warning: [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: at kernel/smp.c:369 smp_call_function_many+0x56/0x1bc() [ 0.000000] Hardware name: [ 0.000000] Modules linked in: [ 0.000000] Pid: 0, comm: swapper Not tainted 2.6.30 #492 [ 0.000000] Call Trace: [ 0.000000] [] ? _spin_unlock+0x4f/0x5c [ 0.000000] [] ? smp_call_function_many+0x56/0x1bc [ 0.000000] [] warn_slowpath_common+0x7c/0xa9 [ 0.000000] [] warn_slowpath_null+0x14/0x16 [ 0.000000] [] smp_call_function_many+0x56/0x1bc [ 0.000000] [] ? do_ccupdate_local+0x0/0x54 [ 0.000000] [] ? do_ccupdate_local+0x0/0x54 [ 0.000000] [] smp_call_function+0x3d/0x68 [ 0.000000] [] ? do_ccupdate_local+0x0/0x54 [ 0.000000] [] on_each_cpu+0x31/0x7c [ 0.000000] [] do_tune_cpucache+0x119/0x454 [ 0.000000] [] ? lockdep_init_map+0x94/0x10b [ 0.000000] [] ? kmem_cache_init+0x421/0x593 [ 0.000000] [] enable_cpucache+0x68/0xad [ 0.000000] [] kmem_cache_init+0x434/0x593 [ 0.000000] [] ? mem_init+0x156/0x161 [ 0.000000] [] start_kernel+0x1cc/0x3b9 [ 0.000000] [] x86_64_start_reservations+0xaa/0xae [ 0.000000] [] x86_64_start_kernel+0xe1/0xe8 [ 0.000000] ---[ end trace 4eaa2a86a8e2da22 ]--- Cc: Christoph Lameter Cc: Nick Piggin Signed-off-by: Pekka Enberg commit 7e85ee0c1d15ca5f8bff0f514f158eba1742dd87 Author: Pekka Enberg Date: Fri Jun 12 14:03:06 2009 +0300 slab,slub: don't enable interrupts during early boot As explained by Benjamin Herrenschmidt: Oh and btw, your patch alone doesn't fix powerpc, because it's missing a whole bunch of GFP_KERNEL's in the arch code... You would have to grep the entire kernel for things that check slab_is_available() and even then you'll be missing some. For example, slab_is_available() didn't always exist, and so in the early days on powerpc, we used a mem_init_done global that is set form mem_init() (not perfect but works in practice). And we still have code using that to do the test. Therefore, mask out __GFP_WAIT, __GFP_IO, and __GFP_FS in the slab allocators in early boot code to avoid enabling interrupts. Signed-off-by: Pekka Enberg commit eb91f1d0a531289e18f5587dc197d12a251c66a3 Author: Pekka Enberg Date: Fri Jun 12 14:56:09 2009 +0300 slab: fix gfp flag in setup_cpu_cache() Fixes the following warning during bootup when compiling with CONFIG_SLAB: [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: at kernel/lockdep.c:2282 lockdep_trace_alloc+0x91/0xb9() [ 0.000000] Hardware name: [ 0.000000] Modules linked in: [ 0.000000] Pid: 0, comm: swapper Not tainted 2.6.30 #491 [ 0.000000] Call Trace: [ 0.000000] [] ? lockdep_trace_alloc+0x91/0xb9 [ 0.000000] [] warn_slowpath_common+0x7c/0xa9 [ 0.000000] [] warn_slowpath_null+0x14/0x16 [ 0.000000] [] lockdep_trace_alloc+0x91/0xb9 [ 0.000000] [] kmem_cache_alloc_node_notrace+0x26/0xdf [ 0.000000] [] ? setup_cpu_cache+0x7e/0x210 [ 0.000000] [] setup_cpu_cache+0x113/0x210 [ 0.000000] [] kmem_cache_create+0x409/0x486 [ 0.000000] [] kmem_cache_init+0x232/0x593 [ 0.000000] [] ? mem_init+0x156/0x161 [ 0.000000] [] start_kernel+0x1cc/0x3b9 [ 0.000000] [] x86_64_start_reservations+0xaa/0xae [ 0.000000] [] x86_64_start_kernel+0xe1/0xe8 [ 0.000000] ---[ end trace 4eaa2a86a8e2da22 ]--- Signed-off-by: Pekka Enberg commit 7747a0b0af5976ba3828796b4f7a7adc3bb76dbd Author: Felix Blyakher Date: Thu Jun 11 17:07:28 2009 -0500 xfs: fix freeing memory in xfs_getbmap() Regression from commit 28e211700a81b0a934b6c7a4b8e7dda843634d2f. Need to free temporary buffer allocated in xfs_getbmap(). Signed-off-by: Felix Blyakher Signed-off-by: Hedi Berriche Reported-by: Justin Piszcz Reviewed-by: Eric Sandeen Reviewed-by: Christoph Hellwig commit 82681a318f9f028ea64e61f24bbd9ac535531921 Merge: 3860c97 8ebf975 Author: James Bottomley Date: Fri Jun 12 10:02:03 2009 -0500 [SCSI] Merge branch 'linus' Conflicts: drivers/message/fusion/mptsas.c fixed up conflict between req->data_len accessors and mptsas driver updates. Signed-off-by: James Bottomley commit d1f0132e76a11b05167313c606a853953f416081 Author: Mark McLoughlin Date: Mon May 11 18:11:46 2009 +0100 lguest: add support for indirect ring entries Support the VIRTIO_RING_F_INDIRECT_DESC feature. This is a simple matter of changing the descriptor walking code to operate on a struct vring_desc* and supplying it with an indirect table if detected. Signed-off-by: Mark McLoughlin Signed-off-by: Rusty Russell commit b60da13fc7bbf99d3c68578bd3fbcf66e1cb5f41 Author: Rusty Russell Date: Fri Jun 12 22:27:12 2009 -0600 lguest: suppress notifications in example Launcher The Guest only really needs to tell us about activity when we're going to listen to the eventfd: normally, we don't want to know. So if there are no available buffers, turn on notifications, re-check, then wait for the Guest to notify us via the eventfd, then turn notifications off again. There's enough else going on that the differences are in the noise. Before: Secs RxKicks TxKicks 1G TCP Guest->Host: 3.94 4686 32815 1M normal pings: 104 142862 1000010 1M 1k pings (-l 120): 57 142026 1000007 After: 1G TCP Guest->Host: 3.76 4691 32811 1M normal pings: 111 142859 997467 1M 1k pings (-l 120): 55 19648 501549 Signed-off-by: Rusty Russell commit 4a8962e21bc505c714fc2508494d4c7dd3fe2d29 Author: Rusty Russell Date: Fri Jun 12 22:27:12 2009 -0600 lguest: try to batch interrupts on network receive Rather than triggering an interrupt every time, we only trigger an interrupt when there are no more incoming packets (or the recv queue is full). However, the overhead of doing the select to figure this out is measurable: 1M pings goes from 98 to 104 seconds, and 1G Guest->Host TCP goes from 3.69 to 3.94 seconds. It's close to the noise though. I tested various timeouts, including reducing it as the number of pending packets increased, timing a 1 gigabyte TCP send from Guest -> Host and Host -> Guest (GSO disabled, to increase packet rate). // time tcpblast -o -s 65536 -c 16k 192.168.2.1:9999 > /dev/null Timeout Guest->Host Pkts/irq Host->Guest Pkts/irq Before 11.3s 1.0 6.3s 1.0 0 11.7s 1.0 6.6s 23.5 1 17.1s 8.8 8.6s 26.0 1/pending 13.4s 1.9 6.6s 23.8 2/pending 13.6s 2.8 6.6s 24.1 5/pending 14.1s 5.0 6.6s 24.4 Signed-off-by: Rusty Russell commit 95c517c09bad31a03e22f2fdb5f0aa26a490a92d Author: Rusty Russell Date: Fri Jun 12 22:27:11 2009 -0600 lguest: avoid sending interrupts to Guest when no activity occurs. If we track how many buffers we've used, we can tell whether we really need to interrupt the Guest. This happens as a side effect of spurious notifications. Spurious notifications happen because it can take a while before the Host thread wakes up and sets the VRING_USED_F_NO_NOTIFY flag, and meanwhile the Guest can more notifications. A real fix would be to use wake counts, rather than a suppression flag, but the practical difference is generally in the noise: the interrupt is usually coalesced into a pending one anyway so we just save a system call which isn't clearly measurable. Secs Spurious IRQS 1G TCP Guest->Host: 3.93 58 1M normal pings: 100 72 1M 1k pings (-l 120): 57 492904 Signed-off-by: Rusty Russell commit 38bc2b8c56a2e212bbd19de7cf9976dcc7bf9953 Author: Rusty Russell Date: Fri Jun 12 22:27:11 2009 -0600 lguest: implement deferred interrupts in example Launcher Rather than sending an interrupt on every buffer, we only send an interrupt when we're about to wait for the Guest to send us a new one. The console input and network input still send interrupts manually, but the block device, network and console output queues can simply rely on this logic to send interrupts to the Guest at the right time. The patch is cluttered by moving trigger_irq() higher in the code. In practice, two factors make this optimization less interesting: (1) we often only get one input at a time, even for networking, (2) triggering an interrupt rapidly tends to get coalesced anyway. Before: Secs RxIRQS TxIRQs 1G TCP Guest->Host: 3.72 32784 32771 1M normal pings: 99 1000004 995541 100,000 1k pings (-l 120): 5 49510 49058 After: 1G TCP Guest->Host: 3.69 32809 32769 1M normal pings: 99 1000004 996196 100,000 1k pings (-l 120): 5 52435 52361 (Note the interrupt count on 100k pings goes *up*: see next patch). Signed-off-by: Rusty Russell commit 5dac051bc6030963181b69faddd9e0ad04f85fa8 Author: Rusty Russell Date: Fri Jun 12 22:27:10 2009 -0600 lguest: remove obsolete LHREQ_BREAK call We no longer need an efficient mechanism to force the Guest back into host userspace, as each device is serviced without bothering the main Guest process (aka. the Launcher). Signed-off-by: Rusty Russell commit 659a0e6633567246edcb7bd400c7e2bece9237d9 Author: Rusty Russell Date: Fri Jun 12 22:27:10 2009 -0600 lguest: have example Launcher service all devices in separate threads Currently lguest has three threads: the main Launcher thread, a Waker thread, and a thread for the block device (because synchronous block was simply too painful to bear). The Waker selects() on all the input file descriptors (eg. stdin, net devices, pipe to the block thread) and when one becomes readable it calls into the kernel to kick the Launcher thread out into userspace, which repeats the poll, services the device(s), and then tells the kernel to release the Waker before re-entering the kernel to run the Guest. Also, to make a slightly-decent network transmit routine, the Launcher would suppress further network interrupts while it set a timer: that signal handler would write to a pipe, which would rouse the Waker which would prod the Launcher out of the kernel to check the network device again. Now we can convert all our virtqueues to separate threads: each one has a separate eventfd for when the Guest pokes the device, and can trigger interrupts in the Guest directly. The linecount shows how much this simplifies, but to really bring it home, here's an strace analysis of single Guest->Host ping before: * Guest sends packet, notifies xmit vq, return control to Launcher * Launcher clears notification flag on xmit ring * Launcher writes packet to TUN device writev(4, [{"\0\0\0\0\0\0\0\0\0\0", 10}, {"\366\r\224`\2058\272m\224vf\274\10\0E\0\0T\0\0@\0@\1\265"..., 98}], 2) = 108 * Launcher sets up interrupt for Guest (xmit ring is empty) write(10, "\2\0\0\0\3\0\0\0", 8) = 0 * Launcher sets up timer for interrupt mitigation setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 505}}, NULL) = 0 * Launcher re-runs guest pread64(10, 0xbfa5f4d4, 4, 0) ... * Waker notices reply packet in tun device (it was in select) select(12, [0 3 4 6 11], NULL, NULL, NULL) = 1 (in [4]) * Waker kicks Launcher out of guest: pwrite64(10, "\3\0\0\0\1\0\0\0", 8, 0) = 0 * Launcher returns from running guest: ... = -1 EAGAIN (Resource temporarily unavailable) * Launcher looks at input fds: select(7, [0 3 4 6], NULL, NULL, {0, 0}) = 1 (in [4], left {0, 0}) * Launcher reads pong from tun device: readv(4, [{"\0\0\0\0\0\0\0\0\0\0", 10}, {"\272m\224vf\274\366\r\224`\2058\10\0E\0\0T\364\26\0\0@"..., 1518}], 2) = 108 * Launcher injects guest notification: write(10, "\2\0\0\0\2\0\0\0", 8) = 0 * Launcher rechecks fds: select(7, [0 3 4 6], NULL, NULL, {0, 0}) = 0 (Timeout) * Launcher clears Waker: pwrite64(10, "\3\0\0\0\0\0\0\0", 8, 0) = 0 * Launcher reruns Guest: pread64(10, 0xbfa5f4d4, 4, 0) = ? ERESTARTSYS (To be restarted) * Signal comes in, uses pipe to wake up Launcher: --- SIGALRM (Alarm clock) @ 0 (0) --- write(8, "\0", 1) = 1 sigreturn() = ? (mask now []) * Waker sees write on pipe: select(12, [0 3 4 6 11], NULL, NULL, NULL) = 1 (in [6]) * Waker kicks Launcher out of Guest: pwrite64(10, "\3\0\0\0\1\0\0\0", 8, 0) = 0 * Launcher exits from kernel: pread64(10, 0xbfa5f4d4, 4, 0) = -1 EAGAIN (Resource temporarily unavailable) * Launcher looks to see what fd woke it: select(7, [0 3 4 6], NULL, NULL, {0, 0}) = 1 (in [6], left {0, 0}) * Launcher reads timeout fd, sets notification flag on xmit ring read(6, "\0", 32) = 1 * Launcher rechecks fds: select(7, [0 3 4 6], NULL, NULL, {0, 0}) = 0 (Timeout) * Launcher clears Waker: pwrite64(10, "\3\0\0\0\0\0\0\0", 8, 0) = 0 * Launcher resumes Guest: pread64(10, "\0p\0\4", 4, 0) .... strace analysis of single Guest->Host ping after: * Guest sends packet, notifies xmit vq, creates event on eventfd. * Network xmit thread wakes from read on eventfd: read(7, "\1\0\0\0\0\0\0\0", 8) = 8 * Network xmit thread writes packet to TUN device writev(4, [{"\0\0\0\0\0\0\0\0\0\0", 10}, {"J\217\232FI\37j\27\375\276\0\304\10\0E\0\0T\0\0@\0@\1\265"..., 98}], 2) = 108 * Network recv thread wakes up from read on tunfd: readv(4, [{"\0\0\0\0\0\0\0\0\0\0", 10}, {"j\27\375\276\0\304J\217\232FI\37\10\0E\0\0TiO\0\0@\1\214"..., 1518}], 2) = 108 * Network recv thread sets up interrupt for the Guest write(6, "\2\0\0\0\2\0\0\0", 8) = 0 * Network recv thread goes back to reading tunfd 13:39:42.460285 readv(4, * Network xmit thread sets up interrupt for Guest (xmit ring is empty) write(6, "\2\0\0\0\3\0\0\0", 8) = 0 * Network xmit thread goes back to reading from eventfd read(7, Signed-off-by: Rusty Russell commit df60aeef4f4fe0645d9a195a7689005520422de5 Author: Rusty Russell Date: Fri Jun 12 22:27:09 2009 -0600 lguest: use eventfds for device notification Currently, when a Guest wants to perform I/O it calls LHCALL_NOTIFY with an address: the main Launcher process returns with this address, and figures out what device to run. A far nicer model is to let processes bind an eventfd to an address: if we find one, we simply signal the eventfd. Signed-off-by: Rusty Russell Cc: Davide Libenzi commit 5718607bb670c721f45f0dbb1cc7d6c64969aab1 Author: Rusty Russell Date: Fri Jun 12 22:27:09 2009 -0600 eventfd: export eventfd_signal and eventfd_fget for lguest lguest wants to attach eventfds to guest notifications, and lguest is usually a module. Signed-off-by: Rusty Russell To: Davide Libenzi commit 9f155a9b3d5a5444bcc5e049ec2547bb5107150e Author: Rusty Russell Date: Fri Jun 12 22:27:08 2009 -0600 lguest: allow any process to send interrupts We currently only allow the Launcher process to send interrupts, but it as we already send interrupts from the hrtimer, it's a simple matter of extracting that code into a common set_interrupt routine. As we switch to a thread per virtqueue, this avoids a bottleneck through the main Launcher process. Signed-off-by: Rusty Russell commit 92b4d8df8436cdd74d22a2a5b6b23b9abc737a3e Author: Rusty Russell Date: Fri Jun 12 22:27:08 2009 -0600 lguest: PAE fixes 1) j wasn't initialized in setup_pagetables, so they weren't set up for me causing immediate guest crashes. 2) gpte_addr should not re-read the pmd from the Guest. Especially not BUG_ON() based on the value. If we ever supported SMP guests, they could trigger that. And the Launcher could also trigger it (tho currently root-only). Signed-off-by: Rusty Russell commit acdd0b6292b282c4511897ac2691a47befbf1c6a Author: Matias Zabaljauregui Date: Fri Jun 12 22:27:07 2009 -0600 lguest: PAE support This version requires that host and guest have the same PAE status. NX cap is not offered to the guest, yet. Signed-off-by: Matias Zabaljauregui Signed-off-by: Rusty Russell commit cefcad1773197523e11e18b669f245e6a8d32058 Author: Matias Zabaljauregui Date: Fri Jun 12 22:27:07 2009 -0600 lguest: Add support for kvm_hypercall4() Add support for kvm_hypercall4(); PAE wants it. Signed-off-by: Matias Zabaljauregui Signed-off-by: Rusty Russell commit ebe0ba84f55950a89cb7af94c7ffc35ee3992f9e Author: Matias Zabaljauregui Date: Sat May 30 15:48:08 2009 -0300 lguest: replace hypercall name LHCALL_SET_PMD with LHCALL_SET_PGD replace LHCALL_SET_PMD with LHCALL_SET_PGD hypercall name (That's really what it is, and the confusion gets worse with PAE support) Signed-off-by: Matias Zabaljauregui Signed-off-by: Rusty Russell Reported-by: Jeremy Fitzhardinge commit 90603d15fa95605d1d08235b73e220d766f04bb0 Author: Matias Zabaljauregui Date: Fri Jun 12 22:27:06 2009 -0600 lguest: use native_set_* macros, which properly handle 64-bit entries when PAE is activated Some cleanups and replace direct assignment with native_set_* macros which properly handle 64-bit entries when PAE is activated Signed-off-by: Matias Zabaljauregui Signed-off-by: Rusty Russell commit ed1dc77810159a733240ba6751c1b31023bf8dd7 Author: Matias Zabaljauregui Date: Sat May 30 15:35:49 2009 -0300 lguest: map switcher with executable page table entries Map switcher with executable page table entries. (This bug didn't matter before PAE and hence NX support -- RR) Signed-off-by: Matias Zabaljauregui Signed-off-by: Rusty Russell commit 7b5c806c35f6ff76b2e36a8b5b1513c8a83fcff7 Author: Rusty Russell Date: Fri Jun 12 22:27:05 2009 -0600 lguest: fix writev returning short on console output I've never seen it here, but I can't find anywhere that says writev will write everything. Signed-off-by: Rusty Russell commit e606490c440900e50ccf73a54f6fc6150ff40815 Author: Rusty Russell Date: Fri Jun 12 22:27:04 2009 -0600 lguest: clean up length-used value in example launcher The "len" field in the used ring for virtio indicates the number of bytes *written* to the buffer. This means the guest doesn't have to zero the buffers in advance as it always knows the used length. Erroneously, the console and network example code puts the length *read* into that field. The guest ignores it, but it's wrong. Signed-off-by: Rusty Russell commit f086122bb6e885f926f935b1418fca3b293375f0 Author: Matias Zabaljauregui Date: Fri Jun 12 22:27:04 2009 -0600 lguest: Segment selectors are 16-bit long. Fix lg_cpu.ss1 definition. If GDT_ENTRIES were every > 256, this could become a problem. Signed-off-by: Matias Zabaljauregui Signed-off-by: Rusty Russell commit 81b79b01d057f8c5a378c38d2f738775b972934a Author: Roel Kluin Date: Wed May 20 01:45:45 2009 +0200 lguest: beyond ARRAY_SIZE of cpu->arch.gdt Do not go beyond ARRAY_SIZE of cpu->arch.gdt Signed-off-by: Roel Kluin Signed-off-by: Rusty Russell commit 2644f17d6c932929fd68cfec95691490947e0fd1 Author: Rusty Russell Date: Fri Jun 12 22:27:03 2009 -0600 lguest: clean up example launcher compile flags. 18 months ago 5bbf89fc260830f3f58b331d946a16b39ad1ca2d changed to loading bzImages directly, and no longer manually ungzipping them, so we no longer need libz. Also, -m32 is useful for those on 64-bit platforms (and harmless on 32-bit). Reported-by: Ron Minnich Signed-off-by: Rusty Russell commit 61f4bc83fea248a3092beb7ba43daa5629615513 Author: Rusty Russell Date: Fri Jun 12 22:27:03 2009 -0600 lguest: optimize by coding restore_flags and irq_enable in assembler. The downside of the last patch which made restore_flags and irq_enable check interrupts is that they are now too big to be patched directly into the callsites, so the C versions are always used. But the C versions go via PV_CALLEE_SAVE_REGS_THUNK which saves all the registers. In fact, we don't need any registers in the fast path, so we can do better than this if we actually code them in assembler. The results are in the noise, but since it's about the same amount of code, it's worth applying. 1GB Guest->Host: input(suppressed),output(suppressed) Before: Seconds: 0:16.53 Packets: 377268,753673 Interrupts: 22461,24297 Notifications: 1(5245),21303(732370) Net IRQs triggered: 377023(245),42578(711095) After: Seconds: 0:16.48 Packets: 377289,753673 Interrupts: 22281,24465 Notifications: 1(5245),21296(732377) Net IRQs triggered: 377060(229),42564(711109) Signed-off-by: Rusty Russell commit a32a8813d0173163ba44d8f9556e0d89fdc4fb46 Author: Rusty Russell Date: Fri Jun 12 22:27:02 2009 -0600 lguest: improve interrupt handling, speed up stream networking lguest never checked for pending interrupts when enabling interrupts, and things still worked. However, it makes a significant difference to TCP performance, so it's time we fixed it by introducing a pending_irq flag and checking it on irq_restore and irq_enable. These two routines are now too big to patch into the 8/10 bytes patch space, so we drop that code. Note: The high latency on interrupt delivery had a very curious effect: once everything else was optimized, networking without GSO was faster than networking with GSO, since more interrupts were sent and hence a greater chance of one getting through to the Guest! Note2: (Almost) Closing the same loophole for iret doesn't have any measurable effect, so I'm leaving that patch for the moment. Before: 1GB tcpblast Guest->Host: 30.7 seconds 1GB tcpblast Guest->Host (no GSO): 76.0 seconds After: 1GB tcpblast Guest->Host: 6.8 seconds 1GB tcpblast Guest->Host (no GSO): 27.8 seconds Signed-off-by: Rusty Russell commit abd41f037e1a64543000ed73b42f616d04d92700 Author: Rusty Russell Date: Fri Jun 12 22:27:02 2009 -0600 lguest: fix race in halt code When the Guest does the LHCALL_HALT hypercall, we go to sleep, expecting that a timer or the Waker will wake_up_process() us. But we do it in a stupid way, leaving a classic missing wakeup race. So split maybe_do_interrupt() into interrupt_pending() and try_deliver_interrupt(), and check maybe_do_interrupt() and the "break_out" flag before calling schedule. Signed-off-by: Rusty Russell commit ebf9a5a99c1a464afe0b4dfa64416fc8b273bc5c Author: Rusty Russell Date: Fri Jun 12 22:27:01 2009 -0600 lguest: remove invalid interrupt forcing logic. 20887611523e749d99cc7d64ff6c97d27529fbae (lguest: notify on empty) introduced lguest support for the VIRTIO_F_NOTIFY_ON_EMPTY flag, but in fact it turned on interrupts all the time. Because we always process one buffer at a time, the inflight count is always 0 when call trigger_irq and so we always ignore VRING_AVAIL_F_NO_INTERRUPT from the Guest. It should be looking to see if there are more buffers in the Guest's queue: if it's empty, then we force an interrupt. This makes little difference, since we usually have an empty queue; but that's the subject of another patch. Signed-off-by: Rusty Russell commit a6c372de6e4b9a8188b66badcee3e3792eccdd26 Author: Rusty Russell Date: Fri Jun 12 22:27:01 2009 -0600 lguest: fix lguest wake on guest clock tick, or fd activity The Launcher could be inside the Guest on another CPU; wake_up_process will do nothing because it is "running". kick_process will knock it back into our kernel in this case, otherwise we'll miss it until the next guest exit. Signed-off-by: Rusty Russell commit b43e352139f51216a8c56b0bd5fc3d4e05c65619 Author: Rusty Russell Date: Fri Jun 12 22:27:00 2009 -0600 sched: export kick_process lguest needs kick_process: wake_up_process() does nothing if a process is running, which isn't sufficient (we need it in the kernel). And lguest support is usually modular. Signed-off-by: Rusty Russell Cc: Ingo Molnar commit f7027c6387d0c3acf569845165ec7947e2083c82 Author: Rusty Russell Date: Fri Jun 12 22:27:00 2009 -0600 lguest: get more serious about wmb() in example Launcher code Since the Launcher process runs the Guest, it doesn't have to be very serious about its barriers: the Guest isn't running while we are (Guest is UP). Before we change to use threads to service devices, we need to fix this. Signed-off-by: Rusty Russell commit 1028375e93a7aa4dbe466947d1c65f368b1f61c1 Author: Rusty Russell Date: Fri Jun 12 22:26:59 2009 -0600 lguest: clean up lguest_init_IRQ Copy from arch/x86/kernel/irqinit_32.c: we don't use the vectors beyond LGUEST_IRQS (if any), but we might as well set them all. Signed-off-by: Rusty Russell commit 56739c802ca845435f60e909104637880e14c769 Author: Rusty Russell Date: Fri Jun 12 22:26:59 2009 -0600 lguest: cleanup passing of /dev/lguest fd around example launcher. We hand the /dev/lguest fd everywhere; it's far neater to just make it a global (it already is, in fact, hidden in the waker_fds struct). Signed-off-by: Rusty Russell commit 713b15b3781240653d2b38414da3f4567dcbcf91 Author: Rusty Russell Date: Fri Jun 12 22:26:58 2009 -0600 lguest: be paranoid about guest playing with device descriptors. We can't trust the values in the device descriptor table once the guest has booted, so keep local copies. They could set them to strange values then cause us to segv (they're 8 bit values, so they can't make our pointers go too wild). This becomes more important with the following patches which read them. Signed-off-by: Rusty Russell commit e3353853730eb99c56b7b0aed1667d51c0e3699a Author: Christian Borntraeger Date: Tue May 26 15:46:10 2009 +0200 virtio: enhance id_matching for virtio drivers This patch allows a virtio driver to use VIRTIO_DEV_ANY_ID for the device id. This will be used by a test module that can be bound to any virtio device. Signed-off-by: Christian Borntraeger Signed-off-by: Rusty Russell commit c89e80168ba1ed37627fe03116b0cf8474dcb7e0 Author: Christian Borntraeger Date: Tue May 26 15:46:09 2009 +0200 virtio: fix id_matching for virtio drivers This bug never appeared, since all current virtio drivers use VIRTIO_DEV_ANY_ID for the vendor field. If a real vendor would be used, the check in virtio_id_match is wrong - it returns 0 if id->vendor == dev->id.vendor. Signed-off-by: Christian Borntraeger Signed-off-by: Rusty Russell commit 594de1dd6449f79c99e1ba4577ea0e4e06e2b405 Author: Rusty Russell Date: Fri Jun 12 22:16:39 2009 -0600 virtio: handle short buffers in virtio_rng. If the device fills less than 4 bytes of our random buffer, we'll BUG_ON. It's nicer to handle the case where it partially fills the buffer (the protocol doesn't explicitly bad that). Signed-off-by: Rusty Russell commit 98e94444748e9af93423d1fab90543e75569a58c Author: Mike Frysinger Date: Mon May 18 03:39:09 2009 -0400 virtio_blk: add missing __dev{init,exit} markings The remove member of the virtio_driver structure uses __devexit_p(), so the remove function itself should be marked with __devexit. And where there be __devexit on the remove, so is there __devinit on the probe. Signed-off-by: Mike Frysinger Signed-off-by: Rusty Russell commit 9fa29b9df32ba4db055f3977933cd0c1b8fe67cd Author: Mark McLoughlin Date: Mon May 11 18:11:45 2009 +0100 virtio: indirect ring entries (VIRTIO_RING_F_INDIRECT_DESC) Add a new feature flag for indirect ring entries. These are ring entries which point to a table of buffer descriptors. The idea here is to increase the ring capacity by allowing a larger effective ring size whereby the ring size dictates the number of requests that may be outstanding, rather than the size of those requests. This should be most effective in the case of block I/O where we can potentially benefit by concurrently dispatching a large number of large requests. Even in the simple case of single segment block requests, this results in a threefold increase in ring capacity. Signed-off-by: Mark McLoughlin Signed-off-by: Rusty Russell commit ee006b353f1ca8c9a8470b72b462beb011d62e32 Author: Mark McLoughlin Date: Mon May 11 18:11:44 2009 +0100 virtio: teach virtio_has_feature() about transport features Drivers don't add transport features to their table, so we shouldn't check these with virtio_check_driver_offered_feature(). We could perhaps add an ->offered_feature() virtio_config_op, but that perhaps that would be overkill for a consitency check like this. Signed-off-by: Mark McLoughlin Signed-off-by: Rusty Russell commit a92892825a122a74ddad1d408fa27132e28b05ae Author: Rusty Russell Date: Fri Jun 12 22:16:37 2009 -0600 virtio: expose features in sysfs Each device negotiates feature bits; expose these in sysfs to help diagnostics and debugging. Signed-off-by: Rusty Russell commit 82af8ce84ed65d2fb6d8c017d3f2bbbf161061fb Author: Michael S. Tsirkin Date: Thu May 14 13:55:41 2009 +0300 virtio_pci: optional MSI-X support This implements optional MSI-X support in virtio_pci. MSI-X is used whenever the host supports at least 2 MSI-X vectors: 1 for configuration changes and 1 for virtqueues. Per-virtqueue vectors are allocated if enough vectors available. Signed-off-by: Michael S. Tsirkin Acked-by: Anthony Liguori Signed-off-by: Rusty Russell (+ whitespace, style) commit 77cf524654a886e0fbbf03b16b44f048deef7b0c Author: Michael S. Tsirkin Date: Thu May 14 13:55:31 2009 +0300 virtio_pci: split up vp_interrupt This reorganizes virtio-pci code in vp_interrupt slightly, so that it's easier to add per-vq MSI support on top. Signed-off-by: Michael S. Tsirkin Signed-off-by: Rusty Russell commit d2a7ddda9ffb1c8961abff6714b0f1eb925c120f Author: Michael S. Tsirkin Date: Fri Jun 12 22:16:36 2009 -0600 virtio: find_vqs/del_vqs virtio operations This replaces find_vq/del_vq with find_vqs/del_vqs virtio operations, and updates all drivers. This is needed for MSI support, because MSI needs to know the total number of vectors upfront. Signed-off-by: Michael S. Tsirkin Signed-off-by: Rusty Russell (+ lguest/9p compile fixes) commit 9499f5e7ed5224c40706f0cec6542a9916bc7606 Author: Rusty Russell Date: Fri Jun 12 22:16:35 2009 -0600 virtio: add names to virtqueue struct, mapping from devices to queues. Add a linked list of all virtqueues for a virtio device: this helps for debugging and is also needed for upcoming interface change. Also, add a "name" field for clearer debug messages. Signed-off-by: Rusty Russell commit ef688e151c00e5d529703be9a04fd506df8bc54e Author: Rusty Russell Date: Fri Jun 12 22:16:35 2009 -0600 virtio: meet virtio spec by finalizing features before using device Virtio devices are supposed to negotiate features before they start using the device, but the current code doesn't do this. This is because the driver's probe() function invariably has to add buffers to a virtqueue, or probe the disk (virtio_blk). This currently doesn't matter since no existing backend is strict about the feature negotiation. But it's possible to imagine a future feature which completely changes how a device operates: in this case, we'd need to acknowledge it before using the device. Signed-off-by: Rusty Russell commit 20f77f5654042cf484d8964b618faf9d620f639b Author: Rusty Russell Date: Fri Jun 12 22:16:33 2009 -0600 virtio: fix obsolete documentation on probe function Signed-off-by: Rusty Russell commit 3ea400581f2b595afd91207bbd79c11cb38598e0 Author: Steven Whitehouse Date: Fri Jun 12 13:40:47 2009 +0100 GFS2: Remove lock_kernel from gfs2_put_super() It is not required here. Signed-off-by: Steven Whitehouse Cc: Christoph Hellwig commit 974802eaa1afdc87e00821df7020a2b3c6fee623 Author: Peter Zijlstra Date: Fri Jun 12 12:46:55 2009 +0200 perf_counter: Add forward/backward attribute ABI compatibility Provide for means of extending the perf_counter_attr in a 'natural' way. We allow growing the structure by appending fields at the end by specifying the full structure size inside it. When a new kernel sees a smaller (old) structure, it will 0 pad the tail. When an old kernel sees a larger (new) structure, it will verify the tail consists of 0s, otherwise fail. If we fail due to a size-mismatch, we return -E2BIG and write the kernel's native attribe size back into the provided structure. Furthermore, add some attribute verification, so that we'll fail counter creation when unknown bits are present (PERF_SAMPLE, PERF_FORMAT, or in the __reserved fields). (This ABI detail is introduced while keeping the existing syscall ABI.) Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit bbd36e5e6aa6f1757c84cdb406b6eb81686d14af Author: Peter Zijlstra Date: Thu Jun 11 23:11:50 2009 +0200 perf record: Explicity program a default counter Up until now record has worked on the assumption that type=0, config=0 was a suitable configuration - which it is. Lets make this a little more explicit and more readable via the use of proper symbols. [ Impact: cleanup ] Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 081fad86178ec0f64f32f1bd04cf4aad22714fb9 Author: Peter Zijlstra Date: Thu Jun 11 17:57:21 2009 +0200 perf_counter: Remove PERF_TYPE_RAW special casing The PERF_TYPE_RAW special case seems superfluous these days. Remove it and add it to the switch() stmt like the others. [ Impact: cleanup ] Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit f1a3c979059b2033d0b1cc4f9ee5c90bf92b5f94 Author: Peter Zijlstra Date: Thu Jun 11 17:56:09 2009 +0200 perf_counter: PERF_TYPE_HW_CACHE is a hardware counter too is_software_counter() was missing the new HW_CACHE category. ( This could have caused some counter scheduling artifacts with mixed sw and hw counters and counter groups. ) Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 4c921126fe553440261f56691c5f60fbaaa486d6 Author: Jaswinder Singh Rajput Date: Fri Jun 12 12:04:54 2009 +0530 powerpc, perf_counter: Fix performance counter event types Sachin Sant reported these compiler errors: CC arch/powerpc/kernel/power7-pmu.o arch/powerpc/kernel/power7-pmu.c:297: error: PERF_COUNT_CPU_CYCLES undeclared here (not in a function) Which happened because a last-minute rename of symbols crossed with the Power7 support patch. Fix this by using the new symbol names. Reported-by: Sachin Sant Signed-off-by: Jaswinder Singh Rajput Cc: Paul Mackerras Cc: linuxppc-dev@ozlabs.org LKML-Reference: <1244788494.5554.1.camel@ht.satnam> Signed-off-by: Ingo Molnar commit 5933048c69edb546f1e93c26dc93816f0be9f754 Author: Rusty Russell Date: Fri Jun 12 21:47:04 2009 -0600 module: cleanup FIXME comments about trimming exception table entries. Everyone cut and paste this comment from my original one. We now do it generically, so cut the comments. Signed-off-by: Rusty Russell Cc: Amerigo Wang commit ad6561dffa17f17bb68d7207d422c26c381c4313 Author: Rusty Russell Date: Fri Jun 12 21:47:03 2009 -0600 module: trim exception table on init free. It's theoretically possible that there are exception table entries which point into the (freed) init text of modules. These could cause future problems if other modules get loaded into that memory and cause an exception as we'd see the wrong fixup. The only case I know of is kvm-intel.ko (when CONFIG_CC_OPTIMIZE_FOR_SIZE=n). Amerigo fixed this long-standing FIXME in the x86 version, but this patch is more general. This implements trim_init_extable(); most archs are simple since they use the standard lib/extable.c sort code. Alpha and IA64 use relative addresses in their fixups, so thier trimming is a slight variation. Sparc32 is unique; it doesn't seem to define ARCH_HAS_SORT_EXTABLE, yet it defines its own sort_extable() which overrides the one in lib. It doesn't sort, so we have to mark deleted entries instead of actually trimming them. Inspired-by: Amerigo Wang Signed-off-by: Rusty Russell Cc: linux-alpha@vger.kernel.org Cc: sparclinux@vger.kernel.org Cc: linux-ia64@vger.kernel.org commit c398df30d5caad626ac72bfab0361a7b0f67a661 Author: Amerigo Wang Date: Wed Jun 3 21:46:46 2009 -0400 module: merge module_alloc() finally As Christoph Hellwig suggested, module_alloc() actually can be unified for i386 and x86_64 (of course, also UML). Signed-off-by: WANG Cong Cc: Christoph Hellwig Cc: 'Ingo Molnar' Signed-off-by: Rusty Russell commit c0e5e10bf380c7a7c4e8c8b7d42e0aba623e76a6 Author: Amerigo Wang Date: Wed Jun 3 21:46:28 2009 -0400 uml module: fix uml build process due to this merge Due to the previous merge, uml needs to be fixed. Signed-off-by: WANG Cong Cc: Jeff Dike Signed-off-by: Rusty Russell commit 0fdc83b950df9e2eb45db6fca9c3d92c66fd5028 Author: Amerigo Wang Date: Wed Jun 3 21:46:19 2009 -0400 x86 module: merge the rest functions with macros Merge the rest functions together, with proper preprocessing directives. Finally remove module_{32|64}.c. Signed-off-by: WANG Cong Cc: Ingo Molnar Signed-off-by: Rusty Russell commit 2d5bf28fb9e3c178db4f5536e2fe38d3a5ed7f40 Author: Amerigo Wang Date: Wed Jun 3 21:46:09 2009 -0400 x86 module: merge the same functions in module_32.c and module_64.c Merge the same functions both in module_32.c and module_64.c into module.c. This is the first step to merge both of them finally. Signed-off-by: WANG Cong Cc: Ingo Molnar Signed-off-by: Rusty Russell commit 2ead9439f0c6ed03faafe27abe8bc1dd256d117b Author: Rusty Russell Date: Fri Jun 12 21:46:58 2009 -0600 uvesafb: improve parameter handling. 1) Now module_param(..., invbool, ...) requires a bool, and similarly module_param(..., bool, ...) allows it, change pmi_setpal to a bool. 2) #define param_get_scroll to NULL, since it can never be called (perm argument to module_param_named is 0). 3) Return -EINVAL from param_set_scroll if the value is bad, so it's reported. Note that I don't think the old fb_get_options() is required for new drivers: the parameters automatically work as uvesafb.XXX=... anyway. Acked-by: Michał Januszewski Signed-off-by: Rusty Russell commit fddd520122953550ec2c8b60e7ca0d0f0d115d97 Author: Rusty Russell Date: Fri Jun 12 21:46:57 2009 -0600 module_param: allow 'bool' module_params to be bool, not just int. Impact: API cleanup For historical reasons, 'bool' parameters must be an int, not a bool. But there are around 600 users, so a conversion seems like useless churn. So we use __same_type() to distinguish, and handle both cases. Signed-off-by: Rusty Russell commit d2c123c27db841c6c11a63de9c144823d2b1ba76 Author: Rusty Russell Date: Fri Jun 12 21:46:56 2009 -0600 module_param: add __same_type convenience wrapper for __builtin_types_compatible_p Impact: new API __builtin_types_compatible_p() is a little awkward to use: it takes two types rather than types or variables, and it's just damn long. (typeof(type) == type, so this works on types as well as vars). Signed-off-by: Rusty Russell commit 45fcc70c0b6ee0c508e1fdb5fef735c3546803f4 Author: Rusty Russell Date: Fri Jun 12 21:46:56 2009 -0600 module_param: split perm field into flags and perm Impact: cleanup Rather than hack KPARAM_KMALLOCED into the perm field, separate it out. Since the perm field was 32 bits and only needs 16, we don't add bloat. Signed-off-by: Rusty Russell commit 9a71af2c3627b379b7c31917a7f6ee0d29bc559b Author: Rusty Russell Date: Fri Jun 12 21:46:53 2009 -0600 module_param: invbool should take a 'bool', not an 'int' It takes an 'int' for historical reasons, and there are only two users: simply switch it over to bool. The other user (uvesafb.c) will get a (harmless-on-x86) warning until the next patch is applied. Cc: Brad Douglas Cc: Michal Januszewski Signed-off-by: Rusty Russell commit ab8e2eb722f1e5fcbd8181e3e9ef4e95c52124df Author: Rusty Russell Date: Fri Jun 12 21:46:50 2009 -0600 cyber2000fb.c: use proper method for stopping unload if CONFIG_ARCH_SHARK Russell explains the __module_get(): > cyber2000fb.c does it in its module initialization function > to prevent the module (when built for Shark) from being unloaded. It > does this because it's from the days of 2.2 kernels and no one bothered > writing the module unload support for Shark. Since 2.4, the correct answer has been to not define an unload fn. Cc: Russell King Cc: alex@shark-linux.de Signed-off-by: Rusty Russell commit c3bb4d24ab4b74e11992ccb9828569583166a87d Author: Catalin Marinas Date: Fri Jun 12 09:35:22 2009 +0100 kmemleak: Add more info to the MAINTAINERS entry The patch adds the "F:" fields to the KMEMLEAK MAINTAINERS entry and also moves it before KMEMTRACE to preserve the alphabetical order. Signed-off-by: Catalin Marinas commit dff5da6d09daaab40a8741dce0ed3c2e94079de2 Author: Yong Wang Date: Fri Jun 12 16:08:55 2009 +0800 perf_counter/x86: Add a quirk for Atom processors The fixed-function performance counters do not work on current Atom processors. Use the general-purpose ones instead. Signed-off-by: Yong Wang Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: <20090612080855.GA2286@ywang-moblin2.bj.intel.com> Signed-off-by: Ingo Molnar commit faafec1e61e61d350248af2a7e5f047606adab6e Author: Yong Wang Date: Fri Jun 12 11:17:06 2009 +0800 perf_counter tools: Remove one L1-data alias Otherwise all L1-instruction aliases will be recognized as L1-data by strcasestr() when calling function parse_aliases. Signed-off-by: Yong Wang Cc: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <20090612031706.GA22126@ywang-moblin2.bj.intel.com> Signed-off-by: Ingo Molnar commit 55cd63676e0c5710fbe1ea86dfd9f8ea9aaa90f2 Author: Yinghai Lu Date: Fri Jun 12 11:36:52 2009 +0300 x86: make zap_low_mapping could be used early Only one cpu is there, just call __flush_tlb for it. Fixes the following boot warning on x86: [ 0.000000] Memory: 885032k/915540k available (5993k kernel code, 29844k reserved, 3842k data, 428k init, 0k highmem) [ 0.000000] virtual kernel memory layout: [ 0.000000] fixmap : 0xffe17000 - 0xfffff000 (1952 kB) [ 0.000000] vmalloc : 0xf8615000 - 0xffe15000 ( 120 MB) [ 0.000000] lowmem : 0xc0000000 - 0xf7e15000 ( 894 MB) [ 0.000000] .init : 0xc19a5000 - 0xc1a10000 ( 428 kB) [ 0.000000] .data : 0xc15da4bb - 0xc199af6c (3842 kB) [ 0.000000] .text : 0xc1000000 - 0xc15da4bb (5993 kB) [ 0.000000] Checking if this processor honours the WP bit even in supervisor mode...Ok. [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: at kernel/smp.c:369 smp_call_function_many+0x50/0x1b0() [ 0.000000] Hardware name: System Product Name [ 0.000000] Modules linked in: [ 0.000000] Pid: 0, comm: swapper Not tainted 2.6.30-tip #52504 [ 0.000000] Call Trace: [ 0.000000] [] warn_slowpath_common+0x65/0x95 [ 0.000000] [] warn_slowpath_null+0x12/0x15 [ 0.000000] [] smp_call_function_many+0x50/0x1b0 [ 0.000000] [] ? do_flush_tlb_all+0x0/0x41 [ 0.000000] [] ? do_flush_tlb_all+0x0/0x41 [ 0.000000] [] smp_call_function+0x31/0x58 [ 0.000000] [] ? do_flush_tlb_all+0x0/0x41 [ 0.000000] [] on_each_cpu+0x26/0x65 [ 0.000000] [] flush_tlb_all+0x19/0x1b [ 0.000000] [] zap_low_mappings+0x4d/0x56 [ 0.000000] [] ? printk+0x14/0x17 [ 0.000000] [] mem_init+0x23d/0x245 [ 0.000000] [] start_kernel+0x17a/0x2d5 [ 0.000000] [] ? unknown_bootoption+0x0/0x19a [ 0.000000] [] __init_begin+0x39/0x41 [ 0.000000] ---[ end trace 4eaa2a86a8e2da22 ]--- Reported-by: Ingo Molnar Signed-off-by: Yinghai Lu Signed-off-by: Pekka Enberg commit 28be225b23b115573e0ecc8ef9996f42a1652f74 Author: Yinghai Lu Date: Fri Jun 12 11:33:02 2009 +0300 irq: slab alloc for default irq_affinity Ingo had [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: at mm/bootmem.c:537 alloc_arch_preferred_bootmem+0x2b/0x71() [ 0.000000] Hardware name: System Product Name [ 0.000000] Modules linked in: [ 0.000000] Pid: 0, comm: swapper Tainted: G W 2.6.30-tip-03087-g0bb2618-dirty #52506 [ 0.000000] Call Trace: [ 0.000000] [<81032588>] warn_slowpath_common+0x60/0x90 [ 0.000000] [<810325c5>] warn_slowpath_null+0xd/0x10 [ 0.000000] [<819d1bc0>] alloc_arch_preferred_bootmem+0x2b/0x71 [ 0.000000] [<819d1c31>] ___alloc_bootmem_nopanic+0x2b/0x9a [ 0.000000] [<81050a0a>] ? lock_release+0xac/0xb2 [ 0.000000] [<819d1d4c>] ___alloc_bootmem+0xe/0x2d [ 0.000000] [<819d1e9f>] __alloc_bootmem+0xa/0xc [ 0.000000] [<819d7c63>] alloc_bootmem_cpumask_var+0x21/0x26 [ 0.000000] [<819d0cc8>] early_irq_init+0x15/0x10d [ 0.000000] [<819bb75a>] start_kernel+0x167/0x326 [ 0.000000] [<819bb06b>] __init_begin+0x6b/0x70 [ 0.000000] ---[ end trace 4eaa2a86a8e2da23 ]--- [ 0.000000] NR_IRQS:2304 nr_irqs:424 [ 0.000000] CPU 0 irqstacks, hard=821e6000 soft=821e7000 we need to update init_irq_default_affinity Signed-off-by: Yinghai Lu Signed-off-by: Pekka Enberg commit bf664c0a3a42683b78d74aca2d7cfb6ccc2aa2c3 Author: Mike Frysinger Date: Fri Jun 5 03:13:11 2009 -0400 Blackfin: fix sparseirq/kstat_irqs fallout The sparseirq changes (d7e51e66) played poorly with the Blackfin irqchip implementation as we're still using the old hardirq method. Our bad irq structure had a NULL kstat_irqs field so when all the common code tries to increment this field, everything goes big bada boom. Signed-off-by: Mike Frysinger commit ce0bf52dd3f9d980889190bc6097f1756b71eb8c Author: Mike Frysinger Date: Thu Jun 4 23:51:27 2009 -0400 Blackfin: fix unused warnings after nommu update The massive nommu update (8feae131) left the local variable "vml" unused, so punt it. Signed-off-by: Mike Frysinger commit 81f7f45606812f1d15d618c2646d0f33ca111f87 Author: Robin Getz Date: Wed Jun 3 18:58:26 2009 +0000 Blackfin: export the last exception cause via debugfs We have some test code that runs in userspace that exercises the exception handling of the Blackfin pretty thoroughly. Part of the validation process is checking the exact exception triggered, so export the last one seen to userspace via debugfs when debugging is enabled for the test code to check. Signed-off-by: Robin Getz Signed-off-by: Mike Frysinger commit 0a990614264f04879d9608da1cfcf9a6596efe08 Author: Roel Kluin Date: Thu Jun 4 19:57:24 2009 -0400 Blackfin: fix length checking in kgdb_ebin2mem The kgdb_ebin2mem() was decrementing the count variable to do parsing, but then later still tries to use it based on its original meaning. So leave it untouched and use a different variable to walk the memory. Signed-off-by: Roel Kluin Signed-off-by: Mike Frysinger commit 11aca0e7352b6a28193221cd2dd85f758fb71b23 Author: Mike Frysinger Date: Thu Jun 4 17:28:16 2009 +0000 Blackfin: kgdb: fix up error return values The Blackfin kgdb code was all passing back positive errno values when it really should have been using negative errno values. Reported-by: Roel Kluin Signed-off-by: Mike Frysinger commit a43b739f257fd2569e11c6c93fbb86df382848e9 Author: Mike Frysinger Date: Thu Jun 4 19:24:31 2009 +0000 Blackfin: push access_ok() L1 attribute down There is no need for the L1 attribute to be on the prototype of the access_ok() function as all consumers of the function do not care where it lives -- they'll always use pcrel calls to get to it. This prevents pointless recompiles of most of the system when this config option changes. Signed-off-by: Mike Frysinger commit 8d0d8f2a3a57479b695a59ed2f67236f1488b90d Author: Mike Frysinger Date: Thu Jun 4 19:11:31 2009 +0000 Blackfin: punt duplicated search_exception_table() prototype The common code already has a prototype for this function and we don't use it anywhere in the Blackfin code, so punt it from the Blackfin headers. Signed-off-by: Mike Frysinger commit a8372b5ca618d4ea41b3c7ac3cef8dd6efa68bc6 Author: Robin Getz Date: Thu Jun 4 00:32:59 2009 +0000 Blackfin: add missing access_ok() checks to user functions The core string/clear user functions weren't checking the user pointers which caused kernel crashes with some bad programs and tests (like LTP). Signed-off-by: Robin Getz Signed-off-by: Mike Frysinger commit 685a694f0653b7db49f663b2cd6953695214fb30 Author: Mike Frysinger Date: Wed Jun 3 00:33:31 2009 +0000 Blackfin: convert early_printk EVT init to a loop The EVT registers are all contiguous in the memory map, so using a loop to initialize them all rather than hardcoding the list results in much better generated code (a hardware loop rather than a whole bunch of individual loads). Signed-off-by: Mike Frysinger commit f1db88d2a7f1c92284e64f5dbb5c7a316a22576d Author: Mike Frysinger Date: Tue Jun 2 08:46:35 2009 +0000 Blackfin: document the lsl variants of the L1 allocator Make sure the meaning of "lsl" is covered somewhere and it is clear why we somewhat duplicate the sram alloc/free functions. Signed-off-by: Mike Frysinger commit 595d681f2c0610223bbe79189b0896f1b8c24f8a Author: Mike Frysinger Date: Tue Jun 2 00:35:33 2009 +0000 Blackfin: rename Blackfin relocs according to the toolchain The latest Blackfin toolchain has fixed its relocation scheme to match other ports: always use R_BFIN_ prefix and capitalize everything. This brings the kernel in line with those fixes. Signed-off-by: Mike Frysinger commit 780172bf875298133fe5627552a632d1fda3775a Author: Mike Frysinger Date: Mon Jun 1 19:43:02 2009 -0400 Blackfin: check SIC defines rather than variant names Rather than having to maintain a hard coded list of Blackfin variants, use the SIC defines themselves. This fixes build problems on BF51x/BF538 under some configurations as they were missing from one of the lists. Signed-off-by: Mike Frysinger commit ea8538a039607cd959d28ed10086484e051ce7db Author: Sonic Zhang Date: Mon Jun 1 00:49:32 2009 -0400 Blackfin: add SSYNC to set_dma_sg() for descriptor fetching Make sure the internal core buffers are flushed before telling the DMA engine to fetch the descriptor structure so that it gets the right values. Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger commit 9b9bfded623cffb4259b95e5419404015dba361f Author: Graf Yang Date: Wed May 27 09:58:35 2009 +0000 Blackfin: convert SMP to only use generic time framework Signed-off-by: Graf Yang Signed-off-by: Mike Frysinger commit ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3 Author: Michael Hennerich Date: Fri May 29 15:41:18 2009 +0000 Blackfin: bf548-ezkit/bf537-stamp: add resources for ADXL345/346 Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger commit 79df1b69471b5ea4be8285c9dc6ab05cdf5a85d7 Author: Mike Frysinger Date: Tue May 26 23:34:51 2009 +0000 Blackfin: override default uClinux MTD addr/size Due to a processor anomaly (05000263 to be exact), most Blackfin parts cannot keep the embedded filesystem image directly after the kernel in RAM. Instead, the filesystem needs to be relocated to the end of memory. As such, we need to tweak the map addr/size during boot for Blackfin systems. Signed-off-by: Mike Frysinger commit 37082511f06108129bd5f96d625a6fae2d5a4ab4 Author: Mike Frysinger Date: Tue May 26 21:48:38 2009 +0000 Blackfin: fix command line corruption with DEBUG_DOUBLEFAULT Commit 6b3087c6 (which introduced Blackfin SMP) broke command line passing when the DEBUG_DOUBLEFAULT config option was enabled. Switch the code to using a scratch register and not R7 which holds the command line. Signed-off-by: Mike Frysinger commit 89ecd506917ba6e86ede072efbef6c69d01db4dd Author: Graf Yang Date: Mon May 25 06:40:42 2009 +0000 Blackfin: fix handling of initial L1 reservation This restores some L1 reservation logic that was lost during the Blackfin SMP merge. Signed-off-by: Graf Yang Signed-off-by: Mike Frysinger commit c72aa0794a0ecc0b87ba9d5546215c26c8c80668 Author: Graf Yang Date: Mon May 25 04:44:00 2009 +0000 Blackfin: merge sram init functions Now that the sram_init() function exists only to call the bfin_sram_init() after the punting of the reserve_pda() function, simply merge the two to avoid pointless overhead. Signed-off-by: Graf Yang Signed-off-by: Mike Frysinger commit d1800fe0e50ed22673cd895f2b0a7c2b79d3010a Author: Graf Yang Date: Mon May 25 04:27:22 2009 +0000 Blackfin: drop unused reserve_pda() function The Per-processor Data Area isn't actually reserved by this function, and all it ended up doing was issuing a printk(), so punt it. Signed-off-by: Graf Yang Signed-off-by: Mike Frysinger commit c8d5ea8ccb1ce586131c6c549899cb5073222da0 Author: Michael Hennerich Date: Mon May 4 09:11:37 2009 +0000 Blackfin: update gptimers API First we fix the prototypes for functions that return boolean values by using "int" rather than "uint16_t". Then we introduce a get_gptimer_run() function for checking the current run status of a timer, and then we add a disable_gptimers_sync() function which parallels disable_gptimers() with corresponding normal "_sync" behavior. Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger commit 9ba3c24f10c948dadac2ca91ed714dfbcedd61ca Author: Robin Getz Date: Wed May 20 21:19:21 2009 +0000 Blackfin: include system/processor info in dump messages People often copy & paste crash messages without surrounding context, so include common useful information like system/processor stats in the crash summary. This should smooth over the report/test cycle a bit more. Signed-off-by: Robin Getz Signed-off-by: Mike Frysinger commit 0acad8dfee6bde7e246a95a52f864a8eee777ed8 Author: Robin Getz Date: Mon May 11 18:55:16 2009 +0000 Blackfin: add workaround for anomaly 05000461 Returning too fast with a bad RETI can trigger false errors. Signed-off-by: Robin Getz Signed-off-by: Mike Frysinger commit a0cab65642813b7990e1b4b2ab6ad92e171571f4 Author: Robin Getz Date: Mon May 11 18:34:41 2009 +0000 Blackfin: make sure stack is accessible before dumping it When displaying a crash dump, make sure accessing the stack is safe so we don't crash at the same time. Signed-off-by: Robin Getz Signed-off-by: Mike Frysinger commit b9a3899d59c3f0fc074573f0eba2419b1e4c0bca Author: Robin Getz Date: Mon May 18 18:33:26 2009 +0000 Blackfin: make deferred hardware errors more exact Hardware errors on the Blackfin architecture are queued by nature of the hardware design. Things that could generate a hardware level queue up at the system interface and might not process until much later, at which point the system would send a notification back to the core. As such, it is possible for user space code to do something that would trigger a hardware error, but have it delay long enough for the process context to switch. So when the hardware error does signal, we mistakenly evaluate it as a different process or as kernel context and panic (erp!). This makes it pretty difficult to find the offending context. But wait, there is good news somewhere. By forcing a SSYNC in the interrupt entry, we force all pending queues at the system level to be processed and all hardware errors to be signaled. Then we check the current interrupt state to see if the hardware error is now signaled. If so, we re-queue the current interrupt and return thus allowing the higher priority hardware error interrupt to process properly. Since we haven't done any other context processing yet, the right context will be selected and killed. There is still the possibility that the exact offending instruction will be unknown, but at least we'll have a much better idea of where to look. The downside of course is that this causes system-wide syncs at every interrupt point which results in significant performance degradation. Since this situation should not occur in any properly configured system (as hardware errors are triggered by things like bad pointers), make it a debug configuration option and disable it by default. Signed-off-by: Robin Getz Signed-off-by: Mike Frysinger commit 97b070c8e7e82be30c8a3bf19e69b8c0c71f1fac Author: Mike Frysinger Date: Fri Apr 24 03:17:07 2009 +0000 Blackfin: add note about anomaly 05000242 being worked around Document anomaly 05000242 workaround in source code. Signed-off-by: Mike Frysinger commit 5ba766752d14a741aa2d7a3c321917a310b34afb Author: Graf Yang Date: Thu May 7 04:09:15 2009 +0000 Blackfin: work around anomaly 05000220 When possible, work around anomaly 05000220 (external memory is write back cached, but L2 is not cached). If not possible, detect the conditions at build time and reject any qualifying configurations. Signed-off-by: Graf Yang Signed-off-by: Mike Frysinger commit a261eec0009b6093727fb7a59b12a10c6c981714 Author: Mike Frysinger Date: Wed May 20 14:05:36 2009 +0000 Blackfin: rename some Blackfin drivers Try to keep the naming conventions consistent, so: SPI_ADC_BF533 -> BFIN_SPI_ADC TWI_LCD -> BFIN_TWI_LCD Signed-off-by: Mike Frysinger commit a17c7f6f5b3b3f91ff7121c33bea8748c415ab15 Author: Robin Getz Date: Tue May 5 17:14:39 2009 +0000 Blackfin: make sure MPU CPLB for first 1k is marked as valid This way we properly catch and kill applications that jump to a NULL ptr. Signed-off-by: Robin Getz Signed-off-by: Mike Frysinger commit 8af7ffa0d5460586e0f06b2f045a6a2631224b61 Author: Graf Yang Date: Fri May 8 07:42:12 2009 +0000 Blackfin: add workaround for anomaly 05000287 Signed-off-by: Graf Yang Signed-off-by: Mike Frysinger commit 1fa9be72b558c39459f98835eb86dbb4ef4da30b Author: Graf Yang Date: Fri May 15 11:01:59 2009 +0000 Blackfin: add support for gptimer0 as a tick source For systems where the core cycles are not a usable tick source (like SMP or cycles gets updated), enable gptimer0 as an alternative. Signed-off-by: Graf Yang Signed-off-by: Mike Frysinger commit 555487bbb63f527e63fecbff48c86e2c07ce5024 Author: Graf Yang Date: Wed May 6 10:38:07 2009 +0000 Blackfin: annotate anomaly 05000120 Add some notes for anomaly 05000120 to make sure we work around it. Signed-off-by: Graf Yang Signed-off-by: Mike Frysinger commit ee0263cc2e7d774655bba6a6750a06099a3cebf0 Author: Graf Yang Date: Wed May 20 06:06:15 2009 +0000 Blackfin: BF518F-EZBRD: handle required portmuxing of async pins The two high address lines on the BF51x are not dedicated which means we need to handle them like any other peripheral pin if we want to access the upper 2MB of parallel flash. Signed-off-by: Graf Yang Signed-off-by: Mike Frysinger commit 7f3aee3c187641ec7c7e260d9cabb71ac4ac9f7c Author: Sonic Zhang Date: Thu May 7 10:04:19 2009 +0000 Blackfin: detect anomaly 05000274 Detect and reject operating conditions for anomaly 05000274 since the problem cannot be worked around in software. Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger commit d8804adf52f5991388fa9af77428e4cc7768059d Author: Mike Frysinger Date: Wed Apr 29 06:26:46 2009 +0000 Blackfin: do not append newlines to panic() messages The panic() function already handles newlines for us. Signed-off-by: Mike Frysinger commit 729a3fa7333af58d57eecb0aacf7ca3d58237f81 Author: Mike Frysinger Date: Fri Apr 24 03:55:41 2009 +0000 Blackfin: workaround anomaly 05000227 Workaround anomaly 05000227 by only using the scratch pad for stack when absolutely necessary. The core code which reprograms clocks really only touches MMRs directly with constants. Signed-off-by: Mike Frysinger commit a9031028ef70f658daa2151e361aee7b082965ee Author: Mike Frysinger Date: Thu Apr 23 17:04:10 2009 +0000 Blackfin: delete unused sys_getpagesize() function Signed-off-by: Mike Frysinger commit e522c8466d6f8437cf02a34287c8707ef53081ed Author: Graf Yang Date: Fri May 8 07:42:12 2009 +0000 Blackfin: work around anomaly 05000287 Make sure we work around anomaly 05000287 by configuring different port preferences for the data cache. Signed-off-by: Graf Yang Signed-off-by: Mike Frysinger commit a9a59e3096443ea4d6f50db978d7d3bbb47708b4 Author: Mike Frysinger Date: Fri Apr 24 01:42:54 2009 +0000 Blackfin: punt useless GPIO init call This init code existed only to dump a printk(), and not even a useful one. Signed-off-by: Mike Frysinger commit 76068c3c5dee4332f532573b6423d75c3e14f660 Author: Robin Getz Date: Thu Apr 23 20:56:42 2009 +0000 Blackfin: annotate anomaly 05000119 in core DMA code Add a reminder note to avoid the DMA_DONE bit in our DMA core code. Signed-off-by: Robin Getz Signed-off-by: Mike Frysinger commit bc4d6f36db4b24bf328a5fd70038a2e609b9f028 Author: Robin Getz Date: Thu Apr 23 14:15:04 2009 +0000 Blackfin: document anomaly 05000234 workaround Note the reason for using CHIPD over DSPID. Signed-off-by: Robin Getz Signed-off-by: Mike Frysinger commit fecbd7366bf5a39eaae2c03541f0b412f319534f Author: Robin Getz Date: Thu Apr 23 20:49:43 2009 +0000 Blackfin: fix early L1 relocation crash Our early L1 relocate code may implicitly call code which lives in L1 memory. This is due to the dma_memcpy() rewrite that made the DMA code lockless and safe to be used by multiple processes. If we start the early DMA memcpy to relocate things into L1 instruction but then our DMA memcpy code calls a function that lives in L1, things fall apart. As such, create a small dedicated DMA memcpy routine that we can assume sanity at boot time. Reported-by: Filip Van Rillaer Signed-off-by: Robin Getz Signed-off-by: Mike Frysinger commit f5879fda09ea98d7aa845a0e0fa7e508452e5f9f Author: Graf Yang Date: Wed May 6 09:59:11 2009 +0000 Blackfin: add MDMA defines to make cross-variant coding easier Add some defines to make the BF538/BF561 look like most other Blackfin parts in that it has a MDMA0 channel available for low level init. Signed-off-by: Graf Yang Signed-off-by: Mike Frysinger commit f339f46b05cfe289024b15a0525c8b61f1426a88 Author: Mike Frysinger Date: Tue May 19 12:58:13 2009 +0000 Blackfin: fix detection of cached L2 SRAM Make sure our bfin_addr_dcachable() function flags cached L2 SRAM properly else memory easily goes unflushed when working with DMA. Signed-off-by: Mike Frysinger commit c8f36dc3c11c3e9e879ded82cdf5d748d4ab2fb2 Author: Mike Frysinger Date: Thu May 14 14:55:50 2009 +0000 Blackfin: simplify BF561 coreb driver greatly Since 90% of this driver can be handled in user space, move it to the corebld user space application. Signed-off-by: Mike Frysinger commit b9ccf14bc5352b86e7e254e6cf55d9b917b1b1cc Author: Sonic Zhang Date: Thu May 21 06:39:46 2009 +0000 Blackfin: update defconfigs Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit 78f28a0a83a86dfe021f7d8169208b9af2a23201 Author: Mike Frysinger Date: Fri Apr 10 21:20:19 2009 +0000 Blackfin: simplify the do_flush macro Simplify the do_flush macro now that we don't need to take into account a second instruction being used together. Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit f8b556514c4481a500ace4745731f04a77c08d54 Author: Mike Frysinger Date: Mon Apr 13 21:58:34 2009 +0000 Blackfin: set bf51x/bf52x to 0.0 rev by default and bf54x to 0.2 Update the default revs based on what we actually support (bf54x-0.[01] is too broken to use). Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit d4b890b0cd9e0ac75cbdf7011ef38ebc662930e6 Author: Michael Hennerich Date: Thu Apr 16 12:38:34 2009 +0000 Blackfin: do not error if GPIO IRQ is requested already as GPIO Some drivers expect to be able to request both as GPIO and GPIO IRQ, so allow that use case. Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu Signed-off-by: Mike Frysinger commit a413647bb5bbe5414cd68332ff77588db09d10be Author: Mike Frysinger Date: Fri May 8 07:40:25 2009 +0000 Blackfin: pull updated anomaly lists from toolchain Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit 648882d940a1f84cbf11418ae6e405ef42a66855 Author: Michael Hennerich Date: Tue Apr 21 12:05:50 2009 +0000 Blackfin: fix up PATA resource handling in bf537-stamp Make sure the addresses declared match reality, and make the PATA IRQ code optional. Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit 51387009bd4d9fdbc9d4a91e45bd96cc8e3065de Author: Philippe Gerum Date: Wed Apr 8 07:41:55 2009 +0000 Blackfin: merge Philippe's recent ipipe patch ipipe-2.6.28.9-blackfin-git95aafe6.patch Singed-off-by: Philippe Gerum Signed-off-by: Yi Li Signed-off-by: Bryan Wu Signed-off-by: Mike Frysinger commit f75196c404246b371182bb7554eab695619cb36f Author: Mike Frysinger Date: Wed Apr 1 12:25:58 2009 +0000 Blackfin: fix warnings with I/O port macros The I/O port functions take ints, so we need to cast them up before passing to our read/write funcs to avoid ugly messes of warnings. Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit f4290e81f6035b49d4a03706081b2c5f58906386 Author: Mariusz Kozlowski Date: Sun Apr 12 20:03:30 2009 +0000 Blackfin: fix parentheses balance and convert some tab/space mixing Signed-off-by: Mariusz Kozlowski Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit 4b402e3a54a46505692ec8215231e2ede46a4aeb Author: Graf Yang Date: Mon Apr 20 09:20:58 2009 +0000 Blackfin: fix bug found by traps test case 21 The traps test case 21 "exception 0x3f: l1_instruction_access" would make the kernel panic on BF533's because we end up calling show_stack() infinitely. Signed-off-by: Graf Yang Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit 5d89137a17ca804ee60077f5d4ad8d7ca60f0614 Author: Mike Frysinger Date: Fri Apr 10 20:52:08 2009 +0000 Blackfin: fix data cache flushing when doing icache flushing Make sure we flush all data caches and their write buffers before flushing icache, otherwise random edge cases could crop up where stale data is read into icache from external memory. As fallout, punt the combined icache + dcache flush function since we cannot safely do them back to back -- the SSYNC is needed between the dcache flush and the icache flush. Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit f82e0a0c67621df83458753aef580a3508d5428e Author: Graf Yang Date: Wed Apr 8 08:30:22 2009 +0000 Blackfin: fix link failure due to CONFIG_EXCEPTION_L1_SCRATCH Move exception stack mess from entry.S to init.c to fix link failure when CONFIG_EXCEPTION_L1_SCRATCH is in use. Signed-off-by: Graf Yang Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit b8d0c778e652d23750cb1af9848408d620cbc425 Author: Robin Getz Date: Tue Mar 31 13:40:52 2009 +0000 Blackfin: allow scheduler functions to be placed into L1 Signed-off-by: Robin Getz Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit 8d5c2f03bb6302a2aa5a4d0d28f59d01e2eea6c1 Author: Sonic Zhang Date: Mon Mar 30 09:07:26 2009 +0000 Blackfin: Allow bf548 ATAPI to be routed to GPIO By default, it is routed to async memory address. In GPIO case, GPIO peripheral PINs should be requested in advance. Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit ffdf3ec8060c1089f92468ade63981a217b5aace Author: Yi Li Date: Tue Mar 31 10:36:51 2009 +0000 Blackfin: bf527-ezkit: add support for mmc-spi Signed-off-by: Yi Li Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit c8342f872d7a3967fd09db54fece3f6c38d834df Author: Mike Frysinger Date: Tue Mar 31 00:18:35 2009 +0000 Blackfin: add some help text to the EBIU_AMBCTL settings Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit 349ebbcc26258f40da5534a586233e7d6233071c Author: Michael Hennerich Date: Wed Apr 15 08:48:08 2009 +0000 Blackfin: add comment for anomaly 05000171 to init code Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit 5b02ee3d219f9e01b6e9146e25613822cfc2e5ce Merge: 26a28fa 8ebf975 Author: Arnd Bergmann Date: Fri Jun 12 09:53:47 2009 +0200 asm-generic: merge branch 'master' of torvalds/linux-2.6 Fixes a merge conflict against the x86 tree caused by a fix to atomic.h which I renamed to atomic_long.h. Signed-off-by: Arnd Bergmann commit 6ab56315a36e42e90ad7173aa8b3bbd1467d1fea Author: Catalin Marinas Date: Fri Jun 12 09:29:52 2009 +0100 kmemleak: Remove the kmemleak.h include in drivers/char/vt.c This file is no longer annotated for false positives but the kmemleak.h include was still present. Signed-off-by: Catalin Marinas Acked-by: Alan Cox commit 310d6b671588dd7695cbc0d09d02e41d94a42bed Author: Heiko Carstens Date: Fri Jun 12 10:26:49 2009 +0200 [S390] wire up sys_perf_counter_open Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit fc39453debac927a3ba477bafbc6c18c7166ae78 Author: Heiko Carstens Date: Fri Jun 12 10:26:48 2009 +0200 [S390] wire up sys_rt_tgsigqueueinfo Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 9bf1226b33dc2f94fc37ffd70ee161e2bda1ff5c Author: Heiko Carstens Date: Fri Jun 12 10:26:47 2009 +0200 [S390] ftrace: add system call tracer support System call tracer support for s390. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 88dbd2037229bd2ed7543ffd0d8f2d9dec9d31d2 Author: Heiko Carstens Date: Fri Jun 12 10:26:46 2009 +0200 [S390] ftrace: add function graph tracer support Function graph tracer support for s390. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 8b4488f85d619253c9e631ec723368f400106771 Author: Heiko Carstens Date: Fri Jun 12 10:26:45 2009 +0200 [S390] ftrace: add function trace mcount test support Add support for early test if the function tracer is enabled or disabled. Saves some extra function calls. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit dfd9f7abc0fb67b5781f340d982384cea53b2884 Author: Heiko Carstens Date: Fri Jun 12 10:26:44 2009 +0200 [S390] ftrace: add dynamic ftrace support Dynamic ftrace support for s390. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit a2b53673fae14601bb520acf6a6f154463994565 Author: Heiko Carstens Date: Fri Jun 12 10:26:43 2009 +0200 [S390] kprobes: use probe_kernel_write Use proble_kernel_write() to patch the kernel. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 88df125fd6127e409793fd84a574566651450320 Author: Heiko Carstens Date: Fri Jun 12 10:26:42 2009 +0200 [S390] maccess: arch specific probe_kernel_write() implementation Add an s390 specific probe_kernel_write() function which allows to write to the kernel text segment even if write protection is enabled. This is implemented using the lra (load real address) and stura (store using real address) instructions. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit d93f82b6e0c12a4373f2d04b1f92fcb2d175b62c Author: Heiko Carstens Date: Fri Jun 12 10:26:41 2009 +0200 [S390] maccess: add weak attribute to probe_kernel_write probe_kernel_write() gets used to write to the kernel address space. E.g. to patch the kernel (kgdb, ftrace, kprobes...). Some architectures however enable write protection for the kernel text section, so that writes to this region would fault. This patch allows to specify an architecture specific version of probe_kernel_write() which allows to handle and bypass write protection of the text segment. That way it is still possible to catch random writes to kernel text and explicitly allow writes via this interface. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit f3d0a0d96a7a2b4e1335437f68b3181ab252050a Author: Martin Schwidefsky Date: Fri Jun 12 10:26:40 2009 +0200 [S390] profile_tick called twice profile_tick is called twice for every clock comparator interrupt. The generic clock event code does it in tick_sched_timer and the s390 backend code in clock_comparator_work. That is one too many, remove the one in the arch backend code. Signed-off-by: Martin Schwidefsky commit 6cc7f168954fe8b3d8988a90b2478a9c11c5ebcb Author: Stefan Weinhuber Date: Fri Jun 12 10:26:39 2009 +0200 [S390] dasd: forward internal errors to dasd_sleep_on caller If a DASD requests is started with dasd_sleep_on and fails, then the calling function may need to know the reason for the failure. In cases of hardware errors it can inspect the sense data in the irb, but when the reason is internal (e.g. start_IO failed) then it needs a meaningfull return code. Signed-off-by: Stefan Weinhuber Signed-off-by: Martin Schwidefsky commit 736e6ea0bf97ec79521f88704ce8506e5d60d078 Author: Sebastian Ott Date: Fri Jun 12 10:26:38 2009 +0200 [S390] dasd: sync after async probe Some functions called as a late_initcall depend on completely initialized devices. Since commit f3445a1a656bc26b07946cc6d20de1ef07c8d116 the dasd driver uses the new async framework and relies on the fact that synchronization is done in prepare_namespace which is called after the late_initcalls. Fix this by calling async_synchronize_full at the end of the related init functions. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky commit 92636b152f3b58e459988934f689619af9e04dbc Author: Sebastian Ott Date: Fri Jun 12 10:26:37 2009 +0200 [S390] dasd: check_characteristics cleanup Fix a broken memset (sizeof pointer vs sizeof the underlying structure) by cleaning up the involved functions. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky commit 45b44d76d373e66d08e0c745dc82ff9123103588 Author: Stefan Weinhuber Date: Fri Jun 12 10:26:36 2009 +0200 [S390] dasd: no High Performance FICON in 31-bit mode The High Performance FICON feature is not supported in 31-bit mode, no matter what the various flags say. So we need to check for the CONFIG_64BIT option as well. Signed-off-by: Stefan Weinhuber Signed-off-by: Martin Schwidefsky commit d0591485e15ccd908f91058f7da134248dcdbbb3 Author: Gerald Schaefer Date: Fri Jun 12 10:26:35 2009 +0200 [S390] dcssblk: revert devt conversion git commit f331c0296f2a9fee0d396a70598b954062603015 changed users of ->first_minor to devt. This broke device handling in dcssblk, so that no additional devices could be added after the first one. This patch reverts the devt conversion to the previous ->first_minor handling. Signed-off-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky commit 6b9d8e80bb9edd0c9fe948a6ef105391de56b012 Author: Roel Kluin Date: Fri Jun 12 10:26:34 2009 +0200 [S390] qdio: fix access beyond ARRAY_SIZE of irq_ptr->{in,out}put_qs Do not go beyond ARRAY_SIZE of irq_ptr->{in,out}put_qs Signed-off-by: Roel Kluin Signed-off-by: Martin Schwidefsky commit 239a64255fae8933d95273b5b92545949ca4e743 Author: Heiko Carstens Date: Fri Jun 12 10:26:33 2009 +0200 [S390] vmalloc: add vmalloc kernel parameter support With the kernel parameter 'vmalloc=' the size of the vmalloc area can be specified. This can be used to increase or decrease the size of the area. Works in the same way as on some other architectures. This can be useful for features which make excessive use of vmalloc and wouldn't work otherwise. The default sizes remain unchanged: 96MB for 31 bit kernels and 1GB for 64 bit kernels. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit dab4079d5b5ac421208499d5e554a07f9beb16e4 Author: Heiko Carstens Date: Fri Jun 12 10:26:32 2009 +0200 [S390] uaccess: use might_fault() instead of might_sleep() Adds more checking in case lockdep is turned on. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 205d7ab9c9af6847dda30650a0b8f98555a20654 Author: Martin Schwidefsky Date: Fri Jun 12 10:26:31 2009 +0200 [S390] 3270: lock dependency fixes Lockdep found a problem with the lock order of the view lock and the ccw device lock. raw3270_activate_view/raw3270_deactivate_view first take the ccw device lock then call the activate/deactivate functions of the view which take view lock. The update functions of the con3270/tty3270 view will first take the view lock, then take the ccw device lock. To fix this the activate/deactivate functions are changed to avoid taking the view lock by moving the functions calls that modify the 3270 output buffer to the update function which is called by a timer. Signed-off-by: Martin Schwidefsky commit fcf7581f7ca82e63e4e137be77c342a4e4ec8401 Author: Martin Schwidefsky Date: Fri Jun 12 10:26:30 2009 +0200 [S390] 3270: do not register with tty_register_device The tty3270_notifier that calls tty_register_device / tty_unregister_device is harmful in two ways: 1) the device node that is create is wrong because the minor numbers for 3270 tty start with 1 and tty_notifier passes the minor as index. 2) If 1) is corrected you'll get a warning: WARNING: at fs/sysfs/dir.c:462 sysfs_add_one+0x4c/0x60() sysfs: duplicate filename '227:1' can not be created The 227:1 link is already created by raw3270_create_attributes to refer to ../../class/tty/tty. There cannot be two links. Signed-off-by: Martin Schwidefsky commit a7c65a559ac371a08e67600ae585052441d71392 Author: Jan Glauber Date: Fri Jun 12 10:26:29 2009 +0200 [S390] qdio: inline qdio_perf_stat_inc Move qdio_perf_stat_inc to the header file so it can be inlined. Remove unused qdio_perf_stat_dec. Signed-off-by: Jan Glauber Signed-off-by: Martin Schwidefsky commit 4c57542320e73b9ff46b04092273dbcc184a4fb6 Author: Jan Glauber Date: Fri Jun 12 10:26:28 2009 +0200 [S390] qdio: simplify error handling in irq handler The check for the device status in qdio_establish_handle_irq() had dead code. Remove the unused code and simplify the error handling. Signed-off-by: Jan Glauber Signed-off-by: Martin Schwidefsky commit e45efa99b0b0035a2afc192c242e37eec5477497 Author: Sebastian Ott Date: Fri Jun 12 10:26:27 2009 +0200 [S390] cio: fix sanity checks in device_ops. Some sanity checks in device_ops.c test the output of container_of macros to be !NULL. Test the input parameters instead. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky commit bcf5cef7db869dd3b0ec55ad99641e66b2f5cf02 Author: Heiko Carstens Date: Fri Jun 12 10:26:26 2009 +0200 [S390] secure computing arch backend Enable secure computing on s390 as well. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 7757591ab4a36314a258e181dbf0994415c288c2 Author: Heiko Carstens Date: Fri Jun 12 10:26:25 2009 +0200 [S390] implement is_compat_task Implement is_compat_task and use it all over the place. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit d90cbd469c9c7c1494fc2084af9319e6a557368b Author: Heiko Carstens Date: Fri Jun 12 10:26:24 2009 +0200 [S390] add mini sclp driver This adds a mini sclp device driver for very early use. The primary and probably only use will be to emit a message to the console if the cpu doesn't provide the minimum required capabilities to run the kernel. After printing the message a disabled wait will be loaded and the machine stops operating. Printing the message is also part of this patch. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 8c4caa4fbfc18aa50d9d682f502303a8e0d72726 Author: Martin Schwidefsky Date: Fri Jun 12 10:26:23 2009 +0200 [S390] use facility list for cpu type safety check Signed-off-by: Martin Schwidefsky commit ce58ae6f7f6bdd48c87472ff830a6d586ff076b2 Author: Heiko Carstens Date: Fri Jun 12 10:26:22 2009 +0200 [S390] implement interrupt-enabling rwlocks arch backend for f5f7eac41db827a47b2163330eecd7bb55ae9f12 "Allow rwlocks to re-enable interrupts". Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 76d4e00a05d06c1d1552adea24fcf6182c9d8999 Author: Martin Schwidefsky Date: Fri Jun 12 10:26:21 2009 +0200 [S390] merge cpu.h into cputime.h All definition in cpu.h have to do with cputime accounting. Move them to cputime.h and remove the header file. Signed-off-by: Martin Schwidefsky commit 7aa79f948749da7de3de0c427e9c9ee0ff595243 Author: Martin Schwidefsky Date: Fri Jun 12 10:26:20 2009 +0200 [S390] vdso: kernel parameter syntax The syntax of the vdso kernel parameter is documented as vdso=[on|off]. The implementation uses vdso=[0|1], an invalid parameter string disables the vdso support. Fix the mismatch by adding vdso=[on|off] as additional parameter syntax. Signed-off-by: Martin Schwidefsky commit ca371c0d7e23d0d0afae65fc83a0e91cf7399573 Author: KAMEZAWA Hiroyuki Date: Fri Jun 12 10:33:53 2009 +0300 memcg: fix page_cgroup fatal error in FLATMEM Now, SLAB is configured in very early stage and it can be used in init routine now. But replacing alloc_bootmem() in FLAT/DISCONTIGMEM's page_cgroup() initialization breaks the allocation, now. (Works well in SPARSEMEM case...it supports MEMORY_HOTPLUG and size of page_cgroup is in reasonable size (< 1 << MAX_ORDER.) This patch revive FLATMEM+memory cgroup by using alloc_bootmem. In future, We stop to support FLATMEM (if no users) or rewrite codes for flatmem completely.But this will adds more messy codes and overheads. Reported-by: Li Zefan Tested-by: Li Zefan Tested-by: Ingo Molnar Signed-off-by: KAMEZAWA Hiroyuki Signed-off-by: Pekka Enberg commit 63997775b795f97ef51f3e56bc3abc9edc04bbb0 Author: Steven Whitehouse Date: Fri Jun 12 08:49:20 2009 +0100 GFS2: Add tracepoints This patch adds the ability to trace various aspects of the GFS2 filesystem. The trace points are divided into three groups, glocks, logging and bmap. These points have been chosen because they allow inspection of the major internal functions of GFS2 and they are also generic enough that they are unlikely to need any major changes as the filesystem evolves. Signed-off-by: Steven Whitehouse commit 1260866a271abc84274345580f3d613d3bceff87 Author: Catalin Marinas Date: Mon May 11 13:22:00 2009 +0100 x86: Provide _sdata in the vmlinux.lds.S file _sdata is a common symbol defined by many architectures and made available to the kernel via asm-generic/sections.h. Kmemleak uses this symbol when scanning the data sections. [ Impact: add new global symbol ] Signed-off-by: Catalin Marinas LKML-Reference: <20090511122105.26556.96593.stgit@pc1117.cambridge.arm.com> Signed-off-by: Ingo Molnar commit 3c24475c1e4e8d10e50df161d8c4f1d382997a7c Author: Jerome Glisse Date: Wed Apr 8 18:34:28 2009 +0200 drm: include kernel list header file in hashtab header Signed-off-by: Dave Airlie commit f2cb5d86e1af175a9b210241800f03a447f92621 Author: Jerome Glisse Date: Wed Apr 8 17:16:24 2009 +0200 drm: Export hash table functionality. add exports so TTM module can use these functions. Signed-off-by: Thomas Hellstrom Signed-off-by: Dave Airlie commit 249d6048ca98b5452105b0824abac1275661b8e3 Author: Jerome Glisse Date: Wed Apr 8 17:11:16 2009 +0200 drm: Split out the mm declarations in a separate header. Add atomic operations. this is a TTM preparation patch, it rearranges the mm and add operations needed to do mm operations in atomic context. Signed-off-by: Thomas Hellstrom Signed-off-by: Dave Airlie commit 715cbb05c935e8a4306a730d14a72d5af881523e Author: Alex Deucher Date: Fri Jun 12 15:55:44 2009 +1000 drm/radeon: add support for RV790. This adds the PCI IDs for the rv790 which are equiv to the rv770. Signed-off-by: Dave Airlie commit 2a71ebcd85bcc4d6607f577f23a491f796c30e82 Author: Alex Deucher Date: Fri Jun 12 15:53:10 2009 +1000 drm/radeon: add rv740 drm support. This adds drm support for the RV740 family of chips to the r600 support code. Signed-off-by: Dave Airlie commit fbe0efb869efde8d847ede3a925230ef88910086 Author: Kristian Høgsberg Date: Tue Jun 9 01:50:41 2009 +1000 drm_calloc_large: check right size, check integer overflow, use GFP_ZERO Previously we would check size instead of size * nmemb, and so would never hit the vmalloc path. Also add integer overflow check as in kcalloc, and allocate GFP_ZERO pages instead of memset()ing them. Signed-off-by: Kristian Høgsberg Signed-off-by: Dave Airlie commit 61f11699e7a92d932b31ded3715ad4f70eb26ef2 Author: Keith Packard Date: Sat May 30 20:42:27 2009 -0700 drm: Eliminate magic I2C frobbing when reading EDID This code depends on the underlying I2C adapter using the bit-banging algo, which may not be the case. If specific encoders require this mechanism, they should build a custom I2C algo that implements this workaround, rather than having it in the general path. Signed-off-by: Keith Packard Signed-off-by: Dave Airlie commit 7ff145593d808a371924652c8d6a15fb75ce2250 Author: Dave Airlie Date: Wed Apr 22 18:52:14 2009 +1000 drm/i915: duplicate desired mode for use by fbcon. duplicate the mode into fbcon storage, so when we free modes later we don't just lose this. Signed-off-by: Dave Airlie commit c5c07550d41abe86d109430e718f2007113031f8 Author: Figo.zhang Date: Sat Jun 6 18:26:26 2009 +0800 drm/via: vfree() no need checking before calling it vfree() does it's own NULL checking, no need for explicit check before calling it. Signed-off-by: Figo.zhang Signed-off-by: Dave Airlie commit be25ed9c5cc06e1d17aa97e41daf88f0b46143e6 Author: yakui_zhao Date: Tue Jun 2 14:13:55 2009 +0800 drm: Replace DRM_DEBUG with DRM_DEBUG_DRIVER in i915 driver Replace the DRM_DEBUG with the DRM_DEBUG_DRIVER to print the debug info in i915 driver. Signed-off-by: Zhao Yakui Signed-off-by: Dave Airlie commit f053185948a1bd16329433f5371809765086c1ec Author: yakui_zhao Date: Tue Jun 2 14:12:47 2009 +0800 drm: Replace DRM_DEBUG with DRM_DEBUG_MODE in drm_mode Replace the DRM_DEBUG with DRM_DEBUG_MODE macro to print the info in drm_mode. airlied:- fixed up to remove a conflicting #define Signed-off-by: Zhao Yakui Signed-off-by: Dave Airlie commit 8ebf975608aaebd7feb33d77f07ba21a6380e086 Author: Randy Dunlap Date: Thu Jun 11 20:00:41 2009 -0700 block: fix kernel-doc in recent block/ changes Fix kernel-doc warnings in recently changed block/ source code. Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds commit 4b4f1d017815f96737ca4a62f90e5a1f0b9f02d6 Merge: 875287c aa7dfb8 Author: Linus Torvalds Date: Thu Jun 11 20:05:37 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (87 commits) nilfs2: get rid of bd_mount_sem use from nilfs nilfs2: correct exclusion control in nilfs_remount function nilfs2: simplify remaining sget() use nilfs2: get rid of sget use for checking if current mount is present nilfs2: get rid of sget use for acquiring nilfs object nilfs2: remove meaningless EBUSY case from nilfs_get_sb function remove the call to ->write_super in __sync_filesystem nilfs2: call nilfs2_write_super from nilfs2_sync_fs jffs2: call jffs2_write_super from jffs2_sync_fs ufs: add ->sync_fs sysv: add ->sync_fs hfsplus: add ->sync_fs hfs: add ->sync_fs fat: add ->sync_fs ext2: add ->sync_fs exofs: add ->sync_fs bfs: add ->sync_fs affs: add ->sync_fs sanitize ->fsync() for affs repair bfs_write_inode(), switch bfs to simple_fsync() ... commit 875287caa067492779670f5fb3b98ec8dcfe2cb0 Merge: aee74f3 193e984 Author: Linus Torvalds Date: Thu Jun 11 20:05:08 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: remove unecessary include of thread_info.h in entry.S m68knommu: enumerate INIT_THREAD fields properly headers_check fix: m68k, swab.h arch/m68knommu: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug( m68knommu: remove obsolete reset code m68knommu: move CPU reset code for the 5272 ColdFire into its platform code m68knommu: move CPU reset code for the 528x ColdFire into its platform code m68knommu: move CPU reset code for the 527x ColdFire into its platform code m68knommu: move CPU reset code for the 523x ColdFire into its platform code m68knommu: move CPU reset code for the 520x ColdFire into its platform code m68knommu: add CPU reset code for the 532x ColdFire m68knommu: add CPU reset code for the 5249 ColdFire m68knommu: add CPU reset code for the 5206e ColdFire m68knommu: add CPU reset code for the 5206 ColdFire m68knommu: add CPU reset code for the 5407 ColdFire m68knommu: add CPU reset code for the 5307 ColdFire m68knommu: merge system reset for code ColdFire 523x family m68knommu: fix system reset for ColdFire 527x family commit aee74f3bb3f4fb5dbeae8c1947c6d8ebdc19ee01 Author: Yinghai Lu Date: Thu Jun 11 15:09:00 2009 -0700 kvm: remove the duplicated cpumask_clear zalloc_cpumask_var already cleared it. Signed-off-by: Yinghai Lu Signed-off-by: Linus Torvalds commit 12274e96b42884f043dfaa87eb1e5e10281bfac3 Author: Yinghai Lu Date: Thu Jun 11 15:07:48 2009 -0700 x86: use zalloc_cpumask_var in arch_early_irq_init So we make sure MAXSMP gets a cleared cpumask Signed-off-by: Yinghai Lu Signed-off-by: Linus Torvalds commit e14112d1bd5e193166b54be19119cf6440470560 Author: Stephen Rothwell Date: Fri Jun 12 10:14:22 2009 +1000 perfcounters: remove powerpc definitions of perf_counter_do_pending Commit 925d519ab82b6dd7aca9420d809ee83819c08db2 ("perf_counter: unify and fix delayed counter wakeup") added global definitions. Signed-off-by: Stephen Rothwell Acked-by: Paul Mackerras Acked-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds commit aa7dfb8954ccf49e026ba13d12991a4eb7defb96 Author: Ryusuke Konishi Date: Mon Jun 8 01:39:33 2009 +0900 nilfs2: get rid of bd_mount_sem use from nilfs This will remove every bd_mount_sem use in nilfs. The intended exclusion control was replaced by the previous patch ("nilfs2: correct exclusion control in nilfs_remount function") for nilfs_remount(), and this patch will replace remains with a new mutex that this inserts in nilfs object. Signed-off-by: Ryusuke Konishi Cc: Christoph Hellwig Signed-off-by: Al Viro commit e59399d0102c1813cec48db5cebe1750313f88a0 Author: Ryusuke Konishi Date: Mon Jun 8 01:39:32 2009 +0900 nilfs2: correct exclusion control in nilfs_remount function nilfs_remount() changes mount state of a superblock instance. Even though nilfs accesses other superblock instances during mount or remount, the mount state was not properly protected in nilfs_remount(). Moreover, nilfs_remount() has a lock order reversal problem; nilfs_get_sb() holds: 1. bdev->bd_mount_sem 2. sb->s_umount (sget acquires) and nilfs_remount() holds: 1. sb->s_umount (locked by the caller in vfs) 2. bdev->bd_mount_sem To avoid these problems, this patch divides a semaphore protecting super block instances from nilfs->ns_sem, and applies it to the mount state protection in nilfs_remount(). With this change, bd_mount_sem use is removed from nilfs_remount() and the lock order reversal will be resolved. And the new rw-semaphore, nilfs->ns_super_sem will properly protect the mount state except the modification from nilfs_error function. Signed-off-by: Ryusuke Konishi Signed-off-by: Al Viro commit 6dd4740662405a68bb229ac2b9e0aeaaf2188bf2 Author: Ryusuke Konishi Date: Mon Jun 8 01:39:31 2009 +0900 nilfs2: simplify remaining sget() use This simplifies the test function passed on the remaining sget() callsite in nilfs. Instead of checking mount type (i.e. ro-mount/rw-mount/snapshot mount) in the test function passed to sget(), this patch first looks up the nilfs_sb_info struct which the given mount type matches, and then acquires the super block instance holding the nilfs_sb_info. Signed-off-by: Ryusuke Konishi Cc: Al Viro Signed-off-by: Al Viro commit 3f82ff55168e92859119bf348e9e0bd6714d2fea Author: Ryusuke Konishi Date: Mon Jun 8 01:39:30 2009 +0900 nilfs2: get rid of sget use for checking if current mount is present This stops using sget() for checking if an r/w-mount or an r/o-mount exists on the device. This elimination uses a back pointer to the current mount added to nilfs object. Signed-off-by: Ryusuke Konishi Cc: Al Viro Signed-off-by: Al Viro commit 33c8e57c86d1bd1548c12a4f7c4bceb94b862cca Author: Ryusuke Konishi Date: Mon Jun 8 01:39:29 2009 +0900 nilfs2: get rid of sget use for acquiring nilfs object This will change the way to obtain nilfs object in nilfs_get_sb() function. Previously, a preliminary sget() call was performed, and the nilfs object was acquired from a super block instance found by the sget() call. This patch, instead, instroduces a new dedicated function find_or_create_nilfs(); as the name implies, the function finds an existent nilfs object from a global list or creates a new one if no object is found on the device. Signed-off-by: Ryusuke Konishi Cc: Al Viro Signed-off-by: Al Viro commit 81fc20bd0e75ba6357bce2403767d7c2585d8f28 Author: Ryusuke Konishi Date: Mon Jun 8 01:39:28 2009 +0900 nilfs2: remove meaningless EBUSY case from nilfs_get_sb function The following EBUSY case in nilfs_get_sb() is meaningless. Indeed, this error code is never returned to the caller. if (!s->s_root) { ... } else if (!(s->s_flags & MS_RDONLY)) { err = -EBUSY; } This simply removes the else case. Signed-off-by: Ryusuke Konishi Signed-off-by: Al Viro commit 0c95ee190e1dea60c55c834d14695341085c9b7b Author: Christoph Hellwig Date: Mon Jun 8 10:08:54 2009 +0200 remove the call to ->write_super in __sync_filesystem Now that all filesystems provide ->sync_fs methods we can change __sync_filesystem to only call ->sync_fs. This gives us a clear separation between periodic writeouts which are driven by ->write_super and data integrity syncs that go through ->sync_fs. (modulo file_fsync which is also going away) Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit d731e06323cb705003e4172ec209e469be4c18e1 Author: Christoph Hellwig Date: Mon Jun 8 10:08:36 2009 +0200 nilfs2: call nilfs2_write_super from nilfs2_sync_fs The call to ->write_super from __sync_filesystem will go away, so make sure nilfs2 performs the same actions from inside ->sync_fs. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit d579ed00aa96a7f7486978540a0d7cecaff742ae Author: Christoph Hellwig Date: Mon Jun 8 10:08:21 2009 +0200 jffs2: call jffs2_write_super from jffs2_sync_fs The call to ->write_super from __sync_filesystem will go away, so make sure jffs2 performs the same actions from inside ->sync_fs. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 8c8006564a58d0ea912bf7f2d0a758d97e4b464f Author: Christoph Hellwig Date: Mon Jun 8 10:08:05 2009 +0200 ufs: add ->sync_fs Add a ->sync_fs method for data integrity syncs, and reimplement ->write_super ontop of it. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit ad43ffdeea0a7bd3e6036c4aeec2e6699aef8ac7 Author: Christoph Hellwig Date: Mon Jun 8 10:07:45 2009 +0200 sysv: add ->sync_fs Add a ->sync_fs method for data integrity syncs, and reimplement ->write_super ontop of it. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 7fbc6df0e7a561a313f49faa77829d5de45a97f8 Author: Christoph Hellwig Date: Mon Jun 8 10:05:12 2009 +0200 hfsplus: add ->sync_fs Add a ->sync_fs method for data integrity syncs, and reimplement ->write_super ontop of it. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 58bc5bbb873eb5d86126a3fd3ff02aaa69ec15d0 Author: Christoph Hellwig Date: Mon Jun 8 10:04:54 2009 +0200 hfs: add ->sync_fs Add a ->sync_fs method for data integrity syncs. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit f83d6d46e7adf241a064a4a425e5cd8a8fd8925f Author: Christoph Hellwig Date: Mon Jun 8 10:04:35 2009 +0200 fat: add ->sync_fs Add a ->sync_fs method for data integrity syncs. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 40f31dd47e7c3d15af1f9845eda0fa0c4c33f32f Author: Christoph Hellwig Date: Mon Jun 8 10:04:17 2009 +0200 ext2: add ->sync_fs Add a ->sync_fs method for data integrity syncs, and reimplement ->write_super ontop of it. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 80e09fb942d38beb19dcffbeb14d496beeb0a989 Author: Christoph Hellwig Date: Mon Jun 8 10:03:58 2009 +0200 exofs: add ->sync_fs Add a ->sync_fs method for data integrity syncs, and reimplement ->write_super ontop of it. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 561e47ce7244168788d4ecef9a2271df204b3c89 Author: Christoph Hellwig Date: Mon Jun 8 10:03:38 2009 +0200 bfs: add ->sync_fs Add a ->sync_fs method for data integrity syncs, and reimplement ->write_super ontop of it. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit e28964365faf3b9961695eb62b48cbc9f2a2a245 Author: Christoph Hellwig Date: Mon Jun 8 10:03:15 2009 +0200 affs: add ->sync_fs Add a ->sync_fs method for data integrity syncs. Factor out common code between affs_put_super, affs_write_super and the new affs_sync_fs into a helper. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit c475879556a8602bbe2faa9a06f6e5fcc8c05bb2 Author: Al Viro Date: Mon Jun 8 01:22:00 2009 -0400 sanitize ->fsync() for affs unfortunately, for affs (especially for affs directories) we have no real way to keep track of metadata ownership. So we have to do more or less what file_fsync() does, but we do *not* need to call write_super() there. Signed-off-by: Al Viro commit 4427f0c36e22e2cd6696b2fe7643e9756a14b3d3 Author: Al Viro Date: Mon Jun 8 01:15:58 2009 -0400 repair bfs_write_inode(), switch bfs to simple_fsync() Signed-off-by: Al Viro commit 224c886643e52e6b4c1143489cd0b289b6c03976 Author: Al Viro Date: Mon Jun 8 00:46:40 2009 -0400 Fix adfs GET_FRAG_ID() on big-endian Missing conversion to host-endian before doing shifts Signed-off-by: Al Viro commit ffdc9064f8b4fa9db37a7d5180f41cce2ea2b7ad Author: Al Viro Date: Mon Jun 8 00:44:42 2009 -0400 repair adfs ->write_inode(), switch to simple_fsync() Signed-off-by: Al Viro commit bea6b64c277f0824cdaea6190209b26a164419d6 Author: Al Viro Date: Sun Jun 7 15:44:50 2009 -0400 switch omfs to simple_fsync() Signed-off-by: Al Viro commit 90de066443a8632bb42fed0a8216313d7da07aba Author: Al Viro Date: Sun Jun 7 15:40:27 2009 -0400 switch udf to simple_fsync() Signed-off-by: Al Viro commit a932801543fe74050ebee07fde082234c46b624f Author: Al Viro Date: Sun Jun 7 15:35:18 2009 -0400 switch ufs to simple_fsync() Signed-off-by: Al Viro commit 05459ca81ac3064cb040d983342bc453cccec458 Author: Al Viro Date: Sun Jun 7 15:29:45 2009 -0400 repair sysv_write_inode(), switch sysv to simple_fsync() Signed-off-by: Al Viro commit 0d7916d7e985da52cdd2989c900485e17b035972 Author: Al Viro Date: Sun Jun 7 15:21:06 2009 -0400 switch minix to simple_fsync() * get minix_write_inode() to honour the second argument * now we can use simple_fsync() for minixfs Signed-off-by: Al Viro commit e1740a462ecb2eae213be15857b577cc6f6bb8b4 Author: Al Viro Date: Sun Jun 7 15:14:02 2009 -0400 switch ext2 to simple_fsync() kill ext2_sync_file() (along with ext2/fsync.c), get rid of ext2_update_inode() - it's an alias of ext2_write_inode(). Signed-off-by: Al Viro commit b522412aeabadbb302fd4338eaabf09d10e2d29c Author: Al Viro Date: Sun Jun 7 13:44:36 2009 -0400 Sanitize ->fsync() for FAT * mark directory data blocks as assoc. metadata * add new inode to deal with FAT, mark FAT blocks as assoc. metadata of that * now ->fsync() is trivial both for files and directories Signed-off-by: Al Viro commit 964f5369667b342994fe3f384e9ba41d404ee796 Author: Al Viro Date: Sun Jun 7 09:47:13 2009 -0400 fs/qnx4: sanitize includes fs-internal parts of qnx4_fs.h taken to fs/qnx4/qnx4.h, includes adjusted, qnx4_fs.h doesn't need unifdef anymore. Signed-off-by: Al Viro commit 79d25767583e4e086f8309bfd1f502660a64fe7f Author: Al Viro Date: Sun Jun 7 09:30:08 2009 -0400 Sanitize qnx4 fsync handling * have directory operations use mark_buffer_dirty_inode(), so that sync_mapping_buffers() would get those. * make qnx4_write_inode() honour its last argument. * get rid of insane copies of very ancient "walk the indirect blocks" in qnx4/fsync - they never matched the actual fs layout and, fortunately, never'd been called. Again, all this junk is not needed; ->fsync() should just do sync_mapping_buffers + sync_inode (and if we implement block allocation for qnx4, we'll need to use mark_buffer_dirty_inode() for extent blocks) Signed-off-by: Al Viro commit d5aacad548db1ff547adf35d0a77eb2a8ed4fe14 Author: Al Viro Date: Sun Jun 7 14:56:44 2009 -0400 New helper - simple_fsync() writes associated buffers, then does sync_inode() to write the inode itself (and to make it clean). Depends on ->write_inode() honouring the second argument. Signed-off-by: Al Viro commit 337eb00a2c3a421999c39c94ce7e33545ee8baa7 Author: Alessio Igor Bogani Date: Tue May 12 15:10:54 2009 +0200 Push BKL down into ->remount_fs() [xfs, btrfs, capifs, shmem don't need BKL, exempt] Signed-off-by: Alessio Igor Bogani Signed-off-by: Al Viro commit 4195f73d1329e49727bcceb028e58cb38376c2b0 Author: Nick Piggin Date: Thu May 28 09:01:15 2009 +0200 fs: block_dump missing dentry locking I think the block_dump output in __mark_inode_dirty is missing dentry locking. Surely the i_dentry list can change any time, so we may not even *get* a dentry there. If we do get one by chance, then it would appear to be able to go away or get renamed at any time... Signed-off-by: Al Viro commit 545b9fd3d737afc0bb5203b1e79194a471605acd Author: Nick Piggin Date: Tue Jun 2 12:07:47 2009 +0200 fs: remove incorrect I_NEW warnings Some filesystems can call in to sync an inode that is still in the I_NEW state (eg. ext family, when mounted with -osync). This is OK because the filesystem has sole access to the new inode, so it can modify i_state without races (because no other thread should be modifying it, by definition of I_NEW). Ie. a false positive, so remove the warnings. The races are described here 7ef0d7377cb287e08f3ae94cebc919448e1f5dff, which is also where the warnings were introduced. Reported-by: Stephen Hemminger Signed-off-by: Nick Piggin Signed-off-by: Al Viro commit 8688b8635266cf98f00c6b0350ea2dbe7c42c321 Author: Mike Frysinger Date: Tue May 26 05:45:04 2009 -0400 linux/magic.h: move cramfs magic out of cramfs_fs.h Signed-off-by: Mike Frysinger CC: Alexander Viro Signed-off-by: Al Viro commit f95022161d23ee661a48af8f280472209f513a67 Author: Christoph Hellwig Date: Fri Jun 5 12:26:23 2009 +0200 xfs: remove ->write_super and stop maintaining ->s_dirt the write_super method is used for (1) writing back the superblock periodically from pdflush (2) called just before ->sync_fs for data integerity syncs We don't need (1) because we have our own peridoc writeout through xfssyncd, and we don't need (2) because xfs_fs_sync_fs performs a proper synchronous superblock writeout after all other data and metadata has been written out. Also remove ->s_dirt tracking as it's only used to decide when too call ->write_super. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen Signed-off-by: Al Viro commit 13205fb9260c2377438599ef0773c6a3eaeb0b07 Author: Jens Axboe Date: Mon May 25 09:30:45 2009 +0200 ntfs: remove old debug check for dirty data in ntfs_put_super() This should not trigger anymore, so kill it. Acked-by: Anton Altaparmakov Signed-off-by: Jens Axboe Signed-off-by: Al Viro commit 28ad0c118b0ed98b042d362acfe0017591921138 Author: Theodore Ts'o Date: Thu May 21 16:01:02 2009 -0400 fs: Rearrange inode structure elements to avoid waste due to padding Signed-off-by: "Theodore Ts'o" Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Al Viro commit 9fd5746fd3d7838bf6ff991d50f1257057d1156f Author: Theodore Ts'o Date: Thu May 21 16:01:00 2009 -0400 fs: Remove i_cindex from struct inode The only user of the i_cindex element in the inode structure is used is by the firewire drivers. As part of an attempt to slim down the inode structure to save memory --- since a typical Linux system will have hundreds of thousands if not millions of inodes cached, a reduction in the size inode has high leverage. The firewire driver does not need i_cindex in any fast path, so it's simple enough to calculate when it is needed, instead of wasting space in the inode structure. Signed-off-by: "Theodore Ts'o" Cc: krh@redhat.com Cc: stefanr@s5r6.in-berlin.de Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Al Viro commit ebc1ac164560a241d9bf1b7519062910c3f90a01 Author: Christoph Hellwig Date: Mon May 11 23:35:03 2009 +0200 ->write_super lock_super pushdown Push down lock_super into ->write_super instances and remove it from the caller. Following filesystem don't need ->s_lock in ->write_super and are skipped: * bfs, nilfs2 - no other uses of s_lock and have internal locks in ->write_super * ext2 - uses BKL in ext2_write_super and has internal calls without s_lock * reiserfs - no other uses of s_lock as has reiserfs_write_lock (BKL) in ->write_super * xfs - no other uses of s_lock and uses internal lock (buffer lock on superblock buffer) to serialize ->write_super. Also xfs_fs_write_super is superflous and will go away in the next merge window Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 01ba687577647beef6c5f2ea59bfb56fac9fcde2 Author: Christoph Hellwig Date: Mon May 11 23:34:27 2009 +0200 jffs2: move jffs2_write_super to super.c jffs2_write_super is only called from super.c and doesn't use any functionality from fs.c. So move it over to super.c and make it static there. [should go in through the vfs tree as it is a requirement for the next patch] Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 4aa98cf768b6f2ea4b204620d949a665959214f6 Author: Al Viro Date: Fri May 8 13:36:58 2009 -0400 Push BKL down into do_remount_sb() [folded fix from Jiri Slaby] Signed-off-by: Al Viro commit 7f78d4cd4c5d01864943c22b79df1b6bde923129 Author: Al Viro Date: Fri May 8 13:34:06 2009 -0400 Push BKL down beyond VFS-only parts of do_mount() Signed-off-by: Al Viro commit 6fac98dd218653c6aff8a0f56305c424930cea2a Author: Al Viro Date: Fri May 8 13:31:17 2009 -0400 Push BKL into do_mount() Signed-off-by: Al Viro commit bbd6851a3213a525128473e978b692ab6ac11aba Author: Al Viro Date: Wed May 6 10:43:07 2009 -0400 Push lock_super() into the ->remount_fs() of filesystems that care about it Note that since we can't run into contention between remount_fs and write_super (due to exclusion on s_umount), we have to care only about filesystems that touch lock_super() on their own. Out of those ext3, ext4, hpfs, sysv and ufs do need it; fat doesn't since its ->remount_fs() only accesses assign-once data (basically, it's "we have no atime on directories and only have atime on files for vfat; force nodiratime and possibly noatime into *flags"). [folded a build fix from hch] Signed-off-by: Al Viro commit 6cfd0148425e528b859b26e436b01f23f6926224 Author: Christoph Hellwig Date: Tue May 5 15:40:36 2009 +0200 push BKL down into ->put_super Move BKL into ->put_super from the only caller. A couple of filesystems had trivial enough ->put_super (only kfree and NULLing of s_fs_info + stuff in there) to not get any locking: coda, cramfs, efs, hugetlbfs, omfs, qnx4, shmem, all others got the full treatment. Most of them probably don't need it, but I'd rather sort that out individually. Preferably after all the other BKL pushdowns in that area. [AV: original used to move lock_super() down as well; these changes are removed since we don't do lock_super() at all in generic_shutdown_super() now] [AV: fuse, btrfs and xfs are known to need no damn BKL, exempt] Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit a9e220f8322e2b0e0b8903fe00265461cffad3f0 Author: Al Viro Date: Tue May 5 22:10:44 2009 -0400 No need to do lock_super() for exclusion in generic_shutdown_super() We can't run into contention on it. All other callers of lock_super() either hold s_umount (and we have it exclusive) or hold an active reference to superblock in question, which prevents the call of generic_shutdown_super() while the reference is held. So we can replace lock_super(s) with get_fs_excl() in generic_shutdown_super() (and corresponding change for unlock_super(), of course). Since ext4 expects s_lock held for its put_super, take lock_super() into it. The rest of filesystems do not care at all. Signed-off-by: Al Viro commit 62c6943b4b1e818aea60c11c5a68a50785b83119 Author: Al Viro Date: Thu May 7 03:12:29 2009 -0400 Trim a bit of crap from fs.h do_remount_sb() is fs/internal.h fodder, fsync_no_super() is long gone. Signed-off-by: Al Viro commit 443b94baaa16771e98b29ca7c24f1e305738ffca Author: Al Viro Date: Tue May 5 23:48:50 2009 -0400 Make sure that all callers of remount hold s_umount exclusive Signed-off-by: Al Viro commit 5af7926ff33b68b3ba46531471c6e0564b285efc Author: Christoph Hellwig Date: Tue May 5 15:41:25 2009 +0200 enforce ->sync_fs is only called for rw superblock Make sure a superblock really is writeable by checking MS_RDONLY under s_umount. sync_filesystems needed some re-arragement for that, but all but one sync_filesystem caller had the correct locking already so that we could add that check there. cachefiles grew s_umount locking. I've also added a WARN_ON to sync_filesystem to assert this for future callers. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit e5004753388dcf5e1b8a52ac0ab807d232340fbb Author: Christoph Hellwig Date: Tue May 5 16:08:56 2009 +0200 cleanup sync_supers Merge the write_super helper into sync_super and move the check for ->write_super earlier so that we can avoid grabbing a reference to a superblock that doesn't have it. While we're at it also add a little comment documenting sync_supers. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit f3da392e9ff14b9f388e74319e6d195848991c07 Author: Alexey Dobriyan Date: Mon May 4 03:32:03 2009 +0400 dcache: extrace and use d_unlinked() d_unlinked() will be used in middle-term to ban checkpointing when opened but unlinked file is detected, and in long term, to detect such situation and special case on it. Signed-off-by: Alexey Dobriyan Signed-off-by: Al Viro commit 8c85e125124a473d6f3e9bb187b0b84207f81d91 Author: Christoph Hellwig Date: Tue Apr 28 18:00:26 2009 +0200 remove ->write_super call in generic_shutdown_super We just did a full fs writeout using sync_filesystem before, and if that's not enough for the filesystem it can perform it's own writeout in ->put_super, which many filesystems already do. Move a call to foofs_write_super into every foofs_put_super for now to guarantee identical behaviour until it's cleaned up by the individual filesystem maintainers. Exceptions: - affs already has identical copy & pasted code at the beginning of affs_put_super so no need to do it twice. - xfs does the right thing without it and I have changes pending for the xfs tree touching this are so I don't really need conflicts here.. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 517bfae28353e996160518add4d00033d3886e61 Author: Christoph Hellwig Date: Mon Apr 27 09:46:45 2009 -0400 qnx4: remove ->write_super Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 94cb993f2ee99f3a9318e7b4dbb383497c4bedea Author: Christoph Hellwig Date: Mon Apr 27 09:46:44 2009 -0400 ocfs2: remove ->write_super and stop maintaining ->s_dirt Signed-off-by: Christoph Hellwig Acked-by: Joel Becker Signed-off-by: Al Viro commit b7d245de25d1f0bb75a0d04194b647762b30d3db Author: Christoph Hellwig Date: Mon Apr 27 09:46:43 2009 -0400 gfs2: remove ->write_super and stop maintaining ->s_dirt Signed-off-by: Christoph Hellwig Acked-by: Steven Whitehouse Signed-off-by: Al Viro commit ca41f7b918294c2a17780e057568413dcbfc6d49 Author: Christoph Hellwig Date: Mon Apr 27 09:46:42 2009 -0400 ext3: remove ->write_super and stop maintaining ->s_dirt Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 59d697b70285c348c01cfc2695c3469ba71d7539 Author: Christoph Hellwig Date: Mon Apr 27 09:46:41 2009 -0400 btrfs: remove ->write_super and stop maintaining ->s_dirt Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit c3f8a40c1cd5591b882497d1d00d43d0e5bb4698 Author: Jan Kara Date: Mon Apr 27 16:43:55 2009 +0200 quota: Introduce writeout_quota_sb() (version 4) Introduce this function which just writes all the quota structures but avoids all the syncing and cache pruning work to expose quota structures to userspace. Use this function from __sync_filesystem when wait == 0. Signed-off-by: Jan Kara Signed-off-by: Al Viro commit 850b201b087f5525a0a7278551c2bcd0423c3b26 Author: Christoph Hellwig Date: Mon Apr 27 16:43:54 2009 +0200 quota: cleanup dquota sync functions (version 4) Currently the VFS calls vfs_dq_sync to sync out disk quotas for a given superblock. This is a small wrapper around sync_dquots which for the case of a non-NULL superblock is a small wrapper around quota_sync_sb. Just make quota_sync_sb global (rename it to sync_quota_sb) and call it directly. Also call it directly for those cases in quota.c that have a superblock and leave sync_dquots purely an iterator over sync_quota_sb and remove it's superblock argument. To make this nicer move the check for the lack of a quota_sync method from the callers into sync_quota_sb. [folded build fix from Alexander Beregalov ] Signed-off-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Al Viro commit 60b0680fa236ac4e17ce31a50048c9d75f9ec831 Author: Jan Kara Date: Mon Apr 27 16:43:53 2009 +0200 vfs: Rename fsync_super() to sync_filesystem() (version 4) Rename the function so that it better describe what it really does. Also remove the unnecessary include of buffer_head.h. Signed-off-by: Jan Kara Signed-off-by: Al Viro commit c15c54f5f056ee4819da9fde59a5f2cd45445f23 Author: Jan Kara Date: Mon Apr 27 16:43:52 2009 +0200 vfs: Move syncing code from super.c to sync.c (version 4) Move sync_filesystems(), __fsync_super(), fsync_super() from super.c to sync.c where it fits better. [build fixes folded] Signed-off-by: Jan Kara Signed-off-by: Al Viro commit 5cee5815d1564bbbd505fea86f4550f1efdb5cd0 Author: Jan Kara Date: Mon Apr 27 16:43:51 2009 +0200 vfs: Make sys_sync() use fsync_super() (version 4) It is unnecessarily fragile to have two places (fsync_super() and do_sync()) doing data integrity sync of the filesystem. Alter __fsync_super() to accommodate needs of both callers and use it. So after this patch __fsync_super() is the only place where we gather all the calls needed to properly send all data on a filesystem to disk. Nice bonus is that we get a complete livelock avoidance and write_supers() is now only used for periodic writeback of superblocks. sync_blockdevs() introduced a couple of patches ago is gone now. [build fixes folded] Signed-off-by: Jan Kara Signed-off-by: Al Viro commit 429479f031322a0cc5c921ffb2321a51718dc875 Author: Jan Kara Date: Mon Apr 27 16:43:50 2009 +0200 vfs: Make __fsync_super() a static function (version 4) __fsync_super() does the same thing as fsync_super(). So change the only caller to use fsync_super() and make __fsync_super() static. This removes unnecessarily duplicated call to sync_blockdev() and prepares ground for the changes to __fsync_super() in the following patches. Signed-off-by: Jan Kara Signed-off-by: Al Viro commit bfe881255c74800147523b59c85328a1a826ba21 Author: Jan Kara Date: Mon Apr 27 16:43:49 2009 +0200 vfs: Call ->sync_fs() even if s_dirt is 0 (version 4) sync_filesystems() has a condition that if wait == 0 and s_dirt == 0, then ->sync_fs() isn't called. This does not really make much sence since s_dirt is generally used by a filesystem to mean that ->write_super() needs to be called. But ->sync_fs() does different things. I even suspect that some filesystems (btrfs?) sets s_dirt just to fool this logic. Signed-off-by: Jan Kara Signed-off-by: Al Viro commit 5a3e5cb8e08bd876e2542c1451c9a93dab1b0e39 Author: Jan Kara Date: Mon Apr 27 16:43:48 2009 +0200 vfs: Fix sys_sync() and fsync_super() reliability (version 4) So far, do_sync() called: sync_inodes(0); sync_supers(); sync_filesystems(0); sync_filesystems(1); sync_inodes(1); This ordering makes it kind of hard for filesystems as sync_inodes(0) need not submit all the IO (for example it skips inodes with I_SYNC set) so e.g. forcing transaction to disk in ->sync_fs() is not really enough. Therefore sys_sync has not been completely reliable on some filesystems (ext3, ext4, reiserfs, ocfs2 and others are hit by this) when racing e.g. with background writeback. A similar problem hits also other filesystems (e.g. ext2) because of write_supers() being called before the sync_inodes(1). Change the ordering of calls in do_sync() - this requires a new function sync_blockdevs() to preserve the property that block devices are always synced after write_super() / sync_fs() call. The same issue is fixed in __fsync_super() function used on umount / remount read-only. [AV: build fixes] Signed-off-by: Jan Kara Signed-off-by: Al Viro commit 876a9f76abbcb775f8d21cbc99fa161f9e5937f1 Author: Christoph Hellwig Date: Tue Apr 28 18:05:55 2009 +0200 remove s_async_list Remove the unused s_async_list in the superblock, a leftover of the broken async inode deletion code that leaked into mainline. Having this in the middle of the sync/unmount path is not helpful for the following cleanups. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 864d7c4c068f23642efe91b33be3a84afe5f71e0 Author: npiggin@suse.de Date: Sun Apr 26 20:25:56 2009 +1000 fs: move mark_files_ro into file_table.c This function walks the s_files lock, and operates primarily on the files in a superblock, so it better belongs here (eg. see also fs_may_remount_ro). [AV: ... and it shouldn't be static after that move] Signed-off-by: Nick Piggin Signed-off-by: Al Viro commit 96029c4e09ccbd73a6d0ed2b29e80bf2586ad7ef Author: npiggin@suse.de Date: Sun Apr 26 20:25:55 2009 +1000 fs: introduce mnt_clone_write This patch speeds up lmbench lat_mmap test by about another 2% after the first patch. Before: avg = 462.286 std = 5.46106 After: avg = 453.12 std = 9.58257 (50 runs of each, stddev gives a reasonable confidence) It does this by introducing mnt_clone_write, which avoids some heavyweight operations of mnt_want_write if called on a vfsmount which we know already has a write count; and mnt_want_write_file, which can call mnt_clone_write if the file is open for write. After these two patches, mnt_want_write and mnt_drop_write go from 7% on the profile down to 1.3% (including mnt_clone_write). [AV: mnt_want_write_file() should take file alone and derive mnt from it; not only all callers have that form, but that's the only mnt about which we know that it's already held for write if file is opened for write] Cc: Dave Hansen Signed-off-by: Nick Piggin Signed-off-by: Al Viro commit d3ef3d7351ccfbef3e5d926efc5ee332136f40d4 Author: npiggin@suse.de Date: Sun Apr 26 20:25:54 2009 +1000 fs: mnt_want_write speedup This patch speeds up lmbench lat_mmap test by about 8%. lat_mmap is set up basically to mmap a 64MB file on tmpfs, fault in its pages, then unmap it. A microbenchmark yes, but it exercises some important paths in the mm. Before: avg = 501.9 std = 14.7773 After: avg = 462.286 std = 5.46106 (50 runs of each, stddev gives a reasonable confidence, but there is quite a bit of variation there still) It does this by removing the complex per-cpu locking and counter-cache and replaces it with a percpu counter in struct vfsmount. This makes the code much simpler, and avoids spinlocks (although the msync is still pretty costly, unfortunately). It results in about 900 bytes smaller code too. It does increase the size of a vfsmount, however. It should also give a speedup on large systems if CPUs are frequently operating on different mounts (because the existing scheme has to operate on an atomic in the struct vfsmount when switching between mounts). But I'm most interested in the single threaded path performance for the moment. [AV: minor cleanup] Cc: Dave Hansen Signed-off-by: Nick Piggin Signed-off-by: Al Viro commit 3174c21b74b56c6a53fddd41a30fd6f757a32bd0 Author: Al Viro Date: Tue Apr 7 13:19:18 2009 -0400 Move junk from proc_fs.h to fs/proc/internal.h Signed-off-by: Al Viro commit 1c755af4df75996b0dd4b7e6cacaf9d57a6ef2ef Author: Al Viro Date: Sat Apr 18 14:06:57 2009 -0400 switch lookup_mnt() Signed-off-by: Al Viro commit 79ed0226198c628133530b179a90dbf42b1c2eba Author: Al Viro Date: Sat Apr 18 13:59:41 2009 -0400 switch follow_mount() Signed-off-by: Al Viro commit 9393bd07cf218ca51d0e627653f906a9d76a9131 Author: Al Viro Date: Sat Apr 18 13:58:15 2009 -0400 switch follow_down() Signed-off-by: Al Viro commit 589ff870ed60a9ebdd5ec99ec3f5afe1282fe151 Author: Al Viro Date: Sat Apr 18 03:28:19 2009 -0400 Switch collect_mounts() to struct path Signed-off-by: Al Viro commit bab77ebf51e3902f608ecf08c9d34a0a52ac35a9 Author: Al Viro Date: Sat Apr 18 03:26:48 2009 -0400 switch follow_up() to struct path Signed-off-by: Al Viro commit e64c390ca0b60fd2119331ef1fa888d7ea27e424 Author: Al Viro Date: Sat Apr 18 03:00:46 2009 -0400 switch rqst_exp_parent() Signed-off-by: Al Viro commit 91c9fa8f75877c0c1e455c23e8f8206c91c8f77f Author: Al Viro Date: Sat Apr 18 02:42:05 2009 -0400 switch rqst_exp_get_by_name() Signed-off-by: Al Viro commit 5bf3bd2b5cb68ba43c91f5bd0ac043543fba2558 Author: Al Viro Date: Sat Apr 18 02:14:32 2009 -0400 switch exp_parent() to struct path ... and lose the always-NULL last argument (non-NULL case had been split off a while ago). Signed-off-by: Al Viro commit 55430e2ecee574e729c12d4063b3ecabfa98fa82 Author: Al Viro Date: Sat Apr 18 02:04:46 2009 -0400 nfsd struct path use: exp_get_by_name() Signed-off-by: Al Viro commit dd5cae6e9772ecc62fd374f7a8ec10eb51c96c4d Author: Al Viro Date: Tue Apr 7 12:21:18 2009 -0400 Don't bother with check_mnt() in do_add_mount() on shrinkable ones These guys are what we add as submounts; checks for "is that attached in our namespace" are simply irrelevant for those and counterproductive for use of private vfsmount trees a-la what NFS folks want. Signed-off-by: Al Viro commit 5b857119538daac7118c1364d7ff3613f12b84d3 Author: Al Viro Date: Tue Apr 7 11:53:49 2009 -0400 Make vfs_path_lookup() use starting point as root Signed-off-by: Al Viro commit 2a737871108de9ba8930f7650d549f1383767f8b Author: Al Viro Date: Tue Apr 7 11:49:53 2009 -0400 Cache root in nameidata New field: nd->root. When pathname resolution wants to know the root, check if nd->root.mnt is non-NULL; use nd->root if it is, otherwise copy current->fs->root there. After path_walk() is finished, we check if we'd got a cached value in nd->root and drop it. Before calling path_walk() we should either set nd->root.mnt to NULL *or* copy (and pin down) some path to nd->root. In the latter case we won't be looking at current->fs->root at all. Signed-off-by: Al Viro commit 9b4a9b14a793bc69b505ed916051f6f32db13bb8 Author: Al Viro Date: Tue Apr 7 11:44:16 2009 -0400 Preparations to caching root in path_walk() Split do_path_lookup(), opencode the call from do_filp_open() do_filp_open() is the only caller of do_path_lookup() that cares about root afterwards (it keeps resolving symlinks on O_CREAT path after it'd done LOOKUP_PARENT walk). So when we start caching fs->root in path_walk(), it'll need a different treatment. Signed-off-by: Al Viro commit 4e44b6852e03c915618ca6776b6697b436246b00 Author: Al Viro Date: Tue Apr 7 11:08:56 2009 -0400 Get rid of path_lookup in autofs4 Signed-off-by: Al Viro commit 73422811d290c628b4ddbf6830e5cd6fa42e84f1 Author: Jeff Mahoney Date: Sun May 10 16:05:39 2009 -0400 reiserfs: allow exposing privroot w/ xattrs enabled This patch adds an -oexpose_privroot option to allow access to the privroot. Signed-off-by: Jeff Mahoney Signed-off-by: Al Viro commit 8c5dd8f43367f4f266dd616f11658005bc2d20ef Author: Yinghai Lu Date: Thu Jun 4 19:14:22 2009 -0700 x86: handle initrd that extends into unusable memory On a system where system memory (according e820) is not covered by mtrr, mtrr_trim_memory converts a portion of memory to reserved, but bootloader has already put the initrd in that range. Thus, we need to have 64bit to use relocate_initrd too. [ Impact: fix using initrd when mtrr_trim_memory happen ] Signed-off-by: Yinghai Lu Signed-off-by: H. Peter Anvin Cc: stable@kernel.org commit 35fd035968de4f674b9d62ee7b1d80ab7a50c384 Merge: 4e73e0e ef14f0c Author: Felix Blyakher Date: Thu Jun 11 16:56:49 2009 -0500 Merge branch 'master' of git://git.kernel.org/pub/scm/fs/xfs/xfs commit 0d5959723e1db3fd7323c198a50c16cecf96c7a9 Merge: 62fdac5 512626a Author: Ingo Molnar Date: Thu Jun 11 23:31:52 2009 +0200 Merge branch 'linus' into x86/mce3 Conflicts: arch/x86/kernel/cpu/mcheck/mce_64.c arch/x86/kernel/irq.c Merge reason: Resolve the conflicts above. Signed-off-by: Ingo Molnar commit a525890cb6a2949b644d212ae290b658967d3919 Merge: 3bb66d7 b263c2c Author: Linus Torvalds Date: Thu Jun 11 14:23:12 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable * git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (23 commits) Btrfs: fix extent_buffer leak during tree log replay Btrfs: fix oops when btrfs_inherit_iflags called with a NULL dir Btrfs: fix -o nodatasum printk spelling Btrfs: check duplicate backrefs for both data and metadata Btrfs: init worker struct fields before kthread-run Btrfs: pin buffers during write_dev_supers Btrfs: avoid races between super writeout and device list updates Fix btrfs when ACLs are configured out Btrfs: fdatasync should skip metadata writeout Btrfs: remove crc32c.h and use libcrc32c directly. Btrfs: implement FS_IOC_GETFLAGS/SETFLAGS/GETVERSION Btrfs: autodetect SSD devices Btrfs: add mount -o ssd_spread to spread allocations out Btrfs: avoid allocation clusters that are too spread out Btrfs: Add mount -o nossd Btrfs: avoid IO stalls behind congested devices in a multi-device FS Btrfs: don't allow WRITE_SYNC bios to starve out regular writes Btrfs: fix metadata dirty throttling limits Btrfs: reduce mount -o ssd CPU usage Btrfs: balance btree more often ... commit 3bb66d7f8cc31537a3170c9bb82b38e538b984c5 Merge: 512626a a092ee2 Author: Linus Torvalds Date: Thu Jun 11 14:22:55 2009 -0700 Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify * 'for-linus' of git://git.infradead.org/users/eparis/notify: fsnotify: allow groups to set freeing_mark to null inotify/dnotify: should_send_event shouldn't match on FS_EVENT_ON_CHILD dnotify: do not bother to lock entry->lock when reading mask dnotify: do not use ?true:false when assigning to a bool fsnotify: move events should indicate the event was on a child inotify: reimplement inotify using fsnotify fsnotify: handle filesystem unmounts with fsnotify marks fsnotify: fsnotify marks on inodes pin them in core fsnotify: allow groups to add private data to events fsnotify: add correlations between events fsnotify: include pathnames with entries when possible fsnotify: generic notification queue and waitq dnotify: reimplement dnotify using fsnotify fsnotify: parent event notification fsnotify: add marks to inodes so groups can interpret how to handle those inodes fsnotify: unified filesystem notification backend commit 512626a04e72aca60effe111fa0333ed0b195d21 Merge: 8a1ca8c 3aa27bb Author: Linus Torvalds Date: Thu Jun 11 14:15:57 2009 -0700 Merge branch 'for-linus' of git://linux-arm.org/linux-2.6 * 'for-linus' of git://linux-arm.org/linux-2.6: kmemleak: Add the corresponding MAINTAINERS entry kmemleak: Simple testing module for kmemleak kmemleak: Enable the building of the memory leak detector kmemleak: Remove some of the kmemleak false positives kmemleak: Add modules support kmemleak: Add kmemleak_alloc callback from alloc_large_system_hash kmemleak: Add the vmalloc memory allocation/freeing hooks kmemleak: Add the slub memory allocation/freeing hooks kmemleak: Add the slob memory allocation/freeing hooks kmemleak: Add the slab memory allocation/freeing hooks kmemleak: Add documentation on the memory leak detector kmemleak: Add the base support Manual conflict resolution (with the slab/earlyboot changes) in: drivers/char/vt.c init/main.c mm/slab.c commit 8a1ca8cedd108c8e76a6ab34079d0bbb4f244799 Merge: b640f04 940010c Author: Linus Torvalds Date: Thu Jun 11 14:01:07 2009 -0700 Merge branch 'perfcounters-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perfcounters-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (574 commits) perf_counter: Turn off by default perf_counter: Add counter->id to the throttle event perf_counter: Better align code perf_counter: Rename L2 to LL cache perf_counter: Standardize event names perf_counter: Rename enums perf_counter tools: Clean up u64 usage perf_counter: Rename perf_counter_limit sysctl perf_counter: More paranoia settings perf_counter: powerpc: Implement generalized cache events for POWER processors perf_counters: powerpc: Add support for POWER7 processors perf_counter: Accurate period data perf_counter: Introduce struct for sample data perf_counter tools: Normalize data using per sample period data perf_counter: Annotate exit ctx recursion perf_counter tools: Propagate signals properly perf_counter tools: Small frequency related fixes perf_counter: More aggressive frequency adjustment perf_counter/x86: Fix the model number of Intel Core2 processors perf_counter, x86: Correct some event and umask values for Intel processors ... commit b640f042faa2a2fad6464f259a8afec06e2f6386 Merge: 871fa90 b8ec757 Author: Linus Torvalds Date: Thu Jun 11 12:25:06 2009 -0700 Merge branch 'topic/slab/earlyboot' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 * 'topic/slab/earlyboot' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: vgacon: use slab allocator instead of the bootmem allocator irq: use kcalloc() instead of the bootmem allocator sched: use slab in cpupri_init() sched: use alloc_cpumask_var() instead of alloc_bootmem_cpumask_var() memcg: don't use bootmem allocator in setup code irq/cpumask: make memoryless node zero happy x86: remove some alloc_bootmem_cpumask_var calling vt: use kzalloc() instead of the bootmem allocator sched: use kzalloc() instead of the bootmem allocator init: introduce mm_init() vmalloc: use kzalloc() instead of alloc_bootmem() slab: setup allocators earlier in the boot sequence bootmem: fix slab fallback on numa bootmem: use slab if bootmem is no longer available commit 26a28fa4fea5b8c65713aa50c124f76a88c7924d Author: Arnd Bergmann Date: Wed May 13 22:56:38 2009 +0000 add generic lib/checksum.c Add a generic (unoptimized) implementation of checksum.c in pure C for use by all architectures that cannot be bother with implementing their own version. Based on microblaze code by Michal Simek Cc: Michal Simek Signed-off-by: Remis Lima Baima Signed-off-by: Arnd Bergmann commit eed417ddd52146f446595b5a7d8f21b1814b95b7 Author: Arnd Bergmann Date: Wed May 13 22:56:37 2009 +0000 asm-generic: add a generic uaccess.h Based on discussions with Michal Simek and code from m68knommu and h8300, this version of uaccess.h should be usable by most architectures, by overriding some parts of it. Simple NOMMU architectures can use it out of the box, but a minimal __access_ok() should be added there as well. Cc: Michal Simek Signed-off-by: Arnd Bergmann commit 5c01b46bb6bb8f2662573c05c87b5d68fa25af89 Author: Arnd Bergmann Date: Wed May 13 22:56:36 2009 +0000 asm-generic: add generic NOMMU versions of some headers Memory management in generic is highly architecture specific, but on NOMMU architectures, it is mostly trivial, so just add a default implementation in asm-generic that applies to all NOMMU architectures. The two files cache.h and cacheflush.h can possibly also be used by architectures that have an MMU but never require flushing the cache or have cache lines larger than 32 bytes. Signed-off-by: Remis Lima Baima Signed-off-by: Arnd Bergmann commit 3f7e212df82ca0459d44c91d9e019efd1b5f936c Author: Arnd Bergmann Date: Wed May 13 22:56:35 2009 +0000 asm-generic: add generic atomic.h and io.h atomic.h and io.h are based on the mn10300 architecture, which is already pretty generic and can be used by other architectures that do not have hardware support for atomic operations or out-of-order I/O access. Signed-off-by: Arnd Bergmann commit ae49e807951d5e26767bc55d1dc29671c596c450 Author: Arnd Bergmann Date: Wed May 13 22:56:34 2009 +0000 asm-generic: add legacy I/O header files The dma.h, hw_irq.h, serial.h and timex.h files originally described PC-style i8237, i8259A, i8250, i8253 and i8255 chips as well as the VGA style text mode graphics. Modern architectures live happily without these specific interfaces, but a few definitions from these headers keep getting used in common code. The new generic headers are what most architectures use anyway nowadays, just implementing the minimal definitions. Signed-off-by: Remis Lima Baima Signed-off-by: Arnd Bergmann commit aafe4dbed0bf6cbdb2e9f03e1d42f8a540d8541d Author: Arnd Bergmann Date: Wed May 13 22:56:33 2009 +0000 asm-generic: add generic versions of common headers These are all kernel internal interfaces that get copied around a lot. In most cases, architectures can provide their own optimized versions, but these generic versions can work as well. I have tried to use the most common contents of each header to allow existing architectures to migrate easily. Thanks to Remis for suggesting a number of cleanups. Signed-off-by: Remis Lima Baima Signed-off-by: Arnd Bergmann commit 9858c60cc2d33b18367b2bc6947e3ea23db26ccb Author: Arnd Bergmann Date: Wed May 13 22:56:32 2009 +0000 asm-generic: make bitops.h usable bitops.h apparently suffered from some level of bitrot, it was missing the smp_mb__{before,after}_clear_bit functions, and included other headers in an invalid order. This changes the file so that new architectures can use it out of the box. Signed-off-by: Remis Lima Baima Signed-off-by: Arnd Bergmann commit d7c4f1b78afeedfc22b1756fcdc1acbe84284d74 Author: Arnd Bergmann Date: Wed May 13 22:56:31 2009 +0000 asm-generic: make pci.h usable directly Some generic code is using the horribly misnamed PCI_DMA_BUS_IS_PHYS from asm/pci.h. This makes sure that an architecture without PCI support does not have to define this itself but can rely on the asm-generic version. Signed-off-by: Remis Lima Baima Signed-off-by: Arnd Bergmann commit 3aef392822e1a42e80077a332ea2efdfd8a4248a Author: Arnd Bergmann Date: Sun May 17 21:00:05 2009 +0000 asm-generic: make get_rtc_time overridable Evidently, set_rtc_time is supposed to be overridable by architectures that define their own version, but unfortunately, get_rtc_ss would in that case still use the generic version. This makes get_rtc_ss call the real set_rtc_time to let architectures define their own version. The change should fix the "Extended RTC operation" on Alpha, which uses the incorrect get_rtc_ss call. It also allows PowerPC to use the asm-generic/rtc.h file in the future. Cc: Richard Henderson Cc: linux-alpha@vger.kernel.org Cc: Tom Rini Cc: rtc-linux@googlegroups.com Cc: Alessandro Zummo Cc: Paul Gortmaker Signed-off-by: Arnd Bergmann commit 5b17e1cd8928ae65932758ce6478ac6d3e9a86b2 Author: Arnd Bergmann Date: Wed May 13 22:56:30 2009 +0000 asm-generic: rename page.h and uaccess.h The current asm-generic/page.h only contains the get_order function, and asm-generic/uaccess.h only implements unaligned accesses. This renames the file to getorder.h and uaccess-unaligned.h to make room for new page.h and uaccess.h file that will be usable by all simple (e.g. nommu) architectures. Signed-off-by: Remis Lima Baima Signed-off-by: Arnd Bergmann commit 72099ed2719fc5829bd79c6ca9d1783ed026eb37 Author: Arnd Bergmann Date: Wed May 13 22:56:29 2009 +0000 asm-generic: rename atomic.h to atomic-long.h The existing asm-generic/atomic.h only defines the atomic_long type. This renames it to atomic-long.h so we have a place to add a truly generic atomic.h that can be used on all non-SMP systems. Signed-off-by: Remis Lima Baima Signed-off-by: Arnd Bergmann Acked-by: Ingo Molnar commit e64a1617eca39d62b248a11699de9c1195369661 Author: Arnd Bergmann Date: Wed May 13 22:56:28 2009 +0000 asm-generic: add a generic unistd.h A new architecture should only define a minimal set of system calls while still providing the full functionality. This version of unistd.h has gone through intensive review to make sure that by default it only enables syscalls that do not already have a more featureful replacement. It is modeled after the x86-64 version of unistd.h, which unifies the syscall number definition and the actual system call table in a single file, in order to keep them synchronized much more easily. This first version still keeps legacy system call definitions around, guarded by various #ifdefs, and with numbers larger than 1024. The idea behind this is to make it easier for new architectures to transition from a full list to the reduced set. In particular, the new microblaze architecture that should migrate to using the generic ABI headers can at least use an existing uClibc source tree without major rewrites during the conversion. Signed-off-by: Arnd Bergmann commit 6103ec56c65c33774c7c38652c8204120c3c7519 Author: Arnd Bergmann Date: Wed May 13 22:56:27 2009 +0000 asm-generic: add generic ABI headers These header files are typically copied from an existing architecture into any new one, slightly modified and then remain untouched until the end of time in the name of ABI stability. To make it easier for future architectures, provide a sane generic version here. In cases where multiple architectures already use identical code, I used the most common version. In cases like stat.h that are more or less broken everywhere, I provide a version that is meant to be ideal for new architectures. Signed-off-by: Remis Lima Baima Signed-off-by: Arnd Bergmann commit 2864d32be31a20a4617e37a857dd9915a57e2efb Author: Arnd Bergmann Date: Wed May 13 22:56:26 2009 +0000 asm-generic: add generic sysv ipc headers The ipc64 data structures were originally meant to be architecture specific so that each architecture could add their own optimizations for padding. In the end, most of them just copied the x86 version, and most got that wrong. UClibc expects the x86 anyway, so we might just declare that the default and get rid of the extra copies. Signed-off-by: Remis Lima Baima Signed-off-by: Arnd Bergmann commit c31ae4bb4a9fa4606a74c0a4fb61b74f804e861e Author: Arnd Bergmann Date: Wed May 13 22:56:25 2009 +0000 asm-generic: introduce asm/bitsperlong.h This provides a reliable way for asm-generic/types.h and other files to find out if it is running on a 32 or 64 bit platform. We cannot use CONFIG_64BIT for this in headers that are included from user space because CONFIG symbols are not available there. We also cannot do it inside of asm/types.h because some headers need the word size but cannot include types.h. The solution is to introduce a new header that defines both __BITS_PER_LONG for user space and BITS_PER_LONG for usage in the kernel. The asm-generic version falls back to 32 bit unless the architecture overrides it, which I did for all 64 bit platforms. Signed-off-by: Remis Lima Baima Signed-off-by: Arnd Bergmann commit 63b852a6b67d0820d388b0ecd0da83ccb4048b8d Author: Arnd Bergmann Date: Wed May 13 22:56:24 2009 +0000 asm-generic: rename termios.h, signal.h and mman.h The existing asm-generic versions are incomplete and included by some architectures. New architectures should be able to use a generic version, so rename the existing files and change all users, which lets us add the new files. Signed-off-by: Remis Lima Baima Signed-off-by: Arnd Bergmann commit a092ee20fd33d2df0990dcbf2235afc181612818 Author: Eric Paris Date: Thu Jun 11 11:09:48 2009 -0400 fsnotify: allow groups to set freeing_mark to null Most fsnotify listeners (all but inotify) do not care about marks being freed. Allow groups to set freeing_mark to null and do not call any function if it is set that way. Signed-off-by: Eric Paris commit e42e27736de80045f925564ea27a1d32957219e7 Author: Eric Paris Date: Thu Jun 11 11:09:47 2009 -0400 inotify/dnotify: should_send_event shouldn't match on FS_EVENT_ON_CHILD inotify and dnotify will both indicate that they want any event which came from a child inode. The fix is to mask off FS_EVENT_ON_CHILD when deciding if inotify or dnotify is interested in a given event. Signed-off-by: Eric Paris commit ce61856bd2aadb064f595e5c0444376a2b117c41 Author: Eric Paris Date: Thu Jun 11 11:09:47 2009 -0400 dnotify: do not bother to lock entry->lock when reading mask entry->lock is needed to make sure entry->mask does not change while manipulating it. In dnotify_should_send_event() we don't care if we get an old or a new mask value out of this entry so there is no point it taking the lock. Signed-off-by: Eric Paris commit 5ac697b793a3c45005c568df692518da6e690390 Author: Eric Paris Date: Thu Jun 11 11:09:47 2009 -0400 dnotify: do not use ?true:false when assigning to a bool dnotify_should send event assigned a bool using ?true:false when computing a bit operation. This is poitless and the bool type does this for us. Signed-off-by: Eric Paris commit ff52cc2158b32b3b979ca7802b1fd7c70f36e13c Author: Eric Paris Date: Thu Jun 11 11:09:47 2009 -0400 fsnotify: move events should indicate the event was on a child fsnotify tells its listeners explicitly when an event happened on the given inode verses on the child of the given inode. (see __fsnotify_parent) However, the semantics of fsnotify_move() are such that we deliver events directly to the two parent directories in question (old_dir and new_dir) directly without using the __fsnotify_parent() call. fsnotify should be adding FS_EVENT_ON_CHILD for the notifications to these parents. Signed-off-by: Eric Paris commit 63c882a05416e18de6fb59f7dd6da48f3bbe8273 Author: Eric Paris Date: Thu May 21 17:02:01 2009 -0400 inotify: reimplement inotify using fsnotify Reimplement inotify_user using fsnotify. This should be feature for feature exactly the same as the original inotify_user. This does not make any changes to the in kernel inotify feature used by audit. Those patches (and the eventual removal of in kernel inotify) will come after the new inotify_user proves to be working correctly. Signed-off-by: Eric Paris Acked-by: Al Viro Cc: Christoph Hellwig commit 164bc6195139047faaf5ada1278332e99494803b Author: Eric Paris Date: Thu May 21 17:01:58 2009 -0400 fsnotify: handle filesystem unmounts with fsnotify marks When an fs is unmounted with an fsnotify mark entry attached to one of its inodes we need to destroy that mark entry and we also (like inotify) send an unmount event. Signed-off-by: Eric Paris Acked-by: Al Viro Cc: Christoph Hellwig commit 1ef5f13c6c8acd3fd10db9f1743f3b4cf30a4abb Author: Eric Paris Date: Thu May 21 17:01:54 2009 -0400 fsnotify: fsnotify marks on inodes pin them in core This patch pins any inodes with an fsnotify mark in core. The idea is that as soon as the mark is removed from the inode->fsnotify_mark_entries list the inode will be iput. In reality is doesn't quite work exactly this way. The igrab will happen when the mark is added to an inode, but the iput will happen when the inode pointer is NULL'd inside the mark. It's possible that 2 racing things will try to remove the mark from different directions. One may try to remove the mark because of an explicit request and one might try to remove it because the inode was deleted. It's possible that the removal because of inode deletion will remove the mark from the inode's list, but the removal by explicit request will actually set entry->inode == NULL; and call the iput. This is safe. Signed-off-by: Eric Paris Acked-by: Al Viro Cc: Christoph Hellwig commit e4aff117368cfdd3567ee41844d216d079b55173 Author: Eric Paris Date: Thu May 21 17:01:50 2009 -0400 fsnotify: allow groups to add private data to events inotify needs per group information attached to events. This patch allows groups to attach private information and implements a callback so that information can be freed when an event is being destroyed. Signed-off-by: Eric Paris Acked-by: Al Viro Cc: Christoph Hellwig commit 47882c6f51e8ef41fbbe2bbb746a1ea3228dd7ca Author: Eric Paris Date: Thu May 21 17:01:47 2009 -0400 fsnotify: add correlations between events As part of the standard inotify events it includes a correlation cookie between two dentry move operations. This patch includes the same behaviour in fsnotify events. It is needed so that inotify userspace can be implemented on top of fsnotify. Signed-off-by: Eric Paris Acked-by: Al Viro Cc: Christoph Hellwig commit 62ffe5dfba056f7ba81d710fee9f28c58a42fdd6 Author: Eric Paris Date: Thu May 21 17:01:43 2009 -0400 fsnotify: include pathnames with entries when possible When inotify wants to send events to a directory about a child it includes the name of the original file. This patch collects that filename and makes it available for notification. Signed-off-by: Eric Paris Acked-by: Al Viro Cc: Christoph Hellwig commit a2d8bc6cb4a3024661baf877242f123787d0c054 Author: Eric Paris Date: Thu May 21 17:01:37 2009 -0400 fsnotify: generic notification queue and waitq inotify needs to do asyc notification in which event information is stored on a queue until the listener is ready to receive it. This patch implements a generic notification queue for inotify (and later fanotify) to store events to be sent at a later time. Signed-off-by: Eric Paris Acked-by: Al Viro Cc: Christoph Hellwig commit 3c5119c05d624f95f4967d16b38c9624b816bdb9 Author: Eric Paris Date: Thu May 21 17:01:33 2009 -0400 dnotify: reimplement dnotify using fsnotify Reimplement dnotify using fsnotify. Signed-off-by: Eric Paris Acked-by: Al Viro Cc: Christoph Hellwig commit c28f7e56e9d95fb531dc3be8df2e7f52bee76d21 Author: Eric Paris Date: Thu May 21 17:01:29 2009 -0400 fsnotify: parent event notification inotify and dnotify both use a similar parent notification mechanism. We add a generic parent notification mechanism to fsnotify for both of these to use. This new machanism also adds the dentry flag optimization which exists for inotify to dnotify. Signed-off-by: Eric Paris Acked-by: Al Viro Cc: Christoph Hellwig commit 3be25f49b9d6a97eae9bcb96d3292072b7658bd8 Author: Eric Paris Date: Thu May 21 17:01:26 2009 -0400 fsnotify: add marks to inodes so groups can interpret how to handle those inodes This patch creates a way for fsnotify groups to attach marks to inodes. These marks have little meaning to the generic fsnotify infrastructure and thus their meaning should be interpreted by the group that attached them to the inode's list. dnotify and inotify will make use of these markings to indicate which inodes are of interest to their respective groups. But this implementation has the useful property that in the future other listeners could actually use the marks for the exact opposite reason, aka to indicate which inodes it had NO interest in. Signed-off-by: Eric Paris Acked-by: Al Viro Cc: Christoph Hellwig commit 90586523eb4b349806887c62ee70685a49415124 Author: Eric Paris Date: Thu May 21 17:01:20 2009 -0400 fsnotify: unified filesystem notification backend fsnotify is a backend for filesystem notification. fsnotify does not provide any userspace interface but does provide the basis needed for other notification schemes such as dnotify. fsnotify can be extended to be the backend for inotify or the upcoming fanotify. fsnotify provides a mechanism for "groups" to register for some set of filesystem events and to then deliver those events to those groups for processing. fsnotify has a number of benefits, the first being actually shrinking the size of an inode. Before fsnotify to support both dnotify and inotify an inode had unsigned long i_dnotify_mask; /* Directory notify events */ struct dnotify_struct *i_dnotify; /* for directory notifications */ struct list_head inotify_watches; /* watches on this inode */ struct mutex inotify_mutex; /* protects the watches list But with fsnotify this same functionallity (and more) is done with just __u32 i_fsnotify_mask; /* all events for this inode */ struct hlist_head i_fsnotify_mark_entries; /* marks on this inode */ That's right, inotify, dnotify, and fanotify all in 64 bits. We used that much space just in inotify_watches alone, before this patch set. fsnotify object lifetime and locking is MUCH better than what we have today. inotify locking is incredibly complex. See 8f7b0ba1c8539 as an example of what's been busted since inception. inotify needs to know internal semantics of superblock destruction and unmounting to function. The inode pinning and vfs contortions are horrible. no fsnotify implementers do allocation under locks. This means things like f04b30de3 which (due to an overabundance of caution) changes GFP_KERNEL to GFP_NOFS can be reverted. There are no longer any allocation rules when using or implementing your own fsnotify listener. fsnotify paves the way for fanotify. In brief fanotify is a notification mechanism that delivers the lisener both an 'event' and an open file descriptor to the object in question. This means that fanotify is pathname agnostic. Some on lkml may not care for the original companies or users that pushed for TALPA, but fanotify was designed with flexibility and input for other users in mind. The readahead group expressed interest in fanotify as it could be used to profile disk access on boot without breaking the audit system. The desktop search groups have also expressed interest in fanotify as it solves a number of the race conditions and problems present with managing inotify when more than a limited number of specific files are of interest. fanotify can provide for a userspace access control system which makes it a clean interface for AV vendors to hook without trying to do binary patching on the syscall table, LSM, and everywhere else they do their things today. With this patch series fanotify can be implemented in less than 1200 lines of easy to review code. Almost all of which is the socket based user interface. This patch series builds fsnotify to the point that it can implement dnotify and inotify_user. Patches exist and will be sent soon after acceptance to finish the in kernel inotify conversion (audit) and implement fanotify. Signed-off-by: Eric Paris Acked-by: Al Viro Cc: Christoph Hellwig commit 871fa90791a6f83dd8e2e489feb9534a8c02088d Merge: 7702667 79f52b7 Author: Linus Torvalds Date: Thu Jun 11 11:27:09 2009 -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: Add missing mutex_unlock call to error path missing unlock in jfs_quota_write() commit 7702667bb490573c807fa45519378e84b5050d1d Merge: b415c49 9866b7e Author: Linus Torvalds Date: Thu Jun 11 11:26:56 2009 -0700 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: memtest: use pointers of equal type for comparison commit b415c49a864dab8ee90713833d642dd461eccae9 Author: Oleg Nesterov Date: Thu Jun 11 13:12:55 2009 +0100 slow_work_thread() should do the exclusive wait slow_work_thread() sleeps on slow_work_thread_wq without WQ_FLAG_EXCLUSIVE, this means that slow_work_enqueue()->__wake_up(nr_exclusive => 1) wakes up all kslowd threads. This is not what we want, so we change slow_work_thread() to use prepare_to_wait_exclusive() instead. Signed-off-by: Oleg Nesterov Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 6adc74b7d03c06a8e15d51fe33c3d924ada9271a Merge: c905959 517d3cc Author: Linus Torvalds Date: Thu Jun 11 11:23:17 2009 -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: [libata] ata_piix: Enable parallel scan sata_nv: use hardreset only for post-boot probing [libata] ahci: Restore SB600 SATA controller 64 bit DMA ata_piix: Remove stale comment ata_piix: Turn on hotplugging support for older chips ahci: misc cleanups for EM stuff [libata] get rid of ATA_MAX_QUEUE loop in ata_qc_complete_multiple() v2 sata_sil: enable 32-bit PIO sata_sx4: speed up ECC initialization libata-sff: avoid byte swapping in ata_sff_data_xfer() [libata] ahci: use less error-prone array initializers commit c9059598ea8981d02356eead3188bf7fa4d717b8 Merge: 0a33f80 b0fd271 Author: Linus Torvalds Date: Thu Jun 11 10:52:27 2009 -0700 Merge branch 'for-2.6.31' of git://git.kernel.dk/linux-2.6-block * 'for-2.6.31' of git://git.kernel.dk/linux-2.6-block: (153 commits) block: add request clone interface (v2) floppy: fix hibernation ramdisk: remove long-deprecated "ramdisk=" boot-time parameter fs/bio.c: add missing __user annotation block: prevent possible io_context->refcount overflow Add serial number support for virtio_blk, V4a block: Add missing bounce_pfn stacking and fix comments Revert "block: Fix bounce limit setting in DM" cciss: decode unit attention in SCSI error handling code cciss: Remove no longer needed sendcmd reject processing code cciss: change SCSI error handling routines to work with interrupts enabled. cciss: separate error processing and command retrying code in sendcmd_withirq_core() cciss: factor out fix target status processing code from sendcmd functions cciss: simplify interface of sendcmd() and sendcmd_withirq() cciss: factor out core of sendcmd_withirq() for use by SCSI error handling code cciss: Use schedule_timeout_uninterruptible in SCSI error handling code block: needs to set the residual length of a bidi request Revert "block: implement blkdev_readpages" block: Fix bounce limit setting in DM Removed reference to non-existing file Documentation/PCI/PCI-DMA-mapping.txt ... Manually fix conflicts with tracing updates in: block/blk-sysfs.c drivers/ide/ide-atapi.c drivers/ide/ide-cd.c drivers/ide/ide-floppy.c drivers/ide/ide-tape.c include/trace/events/block.h kernel/trace/blktrace.c commit 0a33f80a8373eca7f4bea3961d1346c3815fa5ed Merge: c29f5ec 003dec8 Author: Linus Torvalds Date: Thu Jun 11 10:36:12 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: (25 commits) GFS2: Merge gfs2_get_sb into gfs2_get_sb_meta GFS2: Fix cache coherency between truncate and O_DIRECT read GFS2: Fix locking issue mounting gfs2meta fs GFS2: Remove unused variable GFS2: smbd proccess hangs with flock() call. GFS2: Remove args subdir from gfs2 sysfs files GFS2: Remove lockstruct subdir from gfs2 sysfs files GFS2: Move gfs2_unlink_ok into ops_inode.c GFS2: Move gfs2_readlinki into ops_inode.c GFS2: Move gfs2_rmdiri into ops_inode.c GFS2: Merge mount.c and ops_super.c into super.c GFS2: Clean up some file names GFS2: Be more aggressive in reclaiming unlinked inodes GFS2: Add a rgrp bitmap full flag GFS2: Improve resource group error handling GFS2: Don't warn when delete inode fails on ro filesystem GFS2: Update docs GFS2: Umount recovery race fix GFS2: Remove a couple of unused sysfs entries GFS2: Add commit= mount option ... commit c29f5ec022451546be1e0b24c330a0368e63e4a7 Merge: d3d07d9 c476c23 Author: Linus Torvalds Date: Thu Jun 11 10:33:36 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: (26 commits) amd64_edac: add MAINTAINERS entry EDAC: do not enable modules by default amd64_edac: do not enable module by default amd64_edac: add module registration routines amd64_edac: add ECC reporting initializers amd64_edac: add EDAC core-related initializers amd64_edac: add error decoding logic amd64_edac: add ECC chipkill syndrome mapping table amd64_edac: add per-family descriptors amd64_edac: add F10h-and-later methods-p3 amd64_edac: add F10h-and-later methods-p2 amd64_edac: add F10h-and-later methods-p1 amd64_edac: add k8-specific methods amd64_edac: assign DRAM chip select base and mask in a family-specific way amd64_edac: add helper to dump relevant registers amd64_edac: add DRAM address type conversion facilities amd64_edac: add functionality to compute the DRAM hole amd64_edac: add sys addr to memory controller mapping helpers amd64_edac: add memory scrubber interface amd64_edac: add MCA error types ... commit d3d07d941fd80c173b6d690ded00ee5fb8302e06 Merge: 6cd8e30 54ff328 Author: Linus Torvalds Date: Thu Jun 11 10:08:33 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (266 commits) sh: Tie sparseirq in to Kconfig. sh: Wire up sys_rt_tgsigqueueinfo. sh: Fix sys_pwritev() syscall table entry for sh32. sh: Fix sh4a llsc-based cmpxchg() sh: sh7724: Add JPU support sh: sh7724: INTC setting update sh: sh7722 clock framework rewrite sh: sh7366 clock framework rewrite sh: sh7343 clock framework rewrite sh: sh7724 clock framework rewrite V3 sh: sh7723 clock framework rewrite V2 sh: add enable()/disable()/set_rate() to div6 code sh: add AP325RXA mode pin configuration sh: add Migo-R mode pin configuration sh: sh7722 mode pin definitions sh: sh7724 mode pin comments sh: sh7723 mode pin V2 sh: rework mode pin code sh: clock div6 helper code sh: clock div4 frequency table offset fix ... commit 6cd8e300b49332eb9eeda45816c711c198d31505 Merge: ddbb868 09f8ca7 Author: Linus Torvalds Date: Thu Jun 11 10:03:30 2009 -0700 Merge branch 'kvm-updates/2.6.31' of git://git.kernel.org/pub/scm/virt/kvm/kvm * 'kvm-updates/2.6.31' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (138 commits) KVM: Prevent overflow in largepages calculation KVM: Disable large pages on misaligned memory slots KVM: Add VT-x machine check support KVM: VMX: Rename rmode.active to rmode.vm86_active KVM: Move "exit due to NMI" handling into vmx_complete_interrupts() KVM: Disable CR8 intercept if tpr patching is active KVM: Do not migrate pending software interrupts. KVM: inject NMI after IRET from a previous NMI, not before. KVM: Always request IRQ/NMI window if an interrupt is pending KVM: Do not re-execute INTn instruction. KVM: skip_emulated_instruction() decode instruction if size is not known KVM: Remove irq_pending bitmap KVM: Do not allow interrupt injection from userspace if there is a pending event. KVM: Unprotect a page if #PF happens during NMI injection. KVM: s390: Verify memory in kvm run KVM: s390: Sanity check on validity intercept KVM: s390: Unlink vcpu on destroy - v2 KVM: s390: optimize float int lock: spin_lock_bh --> spin_lock KVM: s390: use hrtimer for clock wakeup from idle - v2 KVM: s390: Fix memory slot versus run - v3 ... commit ddbb868493abdb71d6c0e3ff93f735923842de38 Merge: 3296ca2 61b6bc5 Author: Linus Torvalds Date: Thu Jun 11 10:02:46 2009 -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: remove never-used in6_addr option cifs: add addr= mount option alias for ip= [CIFS] Add mention of new mount parm (forceuid) to cifs readme cifs: make overriding of ownership conditional on new mount options cifs: fix IPv6 address length check cifs: clean up set_cifs_acl interfaces cifs: reorganize get_cifs_acl [CIFS] Update readme to indicate change to default mount (serverino) cifs: make serverino the default when mounting cifs: rename cifs_iget to cifs_root_iget cifs: make cnvrtDosUnixTm take a little-endian args and an offset cifs: have cifs_NTtimeToUnix take a little-endian arg cifs: tighten up default file_mode/dir_mode cifs: fix artificial limit on reading symlinks commit 3296ca27f50ecbd71db1d808c7a72d311027f919 Merge: e893123 73fbad2 Author: Linus Torvalds Date: Thu Jun 11 10:01:41 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (44 commits) nommu: Provide mmap_min_addr definition. TOMOYO: Add description of lists and structures. TOMOYO: Remove unused field. integrity: ima audit dentry_open failure TOMOYO: Remove unused parameter. security: use mmap_min_addr indepedently of security models TOMOYO: Simplify policy reader. TOMOYO: Remove redundant markers. SELinux: define audit permissions for audit tree netlink messages TOMOYO: Remove unused mutex. tomoyo: avoid get+put of task_struct smack: Remove redundant initialization. integrity: nfsd imbalance bug fix rootplug: Remove redundant initialization. smack: do not beyond ARRAY_SIZE of data integrity: move ima_counts_get integrity: path_check update IMA: Add __init notation to ima functions IMA: Minimal IMA policy and boot param for TCB IMA policy selinux: remove obsolete read buffer limit from sel_read_bool ... commit e893123c7378192c094747dadec326b7c000c190 Merge: 27951da a41f207 Author: Linus Torvalds Date: Thu Jun 11 10:00:50 2009 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (49 commits) ext4: Avoid corrupting the uninitialized bit in the extent during truncate ext4: Don't treat a truncation of a zero-length file as replace-via-truncate ext4: fix dx_map_entry to support 256k directory blocks ext4: truncate the file properly if we fail to copy data from userspace ext4: Avoid leaking blocks after a block allocation failure ext4: Change all super.c messages to print the device ext4: Get rid of EXTEND_DISKSIZE flag of ext4_get_blocks_handle() ext4: super.c whitespace cleanup jbd2: Fix minor typos in comments in fs/jbd2/journal.c ext4: Clean up calls to ext4_get_group_desc() ext4: remove unused function __ext4_write_dirty_metadata ext2: Fix memory leak in ext2_fill_super() in case of a failed mount ext3: Fix memory leak in ext3_fill_super() in case of a failed mount ext4: Fix memory leak in ext4_fill_super() in case of a failed mount ext4: down i_data_sem only for read when walking tree for fiemap ext4: Add a comprehensive block validity check to ext4_get_blocks() ext4: Clean up ext4_get_blocks() so it does not depend on bh_result->b_state ext4: Merge ext4_da_get_block_write() into mpage_da_map_blocks() ext4: Add BUG_ON debugging checks to noalloc_get_block_write() ext4: Add documentation to the ext4_*get_block* functions ... commit 27951daa71f1c91300ae4de9441916d1ffe2b078 Merge: 59c288f e8e7526 Author: Linus Torvalds Date: Thu Jun 11 10:00:03 2009 -0700 Merge branch 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 * 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (28 commits) ide-tape: fix debug call alim15x3: Remove historical hacks, re-enable init_hwif for PowerPC ide-dma: don't reset request fields on dma_timeout_retry() ide: drop rq->data handling from ide_map_sg() ide-atapi: kill unused fields and callbacks ide-tape: simplify read/write functions ide-tape: use byte size instead of sectors on rw issue functions ide-tape: unify r/w init paths ide-tape: kill idetape_bh ide-tape: use standard data transfer mechanism ide-tape: use single continuous buffer ide-atapi,tape,floppy: allow ->pc_callback() to change rq->data_len ide-tape,floppy: fix failed command completion after request sense ide-pm: don't abuse rq->data ide-cd,atapi: use bio for internal commands ide-atapi: convert ide-{floppy,tape} to using preallocated sense buffer ide-cd: convert to using generic sense request ide: add helpers for preparing sense requests ide-cd: don't abuse rq->buffer ide-atapi: don't abuse rq->buffer ... commit b8ec757390282e21d349bf6b602a8cb182da0429 Author: Pekka Enberg Date: Thu Jun 11 19:25:37 2009 +0300 vgacon: use slab allocator instead of the bootmem allocator Slab is initialized before the console subsystem so use the slab allocator in vgacon_scrollback_startup(). Signed-off-by: Pekka Enberg commit 22fb4e71e646695c7e0f379ada66b372c2d1aa1a Author: Pekka Enberg Date: Thu Jun 11 14:46:49 2009 +0300 irq: use kcalloc() instead of the bootmem allocator Fixes the following problem: [ 0.000000] Experimental hierarchical RCU init done. [ 0.000000] NR_IRQS:4352 nr_irqs:256 [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: at mm/bootmem.c:537 alloc_arch_preferred_bootmem+0x40/0x7e() [ 0.000000] Hardware name: To Be Filled By O.E.M. [ 0.000000] Pid: 0, comm: swapper Not tainted 2.6.30-tip-02161-g7a74539-dirty #59709 [ 0.000000] Call Trace: [ 0.000000] [] ? alloc_arch_preferred_bootmem+0x40/0x7e [ 0.000000] [] warn_slowpath_common+0x88/0xcb [ 0.000000] [] warn_slowpath_null+0x27/0x3d [ 0.000000] [] alloc_arch_preferred_bootmem+0x40/0x7e [ 0.000000] [] ___alloc_bootmem_nopanic+0x4e/0xec [ 0.000000] [] ___alloc_bootmem+0x20/0x61 [ 0.000000] [] __alloc_bootmem+0x1e/0x34 [ 0.000000] [] early_irq_init+0x6d/0x118 [ 0.000000] [] ? early_idt_handler+0x0/0x71 [ 0.000000] [] start_kernel+0x192/0x394 [ 0.000000] [] ? early_idt_handler+0x0/0x71 [ 0.000000] [] x86_64_start_reservations+0xb4/0xcf [ 0.000000] [] ? __init_begin+0x0/0x140 [ 0.000000] [] x86_64_start_kernel+0x158/0x17b [ 0.000000] ---[ end trace a7919e7f17c0a725 ]--- [ 0.000000] Fast TSC calibration using PIT [ 0.000000] Detected 2002.510 MHz processor. [ 0.004000] Console: colour VGA+ 80x25 Reported-by: Ingo Molnar Signed-off-by: Pekka Enberg commit 0fb530291621c8b8a1b16abeeab05d9262489f71 Author: Pekka Enberg Date: Thu Jun 11 08:41:22 2009 +0300 sched: use slab in cpupri_init() Lets not use the bootmem allocator in cpupri_init() as slab is already up when it is run. Cc: Ingo Molnar Cc: Linus Torvalds Cc: Yinghai Lu Signed-off-by: Pekka Enberg commit 4bdddf8ff9bbb8aa7b4d7847586202bd25842c90 Author: Pekka Enberg Date: Thu Jun 11 08:35:27 2009 +0300 sched: use alloc_cpumask_var() instead of alloc_bootmem_cpumask_var() Slab is initialized when sched_init() runs now so lets use alloc_cpumask_var(). Cc: Ingo Molnar Cc: Linus Torvalds Cc: Yinghai Lu Signed-off-by: Pekka Enberg commit 959982fee4e635c61780e989c3e34267143fcc02 Author: Yinghai Lu Date: Thu May 28 18:15:16 2009 -0700 memcg: don't use bootmem allocator in setup code The bootmem allocator is no longer available for page_cgroup_init() because we set up the kernel slab allocator much earlier now. Cc: Ingo Molnar Cc: Johannes Weiner Cc: Linus Torvalds Signed-off-by: Yinghai Lu Signed-off-by: Pekka Enberg commit dad213aeb59718623fc59defeff95fe8c3feb8a0 Author: Yinghai Lu Date: Thu May 28 18:14:40 2009 -0700 irq/cpumask: make memoryless node zero happy Don't hardcode to node zero for early boot IRQ setup memory allocations. [ penberg@cs.helsinki.fi: minor cleanups ] Cc: Ingo Molnar Cc: Johannes Weiner Cc: Linus Torvalds Signed-off-by: Yinghai Lu Signed-off-by: Pekka Enberg commit 38c7fed2f5ffee17e1fa3e0f78b0e1bf43d52d13 Author: Yinghai Lu Date: Mon May 25 15:10:58 2009 +0300 x86: remove some alloc_bootmem_cpumask_var calling Now that we set up the slab allocator earlier, we can get rid of some alloc_bootmem_cpumask_var() calls in boot code. Cc: Ingo Molnar Cc: Johannes Weiner Cc: Linus Torvalds Signed-off-by: Yinghai Lu Signed-off-by: Pekka Enberg commit a5f4f52e82114e85aa1a066bd1a450acc19a464d Author: Pekka Enberg Date: Wed Jun 10 23:53:37 2009 +0300 vt: use kzalloc() instead of the bootmem allocator Now that kmem_cache_init() happens before console_init(), we should use kzalloc() and not the bootmem allocator. Signed-off-by: Pekka Enberg commit 36b7b6d465489c4754c4fd66fcec6086eba87896 Author: Pekka Enberg Date: Wed Jun 10 23:42:36 2009 +0300 sched: use kzalloc() instead of the bootmem allocator Now that kmem_cache_init() happens before sched_init(), we should use kzalloc() and not the bootmem allocator. Signed-off-by: Pekka Enberg commit 444f478f65c7ca4606f9965b31feed13fe2bc9fa Author: Pekka Enberg Date: Thu Jun 11 18:29:06 2009 +0300 init: introduce mm_init() As suggested by Christoph Lameter, introduce mm_init() now that we initialize all the kernel memory allocations together. Cc: Christoph Lameter Signed-off-by: Pekka Enberg commit 43ebdac42f16037263b52a5aeedcd1bfa4a9bb29 Author: Pekka Enberg Date: Mon May 25 15:01:35 2009 +0300 vmalloc: use kzalloc() instead of alloc_bootmem() We can call vmalloc_init() after kmem_cache_init() and use kzalloc() instead of the bootmem allocator when initializing vmalloc data structures. Acked-by: Johannes Weiner Acked-by: Linus Torvalds Acked-by: Nick Piggin Cc: Ingo Molnar Cc: Yinghai Lu Signed-off-by: Pekka Enberg commit 83b519e8b9572c319c8e0c615ee5dd7272856090 Author: Pekka Enberg Date: Wed Jun 10 19:40:04 2009 +0300 slab: setup allocators earlier in the boot sequence This patch makes kmalloc() available earlier in the boot sequence so we can get rid of some bootmem allocations. The bulk of the changes are due to kmem_cache_init() being called with interrupts disabled which requires some changes to allocator boostrap code. Note: 32-bit x86 does WP protect test in mem_init() so we must setup traps before we call mem_init() during boot as reported by Ingo Molnar: We have a hard crash in the WP-protect code: [ 0.000000] Checking if this processor honours the WP bit even in supervisor mode...BUG: Int 14: CR2 ffcff000 [ 0.000000] EDI 00000188 ESI 00000ac7 EBP c17eaf9c ESP c17eaf8c [ 0.000000] EBX 000014e0 EDX 0000000e ECX 01856067 EAX 00000001 [ 0.000000] err 00000003 EIP c10135b1 CS 00000060 flg 00010002 [ 0.000000] Stack: c17eafa8 c17fd410 c16747bc c17eafc4 c17fd7e5 000011fd f8616000 c18237cc [ 0.000000] 00099800 c17bb000 c17eafec c17f1668 000001c5 c17f1322 c166e039 c1822bf0 [ 0.000000] c166e033 c153a014 c18237cc 00020800 c17eaff8 c17f106a 00020800 01ba5003 [ 0.000000] Pid: 0, comm: swapper Not tainted 2.6.30-tip-02161-g7a74539-dirty #52203 [ 0.000000] Call Trace: [ 0.000000] [] ? printk+0x14/0x16 [ 0.000000] [] ? do_test_wp_bit+0x19/0x23 [ 0.000000] [] ? test_wp_bit+0x26/0x64 [ 0.000000] [] ? mem_init+0x1ba/0x1d8 [ 0.000000] [] ? start_kernel+0x164/0x2f7 [ 0.000000] [] ? unknown_bootoption+0x0/0x19c [ 0.000000] [] ? __init_begin+0x6a/0x6f Acked-by: Johannes Weiner Acked-by Linus Torvalds Cc: Christoph Lameter Cc: Ingo Molnar Cc: Matt Mackall Cc: Nick Piggin Cc: Yinghai Lu Signed-off-by: Pekka Enberg commit c91c4773b334d4d3a6d44626dc2a558ad97b86f3 Author: Pekka Enberg Date: Thu Jun 11 08:10:28 2009 +0300 bootmem: fix slab fallback on numa If the user requested bootmem allocation on a specific node, we should use kzalloc_node() for the fallback allocation. Cc: Ingo Molnar Cc: Johannes Weiner Cc: Linus Torvalds Cc: Yinghai Lu Signed-off-by: Pekka Enberg commit 441c7e0a2ed38827b48b907bd1fa29faba2017a3 Author: Pekka Enberg Date: Wed Jun 10 20:05:53 2009 +0300 bootmem: use slab if bootmem is no longer available As a preparation for initializing the slab allocator early, make sure the bootmem allocator does not crash and burn if someone calls it after slab is up; otherwise we'd need a flag day for switching to early slab. Acked-by: Johannes Weiner Acked-by: Linus Torvalds Cc: Christoph Lameter Cc: Ingo Molnar Cc: Matt Mackall Cc: Nick Piggin Cc: Yinghai Lu Signed-off-by: Pekka Enberg commit 3aa27bbe7a6536d1ec859d3a97caf3319b5081b7 Author: Catalin Marinas Date: Thu Jun 11 13:24:14 2009 +0100 kmemleak: Add the corresponding MAINTAINERS entry Signed-off-by: Catalin Marinas commit 0822ee4ac1ae6af5a953f97f75553738834b10b9 Author: Catalin Marinas Date: Thu Jun 11 13:24:14 2009 +0100 kmemleak: Simple testing module for kmemleak This patch adds a loadable module that deliberately leaks memory. It is used for testing various memory leaking scenarios. Signed-off-by: Catalin Marinas commit 3bba00d7bdd57cb7aa739b751fa0a1fbbb04dc18 Author: Catalin Marinas Date: Thu Jun 11 13:24:13 2009 +0100 kmemleak: Enable the building of the memory leak detector This patch adds the Kconfig.debug and Makefile entries needed for building kmemleak into the kernel. Signed-off-by: Catalin Marinas commit 2e1483c995bbd0fa6cbd055ad76088a520799ba4 Author: Catalin Marinas Date: Thu Jun 11 13:24:13 2009 +0100 kmemleak: Remove some of the kmemleak false positives There are allocations for which the main pointer cannot be found but they are not memory leaks. This patch fixes some of them. For more information on false positives, see Documentation/kmemleak.txt. Signed-off-by: Catalin Marinas commit 4f2294b6dc88d99295230d97fef2c9863cec44c3 Author: Catalin Marinas Date: Thu Jun 11 13:23:20 2009 +0100 kmemleak: Add modules support This patch handles the kmemleak operations needed for modules loading so that memory allocations from inside a module are properly tracked. Signed-off-by: Catalin Marinas commit dbb1f81ca67a56c6cfce4c94d07c76378fd4af9e Author: Catalin Marinas Date: Thu Jun 11 13:23:19 2009 +0100 kmemleak: Add kmemleak_alloc callback from alloc_large_system_hash The alloc_large_system_hash function is called from various places in the kernel and it contains pointers to other allocated structures. It therefore needs to be traced by kmemleak. Signed-off-by: Catalin Marinas commit 89219d37a2377c44fde7bff0bf0623453c05329a Author: Catalin Marinas Date: Thu Jun 11 13:23:19 2009 +0100 kmemleak: Add the vmalloc memory allocation/freeing hooks This patch adds the callbacks to kmemleak_(alloc|free) functions from vmalloc/vfree. Signed-off-by: Catalin Marinas commit 06f22f13f3cc2eff00db09f053218e5d4b757bc8 Author: Catalin Marinas Date: Thu Jun 11 13:23:18 2009 +0100 kmemleak: Add the slub memory allocation/freeing hooks This patch adds the callbacks to kmemleak_(alloc|free) functions from the slub allocator. Signed-off-by: Catalin Marinas Cc: Christoph Lameter Reviewed-by: Pekka Enberg commit 4374e616d28e65265a5b433ceece275449f3d2e3 Author: Catalin Marinas Date: Thu Jun 11 13:23:17 2009 +0100 kmemleak: Add the slob memory allocation/freeing hooks This patch adds the callbacks to kmemleak_(alloc|free) functions from the slob allocator. Signed-off-by: Catalin Marinas Acked-by: Matt Mackall Acked-by: Pekka Enberg commit d5cff635290aec9ad7e6ee546aa4fae895361cbb Author: Catalin Marinas Date: Thu Jun 11 13:22:40 2009 +0100 kmemleak: Add the slab memory allocation/freeing hooks This patch adds the callbacks to kmemleak_(alloc|free) functions from the slab allocator. The patch also adds the SLAB_NOLEAKTRACE flag to avoid recursive calls to kmemleak when it allocates its own data structures. Signed-off-by: Catalin Marinas Reviewed-by: Pekka Enberg commit 04f70336c80c43a15e617b36c2043dfa0ad6ed0f Author: Catalin Marinas Date: Thu Jun 11 13:22:39 2009 +0100 kmemleak: Add documentation on the memory leak detector This patch adds the Documentation/kmemleak.txt file with some information about how kmemleak works. Signed-off-by: Catalin Marinas commit 3c7b4e6b8be4c16f1e6e5c558e33b7ff0db2dfaf Author: Catalin Marinas Date: Thu Jun 11 13:22:39 2009 +0100 kmemleak: Add the base support This patch adds the base support for the kernel memory leak detector. It traces the memory allocation/freeing in a way similar to the Boehm's conservative garbage collector, the difference being that the unreferenced objects are not freed but only shown in /sys/kernel/debug/kmemleak. Enabling this feature introduces an overhead to memory allocations. Signed-off-by: Catalin Marinas Cc: Ingo Molnar Acked-by: Pekka Enberg Cc: Andrew Morton Reviewed-by: Paul E. McKenney commit 59c288ffb6dfb55bdd6bfe6826ab6203ff791930 Merge: 49c3556 4a3b989 5d28996 Author: Linus Torvalds Date: Thu Jun 11 09:02:31 2009 -0700 Merge branches 'frv' and 'mn10300' * frv: FRV: Implement new-style ptrace FRV: Don't turn on TIF_SYSCALL_TRACE unconditionally in syscall prologue FRV: Implement TIF_NOTIFY_RESUME FRV: Remove in-kernel strace code FRV: BUG to BUG_ON changes FRV: bitops: Change the bitmap index from int to unsigned long * mn10300: MN10300: Add utrace/tracehooks support MN10300: Don't set the dirty bit in the DTLB entries in the TLB-miss handler commit 5d289964e1f1e8a2ec4289274bf15bce6a4f8ab8 Author: David Howells Date: Thu Jun 11 13:08:37 2009 +0100 MN10300: Add utrace/tracehooks support Add utrace/tracehooks support to MN10300. Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit fd4f683d045e053abb093f80d81afce30ceadad2 Author: David Howells Date: Thu Jun 11 13:08:32 2009 +0100 MN10300: Don't set the dirty bit in the DTLB entries in the TLB-miss handler Remove the special handling for the Data TLB entry dirty bit in the TLB-miss handler. As the code stands, all that it does is to cause us to take a second data address exception to set the dirty bit. Instead, we can just let pte_mkdirty() set the bit. Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 4a3b98932270f5d69f2c081924e356325ed704d9 Author: David Howells Date: Thu Jun 11 13:05:24 2009 +0100 FRV: Implement new-style ptrace Implement the new-style ptrace for FRV, including adding appropriate tracehooks. Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 24ceb7e8a6c5dd6e32ac3d43a2424542c97989f5 Author: David Howells Date: Thu Jun 11 13:05:19 2009 +0100 FRV: Don't turn on TIF_SYSCALL_TRACE unconditionally in syscall prologue Don't turn on TIF_SYSCALL_TRACE unconditionally in syscall prologue in FRV's entry.S. This was originally for debugging stuff and should have been removed a long time ago. Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit b7bab880c795ec620041ef0295cbbbc5a726f414 Author: David Howells Date: Thu Jun 11 13:05:14 2009 +0100 FRV: Implement TIF_NOTIFY_RESUME Implement the TIF_NOTIFY_RESUME thread flag, making it call do_notify_resume() which then clears it. This will be made use of later by tracehooks in the new-style ptrace implementation Also discard TIF_IRET as that's not used by FRV. Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit aa1913c0214a53568731617c0afbbfa3f59513fb Author: David Howells Date: Thu Jun 11 13:05:09 2009 +0100 FRV: Remove in-kernel strace code Remove in-kernel strace code from the FRV arch as it's not really needed any more. Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit db5c444eeb781788a0db36a2682b2417cf71f764 Author: Stoyan Gaydarov Date: Thu Jun 11 13:05:04 2009 +0100 FRV: BUG to BUG_ON changes Change some BUG()'s to BUG_ON()'s. Signed-off-by: Stoyan Gaydarov Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit d2f11bf7fc630e27dfcede367399dddf40521878 Author: Justin Chen Date: Thu Jun 11 13:04:59 2009 +0100 FRV: bitops: Change the bitmap index from int to unsigned long Change the index to unsigned long in all bitops for [frv] Signed-off-by: Justin Chen Reviewed-by: Bjorn Helgaas Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 49c355617f603b8e71ec117c1f940152a998528a Merge: 991ec02 f0e8527 Author: Linus Torvalds Date: Thu Jun 11 08:57:47 2009 -0700 Merge branch 'serial-from-alan' * serial-from-alan: (79 commits) moxa: prevent opening unavailable ports imx: serial: use tty_encode_baud_rate to set true rate imx: serial: add IrDA support to serial driver imx: serial: use rational library function lib: isolate rational fractions helper function imx: serial: handle initialisation failure correctly imx: serial: be sure to stop xmit upon shutdown imx: serial: notify higher layers in case xmit IRQ was not called imx: serial: fix one bit field type imx: serial: fix whitespaces (no changes in functionality) tty: use prepare/finish_wait tty: remove sleep_on sierra: driver interface blacklisting sierra: driver urb handling improvements tty: resolve some sierra breakage timbuart: Fix the termios logic serial: Added Timberdale UART driver tty: Add URL for ttydev queue devpts: unregister the file system on error tty: Untangle termios and mm mutex dependencies ... commit 940010c5a314a7bd9b498593bc6ba1718ac5aec5 Merge: 8dc8e5e 991ec02 Author: Ingo Molnar Date: Thu Jun 11 17:55:42 2009 +0200 Merge branch 'linus' into perfcounters/core Conflicts: arch/x86/kernel/irqinit.c arch/x86/kernel/irqinit_64.c arch/x86/kernel/traps.c arch/x86/mm/fault.c include/linux/sched.h kernel/exit.c commit 8dc8e5e8bc0ce00b0f656bf972f67cd8a72759e5 Author: Ingo Molnar Date: Thu Jun 11 16:13:24 2009 +0200 perf_counter: Turn off by default Perfcounters were enabled by default to help testing - but now that we are submitting it upstream, make it default-disabled. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit cca3f454a85ff42d426401bce7ac804541b2bd03 Author: Peter Zijlstra Date: Thu Jun 11 14:57:55 2009 +0200 perf_counter: Add counter->id to the throttle event So as to be able to distuinguish between multiple counters. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit a308444ceb576d3089f9ca0dfd097eba6f1e623f Author: Ingo Molnar Date: Thu Jun 11 14:44:26 2009 +0200 perf_counter: Better align code Whitespace and comment bits. Also update copyrights. [ Impact: cleanup ] Signed-off-by: Ingo Molnar Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: commit 8be6e8f3c3a13900169f1141870562d0c723b010 Author: Peter Zijlstra Date: Thu Jun 11 14:19:11 2009 +0200 perf_counter: Rename L2 to LL cache The top (fastest) and last level (biggest) caches are the most interesting ones, performance wise. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: [ Fixed the Nehalem LL table to LLC Reference/Miss events ] Signed-off-by: Ingo Molnar commit f4dbfa8f3131a84257223393905f7efad0ca5996 Author: Peter Zijlstra Date: Thu Jun 11 14:06:28 2009 +0200 perf_counter: Standardize event names Pure renames only, to PERF_COUNT_HW_* and PERF_COUNT_SW_*. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 1c432d899d32d36371ee4ee310fa3609cf0e5742 Author: Peter Zijlstra Date: Thu Jun 11 13:19:29 2009 +0200 perf_counter: Rename enums Rename the perf enums to be in the 'perf_' namespace and strictly enumerate the ABI bits. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit f0e8527726b9e56649b9eafde3bc0fbc4dd2dd47 Author: Dirk Eibach Date: Thu Jun 11 14:56:44 2009 +0100 moxa: prevent opening unavailable ports In moxa.c there are 32 minor numbers reserved for each device. The number of ports actually available per device is stored in moxa_board_conf->numPorts. This number is not considered in moxa_open(). Opening a port that is not available results in a kernel oops. This patch adds a test to moxa_open() that prevents opening unavailable ports. Signed-off-by: Dirk Eibach Signed-off-by: Jiri Slaby Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit d7f8d437bda0ec409e26cffb846bc28a40603ee3 Author: Oskar Schirmer Date: Thu Jun 11 14:55:22 2009 +0100 imx: serial: use tty_encode_baud_rate to set true rate real baud rate may be different from the one requested. for upper layers, set the nearest value to the real rate in favour of the rate previously requested. Signed-off-by: Oskar Schirmer Signed-off-by: Linus Torvalds commit b6e4913834cd032082e5c76dfade61050212dc98 Author: Fabian Godehardt Date: Thu Jun 11 14:53:18 2009 +0100 imx: serial: add IrDA support to serial driver Using the iMX serial driver with an IrDA device needs extra peripheral settings and specific timing depending on the transmitter circuitry used. Signed-off-by: Fabian Godehardt Signed-off-by: Oskar Schirmer Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 534fca068ec8063ec8b67626b3eb34ba6ec86967 Author: Oskar Schirmer Date: Thu Jun 11 14:52:23 2009 +0100 imx: serial: use rational library function for calculation of numerator and denominator used in baud rate setting, use generic library function for optimum settings. Signed-off-by: Oskar Schirmer Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 8759ef32d992fc6c0bcbe40fca7aa302190918a5 Author: Oskar Schirmer Date: Thu Jun 11 14:51:15 2009 +0100 lib: isolate rational fractions helper function Provide a helper function to determine optimum numerator denominator value pairs taking into account restricted register size. Useful especially with PLL and other clock configurations. Signed-off-by: Oskar Schirmer Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 9f322ad064f9210e7d472dfe77e702274d5c9dba Author: Daniel Glöckner Date: Thu Jun 11 14:39:21 2009 +0100 imx: serial: handle initialisation failure correctly correctly de-initialise device when setting up failed, call to pdata->exit() was missing. Signed-off-by: Daniel Glöckner Signed-off-by: Oskar Schirmer Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 2e1463922a35584c863f71d4021e1e71f76eaed0 Author: Fabian Godehardt Date: Thu Jun 11 14:38:38 2009 +0100 imx: serial: be sure to stop xmit upon shutdown needed to avoid continued transmission by hardware while software already shuts down, which might cause dangling characters to show up in hardware queues when restarting the device. Signed-off-by: Fabian Godehardt Signed-off-by: Oskar Schirmer Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 977757311e50dc5d832c9fef34e7555411f7ccd8 Author: Fabian Godehardt Date: Thu Jun 11 14:37:19 2009 +0100 imx: serial: notify higher layers in case xmit IRQ was not called upper layers, namely line discipline, need to be notified when transmission of more data is possible. For spurious cases, where IRQ handling does not supply notification for sure, it is given additionally here, when data has just been transmitted and space in the buffer will most probably be available. Signed-off-by: Fabian Godehardt Signed-off-by: Oskar Schirmer Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 26bbb3ff1ff6163d6a233055766e26af8054a212 Author: Daniel Glöckner Date: Thu Jun 11 14:36:29 2009 +0100 imx: serial: fix one bit field type "have_rtscts" is assigned 1, while it is declared int:1, two's complement, which can hold 0 and -1 only. The code works, as the upper bits are cut off, and tests are done against 0 only. Nonetheless, correctly declaring the bit field as unsigned int:1 renders the code more robust. Signed-off-by: Daniel Glöckner Signed-off-by: Oskar Schirmer Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit d3810cd4d7064b109574374f73c41b11b481dbf2 Author: Oskar Schirmer Date: Thu Jun 11 14:35:01 2009 +0100 imx: serial: fix whitespaces (no changes in functionality) Signed-off-by: Oskar Schirmer Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 3e3b5c087799e536871c8261b05bc28e4783c8da Author: Jiri Slaby Date: Thu Jun 11 14:33:37 2009 +0100 tty: use prepare/finish_wait Use prepare_to_wait and finish_wait instead of add_wait_queue and remove_wait_queue. This avoids us setting a task state. Signed-off-by: Jiri Slaby Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 5fc5b42a3bb564f0b6e03f0f1b522ed9100250ad Author: Jiri Slaby Date: Thu Jun 11 14:32:42 2009 +0100 tty: remove sleep_on Use wait_event instead of sleep_on in tty_block_til_ready. Wait for ASYNC_CLOSING flag being 0. Signed-off-by: Jiri Slaby Signed-off-by: Linus Torvalds commit 4db2299da213d1ba8cf7f4c0a197ae7ba49db5cb Author: Elina Pasheva Date: Thu Jun 11 14:32:01 2009 +0100 sierra: driver interface blacklisting Interface blacklisting is necessary for non-serial interfaces that are handled by a different driver. The interface blacklisting is implemented in sierra driver per device. Each device in need of a blacklist has a static information array kept in the driver. This array contains the interface numbers that are blacklisted. The pointer for each blacklist array and the length of that blacklist are 'bundled' in data structure sierra_iface_info. A pointer to this information is set in id_table when the device is added to the id_table. The following is summary of changes we have made to sierra.c driver in this patch dealing with interface blacklisting support: - Added data structure sierra_iface_info and function is_blacklisted() to support blacklisting - Modified sierra_probe() to handle blacklisted interfaces accordingly - Improved comments in id_table - Added new device in id_table with blacklist interface support Signed-off-by: Elina Pasheva Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit b9a44bc19f48fd82b8f411500a9bb0ea4153d23c Author: Elina Pasheva Date: Thu Jun 11 14:30:21 2009 +0100 sierra: driver urb handling improvements [Folded from eight patches into one as the original set according to the author "All of the patches need to be applied to obtain a working product" so keeping them split seems unhelpful Merge fixes done versus other conflicting changes and moved the spin_lock_init from open to setup time -- Alan] Summary of the changes and code re-organization in this patch: - The memory for urbs is allocated and urbs are submitted only for the active interfaces (instead of pre-allocating these for all interfaces). This will save memory especially in the case of using composite devices. - The code has been re-organized and functionality has been extracted from sierra_startup(), sierra_shutdown(), sierra_open(), sierra_close() and added in helper functions sierra_release_urb(), sierra_stop_rx_urbs(), sierra_submit_rx_urbs() and sierra_setup_urb() - Added function sierra_release_urb() to free an urb and its transfer buffer. - Removed unecessary include file reference and comment. - Added function sierra_stop_rx_urbs() that takes care of the release of receive and interrupt urbs. This function is to be called by sierra_close() whenever an interface is de-activated. - Added new function sierra_submit_rx_urbs() that handles the submission of receive urbs and interrupt urbs (if any) during the interface activation. This function is to be called by sierra_open(). Added a second parameter to pass the memory allocation (as suggested by Oliver Neukum) so that this function can be used in post_reset() and resume(). - Added new function sierra_setup_urb() that contains the functionality to allocate an urb, fill bulk urb using the supplied memory allocation flag and release urb upon error. Added parameter so that the caller pass the memory allocation flag for flexibility. - Moved sierra_close() before sierra_open() to resolve dependencies introduced by the code reorganization. - Modified sierra_close() to call sierra_stop_rx_urbs() and sierra_release_urb() functions added in previous patch. - Modified sierra_open() to call sierra_setup_urb() and sierra_submit_rx_urbs() functions; note urbs are allocated and submitted for each activated interface. - Modified sierra_startup() so that allocation of urbs happens whenever an interface is activated (urb allocation is moved to sierra_open()). - Modified sierra_shutdown() so that urbs are freed whenever an interface is de-activated (urb freeing moved to sierra_close() as shown in previous patch from the series) - Removed unecessary data structure from sierra_port_private_data - Suppress an entry in logs by not re-submitting an urb when usb_submit_urb() returns -EPERM, as this shows that usb_kill_urb() is running (as suggested by Oliver Neukum) Signed-off-by: Elina Pasheva Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 00b040deca907a113f5bef67a6cc7a4f65a5ace9 Author: Alan Cox Date: Thu Jun 11 14:29:29 2009 +0100 tty: resolve some sierra breakage The various merges into the sierra driver inadvertently undid commit 212b8f0c3f5a2280bfa1d6ab13a6fe98552becaa by Elina Pasheva . Put it back so the OBEX port works again. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 7d55deaf50182c47c1e805dc8cc85f2769f0673e Author: Alan Cox Date: Thu Jun 11 14:27:13 2009 +0100 timbuart: Fix the termios logic The driver only handles speeds but it fails to return the current values for the hardware features it does not support. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 34aec591847c696339189b070cce2a11f901cfea Author: Richard Röjfors Date: Thu Jun 11 14:05:39 2009 +0100 serial: Added Timberdale UART driver Driver for the UART found in the Timberdale FPGA Signed-off-by: Richard Röjfors Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit e960bf73ddd73714bcfbadb1717e53ecda9924cb Author: Alan Cox Date: Thu Jun 11 14:04:57 2009 +0100 tty: Add URL for ttydev queue Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 93d5581e20600593ec3236921b6620225fb76034 Author: Alan Cox Date: Thu Jun 11 14:03:55 2009 +0100 devpts: unregister the file system on error Closes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13429 Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 26a2e20f4a966bebc312836aeb4423fbfd4e33e2 Author: Alan Cox Date: Thu Jun 11 14:03:13 2009 +0100 tty: Untangle termios and mm mutex dependencies Although this doesn't cause any problems it could potentially do so for future mmap using devices. No real work is needed to sort it out so untangle it before it causes problems Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 0b91421857414f525690ee452c0b0acb6ab1dba3 Author: Mike Frysinger Date: Thu Jun 11 14:01:45 2009 +0100 tty: bfin_jtag_comm: emulate a TTY over the Blackfin EMUDAT/JTAG interface The Blackfin JTAG interface has a 4 byte generic data field (EMUDAT). With a little creative thinking, we can turn this into a TTY device. Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 7e9cd3a617414cfe74342659ceeb4e92975c1efa Author: Alan Cox Date: Thu Jun 11 13:57:01 2009 +0100 ftdi_sio: don't override modem bits The new open/close logic handles DTR and friends, so don't do it in our own open routine as well. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 7f8d09eae26a8108406583192996561665b36371 Author: Alan Cox Date: Thu Jun 11 13:56:16 2009 +0100 tty: fix bluetooth scribbling on low latency flags Bluetooth shouldn't be doing this as most drivers don't support the flag, furthermore it shouldn't be needed with newer buffering. This becomes rather more visible as the locking fixes make the abuse of low_latency visible as spew on the users console/dmesg. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 557aaa7ffab639d0190b935a041b16ae44606342 Author: Alan Cox Date: Thu Jun 11 13:55:34 2009 +0100 ft232: support the ASYNC_LOW_LATENCY flag This allows users to use the standard setserial command with this FT232 feature as well as obscure chip specific interfaces we have now. We keep track of and respect the sysfs value for non-low-latency cases. In theory we could do smart stuff with VTIME and the like but this seems of questionable worth. Closes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=9120 Signed-off-by: Alan Cox commit 4cc27bd6d7d6750dba33b4ccb4585c00b8fca7d2 Author: Craig Shelley Date: Thu Jun 11 13:54:40 2009 +0100 USB: CP210X Replace CP2101 with CP210x This patch replaces the string "CP2101" with "CP210x" within cp210x.c This is to reduce confusion about the fact that the driver is actually compatible with CP2101, CP2102 and CP2103 devices. Signed-off-by: Craig Shelley (Fixed some collisions merging) Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 93ef1f1fbce37f14666e4856ff933d4a1b735d02 Author: Craig Shelley Date: Thu Jun 11 13:53:30 2009 +0100 USB: CP210X Use official request code definitions The CP210X driver was developed without official device specifications. This has lead to an incorrect assumption that all GET request codes are equal to the corresponding SET request code +1. This patch removes this incorrect assumption, and uses request code definitions based on the updated GPL driver from SiLabs. This modification is needed before extended functionality such as GPIO on CP2103 can be supported. Signed-off-by: Craig Shelley Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit b7c7cbc898e8a97829f33ad3bcd1b5e91690d8f4 Author: Craig Shelley Date: Thu Jun 11 13:52:31 2009 +0100 USB: CP210X Add device IDs Signed-off-by: Craig Shelley Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 2860b7911137eabb01c159abefb506e538ff3cb7 Author: Sonic Zhang Date: Thu Jun 11 13:51:33 2009 +0100 Blackfin Serial Driver: disable dma rx interrupt only rather than all irqs The UART RX handling code isn't exactly speeding, so don't go disabling all interrupts when processing the buffer. Just disable the relevant DMA interrupt. This greatly improves latency of the system when utilizing the UART. Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 84507794a9d5d4decd6bc9c111480076dba0d301 Author: Sonic Zhang Date: Thu Jun 11 13:50:20 2009 +0100 Blackfin Serial Driver: handle anomaly 05000231 05000231 - UART STB Bit Incorrectly Affects Receiver Setting For processors affected by this, we cannot safely allow CSTOPB to be set as the UART will then be unable to properly clock in bytes. Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 0efa4f2c944fabffc81918cc86d4d17dba39a021 Author: Sonic Zhang Date: Thu Jun 11 13:45:07 2009 +0100 Blackfin Serial Driver: annotate anomalies 05000215 and 05000099 Add some comments for how these anomalies are addressed: 05000215 - UART TX Interrupt Masked Erroneously We always clear ETBEI within last UART TX interrupt to end a string. It is always set when starting a new tx transfer. 05000099 - UART Line Status Register (UART_LSR) Bits Are Not Updated at the Same Time This anomaly affects driver only in POLL code where multi bits of UART_LSR are checked. It doesn't affect current bfin_5xx.c driver. Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 35ff69357949cfff5c3d8e3038b77146872e3bd3 Author: Sonic Zhang Date: Thu Jun 11 13:42:57 2009 +0100 Blackfin Serial Driver: handle irregular DMA register status in auto start mode This bug is caused by irregular behavior of DMA register CURR_X_COUNT and CURR_Y_COUNT when an auto restart uart rx DMA run to last byte in DMA buffer, trigger the interrupt and stay at this possiton. The status of current x and y is 0:7 instead of 512:8 or 0:8. The driver doesn't take care of this case when calculating the position. URL: http://blackfin.uclinux.org/gf/tracker/5063 Reported-by: Tomasz Motylewski Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit f9d36da9cdc2504cd9bb6034cfaba0673ce2d6df Author: Graf Yang Date: Thu Jun 11 13:42:17 2009 +0100 Blackfin Serial Driver: fix missing new lines when under load Add a SSYNC() into bfin_serial_dma_tx_chars() to ensure DMA registers are written with new data otherwise we might miss a byte or two when the system is under load. PIO mode is OK though. Signed-off-by: Graf Yang Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 7de7c55bf54dede2bd2262349fc7b558bcc8e413 Author: Robin Getz Date: Thu Jun 11 13:38:57 2009 +0100 Blackfin Serial Driver: fix baudrate for early_printk Since we already setup the early console UART in arch/blackfin/kernel/early_printk.c, and common functions which are enabled from the .setup will override the proper settings later, don't fill in these structures. Otherwise we get mangled baudrate settings when using early_printk. Signed-off-by: Robin Getz Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 8516c568f25666a012ec4c859e640a76fc9b6ec0 Author: Sonic Zhang Date: Thu Jun 11 13:38:16 2009 +0100 Blackfin Serial Driver: fix error while transferring large files Ignore receiving data if new position is in the same line of current buffer tail and is small. This should decrease overruns. Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 4328e3e5ef1ae3427a4f6863aa65916a68ec2dd9 Author: Mike Frysinger Date: Thu Jun 11 13:37:11 2009 +0100 Blackfin SPORT UART: rewrite inline assembly Hopefuly the new version is easier to read, but in the process it declares proper clobber lists and better constraints so that GCC can do a better job at allocating free registers. Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit a19e8b205915b2925aca75b2d2bf0c3104c8be14 Author: Michael Hennerich Date: Thu Jun 11 13:23:42 2009 +0100 Blackfin SPORT UART: fix data misses while using transmit frame sync SPORT transmit frame sync (TFS) isn't used as an electrical signal during normal SPORT UART emulation. However, it is useful in EIA RS-485 emulation as RS-485 Transceiver Driver Enable DE strobe. This patch configures: TFS to be active high in order to drive an DE strobe of an eventually connected RS-485 Transceiver. Late frame sync mode (LATFS) gating the entire TX shift cycle. Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit b5c6794fe4256fd63664aa185c468647c28bfd4a Author: Mike Frysinger Date: Thu Jun 11 13:23:02 2009 +0100 Blackfin SPORT UART: fix typo in sport_set_termios prototype Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 08e0992f60ad44025a8a8b8a821838ca4a562686 Author: Florian Fainelli Date: Thu Jun 11 13:21:24 2009 +0100 serial: add support for the TI AR7 internal UART This patch adds support for the TI AR7 internal UART. Signed-off-by: Florian Fainelli Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 257a6e8cc7f9274f0af090494a3f1ee06548b5bd Author: Breno Leitao Date: Thu Jun 11 13:20:09 2009 +0100 icom: fix compile errors when defining ICOM_TRACE As it is, defining ICOM_TRACE produces some compile errors, as "parameter name omitted" and "redefinition of ‘trace’" This patch removes the wrong trace definition. Signed-off-by: Breno Leitao Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 181bf1e815a2ad2a9a8b30ef6e92583d1530b255 Author: Alan Cox Date: Thu Jun 11 13:08:10 2009 +0100 parport_pc: clean up the modified while loops using for And tidy up a few bits coding style detectors missed Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 3aeda9bc95d064308a70664e6f4a158c96cc1918 Author: Alan Cox Date: Thu Jun 11 13:07:29 2009 +0100 parport_pc: Coding style Michael's patch fixed some of the coding style so the style is now inconsistent. Sort the rest out Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 73e0d48b8c28fb39a0bb6713c875e9919a9af546 Author: Michael Buesch Date: Thu Jun 11 13:06:31 2009 +0100 parport_pc: Fix subscription bugs This patch fixes array subscription bugs in the parport_pc driver. drivers/parport/parport_pc.c: In function ‘parport_irq_probe’: drivers/parport/parport_pc.c:1589: warning: array subscript is above array bounds drivers/parport/parport_pc.c: In function ‘parport_pc_probe_port’: drivers/parport/parport_pc.c:1579: warning: array subscript is above array bounds The patch also fixes a few other array bugs, which the compiler was unable to find. Coding style violations are also fixed. Signed-off-by: Michael Buesch Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 0b4068a1287b02018d1b3159e7be6f27f3e3e68c Author: Alan Cox Date: Thu Jun 11 13:05:49 2009 +0100 tty: simplify buffer allocator cleanups Having cleaned up the allocators we might as well remove the inline helpers for some of it Signed-off-by: Alan Cox commit c481c707fe4b07783d9a2499a9bbbb94497e9b18 Author: Alan Cox Date: Thu Jun 11 13:04:27 2009 +0100 tty: remove buffer special casing Long long ago a 4K kmalloc allocated two pages so the tty layer used the page allocator, except on some machines where the page size was huge. This was removed from the core tty layer with the tty buffer re-implementation but not from tty_audit or the n_tty ldisc. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit aba6593bf77371e71331ba76dacc98b47760cba3 Author: Breno Leitao Date: Thu Jun 11 13:02:59 2009 +0100 icom: fixing a if clause spaghetti adapter->version can only be ADAPTER_V2 or ADAPTER_V1. So, that OR operand in the "if" clause is non-sense and can be removed. Signed-off-by: Breno Leitao Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 13858d36903990441a89eb342247b71436808eeb Author: Alexander Y. Fomichev Date: Thu Jun 11 12:56:00 2009 +0100 jsm: correctly support multiple 4/8-port boards If there are more then one 4/8-port board jsm_uart_port_init allocate a line numbers of the second and further boards from range of previous one. This patch fixed the problem. Signed-off-by: Alexander Y. Fomichev [printks fixed to add jsm: ] Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 9bb41699ad5c74519dc054bfe469a8074799c863 Author: Olivier Bornet Date: Thu Jun 11 12:55:01 2009 +0100 tty: iuu_phoenix: update version number. Signed-off-by: Olivier Bornet Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 96dab77ebf3868cc8723ac95e048e8a9c1dccf22 Author: Olivier Bornet Date: Thu Jun 11 12:54:20 2009 +0100 tty: iuu_phoenix: set termios. set_termios can now be used for setting the parity and the stopbits. This is needed to use with cards which use a different parity then the parity used at start (even). If the iuu_uart_baud function return an error, we will return the old_termios instead of the new one. Signed-off-by: Olivier Bornet This was then revamped to use the various helpers, not copy non-hardware bits any to add mark/space parity and csize reporting Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit cc3447d179d8a5e16807e52b77d7f4c095ffedb7 Author: Olivier Bornet Date: Thu Jun 11 12:53:24 2009 +0100 tty: iuu_phoenix: Fix stopbit when uart goes on. Signed-off-by: Olivier Bornet Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 5fcf62b0f1f24ee25931636216f28bc87448a60f Author: Olivier Bornet Date: Thu Jun 11 12:52:26 2009 +0100 tty: iuu_phoenix: fix locking. Bring in the relevant bits of the 0.9 vendor driver. Signed-off-by: Olivier Bornet Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 852e99d22f2231d232c45216b027565e3bae7add Author: Alan Cox Date: Thu Jun 11 12:51:41 2009 +0100 tty: bring ldisc into CodingStyle Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit f2c4c65c8350d885d74dcdea7061dcecc1223c36 Author: Alan Cox Date: Thu Jun 11 12:50:58 2009 +0100 tty: Move ldisc_flush We have a tty_ldisc file now so put tty_ldisc_flush in the right place Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit c65c9bc3efa5589f691276bb9db689119a711222 Author: Alan Cox Date: Thu Jun 11 12:50:12 2009 +0100 tty: rewrite the ldisc locking There are several pretty much unfixable races in the old ldisc code, especially with respect to pty behaviour and also to hangup. It's easier to rewrite the code than simply try and patch it up. This patch - splits the ldisc from the tty (so we will be able to refcount it more cleanly later) - introduces a mutex lock for ldisc changing on an active device - fixes the complete mess that hangup caused - implements hopefully correct setldisc/close/hangup locking There are still some problems around pty pairs that have always been there but at least it is now possible to understand the code and fix further problems. This fixes the following known bugs - hang up can leak ldisc references - hang up may not call open/close on ldisc in a matched way - pty/tty pairs can deadlock during an ldisc change - reading the ldisc proc files can cause every ldisc to be loaded and probably a few other of the mysterious ldisc race reports. I'm sure it also adds the odd new one. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit e8b70e7d3e86319a8b2aaabde3866833d92cd80f Author: Alan Cox Date: Thu Jun 11 12:48:02 2009 +0100 tty: Extract various bits of ldisc code Before trying to tackle the ldisc bugs the code needs to be a good deal more readable, so do the simple extractions of routines first. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 5f0878acba7db24323f5ba4055ec9a96895bb150 Author: Alan Cox Date: Thu Jun 11 12:46:41 2009 +0100 tty: Fix oops when scanning the polling list for kgdb Costantino Leandro found a bug in tty_find_polling_driver and provided a patch that fixed the crash but not the underlying bug. This fixes the underlying bug where the list walk corrupts the values it is using on a match but then reuses them if the open fails. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 620df3c0a5b70656c4de6049825de214f108218e Author: Alan Cox Date: Thu Jun 11 12:45:53 2009 +0100 pty: Fix a comment We fixed the globals, so now fix the comment Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 4b6ae89ef40d0d5d4c85098c1d0a012333a68729 Author: Alan Cox Date: Thu Jun 11 12:45:08 2009 +0100 serial: update maintainers file Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 38db89799bdf11625a831c5af33938dcb11908b6 Author: Alan Cox Date: Thu Jun 11 12:44:17 2009 +0100 tty: throttling race fix The tty throttling code can race due to the lock drops. It takes very high loads but this has been observed and verified by Rob Duncan. The basic problem is that on an SMP box we can go CPU #1 CPU #2 need to throttle ? suppose we should buffer space cleared are we throttled yes ? - unthrottle call throttle method This changeet take the termios lock to protect against this. The termios lock isn't the initial obvious candidate but many implementations of throttle methods already need to poke around their own termios structures (and nobody really locks them against a racing change of flow control). This does mean that anyone who is setting tty->low_latency = 1 and then calling tty_flip_buffer_push from their unthrottle method is going to end up collapsing in a pile of locks. However we've removed all the known bogus users of low_latency = 1 and such use isn't safe anyway for other reasons so catching it would be an improvement. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 5b0ed5263cb089500052f8c1ab6e0706bebf0d83 Author: Arnd Bergmann Date: Thu Jun 11 12:42:49 2009 +0100 x86: fix ktermios-termio conversion The legacy TCSETA{,W,F} ioctls failed to set the termio->c_line field on x86. This adds a missing get_user. The same ioctls also fail to report faulting user pointers, which we keep ignoring. Signed-off-by: Arnd Bergmann Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 70fd8fdecc4430ffcede7704dd812d4054d1faf9 Author: Andre Przywara Date: Thu Jun 11 12:41:57 2009 +0100 8250_pci: add the OXCB950 chip to the 8250 PCI driver. This adds support for the following serial controller chip: Oxford Semiconductor OXCB950 for PCI Cardbus interface http://www.transdimension.com/products/serial/OXCB950.html on this card: ExSys EX-1370 1 port high-speed serial card for ExpressCard/34 slot Signed-off-by: Andre Przywara Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit c3301a5c04800bcf8afc8a815bf9e570a4e25a08 Author: Jiri Slaby Date: Thu Jun 11 12:41:05 2009 +0100 epca: fix test_bit parameters Switch from ASYNC_* to ASYNCB_*, because test_bit expects bit number, not mask. Signed-off-by: Jiri Slaby Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit a391ad0f09014856bbc4eeea309593eba977b3b0 Author: Jiri Slaby Date: Thu Jun 11 12:40:17 2009 +0100 rocket: fix test_bit parameters Switch from ASYNC_* to ASYNCB_*, because {test,set}_bit expect bit number, not mask. Signed-off-by: Jiri Slaby Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 70beaed22cbe12979e55d99b370e147e2e168562 Author: Jiri Slaby Date: Thu Jun 11 12:39:12 2009 +0100 serial: refactor ASYNC_ flags Define ASYNCB_* flags which are bit numbers of the ASYNC_* flags. This is useful for {test,set,clear}_bit. Also convert each ASYNC_% to be (1 << ASYNCB_%) and define masks with the macros, not constants. Tested with: #include "PATH_TO_KERNEL/include/linux/serial.h" static struct { unsigned int new, old; } as[] = { { ASYNC_HUP_NOTIFY, 0x0001 }, { ASYNC_FOURPORT, 0x0002 }, ... { ASYNC_BOOT_ONLYMCA, 0x00400000 }, { ASYNC_INTERNAL_FLAGS, 0xFFC00000 } }; ... for (a = 0; a < ARRAY_SIZE(as); a++) if (as[a].old != as[a].new) printf("%.8x != %.8x\n", as[a].old, as[a].new); Signed-off-by: Jiri Slaby Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 6e47e069eb4dffa88ad91ddfc3fd85f32c35654b Author: Alan Cox Date: Thu Jun 11 12:37:06 2009 +0100 tty: Clean up the ACM driver to CodingStyle Or at least most of it. There are further clean ups possible and there are are also thing checkpatch moans about that would be silly to "fix". Also note some FIXME points found as the cleanup was done. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 10077d4a6674f535abdbe25cdecb1202af7948f1 Author: Alan Cox Date: Thu Jun 11 12:36:09 2009 +0100 tty: cdc_acm add krefs Now we have a port structure begin using the fields and kref counts Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit b39933fbd304021580800796683b8ddaa3dd0a6a Author: Jiri Slaby Date: Thu Jun 11 12:35:21 2009 +0100 tty: cyclades, remove unused variables Signed-off-by: Jiri Slaby Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 963118eef9e6706e2b5356309fb0cdd9c9eba81d Author: Jiri Slaby Date: Thu Jun 11 12:34:27 2009 +0100 tty: cyclades, fix nports handling Set up ports right after FW load so that we won't allocate maximal (64) ports when we use few. Also remove reading of nports in irq context, since we know it from initialisation now. This also fixes a tty ports unregistration on some fail paths and for Ze which registered 64 and unregistered real port count. Signed-off-by: Jiri Slaby Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 08a951e1693e324bd035b194002a82b9057fd9c5 Author: Jiri Slaby Date: Thu Jun 11 12:33:40 2009 +0100 tty: cyclades, remove typedefs They are unused anyway. Signed-off-by: Jiri Slaby Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 2693f485c22d18474c077f12fd0f797ee8679b33 Author: Jiri Slaby Date: Thu Jun 11 12:31:06 2009 +0100 tty: cyclades, convert macros to inlines Remove ugly macros and add inlines instead of them. This improves readability and type checking a much. Signed-off-by: Jiri Slaby Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 101b81590d8df0a74c33cf739886247c0a13f4af Author: Jiri Slaby Date: Thu Jun 11 12:30:10 2009 +0100 tty: cyclades, cache HW version Store HW version locally to not read it all the time in interrupts and alike. Signed-off-by: Jiri Slaby Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 97e87f8ebe978e881c7325ba490574bd5500b133 Author: Jiri Slaby Date: Thu Jun 11 12:29:27 2009 +0100 tty: cyclades, plx9060 casts cleanup Remove ugly all-over-the-code casts of ctl_addr to 9060 space. Add an union to the cyclades_card structure, which contains a pointer to both 9050 and 9060 spaces. The 9050 space layout is unknown, so let it still as a void __iomem pointer. Signed-off-by: Jiri Slaby Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 5ba5a5d21204f61ff655b322a90ed91c75194e4b Author: Paul Fulghum Date: Thu Jun 11 12:28:37 2009 +0100 tty: synclink_gt add receive pio mode Add receive programmed IO mode to reduce receive latency when using low data rates. The receive FIFO trigger level of 128 bytes used in DMA mode creates excessive latency when operating at low data rates. PIO mode is selected when user application requests data in blocks of less than 128 bytes. Signed-off-by: Paul Fulghum Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 739e0285cbb162c8ddd0061fda581ee54a34c19a Author: Alan Cox Date: Thu Jun 11 12:27:50 2009 +0100 tty: Update cdc_acm The CDC ACM driver uses the tty layer correctly so needs conversion. Start by adding and initializing the port structures. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 335f8514f200e63d689113d29cb7253a5c282967 Author: Alan Cox Date: Thu Jun 11 12:26:29 2009 +0100 tty: Bring the usb tty port structure into more use This allows us to clean stuff up, but is probably also going to cause some app breakage with buggy apps as we now implement proper POSIX behaviour for USB ports matching all the other ports. This does also mean other apps that break on USB will now work properly. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 1ec739be75a6cb961a46ba0b1982d0edb7f27558 Author: Alan Cox Date: Thu Jun 11 12:25:25 2009 +0100 tty: Implement a drain delay in the tty port We need this for devices that cannot flush and wait, but which do not order data and modem events. Without it we will hang up before all the data clears the hardware. Needed for the USB changes. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit fcc8ac1825d3d0fb81f73bc1a80ebc863168bb56 Author: Alan Cox Date: Thu Jun 11 12:24:17 2009 +0100 tty: Add carrier processing on close to the tty_port core Some drivers implement this internally, others miss it out. Push the behaviour into the core code as that way everyone will do it consistently. Update the dtr rts method to raise or lower depending upon flags. Having a single method in this style fits most of the implementations more cleanly than two funtions. We need this in place before we tackle the USB side Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 65a29f60e121ae5116ac1736b50a237bf2db3225 Author: Jiri Slaby Date: Thu Jun 11 12:22:27 2009 +0100 tty: cyclades, remove spurious check in ISR No need to check if dev_id is NULL, it never is. Signed-off-by: Jiri Slaby Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit eca1b592d600bb2b7d24b66e4106de1e751ae510 Author: Jiri Slaby Date: Thu Jun 11 12:21:30 2009 +0100 tty: cyclades, don't kill FW Don't reset the PLX chip after FW load, which effectively kills the FW, so that user had to boot manually. Signed-off-by: Jiri Slaby Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit ace08c3c4403140e5ce82116c8f2acb38f58f61d Author: Jiri Slaby Date: Thu Jun 11 12:20:38 2009 +0100 tty:cyclades, load firmware even on Ze Ze needs firmware to be loaded as well as Zo. Move cyz_load_fw one level upper to achieve that. Signed-off-by: Jiri Slaby Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit b263c2c8bf13c273485bd99dbbeba79c844409dd Author: Chris Mason Date: Thu Jun 11 11:24:47 2009 -0400 Btrfs: fix extent_buffer leak during tree log replay During tree log replay, we read in the tree log roots, process them and then free them. A recent change takes an extra reference on the root node of the tree when the root is read in, and stores that reference in root->commit_root. This reference was not being freed, leaving us with one buffer pinned in ram for each subvol with a tree log root after a crash. Signed-off-by: Chris Mason commit 0b4dcea579a1b6f4d249d61f5bc8adeaa7c895d8 Author: Chris Mason Date: Thu Jun 11 11:13:35 2009 -0400 Btrfs: fix oops when btrfs_inherit_iflags called with a NULL dir This happens during subvol creation. Signed-off-by: Chris Mason commit 729ff5e2aaf181f5d3ab849337fce406cd19b1d9 Author: Ingo Molnar Date: Thu Jun 11 14:16:15 2009 +0200 perf_counter tools: Clean up u64 usage A build error slipped in: builtin-report.c: In function ‘hist_entry__fprintf’: builtin-report.c:711: error: format ‘%12d’ expects type ‘int’, but argument 3 has type ‘uint64_t’ Because we got a bit sloppy with those types. uint64_t really sucks, because there's no printf format for it. So standardize on __u64 instead - for all types that go to or come from the ABI (which is __u64), or for values that need to be large enough even on 32-bit. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit df58ab24bf26b166874bfb18b3b5a2e0a8e63179 Author: Peter Zijlstra Date: Thu Jun 11 11:25:05 2009 +0200 perf_counter: Rename perf_counter_limit sysctl Rename perf_counter_limit to perf_counter_max_sample_rate and prohibit creation of counters with a known higher sample frequency. Signed-off-by: Peter Zijlstra Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 0764771dab80d7b84b9a271bee7f1b21a04a3f0c Author: Peter Zijlstra Date: Thu Jun 11 11:18:36 2009 +0200 perf_counter: More paranoia settings Rename the perf_counter_priv knob to perf_counter_paranoia (because priv can be read as private, as opposed to privileged) and provide one more level: 0 - permissive 1 - restrict cpu counters to privilidged contexts 2 - restrict kernel-mode code counting and profiling Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 106b506c3a8b74daa5751e83ed3e46438fcf9a52 Author: Paul Mackerras Date: Thu Jun 11 14:55:42 2009 +1000 perf_counter: powerpc: Implement generalized cache events for POWER processors This adds tables of event codes for the generalized cache events for all the currently supported powerpc processors: POWER{4,5,5+,6,7} and PPC970*, plus powerpc-specific code to use these tables when a generalized cache event is requested. Signed-off-by: Paul Mackerras Cc: Peter Zijlstra LKML-Reference: <18992.36430.933526.742969@drongo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 4da52960fd1ae3ddd14901bc88b608cbeaa4b9a6 Author: Paul Mackerras Date: Thu Jun 11 14:54:01 2009 +1000 perf_counters: powerpc: Add support for POWER7 processors This adds the back-end for the PMU on POWER7 processors. POWER7 has 4 fully-programmable counters and two fixed-function counters (which do respect the freeze conditions, can generate interrupts, and are writable, unlike PMC5/6 on POWER5+/6). Signed-off-by: Paul Mackerras Cc: Peter Zijlstra LKML-Reference: <18992.36329.189378.17992@drongo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 9866b7e86a2ce4daa677be750e3ccbfc65d187f5 Author: Thomas Gleixner Date: Thu Jun 11 16:25:01 2009 +0200 x86: memtest: use pointers of equal type for comparison Commit c9690998ef48ffefeccb91c70a7739eebdea57f9 (x86: memtest: remove 64-bit division) introduced following compile warning: arch/x86/mm/memtest.c: In function 'memtest': arch/x86/mm/memtest.c:56: warning: comparison of distinct pointer types lacks a cast arch/x86/mm/memtest.c:58: warning: comparison of distinct pointer types lacks a cast Signed-off-by: Thomas Gleixner commit 4f64e150191bfddc7f5c0768f325f747dbca1913 Author: Takashi Iwai Date: Thu Jun 11 16:14:11 2009 +0200 ALSA: pcm - Update document about xrun_debug proc file Signed-off-by: Takashi Iwai commit de0525ca34aa7a65faf6902e3e00956ab80d2ede Author: Tim Blechmann Date: Thu Jun 11 16:03:34 2009 +0200 ALSA: lx6464es - support standard alsa module parameters trivial patch to support the alsa module parameters `index', `id' and `enable' Signed-off-by: Tim Blechmann Signed-off-by: Takashi Iwai commit 067c28adc53807514ac0c6ebb6af3243cbd071fa Author: Chris Mason Date: Thu Jun 11 09:30:13 2009 -0400 Btrfs: fix -o nodatasum printk spelling It was printing nodatacsum, which was not the correct option name. Signed-off-by: Chris Mason commit 85d4198e40c289dd623cecd16601fa613559bed7 Author: Yan Zheng Date: Thu Jun 11 08:51:10 2009 -0400 Btrfs: check duplicate backrefs for both data and metadata lookup_inline_extent_backref only checks for duplicate backref for data extents. It assumes backrefs for tree block never conflict. This patch makes lookup_inline_extent_backref check for duplicate backrefs for both data and tree block, so that we can detect potential bug earlier. This is a safety check, strictly speaking it is not required. Signed-off-by: Yan Zheng Signed-off-by: Chris Mason commit b0fd271d5fba0b2d00888363f3869e3f9b26caa9 Author: Kiyoshi Ueda Date: Thu Jun 11 13:10:16 2009 +0200 block: add request clone interface (v2) This patch adds the following 2 interfaces for request-stacking drivers: - blk_rq_prep_clone(struct request *clone, struct request *orig, struct bio_set *bs, gfp_t gfp_mask, int (*bio_ctr)(struct bio *, struct bio*, void *), void *data) * Clones bios in the original request to the clone request (bio_ctr is called for each cloned bios.) * Copies attributes of the original request to the clone request. The actual data parts (e.g. ->cmd, ->buffer, ->sense) are not copied. - blk_rq_unprep_clone(struct request *clone) * Frees cloned bios from the clone request. Request stacking drivers (e.g. request-based dm) need to make a clone request for a submitted request and dispatch it to other devices. To allocate request for the clone, request stacking drivers may not be able to use blk_get_request() because the allocation may be done in an irq-disabled context. So blk_rq_prep_clone() takes a request allocated by the caller as an argument. For each clone bio in the clone request, request stacking drivers should be able to set up their own completion handler. So blk_rq_prep_clone() takes a callback function which is called for each clone bio, and a pointer for private data which is passed to the callback. NOTE: blk_rq_prep_clone() doesn't copy any actual data of the original request. Pages are shared between original bios and cloned bios. So caller must not complete the original request before the clone request. Signed-off-by: Kiyoshi Ueda Signed-off-by: Jun'ichi Nomura Cc: Boaz Harrosh Signed-off-by: Jens Axboe commit 62fdac5913f71f8f200bd2c9bd59a02e9a1498e9 Author: Hidetoshi Seto Date: Thu Jun 11 16:06:07 2009 +0900 x86, mce: Add boot options for corrected errors This patch introduces three boot options (no_cmci, dont_log_ce and ignore_ce) to control handling for corrected errors. The "mce=no_cmci" boot option disables the CMCI feature. Since CMCI is a new feature so having boot controls to disable it will be a help if the hardware is misbehaving. The "mce=dont_log_ce" boot option disables logging for corrected errors. All reported corrected errors will be cleared silently. This option will be useful if you never care about corrected errors. The "mce=ignore_ce" boot option disables features for corrected errors, i.e. polling timer and cmci. All corrected events are not cleared and kept in bank MSRs. Usually this disablement is not recommended, however it will be a help if there are some conflict with the BIOS or hardware monitoring applications etc., that clears corrected events in banks instead of OS. [ And trivial cleanup (space -> tab) for doc is included. ] Signed-off-by: Hidetoshi Seto Reviewed-by: Andi Kleen LKML-Reference: <4A30ACDF.5030408@jp.fujitsu.com> Signed-off-by: Ingo Molnar commit 77e26cca20013e9352a8df86a54640543304a23a Author: Hidetoshi Seto Date: Thu Jun 11 16:04:35 2009 +0900 x86, mce: Fix mce printing This patch: - Adds print_mce_head() instead of first flag - Makes the header to be printed always - Stops double printing of corrected errors [ This portion originates from Huang Ying's patch ] Originally-From: Huang Ying Signed-off-by: Hidetoshi Seto LKML-Reference: <4A30AC83.5010708@jp.fujitsu.com> Signed-off-by: Ingo Molnar commit 342dc382c451f75ea202a65e6f529bdff6d184cd Author: yakui_zhao Date: Tue Jun 2 14:12:00 2009 +0800 drm/i915: Replace DRM_DEBUG with DRM_DEBUG_KMS in intel_sdvo Use the DRM_DEBUG_KMS/DEBUG_LOG_KMS to print the debug info for SDVO device. Signed-off-by: Zhao Yakui Signed-off-by: Dave Airlie commit 7fb85bfb54a64e9dd82ee4a79022c38ab58f21a0 Author: yakui_zhao Date: Tue Jun 2 14:10:49 2009 +0800 drm/i915: replace DRM_DEBUG with DRM_DEBUG_KMS in intel_lvds Use the DRM_DEBUG_KMS macro definition to print the debug info for the LVDS. Signed-off-by: Zhao Yakui Signed-off-by: Dave Airlie commit 4fefcb27050b98c97b1c32bc710fc2f874449dee Author: yakui_zhao Date: Tue Jun 2 14:09:47 2009 +0800 drm: add separate drm debugging levels Now all the DRM debug info will be reported if the boot option of "drm.debug=1" is added. Sometimes it is inconvenient to get the debug info in KMS mode. We will get too much unrelated info. This will separate several DRM debug levels and the debug level can be used to print the different debug info. And the debug level is controlled by the module parameter of drm.debug In this patch it is divided into four debug levels; drm_core, drm_driver, drm_kms, drm_mode. At the same time we can get the different debug info by changing the debug level. This can be done by adding the module parameter. Of course it can be changed through the /sys/module/drm/parameters/debug after the system is booted. Four debug macro definitions are provided. DRM_DEBUG(fmt, args...) DRM_DEBUG_DRIVER(prefix, fmt, args...) DRM_DEBUG_KMS(prefix, fmt, args...) DRM_DEBUG_MODE(prefix, fmt, args...) When the boot option of "drm.debug=4" is added, it will print the debug info using DRM_DEBUG_KMS macro definition. When the boot option of "drm.debug=6" is added, it will print the debug info using DRM_DEBUG_KMS/DRM_DEBUG_DRIVER. Sometimes we expect to print the value of an array. For example: SDVO command, In such case the following four DRM debug macro definitions are added: DRM_LOG(fmt, args...) DRM_LOG_DRIVER(fmt, args...) DRM_LOG_KMS(fmt, args...) DRM_LOG_MODE(fmt, args...) Signed-off-by: Zhao Yakui Signed-off-by: Dave Airlie commit 54ff328b46e58568c4b3350c2fa3223ef862e5a4 Author: Paul Mundt Date: Thu Jun 11 10:33:09 2009 +0300 sh: Tie sparseirq in to Kconfig. Now that the dependent patches are merged, we are ready to enable sparseirq support. This simply adds the Kconfig option, and then converts from the _cpu to the _node allocation routines to follow the upstream sparseirq API changes. Signed-off-by: Paul Mundt commit 6a1555fdde407dad23b8a119cf5feeb7c6466de9 Author: Paul Mundt Date: Thu Jun 11 09:38:05 2009 +0300 sh: Wire up sys_rt_tgsigqueueinfo. Signed-off-by: Paul Mundt commit 75c936aec050113c12f74581f51779ffc5502a51 Author: Paul Mundt Date: Thu Jun 11 09:33:53 2009 +0300 sh: Fix sys_pwritev() syscall table entry for sh32. There was a typo here that had this as sys_writev() instead of sys_pwritev(), fix this up. sh64 got this right, as did the preadv() case. Signed-off-by: Paul Mundt commit 4c7c99788631bab177bd51e15e893be4689bb085 Author: Aoi Shinkai Date: Wed Jun 10 16:15:42 2009 +0000 sh: Fix sh4a llsc-based cmpxchg() This fixes up a typo in the ll/sc based cmpxchg code which apparently wasn't getting a lot of testing due to the swapped old/new pair. With that fixed up, the ll/sc code also starts using it and provides its own atomic_add_unless(). Signed-off-by: Aoi Shinkai Signed-off-by: Paul Mundt commit f168dd00a9440a6f644db73bda47718fd12008e4 Author: Kuninori Morimoto Date: Wed Jun 10 05:04:32 2009 +0000 sh: sh7724: Add JPU support Signed-off-by: Kuninori Morimoto Acked-by: Magnus Damm Signed-off-by: Paul Mundt commit c5eeff1f8ecbc4bc7c1dd8e97a8610bc4dd3def8 Author: Kuninori Morimoto Date: Mon Jun 8 10:05:12 2009 +0000 sh: sh7724: INTC setting update This patch follows Rev 0.50 manual Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt commit df4f7fe7bd516b3833e25c692c3970e22038a6ca Author: Dave Airlie Date: Thu Jun 11 16:16:10 2009 +1000 radeon: remove _DRM_DRIVER from the preadded sarea map This shouldn't be there and is what broke r600 late in the 2.6.30 release cycle with Ben's patch. Signed-off-by: Dave Airlie commit 2ff2e8a3e1898e692b604424c384f134009dea80 Author: Ben Skeggs Date: Tue May 26 10:35:52 2009 +1000 drm: don't associate _DRM_DRIVER maps with a master A driver will use the _DRM_DRIVER map flag to indicate that it wants to be responsible for removing the map itself, bypassing the DRM's automagic cleanup code. Since the multi-master changes this has been broken, resulting in some drivers having their registers unmapped before it's finished with them. Signed-off-by: Ben Skeggs Signed-off-by: Dave Airlie commit 46e9371c0eaade8391b3969431a72272b9007158 Author: Magnus Damm Date: Thu Jun 4 07:37:59 2009 +0000 sh: sh7722 clock framework rewrite This patch rewrites the sh7722 clock framework code. The new code makes use of the recently merged div4, div6 and mstp32 helper code. Both extal and dll are supported as input clocks to the pll. While at it, now when all SuperH Mobile processors are converted, fix CONFIG_SH_CLK_CPG_LEGACY to depend on CONFIG_ARCH_SHMOBILE. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 4ed37394842e5f9c0c4ea087e8716d4458d03bfb Author: Magnus Damm Date: Thu Jun 4 07:35:25 2009 +0000 sh: sh7366 clock framework rewrite This patch rewrites the sh7366 clock framework code. The new code makes use of the recently merged div4, div6 and mstp32 helper code. Both extal and dll are supported as input clocks to the pll. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit bc49b6eaac6eff86f902a36d846c310e1e0beedf Author: Magnus Damm Date: Thu Jun 4 07:32:11 2009 +0000 sh: sh7343 clock framework rewrite This patch rewrites the sh7343 clock framework code. The new code makes use of the recently merged div4, div6 and mstp32 helper code. Both extal and dll are supported as input clocks to the pll. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit b621370a3505f8bd42acc41736cae47d5ce8bd06 Author: Magnus Damm Date: Wed Jun 10 11:31:16 2009 +0000 sh: sh7724 clock framework rewrite V3 This patch contains V3 of the sh7724 clock framework rewrite. The new code makes use of the recently merged div4, div6 and mstp32 helper code. Both extal and fll are supported as input clocks to the pll. The div6 clocks are fed through a divide-by-3 block. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit c521dc02034df3681394a30b428bf081cfa22253 Author: Magnus Damm Date: Wed Jun 3 08:39:59 2009 +0000 sh: sh7723 clock framework rewrite V2 This patch contains V2 of the sh7723 clock framework rewrite. The new code makes use of the recently merged div4, div6 and mstp32 helper code. Both extal and dll are supported as input clocks to the pll. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 098dee99d14e8324d3793df442d6078d0c134140 Author: Magnus Damm Date: Thu Jun 4 05:31:41 2009 +0000 sh: add enable()/disable()/set_rate() to div6 code This patch updates the div6 clock helper code to add support for enable(), disable() and set_rate() callbacks. Needed by the camera clock enabling board code on Migo-R. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit b798b1fe3b6436275ad1b517a6823d55e3b75c22 Author: Robert P. J. Day Date: Wed Jun 10 12:43:49 2009 -0700 drm: simplify kcalloc() call to kzalloc(). Calls to kcalloc() for a single element can be simplified to calls to kzalloc(). Signed-off-by: Robert P. J. Day Cc: Dave Airlie Cc: Eric Anholt Signed-off-by: Andrew Morton Signed-off-by: Dave Airlie commit 1bcbf3948876e31a8ece28597dec447611ad9c8b Author: Pavel Roskin Date: Wed Jun 10 12:43:48 2009 -0700 intelfb: fix spelling of "CLOCK" Signed-off-by: Pavel Roskin Cc: Eric Anholt Cc: Dave Airlie Signed-off-by: Andrew Morton Signed-off-by: Dave Airlie commit dcae3626d031fe6296b1e96a16f986193a41f840 Author: Roel Kluin Date: Wed Jun 10 12:43:48 2009 -0700 drm: fix LOCK_TEST_WITH_RETURN macro When this macro isn't called with 'file_priv' this will result in a build failure. Signed-off-by: Roel Kluin Signed-off-by: Andrew Morton Signed-off-by: Dave Airlie commit c01641b42a88c475fd4b72cff2b10e42262a80fe Author: Magnus Damm Date: Wed Jun 3 08:26:40 2009 +0000 sh: add AP325RXA mode pin configuration This patch adds mode pin configuration to ap325rxa. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 0ec80fddf1674579d52b5ff94774ba73107cad31 Author: Magnus Damm Date: Wed Jun 3 08:22:50 2009 +0000 sh: add Migo-R mode pin configuration This patch adds mode pin configuration and a machvec structure to Migo-R. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit ed740cb9b7f6eaee7bb45a07ce53ff9e73a92798 Author: Magnus Damm Date: Wed Jun 3 08:18:56 2009 +0000 sh: sh7722 mode pin definitions This patch adds sh7722 mode pin and pin function controller comments. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 36e5b26bdac0ee3791071d240334853ddd7b9790 Author: Magnus Damm Date: Tue Jun 2 10:47:32 2009 +0000 sh: sh7724 mode pin comments This patch adds comments for the sh7724 mode pins and pin function controller. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit e4218ef506a2f8b0b5bf1a4b6effcc2f8983f86b Author: Magnus Damm Date: Tue Jun 2 09:45:16 2009 +0000 sh: sh7723 mode pin V2 This patch is sh7723 mode pin V2. Mode pins and pin function controller comments are added. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 0d4fdbb64f472ef31195714993f1263f77cf85ca Author: Magnus Damm Date: Tue Jun 2 09:22:02 2009 +0000 sh: rework mode pin code This patch reworks the mode pin code to keep the pin definitions in one place. The mode pins values are now the value of the bit instead of bit number. With this patch in place the sh7785 header file contains mode pin comments. The sh7785 clock code and the sh7785lcr board code are updated to reflect the new shared mode pins. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 2693e2740ddae364a80e6083043ba760b6366b69 Author: Magnus Damm Date: Tue Jun 2 08:53:54 2009 +0000 sh: clock div6 helper code This patch adds div6 clock helper code. The div6 clocks are simply 6-bit divide-by-n modules where n is 1 to 64. Needed for vclk on sh7722, sh7723, sh7343 and sh7366. sh7724 needs this even more for vclk, fclka, fclkb, irdaclk and spuclk. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit a50de78dc6d21ee074e9561c800d194bec12128b Author: Magnus Damm Date: Tue Jun 2 08:43:59 2009 +0000 sh: clock div4 frequency table offset fix This patch fixes the per clock offset calculation in sh_clk_div4_register(). Without this patch the offset to the frequency table for each clock is incorrect. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit cf9fe114e3b37e14fc8434d5abb192e35df551b1 Merge: c1d0d32 991ec02 Author: Paul Mundt Date: Thu Jun 11 09:01:14 2009 +0300 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 commit 193e98401a89707ea374e9c32c1b9a5a9dd87a48 Author: Greg Ungerer Date: Thu Apr 23 11:24:03 2009 +1000 m68knommu: remove unecessary include of thread_info.h in entry.S Signed-off-by: Greg Ungerer commit 9d4f94135385b565e2ce4a37f71b53d0fd3664e8 Author: Greg Ungerer Date: Thu Jun 11 13:05:00 2009 +1000 m68knommu: enumerate INIT_THREAD fields properly Use proper field value setting init INIT_THREAD macro. Fixes this: arch/m68knommu/kernel/init_task.c:27: warning: excess elements in array initializer arch/m68knommu/kernel/init_task.c:27: warning: (near initialization for ‘init_task.thread.fpstate’) Signed-off-by: Greg Ungerer commit 4f308e35a9bde9d6b671e8409157edb9065f117c Author: Jaswinder Singh Rajput Date: Wed Jun 10 18:47:47 2009 +0530 headers_check fix: m68k, swab.h fix the following 'make headers_check' warnings: usr/include/asm-m68k/swab.h:4: include of is preferred over usr/include/asm-m68k/swab.h:10: found __[us]{8,16,32,64} type without #include Signed-off-by: Jaswinder Singh Rajput Signed-off-by: Greg Ungerer commit 308e610e8c435d7875842b427dbc99de43a4aec9 Author: Joe Perches Date: Fri May 15 10:59:37 2009 -0700 arch/m68knommu: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug( Signed-off-by: Joe Perches Signed-off-by: Greg Ungerer commit fb29ad7949aeed3d464ba8d2c9772835f456d4c4 Author: Greg Ungerer Date: Fri May 1 16:09:17 2009 +1000 m68knommu: remove obsolete reset code All ColdFire and non-MMU 68k code has custom reset routines. Remove the obsolete and now un-used reset macros. Signed-off-by: Greg Ungerer commit 05728aec8b05ec3fa859add8b22ba46432611e9e Author: Greg Ungerer Date: Thu Apr 30 23:32:52 2009 +1000 m68knommu: move CPU reset code for the 5272 ColdFire into its platform code Signed-off-by: Greg Ungerer commit dd65b1de553ddfd85e8fea9d3aa9db7479ccf2aa Author: Greg Ungerer Date: Thu Apr 30 23:15:56 2009 +1000 m68knommu: move CPU reset code for the 528x ColdFire into its platform code Signed-off-by: Greg Ungerer commit 4c0b008d49e728735f54419e60446480017bfe1b Author: Greg Ungerer Date: Thu Apr 30 23:06:45 2009 +1000 m68knommu: move CPU reset code for the 527x ColdFire into its platform code Signed-off-by: Greg Ungerer commit 55b33f316d25c1ffb13a65de7f846b950b5ef5a6 Author: Greg Ungerer Date: Thu Apr 30 22:58:35 2009 +1000 m68knommu: move CPU reset code for the 523x ColdFire into its platform code Signed-off-by: Greg Ungerer commit 25ce4a908abebf8c7d2e89908d36050e1de9cbec Author: Greg Ungerer Date: Thu Apr 30 22:39:50 2009 +1000 m68knommu: move CPU reset code for the 520x ColdFire into its platform code Signed-off-by: Greg Ungerer commit 384feb91319766298c6358f23f54873d44c9d8cb Author: Greg Ungerer Date: Thu Apr 30 22:03:43 2009 +1000 m68knommu: add CPU reset code for the 532x ColdFire Signed-off-by: Greg Ungerer commit 6f5aa7ce38dfb9c04eecac1222fc4b2521f02b83 Author: Greg Ungerer Date: Thu Apr 30 17:31:19 2009 +1000 m68knommu: add CPU reset code for the 5249 ColdFire Signed-off-by: Greg Ungerer commit b61a7260ff70d10ca27edcc74535af0d46a277fa Author: Greg Ungerer Date: Thu Apr 30 17:22:56 2009 +1000 m68knommu: add CPU reset code for the 5206e ColdFire Signed-off-by: Greg Ungerer commit 851377bca613175473b6dafd6c7d1bfbcf24efe2 Author: Greg Ungerer Date: Thu Apr 30 17:22:05 2009 +1000 m68knommu: add CPU reset code for the 5206 ColdFire Signed-off-by: Greg Ungerer commit eb7c874d5c81dae6d7b80857e9f0dab1a5d05ebd Author: Greg Ungerer Date: Thu Apr 30 17:15:18 2009 +1000 m68knommu: add CPU reset code for the 5407 ColdFire Signed-off-by: Greg Ungerer commit c18e52c7696e39c7cb23cd083bbda5652c338b79 Author: Greg Ungerer Date: Thu Apr 30 17:03:09 2009 +1000 m68knommu: add CPU reset code for the 5307 ColdFire Signed-off-by: Greg Ungerer commit 293ca0f75415dd8373c716bf9755569daca7ba5d Author: Greg Ungerer Date: Tue Apr 28 16:56:03 2009 +1000 m68knommu: merge system reset for code ColdFire 523x family The sofwtare reset control code for the 523x ColdFire family uses the same Reset unit hardware as the 527x and 528x ColdFire parts. So they should all use the same code. Merge them. Signed-off-by: Greg Ungerer commit 7f72b47cedd1efc301576ff1050ec0a26c57eb48 Author: Greg Ungerer Date: Tue Apr 28 14:13:21 2009 +1000 m68knommu: fix system reset for ColdFire 527x family The sofwtare reset control for the 527x ColdFire family is based on the same Reset Control Unit as the 528x ColdFire family. So use the same reset code for both. Signed-off-by: Greg Ungerer commit 991ec02cdca33b03a132a0cacfe6f0aa0be9aa8d Merge: 8623661 84047e3 Author: Linus Torvalds Date: Wed Jun 10 19:58:10 2009 -0700 Merge branch 'tracing-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'tracing-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: function-graph: always initialize task ret_stack function-graph: move initialization of new tasks up in fork function-graph: add memory barriers for accessing task's ret_stack function-graph: enable the stack after initialization of other variables function-graph: only allocate init tasks if it was not already done Manually fix trivial conflict in kernel/trace/ftrace.c commit 862366118026a358882eefc70238dbcc3db37aac Merge: 57eee9a 511b01b Author: Linus Torvalds Date: Wed Jun 10 19:53:40 2009 -0700 Merge branch 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (244 commits) Revert "x86, bts: reenable ptrace branch trace support" tracing: do not translate event helper macros in print format ftrace/documentation: fix typo in function grapher name tracing/events: convert block trace points to TRACE_EVENT(), fix !CONFIG_BLOCK tracing: add protection around module events unload tracing: add trace_seq_vprint interface tracing: fix the block trace points print size tracing/events: convert block trace points to TRACE_EVENT() ring-buffer: fix ret in rb_add_time_stamp ring-buffer: pass in lockdep class key for reader_lock tracing: add annotation to what type of stack trace is recorded tracing: fix multiple use of __print_flags and __print_symbolic tracing/events: fix output format of user stack tracing/events: fix output format of kernel stack tracing/trace_stack: fix the number of entries in the header ring-buffer: discard timestamps that are at the start of the buffer ring-buffer: try to discard unneeded timestamps ring-buffer: fix bug in ring_buffer_discard_commit ftrace: do not profile functions when disabled tracing: make trace pipe recognize latency format flag ... commit 57eee9ae7bbcfb692dc96c739a5184adb6349733 Merge: 8f40642 7e4e0bd Author: Linus Torvalds Date: Wed Jun 10 19:51:10 2009 -0700 Merge branch 'oprofile-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'oprofile-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: oprofile: introduce module_param oprofile.cpu_type oprofile: add support for Core i7 and Atom oprofile: remove undocumented oprofile.p4force option oprofile: re-add force_arch_perfmon option commit 8f40642ad315c553bab4ae800766ade07e574a77 Merge: 20f3f3c 12d1611 Author: Linus Torvalds Date: Wed Jun 10 19:50:52 2009 -0700 Merge branch 'signal-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'signal-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: hookup sys_rt_tgsigqueueinfo signals: implement sys_rt_tgsigqueueinfo signals: split do_tkill commit 20f3f3ca499d2c211771ba552685398b65d83859 Merge: 769f3e8 41c51c9 Author: Linus Torvalds Date: Wed Jun 10 19:50:03 2009 -0700 Merge branch 'rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: rcu: rcu_sched_grace_period(): kill the bogus flush_signals() rculist: use list_entry_rcu in places where it's appropriate rculist.h: introduce list_entry_rcu() and list_first_entry_rcu() rcu: Update RCU tracing documentation for __rcu_pending rcu: Add __rcu_pending tracing to hierarchical RCU RCU: make treercu be default commit 73fbad283cfbbcf02939bdbda31fc4a30e729cca Merge: 769f3e8 35f2c2f Author: James Morris Date: Thu Jun 11 11:03:14 2009 +1000 Merge branch 'next' into for-linus commit 955f2d966534803ec32411086a1698170f17f962 Author: Daniel Mack Date: Wed Jun 10 21:32:01 2009 +0200 ALSA: snd_usb_caiaq: set mixername alsamixer and friends want the mixername to be set. Even though the driver does not exports a real mixer device, export the name doesn't harm. Signed-off-by: Daniel Mack Signed-off-by: Takashi Iwai commit 9e350de37ac9607012fcf9c5314a28fbddf8f43c Author: Peter Zijlstra Date: Wed Jun 10 21:34:59 2009 +0200 perf_counter: Accurate period data We currently log hw.sample_period for PERF_SAMPLE_PERIOD, however this is incorrect. When we adjust the period, it will only take effect the next cycle but report it for the current cycle. So when we adjust the period for every cycle, we're always wrong. Solve this by keeping track of the last_period. Signed-off-by: Peter Zijlstra Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit df1a132bf3d3508f863336c80a27806a2ac947e0 Author: Peter Zijlstra Date: Wed Jun 10 21:02:22 2009 +0200 perf_counter: Introduce struct for sample data For easy extension of the sample data, put it in a structure. Signed-off-by: Peter Zijlstra Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit ea1900e571d40a3ce60c835c2f21e1fd8c5cb663 Author: Peter Zijlstra Date: Wed Jun 10 21:45:22 2009 +0200 perf_counter tools: Normalize data using per sample period data When we use variable period sampling, add the period to the sample data and use that to normalize the samples. Signed-off-by: Peter Zijlstra Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 66fff22483d8542dfb4d61a28d21277bbde321e8 Author: Peter Zijlstra Date: Wed Jun 10 22:53:37 2009 +0200 perf_counter: Annotate exit ctx recursion Ever since Paul fixed it to unclone the context before taking the ctx->lock this became a false positive, annotate it away. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit fd0fb038d5a308c7faddd1701be5e70aaffec98b Author: Shin Hong Date: Wed Jun 10 20:11:29 2009 -0400 Btrfs: init worker struct fields before kthread-run This patch fixes a bug which may result race condition between btrfs_start_workers() and worker_loop(). btrfs_start_workers() executed in a parent thread writes on workers->worker and worker_loop() in a child thread reads workers->worker. However, there is no synchronization enforcing the order of two operations. This patch makes btrfs_start_workers() fill workers->worker before it starts a child thread with worker_loop() Signed-off-by: Chris Mason commit 769f3e8c384795cc350e2aae27de2a12374d19d4 Merge: c0d2545 0c8b946 Author: Linus Torvalds Date: Wed Jun 10 16:21:16 2009 -0700 Merge branch 'printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: vsprintf: introduce %pf format specifier printk: add support of hh length modifier for printk commit c0d254504fdaeb0878b8415295e365ebb78684f8 Merge: e7241d7 e1b9aa3 Author: Linus Torvalds Date: Wed Jun 10 16:20:30 2009 -0700 Merge branch 'percpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'percpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: percpu: remove rbtree and use page->index instead percpu: don't put the first chunk in reverse-map rbtree commit e7241d771419b8a8671ebc46a043c324ccb0dcf7 Merge: 3f6280d 04dce7d Author: Linus Torvalds Date: Wed Jun 10 16:19:40 2009 -0700 Merge branch 'locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: spinlock: Add missing __raw_spin_lock_flags() stub for UP mutex: add atomic_dec_and_mutex_lock(), fix locking, rtmutex.c: Documentation cleanup mutex: add atomic_dec_and_mutex_lock() commit 3f6280ddf25fa656d0e17960588e52bee48a7547 Merge: 7506360 92db1e6 Author: Linus Torvalds Date: Wed Jun 10 16:19:14 2009 -0700 Merge branch 'iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (61 commits) amd-iommu: remove unnecessary "AMD IOMMU: " prefix amd-iommu: detach device explicitly before attaching it to a new domain amd-iommu: remove BUS_NOTIFY_BOUND_DRIVER handling dma-debug: simplify logic in driver_filter() dma-debug: disable/enable irqs only once in device_dma_allocations dma-debug: use pr_* instead of printk(KERN_* ...) dma-debug: code style fixes dma-debug: comment style fixes dma-debug: change hash_bucket_find from first-fit to best-fit x86: enable GART-IOMMU only after setting up protection methods amd_iommu: fix lock imbalance dma-debug: add documentation for the driver filter dma-debug: add dma_debug_driver kernel command line dma-debug: add debugfs file for driver filter dma-debug: add variables and checks for driver filter dma-debug: fix debug_dma_sync_sg_for_cpu and debug_dma_sync_sg_for_device dma-debug: use sg_dma_len accessor dma-debug: use sg_dma_address accessor instead of using dma_address directly amd-iommu: don't free dma adresses below 512MB with CONFIG_IOMMU_STRESS amd-iommu: don't preallocate page tables with CONFIG_IOMMU_STRESS ... commit 75063600fd7b27fe447112c27997f100b9e2f99b Merge: be15f9d 2070887 Author: Linus Torvalds Date: Wed Jun 10 16:16:48 2009 -0700 Merge branch 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: futex: fix restart in wait_requeue_pi futex: fix restart for early wakeup in futex_wait_requeue_pi() futex: cleanup error exit futex: remove the wait queue futex: add requeue-pi documentation futex: remove FUTEX_REQUEUE_PI (non CMP) futex: fix futex_wait_setup key handling sparc64: extend TI_RESTART_BLOCK space by 8 bytes futex: fixup unlocked requeue pi case futex: add requeue_pi functionality futex: split out futex value validation code futex: distangle futex_requeue() futex: add FUTEX_HAS_TIMEOUT flag to restart.futex.flags rt_mutex: add proxy lock routines futex: split out fixup owner logic from futex_lock_pi() futex: split out atomic logic from futex_lock_pi() futex: add helper to find the top prio waiter of a futex futex: separate futex_wait_queue_me() logic from futex_wait() commit be15f9d63b97da0065187696962331de6cd9de9e Merge: 595dc54 a789ed5 Author: Linus Torvalds Date: Wed Jun 10 16:16:27 2009 -0700 Merge branch 'x86-xen-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-xen-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (42 commits) xen: cache cr0 value to avoid trap'n'emulate for read_cr0 xen/x86-64: clean up warnings about IST-using traps xen/x86-64: fix breakpoints and hardware watchpoints xen: reserve Xen start_info rather than e820 reserving xen: add FIX_TEXT_POKE to fixmap lguest: update lazy mmu changes to match lguest's use of kvm hypercalls xen: honour VCPU availability on boot xen: add "capabilities" file xen: drop kexec bits from /sys/hypervisor since kexec isn't implemented yet xen/sys/hypervisor: change writable_pt to features xen: add /sys/hypervisor support xen/xenbus: export xenbus_dev_changed xen: use device model for suspending xenbus devices xen: remove suspend_cancel hook xen/dev-evtchn: clean up locking in evtchn xen: export ioctl headers to userspace xen: add /dev/xen/evtchn driver xen: add irq_from_evtchn xen: clean up gate trap/interrupt constants xen: set _PAGE_NX in __supported_pte_mask before pagetable construction ... commit 595dc54a1da91408a52c4b962f3deeb1109aaca0 Merge: 9b29e82 7d96fd4 Author: Linus Torvalds Date: Wed Jun 10 16:15:59 2009 -0700 Merge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: move rdtsc_barrier() into the TSC vread method commit 9b29e8228a5c2a169436a1a90a60b1f88cb35cd1 Merge: bec7068 0b8c3d5 Author: Linus Torvalds Date: Wed Jun 10 16:15:14 2009 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Clear TS in irq_ts_save() when in an atomic section x86: Detect use of extended APIC ID for AMD CPUs x86: memtest: remove 64-bit division x86, UV: Fix macros for multiple coherency domains x86: Fix non-lazy GS handling in sys_vm86() x86: Add quirk for reboot stalls on a Dell Optiplex 360 x86: Fix UV BAU activation descriptor init commit bec706838ec2f9c8c2b99e88a1270d7cba159b06 Merge: bb77629 ee07366 Author: Linus Torvalds Date: Wed Jun 10 16:14:41 2009 -0700 Merge branch 'x86-setup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-setup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, setup: fix comment in the "glove box" code x86, setup: "glove box" BIOS interrupts in the video code x86, setup: "glove box" BIOS interrupts in the MCA code x86, setup: "glove box" BIOS interrupts in the EDD code x86, setup: "glove box" BIOS interrupts in the APM code x86, setup: "glove box" BIOS interrupts in the core boot code x86, setup: "glove box" BIOS calls -- infrastructure commit bb7762961d3ce745688e9050e914c1d3f980268d Merge: 48c72d1 35d5a9a Author: Linus Torvalds Date: Wed Jun 10 16:13:20 2009 -0700 Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (22 commits) x86: fix system without memory on node0 x86, mm: Fix node_possible_map logic mm, x86: remove MEMORY_HOTPLUG_RESERVE related code x86: make sparse mem work in non-NUMA mode x86: process.c, remove useless headers x86: merge process.c a bit x86: use sparse_memory_present_with_active_regions() on UMA x86: unify 64-bit UMA and NUMA paging_init() x86: Allow 1MB of slack between the e820 map and SRAT, not 4GB x86: Sanity check the e820 against the SRAT table using e820 map only x86: clean up and and print out initial max_pfn_mapped x86/pci: remove rounding quirk from e820_setup_gap() x86, e820, pci: reserve extra free space near end of RAM x86: fix typo in address space documentation x86: 46 bit physical address support on 64 bits x86, mm: fault.c, use printk_once() in is_errata93() x86: move per-cpu mmu_gathers to mm/init.c x86: move max_pfn_mapped and max_low_pfn_mapped to setup.c x86: unify noexec handling x86: remove (null) in /sys kernel_page_tables ... commit 48c72d1ab4ec86789a23aed0b0b5f31ac083c0c6 Merge: 5301e0d aeef50b Author: Linus Torvalds Date: Wed Jun 10 16:13:06 2009 -0700 Merge branch 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, microcode: Simplify vfree() use x86: microcode: use smp_call_function_single instead of set_cpus_allowed, cleanup of synchronization logic commit 5301e0de34a29625c06b8eef115c1a9b4c1f72b1 Merge: c44e3ed 4ecf458 Author: Linus Torvalds Date: Wed Jun 10 15:55:04 2009 -0700 Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86_64: fix incorrect comments x86: unify restore_fpu_checking x86_32: introduce restore_fpu_checking() commit c44e3ed539e4fc17d6bcb5eaecb894a94de4cc5f Merge: 7dc3ca3 5095f59 Author: Linus Torvalds Date: Wed Jun 10 15:51:15 2009 -0700 Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: cpu_debug: Remove model information to reduce encoding-decoding x86: fixup numa_node information for AMD CPU northbridge functions x86: k8 convert node_to_k8_nb_misc() from a macro to an inline function x86: cacheinfo: complete L2/L3 Cache and TLB associativity field definitions x86/docs: add description for cache_disable sysfs interface x86: cacheinfo: disable L3 ECC scrubbing when L3 cache index is disabled x86: cacheinfo: replace sysfs interface for cache_disable feature x86: cacheinfo: use cached K8 NB_MISC devices instead of scanning for it x86: cacheinfo: correct return value when cache_disable feature is not active x86: cacheinfo: use L3 cache index disable feature only for CPUs that support it commit 7dc3ca39cb1e22eedbf1207ff9ac7bf682fc0f6d Merge: aa98936 a4046f8 Author: Linus Torvalds Date: Wed Jun 10 15:49:36 2009 -0700 Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, nmi: Use predefined numbers instead of hardcoded one x86: asm/processor.h: remove double declaration x86, mtrr: replace MTRRdefType_MSR with msr-index's MSR_MTRRdefType x86, mtrr: replace MTRRfix4K_C0000_MSR with msr-index's MSR_MTRRfix4K_C0000 x86, mtrr: remove mtrr MSRs double declaration x86, mtrr: replace MTRRfix16K_80000_MSR with msr-index's MSR_MTRRfix16K_80000 x86, mtrr: replace MTRRfix64K_00000_MSR with msr-index's MSR_MTRRfix64K_00000 x86, mtrr: replace MTRRcap_MSR with msr-index's MSR_MTRRcap x86: mce: remove duplicated #include x86: msr-index.h remove duplicate MSR C001_0015 declaration x86: clean up arch/x86/kernel/tsc_sync.c a bit x86: use symbolic name for VM86_SIGNAL when used as vm86 default return x86: added 'ifndef _ASM_X86_IOMAP_H' to iomap.h x86: avoid multiple declaration of kstack_depth_to_print x86: vdso/vma.c declare vdso_enabled and arch_setup_additional_pages before they get used x86: clean up declarations and variables x86: apic/x2apic_cluster.c x86_cpu_to_logical_apicid should be static x86 early quirks: eliminate unused function commit aa98936e4f423dc2706771368598b04870059d14 Merge: 082b63a 0c23590 Author: Linus Torvalds Date: Wed Jun 10 15:49:10 2009 -0700 Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, 64-bit: ifdef out struct thread_struct::ip x86, 32-bit: ifdef out struct thread_struct::fs x86: clean up alternative.h commit 082b63ae45e7d14e15995dedd782ec7344596fb2 Merge: 99e97b8 50fa610 Author: Linus Torvalds Date: Wed Jun 10 15:48:53 2009 -0700 Merge branch 'sched-docs-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-docs-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: Document memory barriers implied by sleep/wake-up primitives commit 99e97b860e14c64760855198e91d1166697131a7 Merge: 82782ca f04d82b Author: Linus Torvalds Date: Wed Jun 10 15:32:59 2009 -0700 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: fix typo in sched-rt-group.txt file ftrace: fix typo about map of kernel priority in ftrace.txt file. sched: properly define the sched_group::cpumask and sched_domain::span fields sched, timers: cleanup avenrun users sched, timers: move calc_load() to scheduler sched: Don't export sched_mc_power_savings on multi-socket single core system sched: emit thread info flags with stack trace sched: rt: document the risk of small values in the bandwidth settings sched: Replace first_cpu() with cpumask_first() in ILB nomination code sched: remove extra call overhead for schedule() sched: use group_first_cpu() instead of cpumask_first(sched_group_cpus()) wait: don't use __wake_up_common() sched: Nominate a power-efficient ilb in select_nohz_balancer() sched: Nominate idle load balancer from a semi-idle package. sched: remove redundant hierarchy walk in check_preempt_wakeup commit 511b01bdf64ad8a38414096eab283c7784aebfc4 Author: Ingo Molnar Date: Thu Jun 11 00:32:00 2009 +0200 Revert "x86, bts: reenable ptrace branch trace support" This reverts commit 7e0bfad24d85de7cf2202a7b0ce51de11a077b21. A late objection to the ABI has arrived: http://lkml.org/lkml/2009/6/10/253 Keep the ABI disabled out of caution, to not create premature user-space expectations. While the hw-branch-tracing variant uses and tests the BTS code. Cc: Peter Zijlstra Cc: Markus Metzger Cc: Oleg Nesterov Signed-off-by: Ingo Molnar commit 82782ca77d1bfb32b0334cce40a25b91bd8ec016 Merge: f0d5e12 6799687 Author: Linus Torvalds Date: Wed Jun 10 15:30:41 2009 -0700 Merge branch 'x86-kbuild-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-kbuild-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (46 commits) x86, boot: add new generated files to the appropriate .gitignore files x86, boot: correct the calculation of ZO_INIT_SIZE x86-64: align __PHYSICAL_START, remove __KERNEL_ALIGN x86, boot: correct sanity checks in boot/compressed/misc.c x86: add extension fields for bootloader type and version x86, defconfig: update kernel position parameters x86, defconfig: update to current, no material changes x86: make CONFIG_RELOCATABLE the default x86: default CONFIG_PHYSICAL_START and CONFIG_PHYSICAL_ALIGN to 16 MB x86: document new bzImage fields x86, boot: make kernel_alignment adjustable; new bzImage fields x86, boot: remove dead code from boot/compressed/head_*.S x86, boot: use LOAD_PHYSICAL_ADDR on 64 bits x86, boot: make symbols from the main vmlinux available x86, boot: determine compressed code offset at compile time x86, boot: use appropriate rep string for move and clear x86, boot: zero EFLAGS on 32 bits x86, boot: set up the decompression stack as early as possible x86, boot: straighten out ranges to copy/zero in compressed/head*.S x86, boot: stylistic cleanups for boot/compressed/head_64.S ... Fixed trivial conflict in arch/x86/configs/x86_64_defconfig manually commit f0d5e12bd42b7173ebbbf59279c867605f859814 Merge: 0fea615 103428e Author: Linus Torvalds Date: Wed Jun 10 15:25:41 2009 -0700 Merge branch 'irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (76 commits) x86, apic: Fix dummy apic read operation together with broken MP handling x86, apic: Restore irqs on fail paths x86: Print real IOAPIC version for x86-64 x86: enable_update_mptable should be a macro sparseirq: Allow early irq_desc allocation x86, io-apic: Don't mark pin_programmed early x86, irq: don't call mp_config_acpi_gsi() if update_mptable is not enabled x86, irq: update_mptable needs pci_routeirq x86: don't call read_apic_id if !cpu_has_apic x86, apic: introduce io_apic_irq_attr x86/pci: add 4 more return parameters to IO_APIC_get_PCI_irq_vector(), fix x86: read apic ID in the !acpi_lapic case x86: apic: Fixmap apic address even if apic disabled x86: display extended apic registers with print_local_APIC and cpu_debug code x86: read apic ID in the !acpi_lapic case x86: clean up and fix setup_clear/force_cpu_cap handling x86: apic: Check rev 3 fadt correctly for physical_apic bit x86/pci: update pirq_enable_irq() to setup io apic routing x86/acpi: move setup io apic routing out of CONFIG_ACPI scope x86/pci: add 4 more return parameters to IO_APIC_get_PCI_irq_vector() ... commit 0fea615e526b4b7eff0363ee02d5753e5f924089 Author: Harald Welte Date: Mon Jun 8 18:29:36 2009 +0800 CPUFREQ: Mark e_powersaver driver as EXPERIMENTAL and DANGEROUS The e_powersaver driver for VIA's C7 CPU's needs to be marked as DANGEROUS as it configures the CPU to power states that are out of specification. According to Centaur, all systems with C7 and Nano CPU's support the ACPI p-state method. Thus, the acpi-cpufreq driver should be used instead. Signed-off-by: Harald Welte Signed-off-by: Linus Torvalds commit 0de51088e6a82bc8413d3ca9e28bbca2788b5b53 Author: Harald Welte Date: Mon Jun 8 18:27:54 2009 +0800 CPUFREQ: Enable acpi-cpufreq driver for VIA/Centaur CPUs The VIA/Centaur C7, C7-M and Nano CPU's all support ACPI based cpu p-states using a MSR interface. The Linux driver just never made use of it, since in addition to the check for the EST flag it also checked if the vendor is Intel. Signed-off-by: Harald Welte [ Removed the vendor checks entirely - Linus ] Signed-off-by: Linus Torvalds commit 4e73e0eb633f8a1b5cbf20e7f42c6dbfec1d1ca7 Merge: 4156e73 07a2039 Author: Felix Blyakher Date: Wed Jun 10 17:07:47 2009 -0500 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 commit 5e50b9ef975219304cc91d601530994861585bfe Author: Ondrej Zary Date: Wed Jun 10 12:57:09 2009 -0700 floppy: fix hibernation Based on Ingo Molnar's patch from 2006, this makes the floppy work after resume from hibernation, at least on my machine. This fix resets the floppy controller on resume. It was experimentally determined to bring the controller back to life - we don't really know why it works. floppy_init() does the same thing at boot/modprobe time. Signed-off-by: Ondrej Zary Cc: "Rafael J. Wysocki" Cc: Ingo Molnar Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit 1adbee50fd6fce5af4feb34d2db93cfe4d2066a4 Author: Robert P. J. Day Date: Wed Jun 10 12:57:08 2009 -0700 ramdisk: remove long-deprecated "ramdisk=" boot-time parameter The "ramdisk" parameter was removed from the defunct rd.c file quite some time ago, in favour of the more specific "ramdisk_size" parameter so, for consistency, the same should be done here. Signed-off-by: Robert P. J. Day Acked-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit 0e0c62123b517d2b3c26922342c0cc5bb63a93f8 Author: Michal Simek Date: Wed Jun 10 12:57:07 2009 -0700 fs/bio.c: add missing __user annotation As reported by sparse: fs/bio.c:720:13: warning: incorrect type in assignment (different address spaces) fs/bio.c:720:13: expected char *iov_addr fs/bio.c:720:13: got void [noderef] * fs/bio.c:724:36: warning: incorrect type in argument 2 (different address spaces) fs/bio.c:724:36: expected void const [noderef] *from fs/bio.c:724:36: got char *iov_addr Signed-off-by: Michal Simek Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit d9c7d394a8ebacb60097b192939ae9f15235225e Author: Nikanth Karthikesan Date: Wed Jun 10 12:57:06 2009 -0700 block: prevent possible io_context->refcount overflow Currently io_context has an atomic_t(32-bit) as refcount. In the case of cfq, for each device against whcih a task does I/O, a reference to the io_context would be taken. And when there are multiple process sharing io_contexts(CLONE_IO) would also have a reference to the same io_context. Theoretically the possible maximum number of processes sharing the same io_context + the number of disks/cfq_data referring to the same io_context can overflow the 32-bit counter on a very high-end machine. Even though it is an improbable case, let us make it atomic_long_t. Signed-off-by: Nikanth Karthikesan Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit 4eedeb75e7f15ffdb12d1ad559b565e7505bdbaf Author: Hisashi Hifumi Date: Wed Jun 10 15:28:55 2009 -0400 Btrfs: pin buffers during write_dev_supers write_dev_supers is called in sequence. First is it called with wait == 0, which starts IO on all of the super blocks for a given device. Then it is called with wait == 1 to make sure they all reach the disk. It doesn't currently pin the buffers between the two calls, and it also assumes the buffers won't go away between the two calls, leading to an oops if the VM manages to free the buffers in the middle of the sync. This fixes that assumption and updates the code to return an error if things are not up to date when the wait == 1 run is done. Signed-off-by: Hisashi Hifumi Signed-off-by: Chris Mason commit e5e9a5206a171b2c467e494aebcdcf70c47289bc Author: Chris Mason Date: Wed Jun 10 15:17:02 2009 -0400 Btrfs: avoid races between super writeout and device list updates On multi-device filesystems, btrfs writes supers to all of the devices before considering a sync complete. There wasn't any additional locking between super writeout and the device list management code because device management was done inside a transaction and super writeout only happened with no transation writers running. With the btrfs fsync log and other async transaction updates, this has been racey for some time. This adds a mutex to protect the device list. The existing volume mutex could not be reused due to transaction lock ordering requirements. Signed-off-by: Chris Mason commit 61b6bc525a34931bb73e4c95bfe009cd9572a288 Author: Jeff Layton Date: Wed Jun 10 10:04:58 2009 -0400 cifs: remove never-used in6_addr option This option was never used to my knowledge. Remove it before someone does... Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 6ff9a64d2aaa6eae396adc95e9c91c0cbfa6dbe4 Author: Steven Rostedt Date: Wed Jun 10 14:28:34 2009 -0400 tracing: do not translate event helper macros in print format By moving the macro that creates the print format code above the defining of the event macro helpers (__get_str, __print_symbolic, and __get_dynamic_array), we get a little cleaner print format. Instead of: (char *)((void *)REC + REC->__data_loc_name) we get: __get_str(name) Instead of: ({ static const struct trace_print_flags symbols[] = { { HI_SOFTIRQ, "HI" }, { we get: __print_symbolic(REC->vec, { HI_SOFTIRQ, "HI" }, { Signed-off-by: Steven Rostedt commit a41f20716975910d9beb90b7efc61107901492b8 Author: Aneesh Kumar K.V Date: Wed Jun 10 14:22:55 2009 -0400 ext4: Avoid corrupting the uninitialized bit in the extent during truncate The unitialized bit was not properly getting preserved in in an extent which is partially truncated because the it was geting set to the value of the first extent to be removed or truncated as part of the truncate operation, and if there are multiple extents are getting removed or modified as part of the truncate operation, it is only the last extent which will might be partially truncated, and its uninitalized bit is not necessarily the same as the first extent to be truncated. Signed-off-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" commit a5c0f88678cd2fb1f649f7d366d756f2b2f97f0c Author: Simos Xenitellis Date: Wed Jun 10 16:33:31 2009 +0100 ALSA: hda - add quirk for STAC92xx (SigmaTel STAC9205) A quirk is required for 8086:284b (rev 03) [Subsystem: 161f:2073]. The following has been tested with Alsa 1.0.20 (git master). Background details can be found at https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4561 http://forum.ubuntu-gr.org/viewtopic.php?f=38&t=5290 Tested-by: Theodora Iliopoulou Signed-off-by: Simos Xenitellis Signed-off-by: Takashi Iwai commit 1f3fff7bda95b75a6be5a02c2a6902573d8c18e6 Author: Kay Sievers Date: Wed Jun 10 19:50:33 2009 +0200 ALSA: use card device as parent for jack input-devices This moves the jack devices from the PCI device into the ALSA card device, which makes it easier for userspace to find all devices belonging to a specific card while granting access to logged-in users. Jack input devices from sound cards can now simply be matched with udev by doing: SUBSYSTEM="input", SUBSYSTEMS="sound", ... ls -l /sys/devices/pci0000:00/0000:00:1b.0/sound/card0 controlC0 device -> ../../../0000:00:1b.0 id input10 input11 input8 input9 number pcmC0D0c pcmC0D0p pcmC0D1p power subsystem -> ../../../../../class/sound uevent Cc: Lennart Poettering Signed-off-by: Kay Sievers Signed-off-by: Takashi Iwai commit bc5c6c043d8381676339fb3da59cc4cc5921d368 Author: Mike Frysinger Date: Wed Jun 10 04:48:41 2009 -0400 ftrace/documentation: fix typo in function grapher name The function graph tracer is called just "function_graph" (no trailing "_tracer" needed). Signed-off-by: Mike Frysinger LKML-Reference: <1244623722-6325-1-git-send-email-vapier@gentoo.org> Signed-off-by: Steven Rostedt commit 58f7f68f228c3aba2ba4468d92e2cec35724ba2e Author: Jeff Layton Date: Wed Jun 10 09:57:55 2009 -0400 cifs: add addr= mount option alias for ip= When you look in /proc/mounts, the address of the server gets displayed as "addr=". That's really a better option to use anyway since it's more generic. What if we eventually want to support non-IP transports? It also makes CIFS option consistent with the NFS option of the same name. Begin the migration to that option name by adding an alias for ip= called addr=. Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 7df336ec1266dccbb253bac52c529d3dcc7c22d0 Author: Al Viro Date: Wed Jun 10 11:36:43 2009 -0400 Fix btrfs when ACLs are configured out ... otherwise generic_permission() will allow *anything* for all files you don't own and that have some group permissions. Signed-off-by: Al Viro Signed-off-by: Chris Mason commit 524724ed1f224875a117be593540591ed050c73d Author: Hisashi Hifumi Date: Wed Jun 10 11:13:17 2009 -0400 Btrfs: fdatasync should skip metadata writeout In btrfs, fdatasync and fsync are identical, but fdatasync should skip committing transaction when inode->i_state is set just I_DIRTY_SYNC and this indicates only atime or/and mtime updates. Following patch improves fdatasync throughput. --file-block-size=4K --file-total-size=16G --file-test-mode=rndwr --file-fsync-mode=fdatasync run Results: -2.6.30-rc8 Test execution summary: total time: 1980.6540s total number of events: 10001 total time taken by event execution: 1192.9804 per-request statistics: min: 0.0000s avg: 0.1193s max: 15.3720s approx. 95 percentile: 0.7257s Threads fairness: events (avg/stddev): 625.0625/151.32 execution time (avg/stddev): 74.5613/9.46 -2.6.30-rc8-patched Test execution summary: total time: 1695.9118s total number of events: 10000 total time taken by event execution: 871.3214 per-request statistics: min: 0.0000s avg: 0.0871s max: 10.4644s approx. 95 percentile: 0.4787s Threads fairness: events (avg/stddev): 625.0000/131.86 execution time (avg/stddev): 54.4576/8.98 Signed-off-by: Hisashi Hifumi Signed-off-by: Chris Mason commit 163e783e6a8b1e8bcb4c9084d438091386b589df Author: David Woodhouse Date: Sun Apr 19 13:02:41 2009 +0100 Btrfs: remove crc32c.h and use libcrc32c directly. There's no need to preserve this abstraction; it used to let us use hardware crc32c support directly, but libcrc32c is already doing that for us through the crypto API -- so we're already using the Intel crc32c acceleration where appropriate. Signed-off-by: David Woodhouse Signed-off-by: Chris Mason commit 6cbff00f4632c8060b06bfc9585805217f11e12e Author: Christoph Hellwig Date: Fri Apr 17 10:37:41 2009 +0200 Btrfs: implement FS_IOC_GETFLAGS/SETFLAGS/GETVERSION Add support for the standard attributes set via chattr and read via lsattr. Currently we store the attributes in the flags value in the btrfs inode, but I wonder whether we should split it into two so that we don't have to keep converting between the two formats. Remove the btrfs_clear_flag/btrfs_set_flag/btrfs_test_flag macros as they were confusing the existing code and got in the way of the new additions. Also add the FS_IOC_GETVERSION ioctl for getting i_generation as it's trivial. Signed-off-by: Christoph Hellwig Signed-off-by: Chris Mason commit c289811cc096c57ff35550ee8132793a4f9b5b59 Author: Chris Mason Date: Wed Jun 10 09:51:32 2009 -0400 Btrfs: autodetect SSD devices During mount, btrfs will check the queue nonrot flag for all the devices found in the FS. If they are all non-rotating, SSD mode is enabled by default. If the FS was mounted with -o nossd, the non-rotating flag is ignored. Signed-off-by: Chris Mason commit 451d7585a8bb1b9bec0d676ce3dece1923164e55 Author: Chris Mason Date: Tue Jun 9 20:28:34 2009 -0400 Btrfs: add mount -o ssd_spread to spread allocations out Some SSDs perform best when reusing block numbers often, while others perform much better when clustering strictly allocates big chunks of unused space. The default mount -o ssd will find rough groupings of blocks where there are a bunch of free blocks that might have some allocated blocks mixed in. mount -o ssd_spread will make sure there are no allocated blocks mixed in. It should perform better on lower end SSDs. Signed-off-by: Chris Mason commit c604480171c510c1beeb81b82418e5bc4de8f1ae Author: Chris Mason Date: Tue Jun 9 18:35:15 2009 -0400 Btrfs: avoid allocation clusters that are too spread out In SSD mode for data, and all the time for metadata the allocator will try to find a cluster of nearby blocks for allocations. This commit adds extra checks to make sure that each free block in the cluster is close to the last one. Signed-off-by: Chris Mason commit 3b30c22f64a6bb297719c60e494af1d26563f584 Author: Chris Mason Date: Tue Jun 9 16:42:22 2009 -0400 Btrfs: Add mount -o nossd This allows you to turn off the ssd mode via remount. Signed-off-by: Chris Mason commit d644d8a1e30b88a93bcfb63cada2ae628462ddba Author: Chris Mason Date: Tue Jun 9 15:59:22 2009 -0400 Btrfs: avoid IO stalls behind congested devices in a multi-device FS The btrfs IO submission threads try to service a bunch of devices with a small number of threads. They do a congestion check to try and avoid waiting on requests for a busy device. The checks make sure we've sent a few requests down to a given device just so that we aren't bouncing between busy devices without actually sending down any IO. The counter used to decide if we can switch to the next device is somewhat overloaded. It is also being used to decide if we've done a good batch of requests between the WRITE_SYNC or regular priority lists. It may get reset to zero often, leaving us hammering on a busy device instead of moving on to another disk. This commit adds a new counter for the number of bios sent while servicing a device. It doesn't get reset or fiddled with. On multi-device filesystems, this fixes IO stalls in streaming write workloads. Signed-off-by: Chris Mason commit d84275c938e1a5e2dc5b89eb9b878e0ddb2c55e0 Author: Chris Mason Date: Tue Jun 9 15:39:08 2009 -0400 Btrfs: don't allow WRITE_SYNC bios to starve out regular writes Btrfs uses dedicated threads to submit bios when checksumming is on, which allows us to make sure the threads dedicated to checksumming don't get stuck waiting for requests. For each btrfs device, there are two lists of bios. One list is for WRITE_SYNC bios and the other is for regular priority bios. The IO submission threads used to process all of the WRITE_SYNC bios first and then switch to the regular bios. This commit makes sure we don't completely starve the regular bios by rotating between the two lists. WRITE_SYNC bios are still favored 2:1 over the regular bios, and this tries to run in batches to avoid seeking. Benchmarking shows this eliminates stalls during streaming buffered writes on both multi-device and single device filesystems. If the regular bios starve, the system can end up with a large amount of ram pinned down in writeback pages. If we are a little more fair between the two classes, we're able to keep throughput up and make progress on the bulk of our dirty ram. Signed-off-by: Chris Mason commit 585ad2c3797dcaa643aeba75b9f072778adf3490 Author: Chris Mason Date: Mon May 18 10:41:58 2009 -0400 Btrfs: fix metadata dirty throttling limits Once a metadata block has been written, it must be recowed, so the btrfs dirty balancing call has a check to make sure a fair amount of metadata was actually dirty before it started writing it back to disk. A previous commit had changed the dirty tracking for metadata without updating the btrfs dirty balancing checks. This commit switches it to use the correct counter. Signed-off-by: Chris Mason commit 2c943de6ad795a174dcc424c293bb77f15ae3b8c Author: Chris Mason Date: Mon May 18 10:41:58 2009 -0400 Btrfs: reduce mount -o ssd CPU usage The block allocator in SSD mode will try to find groups of free blocks that are close together. This commit makes it loop less on a given group size before bumping it. The end result is that we are less likely to fill small holes in the available free space, but we don't waste as much CPU building the large cluster used by ssd mode. Signed-off-by: Chris Mason commit cfbb9308463f6dad1334884db046ccf0f1a77918 Author: Chris Mason Date: Mon May 18 10:41:58 2009 -0400 Btrfs: balance btree more often With the new back reference code, the cost of a balance has gone down in terms of the number of back reference updates done. This commit makes us more aggressively balance leaves and nodes as they become less full. Signed-off-by: Chris Mason commit b36124210248706186a02093427bdff4b3f548e8 Author: Chris Mason Date: Wed May 13 19:12:15 2009 -0400 Btrfs: stop avoiding balancing at the end of the transaction. When the delayed reference code was added, some checks were added to avoid extra balancing while the delayed references were being flushed. This made for less efficient btrees, but it reduced the chances of loops where no forward progress was made because the balances made more delayed ref updates. With the new dead root removal code and the mixed back references, the extent allocation tree is no longer using precise back refs, and the delayed reference updates don't carry the risk of looping forever anymore. So, the balance avoidance is no longer required. Signed-off-by: Chris Mason commit 5d4f98a28c7d334091c1b7744f48a1acdd2a4ae0 Author: Yan Zheng Date: Wed Jun 10 10:45:14 2009 -0400 Btrfs: Mixed back reference (FORWARD ROLLING FORMAT CHANGE) This commit introduces a new kind of back reference for btrfs metadata. Once a filesystem has been mounted with this commit, IT WILL NO LONGER BE MOUNTABLE BY OLDER KERNELS. When a tree block in subvolume tree is cow'd, the reference counts of all extents it points to are increased by one. At transaction commit time, the old root of the subvolume is recorded in a "dead root" data structure, and the btree it points to is later walked, dropping reference counts and freeing any blocks where the reference count goes to 0. The increments done during cow and decrements done after commit cancel out, and the walk is a very expensive way to go about freeing the blocks that are no longer referenced by the new btree root. This commit reduces the transaction overhead by avoiding the need for dead root records. When a non-shared tree block is cow'd, we free the old block at once, and the new block inherits old block's references. When a tree block with reference count > 1 is cow'd, we increase the reference counts of all extents the new block points to by one, and decrease the old block's reference count by one. This dead tree avoidance code removes the need to modify the reference counts of lower level extents when a non-shared tree block is cow'd. But we still need to update back ref for all pointers in the block. This is because the location of the block is recorded in the back ref item. We can solve this by introducing a new type of back ref. The new back ref provides information about pointer's key, level and in which tree the pointer lives. This information allow us to find the pointer by searching the tree. The shortcoming of the new back ref is that it only works for pointers in tree blocks referenced by their owner trees. This is mostly a problem for snapshots, where resolving one of these fuzzy back references would be O(number_of_snapshots) and quite slow. The solution used here is to use the fuzzy back references in the common case where a given tree block is only referenced by one root, and use the full back references when multiple roots have a reference on a given block. This commit adds per subvolume red-black tree to keep trace of cached inodes. The red-black tree helps the balancing code to find cached inodes whose inode numbers within a given range. This commit improves the balancing code by introducing several data structures to keep the state of balancing. The most important one is the back ref cache. It caches how the upper level tree blocks are referenced. This greatly reduce the overhead of checking back ref. The improved balancing code scales significantly better with a large number of snapshots. This is a very large commit and was written in a number of pieces. But, they depend heavily on the disk format change and were squashed together to make sure git bisect didn't end up in a bad state wrt space balancing or the format change. Signed-off-by: Yan Zheng Signed-off-by: Chris Mason commit 5c939df56c3ea018b58e5aa76181284c2053d699 Author: Yan Zheng Date: Wed May 27 09:16:03 2009 -0400 btrfs: Fix set/clear_extent_bit for 'end == (u64)-1' There are some 'start = state->end + 1;' like code in set_extent_bit and clear_extent_bit. They overflow when end == (u64)-1. Signed-off-by: Yan Zheng Signed-off-by: Chris Mason commit ef14f0c1578dce4b688726eb2603e50b62d6665a Author: Christoph Hellwig Date: Wed Jun 10 17:07:47 2009 +0200 xfs: use generic Posix ACL code This patch rips out the XFS ACL handling code and uses the generic fs/posix_acl.c code instead. The ondisk format is of course left unchanged. This also introduces the same ACL caching all other Linux filesystems do by adding pointers to the acl and default acl in struct xfs_inode. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen commit 517d3cc15b36392e518abab6bacbb72089658313 Author: Arjan van de Ven Date: Wed May 13 15:02:42 2009 +0100 [libata] ata_piix: Enable parallel scan This patch turns on parallel scanning for the ata_piix driver. This driver is used on most netbooks (no AHCI for cheap storage it seems). The scan is the dominating time factor in the kernel boot for these devices; with this flag it gets cut in half for the device I used for testing (eeepc). Alan took a look at the driver source and concluded that it ought to be safe to do for this driver. Alan has also checked with the hardware team. Signed-off-by: Arjan van de Ven Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit 7f4774b38ee6270bbc6c3015cb3fa6c415ffb340 Author: Tejun Heo Date: Wed Jun 10 16:29:07 2009 +0900 sata_nv: use hardreset only for post-boot probing When I thought it was finally defeated, it came back with vengeance. The failure cases are ever more convoluted. Now there is a single combination which fails boot probing - MCP5x + Intel SSD and there are two hotplug failure reports on different flavors where softreset fails to bring up the device. Through the many bug reports after the switch to hardreset, the following patterns emerged. - Softreset during boot always works. - Hardreset during boot sometimes fails to bring up the link on certain comibnations and device signature acquisition is unreliable. - Hardreset is often necessary after hotplug. It looks like the old behavior of preferring softreset was somehow pretty close to the working reset protocol although it could have lost a device during phy error handling by issuing hardreset. This patch implements nv_hardreset() which kicks in only for post-boot (!LOADING) device probing resets. This should be able to work around all known problem cases. This isn't perfect but given the various hardreset quirks on these controllers, I think this is as good as it can get. Tested on mcp5x (swncq), nf3 and ck804 for all both boot, warm and hot probing cases. Kudos to all the bug reporters and their painful hours with these damn controllers. ;-) Signed-off-by: Tejun Heo Cc: Robert Hancock Reported-by: David Lang Reported-by: Samo Vodopivec Signed-off-by: Jeff Garzik commit 58a09b38cfcd700b796ea07ae3d2e0efbb28b561 Author: Shane Huang Date: Wed May 27 15:04:43 2009 +0800 [libata] ahci: Restore SB600 SATA controller 64 bit DMA Community reported one SB600 SATA issue(BZ #9412), which led to 64 bit DMA disablement for all SB600 revisions by driver maintainers with commits c7a42156d99bcea7f8173ba7a6034bbaa2ecb77c and 4cde32fc4b32e96a99063af3183acdfd54c563f0. But the root cause is ASUS M2A-VM system BIOS bug in old revisions like 0901, while forcing into 32bit DMA happens to work as workaround. Now it's time to withdraw 4cde32fc4b32e96a99063af3183acdfd54c563f0 so as to restore the SB600 SATA 64bit DMA capability. This patch is also adding the workaround for M2A-VM old BIOS revisions, but users are suggested to upgrade their system BIOS to the latest one if they meet this issue. Signed-off-by: Shane Huang Cc: Tejun Heo Signed-off-by: Jeff Garzik commit f7b7c26e01e51fe46097e11f179dc71ce7950084 Author: Peter Zijlstra Date: Wed Jun 10 15:55:59 2009 +0200 perf_counter tools: Propagate signals properly Currently report and stat catch SIGINT (and others) without altering their exit state. This means that things like: while :; do perf stat ./foo ; done Loops become hard-to-interrupt, because bash never sees perf terminate due to interruption. Fix this. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 4502d77c1d8f15f20c04b92cb96c12d4e465de29 Author: Peter Zijlstra Date: Wed Jun 10 15:03:06 2009 +0200 perf_counter tools: Small frequency related fixes Create the counter in a disabled state and only enable it after we mmap() the buffer, this allows us to see the first few samples (and observe the frequency ramp). Furthermore, print the period in the verbose report. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit bd2b5b12849a3446abad0b25e920f86f5480b309 Author: Peter Zijlstra Date: Wed Jun 10 13:40:57 2009 +0200 perf_counter: More aggressive frequency adjustment Also employ the overflow handler to adjust the frequency, this results in a stable frequency in about 40~50 samples, instead of that many ticks. This also means we can start sampling at a sample period of 1 without running head-first into the throttle. It relies on sched_clock() to accurately measure the time difference between the overflow NMIs. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 2233123f2776f29d3ac31df1fd1dc40c44d337a5 Author: Geert Uytterhoeven Date: Wed Jun 10 16:39:03 2009 +0200 ALSA: sound/ps3: Correct existing and add missing annotations probe functions should be __devinit Signed-off-by: Geert Uytterhoeven Signed-off-by: Takashi Iwai commit cb6492e4a4e68281358510f0ffe2b0c4972ec166 Author: Geert Uytterhoeven Date: Wed Jun 10 16:39:02 2009 +0200 ALSA: sound/ps3: Restructure driver source Sort includes, and reorder code so we can kill the forward declarations No functional changes Signed-off-by: Geert Uytterhoeven Signed-off-by: Takashi Iwai commit 112ac808eb8a953dd356bbbc8322fdd6861e2c75 Author: Geert Uytterhoeven Date: Wed Jun 10 16:39:01 2009 +0200 ALSA: sound/ps3: Fix checkpatch issues Signed-off-by: Geert Uytterhoeven Signed-off-by: Takashi Iwai commit 3860c97bd60a4525bb62eb90e3e7d2f02662ac59 Author: Boaz Harrosh Date: Sun May 24 20:05:58 2009 +0300 [SCSI] osd: Remove out-of-tree left overs * Delete Makefile. It is only used for out-of-tree compilation and was never needed. It slipped in by mistake. * Remove from Kbuild all the out of tree stuff as promised. Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit 03306793e686fd895ab8fa095bb9ec33658ea53a Author: Boaz Harrosh Date: Sun May 24 20:05:43 2009 +0300 [SCSI] libosd: Use REQ_QUIET requests. libosd has it's own sense decoding and printout. Don't let scsi_lib duplicate that printout. (Which is done wrong in regard to osd commands) Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit 021e2230d6c04d80289fceb2d21c9ce93a615b32 Author: Boaz Harrosh Date: Sun May 24 20:05:05 2009 +0300 [SCSI] osduld: use filp_open() when looking up an osd-device This patch was inspired by Al Viro, for simplifying and fixing the retrieval of osd-devices by in-kernel users, eg: file systems. In-Kernel users, now, go through the same path user-mode does by opening a file on the osd char-device and though holding a reference to both the device and the Module. A file pointer was added to the osd_dev structure which is now allocated for each user. The internal osd_dev is no longer exposed outside of the uld. I wanted to do that for a long time so each libosd user can have his own defaults on the device. The API is left the same, so user code need not change. It is no longer needed to open/close a file handle on the osd char-device from user-mode, before mounting an exofs on it. Signed-off-by: Boaz Harrosh CC: Al Viro Signed-off-by: James Bottomley commit fc2fac5b5f11e2bee3bf37215c8746236f5ea188 Author: Boaz Harrosh Date: Sun May 24 20:04:43 2009 +0300 [SCSI] libosd: Define an osd_dev wrapper to retrieve the request_queue libosd users that need to work with bios, must sometime use the request_queue associated with the osd_dev. Make a wrapper for that, and convert all in-tree users. Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit 62f469b596dd0aadf046a69027087c18db43734e Author: Boaz Harrosh Date: Sun May 24 20:04:26 2009 +0300 [SCSI] libosd: osd_req_{read,write} takes a length parameter For supporting of chained-bios we can not inspect the first bio only, as before. Caller shall pass the total length of the request, ie. sum_bytes(bio-chain). Also since the bio might be a chain we don't set it's direction on behalf of it's callers. The bio direction should be properly set prior to this call. So fix a couple of write users that now need to set the bio direction properly [In this patch I change both library code and user sites at exofs, to make it easy on integration. It should be submitted via James's scsi-misc tree.] Signed-off-by: Boaz Harrosh CC: Jeff Garzik Signed-off-by: James Bottomley commit 546881aea9787ed5c626ac99ab80158ea9ae0515 Author: Boaz Harrosh Date: Sun May 24 20:04:00 2009 +0300 [SCSI] libosd: Let _osd_req_finalize_data_integrity receive number of out_bytes _osd_req_finalize_data_integrity was trying to deduce the number of out_bytes from passed osd_request->out.bio. This is wrong when the bio is chained. The caller of _osd_req_finalize_data_integrity has more ready available information and should just pass it. Also in the light of future support for CDB-continuation segment this is a better solution. Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit 0e35afbc8b054e04a35faa796c72abb3b82bd33b Author: Boaz Harrosh Date: Sun May 24 20:02:22 2009 +0300 [SCSI] libosd: osd_req_{read,write}_kern new API By popular demand, define usefull wrappers for osd_req_read/write that recieve kernel pointers. All users had their own. Also remove these from exofs Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit de6b20385b1c14f97ccdf7da173b4c9a7405083b Author: Boaz Harrosh Date: Sun May 24 20:01:26 2009 +0300 [SCSI] libosd: Better printout of OSD target system information Shorten out the Attributes names. Align all results on column 24. Print system ID in a new line. Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit 29191b92030bc97b05b539ce5ae0543c24a6d7ca Author: Boaz Harrosh Date: Sun May 24 20:01:03 2009 +0300 [SCSI] libosd: OSD2r05: Attribute definitions Some New revision 5 Attribute definitions. Some missing definitions of Attributes and pages Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit feb6118d4e76bc5685909426c2dcc90fdb7ba05b Author: Boaz Harrosh Date: Sun May 24 20:00:39 2009 +0300 [SCSI] libosd: OSD2r05: Additional command enums Add all constant definitions of new OSD commands added in revision 4 & 5. Mainly for creating snapshots and clones. Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit 236e6723bedb483b2ebf73ada01e2c853c5cac01 Author: Mark Brown Date: Wed Jun 10 13:55:34 2009 +0100 ASoC: Fix lm4857 control Commit 4eaa9819dc08d7bfd1065ce530e31b18a119dcaf changed semantics of private_value member of kcontrol. This resulted in inability to control amplifier and subsequently in very low output volume. Tested-by: Johannes Schauer Signed-off-by: Paul Fertser Signed-off-by: Mark Brown commit ad7c52d0988a8965989dc06d630c52a5bde849d5 Author: Bartlomiej Zolnierkiewicz Date: Wed Jun 10 14:37:21 2009 +0200 ide: re-implement ide_pci_init_one() on top of ide_pci_init_two() There should be no functional changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 5df3bc2d35bd5cd08053f71679b27577b42676d6 Author: Bartlomiej Zolnierkiewicz Date: Wed Jun 10 14:37:21 2009 +0200 ide: unexport ide_find_dma_mode() Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 5f4417a156a6e44359effa9492de3ed5638a9b13 Author: Hugh Dickins Date: Wed Jun 10 14:37:20 2009 +0200 ide: fix PowerMac bootup oops PowerMac bootup with CONFIG_IDE=y oopses in ide_pio_cycle_time(): because "ide: try to use PIO Mode 0 during probe if possible" causes pmac_ide_set_pio_mode() to be called before drive->id has been set. Bart points out other places which now need drive->id set earlier, so follow his advice to allocate it in ide_port_alloc_devices() (using kzalloc_node, without error message, as when allocating drive) and memset it for reuse in ide_port_init_devices_data(). Fixed in passing: ide_host_alloc() was missing ide_port_free_devices() from an error path. Signed-off-by: Hugh Dickins Cc: Joao Ramos Cc: Sergei Shtylyov Cc: Benjamin Herrenschmidt Cc: Andrew Morton Signed-off-by: Bartlomiej Zolnierkiewicz commit 09f8ca74ae6c2d78b2c7f6c0751ed0cbe815a3d9 Author: Avi Kivity Date: Mon Jun 8 15:55:21 2009 +0300 KVM: Prevent overflow in largepages calculation If userspace specifies a memory slot that is larger than 8 petabytes, it could overflow the largepages variable. Cc: stable@kernel.org Signed-off-by: Avi Kivity commit ac04527f7947020c5890090b2ac87af4e98d977e Author: Avi Kivity Date: Mon Jun 8 15:52:39 2009 +0300 KVM: Disable large pages on misaligned memory slots If a slots guest physical address and host virtual address unequal (mod large page size), then we would erronously try to back guest large pages with host large pages. Detect this misalignment and diable large page support for the trouble slot. Cc: stable@kernel.org Signed-off-by: Avi Kivity commit 7654db1a9256d746ae4d229ba675f616a5d5e1a1 Author: Alan Cox Date: Wed May 6 17:10:17 2009 +0100 ata_piix: Remove stale comment Combined mode pci quirk hacks went away - so the table to keep in sync no longer exists. Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit 347979a034539ab20f3bc0c30ac0ccd3c4fd4c2e Author: Alan Cox Date: Wed May 6 17:10:08 2009 +0100 ata_piix: Turn on hotplugging support for older chips We can't do this for the later ones as they have all sorts of magic boot time stuff that needs reviewing and the like. However we can do it for the older ones and it turns out we need to as some IBM docking stations have a second PIIX series device in them and without this change you can't use it very well Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit d50ce07d6fd8a422757a231f9d7293cbddeaec31 Author: Tejun Heo Date: Tue May 12 10:57:41 2009 +0900 ahci: misc cleanups for EM stuff Make the following EM related cleanups. * Use msleep(1) instead of udelay(100) and reduce retry count to 5. * s/MAX_SLOTS/EM_MAX_SLOTS/, s/MAX_RETRY/EM_MAX_RETRY/ * Make EM constants enums as suggested by Jeff. Signed-off-by: Tejun Heo Acked-by: David Milburn Signed-off-by: Jeff Garzik commit 437681800bdaa9feb58cf943dfbbd239c21d3705 Author: Jens Axboe Date: Wed May 20 09:44:39 2009 +0200 [libata] get rid of ATA_MAX_QUEUE loop in ata_qc_complete_multiple() v2 We very rarely (if ever) complete more than one command in the sactive mask at the time, even for extremely high IO rates. So looping over the entire range of possible tags is pointless, instead use __ffs() to just find the completed tags directly. Updated to clear the tag from the done_mask instead of shifting done_mask down as suggested by From: Tejun Heo Verified with a user space tester to produce the same results. Signed-off-by: Jens Axboe Signed-off-by: Jeff Garzik commit 31f80112cc7e7ea4c220d6f62b0a7052754befb3 Author: Robert Hancock Date: Mon Apr 13 22:57:28 2009 -0600 sata_sil: enable 32-bit PIO 32-bit PIO seems to work fine on sata_sil hardware (tested on SiI3114) and is listed as OK in the Silicon Image datasheets. Enable it. Signed-off-by: Robert Hancock Signed-off-by: Jeff Garzik commit f35b5e7c066a41f60683d2689e52a1336479913b Author: Alexander Beregalov Date: Wed Apr 15 00:00:54 2009 +0400 sata_sx4: speed up ECC initialization ECC initialization takes too long. It writes zeroes by portions of 4 byte, it takes more than 6 minutes on my machine to initialize 512Mb ECC DIMM module. Change portion to 128Kb - it significantly reduces initialization time. Signed-off-by: Alexander Beregalov Signed-off-by: Jeff Garzik commit 2102d7497393e982bf38ffe8f5fd3d487104880d Author: Sergei Shtylyov Date: Sun Feb 15 23:30:38 2009 +0400 libata-sff: avoid byte swapping in ata_sff_data_xfer() Handling of the trailing byte in ata_sff_data_xfer() is suboptimal bacause: - it always initializes the padding buffer to 0 which is not really needed in both the read and write cases; - it has to use memcpy() to transfer a single byte from/to the padding buffer; - it uses io{read|write}16() accessors which swap bytes on the big endian CPUs and so have to additionally convert the data from/to the little endian format instead of using io{read|write}16_rep() accessors which are not supposed to change the byte ordering. Signed-off-by: Sergei Shtylyov Signed-off-by: Jeff Garzik commit 4da646b7b52552f3b43eae27ffa5aa2c200f6db6 Author: Jeff Garzik Date: Wed Apr 8 02:00:13 2009 -0400 [libata] ahci: use less error-prone array initializers Also, remove unneeded prototype. Signed-off-by: Jeff Garzik commit dc81081b2d9a6a9d64dad1bef1e5fc9fb660e53e Author: Yong Wang Date: Wed Jun 10 17:06:12 2009 +0800 perf_counter/x86: Fix the model number of Intel Core2 processors Fix the model number of Intel Core2 processors according to the documentation: Intel Processor Identification with the CPUID Instruction: http://www.intel.com/support/processors/sb/cs-009861.htm Signed-off-by: Yong Wang Also-Reported-by: Arnd Bergmann Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: <20090610090612.GA26580@ywang-moblin2.bj.intel.com> [ Added two more model numbers suggested by Arnd Bergmann ] Signed-off-by: Ingo Molnar commit c476c23b45a41eb4e3ea63af786cc4d74762fe11 Author: Borislav Petkov Date: Wed May 20 20:31:58 2009 +0200 amd64_edac: add MAINTAINERS entry Acked-by: Doug Thompson Acked-by: Randy Dunlap Signed-off-by: Borislav Petkov commit 9456ffffcf3c2f8fafeb9dee45f1502209602253 Author: Borislav Petkov Date: Wed May 20 20:26:53 2009 +0200 EDAC: do not enable modules by default Prevent EDAC compilation units from being built by default and let the user explicitly select the needed modules. Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Borislav Petkov commit 3d373290450b10933dad7c387c42179f54417009 Author: Borislav Petkov Date: Wed May 20 20:18:46 2009 +0200 amd64_edac: do not enable module by default While at it, fix a link failure when !K8_NB. Acked-by: Doug Thompson Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Borislav Petkov commit 7d6034d3213e2dd1c0f8678e11064007413011c4 Author: Doug Thompson Date: Mon Apr 27 20:01:01 2009 +0200 amd64_edac: add module registration routines Also, link into Kbuild by adding Kconfig and Makefile entries. Borislav: - Kconfig/Makefile splitting - use zero-sized arrays for the sysfs attrs if not enabled - rename sysfs attrs to more conform values - shorten CONFIG_ names - make multiple structure members assignment vertically aligned - fix/cleanup comments - fix function return value patterns - fix err labels - fix a memleak bug caught by Ingo - remove the NUMA dependency and use num_k8_northbrides for initializing a driver instance per NB. - do not copy the pvt contents into the mci struct in amd64_init_2nd_stage() and save it in the mci->pvt_info void ptr instead. - cleanup debug calls - simplify amd64_setup_pci_device() Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit f9431992b6227069bc54800d55531c6f78d276a7 Author: Doug Thompson Date: Mon Apr 27 19:46:08 2009 +0200 amd64_edac: add ECC reporting initializers Borislav: - convert to the new {rd|wr}msr_on_cpus interfaces. - convert pvt->old_mcgctl to a bitmask thus saving some bytes - fix/cleanup comments - fix function return value patterns - add a proper bugfix found by Doug to amd64_check_ecc_enabled where we missed checking for the ECC enabled bit in NB CFG. - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit 0ec449ee95b20245fef4aa9fa2486456f1540514 Author: Doug Thompson Date: Mon Apr 27 19:41:25 2009 +0200 amd64_edac: add EDAC core-related initializers Borislav: - add a amd64_free_mc_sibling_devices() helper instead of opencoding the release-path. - fix/cleanup comments - fix function return value patterns - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit d27bf6fa369ca0272df10558d2f290d6fc72e675 Author: Doug Thompson Date: Wed May 6 17:55:27 2009 +0200 amd64_edac: add error decoding logic Borislav: - fold amd64_error_info_valid() into its only user - fix/cleanup comments - fix function return value patterns - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit b1289d6f9d23abab396077abb65d5a23a775cdb0 Author: Doug Thompson Date: Mon Apr 27 16:37:05 2009 +0200 amd64_edac: add ECC chipkill syndrome mapping table Borislav: - fix comments - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit 4d37607adbff69596a3170cf84badaf26efc59ac Author: Doug Thompson Date: Mon Apr 27 16:25:05 2009 +0200 amd64_edac: add per-family descriptors Borislav: - fix comments - fix function return value patterns Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit f71d0a05001afd10e2be491ca002c55c7df42ed8 Author: Doug Thompson Date: Mon Apr 27 16:22:43 2009 +0200 amd64_edac: add F10h-and-later methods-p3 Borislav: - compute dct_sel_base_off in f10_match_to_this_node() correctly since it cannot be assumed that the Reserved bits are zero and they have to be masked out instead. - cleanup, remove StinkyIdentifiers, simplify logic - fix function return value patterns - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit 6163b5d4fb45d20e3eb92d627943f26572726889 Author: Doug Thompson Date: Mon Apr 27 16:20:17 2009 +0200 amd64_edac: add F10h-and-later methods-p2 Borislav: - fix a wrong negation in f10_determine_base_addr_offset() - fix a wrong mask in f10_determine_base_addr_offset() which should select DctSelBaseAddr[31:11] and not [31:16] as it was before - remove StinkyIdentifiers, trivially simplify code. - fix/cleanup comments - fix function return value patterns Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit 1afd3c98b5e8df68e1840b56c0ced15f314ce30d Author: Doug Thompson Date: Mon Apr 27 16:16:50 2009 +0200 amd64_edac: add F10h-and-later methods-p1 Borislav: Fail f10_early_channel_count() if error encountered while reading a NB register since those cached register contents are accessed afterwards. - fix/cleanup comments - fix function return value patterns - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit ddff876d2022c5e06509f6535bc4fd61c4d6ffd6 Author: Doug Thompson Date: Mon Apr 27 16:14:52 2009 +0200 amd64_edac: add k8-specific methods Borislav: - fix/cleanup/move comments - fix function return value patterns - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit 94be4bff21990674ac418c970c708a1a01cf709f Author: Doug Thompson Date: Mon Apr 27 16:12:00 2009 +0200 amd64_edac: assign DRAM chip select base and mask in a family-specific way Borislav: - cleanup/fix comments - fix function return value patterns - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit 2da11654ea4d32c5700693675dfbd55c70619519 Author: Doug Thompson Date: Mon Apr 27 16:09:09 2009 +0200 amd64_edac: add helper to dump relevant registers Borislav: - cleanup/fix comments - fix function return value patterns - cleanup dbg calls Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit 93c2df58b5b1a434cca8f60067e0e12d1942b7f1 Author: Doug Thompson Date: Mon May 4 20:46:50 2009 +0200 amd64_edac: add DRAM address type conversion facilities Borislav: - cleanup/fix comments, add BKDG refs - fix function return value patterns - cleanup dbg calls Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit e2ce7255e84db656853e91536e6023f92ff89f97 Author: Doug Thompson Date: Mon Apr 27 15:57:12 2009 +0200 amd64_edac: add functionality to compute the DRAM hole Borislav: - cleanup/fix comments, add BKDG refs - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit 6775763a2377e1ea865299b6daadc875d622de3f Author: Doug Thompson Date: Mon Apr 27 15:53:22 2009 +0200 amd64_edac: add sys addr to memory controller mapping helpers Borislav: - cleanup comments - cleanup debug calls - simplify find_mc_by_sys_addr's exit path Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit 2bc65418724a0ddbb20c9eeb9de8285af7748c16 Author: Doug Thompson Date: Mon May 4 20:11:14 2009 +0200 amd64_edac: add memory scrubber interface Borislav: - fix/cleanup comments - fix function return value patterns - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit b52401cecedf669211f0b7a5095abcb6d3fc82c2 Author: Doug Thompson Date: Wed May 6 17:57:20 2009 +0200 amd64_edac: add MCA error types Borislav: - cleanup comments Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit eb919690be994386eac326f8c53c4540602de563 Author: Doug Thompson Date: Tue May 5 20:07:11 2009 +0200 amd64_edac: add DRAM error injection logic using sysfs Borislav: - rename sysfs attrs to more conform names - cleanup/fix comments according to BKDG text - fix function return value patterns - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit fd3d6780f7358225a6ea1ffb1bb8fd8b2d6df446 Author: Doug Thompson Date: Mon Apr 27 19:50:23 2009 +0200 amd64_edac: add debugging/testing code This is for dumping different registers and testing the address mapping logic using the ECC syndromes. Borislav: - split sysfs attrs per file - use more conform names for the sysfs attrs - fix function return value patterns - cleanup/fix comments - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit cfe40fdb4a46a68e45fa9a5ecbe588e94b89b4f3 Author: Doug Thompson Date: Mon May 4 19:25:34 2009 +0200 amd64_edac: add driver header Borislav: - remove register bit descriptions (complete text in BKDG) - cleanup and remove excessive/superfluous comments Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Doug Thompson Signed-off-by: Borislav Petkov commit d357cbb445208ea0c33b268e08a65e53fdbb5e86 Author: Borislav Petkov Date: Thu May 14 17:49:28 2009 +0200 edac: fold __func__ into edac_debug_printk This shortens debugfX() calls a bit. Reviewed-by: Mauro Carvalho Chehab CC: Doug Thompson Signed-off-by: Borislav Petkov commit b034c19f9f61c8b6f2435aa2e77f52348ebde767 Author: Borislav Petkov Date: Fri May 22 13:52:19 2009 +0200 x86: MSR: add methods for writing of an MSR on several CPUs Provide for concurrent MSR writes on all the CPUs in the cpumask. Also, add a temporary workaround for smp_call_function_many which skips the CPU we're executing on. Bart: zero out rv struct which is allocated on stack. CC: H. Peter Anvin Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit 6bc1096d7ab3621b3ffcf06616d1f4e0325d903d Author: Borislav Petkov Date: Fri May 22 12:12:01 2009 +0200 x86: MSR: add a struct representation of an MSR Add a struct representing a 64bit MSR pair consisting of a low and high register part and convert msr_info to use it. Also, rename msr-on-cpu.c to msr.c. Side note: Put the cpumask.h include in __KERNEL__ space thus fixing an allmodconfig build failure in the headers_check target. CC: H. Peter Anvin Signed-off-by: Borislav Petkov commit f1db457ce6e2f63cb01022f58c0c023838958bd1 Author: Li Zefan Date: Wed Jun 10 10:06:24 2009 +0800 tracing/events: convert block trace points to TRACE_EVENT(), fix !CONFIG_BLOCK Fix building failures when CONFIG_BLOCK == n. Signed-off-by: Li Zefan LKML-Reference: <4A2F1520.8020003@cn.fujitsu.com> Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 04dce7d9d429ea5ea04e9432d1726c930f4d67da Author: Benjamin Herrenschmidt Date: Wed Jun 10 16:59:46 2009 +1000 spinlock: Add missing __raw_spin_lock_flags() stub for UP This was only defined with CONFIG_DEBUG_SPINLOCK set, but some obscure arch/powerpc code wants it always. Signed-off-by: Benjamin Herrenschmidt Acked-by: Peter Zijlstra LKML-Reference: Signed-off-by: Ingo Molnar commit 003dec8913d6bebb4ecc989ec04a235cf38f5ea9 Author: Steven Whitehouse Date: Wed Jun 10 10:31:45 2009 +0100 GFS2: Merge gfs2_get_sb into gfs2_get_sb_meta These don't need to be separate functions. Reported-by: Christoph Hellwig Signed-off-by: Steven Whitehouse commit a0861c02a981c943573478ea13b29b1fb958ee5b Author: Andi Kleen Date: Mon Jun 8 17:37:09 2009 +0800 KVM: Add VT-x machine check support VT-x needs an explicit MC vector intercept to handle machine checks in the hyper visor. It also has a special option to catch machine checks that happen during VT entry. Do these interceptions and forward them to the Linux machine check handler. Make it always look like user space is interrupted because the machine check handler treats kernel/user space differently. Thanks to Jiang Yunhong for help and testing. Cc: stable@kernel.org Signed-off-by: Andi Kleen Signed-off-by: Huang Ying Signed-off-by: Avi Kivity commit 56b237e31abf4d6dbc6e2a0214049b9a23be4883 Author: Nitin A Kamble Date: Thu Jun 4 15:04:08 2009 -0700 KVM: VMX: Rename rmode.active to rmode.vm86_active That way the interpretation of rmode.active becomes more clear with unrestricted guest code. Signed-off-by: Nitin A Kamble Signed-off-by: Avi Kivity commit 20f65983e30f222e5383f77206e3f571d1d64610 Author: Gleb Natapov Date: Mon May 11 13:35:55 2009 +0300 KVM: Move "exit due to NMI" handling into vmx_complete_interrupts() To save us one reading of VM_EXIT_INTR_INFO. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 8db3baa2db34035b2ddb7d0e8b186eb92a056532 Author: Gleb Natapov Date: Mon May 11 13:35:54 2009 +0300 KVM: Disable CR8 intercept if tpr patching is active Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 36752c9b91f75aa3ff0f214a89f13d806cb2f61f Author: Gleb Natapov Date: Mon May 11 13:35:53 2009 +0300 KVM: Do not migrate pending software interrupts. INTn will be re-executed after migration. If we wanted to migrate pending software interrupt we would need to migrate interrupt type and instruction length too, but we do not have all required info on SVM, so SVM->VMX migration would need to re-execute INTn anyway. To make it simple never migrate pending soft interrupt. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 44c11430b52cbad0a467bc023a802d122dfd285c Author: Gleb Natapov Date: Mon May 11 13:35:52 2009 +0300 KVM: inject NMI after IRET from a previous NMI, not before. If NMI is received during handling of another NMI it should be injected immediately after IRET from previous NMI handler, but SVM intercept IRET before instruction execution so we can't inject pending NMI at this point and there is not way to request exit when NMI window opens. This patch fix SVM code to open NMI window after IRET by single stepping over IRET instruction. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 6a8b1d13121f8226783987dc7ddd861ee2245410 Author: Gleb Natapov Date: Mon May 11 13:35:51 2009 +0300 KVM: Always request IRQ/NMI window if an interrupt is pending Currently they are not requested if there is pending exception. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 66fd3f7f901f29a557a473af595bf11b270b9ac2 Author: Gleb Natapov Date: Mon May 11 13:35:50 2009 +0300 KVM: Do not re-execute INTn instruction. Re-inject event instead. This is what Intel suggest. Also use correct instruction length when re-injecting soft fault/interrupt. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit f629cf8485c9e1063fd8b915fa3bde80917400a1 Author: Gleb Natapov Date: Mon May 11 13:35:49 2009 +0300 KVM: skip_emulated_instruction() decode instruction if size is not known Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 923c61bbc6413e87e5f6b0bae663d202a8de0537 Author: Gleb Natapov Date: Mon May 11 13:35:48 2009 +0300 KVM: Remove irq_pending bitmap Only one interrupt vector can be injected from userspace irqchip at any given time so no need to store it in a bitmap. Put it into interrupt queue directly. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit fa9726b0733461781933ab7180aca45e46d0a891 Author: Gleb Natapov Date: Mon May 11 13:35:47 2009 +0300 KVM: Do not allow interrupt injection from userspace if there is a pending event. The exception will immediately close the interrupt window. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 3298b75c880d6f0fd70750233c0f3e71a72a5bfb Author: Gleb Natapov Date: Mon May 11 13:35:46 2009 +0300 KVM: Unprotect a page if #PF happens during NMI injection. It is done for exception and interrupt already. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 51e4d5ab28c75d819b3840da11559ad5c1429135 Author: Carsten Otte Date: Tue May 12 17:21:53 2009 +0200 KVM: s390: Verify memory in kvm run This check verifies that the guest we're trying to run in KVM_RUN has some memory assigned to it. It enters an endless exception loop if this is not the case. Reported-by: Mijo Safradin Signed-off-by: Carsten Otte Signed-off-by: Christian Ehrhardt Signed-off-by: Avi Kivity commit 3edbcff9bfe2ed632e518b3cfe807d062cee8269 Author: Carsten Otte Date: Tue May 12 17:21:52 2009 +0200 KVM: s390: Sanity check on validity intercept This patch adds a sanity check for the content of the guest prefix register content before faulting in the cpu lowcore that it refers to. The guest might end up in an endless loop where SIE complains about missing lowcore with incorrect content of the prefix register without this fix. Reported-by: Mijo Safradin Signed-off-by: Carsten Otte Signed-off-by: Christian Ehrhardt Signed-off-by: Avi Kivity commit abf4a71ed95ff29d696bf04633958b2068ed2e0b Author: Carsten Otte Date: Tue May 12 17:21:51 2009 +0200 KVM: s390: Unlink vcpu on destroy - v2 This patch makes sure we do unlink a vcpu's sie control block from the system control area in kvm_arch_vcpu_destroy. This prevents illegal accesses to the sie control block from other virtual cpus after free. Reported-by: Mijo Safradin Signed-off-by: Carsten Otte Signed-off-by: Christian Ehrhardt Signed-off-by: Avi Kivity commit b037a4f34ec51b6c8ccb352a04056c04a4bfc269 Author: Christian Borntraeger Date: Tue May 12 17:21:50 2009 +0200 KVM: s390: optimize float int lock: spin_lock_bh --> spin_lock The floating interrupt lock is only taken in process context. We can replace all spin_lock_bh with standard spin_lock calls. Signed-off-by: Christian Borntraeger Signed-off-by: Christian Ehrhardt Signed-off-by: Avi Kivity commit ca8723023f25c9a70d76cbd6101f8fb4ffec2fa0 Author: Christian Borntraeger Date: Tue May 12 17:21:49 2009 +0200 KVM: s390: use hrtimer for clock wakeup from idle - v2 This patch reworks the s390 clock comparator wakeup to hrtimer. The clock comparator is a per-cpu value that is compared against the TOD clock. If ckc <= TOD an external interrupt 1004 is triggered. Since the clock comparator and the TOD clock have a much higher resolution than jiffies we should use hrtimers to trigger the wakeup. This speeds up guest nanosleep for small values. Since hrtimers callbacks run in hard-irq context, I added a tasklet to do the actual work with enabled interrupts. Signed-off-by: Christian Borntraeger Signed-off-by: Carsten Otte Signed-off-by: Christian Ehrhardt Signed-off-by: Avi Kivity commit 2668dab794272f0898491acaf1e77e9a005abc0f Author: Carsten Otte Date: Tue May 12 17:21:48 2009 +0200 KVM: s390: Fix memory slot versus run - v3 This patch fixes an incorrectness in the kvm backend for s390. In case virtual cpus are being created before the corresponding memory slot is being registered, we need to update the sie control blocks for the virtual cpus. *updates in v3* In consideration of the s390 memslot constraints locking was changed to trylock. These locks should never be held, as vcpu's can't run without the single memslot we just assign when running this code. To ensure this never deadlocks in case other code changes the code uses trylocks and bail out if it can't get all locks. Additionally most of the discussed special conditions for s390 like only one memslot and no user_alloc are now checked for validity in kvm_arch_set_memory_region. Reported-by: Mijo Safradin Signed-off-by: Carsten Otte Signed-off-by: Christian Ehrhardt Signed-off-by: Avi Kivity commit 58f8ac279a8c46eb0a3193edd521ed2e41c4f914 Author: Robert P. J. Day Date: Tue May 12 13:44:06 2009 -0700 KVM: Expand on "help" info to specify kvm intel and amd module names Signed-off-by: Robert P. J. Day Cc: Avi Kivity Signed-off-by: Andrew Morton Signed-off-by: Avi Kivity commit 8986ecc0ef58c96eec48d8502c048f3ab67fd8e2 Author: Marcelo Tosatti Date: Tue May 12 18:55:45 2009 -0300 KVM: x86: check for cr3 validity in mmu_alloc_roots Verify the cr3 address stored in vcpu->arch.cr3 points to an existant memslot. If not, inject a triple fault. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity commit b43b1901ad282aeb74161837fb403927102687a1 Author: Marcelo Tosatti Date: Tue May 12 18:55:44 2009 -0300 KVM: take mmu_lock when updating a deleted slot kvm_handle_hva relies on mmu_lock protection to safely access the memslot structures. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity commit 7c8a83b75a38a807d37f5a4398eca2a42c8cf513 Author: Marcelo Tosatti Date: Tue May 12 18:55:43 2009 -0300 KVM: MMU: protect kvm_mmu_change_mmu_pages with mmu_lock kvm_handle_hva, called by MMU notifiers, manipulates mmu data only with the protection of mmu_lock. Update kvm_mmu_change_mmu_pages callers to take mmu_lock, thus protecting against kvm_handle_hva. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity commit 310b5d306c1aee7ebe32f702c0e33e7988d50646 Author: Glauber Costa Date: Tue May 12 16:21:06 2009 -0400 KVM: Deal with interrupt shadow state for emulated instructions We currently unblock shadow interrupt state when we skip an instruction, but failing to do so when we actually emulate one. This blocks interrupts in key instruction blocks, in particular sti; hlt; sequences If the instruction emulated is an sti, we have to block shadow interrupts. The same goes for mov ss. pop ss also needs it, but we don't currently emulate it. Without this patch, I cannot boot gpxe option roms at vmx machines. This is described at https://bugzilla.redhat.com/show_bug.cgi?id=494469 Signed-off-by: Glauber Costa CC: H. Peter Anvin CC: Gleb Natapov Signed-off-by: Avi Kivity commit 2809f5d2c4cfad171167b131bb2a21ab65eba40f Author: Glauber Costa Date: Tue May 12 16:21:05 2009 -0400 KVM: Replace ->drop_interrupt_shadow() by ->set_interrupt_shadow() This patch replaces drop_interrupt_shadow with the more general set_interrupt_shadow, that can either drop or raise it, depending on its parameter. It also adds ->get_interrupt_shadow() for future use. Signed-off-by: Glauber Costa CC: H. Peter Anvin CC: Gleb Natapov Signed-off-by: Avi Kivity commit 547de29e5b1662deb05b5f90917902dc0e9ac182 Author: Marcelo Tosatti Date: Thu May 7 17:55:13 2009 -0300 KVM: protect assigned dev workqueue, int handler and irq acker kvm_assigned_dev_ack_irq is vulnerable to a race condition with the interrupt handler function. It does: if (dev->host_irq_disabled) { enable_irq(dev->host_irq); dev->host_irq_disabled = false; } If an interrupt triggers before the host->dev_irq_disabled assignment, it will disable the interrupt and set dev->host_irq_disabled to true. On return to kvm_assigned_dev_ack_irq, dev->host_irq_disabled is set to false, and the next kvm_assigned_dev_ack_irq call will fail to reenable it. Other than that, having the interrupt handler and work handlers run in parallel sounds like asking for trouble (could not spot any obvious problem, but better not have to, its fragile). CC: sheng.yang@intel.com Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity commit 32f8840064d88cc3f6e85203aec7b6b57bebcb97 Author: Marcelo Tosatti Date: Thu May 7 17:55:12 2009 -0300 KVM: use smp_send_reschedule in kvm_vcpu_kick KVM uses a function call IPI to cause the exit of a guest running on a physical cpu. For virtual interrupt notification there is no need to wait on IPI receival, or to execute any function. This is exactly what the reschedule IPI does, without the overhead of function IPI. So use it instead of smp_call_function_single in kvm_vcpu_kick. Also change the "guest_mode" variable to a bit in vcpu->requests, and use that to collapse multiple IPI's that would be issued between the first one and zeroing of guest mode. This allows kvm_vcpu_kick to called with interrupts disabled. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity commit d149c731e4f71982247a14409951259f36271dd7 Author: Avi Kivity Date: Sun May 10 14:41:56 2009 +0300 KVM: Update cpuid 1.ecx reporting Signed-off-by: Avi Kivity commit 069ebaa4644521e8e80b6849ace4dee53f93f55e Author: Avi Kivity Date: Sun May 10 14:37:56 2009 +0300 x86: Add cpu features MOVBE and POPCNT Add cpu feature bit support for the MOVBE and POPCNT instructions. Signed-off-by: Avi Kivity commit 7faa4ee1c777a5f8e8373430cfd9cb6172aa3503 Author: Avi Kivity Date: Sun May 10 13:55:35 2009 +0300 KVM: Add AMD cpuid bit: cr8_legacy, abm, misaligned sse, sse4, 3dnow prefetch Signed-off-by: Avi Kivity commit 8d753f369bd28fff1706ffe9fb9fea4fd88cf85b Author: Avi Kivity Date: Sun May 10 11:41:39 2009 +0300 KVM: Fix cpuid feature misreporting MTRR, PAT, MCE, and MCA are all supported (to some extent) but not reported. Vista requires these features, so if userspace relies on kernel cpuid reporting, it loses support for Vista. Signed-off-by: Avi Kivity commit d6a8c875f35a6e1b3fb3f21e93eabb183b1f39ee Author: Jan Kiszka Date: Mon Apr 20 18:10:07 2009 +0200 KVM: Drop request_nmi from stats The stats entry request_nmi is no longer used as the related user space interface was dropped. So clean it up. Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity commit fe8e7f83de3f0979f13f57992cb33e4a8041272d Author: Gleb Natapov Date: Thu Apr 23 17:03:48 2009 +0300 KVM: SVM: Don't reinject event that caused a task switch If a task switch caused by an event remove it from the event queue. VMX already does that. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit b586eb0253083795e58dcbe76665410d4676dc08 Author: Andre Przywara Date: Tue Apr 28 12:45:43 2009 +0200 KVM: SVM: Fix cross vendor migration issue in segment segment descriptor On AMD CPUs sometimes the DB bit in the stack segment descriptor is left as 1, although the whole segment has been made unusable. Clear it here to pass an Intel VMX entry check when cross vendor migrating. Signed-off-by: Andre Przywara Signed-off-by: Avi Kivity commit 9b5843ddd20557b77c73ddbcc814a8c816bf3d3a Author: Glauber Costa Date: Wed Apr 29 17:29:09 2009 -0400 KVM: fix apic_debug instances Apparently nobody turned this on in a while... setting apic_debug to something compilable, generates some errors. This patch fixes it. Signed-off-by: Glauber Costa Signed-off-by: Avi Kivity commit efbc100c20f9dc4a219a2a92763d68e4064109f2 Author: Chris Wright Date: Fri May 1 14:15:43 2009 -0700 KVM: Trivial format fix in setup_routing_entry() Remove extra tab. Signed-off-by: Chris Wright Signed-off-by: Avi Kivity commit 8e1c18157d8772e65247ac55525a05a26b83fffe Author: Sheng Yang Date: Wed Apr 29 11:09:04 2009 +0800 KVM: VMX: Disable VMX when system shutdown Intel TXT(Trusted Execution Technology) required VMX off for all cpu to work when system shutdown. CC: Joseph Cihula Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit 522c68c4416de3cd3e11a9ff10d58e776a69ae1e Author: Sheng Yang Date: Mon Apr 27 20:35:43 2009 +0800 KVM: Enable snooping control for supported hardware Memory aliases with different memory type is a problem for guest. For the guest without assigned device, the memory type of guest memory would always been the same as host(WB); but for the assigned device, some part of memory may be used as DMA and then set to uncacheable memory type(UC/WC), which would be a conflict of host memory type then be a potential issue. Snooping control can guarantee the cache correctness of memory go through the DMA engine of VT-d. [avi: fix build on ia64] Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit 4b12f0de33a64dfc624b2480f55b674f7fa23ef2 Author: Sheng Yang Date: Mon Apr 27 20:35:42 2009 +0800 KVM: Replace get_mt_mask_shift with get_mt_mask Shadow_mt_mask is out of date, now it have only been used as a flag to indicate if TDP enabled. Get rid of it and use tdp_enabled instead. Also put memory type logical in kvm_x86_ops->get_mt_mask(). Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit 9b62e5b10ff0f98346bcbe4a4fe3a0ca8fa7be30 Author: Jan Blunck Date: Tue Apr 7 23:58:56 2009 +0000 KVM: Wake up waitqueue before calling get_cpu() This moves the get_cpu() call down to be called after we wake up the waiters. Therefore the waitqueue locks can safely be rt mutex. Signed-off-by: Jan Blunck Signed-off-by: Sven-Thorsten Dietrich Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity commit 14d0bc1f7c8226d5088e7182c3b53e0c7e91d1af Author: Gleb Natapov Date: Tue Apr 21 17:45:11 2009 +0300 KVM: Get rid of get_irq() callback It just returns pending IRQ vector from the queue for VMX/SVM. Get IRQ directly from the queue before migration and put it back after. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 16d7a191170f0ca48c2c3277017b3e6d275e0711 Author: Gleb Natapov Date: Tue Apr 21 17:45:10 2009 +0300 KVM: Fix userspace IRQ chip migration Re-put pending IRQ vector into interrupt_bitmap before migration. Otherwise it will be lost if migration happens in the wrong time. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 95ba82731374eb1c2af4dd442526c4b314f0e8b6 Author: Gleb Natapov Date: Tue Apr 21 17:45:08 2009 +0300 KVM: SVM: Add NMI injection support Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit c4282df98ae0993983924c00ed76428a6609d68b Author: Gleb Natapov Date: Tue Apr 21 17:45:07 2009 +0300 KVM: Get rid of arch.interrupt_window_open & arch.nmi_window_open They are recalculated before each use anyway. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 0a5fff192388d2a74aa9ab5e0d394b745df9f225 Author: Gleb Natapov Date: Tue Apr 21 17:45:06 2009 +0300 KVM: Do not report TPR write to userspace if new value bigger or equal to a previous one. Saves many exits to userspace in a case of IRQ chip in userspace. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 615d5193055880d44db92b72403b7549251ac2a6 Author: Gleb Natapov Date: Tue Apr 21 17:45:05 2009 +0300 KVM: sync_lapic_to_cr8() should always sync cr8 to V_TPR Even if IRQ chip is in userspace. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 115666dfc733a6749d99bcf3b2fe3fa253218b36 Author: Gleb Natapov Date: Tue Apr 21 17:45:04 2009 +0300 KVM: Remove kvm_push_irq() No longer used. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 1d6ed0cb95a2f0839e1a31f1971dc37cd60c258a Author: Gleb Natapov Date: Tue Apr 21 17:45:03 2009 +0300 KVM: Remove inject_pending_vectors() callback It is the same as inject_pending_irq() for VMX/SVM now. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 1cb948ae86f3d95cce58fac51d00766825f5f783 Author: Gleb Natapov Date: Tue Apr 21 17:45:02 2009 +0300 KVM: Remove exception_injected() callback. It always return false for VMX/SVM now. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 9222be18f76b4410b4da0d06e1cc21079e64b3ec Author: Gleb Natapov Date: Thu Apr 23 17:14:37 2009 +0300 KVM: SVM: Coalesce userspace/kernel irqchip interrupt injection logic Start to use interrupt/exception queues like VMX does. This also fix the bug that if exit was caused by a guest internal exception access to IDT the exception was not reinjected. Use EVENTINJ to inject interrupts. Use VINT only for detecting when IRQ windows is open again. EVENTINJ ensures the interrupt is injected immediately and not delayed. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 5df56646472c42495dd2412c8d8aa72e59efe79a Author: Gleb Natapov Date: Tue Apr 21 17:44:59 2009 +0300 KVM: Use kvm_arch_interrupt_allowed() instead of checking interrupt_window_open directly kvm_arch_interrupt_allowed() also checks IF so drop the check. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 1f21e79aaced0a041e9399346960ce26ae0f5a4e Author: Gleb Natapov Date: Tue Apr 21 17:44:58 2009 +0300 KVM: VMX: Cleanup vmx_intr_assist() Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 863e8e658ee9ac6e5931b295eb7428456e450a0f Author: Gleb Natapov Date: Tue Apr 21 17:44:57 2009 +0300 KVM: VMX: Consolidate userspace and kernel interrupt injection for VMX Use the same callback to inject irq/nmi events no matter what irqchip is in use. Only from VMX for now. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 8061823a25218174f30c3dd943989e1d72f7d06e Author: Gleb Natapov Date: Tue Apr 21 17:44:56 2009 +0300 KVM: Make kvm_cpu_(has|get)_interrupt() work for userspace irqchip too At the vector level, kernel and userspace irqchip are fairly similar. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 3438253926822a6bf8487b4f7d82f26a2c0b2388 Author: Jan Kiszka Date: Sat Apr 25 12:43:21 2009 +0200 KVM: MMU: Fix auditing code Fix build breakage of hpa lookup in audit_mappings_page. Moreover, make this function robust against shadow_notrap_nonpresent_pte entries. Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity commit 43890ae8bcc5fa88ef3061613efe041b866fbc5a Author: Jes Sorensen Date: Fri Apr 17 16:43:27 2009 +0200 KVM: ia64: ia64 vcpu_reset() do not call kmalloc() with irqs disabled Restore local irq enabled state before calling kvm_arch_vcpu_init(), which calls kmalloc(GFP_KERNEL). Signed-off-by: Jes Sorensen Acked-by: Xiantao Zhang Signed-off-by: Avi Kivity commit 4d13c3b04f14a9a72ffcdd082acc243e7e56b4e0 Author: Jes Sorensen Date: Thu Apr 16 16:53:13 2009 +0200 KVM: ia64: preserve int status through call to kvm_insert_vmm_mapping Preserve interrupt status around call to kvm_insert_vmm_mappin() in kvm_vcpu_pre_transition(). Signed-off-by: Jes Sorensen Acked-by: Xiantao Zhang Signed-off-by: Avi Kivity commit 457459c3c738dfb37226ba116ba301140da0d1fb Author: Jes Sorensen Date: Thu Apr 16 16:08:29 2009 +0200 KVM: ia64: restore irq state before calling kvm_vcpu_init Make sure to restore the psr after calling kvm_insert_vmm_mapping() which calls ia64_itr_entry() as it disables local interrupts and kvm_vcpu_init() may sleep. Avoids a warning from the lock debugging code. Signed-off-by: Jes Sorensen Acked-by : Xiantao Zhang Signed-off-by: Avi Kivity commit f9b647adda0e821538b6d80e52873d861ffb1799 Author: Jes Sorensen Date: Thu Apr 16 11:24:58 2009 +0200 KVM: ia64: remove empty function vti_vcpu_load() vti_vcpu_load() doesn't do anything, so lets get rid of it. Signed-off-by: Jes Sorensen Acked-by : Xiantao Zhang Signed-off-by: Avi Kivity commit 64f6afbd4c3317eb6845d770aa345afd3f120471 Author: Xiantao Zhang Date: Thu Apr 16 17:59:16 2009 +0800 KVM: ia64: Flush all TLBs once guest's memory mapping changes. Flush all vcpu's TLB entries once changes guest's memory mapping. Signed-off-by: Xiantao Zhang Signed-off-by: Avi Kivity commit 59839dfff5eabca01cc4e20b45797a60a80af8cb Author: Marcelo Tosatti Date: Thu Apr 16 08:30:44 2009 -0300 KVM: x86: check for cr3 validity in ioctl_set_sregs Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity checking for the new cr3 value: "Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to the kernel. This will trigger a NULL pointer access in gfn_to_rmap() when userspace next tries to call KVM_RUN on the affected VCPU and kvm attempts to activate the new non-existent page table root. This happens since kvm only validates that cr3 points to a valid guest physical memory page when code *inside* the guest sets cr3. However, kvm currently trusts the userspace caller (e.g. QEMU) on the host machine to always supply a valid page table root, rather than properly validating it along with the rest of the reloaded guest state." http://sourceforge.net/tracker/?func=detail&atid=893831&aid=2687641&group_id=180599 Check for a valid cr3 address in kvm_arch_vcpu_ioctl_set_sregs, triple fault in case of failure. Cc: stable@kernel.org Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity commit c6b60c6921381130e5288b19f5fdf81152230b37 Author: Jes Sorensen Date: Thu Apr 16 10:43:48 2009 +0200 KVM: ia64: Don't hold slots_lock in guest mode Reorder locking to avoid holding the slots_lock when entering the guest. Signed-off-by: Jes Sorensen Acked-by : Xiantao Zhang Signed-off-by: Avi Kivity commit 463656c0007ddccee78db383eeb9e6eac75ccb7f Author: Avi Kivity Date: Sun Apr 12 15:49:07 2009 +0300 KVM: Replace kvmclock open-coded get_cpu_var() with the real thing Suggested by Ingo Molnar. Signed-off-by: Avi Kivity commit 8317c298eab14cc20e2de5289743ff0d4c5a6b30 Author: Gleb Natapov Date: Sun Apr 12 13:37:02 2009 +0300 KVM: SVM: Skip instruction on a task switch only when appropriate If a task switch was initiated because off a task gate in IDT and IDT was accessed because of an external even the instruction should not be skipped. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit ba8afb6b0a2c7e06da760ffe5d078245058619b5 Author: Gleb Natapov Date: Sun Apr 12 13:36:57 2009 +0300 KVM: x86 emulator: Add new mode of instruction emulation: skip In the new mode instruction is decoded, but not executed. The EIP is moved to point after the instruction. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit e637b8238ad1783ebdd113bd34cd6982dec1006d Author: Gleb Natapov Date: Sun Apr 12 13:36:52 2009 +0300 KVM: x86 emulator: Decode soft interrupt instructions Do not emulate them yet. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 84ce66a6865192567172f08ab5269aa380fa6ead Author: Gleb Natapov Date: Sun Apr 12 13:36:46 2009 +0300 KVM: x86 emulator: Completely decode in/out at decoding stage Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 341de7e3728ade102eaadf56af404f4ce865a73d Author: Gleb Natapov Date: Sun Apr 12 13:36:41 2009 +0300 KVM: x86 emulator: Add unsigned byte immediate decode Extend "Source operand type" opcode description field to 4 bites to accommodate new option. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit d53c4777b3a3e5031710d0664851d1309325884b Author: Gleb Natapov Date: Sun Apr 12 13:36:36 2009 +0300 KVM: x86 emulator: Complete decoding of call near in decode stage Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit b2833e3cdebfe3ea4d0d1d3ce4d2ff1c42a4f8f4 Author: Gleb Natapov Date: Sun Apr 12 13:36:30 2009 +0300 KVM: x86 emulator: Complete short/near jcc decoding in decode stage Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 782b877c8073a9ef307ad6638ee472b8336b2b85 Author: Gleb Natapov Date: Sun Apr 12 13:36:25 2009 +0300 KVM: x86 emulator: Complete ljmp decoding at decode stage Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 0654169e7309f2f68ec4bea9257b14b05ea94d7d Author: Gleb Natapov Date: Sun Apr 12 13:36:20 2009 +0300 KVM: x86 emulator: Add lcall decoding No emulation yet. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit a5f868bd45a64ce1f502d228723a5b6c357790cd Author: Gleb Natapov Date: Sun Apr 12 13:36:14 2009 +0300 KVM: x86 emulator: Add decoding of 16bit second immediate argument Such as segment number in lcall/ljmp Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit c2d0ee46e6e633a3c23ecbcb9b03ad731906cd79 Author: Marcelo Tosatti Date: Sun Apr 5 14:54:47 2009 -0300 KVM: MMU: remove global page optimization logic Complexity to fix it not worthwhile the gains, as discussed in http://article.gmane.org/gmane.comp.emulators.kvm.devel/28649. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity commit 2f8b9ee14eb439008e0c5131116ea6baa40dba50 Author: nathan binkert Date: Fri Mar 27 21:53:05 2009 -0700 KVM: Make kvm header C++ friendly Two things needed fixing: 1) g++ does not allow a named structure type within an anonymous union and 2) Avoid name clash between two padding fields within the same struct by giving them different names as is done elsewhere in the header. Signed-off-by: Nathan Binkert Signed-off-by: Avi Kivity commit ede2ccc51742059d356d419260460cbbf3e36273 Author: Marcelo Tosatti Date: Wed Apr 8 13:14:19 2009 -0300 KVM: PIT: fix count read and mode 0 handling Commit 46ee278652f4cbd51013471b64c7897ba9bcd1b1 causes Solaris 10 to hang on boot. Assuming that PIT counter reads should return 0 for an expired timer is wrong: when it is active, the counter never stops (see comment on __kpit_elapsed). Also arm a one shot timer for mode 0. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity commit 2906e79f21a559e49611e1e188c4993cd45d9ce1 Author: Zhang, Xiantao Date: Thu Apr 9 21:37:28 2009 +0800 KVM: ia64: make kvm depend on CONFIG_MODULES. Since kvm-intel modue can't be built-in, make kvm depend on CONFIG_MODULES. Signed-off-by: Xiantao Zhang Signed-off-by: Avi Kivity commit 2d033196541959d91802d5a62e63771448101557 Author: Gleb Natapov Date: Thu Apr 2 15:51:46 2009 +0300 KVM: x86 emulator: fix call near emulation The length of pushed on to the stack return address depends on operand size not address size. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 4c26b4cd6ff6c3f7534f2aea9615a561c372ed05 Author: Sheng Yang Date: Thu Apr 2 10:28:37 2009 +0800 KVM: MMU: Discard reserved bits checking on PDE bit 7-8 1. It's related to a Linux kernel bug which fixed by Ingo on 07a66d7c53a538e1a9759954a82bb6c07365eff9. The original code exists for quite a long time, and it would convert a PDE for large page into a normal PDE. But it fail to fit normal PDE well. With the code before Ingo's fix, the kernel would fall reserved bit checking with bit 8 - the remaining global bit of PTE. So the kernel would receive a double-fault. 2. After discussion, we decide to discard PDE bit 7-8 reserved checking for now. For this marked as reserved in SDM, but didn't checked by the processor in fact... Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit 64a7ec066813443440bfc9f60a9e76a47cfa6b2b Author: Gleb Natapov Date: Mon Mar 30 16:03:29 2009 +0300 KVM: Fix unneeded instruction skipping during task switching. There is no need to skip instruction if the reason for a task switch is a task gate in IDT and access to it is caused by an external even. The problem is currently solved only for VMX since there is no reliable way to skip an instruction in SVM. We should emulate it instead. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit b237ac37a149e8b56436fabf093532483bff13b0 Author: Gleb Natapov Date: Mon Mar 30 16:03:24 2009 +0300 KVM: Fix task switch back link handling. Back link is written to a wrong TSS now. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 8843419048e500f8f38df555bca1bf7948804b7f Author: Gleb Natapov Date: Mon Mar 30 16:03:18 2009 +0300 KVM: VMX: Do not zero idt_vectoring_info in vmx_complete_interrupts(). We will need it later in task_switch(). Code in handle_exception() is dead. is_external_interrupt(vect_info) will always be false since idt_vectoring_info is zeroed in vmx_complete_interrupts(). Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 37b96e988053c4dd21811b0408a12f8f60b4d0c8 Author: Gleb Natapov Date: Mon Mar 30 16:03:13 2009 +0300 KVM: VMX: Rewrite vmx_complete_interrupt()'s twisted maze of if() statements ...with a more straightforward switch(). Also fix a bug when NMI could be dropped on exit. Although this should never happen in practice, since NMIs can only be injected, never triggered internally by the guest like exceptions. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 7b4a25cb296e2a73d2e87a4af65361d45d450a27 Author: Gleb Natapov Date: Mon Mar 30 16:03:08 2009 +0300 KVM: VMX: Fix handling of a fault during NMI unblocked due to IRET Bit 12 is undefined in any of the following cases: If the VM exit sets the valid bit in the IDT-vectoring information field. If the VM exit is due to a double fault. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 20c466b56168ddccf034c136510d73e4a0e18605 Author: Dong, Eddie Date: Tue Mar 31 23:03:45 2009 +0800 KVM: Use rsvd_bits_mask in load_pdptrs() Also remove bit 5-6 from rsvd_bits_mask per latest SDM. Signed-off-by: Eddie Dong Signed-off-by: Avi Kivity commit 93ba03c2e2aba23b042cc15eef83b7a66d3ac17a Author: Sheng Yang Date: Wed Apr 1 15:52:32 2009 +0800 KVM: VMX: Fix feature testing The testing of feature is too early now, before vmcs_config complete initialization. Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit 045471563df4b8723202a66ae54d58788b0f8e88 Author: Sheng Yang Date: Wed Apr 1 15:52:31 2009 +0800 KVM: VMX: Clean up Flex Priority related And clean paranthes on returns. Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit 7a6ce84c74a3064f6b6dda9e2d55c509cd4e78e4 Author: Wei Yongjun Date: Tue Mar 31 16:47:44 2009 +0800 KVM: remove pointless conditional before kfree() in lapic initialization Remove pointless conditional before kfree(). Signed-off-by: Wei Yongjun Signed-off-by: Avi Kivity commit 9645bb56b31a1b70ab9e470387b5264cafc04aa9 Author: Avi Kivity Date: Tue Mar 31 11:31:54 2009 +0300 KVM: MMU: Use different shadows when EFER.NXE changes A pte that is shadowed when the guest EFER.NXE=1 is not valid when EFER.NXE=0; if bit 63 is set, the pte should cause a fault, and since the shadow EFER always has NX enabled, this won't happen. Fix by using a different shadow page table for different EFER.NXE bits. This allows vcpus to run correctly with different values of EFER.NXE, and for transitions on this bit to be handled correctly without requiring a full flush. Signed-off-by: Avi Kivity commit 82725b20e22fb85377f61a16f6d0d5cfc28b45d3 Author: Dong, Eddie Date: Mon Mar 30 16:21:08 2009 +0800 KVM: MMU: Emulate #PF error code of reserved bits violation Detect, indicate, and propagate page faults where reserved bits are set. Take care to handle the different paging modes, each of which has different sets of reserved bits. [avi: fix pte reserved bits for efer.nxe=0] Signed-off-by: Eddie Dong Signed-off-by: Avi Kivity commit 362c1055e58ecd25a9393c520ab263c80b147497 Author: Yang Zhang Date: Mon Mar 23 03:31:04 2009 -0400 KVM: ia64: enable external interrupt in vmm Currently, the interrupt enable bit is cleared when in the vmm. This patch sets the bit and the external interrupts can be dealt with when in the vmm. This improves the I/O performance. Signed-off-by: Yang Zhang Signed-off-by: Avi Kivity commit a8b876b1a469cb364fee16ba3aef01613a1231cc Author: Eddie Dong Date: Thu Mar 26 15:28:40 2009 +0800 KVM: MMU: Fix comment in page_fault() The original one is for the code before refactoring. Signed-off-by: Yaozu (Eddie) Dong Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit f9c617f61127615dd054f3f159213bdd12451cab Author: Sheng Yang Date: Wed Mar 25 10:08:52 2009 +0800 KVM: VMX: Correct wrong vmcs field sizes EXIT_QUALIFICATION and GUEST_LINEAR_ADDRESS are natural width, not 64-bit. Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit 7d433b9f942606f66da8ef68b8baecd2915c5627 Author: Avi Kivity Date: Tue Mar 24 14:27:47 2009 +0200 KVM: VMX: Make flexpriority module parameter reflect hardware capability If the hardware does not support flexpriority, zero the module parameter. Signed-off-by: Avi Kivity commit 78646121e9a2fcf7977cc15966420e572a450bc3 Author: Gleb Natapov Date: Mon Mar 23 12:12:11 2009 +0200 KVM: Fix interrupt unhalting a vcpu when it shouldn't kvm_vcpu_block() unhalts vpu on an interrupt/timer without checking if interrupt window is actually opened. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 09cec754885f900f6aab23801878c0cd217ee1d6 Author: Gleb Natapov Date: Mon Mar 23 15:11:44 2009 +0200 KVM: Timer event should not unconditionally unhalt vcpu. Currently timer events are processed before entering guest mode. Move it to main vcpu event loop since timer events should be processed even while vcpu is halted. Timer may cause interrupt/nmi to be injected and only then vcpu will be unhalted. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 089d034e0c4538d2436512fa64782b91008d4a7c Author: Avi Kivity Date: Mon Mar 23 18:26:32 2009 +0200 KVM: VMX: Fold vm_need_ept() into callers Trivial. Signed-off-by: Avi Kivity commit 575ff2dcb25608d53737d1126ee0e7e4d6f11752 Author: Avi Kivity Date: Mon Mar 23 18:25:15 2009 +0200 KVM: VMX: Zero ept module parameter if ept is not present Allows reading back hardware capability. Signed-off-by: Avi Kivity commit 919818abc2ca0721f1cd296fbc24601d9044f993 Author: Avi Kivity Date: Mon Mar 23 18:01:29 2009 +0200 KVM: VMX: Zero the vpid module parameter if vpid is not supported This allows reading back how the hardware is configured. Signed-off-by: Avi Kivity commit 4462d21a615dfd0c0f672c10832a011d6f280d5a Author: Avi Kivity Date: Mon Mar 23 17:53:37 2009 +0200 KVM: VMX: Annotate module parameters as __read_mostly Signed-off-by: Avi Kivity commit 736caefe1511d9d1116ed4ffb0ea95b7368beb1f Author: Avi Kivity Date: Mon Mar 23 17:39:48 2009 +0200 KVM: VMX: Simplify module parameter names Instead of 'enable_vpid=1', use a simple 'vpid=1'. Signed-off-by: Avi Kivity commit 6062d012ed23c29672bb0f93ebcfb8e556def726 Author: Avi Kivity Date: Mon Mar 23 17:35:17 2009 +0200 KVM: VMX: Rename kvm_handle_exit() to vmx_handle_exit() It is a static vmx-specific function. Signed-off-by: Avi Kivity commit c1f8bc04c6f8576553dc87abe7562e868433a19f Author: Avi Kivity Date: Mon Mar 23 15:41:17 2009 +0200 KVM: VMX: Make module parameters readable Useful to see how the module was loaded. Signed-off-by: Avi Kivity commit fe4c7b1914ac46af751d256f5a20c2e12dcbaaae Author: Gleb Natapov Date: Mon Mar 23 11:23:18 2009 +0200 KVM: reuse (pop|push)_irq from svm.c in vmx.c The prioritized bit vector manipulation functions are useful in both vmx and svm. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 61c50edfcd40be9126579f9cec68c789b6089998 Author: Gleb Natapov Date: Sun Mar 22 12:37:05 2009 +0200 KVM: SVM: Remove duplicate code in svm_do_inject_vector() svm_do_inject_vector() reimplements pop_irq(). Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit 7fe29e0faacb650d31b9e9f538203a157bec821d Author: Amit Shah Date: Fri Mar 20 12:39:00 2009 +0530 KVM: x86: Ignore reads to EVNTSEL MSRs We ignore writes to the performance counters and performance event selector registers already. Kaspersky antivirus reads the eventsel MSR causing it to crash with the current behaviour. Return 0 as data when the eventsel registers are read to stop the crash. Signed-off-by: Amit Shah Signed-off-by: Avi Kivity commit f00be0cae4e6ad0a8c7be381c6d9be3586800b3e Author: Gleb Natapov Date: Thu Mar 19 12:20:36 2009 +0200 KVM: MMU: do not free active mmu pages in free_mmu_pages() free_mmu_pages() should only undo what alloc_mmu_pages() does. Free mmu pages from the generic VM destruction function, kvm_destroy_vm(). Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity commit e56d532f20c890a06bbe7cd479f4201e3a03cd73 Author: Sheng Yang Date: Thu Mar 12 21:45:39 2009 +0800 KVM: Device assignment framework rework After discussion with Marcelo, we decided to rework device assignment framework together. The old problems are kernel logic is unnecessary complex. So Marcelo suggest to split it into a more elegant way: 1. Split host IRQ assign and guest IRQ assign. And userspace determine the combination. Also discard msi2intx parameter, userspace can specific KVM_DEV_IRQ_HOST_MSI | KVM_DEV_IRQ_GUEST_INTX in assigned_irq->flags to enable MSI to INTx convertion. 2. Split assign IRQ and deassign IRQ. Import two new ioctls: KVM_ASSIGN_DEV_IRQ and KVM_DEASSIGN_DEV_IRQ. This patch also fixed the reversed _IOR vs _IOW in definition(by deprecated the old interface). [avi: replace homemade bitcount() by hweight_long()] Signed-off-by: Marcelo Tosatti Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit 386eb6e8b3caface8a0514da70a47c05cabb5b96 Author: Hannes Eder Date: Tue Mar 10 22:51:09 2009 +0100 KVM: make 'lapic_timer_ops' and 'kpit_ops' static Fix this sparse warnings: arch/x86/kvm/lapic.c:916:22: warning: symbol 'lapic_timer_ops' was not declared. Should it be static? arch/x86/kvm/i8254.c:268:22: warning: symbol 'kpit_ops' was not declared. Should it be static? Signed-off-by: Hannes Eder Signed-off-by: Avi Kivity commit 0b5d7a2ccb98f0403b1969295429724af9dc9d8e Author: Jes Sorensen Date: Wed Feb 25 10:38:55 2009 -0600 KVM: ia64: Drop in SN2 replacement of fast path ITC emulation fault handler Copy in SN2 RTC based ITC emulation for fast exit. The two versions have the same size, so a dropin is simpler than patching the branch instruction to hit the SN2 version. Signed-off-by: Jes Sorensen Acked-by: Xiantao Zhang Signed-off-by: Avi Kivity commit ce17c643738bebcacf8d19d8cab7dd3eb96f9f32 Author: Jes Sorensen Date: Wed Feb 25 10:38:54 2009 -0600 KVM: ia64: SN2 adjust emulated ITC frequency to match RTC frequency On SN2 do not pass down the real ITC frequency, but rather patch the values to match the SN2 RTC frequency. Signed-off-by: Jes Sorensen Acked-by: Xiantao Zhang Signed-off-by: Avi Kivity commit c6c9fcdf0fff7da77c088be11e3c4d0181b36941 Author: Jes Sorensen Date: Wed Feb 25 10:38:53 2009 -0600 KVM: ia64: Create inline function kvm_get_itc() to centralize ITC reading. Move all reading of special register 'AR_ITC' into two functions, one in the kernel and one in the VMM module. When running on SN2, base the result on the RTC rather the system ITC, as the ITC isn't synchronized. Signed-off-by: Jes Sorensen Acked-by: Xiantao Zhang Signed-off-by: Avi Kivity commit 0c72ea7fb8a39b4bba071b19f5f835af5b5e538a Author: Jes Sorensen Date: Wed Feb 25 10:38:52 2009 -0600 KVM: ia64: Map in SN2 RTC registers to the VMM module On SN2, map in the SN2 RTC registers to the VMM module, needed for ITC emulation. Signed-off-by: Jes Sorensen Acked-by: Xiantao Zhang Signed-off-by: Avi Kivity commit 58c2dde17d6eb6c8c0566e52d184aa16755d890f Author: Gleb Natapov Date: Thu Mar 5 16:35:04 2009 +0200 KVM: APIC: get rid of deliver_bitmask Deliver interrupt during destination matching loop. Signed-off-by: Gleb Natapov Acked-by: Xiantao Zhang Signed-off-by: Marcelo Tosatti commit e1035715ef8d3171e29f9c6aee6f40d57b3fead5 Author: Gleb Natapov Date: Thu Mar 5 16:34:59 2009 +0200 KVM: change the way how lowest priority vcpu is calculated The new way does not require additional loop over vcpus to calculate the one with lowest priority as one is chosen during delivery bitmap construction. Signed-off-by: Gleb Natapov Signed-off-by: Marcelo Tosatti commit 343f94fe4d16ec898da77720c03da9e09f8523d2 Author: Gleb Natapov Date: Thu Mar 5 16:34:54 2009 +0200 KVM: consolidate ioapic/ipi interrupt delivery logic Use kvm_apic_match_dest() in kvm_get_intr_delivery_bitmask() instead of duplicating the same code. Use kvm_get_intr_delivery_bitmask() in apic_send_ipi() to figure out ipi destination instead of reimplementing the logic. Signed-off-by: Gleb Natapov Signed-off-by: Marcelo Tosatti commit a53c17d21c46a752f5ac6695376481bc27865b04 Author: Gleb Natapov Date: Thu Mar 5 16:34:49 2009 +0200 KVM: ioapic/msi interrupt delivery consolidation ioapic_deliver() and kvm_set_msi() have code duplication. Move the code into ioapic_deliver_entry() function and call it from both places. Signed-off-by: Gleb Natapov Signed-off-by: Marcelo Tosatti commit 6da7e3f643cf7099965d75fda8606b9d3a8650b9 Author: Gleb Natapov Date: Thu Mar 5 16:34:44 2009 +0200 KVM: APIC: kvm_apic_set_irq deliver all kinds of interrupts Get rid of ioapic_inj_irq() and ioapic_inj_nmi() functions. Signed-off-by: Gleb Natapov Signed-off-by: Marcelo Tosatti commit f5a1e9f89504f57b2b45645a7239dc8a8ddb0f4c Author: Joerg Roedel Date: Thu Mar 5 13:12:29 2009 +0100 KVM: MMU: remove call to kvm_mmu_pte_write from walk_addr There is no reason to update the shadow pte here because the guest pte is only changed to dirty state. Signed-off-by: Joerg Roedel Signed-off-by: Marcelo Tosatti commit 74a3a8f152053394a016518cc2f2fee216897fa4 Author: Sheng Yang Date: Wed Mar 4 13:33:02 2009 +0800 KVM: Merge kvm_ioapic_get_delivery_bitmask into kvm_get_intr_delivery_bitmask Gleb fixed bitmap ops usage in kvm_ioapic_get_delivery_bitmask. Sheng merged two functions, as well as fixed several issues in kvm_get_intr_delivery_bitmask 1. deliver_bitmask is a bitmap rather than a unsigned long intereger. 2. Lowest priority target bitmap wrong calculated by mistake. 3. Prevent potential NULL reference. 4. Declaration in include/kvm_host.h caused powerpc compilation warning. 5. Add warning for guest broadcast interrupt with lowest priority delivery mode. 6. Removed duplicate bitmap clean up in caller of kvm_get_intr_delivery_bitmask. Signed-off-by: Gleb Natapov Signed-off-by: Sheng Yang Signed-off-by: Marcelo Tosatti commit 3f5e06f8799adca3e7e1bbafe1cd780a3e69f604 Author: Yang Zhang Date: Mon Mar 2 22:06:41 2009 -0500 KVM: ia64: fix compilation error in kvm_get_lowest_prio_vcpu Modify the arg of kvm_get_lowest_prio_vcpu(). Make it consistent with its declaration. Signed-off-by: Yang Zhang Signed-off-by: Marcelo Tosatti commit d3c7b77d1a6e7a0a27035a7ba723a3455317883e Author: Marcelo Tosatti Date: Mon Feb 23 10:57:41 2009 -0300 KVM: unify part of generic timer handling Hide the internals of vcpu awakening / injection from the in-kernel emulated timers. This makes future changes in this logic easier and decreases the distance to more generic timer handling. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity commit fd66842370e32f3bbe429677280a326c07e508c1 Author: Marcelo Tosatti Date: Mon Feb 23 10:57:40 2009 -0300 KVM: PIT: remove usage of count_load_time for channel 0 We can infer elapsed time from hrtimer_expires_remaining. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity commit 5a05d54554f19a128306eca7f7f5ed31f7d7eeb9 Author: Marcelo Tosatti Date: Mon Feb 23 10:57:39 2009 -0300 KVM: PIT: remove unused scheduled variable Unused. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity commit b95b51d580bff9376850eef29d34c3aa08c26db7 Author: Christian Borntraeger Date: Thu Feb 26 13:55:33 2009 +0100 KVM: declare ioapic functions only on affected hardware Since "KVM: Unify the delivery of IOAPIC and MSI interrupts" I get the following warnings: CC [M] arch/s390/kvm/kvm-s390.o In file included from arch/s390/kvm/kvm-s390.c:22: include/linux/kvm_host.h:357: warning: 'struct kvm_ioapic' declared inside parameter list include/linux/kvm_host.h:357: warning: its scope is only this definition or declaration, which is probably not what you want This patch limits IOAPIC functions for architectures that have one. Signed-off-by: Christian Borntraeger Signed-off-by: Avi Kivity commit a90ede7b17d122acd58e6e1ff911be9dcf5263cc Author: Marcelo Tosatti Date: Wed Feb 11 22:45:42 2009 -0200 KVM: x86: paravirt skip pit-through-ioapic boot check Skip the test which checks if the PIT is properly routed when using the IOAPIC, aimed at buggy hardware. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity commit 2dea4c84bc936731668b5a7a9fba5b436a422668 Author: Matt T. Yourst Date: Tue Feb 24 15:28:00 2009 -0300 KVM: x86: silence preempt warning on kvm_write_guest_time This issue just appeared in kvm-84 when running on 2.6.28.7 (x86-64) with PREEMPT enabled. We're getting syslog warnings like this many (but not all) times qemu tells KVM to run the VCPU: BUG: using smp_processor_id() in preemptible [00000000] code: qemu-system-x86/28938 caller is kvm_arch_vcpu_ioctl_run+0x5d1/0xc70 [kvm] Pid: 28938, comm: qemu-system-x86 2.6.28.7-mtyrel-64bit Call Trace: debug_smp_processor_id+0xf7/0x100 kvm_arch_vcpu_ioctl_run+0x5d1/0xc70 [kvm] ? __wake_up+0x4e/0x70 ? wake_futex+0x27/0x40 kvm_vcpu_ioctl+0x2e9/0x5a0 [kvm] enqueue_hrtimer+0x8a/0x110 _spin_unlock_irqrestore+0x27/0x50 vfs_ioctl+0x31/0xa0 do_vfs_ioctl+0x74/0x480 sys_futex+0xb4/0x140 sys_ioctl+0x99/0xa0 system_call_fastpath+0x16/0x1b As it turns out, the call trace is messed up due to gcc's inlining, but I isolated the problem anyway: kvm_write_guest_time() is being used in a non-thread-safe manner on preemptable kernels. Basically kvm_write_guest_time()'s body needs to be surrounded by preempt_disable() and preempt_enable(), since the kernel won't let us query any per-CPU data (indirectly using smp_processor_id()) without preemption disabled. The attached patch fixes this issue by disabling preemption inside kvm_write_guest_time(). [marcelo: surround only __get_cpu_var calls since the warning is harmless] Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity commit d510d6cc653bc4b3094ea73afe12600d0ab445b3 Author: Sheng Yang Date: Wed Feb 25 17:22:28 2009 +0800 KVM: Enable MSI-X for KVM assigned device This patch finally enable MSI-X. What we need for MSI-X: 1. Intercept one page in MMIO region of device. So that we can get guest desired MSI-X table and set up the real one. Now this have been done by guest, and transfer to kernel using ioctl KVM_SET_MSIX_NR and KVM_SET_MSIX_ENTRY. 2. Information for incoming interrupt. Now one device can have more than one interrupt, and they are all handled by one workqueue structure. So we need to identify them. The previous patch enable gsi_msg_pending_bitmap get this done. 3. Mapping from host IRQ to guest gsi as well as guest gsi to real MSI/MSI-X message address/data. We used same entry number for the host and guest here, so that it's easy to find the correlated guest gsi. What we lack for now: 1. The PCI spec said nothing can existed with MSI-X table in the same page of MMIO region, except pending bits. The patch ignore pending bits as the first step (so they are always 0 - no pending). 2. The PCI spec allowed to change MSI-X table dynamically. That means, the OS can enable MSI-X, then mask one MSI-X entry, modify it, and unmask it. The patch didn't support this, and Linux also don't work in this way. 3. The patch didn't implement MSI-X mask all and mask single entry. I would implement the former in driver/pci/msi.c later. And for single entry, userspace should have reposibility to handle it. Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit 2350bd1f62c8706c22b8e58c3bfff10806c0a31b Author: Sheng Yang Date: Wed Feb 25 17:22:27 2009 +0800 KVM: Add MSI-X interrupt injection logic We have to handle more than one interrupt with one handler for MSI-X. Avi suggested to use a flag to indicate the pending. So here is it. Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit c1e01514296e8a4a43ff0c88dcff635cb90feb5f Author: Sheng Yang Date: Wed Feb 25 17:22:26 2009 +0800 KVM: Ioctls for init MSI-X entry Introduce KVM_SET_MSIX_NR and KVM_SET_MSIX_ENTRY two ioctls. This two ioctls are used by userspace to specific guest device MSI-X entry number and correlate MSI-X entry with GSI during the initialization stage. MSI-X should be well initialzed before enabling. Don't support change MSI-X entry number for now. Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit bfd349d073b2838a6a031f057d25e266619b7093 Author: Sheng Yang Date: Wed Feb 11 16:03:40 2009 +0800 KVM: bit ops for deliver_bitmap It's also convenient when we extend KVM supported vcpu number in the future. Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit 110c2faeba1f1994bcb1de55b9c31f4147dbfdb6 Author: Sheng Yang Date: Wed Feb 11 16:03:39 2009 +0800 KVM: Update intr delivery func to accept unsigned long* bitmap Would be used with bit ops, and would be easily extended if KVM_MAX_VCPUS is increased. Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit e5871be0f5d6847bc9585c997acb1b917c168f03 Author: Sheng Yang Date: Wed Feb 11 16:03:38 2009 +0800 KVM: Change API of kvm_ioapic_get_delivery_bitmask In order to use with bit ops. Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit 116191b69b608d0f1513e3abe71d6a46800f2bd6 Author: Sheng Yang Date: Wed Feb 11 16:03:37 2009 +0800 KVM: Unify the delivery of IOAPIC and MSI interrupts Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit cf9e4e15e8f6306b2559979269ead7c02e6b2b95 Author: Sheng Yang Date: Wed Feb 11 16:03:36 2009 +0800 KVM: Split IOAPIC structure Prepared for reuse ioapic_redir_entry for MSI. Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit 5897297bc228fc3c85fdc421fd5c487f9a99821a Author: Avi Kivity Date: Tue Feb 24 22:26:47 2009 +0200 KVM: VMX: Don't intercept MSR_KERNEL_GS_BASE Windows 2008 accesses this MSR often on context switch intensive workloads; since we run in guest context with the guest MSR value loaded (so swapgs can work correctly), we can simply disable interception of rdmsr/wrmsr for this MSR. A complication occurs since in legacy mode, we run with the host MSR value loaded. In this case we enable interception. This means we need two MSR bitmaps, one for legacy mode and one for long mode. Signed-off-by: Avi Kivity commit 3e7c73e9b15eab73e9cf72daf3931925da8afcff Author: Avi Kivity Date: Tue Feb 24 21:46:19 2009 +0200 KVM: VMX: Don't use highmem pages for the msr and pio bitmaps Highmem pages are a pain, and saving three lowmem pages on i386 isn't worth the extra code. Signed-off-by: Avi Kivity commit 40bc9a27e00d6c8c7e4dc2865c02d7402a950472 Author: Steven Whitehouse Date: Wed Jun 10 09:09:40 2009 +0100 GFS2: Fix cache coherency between truncate and O_DIRECT read If a page was partially zeroed as the result of a truncate, then it was not being correctly marked dirty. This resulted in the deleted data reappearing if the file was read back via direct I/O. Reported-by: Eric Sandeen Signed-off-by: Steven Whitehouse commit c1d0d32a603ed06377f404adf2c538de33bb3634 Author: Paul Mundt Date: Wed Jun 10 09:48:33 2009 +0300 sh: plug vsyscall dir in to archclean. The vsyscall targets are presently not cleaned up, so just handle it in the archclean rule. Reported-by: Magnus Damm Signed-off-by: Paul Mundt commit 85e013a18acfad98473a4432bb7082d1fcc74a25 Merge: 4ef2792 92a4379 Author: Takashi Iwai Date: Wed Jun 10 07:26:49 2009 +0200 Merge branch 'topic/usb-audio' into for-linus * topic/usb-audio: ALSA: usb - Add boot quirk for C-Media 6206 USB Audio ALSA: usb-audio - errata corrige for quirk ALSA: usb-audio - Add quirk for Roland/Edirol M-16DX ALSA: usb-audio - quirk for USB Aureon cards commit 4ef279205a1ca4c37bf80811dd9d0f65c854fbf7 Merge: 1282c82 0528c74 Author: Takashi Iwai Date: Wed Jun 10 07:26:48 2009 +0200 Merge branch 'topic/seq-kconfig-cleanup' into for-linus * topic/seq-kconfig-cleanup: ALSA: clean up the logic for building sequencer modules commit 1282c824cc4ad5b43fc1813e7ea564c0d6f0d046 Merge: 45d60e3 82ced6f Author: Takashi Iwai Date: Wed Jun 10 07:26:46 2009 +0200 Merge branch 'topic/section-fix' into for-linus * topic/section-fix: ALSA: Add missing __devexit_p() markers ALSA: powermac - Replace the rest of __init* ALSA: sound/ppc: update annotations of serveral functions commit 45d60e3648eaba1f5f6976df901fb7c45660fb49 Merge: 87cb14a b0ec3a3 Author: Takashi Iwai Date: Wed Jun 10 07:26:45 2009 +0200 Merge branch 'topic/sc6000' into for-linus * topic/sc6000: ALSA: sc6000: enable joystick port ALSA: sc6000: fix older card initialization ALSA: sc6000: add support for SC-6600 and SC-7000 commit 87cb14a5f46207f5c445dd755096f8568d136a2a Merge: 4ad7543 db1005e Author: Takashi Iwai Date: Wed Jun 10 07:26:44 2009 +0200 Merge branch 'topic/riptide' into for-linus * topic/riptide: ALSA: riptide - Fix joystick resource handling ALSA: riptide - Code clean up commit 4ad75433c2a8a2eab16b077456202815adc536f9 Merge: 3b88bc5 9a83b74 Author: Takashi Iwai Date: Wed Jun 10 07:26:43 2009 +0200 Merge branch 'topic/pcm-subclass-fix' into for-linus * topic/pcm-subclass-fix: ALSA: Remove invalid GENERIC_MIX PCM sublass commit 3b88bc522986ae853670fcba71bb3761c84f7867 Merge: eabaf06 c007011 Author: Takashi Iwai Date: Wed Jun 10 07:26:41 2009 +0200 Merge branch 'topic/pcm-jiffies-check' into for-linus * topic/pcm-jiffies-check: ALSA: pcm - A helper function to compose PCM stream name for debug prints ALSA: pcm - Fix update of runtime->hw_ptr_interrupt ALSA: pcm - Fix a typo in hw_ptr update check ALSA: PCM midlevel: lower jiffies check margin using runtime->delay value ALSA: PCM midlevel: Do not update hw_ptr_jiffies when hw_ptr is not changed ALSA: PCM midlevel: introduce mask for xrun_debug() macro ALSA: PCM midlevel: improve fifo_size handling commit eabaf0634a9034f2e487b0be347edc1460c026a4 Merge: 9dea75c ae1ec5e Author: Takashi Iwai Date: Wed Jun 10 07:26:40 2009 +0200 Merge branch 'topic/pcm-delay' into for-linus * topic/pcm-delay: ALSA: usbaudio - Add delay account ALSA: Add extra delay count in PCM commit 9dea75c70965c240012251dc5845fe0c1a061180 Merge: 8c3ff3a 04f9890 Author: Takashi Iwai Date: Wed Jun 10 07:26:39 2009 +0200 Merge branch 'topic/oxygen' into for-linus * topic/oxygen: sound: virtuoso: add Xonar Essence ST support sound: virtuoso: enable HDAV S/PDIF input sound: virtuoso: add another DX PCI ID sound: oxygen: reset DMA when stream is closed commit 8c3ff3a7fb9730564554bb65d54455e6ce8ad340 Merge: ed8cc17 ad0b082 Author: Takashi Iwai Date: Wed Jun 10 07:26:37 2009 +0200 Merge branch 'topic/misc' into for-linus * topic/misc: ALSA: sgio2audio.c: clean up checking ALSA: burgundy: timeout message is off by one. ALSA: bt87x - Add a quirk entry for Askey Computer Corp. MagicTView'99 ALSA: parisc/harmony: fix printk format warning ALSA: keywest: Get rid of useless i2c_device_name() macro commit ed8cc176c9d3f8fbc2ddc18b75362be666e6d328 Merge: 03cece0 72cbfd4 Author: Takashi Iwai Date: Wed Jun 10 07:26:36 2009 +0200 Merge branch 'topic/maya44' into for-linus * topic/maya44: ALSA: ice1724 - Add ESI Maya44 support ALSA: ice1724 - Allow spec driver to create own routing controls ALSA: ice1724 - Add PCI postint to reset sequence ALSA: ice1724 - Clean up definitions of DMA records ALSA: ice1724 - Check error in set_rate function commit 03cece06c41431ab71affc540d587e61894d7572 Merge: 3c2fcf3 8338c30 Author: Takashi Iwai Date: Wed Jun 10 07:26:34 2009 +0200 Merge branch 'topic/lx6464es' into for-linus * topic/lx6464es: ALSA: Add missing description of lx6464es to ALSA-Configuration.txt ALSA: lx6464es - Disable lx_message_send() ALSA: lx6464es - Use snd_card_create() ALSA: lx6464es - driver for the digigram lx6464es interface commit 3c2fcf36d78d75eef46c2e39483ff8c3230ae335 Merge: 81ad969 511b4c1 Author: Takashi Iwai Date: Wed Jun 10 07:26:32 2009 +0200 Merge branch 'topic/hdsp' into for-linus * topic/hdsp: ALSA: hdsp - Add a comment about external firmwares for hdsp ALSA: hdsp: allow firmware loading from inside the kernel commit 81ad969dbf8b10c3e79c5811b8328c054c21ef39 Merge: 2f0dabc f03ecf5 Author: Takashi Iwai Date: Wed Jun 10 07:26:31 2009 +0200 Merge branch 'topic/hda' into for-linus * topic/hda: (51 commits) ALSA: hda - Fix the previous tagra-8ch patch ALSA: hda - Add 7.1 support for MSI GX620 ALSA: support Sony Vaio TT ALSA: hda_intel: fix build error when !PM ALSA: hda - More Aspire 8930G fixes ALSA: hda - Acer Aspire 8930G support ALSA: hda - Limit codec-verb retry to limited hardwares ALSA: hda - Add codec bus reset and verb-retry at critical errors ALSA: hda - Reorder and clean-up ALC268 quirk table ALSA: hda - fix audio on LG R510 ALSA: hda - Macbook[Pro] 5 6ch support ALSA: hda-intel: improve initialization for ALC262_HP_BPC model ALSA: hda - Jack Mode changes for Sigmatel boards ALSA: hda - Support NVIDIA 8 channel HDMI audio ALSA: hda - Fix a typo in the previous patch ALSA: hda - Fix reverted LED setup for HP ALSA: hda - Add more register bits definitions ALSA: hda - Always sync writes in single_cmd mode ALSA: hda - Support sync after writing a verb ALSA: hda - Allow concurrent RIRB access in single_cmd mode ... commit 2f0dabcc5f5fde67c64a6f71e9fb369aed39d56f Merge: 19b1a15 806d31d Author: Takashi Iwai Date: Wed Jun 10 07:26:29 2009 +0200 Merge branch 'topic/emu10k1' into for-linus * topic/emu10k1: ALSA: emu10k1 - Fix minimum periods for efx playback commit 19b1a15a3de2b3b6367c968e65bffe9503556ef1 Merge: e618a56 3f7440a Author: Takashi Iwai Date: Wed Jun 10 07:26:28 2009 +0200 Merge branch 'topic/div64-cleanup' into for-linus * topic/div64-cleanup: ALSA: Clean up 64bit division functions commit e618a5609e504845786c71e2825e10b6a9728185 Merge: d3e3743 a5990dc Author: Takashi Iwai Date: Wed Jun 10 07:26:27 2009 +0200 Merge branch 'topic/ctxfi' into for-linus * topic/ctxfi: (35 commits) ALSA: ctxfi - Clear PCM resources at hw_params and hw_free ALSA: ctxfi - Check the presence of SRC instance in PCM pointer callbacks ALSA: ctxfi - Add missing start check in atc_pcm_playback_start() ALSA: ctxfi - Add use_system_timer module option ALSA: ctxfi - Fix wrong model id for UAA ALSA: ctxfi - Clean up probe routines ALSA: ctxfi - Fix / clean up hw20k2 chip code ALSA: ctxfi - Fix possible buffer pointer overrun ALSA: ctxfi - Remove useless initializations and cast ALSA: ctxfi - Fix DMA mask for emu20k2 chip ALSA: ctxfi - Make volume controls more intuitive ALSA: ctxfi - Optimize the native timer handling using wc counter ALSA: ctxfi - Add missing inclusion of linux/math64.h ALSA: ctxfi - Set device 0 for mixer control elements ALSA: ctxfi - Clean up / optimize ALSA: ctxfi - Set periods_min to 2 ALSA: ctxfi - Use native timer interrupt on emu20k1 ALSA: ctxfi - Fix previous fix for 64bit DMA ALSA: ctxfi - Fix endian-dependent codes ALSA: ctxfi - Allow 64bit DMA ... commit d3e3743694cbfd64450b3468e11b40ba8c6f4369 Merge: d108728 5fdc18d Author: Takashi Iwai Date: Wed Jun 10 07:26:26 2009 +0200 Merge branch 'topic/core-id-check' into for-linus * topic/core-id-check: ALSA: Core - clean up snd_card_set_id* calls and remove possible id collision ALSA: Fix double locking of card list in snd_card_register() commit d108728ea24a766335ae22f10bfaf41f248fb70e Merge: ab2f06c ef9dfa4 Author: Takashi Iwai Date: Wed Jun 10 07:26:24 2009 +0200 Merge branch 'topic/cleanup' into for-linus * topic/cleanup: ALSA: Remove deprecated include/sound/driver.h ALSA: Remove deprecated snd_card_new() commit ab2f06cb6b7cc4cb782387a19fbfed3dfe8a8436 Merge: a963203 c6e24d4 Author: Takashi Iwai Date: Wed Jun 10 07:26:23 2009 +0200 Merge branch 'topic/caiaq' into for-linus * topic/caiaq: ALSA: snd_usb_caiaq: bump version number ALSA: snd_usb_caiaq: give better shortname ALSA: Core - add snd_card_set_id() function ALSA: snd_usb_caiaq: give better longname ALSA: snd_usb_caiaq: use strlcpy ALSA: snd_usb_caiaq: clean whitespaces commit a963203c18e5988506bd173b75ca002df528ed48 Merge: 1d479f8 c486567 Author: Takashi Iwai Date: Wed Jun 10 07:26:22 2009 +0200 Merge branch 'topic/ca0106' into for-linus * topic/ca0106: ALSA: ca0106 - Fix master volume scale ALSA: ca0106 - Add missing card->mixername field setup ALSA: ca0106 - Add missing registrations of vmaster controls commit 1d479f89ec9f29df220bfa1af297ab2f35be1e30 Merge: ba252af e9ab33d Author: Takashi Iwai Date: Wed Jun 10 07:26:21 2009 +0200 Merge branch 'topic/au88x0' into for-linus * topic/au88x0: ALSA: au88x0: fix wrong period_elapsed() call ALSA: au88x0: fix .pointer callback commit ba252af8d60f543a2a2c03f5574f64007ae9c2f3 Merge: 07a2039 74b8f95 Author: Takashi Iwai Date: Wed Jun 10 07:26:18 2009 +0200 Merge branch 'topic/asoc' into for-linus * topic/asoc: (135 commits) ASoC: Apostrophe patrol ASoC: codec tlv320aic23 fix bogus divide by 0 message ASoC: fix NULL pointer dereference in soc_suspend() ASoC: Fix build error in twl4030.c ASoC: SSM2602: assign last substream to the master when shutting down ASoC: Blackfin: document how anomaly 05000250 is handled ASoC: Blackfin: set the transfer size according the ac97_frame size ASoC: SSM2602: remove unsupported sample rates ASoC: TWL4030: Check the interface format for 4 channel mode ASoC: TWL4030: Use reg_cache in twl4030_init_chip ASoC: Initialise dev for the dummy S/PDIF DAI ASoC: Add dummy S/PDIF codec support ASoC: correct print specifiers for unsigneds ASoC: Modify mpc5200 AC97 driver to use V9 of spin_event_timeout() ASoC: Switch FSL SSI DAI over to symmetric_rates ASoC: Mark MPC5200 AC97 as BROKEN until PowerPC merge issues are resolved ASoC: Fabric bindings for STAC9766 on the Efika ASoC: Support for AC97 on Phytec pmc030 base board. ASoC: AC97 driver for mpc5200 ASoC: Main rewite of the mpc5200 audio DMA code ... commit 2b83868723d090078ac0e2120e06a1cc94dbaef0 Author: Linus Torvalds Date: Tue Jun 9 20:40:25 2009 -0700 Make /dev/zero reads interruptible by signals This helps with bad latencies for large reads from /dev/zero, but might conceivably break some application that "knows" that a read of /dev/zero cannot return early. So do this early in the merge window to give us maximal test coverage, even if the patch is totally trivial. Obviously, no well-behaved application should ever depend on the read being uninterruptible, but hey, bugs happen. Signed-off-by: Linus Torvalds commit 35f2c2f6f6ae13ef23c4f68e6d3073753077ca43 Author: Paul Mundt Date: Tue Jun 9 17:48:56 2009 +0900 nommu: Provide mmap_min_addr definition. With the "security: use mmap_min_addr indepedently of security models" change, mmap_min_addr is used in common areas, which susbsequently blows up the nommu build. This stubs in the definition in the nommu case as well. Signed-off-by: Paul Mundt -- mm/nommu.c | 3 +++ 1 file changed, 3 insertions(+) Signed-off-by: James Morris commit fc847ab4318cd6ab6c231739ad51d2502d19a87a Author: James Bottomley Date: Tue Jun 9 23:01:01 2009 +0000 [SCSI] mpt fusion: fix up doc book comments Several of the doc book in the previous patches had incorrect multi-line short function descriptors. Fixed it all to be the correct single line descriptor. Signed-off-by: James Bottomley commit db7051b2984d2c7d44b6178ad4c523500dff7f7c Author: Kashyap, Desai Date: Fri May 29 16:56:59 2009 +0530 [SCSI] mpt fusion: Added support for Broadcast primitives Event handling Firmware is able to handle Broadcast primitives, but upstream driver does not have support for broadcast primitive handling. Now this patch is mainly to support broadcast primitives. Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley commit 57e985136bfafdfcd72c4c7d91115955d225677e Author: Kashyap, Desai Date: Fri May 29 16:55:09 2009 +0530 [SCSI] mpt fusion: Queue full event handling FW will report Queue full event to Driver and driver will handle this queue full event to SCSI Mid layer. Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley commit a7938b0bb3b458fe0723608be3db6c4ed8d79a8c Author: Kashyap, Desai Date: Fri May 29 16:53:56 2009 +0530 [SCSI] mpt fusion: RAID device handling and Dual port Raid support is added 1. Handle integrated Raid device(Add/Delete) and error condition and check related to Raid device. is_logical_volume will represent logical volume device. 2. Raid device dual port support is added. Main functions to support this feature are mpt_raid_phys_disk_get_num_paths and mpt_raid_phys_disk_pg1. Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley commit 71278192a887d7da3e768809c6fe9979d172ff23 Author: Kashyap, Desai Date: Fri May 29 16:53:14 2009 +0530 [SCSI] mpt fusion: Put IOC into ready state if it not already in ready state Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley commit 2f187862e579f1f5e883188cab6bd867cb60387f Author: Kashyap, Desai Date: Fri May 29 16:52:37 2009 +0530 [SCSI] mpt fusion: Code Cleanup patch Resending patch considering Grants G's code review. Main goal to submit this patch is code cleaup. 1. Better driver debug prints and code indentation. 2. fault_reset_work_lock is not used anywhere. driver is using taskmgmt_lock instead of fault_reset_work_lock. 3. setting pci_set_drvdata properly. 4. Ingore config request when IOC is in reset state.( ioc_reset_in_progress is set). 5. Init/clear managment frame proprely.(INITIALIZE_MGMT_STATUS and CLEAR_MGMT_STATUS) Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley commit eedf92b99806aeff18dc21c9dfb28999ce374413 Author: Kashyap, Desai Date: Fri May 29 16:51:32 2009 +0530 [SCSI] mpt fusion: Rescan SAS topology added 1.) SAS topology Rescan is added. If Firmware is doing Reset and we get Device add interrupt from Firmware, we will not receive it as part of Reset is going ON. After Reset we will do special Rescan of SAS topology. 2.) Driver version changed from 3.04.08 to 3.04.09. Added proper lock/unlock in mptsas_not_responding_devices() as per James' comment. Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley commit f9c34022eae9c76465dc2ec8805b9905e171ef40 Author: Kashyap, Desai Date: Fri May 29 16:49:36 2009 +0530 [SCSI] mpt fusion: SAS topology scan changes, expander events SAS topology scan is restructured. HBA firmware is generating more events. Expander Events are added, Link status events are also added with respect to SAS topology scan optimization. Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley commit 3eb0822c6740c5564c37a2fe56449cdb4f3d800c Author: Kashyap, Desai Date: Fri May 29 16:47:26 2009 +0530 [SCSI] mpt fusion: Firmware event implementation using seperate WorkQueue Now Firmware events are handled by firmware event queue. Previously it was handled in interrupt context/WorkQueue of Linux. Firmware Event handling is restructured and optimized. Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley commit ea2a788de4ce5ebab09276e25443f55592af2335 Author: Kashyap, Desai Date: Fri May 29 16:46:50 2009 +0530 [SCSI] mpt fusion: rewrite of ioctl_cmds internal generated function 1) rewrite of ioctl_cmds internal generated function that issue commands to firmware, porting them to be single threaded using the generic MPT_MGMT struct. All wait Queues are replace by completion Queue. 2) added seperate callback handler for ioctl task managment (mptctl_taskmgmt_reply), to handle command that timeout 3) rewrite mptctl_bus_reset Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley commit e7deff3374cc5951f914dcb3c66bc1b8de8a084e Author: Kashyap, Desai Date: Fri May 29 16:46:07 2009 +0530 [SCSI] mpt fusion: Adding DeviceResetCtx for internal Device reset frame 1.) Added taskmgmt_quiesce_io flag in IOC and removed resetPending from _MPT_SCSI_HOST struct. 2.) Reset from Scsi mid layer and internal Reset are seperate context. Adding DeviceResetCtx for internal Device reset frame. mptsas_taskmgmt_complete is optimized as part of implementation. Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley commit 1ba9ab2eb2c53df52e498779e14cf4e5ea77b0ad Author: Kashyap, Desai Date: Fri May 29 16:44:48 2009 +0530 [SCSI] mpt fusion: rewrite taskmgmt request and completion routines 1.) rewrite taskmanagement request and completion routines, making them single threaded and using the generic MPT_MGMT struct, deleting mptscsih_TMHandler, replacing with single request TM handler mptscsih_IssueTaskMgmt, and killing the watchdog timer functions. 2.) cleanup ioc_reset callback handlers, introducing wrappers for synchronizing error recovery (mpt_set_taskmgmt_in_progress_flag, mpt_clear_taskmgmt_in_progress_flag), as the fusion firmware only handles one task management request at a time Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley commit 37c60f374a855974c27bd30d5662a8fa5e933792 Author: Kashyap, Desai Date: Fri May 29 16:44:06 2009 +0530 [SCSI] mpt fusion: rewrite of all internal generated functions Rewrite of all internal generated functions that issue commands to firmware, porting them to be single threaded using the generic MPT_MGMT struct. Implemented using completion Queue. Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley commit f0f09d3b3f06900d64971625d6753dea0623ed45 Author: Kashyap, Desai Date: Fri May 29 16:40:57 2009 +0530 [SCSI] mpt fusion: config path optimized, completion queue is used 1) Previously we had mutliple #defines to use same values. Now those #defines are optimized. MPT_IOCTL_STATUS_* is removed and MPT_MGMT_STATUS_* are new #defines. 2.) config path is optimized. Instead of wait Queue and timer, using completion Q. 3.) mpt_timer_expired is not used. [jejb: elide patch to eliminate mpt_timer_expired] Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley commit fd76175a7d3abf4d14df17f5f4c7e68b466b455d Author: Kashyap, Desai Date: Fri May 29 16:39:06 2009 +0530 [SCSI] mpt fusion: Optimized SendEvent notification Using Doorbell instead FIFO SendEventNotification was handled through FIFO, now it is using doorbell to communicate with hardware. Added Sleep Flag as an extra argument to support Can-Sleep feature. Resending patch including compilation error fix reviewed by Grant Grundler. Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley commit 7b5a65b9e649dad9cf9c6d282df4162843070351 Author: Kashyap, Desai Date: Fri May 29 16:38:14 2009 +0530 [SCSI] mpt fusion: Added support for MPT discovery completion check sas_discovery_quiesce_io flag is used to control IO start/resume functionality. IO will be stoped while doing discovery of topology. Once discovery is completed It will resume IO. Resending patch including James review. Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley commit 14d0f0b063f5363984dd305a792854f9c23e9e97 Author: Kashyap, Desai Date: Fri May 29 16:37:04 2009 +0530 [SCSI] mpt fusion: Fixing 1078 data corruption issue for 36GB memory region The reason for this change is there is a data corruption when four different physical memory regions in the 36GB to 37GB region are accessed. This is only affecting 1078. The solution is we need to use different addressing when filling in the scatter gather table for the effected memory regions. So instead of snooping on all four different memory holes, we treat any physical addresses in the 36GB address with the same algorithm. The fix is explained below 1) Ensure that the message frames are NOT located in the trouble region. There is no remapping available for message frames, they must be allocated outside the problem region. 2) Ensure that Sense buffers are NOT in the trouble region. There is no remapping available. 3) Walk through the SGE entries and if any are inside the trouble region then they need to be remapped as discussed below. 1) Set the Local Address bit in the SGE Flags field. MPI_SGE_FLAGS_LOCAL_ADDRESS 2) Ensure we are using 64-bit SGEs 3) Set MSb (Bit 63) of the 64-bit address, this will indicate buffer location is Host Memory. Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley commit 03d6069912babc07a3da20e715dd6a5dc8f0f867 Author: Keith Packard Date: Fri Jun 5 18:19:56 2009 -0700 drm/i915: Hook connector to encoder during load detection (fixes tv/vga detect) With the DRM-driven DPMS code, encoders are considered idle unless a connector is hooked to them, so mode setting is skipped. This makes load detection fail as none of the hardware is enabled. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt commit 2939e1f5331455d17a4a704dd6210e1474002545 Author: Chris Wilson Date: Sat Jun 6 09:46:03 2009 +0100 drm/i915: NOMEM->NOSPC To differentiate between encountering an out-of-memory error with running out of space in the aperture, use ENOSPC for the later. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 21d509e339565c82887733c02465bb7f5866c8f5 Author: Chris Wilson Date: Sat Jun 6 09:46:02 2009 +0100 drm/i915: use I915_GEM_GPU_DOMAINS Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit b1ce786cb85280490ca3c29a62ddf8608826b414 Author: Chris Wilson Date: Sat Jun 6 09:46:00 2009 +0100 drm/i915: no need to hold mutex for object lookup Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 1f803ee5cea67d2387aeedb4b07e645a743729de Author: Chris Wilson Date: Sat Jun 6 09:45:59 2009 +0100 drm/i915: Call drm_vblank_post_modeset() on error paths. Ensure that the drm_vblank_pre_modeset() is always balanced by drm_vblank_post_modeset() within intel_crtc_mode_set(). Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 110bf2b764eb6026b868d84499263cb24b1bcc8d Author: Steven Rostedt Date: Tue Jun 9 17:29:07 2009 -0400 tracing: add protection around module events unload When reading the trace buffer, there is a race that when a module is unloaded it removes events that is stilled referenced in the buffers. This patch adds the protection around the unloading of the events from modules and the reading of the trace buffers. Signed-off-by: Steven Rostedt commit 5f26a2c7ad6eba97141e8372f3def282f934b169 Author: Chris Wilson Date: Sat Jun 6 09:45:58 2009 +0100 drm/i915: OR in the COMMAND read domain for the batch buffer. The batch buffer may be shared with another read buffer, so we should not ignore any previously set domains, but just or in the command domain (and check that the buffer is not writable). Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 83d60795157c83389e6aaa0532d5e19afa976a24 Author: Chris Wilson Date: Sat Jun 6 09:45:57 2009 +0100 drm/i915: Sanity check execbuffer arguments before touching state. By sending a broken execbuffer (its length was not suitably aligned) I triggered an operation upon a freed object. The invalid alignment was discovered after updating the write_domain on the object but before the object was placed on the active queue. So during the unwind process following the error, the now freed object attempts to flush its non-existent, but outstanding, GPU writes causing this use-after-free. [drm:i915_dispatch_gem_execbuffer] *ERROR* alignment [drm:i915_gem_execbuffer] *ERROR* dispatch failed -22 WARNING: at lib/kref.c:43 warn_slowpath_null+0x10/0x15() Modules linked in: Pid: 4552, comm: lt-csi-drm Not tainted 2.6.30-rc6 #423 Call Trace: [] warn_slowpath_fmt+0x57/0x6d [] ? get_pageblock_migratetype+0x18/0x1e [] ? free_hot_page+0xa/0xc [] ? __free_pages+0x16/0x1f [] ? shmem_truncate_range+0x63e/0x656 [] ? slob_page_alloc+0x146/0x1c8 [] warn_slowpath_null+0x10/0x15 [] kref_get+0x1b/0x21 [] i915_gem_object_move_to_active+0x1f/0x56 [] i915_add_request+0x156/0x19a [] i915_gem_object_flush_gpu_write_domain+0x28/0x3f [] i915_gem_object_unbind+0x4a/0x124 [] i915_gem_free_object+0x33/0x9b [] drm_gem_object_free+0x28/0x4a [] ? drm_gem_object_free+0x0/0x4a [] kref_put+0x38/0x41 [] drm_gem_object_unreference+0x11/0x13 [] drm_gem_object_handle_unreference+0x1e/0x21 [] drm_gem_object_release_handle+0xa/0xe [] idr_for_each+0x5f/0x98 [] ? drm_gem_object_release_handle+0x0/0xe [] drm_gem_release+0x22/0x34 [] drm_release+0x1e8/0x3c4 [] __fput+0xaf/0x146 [] fput+0x12/0x14 [] filp_close+0x48/0x52 [] put_files_struct+0x57/0x9b [] exit_files+0x1e/0x20 [] do_exit+0x16d/0x511 [] ? __schedule+0x3d4/0x3e5 [] ? handle_irq+0xd/0x69 [] do_group_exit+0x4d/0x73 [] sys_exit_group+0x13/0x17 [] sysenter_do_call+0x12/0x2b Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 725c624a58a10ef90a2ff889e122158fabf36147 Author: Steven Rostedt Date: Mon Jun 8 19:09:45 2009 -0400 tracing: add trace_seq_vprint interface The code to update the print formats for events requires a vprintf format in the trace_seq. This patch adds that interface. Signed-off-by: Steven Rostedt commit fa0864b26b4bfa1dd4bb78eeffbc1f398cb56425 Author: Michael Cousin Date: Fri Jun 5 21:16:22 2009 +0200 drm/i915: Skip lvds with Aopen i945GTt-VFA Signed-off-by: Michael Cousin Signed-off-by: Eric Anholt commit 6556d1df88fe68f9836beeb43342a336691cb67c Author: Steven Rostedt Date: Tue Jun 9 14:04:26 2009 -0400 tracing: fix the block trace points print size The sector field is either u64 or unsigned long depending on the arch. This patch casts the sector to unsigned long long to prevent the printf warnings. [ Impact: remove compile warnings ] Signed-off-by: Steven Rostedt commit 80a538e49daddbf3bf783f3464e91bd3181957b2 Author: Zhenyu Wang Date: Mon Jun 8 14:40:20 2009 +0800 drm/i915: Enable probe on new chipset Signed-off-by: Zhenyu Wang Signed-off-by: Eric Anholt commit 036a4a7d9272582fc7370359515d807393e2f728 Author: Zhenyu Wang Date: Mon Jun 8 14:40:19 2009 +0800 drm/i915: handle interrupt on new chipset Update interrupt handling methods for IGDNG with new registers for display and graphics interrupt functions. As we won't use irq-based vblank sync in dri2, so display interrupt on new chip will be used for hotplug only in future. Signed-off-by: Zhenyu Wang Signed-off-by: Eric Anholt commit d765898970f35acef960581f678b9da9d5c779fa Author: Jesse Barnes Date: Fri Jun 5 14:41:29 2009 +0000 drm/i915: enable MCHBAR if needed Using the new PNP resource checking code, this patch allows the i915 driver to allocate MCHBAR space if needed and use the BAR to determine current memory settings. [apw@canonical.com: moved to the new generic PNP resource interface] Signed-off-by: Jesse Barnes Signed-off-by: Andy Whitcroft Signed-off-by: Eric Anholt failure to update-index after git-am --reject to hand-apply Signed-off-by: Eric Anholt commit 55782138e47d9baf2f7d3a7af9e7cf42adf72c56 Author: Li Zefan Date: Tue Jun 9 13:43:05 2009 +0800 tracing/events: convert block trace points to TRACE_EVENT() TRACE_EVENT is a more generic way to define tracepoints. Doing so adds these new capabilities to this tracepoint: - zero-copy and per-cpu splice() tracing - binary tracing without printf overhead - structured logging records exposed under /debug/tracing/events - trace events embedded in function tracer output and other plugins - user-defined, per tracepoint filter expressions ... Cons: - no dev_t info for the output of plug, unplug_timer and unplug_io events. no dev_t info for getrq and sleeprq events if bio == NULL. no dev_t info for rq_abort,...,rq_requeue events if rq->rq_disk == NULL. This is mainly because we can't get the deivce from a request queue. But this may change in the future. - A packet command is converted to a string in TP_assign, not TP_print. While blktrace do the convertion just before output. Since pc requests should be rather rare, this is not a big issue. - In blktrace, an event can have 2 different print formats, but a TRACE_EVENT has a unique format, which means we have some unused data in a trace entry. The overhead is minimized by using __dynamic_array() instead of __array(). I've benchmarked the ioctl blktrace vs the splice based TRACE_EVENT tracing: dd dd + ioctl blktrace dd + TRACE_EVENT (splice) 1 7.36s, 42.7 MB/s 7.50s, 42.0 MB/s 7.41s, 42.5 MB/s 2 7.43s, 42.3 MB/s 7.48s, 42.1 MB/s 7.43s, 42.4 MB/s 3 7.38s, 42.6 MB/s 7.45s, 42.2 MB/s 7.41s, 42.5 MB/s So the overhead of tracing is very small, and no regression when using those trace events vs blktrace. And the binary output of TRACE_EVENT is much smaller than blktrace: # ls -l -h -rw-r--r-- 1 root root 8.8M 06-09 13:24 sda.blktrace.0 -rw-r--r-- 1 root root 195K 06-09 13:24 sda.blktrace.1 -rw-r--r-- 1 root root 2.7M 06-09 13:25 trace_splice.out Following are some comparisons between TRACE_EVENT and blktrace: plug: kjournald-480 [000] 303.084981: block_plug: [kjournald] kjournald-480 [000] 303.084981: 8,0 P N [kjournald] unplug_io: kblockd/0-118 [000] 300.052973: block_unplug_io: [kblockd/0] 1 kblockd/0-118 [000] 300.052974: 8,0 U N [kblockd/0] 1 remap: kjournald-480 [000] 303.085042: block_remap: 8,0 W 102736992 + 8 <- (8,8) 33384 kjournald-480 [000] 303.085043: 8,0 A W 102736992 + 8 <- (8,8) 33384 bio_backmerge: kjournald-480 [000] 303.085086: block_bio_backmerge: 8,0 W 102737032 + 8 [kjournald] kjournald-480 [000] 303.085086: 8,0 M W 102737032 + 8 [kjournald] getrq: kjournald-480 [000] 303.084974: block_getrq: 8,0 W 102736984 + 8 [kjournald] kjournald-480 [000] 303.084975: 8,0 G W 102736984 + 8 [kjournald] bash-2066 [001] 1072.953770: 8,0 G N [bash] bash-2066 [001] 1072.953773: block_getrq: 0,0 N 0 + 0 [bash] rq_complete: konsole-2065 [001] 300.053184: block_rq_complete: 8,0 W () 103669040 + 16 [0] konsole-2065 [001] 300.053191: 8,0 C W 103669040 + 16 [0] ksoftirqd/1-7 [001] 1072.953811: 8,0 C N (5a 00 08 00 00 00 00 00 24 00) [0] ksoftirqd/1-7 [001] 1072.953813: block_rq_complete: 0,0 N (5a 00 08 00 00 00 00 00 24 00) 0 + 0 [0] rq_insert: kjournald-480 [000] 303.084985: block_rq_insert: 8,0 W 0 () 102736984 + 8 [kjournald] kjournald-480 [000] 303.084986: 8,0 I W 102736984 + 8 [kjournald] Changelog from v2 -> v3: - use the newly introduced __dynamic_array(). Changelog from v1 -> v2: - use __string() instead of __array() to minimize the memory required to store hex dump of rq->cmd(). - support large pc requests. - add missing blk_fill_rwbs_rq() in block_rq_requeue TRACE_EVENT. - some cleanups. Signed-off-by: Li Zefan LKML-Reference: <4A2DF669.5070905@cn.fujitsu.com> Signed-off-by: Steven Rostedt commit f57a8a1911342265e7acdc190333c4e9235a6632 Author: Steven Rostedt Date: Fri Jun 5 14:11:30 2009 -0400 ring-buffer: fix ret in rb_add_time_stamp The update of ret got mistakenly added to the if statement of rb_try_to_discard. The variable ret should be 1 on commit and zero otherwise. [ Impact: fix compiler warning and real bug ] Signed-off-by: Steven Rostedt commit 238ddbb98c327a7392ced5ae65216c55969749ea Author: Alan Cox Date: Tue Jun 9 13:44:02 2009 +0100 [SCSI] gdth: fix overlapping snprintf users Closes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13438 Closes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13437 Signed-off-by: Alan Cox Signed-off-by: James Bottomley commit cf4e6363859d30f24f8cd3e8930dbff399cc3550 Author: Michael Chan Date: Mon Jun 8 18:14:44 2009 -0700 [SCSI] bnx2i: Add bnx2i iSCSI driver. New iSCSI driver for Broadcom BNX2 devices. The driver interfaces with the CNIC driver to access the hardware. Signed-off-by: Anil Veerabhadrappa Signed-off-by: Michael Chan Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit a463696039f7097ce87c21db3cf5c16cdcb3850d Author: Michael Chan Date: Mon Jun 8 18:14:43 2009 -0700 [SCSI] cnic: Add new Broadcom CNIC driver. The CNIC driver controls BNX2 hardware rings and resources used by iSCSI. Most hardware resources for iSCSI are separate from those used for ethernet networking. iSCSI uses a separate MAC address and IP address. The CNIC driver creates a UIO interface to handle the non-offloaded packets such as ARP, etc in userspace. Signed-off-by: Michael Chan Acked-by: David S. Miller Signed-off-by: James Bottomley commit 4edd473f208cff77ce1f7ef26d5a41f31fa198e0 Author: Michael Chan Date: Mon Jun 8 18:14:42 2009 -0700 [SCSI] bnx2: Add support for CNIC driver. Add interface and functions to support a new CNIC driver to drive the Broadcom bnx2 hardware for iSCSI offload. Signed-off-by: Michael Chan Acked-by: David S. Miller Signed-off-by: James Bottomley commit 43514774ff40c4fbe0cbbd3d8293a359f1a9fe71 Author: Michael Chan Date: Mon Jun 8 18:14:41 2009 -0700 [SCSI] iscsi class: Add new NETLINK_ISCSI messages for cnic/bnx2i driver. Add ISCSI_NETLINK messages for iSCSI NICs to get information such as path from userspace. Original iscsid messages are now always sent as multicast to group 1. The new messages are sent to group 2. The multicast changes were made by Mike Christie. Signed-off-by: Michael Chan Signed-off-by: Benjamin Li Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 0b8c3d5ab000c22889af7f9409799a6cdc31a2b2 Author: Chuck Ebbert Date: Tue Jun 9 10:40:50 2009 -0400 x86: Clear TS in irq_ts_save() when in an atomic section The dynamic FPU context allocation changes caused the padlock driver to generate the below warning. Fix it by masking TS when doing padlock encryption operations in an atomic section. This solves: BUG: sleeping function called from invalid context at mm/slub.c:1602 in_atomic(): 1, irqs_disabled(): 0, pid: 82, name: cryptomgr_test Pid: 82, comm: cryptomgr_test Not tainted 2.6.29.4-168.test7.fc11.x86_64 #1 Call Trace: [] __might_sleep+0x10b/0x110 [] kmem_cache_alloc+0x37/0xf1 [] init_fpu+0x49/0x8a [] math_state_restore+0x3e/0xbc [] do_device_not_available+0x9/0xb [] device_not_available+0x1b/0x20 [] ? aes_crypt+0x66/0x74 [padlock_aes] [] ? blkcipher_walk_next+0x257/0x2e0 [] ? blkcipher_walk_first+0x18e/0x19d [] aes_encrypt+0x9d/0xe5 [padlock_aes] [] crypt+0x6b/0x114 [xts] [] ? aes_encrypt+0x0/0xe5 [padlock_aes] [] ? aes_encrypt+0x0/0xe5 [padlock_aes] [] encrypt+0x49/0x4b [xts] [] async_encrypt+0x3c/0x3e [] test_skcipher+0x1da/0x658 [] ? crypto_spawn_tfm+0x8e/0xb1 [] ? __crypto_alloc_tfm+0x11b/0x15f [] ? crypto_spawn_tfm+0x8e/0xb1 [] ? skcipher_geniv_init+0x2b/0x47 [] ? async_chainiv_init+0x5c/0x61 [] alg_test_skcipher+0x63/0x9b [] alg_test+0x12d/0x175 [] cryptomgr_test+0x38/0x54 [] ? cryptomgr_test+0x0/0x54 [] kthread+0x4d/0x78 [] child_rip+0xa/0x20 [] ? restore_args+0x0/0x30 [] ? kthread+0x0/0x78 [] ? child_rip+0x0/0x20 Signed-off-by: Chuck Ebbert Cc: Suresh Siddha LKML-Reference: <20090609104050.50158cfe@dhcp-100-2-144.bos.redhat.com> Signed-off-by: Ingo Molnar commit fecc8ac8496fce96069724f54daba8e7078b0082 Author: Yong Wang Date: Tue Jun 9 21:15:53 2009 +0800 perf_counter, x86: Correct some event and umask values for Intel processors Correct some event and UMASK values according to Intel SDM, in the Nehalem and Atom tables. Signed-off-by: Yong Wang Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: <20090609131553.GA12489@ywang-moblin2.bj.intel.com> Signed-off-by: Ingo Molnar commit 92db1e6af747faa129e236d68386af26a0efc12b Merge: 0bf8412 e9a22a1 Author: Ingo Molnar Date: Tue Jun 9 16:18:11 2009 +0200 Merge branch 'amd-iommu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu into core/iommu commit 0eab928221bac8895a0b494a16a8810002bd8645 Author: Theodore Ts'o Date: Tue Jun 9 09:54:40 2009 -0400 ext4: Don't treat a truncation of a zero-length file as replace-via-truncate If a non-existent file is opened via O_WRONLY|O_CREAT|O_TRUNC, there's no need to treat this as a true file truncation, so we shouldn't activate the replace-via-truncate hueristic. Signed-off-by: "Theodore Ts'o" commit 42937e81a82b6bbc51a309c83da140b3a7ca5945 Author: Andreas Herrmann Date: Mon Jun 8 15:55:09 2009 +0200 x86: Detect use of extended APIC ID for AMD CPUs Booting a 32-bit kernel on Magny-Cours results in the following panic: ... Using APIC driver default ... Overriding APIC driver with bigsmp ... Getting VERSION: 80050010 Getting VERSION: 80050010 Getting ID: 10000000 Getting ID: ef000000 Getting LVT0: 700 Getting LVT1: 10000 Kernel panic - not syncing: Boot APIC ID in local APIC unexpected (16 vs 0) Pid: 1, comm: swapper Not tainted 2.6.30-rcX #2 Call Trace: [] ? panic+0x38/0xd3 [] ? native_smp_prepare_cpus+0x259/0x31f [] ? kernel_init+0x3e/0x141 [] ? kernel_init+0x0/0x141 [] ? kernel_thread_helper+0x7/0x10 The reason is that default_get_apic_id handled extension of local APIC ID field just in case of XAPIC. Thus for this AMD CPU, default_get_apic_id() returns 0 and bigsmp_get_apic_id() returns 16 which leads to the respective kernel panic. This patch introduces a Linux specific feature flag to indicate support for extended APIC id (8 bits instead of 4 bits width) and sets the flag on AMD CPUs if applicable. Signed-off-by: Andreas Herrmann Cc: LKML-Reference: <20090608135509.GA12431@alberich.amd.com> Signed-off-by: Ingo Molnar commit 1d589bb16b825b3a7b4edd34d997f1f1f953033d Author: john cooper Date: Tue Jun 9 14:41:40 2009 +0200 Add serial number support for virtio_blk, V4a This patch extracts the opaque data from pci i/o region 0 via the added VIRTIO_BLK_F_IDENTIFY field. By convention this data takes the form of that returned by an ATA IDENTIFY DEVICE command, however the driver (except for structure size) makes no interpretation of the data. The structure data is copied wholesale to userspace via a HDIO_GET_IDENTITY ioctl command (eg: hdparm -i ). Signed-off-by: john cooper Signed-off-by: Rusty Russell Signed-off-by: Jens Axboe commit e9a22a13c71986851e931bdfa054f68839ff8576 Author: Joerg Roedel Date: Tue Jun 9 12:00:37 2009 +0200 amd-iommu: remove unnecessary "AMD IOMMU: " prefix That prefix is already included in the DUMP_printk macro. So there is no need to repeat it in the format string. Signed-off-by: Joerg Roedel commit 151060ac13144208bd7601d17e4c92c59b98072f Author: Tejun Heo Date: Tue Apr 14 10:54:54 2009 +0900 CUSE: implement CUSE - Character device in Userspace CUSE enables implementing character devices in userspace. With recent additions of ioctl and poll support, FUSE already has most of what's necessary to implement character devices. All CUSE has to do is bonding all those components - FUSE, chardev and the driver model - nicely. When client opens /dev/cuse, kernel starts conversation with CUSE_INIT. The client tells CUSE which device it wants to create. As the previous patch made fuse_file usable without associated fuse_inode, CUSE doesn't create super block or inodes. It attaches fuse_file to cdev file->private_data during open and set ff->fi to NULL. The rest of the operation is almost identical to FUSE direct IO case. Each CUSE device has a corresponding directory /sys/class/cuse/DEVNAME (which is symlink to /sys/devices/virtual/class/DEVNAME if SYSFS_DEPRECATED is turned off) which hosts "waiting" and "abort" among other things. Those two files have the same meaning as the FUSE control files. The only notable lacking feature compared to in-kernel implementation is mmap support. Signed-off-by: Tejun Heo Signed-off-by: Miklos Szeredi commit 71ff3bca2f70264effe8cbbdd5bc10cf6be5f2f0 Author: Joerg Roedel Date: Mon Jun 8 13:47:33 2009 -0700 amd-iommu: detach device explicitly before attaching it to a new domain This fixes a bug with a device that could not be assigned to a KVM guest because it is still assigned to a dma_ops protection domain. [chrisw: simply remove WARN_ON(), will always fire since dev->driver will be pci-sub] Signed-off-by: Chris Wright Signed-off-by: Joerg Roedel commit 29150078d7a1758df8c7a6cd2ec066ac65e1fab9 Author: Joerg Roedel Date: Tue Jun 9 10:54:18 2009 +0200 amd-iommu: remove BUS_NOTIFY_BOUND_DRIVER handling Handling this event causes device assignment in KVM to fail because the device gets re-attached as soon as the pci-stub registers as the driver for the device. Signed-off-by: Joerg Roedel commit d2dd01de9924ae24afeba5aa5bc2e08287701df6 Merge: 367d04c 62a6f46 Author: Joerg Roedel Date: Tue Jun 9 10:50:57 2009 +0200 Merge commit 'tip/core/iommu' into amd-iommu/fixes commit a5990dc5b96f537618b0f057c8723a6a0b0cdc74 Author: Takashi Iwai Date: Tue Jun 9 08:19:02 2009 +0200 ALSA: ctxfi - Clear PCM resources at hw_params and hw_free Currently the PCM resources are allocated only once and ever in prepare callback, assuming that the PCM parameters are never changed. But it's not true. This patch adds the call of atc->pcm_release_resources() at hw_params and hw_free callbacks to assure that the PCM setup is done correctly for each h/w parameter changes. Signed-off-by: Takashi Iwai commit 5242bc7613311aa1a3d5ed41e9cf81015b65563f Author: Takashi Iwai Date: Tue Jun 9 08:17:14 2009 +0200 ALSA: ctxfi - Check the presence of SRC instance in PCM pointer callbacks The SRC instances may not exist when PCM pointer callback is called at the state before initialization is finished. Add the NULL check just to be sure. Signed-off-by: Takashi Iwai commit c399f3be82e1249221a7f410855ab1aa747fa82b Author: Takashi Iwai Date: Tue Jun 9 08:16:20 2009 +0200 ALSA: ctxfi - Add missing start check in atc_pcm_playback_start() Signed-off-by: Takashi Iwai commit 77634f33d4078542cf1087995cced0ffdae25aa2 Author: Martin K. Petersen Date: Tue Jun 9 06:23:22 2009 +0200 block: Add missing bounce_pfn stacking and fix comments DM no longer needs to set limits explicitly when calling blk_stack_limits. Let the latter automatically deal with bounce_pfn scaling. Fix kerneldoc variable names. Signed-off-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 9df1bb9b516daeece159ab7fb262d01a0359247c Author: Jens Axboe Date: Tue Jun 9 06:22:57 2009 +0200 Revert "block: Fix bounce limit setting in DM" This reverts commit a05c0205ba031c01bba33a21bf0a35920eb64833. DM doesn't need to access the bounce_pfn directly. Signed-off-by: Jens Axboe commit 3969251b80a7b143d01576780073fe0cc9ef6253 Author: scameron@beardog.cca.cpqcorp.net Date: Mon Jun 8 16:10:57 2009 -0500 cciss: decode unit attention in SCSI error handling code Make SCSI reset error handler decode unit attention ASC and after a target reset wait for a unit attention that indicates a reset occurred rather than just for any old unit attention. Signed-off-by: Stephen M. Cameron Signed-off-by: Jens Axboe commit 72f9f1324fc4cd450c92e4600a710231b0445c75 Author: scameron@beardog.cca.cpqcorp.net Date: Mon Jun 8 16:09:32 2009 -0500 cciss: Remove no longer needed sendcmd reject processing code Now that the cciss SCSI error handling routines operate with interrupts enabled, we no longer need to maintain the list of command completions that sendcmd() might inadvertantly scoop up, since now it only runs at driver init time, and there won't be any other commands for it to scoop up. So we can remove that list and the code that adds to it and processes it. Signed-off-by: Stephen M. Cameron Signed-off-by: Jens Axboe commit 85cc61ae41084cb6d8ecc6c9e01ac4563005c8ac Author: scameron@beardog.cca.cpqcorp.net Date: Mon Jun 8 16:07:45 2009 -0500 cciss: change SCSI error handling routines to work with interrupts enabled. Change cciss scsi error handling routines to work with interrupts enabled. Signed-off-by: Stephen M. Cameron Signed-off-by: Jens Axboe commit 789a424ad1352b335960e7c56494d0410577fa61 Author: scameron@beardog.cca.cpqcorp.net Date: Mon Jun 8 16:05:56 2009 -0500 cciss: separate error processing and command retrying code in sendcmd_withirq_core() Separate the error processing from sendcmd_withirq_core from the code which retries commands. The rationale for this is that the SCSI error handling code can then be made to use sendcmd_withirq_core, but avoid retrying commands. Signed-off-by: Stephen M. Cameron Signed-off-by: Jens Axboe commit 3c2ab40296894d1f7ad9714550fdf9b96d4e9ee6 Author: scameron@beardog.cca.cpqcorp.net Date: Mon Jun 8 16:04:35 2009 -0500 cciss: factor out fix target status processing code from sendcmd functions Factor out code to process target status of completed commands in sendcmd() and sendcmd_withirq_core(), and fix problem that bad target status was ignored in sendcmd_withirq_core. Signed-off-by: Stephen M. Cameron Signed-off-by: Jens Axboe commit b57695fe131b13d3f2460cfeb9175cff673ed337 Author: scameron@beardog.cca.cpqcorp.net Date: Mon Jun 8 16:02:17 2009 -0500 cciss: simplify interface of sendcmd() and sendcmd_withirq() Simplify interfaces of sendcmd() and sendcmd_withirq() so that they provide only one way to address commands instead of three ways. Signed-off-by: Stephen M. Cameron Signed-off-by: Jens Axboe commit 5390cfc3fea49d015ae1eed8551c0bf00489b50e Author: scameron@beardog.cca.cpqcorp.net Date: Mon Jun 8 16:01:11 2009 -0500 cciss: factor out core of sendcmd_withirq() for use by SCSI error handling code Factor the core of sendcmd_withirq out to provide a simpler interface which provides access to full error information. Signed-off-by: Stephen M. Cameron Signed-off-by: Jens Axboe commit 40df6ae4277a67e97aa0a8bd8e293fdbb00e5623 Author: scameron@beardog.cca.cpqcorp.net Date: Mon Jun 8 15:59:38 2009 -0500 cciss: Use schedule_timeout_uninterruptible in SCSI error handling code Use schedule_timeout_uninterruptible instead of schedule_timeout in the scsi error handling code when waiting between TUR polls since we are not interested in nor want to be interrupted by signals. Signed-off-by: Stephen M. Cameron Signed-off-by: Jens Axboe commit dbb66c4be020b01dc2f3d7c609ddb0e09d2c0af7 Author: FUJITA Tomonori Date: Tue Jun 9 05:47:10 2009 +0200 block: needs to set the residual length of a bidi request Tejun's "block: set rq->resid_len to blk_rq_bytes() on issue" patch seems to be incomplete; It doesn't set rq->resid_len to blk_rq_bytes() for a bidi request (req->next_rq). As a result, all bidi users are broken. Signed-off-by: FUJITA Tomonori Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit c3fa109a5894077d1eaf8731ea741a15dd117b3c Author: Tetsuo Handa Date: Mon Jun 8 12:37:39 2009 +0900 TOMOYO: Add description of lists and structures. This patch adds some descriptions of lists and structures. This patch contains no code changes. Signed-off-by: Tetsuo Handa Signed-off-by: James Morris commit 5bf1692f65c12a8aa359dc883468284ffc3c4587 Author: Tetsuo Handa Date: Fri Jun 5 14:44:58 2009 +0900 TOMOYO: Remove unused field. TOMOYO 2.2.0 is not using total_len field of "struct tomoyo_path_info". Signed-off-by: Tetsuo Handa Signed-off-by: James Morris commit 0b4ec6e4e01d98e55ae325a41304cccd87fa4c0f Merge: 04288f4 3af968e Author: James Morris Date: Tue Jun 9 09:27:53 2009 +1000 Merge branch 'master' into next commit 126c5cc37e682e7c5ae96754994b1cb50c2d0cb5 Author: Brian King Date: Mon Jun 8 16:19:08 2009 -0500 [SCSI] ibmvscsi: Add support for capabilities MAD Add support to ibmvscsi for the capabilities MAD. This command gets sent to the Virtual I/O server prior to login in order to communicate client capabilities. Additionally it returns information regarding capabilities that the server supports. The two main capabilities communicated in this MAD are related to partition migration and client reserve. Client reserve allows for SCSI-2 reservations to be sent to virtual disks which are backed by physical LUNs and will result in the reservation being sent to the physical LUN. Signed-off-by: Brian King Signed-off-by: James Bottomley commit c1988e3123751fd425fbae99d5c1776608e965a9 Author: Robert Jennings Date: Mon Jun 8 16:19:07 2009 -0500 [SCSI] ibmvscsi: Enable fast fail feature A new mode of error reporting, fast fail, has been added to the VIOS which allows failover to happen more quickly. If this new fast fail mode is enabled on the VIOS and the vSCSI client supports the mode, the VIOS will not return MEDIUM error on path failures, but rather return VIOSRP_ADAPTER_FAIL in the crq response, which ibmvscsi will translate to DID_ERROR. This new mode can be enabled for single path configurations as well, so it is the new default error reporting mode. A module parameter is provided to disable this new behavior on the off chance it causes a problem on some old VIOS version. Signed-off-by: Brian King Signed-off-by: James Bottomley commit 3507e13fcba6b97501891a410ec8ef9f1f188620 Author: Brian King Date: Mon Jun 8 16:19:04 2009 -0500 [SCSI] ibmvscsi: Send adapter info before login The ibmvscsi driver currently sends the SRP Login before sending the Adapter Info MAD, which can result in commands getting sent to the virtual adapter before we are ready for them. This results in a slight window where the target devices may not behave as expected. Change the order and close the window. Signed-off-by: Brian King Signed-off-by: James Bottomley commit e1a5ce5b88d06344caec0c71b4ee33e7296358dd Author: Robert Jennings Date: Mon Jun 8 16:19:03 2009 -0500 [SCSI] ibmvscsi: Add specific timeouts for operations Previously we had one timeout that was used for all types of operations. This adds specific timeout values for different operations (init, login, adapter info MAD, abort task, and LUN reset). Signed-off-by: Brian King Signed-off-by: James Bottomley commit fbc56f0801f58041a4372a030933bac076b46aad Author: Brian King Date: Mon Jun 8 16:19:01 2009 -0500 [SCSI] ibmvscsi: Add 16 byte CDB support Adds support for 16 byte CDBs to the ibmvscsi driver. Signed-off-by: Brian King Signed-off-by: James Bottomley commit 1f8a6a10fb9437eac3f516ea4324a19087872f30 Author: Peter Zijlstra Date: Mon Jun 8 18:18:39 2009 +0200 ring-buffer: pass in lockdep class key for reader_lock On Sun, 7 Jun 2009, Ingo Molnar wrote: > Testing tracer sched_switch: <6>Starting ring buffer hammer > PASSED > Testing tracer sysprof: PASSED > Testing tracer function: PASSED > Testing tracer irqsoff: > ============================================= > PASSED > Testing tracer preemptoff: PASSED > Testing tracer preemptirqsoff: [ INFO: possible recursive locking detected ] > PASSED > Testing tracer branch: 2.6.30-rc8-tip-01972-ge5b9078-dirty #5760 > --------------------------------------------- > rb_consumer/431 is trying to acquire lock: > (&cpu_buffer->reader_lock){......}, at: [] ring_buffer_reset_cpu+0x37/0x70 > > but task is already holding lock: > (&cpu_buffer->reader_lock){......}, at: [] ring_buffer_consume+0x7e/0xc0 > > other info that might help us debug this: > 1 lock held by rb_consumer/431: > #0: (&cpu_buffer->reader_lock){......}, at: [] ring_buffer_consume+0x7e/0xc0 The ring buffer is a generic structure, and can be used outside of ftrace. If ftrace traces within the use of the ring buffer, it can produce false positives with lockdep. This patch passes in a static lock key into the allocation of the ring buffer, so that different ring buffers will have their own lock class. Reported-by: Ingo Molnar Signed-off-by: Peter Zijlstra LKML-Reference: <1244477919.13761.9042.camel@twins> [ store key in ring buffer descriptor ] Signed-off-by: Steven Rostedt commit aefcf37b82886260d8540c9fb815e613c8977e06 Author: Ingo Molnar Date: Mon Jun 8 23:15:28 2009 +0200 perf_counter tools: Standardize color printing The rule is: - high overhead: red - mid overhead: green - low overhead: normal (white/black) Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 80d496be89ed7dede5abee5c057634e80a31c82d Author: Pekka Enberg Date: Mon Jun 8 21:12:48 2009 +0300 perf report: Add support for profiling JIT generated code This patch adds support for profiling JIT generated code to 'perf report'. A JIT compiler is required to generate a "/tmp/perf-$PID.map" symbols map that is parsed when looking and displaying symbols. Thanks to Peter Zijlstra for his help with this patch! Example "perf report" output with the Jato JIT: # # (40311 samples) # # Overhead Command Shared Object Symbol # ........ ................ ......................... ...... # 97.80% jato /tmp/perf-11915.map [.] Fibonacci.fib(I)I 0.56% jato 00000000b7fa023b 0x000000b7fa023b 0.45% jato /tmp/perf-11915.map [.] Fibonacci.main([Ljava/lang/String;)V 0.38% jato [kernel] [k] get_page_from_freelist 0.06% jato [kernel] [k] kunmap_atomic 0.05% jato ./jato [.] utf8Hash 0.04% jato ./jato [.] executeJava 0.04% jato ./jato [.] defineClass Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Signed-off-by: Pekka Enberg Cc: a.p.zijlstra@chello.nl Cc: acme@redhat.com LKML-Reference: Signed-off-by: Ingo Molnar commit dab5855b12411334355ba21349a06700e4ae7a3b Author: Peter Zijlstra Date: Mon Jun 8 21:11:57 2009 +0300 perf_counter: Add mmap event hooks to mprotect() Some JIT compilers allocate memory for generated code with posix_memalign() + mprotect() so we need to hook into mprotect() to make sure 'perf' is aware that we're executing code in anonymous memory. [ penberg@cs.helsinki.fi: move the hook to sys_mprotect() ] Cc: Arnaldo Carvalho de Melo Signed-off-by: Pekka Enberg LKML-Reference: Signed-off-by: Ingo Molnar commit 820a644211bc1ac7715333abdb0f0b9ea4fbb549 Author: Thomas Gleixner Date: Mon Jun 8 19:10:25 2009 +0200 perf_counter, x86: Clean up hw_cache_event ids copies Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar commit f86748e91a14bd6cc49477560f33ed5d59896e89 Author: Thomas Gleixner Date: Mon Jun 8 22:33:10 2009 +0200 perf_counter, x86: Implement generalized cache event types, add AMD support Fill in amd_hw_cache_event_id[] with the AMD CPU specific events, for family 0x0f, 0x10 and 0x11. There's apparently no distinction between load and store events, so we only fill in the load events. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit a20b2a44eca52818ef52a94959480b7e6ea2f528 Author: Bartlomiej Zolnierkiewicz Date: Mon Jun 8 22:07:28 2009 +0200 ide: skip probe if there are no devices on the port (v2) In ide_probe_port() skip probe if ide_port_wait_ready() returns -ENODEV and print error message instead of debug one if it returns -EBUSY. v2: Fix the default 'rc' value. Signed-off-by: Bartlomiej Zolnierkiewicz commit 75c2d7d71a85d02594da07d5d2ad587451b64b02 Author: Sergei Shtylyov Date: Mon Jun 8 22:03:03 2009 +0200 sl82c105: add printk() logging facility Add missing printk() logging facility in sl82c105_dma_lost_irq(). Signed-off-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 9d01e4cd7eb4a70b04cf5a5b4f79c99e8e3e3edc Author: Borislav Petkov Date: Mon Jun 8 22:03:03 2009 +0200 ide-tape: fix proc warning ide_tape_chrdev_get() was missing an ide_device_get() refcount increment which lead to the following warning: [ 278.147906] ------------[ cut here ]------------ [ 278.152685] WARNING: at fs/proc/generic.c:847 remove_proc_entry+0x199/0x1b8() [ 278.160070] Hardware name: P4I45PE 1.00 [ 278.160076] remove_proc_entry: removing non-empty directory 'ide0/hdb', leaking at least 'name' [ 278.160080] Modules linked in: rtc intel_agp pcspkr thermal processor thermal_sys parport_pc parport agpgart button [ 278.160100] Pid: 2312, comm: mt Not tainted 2.6.30-rc2 #3 [ 278.160105] Call Trace: [ 278.160117] [] warn_slowpath+0x71/0xa0 [ 278.160126] [] ? _spin_unlock_irqrestore+0x29/0x2c [ 278.160132] [] ? try_to_wake_up+0x1b6/0x1c0 [ 278.160141] [] ? default_wake_function+0xb/0xd [ 278.160149] [] ? pollwake+0x4a/0x55 [ 278.160156] [] ? _spin_unlock+0x24/0x26 [ 278.160163] [] ? add_partial+0x44/0x49 [ 278.160169] [] ? __slab_free+0xba/0x29c [ 278.160177] [] ? sysfs_delete_inode+0x0/0x3c [ 278.160184] [] remove_proc_entry+0x199/0x1b8 [ 278.160191] [] ? remove_dir+0x27/0x2e [ 278.160199] [] ide_proc_unregister_device+0x40/0x4c [ 278.160207] [] drive_release_dev+0x14/0x47 [ 278.160214] [] device_release+0x35/0x5a [ 278.160221] [] kobject_release+0x40/0x50 [ 278.160226] [] ? kobject_release+0x0/0x50 [ 278.160232] [] kref_put+0x3c/0x4a [ 278.160238] [] kobject_put+0x37/0x3c [ 278.160243] [] put_device+0xf/0x11 [ 278.160249] [] ide_device_put+0x2d/0x30 [ 278.160255] [] ide_tape_put+0x24/0x32 [ 278.160261] [] idetape_chrdev_release+0x17f/0x18e [ 278.160269] [] __fput+0xca/0x175 [ 278.160275] [] fput+0x19/0x1b [ 278.160280] [] filp_close+0x51/0x5b [ 278.160286] [] sys_close+0x73/0xad [ 278.160293] [] syscall_call+0x7/0xb [ 278.160298] ---[ end trace f16d907ea1f89336 ]--- Instead of trivially fixing it by adding the missing call, ide_tape_chrdev_get() and ide_tape_get() were merged into one function since both were almost identical. The only difference was that ide_tape_chrdev_get() was accessing the ide-tape reference through the idetape_devs[] array of minors instead of through the gendisk. Accomodate that by adding two additional parameters to ide_tape_get() to annotate the call site and invoke the proper behavior. As a result, remove ide_tape_chrdev_get(). Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit 714df9399b3d2c0a7484e8cfb7c9cb100b0b7f19 Author: Andrew Vasquez Date: Wed Jun 3 09:55:31 2009 -0700 [SCSI] qla2xxx: Update version number to 8.03.01-k3. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 18e7555a38eaadb757353c4b76667e07166ad26c Author: Andrew Vasquez Date: Wed Jun 3 09:55:30 2009 -0700 [SCSI] qla2xxx: Synchronize MPI settings after a PE Reset. Ensure MPS remains in synchronization across all NIC/FCoE functions after a reset. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 656e89122a737b60cebc7b8fcb669faf0e7bc905 Author: Andrew Vasquez Date: Wed Jun 3 09:55:29 2009 -0700 [SCSI] qla2xxx: Export additional firmware-states for application support. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit f999f4c1961fe5399fd66c95860cc2d5d67e591e Author: Andrew Vasquez Date: Wed Jun 3 09:55:28 2009 -0700 [SCSI] qla2xxx: Reduce lock-contention during do-work processing. Queued work processing will now be serialized with its own lower-priority spinlock. This also simplifies the work-queue interface for future work-queue consumers. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 6805c1504eb4cfd4a31c05ed88fdeb56228eb3ba Author: Andrew Vasquez Date: Wed Jun 3 09:55:27 2009 -0700 [SCSI] qla2xxx: Avoid explicit LOGO during driver host tear-down. As firmware will ultimately terminate (stop) and port states-cleared. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit aed10881129c52f0e5dc1c96ac706b5ce7708a13 Author: Andrew Vasquez Date: Wed Jun 3 09:55:26 2009 -0700 [SCSI] qla2xxx: Query supported RISC registers bits in determining a paused-state. ISP24xx and above must query the host-status register, not HCCR. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit e8233ca40bfe7b9dade6cefc984e305516c4eceb Author: Andrew Vasquez Date: Wed Jun 3 09:55:25 2009 -0700 [SCSI] qla2xxx: Avoid redundant RISC reset during (re)-initialization. ISP24xx and above ISPs perform a RISC reset in qla24xx_reset_chip(), which is called prior to qla24xx_chip_diag(). Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit eeebcc922326a2ea0302937b425a0d1471cbd6a7 Author: Andrew Vasquez Date: Wed Jun 3 09:55:24 2009 -0700 [SCSI] qla2xxx: Fallback enode-mac should not be a multicast address. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 81eb9b4985b9cf965f9c05f4679a77fae2a85fe5 Author: Andrew Vasquez Date: Wed Jun 3 09:55:23 2009 -0700 [SCSI] qla2xxx: Add notification message when an NPIV fails to acquire a port-id. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 9f8fddeef2264a0315032b0aa2ee0052dad90076 Author: Andrew Vasquez Date: Wed Jun 3 09:55:22 2009 -0700 [SCSI] qla2xxx: Add 10Gb iiDMA support. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit f4658b6ccc9d54b28b89004accc989db185b6a2e Author: Andrew Vasquez Date: Wed Jun 3 09:55:21 2009 -0700 [SCSI] qla2xxx: Mark a port's state as needing-rediscovery during link disruptions. With RSCN states not being kept across qla2x00_configure_loop() invocations, loop-resync distruptions during fabric-discovery may cause ports to remain in a lost state. Force state renegotiation during a follow-on configure-loop iteration. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit ca9e9c3eb118d0cb9dc2e5232f6f2dcaa4b7a5e0 Author: Andrew Vasquez Date: Wed Jun 3 09:55:20 2009 -0700 [SCSI] qla2xxx: Check status of qla2x00_get_fw_version() call. Unlike earlier ISPs, recent ISPs (ISP81xx) can in fact fail this mailbox command. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 59e0b8b088031b3b751f0608f797f2581f49a827 Author: Anirban Chakraborty Date: Wed Jun 3 09:55:19 2009 -0700 [SCSI] qla2xxx: Correct NULL pointer bug in cpu affinity mode. This patch fixes a NULL pointer bug that occurs when IO is being carried out on a vport for which the cpu affinity mode is turned on. Signed-off-by: Anirban Chakraborty Signed-off-by: James Bottomley commit 94b3aa47ac1ea0aa31b3f59ad121cdf55e038594 Author: Andrew Vasquez Date: Wed Jun 3 09:55:18 2009 -0700 [SCSI] qla2xxx: Use 'proper' DID_* status code for dropped-frame scenarios. The SCSI-midlayer's fast-fail codes consider an DID_ERROR status as a driver-error and the failed I/O would then be retried in the midlayer without being fast-failed to dm-multipath. DID_BUS_BUSY status returns would induce unneeded path-failures events being propagated to the DM/MD. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit cbc8eb67da11a4972834f61fe4729f4c037a17c9 Author: Andrew Vasquez Date: Wed Jun 3 09:55:17 2009 -0700 [SCSI] qla2xxx: Fallback to 'golden-firmware' operation on supported ISPs. In case the onboard firmware is unable to be read or loaded for operation, attempt to fallback to a limited-operational firmware image stored in a different flash region. This will allow a user to reflash and correct a board with proper operational firmware. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 40859ae5f13534624cc35a05179b4f93ecbf531a Author: Anirban Chakraborty Date: Wed Jun 3 09:55:16 2009 -0700 [SCSI] qla2xxx: Correct queue-creation bug when driver loaded in QoS mode. Signed-off-by: Anirban Chakraborty Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 1b91a2e6712393cffc33eeff5cf857f7d5b62fed Author: Andrew Vasquez Date: Wed Jun 3 09:55:15 2009 -0700 [SCSI] qla2xxx: Correct logic-bug in set-model-info(). Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 11bbc1d896637c1d83b11cc3b97ed3d6d2076c63 Author: Andrew Vasquez Date: Wed Jun 3 09:55:14 2009 -0700 [SCSI] qla2xxx: Export TLV data on supported ISPs. Firmware currently provides PB and PGF TLVs. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit ce0423f4a23317d0166addd7d6fcc4a0fa95e751 Author: Andrew Vasquez Date: Wed Jun 3 09:55:13 2009 -0700 [SCSI] qla2xxx: Export XGMAC statistics on supported ISPs. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 7f774025171f626fc1a6a97781967c84a869d277 Author: Andrew Vasquez Date: Wed Jun 3 09:55:12 2009 -0700 [SCSI] qla2xxx: Export negotiated fabric-parameters for application support. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 04145f2bfbc3ac4dbb71fa085b82380444d50b4f Author: Takashi Iwai Date: Mon Jun 8 21:31:50 2009 +0200 ALSA: ctxfi - Add use_system_timer module option Added use_system_timer module option to force to use the system timer instead of emu20k1 timer irq for debugging. Signed-off-by: Takashi Iwai commit 226c7ffe74474257b4b87bd38ae8ba0030cf65e2 Author: Joe Eykholt Date: Wed May 6 10:52:51 2009 -0700 [SCSI] net, libfcoe: Add the FCoE Initialization Protocol ethertype FIP is the FCoE Initialization Protocol and this patch adds the protocol ethertype to the kernel's list of ethertypes. Signed-off-by: Joe Eykholt Signed-off-by: Robert Love Acked-by: David S. Miller Signed-off-by: James Bottomley commit 4e57e1cbbd1435b523b9cedb949728e9fdcfb5d4 Author: Vasu Dev Date: Wed May 6 10:52:46 2009 -0700 [SCSI] fcoe: removes reserving memory for vlan_ethdr on tx path This is not required as VLAN header is added by device interface driver, this was causing bad FC_CRC in FCoE pkts when using VLAN interface. Signed-off-by: Vasu Dev Signed-off-by: James Bottomley commit 1047f22108bd9bfedefd3ff014cb56691dfbaa3f Author: Vasu Dev Date: Wed May 6 10:52:40 2009 -0700 [SCSI] fcoe: removes fcoe_watchdog Removes periodic fcoe_watchdog timer used across all fcoe interface maintained in fcoe_hostlist instead added new fcoe_queue_timer per fcoe interface. Added timer is armed only when some pending skb need to be flushed as oppose to periodic 1 second fcoe_watchdog, since now fcoe_queue_timer is used on demand thus set this to 2 jiffies. Now fcoe_queue_timer is much simple than fcoe_watchdog using lock to process all fcoe interface from fcoe_hostlist. I noticed +ve performance result with using 2 jiffies timer as this helps flushing fcoe_pending_queue quickly. Signed-off-by: Vasu Dev Signed-off-by: James Bottomley commit 4bb6b5153313269b4b328f4f5ddc558c45c50713 Author: Vasu Dev Date: Wed May 6 10:52:34 2009 -0700 [SCSI] fcoe: reduces lock cost when adding a new skb to fcoe_pending_queue Currently fcoe_pending_queue.lock held twice for every new skb adding to this queue when already least one pkt is pending in this queue and that is not uncommon once skb pkts starts getting queued here upon fcoe_start_io => dev_queue_xmit failure. This patch moves most fcoe_pending_queue logic to fcoe_check_wait_queue function, this new logic grabs fcoe_pending_queue.lock only once to add a new skb instead twice as used to be. I think after this patch call flow around fcoe_check_wait_queue calling in fcoe_xmit is bit simplified with modified fcoe_check_wait_queue function taking care of adding and removing pending skb in one function. Signed-off-by: Vasu Dev Signed-off-by: James Bottomley commit 30121d14f503dac056ee7f68d99eb5d548899b59 Author: Steve Ma Date: Wed May 6 10:52:29 2009 -0700 [SCSI] libfc: Check if exchange is completed when receiving a sequence When a sequence is received in response to an exchange we issued previously, we should check to see if the exchange has completed. If yes, the sequence should be discarded. Since the exchange might be still in the completion process, it should be untouched. Signed-off-by: Steve Ma Signed-off-by: James Bottomley commit d5e6054a0a097527b3920a8a0aefe7f830c014fd Author: Mike Christie Date: Wed May 6 10:52:23 2009 -0700 [SCSI] libfc: use DID_ERROR when we have internall aborted command If we aborted a command, because it timed out we should not use DID_ABORT. It will fail the command right away back to the upper layer. We want to use something that indicated that the problem did not complete normally, but it was not a fatal problem. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 0f4915398a4233cdbfc4e9bf4436323546945b3f Author: Chris Leech Date: Wed May 6 10:52:18 2009 -0700 [SCSI] fcoe: use ETH_P_FIP for skb->protocol of FIP frames FIP frames should leave the fcoe layer with skb->protocol set to ETH_P_FIP, not ETH_P_802_3. Signed-off-by: Chris Leech Signed-off-by: James Bottomley commit 5f48f70ecef25df93e122985272ff647f5653836 Author: Joe Eykholt Date: Wed May 6 10:52:12 2009 -0700 [SCSI] libfcoe: fip: fix non-FIP-mode FLOGI state after reset. When a reset is sent using fcoeadm on a non-FIP mode NIC, there's no link flap, so the fcoe_ctlr stays in non-FIP mode. In that case, FIP wasn't setting the flogi_oxid or map_dest flag, causing the FLOGI to be sent with the both wrong source MAC and the wrong destination MAC address, causing it to fail. This leads to a non-functioning HBA until a link flap or instance delete/create. Signed-off-by: Joe Eykholt Signed-off-by: James Bottomley commit f00a3328bf9ecff46abd68a421693ba71cd16fc8 Author: Herbert Xu Date: Sat May 30 13:40:04 2009 +1000 [SCSI] cxgb3i: Include net/dst.h for struct dst_cache This driver needs dst_cache->dev so it should include net/dst.h to ensure that it builds. While net/tcp.h probably includes it already, we shouldn't rely on that since there is no guarantee that this won't change in future. Signed-off-by: Herbert Xu Acked-by: Mike Christie Signed-off-by: James Bottomley commit cbbf58f2e2cb73dbed660fdc7b741a010d6bdbef Author: Brian King Date: Thu May 28 16:17:34 2009 -0500 [SCSI] ibmvfc: Driver version 1.0.6 Bump driver version Signed-off-by: Brian King Signed-off-by: James Bottomley commit 6d29cc56bead73b6f386cf43333708579deb5eed Author: Brian King Date: Thu May 28 16:17:33 2009 -0500 [SCSI] ibmvfc: Improve LOGO/PRLO ELS handling There are several scenarios where the ibmvfc driver needs to try to log back into a target on the fabric. Today when these events occur, we simply go through re-discovery for all attached targets, assuming that either the query of the name server or an ADISC will indicate we might need to log back into the target, which doesn't work for all scenarios. Fix this by taking note of the affected target(s) in these conditions and ensuring we try to PLOGI back into the target. Signed-off-by: Brian King Signed-off-by: James Bottomley commit 5e47167b6be0ca24cbb04fb71ea611ab7c089aff Author: Brian King Date: Thu May 28 16:17:32 2009 -0500 [SCSI] ibmvfc: Improve device rediscovery For certain scenarios during device rediscovery, we detect we need to log back into a target. Currently we do just that - PLOGI/PRLI back into the target. Change the code to delete and add the target from the FC transport layer as well, to ensure we handle any cases where the target may have changed. Signed-off-by: Brian King Signed-off-by: James Bottomley commit 497f9c504f76e7a751cd370604e1c8521743746d Author: Brian King Date: Thu May 28 16:17:30 2009 -0500 [SCSI] ibmvfc: Add flush on halt support The virtual I/O server controlling the NPIV adapter associated with a virtual fibre channel adapter can send a HALT event to the client. When this occurs, the client can no longer send commands until a RESUME is received. By adding support for flush on halt, we will get all of our outstanding commands flushed back before the Virtual I/O server enters the halt state, eliminating potential command timeouts for outstanding commands which might occur if we did not support this feature. Signed-off-by: Brian King Signed-off-by: James Bottomley commit 79111d0899a122fa3cf0a2921292c3e6a25452d0 Author: Brian King Date: Thu May 28 16:17:29 2009 -0500 [SCSI] ibmvfc: Add support for NPIV Logout This patch adds support for a new command supported by the Virtual I/O Server, NPIV Logout. The command will abort all outstanding commands and log out of the fabric. Currently, the only way to do this is by breaking the CRQ, which can take a fairly long time when lots of commands are outstanding. The NPIV Logout commands provides a mechanism to accomplish virtually the same function, but is much faster. Signed-off-by: Brian King Signed-off-by: James Bottomley commit 43c8da907ccc656935d1085701f4db83385d8a59 Author: Brian King Date: Thu May 28 16:17:28 2009 -0500 [SCSI] ibmvfc: Fix deadlock in EH Fixes the following deadlock scenario shown below. We currently allow queuecommand to send commands when the ibmvfc workqueue is scanning for new rports, so we should also allow EH to function at this time as well. scsi_eh_3 D 0000000000000000 12304 1279 2 Call Trace: [c0000002f7257730] [c0000002f72577e0] 0xc0000002f72577e0 (unreliable) [c0000002f7257900] [c0000000000118f4] .__switch_to+0x158/0x1a0 [c0000002f72579a0] [c0000000004f8b40] .schedule+0x8d4/0x9dc [c0000002f7257b60] [c0000000004f8f08] .schedule_timeout+0xa8/0xe8 [c0000002f7257c50] [d0000000001d23e0] .ibmvfc_wait_while_resetting+0xe4/0x140 [ibmvfc] [c0000002f7257d20] [d0000000001d3984] .ibmvfc_eh_abort_handler+0x60/0xe4 [ibmvfc] [c0000002f7257dc0] [d000000000366714] .scsi_error_handler+0x38c/0x674 [scsi_mod] [c0000002f7257f00] [c0000000000a7470] .kthread+0x78/0xc4 [c0000002f7257f90] [c000000000029b8c] .kernel_thread+0x4c/0x68 ibmvfc_3 D 0000000000000000 12432 1280 2 Call Trace: [c0000002f7253540] [c0000002f72535f0] 0xc0000002f72535f0 (unreliable) [c0000002f7253710] [c0000000000118f4] .__switch_to+0x158/0x1a0 [c0000002f72537b0] [c0000000004f8b40] .schedule+0x8d4/0x9dc [c0000002f7253970] [c0000000004f8e98] .schedule_timeout+0x38/0xe8 [c0000002f7253a60] [c0000000004f80cc] .wait_for_common+0x138/0x220 [c0000002f7253b40] [c0000000000a2784] .flush_cpu_workqueue+0xac/0xcc [c0000002f7253c10] [c0000000000a2960] .flush_workqueue+0x58/0xa0 [c0000002f7253ca0] [d0000000000827fc] .fc_flush_work+0x4c/0x64 [scsi_transport_fc] [c0000002f7253d20] [d000000000082db4] .fc_remote_port_add+0x48/0x6c4 [scsi_transport_fc] [c0000002f7253dd0] [d0000000001d7d04] .ibmvfc_work+0x820/0xa7c [ibmvfc] [c0000002f7253f00] [c0000000000a7470] .kthread+0x78/0xc4 [c0000002f7253f90] [c000000000029b8c] .kernel_thread+0x4c/0x68 fc_wq_3 D 0000000000000000 10720 1283 2 Call Trace: [c0000002f559ac30] [c0000002f559ace0] 0xc0000002f559ace0 (unreliable) [c0000002f559ae00] [c0000000000118f4] .__switch_to+0x158/0x1a0 [c0000002f559aea0] [c0000000004f8b40] .schedule+0x8d4/0x9dc [c0000002f559b060] [c0000000004f8e98] .schedule_timeout+0x38/0xe8 [c0000002f559b150] [c0000000004f80cc] .wait_for_common+0x138/0x220 [c0000002f559b230] [c0000000002721c4] .blk_execute_rq+0xb4/0x100 [c0000002f559b360] [d00000000036a1f8] .scsi_execute+0x118/0x194 [scsi_mod] [c0000002f559b420] [d00000000036a32c] .scsi_execute_req+0xb8/0x124 [scsi_mod] [c0000002f559b500] [d0000000000c1330] .sd_sync_cache+0x8c/0x108 [sd_mod] [c0000002f559b5e0] [d0000000000c15b4] .sd_shutdown+0x9c/0x158 [sd_mod] [c0000002f559b660] [d0000000000c16d0] .sd_remove+0x60/0xb4 [sd_mod] [c0000002f559b700] [c000000000392ecc] .__device_release_driver+0xd0/0x118 [c0000002f559b7a0] [c000000000393080] .device_release_driver+0x30/0x54 [c0000002f559b830] [c000000000392108] .bus_remove_device+0x128/0x16c [c0000002f559b8d0] [c00000000038f94c] .device_del+0x158/0x234 [c0000002f559b960] [d00000000036f078] .__scsi_remove_device+0x5c/0xd4 [scsi_mod] [c0000002f559b9f0] [d00000000036f124] .scsi_remove_device+0x34/0x58 [scsi_mod] [c0000002f559ba80] [d00000000036f204] .__scsi_remove_target+0xb4/0x120 [scsi_mod] [c0000002f559bb10] [d00000000036f338] .__remove_child+0x2c/0x44 [scsi_mod] [c0000002f559bb90] [c00000000038f11c] .device_for_each_child+0x54/0xb4 [c0000002f559bc50] [d00000000036f2e0] .scsi_remove_target+0x70/0x9c [scsi_mod] [c0000002f559bce0] [d000000000083454] .fc_starget_delete+0x24/0x3c [scsi_transport_fc] [c0000002f559bd70] [c0000000000a2368] .run_workqueue+0x118/0x208 [c0000002f559be30] [c0000000000a2580] .worker_thread+0x128/0x154 [c0000002f559bf00] [c0000000000a7470] .kthread+0x78/0xc4 [c0000002f559bf90] [c000000000029b8c] .kernel_thread+0x4c/0x68 Signed-off-by: Brian King Signed-off-by: James Bottomley commit 7d0e462247241b8ec2d377306203b58c7f423553 Author: Brian King Date: Thu May 28 16:17:26 2009 -0500 [SCSI] ibmvfc: Reduce error logging noise The ibmvfc driver currently logs errors during discovery for several transient fabric errors, which generally get retried. If retries do not work, we see multiple errors in the log. If retries do work, we see errors in the log which may be confusing since the retry worked. This patch enhances the discovery time error logging to only log errors for command failures during discovery if all allowed retries have been used up. The existing behavior of logging all failures can be restored by setting the hosts log_level to a value of 3 or greater. Signed-off-by: Brian King Signed-off-by: James Bottomley commit 85e2399e925e0afa04dd6e185a910bdd3dc4626b Author: Brian King Date: Thu May 28 16:17:25 2009 -0500 [SCSI] ibmvfc: Use DEVICE_ATTR macro Use DEVICE_ATTR macro for defining device sysfs attributes. Signed-off-by: Brian King Signed-off-by: James Bottomley commit 7270b9bde5f382e730e1ef69d6c1b34d388df2b0 Author: Brian King Date: Thu May 28 16:17:24 2009 -0500 [SCSI] ibmvfc: Fixup GFP flags for target allocations Since target allocations can occur while resetting the virtual adapter, we shouldn't be using GFP_KERNEL for them as it could hang. Switch to use GFP_NOIO. Signed-off-by: Brian King Signed-off-by: James Bottomley commit 4a2837d4fcaf8a2c2ad61523287073d0c14b9ed0 Author: Brian King Date: Thu May 28 16:17:22 2009 -0500 [SCSI] ibmvfc: Fix invalid error response handling Fix an obvious bug in processing error responses for SCSI commands which can result in successful responses being incorrectly returned with DID_ERROR. Signed-off-by: Brian King Signed-off-by: James Bottomley commit 601e7638254c118fca135af9b1a9f35061420f62 Author: James Bottomley Date: Tue May 26 20:35:48 2009 +0000 [SCSI] sd: fix bug in SCSI async probing The async split up of probing in sd.c created a potential failure case where something goes wrong with device_add(), but which we don't recover properly. Since, in general, asynchronous error handling is hard, move the device_add() into the asynchronous path (it should be fast) and make sure all the deferred processing cannot fail. Signed-off-by: James Bottomley commit 91bc31fb3bae4e55832c7c39d4f9c193285e6ab2 Author: James Bottomley Date: Sun May 17 09:30:48 2009 -0500 [SCSI] fix up scsi_eh_lock_door() The Documentation is incorrect (we removed some functions referred to), and none of the bug warnings now apply. Additionally remove the spurious check on the return from blk_get_request() which can't fail if __GFP_WAIT is passed in. Signed-off-by: James Bottomley commit 477e608c03eb2f561a23994bee38a32a9fd3357d Author: Bartlomiej Zolnierkiewicz Date: Mon Apr 27 20:54:22 2009 +0200 [SCSI] fix documentation for two functions Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: James Bottomley commit c9690998ef48ffefeccb91c70a7739eebdea57f9 Author: Andreas Herrmann Date: Mon Jun 8 19:09:39 2009 +0200 x86: memtest: remove 64-bit division Using gcc 3.3.5 a "make allmodconfig" + "CONFIG_KVM=n" triggers a build error: arch/x86/mm/built-in.o(.init.text+0x43f7): In function `__change_page_attr': arch/x86/mm/pageattr.c:114: undefined reference to `__udivdi3' make: *** [.tmp_vmlinux1] Error 1 The culprit turned out to be a division in arch/x86/mm/memtest.c For more info see this thread: http://marc.info/?l=linux-kernel&m=124416232620683 The patch entirely removes the division that caused the build error. [ Impact: build fix with certain GCC versions ] Reported-by: Tetsuo Handa Signed-off-by: Andreas Herrmann Cc: Yinghai Lu Cc: xiyou.wangcong@gmail.com Cc: Andrew Morton Cc: LKML-Reference: <20090608170939.GB12431@alberich.amd.com> Signed-off-by: Ingo Molnar commit 92a43793a908f395dc687e6c5fc90d63f999d6d5 Author: Dan Allongo Date: Mon Jun 8 11:21:52 2009 -0400 ALSA: usb - Add boot quirk for C-Media 6206 USB Audio Added boot quirk for C-Media CM6206 device in snd_usb_audio_probe. The function snd_usb_cm6206_boot_quirk sets up six internal 16-bit registers in order to initialize the device. Values for the registers came from sniffing USB traffic under Windows since only four of the six are documented in the datasheet for CM106 and some reserved bits were also being set. [Minor coding-style fixes by tiwai] Signed-off-by: Dan Allongo Signed-off-by: Takashi Iwai commit c4ed3f04ba9defe22aa729d1646f970f791c03d7 Author: Jack Steiner Date: Mon Jun 8 10:44:05 2009 -0500 x86, UV: Fix macros for multiple coherency domains Fix bug in the SGI UV macros that support systems with multiple coherency domains. The macros used for referencing global MMR (chipset registers) are failing to correctly "or" the NASID (node identifier) bits that reside above M+N. These high bits are supplied automatically by the chipset for memory accesses coming from the processor socket. However, the bits must be present for references to the special global MMR space used to map chipset registers. (See uv_hub.h for more details ...) The bug results in references to invalid/incorrect nodes. Signed-off-by: Jack Steiner Cc: LKML-Reference: <20090608154405.GA16395@sgi.com> Signed-off-by: Ingo Molnar commit 9aee2286071c23c535fe9928eec1a26e0bcf256d Author: Toshiyuki Okajima Date: Mon Jun 8 12:41:35 2009 -0400 ext4: fix dx_map_entry to support 256k directory blocks The dx_map_entry structure doesn't support over 64KB block size by current usage of its member("offs"). Because "offs" treats an offset of copies of the ext4_dir_entry_2 structure as is. This member size is 16 bits. But real offset for over 64KB(256KB) block size needs 18 bits. However, real offset keeps 4 byte boundary, so lower 2 bits is not used. Therefore, we do the following to fix this limitation: For "store": we divide the real offset by 4 and then store this result to "offs" member. For "use": we multiply "offs" member by 4 and then use this result as real offset. Signed-off-by: Toshiyuki Okajima Signed-off-by: "Theodore Ts'o" commit 09521d2e3edd0bf02b66e5b8c13f1559f2d6958a Author: Takashi Iwai Date: Mon Jun 8 18:29:38 2009 +0200 ALSA: ctxfi - Fix wrong model id for UAA CTUAA should be checked instead of CTHENDRIX. The latter is for 20k2 chip. Also, fixed the detection of UAA/HENDRIX models by fixing the mask bits. Signed-off-by: Takashi Iwai commit 53331aa1c721336b661567e4c0aacc04ab9725d8 Author: James Smart Date: Fri May 22 14:53:27 2009 -0400 [SCSI] lpfc 8.3.2 : Update the lpfc driver version to 8.3.2 Signed-off-by: James Smart Signed-off-by: James Bottomley commit 21e9a0a5fbd2b7cb3ae29f6d491a30bc0e688422 Author: James Smart Date: Fri May 22 14:53:21 2009 -0400 [SCSI] lpfc 8.3.2 : Persistent Vport Support Add support for persistent vport definitions at creation at boot time Also includes a few misc fixes for: - conversion to vpi name from vport slang name - couple of small mailbox references - some additional discovery mods Signed-off-by: James Smart Signed-off-by: James Bottomley commit f4b4c68f74dcd5da03df851090cad28ad4e8d7cc Author: James Smart Date: Fri May 22 14:53:12 2009 -0400 [SCSI] lpfc 8.3.2 : Miscellaneous Changes Miscellaneous Changes: - Convert from SLI2_ACTIVE flag to more correct SLI_ACTIVE (generic) flag - Reposition log verbose messaging definitions - Update naming for vpi object name from vport slang name - Handle deferred error attention condition - Add 10G link support - Small bug fixup Signed-off-by: James Smart Signed-off-by: James Bottomley commit d8e93df13c8f7bde45a7756944aab528c58df4cf Author: James Smart Date: Fri May 22 14:53:05 2009 -0400 [SCSI] lpfc 8.3.2 : Update of copyrights Update of copyrights on modified files Signed-off-by: James Smart Signed-off-by: James Bottomley commit 6fb120a7ed882aae9636545142a51cf3182a3ace Author: James Smart Date: Fri May 22 14:52:59 2009 -0400 [SCSI] lpfc 8.3.2 : Addition of SLI4 Interface - FCOE Discovery support SLI4 supports both FC and FCOE, with some extended topology objects. This patch adss support for the objects, and updates the disovery engines for their use. Signed-off-by: James Smart Signed-off-by: James Bottomley commit 04c684968487eb4f98728363a97b8da48f3bb958 Author: James Smart Date: Fri May 22 14:52:52 2009 -0400 [SCSI] lpfc 8.3.2 : Addition of SLI4 Interface - Mailbox handling The mailbox commands themselves are the same, or very similar to their SLI3 counterparts. This patch genericizes mailbox command handling and adds support for the new SLI4 mailbox queue. Signed-off-by: James Smart Signed-off-by: James Bottomley commit 4f774513f7b3fe96648b8936f60f835e6ceaa88e Author: James Smart Date: Fri May 22 14:52:35 2009 -0400 [SCSI] lpfc 8.3.2 : Addition of SLI4 Interface - Queues Adds support for the new queues in the SLI-4 interface. There are : - Work Queues - host-to-adapter for fast-path traffic - Mailbox Queues - host-to-adapter for control (slow-path) - Buffer Queues - host-to-adapter for posting buffers for async receive - Completion Queues - adapter-to-host for posting async events, completions for fast or slow patch work, receipt of async receive traffic - Event Queues - tied to MSI-X vectors, binds completion queues with interrupts These patches add the all the support code to tie into command submission and response paths, updates the interrupt handling, etc. Signed-off-by: James Smart Signed-off-by: James Bottomley commit da0436e915a5c17ee79e72c1bf978a4ebb1cbf4d Author: James Smart Date: Fri May 22 14:51:39 2009 -0400 [SCSI] lpfc 8.3.2 : Addition of SLI4 Interface - Base Support Adds new hardware and interface definitions. Adds new interface routines - utilizing the reorganized layout of the driver. Adds SLI-4 specific functions for attachment, initialization, teardown, etc. Signed-off-by: James Smart Signed-off-by: James Bottomley commit 3772a99175f5378b5001e8da364341a8b8226a4a Author: James Smart Date: Fri May 22 14:50:54 2009 -0400 [SCSI] lpfc 8.3.2 : Reorganization for SLI4 Preps the organization of the driver so that the bottom half, which interacts with the hardware, can share common code sequences for attachment, detachment, initialization, teardown, etc with new hardware. For very common code sections, which become specific to the interface type, the driver uses an indirect function call. The function is set at initialization. For less common sections, such as initialization, the driver looks at the interface type and calls the routines relative to the interface. Signed-off-by: James Smart Signed-off-by: James Bottomley commit 9470195a9cd13e6d90221b8b5d897e9232da8d28 Author: Takashi Iwai Date: Mon Jun 8 18:10:32 2009 +0200 ALSA: ctxfi - Clean up probe routines Clean up probe routines and model detection routines so that the driver won't call and check the PCI subsystem id at each time. Signed-off-by: Takashi Iwai commit f03ecf50534a81b06544c58a713076d59d54baf9 Author: Takashi Iwai Date: Mon Jun 8 16:38:17 2009 +0200 ALSA: hda - Fix the previous tagra-8ch patch - Fix a typo in the patch - Adapted to follow the recent change for unsol event handling Signed-off-by: Takashi Iwai commit 64a8be74357477558183b43156c5536b642de134 Author: David Heidelberger Date: Mon Jun 8 16:15:18 2009 +0200 ALSA: hda - Add 7.1 support for MSI GX620 Added 7.1 support for MSI GX620 and jack quirk. Reference: kernel bug#13430 http://bugzilla.kernel.org/show_bug.cgi?id=13430 Signed-off-by: David Heidelberger Signed-off-by: Takashi Iwai commit c00701101b82f2bc61dfc259748ec6e5288af6a9 Author: Takashi Iwai Date: Mon Jun 8 15:58:48 2009 +0200 ALSA: pcm - A helper function to compose PCM stream name for debug prints Use a common helper function for the PCM stream name displayed in XRUN and buffer-pointer debug prints. Signed-off-by: Takashi Iwai commit 0bf841281e58d0b3cc9fe9dc4383df7694bde6bd Author: Joerg Roedel Date: Mon Jun 8 15:53:46 2009 +0200 dma-debug: simplify logic in driver_filter() This patch makes the driver_filter function more readable by reorganizing the code. The removal of a code code block to an upper indentation level makes hard-to-read line-wraps unnecessary. Signed-off-by: Joerg Roedel commit 806d31d73843a018cb239fc16ba53d82f4d8dc33 Author: Takashi Iwai Date: Mon Jun 8 15:50:42 2009 +0200 ALSA: emu10k1 - Fix minimum periods for efx playback EFX playback stream should have periods_min = 2 to avoid the buffer position overflow (due to restrictions of the pcm-indirect helper). Signed-off-by: Takashi Iwai commit be81c6ea23b8b471141734ef4bc005f5127aaf43 Author: Joerg Roedel Date: Mon Jun 8 15:46:19 2009 +0200 dma-debug: disable/enable irqs only once in device_dma_allocations There is no need to disable/enable irqs on each loop iteration. Just disable irqs for the whole time the loop runs. Signed-off-by: Joerg Roedel commit e7ed70eedccc78e79ce6da2155e9caf90aff4003 Author: Joerg Roedel Date: Mon Jun 8 15:39:24 2009 +0200 dma-debug: use pr_* instead of printk(KERN_* ...) The pr_* macros are shorter than the old printk(KERN_ ...) variant. Change the dma-debug code to use the new macros and save a few unnecessary line breaks. If lines don't break the source code can also be grepped more easily. Signed-off-by: Joerg Roedel commit 8b5403a6d772d340541cfb30a668fde119c40ac1 Author: Christoph Hellwig Date: Mon Jun 8 15:37:16 2009 +0200 xfs: remove SYNC_BDFLUSH SYNC_BDFLUSH is a leftover from IRIX and rather misnamed for todays code. Make xfs_sync_fsdata and xfs_dq_sync use the SYNC_TRYLOCK flag for not blocking on logs just as the inode sync code already does. For xfs_sync_fsdata it's a trivial 1:1 replacement, but for xfs_qm_sync I use the opportunity to decouple the non-blocking lock case from the different flushing modes, similar to the inode sync code. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen commit b0710ccc6d9fa8fb908b5f6d1b0782a09d80e24f Author: Christoph Hellwig Date: Mon Jun 8 15:37:11 2009 +0200 xfs: remove SYNC_IOWAIT We want to wait for all I/O to finish when we do data integrity syncs. So there is no reason to keep SYNC_WAIT separate from SYNC_IOWAIT. This causes a little change in behaviour for the ENOSPC flushing code which now does a second submission and wait of buffered I/O, but that should finish ASAP as we already did an asynchronous writeout earlier. Signed-off-by: Christoph Hellwig Reviewed-by: Josef 'Jeff' Sipek Reviewed-by: Eric Sandeen commit 075fe1028699f6a280545dfc2cfc5ac82d555c8c Author: Christoph Hellwig Date: Mon Jun 8 15:35:48 2009 +0200 xfs: split xfs_sync_inodes xfs_sync_inodes is used to write back either file data or inode metadata. In general we always do these separately, except for one fishy case in xfs_fs_put_super that does both. So separate xfs_sync_inodes into separate xfs_sync_data and xfs_sync_attr functions. In xfs_fs_put_super we first call the data sync and then the attr sync as that was the previous order. The moved log force in that path doesn't make a difference because we will force the log again as part of the real unmount process. The filesystem readonly checks are not performed by the new function but instead moved into the callers, given that most callers alredy have it further up in the stack. Also add debug checks that we do not pass in incorrect flags in the new xfs_sync_data and xfs_sync_attr function and fix the one place that did pass in a wrong flag. Also remove a comment mentioning xfs_sync_inodes that has been incorrect for a while because we always take either the iolock or ilock in the sync path these days. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen commit fe588ed32867b42e0d906db558ca92fd9f8b128e Author: Christoph Hellwig Date: Mon Jun 8 15:35:27 2009 +0200 xfs: use generic inode iterator in xfs_qm_dqrele_all_inodes Use xfs_inode_ag_iterator instead of opencoding the inode walk in the quota code. Mark xfs_inode_ag_iterator and xfs_sync_inode_valid non-static to allow using them from the quota code. Signed-off-by: Christoph Hellwig Reviewed-by: Josef 'Jeff' Sipek Reviewed-by: Eric Sandeen commit 75f3cb1393133682958db6f157e1b6473e5a366b Author: Dave Chinner Date: Mon Jun 8 15:35:14 2009 +0200 xfs: introduce a per-ag inode iterator Given that we walk across the per-ag inode lists so often, it makes sense to introduce an iterator for this. Convert the sync and reclaim code to use this new iterator, quota code will follow in the next patch. Also change xfs_reclaim_inode to return -EGAIN instead of 1 for an inode already under reclaim. This simplifies the AG iterator and doesn't matter for the only other caller. [hch: merged the lookup and execute callbacks back into one to get the pag_ici_lock locking correct and simplify the code flow] Signed-off-by: Dave Chinner Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen commit abc1064742604e60a47a65fa3214dc1a84db093d Author: Dave Chinner Date: Mon Jun 8 15:35:12 2009 +0200 xfs: remove unused parameter from xfs_reclaim_inodes The noblock parameter of xfs_reclaim_inodes is only ever set to zero. Remove it and all the conditional code that is never executed. Signed-off-by: Dave Chinner Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen commit 1da8eecab5f866b4f5be43adbaadf18e259a8cc5 Author: Dave Chinner Date: Mon Jun 8 15:35:07 2009 +0200 xfs: factor out inode validation for sync Separate the validation of inodes found by the radix tree walk from the radix tree lookup. Signed-off-by: Dave Chinner Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen commit 845b6d0cbbc2304e8a54ed4038272c55f85b2269 Author: Christoph Hellwig Date: Mon Jun 8 15:35:05 2009 +0200 xfs: split inode flushing from xfs_sync_inodes_ag In many cases we only want to sync inode metadata. Split out the inode flushing into a separate helper to prepare factoring the inode sync code. Based on a patch from Dave Chinner, but redone to keep the current behaviour exactly and leave changes to the flushing logic to another patch. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen commit 5a34d5cd096310133f9208db294021208a96660d Author: Dave Chinner Date: Mon Jun 8 15:35:03 2009 +0200 xfs: split inode data writeback from xfs_sync_inodes_ag In many cases we only want to sync inode data. Start spliting the inode sync into data sync and inode sync by factoring out the inode data flush. [hch: minor cleanups] Signed-off-by: Dave Chinner Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen commit 7d095257e321214e4cf359abd131ba1f09c60cba Author: Christoph Hellwig Date: Mon Jun 8 15:33:32 2009 +0200 xfs: kill xfs_qmops Kill the quota ops function vector and replace it with direct calls or stubs in the CONFIG_XFS_QUOTA=n case. Make sure we check XFS_IS_QUOTA_RUNNING in the right spots. We can remove the number of those checks because the XFS_TRANS_DQ_DIRTY flag can't be set otherwise. This brings us back closer to the way this code worked in IRIX and earlier Linux versions, but we keep a lot of the more useful factoring of common code. Eventually we should also kill xfs_qm_bhv.c, but that's left for a later patch. Reduces the size of the source code by about 250 lines and the size of XFS module by about 1.5 kilobytes with quotas enabled: text data bss dec hex filename 615957 2960 3848 622765 980ad fs/xfs/xfs.o 617231 3152 3848 624231 98667 fs/xfs/xfs.o.old Fallout: - xfs_qm_dqattach is split into xfs_qm_dqattach_locked which expects the inode locked and xfs_qm_dqattach which does the locking around it, thus removing XFS_QMOPT_ILOCKED. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen commit 0c5e1ce89f1eacc366ec421c0f5f681159479c28 Author: Christoph Hellwig Date: Mon Jun 8 15:33:21 2009 +0200 xfs: validate quota log items during log recovery Arkadiusz has seen really strange crashes in xfs_qm_dqcheck that I can only explain by a log item being too smal to actually fit the xfs_dqblk_t we're dereferencing all over xfs_qm_dqcheck. So add graceful checks for NULL or too small quota items to the log recovery code. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen commit e1696834e8a15d7ef9ae8ffdffe00bac1399a2e3 Author: Christoph Hellwig Date: Mon Jun 8 15:32:59 2009 +0200 xfs: update max log size Commit a6634fba3dec4a92f0a2c4e30c80b634c0576ad5 in xfsprogs increased the maximum log size supported by mkfs. Merged back the changes to xfs_fs.h so the growfs enforced the same limit and the headers are in sync. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen commit d362af62ed98f58c64a2b3dd58c79d25ad181b0b Author: Takashi Iwai Date: Mon Jun 8 15:31:22 2009 +0200 ALSA: ctxfi - Fix / clean up hw20k2 chip code - Clean up Hungarian coding style - Don't use static variables for I2C information; this unables to use multiple instances. Now they are stored in struct hw20k2 fields. Signed-off-by: Takashi Iwai commit c17e2cf7376a2010b8b114fdeebd4e340a5e9cb2 Author: Joerg Roedel Date: Mon Jun 8 15:19:29 2009 +0200 dma-debug: code style fixes This patch changes the recent updates to dma-debug to conform with coding style guidelines of Linux and the -tip tree. Signed-off-by: Joerg Roedel commit af8500bbbd18438495d2f91ad07bda49fff3b770 Author: Takashi Iwai Date: Mon Jun 8 15:07:46 2009 +0200 ALSA: ctxfi - Fix possible buffer pointer overrun Fix possible buffer pointer overruns. Back to zero when it's equal or over the buffer size. Signed-off-by: Takashi Iwai commit 312325094785566a0e42a88c1bf6e7eb54c5d70e Author: Joerg Roedel Date: Mon Jun 8 15:07:08 2009 +0200 dma-debug: comment style fixes Last patch series introduced some new comment which does not fit the Kernel comment style guidelines. Fix it with this patch. Signed-off-by: Joerg Roedel commit 514eef9c2a711b4c24b97bb456d39695a6fe1775 Author: Takashi Iwai Date: Mon Jun 8 14:57:57 2009 +0200 ALSA: ctxfi - Remove useless initializations and cast Remove useless variable initializations and cast at the beginning of functions. Signed-off-by: Takashi Iwai commit 4836ac655410e7f126d316b0be062b38746f7529 Author: Takashi Iwai Date: Mon Jun 8 14:49:26 2009 +0200 ALSA: ctxfi - Fix DMA mask for emu20k2 chip Allow 64bit DMA mask for emu20k2 chip, too. Signed-off-by: Takashi Iwai commit d436dd063be605dc29f17b2cb0b99a852db89bed Author: Takashi Iwai Date: Mon Jun 8 13:50:18 2009 +0200 ALSA: ctxfi - Make volume controls more intuitive Change the volume control to dB scale (as the raw data seems so). Also added the TLV dB-scale information. Signed-off-by: Takashi Iwai commit c4865679df5453d1bc94c534f4d94a364c0546df Author: Takashi Iwai Date: Mon Jun 8 12:57:17 2009 +0200 ALSA: ca0106 - Fix master volume scale The master volume dB scale was wrongly defined as 0.50dB setp while it must be 0.25dB step. Signed-off-by: Takashi Iwai commit 4024533e60787a5507818b0c0fdb44ddb522cdf5 Author: Peter Ma Date: Mon Jun 8 12:55:35 2009 +0200 avr32: Add support for Mediama RMTx add-on board for ATNGW100 Signed-off-by: Peter Ma Signed-off-by: Haavard Skinnemoen commit a89ab11454b476d2d9e8a10f903360a62e21bac8 Author: Peter Ma Date: Mon Jun 8 12:54:02 2009 +0200 avr32: Change Atmel ATNGW100 config to add choice of add-on board Signed-off-by: Peter Ma Signed-off-by: Haavard Skinnemoen commit 54de6bc8b2437f642844cecb8d183df2368ffceb Author: Takashi Iwai Date: Mon Jun 8 10:21:07 2009 +0200 ALSA: ctxfi - Optimize the native timer handling using wc counter Optimize the timer update routine to look up wall clock once instead of checking the position of each stream at each timer update. Signed-off-by: Takashi Iwai commit 1123e3ad73697d64ad99f0104bbe49f8b52d7d65 Author: Ingo Molnar Date: Fri May 29 11:25:09 2009 +0200 perf_counter: Clean up x86 boot messages Standardize and tidy up all the messages we print during perfcounter initialization. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit ad689220614b6c7c0b13b70d742f358e9310e71e Author: Thomas Gleixner Date: Mon Jun 8 09:30:41 2009 +0200 perf_counter, x86: Implement generalized cache event types, add Atom support Fill in core2_hw_cache_event_id[] with the Atom model specific events. The events can be used in all the tools via the -e (--event) parameter, for example "-e l1-misses" or -"-e l2-accesses" or "-e l2-write-misses". ( Note: these are straight from the Intel manuals - not tested yet.) Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 0312af84164215a452f2a94957ebd9bce86e0204 Author: Thomas Gleixner Date: Mon Jun 8 07:42:04 2009 +0200 perf_counter, x86: Implement generalized cache event types, add Core2 support Fill in core2_hw_cache_event_id[] with the Core2 model specific events. The events can be used in all the tools via the -e (--event) parameter, for example "-e l1-misses" or -"-e l2-accesses" or "-e l2-write-misses". Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit e779898aa74cd2e97216368b3f3689ceffe8aeed Author: Ingo Molnar Date: Sun Jun 7 18:14:46 2009 +0200 perf stat: Print out instructins/cycle metric Before: 7549326754 cycles # 3201.811 M/sec 10007594937 instructions # 4244.408 M/sec After: 7542051194 cycles # 3201.996 M/sec 10007743852 instructions # 4248.811 M/sec # 1.327 per cycle Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit a14832ff977e78d1982cdf78cdabb1f2320d9ac8 Author: Ingo Molnar Date: Sun Jun 7 17:58:23 2009 +0200 perf report: Print more expressive message in case of file open error Before: $ perf report failed to open file: No such file or directory After: $ perf report failed to open file: perf.data (try 'perf record' first) Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 30c806a094493beb7691bc7957dfa02dee96230a Author: Ingo Molnar Date: Sun Jun 7 17:46:24 2009 +0200 perf_counter tools: Handle kernels with !CONFIG_PERF_COUNTER If perf is run on a !CONFIG_PERF_COUNTER kernel right now it bails out with no messages or with confusing messages. Standardize this case some more and explain the situation. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 3da297a60f7e8840f79f7d0b343af078890939ea Author: Ingo Molnar Date: Sun Jun 7 17:39:02 2009 +0200 perf record: Fall back to cpu-clock-ticks if no PMU On architectures/CPUs without PMU support but with perfcounters enabled 'perf record' currently fails because it cannot create a cycle based hw-perfcounter. Fall back to the cpu-clock-tick sw-perfcounter in this case, which is hrtimer based and will always work (as long as perfcounters are enabled). Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 716c69fecacd42f2a304a97158e04af2786a3f65 Author: Ingo Molnar Date: Sun Jun 7 17:31:52 2009 +0200 perf top: Fall back to cpu-clock-tick hrtimer sampling if no cycle counter available On architectures/CPUs without PMU support but with perfcounters enabled 'perf top' currently fails because it cannot create a cycle based hw-perfcounter. Fall back to the cpu-clock-tick sw-perfcounter in this case, which is hrtimer based and will always work (as long as perfcounters is enabled). Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 743ee1f80434138495bbb95ffb897acf46b51d54 Author: Ingo Molnar Date: Sun Jun 7 17:06:46 2009 +0200 perf stat: Continue even on counter creation error Before: $ perf stat ~/hackbench 5 error: syscall returned with -1 (No such device) After: $ perf stat ~/hackbench 5 Time: 1.640 Performance counter stats for '/home/mingo/hackbench 5': 6524.570382 task-clock-ticks # 3.838 CPU utilization factor 35704 context-switches # 0.005 M/sec 191 CPU-migrations # 0.000 M/sec 8958 page-faults # 0.001 M/sec cycles instructions cache-references cache-misses Wall-clock time elapsed: 1699.999995 msecs Also add -v (--verbose) option to allow the printing of failed counter opens. Plus dont print 'inf' if wall-time is zero (due to jiffies granularity), instead skip the printing of the CPU utilization factor. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit aeef50bc0483fa70ce0bddb686ec84a274b7f3d4 Author: Figo.zhang Date: Sun Jun 7 22:30:36 2009 +0800 x86, microcode: Simplify vfree() use vfree() does its own 'NULL' check, so no need for check before calling it. In v2, remove the stray newline. [ Impact: cleanup ] Signed-off-by: Figo.zhang Cc: Dmitry Adamushko LKML-Reference: <1244385036.3402.11.camel@myhost> Signed-off-by: Ingo Molnar commit 3aa6b186f86c5d06d6d92d14311ffed51f091f40 Author: Lubomir Rintel Date: Sun Jun 7 16:23:48 2009 +0200 x86: Fix non-lazy GS handling in sys_vm86() This fixes a stack corruption panic or null dereference oops due to a bad GS in resume_userspace() when returning from sys_vm86() and calling lockdep_sys_exit(). Only a problem when CONFIG_LOCKDEP and CONFIG_CC_STACKPROTECTOR enabled. Signed-off-by: Lubomir Rintel Cc: H. Peter Anvin LKML-Reference: <1244384628.2323.4.camel@bimbo> Signed-off-by: Ingo Molnar commit a4046f8d299e00e9855ae292527c2d66a42670eb Author: Cyrill Gorcunov Date: Sun Jun 7 12:19:37 2009 +0400 x86, nmi: Use predefined numbers instead of hardcoded one [ Impact: cleanup ] Signed-off-by: Cyrill Gorcunov LKML-Reference: <20090607081937.GC4547@lenovo> Signed-off-by: Ingo Molnar commit 103428e57be323c3c5545db8ad12667099bc6005 Author: Cyrill Gorcunov Date: Sun Jun 7 16:48:40 2009 +0400 x86, apic: Fix dummy apic read operation together with broken MP handling Ingo Molnar reported that read_apic is buggy novadays: [ 0.000000] Using APIC driver default [ 0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs [ 0.000000] Local APIC disabled by BIOS -- you can enable it with "lapic" [ 0.000000] APIC: disable apic facility [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: at arch/x86/kernel/apic/apic.c:254 native_apic_read_dummy+0x2d/0x3b() [ 0.000000] Hardware name: HP OmniBook PC Indeed we still rely on apic->read operation for SMP compiled kernel. And instead of disfigure the SMP code with #ifdef we allow to call apic->read. To capture any unexpected results we check for apic->read being called for sane reason via WARN_ON_ONCE but(!) instead of OR we should use AND logical operation (thanks Yinghai for spotting the root of the problem). Along with that we could be have bad MP table and we are to fix it that way no SMP started and no complains about BIOS bug if apic was just disabled via command line. Signed-off-by: Cyrill Gorcunov Cc: Yinghai Lu LKML-Reference: <20090607124840.GD4547@lenovo> Signed-off-by: Ingo Molnar commit 4a4aca641bc4598e77b866804f47c651ec4a764d Author: Jean Delvare Date: Fri Jun 5 12:02:38 2009 +0200 x86: Add quirk for reboot stalls on a Dell Optiplex 360 The Dell Optiplex 360 hangs on reboot, just like the Optiplex 330, so the same quirk is needed. Signed-off-by: Jean Delvare Cc: Steve Conklin Cc: Leann Ogasawara Cc: LKML-Reference: <200906051202.38311.jdelvare@suse.de> Signed-off-by: Ingo Molnar commit 734affdcae20af4fec95e46a64fb29f063a15c19 Author: Bartlomiej Zolnierkiewicz Date: Sun Jun 7 15:37:10 2009 +0200 ide: add IDE_DFLAG_NIEN_QUIRK device flag Add IDE_DFLAG_NIEN_QUIRK device flag and use it instead of drive->quirk_list. There should be no functional changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 8bc1e5aa06a2a9a425c4a6795fc564cba1521487 Author: Bartlomiej Zolnierkiewicz Date: Sun Jun 7 15:37:09 2009 +0200 ide: respect quirk_drives[] list on all controllers * Add ide_check_nien_quirk_list() helper to the core code and then use it in ide_port_tune_devices(). * Remove no longer needed ->quirkproc methods from hpt366.c and pdc202xx_{new,old}.c. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 0fcef027f60318cfa64ae4cdf5aa33905607d650 Author: Bartlomiej Zolnierkiewicz Date: Sun Jun 7 15:37:08 2009 +0200 hpt366: enable all quirks for devices on quirk_drives[] list Enable also quirks in do_reset1() and ide_config_drive_speed() for devices on quirk_drives[] list. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit d328e7657de1fde30141365466589ab259cf4f64 Author: Bartlomiej Zolnierkiewicz Date: Sun Jun 7 15:37:07 2009 +0200 hpt366: sync quirk_drives[] list with pdc202xx_{new,old}.c Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit d6dcdea726855d78048e4bfb950342afc0e83e47 Author: Bartlomiej Zolnierkiewicz Date: Sun Jun 7 15:37:07 2009 +0200 ide: remove superfluous SELECT_MASK() call from do_rw_taskfile() With ->write_devctl method call (which unmasks drive IRQ) preceding SELECT_MASK() call there is really no need for the latter. Moreover with the combination of HPT36x controller and the drive on the quirk_drives[] list this can result in superfluous enable_irq() call which in turn will trigger WARN() in __enable_irq(). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit f9952beeaa851f7f79a4dd895bfed3f3ff6deebc Author: Bartlomiej Zolnierkiewicz Date: Sun Jun 7 15:37:06 2009 +0200 ide: remove superfluous SELECT_MASK() call from ide_driveid_update() We always call SELECT_MASK(drive, 0) after ide_dev_read_id() call so there is no need to do it again in the error path. Moreover with the combination of HPT36x controller and the drive on the quirk_drives[] list this can result in superfluous enable_irq() call which in turn will trigger WARN() in __enable_irq(). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit dff8817b78e6e6a4913f2caf7637d62dcc49a03c Author: Bartlomiej Zolnierkiewicz Date: Sun Jun 7 15:37:06 2009 +0200 icside: remove superfluous ->maskproc method [inspired by pata_icside] Enabling/disabling of card IRQs is handled fine by IRQ and IDE subsystems so there is no need for custom ->maskproc method. Moreover icside_maskproc() would enable IRQ only if it was already enabled [because of 'if (state->enabled && !mask)' check]. Signed-off-by: Bartlomiej Zolnierkiewicz commit 49d8078ad1c3dca5b11ce18391bf6bd9af9acdf5 Author: Borislav Petkov Date: Sun Jun 7 15:37:06 2009 +0200 ide-tape: fix IDE_AFLAG_* atomic accesses These flags used to be bit numbers and now are single bits in the ->atapi_flags vector. Use them properly. Spotted-by: Jiri Slaby Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit 626542ca2277961aaa64855206574f8ca4f360e3 Author: Borislav Petkov Date: Sun Jun 7 15:37:05 2009 +0200 ide-tape: change IDE_AFLAG_IGNORE_DSC non-atomically There are two sites where the flag is being changed: ide_retry_pc and idetape_do_request. Both codepaths are protected by hwif->busy (ide_lock_port) and therefore we shouldn't need the atomic accesses. Spotted-by: Jiri Slaby Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit ffddf1717b0d388879c646eaf6261a2b393c06ad Author: Sergei Shtylyov Date: Sun Jun 7 15:37:05 2009 +0200 pdc202xx_old: kill resetproc() method The driver's resetproc() method resets both channels at once -- most probably by driving RESET- on them. Not only such reset can severely disturb concurrent operations on another channel, it also ensues 2-second delay, while there's no apparent reason why SRST reset being performed prior to resetproc() call needs to be followed up by another reset. Signed-off-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 1221e241e3a6f1ff5b0de03d58d871f7c995781b Author: Sergei Shtylyov Date: Sun Jun 7 15:37:04 2009 +0200 pdc202xx_old: don't call pdc202xx_reset() on IRQ timeout The driver's dma_lost_irq() and dma_clear() methods call pdc202xx_reset() which resets both channels at once -- most probably by driving RESET- on them. Not only such reset can severely disturb concurrent operations on another channel, it is also a clear overkill (especially in the first case) and is completely unexpected and thus not properly handled by the IDE core in this context (in the second case the usual SRST reset would most probably ensue anyway though); it also causes quite arbitrary 2-second delay. Hence, use the standard ide_dma_lost_irq() method and don't install the optional dma_clear() method at all -- the driver should do well without this age-old cruft... Signed-off-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 72b9304f04d0724a25251e9e9041aa95f89c15dd Author: Sergei Shtylyov Date: Sun Jun 7 15:37:03 2009 +0200 pdc202xx_old: use ide_dma_test_irq() The driver's dma_test_irq() method, although tests some chip specific interrupt bits, finally always relies on the SFF-8038i standard interrupt bit. I see no point in testing the bits that are not trusted anyway -- the driver should be fully able to use the standard method implemetation, ide_dma_test_irq(). With this change 'pdc202xx_dma_ops' finally becomes identical to 'sff_dma_ops', and we can get rid of it... Signed-off-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 6250d3af2a1036fb356264442211a4246c7d64c7 Merge: 4c9773e 075affc Author: Bartlomiej Zolnierkiewicz Date: Sun Jun 7 14:27:11 2009 +0200 Merge branch 'for-linus' into for-next commit 075affcbe01d4d7cefcd0e30a98df1253bcf8d92 Author: Bartlomiej Zolnierkiewicz Date: Sun Jun 7 13:52:52 2009 +0200 ide: preserve Host Protected Area by default (v2) From the perspective of most users of recent systems, disabling Host Protected Area (HPA) can break vendor RAID formats, GPT partitions and risks corrupting firmware or overwriting vendor system recovery tools. Unfortunately the original (kernels < 2.6.30) behavior (unconditionally disabling HPA and using full disk capacity) was introduced at the time when the main use of HPA was to make the drive look small enough for the BIOS to allow the system to boot with large capacity drives. Thus to allow the maximum compatibility with the existing setups (using HPA and partitioned with HPA disabled) we automically disable HPA if any partitions overlapping HPA are detected. Additionally HPA can also be disabled using the "nohpa" module parameter (i.e. "ide_core.nohpa=0.0" to disable HPA on /dev/hda). v2: Fix ->resume HPA support. While at it: - remove stale "idebus=" entry from Documentation/kernel-parameters.txt Cc: Robert Hancock Cc: Frans Pop Cc: "Andries E. Brouwer" Cc: Al Viro Acked-by: Sergei Shtylyov [patch description was based on input from Alan Cox and Frans Pop] Emphatically-Acked-by: Alan Cox Signed-off-by: Bartlomiej Zolnierkiewicz commit e957b60d1583022a0f7c03267d37fcae2ddb78b1 Author: Bartlomiej Zolnierkiewicz Date: Sun Jun 7 13:52:52 2009 +0200 ide-gd: implement block device ->set_capacity method (v2) * Use ->probed_capacity to store native device capacity for ATA disks. * Add ->set_capacity method to struct ide_disk_ops. * Implement disk device ->set_capacity method for ATA disks. * Implement block device ->set_capacity method. v2: * Check if LBA and HPA are supported in ide_disk_set_capacity(). * According to the spec the SET MAX ADDRESS command shall be immediately preceded by a READ NATIVE MAX ADDRESS command. * Add ide_disk_hpa_{get_native,set}_capacity() helpers. Together with the previous patch adding ->set_capacity block device method this allows automatic disabling of Host Protected Area (HPA) if any partitions overlapping HPA are detected. Cc: Robert Hancock Cc: Frans Pop Cc: "Andries E. Brouwer" Cc: Al Viro Emphatically-Acked-by: Alan Cox Signed-off-by: Bartlomiej Zolnierkiewicz commit db429e9ec0f9dee2d8e50c154f04f29f880fc9d6 Author: Bartlomiej Zolnierkiewicz Date: Sun Jun 7 13:52:52 2009 +0200 partitions: add ->set_capacity block device method * Add ->set_capacity block device method and use it in rescan_partitions() to attempt enabling native capacity of the device upon detecting the partition which exceeds device capacity. * Add GENHD_FL_NATIVE_CAPACITY flag to try limit attempts of enabling native capacity during partition scan. Together with the consecutive patch implementing ->set_capacity method in ide-gd device driver this allows automatic disabling of Host Protected Area (HPA) if any partitions overlapping HPA are detected. Cc: Robert Hancock Cc: Frans Pop Cc: "Andries E. Brouwer" Acked-by: Al Viro Emphatically-Acked-by: Alan Cox Signed-off-by: Bartlomiej Zolnierkiewicz commit 02c33b123e59cab5771e52a012aeb810500260a2 Author: Bartlomiej Zolnierkiewicz Date: Sun Jun 7 13:52:51 2009 +0200 partitions: warn about the partition exceeding device capacity The current warning message says only about the kernel's action taken without mentioning the underlying reason behind it. Noticed-by: Robert Hancock Cc: Frans Pop Cc: "Andries E. Brouwer" Cc: Al Viro Emphatically-Acked-by: Alan Cox Signed-off-by: Bartlomiej Zolnierkiewicz commit 5095f59bda6793a7b8f0856096d6893fe98e0e51 Author: Jaswinder Singh Rajput Date: Fri Jun 5 23:27:17 2009 +0530 x86: cpu_debug: Remove model information to reduce encoding-decoding Remove model information, encoding/decoding and reduce bookkeeping. This, besides removing a lot of code and cleaning up the code, also enables these features on many more CPUs that were enumerated before. Reported-by: Ingo Molnar Signed-off-by: Jaswinder Singh Rajput Cc: Alan Cox LKML-Reference: <1244224637.8212.6.camel@ht.satnam> Signed-off-by: Ingo Molnar commit 5f4457a4f62cc9d78e04c0eb12ff0540899aad89 Merge: 9b94b3a b87297f Author: Ingo Molnar Date: Sun Jun 7 12:22:15 2009 +0200 Merge branch 'linus' into x86/cpu commit ab1863fc9bc18c806338564124b1e5e7e3ef53d1 Author: Takashi Iwai Date: Sun Jun 7 12:09:17 2009 +0200 ALSA: pcm - Fix update of runtime->hw_ptr_interrupt The commit 13f040f9e55d41e92e485389123654971e03b819 made another regression, the missing update of runtime->hw_ptr_interrupt. Since this field is only checked in snd_pcmupdate__hw_ptr_interrupt(), not in snd_pcm_update_hw_ptr(), it must be updated before the hw_ptr change check. Signed-off-by: Takashi Iwai commit 62a6f465f6572e1f28765c583c12753bb3e23715 Merge: 56fdd18 bdc2911 Author: Ingo Molnar Date: Sun Jun 7 11:36:02 2009 +0200 Merge branch 'dma-debug/2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu into core/iommu commit 56fdd18c7b89a2fac1dfe5d54750c9143867fdc4 Merge: 7caf6a4 b87297f Author: Ingo Molnar Date: Sun Jun 7 11:34:59 2009 +0200 Merge branch 'linus' into core/iommu Merge reason: This branch was on an -rc5 base so pull almost-2.6.30 to resync with the latest upstream fixes and make sure the combination works fine. Signed-off-by: Ingo Molnar commit 7caf6a49bb17d0377210693af5737563b31aa5ee Author: Joerg Roedel Date: Fri Jun 5 12:01:35 2009 +0200 dma-debug: change hash_bucket_find from first-fit to best-fit Some device drivers map the same physical address multiple times to a dma address. Without an IOMMU this results in the same dma address being put into the dma-debug hash multiple times. With a first-fit match in hash_bucket_find() this function may return the wrong dma_debug_entry. This can result in false positive warnings. This patch fixes it by changing the first-fit behavior of hash_bucket_find() into a best-fit algorithm. Reported-by: Torsten Kaiser Reported-by: FUJITA Tomonori Signed-off-by: Joerg Roedel Cc: lethal@linux-sh.org Cc: just.for.lkml@googlemail.com Cc: hancockrwd@gmail.com Cc: jens.axboe@oracle.com Cc: bharrosh@panasas.com Cc: FUJITA Tomonori Cc: Linus Torvalds Cc: LKML-Reference: <20090605104132.GE24836@amd.com> Signed-off-by: Ingo Molnar commit 2f01190aa62fe9dd0a98205927b9f09fd191c017 Author: Frederic Weisbecker Date: Sat Jun 6 23:10:43 2009 +0200 perf top: Wait for a minimal set of events before reading first snapshot The first snapshot reading often occur before any events have been read in the mapped perfcounter files. Just wait until we have at least one event before starting the snapshot, or the delay before the first set of entries to be displayed may be long in case of low refresh rate. Note: we could also use a semaphore to wait before "print_entries" number of eveents is reached, but again this value is tunable and we can't ensure we will even reach it. Also we could base on a default mimimum set of entries for the first refresh, say 15, but again, the minimal sample is tunable, and we could end up displaying nothing until we have a minimal default set of events, which can take some time in case of high samples filters. Hence this simple solution which partially covers the default case. [ Impact: fix display artifacts in perf top ] Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo LKML-Reference: <1244322643-6447-1-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar commit ad0b0822f98ef547e2461ce463e4233bad7848a8 Author: Figo.zhang Date: Sun Jun 7 13:37:27 2009 +0800 ALSA: sgio2audio.c: clean up checking vfree() does it's own 'NULL' check,so no need for check before calling it. Signed-off-by: Figo.zhang Signed-off-by: Takashi Iwai commit f0472d0ec89bef2ea4432828c3daa1b26ef569aa Author: Steve French Date: Sat Jun 6 21:09:39 2009 +0000 [CIFS] Add mention of new mount parm (forceuid) to cifs readme Also update fs/cifs/CHANGES Signed-off-by: Steve French commit 4ae1507f6d266d0cc3dd36e474d83aad70fec9e4 Author: Jeff Layton Date: Sun May 24 18:45:15 2009 -0400 cifs: make overriding of ownership conditional on new mount options We have a bit of a problem with the uid= option. The basic issue is that it means too many things and has too many side-effects. It's possible to allow an unprivileged user to mount a filesystem if the user owns the mountpoint, /bin/mount is setuid root, and the mount is set up in /etc/fstab with the "user" option. When doing this though, /bin/mount automatically adds the "uid=" and "gid=" options to the share. This is fortunate since the correct uid= option is needed in order to tell the upcall what user's credcache to use when generating the SPNEGO blob. On a mount without unix extensions this is fine -- you generally will want the files to be owned by the "owner" of the mount. The problem comes in on a mount with unix extensions. With those enabled, the uid/gid options cause the ownership of files to be overriden even though the server is sending along the ownership info. This means that it's not possible to have a mount by an unprivileged user that shows the server's file ownership info. The result is also inode permissions that have no reflection at all on the server. You simply cannot separate ownership from the mode in this fashion. This behavior also makes MultiuserMount option less usable. Once you pass in the uid= option for a mount, then you can't use unix ownership info and allow someone to share the mount. While I'm not thrilled with it, the only solution I can see is to stop making uid=/gid= force the overriding of ownership on mounts, and to add new mount options that turn this behavior on. Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 23b87116c7c4f73597965218b66041acbdb4e79f Author: Ingo Molnar Date: Sat Jun 6 21:25:29 2009 +0200 perf annotate: Fix command line help text Arjan noticed this bug in the perf annotate help output: -s, --symbol symbol to annotate that should be instead. Reported-by: Arjan van de Ven Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit e9fbc9dc9214d6a9de7d62627be5414804fd7b9f Author: Arjan van de Ven Date: Sat Jun 6 21:22:33 2009 +0200 perf_counter tools: Initialize a stack variable before use the "perf report" utility crashed in some circumstances because the "sym" stack variable was not initialized before used (as also proven by valgrind). With this fix both the crash goes away and valgrind no longer complains. Signed-off-by: Arjan van de Ven Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 39273ee9756917129de3190d469b0b120f87e763 Author: Ingo Molnar Date: Sat Jun 6 21:17:03 2009 +0200 perf annotate: Automatically pick up vmlinux in the local directory Right now kernel debug info does not get resolved by default, because we dont know where to look for the vmlinux. The -k option can be used for that - but if no option is given, pick up vmlinux files in the current directory - in case a kernel hacker runs profiling from the source directory that the kernel was built in. The real solution would be to embedd the location (and perhaps the date/timestamp) of the vmlinux file in /proc/kallsyms, so that tools can pick it up automatically. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 8953645fec933f992223286ad407dc371ac2caa5 Author: Ingo Molnar Date: Sat Jun 6 21:04:17 2009 +0200 perf_counter tools: Fix error condition in parse_aliases() gcc warned about this bug: util/parse-events.c: In function ‘parse_generic_hw_symbols’: util/parse-events.c:175: warning: comparison is always false due to limited range of data type util/parse-events.c:182: warning: comparison is always false due to limited range of data type util/parse-events.c:190: warning: comparison is always false due to limited range of data type Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 7d37a0cbd68c875fa984fa97bcf5c7f4b7950b6d Author: Arjan van de Ven Date: Sat Jun 6 20:36:38 2009 +0200 perf_counter tools: Warning fixes on 32-bit Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 864709302a80f26fa9da3be5b47304f0b8bae192 Author: Ingo Molnar Date: Sat Jun 6 20:33:43 2009 +0200 perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ Several people have suggested that 'perf' has become a full-fledged tool that should be moved out of Documentation/. Move it to the (new) tools/ directory. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 75b5032212641f6d38ac041416945e70da833b68 Merge: 0b73da3 b87297f Author: Ingo Molnar Date: Sat Jun 6 20:21:25 2009 +0200 Merge branch 'linus' into perfcounters/core Merge reason: Pick up the latest fixes before the -v8 perfcounters release. Signed-off-by: Ingo Molnar commit 0b73da3f40128eab6ca2a07508f424029a1edaeb Author: Ingo Molnar Date: Sat Jun 6 15:48:52 2009 +0200 perf_counter tools: Add 'perf annotate' feature Add new perf sub-command to display annotated source code: $ perf annotate decode_tree_entry ------------------------------------------------ Percent | Source code & Disassembly of /home/mingo/git/git ------------------------------------------------ : : /home/mingo/git/git: file format elf64-x86-64 : : : Disassembly of section .text: : : 00000000004a0da0 : : *modep = mode; : return str; : } : : static void decode_tree_entry(struct tree_desc *desc, const char *buf, unsigned long size) : { 3.82 : 4a0da0: 41 54 push %r12 : const char *path; : unsigned int mode, len; : : if (size < 24 || buf[size - 21]) 0.17 : 4a0da2: 48 83 fa 17 cmp $0x17,%rdx : *modep = mode; : return str; : } : : static void decode_tree_entry(struct tree_desc *desc, const char *buf, unsigned long size) : { 0.00 : 4a0da6: 49 89 fc mov %rdi,%r12 0.00 : 4a0da9: 55 push %rbp 3.37 : 4a0daa: 53 push %rbx : const char *path; : unsigned int mode, len; : : if (size < 24 || buf[size - 21]) 0.08 : 4a0dab: 76 73 jbe 4a0e20 0.00 : 4a0dad: 80 7c 16 eb 00 cmpb $0x0,-0x15(%rsi,%rdx,1) 3.48 : 4a0db2: 75 6c jne 4a0e20 : static const char *get_mode(const char *str, unsigned int *modep) : { : unsigned char c; : unsigned int mode = 0; : : if (*str == ' ') 1.94 : 4a0db4: 0f b6 06 movzbl (%rsi),%eax 0.39 : 4a0db7: 3c 20 cmp $0x20,%al 0.00 : 4a0db9: 74 65 je 4a0e20 : return NULL; : : while ((c = *str++) != ' ') { 0.06 : 4a0dbb: 89 c2 mov %eax,%edx : if (c < '0' || c > '7') 1.99 : 4a0dbd: 31 ed xor %ebp,%ebp : unsigned int mode = 0; : : if (*str == ' ') : return NULL; : : while ((c = *str++) != ' ') { 1.74 : 4a0dbf: 48 8d 5e 01 lea 0x1(%rsi),%rbx : if (c < '0' || c > '7') 0.00 : 4a0dc3: 8d 42 d0 lea -0x30(%rdx),%eax 0.17 : 4a0dc6: 3c 07 cmp $0x7,%al 0.00 : 4a0dc8: 76 0d jbe 4a0dd7 0.00 : 4a0dca: eb 54 jmp 4a0e20 0.00 : 4a0dcc: 0f 1f 40 00 nopl 0x0(%rax) 16.57 : 4a0dd0: 8d 42 d0 lea -0x30(%rdx),%eax 0.14 : 4a0dd3: 3c 07 cmp $0x7,%al 0.00 : 4a0dd5: 77 49 ja 4a0e20 : return NULL; : mode = (mode << 3) + (c - '0'); 3.12 : 4a0dd7: 0f b6 c2 movzbl %dl,%eax : unsigned int mode = 0; : : if (*str == ' ') : return NULL; : : while ((c = *str++) != ' ') { 0.00 : 4a0dda: 0f b6 13 movzbl (%rbx),%edx 16.74 : 4a0ddd: 48 83 c3 01 add $0x1,%rbx : if (c < '0' || c > '7') : return NULL; : mode = (mode << 3) + (c - '0'); The first column is the percentage of samples that arrived on that particular line - relative to the total cost of the function. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 8035e4288078cb806e7dd6bafe4d3e54d44cab3f Author: Ingo Molnar Date: Sat Jun 6 15:19:13 2009 +0200 perf_counter tools: Prepare for 'perf annotate' Prepare for the 'perf annotate' implementation by splitting off builtin-annotate.c from builtin-report.c. ( We keep this commit separate to ease the later librarization of the facilities that perf-report and perf-annotate shares. ) Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit d86bf92313bfd47885a92c7de63bde392d585f95 Author: Jaroslav Kysela Date: Sat Jun 6 18:32:06 2009 +0200 ALSA: pcm - Fix a typo in hw_ptr update check Fix a typo in the commit 13f040f9e55d41e92e485389123654971e03b819 ALSA: PCM midlevel: Do not update hw_ptr_jiffies when hw_ptr is not changed which causes obvious problems with PA. Signed-off-by: Takashi Iwai commit f89d7eaf6c34828070f407d0e04b73127f176ec5 Author: Jonathan Corbet Date: Thu Jun 4 16:35:25 2009 -0600 Document the debugfs API This is an updated document covering the internal API for the debugfs filesystem. Thanks to Shen Feng for suggesting that I put this text here and noting that the old LWN version was rather out of date. Acked-by: Greg Kroah-Hartman Reported-by: Shen Feng Signed-off-by: Jonathan Corbet commit 6e6b754ffdb6415723686c733f13275397e44422 Author: Ingo Molnar Date: Tue Apr 15 22:39:31 2008 +0200 perf_counter tools: Tidy up manpage details Also fix a misalignment in usage string printing. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 502fc5c72a886ff9d4d7a596e65ecc4dd5e4d458 Author: Ingo Molnar Date: Fri Mar 13 03:20:49 2009 +0100 perf_counter tools: Uniform help printouts Also add perf list to command-list.txt. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 386b05e3a2f3c5b0a9c5575060421cca0911648a Author: Thomas Gleixner Date: Sat Jun 6 14:56:33 2009 +0200 perf_counter tools: Add help for perf list Also update other areas of the help texts. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 8faf3b547593bf6ea10df631e73204975273c4e0 Author: Ingo Molnar Date: Sat Jun 6 13:58:12 2009 +0200 perf_counter tools: Fix cache-event printout Also standardize the cache printout (so that it can be pasted back into the command) and sort out the aliases. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 86847b62f0781ccc97a79936c9ed9dc818cff67b Author: Thomas Gleixner Date: Sat Jun 6 12:24:17 2009 +0200 perf_counter tools: Add 'perf list' to list available events perf list: List all the available event types which can be used in -e (--event) options. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar commit 8326f44da090d6d304d29b9fdc7fb3e20889e329 Author: Ingo Molnar Date: Fri Jun 5 20:22:46 2009 +0200 perf_counter: Implement generalized cache event types Extend generic event enumeration with the PERF_TYPE_HW_CACHE method. This is a 3-dimensional space: { L1-D, L1-I, L2, ITLB, DTLB, BPU } x { load, store, prefetch } x { accesses, misses } User-space passes in the 3 coordinates and the kernel provides a counter. (if the hardware supports that type and if the combination makes sense.) Combinations that make no sense produce a -EINVAL. Combinations that are not supported by the hardware produce -ENOTSUP. Extend the tools to deal with this, and rewrite the event symbol parsing code with various popular aliases for the units and access methods above. So 'l1-cache-miss' and 'l1d-read-ops' are both valid aliases. ( x86 is supported for now, with the Nehalem event table filled in, and with Core2 and Atom having placeholder tables. ) Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 74b8f955a73d20b1e22403fd1ef85834fbf38d98 Author: Mark Brown Date: Sat Jun 6 11:26:15 2009 +0100 ASoC: Apostrophe patrol Signed-off-by: Mark Brown commit a21ca2cac582886a3e95c8bb84ff7c52d4d15e54 Author: Ingo Molnar Date: Sat Jun 6 09:58:57 2009 +0200 perf_counter: Separate out attr->type from attr->config Counter type is a frequently used value and we do a lot of bit juggling by encoding and decoding it from attr->config. Clean this up by creating a separate attr->type field. Also clean up the various similarly complex user-space bits all around counter attribute management. The net improvement is significant, and it will be easier to add a new major type (which is what triggered this cleanup). (This changes the ABI, all tools are adapted.) (PowerPC build-tested.) Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit ccff4b15e0847223de0a481f5b7fa5ef902cf3bd Author: Troy Kisky Date: Fri Jun 5 19:15:58 2009 -0700 ASoC: codec tlv320aic23 fix bogus divide by 0 message Some code analyzer software mistakenly gives divide by 0 error messages for these lines. This patch will end its confusion. Signed-off-by: Troy Kisky Signed-off-by: Mark Brown commit fe2245c905631a3a353504fc04388ce3dfaf9d9e Author: Mark Langsdorf Date: Sun Jul 5 15:50:52 2009 -0500 x86: enable GART-IOMMU only after setting up protection methods The current code to set up the GART as an IOMMU enables GART translations before it removes the aperture from the kernel memory map, sets the GART PTEs to UC, sets up the guard and scratch pages, or does a wbinvd(). This leaves the possibility of cache aliasing open and can cause system crashes. Re-order the code so as to enable the GART translations only after all safeguards are in place and the tlb has been flushed. AMD has tested this patch on both Istanbul systems and 1st generation Opteron systems with APG enabled and seen no adverse effects. Istanbul systems with HT Assist enabled sometimes see MCE errors due to cache artifacts with the unmodified code. Signed-off-by: Mark Langsdorf Cc: Cc: Joerg Roedel Cc: akpm@linux-foundation.org Cc: jbarnes@virtuousgeek.org Signed-off-by: Ingo Molnar commit 2f335a02b3c816e77e7df1d15b12e3bbb8f4c8f0 Author: Frederic Weisbecker Date: Fri Jun 5 19:31:01 2009 +0200 perf top: Fix zero or negative refresh delay If perf top is executed with a zero value for the refresh rate, we get a division by zero exception while computing samples_per_sec. Also a zero refresh rate is not possible, neither do we want to accept negative values. [ Impact: fix division by zero in perf top ] Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker LKML-Reference: <1244223061-5399-1-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar commit 1dba15e74aba5a90c1f2557f37e5d09f8a2df643 Author: Ingo Molnar Date: Fri Jun 5 18:37:22 2009 +0200 perf record: Set frequency correctly Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit b2fef0762fdb65cf8702eea93f4e58abeb0ecefc Author: Ingo Molnar Date: Fri Jun 5 18:07:51 2009 +0200 perf_counter tools: Sample and display frequency adjustment changes To allow the debugging of frequency-adjusting counters, sample those adjustments and display them in perf report -D. Acked-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 6a24ed6c6082ec65d19331a4bfa30c0512a1a822 Author: Peter Zijlstra Date: Fri Jun 5 18:01:29 2009 +0200 perf_counter: Fix frequency adjustment for < HZ Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 689802b2d0536e72281dc959ab9cb34fb3c304cf Author: Peter Zijlstra Date: Fri Jun 5 15:05:43 2009 +0200 perf_counter: Add PERF_SAMPLE_PERIOD In order to allow easy tracking of the period, also provide means of adding it to the sample data. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit ac4bcf889469ffbca88f234d3184452886a47905 Author: Peter Zijlstra Date: Fri Jun 5 14:44:52 2009 +0200 perf_counter: Change PERF_SAMPLE_CONFIG into PERF_SAMPLE_ID The purpose of PERF_SAMPLE_CONFIG was to identify the counters, since then we've added counter ids, use those instead. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 28cd4aa43de2b6d3b1e3385d450bfb31cbe8d72a Author: Takashi Iwai Date: Fri Jun 5 17:58:00 2009 +0200 ALSA: ctxfi - Add missing inclusion of linux/math64.h Signed-off-by: Takashi Iwai commit 136107a76fe5f62906162f730834477b71cf131e Author: Ingo Molnar Date: Fri Jun 5 17:56:21 2009 +0200 perf_counter tools: Remove -march=native Turns out that neither PowerPC nor older x86 compilers know this switch ... and since it does not make a measurable difference, just omit it. Reported-by: Paul Mackerras Reported-by: Steven Rostedt Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 3f7440a6b771169e1f11fa582e53a4259b682809 Author: Takashi Iwai Date: Fri Jun 5 17:40:04 2009 +0200 ALSA: Clean up 64bit division functions Replace the house-made div64_32() with the standard div_u64*() functions. Signed-off-by: Takashi Iwai commit 918143e8b7d6153d7a83a3f854323407939f4a7e Merge: 64edbc5 563af16 Author: Ingo Molnar Date: Fri Jun 5 16:50:29 2009 +0200 Merge branch 'tip/tracing/ftrace-4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into tracing/ftrace commit 032abb519c23000f8a0fae78bb460047f9129270 Author: Takashi Iwai Date: Fri Jun 5 16:37:19 2009 +0200 ALSA: ctxfi - Set device 0 for mixer control elements Mixer control elements are usually assigned to device 0. Signed-off-by: Takashi Iwai commit 2a36f67f8c81f0babda0e811c760b7bfa971010b Author: Takashi Iwai Date: Fri Jun 5 16:34:10 2009 +0200 ALSA: ctxfi - Clean up / optimize - Use static tables instead of assigining each funciton pointer - Add __devinit* to appropriate places; pcm, mixer and timer cannot be marked because they are kept in the function table that lives long - Move create_alsa_devs function out of struct ct_atc to mark it __devinit Signed-off-by: Takashi Iwai commit 775ffa1d3e5a550dd2c9d947d773021c61531b36 Author: Takashi Iwai Date: Fri Jun 5 16:12:16 2009 +0200 ALSA: ctxfi - Set periods_min to 2 Set 2 to minimal periods of playback pcm setups, too. Signed-off-by: Takashi Iwai commit b7bbf876087e0e2c0ba723a8398083c9a9ac1dfd Author: Takashi Iwai Date: Fri Jun 5 16:11:07 2009 +0200 ALSA: ctxfi - Use native timer interrupt on emu20k1 emu20k1 has a native timer interrupt based on the audio clock, which is more accurate than the system timer (from the synchronization POV). This patch adds the code to handle this with multiple streams. The system timer is still used on emu20k2, and can be used also for emu20k1 easily by changing USE_SYSTEM_TIMER to 1 in cttimer.c. Signed-off-by: Takashi Iwai commit 1b8e69662e1a086878bf930a6042daf7f8a076cc Author: Bjorn Helgaas Date: Fri Jun 5 14:37:23 2009 +0000 pnp: add PNP resource range checking function Add a PNP resource range check function, indicating whether a resource has been assigned to any device. Signed-off-by: Bjorn Helgaas [apw@canonical.com: fixed up exports et al] Signed-off-by: Andy Whitcroft Signed-off-by: Eric Anholt commit b66d18ddb16603d1e1ec39cb2ff3abf3fd212180 Author: Jesse Barnes Date: Fri May 15 14:11:48 2009 -0700 drm/i915: avoid non-atomic sysrq execution The sysrq functions are executed in hardirq context, so we shouldn't be calling sleeping functions from them, like mutex_locks or memory allocations. Fix up the i915 sysrq handler to avoid this. Signed-off-by: Jesse Barnes Signed-off-by: Eric Anholt commit 42c2798b35b95c471877133e19ccc3cab00e9b65 Author: Jesse Barnes Date: Tue May 5 13:13:16 2009 -0700 drm/i915: apply G45 vblank count code to all G4x chips and fix max_frame_count All G4x and newer chips use the new style frame count register, with a full 32 bit frame count. Update the code to reflect this. Signed-off-by: Jesse Barnes Signed-off-by: Eric Anholt commit 70aa96ca2d8d938fc036ef8fd189b0151f4fc3ba Author: Jarod Wilson Date: Wed May 27 17:20:39 2009 -0400 drm/i915: add ignore lvds quirk info for AOpen Mini PC Fix a FIXME in the intel LVDS bring-up code, adding the appropriate blacklist entry for the AOpen Mini PC, courtesy of a dmidecode dump from Florian Demmer. Signed-off-by: Jarod Wilson CC: Florian Demmer Signed-off-by: Eric Anholt commit 714605e4a05787c51a5ac36c926d2169cfdfbfba Author: yakui_zhao Date: Sun May 31 17:18:07 2009 +0800 drm/i915: Initialize the SDVO device based on the sdvo info parsed from VBT http://bugs.freedesktop.org/show_bug.cgi?id=20429 Signed-off-by: Zhao Yakui [anholt: Massive cleanup of the slave addr function] Signed-off-by: Eric Anholt commit 9b9d172d06b0f2d51cc9431e2c6c3055f0cf10ef Author: yakui_zhao Date: Sun May 31 17:17:17 2009 +0800 drm/i915: parse VBT general definition block to get the SDVO device info The general definition block contains the child device tables, which include the SDVO device info. For example: device slave address, device dvo port, device type. We will get the info of SDVO device by parsing the general definition blocks. Only when a valid slave address is found, it is regarded as the SDVO device. And the info of DVO port and slave address is recorded. http://bugs.freedesktop.org/show_bug.cgi?id=20429 Signed-off-by: Zhao Yakui Signed-off-by: Eric Anholt commit 59a036cfbd29aadf40d2b754cfebee2a96268752 Author: yakui_zhao Date: Sun May 31 17:16:22 2009 +0800 drm/i915: Add the structure of child_device_config in video BIOS tables. Signed-off-by: Zhao Yakui Signed-off-by: Eric Anholt commit 040d87f15a0129242463d3ed7c48381505f596e2 Author: Keith Packard Date: Sat May 30 20:42:33 2009 -0700 drm/i915: Add Display Port register defines This adds the register definitions for the display port enable register along with those for the GMCH and Link M/N ratios required to drive display port outputs. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt commit 2245fda810f870dce9b030e6aa604320abba53a5 Author: Keith Packard Date: Sat May 30 20:42:29 2009 -0700 drm/i915: Don't trim cursor addresses to 11 bits We can safely assume that cursor addresses will not extend beyond the addressable screen dimensions; setting the additional bits is harmless in any case. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt commit cb66c692d1ae257f32dc7f6085cf9cb9f2f6bab8 Author: Ma Ling Date: Sun May 31 16:58:32 2009 +0800 drm/i915: Set correct TV detection voltage level override values We detect TV connect status by setting DAC voltage level override values as 0.7 voltage for DAC_A/B/C. The corresponding 2-bits shold be 0x2, In order correctly to set last bit as 0, at first we must clean it. It fixed freedesktop.org bug #21204 Signed-off-by: Ma Ling Signed-off-by: Eric Anholt commit 2debbc836696f2a815d02630230584a1754a5022 Author: Ingo Molnar Date: Fri Jun 5 14:29:10 2009 +0200 perf_counter tools: Clarify events/samples naming A number of places said 'events' while they should say 'samples'. Acked-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 8edd4286f99f78fe07fe9196e69d5643da86cada Author: Ingo Molnar Date: Fri Jun 5 14:13:18 2009 +0200 perf report: Display user/kernel differentiator Before: 25.96% copy_user_generic_string 15.23% two_op 15.19% one_op 6.92% enough_duration 1.23% alloc_pages_current 1.14% acpi_os_read_port 1.08% _spin_lock After: 25.96% [k] copy_user_generic_string 15.23% [.] two_op 15.19% [.] one_op 6.92% [.] enough_duration 1.23% [k] alloc_pages_current 1.14% [k] acpi_os_read_port 1.08% [k] _spin_lock The '[k]' differentiator is a quick clue that it's a kernel symbol, without having to bring in the full dso column. Acked-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit fc54db5105d01ad691a7d747064c7890e17f936c Author: Peter Zijlstra Date: Fri Jun 5 14:04:59 2009 +0200 perf report: Deal with maps In order to deal with [vdso] maps generalize the ip->symbol path a bit and allow to override some bits with custom functions. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 089dd79db9264dc0da602bad45d42f1b3e7d1e07 Author: Peter Zijlstra Date: Fri Jun 5 14:04:55 2009 +0200 perf_counter: Generate mmap events for install_special_mapping() In order to track the vdso also generate mmap events for install_special_mapping(). Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit f7b6eb3fa07269da20dbbde8ba37a0273fdbd9c9 Author: Peter Zijlstra Date: Fri Jun 5 14:04:51 2009 +0200 x86: Set context.vdso before installing the mapping In order to make arch_vma_name() work from inside install_special_mapping() we need to set the context.vdso before calling it. ( This is needed for performance counters to be able to track this special executable area. ) Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit cf1f45744c6fa3501e0a6f0ddc418f0ef27e725b Author: Ingo Molnar Date: Fri Jun 5 13:27:02 2009 +0200 perf record, top: Implement --freq Support frequency-based profiling and make it the default. (Also add a Hz printout in perf top.) Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 541998a18b72d2cac48b3369fa4540116ff3f0a8 Author: Zhenyu Wang Date: Fri Jun 5 15:38:44 2009 +0800 drm/i915: Add LVDS support for IGDNG Signed-off-by: Zhenyu Wang Signed-off-by: Eric Anholt commit 30ad48b7334a2eb2edf22f6c91f7b3f22a22a837 Author: Zhenyu Wang Date: Fri Jun 5 15:38:43 2009 +0800 drm/i915: Add HDMI support on IGDNG Signed-off-by: Zhenyu Wang Signed-off-by: Eric Anholt commit 2c07245fb8f7f0a282282e5a9747e46defdb2cc7 Author: Zhenyu Wang Date: Fri Jun 5 15:38:42 2009 +0800 drm/i915: enable kernel modesetting on IGDNG This adds kernel mode setting on IGDNG with VGA output support. Note that suspend/resume doesn't work yet. Signed-off-by: Zhenyu Wang Signed-off-by: Eric Anholt commit 2cce0d8740f0d1454d012401257d96c513ce358f Author: Zhenyu Wang Date: Fri Jun 5 15:38:41 2009 +0800 drm/i915: Disable tiling on IGDNG for now Swizzle bit detection not working right on it. Signed-off-by: Zhenyu Wang Signed-off-by: Eric Anholt commit e170b030dcd6aed11dde2d124c09991ec771f529 Author: Zhenyu Wang Date: Fri Jun 5 15:38:40 2009 +0800 drm/i915: Disable opregion on IGDNG for now Disable OpRegion support for now until verified on new chipsets. Signed-off-by: Zhenyu Wang Signed-off-by: Eric Anholt commit b9055052d3e0388b4a5e8c3e0bbab665c5996f50 Author: Zhenyu Wang Date: Fri Jun 5 15:38:38 2009 +0800 drm/i915: Add new chipset register definitions Signed-off-by: Zhenyu Wang Signed-off-by: Eric Anholt commit 280da227c870a50f669de0c8d46bfb2c62da9995 Author: Zhenyu Wang Date: Fri Jun 5 15:38:37 2009 +0800 drm/i915: Add chipset/feature defines for for new chipsets Signed-off-by: Zhenyu Wang [anholt: dropped drm_pciids.h hunk to avoid loading an incomplete driver] Signed-off-by: Eric Anholt commit f250c030a87273f8838a2302bee7c2b4d03e9151 Author: Ingo Molnar Date: Fri Jun 5 13:18:41 2009 +0200 perf record: Split out counter creation into a helper function Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 32cb055b57eab803ea82b76dc913b0378e5af145 Author: Zhenyu Wang Date: Fri Jun 5 15:38:36 2009 +0800 agp/intel: Add support for new chipsets Both desktop and mobile versions are added. Signed-off-by: Zhenyu Wang Signed-off-by: Eric Anholt commit 6bc5874a1ddf98ac0fe6c4eab7d286c11cb1c748 Author: Takashi Iwai Date: Fri Jun 5 12:15:51 2009 +0200 ALSA: ctxfi - Fix previous fix for 64bit DMA Remove unneeded substitution to 32bit int to make it really working. Signed-off-by: Takashi Iwai commit 3e1647c5b54a91a7182e121cfe569e6f0bf167ec Author: Guido Günther Date: Fri Jun 5 00:47:26 2009 +0200 ALSA: support Sony Vaio TT with BIOS probing only we offer a non functional headphone swith and volume slider. Signed-off-by: Guido Günther Signed-off-by: Takashi Iwai commit f6d03139d745198b434f65a28aabed524f415a4c Author: Steven Whitehouse Date: Fri Jun 5 07:18:57 2009 +0100 GFS2: Fix locking issue mounting gfs2meta fs This patch uses sget() to get a reference to the existing gfs2 sb when mouting the gfs2meta filesystem (in fact thats just another mount of the gfs2 filesystem with a different root and this interface is for backward compatibility). Signed-off-by: Steven Whitehouse Reported-by: Benjamin Marzinski Tested-by: Benjamin Marzinski Cc: Christoph Hellwig commit 42a0b31827e4c555efebda7d347cf4ea6b82913a Author: Takashi Iwai Date: Fri Jun 5 09:29:22 2009 +0200 ALSA: ctxfi - Fix endian-dependent codes The UAA-mode check in hwct20k1.c is implemented with the endian-dependent codes. Fix to be more portable (and readable). Signed-off-by: Takashi Iwai commit 6d74b86d3c0f9cfa949566a862aaad840e393249 Author: Takashi Iwai Date: Fri Jun 5 09:26:41 2009 +0200 ALSA: ctxfi - Allow 64bit DMA emu20kx chips support 64bit address PTE. Allow the DMA bit mask to accept 64bit address, too. Signed-off-by: Takashi Iwai commit ee7b31fe5c5da8a038b96e54ae9fbd5dcab3b1da Author: Yong Wang Date: Fri Jun 5 11:37:35 2009 +0800 perf_counter tools: Fix incorrect printf formats Otherwise the code does not compile on 32-bit boxes. builtin-report.c: In function 'map__fprintf': builtin-report.c:240: error: format '%lx' expects type 'long unsigned int', but argument 3 has type 'uint64_t' builtin-report.c:240: error: format '%lx' expects type 'long unsigned int', but argument 4 has type 'uint64_t' builtin-report.c:240: error: format '%lx' expects type 'long unsigned int', but argument 5 has type 'uint64_t' Signed-off-by: Yong Wang Cc: Arnaldo Carvalho de Melo LKML-Reference: <20090605033735.GA20451@ywang-moblin2.bj.intel.com> Signed-off-by: Ingo Molnar commit 6dc5f2a41759987e35e757ef00192e7b424563bb Author: Paul Mackerras Date: Fri Jun 5 12:36:28 2009 +1000 perf_counter: Fix lockup with interrupting counters Commit 8e3747c1 ("perf_counter: Change data head from u32 to u64") changed the type of 'head' in struct perf_mmap_data from atomic_t to atomic_long_t, but missed converting one use of atomic_read on it to atomic_long_read. The effect of using atomic_read rather than atomic_long_read on powerpc (and other big-endian architectures) is that we get the high half of the 64-bit quantity, resulting in the cmpxchg retry loop in perf_output_begin spinning forever as soon as data->head becomes non-zero. On little-endian architectures such as x86 we would get the low half, resulting in a lockup once data->head becomes greater than 4G. This fixes it by using atomic_long_read rather than atomic_read. [ Impact: fix perfcounter lockup on PowerPC / big-endian systems ] Signed-off-by: Paul Mackerras Cc: Peter Zijlstra LKML-Reference: <18984.33964.21541.743096@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit f8514083cd61daef12fba5ef883ad9352c450428 Author: Aneesh Kumar K.V Date: Fri Jun 5 00:56:49 2009 -0400 ext4: truncate the file properly if we fail to copy data from userspace In generic_perform_write if we fail to copy the user data we don't update the inode->i_size. We should truncate the file in the above case so that we don't have blocks allocated outside inode->i_size. Add the inode to orphan list in the same transaction as block allocation This ensures that if we crash in between the recovery would do the truncate. Signed-off-by: Aneesh Kumar K.V CC: Jan Kara Signed-off-by: "Theodore Ts'o" commit 1938a150c25bf7c2c47182e753a1038945b70b0e Author: Aneesh Kumar K.V Date: Fri Jun 5 01:00:26 2009 -0400 ext4: Avoid leaking blocks after a block allocation failure We should add inode to the orphan list in the same transaction as block allocation. This ensures that if we crash after a failed block allocation and before we do a vmtruncate we don't leak block (ie block marked as used in bitmap but not claimed by the inode). Signed-off-by: Aneesh Kumar K.V CC: Jan Kara Signed-off-by: "Theodore Ts'o" commit 04288f42033607099cebf5ca15ce8dcec3a9688b Author: Mimi Zohar Date: Thu Jun 4 13:53:10 2009 -0400 integrity: ima audit dentry_open failure Until we start appraising measurements, the ima_path_check() return code should always be 0. - Update the ima_path_check() return code comment - Instead of the pr_info, audit the dentry_open failure Signed-off-by: Mimi Zohar Acked-by: Eric Paris Signed-off-by: James Morris commit b31e15527a9bb71b6a11a425d17ce139a62f5af5 Author: Eric Sandeen Date: Thu Jun 4 17:36:36 2009 -0400 ext4: Change all super.c messages to print the device This patch changes ext4 super.c to include the device name with all warning/error messages, by using a new utility function ext4_msg. It's a rather large patch, but very mechanic. I left debug printks alone. This is a straightforward port of a patch which Andi Kleen did for ext3. Cc: Andi Kleen Signed-off-by: Eric Sandeen Signed-off-by: "Theodore Ts'o" commit 03f5d8bcf094a5e3b501bd2ae1553656efa8d1be Author: Jan Kara Date: Tue Jun 9 00:17:05 2009 -0400 ext4: Get rid of EXTEND_DISKSIZE flag of ext4_get_blocks_handle() Get rid of EXTEND_DISKSIZE flag of ext4_get_blocks_handle(). This seems to be a relict from some old days and setting disksize in this function does not make much sense. Currently it was set only by ext4_getblk(). Since the parameter has some effect only if create == 1, it is easy to check by grepping through the sources that the three callers which end up calling ext4_getblk() with create == 1 (ext4_append, ext4_quota_write, ext4_mkdir) do the right thing and set disksize themselves. Signed-off-by: Jan Kara Signed-off-by: "Theodore Ts'o" commit 76a0f40fd6eff1bce3b91925cea7587b3399fe80 Author: Frederic Weisbecker Date: Thu Jun 4 22:15:58 2009 +0200 perf_counter tools: Fix warn_unused_result warnings Fix warnings for return values that we don't care about: util/quote.c:222: attention : ignoring return value of ‘fwrite’, declared with attribute warn_unused_result util/quote.c:235: attention : ignoring return value of ‘fwrite’, declared with attribute warn_unused_result util/quote.c: In function ‘write_name_quotedpfx’: util/quote.c:290: attention : ignoring return value of ‘fwrite’, declared with attribute warn_unused_result Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker LKML-Reference: <1244146558-8635-1-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar commit 172124e220f1854acc99ee394671781b8b5e2120 Author: Jens Axboe Date: Thu Jun 4 22:34:44 2009 +0200 Revert "block: implement blkdev_readpages" This reverts commit db2dbb12dc47a50c7a4c5678f526014063e486f6. It apparently causes problems with partition table read-ahead on archs with large page sizes. Until that problem is diagnosed further, just drop the readpages support on block devices. Signed-off-by: Jens Axboe commit 9ac995457b2a148ed9bb8860e8b7cb869327b102 Author: Arnaldo Carvalho de Melo Date: Thu Jun 4 13:54:00 2009 -0300 perf report: Add -vvv to print the list of threads and its mmaps Signed-off-by: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Frederic Weisbecker Signed-off-by: Ingo Molnar commit 0f5486b5c71a831a713ce356d8d06822e3c7c379 Author: Frederic Weisbecker Date: Thu Jun 4 20:48:04 2009 +0200 perf_counter: Sleep before refresh using poll in perf top perf top is refreshed every delay_secs the thread runs in such loop: while (sleep(delay_secs)) { print_sym_table(); } At the end of print_sym_table(), poll is used without sleep delay to check if we have something from stdin. It means that this check is done only every delay_secs, which can be higher that 2 secs if the user defined a custom refresh rate. We can drop sleep() here and directly use poll to wait between refresh periods, so that the reaction after the user stops perf top after typing "Enter" is immediate and doesn't suffer from the delay_secs latency. Nb: poll doesn't add any overhead that can parasite perf top measures since it sleeps the entire timeout here. Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker LKML-Reference: <1244141284-7507-1-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar commit 2ae19acaa50a09c1099956efb895c0aca74ab050 Author: Theodore Ts'o Date: Thu Apr 16 07:44:45 2009 -0400 Documentation: Add "how to write a good patch summary" to SubmittingPatches Unfortunately many patch submissions are arriving with painfully poor patch descriptions. As a result of the discussion on LKML: http://lkml.org/lkml/2009/4/15/296 explain how to submit a better patch description, in the (perhaps vain) hope that maintainers won't end up having to rewrite the git commit logs as often as they do today. Signed-off-by: "Theodore Ts'o" Cc: Ingo Molnar Signed-off-by: Jonathan Corbet commit 5801da1b2f1207da21271ffd6768cd40a6c7f1c4 Author: Pavel Machek Date: Thu Jun 4 16:26:50 2009 +0200 SubmittingPatches: fix typo Fix typo. Signed-off-by: Pavel Machek Signed-off-by: Jonathan Corbet commit 5d98932ab0acb699dc56d9e252f056b9b2cdab25 Author: Jonathan Corbet Date: Tue Apr 21 13:33:06 2009 -0600 docs: Encourage better changelogs in the development process document Add a couple of paragraphs to the "patch formatting" section on how patches should be described. This text is shamelessly cribbed from suggestions posted by Rusty Russell. Signed-off-by: Jonathan Corbet commit bbb0a4247aaf1eabbd6d87750eafe99c577920f7 Author: Jonathan Corbet Date: Fri Jan 16 09:49:50 2009 -0700 Document Reported-by in SubmittingPatches Randy pointed out that the Reported-By tag should be documented with the others in SubmittingPatches. Reported-by: Randy Dunlap Signed-off-by: Jonathan Corbet commit 62fc44536c14b5787531bac7417580fca54c88b4 Author: Peter Zijlstra Date: Thu Jun 4 16:53:49 2009 +0200 perf_counter tools: Use fork and remove munmap events Use fork events to clone comm and map data and remove everything munmap related Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit d99e9446200c1ffab28cb0e39b76c34a2bfafd06 Author: Peter Zijlstra Date: Thu Jun 4 17:08:58 2009 +0200 perf_counter: Remove munmap stuff In name of keeping it simple, only track mmap events. Userspace will have to remove old overlapping maps when it encounters them. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 60313ebed739b331e8e61079da27a11ee3b73a30 Author: Peter Zijlstra Date: Thu Jun 4 16:53:44 2009 +0200 perf_counter: Add fork event Create a fork event so that we can easily clone the comm and dso maps without having to generate all those events. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 20c84e959ec11b1803d2b2832eef703d5fbe7f7b Author: Ingo Molnar Date: Thu Jun 4 16:33:00 2009 +0200 perf stat: Update help text Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit edc52deac624e4641211a325c23da2a73b01a85d Author: Ingo Molnar Date: Thu Jun 4 16:24:37 2009 +0200 perf report: Bail out if there are unrecognized options/arguments Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 13d0ab5ec29852a6925f612830fa9e822669ece6 Author: Ingo Molnar Date: Thu Jun 4 15:40:25 2009 +0200 perf_counter tools: Dont output in color on !tty Dont emit ASCII color characters if the terminal is not a tty, such as when perf report gets redirected into a file. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 8fc0321f1ad0ffef969056dda91b453bbd7a494d Author: Ingo Molnar Date: Thu Jun 4 15:19:47 2009 +0200 perf_counter tools: Add color terminal output support Add Git's color printing library to util/color.[ch]. Add it to perf report, with a trivial example to print high-overhead entries in red, low-overhead entries in green. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 71dd8945d8d827ab101cd287f9480ef22fc7c1b6 Author: Peter Zijlstra Date: Thu Jun 4 15:16:56 2009 +0200 perf report: Add consistent spacing rules Make the sort header and the print function have the same column width. Signed-off-by: Peter Zijlstra Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit e3509ff0fb9df53e45cd68488e3b463a80455db7 Author: Daniel Mack Date: Wed Jun 3 17:44:49 2009 +0200 ASoC: fix NULL pointer dereference in soc_suspend() In case the initalization of an soc_device failed, there is no codec associated with it. soc_suspend() will still dereference the pointer and cause an Ooops when entering the sleep mode. This happens on our board with a multi-target kernel image when booted on a machine without audio circuits. This patch makes the code bail out very early in this special case. Signed-off-by: Daniel Mack Signed-off-by: Mark Brown commit 05ca061eb9704ad9b0739f88046276792b75f2c1 Author: Ingo Molnar Date: Thu Jun 4 14:21:16 2009 +0200 perf report: Print out the total number of events So that the statistical quality of the profile can be estimated at a glance. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 65f759831179bb8922f2a91a989487161d476a94 Author: Alexander Beregalov Date: Thu Jun 4 13:46:16 2009 +0400 ALSA: hda_intel: fix build error when !PM Fix this build error when CONFIG_PM is not set: ound/pci/hda/hda_intel.c: In function 'azx_bus_reset': sound/pci/hda/hda_intel.c:1270: error: implicit declaration of function 'snd_pcm_suspend_all' sound/pci/hda/hda_intel.c:1271: error: implicit declaration of function 'snd_hda_suspend' sound/pci/hda/hda_intel.c:1272: error: implicit declaration of function 'snd_hda_resume' Signed-off-by: Alexander Beregalov Signed-off-by: Takashi Iwai commit bd74137ec9aaca3df3ff22b92455fddf7afaced1 Author: Ingo Molnar Date: Thu Jun 4 14:13:04 2009 +0200 perf_counter tools: Print out symbol parsing errors only if --verbose Also, add a suggestion to 'perf report', if the default sort order is used. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 95ed6fd06e52bf850cd17524f0b36ed14300c10d Author: Peter Zijlstra Date: Thu Jun 4 15:00:45 2009 +0200 perf report: Simplify symbol output The DSO can be printed already - no need to repeat it in the symbol field. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit af794b94ae8a16fb4a9da6ce640c122efb44e2a0 Author: Ingo Molnar Date: Thu Jun 4 13:58:13 2009 +0200 perf_counter tools: Build with native optimization Build the tools with -march=native by default. No measurable difference in speed though, compared to the default, on a Nehalem testbox. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 64edbc562034f2ec3fce382cb208fab40586d005 Merge: 43bd123 0f6ce3d Author: Ingo Molnar Date: Thu Jun 4 13:59:26 2009 +0200 Merge branch 'tracing/ftrace' into tracing/core Merge reason: this mini-topic had outstanding problems that delayed its merge, so it does not fast-forward. Signed-off-by: Ingo Molnar commit b962442e46a9340bdbc6711982c59ff0cc2b5afb Author: Eric Anholt Date: Wed Jun 3 07:27:35 2009 +0000 drm/i915: Change GEM throttling to be 20ms like the comment says. keithp didn't like the original 20ms plan because a cooperative client could be starved by an uncooperative client. There may even have been problems with cooperative clients versus cooperative clients. So keithp changed throttle to just wait for the second to last seqno emitted by that client. It worked well, until we started getting more round-trips to the server due to DRI2 -- the server throttles in BlockHandler, and so if you did more than one round trip after finishing your frame, you'd end up unintentionally syncing to the swap. Fix this by keeping track of the client's requests, so the client can wait when it has an outstanding request over 20ms old. This should have non-starving behavior, good behavior in the presence of restarts, and less waiting. Improves high-settings openarena performance on my GM45 by 50%. Signed-off-by: Eric Anholt Reviewed-by: Jesse Barnes commit 1fd1c624362819ecc36db2458c6a972c48ae92d6 Author: Eric Anholt Date: Wed Jun 3 07:26:58 2009 +0000 drm/i915: Save/restore cursor state on suspend/resume. This may fix cursor corruption in X on resume, which would persist until the cursor was hidden and then shown again. V2: Also include the cursor control regs. Signed-off-by: Eric Anholt Reviewed-by: Jesse Barnes commit df97992c6e25ffc66c549c8bc59262dc627c6d17 Author: Ingo Molnar Date: Thu Jun 4 13:41:22 2009 +0200 perf record/report: Fix PID/COMM handling Fix two bugs causing lost comm mappings: - initial PID is not 0 but getpid() - when we are unable to handle an mmap event, dont assume the event itself is broken - try to parse the stream. This way we wont lose comm events. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 48c72fccbfb1db01b5d0b98baff4442fea50d7a4 Author: Magnus Damm Date: Thu Jun 4 20:20:24 2009 +0900 sh: 16-bit get_unaligned() sh4a fix This patch fixes the 16-bit case of the sh4a specific unaligned access implementation. Without this patch the 16-bit version of sh4a get_unaligned() results in a 32-bit read which may read more data than intended and/or cross page boundaries. Unbreaks mtd NOR write handling on Migo-R. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 3aff27ca84fa94311ae99189e54fed8d83b69fc1 Author: Yong Wang Date: Wed Jun 3 16:42:25 2009 +0800 perf_counter: Documentation update The 'nmi' bit is no longer there. Signed-off-by: Yong Wang Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Arjan van de Ven LKML-Reference: <20090603084225.GA6553@ywang-moblin2.bj.intel.com> Signed-off-by: Ingo Molnar commit 1b58c2515be48d5df79d20210ac5a86e30094de2 Author: Paul Mackerras Date: Thu Jun 4 09:49:59 2009 +1000 perf_counter: powerpc: Use new identifier names in powerpc-specific code Commit b23f3325 ("perf_counter: Rename various fields") fixed up most of the uses of the renamed fields, but missed one instance of "record_type" in powerpc-specific code which needs to be changed to "sample_type", and a "PERF_RECORD_ADDR" in the same statement that needs to be changed to "PERF_SAMPLE_ADDR", causing compilation errors on powerpc. This fixes it. Signed-off-by: Paul Mackerras Cc: Peter Zijlstra LKML-Reference: <18983.3111.770392.800486@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 82ced6fd28653ab456c3e5b25e9ef3c1c96cd6e9 Author: Jean Delvare Date: Thu Jun 4 10:46:43 2009 +0200 ALSA: Add missing __devexit_p() markers 3 ISA sound drivers lack their __devexit_p() markers, which would cause build failures when the kernel is built without hotplug support. Signed-off-by: Jean Delvare Cc: Kyle McMartin Signed-off-by: Takashi Iwai commit d08664fdb50795b29cf70b0269ea02f7248e76c3 Author: Takashi Iwai Date: Thu Jun 4 09:58:18 2009 +0200 ASoC: Fix build error in twl4030.c Fix the (likely cut-n-paste) error by commit 16a30fbb0d3aa4ee829a2dd3d0e314e2b5ae96a9, which causes the error below: sound/soc/codecs/twl4030.c: In function 'twl4030_read_reg_cache': sound/soc/codecs/twl4030.c:152: error: 'cache' undeclared (first use in this function) Signed-off-by: Takashi Iwai commit bcb86975dbcc24f820f1a37918d53914af29ace7 Author: Tetsuo Handa Date: Thu Jun 4 15:14:34 2009 +0900 TOMOYO: Remove unused parameter. TOMOYO 2.2.0 does not check argv[] and envp[] upon execve(). We don't need to pass "struct tomoyo_page_buffer". Signed-off-by: Tetsuo Handa Signed-off-by: James Morris commit 6e53cdf11dfc8d302ebb67e7112d1baf8d7c66d4 Author: Ingo Molnar Date: Thu Jun 4 08:53:05 2009 +0200 perf top: Reduce default filter threshold On idle systems 'perf top' comes up empty by default, because the event count filter is set to 100. Reduce it to 5 instead. Also add an option to limit the number of functions displayed. Reported-by: Steven Rostedt Acked-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit a4c43beaff0fe6c83aa2505dce8ffe65db8e0a33 Author: Arnaldo Carvalho de Melo Date: Wed Jun 3 23:02:33 2009 -0300 perf report: Fix rbtree bug Ingo Molnar reported: > FYI, i just got this crash (segfault) in perf report after > collecting a long profile from Xorg: > > Starting program: /home/mingo/tip/Documentation/perf_counter/perf report > [Thread debugging using libthread_db enabled] > Detaching after fork from child process 20008. > [New Thread 0x7f92fd62a6f0 (LWP 20005)] > > Program received signal SIGSEGV, Segmentation fault. > 0x000000000041031a in __rb_erase_color (node=0x142c090, parent=0x0, > root=0x881918) > at util/rbtree.c:143 > 143 if (parent->rb_left == node) It was a problem introduced in this cset: perf report: Fix comm sorting - 8229289b607682f90b946ad2c319526303c17700 This patch should fix it. Signed-off-by: Arnaldo Carvalho de Melo Acked-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: Stephane Eranian LKML-Reference: Signed-off-by: Ingo Molnar commit e0a94c2a63f2644826069044649669b5e7ca75d3 Author: Christoph Lameter Date: Wed Jun 3 16:04:31 2009 -0400 security: use mmap_min_addr indepedently of security models This patch removes the dependency of mmap_min_addr on CONFIG_SECURITY. It also sets a default mmap_min_addr of 4096. mmapping of addresses below 4096 will only be possible for processes with CAP_SYS_RAWIO. Signed-off-by: Christoph Lameter Acked-by: Eric Paris Looks-ok-by: Linus Torvalds Signed-off-by: James Morris commit 5fdc18d938c99399b73fe894bc24cb9400a1a2ee Author: Jaroslav Kysela Date: Thu Jun 4 00:12:18 2009 +0200 ALSA: Core - clean up snd_card_set_id* calls and remove possible id collision Move locking outside snd_card_set_id_internal() function and rename it to snd_card_set_id_no_lock() for better function description. User defined id is just copied to card structure at allocation time. The real unique id procedure is called in snd_card_register() to ensure real atomicity. Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai commit 018df41861475595a51d327b83fb5830462f7a53 Author: Hector Martin Date: Thu Jun 4 00:13:40 2009 +0200 ALSA: hda - More Aspire 8930G fixes Enable all three capture channels, including the missing nid 7 which is the only one capable of capturing DMIC input Enable Headphone amp for the HP jack. This causes a volume boost for headphones, but does not cause any noticeable effect for light loads like other amps, so there is no need to make it configurable. Add Input Mix capture mux setting to capture the output of the playback input mux (that is, what goes out the speakers except for PCM) Hack another coef register because the stereo DMIC for some reason produces a nonstandard sum/difference signal. I found a bit to make it just use the sum signal for both channels, which makes it behave like a standard mono microphone. The stereo is useless anyway (they're 1cm apart). Tested working: Three capture channels, mic in, line in, DMIC. Tested not working: CD. Not sure why, might be unconnected in the actual hardware or a CD drive issue. Also looked at SPDIF. It appears to work (emitter lights up inside the HP out jack) but I lack a proper miniTOSLINK cable to test it. Signed-off-by: Hector Martin Signed-off-by: Takashi Iwai commit 13be1bf1467e3186a4a9d1b1276cc4bd31e472ea Author: Roel Kluin Date: Thu Jun 4 01:53:21 2009 +0200 ALSA: burgundy: timeout message is off by one. Timeout message is off by one. Signed-off-by: Roel Kluin Signed-off-by: Takashi Iwai commit 0b8e58a140cae2ba1c4a21ccae7c6c3c939c51f9 Author: Andreas Dilger Date: Wed Jun 3 17:59:28 2009 -0400 ext4: super.c whitespace cleanup Cleanup of whitespace and formatting. Initially driven by confusing indents for the ext4_{block,inode}_bitmap() et. al. helper routines, but figured I'd cleanup some other 80-column wrapping and other indenting problems at the same time. Signed-off-by: Andreas Dilger Signed-off-by: "Theodore Ts'o" commit bfcd3555af478dbf04c87adc9bb1a739d0a6ccff Author: Alberto Bertogli Date: Tue Jun 9 00:06:20 2009 -0400 jbd2: Fix minor typos in comments in fs/jbd2/journal.c Signed-off-by: Alberto Bertogli Signed-off-by: Theodore Ts'o commit 8051dbd2dfd1427cc102888d7d96bf39de0be150 Author: Hidetoshi Seto Date: Tue Jun 2 16:53:23 2009 +0900 x86, mce: fix for mce counters Make the MCE counters work on 32bit and add poll count in arch_irq_stat_cpu. Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 9b1beaf2b551a8a1604f104025b24e9c535c8963 Author: Andi Kleen Date: Wed May 27 21:56:59 2009 +0200 x86, mce: support action-optional machine checks Newer Intel CPUs support a new class of machine checks called recoverable action optional. Action Optional means that the CPU detected some form of corruption in the background and tells the OS about using a machine check exception. The OS can then take appropiate action, like killing the process with the corrupted data or logging the event properly to disk. This is done by the new generic high level memory failure handler added in a earlier patch. The high level handler takes the address with the failed memory and does the appropiate action, like killing the process. In this version of the patch the high level handler is stubbed out with a weak function to not create a direct dependency on the hwpoison branch. The high level handler cannot be directly called from the machine check exception though, because it has to run in a defined process context to be able to sleep when taking VM locks (it is not expected to sleep for a long time, just do so in some exceptional cases like lock contention) Thus the MCE handler has to queue a work item for process context, trigger process context and then call the high level handler from there. This patch adds two path to process context: through a per thread kernel exit notify_user() callback or through a high priority work item. The first runs when the process exits back to user space, the other when it goes to sleep and there is no higher priority process. The machine check handler will schedule both, and whoever runs first will grab the event. This is done because quick reaction to this event is critical to avoid a potential more fatal machine check when the corruption is consumed. There is a simple lock less ring buffer to queue the corrupted addresses between the exception handler and the process context handler. Then in process context it just calls the high level VM code with the corrupted PFNs. The code adds the required code to extract the failed address from the CPU's machine check registers. It doesn't try to handle all possible cases -- the specification has 6 different ways to specify memory address -- but only the linear address. Most of the required checking has been already done earlier in the mce_severity rule checking engine. Following the Intel recommendations Action Optional errors are only enabled for known situations (encoded in MCACODs). The errors are ignored otherwise, because they are action optional. v2: Improve comment, disable preemption while processing ring buffer (reported by Ying Huang) Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 8fa8dd9e3aafb7b440b7d54219891615abc6390e Author: Andi Kleen Date: Wed May 27 21:56:58 2009 +0200 x86, mce: define MCE_VECTOR Add MCE_VECTOR for the #MC exception. Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 9ff36ee9668ff41ec3274597c730524645929b0f Author: Andi Kleen Date: Wed May 27 21:56:58 2009 +0200 x86, mce: rename mce_notify_user to mce_notify_irq Rename the mce_notify_user function to mce_notify_irq. The next patch will split the wakeup handling of interrupt context and of process context and it's better to give it a clearer name for this. Contains a fix from Ying Huang [ Impact: cleanup ] Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Cc: Huang Ying Signed-off-by: H. Peter Anvin commit 4ef702c10b5df18ab04921fc252c26421d4d6c75 Author: Andi Kleen Date: Wed May 27 21:56:52 2009 +0200 x86: fix panic with interrupts off (needed for MCE) For some time each panic() called with interrupts disabled triggered the !irqs_disabled() WARN_ON in smp_call_function(), producing ugly backtraces and confusing users. This is a common situation with machine checks for example which tend to call panic with interrupts disabled, but will also hit in other situations e.g. panic during early boot. In fact it means that panic cannot be called in many circumstances, which would be bad. This all started with the new fancy queued smp_call_function, which is then used by the shutdown path to shut down the other CPUs. On closer examination it turned out that the fancy RCU smp_call_function() does lots of things not suitable in a panic situation anyways, like allocating memory and relying on complex system state. I originally tried to patch this over by checking for panic there, but it was quite complicated and the original patch was also not very popular. This also didn't fix some of the underlying complexity problems. The new code in post 2.6.29 tries to patch around this by checking for oops_in_progress, but that is not enough to make this fully safe and I don't think that's a real solution because panic has to be reliable. So instead use an own vector to reboot. This makes the reboot code extremly straight forward, which is definitely a big plus in a panic situation where it is important to avoid relying on too much kernel state. The new simple code is also safe to be called from interupts off region because it is very very simple. There can be situations where it is important that panic is reliable. For example on a fatal machine check the panic is needed to get the system up again and running as quickly as possible. So it's important that panic is reliable and all function it calls simple. This is why I came up with this simple vector scheme. It's very hard to beat in simplicity. Vectors are not particularly precious anymore since all big systems are using per CPU vectors. Another possibility would have been to use an NMI similar to kdump, but there is still the problem that NMIs don't work reliably on some systems due to BIOS issues. NMIs would have been able to stop CPUs running with interrupts off too. In the sake of universal reliability I opted for using a non NMI vector for now. I put the reboot vector into the highest priority bucket of the APIC vectors and moved the 64bit UV_BAU message down instead into the next lower priority. [ Impact: bug fix, fixes an old regression ] Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 4611a6fa4b37cf6b8b6066ed0d605c994c62a1a0 Author: Huang Ying Date: Wed May 27 21:56:57 2009 +0200 x86, mce: export MCE severities coverage via debugfs The MCE severity judgement code is data-driven, so code coverage tools such as gcov can not be used for measuring coverage. Instead a dedicated coverage mechanism is implemented. The kernel keeps track of rules executed and reports them in debugfs. This is useful for increasing coverage of the mce-test testsuite. Right now it's unconditionally enabled because it's very little code. Signed-off-by: Huang Ying Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit ed7290d0ee8f81aa78bfe816f01b012f208cafc5 Author: Andi Kleen Date: Wed May 27 21:56:57 2009 +0200 x86, mce: implement new status bits The x86 architecture recently added some new machine check status bits: S(ignalled) and AR (Action-Required). Signalled allows to check if a specific event caused an exception or was just logged through CMCI. AR allows the kernel to decide if an event needs immediate action or can be delayed or ignored. Implement support for these new status bits. mce_severity() uses the new bits to grade the machine check correctly and decide what to do. The exception handler uses AR to decide to kill or not. The S bit is used to separate events between the poll/CMCI handler and the exception handler. Classical UC always leads to panic. That was true before anyways because the existing CPUs always passed a PCC with it. Also corrects the rules whether to kill in user or kernel context and how to handle missing RIPV. The machine check handler largely uses the mce-severity grading engine now instead of making its own decisions. This means the logic is centralized in one place. This is useful because it has to be evaluated multiple times. v2: Some rule fixes; Add AO events Fix RIPV, RIPV|EIPV order (Ying Huang) Fix UCNA with AR=1 message (Ying Huang) Add comment about panicing in m_c_p. Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 86503560e48153aba539ff117450d31ab2ef76d7 Author: Andi Kleen Date: Wed May 27 21:56:58 2009 +0200 x86, mce: print header/footer only once for multiple MCEs When multiple MCEs are printed print the "HARDWARE ERROR" header and "This is not a software error" footer only once. This makes the output much more compact with many CPUs. Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 29b0f591d678838435fbb3e15ef20266f1a9e01d Author: Andi Kleen Date: Wed May 27 21:56:56 2009 +0200 x86, mce: default to panic timeout for machine checks Fatal machine checks can be logged to disk after boot, but only if the system did a warm reboot. That's unfortunately difficult with the default panic behaviour, which waits forever and the admin has to press the power button because modern systems usually miss a reset button. This clears the machine checks in the registers and make it impossible to log them. This patch changes the default for machine check panic to always reboot after 30s. Then the mce can be successfully logged after reboot. I believe this will improve machine check experience for any system running the X server. This is dependent on successfull boot logging of MCEs. This currently only works on Intel systems, on AMD there are quite a lot of systems around which leave junk in the machine check registers after boot, so it's disabled here. These systems will continue to default to endless waiting panic. v2: Only force panic timeout when it's shorter (H.Seto) v3: Only force timeout when there is no timeout (based on comment H.Seto) [ Fix changelog - HS ] Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 1b2797dcc9f0ad89bc382ace26c6baafbc7e33c2 Author: Huang Ying Date: Wed May 27 21:56:51 2009 +0200 x86, mce: improve mce_get_rip Assume IP on the stack is valid when either EIPV or RIPV are set. This influences whether the machine check exception handler decides to return or panic. This fixes a test case in the mce-test suite and is more compliant to the specification. This currently only makes a difference in a artificial testing scenario with the mce-test test suite. Also in addition do not force the EIPV to be valid with the exact register MSRs, and keep in trust the CS value on stack even if MSR is available. [AK: combination of patches from Huang Ying and Hidetoshi Seto, with new description by me] [add some description, no code changed - HS] Signed-off-by: Huang Ying Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit ac9603754dc7e286e62ae4f1067958d5b0075f99 Author: Andi Kleen Date: Wed May 27 21:56:58 2009 +0200 x86, mce: make non Monarch panic message "Fatal machine check" too ... instead of "Machine check". This is for consistency with the Monarch panic message. Based on a report from Ying Huang. v2: But add a descriptive postfix so that the test suite can distingush. Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 3c0797925f4ef9d55a32059d2af61a9c262e639d Author: Andi Kleen Date: Wed May 27 21:56:55 2009 +0200 x86, mce: switch x86 machine check handler to Monarch election. On Intel platforms machine check exceptions are always broadcast to all CPUs. This patch makes the machine check handler synchronize all these machine checks, elect a Monarch to handle the event and collect the worst event from all CPUs and then process it first. This has some advantages: - When there is a truly data corrupting error the system panics as quickly as possible. This improves containment of corrupted data and makes sure the corrupted data never hits stable storage. - The panics are synchronized and do not reenter the panic code on multiple CPUs (which currently does not handle this well). - All the errors are reported. Currently it often happens that another CPU happens to do the panic first, but reports useless information (empty machine check) because the real error happened on another CPU which came in later. This is a big advantage on Nehalem where the 8 threads per CPU lead to often the wrong CPU winning the race and dumping useless information on a machine check. The problem also occurs in a less severe form on older CPUs. - The system can detect when no CPUs detected a machine check and shut down the system. This can happen when one CPU is so badly hung that that it cannot process a machine check anymore or when some external agent wants to stop the system by asserting the machine check pin. This follows Intel hardware recommendations. - This matches the recommended error model by the CPU designers. - The events can be output in true severity order - When a panic happens on another CPU it makes sure to be actually be able to process the stop IPI by enabling interrupts. The code is extremly careful to handle timeouts while waiting for other CPUs. It can't rely on the normal timing mechanisms (jiffies, ktime_get) because of its asynchronous/lockless nature, so it uses own timeouts using ndelay() and a "SPINUNIT" The timeout is configurable. By default it waits for upto one second for the other CPUs. This can be also disabled. From some informal testing AMD systems do not see to broadcast machine checks, so right now it's always disabled by default on non Intel CPUs or also on very old Intel systems. Includes fixes from Ying Huang Fixed a "ecception" in a comment (H.Seto) Moved global_nwo reset later based on suggestion from H.Seto v2: Avoid duplicate messages [ Impact: feature, fixes long standing problems. ] Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit f94b61c2c9fdcc90773c49df9ccf9ede3ad0d7db Author: Andi Kleen Date: Wed May 27 21:56:55 2009 +0200 x86, mce: implement panic synchronization In some circumstances multiple CPUs can enter mce_panic() in parallel. This gives quite confused output because they will all dump the same machine check buffer. The other problem is that they would all panic in parallel, but not process each other's shutdown IPIs because interrupts are disabled. Detect this situation early on in mce_panic(). On the first CPU entering will do the panic, the others will just wait to be killed. For paranoia reasons in case the other CPU dies during the MCE I added a 5 seconds timeout. If it expires each CPU will panic on its own again. Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit ccc3c3192ae78dd56dcdf5353fd1a9ef5f9a3e2b Author: Andi Kleen Date: Wed May 27 21:56:54 2009 +0200 x86, mce: implement bootstrapping for machine check wakeups Machine checks support waking up the mcelog daemon quickly. The original wake up code for this was pretty ugly, relying on a idle notifier and a special process flag. The reason it did it this way is that the machine check handler is not subject to normal interrupt locking rules so it's not safe to call wake_up(). Instead it set a process flag and then either did the wakeup in the syscall return or in the idle notifier. This patch adds a new "bootstraping" method as replacement. The idea is that the handler checks if it's in a state where it is unsafe to call wake_up(). If it's safe it calls it directly. When it's not safe -- that is it interrupted in a critical section with interrupts disables -- it uses a new "self IPI" to trigger an IPI to its own CPU. This can be done safely because IPI triggers are atomic with some care. The IPI is raised once the interrupts are reenabled and can then safely call wake_up(). When APICs are disabled the event is just queued and will be picked up eventually by the next polling timer. I think that's a reasonable compromise, since it should only happen quite rarely. Contains fixes from Ying Huang. [ solve conflict on irqinit, make it work on 32bit (entry_arch.h) - HS ] Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit bd19a5e6b73df276e1ccedf9059e9ee70c372d7d Author: Andi Kleen Date: Wed May 27 21:56:55 2009 +0200 x86, mce: check early in exception handler if panic is needed The exception handler should behave differently if the exception is fatal versus one that can be returned from. In the first case it should never clear any registers because these need to be preserved for logging after the next boot. Otherwise it should clear them on each CPU step by step so that other CPUs sharing the same bank don't see duplicate events. Otherwise we risk reporting events multiple times on any CPUs which have shared machine check banks, which is a common problem on Intel Nehalem which has both SMT (two CPU threads sharing banks) and shared machine check banks in the uncore. Determine early in a special pass if any event requires a panic. This uses the mce_severity() function added earlier. This is needed for the next patch. Also fixes a problem together with an earlier patch that corrected events weren't logged on a fatal MCE. [ Impact: Feature ] Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 817f32d02a52dd7f5941534e0699883691e918df Author: Andi Kleen Date: Wed May 27 21:56:54 2009 +0200 x86, mce: add table driven machine check grading The machine check grading (as in deciding what should be done for a given register value) has to be done multiple times soon and it's also getting more complicated. So it makes sense to consolidate it into a single function. To get smaller and more straight forward and possibly more extensible code I opted towards a new table driven method. The various rules are put into a table when is then executed by a very simple interpreter. The grading engine is in a new file mce-severity.c. I also added a private include file mce-internal.h, because mce.h is already a bit too cluttered. This is dead code right now, but will be used in followon patches. Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit a0189c70e5f17f4253dd7bc575c97469900e23d6 Author: Andi Kleen Date: Wed May 27 21:56:54 2009 +0200 x86, mce: remove TSC print heuristic Previously mce_panic used a simple heuristic to avoid printing old so far unreported machine check events on a mce panic. This worked by comparing the TSC value at the start of the machine check handler with the event time stamp and only printing newer ones. This has a couple of issues, in particular on systems where the TSC is not fully synchronized between CPUs it could lose events or print old ones. It is also problematic with full system synchronization as it is added by the next patch. Remove the TSC heuristic and instead replace it with a simple heuristic to print corrected errors first and after that uncorrected errors and finally the worst machine check as determined by the machine check handler. This simplifies the code because there is no need to pass the original TSC value around. Contains fixes from Ying Huang [ Impact: bug fix, cleanup ] Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Cc: Ying Huang Signed-off-by: H. Peter Anvin commit de8a84d85ad8bb46d01d72ebc57030b95075603c Author: Andi Kleen Date: Wed May 27 21:56:53 2009 +0200 x86, mce: log corrected errors when panicing Normally the machine check handler ignores corrected errors and leaves them to machine_check_poll(). But when panicing mcp won't run, so log all errors. Note: this can still miss some cases until the "early no way out" patch later is applied too. Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 8ee08347c1e8b5680b3b3ce081e42e97bcaa1abe Author: Andi Kleen Date: Wed May 27 21:56:56 2009 +0200 x86, mce: extend struct mce user interface with more information. Experience has shown that struct mce which is used to pass an machine check to the user space daemon currently a few limitations. Also some data which is useful to print at panic level is also missing. This patch addresses most of them. The same information is also printed out together with mce panic. struct mce can be painlessly extended in a compatible way, the mcelog user space code just ignores additional fields with a warning. - It doesn't provide a wall time timestamp. There have been a few complaints about that. Fix that by adding a 64bit time_t - It doesn't provide the exact CPU identification. This makes it awkward for mcelog to decode the event correctly, especially when there are variations in the supported MCE codes on different CPU models or when mcelog is running on a different host after a panic. Previously the administrator had to specify the correct CPU when mcelog ran on a different host, but with the more variation in machine checks now it's better to auto detect that. It's also useful for more detailed analysis of CPU events. Pass CPUID 1.EAX and the cpu vendor (as encoded in processor.h) instead. - Socket ID and initial APIC ID are useful to report because they allow to identify the failing CPU in some (not all) cases. This is also especially useful for the panic situation. This addresses one of the complaints from Thomas Gleixner earlier. - The MCG capabilities MSR needs to be reported for some advanced error processing in mcelog Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit d620c67fb92aa11736112f9a03e31d8e3079c57a Author: Andi Kleen Date: Wed May 27 21:56:56 2009 +0200 x86, mce: support more than 256 CPUs in struct mce The old struct mce had a limitation to 256 CPUs. But x86 Linux supports more than that now with x2apic. Add a new field extcpu to report the extended number. Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit f6fb0ac0869500323c78fa21992fe1933af61e91 Author: Andi Kleen Date: Wed May 27 21:56:55 2009 +0200 x86, mce: store record length into memory struct mce anchor This makes it easier for tools who want to extract the mcelog out of crash images or memory dumps to adapt to changing struct mce size. The length field replaces padding, so it's fully compatible. Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit ca84f69697da0f004135e45b63ca560b6bd3554e Author: Andi Kleen Date: Wed May 27 21:56:57 2009 +0200 x86, mce: add MCE poll count to /proc/interrupts Keep a count of the machine check polls (or CMCI events) in /proc/interrupts. Andi needs this for debugging, but it's also useful in general to see what's going in by the kernel. Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 01ca79f1411eae2a45352709c838b946b1af9fbd Author: Andi Kleen Date: Wed May 27 21:56:52 2009 +0200 x86, mce: add machine check exception count in /proc/interrupts Useful for debugging, but it's also good general policy to have a counter for all special interrupts there. This makes it easier to diagnose where a CPU is spending its time. [ Impact: feature, debugging tool ] Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 872c78202c58d26596e25743791ee81a7d24abad Author: Mark Brown Date: Wed Jun 3 20:43:29 2009 +0100 ALSA: Fix double locking of card list in snd_card_register() The introduction of snd_card_set_id() added a lock on the card list to the old choose_default_id() function when using it to implement the new API call. This lock is needed to allow us to walk the list and check to see if our new name is a duplicate. Unfortunately this causes a lockup when called from snd_card_register() (in cases where no ID is supplied for the card) since the card list is already locked there. Fix this fairly hideously by factoring out the implementation and using a flag to indicate if the lock should be held. A better fix would probably be to refactor snd_card_register() to move the _set_id() outside the locking region but I can't immediately see anything I can convince myself is safe. Signed-off-by: Mark Brown Signed-off-by: Takashi Iwai commit d11444dfa78cdd887d8dfd2fab3883132aff2c2d Author: Ingo Molnar Date: Wed Jun 3 23:29:14 2009 +0200 perf report: Handle all known event types We have munmap, throttle/unthrottle and period events as well, process them - otherwise they are considered broke events and we mis-parse the next few events. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 75051724f78677532618dd164a515baf106990e5 Author: Ingo Molnar Date: Wed Jun 3 23:14:49 2009 +0200 perf report: Split out event processing helpers - Introduce per event helper functions Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit d80d338d2fb611b65830db7ea56680624776030f Author: Ingo Molnar Date: Wed Jun 3 23:14:49 2009 +0200 perf report: Clean up event processing - Split out event processig into process_events() helper. - Untangle the cwd parameters - it's constant so can be a static. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 128f048f0f0d2a477ad2555e7acd2ad15a1b6061 Author: Ingo Molnar Date: Wed Jun 3 22:19:36 2009 +0200 perf_counter: Fix throttling lock-up Throttling logic is broken and we can lock up with too small hw sampling intervals. Make the throttling code more robust: disable counters even if we already disabled them. ( Also clean up whitespace damage i noticed while reading various pieces of code related to throttling. ) Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 233f0b95ca3a0d1dcbd70bc7e519069a8e10d23e Author: Ingo Molnar Date: Wed Jun 3 21:48:40 2009 +0200 perf_counter tools: Work around warnings in older GCCs GCC 4.1.2 produces: util/parse-options.c: In function ‘get_value’: util/parse-options.c:36: warning: ‘arg’ may be used uninitialized in this function builtin-top.c: In function ‘display_thread’: builtin-top.c:178: warning: ‘printed’ may be used uninitialized in this function Annotate them away by initializing these variables to 0. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 18374ab76e3ec1cf1b0ca5a8d08e35cfc5d01669 Author: Arnaldo Carvalho de Melo Date: Wed Jun 3 14:49:21 2009 -0300 perf_counter tools: Fix off-by-one bug in symbol__new The end is really (start + len - 1). Noticed when synthesizing the PLT symbols, that are small (16 bytes), and hot on the start RIP. Signed-off-by: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: <20090603174921.GG7805@ghostprotocols.net> Signed-off-by: Ingo Molnar commit 095b3a6a030f7d4f24825ae93fc384b3d4b4fafa Author: Ingo Molnar Date: Wed Jun 3 20:13:51 2009 +0200 perf_counter tools: Optimize harder Use -O6 to build the tools. Before: 12387507370 instructions # 3121.653 M/sec After: 6244894971 instructions # 3458.437 M/sec Almost twice as fast! Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 051cdc3c2d0e24443ac03aff03ee89807ec8c589 Author: Ingo Molnar Date: Wed Jun 3 20:09:11 2009 +0200 perf help: Fix bug when there's no perf-* command around main_cmds can be empty - fix util/help.c to handle this case without segfaulting. Reported-by: Steven Rostedt Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit eed4dcd443da7a46131ef37c7a389b444905960e Author: Ingo Molnar Date: Wed Jun 3 19:59:24 2009 +0200 perf report: Add front-entry cache for lookups Before: Performance counter stats for './perf report -i perf.data.big': 12453988058 instructions Performance counter stats for './perf report -i perf.data.big': 12379566017 instructions 0.60% reduction. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 44db76c8553c328f4ae02481d77bb3a88ca17645 Author: Ingo Molnar Date: Wed Jun 3 19:36:07 2009 +0200 perf stat: Print out all arguments Before: Performance counter stats for '/home/mingo/hackbench': After: Performance counter stats for '/home/mingo/hackbench 10': Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit e98e96fe43ae92fad0930f05fb2b298e49b9f3b5 Author: Ingo Molnar Date: Wed Jun 3 19:30:38 2009 +0200 perf report: Display 100% correctly Needs to be 6.2 not 5.2, for 100.00% to be aligned properly. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 021e9f476511ebe23d7f45854a52dfe74c09b6ee Author: Ingo Molnar Date: Wed Jun 3 19:27:19 2009 +0200 perf record: Refine capture printout Print out the number of bytes captured, and the (estimated) number of events the output file contains. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit f2521b6e4c365bd0aac61b2c346e6e9f22607e31 Author: Ingo Molnar Date: Wed Jun 3 19:17:25 2009 +0200 perf_counter tools: Clean up old kerneltop references kerneltop has been replaced with perf top - so fix up a few remaining references to it in display text and error messages. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 563af16c30ede41eda2d614195d88e07f7c7103d Author: Steven Rostedt Date: Wed Jun 3 11:10:44 2009 -0400 tracing: add annotation to what type of stack trace is recorded The current method of printing out a stack trace is to add a new line and print out the trace: yum-updatesd-3120 [002] 573.691303: => do_softirq => irq_exit => smp_apic_timer_interrupt => apic_timer_interrupt This looks a bit awkward, and if we have both stack and user stack traces running, it would be nice to have a title to tell them apart, although it is easy to tell by the output. This patch adds an annotation to the start of the stack traces: init-1 [003] 929.304979: => user_path_at => vfs_fstatat => vfs_stat => sys_newstat => system_call_fastpath cat-3459 [002] 1016.824040: => <0000003aae6c0250> => <00007ffff4b06ae4> => <69636172742f6775> Signed-off-by: Steven Rostedt commit 56d8bd3f0b98972312cad683947ec90b21011199 Author: Steven Whitehouse Date: Wed Jun 3 14:52:03 2009 +0100 tracing: fix multiple use of __print_flags and __print_symbolic Here is an updated patch to include the extra call to trace_seq_init() as requested. This is vs. the latest -tip tree and fixes the use of multiple __print_flags and __print_symbolic in a single tracer. Also tested to ensure its working now: mount.gfs2-2534 [000] 235.850587: gfs2_glock_queue: 8.7 glock 1:2 dequeue PR mount.gfs2-2534 [000] 235.850591: gfs2_demote_rq: 8.7 glock 1:0 demote EX to NL flags:DI mount.gfs2-2534 [000] 235.850591: gfs2_glock_queue: 8.7 glock 1:0 dequeue EX glock_workqueue-2529 [000] 235.850666: gfs2_glock_state_change: 8.7 glock 1:0 state EX => NL tgt:NL dmt:NL flags:lDpI glock_workqueue-2529 [000] 235.850672: gfs2_glock_put: 8.7 glock 1:0 state NL => IV flags:I Signed-off-by: Steven Whitehouse LKML-Reference: <1244037123.29604.603.camel@localhost.localdomain> Signed-off-by: Steven Rostedt commit 048dc50c5e7eada19ebabbad70b7966d14283d41 Author: walimis Date: Wed Jun 3 16:01:30 2009 +0800 tracing/events: fix output format of user stack According to "events/ftrace/user_stack/format", fix the output of user stack. before fix: sh-1073 [000] 31.137561: <- <0804e33c> <- <080835c1> after fix: sh-1072 [000] 37.039329: => => <0804e33c> => <080835c1> Signed-off-by: walimis LKML-Reference: <1244016090-7814-3-git-send-email-walimisdev@gmail.com> Signed-off-by: Steven Rostedt commit f11b3f4e2932bfdcfc458ab8d1ece62724ceabfc Author: walimis Date: Wed Jun 3 16:01:29 2009 +0800 tracing/events: fix output format of kernel stack According to "events/ftrace/kernel_stack/format", output format of kernel stack should use "=>" instead of "<=". The second problem is that we shouldn't skip the first entry in the stack, although it seems to be duplicated when used in the "function" tracer, but events also use it. If we skip the first one, we will drop the topmost entry of the stack. The last problem is that if the last entry is ULONG_MAX(0xffffffff), we should drop it, otherwise it will print a NULL name line. before fix: sh-1072 [000] 26.957239: sched_process_fork: parent sh:1072 child sh:1073 sh-1072 [000] 26.957262: <= syscall_call <= sh-1072 [000] 26.957744: sched_switch: task sh:1072 [120] (R) ==> sh:1073 [120] sh-1072 [000] 26.957752: <= preempt_schedule <= wake_up_new_task <= do_fork <= sys_clone <= syscall_call <= After fix: sh-1075 [000] 39.791848: sched_process_fork: parent sh:1075 child sh:1076 sh-1075 [000] 39.791871: => sys_clone => syscall_call sh-1075 [000] 39.792713: sched_switch: task sh:1075 [120] (R) ==> sh:1076 [120] sh-1075 [000] 39.792722: => schedule => preempt_schedule => wake_up_new_task => do_fork => sys_clone => syscall_call Signed-off-by: walimis LKML-Reference: <1244016090-7814-2-git-send-email-walimisdev@gmail.com> Signed-off-by: Steven Rostedt commit 083a63b48e4dd0a6a2d44216720076dc81ebb255 Author: walimis Date: Wed Jun 3 16:01:28 2009 +0800 tracing/trace_stack: fix the number of entries in the header The last entry in the stack_dump_trace is ULONG_MAX, which is not a valid entry, but max_stack_trace.nr_entries has accounted for it. So when printing the header, we should decrease it by one. Before fix, print as following, for example: Depth Size Location (53 entries) <--- should be 52 ----- ---- -------- 0) 3264 108 update_wall_time+0x4d5/0x9a0 ... 51) 80 80 syscall_call+0x7/0xb ^^^ it's correct. Signed-off-by: walimis LKML-Reference: <1244016090-7814-1-git-send-email-walimisdev@gmail.com> Signed-off-by: Steven Rostedt commit ea05b57cc19234d8de9887c8a32c2e58e84b56ba Author: Steven Rostedt Date: Wed Jun 3 09:30:10 2009 -0400 ring-buffer: discard timestamps that are at the start of the buffer Every buffer page in the ring buffer includes its own time stamp. When an event is recorded to the ring buffer with a delta time greater than what can be held in the event header, a time stamp event is created. If the the create timestamp falls over to the next buffer page, it is redundant because the buffer page holds a full time stamp. This patch will try to discard the time stamp when it falls to the start of the next page. This change also fixes a issues with disarding events. If most events are discarded, timestamps will start to creep into the ring buffer. If we do not discard the timestamps then they can fill up the ring buffer over time and waste space. This change will keep time stamps from filling up over another page. If something is recorded in the buffer page, and the rest is filtered, then the time stamps can only fill up to the end of the page. [ Impact: prevent time stamps from filling ring buffer ] Reported-by: Tim Bird Signed-off-by: Steven Rostedt commit edd813bffc62a980bb4fb9b1243f31c1cce78da3 Author: Steven Rostedt Date: Tue Jun 2 23:00:53 2009 -0400 ring-buffer: try to discard unneeded timestamps There are times that a race may happen that we add a timestamp in a nested write. This timestamp would just contain a zero delta and serves no purpose. Now that we have a way to discard events, this patch will try to discard the timestamp instead of just wasting the space in the ring buffer. Signed-off-by: Steven Rostedt commit a2023556409cf7fec5d67a26f7fcfa57c5a4086d Author: Tim Bird Date: Tue Jun 2 17:06:54 2009 -0700 ring-buffer: fix bug in ring_buffer_discard_commit There's a bug in ring_buffer_discard_commit. The wrong pointer is being compared in order to check if the event can be freed from the buffer rather than discarded (i.e. marked as PAD). I noticed this when I was working on duration filtering. The bug is not deadly - it just results in lots of wasted space in the buffer. All filtered events are left in the buffer and marked as discarded, rather than being removed from the buffer to make space for other events. Unfortunately, when I fixed this bug, I got errors doing a filtered function trace. Multiple TIME_EXTEND events pile up in the buffer, and trigger the following loop overage warning in rb_iter_peek(): again: ... if (RB_WARN_ON(cpu_buffer, ++nr_loops > 10)) return NULL; I'm not sure what the best way is to fix this. I don't know if I should extend the loop threshhold, or if I should make the test more complex (ignore TIME_EXTEND events), or just get rid of this loop check completely. Note that if I implement a workaround for this, then I see another problem from rb_advance_iter(). I haven't tracked that one down yet. In general, it seems like the case of removing filtered events has not been working properly, and so some assumptions about buffer invariant conditions need to be revisited. Here's the patch for the simple fix: Compare correct pointer for checking if an event can be freed rather than left as discarded in the buffer. Signed-off-by: Tim Bird LKML-Reference: <4A25BE9E.5090909@am.sony.com> Signed-off-by: Steven Rostedt commit c878b7d60418a45c36d99c2dc876ebb76035d404 Author: Mark Jackson Date: Wed Jun 3 11:16:38 2009 +0100 Fix MIMC200 board LCD init This patch updates the LCD init code for the MIMC200 board. V2 fixes a .yres typo and corrects an incorrect setup value in the call to at32_add_device_lcdc() Without this patch, the lcd setup is wrong and won't display images correctly (if at all !!) Signed-off-by: Mark Jackson Signed-off-by: Haavard Skinnemoen commit a96bbc16418bc691317f265d6bf98ba941ca9c1a Author: Peter Zijlstra Date: Wed Jun 3 14:01:36 2009 +0200 perf_counter: Fix race in counter initialization We need the PID namespace and counter ID available when the counter overflows and we need to generate a sample event. [ Impact: fix kernel crash with high-frequency sampling ] Reported-by: Ingo Molnar Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: [ fixed a further crash and cleaned up the initialization a bit ] Signed-off-by: Ingo Molnar commit 8229289b607682f90b946ad2c319526303c17700 Author: Peter Zijlstra Date: Wed Jun 3 12:37:36 2009 +0200 perf report: Fix comm sorting Since we can (and do) change comm strings during the collection phase, we cannot actually sort on them to build the histogram. Therefore add an (optional) third sorting phase to collapse the histrogram. Comm sorting now builds the histrogram on threads and then in the collapse phase collects all threads with the same comm. This collapsed histogram is then reversed and sorted on events. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit e61078a0c88773d3465b0b9d665c5ed6b952b1cf Author: Peter Zijlstra Date: Wed Jun 3 11:24:33 2009 +0200 perf record: Use long arg for counter period I wrote this to test the extended period emulation, we might as well merge it. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 226f62fdd53d5b2c74e242aa11f6ad43d0285d3f Author: Peter Zijlstra Date: Wed Jun 3 11:23:56 2009 +0200 perf_counter: Add a comm hook for pure fork()s I noticed missing COMM events and found that we missed reporting them for pure forks. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 0e2595cdfd7df9f1128f7185152601ae5417483b Author: Cliff Wickman Date: Wed May 20 08:10:57 2009 -0500 x86: Fix UV BAU activation descriptor init The UV tlb shootdown code has a serious initialization error. An array of structures [32*8] is initialized as if it were [32]. The array is indexed by (cpu number on the blade)*8, so the short initialization works for up to 4 cpus on a blade. But above that, we provide an invalid opcode to the hub's broadcast assist unit. This patch changes the allocation of the array to use its symbolic dimensions for better clarity. And initializes all 32*8 entries. Shortened 'UV_ACTIVATION_DESCRIPTOR_SIZE' to 'UV_ADP_SIZE' per Ingo's recommendation. Tested on the UV simulator. Signed-off-by: Cliff Wickman Cc: LKML-Reference: Signed-off-by: Ingo Molnar commit f692fce0cf8625b6cc8678e802fb0e2e657b1ca6 Author: Cliff Cai Date: Tue Jun 2 00:18:54 2009 -0400 ASoC: SSM2602: assign last substream to the master when shutting down Fixes crash when shutting down. Signed-off-by: Cliff Cai Signed-off-by: Mike Frysinger Signed-off-by: Mark Brown commit cf485da15a3b507c7dab42337639e4f4025d3373 Author: Sonic Zhang Date: Tue Jun 2 00:18:57 2009 -0400 ASoC: Blackfin: document how anomaly 05000250 is handled Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger Signed-off-by: Mark Brown commit 80d5bd93143439aff77fd246f5d06570b7a4641e Author: Cliff Cai Date: Tue Jun 2 00:18:56 2009 -0400 ASoC: Blackfin: set the transfer size according the ac97_frame size Signed-off-by: Cliff Cai Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu Signed-off-by: Mark Brown commit 2552a710f4b991136c650bf2a6d1b81f27f6273e Author: Cliff Cai Date: Tue Jun 2 00:18:53 2009 -0400 ASoC: SSM2602: remove unsupported sample rates Signed-off-by: Cliff Cai Signed-off-by: Mike Frysinger Signed-off-by: Mark Brown commit dcd945e0d8a6d654e3e1de51faea9f98f1504aa5 Author: Paul Mackerras Date: Wed Jun 3 19:40:36 2009 +1000 perf_counter: powerpc: Fix race causing "oops trying to read PMC0" errors When using interrupting counters and limited (non-interrupting) counters at the same time, it's possible that we get an interrupt in write_mmcr0() after writing MMCR0 but before we have set up the counters using limited PMCs. What happens then is that we get into perf_counter_interrupt() with counter->hw.idx = 0 for the limited counters, leading to the "oops trying to read PMC0" error message being printed. This fixes the problem by making perf_counter_interrupt() robust against counter->hw.idx being zero (the counter is just ignored in that case) and also by changing write_mmcr0() to write MMCR0 initially with the counter overflow interrupt enable bits masked (set to 0). If the MMCR0 value requested by the caller has either of those bits set, we write MMCR0 again with the requested value of those bits after setting up the limited counters properly. Signed-off-by: Paul Mackerras Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur Cc: Stephane Eranian LKML-Reference: <18982.17684.138182.954599@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 6984efb692e97ce5f75f26e595685c04c2061bac Author: Paul Mackerras Date: Wed Jun 3 19:38:58 2009 +1000 perf_counter: powerpc: Fix event alternative code generation on POWER5/5+ Commit ef923214 ("perf_counter: powerpc: use u64 for event codes internally") introduced a bug where the return value from function find_alternative_bdecode gets put into a u64 variable and later tested to see if it is < 0. The effect is that we get extra, bogus event code alternatives on POWER5 and POWER5+, leading to error messages such as "oops compute_mmcr failed" being printed and counters not counting properly. This fixes it by using s64 for the return type of find_alternative_bdecode and for the local variable that the caller puts the value in. It also makes the event argument a u64 on POWER5+ for consistency. Signed-off-by: Paul Mackerras Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur Cc: Stephane Eranian LKML-Reference: <18982.17586.666132.90983@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit c076b9937f4912ffc09b30e155fe5246f002f21a Author: Ben Nizette Date: Wed Jun 3 11:38:20 2009 +0200 avr32: Fix clash in ATMEL_USART_ flags At the moment ATMEL_USART_{RTS,CTS,CLK} have the values 1, 2 and 3 respectively. Given these are used in bitmasks, trying to turn on the CLK line will in fact turn on the RTS and CTS lines as well. Change the value of ATMEL_USART_CLK to 4. Signed-off-by: Ben Nizette Signed-off-by: Haavard Skinnemoen commit 08ced854fc4a979d9e59ba01000bf96e7057cfbc Author: Alexander Clouter Date: Wed Jun 3 19:28:03 2009 +1000 hwrng: timeriomem - Fix potential oops (request_mem_region/__devinit) Fixed oops when calling device_unregister followed by device_register (changing __init to __devinit) and removed request_mem_region() as platform_device_register already does this which can result in EBUSY Signed-off-by: Alexander Clouter Signed-off-by: Herbert Xu commit e09f9446b94ac64b27d37e98c1110f29d712cdad Author: Steven Whitehouse Date: Wed Jun 3 10:07:44 2009 +0100 GFS2: Remove unused variable Signed-off-by: Steven Whitehouse commit ed966aac335a63083d3125198479447248637d9e Author: Ingo Molnar Date: Wed Jun 3 10:39:26 2009 +0200 perf report: Handle vDSO symbols properly We were not looking up vDSO symbols properly, because they are in the kallsyms but are user-mode entries. Pass negative addresses to the kernel dso object, this way we resolve them properly: 0.05% [kernel]: vread_tsc Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 367d04c4ec02dad34d80452e32e3370db7fb6fee Author: Jiri Slaby Date: Thu May 28 09:54:48 2009 +0200 amd_iommu: fix lock imbalance In alloc_coherent there is an omitted unlock on the path where mapping fails. Add the unlock. [ Impact: fix lock imbalance in alloc_coherent ] Signed-off-by: Jiri Slaby Cc: Joerg Roedel Signed-off-by: Joerg Roedel commit 5352f35d6ae7b8b981d77137fb268bc54d10624f Author: Ingo Molnar Date: Wed Jun 3 10:07:39 2009 +0200 perf report: Improve sort key recognition - allow case-insensitive tokens - such as --sort Comm,Symbol - allow substring shortcuts: --sort sym - detect invalid tokens and bail out Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 3502973d005ed89cc2b3f39780813a341ddba97f Author: Ingo Molnar Date: Wed Jun 3 09:38:58 2009 +0200 perf report: Print -D to stdout -D prints to stderr - which is a bit confusing - print to stdout instead. Also clean up the if (dump_trace) patterns via a dprintf helper. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 8ce998d6693bd02ab3b74ee1cc303ecb1fa9b514 Author: Arnaldo Carvalho de Melo Date: Wed Jun 3 00:54:33 2009 -0300 perf_counter tools: Cover PLT symbols too PLT, the Program Linking Table, is used with the dynamic linker to allow PIC code in executables and shared objects to figure out where functions are in other shared objects. It is one of the sources of unknown/unresolved symbols - this patch does what binutils figures out when you ask it to disassembly. (objdump -S) Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: John Kacur Cc: Stephane Eranian LKML-Reference: Signed-off-by: Ingo Molnar commit a32881066e58346f2901afe0ebdfbf0c562877e5 Author: Yong Wang Date: Wed Jun 3 13:12:55 2009 +0800 perf_counter/x86: Remove the IRQ (non-NMI) handling bits Remove the IRQ (non-NMI) handling bits as NMI will be used always. Signed-off-by: Yong Wang Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090603051255.GA2791@ywang-moblin2.bj.intel.com> Signed-off-by: Ingo Molnar commit a05c0205ba031c01bba33a21bf0a35920eb64833 Author: Martin K. Petersen Date: Wed Jun 3 09:33:18 2009 +0200 block: Fix bounce limit setting in DM blk_queue_bounce_limit() is more than a wrapper about the request queue limits.bounce_pfn variable. Introduce blk_queue_bounce_pfn() which can be called by stacking drivers that wish to set the bounce limit explicitly. Signed-off-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 3e1e0a5dd539f83438078759c8642c5dd7c24cb6 Author: Takashi Iwai Date: Wed Jun 3 08:13:15 2009 +0200 ALSA: powermac - Replace the rest of __init* All __initdata should be __devinitdata as platform device is hotpluggable. Signed-off-by: Takashi Iwai commit 5c9b6e9e618868ac66d92c81b70ad57d82033d4e Author: Stephen Rothwell Date: Wed Jun 3 15:35:19 2009 +1000 ALSA: sound/ppc: update annotations of serveral functions [I am not sure if this is the correct approach as I don't know if any of this actual hardware or drivers are really hot pluggable.] Gets rid of these build warnings: WARNING: sound/ppc/snd-powermac.o(.devinit.text+0x5c): Section mismatch in reference from the function .snd_pmac_probe() to the function .init.text:.snd_pmac_new() The function __devinit .snd_pmac_probe() references a function __init .snd_pmac_new(). If .snd_pmac_new is only used by .snd_pmac_probe then annotate .snd_pmac_new with a matching annotation. WARNING: sound/ppc/snd-powermac.o(.devinit.text+0x10c): Section mismatch in reference from the function .snd_pmac_probe() to the function .init.text:.snd_pmac_burgundy_init() The function __devinit .snd_pmac_probe() references a function __init .snd_pmac_burgundy_init(). If .snd_pmac_burgundy_init is only used by .snd_pmac_probe then annotate .snd_pmac_burgundy_init with a matching annotation. WARNING: sound/ppc/snd-powermac.o(.devinit.text+0x164): Section mismatch in reference from the function .snd_pmac_probe() to the function .init.text:.snd_pmac_daca_init() The function __devinit .snd_pmac_probe() references a function __init .snd_pmac_daca_init(). If .snd_pmac_daca_init is only used by .snd_pmac_probe then annotate .snd_pmac_daca_init with a matching annotation. WARNING: sound/ppc/snd-powermac.o(.devinit.text+0x1dc): Section mismatch in reference from the function .snd_pmac_probe() to the function .init.text:.snd_pmac_tumbler_init() The function __devinit .snd_pmac_probe() references a function __init .snd_pmac_tumbler_init(). If .snd_pmac_tumbler_init is only used by .snd_pmac_probe then annotate .snd_pmac_tumbler_init with a matching annotation. WARNING: sound/ppc/snd-powermac.o(.devinit.text+0x1ec): Section mismatch in reference from the function .snd_pmac_probe() to the function .init.text:.snd_pmac_tumbler_post_init() The function __devinit .snd_pmac_probe() references a function __init .snd_pmac_tumbler_post_init(). If .snd_pmac_tumbler_post_init is only used by .snd_pmac_probe then annotate .snd_pmac_tumbler_post_init with a matching annotation. WARNING: sound/ppc/snd-powermac.o(.devinit.text+0x28c): Section mismatch in reference from the function .snd_pmac_probe() to the function .init.text:.snd_pmac_awacs_init() The function __devinit .snd_pmac_probe() references a function __init .snd_pmac_awacs_init(). If .snd_pmac_awacs_init is only used by .snd_pmac_probe then annotate .snd_pmac_awacs_init with a matching annotation. WARNING: sound/ppc/snd-powermac.o(.devinit.text+0x2bc): Section mismatch in reference from the function .snd_pmac_probe() to the function .init.text:.snd_pmac_pcm_new() The function __devinit .snd_pmac_probe() references a function __init .snd_pmac_pcm_new(). If .snd_pmac_pcm_new is only used by .snd_pmac_probe then annotate .snd_pmac_pcm_new with a matching annotation. WARNING: sound/ppc/snd-powermac.o(.devinit.text+0x2f8): Section mismatch in reference from the function .snd_pmac_probe() to the function .init.text:.snd_pmac_attach_beep() The function __devinit .snd_pmac_probe() references a function __init .snd_pmac_attach_beep(). If .snd_pmac_attach_beep is only used by .snd_pmac_probe then annotate .snd_pmac_attach_beep with a matching annotation. Signed-off-by: Stephen Rothwell Signed-off-by: Takashi Iwai commit ca85b6ba59b69b7b5adcc64a98bd2478f73b2542 Author: Andrea Borgia Date: Tue Jun 2 19:21:17 2009 +0200 ALSA: usb-audio - errata corrige for quirk Cut'n'paste mistake, whose likely result was nothing at all. Correct version is "USB_DEVICE", not "USB_DEVICE_VENDOR_SPEC". Signed-off-by: Andrea Borgia Signed-off-by: Takashi Iwai commit 6799687a53a28536fd027ccb644833f66a778925 Author: Mike Galbraith Date: Tue Jun 2 08:23:58 2009 +0200 x86, boot: add new generated files to the appropriate .gitignore files git status complains of untracked (generated) files in arch/x86/boot.. # Untracked files: # (use "git add ..." to include in what will be committed) # # ../../arch/x86/boot/compressed/mkpiggy # ../../arch/x86/boot/compressed/piggy.S # ../../arch/x86/boot/compressed/vmlinux.lds # ../../arch/x86/boot/voffset.h # ../../arch/x86/boot/zoffset.h ..so adjust .gitignore files accordingly. Signed-off-by: Mike Galbraith Signed-off-by: H. Peter Anvin commit 7d2948b1248109dbc7f4aaf9867c54b1912d494c Author: Tetsuo Handa Date: Tue Jun 2 20:42:24 2009 +0900 TOMOYO: Simplify policy reader. We can directly assign the result of tomoyo_io_printf() to done flag. Signed-off-by: Kentaro Takeda Signed-off-by: Tetsuo Handa Signed-off-by: Toshiharu Harada Signed-off-by: James Morris commit ab588ccadc80f6ef5495e83e176e88c5c0fc2d0e Author: Tetsuo Handa Date: Tue Jun 2 14:23:39 2009 +0900 TOMOYO: Remove redundant markers. Remove '/***** START/STOP *****/' markers. Signed-off-by: Tetsuo Handa Signed-off-by: James Morris commit 850b0cee165576f969363a8c52021b5cf9ecbe67 Author: Eric Paris Date: Tue Jun 2 17:01:16 2009 -0400 SELinux: define audit permissions for audit tree netlink messages Audit trees defined 2 new netlink messages but the netlink mapping tables for selinux permissions were not set up. This patch maps these 2 new operations to AUDIT_WRITE. Signed-off-by: Eric Paris Signed-off-by: James Morris commit addc2785ce92ff05da8edf18317b6b4719e10d9f Author: Ingo Molnar Date: Tue Jun 2 23:43:11 2009 +0200 perf record: Print out the number of events captured It makes sense to inform the user about how many events perf record has written - so that the sufficiency of profiling coverage and intensity can be determined at a glance. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit bf9e187637ca3d85cee7407e3af93995868cc87c Author: Ingo Molnar Date: Tue Jun 2 23:37:05 2009 +0200 perf_counter tools: Make source code headers more coherent The perf commands had different ways of describing themselves, introduce a coherent command-file-header format taken from the Git project. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 0a520c63e1625b92ef775da40192e1542910e7f6 Author: Ingo Molnar Date: Tue Jun 2 23:24:45 2009 +0200 perf report: Print more info instead of entries Sometimes we still fail to find a DSO or look up a symbol, print out the raw information in this case (which an help debug the problem), instead of a not very helpful string. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 3cf165fc2e7f221a7a95098b47eb990779e29f5f Author: Ingo Molnar Date: Tue Jun 2 23:02:59 2009 +0200 perf record: Increase mmap buffering default I've run into mmap overruns with the current 16 pages default, increase it to 128 pages. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit abaff32a03e26e5d6674cb2a26ad882efe7493a3 Author: Ingo Molnar Date: Tue Jun 2 22:59:57 2009 +0200 perf record: Add --append option Allow incremental profiling via 'perf record -A' - this will append to an existing perf.data. Also reorder perf record options by utility / likelyhood of usage. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 84047e360af0394ac5861d433f26bbcf30f77dd1 Author: Steven Rostedt Date: Tue Jun 2 16:51:55 2009 -0400 function-graph: always initialize task ret_stack On creating a new task while running the function graph tracer, if we fail to allocate the ret_stack, and then fail the fork, the code will free the parent ret_stack. This is because the child duplicated the parent and currently points to the parent's ret_stack. This patch always initializes the task's ret_stack to NULL. [ Impact: prevent crash of parent on low memory during fork ] Signed-off-by: Steven Rostedt commit f7e8b616ed1cc6f790b82324bce8a2a60295e5c2 Author: Steven Rostedt Date: Tue Jun 2 16:39:48 2009 -0400 function-graph: move initialization of new tasks up in fork When the function graph tracer is enabled, all new tasks must allocate a ret_stack to place the return address of functions. This is because the function graph tracer will replace the real return address with a call to the tracing of the exit function. This initialization happens in fork, but it happens too late. If fork fails, then it will call free_task and that calls the freeing of this ret_stack. But before initialization happens, the new (failed) task points to its parents ret_stack. If a fork failure happens during the function trace, it would be catastrophic for the parent. Also, there's no need to call ftrace_graph_exit_task from fork, since it is called by free_task which fork calls on failure. [ Impact: prevent crash during failed fork running function graph tracer ] Signed-off-by: Steven Rostedt commit cf25c63c609e99bfb9303b68a7a90a56a3a32cea Author: Ingo Molnar Date: Tue Jun 2 22:12:14 2009 +0200 perf report: Fix column width/alignment of dsos Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 436224a6d8bb3e29fe0cc18122f8d1f593da67b8 Author: Peter Zijlstra Date: Tue Jun 2 21:02:36 2009 +0200 perf report: Separate out idle threads Introduce the special comm name [idle] for idle theads. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit c70975bc8d5bac487616785f5d5bc7b090dfa2d9 Author: Peter Zijlstra Date: Tue Jun 2 17:38:21 2009 +0200 perf_counter tools: Fix up the ABI shakeup Signed-off-by: Peter Zijlstra LKML-Reference: Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur Cc: Stephane Eranian LKML-Reference: Signed-off-by: Ingo Molnar commit 0d48696f87e3618b0d35bd3e4e9d7c188d51e7de Author: Peter Zijlstra Date: Tue Jun 2 19:22:16 2009 +0200 perf_counter: Rename perf_counter_hw_event => perf_counter_attr The structure isn't hw only and when I read event, I think about those things that fall out the other end. Rename the thing. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur Cc: Stephane Eranian LKML-Reference: Signed-off-by: Ingo Molnar commit 08247e31ca79b8f02cce47b7e8120797a8726606 Author: Peter Zijlstra Date: Tue Jun 2 16:46:57 2009 +0200 perf_counter: Add ioctl for changing the sample period/frequency Reported-by: Stephane Eranian Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 8e3747c13c39246c7e46def7cf495d9d21d4c5f9 Author: Peter Zijlstra Date: Tue Jun 2 16:16:02 2009 +0200 perf_counter: Change data head from u32 to u64 Since some people worried that 4G might not be a large enough as an mmap data window, extend it to 64 bit for capable platforms. Reported-by: Stephane Eranian Signed-off-by: Peter Zijlstra LKML-Reference: Signed-off-by: Ingo Molnar commit e4abb5d4f7ddabc1fc7c392cf0a10d8e5868c9ca Author: Peter Zijlstra Date: Tue Jun 2 16:08:20 2009 +0200 perf_counter: x86: Emulate longer sample periods Do as Power already does, emulate sample periods up to 2^63-1 by composing them of smaller values limited by hardware capabilities. Only once we wrap the software period do we generate an overflow event. Just 10 lines of new code. Reported-by: Stephane Eranian Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 8a016db386195b193e2a8aeddff9fe937dcb7a40 Author: Peter Zijlstra Date: Tue Jun 2 15:27:45 2009 +0200 perf_counter: Remove the last nmi/irq bits IRQ (non-NMI) sampling is not used anymore - remove the last few bits. Signed-off-by: Peter Zijlstra Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit b23f3325ed465f1bd914384884269af0d106778c Author: Peter Zijlstra Date: Tue Jun 2 15:13:03 2009 +0200 perf_counter: Rename various fields A few renames: s/irq_period/sample_period/ s/irq_freq/sample_freq/ s/PERF_RECORD_/PERF_SAMPLE_/ s/record_type/sample_type/ And change both the new sample_type and read_format to u64. Reported-by: Stephane Eranian Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 8e5799b1ad2a0567fdfaaf0e91b40efee010f2c1 Author: Peter Zijlstra Date: Tue Jun 2 15:08:15 2009 +0200 perf_counter: Add unique counter id Stephan raised the issue that we currently cannot distinguish between similar counters within a group (PERF_RECORD_GROUP uses the config value as identifier). Therefore, generate a new ID for each counter using a global u64 sequence counter. Reported-by: Stephane Eranian Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 53e111a730ea8b002d57dd226098c12789993329 Author: Peter Zijlstra Date: Tue Jun 2 17:01:58 2009 +0200 x86: Fix atomic_long_xchg() on 64bit Apparently I'm the first to use it :-) Signed-off-by: Peter Zijlstra LKML-Reference: Signed-off-by: Ingo Molnar commit 29c2810276fbf8419c9b4d942b99c873e9b7640a Author: Peter Zijlstra Date: Tue Jun 2 15:56:26 2009 +0200 perf_counter tools: Remove the last nmi bits Everything is nmi these days, remove the userspace bits so that the kernel can drop the interface. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 26c01624a2a40f8a4ddf6449b65c9b1c418d0e72 Author: Steven Rostedt Date: Tue Jun 2 14:01:19 2009 -0400 function-graph: add memory barriers for accessing task's ret_stack The code that handles the tasks ret_stack allocation for every task assumes that only an interrupt can cause issues (even though interrupts are disabled). In reality, the code is allocating the ret_stack for tasks that may be running on other CPUs and there are not efficient memory barriers to handle this case. [ Impact: prevent crash due to using of uninitialized ret_stack variables ] Signed-off-by: Steven Rostedt commit 82310a3272d5a2a7652f5649ad8a55f58c8f74d9 Author: Steven Rostedt Date: Tue Jun 2 12:26:07 2009 -0400 function-graph: enable the stack after initialization of other variables The function graph tracer checks if the task_struct has ret_stack defined to know if it is OK or not to use it. The initialization is done for all tasks by one process, but the idle tasks use the same initialization used by new tasks. If an interrupt happens on an idle task that just had the ret_stack created, but before the rest of the initialization took place, then we can corrupt the return address of the functions. This patch moves the setting of the task_struct's ret_stack to after the other variables have been initialized. [ Impact: prevent kernel panic on idle task when starting function graph ] Signed-off-by: Steven Rostedt commit 179c498ae2998461fe436437a74dc29036fc7dcc Author: Steven Rostedt Date: Tue Jun 2 12:03:19 2009 -0400 function-graph: only allocate init tasks if it was not already done When the function graph tracer is enabled, it calls the initialization needed for the init tasks that would be called on all created tasks. The problem is that this is called every time the function graph tracer is enabled, and the ret_stack is allocated for the idle tasks each time. Thus, the old ret_stack is lost and a memory leak is created. This is also dangerous because if an interrupt happened on another CPU with the init task and the ret_stack is replaced, we then lose all the return pointers for the interrupt, and a crash would take place. [ Impact: fix memory leak and possible crash due to race ] Signed-off-by: Steven Rostedt commit 50b64e3b77d569c217a48e078cd565dbd6462ad0 Author: Jeff Layton Date: Tue Jun 2 06:55:20 2009 -0400 cifs: fix IPv6 address length check For IPv6 the userspace mount helper sends an address in the "ip=" option. This check fails if the length is > 35 characters. I have no idea where the magic 35 character limit came from, but it's clearly not enough for IPv6. Fix it by making it use the INET6_ADDRSTRLEN #define. While we're at it, use the same #define for the address length in SPNEGO upcalls. Reported-by: Charles R. Anderson Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 3f08a0e4ab1ce65bb882f6425ff482e5db025f78 Author: Takashi Iwai Date: Tue Jun 2 17:39:52 2009 +0200 ALSA: bt87x - Add a quirk entry for Askey Computer Corp. MagicTView'99 Signed-off-by: Takashi Iwai commit bdc2911cde7d18580a545483844d75fdb3551729 Merge: 88f3907 016ea68 Author: Joerg Roedel Date: Tue Jun 2 16:45:02 2009 +0200 Merge branches 'dma-debug/fixes' and 'dma-debug/driver-filter' into dma-debug/2.6.31 commit 4593bba8679b925a056f84edac061676e7eda71c Author: Ingo Molnar Date: Tue Jun 2 15:34:25 2009 +0200 perf report: Clean up the default output - extra space between columns - left-aligned the symbol column - moved the no-symbols printout to -v Acked-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 016ea6874a6d58df85b54f56997d26df13c307b2 Author: Joerg Roedel Date: Fri May 22 21:57:23 2009 +0200 dma-debug: add documentation for the driver filter This patch adds the driver filter feature to the dma-debug documentation. Signed-off-by: Joerg Roedel commit 1745de5e5639457513fe43440f2800e23c3cbc7d Author: Joerg Roedel Date: Fri May 22 21:49:51 2009 +0200 dma-debug: add dma_debug_driver kernel command line This patch add the dma_debug_driver= boot parameter to enable the driver filter for early boot. Signed-off-by: Joerg Roedel commit 8a6fc708b9bb48a79a385bdc2be0959ee2ab788d Author: Joerg Roedel Date: Fri May 22 21:23:13 2009 +0200 dma-debug: add debugfs file for driver filter This patch adds the dma-api/driver_filter file to debugfs. The root user can write a driver name into this file to see only dma-api errors for that particular driver in the kernel log. Writing an empty string to that file disables the driver filter. Signed-off-by: Joerg Roedel commit 97124d5e2df5b9eaa5bb684bb1e8ebc7e29d0f5d Author: Peter Zijlstra Date: Tue Jun 2 15:52:24 2009 +0200 perf_counter: tools: Better handle existing data files Provide an argument (-f) to overwrite existing data files. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit f70e87d7a6d9c5a23d5f43ed0a0c224c157ef597 Author: Peter Zijlstra Date: Tue Jun 2 14:13:24 2009 +0200 perf_counter: tools: Expand the COMM,MMAP event synthesizer Include code to pre-construct mappings based on /proc, on system wide recording. Fix the existing code to properly fill out ->pid and ->tid. The PID should be the Thread Group ID (PIDTYPE_PID of task->group_leader) The TID should be the Thread ID (PIDTYPE_PID of task) Furthermore, change the default sorting of report to comm,dso for a better quick overview. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 709e50cf870e61745b39552044aa6c7c38e4f9e0 Author: Peter Zijlstra Date: Tue Jun 2 14:13:15 2009 +0200 perf_counter: Use PID namespaces properly Stop using task_struct::pid and start using PID namespaces. PIDs will be reported in the PID namespace of the monitoring task at the moment of counter creation. Signed-off-by: Peter Zijlstra Cc: Eric W. Biederman Cc: Oleg Nesterov Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit eeaf100d25cefdbe9dc40d6e0f2025411474972a Author: Takashi Iwai Date: Tue Jun 2 16:06:02 2009 +0200 ALSA: ca0106 - Add missing card->mixername field setup Signed-off-by: Takashi Iwai commit bd05dbd3b22612455283610b4e006ee3e421b13d Merge: 67fbf88 c76157d Author: Takashi Iwai Date: Tue Jun 2 15:55:22 2009 +0200 Merge branch 'topic/ctxfi-fix' into topic/ctxfi commit c76157d9286ed598c241c212aa5a3c6e5107bd82 Author: Takashi Iwai Date: Tue Jun 2 15:26:19 2009 +0200 ALSA: ctxfi - Support SG-buffers Use SG-buffers instead of contiguous pages. Signed-off-by: Takashi Iwai commit cd391e206f486955e216a61bd9ebcb0e142122e9 Author: Takashi Iwai Date: Tue Jun 2 15:04:29 2009 +0200 ALSA: ctxfi - Remove PAGE_SIZE limitation Remove the limitation of PAGE_SIZE to be 4k by defining the own page size and macros for 4k. 8kb page size could be natively supported, but it's disabled right now for simplicity. Also, clean up using upper_32_bits() macro. Signed-off-by: Takashi Iwai commit d2b9b96c516d4d61663d92ab4ad4f15ca0134ef2 Author: Takashi Iwai Date: Tue Jun 2 14:39:05 2009 +0200 ALSA: ctxfi - Fix supported PCM formats The device seems supporting only U8, S16, S24_3LE, S32. Other linear formats result in bad outputs. Also, added the support for 32bit float format, which wasn't listed in the original code. Signed-off-by: Takashi Iwai commit 8372d4980fbc2e403f0dc5457441c8c6b7c04915 Author: Takashi Iwai Date: Tue Jun 2 14:27:56 2009 +0200 ALSA: ctxfi - Fix PCM device naming PCM names for surround streams should be also fixed as well as the mixer element names. Also, a bit clean up for PCM name setup. Signed-off-by: Takashi Iwai commit 6585db943aade186d38eaab2720c18887b94c875 Author: Takashi Iwai Date: Tue Jun 2 14:17:27 2009 +0200 ALSA: ctxfi - Fix surround mixer names We usually pick up "Surround" mixer for the rear output, and "Side" for the extra surround. Fix the channel mapping to follow it. Signed-off-by: Takashi Iwai commit 822fa19b5c23746577687a0ec48eae0ec1cd22a0 Author: Takashi Iwai Date: Tue Jun 2 14:12:17 2009 +0200 ALSA: ALSA: ctxfi - Release PCM resources at each prepare call The prepare callback can be called multiple times, thus it needs to release and acquire the resource again by itself at the second or later call. Simply add pcm_release_resources() at the beginning of each prepare callback in ctatc.c. Signed-off-by: Takashi Iwai commit 2e507d849f1834d3fe9aae71b7aabf4c2a3827b8 Author: Joerg Roedel Date: Fri May 22 18:24:20 2009 +0200 dma-debug: add variables and checks for driver filter This patch adds the state variables for the driver filter and a function to check if the filter is enabled and matches to the current device. The check is built into the err_printk function. Signed-off-by: Joerg Roedel commit dbdc9dd342f0a7e32f40f0d4ade662bdfe057484 Author: vibi sreenivasan Date: Tue Jun 2 14:52:32 2009 +0200 Removed reference to non-existing file Documentation/PCI/PCI-DMA-mapping.txt File Documentation/PCI/PCI-DMA-mapping.txt does not exist. Documentation/DMA-mapping.txt contains DMA Mapping details Signed-off-by: vibi sreenivasan Signed-off-by: Jens Axboe commit 77b0308a0778861111184e097533000f7a458c37 Author: Andrew Morton Date: Tue Jun 2 14:51:30 2009 +0200 cciss: use schedule_timeout_interruptible() Use schedule_timeout_interruptible() instead of open-coding the set and schedule parts. Cc: Mike Miller Cc: Stephen M. Cameron Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit 7fe063268e73681cdca1a6496a25f93d3332f517 Author: Andrew Patterson Date: Tue Jun 2 14:48:39 2009 +0200 cciss: add cciss driver sysfs entries Add sysfs entries to the cciss driver needed for the dm/multipath tools. A file for vendor, model, rev, and unique_id is added for each logical drive under directory /sys/bus/pci/devices//ccissX/cXdY. Where X = the controller (or host) number and Y is the logical drive number. A link from /sys/bus/pci/devices//ccissX/cXdY/block:cciss!cXdY to /sys/block/cciss!cXdY/device is also created. A bus is created in /sys/bus/cciss. A link is created from the pci ccissX entry to /sys/bus/cciss/devices/ccissX. Please consider this for inclusion. Signed-off-by: Mike Miller Cc: Stephen M. Cameron Signed-off-by: Jens Axboe commit 88f627ae394eadd75ada669904269f1a4a77b3bd Author: Stephen M. Cameron Date: Tue Jun 2 14:48:11 2009 +0200 cciss: fix SCSI device reset handler Fix the SCSI reset error handler to send a working, properly addressed reset message to the target device and add code to wait for the target device to become ready by polling it with Test Unit Ready. The existing reset code was broken in that it didn't bother to set the 8-byte LUN address to anything besides zero, so the command was addressed to the controller, which pretended to the driver that the command succeeded, while doing nothing. Ages ago I tested this code, but unbeknownst to me, my test was flawed, and what I thought was a tape drive getting reset was actually nothing of the sort. Unfortunately, there is still lots of Smartarray firmware that doesn't handle doing target resets right, and this code won't help in those cases, but it also shouldn't make things worse in those cases than they already are. Signed-off-by: Stephen M. Cameron Cc: Mike Miller Signed-off-by: Jens Axboe commit 4a4b2d7684c66dbd8ed04eb284bc94a78e061d29 Author: Stephen M. Cameron Date: Tue Jun 2 14:47:50 2009 +0200 cciss: factor out core of sendcmd() for a more sane interface Factor out the core of sendcmd() to provide a simpler interface which exposes all the error information to the caller and make the original sendcmd use this new function. Rationale: The SCSI error handling routines need to send commands with interrupts turned off, but they also need access to the full error information. Signed-off-by: Stephen M. Cameron Cc: Mike Miller Signed-off-by: Jens Axboe commit 9a83b7453c2c4db145666b653abe9d9f410d18a2 Author: Takashi Iwai Date: Tue Jun 2 14:20:48 2009 +0200 ALSA: Remove invalid GENERIC_MIX PCM sublass SNDRV_PCM_SUBCLASS_GENERIC_MIX is mostly for h/w multi-stream playback devices, but ca0106 and emu10k1x don't support it (unlike emu10k1). We shouldn't set that flag to avoid confusion. Signed-off-by: Takashi Iwai commit c6e24d4db824d277303201811e88626778c59999 Author: Daniel Mack Date: Tue Jun 2 12:36:40 2009 +0200 ALSA: snd_usb_caiaq: bump version number Signed-off-by: Daniel Mack Signed-off-by: Takashi Iwai commit fe67e6f2d6df371b58ba721954d45a196df5e8b8 Author: Tetsuo Handa Date: Tue Jun 2 17:00:45 2009 +0900 TOMOYO: Remove unused mutex. I forgot to remove on TOMOYO's 15th posting. Signed-off-by: Tetsuo Handa Signed-off-by: James Morris commit bf4e0ed3d027ce581be18496036862131b5f32aa Author: Paul Mackerras Date: Mon Jun 1 17:53:16 2009 +1000 perf_counter: Remove unused prev_state field This removes the prev_state field of struct perf_counter since it is now unused. It was only used by the cpu migration counter, which doesn't use it any more. Signed-off-by: Paul Mackerras Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <18979.35052.915728.626374@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 3f731ca60afc29f5bcdb5fd2a04391466313a9ac Author: Paul Mackerras Date: Mon Jun 1 17:52:30 2009 +1000 perf_counter: Fix cpu migration counter This fixes the cpu migration software counter to count correctly even when contexts get swapped from one task to another. Previously the cpu migration counts reported by perf stat were bogus, ranging from negative to several thousand for a single "lat_ctx 2 8 32" run. With this patch the cpu migration count reported for "lat_ctx 2 8 32" is almost always between 35 and 44. This fixes the problem by adding a call into the perf_counter code from set_task_cpu when tasks are migrated. This enables us to use the generic swcounter code (with some modifications) for the cpu migration counter. This modifies the swcounter code to allow a NULL regs pointer to be passed in to perf_swcounter_ctx_event() etc. The cpu migration counter does this because there isn't necessarily a pt_regs struct for the task available. In this case, the counter will not have interrupt capability - but the migration counter didn't have interrupt capability before, so this is no loss. Signed-off-by: Paul Mackerras Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <18979.35006.819769.416327@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit f38b082081bf69a06fffb8b32a175999e2320c5b Author: Paul Mackerras Date: Tue Jun 2 21:05:16 2009 +1000 perf_counter: Initialize per-cpu context earlier on cpu up This arranges for perf_counter's notifier for cpu hotplug operations to be called earlier than the migration notifier in sched.c by increasing its priority to 20, compared to the 10 for the migration notifier. The reason for doing this is that a subsequent commit to convert the cpu migration counter to use the generic swcounter infrastructure will add a call into the perf_counter subsystem when tasks get migrated. Therefore the perf_counter subsystem needs a chance to initialize its per-cpu data for the new cpu before it can get called from the migration code. This also adds a comment to the migration notifier noting that its priority needs to be lower than that of the perf_counter notifier. Signed-off-by: Paul Mackerras Cc: Peter Zijlstra LKML-Reference: <18981.1900.792795.836858@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a Author: Daniel Mack Date: Tue Jun 2 12:36:39 2009 +0200 ALSA: snd_usb_caiaq: give better shortname If not passed as module option, provide an own card ID with the newly introduced snd_set_card_id() call. This will prevent ALSA from calling choose_default_name() which only takes the last part of a name containing whitespaces. This for example caused 'Audio 4 DJ' to be shortened to 'DJ', which was not very descriptive. The implementation now takes the short name and removes all whitespaces from it which is much nicer. Signed-off-by: Daniel Mack Signed-off-by: Takashi Iwai commit 17db0486d73a7bc62996569cea63464daacb22a4 Merge: 1a1df6f 10a8ebb Author: Takashi Iwai Date: Tue Jun 2 12:55:40 2009 +0200 Merge branch 'topic/core-id-check' into topic/caiaq commit 10a8ebbb08c4b08292598947bbe534e04d6ee705 Author: Jaroslav Kysela Date: Tue Jun 2 12:02:38 2009 +0200 ALSA: Core - add snd_card_set_id() function Introduce snd_card_set_id() function to allow lowlevel drivers to set default identification name for card slot. The function checks also for identification name collisions and tries to create unique name. Also, the snd_card_create() function is simplified, because this new function is used. As bonus, proper name collision checks are evaluated at the card create time. Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai commit 3c4dbda003b5941b351bec8d1954e8eaa6e7bc09 Merge: 3b315d7 b20f3b8 Author: Takashi Iwai Date: Tue Jun 2 12:15:48 2009 +0200 Merge branch 'topic/hda-ctl-reset' into topic/hda commit 601e1cc5df940b59e71c947726640811897d30df Author: Takashi Iwai Date: Tue Jun 2 11:37:01 2009 +0200 ALSA: ca0106 - Add missing registrations of vmaster controls Although the vmaster controls are created, they aren't registered thus they don't appear in the real world. Added the missing snd_ctl_add() calls. Signed-off-by: Takashi Iwai Cc: commit 10a2825514a988225ac2e336c7a9502c4ca57c39 Author: Mike Galbraith Date: Tue Jun 2 11:04:44 2009 +0200 perf_counter tools: Fix uninitialized variable in perf-report.c # make prefix=/usr/local V=1 gcc -o builtin-report.o -c -O2 -ggdb3 -Wall -Werror -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -std=gnu99 -Wdeclaration-after-statement -DSHA1_HEADER='' builtin-report.c cc1: warnings being treated as errors builtin-report.c: In function ‘__cmd_report’: builtin-report.c:626: error: ‘cwdlen’ may be used uninitialized in this function Signed-off-by: Mike Galbraith Cc: Peter Zijlstra Signed-off-by: Ingo Molnar LKML-Reference: commit c1079abd1d5e66edabeb04d75e48e604cd8c167f Author: Mike Galbraith Date: Tue Jun 2 10:17:34 2009 +0200 perf_counter tools: Cleanup Makefile We currently build perf-stat/record etc, only to do nothing with them. We also install the perf binary in two places, $prefix/bin and $perfexec_instdir, which appears to be for binaries which perf would exec were a command not linked in. Correct this, and comment out broken/incomplete targets dist and coverage. Signed-off-by: Mike Galbraith Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 3b315d70b094e8b439358756a9084438fd7a71c2 Author: Hector Martin Date: Tue Jun 2 10:54:19 2009 +0200 ALSA: hda - Acer Aspire 8930G support Short story: this laptop has 5.1 built-in speakers which you *really* want to use (the not-so-"sub" woofer is what makes the audio above average for a laptop), so 6-channel support is important (plus a decent asound.conf to upmix stereo). It also has the 3 typical jacks that ought to have a selectable mode. And it's based on ALC889, which sucks. Rationale/explanations: The const_channel_count stuff was added because, for a laptop like this, you always have 6 channels available (internal speakers) but still need to set the mode for the 3 external jacks. Therefore, the device always needs to be in 6-channel mode but there still needs to be a mixer control for the jack mode. You could use line/mic-in at the same time as the 6 internal speakers, for example. You might be tempted to make it even smarter by dynamically switching the max channel count when headphones are plugged in (therefore muting the internal speakers and reducing the physical channel count to the jack channel mode), but as a user I consider this to be harmful because I want the audio to blow up to 6 channels / upmixed as soon as I unplug the headphones, and having opened the device while in 2-channel mode would prevent this from working (and always making 6-channel mode available doesn't do any harm). The hardware needs EAPD turned on and the DACs routed to the internal speaker pins, so the patch adds those verbs. The ALC889 CLFE and subsequent (side/aux, here unused) DACs do NOT work by default, at least here. I wasted much time trying to talk to Realtek/pshou about this, but they just kept sending me useless updates to patch_realtek.c that did nothing relevant. In the end I gave up and brute forced the issue by trying to flip every bit in the proprietary coefficient registers, and eventually found the two magic registers that need to be cleared to enable all DACs. I have only heard Acer users complain, but that might be because ALC889 is pretty new and using 5.1 (and noticing the missing center/lfe channels) might not be that common. If this is a generalized issue with all ALC889 systems then those verbs should probably be moved to a common verb array. The internal mic is untested and probably doesn't work. These settings will probably work for other Acer Gemstone laptops with the same 5.1 speaker config. When identified, those should be added to the PCI subsystem ID list. Signed-off-by: Hector Martin Signed-off-by: Takashi Iwai commit 1a1df6f0434fc35c9bf6ca25f9c5115713d77291 Author: Daniel Mack Date: Mon Jun 1 21:36:26 2009 +0200 ALSA: snd_usb_caiaq: give better longname The serial number is of no interest in the longname, remove it. This gives space for the usb path information which is more informative. Signed-off-by: Daniel Mack Signed-off-by: Takashi Iwai commit c25486c5ea3ea5586f71285a3aa5cfafb1db59f9 Author: Mike Galbraith Date: Tue Jun 2 08:09:48 2009 +0200 perf_counter tools: Make .gitignore reflect perf_counter tools files Make .gitignore reflect perf_counter tools files so git status doesn't gripe about untracked files. Signed-off-by: Mike Galbraith Cc: Peter Zijlstra LKML-Reference: Signed-off-by: Ingo Molnar commit d3873a1be9f2d497e9ff013e4a83a2a4d9f1d22d Author: Daniel Mack Date: Mon Jun 1 21:36:25 2009 +0200 ALSA: snd_usb_caiaq: use strlcpy Signed-off-by: Daniel Mack Signed-off-by: Takashi Iwai commit 9318dce5038f193f46091b80c61928395a4139b7 Author: Daniel Mack Date: Mon Jun 1 21:36:23 2009 +0200 ALSA: snd_usb_caiaq: clean whitespaces Cosmetic changes only, no code change. Signed-off-by: Daniel Mack Signed-off-by: Takashi Iwai commit 67fbf880631bb4493ad8d23f25562abdf09dc01d Author: Takashi Iwai Date: Tue Jun 2 09:18:26 2009 +0200 ALSA: ctxfi - Fix a typo in MODULE_LICENSE A space has to be put between GPL and v2. Signed-off-by: Takashi Iwai commit a12af1ebe675e85831fde3c4d0908fc3b0908b7a Author: Abhijith Das Date: Mon Jun 1 12:30:03 2009 -0500 GFS2: smbd proccess hangs with flock() call. GFS2 currently does not support mandatory flocks. An flock() call with LOCK_MAND triggers unexpected behavior because gfs2 is not checking for this lock type. This patch corrects that. Signed-off-by: Abhi Das Signed-off-by: Steven Whitehouse commit 53c663ce0f39ba8e8ef652e400b317bc60ac7f19 Author: Kiyoshi Ueda Date: Tue Jun 2 08:44:01 2009 +0200 block: fix a possible oops on elv_abort_queue() I found one more mis-conversion to the 'request is always dequeued when completing' model in elv_abort_queue() during code inspection. Although I haven't hit any problem caused by this mis-conversion yet and just done compile/boot test, please apply if you have no problem. Request must be dequeued when it completes. However, elv_abort_queue() completes requests without dequeueing. This will cause oops in the __blk_end_request_all(). This patch fixes the oops. Signed-off-by: Kiyoshi Ueda Signed-off-by: Jun'ichi Nomura Signed-off-by: Jens Axboe commit 8a4259bf89d23bfd58d87e275ef6da29cea6b3c5 Author: Takashi Iwai Date: Tue Jun 2 08:40:51 2009 +0200 ALSA: ctxfi - Fix Oops at mmapping Replace a spinlock with a mutex protecting the vm block list at mmap / munmap calls, which caused Oops like below: BUG: sleeping function called from invalid context at mm/slub.c:1599 in_atomic(): 0, irqs_disabled(): 1, pid: 32065, name: xine Pid: 32065, comm: xine Tainted: P 2.6.29.4-75.fc10.x86_64 #1 Call Trace: [] __might_sleep+0x105/0x10a [] kmem_cache_alloc+0x32/0xe2 [] ct_vm_map+0xfa/0x19e [snd_ctxfi] [] ct_map_audio_buffer+0x4c/0x76 [snd_ctxfi] [] atc_pcm_playback_prepare+0x1d7/0x2a8 [snd_ctxfi] [] ? up_read+0x9/0xb [] ? __up_read+0x7c/0x87 [] ct_pcm_playback_prepare+0x39/0x60 [snd_ctxfi] [] snd_pcm_do_prepare+0x16/0x28 [snd_pcm] [] snd_pcm_action_single+0x2d/0x5b [snd_pcm] [] snd_pcm_action_nonatomic+0x52/0x6a [snd_pcm] [] snd_pcm_common_ioctl1+0x404/0xc79 [snd_pcm] [] ? alloc_pages_current+0xb9/0xc2 [] ? new_slab+0x1a5/0x1cb [] ? vma_prio_tree_insert+0x23/0xc1 [] snd_pcm_playback_ioctl1+0x213/0x230 [snd_pcm] [] ? mmap_region+0x397/0x4c9 [] snd_pcm_playback_ioctl+0x2e/0x36 [snd_pcm] [] vfs_ioctl+0x2a/0x78 [] do_vfs_ioctl+0x462/0x4a2 [] ? default_spin_lock_flags+0x9/0xe [] ? trace_hardirqs_off_thunk+0x3a/0x6c [] sys_ioctl+0x55/0x77 [] system_call_fastpath+0x16/0x1b Signed-off-by: Takashi Iwai commit 3447ef29a7f3b1fd0d8d58376950e695e04f6f8b Author: John Williams Date: Tue Mar 24 11:10:00 2009 +1000 microblaze: Don't use access_ok for unaligned it assumes we have an unaligned exception handler which (a) may not be true (b) costs a lot of performance Instead we'll use struct/union method for big endian accesses, and byte-shifting for little endian. Signed-off-by: John Williams commit 77bc7ac87d0d6df1ea099a44e8fc4e998e409606 Author: Andrew Morton Date: Mon Jun 1 21:26:04 2009 -0700 microblaze: remove unused flat_stack_align() definition Signed-off-by: Andrew Morton Signed-off-by: Michal Simek commit fbeb4a9c20d00e2550156f9e5a34473fbde59de2 Author: Serge E. Hallyn Date: Mon Jun 1 22:47:19 2009 -0500 tomoyo: avoid get+put of task_struct Use task_cred_xxx(task, security) in tomoyo_real_domain() to avoid a get+put of the target cred. Signed-off-by: Serge E. Hallyn Acked-by: Tetsuo Handa Signed-off-by: James Morris commit aa07a6990f4b6a8ef9fc538dea55bac6f92255f2 Author: Alex Riesen Date: Tue Jun 2 14:13:14 2009 +1000 crypto: api - Use formatting of module name Besdies, for the old code, gcc-4.3.3 produced this warning: "format not a string literal and no format arguments" Signed-off-by: Alex Riesen Signed-off-by: Herbert Xu commit a0cfae59f8381c5c670fce2cc3de70b35421f920 Author: Herbert Xu Date: Fri May 29 16:23:12 2009 +1000 crypto: testmgr - Allow hash test vectors longer than a page As it stands we will each test hash vector both linearly and as a scatter list if applicable. This means that we cannot have vectors longer than a page, even with scatter lists. This patch fixes this by skipping test vectors with np != 0 when testing linearly. Signed-off-by: Herbert Xu commit fd57f22a09ae276ca3e9cd11ed99b617d611ba82 Author: Herbert Xu Date: Fri May 29 16:05:42 2009 +1000 crypto: testmgr - Check all test vector lengths As we cannot guarantee the availability of contiguous pages at run-time, all test vectors must either fit within a page, or use scatter lists. In some cases vectors were not checked as to whether they fit inside a page. This patch adds all the missing checks. Signed-off-by: Herbert Xu commit f3d8fe40498eea9f45be260bdf6ccada845411f3 Author: Mike Frysinger Date: Wed May 27 15:16:21 2009 +1000 crypto: hifn_795x - fix __dev{init,exit} markings The remove member of the pci_driver hifn_pci_driver uses __devexit_p(), so the remove function itself should be marked with __devexit. And where there be __devexit on the remove, so is there __devinit on the probe. Similarly, the module_init/module_exit functions should be declared with plain __init/__exit markings, not the hotplug __dev{init,exit} ones. Signed-off-by: Mike Frysinger Acked-by: Evgeniy Polyakov CC: Patrick McHardy Signed-off-by: Herbert Xu commit 4e033a6bc70f094d36128c328f6ca725c6ca4b4c Author: Jarod Wilson Date: Wed May 27 15:10:21 2009 +1000 crypto: tcrypt - Do not exit on success in fips mode At present, the tcrypt module always exits with an -EAGAIN upon successfully completing all the tests its been asked to run. In fips mode, integrity checking is done by running all self-tests from the initrd, and its much simpler to check the ret from modprobe for success than to scrape dmesg and/or /proc/crypto. Simply stay loaded, giving modprobe a retval of 0, if self-tests all pass and we're in fips mode. A side-effect of tracking success/failure for fips mode is that in non-fips mode, self-test failures will return the actual failure return codes, rather than always returning -EAGAIN, which seems more correct anyway. The tcrypt_test() portion of the patch is dependent on my earlier pair of patches that skip non-fips algs in fips mode, at least to achieve the fully intended behavior. Nb: testing this patch against the cryptodev tree revealed a test failure for sha384, which I have yet to look into... Signed-off-by: Jarod Wilson Acked-by: Neil Horman Signed-off-by: Herbert Xu commit 3ce858cb04de8bc83449eac707c8012a1944daca Author: Geert Uytterhoeven Date: Wed May 27 15:05:02 2009 +1000 crypto: compress - Return produced bytes in crypto_{,de}compress_{update,final} If crypto_{,de}compress_{update,final}() succeed, return the actual number of bytes produced instead of zero, so their users don't have to calculate that theirselves. Signed-off-by: Geert Uytterhoeven Signed-off-by: Herbert Xu commit e9736c16da9077728802f42393d18258e6685428 Author: Harald Welte Date: Fri May 15 16:01:52 2009 +1000 hwrng: via_rng - Support VIA Nano hardware RNG on X86_64 builds Fix Kconfig to build via-rng.ko on X86_64 builds, as the VIA Nano CPU supports x86_64, too. Signed-off-by: Harald Welte Signed-off-by: Herbert Xu commit 858576bdc5d65edf1fffd2e65b2165ec1dc68486 Author: Harald Welte Date: Fri May 15 16:00:32 2009 +1000 hwrng: via_rng - Support VIA Nano hardware RNG The VIA Nano CPU supports the same XSTORE instruction based RNG, but it lacks the MSR present in earlier CPUs. Signed-off-by: Harald Welte Signed-off-by: Herbert Xu commit 608d1cd5d375580a49d01b5ed1f9944f5141ae19 Author: Harald Welte Date: Fri May 15 15:57:35 2009 +1000 hwrng: via_rng - The VIA Hardware RNG driver is for the CPU, not Chipset This is a cosmetic change, fixing the MODULE_DESCRIPTION() of via-rng.c Signed-off-by: Harald Welte Signed-off-by: Herbert Xu commit a3bef3a31a19bd943047ba8bf5b2cc7b5d164362 Author: Jarod Wilson Date: Fri May 15 15:17:05 2009 +1000 crypto: testmgr - Skip algs not flagged fips_allowed in fips mode Because all fips-allowed algorithms must be self-tested before they can be used, they will all have entries in testmgr.c's alg_test_descs[]. Skip self-tests for any algs not flagged as fips_approved and return -EINVAL when in fips mode. Signed-off-by: Jarod Wilson Acked-by: Neil Horman Signed-off-by: Herbert Xu commit a1915d51e8e7ee192d2101d621d425379088cbb0 Author: Jarod Wilson Date: Fri May 15 15:16:03 2009 +1000 crypto: testmgr - Mark algs allowed in fips mode Set the fips_allowed flag in testmgr.c's alg_test_descs[] for algs that are allowed to be used when in fips mode. One caveat: des isn't actually allowed anymore, but des (and thus also ecb(des)) has to be permitted, because disallowing them results in des3_ede being unable to properly register (see des module init func). Also, crc32 isn't technically on the fips approved list, but I think it gets used in various places that necessitate it being allowed. This list is based on http://csrc.nist.gov/groups/STM/cavp/index.html Important note: allowed/approved here does NOT mean "validated", just that its an alg that *could* be validated. Signed-off-by: Jarod Wilson Acked-by: Neil Horman Signed-off-by: Herbert Xu commit f7cb80f2b9fa06730be20d17c80b12e511a36c1c Author: Jarod Wilson Date: Wed May 6 17:29:17 2009 +0800 crypto: testmgr - Add ctr(aes) test vectors Now with multi-block test vectors, all from SP800-38A, Appendix F.5. Also added ctr(aes) to case 10 in tcrypt. Signed-off-by: Jarod Wilson Signed-off-by: Herbert Xu commit f8b0d4d09dc9d0a73fcdcf6c2724650529ec417d Author: Herbert Xu Date: Wed May 6 14:15:47 2009 +0800 crypto: testmgr - Dynamically allocate xbuf and axbuf We currently allocate temporary memory that is used for testing statically. This renders the testing engine non-reentrant. As algorithms may nest, i.e., one may construct another in order to carry out a part of its operation, this is unacceptable. For example, it has been reported that an AEAD implementation allocates a cipher in its setkey function, which causes it to fail during testing as the temporary memory is overwritten. This patch replaces the static memory with dynamically allocated buffers. We need a maximum of 16 pages so this slightly increases the chances of an algorithm failing due to memory shortage. However, as testing usually occurs at registration, this shouldn't be a big problem. Reported-by: Shasi Pulijala Signed-off-by: Herbert Xu commit 29ecd4ab3d3aa8bb231361937165dfbbbc534e9a Author: Jarod Wilson Date: Mon May 4 19:51:17 2009 +0800 crypto: testmgr - Print self-test pass notices in fips mode According to our FIPS CAVS testing lab guru, when we're in fips mode, we must print out notices of successful self-test completion for every alg to be compliant. New and improved v2, without strncmp crap. Doesn't need to touch a flag though, due to not moving the notest label around anymore. Applies atop '[PATCH v2] crypto: catch base cipher self-test failures in fips mode'. Personally, I wouldn't mind seeing this info printed out regardless of whether or not we're in fips mode, I think its useful info, but will stick with only in fips mode for now. Signed-off-by: Jarod Wilson Signed-off-by: Herbert Xu commit 941fb3287c0c0d84000b669db5450ac4886da640 Author: Jarod Wilson Date: Mon May 4 19:49:23 2009 +0800 crypto: testmgr - Catch base cipher self-test failures in fips mode Signed-off-by: Jarod Wilson Signed-off-by: Herbert Xu commit e08ca2da39db22da569dc23578103cdc942fe3ac Author: Jarod Wilson Date: Mon May 4 19:46:29 2009 +0800 crypto: testmgr - Add ansi_cprng test vectors Add ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode), aka 'ansi_cprng' test vectors, taken from Appendix B.2.9 and B.2.10 of the NIST RNGVS document, found here: http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf Successfully tested against both the cryptodev-2.6 tree and a Red Hat Enterprise Linux 5.4 kernel, via 'modprobe tcrypt mode=150'. The selection of 150 was semi-arbitrary, didn't seem like it should go any place in particular, so I started a new range for rng tests. Signed-off-by: Jarod Wilson Acked-by: Neil Horman Signed-off-by: Herbert Xu commit 7647d6ce2077d9e1c3d72359f6b4492be129cfe8 Author: Jarod Wilson Date: Mon May 4 19:44:50 2009 +0800 crypto: testmgr - Add infrastructure for ansi_cprng self-tests Add some necessary infrastructure to make it possible to run self-tests for ansi_cprng. The bits are likely very specific to the ANSI X9.31 CPRNG in AES mode, and thus perhaps should be named more specifically if/when we grow additional CPRNG support... Successfully tested against the cryptodev-2.6 tree and a Red Hat Enterprise Linux 5.x kernel with the follow-on patch that adds the actual test vectors. Signed-off-by: Jarod Wilson Acked-by: Neil Horman Signed-off-by: Herbert Xu commit 5d667322a25ab4ecb91176db118fd663fee4da35 Author: Jarod Wilson Date: Mon May 4 19:23:40 2009 +0800 crypto: testmgr - Add self-tests for rfc4309(ccm(aes)) Add an array of encryption and decryption + verification self-tests for rfc4309(ccm(aes)). Test vectors all come from sample FIPS CAVS files provided to Red Hat by a testing lab. Unfortunately, all the published sample vectors in RFC 3610 and NIST Special Publication 800-38C contain nonce lengths that the kernel's rfc4309 implementation doesn't support, so while using some public domain vectors would have been preferred, its not possible at this time. Signed-off-by: Jarod Wilson Signed-off-by: Herbert Xu commit e44a1b44c3a9794236fe038b89a0fbef5adcd523 Author: Jarod Wilson Date: Mon May 4 19:22:11 2009 +0800 crypto: testmgr - Handle AEAD test vectors expected to fail verification Add infrastructure to tcrypt/testmgr to support handling ccm decryption test vectors that are expected to fail verification. Signed-off-by: Jarod Wilson Signed-off-by: Herbert Xu commit 2f8174187f409213e63c3589af163c627e8a182a Author: Herbert Xu Date: Wed Apr 22 13:00:15 2009 +0800 crypto: padlock - Restore dependency on x86 When we added 64-bit support to padlock the dependency on x86 was lost. This causes build failures on non-x86 architectures. Reported-by: Stephen Rothwell Signed-off-by: Herbert Xu commit d1c8b0a7692e81b46550bcc493465ed10510cd33 Author: Sebastian Andrzej Siewior Date: Tue Apr 21 14:14:37 2009 +0800 crypto: padlock - Enable on x86_64 Almost everything stays the same, we need just to use the extended registers on the bit variant. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Herbert Xu commit 962a9c99496f98041d14d64a9fdcf58050fefb4d Author: Kim Phillips Date: Sun Mar 29 15:54:30 2009 +0800 crypto: talitos - Avoid unnecessary decrypt check the ICV check bit only gets set in decrypt entry points Signed-off-by: Kim Phillips Signed-off-by: Herbert Xu commit 19bbbc635523703ece28409e59694d5b512b819e Author: Kim Phillips Date: Sun Mar 29 15:53:59 2009 +0800 crypto: talitos - containerof related codingstyle no functional changes. Signed-off-by: Kim Phillips Signed-off-by: Herbert Xu commit e938e4656b3ee32e046ee8293411a07be9d72eb8 Author: Kim Phillips Date: Sun Mar 29 15:53:23 2009 +0800 crypto: talitos - Whitespace/codingstyle/overrun lines cleanup no functional changes. Signed-off-by: Kim Phillips Signed-off-by: Herbert Xu commit 4de9d0b547b97e40c93a885ac6246c2c5fef05cb Author: Lee Nipper Date: Sun Mar 29 15:52:32 2009 +0800 crypto: talitos - Add ablkcipher algorithms Add these ablkcipher algorithms: cbc(aes), cbc(des3_ede). Added handling of chained scatterlists with zero length entry because eseqiv uses it. Added new map and unmap routines. Signed-off-by: Lee Nipper Signed-off-by: Kim Phillips Signed-off-by: Herbert Xu commit 56af8cd44b05bd9649103b76a6e1e575682990e4 Author: Lee Nipper Date: Sun Mar 29 15:50:50 2009 +0800 crypto: talitos - scaffolding for new algorithm types This patch is preparation for adding new algorithm types. Some elements which are AEAD specific were renamed. The algorithm template structure was changed to use crypto_alg, and talitos_alg_alloc was made more general with respect to algorithm types. ipsec_esp_edesc is renamed to talitos_edesc to use it in the upcoming ablkcipher routines. Signed-off-by: Lee Nipper Signed-off-by: Kim Phillips Signed-off-by: Herbert Xu commit 9f171adc192fc3c8ffbb691cfdcc70259d75c6ea Author: Uwe Kleine-König Date: Sun Mar 29 15:47:06 2009 +0800 hwrng: omap - Move probe function to .devinit.text A pointer to omap_rng_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König Cc: Russell King Cc: David Brownell Cc: Patrick McHardy Cc: Jan Engelhardt Cc: Michael Buesch Cc: Andrew Morton Signed-off-by: Herbert Xu commit 2f6ceb7933f52f238519a9c2f65c628eecdac962 Author: Geert Uytterhoeven Date: Sun Mar 29 15:45:30 2009 +0800 crypto: pcomp - pcompress.c should include crypto/internal/compress.h make C=1: | crypto/pcompress.c:77:5: warning: symbol 'crypto_register_pcomp' was not declared. Should it be static? | crypto/pcompress.c:89:5: warning: symbol 'crypto_unregister_pcomp' was not declared. Should it be static? Signed-off-by: Geert Uytterhoeven Signed-off-by: Herbert Xu commit c79cf91006f03adb603879013b6710b6062c8445 Author: Geert Uytterhoeven Date: Sun Mar 29 15:44:19 2009 +0800 crypto: testmgr - Kill test_comp() sparse warnings make C=1: | crypto/testmgr.c:846:45: warning: incorrect type in argument 5 (different signedness) | crypto/testmgr.c:846:45: expected unsigned int *dlen | crypto/testmgr.c:846:45: got int * | crypto/testmgr.c:878:47: warning: incorrect type in argument 5 (different signedness) | crypto/testmgr.c:878:47: expected unsigned int *dlen | crypto/testmgr.c:878:47: got int * Signed-off-by: Geert Uytterhoeven Signed-off-by: Herbert Xu commit 2cf4ac8beb9dc50a315a6155b7b70e754d511958 Author: Huang Ying Date: Sun Mar 29 15:41:20 2009 +0800 crypto: aes-ni - Add support for more modes Because kernel_fpu_begin() and kernel_fpu_end() operations are too slow, the performance gain of general mode implementation + aes-aesni is almost all compensated. The AES-NI support for more modes are implemented as follow: - Add a new AES algorithm implementation named __aes-aesni without kernel_fpu_begin/end() - Use fpu((AES)) to provide kenrel_fpu_begin/end() invoking - Add (AES) ablkcipher, which uses cryptd(fpu((AES))) to defer cryption to cryptd context in soft_irq context. Now the ctr, lrw, pcbc and xts support are added. Performance testing based on dm-crypt shows that cryption time can be reduced to 50% of general mode implementation + aes-aesni implementation. Signed-off-by: Huang Ying Signed-off-by: Herbert Xu commit 150c7e85526e80474b87004f4b420e8834fdeb43 Author: Huang Ying Date: Sun Mar 29 15:39:02 2009 +0800 crypto: fpu - Add template for blkcipher touching FPU Blkcipher touching FPU need to be enclosed by kernel_fpu_begin() and kernel_fpu_end(). If they are invoked in cipher algorithm implementation, they will be invoked for each block, so that performance will be hurt, because they are "slow" operations. This patch implements "fpu" template, which makes these operations to be invoked for each request. Signed-off-by: Huang Ying Signed-off-by: Herbert Xu commit 505fd21d6138545aa5e96aa738975e6a9deb98a9 Author: Huang Ying Date: Sun Mar 29 15:33:53 2009 +0800 crypto: cryptd - Use nivcipher in cryptd_alloc_ablkcipher Use crypto_alloc_base() instead of crypto_alloc_ablkcipher() to allocate underlying tfm in cryptd_alloc_ablkcipher. Because crypto_alloc_ablkcipher() prefer GENIV encapsulated crypto instead of raw one, while cryptd_alloc_ablkcipher needed the raw one. Signed-off-by: Huang Ying Signed-off-by: Herbert Xu commit 811d8f062668077e268a7292202bb923fe2ae896 Author: Johannes Weiner Date: Sun Mar 29 15:20:48 2009 +0800 crypto: api - Use kzfree Use kzfree() instead of memset() + kfree(). Signed-off-by: Johannes Weiner Reviewed-by: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Herbert Xu commit 376bacb0a26bca722981d1610ffb76f951572bb1 Author: Frank Seidel Date: Sun Mar 29 15:18:39 2009 +0800 crypto: tcrypt - Reduce stack size Applying kernel janitors todos (printk calls need KERN_* constants on linebeginnings, reduce stack footprint where possible) to tcrypts test_hash_speed (where stacks memory footprint was very high (on i386 1184 bytes to 160 now). Signed-off-by: Frank Seidel Acked-by: Neil Horman Signed-off-by: Herbert Xu commit 0f6ce3de4ef6ff940308087c49760d068851c1a7 Author: Steven Rostedt Date: Mon Jun 1 21:51:28 2009 -0400 ftrace: do not profile functions when disabled A race was found that if one were to enable and disable the function profiler repeatedly, then the system can panic. This was because a profiled function may be preempted just before disabling interrupts. While the profiler is disabled and then reenabled, the preempted function could start again, and access the hash as it is being initialized. This just adds a check in the irq disabled part to check if the profiler is enabled, and if it is not then it will just exit. When the system is disabled, the profile_enabled variable is cleared before calling the unregistering of the function profiler. This unregistering calls stop machine which also acts as a synchronize schedule. [ Impact: fix panic in enabling/disabling function profiler ] Signed-off-by: Steven Rostedt commit 112f38a7e36e9d688b389507136bf3af3e6d159b Author: Steven Rostedt Date: Mon Jun 1 15:16:05 2009 -0400 tracing: make trace pipe recognize latency format flag The trace_pipe did not recognize the latency format flag and would produce different output than the trace file. The problem was partly due that the trace flags in the iterator was not set as well as the trace_pipe zeros out part of the iterator (including the flags) to be able to use the same routines as the trace file. trace_flags of the iterator should not cause any problems when not zeroed out by for trace_pipe. Reported-by: Johannes Berg Signed-off-by: Steven Rostedt commit 1d080d6c3141623c92caaebe20e847cb99ccbb60 Author: Steven Rostedt Date: Mon Jun 1 12:20:40 2009 -0400 tracing: remove redundant SOFTIRQ from softirq event traces After converting the softirq tracer to use te flags options, this caused a regression with the name. Since the flag was used directly it was printed out (i.e. HRTIMER_SOFTIRQ). This patch only shows the softirq name without the SOFTIRQ part. [ Impact: fix regression of output from softirq events ] Signed-off-by: Steven Rostedt commit ec081ddc3d90aab35bc0de19a358b964978837cf Author: Steven Whitehouse Date: Mon Jun 1 15:53:35 2009 +0100 tracing: add exports to use __print_symbolic and __print_flags from a module A patch to allow the use of __print_symbolic and __print_flags from a module. This allows the current GFS2 tracing patch to build. Signed-off-by: Steven Whitehouse LKML-Reference: <1243868015.29604.542.camel@localhost.localdomain> Signed-off-by: Steven Rostedt commit 7fcb7c472f455d1711eb5a7633204dba8800a6d6 Author: Li Zefan Date: Mon Jun 1 15:35:46 2009 +0800 tracing/events: introduce __dynamic_array() __string() is limited: - it's a char array, but we may want to define array with other types - a source string should be available, but we may just know the string size We introduce __dynamic_array() to break those limitations, and __string() becomes a wrapper of it. As a side effect, now __get_str() can be used in TP_fast_assign but not only TP_print. Take XFS for example, we have the string length in the dirent, but the string itself is not NULL-terminated, so __dynamic_array() can be used: TRACE_EVENT(xfs_dir2, TP_PROTO(struct xfs_da_args *args), TP_ARGS(args), TP_STRUCT__entry( __field(int, namelen) __dynamic_array(char, name, args->namelen + 1) ... ), TP_fast_assign( char *name = __get_str(name); if (args->namelen) memcpy(name, args->name, args->namelen); name[args->namelen] = '\0'; __entry->namelen = args->namelen; ), TP_printk("name %.*s namelen %d", __entry->namelen ? __get_str(name) : NULL __entry->namelen) ); [ Impact: allow defining dynamic size arrays ] Signed-off-by: Li Zefan LKML-Reference: <4A2384D2.3080403@cn.fujitsu.com> Signed-off-by: Steven Rostedt commit a9c1c3abe1160a5632e48c929b02b740556bf423 Author: Li Zefan Date: Mon Jun 1 15:35:13 2009 +0800 tracing/events: put TP_fast_assign into braces Currently TP_fast_assign has a limitation that we can't define local variables in it. Here's one use case when we introduce __dynamic_array(): TP_fast_assign( type *p = __get_dynamic_array(item); foo(p); bar(p); ), [ Impact: allow defining local variables in TP_fast_assign ] Signed-off-by: Li Zefan LKML-Reference: <4A2384B1.90100@cn.fujitsu.com> Signed-off-by: Steven Rostedt commit 6e25db44a7ad7eb380f4ec774ec00a8fcddea112 Author: Li Zefan Date: Fri May 29 11:24:59 2009 +0800 tracing/events: fix a typo in __string() format output "tsize" should be "\tsize". Also remove the space before "__str_loc". Before: # cat tracing/events/irq/irq_handler_entry/format ... field:int irq; offset:12; size:4; field: __str_loc name; offset:16;tsize:2; ... After: # cat tracing/events/irq/irq_handler_entry/format ... field:int irq; offset:12; size:4; field:__str_loc name; offset:16; size:2; ... [ Impact: standardize __string field description in events format file ] Signed-off-by: Li Zefan Signed-off-by: Frederic Weisbecker Signed-off-by: Steven Rostedt commit 897f17a65389a26509bd0c79a9812d1c9ea8ea6f Author: Steven Rostedt Date: Thu May 28 16:31:21 2009 -0400 tracing: combine the default tracers into one config Both event tracer and sched switch plugin are selected by default by all generic tracers. But if no generic tracer is enabled, their options appear. But ether one of them will select the other, thus it only makes sense to have the default tracers be selected by one option. [ Impact: clean up kconfig menu ] Signed-off-by: Steven Rostedt commit 5e0a093910876882f91f1d4b8a1635a099e6c7ba Author: Steven Rostedt Date: Thu May 28 15:50:13 2009 -0400 tracing: fix config options to not show when automatically selected There are two options that are selected by all tracers, but we want to have those options available when no tracer is selected. These are The event tracer and sched switch tracer. The are enabled by all tracers, but if a tracer is not selected we want the options to appear. All tracers including them select TRACING. Thus what we would like to do is: config EVENT_TRACER bool "prompt" depends on TRACING select TRACING But that gives us a bug in the kbuild system since we just created a circular dependency. We only want the prompt to show when TRACING is off. This patch adds GENERIC_TRACER that all tracers will select instead of TRACING. The two options (sched switch and event tracer) will select TRACING directly and depend on !GENERIC_TRACER. This solves the cicular dependency. [ Impact: hide options that are selected by default ] Signed-off-by: Steven Rostedt commit 2af15d6a44b871ad4c2a651302374cde8f335480 Author: Steven Rostedt Date: Thu May 28 13:37:24 2009 -0400 ftrace: add kernel command line function filtering When using ftrace=function on the command line to trace functions on boot up, one can not filter out functions that are commonly called. This patch adds two new ftrace command line commands. ftrace_notrace=function-list ftrace_filter=function-list Where function-list is a comma separated list of functions to filter. The ftrace_notrace will make the functions listed not be included in the function tracing, and ftrace_filter will only trace the functions listed. These two act the same as the debugfs/tracing/set_ftrace_notrace and debugfs/tracing/set_ftrace_filter respectively. The simple glob expressions that are allowed by the filter files can also be used by the command line interface. ftrace_notrace=rcu*,*lock,*spin* Will not trace any function that starts with rcu, ends with lock, or has the word spin in it. Note, if the self tests are enabled, they may interfere with the filtering set by the command lines. Signed-off-by: Steven Rostedt commit 138f025267dcc07d5e7d0bb1f20e9a6b5f2fdcf7 Author: Kuninori Morimoto Date: Tue Jun 2 02:49:28 2009 +0000 sh: sh7723: L2 cache initialization. Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt commit b4bd9eb0d8f5c20f942ff037c8a7939f69cb188a Author: Kuninori Morimoto Date: Tue Jun 2 02:49:25 2009 +0000 sh: sh7724: L2 cache initialization. Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt commit fab88d9fe98e9091aafeb9789fbf2e04fdace8ed Author: Kuninori Morimoto Date: Tue Jun 2 02:49:20 2009 +0000 sh: add weak l2_cache_init function. Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt commit d974ac24b762296eeaebb23e5eff8ed15ce44529 Author: Kuninori Morimoto Date: Tue Jun 2 02:49:13 2009 +0000 sh: add RAMCR definition for sh4 Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt commit dd0a3e77c825c9f5c6d2a97deb047f8d52026581 Author: SUGIOKA Toshinobu Date: Mon Jun 1 03:53:41 2009 +0000 serial: sh-sci: Fix up PORT_SCI console output ordering. Fix SCI transmission sequence in console output function. This reorders the write sequence to match the SH-3 manual, and corrects a console corruption bug observed on SH-3 SCI. Signed-off-by: Toshinobu Sugioka Signed-off-by: Paul Mundt commit 4778541470cf7d074acd998fd40c06b94711e4ad Author: Kuninori Morimoto Date: Fri May 29 07:41:26 2009 +0000 sh: fix CONFIG_SH_PCLK_FREQ bug for sh7724 CONFIG_SH_PCLK_FREQ=33333333 is correct for sh7724. sh7724 master clock is 33333333, but peripheral is 41666666. This bug came to light because sh-sci driver had changed clk from "module_clk" to "peripheral_clk" Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt commit c8c96525f3c25f43a4fa230e293c4976c0c36cc1 Author: Arnaldo Carvalho de Melo Date: Mon Jun 1 17:50:57 2009 -0300 perf_counter tools: Add missing rb_erase in dso__delete_symbols Signed-off-by: Arnaldo Carvalho de Melo Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Steven Rostedt LKML-Reference: <20090601205057.GB7805@ghostprotocols.net> Signed-off-by: Ingo Molnar commit a0055ae2a4e13db9534c438cf8f3896181da6afc Author: Arnaldo Carvalho de Melo Date: Mon Jun 1 17:50:19 2009 -0300 perf_counter tools: Use hex2u64 in more places This has also a nice side effect, tools built on newer systems such as fedora 10 again work on systems with older versions of glibc: My workstation: [acme@doppio ~]$ rpm -q glibc.x86_64 glibc-2.9-3.x86_64 Test machine: [acme@emilia ~]$ rpm -q glibc.x86_64 glibc-2.5-24 Before: [acme@emilia ~]$ perf perf: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by perf) [acme@emilia ~]$ nm `which perf` | grep GLIBC_2\.7 U __isoc99_sscanf@@GLIBC_2.7 [acme@emilia ~]$ After: [acme@emilia ~]$ perf usage: perf [--version] [--help] COMMAND [ARGS] The most commonly used perf commands are: record Run a command and record its profile into perf.data report Read perf.data (created by perf record) and display the profile stat Run a command and gather performance counter statistics top Run a command and profile it See 'perf help COMMAND' for more information on a specific command. [acme@emilia ~]$ nm `which perf` | grep GLIBC_2\.7 [acme@emilia ~]$ Signed-off-by: Arnaldo Carvalho de Melo Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Steven Rostedt LKML-Reference: <20090601205019.GA7805@ghostprotocols.net> Signed-off-by: Ingo Molnar commit ea5cc87c63b49c133d15ec2911bb2e49e8124516 Author: Arnaldo Carvalho de Melo Date: Mon Jun 1 22:31:03 2009 -0300 perf_counter tools: Add string.[ch] Add hex conversion libraries. We are going to replace sscanf() uses with them. Signed-off-by: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 3d58829b0510244596079c1d2f1762c53aef2e97 Author: Jiri Slaby Date: Thu May 28 09:54:47 2009 +0200 x86, apic: Restore irqs on fail paths lapic_resume forgets to restore interrupts on fail paths. Fix that. Signed-off-by: Jiri Slaby Acked-by: Cyrill Gorcunov LKML-Reference: <1243497289-18591-1-git-send-email-jirislaby@gmail.com> Signed-off-by: Ingo Molnar Cc: H. Peter Anvin commit 58f892e022e88438183c48661dcdc6a2997dab99 Author: Naga Chumbalkar Date: Tue May 26 21:48:07 2009 +0000 x86: Print real IOAPIC version for x86-64 Fix the fact that the IOAPIC version number in the x86_64 code path always gets assigned to 0, instead of the correct value. Before the patch: (from "dmesg" output): ACPI: IOAPIC (id[0x08] address[0xfec00000] gsi_base[0]) IOAPIC[0]: apic_id 8, version 0, address 0xfec00000, GSI 0-23 <--- After the patch: ACPI: IOAPIC (id[0x08] address[0xfec00000] gsi_base[0]) IOAPIC[0]: apic_id 8, version 32, address 0xfec00000, GSI 0-23 <--- History: io_apic_get_version() was compiled out of the x86_64 code path in the commit f2c2cca3acef8b253a36381d9b469ad4fb08563a: Author: Andi Kleen Date: Tue Sep 26 10:52:37 2006 +0200 [PATCH] Remove APIC version/cpu capability mpparse checking/printing ACPI went to great trouble to get the APIC version and CPU capabilities of different CPUs before passing them to the mpparser. But all that data was used was to print it out. Actually it even faked some data based on the boot cpu, not on the actual CPU being booted. Remove all this code because it's not needed. Cc: len.brown@intel.com At the time, the IOAPIC version number was deliberately not printed in the x86_64 code path. However, after the x86 and x86_64 files were merged, the net result is that the IOAPIC version is printed incorrectly in the x86_64 code path. The patch below provides a fix. I have tested it with acpi, and with acpi=off, and did not see any problems. Signed-off-by: Naga Chumbalkar Acked-by: Yinghai Lu LKML-Reference: <20090416014230.4885.94926.sendpatchset@localhost.localdomain> Signed-off-by: Ingo Molnar ************************* commit b20f3b834673be9ead83a3c6f07fa3881d1a990f Author: Takashi Iwai Date: Tue Jun 2 01:20:22 2009 +0200 ALSA: hda - Limit codec-verb retry to limited hardwares The reset of a BUS controller during operations is somehow risky and shouldn't be done inevitably for devices that have apparently no such codec-communication problems. This patch adds the check of the hardware and limits the bus-reset capability. Signed-off-by: Takashi Iwai commit 8dd783304e6d0f7c2830365d63f75f08aa343e10 Author: Takashi Iwai Date: Tue Jun 2 01:16:07 2009 +0200 ALSA: hda - Add codec bus reset and verb-retry at critical errors Some machines machine cause a severe CORB/RIRB stall in certain weird conditions, such as PA access at the start up together with fglrx driver. This seems unable to be recovered without the controller reset. This patch allows the bus controller reset at critical errors so that the communication gets recovered again. Signed-off-by: Takashi Iwai commit 43bd1236234cacbc18d1476a9b57e7a306efddf5 Author: Frederic Weisbecker Date: Sat May 30 04:25:30 2009 +0200 tracing/stat: remove unappropriate safe walk on list register_stat_tracer() uses list_for_each_entry_safe to check whether a tracer is already present in the list. But we don't delete anything from the list here, so we don't need the safe version [ Impact: cleanup list use is stat tracing ] Signed-off-by: Frederic Weisbecker commit dbd3fbdfeecfad4e71139db05d72560c3583e2a9 Author: Li Zefan Date: Wed May 27 11:42:46 2009 +0800 tracing/stat: do some cleanups - remove duplicate code in stat_seq_init() - update comments to reflect the change from stat list to stat rbtree [ Impact: clean up ] Signed-off-by: Li Zefan Signed-off-by: Frederic Weisbecker commit e16228069083a2f6b94383ac5739aea7a0f38ce4 Author: Li Zefan Date: Wed May 27 11:04:48 2009 +0800 tracing/stat: remember to free root node When closing a trace_stat file, we destroy the rbtree constructed during file open, but there is memory leak that the root node is not freed. [ Impact: fix memory leak when closing a trace_stat file ] Signed-off-by: Li Zefan Signed-off-by: Frederic Weisbecker commit b3dd7ba7d862707800c7ac45068f14ade2b65155 Author: Li Zefan Date: Wed May 27 11:04:26 2009 +0800 tracing/stat: change dummpy_cmp() to return -1 Currently the output of trace_stat/workqueues is totally reversed: # cat /debug/tracing/trace_stat/workqueues ... 1 17 17 210 37 `-blk_unplug_work+0x0/0x57 1 3779 3779 181 11 |-cfq_kick_queue+0x0/0x2f 1 3796 3796 kblockd/1:120 ... The correct output should be: 1 3796 3796 kblockd/1:120 1 3779 3779 181 11 |-cfq_kick_queue+0x0/0x2f 1 17 17 210 37 `-blk_unplug_work+0x0/0x57 It's caused by "tracing/stat: replace linked list by an rbtree for sorting" (53059c9b67a62a3dc8c80204d3da42b9267ea5a0). dummpy_cmp() should return -1, so rb_node will always be inserted as right-most node in the rbtree, thus we sort the output in ascending order. [ Impact: fix the output of trace_stat/workqueues ] Signed-off-by: Li Zefan Signed-off-by: Frederic Weisbecker commit 8f184f27300f66f6dcc8296c2dae7a1fbe8429c9 Author: Frederic Weisbecker Date: Sat May 16 06:24:36 2009 +0200 tracing/stat: replace linked list by an rbtree for sorting When the stat tracing framework prepares the entries from a tracer to output them to the user, it starts by computing a linear sort through a linked list to give the entries ordered by relevance to the user. This is quite ugly and causes a small latency when we begin to read the file. This patch changes that by turning the linked list into a red-black tree. Athough the whole iteration using the start and next tracer callbacks while opening the file remain the same, it is now much more fast and scalable. The rbtree guarantees O(log(n)) insertions whereas a linked list with linear sorting brought us a O(n) despair. Now the (visible) latency has disapeared. [ Impact: kill the latency while starting to read a stat tracer file ] Signed-off-by: Frederic Weisbecker commit 0d64f8342de26d02451900b1aad94716fe92c4ab Author: Frederic Weisbecker Date: Sat May 16 05:58:49 2009 +0200 tracing/stat: replace trace_stat_session by stat_session The "trace" prefix in struct trace_stat_session type is annoying while reading the trace_stat.c file. It makes the lines longer, and is not that much useful to explain the sense of this type. Just keep "struct stat_session" for this type. [ Impact: make the code a bit more readable ] Signed-off-by: Frederic Weisbecker commit f3c4ae26e93d354152196b62797ba86ad86dd0cc Author: Zhaolei Date: Mon Apr 20 15:02:17 2009 +0800 trace_workqueue: remove blank line between each cpu The blankline between each cpu's workqueue stat is not necessary, because the cpu number is enough to part them by eye. Old style also caused a blankline below headline, and made code complex by using lock, disableirq and get cpu var. Old style: # CPU INSERTED EXECUTED NAME # | | | | 0 8644 8644 events/0 0 0 0 cpuset ... 0 1 1 kdmflush 1 35365 35365 events/1 ... New style: # CPU INSERTED EXECUTED NAME # | | | | 0 8644 8644 events/0 0 0 0 cpuset ... 0 1 1 kdmflush 1 35365 35365 events/1 ... [ Impact: provide more readable code ] Signed-off-by: Zhao Lei Cc: KOSAKI Motohiro Cc: Steven Rostedt Cc: Tom Zanussi Cc: Oleg Nesterov Cc: Andrew Morton Signed-off-by: Frederic Weisbecker commit b8867164f05791a6b5363bd51c1274e03600886e Author: Zhaolei Date: Mon Apr 20 14:59:36 2009 +0800 trace_workqueue: remove cpu_workqueue_stats->first_entry cpu_workqueue_stats->first_entry is useless because we can retrieve the header of a cpu workqueue using: if (&cpu_workqueue_stats->list == workqueue_cpu_stat(cpu)->list.next) [ Impact: cleanup ] Signed-off-by: Zhao Lei Cc: Steven Rostedt Cc: Tom Zanussi Cc: Oleg Nesterov Cc: Andrew Morton Signed-off-by: Frederic Weisbecker commit 1fdfca9c577aac96a559c1ea68f5c9156f17d636 Author: Zhaolei Date: Mon Apr 20 14:58:26 2009 +0800 trace_workqueue: use list_for_each_entry() instead of list_for_each_entry_safe() No need to use list_for_each_entry_safe() in iteration without deleting any node, we can use list_for_each_entry() instead. [ Impact: cleanup ] Signed-off-by: Zhao Lei Cc: Steven Rostedt Cc: Tom Zanussi Cc: Oleg Nesterov Cc: Andrew Morton Signed-off-by: Frederic Weisbecker commit fb39125fd79a25c5002f3b45cf4c80e3fa6b961b Author: Zhaolei Date: Fri Apr 17 15:15:51 2009 +0800 ftrace, workqueuetrace: make workqueue tracepoints use TRACE_EVENT macro v3: zhaolei@cn.fujitsu.com: Change TRACE_EVENT definition to new format introduced by Steven Rostedt: consolidate trace and trace_event headers v2: kosaki@jp.fujitsu.com: print the function names instead of addr, and zap the work addr v1: zhaolei@cn.fujitsu.com: Make workqueue tracepoints use TRACE_EVENT macro TRACE_EVENT is a more generic way to define tracepoints. Doing so adds these new capabilities to the tracepoints: - zero-copy and per-cpu splice() tracing - binary tracing without printf overhead - structured logging records exposed under /debug/tracing/events - trace events embedded in function tracer output and other plugins - user-defined, per tracepoint filter expressions Then, this patch converts DEFINE_TRACE to TRACE_EVENT in workqueue related tracepoints. [ Impact: expand workqueue tracer to events tracing ] Signed-off-by: Zhao Lei Cc: Steven Rostedt Cc: Tom Zanussi Cc: Oleg Nesterov Cc: Andrew Morton Signed-off-by: KOSAKI Motohiro Signed-off-by: Frederic Weisbecker commit 8871e5b91518a47284b6bc2603b44dbc79c85446 Author: Takashi Iwai Date: Tue Jun 2 01:02:50 2009 +0200 ALSA: hda - Reorder and clean-up ALC268 quirk table Rearrange alc268_cfg_tbl[] in the order of vendor id, and group some entries using SND_PCI_QUIRK_MASK(). Signed-off-by: Takashi Iwai commit d22142aa1b23d64d01f87a94b5756ff6cbd1022f Author: Ozan Çağlayan Date: Mon Jun 1 23:13:17 2009 +0300 ALSA: hda - fix audio on LG R510 Currently, LG R510 is only able to produce sound on headphones, the internal speakers are not working. The user tested and confirmed that with model=Dell headphones, internal speakers and the microphone are working flawlessly. Tested-by: Serdar Soytetir Signed-off-by: Ozan Çağlayan Signed-off-by: Takashi Iwai commit 92b9de8342c6ad0d930333851190ed25b88b190c Author: Kacper Szczesniak Date: Tue Jun 2 00:55:19 2009 +0200 ALSA: hda - Macbook[Pro] 5 6ch support this is a patch against current snapshot that adds: 6 channels support for the MB5 model Signed-off-by: Kacper Szczesniak Signed-off-by: Takashi Iwai commit eaf1ac8bb58888e0773c0b81dfedb9d7c0123a1d Author: Peter Ujfalusi Date: Mon Jun 1 14:06:40 2009 +0300 ASoC: TWL4030: Check the interface format for 4 channel mode In addition to the operating mode check, also check the codec's interface format in case of four channel mode. If the codec is not in TDM (DSP_A) mode, return with error. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 48b1fddbb100a64f3983ca9768b8ea629a09aa20 Merge: 3873607 ee4c24a Author: H. Peter Anvin Date: Mon Jun 1 15:13:02 2009 -0700 Merge branch 'irq/numa' into x86/mce3 Merge reason: arch/x86/kernel/irqinit_{32,64}.c unified in irq/numa and modified in x86/mce3; this merge resolves the conflict. Conflicts: arch/x86/kernel/irqinit.c Signed-off-by: H. Peter Anvin commit ee4c24a5c9b530481394132c8dbc10572d57c075 Merge: 3d58f48 3e0c373 Author: Ingo Molnar Date: Mon Jun 1 22:29:35 2009 +0200 Merge branch 'x86/cpufeature' into irq/numa Merge reason: irq/numa didnt build because this commit: 2759c32: x86: don't call read_apic_id if !cpu_has_apic Had a dependency on x86/cpufeature changes. Pull in that (small) branch to fix the dependency. Signed-off-by: Ingo Molnar commit 3d58f48ba05caed9118bce62b3047f8683438835 Merge: abfe0af d9244b5 Author: Ingo Molnar Date: Mon Jun 1 21:06:21 2009 +0200 Merge branch 'linus' into irq/numa Conflicts: arch/mips/sibyte/bcm1480/irq.c arch/mips/sibyte/sb1250/irq.c Merge reason: we gathered a few conflicts plus update to latest upstream fixes. Signed-off-by: Ingo Molnar commit 4156e735d3abde8e9243b5d22f7999dd3fffab2e Author: Felix Blyakher Date: Mon Jun 1 13:13:24 2009 -0500 xfs: prevent deadlock in xfs_qm_shake() It's possible to recurse into filesystem from the memory allocation, which deadlocks in xfs_qm_shake(). Add check for __GFP_FS, and bail out if it is not set. Signed-off-by: Felix Blyakher Signed-off-by: Hedi Berriche Reviewed-by: Christoph Hellwig Reviewed-by: Andi Kleen Signed-off-by: Felix Blyakher commit 229c4eedcedcdadf70411120ba34bc37554a74bd Author: Mike Galbraith Date: Thu May 28 16:28:53 2009 +0200 perf_counter tools: Guard against record damaging existing files Signed-off-by: Mike Galbraith Cc: Peter Zijlstra LKML-Reference: Signed-off-by: Ingo Molnar commit 22a4f650d686eeaac3629dae1c4294381485efdf Author: Ingo Molnar Date: Mon Jun 1 10:13:37 2009 +0200 perf_counter: Tidy up style details - whitespace fixlets - make local variable definitions more consistent [ Impact: cleanup ] Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 0e4835c198e7dd9d814de25a17a1d6682107c394 Author: Jaroslav Kysela Date: Mon May 25 16:44:20 2009 +0200 ALSA: hda-intel: improve initialization for ALC262_HP_BPC model Fix issues for 3 generations of HP workstations. The modest modifications do the following: 1. Change the second MIC from device 3 to device 1 2. Init the "boost" values to "0" by default From: John Brown Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai commit 0bf8513ed0df64b38edce63411d4b7b368464f47 Author: Paul Mundt Date: Mon Jun 1 19:50:08 2009 +0900 sh: Tidy up SH-4A boot_cpu_data.flags probing. This tidies up the boot_cpu_data.flags probing on SH-4A. All of them have a few things in common, which we can blindly set, rather than having each subtype have to set the same flags. We can also make assumptions about cache ways and the validity of PTEA, so this also kills off CPU_HAS_PTEA as a config option. There was also a bug in the FPU probing, which is now tidied up. Signed-off-by: Paul Mundt commit 7863d3f7aeae05099a38693a0a7eb7bdc7b2ab05 Author: Paul Mundt Date: Mon Jun 1 19:38:41 2009 +0900 sh: Tidy up the optional L2 probing, wire it up for SH7786. This tidies up the L2 probing, as it may or may not be implemented on a CPU, regardless of whether it is supported. This converts the cvr validity checks from BUG_ON()'s to simply clearing the CPU_HAS_L2_CACHE flag and moving on with life. Signed-off-by: Paul Mundt commit 7c922de709b90badc19705e4f998e6d5b44c419b Author: Nickolas Lloyd Date: Mon Jun 1 11:12:29 2009 +0200 ALSA: hda - Jack Mode changes for Sigmatel boards This patch changes Line In as Out Switch and Mic In as Out Switch to enums for consistency, and causes all mic and line in ports to be probed and controls to be added appropriately. Signed-off-by: Nickolas Lloyd Signed-off-by: Takashi Iwai commit 43909a938063f9b6f98c05a2e28b072dd972ece7 Author: Magnus Damm Date: Thu May 28 13:13:56 2009 +0000 sh: hook up shared div4 clock code to sh7785 Hook up the shared 4-bit divisor clock code to sh7785. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit a1153e27eec25e9963f5843ba8932952bd9847ac Author: Magnus Damm Date: Thu May 28 13:11:31 2009 +0000 sh: shared div4 clock code Add shared code for 4-bit divisor clocks. Processor specific code can use SH_CLK_DIV4() to initialize div4 clocks, and then use sh_clk_div4_register() for registration. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit e89d53e60593ee7066e1d36ab5c1ccf2648f5f53 Author: Magnus Damm Date: Thu May 28 13:01:53 2009 +0000 sh: hook up shared mstp32 clock code to sh7785 Hook up the shared 32-bit module stop bit code to sh7785. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 6881e8bf3d86b23dd124134fae113ebd05fae08a Author: Magnus Damm Date: Thu May 28 12:52:29 2009 +0000 sh: shared mstp32 clock code Add shared 32-bit module stop bit clock support. Processor specific code can use SH_CLK_MSTP32() to initialize module stop bit clocks, and then use sh_clk_mstp32() for registration. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit a3d6ab9723060e8d67e28a8d9142e6d08953d07b Author: Wei Ni Date: Mon Jun 1 16:37:28 2009 +0800 ALSA: hda - Support NVIDIA 8 channel HDMI audio Support 8 channel HDMI audio for MCP78/7A Signed-off-by: Wei Ni Signed-off-by: Takashi Iwai commit 6efd2cd5e8c566b9c2b4c19830e5e120b442d040 Author: Takashi Iwai Date: Mon Jun 1 10:59:51 2009 +0200 ALSA: usb-audio - Add quirk for Roland/Edirol M-16DX Added a half-working quirk for Roland/Edirol M-16DX. This enables the capture on the device but the playback on it seems still problematic becuase of lack of sync with the capture clock. Signed-off-by: Takashi Iwai commit 93bfd01227408a62006a4e4f640a6056abc6af7a Author: Andrea Borgia Date: Mon Jun 1 10:48:54 2009 +0200 ALSA: usb-audio - quirk for USB Aureon cards Add quirk to provide proper naming of the Terratec Aureon 5.1 MkII USB card. Signed-off-by: Andrea Borgia Signed-off-by: Takashi Iwai commit 880ca15adf2392770a68047e7a98e076ff4d21da Author: Paul Mackerras Date: Mon Jun 1 17:49:14 2009 +1000 perf_counter: Allow software counters to count while task is not running This changes perf_swcounter_match() so that per-task software counters can count events that occur while their associated task is not running. This will allow us to use the generic software counter code for counting task migrations, which can occur while the task is not scheduled in. To do this, we have to distinguish between the situations where the counter is inactive because its task has been scheduled out, and those where the counter is inactive because it is part of a group that was not able to go on the PMU. In the former case we want the counter to count, but not in the latter case. If the context is active, we have the latter case. If the context is inactive then we need to know whether the counter was counting when the context was last active, which we can determine by comparing its ->tstamp_stopped timestamp with the context's timestamp. This also folds three checks in perf_swcounter_match, checking perf_event_raw(), perf_event_type() and perf_event_id() individually, into a single 64-bit comparison on counter->hw_event.config, as an optimization. Signed-off-by: Paul Mackerras Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <18979.34810.259718.955621@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 25346b93ca079080c9cb23331db5c4f6404e8530 Author: Paul Mackerras Date: Mon Jun 1 17:48:12 2009 +1000 perf_counter: Provide functions for locking and pinning the context for a task This abstracts out the code for locking the context associated with a task. Because the context might get transferred from one task to another concurrently, we have to check after locking the context that it is still the right context for the task and retry if not. This was open-coded in find_get_context() and perf_counter_init_task(). This adds a further function for pinning the context for a task, i.e. marking it so it can't be transferred to another task. This adds a 'pin_count' field to struct perf_counter_context to indicate that a context is pinned, instead of the previous method of setting the parent_gen count to all 1s. Pinning the context with a pin_count is easier to undo and doesn't require saving the parent_gen value. This also adds a perf_unpin_context() to undo the effect of perf_pin_task_context() and changes perf_counter_init_task to use it. Signed-off-by: Paul Mackerras Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <18979.34748.755674.596386@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 23db9f430be9325a861c7762c1ffadad9ca528a8 Merge: 27b9613 3218911 Author: Ingo Molnar Date: Mon Jun 1 10:01:03 2009 +0200 Merge branch 'linus' into perfcounters/core Merge reason: merge almost-rc8 into perfcounters/core, which was -rc6 based - to pick up the latest upstream fixes. Signed-off-by: Ingo Molnar commit 98fbe45bea77c1804eae0e71f27673db1824a2a8 Author: Kuninori Morimoto Date: Fri May 29 07:41:23 2009 +0000 sh: SH7724 has an L2 cache. Add the CPU_HAS_L2_CACHE flag to SH7724. Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt commit 1823f6d5e6b81cca6542ed2e5f30d2556aad0f67 Author: Magnus Damm Date: Thu May 28 12:06:17 2009 +0000 sh: sh7785 pll configuration from mode pin This patch modifies the sh7785 clock code to use the MODE4 value to switch between 72x and 36x PLL multiplication. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 63d12e23235d982d8f55696e09b2ff91e3ba0042 Author: Magnus Damm Date: Thu May 28 12:00:25 2009 +0000 sh: sh7785lcr mode pin configuration This patch adds mode pin support to the sh7785lcr board. The harware allows the user to control the mode pins using dip switches S1 and S2, but from the software the pins are fixed to the factory default since we have no way to reading out this configuration from software. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 4a44b32969bfc29140b9f21a1ec924c796d6ac43 Author: Magnus Damm Date: Mon Jun 1 15:56:00 2009 +0900 sh: sh7785 mode pin definitions This patch adds sh7785 mode pin definitions. Mode pins and pin function controller comments are added as well. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit eb9b9b56eed280e65a9e194aaeb50a5a75111859 Author: Magnus Damm Date: Thu May 28 11:51:51 2009 +0000 sh: boot word / mode pin support V2 Add mode pin support for the SuperH architecture V2. With this patch applied the board code can add their own function to export the cpu mode pin configuration. In most cases this will be a constant bitmap, but boards that allow reading this from a register can instead read out the pin state from hardware. The code warns if a pin is tested but no board specific mode pin function has been provided. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 27b9613b7be39412775d0ab80f57229aa73bb07d Author: Ingo Molnar Date: Sun May 31 22:09:49 2009 +0200 perf_counter tools: Fix unknown command help text Arjan reported this error when entering an unknown command to perf: $ perf start fatal: Uh oh. Your system reports no Git commands at all. The Git code expects there to be perf-* commands - but since Perf is a 'pure' utility with no dash commands anymore, this old assumption of Git does not hold anymore. Remove that error check. Reported-by: Arjan van de Ven Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 8a933ece41a59ce077eeffe5b9bf08b14d173c58 Author: Takashi Iwai Date: Sun May 31 09:28:12 2009 +0200 ALSA: hda - Fix a typo in the previous patch ICH6_GCTL_RESET was wrongly set to another bit by the commit b21fadb9c1852c91622ca1dccfeb144bc535e36e. This caused a problem when the codec needs really a reset (e.g. recovering from the communication error at probe). Signed-off-by: Takashi Iwai commit fee3c55d7fb9486f02d3285678d58e433ffe3c2a Author: Michal Simek Date: Fri May 29 14:15:33 2009 +0200 microblaze: Fix problem with early_printk in startup Problem arise when is incopatibility between kernel/dts/pvr and kernel tries to announce it. Early printk device (uartlite in our case) was in TLB 2 and when kernel extract DTB it necessary to allocate at least one TLB at the end of memory. First free TLB was number two where was early printk. But checking mechanism (kernel/dts/pvr) was after extrahing but TLB 2 was different. This caused that kernel hung up. Moving early printk device to TLB 63 solve it and we don't protect it which means that we can use early_printk messages only for initial parts of kernel then we rewrite TLB 63. Reported-by: Edgar E. Iglesias Signed-off-by: Michal Simek commit c1c2365acf8c044f749c0fe1ea236497e8d1718e Author: Ingo Molnar Date: Sat May 30 12:38:51 2009 +0200 perf_counter tools: Generate per command manpages (and pdf/html, etc.) Import Git's nice .txt => {man/html/pdf} generation machinery. Fix various errors in the Documentation/perf*.txt description as well. Also fix a bug in builtin-help: we'd map 'perf help top' to 'perftop' if only the 'perf' binary is in the default PATH - confusing the manpage logic. I dont fully understand why Git did it this way - but i suppose it's a migration artifact from their migration from standalone git-xyz commands to 'git xyz' commands. The perf tools were always using the modern form so it's not an issue there. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 7fbd55449aafb86d3237b5d1a26fb4dab2aa2c76 Author: Ingo Molnar Date: Sat May 30 12:38:51 2009 +0200 perf_counter tools: Fix 'make install' 'make install' didnt install perf itself - which needs a special rule to be copied to bindir. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit d7c29318c2daa96d64b7312afd8283488c1cb29f Author: Ingo Molnar Date: Sat May 30 12:38:51 2009 +0200 perf_counter tools: Print 'CPU utilization factor' in builtin-stat Before: Performance counter stats for '/home/mingo/hackbench': 5728.862689 task clock ticks (msecs) 34426 context switches # 0.006 M/sec 3835 CPU migrations # 0.001 M/sec 18158 pagefaults # 0.003 M/sec 16218109156 CPU cycles # 2830.947 M/sec 13519616840 instructions # 2359.913 M/sec 55941661 cache references # 9.765 M/sec 23554938 cache misses # 4.112 M/sec Wall-clock time elapsed: 528.886980 msecs After: Performance counter stats for '/home/mingo/hackbench': 5845.443541 task clock ticks # 11.886 CPU utilization factor 38289 context switches # 0.007 M/sec 4208 CPU migrations # 0.001 M/sec 17755 pagefaults # 0.003 M/sec 16664668576 CPU cycles # 2850.882 M/sec 13468113991 instructions # 2304.036 M/sec 57445468 cache references # 9.827 M/sec 26896502 cache misses # 4.601 M/sec Wall-clock time elapsed: 491.802357 msecs Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit c44613a4c1092e85841b78b7ab52a06654fcd321 Author: Arnaldo Carvalho de Melo Date: Fri May 29 17:03:07 2009 -0300 perf_counter tools: Add locking to perf top perf_counter tools: Add locking to perf top We need to protect the active_symbols list as two threads change it: the main thread adding entries to the head and the display thread decaying entries from any place in the list. Also related: take a snapshot of syme->count[0] before using it to calculate the weight and to show the same number used in this calc when displaying the symbol usage. Reported-by: Mike Galbraith Tested-by: Mike Galbraith Signed-off-by: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Steven Rostedt LKML-Reference: <20090529200307.GR4747@ghostprotocols.net> Signed-off-by: Ingo Molnar commit ba84bfcd2b6fdc5a9ac53a4ab103088c99f84a12 Author: Takashi Iwai Date: Sat May 30 08:59:03 2009 +0200 ALSA: hda - Fix reverted LED setup for HP The commit 86d190e77c44cb057742dcc871b12ebd4633c387 reverted the bit flip of LED GPIO for HP DX and DV4-1222nr. Fixed now. Signed-off-by: Takashi Iwai commit c143dc903d7c0b15f5052e00b2c7de33a8b4299c Author: James Bottomley Date: Sat May 30 06:43:49 2009 +0200 block: fix an oops on BLKPREP_KILL Doing a bit of torture testing, I ran across a BUG in the block subsystem (at blk-core.c:2048): the test for if the request is queued. It turns out the trigger was a BLKPREP_KILL coming out of the SCSI prep function. Currently for BLKPREP_KILL requests, we send them straight into __blk_end_request_all() with an error, but they've never been dequeued, so they trip the bug. Fix this by starting requests before killing them. Signed-off-by: James Bottomley Signed-off-by: Jens Axboe commit b78c07d45a7e71be7b5c5d7486f922355ccf23a8 Author: Arnaldo Carvalho de Melo Date: Fri May 29 13:48:59 2009 -0300 perf_counter tools: Shorten the DSO names using cwd [acme@emilia linux-2.6-tip]$ pwd /home/acme/git/linux-2.6-tip Before (still available using -P/--full-paths) [acme@emilia linux-2.6-tip]$ perf report -P | head -10 11.48% perf: 7454 [kernel]: clear_page_c 4.89% perf: 7454 [kernel]: vsnprintf 4.61% perf: 7454 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: dso__find_symbol 4.09% perf: 7454 [kernel]: number 4.06% perf: 7454 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: dso__fprintf 4.00% perf: 7454 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: symbol_filter New default: [acme@emilia linux-2.6-tip]$ perf report | head -10 11.48% perf: 7454 [kernel]: clear_page_c 4.89% perf: 7454 [kernel]: vsnprintf 4.61% perf: 7454 ./Documentation/perf_counter/perf: dso__find_symbol 4.09% perf: 7454 [kernel]: number 4.06% perf: 7454 ./Documentation/perf_counter/perf: dso__fprintf 4.00% perf: 7454 ./Documentation/perf_counter/perf: symbol_filter Suggested-by: Ingo Molnar Signed-off-by: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Mike Galbraith Cc: Steven Rostedt LKML-Reference: <20090529164859.GN4747@ghostprotocols.net> Signed-off-by: Ingo Molnar commit bbbee90829304d156c12b171c0ac7e6e1aba8b90 Author: Peter Zijlstra Date: Fri May 29 14:25:58 2009 +0200 perf_counter: Ammend cleanup in fork() fail When fork() fails we cannot use perf_counter_exit_task() since that assumes to operate on current. Write a new helper that cleans up unused/clean contexts. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 665c2142a94202881a3c11cbaee6506cb10ada2d Author: Peter Zijlstra Date: Fri May 29 14:51:57 2009 +0200 perf_counter: Clean up task_ctx vs interrupts Remove the local_irq_save() etc.. in routines that are smp function calls, or have IRQs disabled by other means. Then change the COMM, MMAP, and swcounter context iteration to current->perf_counter_ctxp and RCU, since it really doesn't matter which context they iterate, they're all folded. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit efb3d17240d80e27508d238809168120fe4b93a4 Author: Peter Zijlstra Date: Fri May 29 14:25:58 2009 +0200 perf_counter: Fix COMM and MMAP events for cpu wide counters Commit a63eaf34ae6 ("perf_counter: Dynamically allocate tasks' perf_counter_context struct") broke COMM and MMAP notification for cpu wide counters by dropping out early if there was no task context, thereby also not iterating the cpu context. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit f04d82b7e0c63d0251f9952a537a4bc4d73aa1a9 Author: GeunSik Lim Date: Thu May 28 10:36:14 2009 +0900 sched: fix typo in sched-rt-group.txt file Fix typo about static priority's range. Kernel Space User Space =============================================================== 0(high) to 98(low) user RT priority 99(high) to 1(low) with SCHED_RR or SCHED_FIFO --------------------------------------------------------------- 99 sched_priority is not used in scheduling decisions(it must be specified as 0) --------------------------------------------------------------- 100(high) to 139(low) user nice -20(high) to 19(low) --------------------------------------------------------------- 140 idle task priority --------------------------------------------------------------- * ref) http://www.kernel.org/doc/man-pages/online/pages/man2/sched_setscheduler.2.html Signed-off-by: GeunSik Lim CC: Steven Rostedt Signed-off-by: Peter Zijlstra LKML-Reference: Signed-off-by: Ingo Molnar commit 294ae4011530d008c59c4fb9847738e39228821e Author: GeunSik Lim Date: Thu May 28 10:36:11 2009 +0900 ftrace: fix typo about map of kernel priority in ftrace.txt file. Fix typo about chart to map the kernel priority to user land priorities. * About sched_setscheduler(2) Processes scheduled under SCHED_FIFO or SCHED_RR can have a (user-space) static priority in the range 1 to 99. (reference: http://www.kernel.org/doc/man-pages/online/pages/ man2/sched_setscheduler.2.html) * From: Steven Rostedt 0 to 98 - maps to RT tasks 99 to 1 (SCHED_RR or SCHED_FIFO) 99 - maps to internal kernel threads that want to be lower than RT tasks but higher than SCHED_OTHER tasks. Although I'm not sure if any kernel thread actually uses this. I'm not even sure how this can be set, because the internal sched_setscheduler function does not allow for it. 100 to 139 - maps nice levels -20 to 19. These are not set via sched_setscheduler, but are set via the nice system call. 140 - reserved for idle tasks. Signed-off-by: GeunSik Lim Acked-by: Steven Rostedt Signed-off-by: Peter Zijlstra LKML-Reference: Signed-off-by: Ingo Molnar commit 012b84dae17126d8b5d159173091eb3db5a2bc43 Author: Ingo Molnar Date: Sun May 17 11:08:41 2009 +0200 perf_counter: Robustify counter-free logic This fixes a nasty crash and highlights a bug that we were freeing failed-fork() counters incorrectly. (the fix for that will come separately) [ Impact: fix crashes/lockups with inherited counters ] Acked-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 3f4dee227348daac32f36daad9a91059efd0723e Author: Ingo Molnar Date: Fri May 29 11:25:09 2009 +0200 perf_counter: Fix cpuctx->task_ctx races Peter noticed that we are sometimes reading cpuctx->task_ctx with interrupts enabled. Noticed-by: Peter Zijlstra Acked-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 88f3907f6f447899544beadf491dccb32015dacb Author: FUJITA Tomonori Date: Wed May 27 09:43:03 2009 +0900 dma-debug: fix debug_dma_sync_sg_for_cpu and debug_dma_sync_sg_for_device DMA-mapping.txt says that debug_dma_sync_sg family must be called with the _same_ one you passed into the dma_map_sg call, it should _NOT_ be the 'count' value _returned_ from the dma_map_sg call. debug_dma_sync_sg_for_cpu and debug_dma_sync_sg_for_device can't handle this properly; they need to use the sg_mapped_ents in struct dma_debug_entry as debug_dma_unmap_sg() does. Signed-off-by: FUJITA Tomonori Signed-off-by: Joerg Roedel commit 884d05970bfbc3db368f23460dc4ce63257f240d Author: FUJITA Tomonori Date: Wed May 27 09:43:02 2009 +0900 dma-debug: use sg_dma_len accessor debug_dma_map_sg() and debug_dma_unmap_sg() use length in struct scatterlist while debug_dma_sync_sg_for_cpu() and debug_dma_sync_sg_for_device() use dma_length. This causes bugs warnings on some IOMMU implementations since these values are not same; the length doesn't represent the dma length. We always need to use sg_dma_len() accessor to get the dma length of a scatterlist entry. Signed-off-by: FUJITA Tomonori Signed-off-by: Joerg Roedel commit 15aedea439c4d7dbec17c99b5e1594c01b979833 Author: FUJITA Tomonori Date: Wed May 27 09:43:01 2009 +0900 dma-debug: use sg_dma_address accessor instead of using dma_address directly Architectures might not have dma_address in struct scatterlist (PARISC doesn't). Directly accessing to dma_address in struct scatterlist is wrong; we need to use sg_dma_address() accesssor instead. Signed-off-by: FUJITA Tomonori Signed-off-by: Joerg Roedel commit 16a30fbb0d3aa4ee829a2dd3d0e314e2b5ae96a9 Author: Peter Ujfalusi Date: Fri May 29 09:22:37 2009 +0300 ASoC: TWL4030: Use reg_cache in twl4030_init_chip Use the codec->reg_cache instead of the array directly in twl4030_init_chip for setting the default values. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 0528c7494e67c30329d086df141d2dd691f01556 Author: Michal Marek Date: Tue May 26 17:07:52 2009 +0200 ALSA: clean up the logic for building sequencer modules Instead of mangling the CONFIG_* variables in the makefiles over and over, set a few helper variables in Kconfig. Signed-off-by: Michal Marek Signed-off-by: Takashi Iwai commit a4444da31ec92f89cd6923579c20a9c240439cfc Author: Jaroslav Kysela Date: Thu May 28 12:31:56 2009 +0200 ALSA: PCM midlevel: lower jiffies check margin using runtime->delay value When hardware has large FIFO, it is necessary to lower jiffies margin by count of queued samples. Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai commit 13f040f9e55d41e92e485389123654971e03b819 Author: Jaroslav Kysela Date: Thu May 28 11:31:20 2009 +0200 ALSA: PCM midlevel: Do not update hw_ptr_jiffies when hw_ptr is not changed Some hardware might have bigger FIFOs and DMA pointer value will be updated in large chunks. Do not update hw_ptr_jiffies and position timestamp when hw_ptr value was not changed. Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai commit c62a01ad6e746fae9c93f51ea67e0abfd8d94b58 Author: Jaroslav Kysela Date: Thu May 28 11:21:52 2009 +0200 ALSA: PCM midlevel: introduce mask for xrun_debug() macro For debugging purposes, it is better to separate actions. Bit-values: 1: show bad PCM ring buffer pointer 2: show also stack (to debug kernel latency issues) 4: check pointer against system jiffies Example: 5: show bad PCM ring buffer pointer and do jiffies check Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai commit 8bea869c5e56234990e6bad92a543437115bfc18 Author: Jaroslav Kysela Date: Mon Apr 27 09:44:40 2009 +0200 ALSA: PCM midlevel: improve fifo_size handling Move the fifo_size assignment to hw->ioctl callback to allow lowlevel drivers overwrite the default behaviour. fifo_size is in frames not bytes as specified in asound.h and alsa-lib's documentation, but most hardware have fixed byte based FIFOs. Introduce internal SNDRV_PCM_INFO_FIFO_IN_FRAMES. Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai commit e93721a70263afefbac781f575bfe851c6f95d84 Merge: ae1ec5e c87d973 Author: Takashi Iwai Date: Fri May 29 11:46:10 2009 +0200 Merge branch 'fix/pcm-jiffies-check' into topic/pcm-jiffies-check commit ad3a37de81c45f6c20d410ece86004b98f7b6d84 Author: Paul Mackerras Date: Fri May 29 16:06:20 2009 +1000 perf_counter: Don't swap contexts containing locked mutex Peter Zijlstra pointed out that under some circumstances, we can take the mutex in a context or a counter and then swap that context or counter to another task, potentially leading to lock order inversions or the mutexes not protecting what they are supposed to protect. This fixes the problem by making sure that we never take a mutex in a context or counter which could get swapped to another task. Most of the cases where we take a mutex is on a top-level counter or context, i.e. a counter which has an fd associated with it or a context that contains such a counter. This adds WARN_ON_ONCE statements to verify that. The two cases where we need to take the mutex on a context that is a clone of another are in perf_counter_exit_task and perf_counter_init_task. The perf_counter_exit_task case is solved by uncloning the context before starting to remove the counters from it. The perf_counter_init_task is a little trickier; we temporarily disable context swapping for the parent (forking) task by setting its ctx->parent_gen to the all-1s value after locking the context, if it is a cloned context, and restore the ctx->parent_gen value at the end if the context didn't get uncloned in the meantime. This also moves the increment of the context generation count to be within the same critical section, protected by the context mutex, that adds the new counter to the context. That way, taking the mutex is sufficient to ensure that both the counter list and the generation count are stable. [ Impact: fix hangs, races with inherited and PID counters ] Signed-off-by: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <18975.31580.520676.619896@drongo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit be1ac0d81d0e3ab655f8c8ade31fb860ef6aa186 Author: Ingo Molnar Date: Fri May 29 09:10:54 2009 +0200 perf_counter tools: Also display time-normalized stat results Add new column that normalizes counter results by 'nanoseconds spent running' unit. Before: Performance counter stats for '/home/mingo/hackbench': 10469.403605 task clock ticks (msecs) 75502 context switches (events) 9501 CPU migrations (events) 36158 pagefaults (events) 31975676185 CPU cycles (events) 26257738659 instructions (events) 108740581 cache references (events) 54606088 cache misses (events) Wall-clock time elapsed: 810.514504 msecs After: Performance counter stats for '/home/mingo/hackbench': 10469.403605 task clock ticks (msecs) 75502 context switches # 0.007 M/sec 9501 CPU migrations # 0.001 M/sec 36158 pagefaults # 0.003 M/sec 31975676185 CPU cycles # 3054.202 M/sec 26257738659 instructions # 2508.045 M/sec 108740581 cache references # 10.387 M/sec 54606088 cache misses # 5.216 M/sec Wall-clock time elapsed: 810.514504 msecs The advantage of that column is that it is characteristic of the execution workflow, regardless of runtime. Hence 'hackbench 10' will look similar to 'hackbench 15' - while the absolute counter values are very different. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 2996f5ddb7ba8889caeeac65edafe48845106eaa Author: Ingo Molnar Date: Fri May 29 09:10:54 2009 +0200 perf_counter tools: Split display into reading and printing We introduce the extra pass to allow the print-out to possibly rely on already read counters. [ Impact: cleanup ] Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit c04f5e5d7b523f90ee3cdd70a68c4002aaecd3fa Author: Ingo Molnar Date: Fri May 29 09:10:54 2009 +0200 perf_counter tools: Clean up builtin-stat.c's do_perfstat() [ Impact: cleanup ] Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit c323d95fa4dbe0b6bf6d59e24a0b7db067dd08a7 Author: Yong Wang Date: Fri May 29 13:28:35 2009 +0800 perf_counter/x86: Always use NMI for performance-monitoring interrupt Always use NMI for performance-monitoring interrupt as there could be racy situations if we switch between irq and nmi mode frequently. Signed-off-by: Yong Wang LKML-Reference: <20090529052835.GA13657@ywang-moblin2.bj.intel.com> Signed-off-by: Ingo Molnar commit da417a7537cbf4beb28a08a49adf915f2358040c Author: Mike Galbraith Date: Fri May 29 08:23:16 2009 +0200 perf_counter tools: Fix top symbol table max_ip typo Signed-off-by: Mike Galbraith Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit a3ec8d70f1a55acccc4874fe9b4dadbbb9454a0f Author: Mike Galbraith Date: Fri May 29 06:46:46 2009 +0200 perf_counter tools: Fix top symbol table dump typo Signed-off-by: Mike Galbraith Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit e9ab33d03eb721a632214c0bbaa18652de88aa2d Author: Jaroslav Kysela Date: Thu May 28 14:20:00 2009 +0200 ALSA: au88x0: fix wrong period_elapsed() call The period_elapsed() call should be called when position moves. The idea was taken from ALSA bug#4455. Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai commit 3fd43858c7937801134bd70ef1d411e44f9c0c1c Author: Jaroslav Kysela Date: Thu May 28 14:12:27 2009 +0200 ALSA: au88x0: fix .pointer callback Appearently, the used mask in the .pointer callback is invalid. It should be in period_bytes range. The period_bytes is pow(2), so simple bitwise operation is used. Idea was taken from ALSA bug#4455. Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai commit 9e09675366695405412b709e91709c1ce2925c90 Author: Mike Galbraith Date: Thu May 28 16:25:34 2009 +0200 perf_counter tools: Document '--' option parsing terminator Signed-off-by: Mike Galbraith Cc: Peter Zijlstra LKML-Reference: Signed-off-by: Ingo Molnar commit de04687f868bf98e4ef644af91ed85a3bc212ce8 Author: Arnaldo Carvalho de Melo Date: Thu May 28 14:55:41 2009 -0300 perf_counter tools: Convert builtin-top to use libperf symbol routines Now both perf top and report use the same routines. Signed-off-by: Arnaldo Carvalho de Melo Cc: Paul Mackerras Cc: Mike Galbraith Cc: Steven Rostedt Cc: Peter Zijlstra LKML-Reference: <20090528175541.GG4747@ghostprotocols.net> Signed-off-by: Ingo Molnar commit 69ee69f63c82e63d9c6c6081d12673af4933c51e Author: Arnaldo Carvalho de Melo Date: Thu May 28 14:55:26 2009 -0300 perf_counter tools: Optionally pass a symbol filter to the dso load routines Will be used by perf top. Signed-off-by: Arnaldo Carvalho de Melo Cc: Paul Mackerras Cc: Mike Galbraith Cc: Steven Rostedt Cc: Peter Zijlstra LKML-Reference: <20090528175526.GF4747@ghostprotocols.net> Signed-off-by: Ingo Molnar commit a827c875f2ebe69c6e6db5e7f112d4beb4d80f01 Author: Arnaldo Carvalho de Melo Date: Thu May 28 14:55:19 2009 -0300 perf_counter tools: Consolidate dso methods to load kernel symbols Now one has just to use dso__load_kernel() optionally passing a vmlinux filename. Will make things easier for perf top that will want to pass a callback to filter some symbols. Signed-off-by: Arnaldo Carvalho de Melo Cc: Paul Mackerras Cc: Mike Galbraith Cc: Steven Rostedt Cc: Peter Zijlstra Signed-off-by: Ingo Molnar commit 0085c954140d27937ada29d139c16341075d45e4 Author: Arnaldo Carvalho de Melo Date: Thu May 28 14:55:13 2009 -0300 perf_counter tools: struct symbol priv area When creating a dso instance allow asking that all symbols in this dso have a private area just before the symbol. perf top will use this for its counters, etc. Signed-off-by: Arnaldo Carvalho de Melo Cc: Paul Mackerras Cc: Mike Galbraith Cc: Steven Rostedt Cc: Peter Zijlstra LKML-Reference: <20090528175513.GD4747@ghostprotocols.net> Signed-off-by: Ingo Molnar commit a2928c42a5d69328c3578b41bd4d72f6658cf7dc Author: Arnaldo Carvalho de Melo Date: Thu May 28 14:55:04 2009 -0300 perf_counter tools: Move symbol resolution classes from report to libperf Will be used by perf top as well. Signed-off-by: Arnaldo Carvalho de Melo Cc: Paul Mackerras Cc: Mike Galbraith Cc: Steven Rostedt Cc: Peter Zijlstra LKML-Reference: <20090528175504.GC4747@ghostprotocols.net> Signed-off-by: Ingo Molnar commit b96d31a62f714566fa6420851b3bb3615c796322 Author: Christoph Hellwig Date: Wed May 27 09:37:33 2009 -0400 cifs: clean up set_cifs_acl interfaces Signed-off-by: Christoph Hellwig Reviewed-by: Shirish Pargaonkar Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 203350c1a8e23adf17fd9a96d8bfc7adf63c1ff6 Author: Mark Brown Date: Thu May 28 14:51:00 2009 +0100 ASoC: Initialise dev for the dummy S/PDIF DAI Also include the header to make sure the DAI is prototyped. Signed-off-by: Mark Brown commit 1bf4072da67c14d6b02cfeef02212aa5a6211df2 Author: Christoph Hellwig Date: Wed May 27 09:37:33 2009 -0400 cifs: reorganize get_cifs_acl Thus spake Christoph: "But this whole set_cifs_acl function is a real mess anyway and needs some splitting up." With this change too, it's possible to call acl_to_uid_mode() with a NULL inode pointer. That (or something close to it) will eventually be necessary when cifs_get_inode_info is reorganized. Signed-off-by: Christoph Hellwig Reviewed-by: Shirish Pargaonkar Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 38736072d45488fd45f076388b6570419bbbc682 Author: H. Peter Anvin Date: Thu May 28 10:05:33 2009 -0700 x86, mce: drop "extern" from function prototypes in asm/mce.h Function prototypes don't need to be prefixed by "extern". [ Impact: cleanup ] Signed-off-by: H. Peter Anvin commit cd13adcc823aa421efa4efd995fa7004a58cf38d Author: Hidetoshi Seto Date: Wed May 27 16:57:31 2009 +0900 x86: trivial clean up for arch/x86/Kconfig Use tab. Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit eb2a6ab729ac40a553797703a5a5dba3a74de004 Author: Andi Kleen Date: Tue Apr 28 23:32:56 2009 +0200 x86: trivial clean up for irq_vectors.h Fix a wrong comment. Signed-off-by: Hidetoshi Seto Cc: Andi Kleen Signed-off-by: H. Peter Anvin commit 98a9c8c3ba13dfc3df8e6d2a126d2fa4e4621e9c Author: Hidetoshi Seto Date: Thu May 28 11:41:01 2009 +0900 x86, mce: trivial clean up for mce-inject.c Fix for: WARNING: Use #include instead of +#include WARNING: usage of NR_CPUS is often wrong - consider using cpu_possible(), num_possible_cpus(), for_each_possible_cpu(), etc + if (m.cpu >= NR_CPUS || !cpu_online(m.cpu)) ERROR: trailing whitespace +/* $ Signed-off-by: Hidetoshi Seto Cc: Andi Kleen Signed-off-by: H. Peter Anvin commit 61a021a0700c22ee527d73d92f9acb109ff478f8 Author: Hidetoshi Seto Date: Tue Apr 14 17:09:04 2009 +0900 x86, mce: trivial clean up for mce_intel_64.c Fix for: WARNING: space prohibited between function name and open parenthesis '(' + for_each_online_cpu (cpu) { Signed-off-by: Hidetoshi Seto Cc: Andi Kleen Signed-off-by: H. Peter Anvin commit 34fa1967aa0827776e37feb5666df0327575a0f2 Author: Hidetoshi Seto Date: Wed Apr 8 12:31:18 2009 +0200 x86, mce: trivial clean up for mce_amd_64.c Fix for followings: WARNING: Use #include instead of +#include ERROR: Macros with multiple statements should be enclosed in a do - while loop +#define THRESHOLD_ATTR(_name, _mode, _show, _store) \ +{ \ + .attr = {.name = __stringify(_name), .mode = _mode }, \ + .show = _show, \ + .store = _store, \ +}; WARNING: usage of NR_CPUS is often wrong - consider using cpu_possible(), num_possible_cpus(), for_each_possible_cpu(), etc + if (cpu >= NR_CPUS) Signed-off-by: Hidetoshi Seto Cc: Andi Kleen Signed-off-by: H. Peter Anvin commit 14a02530e2239f753a0f3f089847e723adbdaa47 Author: Hidetoshi Seto Date: Thu Apr 30 16:04:51 2009 +0900 x86, mce: trivial clean up for mce.c This fixs following checkpatch warnings: WARNING: Use #include instead of +#include WARNING: Use #include instead of +#include WARNING: line over 80 characters + set_bit(MCE_OVERFLOW, (unsigned long *)&mcelog.flags); WARNING: braces {} are not necessary for any arm of this statement + if (mce_notify_user()) { [...] + } else { [...] Signed-off-by: Hidetoshi Seto Cc: Andi Kleen Signed-off-by: H. Peter Anvin commit cc3aec52ab8e013984270a79d1aa51f691d239b0 Author: Hidetoshi Seto Date: Thu Apr 30 15:58:22 2009 +0900 x86, mce: trivial clean up for therm_throt.c This patch removes following checkpatch warning: WARNING: Use #include instead of +#include Signed-off-by: Hidetoshi Seto Cc: Andi Kleen Signed-off-by: H. Peter Anvin commit 9319cec8c185e84fc5281afb6ac5d4c47a234841 Author: Hidetoshi Seto Date: Tue Apr 14 17:26:30 2009 +0900 x86, mce: use strict_strtoull Use strict_strtoull instead of simple_strtoull. Signed-off-by: Hidetoshi Seto Cc: Andi Kleen Signed-off-by: H. Peter Anvin commit 8780e8e0f6b34862cdf2c62d4d2674d6bc3207db Author: Andi Kleen Date: Wed May 27 21:56:56 2009 +0200 x86, mce: improve documentation Document that check_interval set to 0 means no polling. Noticed by Hidetoshi Seto Also add a reference from boot options to the sysfs tunables Acked-by: Hidetoshi Seto Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit b170204ddb7844ffff62d2d537b20c0eeb97725e Author: Andi Kleen Date: Wed May 27 21:56:54 2009 +0200 x86, mce: drop BKL in mce_open BKL is not needed for anything in mce_open because it has an own spinlock. Remove it. [ Impact: cleanup ] Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 32561696c23028596f24b353d98f2e23b58f91f7 Author: Andi Kleen Date: Wed May 27 21:56:53 2009 +0200 x86, mce: rename and align out2 label There's only a single out path in do_machine_check now, so rename the label from out2 to out. Also align it at the first column. [ Impact: minor cleanup, no functional changes ] Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 8be9110569aec1f65d86b08aef7ec49659137bf9 Author: Thomas Gleixner Date: Wed May 27 21:56:53 2009 +0200 x86, mce: remove mce_init unused argument Remove unused mce_init argument. [ Impact: cleanup ] Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit fc016a49c2d92f2efbe22c1fb66eb7a5d2a06ed1 Author: Andi Kleen Date: Wed May 27 21:56:53 2009 +0200 x86, mce: remove unused mce_events variable Remove unused mce_events static variable. [ Impact: cleanup ] Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit b56f642d2bf8c1f7c6499c1e55b23311a33cc796 Author: Andi Kleen Date: Wed May 27 21:56:52 2009 +0200 x86, mce: use extended sysattrs for the check_interval attribute. Instead of using own callbacks use the generic ones provided by the sysdev later. This finally allows to get rid of the ugly ACCESSOR macros. Should also save some text size. [ Impact: cleanup ] Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 88921be30296e126896ee4d30758f989d1c4ddfb Author: Andi Kleen Date: Wed May 27 21:56:51 2009 +0200 x86, mce: synchronize core after machine check handling The example code in the IA32 SDM recommends to synchronize the CPU after machine check handling. So do that here. [ Impact: Spec compliance ] Signed-off-by: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 5706001aacba5d3db5f224ca135e5e91a30be39c Author: H. Peter Anvin Date: Mon May 25 22:18:17 2009 -0700 x86, mce: fix comment style in mce-inject.c Fix style of winged comment in mce-inject.c. [ Impact: comment only ] Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit a1ff41bfc1bb7a6d19cf958f89a9b539678781e5 Author: H. Peter Anvin Date: Mon May 25 22:16:14 2009 -0700 x86, mce: add comment about mce_chrdev_ops being writable Add a comment explaining that mce_chrdev_ops is intentionally writable. [ Impact: comment only ] Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit ea149b36c7f511d17dd89fee734cb09778a91fa0 Author: Andi Kleen Date: Wed Apr 29 19:31:00 2009 +0200 x86, mce: add basic error injection infrastructure Allow user programs to write mce records into /dev/mcelog. When they do that a fake machine check is triggered to test the machine check code. This uses the MCE MSR wrappers added earlier. The implementation is straight forward. There is a struct mce record per CPU and the MCE MSR accesses get data from there if there is valid data injected there. This allows to test the machine check code relatively realistically because only the lowest layer of hardware access is intercepted. The test suite and injector are available at git://git.kernel.org/pub/scm/utils/cpu/mce/mce-test.git git://git.kernel.org/pub/scm/utils/cpu/mce/mce-inject.git Signed-off-by: Andi Kleen Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 5f8c1a54cab6f449fe04d42d0661bc796fa4e73e Author: Andi Kleen Date: Wed Apr 29 19:29:12 2009 +0200 x86, mce: add MSR read wrappers for easier error injection This will be used by future patches to allow machine check error injection. Right now it's a nop, except for adding some wrappers around the MSR reads. This is early in the sequence to avoid too many conflicts. Signed-off-by: Andi Kleen Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit a9862e0560866eadbc59b84867492004da436516 Author: Andi Kleen Date: Tue May 19 22:49:07 2009 +0200 Export add_timer_on for modules Needed in followon patch. Signed-off-by: Andi Kleen Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 172d899db4bf0beb7766d583379e5ed552130e4a Author: Andi Kleen Date: Tue Apr 28 23:37:02 2009 +0200 x86, mce: document new 32bit mcelog requirement in Documentation/Changes Signed-off-by: Andi Kleen Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit de5619dfef76ddb403eb7c6de39c0130166c5dc3 Author: Andi Kleen Date: Tue Apr 28 23:34:40 2009 +0200 x86, mce: enable MCE_AMD for 32bit NEW_MCE That's very easy using the infrastructure enabled earlier for MCE_INTEL Untested. Signed-off-by: Andi Kleen Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 7856f6cce4a8cda8c1f94b99605c07d16b8d8dec Author: Andi Kleen Date: Tue Apr 28 23:32:56 2009 +0200 x86, mce: enable MCE_INTEL for 32bit new MCE Enable the 64bit MCE_INTEL code (CMCI, thermal interrupts) for 32bit NEW_MCE. Signed-off-by: Andi Kleen Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 45f458e9a8a216b02b76fe61d9e8bc40d659fbe8 Author: Andi Kleen Date: Tue Apr 28 23:18:26 2009 +0200 x86, mce: deprecate old 32bit machine check code Schedule for removal in 2.6.32 Signed-off-by: Andi Kleen Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 4efc0670baf4b14bc95502e54a83ccf639146125 Author: Andi Kleen Date: Tue Apr 28 19:07:31 2009 +0200 x86, mce: use 64bit machine check code on 32bit The 64bit machine check code is in many ways much better than the 32bit machine check code: it is more specification compliant, is cleaner, only has a single code base versus one per CPU, has better infrastructure for recovery, has a cleaner way to communicate with user space etc. etc. Use the 64bit code for 32bit too. This is the second attempt to do this. There was one a couple of years ago to unify this code for 32bit and 64bit. Back then this ran into some trouble with K7s and was reverted. I believe this time the K7 problems (and some others) are addressed. I went over the old handlers and was very careful to retain all quirks. But of course this needs a lot of testing on old systems. On newer 64bit capable systems I don't expect much problems because they have been already tested with the 64bit kernel. I made this a CONFIG for now that still allows to select the old machine check code. This is mostly to make testing easier, if someone runs into a problem we can ask them to try with the CONFIG switched. The new code is default y for more coverage. Once there is confidence the 64bit code works well on older hardware too the CONFIG_X86_OLD_MCE and the associated code can be easily removed. This causes a behaviour change for 32bit installations. They now have to install the mcelog package to be able to log corrected machine checks. The 64bit machine check code only handles CPUs which support the standard Intel machine check architecture described in the IA32 SDM. The 32bit code has special support for some older CPUs which have non standard machine check architectures, in particular WinChip C3 and Intel P5. I made those a separate CONFIG option and kept them for now. The WinChip variant could be probably removed without too much pain, it doesn't really do anything interesting. P5 is also disabled by default (like it was before) because many motherboards have it miswired, but according to Alan Cox a few embedded setups use that one. Forward ported/heavily changed version of old patch, original patch included review/fixes from Thomas Gleixner, Bert Wesarg. Signed-off-by: Andi Kleen Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit d896a940ef4f12a0a6bc432853b249dcfbacabf0 Author: Andi Kleen Date: Tue Apr 28 14:25:18 2009 +0200 x86, mce: remove oops_begin() use in 64bit machine check First 32bit doesn't have oops_begin, so it's a barrier of using this code on 32bit. On closer examination it turns out oops_begin is not a good idea in a machine check panic anyways. All oops_begin does it so check for recursive/parallel oopses and implement the "wait on oops" heuristic. But there's actually no good reason to lock machine checks against oopses or prevent them from recursion. Also "wait on oops" does not really make sense for a machine check too. Replace it with a manual bust_spinlocks/console_verbose. Signed-off-by: Andi Kleen Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 8e97aef5f43ec715f394bc15015ff263b80c3ad6 Author: Andi Kleen Date: Tue Apr 28 14:23:18 2009 +0200 x86, mce: remove machine check handler idle notify on 64bit i386 has no idle notifiers, but the 64bit machine check code uses them to wake up mcelog from a fatal machine check exception. For corrected machine checks found by the poller or threshold interrupts going through an idle notifier is not needed because the wake_up can is just done directly and doesn't need the idle notifier. It is only needed for logging exceptions. To be honest I never liked the idle notifier even though I signed off on it. On closer investigation the code actually turned out to be nearly. Right now machine check exceptions on x86 are always unrecoverable (lead to panic due to PCC), which means we never execute the idle notifier path. The only exception is the somewhat weird tolerant==3 case, which ignores PCC. I'll fix this in a future patch in a much cleaner way. So remove the "mcelog wakeup through idle notifier" code from 64bit. This allows to compile the 64bit machine check handler on 32bit which doesn't have idle notifiers. Signed-off-by: Andi Kleen Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit d7c3c9a609563868d8a70e220399d06a25aba095 Author: Andi Kleen Date: Tue Apr 28 23:07:25 2009 +0200 x86, mce: move mce_disabled option into common 32bit/64bit code It's the same function, so let's share it. Signed-off-by: Andi Kleen Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 04b2b1a4df6cd0fdaa598f3c623a19c2d93cb48a Author: Andi Kleen Date: Tue Apr 28 22:50:19 2009 +0200 x86, mce: rename 64bit mce_dont_init to mce_disabled Give it the same name as on 32bit. This makes further merging easier. Signed-off-by: Andi Kleen Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 5d7279268b654d1f8ac43b0eb6cd9598d9cf55fd Author: Andi Kleen Date: Mon Apr 27 19:25:48 2009 +0200 x86, mce: use a call vector to call the 64bit mce handler Allows to call different machine check handlers from the low level machine check entry vector. This is needed for later when it will be used for 32bit too. Signed-off-by: Andi Kleen Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 2e6f694fde0a7158590e121962ca2e3c06633528 Author: Andi Kleen Date: Mon Apr 27 18:42:48 2009 +0200 x86, mce: port K7 bank 0 quirk to 64bit mce code Various K7 have broken bank 0s. Don't enable it by default Port from the 32bit code. Signed-off-by: Andi Kleen Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 06b7a7a5ec917761969444fee967c43868a76468 Author: Andi Kleen Date: Mon Apr 27 18:37:43 2009 +0200 x86, mce: implement the PPro bank 0 quirk in the 64bit machine check code Quoting the comment: * SDM documents that on family 6 bank 0 should not be written * because it aliases to another special BIOS controlled * register. * But it's not aliased anymore on model 0x1a+ * Don't ignore bank 0 completely because there could be a valid * event later, merely don't write CTL0. This is mostly a port on the 32bit code, except that 32bit always didn't write it and didn't have the 0x1a heuristic. I checked with the CPU designers that the quirk is not required starting with this model. Signed-off-by: Andi Kleen Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 3cde5c8c839bf46a7be799ed0e1d0b4780aaf794 Author: Andi Kleen Date: Mon Apr 27 18:01:31 2009 +0200 x86, mce: initial steps to make 64bit mce code 32bit clean Replace unsigned long with u64s if they need to contain 64bit values. Signed-off-by: Andi Kleen Signed-off-by: H. Peter Anvin Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 01c6680a547a3ee8dd170c269ea8e037b3191b71 Author: Thomas Gleixner Date: Wed Apr 8 12:31:24 2009 +0200 x86, mce: Cleanup MCG definitions Decode more magic constants and turn them into symbols. [ Sort definitions bitwise, introduce MCG_EXT_CNT - HS ] Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit ba2d0f2b0c56d7174a0208f7c463271f39040728 Author: Thomas Gleixner Date: Wed Apr 8 12:31:24 2009 +0200 x86, mce: Cleanup symbols in intel thermal codes Decode magic constants and turn them into symbols. [ Cleanup to use symbols already exists - HS ] [ Impact: cleanup ] Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit b659294b779565c60f5e12ef505328e2b974eb62 Author: Ingo Molnar Date: Wed Apr 8 12:31:27 2009 +0200 x86, mce: print number of MCE banks The number of MCE banks supported by a CPU is a useful number to know, so print it out during CPU initialization. [ Impact: add printout ] Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit cb491fca55e5282f0a95ef39c55352e00d6ca75e Author: Ingo Molnar Date: Wed Apr 8 12:31:17 2009 +0200 x86, mce: Rename sysfs variables Shorten variable names. This also compacts the code a bit. device_mce => mce_dev mce_device_initialized => mce_dev_initialized mce_attribute => mce_attrs [ Impact: cleanup ] Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit dba3725d44f5dfb5711fd509fca10b5b828c43b7 Author: Ingo Molnar Date: Wed Apr 8 12:31:26 2009 +0200 x86, mce: unify move mce_64.c => mce.c and glue it up in the Makefile. Remove mce_32.c Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 711c2e481c9d1113650d09de10f61ee88ab56fda Author: Ingo Molnar Date: Wed Apr 8 12:31:26 2009 +0200 x86, mce: unify, prepare for 32-bit v2 Prepare the 64-bit mce_64.c code side to be built on 32-bit. [ includes ifdef relocation by Andi Kleen ] Signed-off-by: Ingo Molnar Cc: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit a988d334ae8213c0e0e62327222f6e5e6e52bcf1 Author: Ingo Molnar Date: Wed Apr 8 12:31:25 2009 +0200 x86, mce: unify, prepare codes Move current 32-bit mce_32.c code into mce_64.c. [ Remove unused artifact stop/restart_mce pointed by Andi Kleen ] Signed-off-by: Ingo Molnar Cc: Andi Kleen Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 06b851d98266b812b2fa23d007cdf53f41194bbb Author: Ingo Molnar Date: Wed Apr 8 12:31:25 2009 +0200 x86, mce: unify, prepare 64bit in mce.h Prepare mce.h for unification, so that it will build on 32-bit x86 kernels too. [ Impact: cleanup ] Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit a65d086235208a3b3546e209d2210048549099b2 Author: Thomas Gleixner Date: Wed Apr 8 12:31:23 2009 +0200 x86, mce: unify Intel thermal init Mechanic unification. No change in code. [ Impact: cleanup, 32-bit / 64-bit unification ] Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 6cc6f3ebd19fea722c19630af5ad68af7f51d493 Author: Thomas Gleixner Date: Wed Apr 8 12:31:23 2009 +0200 x86, mce: unify Intel thermal init, prepare Prepare for unification, make two intel_init_thermal equal. [ Impact: cleanup ] Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 1cb2a8e1767ab60370ecce90654c0f281c602d95 Author: Ingo Molnar Date: Wed Apr 8 12:31:18 2009 +0200 x86, mce: clean up mce_amd_64.c Make the coding style match that of the rest of the x86 arch code. [ Impact: cleanup ] Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit cb6f3c155b0afabc48667efb9e7b1ce92ccfcab4 Author: Ingo Molnar Date: Wed Apr 8 12:31:19 2009 +0200 x86, mce: clean up therm_throt.c Make the coding style match that of the rest of the x86 arch code. [ Impact: cleanup ] Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit bdbfbdd5e8f0efb9bfef2e597f8ac673c36317ab Author: Ingo Molnar Date: Wed Apr 8 12:31:20 2009 +0200 x86, mce: clean up non-fatal.c Make the coding style match that of the rest of the x86 arch code. [ Impact: cleanup ] Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 91425084f74c0ad087b3fb6bdad79a825f952720 Author: Ingo Molnar Date: Wed Apr 8 12:31:22 2009 +0200 x86, mce: clean up winchip.c Make the coding style match that of the rest of the x86 arch code. [ Impact: cleanup ] Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit efee4ca80980f97b60e91e3322c3342f19623eff Author: Ingo Molnar Date: Wed Apr 8 12:31:20 2009 +0200 x86, mce: clean up k7.c Make the coding style match that of the rest of the x86 arch code. [ Impact: cleanup ] Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit ea2566ff80e096eeecc0918fb5d5a4612d8f62ef Author: Ingo Molnar Date: Wed Apr 8 12:31:19 2009 +0200 x86, mce: clean up p6.c Make the coding style match that of the rest of the x86 arch code. [ Impact: cleanup ] Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit ed8bc7ed9a2ad875617b24d2ba09e49ee886638c Author: Ingo Molnar Date: Wed Apr 8 12:31:21 2009 +0200 x86, mce: clean up p5.c Make the coding style match that of the rest of the x86 arch code. [ Impact: cleanup ] Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit c5aaf0e0702513637278ca4e27a156caa9392817 Author: Ingo Molnar Date: Wed Apr 8 12:31:18 2009 +0200 x86, mce: clean up p4.c Make the coding style match that of the rest of the x86 arch code. [ Impact: cleanup ] Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 3b58dfd04bdfa52e717ead8f3c7622610eb7f950 Author: Ingo Molnar Date: Wed Apr 8 12:31:21 2009 +0200 x86, mce: clean up mce_32.c Make the coding style match that of the rest of the x86 arch code. [ Impact: cleanup ] Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit e9eee03e99d519599eb615c3e251d5f6cc4be57d Author: Ingo Molnar Date: Wed Apr 8 12:31:17 2009 +0200 x86, mce: clean up mce_64.c This file has been modified many times along the years, by multiple authors, so the general style and structure has diverged in a number of areas making this file hard to read. So fix the coding style match that of the rest of the x86 arch code. [ Impact: cleanup ] Signed-off-by: Ingo Molnar Signed-off-by: Hidetoshi Seto Signed-off-by: H. Peter Anvin commit 13503fa9137d9708d52214e9506c671dbf2fbdce Author: Hidetoshi Seto Date: Thu Mar 26 17:39:20 2009 +0900 x86, mce: Cleanup param parser - Fix the comment formatting. - The error path does not return 0, and printk lacks level and "\n". - Move __setup("nomce") next to mcheck_disable(). - Improve readability etc. [ Impact: cleanup ] Signed-off-by: Hidetoshi Seto Acked-by: Andi Kleen LKML-Reference: <49CB3F38.7090703@jp.fujitsu.com> Signed-off-by: Ingo Molnar Signed-off-by: H. Peter Anvin commit 83cce2b69eaa4bc7535f98f75b79397baf277470 Merge: c1eee67 2e8b569 736501e 47bccd6 Author: Joerg Roedel Date: Thu May 28 18:23:56 2009 +0200 Merge branches 'amd-iommu/fixes', 'amd-iommu/debug', 'amd-iommu/suspend-resume' and 'amd-iommu/extended-allocator' into amd-iommu/2.6.31 Conflicts: arch/x86/kernel/amd_iommu.c arch/x86/kernel/amd_iommu_init.c commit 47bccd6bb2b866449d3ecf2ba350ac1c7473b2b8 Author: Joerg Roedel Date: Fri May 22 12:40:54 2009 +0200 amd-iommu: don't free dma adresses below 512MB with CONFIG_IOMMU_STRESS This will test the automatic aperture enlargement code. This is important because only very few devices will ever trigger this code path. So force it under CONFIG_IOMMU_STRESS. Signed-off-by: Joerg Roedel commit f5e9705c6429d24dee832b2edd7f4848d432ea03 Author: Joerg Roedel Date: Fri May 22 12:31:53 2009 +0200 amd-iommu: don't preallocate page tables with CONFIG_IOMMU_STRESS This forces testing of on-demand page table allocation code. Signed-off-by: Joerg Roedel commit fe16f088a88fb73161bba8784375c829f7e87b54 Author: Joerg Roedel Date: Fri May 22 12:27:53 2009 +0200 amd-iommu: disable round-robin allocator for CONFIG_IOMMU_STRESS Disabling the round-robin allocator results in reusing the same dma-addresses again very fast. This is a good test if the iotlb flushing is working correctly. Signed-off-by: Joerg Roedel commit d9cfed925448f097ec7faab80d903eb7e5f99712 Author: Joerg Roedel Date: Tue May 19 12:16:29 2009 +0200 amd-iommu: remove amd_iommu_size kernel parameter This parameter is not longer necessary when aperture increases dynamically. Signed-off-by: Joerg Roedel commit 11b83888ae729457b5cfb936dbd498481f6408df Author: Joerg Roedel Date: Tue May 19 10:23:15 2009 +0200 amd-iommu: enlarge the aperture dynamically By dynamically increasing the aperture the extended allocator is now ready for use. Signed-off-by: Joerg Roedel commit 00cd122ae5e5e7c60cce2af3c35b190d4c3f2d0d Author: Joerg Roedel Date: Tue May 19 09:52:40 2009 +0200 amd-iommu: handle exlusion ranges and unity mappings in alloc_new_range This patch makes sure no reserved addresses are allocated in an dma_ops domain when the aperture is increased dynamically. Signed-off-by: Joerg Roedel commit 9cabe89b99773e682538a8809abc7d4000c77083 Author: Joerg Roedel Date: Mon May 18 16:38:55 2009 +0200 amd-iommu: move aperture_range allocation code to seperate function This patch prepares the dynamic increasement of dma_ops domain apertures. Signed-off-by: Joerg Roedel commit 803b8cb4d9a93b90c67aba2aab7f2c54d595b5b9 Author: Joerg Roedel Date: Mon May 18 15:32:48 2009 +0200 amd-iommu: change dma_dom->next_bit to dma_dom->next_address Simplify the code a little bit by using the same unit for all address space related state in the dma_ops domain structure. Signed-off-by: Joerg Roedel commit 384de72910a7bf96a02a6d8023fe9e16d872beb2 Author: Joerg Roedel Date: Fri May 15 12:30:05 2009 +0200 amd-iommu: make address allocator aware of multiple aperture ranges This patch changes the AMD IOMMU address allocator to allow up to 32 aperture ranges per dma_ops domain. Signed-off-by: Joerg Roedel commit 53812c115cda1f660b286c939669154a56976f6b Author: Joerg Roedel Date: Tue May 12 12:17:38 2009 +0200 amd-iommu: handle page table allocation failures in dma_ops code The code will be required when the aperture size increases dynamically in the extended address allocator. Signed-off-by: Joerg Roedel commit 8bda3092bcfa68f786d94549ae026e8db1eff041 Author: Joerg Roedel Date: Tue May 12 12:02:46 2009 +0200 amd-iommu: move page table allocation code to seperate function This patch makes page table allocation usable for dma_ops code. Signed-off-by: Joerg Roedel commit c3239567a20e90e3026ac5453d5267506ef7b030 Author: Joerg Roedel Date: Tue May 12 10:56:44 2009 +0200 amd-iommu: introduce aperture_range structure This is a preperation for extended address allocator. Signed-off-by: Joerg Roedel commit 736501ee000757082a4f0832826ae1eda7ea106e Author: Joerg Roedel Date: Tue May 12 09:56:12 2009 +0200 amd-iommu: implement suspend/resume This patch puts everything together and enables suspend/resume support in the AMD IOMMU driver. Signed-off-by: Joerg Roedel commit 05f92db9f47f852ff48bbed1b063b8ab8ad00285 Author: Joerg Roedel Date: Tue May 12 09:52:46 2009 +0200 amd_iommu: un __init functions required for suspend/resume This patch makes sure that no function required for suspend/resume of AMD IOMMU driver is thrown away after boot. Signed-off-by: Joerg Roedel commit 7d7a110c6127b7fc683dc6d764555f2dbd22b054 Author: Joerg Roedel Date: Tue May 5 15:48:10 2009 +0200 amd-iommu: add function to flush tlb for all devices This function is required for suspend/resume support with AMD IOMMU enabled. Signed-off-by: Joerg Roedel commit bfd1be1857e5a3385bf146e02e6dc3dd4241bec1 Author: Joerg Roedel Date: Tue May 5 15:33:57 2009 +0200 amd-iommu: add function to flush tlb for all domains This function is required for suspend/resume support with AMD IOMMU enabled. Signed-off-by: Joerg Roedel commit 92ac4320af6ed4294c2c221dd4ccbfd9026a3aa7 Author: Joerg Roedel Date: Tue May 19 19:06:27 2009 +0200 amd-iommu: add function to disable all iommus This function is required for suspend/resume support with AMD IOMMU enabled. Signed-off-by: Joerg Roedel commit d91cecdd796c27df46339e80ed436a980c56fcad Author: Joerg Roedel Date: Mon May 4 18:51:00 2009 +0200 amd-iommu: remove support for msi-x Current hardware uses msi instead of msi-x so this code it not necessary and can not be tested. The best thing is to drop this code. Signed-off-by: Joerg Roedel commit fab6afa30954a0684ef8ac1d9a606e74a6215ab6 Author: Joerg Roedel Date: Mon May 4 18:46:34 2009 +0200 amd-iommu: drop pointless iommu-loop in msi setup code It is not necessary to loop again over all IOMMUs in this code. So drop the loop. Signed-off-by: Joerg Roedel commit 58492e128892e3b55f1a6ef0cf3c3ab4ce7cc214 Author: Joerg Roedel Date: Mon May 4 18:41:16 2009 +0200 amd-iommu: consolidate hardware initialization to one function This patch restructures the AMD IOMMU initialization code to initialize all hardware registers with one single function call. This is helpful for suspend/resume support. Signed-off-by: Joerg Roedel commit 3bd221724adb9d642270df0e78b0105fb61e4a1c Author: Joerg Roedel Date: Mon May 4 15:06:20 2009 +0200 amd-iommu: introduce for_each_iommu* macros This patch introduces the for_each_iommu and for_each_iommu_safe macros to simplify the developers life when having to iterate over all AMD IOMMUs in the system. Signed-off-by: Joerg Roedel commit c1eee67b2d8464781f5868a34168df61e40e85a6 Author: Chris Wright Date: Thu May 21 00:56:58 2009 -0700 amd iommu: properly detach from protection domain on ->remove Some drivers may use the dma api during ->remove which will cause a protection domain to get reattached to a device. Delay the detach until after the driver is completely unbound. [ joro: added a little merge helper ] [ Impact: fix too early device<->domain removal ] Signed-off-by: Chris Wright Signed-off-by: Joerg Roedel commit 0bc252f430d6a3ac7836d40f00d0ae020593b11b Author: Joerg Roedel Date: Fri May 22 12:48:05 2009 +0200 amd-iommu: make sure only ivmd entries are parsed The bug never triggered. But it should be fixed to protect against broken ACPI tables in the future. [ Impact: protect against broken ivrs acpi table ] Signed-off-by: Joerg Roedel commit 7455aab1f95f6464c5af3fbdee28744e73f38564 Author: Neil Turton Date: Thu May 14 14:08:11 2009 +0100 amd-iommu: fix the handling of device aliases in the AMD IOMMU driver. The devid parameter to set_dev_entry_from_acpi is the requester ID rather than the device ID since it is used to index the IOMMU device table. The handling of IVHD_DEV_ALIAS used to pass the device ID. This patch fixes it to pass the requester ID. [ Impact: fix setting the wrong req-id in acpi-table parsing ] Signed-off-by: Neil Turton Signed-off-by: Joerg Roedel commit 421f909c803d1c397f6c66b75653f238696c39ee Author: Neil Turton Date: Thu May 14 14:00:35 2009 +0100 amd-iommu: fix an off-by-one error in the AMD IOMMU driver. The variable amd_iommu_last_bdf holds the maximum bdf of any device controlled by an IOMMU, so the number of device entries needed is amd_iommu_last_bdf+1. The function tbl_size used amd_iommu_last_bdf instead. This would be a problem if the last device were a large enough power of 2. [ Impact: fix amd_iommu_last_bdf off-by-one error ] Signed-off-by: Neil Turton Signed-off-by: Joerg Roedel commit 2e8b569614b89c9b1b85cba37db36daeeeff744e Author: Joerg Roedel Date: Fri May 22 12:44:03 2009 +0200 amd-iommu: disable device isolation with CONFIG_IOMMU_STRESS With device isolation disabled we can test better for race conditions in dma_ops related code. Signed-off-by: Joerg Roedel commit 2be69c79e9a46a554fc3ff57d886e65e7a73eb72 Author: Joerg Roedel Date: Fri May 22 12:15:49 2009 +0200 x86/iommu: add IOMMU_STRESS Kconfig entry This Kconfig option is intended to enable various code paths or parameters in IOMMU implementations to stress test the code and/or the hardware. This can also be done by disabling optimizations in the code when this option is switched on. Signed-off-by: Joerg Roedel Cc: David Woodhouse Cc: FUJITA Tomonori commit b3b99ef8b4f80f3f093a72110e7697c2281ae45d Author: Joerg Roedel Date: Fri May 22 12:02:48 2009 +0200 amd-iommu: move protection domain printk to dump code This information is only helpful for debugging. Don't print it anymore unless explicitly requested. Signed-off-by: Joerg Roedel commit 02acc43a294098c2a4cd22cf24e9c988644f9f7f Author: Joerg Roedel Date: Wed May 20 16:24:21 2009 +0200 amd-iommu: print ivmd information to dmesg when requested Add information about device memory mapping requirements for the IOMMU as described in the IVRS ACPI table to the kernel log if amd_iommu_dump was specified on the kernel command line. Signed-off-by: Joerg Roedel commit 42a698f40a0946f5517308411b9e003ae031414d Author: Joerg Roedel Date: Wed May 20 15:41:28 2009 +0200 amd-iommu: print ivhd information to dmesg when requested Add information about devices belonging to an IOMMU as described in the IVRS ACPI table to the kernel log if amd_iommu_dump was specified on the kernel command line. Signed-off-by: Joerg Roedel commit 9c72041f719e2864d4208a89341c36b316dbf893 Author: Joerg Roedel Date: Wed May 20 13:53:57 2009 +0200 amd-iommu: add dump for iommus described in ivrs table Add information about IOMMU devices described in the IVRS ACPI table to the kernel log if amd_iommu_dump was specified on the kernel command line. Signed-off-by: Joerg Roedel commit fefda117ddb324b872312f1f061230e627c9f5ee Author: Joerg Roedel Date: Wed May 20 12:21:42 2009 +0200 amd-iommu: add amd_iommu_dump parameter This kernel parameter will be useful to get some AMD IOMMU related information in dmesg that is not necessary for the default user but may be helpful in debug situations. Signed-off-by: Joerg Roedel commit ed888aef427365d19f887c271a3a906d16422d24 Author: Joerg Roedel Date: Fri May 22 17:16:04 2009 +0200 dma-debug: re-add dma memory leak detection This is basically a revert of commit 314eeac9 but now in a fixed version. Signed-off-by: Joerg Roedel commit c5077ec42303e07c2c685b0f6cb8eee0f2c7751c Author: Steve French Date: Thu May 28 15:09:04 2009 +0000 [CIFS] Update readme to indicate change to default mount (serverino) Signed-off-by: Steve French commit a0c9217f64ee3cd1e534966da8c5f05768e1ab09 Author: Jeff Layton Date: Wed May 27 15:40:47 2009 -0400 cifs: make serverino the default when mounting Signed-off-by: Jeff Layton Signed-off-by: Steve French commit bd433d4cf4d8593a5f1764776b91f1794fce5a77 Author: Jeff Layton Date: Wed May 27 09:37:34 2009 -0400 cifs: rename cifs_iget to cifs_root_iget The current cifs_iget isn't suitable for anything but the root inode. Rename it with a more appropriate name. Signed-off-by: Jeff Layton Reviewed-by: Christoph Hellwig Signed-off-by: Steve French commit c4a2c08db7d976c2e23a97da5d69ec7c9701034d Author: Jeff Layton Date: Wed May 27 09:37:33 2009 -0400 cifs: make cnvrtDosUnixTm take a little-endian args and an offset The callers primarily end up converting the args from le anyway. Also, most of the callers end up needing to add an offset to the result. The exception to these rules is cnvrtDosCifsTm, but there are no callers of that function, so we might as well remove it. Signed-off-by: Jeff Layton Reviewed-by: Christoph Hellwig Signed-off-by: Steve French commit 07119a4df8c8c77d888f2f46964ea9512ea84ff8 Author: Jeff Layton Date: Wed May 27 09:37:33 2009 -0400 cifs: have cifs_NTtimeToUnix take a little-endian arg ...and just have the function call le64_to_cpu. Signed-off-by: Jeff Layton Reviewed-by: Christoph Hellwig Signed-off-by: Steve French commit be461ba836770263826457624bc4a5173a1f5040 Author: Chaithrika U S Date: Thu May 28 05:10:50 2009 -0400 ASoC: Add dummy S/PDIF codec support McASP on DM646x can operate in DIT (S/PDIF) where no codec is needed. This patch provides stub codec that can be used in these configurations. On DM646x EVM the McASP1 is connected to the S/PDIF out. Signed-off-by: Steve Chen Signed-off-by: Pavel Kiryukhin Signed-off-by: Naresh Medisetty Signed-off-by: Chaithrika U S Signed-off-by: Mark Brown commit c93f7669098eb97c5376e5396e3dfb734c17df4f Author: Paul Mackerras Date: Thu May 28 22:18:17 2009 +1000 perf_counter: Fix race in attaching counters to tasks and exiting Commit 564c2b21 ("perf_counter: Optimize context switch between identical inherited contexts") introduced a race where it is possible that a counter being attached to a task could get attached to the wrong task, if the task is one that has inherited its context from another task via fork. This happens because the optimized context switch could switch the context to another task after find_get_context has read task->perf_counter_ctxp. In fact, it's possible that the context could then get freed, if the other task then exits. This fixes the problem by protecting both the context switch and the critical code in find_get_context with spinlocks. The context switch locks the cxt->lock of both the outgoing and incoming contexts before swapping them. That means that once code such as find_get_context has obtained the spinlock for the context associated with a task, the context can't get swapped to another task. However, the context may have been swapped in the interval between reading task->perf_counter_ctxp and getting the lock, so it is necessary to check and retry. To make sure that none of the contexts being looked at in find_get_context can get freed, this changes the context freeing code to use RCU. Thus an rcu_read_lock() is sufficient to ensure that no contexts can get freed. This part of the patch is lifted from a patch posted by Peter Zijlstra. This also adds a check to make sure that we can't add a counter to a task that is exiting. There is also a race between perf_counter_exit_task and find_get_context; this solves the race by moving the get_ctx that was in perf_counter_alloc into the locked region in find_get_context, so that once find_get_context has got the context for a task, it won't get freed even if the task calls perf_counter_exit_task. It doesn't matter if new top-level (non-inherited) counters get attached to the context after perf_counter_exit_task has detached the context from the task. They will just stay there and never get scheduled in until the counters' fds get closed, and then perf_release will remove them from the context and eventually free the context. With this, we are now doing the unclone in find_get_context rather than when a counter was added to or removed from a context (actually, we were missing the unclone_ctx() call when adding a counter to a context). We don't need to unclone when removing a counter from a context because we have no way to remove a counter from a cloned context. This also takes out the smp_wmb() in find_get_context, which Peter Zijlstra pointed out was unnecessary because the cmpxchg implies a full barrier anyway. Signed-off-by: Paul Mackerras Acked-by: Peter Zijlstra Cc: Corey Ashford Cc: Mike Galbraith Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <18974.33033.667187.273886@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 7d96fd41cadc55f4e00231c8c71b8e25c779f122 Author: Petr Tesarik Date: Mon May 25 11:02:02 2009 +0200 x86: move rdtsc_barrier() into the TSC vread method The *fence instructions were moved to vsyscall_64.c by commit cb9e35dce94a1b9c59d46224e8a94377d673e204. But this breaks the vDSO, because vread methods are also called from there. Besides, the synchronization might be unnecessary for other time sources than TSC. [ Impact: fix potential time warp in VDSO ] Signed-off-by: Petr Tesarik LKML-Reference: <9d0ea9ea0f866bdc1f4d76831221ae117f11ea67.1243241859.git.ptesarik@suse.cz> Signed-off-by: Thomas Gleixner Cc: commit b4f8b5e2f5c7d71ae0cf18659e361088b812de1b Merge: b21fadb 1812e67 Author: Takashi Iwai Date: Thu May 28 13:12:48 2009 +0200 Merge branch 'fix/hda' into topic/hda commit b21fadb9c1852c91622ca1dccfeb144bc535e36e Author: Takashi Iwai Date: Thu May 28 12:26:15 2009 +0200 ALSA: hda - Add more register bits definitions Added some missing register bits definitions to reduce magic numbers. Also renamed some to follow the names on the datasheet. Signed-off-by: Takashi Iwai commit b05a7d4fed7e51dca37d0a31baf1466de30b1f01 Author: Takashi Iwai Date: Thu May 28 11:59:12 2009 +0200 ALSA: hda - Always sync writes in single_cmd mode In the single_cmd mode, the hardware cannot store the multiple replies like on RIRB, thus each verb has to sync and wait for the response no matter whether the return value is needed or not. Otherwise it may result in a wrong return value from the previous verb. Signed-off-by: Takashi Iwai commit 449bd54dcbd0b60070ce4129fedaf0f4ae044099 Author: Roel Kluin Date: Wed May 27 17:08:39 2009 -0700 ASoC: correct print specifiers for unsigneds Unsigned variables should use `%u' rather than `%d'. Signed-off-by: Roel Kluin Signed-off-by: Andrew Morton Signed-off-by: Mark Brown commit 5d85d3247cc3555215d7d11c78576a396c98e4d9 Author: Mike Snitzer Date: Thu May 28 11:04:53 2009 +0200 block: export blk_stack_limits() DM needs to use blk_stack_limits(), so it needs to be exported. Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 63299f057fbce47da895e8865cba7e9c3eb01a20 Author: Ingo Molnar Date: Thu May 28 10:52:00 2009 +0200 perf_counter tools: report: Add help text for --sort Acked-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit ca8cdeef9ca2ff89ee8a21d6f6ff3dfb60286041 Author: Peter Zijlstra Date: Thu May 28 11:08:33 2009 +0200 perf_counter tools: report: Implement header output for --sort variants Implement this style of header: # # Overhead Command File: Symbol # ........ ....... ............ # for the various --sort variants as well. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit d3e78ee3d015dac1794433abb6403b6fc8e70e10 Author: Ingo Molnar Date: Thu May 28 11:41:50 2009 +0200 perf_counter: Fix perf_counter_init_task() on !CONFIG_PERF_COUNTERS Pointed out by compiler warnings: tip/include/linux/perf_counter.h:644: warning: no return statement in function returning non-void Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 13b297d943828c4594527a2bd9c30ecd04e37886 Author: Tetsuo Handa Date: Tue May 26 14:18:07 2009 +0900 smack: Remove redundant initialization. We don't need to explicitly initialize to cap_* because it will be filled by security_fixup_ops(). Signed-off-by: Tetsuo Handa Acked-by: Serge Hallyn Acked-by: Casey Schaufler Signed-off-by: James Morris commit abfe0af9813153bae8c85d9bac966bafcb8ddab1 Author: Yinghai Lu Date: Wed May 20 00:37:40 2009 -0700 x86: enable_update_mptable should be a macro instead of declaring one variant as an inline function... because other case is a variable Signed-off-by: Yinghai Lu LKML-Reference: <4A13B344.7030307@kernel.org> Signed-off-by: Ingo Molnar commit 14dba5331b90c20588ae6504fea8049c7283028d Author: Mimi Zohar Date: Wed May 27 09:31:52 2009 -0400 integrity: nfsd imbalance bug fix An nfsd exported file is opened/closed by the kernel causing the integrity imbalance message. Before a file is opened, there normally is permission checking, which is done in inode_permission(). However, as integrity checking requires a dentry and mount point, which is not available in inode_permission(), the integrity (permission) checking must be called separately. In order to detect any missing integrity checking calls, we keep track of file open/closes. ima_path_check() increments these counts and does the integrity (permission) checking. As a result, the number of calls to ima_path_check()/ima_file_free() should be balanced. An extra call to fput(), indicates the file could have been accessed without first calling ima_path_check(). In nfsv3 permission checking is done once, followed by multiple reads, which do an open/close for each read. The integrity (permission) checking call should be in nfsd_permission() after the inode_permission() call, but as there is no correlation between the number of permission checking and open calls, the integrity checking call should not increment the counters, but defer it to when the file is actually opened. This patch adds: - integrity (permission) checking for nfsd exported files in nfsd_permission(). - a call to increment counts for files opened by nfsd. This patch has been updated to return the nfs error types. Signed-off-by: Mimi Zohar Signed-off-by: James Morris commit f2aebaee653a35b01c3665de2cbb1e31456b8ea8 Author: Zhaolei Date: Wed May 27 21:36:02 2009 +0800 ftrace: don't convert function's local variable name in macro "call" is an argument of macro, but it is also used as a local variable name of function in macro. We should keep this local variable name distinct from any CPP macro parameter name if both are in the same macro scope, although it hasn't caused any problem yet. [ Impact: robustify macro ] Signed-off-by: Zhao Lei Acked-by: Steven Rostedt Signed-off-by: Frederic Weisbecker commit 5b6045a906f48d37591365c5dcdd6d1d146bfd4a Author: Heiko Carstens Date: Tue May 26 17:28:02 2009 +0200 trace: disable preemption before taking raw spinlocks s390 code uses smp_processor_id() in __raw_spin_lock() code which reveals that a (raw) spinlock is taken without preemption disabled. This can potentially deadlock. To fix this explicitly disable and enable preemption. BUG: using smp_processor_id() in preemptible [00000000] code: cat/2278 caller is trace_find_cmdline+0x40/0xfc CPU: 0 Not tainted 2.6.30-rc7-dirty #39 Process cat (pid: 2278, task: 000000003faedb68, ksp: 000000003b33b988) 000000003b33b988 000000003b33bae0 0000000000000002 0000000000000000 000000003b33bb80 000000003b33baf8 000000003b33baf8 00000000000175d6 0000000000000001 000000003b33b988 000000003f9b0000 000000000000000b 000000000000000c 000000003b33bb40 000000003b33bae0 0000000000000000 0000000000000000 00000000000175d6 000000003b33bae0 000000003b33bb28 Call Trace: ([<00000000000174b2>] show_trace+0x112/0x170) [<0000000000017582>] show_stack+0x72/0x100 [<0000000000441538>] dump_stack+0xc8/0xd8 [<000000000025c350>] debug_smp_processor_id+0x114/0x130 [<00000000000bf0e4>] trace_find_cmdline+0x40/0xfc [<00000000000c35d4>] trace_print_context+0x58/0xac [<00000000000bb676>] print_trace_line+0x416/0x470 [<00000000000bc8fe>] s_show+0x4e/0x428 [<000000000013834e>] seq_read+0x36a/0x5d4 [<0000000000112a78>] vfs_read+0xc8/0x174 [<0000000000112c58>] SyS_read+0x74/0xc4 [<000000000002c7ae>] sysc_noemu+0x10/0x16 [<000002000012436c>] 0x2000012436c 1 lock held by cat/2278: #0: (&p->lock){+.+.+.}, at: [<0000000000138056>] seq_read+0x72/0x5d4 [ Impact: fix preempt-unsafe raw spinlock ] Signed-off-by: Heiko Carstens Acked-by: Steven Rostedt Signed-off-by: Frederic Weisbecker commit 55717314c4e3a5180a54228a2f97e50f3496de4c Author: Ingo Molnar Date: Wed May 27 22:13:17 2009 +0200 pref_counter: tools: report: Robustify in case of weird events This error condition: aldebaran:~/linux/linux/Documentation/perf_counter> perf report dso__load_sym: cannot get elf header. failed to open: /etc/ld.so.cache problem processing PERF_EVENT_MMAP, bailing out caused the profile to be very short - as the error was at the beginning of the file and we bailed out completely. Be more permissive and consider the event broken instead. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit ea8b27ad0cc2573776c6cd87617a37aaf603b8bd Author: Jon Smirl Date: Wed May 27 01:06:19 2009 -0400 ASoC: Modify mpc5200 AC97 driver to use V9 of spin_event_timeout() The function signature for spin_event_timeout() has changed in version V9. Adjust the mpc5200 AC97 driver to use the new function. Signed-off-by: Jon Smirl Acked-by: Timur Tabi Signed-off-by: Mark Brown commit 2d65537ee7cd4a0818ea80a97ab7932368fff5cd Author: Ingo Molnar Date: Wed May 27 21:36:22 2009 +0200 pref_counter: tools: report: Add header printout & prettify Old default output: 3.12% perf-report [.] ./perf-report: dsos__find 2.44% perf-report [k] kernel: kallsyms_expand_symbol 2.28% :4483 [.] : 2.05% :4174 [k] kernel: _spin_lock_irqsave 2.01% perf-report [k] kernel: vsnprintf 1.92% perf-report [k] kernel: format_decode 1.92% :4438 [k] kernel: _spin_lock New default output: # # Overhead Command File: Symbol # ........ ....... ............ # 6.54% perf [k] kernel: kallsyms_expand_symbol 6.26% perf [.] /home/mingo/tip/Documentation/perf_counter/perf: dso__insert_symbol 4.76% perf [.] /home/mingo/tip/Documentation/perf_counter/perf: hex2long 4.55% perf [k] kernel: number 4.48% perf [k] kernel: format_decode 4.09% perf [k] kernel: vsnprintf Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur Cc: Mike Galbraith LKML-Reference: <20090527182101.229504802@chello.nl> Signed-off-by: Ingo Molnar commit 55e5ec41a9de46b6ca06031f4fbdfdfc76dc24dc Author: Peter Zijlstra Date: Wed May 27 20:20:28 2009 +0200 pref_counter: tools: report: Add dso sorting Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur Cc: Mike Galbraith LKML-Reference: <20090527182101.229504802@chello.nl> Signed-off-by: Ingo Molnar commit 992444b173f35997f96f5cbb214f0de81d1b97ff Author: Peter Zijlstra Date: Wed May 27 20:20:27 2009 +0200 perf_counter: tools: report: Add comm sorting Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur Cc: Mike Galbraith LKML-Reference: <20090527182101.129302022@chello.nl> Signed-off-by: Ingo Molnar commit 37f440cba299bb479cf45d12eef923f0979dbcaf Author: Peter Zijlstra Date: Wed May 27 20:20:26 2009 +0200 pref_counter: tools: report: Add --sort option option parsing for dynamic sorting. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur Cc: Mike Galbraith LKML-Reference: <20090527182101.041817692@chello.nl> Signed-off-by: Ingo Molnar commit 1aa167382323eeeeb38368cab85cf17979793cbe Author: Peter Zijlstra Date: Wed May 27 20:20:25 2009 +0200 perf_counter: tools: report: Dynamic sort/print bits Make the sorting and printing dynamic. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur Cc: Mike Galbraith LKML-Reference: <20090527182100.921953817@chello.nl> Signed-off-by: Ingo Molnar commit e7fb08b1d06a6b37263c765205de5614a2273aeb Author: Peter Zijlstra Date: Wed May 27 20:20:24 2009 +0200 perf_counter: tools: report: Rework histogram code In preparation for configurable sorting, rework the histgram code a bit. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur Cc: Mike Galbraith LKML-Reference: <20090527182100.796410098@chello.nl> Signed-off-by: Ingo Molnar commit 450aaa2b2a1b006870ba68251fbb40b2387caade Author: Peter Zijlstra Date: Wed May 27 20:20:23 2009 +0200 perf_counter: tools: report: Add vmlinux support Allow to use vmlinux instead of kallsyms. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur Cc: Mike Galbraith LKML-Reference: <20090527182100.740018486@chello.nl> Signed-off-by: Ingo Molnar commit b7a16eac5e679fb5f531b9eeff7db7952303e77d Author: Peter Zijlstra Date: Wed May 27 13:35:35 2009 +0200 perf_counter: tools: /usr/lib/debug%s.debug support Some distros seem to store debuginfo in weird places. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 3c4198e874cde694f5ea1463706873e7907bdb18 Author: Kiyoshi Ueda Date: Wed May 27 14:50:02 2009 +0200 block: fix no diskstat problem The commit below in 2.6-block/for-2.6.31 causes no diskstat problem because the blk_discard_rq() check was added with '&&'. It should be 'blk_fs_request() || blk_discard_rq()'. This patch does it and fixes the no diskstat problem. Please review and apply. ------ /proc/diskstat without this patch ------------------------------------- 8 0 sda 0 0 0 0 0 0 0 0 0 0 0 ------------------------------------------------------------------------------ ----- /proc/diskstat with this patch applied --------------------------------- 8 0 sda 4186 303 373621 61600 9578 3859 107468 169479 2 89755 231059 ------------------------------------------------------------------------------ -------------------------------------------------------------------------- commit c69d48540c201394d08cb4d48b905e001313d9b8 Author: Jens Axboe Date: Fri Apr 24 08:12:19 2009 +0200 block: include discard requests in IO accounting We currently don't do merging on discard requests, but we potentially could. If we do, then we need to include discard requests in the IO accounting, or merging would end up decrementing in_flight IO counters for an IO which never incremented them. So enable accounting for discard requests. static inline int blk_do_io_stat(struct request *rq) { - return rq->rq_disk && blk_rq_io_stat(rq) && blk_fs_request(rq); + return rq->rq_disk && blk_rq_io_stat(rq) && blk_fs_request(rq) && + blk_discard_rq(rq); } -------------------------------------------------------------------------- Signed-off-by: Kiyoshi Ueda Signed-off-by: Jun'ichi Nomura Signed-off-by: Jens Axboe commit ba396a6c104682dfe5c8b4fbbf5974d5ac9f3687 Author: James Bottomley Date: Wed May 27 14:17:08 2009 +0200 block: fix oops with block tag queueing commit e8939a50466fd963eb1ba9118c34b9ffb7ff6aa6 Author: Tejun Heo Date: Fri May 8 11:54:16 2009 +0900 block: implement and enforce request peek/start/fetch Added a BUG_ON(blk_queued_rq(req)) to the top of blk_finish_req(). Unfortunately, this checks whether req->queuelist is empty. This list is doing double duty both as the queue list and the tag list, so tagged requests come in here with this not empty and boom (the tag list is emptied by blk_queue_end_tag() lower down). Fix this by moving the BUG_ON to below the end tag we also seem vulnerable to this in blk_requeue_request() as well. I think all uses of blk_queued_rq() need auditing because the check is clearly wrong in the tagged case. Signed-off-by: James Bottomley Signed-off-by: Jens Axboe commit d716fba49c7445ec87c3f045c59624fac03ee3f2 Author: Ingo Molnar Date: Wed May 27 13:19:59 2009 +0200 perf report: Remove include Pekka reported build failure in builtin-report.c: CC builtin-report.o In file included from builtin-report.c:7: /usr/include/ctype.h:102: error: expected expression before token And observed: | Removing #include from builtin-report.c makes the problem | go away. I am running Ubuntu 9.04 that has gcc 4.3.3 and libc 2.9. Reported-by: Pekka J Enberg Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit ef65b2a0b3a2f82850144df6e6a7796f6d66da6b Author: Mike Galbraith Date: Wed May 27 10:10:51 2009 +0200 perf record: Fix the profiling of existing pid or whole box Perf record bails if no command argument is provided, so you can't use naked -a or -p to profile a running task or the whole box. Allow foreground profiling of an existing pid or the entire system. [ Impact: fix command option handling bug ] Signed-off-by: Mike Galbraith Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 08d15f034e94251606479d7ca9070994c2e2fcf0 Author: Mark Brown Date: Sat May 23 10:41:05 2009 +0100 ASoC: Switch FSL SSI DAI over to symmetric_rates The effect of symmetric_constraints should provide a standard way to enforce the use of the same sample rate for both directions. Signed-off-by: Mark Brown Acked-by: Timur Tabi commit a930d2c0d0a685ab955472b08baad041cc5edb4a Author: Ingo Molnar Date: Wed May 27 09:50:13 2009 +0200 perf_counter tools: Add built-in pager support Add Git's pager.c (and sigchain) code. A command only has to call setup_pager() to get paged interactive output. Non-interactive (redirected, command-piped, etc.) uses are not affected. Update perf-report to make use of this. [ Impact: new feature ] Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 23ac9cbed82b00ca3520bb81dbe9ea3b7a936a1b Author: Ingo Molnar Date: Wed May 27 09:33:18 2009 +0200 perf_counter tools: Rename output.perf to perf.data output.perf is only output to perf-record - it's input to perf-report. So change it to a more direction-neutral name. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 16f762a2ac5ecf8a11f6f0332e46cc3459220da5 Author: Ingo Molnar Date: Wed May 27 09:10:38 2009 +0200 perf_counter tools: Introduce stricter C code checking Tighten up our C code requirements: - disallow warnings - disallow declarations-mixed-with-statements - require proper prototypes - require C99 (with gcc extensions) Fix up a ton of problems these measures unearth: - unused functions - needlessly global functions - missing prototypes - code mixed with declarations Cc: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur Cc: Steven Rostedt LKML-Reference: <20090526222155.GJ4424@ghostprotocols.net> Signed-off-by: Ingo Molnar commit 815e777f913ed54ddb449d2854015c65b4ecbfe3 Author: Arnaldo Carvalho de Melo Date: Tue May 26 19:46:14 2009 -0300 perf report: Show the IP only in --verbose mode perf: report should show the IP only in --verbose mode [acme@emilia ~]$ perf report | head 4.95 find [k] _spin_lock 2.19 find [k] ext3fs_dirhash [ext3] 1.87 find [k] __rcu_read_lock 1.86 find [k] _atomic_dec_and_lock 1.86 find [.] /lib64/libc-2.5.so: __GI_strlen 1.85 find [k] __kmalloc 1.62 find [.] /lib64/libc-2.5.so: vfprintf 1.59 find [k] __rcu_read_unlock 1.55 find [k] __d_lookup Signed-off-by: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur Cc: Steven Rostedt LKML-Reference: <20090526224614.GK4424@ghostprotocols.net> Signed-off-by: Ingo Molnar commit af83632f98aefd1ae4d8ca3c7c285ccf6a7d3956 Author: Ingo Molnar Date: Wed May 27 08:38:48 2009 +0200 perf report: Only load text symbols from kallsyms, fix - allow 'W' symbols too - Convert initializations to C99 style - whitespace cleanups Cc: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur Cc: Steven Rostedt LKML-Reference: <20090526222155.GJ4424@ghostprotocols.net> Signed-off-by: Ingo Molnar commit 03f6316d32738ec5eda2e6f628c12d1c01e61a87 Author: Arnaldo Carvalho de Melo Date: Tue May 26 19:21:55 2009 -0300 perf report: Only load text symbols from kallsyms Just like we do for userspace when reading the symtab, reducing the number of entries we insert on the symbols rbtree. Before: [acme@emilia ~]$ rm -f perf_report.perf ; perf record -o perf_report.perf perf stat perf report > /dev/null Performance counter stats for 'perf': 218.138382 task clock ticks (msecs) 4 context switches (events) 8 CPU migrations (events) 2136 pagefaults (events) 32746212 CPU cycles (events) (scaled from 67.04%) 11961102 instructions (events) (scaled from 66.19%) 49841 cache references (events) (scaled from 21.96%) 13777 cache misses (events) (scaled from 21.98%) Wall-clock time elapsed: 218.702477 msecs [acme@emilia ~]$ perf report -i perf_report.perf | head 11.06 perf [.] 0x00000000000057cb /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: dso__find_symbol 9.15 perf [.] 0x00000000000056a0 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: dso__insert_symbol 8.72 perf [k] 0xffffffff8101b1d2 intel_pmu_enable_all 8.51 perf [.] 0x0000000000006672 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: thread__symbol_incnew 3.83 perf [k] 0xffffffff811cfc5a vsnprintf 3.40 perf [.] 0x0000000000005e33 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: hex 3.40 perf [.] 0x0000000000005ec7 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: hex2long 3.19 perf [k] 0xffffffff811ce1c1 number 2.77 perf [.] 0x0000000000006869 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: threads__findnew 2.77 perf [.] 0x000000000000fde3 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: rb_insert_color [acme@emilia ~]$ After: acme@emilia ~]$ rm -f perf_report.perf ; perf record -o perf_report.perf perf stat perf report > /dev/null Performance counter stats for 'perf': 190.228511 task clock ticks (msecs) 4 context switches (events) 7 CPU migrations (events) 1625 pagefaults (events) 29578745 CPU cycles (events) (scaled from 66.92%) 10516914 instructions (events) (scaled from 66.47%) 44015 cache references (events) (scaled from 22.04%) 8248 cache misses (events) (scaled from 22.07%) Wall-clock time elapsed: 190.816096 msecs [acme@emilia ~]$ perf report -i perf_report.perf | head 15.99 perf [.] 0x00000000000057a9 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: dso__find_symbol 10.87 perf [.] 0x000000000000674d /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: thread__symbol_incnew 8.74 perf [k] 0xffffffff8101b1d2 intel_pmu_enable_all 5.54 perf [.] 0x0000000000005e42 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: hex 4.48 perf [.] 0x0000000000005ebe /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: hex2long 4.48 perf [k] 0xffffffff811cfba0 vsnprintf 3.84 perf [.] 0x00000000000056b4 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: dso__insert_symbol 3.62 perf [.] 0x00000000000068d0 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: threads__findnew 3.20 perf [k] 0xffffffff811ce0b3 number 2.56 perf [.] 0x0000000000006d78 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: __cmd_report [acme@emilia ~]$ [ Impact: optimization ] Signed-off-by: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur Cc: Steven Rostedt LKML-Reference: <20090526222155.GJ4424@ghostprotocols.net> Signed-off-by: Ingo Molnar commit d8d1656ee15d3085e0085a87e70f9093a0a102c5 Author: Arnaldo Carvalho de Melo Date: Tue May 26 19:20:57 2009 -0300 perf report: Use hex2long instead of sscanf Before: [acme@emilia ~]$ perf record -o perf_report.perf perf stat perf report > /dev/null Performance counter stats for 'perf': 245.414985 task clock ticks (msecs) 6 context switches (events) 6 CPU migrations (events) 2108 pagefaults (events) 37493013 CPU cycles (events) (scaled from 67.04%) 13576789 instructions (events) (scaled from 66.76%) 57931 cache references (events) (scaled from 21.96%) 12263 cache misses (events) (scaled from 21.98%) Wall-clock time elapsed: 246.575587 msecs [acme@emilia ~]$ perf report -i perf_report.perf | head 12.15 perf [.] 0x000000000005432a /lib64/libc-2.5.so: _IO_vfscanf_internal 9.38 perf [k] 0xffffffff8101b1d2 intel_pmu_enable_all 8.53 perf [.] 0x00000000000056b8 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: dso__insert_symbol 6.61 perf [.] 0x00000000000057cb /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: dso__find_symbol 5.33 perf [k] 0xffffffff811ce082 number 4.69 perf [.] 0x0000000000034829 /lib64/libc-2.5.so: ____strtoull_l_internal 4.48 perf [.] 0x0000000000006505 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: thread__symbol_incnew 3.41 perf [.] 0x000000000000fce6 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: rb_insert_color 3.20 perf [k] 0xffffffff811cfc01 vsnprintf 2.99 perf [k] 0xffffffff811ce5e8 format_decode After: [acme@emilia ~]$ perf record -o perf_report.perf perf stat perf report > /dev/null Performance counter stats for 'perf': 218.186805 task clock ticks (msecs) 4 context switches (events) 7 CPU migrations (events) 2133 pagefaults (events) 32735365 CPU cycles (events) (scaled from 67.04%) 11952309 instructions (events) (scaled from 66.26%) 50314 cache references (events) (scaled from 21.96%) 13228 cache misses (events) (scaled from 21.98%) Wall-clock time elapsed: 218.810451 msecs [acme@emilia ~]$ perf report -i perf_report.perf | head 10.68 perf [.] 0x000000000000578d /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: dso__find_symbol 9.62 perf [.] 0x00000000000065f7 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: thread__symbol_incnew 9.40 perf [.] 0x00000000000056b4 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: dso__insert_symbol 9.19 perf [k] 0xffffffff8101b1d2 intel_pmu_enable_all 5.13 perf [.] 0x0000000000005ec7 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: hex2long 4.49 perf [k] 0xffffffff81083808 kallsyms_expand_symbol 3.85 perf [k] 0xffffffff811ce2c1 number 3.63 perf [.] 0x0000000000005e81 /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: hex 2.99 perf [.] 0x000000000000fd5b /home/acme/git/linux-2.6-tip/Documentation/perf_counter/perf: rb_insert_color 2.99 perf [k] 0xffffffff811cf251 string [acme@emilia ~]$ [ Impact: optimization ] Signed-off-by: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: John Kacur Cc: Steven Rostedt LKML-Reference: <20090526222057.GI4424@ghostprotocols.net> Signed-off-by: Ingo Molnar commit 76b0187525f024cb391c8043adf2e359b2adb988 Author: Tetsuo Handa Date: Tue May 26 14:16:31 2009 +0900 rootplug: Remove redundant initialization. We don't need to explicitly initialize to cap_* because it will be filled by security_fixup_ops(). Signed-off-by: Tetsuo Handa Acked-by: Serge Hallyn Signed-off-by: James Morris commit 096324873f9c7172a17aff9db1356f4f01b77afe Author: Eric Sandeen Date: Sat May 23 14:30:12 2009 -0500 xfs: fix overflow in xfs_growfs_data_private In the case where growing a filesystem would leave the last AG too small, the fixup code has an overflow in the calculation of the new size with one fewer ag, because "nagcount" is a 32 bit number. If the new filesystem has > 2^32 blocks in it this causes a problem resulting in an EINVAL return from growfs: # xfs_io -f -c "truncate 19998630180864" fsfile # mkfs.xfs -f -bsize=4096 -dagsize=76288719b,size=3905982455b fsfile # mount -o loop fsfile /mnt # xfs_growfs /mnt meta-data=/dev/loop0 isize=256 agcount=52, agsize=76288719 blks = sectsz=512 attr=2 data = bsize=4096 blocks=3905982455, imaxpct=5 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 log =internal bsize=4096 blocks=32768, version=2 = sectsz=512 sunit=0 blks, lazy-count=0 realtime =none extsz=4096 blocks=0, rtextents=0 xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument Reported-by: richard.ems@cape-horn-eng.com Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Reviewed-by: Felix Blyakher Signed-off-by: Felix Blyakher commit f55ed1a83d099f275c9560ad7d4c4700d1e54bdd Author: Jeff Layton Date: Tue May 26 16:28:11 2009 -0400 cifs: tighten up default file_mode/dir_mode The current default file mode is 02767 and dir mode is 0777. This is extremely "loose". Given that CIFS is a single-user protocol, these permissions allow anyone to use the mount -- in effect, giving anyone on the machine access to the credentials used to mount the share. Change this by making the default permissions restrict write access to the default owner of the mount. Give read and execute permissions to everyone else. These are the same permissions that VFAT mounts get by default so there is some precedent here. Note that this patch also removes the mandatory locking flags from the default file_mode. After having looked at how these flags are used by the kernel, I don't think that keeping them as the default offers any real benefit. That flag combination makes it so that the kernel enforces mandatory locking. Since the server is going to do that for us anyway, I don't think we want the client to enforce this by default on applications that just want advisory locks. Anyone that does want this behavior can always enable it by setting the file_mode appropriately. Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 46a7574caf5bc533c24b315800ed323c187614f5 Author: Jeff Layton Date: Sun May 24 18:45:17 2009 -0400 cifs: fix artificial limit on reading symlinks There's no reason to limit the size of a symlink that we can read to 4000 bytes. That may be nowhere near PATH_MAX if the server is sending UCS2 strings. CIFS should be able to read in a symlink up to the size of the buffer. The size of the header has already been accounted for when creating the slabcache, so CIFSMaxBufSize should be the correct size to pass in. Fixes samba bug #6384. Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 0c0e09e21a9e7bc6ca54e06ef3d497255ca26383 Author: Mark Brown Date: Tue May 26 21:14:59 2009 +0100 ASoC: Mark MPC5200 AC97 as BROKEN until PowerPC merge issues are resolved These drivers use spin_event_timeout() which is only present in the PowerPC tree at present and which is undergoing some API revisions so temporarily mark them as BROKEN until these issues are sorted out. Signed-off-by: Mark Brown commit 6ffee43ecf8bfbe0bd74c9084c9772a59097d53b Author: Jon Smirl Date: Tue May 26 08:34:14 2009 -0400 ASoC: Fabric bindings for STAC9766 on the Efika Signed-off-by: Jon Smirl Signed-off-by: Mark Brown commit a9262c4fd404654acd3684699047fa63206518c8 Author: Jon Smirl Date: Tue May 26 08:34:12 2009 -0400 ASoC: Support for AC97 on Phytec pmc030 base board. A wm9712 AC97 codec is used. Signed-off-by: Jon Smirl Signed-off-by: Mark Brown commit 20d0e1520ed1ba8aad05f416245446de0f7ec4bb Author: Jon Smirl Date: Tue May 26 08:34:10 2009 -0400 ASoC: AC97 driver for mpc5200 I've implemented retries for when the AC97 hardware doesn't reset on first try. About 10% of the time both the Efika and pcm030 AC97 codecs don't reset on first try and need to be poked multiple times. Failure is indicated by not having the link clock start ticking. Every once in a while even five pokes won't get the link started and I have to power cycle. Signed-off-by: Jon Smirl Signed-off-by: Mark Brown commit dbcc34756234596993a3b1304636f032e66d401f Author: Jon Smirl Date: Tue May 26 08:34:08 2009 -0400 ASoC: Main rewite of the mpc5200 audio DMA code Rewrite the mpc5200 audio DMA code to support both I2S and AC97. Signed-off-by: Jon Smirl Acked-by: Grant Likely Signed-off-by: Mark Brown commit 3a4b8cc70b7473a0b9f26f5b4ddc6579b5e214be Author: Arnaldo Carvalho de Melo Date: Tue May 26 16:19:04 2009 -0300 perf report: Sort output by symbol usage [acme@emilia ~]$ perf record find / > /dev/null 2>&1 [acme@emilia ~]$ perf stat perf report | head -20 4.95 find [k] 0xffffffff81393d65 _spin_lock 3.89 find [.] 0x000000000000af89 /usr/bin/find: 2.19 find [k] 0xffffffffa00518e0 ext3fs_dirhash 1.87 find [k] 0xffffffff810a6cea __rcu_read_lock 1.86 find [k] 0xffffffff811c7312 _atomic_dec_and_lock 1.86 find [.] 0x00000000000782ab /lib64/libc-2.5.so: __GI_strlen 1.85 find [k] 0xffffffff810fedfb __kmalloc 1.62 find [.] 0x00000000000430ff /lib64/libc-2.5.so: vfprintf 1.59 find [k] 0xffffffff810a6d6d __rcu_read_unlock 1.55 find [k] 0xffffffff81119395 __d_lookup 1.39 find [.] 0x0000000000071b40 /lib64/libc-2.5.so: _int_malloc 1.30 find [k] 0xffffffffa031c4fc nfs_do_filldir 1.21 find [k] 0xffffffff811876a5 avc_has_perm_noaudit 1.15 find [k] 0xffffffff810fef62 kmem_cache_alloc 1.07 find [k] 0xffffffff811d03fb copy_user_generic_string 1.03 find [k] 0xffffffffa0043882 ext3_htree_store_dirent 0.99 find [k] 0xffffffff81393ebb _spin_lock_bh 0.98 find [k] 0xffffffffa03319a2 nfs3_decode_dirent 0.97 find [k] 0xffffffff8100bf20 system_call 0.92 find [k] 0xffffffff8139437e _spin_unlock Performance counter stats for 'perf': 244.278972 task clock ticks (msecs) 8 context switches (events) 9 CPU migrations (events) 2104 pagefaults (events) 35329669 CPU cycles (events) (scaled from 75.40%) 13740366 instructions (events) (scaled from 75.49%) 59073 cache references (events) (scaled from 24.60%) 196 cache misses (events) (scaled from 24.51%) Wall-clock time elapsed: 246.060717 msecs [acme@emilia ~]$ [acme@emilia ~]$ grep "model name" /proc/cpuinfo | head -1 model name : Intel(R) Xeon(R) CPU E5405 @ 2.00GHz [acme@emilia ~]$ grep "model name" /proc/cpuinfo | wc -l 8 [acme@emilia ~]$ Signed-off-by: Arnaldo Carvalho de Melo Cc: Paul Mackerras Cc: Mike Galbraith Cc: Steven Rostedt Cc: Peter Zijlstra LKML-Reference: <20090526191904.GH4424@ghostprotocols.net> Signed-off-by: Ingo Molnar commit c2adae0970ca1db8adb92fb56ae3bcabd916e8bd Author: Steven Rostedt Date: Wed May 20 19:56:19 2009 -0400 tracing: convert irq events to use __print_symbolic The recording of the names at trace time is inefficient. This patch implements the softirq event recording to only record the vector and then use the __print_symbolic interface to print out the names. [ Impact: faster recording of softirq events ] Signed-off-by: Steven Rostedt Signed-off-by: Frederic Weisbecker commit 0f4fc29dd68dfab9c6ddd5d087d34a5b6818cb00 Author: Steven Rostedt Date: Wed May 20 19:21:47 2009 -0400 tracing: add __print_symbolic to trace events This patch adds __print_symbolic which is similar to __print_flags but works for an enumeration type instead. That is, there is only a one to one mapping between the values and the symbols. When a match is made, then it is printed, otherwise the hex value is outputed. [ Impact: add interface for showing symbol names in events ] Signed-off-by: Steven Rostedt Signed-off-by: Frederic Weisbecker commit 62ba180e80f4194a498585ac0e4c07daa8ca08d1 Author: Steven Rostedt Date: Fri May 15 16:16:30 2009 -0400 tracing: add flag output for kmem events This patch changes the output for gfp_flags from being a simple hex value to the actual names. gfp_flags=GFP_ATOMIC instead of gfp_flags=00000020 And even gfp_flags=GFP_KERNEL instead of gfp_flags=000000d0 (Thanks to Frederic Weisbecker for pointing out that the first version had a bad order of GFP masks) [ Impact: more human readable output from tracer ] Acked-by: Eduard - Gabriel Munteanu Signed-off-by: Steven Rostedt Signed-off-by: Frederic Weisbecker commit 937cdb9db7f59278d0cb1582e6e64e3dfd73b4fc Author: Steven Rostedt Date: Fri May 15 10:51:13 2009 -0400 tracing: add previous task state info to sched switch event It is useful to see the state of a task that is being switched out. This patch adds the output of the state of the previous task in the context switch event. [ Impact: see state of switched out task in context switch ] Signed-off-by: Steven Rostedt Signed-off-by: Frederic Weisbecker commit be74b73a57645cc253d881ab0c1014eb64b9cf22 Author: Steven Rostedt Date: Tue May 26 20:25:22 2009 +0200 tracing: add __print_flags for events Developers have been asking for the ability in the ftrace event tracer to display names of bits in a flags variable. Instead of printing out c2, it would be easier to read FOO|BAR|GOO, assuming that FOO is bit 1, BAR is bit 6 and GOO is bit 7. Some examples where this would be useful are the state flags in a context switch, kmalloc flags, and even permision flags in accessing files. [ v2 changes include: Frederic Weisbecker's idea of using a mask instead of bits, thus we can output GFP_KERNEL instead of GPF_WAIT|GFP_IO|GFP_FS. Li Zefan's idea of allowing the caller of __print_flags to add their own delimiter (or no delimiter) where we can get for file permissions rwx instead of r|w|x. ] [ v3 changes: Christoph Hellwig's idea of using an array instead of va_args. ] [ Impact: better displaying of flags in trace output ] Signed-off-by: Steven Rostedt Signed-off-by: Frederic Weisbecker commit 6142f9ec108a4ddbf0d5904c3daa5fdcaa618792 Author: Peter Zijlstra Date: Tue May 26 20:51:47 2009 +0200 perf report: More robust error handling Don't let funny events confuse us, stick to what we know and try to find sensible data again. If we find an unknown event, check we're still u64 aligned, and increment by one u64. This ensures we're bound to happen upon a valid event soon. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit f49515b157e2d3ca3633eb0664fc46c42f6cb37e Author: Ingo Molnar Date: Tue May 26 19:03:36 2009 +0200 perf report: add more debugging Add the offset of the file we are analyzing, and the size of the record. In case of problems it's easier to see where the parser lost track. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur Signed-off-by: Ingo Molnar commit 3e70611460fe74ad32534fa9791774f6bbdd4159 Author: Ingo Molnar Date: Tue May 26 18:53:17 2009 +0200 perf report: add counter for unknown events Add a counter for unknown event records. [ Impact: improve debugging ] Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 97b07b699b11d4bd1218a841e5dfed16bd53de06 Author: Ingo Molnar Date: Tue May 26 18:48:58 2009 +0200 perf report: add --dump-raw-trace option To help the inspection of various data files, implement an ASCII dump method that just dumps the records as they are read in - then we exit. [ Impact: new feature ] Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit aae80dc24aeddec4e2b6e182a43491942f8667d3 Author: Takashi Iwai Date: Tue May 26 18:35:27 2009 +0200 ALSA: ctxfi - Add missing module parameter definitions Added missing module_param*() and MODULE_PARM*(). Signed-off-by: Takashi Iwai commit abd54f68629fa73ed4fa040d433196211a9bbed2 Author: Arnaldo Carvalho de Melo Date: Tue May 26 12:21:34 2009 -0300 perf: Don't assume /proc/kallsyms is ordered perf: Don't assume /proc/kallsyms is ordered Since we _are_ ordering it by the symbol start, just traverse the freshly built rbtree setting the prev->end members to curr->start - 1. Signed-off-by: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090526152134.GF4424@ghostprotocols.net> Signed-off-by: Ingo Molnar commit aa2936f5fe060e95ae06685149645b234085a468 Author: Takashi Iwai Date: Tue May 26 16:07:57 2009 +0200 ALSA: hda - Support sync after writing a verb This patch adds a debug mode to make the codec communication synchronous. Define SND_HDA_SUPPORT_SYNC_WRITE in hda_codec.c, and the call of snd_hda_codec_write*() will become synchronous, i.e. wait for the reply from the codec at each time issuing a verb. Signed-off-by: Takashi Iwai commit 5582b0648de6248c67c0b47fa170e5fb15ab4bf1 Author: Paul Mundt Date: Wed May 27 00:12:58 2009 +0900 sh: pci-sh7780: Fix up for PCI_DISABLE_MWI changes. This fixes a build error where references to pci_cache_line_size are undefined, as this ceases to be exported when PCI_DISABLE_MWI is enabled, as is now the default. Signed-off-by: Paul Mundt commit 464c9e10376b24f04402fa8ef72b66257561bffa Merge: b7e2ac6 61ce539 Author: Paul Mundt Date: Tue May 26 23:50:40 2009 +0900 Merge branch 'sh/clkfwk' commit f6eb53498ee8f725832f3a0fffca90566bb118a6 Author: Steven Whitehouse Date: Tue May 26 15:50:25 2009 +0100 GFS2: Remove args subdir from gfs2 sysfs files Since we can cat /proc/mounts there is no need to have this subdirectory in the gfs2 sysfs files. In fact this does not reflect the full range of possible mount argumenmts, where as /proc/mounts does. There was only one userland user of this set of sysfs files and it will function perfectly well without these files being present (in fact that subcommand of gfs2_tool is obsolete anyway). The tune/* subdirectory is also considered mostly obsolete, but there are a few uses of this until mount arguments can be added for the last few functions for which there are no equivalents currently. However the tune/* directory is still in my sights and new code should avoid using it. Only the gfs2_quota and gfs2_tool programs are know to use tune/* at the moment. Signed-off-by: Steven Whitehouse commit 4b2368ffd6e3563b73b8391c133822a58b1b432a Author: Michal Simek Date: Tue May 26 16:30:32 2009 +0200 microblaze_mmu_v2: Makefiles Signed-off-by: Michal Simek commit a116f6d5db4476d0c941b495a6122b0130bbf20b Author: Michal Simek Date: Tue May 26 16:30:31 2009 +0200 microblaze_mmu_v2: Kconfig update Signed-off-by: Michal Simek commit 8b3f7d5c0ba7600222744588126388b225c61f18 Author: Michal Simek Date: Tue May 26 16:30:31 2009 +0200 microblaze_mmu_v2: stat.h MMU update Signed-off-by: Michal Simek commit e57a221f15fd62921d845ddb37ce048fc7a38fd6 Author: Michal Simek Date: Tue May 26 16:30:30 2009 +0200 microblaze_mmu_v2: Elf update Signed-off-by: Michal Simek commit dcffc1b29115cc26686b8ae62b587e63f0e139f0 Author: Michal Simek Date: Tue May 26 16:30:29 2009 +0200 microblaze_mmu_v2: Update dma.h for MMU Signed-off-by: Michal Simek commit 46fb9be93b15bd8315622ad2f85f9516c064a785 Author: Michal Simek Date: Tue May 26 16:30:28 2009 +0200 microblaze_mmu_v2: Update cacheflush.h Signed-off-by: Michal Simek commit 8b28626a6b1522b39f75d0bf80d5dec23c931f5a Author: Michal Simek Date: Tue May 26 16:30:28 2009 +0200 microblaze_mmu_v2: Update signal returning address Signed-off-by: Michal Simek commit 17f3324c3eb271882b9e6b8fc3b1698290121801 Author: Michal Simek Date: Tue May 26 16:30:27 2009 +0200 microblaze_mmu_v2: Traps MMU update Signed-off-by: Michal Simek commit 65504a47e02e4e6e58884376f4a700f83cc8234f Author: Michal Simek Date: Tue May 26 16:30:26 2009 +0200 microblaze_mmu_v2: Enable fork syscall for MMU and add fork as vfork for noMMU Signed-off-by: Michal Simek commit d4c1285ef0d6b005f4e7651ee1e7cf304b4e97dc Author: Michal Simek Date: Tue May 26 16:30:24 2009 +0200 microblaze_mmu_v2: Update linker script for MMU Signed-off-by: Michal Simek commit 4bb73c3de752dc386958be32dc7e1d9fefdcbbf0 Author: Michal Simek Date: Tue May 26 16:30:24 2009 +0200 microblaze_mmu_v2: Add MMU related exceptions handling Signed-off-by: Michal Simek commit 0d6de9532663a4120ce35f507f16b72df382e360 Author: Michal Simek Date: Tue May 26 16:30:23 2009 +0200 microblaze_mmu_v2: uaccess MMU update Signed-off-by: Michal Simek commit 7db29dde731db02143418cfa008b7b77ccb2fa57 Author: Michal Simek Date: Tue May 26 16:30:22 2009 +0200 microblaze_mmu_v2: Update exception handling - MMU exception Signed-off-by: Michal Simek commit ca54502bd52a5d483f7ba076b613ad2ee43941da Author: Michal Simek Date: Tue May 26 16:30:21 2009 +0200 microblaze_mmu_v2: entry.S, entry.h Signed-off-by: Michal Simek commit 23cfc369337fa106d08cbed0dc86527c67966ff2 Author: Michal Simek Date: Tue May 26 16:30:20 2009 +0200 microblaze_mmu_v2: Add CURRENT_TASK for entry.S Signed-off-by: Michal Simek commit 627cef44f4f4dfc22bebf3a68378bf3e3bedd21e Author: Michal Simek Date: Tue May 26 16:30:19 2009 +0200 microblaze_mmu_v2: MMU asm offset update Signed-off-by: Michal Simek commit 45be7d46a9928c6b8ed747e020748500da7e66f1 Author: Michal Simek Date: Tue May 26 16:30:18 2009 +0200 microblaze_mmu_v2: Update tlb.h and tlbflush.h Signed-off-by: Michal Simek commit 5233806dfe6f88fb1a01db3729eeda78f65bcbd1 Author: Michal Simek Date: Tue May 26 16:30:18 2009 +0200 microblaze_mmu_v2: Update process creation for MMU Signed-off-by: Michal Simek commit 1f84e1ea0e87ad659cd6f6a6285d50c73a8d1a24 Author: Michal Simek Date: Tue May 26 16:30:17 2009 +0200 microblaze_mmu_v2: pgalloc.h and page.h Signed-off-by: Michal Simek commit dc95be1f7188f0718ac922b6b6b72406c294d250 Author: Michal Simek Date: Tue May 26 16:30:16 2009 +0200 microblaze_mmu_v2: io.h MMU update Signed-off-by: Michal Simek commit 15902bf63c8332946e5a1f48a72e3ae22874b11b Author: Michal Simek Date: Tue May 26 16:30:15 2009 +0200 microblaze_mmu_v2: Page table - ioremap - pgtable.c/h, section update Signed-off-by: Michal Simek commit fc34d1eb1ca09d3450508e2cf9cf511364c2c460 Author: Michal Simek Date: Tue May 26 16:30:14 2009 +0200 microblaze_mmu_v2: Context handling - mmu_context.c/h Signed-off-by: Michal Simek commit 5de96121009f4de43ffeb7160109e23132278c07 Author: Michal Simek Date: Tue May 26 16:30:13 2009 +0200 microblaze_mmu_v2: Page fault handling high level - fault.c Signed-off-by: Michal Simek commit 23098649e0f8861ea69fac62cf6ba721b83065dc Author: Michal Simek Date: Tue May 26 16:30:12 2009 +0200 microblaze_mmu_v2: mmu.h update Signed-off-by: Michal Simek commit 4dc60832f516c4ccfd1e6aa07d92cc0f6d21bacb Author: Michal Simek Date: Tue May 26 16:30:12 2009 +0200 microblaze_mmu_v2: MMU initialization Signed-off-by: Michal Simek commit 3f50425c0c9815411b760e36b48e18958819a304 Author: Michal Simek Date: Tue May 26 16:30:10 2009 +0200 microblaze_mmu_v2: TLB low level code Signed-off-by: Michal Simek commit a43acfbbc8653f70b8da4c64ec534fb45065a2ee Author: Michal Simek Date: Tue May 26 16:30:10 2009 +0200 microblaze_mmu_v2: Alocate TLB for early console Signed-off-by: Michal Simek commit 5846cc608fd42cd3645ff9f841888832c6ef9b6e Author: Michal Simek Date: Tue May 26 16:30:09 2009 +0200 microblaze_mmu_v2: MMU update for startup code Signed-off-by: Michal Simek commit 2c65b4665f3f1651a7ef652d86eeb23be95dcdb9 Author: Michal Simek Date: Tue May 26 16:30:07 2009 +0200 microblaze_mmu_v2: Add mmu_defconfig Signed-off-by: Michal Simek commit 2f3a499e6b803802880aea1fb8d3b46f1959494f Author: Michal Simek Date: Tue May 26 10:14:49 2009 +0200 microblaze: Fix size of __kernel_mode_t to short This patches solve problem with inconsistency between kernel and glibc Signed-off-by: Michal Simek commit 0945f98b4a844b488d4e42a43f90a3c3aef281af Author: Edgar E. Iglesias Date: Sun May 10 14:39:05 2009 +0200 microblaze: Add audit and seccomp thread flags. Signed-off-by: Edgar E. Iglesias commit e1b28aab5804aa477c33d19855d6747607a885fd Author: Steven Whitehouse Date: Tue May 26 15:41:27 2009 +0100 GFS2: Remove lockstruct subdir from gfs2 sysfs files The lockstruct sub directory contained two entries, both of which are duplicated elsewhere in the gfs2 sysfs files as well as being available via /proc/mounts. There is no userland program using either of them, so this patch removes them. Signed-off-by: Steven Whitehouse commit 59d81029b6804c3d5895d07cad77d7dfddc6b5b2 Author: Arnaldo Carvalho de Melo Date: Tue May 26 11:14:27 2009 -0300 perf report: Fix kernel symbol resolution kallsyms have just the symbol start, so we need to read two lines to get the len. [ Impact: fix incorrect kernel symbol display in perf report ] Signed-off-by: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit f17e04afaff84b5cfd317da29ac4d764908ff833 Author: Peter Zijlstra Date: Tue May 26 15:30:22 2009 +0200 perf report: Fix ELF symbol parsing [ Impact: fix DSO symbol output in perf report ] Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit b7e2ac619465f1774b827d9997109ceef4a61851 Author: Paul Mundt Date: Tue May 26 23:13:13 2009 +0900 sh: pci: Disable MWI and make pci_dma_burst_advice() a bit more accurate. None of the SH PCI controllers support MWI, it is always treated as a direct memory write, so simply disable it outright. In the case of the PCI cache line size, consult that for the pci_dma_burst_advice() strategy, and switch over to PCI_DMA_BURST_MULTIPLE, as PPC64. Signed-off-by: Paul Mundt commit d076d2bd0d9379314df5f2ab8b9c83f617c70923 Author: Paul Mundt Date: Tue May 26 23:10:15 2009 +0900 sh: pci-sh7751: Initialize io_map_base in controller definition. As there is only a single controller and remapping has no impact for the address range in question, just initialize it directly in the controller definition. This fixes up boot time warnings about not having the field initialized. Signed-off-by: Paul Mundt commit db20c0031288ff524d82b1f240f35f85d4a052eb Author: Mike Galbraith Date: Tue May 26 15:25:34 2009 +0200 perf top: fix typo in -d option Clean up copy/paste options parsing conversion error. [ Impact: reactivate -d option ] Signed-off-by: Mike Galbraith Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit f91183fe3780d44849110a1653dfe8af7bc67aa4 Author: Mike Galbraith Date: Tue May 26 15:25:34 2009 +0200 perf top: Remove leftover NMI/IRQ bits 79202b removed IRQ/NMI mode selection, so remove it from perf top as well. [ Impact: cleanup ] Signed-off-by: Mike Galbraith Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 8174086167d43d0fd7b21928074145ae1d15bbab Author: Takashi Iwai Date: Tue May 26 15:22:00 2009 +0200 ALSA: hda - Allow concurrent RIRB access in single_cmd mode In the single_cmd mode, the current driver code doesn't do any update for RIRB just for any safety reason. But, actually the RIRB and single_cmd mode don't conflict. Unsolicited events can be delivered even while using the single_cmd mode. This patch allows the handling of unsolicited events with single_cmd mode, just always checking RIRB independent from single_cmd flag. Signed-off-by: Takashi Iwai commit 20e91c575088337cb94f2ed48380efc305dcb81d Merge: 86d190e 461c6c3 Author: Takashi Iwai Date: Tue May 26 15:19:56 2009 +0200 Merge branch 'fix/hda' into topic/hda commit 86d190e77c44cb057742dcc871b12ebd4633c387 Author: Takashi Iwai Date: Tue May 26 15:18:58 2009 +0200 ALSA: hda - Minor clean up of patch_sigmatel.c - Remove unneeded semicolons - Introduce spec->gpio_led to specify the GPIO bit for LED control Signed-off-by: Takashi Iwai commit db1005ec6ff8f250bccbc87387a955078891bfe4 Author: Takashi Iwai Date: Tue May 26 13:55:42 2009 +0200 ALSA: riptide - Fix joystick resource handling The current code doesn't handle the multiple gameports properly, and uses unnecessary global static variables to store the data. This patch changes the probe / remove routines to use the driver data assigned to the dedicated pci device, and adds the support of multiple devices. Signed-off-by: Takashi Iwai commit 0bec253c813fbb067db4dfd9f5b6cec1bd2ef026 Author: Ingo Molnar Date: Tue May 26 09:17:18 2009 +0200 perf report: Add help/manpage Add a (minimal) manpage for perf report. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 53cb8bc2a3d976efd1a800c3de4640a7220afbb3 Author: Ingo Molnar Date: Tue May 26 09:17:18 2009 +0200 perf record: Convert to Git option parsing Remove getopt usage and use Git's much more advanced and more compact command option library. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit f3e08c5341c528284460530b546608f27232f737 Author: Peter Zijlstra Date: Fri May 22 15:34:54 2009 +0200 perf report: Fix segfault on unknown symbols Ingo reported: > Program received signal SIGSEGV, Segmentation fault. > 0x0000003e25080f80 in strlen () from /lib64/libc.so.6 > Missing separate debuginfos, use: debuginfo-install elfutils.x86_64 > glibc.x86_64 zlib.x86_64 > (gdb) bt > #0 0x0000003e25080f80 in strlen () from /lib64/libc.so.6 > #1 0x0000003e2506954e in fputs () from /lib64/libc.so.6 > #2 0x00000000004059e8 in cmd_report (argc=, > argv=) at builtin-report.c:521 > #3 0x0000000000402dad in handle_internal_command (argc=1, argv=0x7fffe1218e30) > at perf.c:226 > #4 0x0000000000402f6d in main (argc=1, argv=0x7fffe1218e30) at perf.c:324 > (gdb) Signed-off-by Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Signed-off-by: Ingo Molnar commit ce7e43653b08db094326f378958bc293a68e8e5b Author: Arnaldo Carvalho de Melo Date: Tue May 19 09:30:23 2009 -0300 perf_counter: Use rb_tree for symhists and threads in report Signed-off-by: Arnaldo Carvalho de Melo Acked-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 040e6034124c504d536736ce08e4643e640cd7c2 Author: Arnaldo Carvalho de Melo Date: Mon May 18 16:25:31 2009 -0300 perf_counter: Add our private copy of list.h Signed-off-by: Arnaldo Carvalho de Melo Acked-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 35a50c8a20eea22c141e05c5667ac21c48b8b65d Author: Arnaldo Carvalho de Melo Date: Mon May 18 16:24:49 2009 -0300 perf_counter: Use rb_trees in perf report Signed-off-by: Arnaldo Carvalho de Melo Acked-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 62eb93905b3b43cea407cfbc061cc7b40ae1c6e9 Author: Arnaldo Carvalho de Melo Date: Mon May 18 14:28:47 2009 -0300 perf_counter: Implement dso__load using libelf Signed-off-by: Arnaldo Carvalho de Melo Acked-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit fd4242bb35b70557eee8d0c79f82dacc3f3b89e0 Author: Ingo Molnar Date: Wed May 20 12:45:34 2009 +0200 perf_counter tools: remove the standalone perf-report utility With a built-in 'perf report' command now available, remove the standalone implementation for good. Acked-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 8fa66bdcc81dd4fc2c91228074d0a4698120c5a2 Author: Arnaldo Carvalho de Melo Date: Mon May 18 12:45:42 2009 -0300 perf_counter: First part of 'perf report' conversion to C + elfutils Integrate perf-report into 'perf', as builtin-report.c. Signed-off-by: Arnaldo Carvalho de Melo Acked-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit a693a26fe0807c3c406d6b5295d222b646677288 Author: Takashi Iwai Date: Tue May 26 12:58:58 2009 +0200 ALSA: riptide - Code clean up A code clean up, coding style fixes. The firmware loading routine is split to an own function to improve the readability. Signed-off-by: Takashi Iwai commit b456bae0ff4f3cf91639dd32b2bfc49b1c30b4b0 Author: Ingo Molnar Date: Tue May 26 09:17:18 2009 +0200 perf top: Convert to Git option parsing Remove getopt usage and use Git's much more advanced and more compact command option library. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 5242519b0296d128425368fc6ab17f541d5fa775 Author: Ingo Molnar Date: Tue May 26 09:17:18 2009 +0200 perf stat: Convert to Git option parsing Remove getopt usage and use Git's much more advanced and more compact command option library. Extend the event parser library with the extensions that were in perf-stat before. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 8ad8db3788fd9a449941fb2392ca85af4ee1cde1 Author: Ingo Molnar Date: Tue May 26 11:10:09 2009 +0200 perf_counter tools: Librarize event string parsing Extract the event string parser from builtin-record.c, and librarize it - to be reused in other commands. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 0e9b20b8a1cab6c6ab4f98f917a2d98783103969 Author: Ingo Molnar Date: Tue May 26 09:17:18 2009 +0200 perf record: Convert to Git option parsing Remove getopt usage and use Git's much more advanced and more compact command option library. Git's library (util/parse-options.[ch]) constructs help texts and error messages automatically, and has a number of other convenience features as well. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit f9e2b97dc2cf832ccceea2a2e6eccc4bc9af72cf Author: Paul Mundt Date: Tue May 26 17:12:20 2009 +0900 sh: Add a KBUILD_DEFCONFIG for sh64. Signed-off-by: Paul Mundt commit 61ce5393e4c8914c46ec99cbda76823515109709 Author: Magnus Damm Date: Mon May 25 08:10:45 2009 +0000 sh: remove clk_ops->build_rate_table() This patch removes the ->build_rate_table() callback, ->recalc() may instead be used for this purpose. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit df109e630f82de63ec82eebbfec2a57852517f28 Author: Magnus Damm Date: Mon May 25 08:10:36 2009 +0000 sh: use shared frequency tables on sh7785 This patch converts the sh7785 clock code to make use of clk_rate_table_build() and clk_rate_table_round(). The ->build_rate_table() callback is removed, the table building is instead handled in ->recalc(). Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit c94a85746f7bdc13035acdf88c130d7b6fa41bde Author: Magnus Damm Date: Mon May 25 08:10:28 2009 +0000 sh: add shared clock framework frequency table code Add SuperH-specific clock framework helper functions: - clk_rate_table_build() - build cpufreq table from divisors/multipliers - clk_rate_table_round() - use cpufreq table to find matching frequency Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit c9904dd15922f349b5f06839e34b1723d4a75940 Author: Magnus Damm Date: Mon May 25 08:10:19 2009 +0000 sh: add pll_clk to sh7785 This patch converts the sh7785 pll implementation from the all-in-one code in frqmr_recalc() and frqmr_build_rate_table() to a separate struct clk. This allows us to remove the processor specific multiplier and use generic rate table functions. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 4e97ddf09ee3ce715fc334399bae4cc0c0a13057 Author: Ingo Molnar Date: Tue May 26 10:07:44 2009 +0200 perf stat: Remove unused variable [ Impact: cleanup ] Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 69aa48ab82e17299efe2be6c21795945731a6c17 Author: Ingo Molnar Date: Tue May 26 09:02:27 2009 +0200 perf record: Straighten out argv types [ Impact: cleanup ] Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 5b25ab29bad3114f798b136b4147f255a5d5742f Author: Paul Mundt Date: Tue May 26 17:02:18 2009 +0900 sh: Record ms7724se in mach-types. Signed-off-by: Paul Mundt commit 287c129716c2d4b75f3d8dd6e68732a3cd326ee6 Author: Kuninori Morimoto Date: Tue May 26 07:04:52 2009 +0000 sh: Add ms7724se (SH7724) board support This adds preliminary support for the ms7724se solution engine board. Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt commit 329d876d6fd326109f191ae0fb2798b8834fb70b Author: Ingo Molnar Date: Tue May 26 08:10:00 2009 +0200 perf_counter: Initialize ->oncpu properly This shouldnt matter normally (and i have not seen any misbehavior), because active counters always have a proper ->oncpu value - but nevertheless initialize the field properly to -1. [ Impact: cleanup ] Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit aaba98018b8295dfa2119345d17f833d74448cd0 Author: Ingo Molnar Date: Tue May 26 08:10:00 2009 +0200 perf_counter, x86: Make NMI lockups more robust We have a debug check that detects stuck NMIs and returns with the PMU disabled in the global ctrl MSR - but i managed to trigger a situation where this was not enough to deassert the NMI. So clear/reset the full PMU and keep the disable count balanced when exiting from here. This way the box produces a debug warning but stays up and is more debuggable. [ Impact: in case of PMU related bugs, recover more gracefully ] Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 79202ba9ff8cf570a75596f42e011167734d1c4b Author: Ingo Molnar Date: Tue May 26 08:10:00 2009 +0200 perf_counter, x86: Fix APIC NMI programming My Nehalem box locks up in certain situations (with an always-asserted NMI causing a lockup) if the PMU LVT entry is programmed between NMI and IRQ mode with a high frequency. Standardize exlusively on NMIs instead. [ Impact: fix lockup ] Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 8a7b8cb91f26a671f22cedc7fd54508667f2d9b9 Author: Paul Mackerras Date: Tue May 26 16:27:59 2009 +1000 perf_counter: powerpc: Implement interrupt throttling This implements interrupt throttling on powerpc. Since we don't have individual count enable/disable or interrupt enable/disable controls per counter, this simply sets the hardware counter to 0, meaning that it will not interrupt again until it has counted 2^31 counts, which will take at least 2^30 cycles assuming a maximum of 2 counts per cycle. Also, we set counter->hw.period_left to the maximum possible value (2^63 - 1), so we won't report overflows for this counter for the forseeable future. The unthrottle operation restores counter->hw.period_left and the hardware counter so that we will once again report a counter overflow after counter->hw.irq_period counts. [ Impact: new perfcounters robustness feature on PowerPC ] Signed-off-by: Paul Mackerras Cc: Peter Zijlstra Cc: Corey Ashford LKML-Reference: <18971.35823.643362.446774@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 3709ab8dfa23cab553ea9ffea3372c8e0a28f332 Author: Paul Mundt Date: Tue May 26 13:52:28 2009 +0900 sh: irq: Fix up imask build warnings. Signed-off-by: Paul Mundt commit 0e907c99391362385c8e3af2c43b904dd1fd5d73 Author: Zhaolei Date: Mon May 25 18:13:59 2009 +0800 ftrace: clean up of using ftrace_event_enable_disable() Always use ftrace_event_enable_disable() to enable/disable an event so that we can factorize out the event toggling code. [ Impact: factorize and cleanup event tracing code ] Signed-off-by: Zhao Lei Cc: Steven Rostedt Cc: Tom Zanussi LKML-Reference: <4A14FDFE.2080402@cn.fujitsu.com> Signed-off-by: Frederic Weisbecker commit b11c53e12f94a46b50bccc7a1a953d7ca1d54a31 Author: Zhaolei Date: Mon May 25 18:11:59 2009 +0800 ftrace: Add task_comm support for trace_event If we enable a trace event alone without any tracer running (such as function tracer, sched switch tracer, etc...) it can't output enough task command information. We need to use the tracing_{start/stop}_cmdline_record() helpers which are designed to keep track of cmdlines for any tasks that were scheduled during the tracing. Before this patch: # echo 1 > debugfs/tracing/events/sched/sched_switch/enable # cat debugfs/tracing/trace # tracer: nop # # TASK-PID CPU# TIMESTAMP FUNCTION # | | | | | <...>-2289 [000] 526276.724790: sched_switch: task bash:2289 [120] ==> sshd:2287 [120] <...>-2287 [000] 526276.725231: sched_switch: task sshd:2287 [120] ==> bash:2289 [120] <...>-2289 [000] 526276.725452: sched_switch: task bash:2289 [120] ==> sshd:2287 [120] <...>-2287 [000] 526276.727181: sched_switch: task sshd:2287 [120] ==> swapper:0 [140] -0 [000] 526277.032734: sched_switch: task swapper:0 [140] ==> events/0:5 [115] <...>-5 [000] 526277.032782: sched_switch: task events/0:5 [115] ==> swapper:0 [140] ... After this patch: # tracer: nop # # TASK-PID CPU# TIMESTAMP FUNCTION # | | | | | bash-2269 [000] 527347.989229: sched_switch: task bash:2269 [120] ==> sshd:2267 [120] sshd-2267 [000] 527347.990960: sched_switch: task sshd:2267 [120] ==> bash:2269 [120] bash-2269 [000] 527347.991143: sched_switch: task bash:2269 [120] ==> sshd:2267 [120] sshd-2267 [000] 527347.992959: sched_switch: task sshd:2267 [120] ==> swapper:0 [140] -0 [000] 527348.531989: sched_switch: task swapper:0 [140] ==> events/0:5 [115] events/0-5 [000] 527348.532115: sched_switch: task events/0:5 [115] ==> swapper:0 [140] ... Changelog: v1->v2: Update Kconfig to select CONTEXT_SWITCH_TRACER in ENABLE_EVENT_TRACING v2->v3: v2 can solve problem that was caused by config EVENT_TRACING alone, but when CONFIG_FTRACE is off and CONFIG_TRACING is selected by other config, compile fail happened again. This version solves it. [ Impact: fix incomplete output of event tracing ] Signed-off-by: Zhao Lei Cc: Tom Zanussi Cc: Steven Rostedt LKML-Reference: <4A14FDFE.2080402@cn.fujitsu.com> Signed-off-by: Frederic Weisbecker commit 29fcefba8a2f0fea11e2b721fe174a1832801284 Author: Pekka Enberg Date: Sun May 24 11:13:17 2009 +0300 kmemtrace: fix kernel parameter documentation The kmemtrace.enable kernel parameter no longer works. To enable kmemtrace at boot-time, you must pass "ftrace=kmemtrace" instead. [ Impact: remove obsolete kernel parameter documentation ] Cc: Eduard - Gabriel Munteanu Signed-off-by: Pekka Enberg LKML-Reference: Signed-off-by: Frederic Weisbecker commit b0aae68cc5508f3c2fbf728988c954db4c8b8a53 Author: Li Zefan Date: Thu May 21 13:59:18 2009 +0800 tracing/events: change the type of __str_loc_item to unsigned short When defining a dynamic size string, we add __str_loc_##item to the trace entry, and it stores the location of the actual string in entry->_str_data[] 'unsigned short' should be sufficient to store this information, thus we save 2 bytes per dyn-size string in the ring buffer. [ Impact: reduce memory occupied by dyn-size strings in ring buffer ] Signed-off-by: Li Zefan Cc: Steven Rostedt LKML-Reference: <4A14EDB6.2050507@cn.fujitsu.com> Signed-off-by: Frederic Weisbecker commit 4f5359685af6de7dca101393dc606620adbe963f Author: Lai Jiangshan Date: Mon May 18 19:35:34 2009 +0800 tracing: add trace_event_read_lock() I found that there is nothing to protect event_hash in ftrace_find_event(). Rcu protects the event hashlist but not the event itself while we use it after its extraction through ftrace_find_event(). This lack of a proper locking in this spot opens a race window between any event dereferencing and module removal. Eg: --Task A-- print_trace_line(trace) { event = find_ftrace_event(trace) --Task B-- trace_module_remove_events(mod) { list_trace_events_module(ev, mod) { unregister_ftrace_event(ev->event) { hlist_del(ev->event->node) list_del(....) } } } |--> module removed, the event has been dropped --Task A-- event->print(trace); // Dereferencing freed memory If the event retrieved belongs to a module and this module is concurrently removed, we may end up dereferencing a data from a freed module. RCU could solve this, but it would add latency to the kernel and forbid tracers output callbacks to call any sleepable code. So this fix converts 'trace_event_mutex' to a read/write semaphore, and adds trace_event_read_lock() to protect ftrace_find_event(). [ Impact: fix possible freed memory dereference in ftrace ] Signed-off-by: Lai Jiangshan Acked-by: Steven Rostedt LKML-Reference: <4A114806.7090302@cn.fujitsu.com> Signed-off-by: Frederic Weisbecker commit 0127c3ea082ee9f1034789b978dfc7fd83254617 Author: Ingo Molnar Date: Mon May 25 22:03:26 2009 +0200 perf_counter: fix warning & lockup - remove bogus warning - fix wakeup from NMI path lockup - also fix up whitespace noise in perf_counter.h Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090525153931.703093461@chello.nl> Signed-off-by: Ingo Molnar commit 53b441a565bf4036ab49c8ea04c5ad06ace7dd6b Author: Ingo Molnar Date: Mon May 25 21:41:28 2009 +0200 Revert "perf_counter, x86: speed up the scheduling fast-path" This reverts commit b68f1d2e7aa21029d73c7d453a8046e95d351740. It is causing problems (stuck/stuttering profiling) - when mixed NMI and non-NMI counters are used. Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090525153931.703093461@chello.nl> Signed-off-by: Ingo Molnar commit a78ac3258782f3e64cb40beb5990808e1febcc0c Author: Peter Zijlstra Date: Mon May 25 17:39:05 2009 +0200 perf_counter: Generic per counter interrupt throttle Introduce a generic per counter interrupt throttle. This uses the perf_counter_overflow() quick disable to throttle a specific counter when its going too fast when a pmu->unthrottle() method is provided which can undo the quick disable. Power needs to implement both the quick disable and the unthrottle method. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090525153931.703093461@chello.nl> Signed-off-by: Ingo Molnar commit 48e22d56ecdeddd1ffb42a02fccba5c6ef42b133 Author: Peter Zijlstra Date: Mon May 25 17:39:04 2009 +0200 perf_counter: x86: Remove interrupt throttle remove the x86 specific interrupt throttle Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090525153931.616671838@chello.nl> Signed-off-by: Ingo Molnar commit ff99be573e02e9f7edc23b472c7f9a5ddba12795 Author: Peter Zijlstra Date: Mon May 25 17:39:03 2009 +0200 perf_counter: x86: Expose INV and EDGE bits Expose the INV and EDGE bits of the PMU to raw configs. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090525153931.494709027@chello.nl> Signed-off-by: Ingo Molnar commit 4fcd39207f4c91185cc89e3e6a28cbb643034ff1 Author: Takashi Iwai Date: Mon May 25 18:34:52 2009 +0200 ALSA: hda - Reset CORB/RIRB at retrying the verb communication When a codec communication error occurs, the CORB/RIRB counters should be reset first before re-issuing the verb. Simply call azx_free_cmd_io() and azx_init_cmd_io() to achieve that. Signed-off-by: Takashi Iwai commit 88b6edd17c62b7d346d21f4087893ce7d4ef828a Author: Theodore Ts'o Date: Mon May 25 11:50:39 2009 -0400 ext4: Clean up calls to ext4_get_group_desc() If the caller isn't planning on modifying the block group descriptors, there's no need to pass in a pointer to a struct buffer_head. Nuking this saves a tiny amount of CPU time and stack space usage. Signed-off-by: "Theodore Ts'o" commit 759d427aa5a9d88a81afd11817cdeb40aea85234 Author: Theodore Ts'o Date: Mon May 25 11:51:00 2009 -0400 ext4: remove unused function __ext4_write_dirty_metadata The __ext4_write_dirty_metadata() function was introduced by commit 0390131b, "ext4: Allow ext4 to run without a journal", but nothing ever used the function, either then or since. So let's remove it and save a bit of space. Cc: Frank Mayhar Signed-off-by: "Theodore Ts'o" commit 10989fb2451763fae6f42d85fa6106c8fd010cf5 Author: Peter Zijlstra Date: Mon May 25 14:45:28 2009 +0200 perf_counter: Fix PERF_COUNTER_CONTEXT_SWITCHES for cpu counters Ingo noticed that cpu counters had 0 context switches, even though there was plenty scheduling on the cpu. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090525124600.419025548@chello.nl> Signed-off-by: Ingo Molnar commit 6ab423e0eaca827fbd201ca4ae7d4f8573a366b2 Author: Peter Zijlstra Date: Mon May 25 14:45:27 2009 +0200 perf_counter: Propagate inheritance failures down the fork() path Fail fork() when we fail inheritance for some reason (-ENOMEM most likely). Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090525124600.324656474@chello.nl> Signed-off-by: Ingo Molnar commit 771d7cde144d87f2d1fbee4da3c6234d61f7e42a Author: Peter Zijlstra Date: Mon May 25 14:45:26 2009 +0200 perf_counter: Make pctrl() affect inherited counters too Paul noted that the new ptcrl() didn't work on child counters. Reported-by: Paul Mackerras Signed-off-by: Peter Zijlstra Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090525124600.203151469@chello.nl> Signed-off-by: Ingo Molnar commit e527ea312f31e88a7fa5472b71db71c565b0d44f Author: Peter Zijlstra Date: Mon May 25 14:45:25 2009 +0200 perf_counter: Remove unused ABI bits extra_config_len isn't used for anything, remove it. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090525124600.116035832@chello.nl> Signed-off-by: Ingo Molnar commit 266dfb0b58bc4181b6158ee63a0069abaa9f3a98 Author: Peter Zijlstra Date: Mon May 25 14:45:24 2009 +0200 perf_counter: Fix perf-$cmd invokation Fix: $ perf-top fatal: cannot handle -top internally Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090525124559.995591577@chello.nl> Signed-off-by: Ingo Molnar commit d3f4b3855ba87caff8f35e738c7e7e3bad0a6ab1 Author: Ingo Molnar Date: Mon May 25 14:40:01 2009 +0200 perf stat: flip around ':k' and ':u' flags This output: $ perf stat -e 0:1:k -e 0:1:u ./hello Performance counter stats for './hello': 140131 instructions (events) 1906968 instructions (events) Is quite confusing - as :k means "user instructions", :u means "kernel instructions". Flip them around - as the 'exclude' property is not intuitive in the flag naming. Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur Cc: Mike Galbraith LKML-Reference: Signed-off-by: Ingo Molnar commit e4cbb4e3ac8b09fdb11e39e5a5611bfab0a7cd1a Author: Ingo Molnar Date: Tue May 19 15:50:30 2009 +0200 perf_counter: Move child perfcounter init to after scheduler init Initialize a task's perfcounters (inherit from parent, etc.) after the child task's scheduler fields have been initialized already. [ Impact: cleanup ] Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur Cc: Mike Galbraith LKML-Reference: Signed-off-by: Ingo Molnar commit d94b943054721c346b0881865d645f000cd19880 Author: Mike Galbraith Date: Mon May 25 09:57:56 2009 +0200 perf top: Reduce display overhead Iterate over the symbol table once per display interval, and copy/sort/tally/decay only those symbols which are active. Before: top - 10:14:53 up 4:08, 17 users, load average: 1.17, 1.53, 1.49 Tasks: 273 total, 5 running, 268 sleeping, 0 stopped, 0 zombie Cpu(s): 6.9%us, 38.2%sy, 0.0%ni, 19.9%id, 0.0%wa, 0.0%hi, 35.0%si, 0.0%st PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ P COMMAND 28504 root 20 0 1044 260 164 S 58 0.0 0:04.19 2 netserver 28499 root 20 0 1040 412 316 R 51 0.0 0:04.15 0 netperf 28500 root 20 0 1040 408 316 R 50 0.0 0:04.14 1 netperf 28503 root 20 0 1044 260 164 S 50 0.0 0:04.01 1 netserver 28501 root 20 0 1044 260 164 S 49 0.0 0:03.99 0 netserver 28502 root 20 0 1040 412 316 S 43 0.0 0:03.96 2 netperf 28468 root 20 0 1892m 325m 972 S 16 10.8 0:10.50 3 perf 28467 root 20 0 1892m 325m 972 R 2 10.8 0:00.72 3 perf After: top - 10:16:30 up 4:10, 17 users, load average: 2.27, 1.88, 1.62 Tasks: 273 total, 6 running, 267 sleeping, 0 stopped, 0 zombie Cpu(s): 2.5%us, 39.7%sy, 0.0%ni, 24.6%id, 0.0%wa, 0.0%hi, 33.3%si, 0.0%st PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ P COMMAND 28590 root 20 0 1040 412 316 S 54 0.0 0:07.85 2 netperf 28589 root 20 0 1044 260 164 R 54 0.0 0:07.84 0 netserver 28588 root 20 0 1040 412 316 R 50 0.0 0:07.89 1 netperf 28591 root 20 0 1044 256 164 S 50 0.0 0:07.82 1 netserver 28587 root 20 0 1040 408 316 R 47 0.0 0:07.61 0 netperf 28592 root 20 0 1044 260 164 R 47 0.0 0:07.85 2 netserver 28378 root 20 0 8732 1300 860 R 2 0.0 0:01.81 3 top 28577 root 20 0 1892m 165m 972 R 2 5.5 0:00.48 3 perf 28578 root 20 0 1892m 165m 972 S 2 5.5 0:00.04 3 perf [ Impact: optimization ] Signed-off-by: Mike Galbraith Acked-by: Peter Zijlstra LKML-Reference: Signed-off-by: Ingo Molnar commit 0f89bdcac61536c5cb2a095a514657019573afb4 Author: Peter Ujfalusi Date: Mon May 25 11:12:13 2009 +0300 ASoC: TWL4030: HandsfreeL/R mute DAPM switch Add DAPM switch for HeadsetL/R mute. Since all bits are are needed for the HFL/R pop removal to work the switch is using the SW_SHADOW no HW register for the HandsfreeL/R mute. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit f3b5d3002d5b43d277dedc1e044d02f2a40a43c5 Author: Peter Ujfalusi Date: Mon May 25 11:12:12 2009 +0300 ASoC: TWL4030: Add shadow register Shadow, non HW register for dealing with the HandsfreeL/R muting. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 5a2e9a48b1d6de35ae5efea35d117133c3eb30f2 Author: Peter Ujfalusi Date: Mon May 25 11:12:11 2009 +0300 ASoC: TWL4030: Handsfree pop removal redesign Move the HandsfreeL/R (IHFL/R) pop removal code from the DAPM_MUX_E to a more appropriate DAPM_PGA_E widget. Also fix the power-up sequence to match with the TRM. The power-down sequence is not described in the TRM, so do it in a way, which seams like the correct sequence. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 04f9890df1bad2115665b7027e664aaffa44088d Author: Clemens Ladisch Date: Mon May 25 10:11:29 2009 +0200 sound: virtuoso: add Xonar Essence ST support Add support for the Asus Xonar Essence ST and its daughterboard. Signed-off-by: Clemens Ladisch Signed-off-by: Takashi Iwai commit b990ae963a3f80a659b30562c1e3214b386ecce3 Author: Clemens Ladisch Date: Mon May 25 10:06:22 2009 +0200 sound: virtuoso: enable HDAV S/PDIF input The Xonar HDAV1.3 has a digital input jack, so enable the corresponding device. This is not related to the HDMI stuff, which stays unsupported. Signed-off-by: Clemens Ladisch Signed-off-by: Takashi Iwai commit 53bb705d12e0f642c131cdcab2c8e3be7364e505 Author: Clemens Ladisch Date: Mon May 25 10:05:43 2009 +0200 sound: virtuoso: add another DX PCI ID Add another PCI ID for a second revision of the Xonar DX. Signed-off-by: Clemens Ladisch Signed-off-by: Takashi Iwai commit 345c03ef0f2bd0c933a1eca27732af7edf5e8d4d Author: Clemens Ladisch Date: Mon May 25 10:05:00 2009 +0200 sound: oxygen: reset DMA when stream is closed When a PCM stream is closed, flush the corresponding DMA channel. Otherwise, the DMA controller would continue to output the last sample which would result in a DC offset on the output. Signed-off-by: Clemens Ladisch Signed-off-by: Takashi Iwai commit 85a9f9200226ddffc2ea50dae6a8df04c033ecd4 Author: Ingo Molnar Date: Mon May 25 09:59:50 2009 +0200 perf_counter tools: increase limits, fix NR_CPUS and NR_COUNTERS goes up quadratic ... 1024x4096 was far too ambitious upper limit - go for 256x256 which is still plenty. [ Impact: reduce perf tool memory consumption ] Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur Cc: Mike Galbraith LKML-Reference: Signed-off-by: Ingo Molnar commit 0bc53a67ac831ec84f730a657dbcadd80a589ef5 Author: Jon Smirl Date: Sat May 23 19:13:03 2009 -0400 ASoC: Add a few more mpc5200 PSC defines Add a few more mpc5200 PSC defines. More bit fields defines for mpc5200 PSC registers. Signed-off-by: Jon Smirl Acked-by: Grant Likely Signed-off-by: Mark Brown commit cebe77674cab51a9ff1deaa077ab74aff3996764 Author: Jon Smirl Date: Sat May 23 19:13:01 2009 -0400 ASoC: Rename the PSC functions to DMA Rename the functions in the mpc5200 DMA file from i2s based names to dma ones to reflect the file they are in. Signed-off-by: Jon Smirl Acked-by: Grant Likely Signed-off-by: Mark Brown commit 89dd08425273773fd33fc85d48d152c5679b2fb4 Author: Jon Smirl Date: Sat May 23 19:12:59 2009 -0400 ASoC: Basic split of mpc5200 DMA code out of mpc5200_psc_i2s Basic split of mpc5200 DMA code out from i2s into a standalone file. Signed-off-by: Jon Smirl Acked-by: Grant Likely Signed-off-by: Mark Brown commit 05e1efa2deb42b1bd548208e5c43f471e2cf0da1 Author: Mark Brown Date: Sun May 24 13:32:24 2009 +0100 ASoC: Fix minor issues in STAC9766 driver Fairly minor issues: - Don't register the DAIs, it's not required for AC97 devices. - Make unexported functions static. - Wrap some excessively long lines. - Undo tab/space breakage. Signed-off-by: Mark Brown commit 3c166c7f1828f226c7f478758bf6c8ce8be1623f Author: Jon Smirl Date: Sat May 23 19:13:07 2009 -0400 ASoC: Codec for STAC9766 used on the Efika Datasheet: http://www.idt.com/products/getDoc.cfm?docID=13134007 Signed-off-by: Jon Smirl Signed-off-by: Mark Brown commit a3862d3f814ce7dfca9eed56ac23d29db3aee8d5 Author: Ingo Molnar Date: Sun May 24 09:02:37 2009 +0200 perf_counter: Increase mmap limit In a default 'perf top' run the tool will create a counter for each online CPU. With enough CPUs this will eventually exhaust the default limit. So scale it up with the number of online CPUs. Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur Cc: Mike Galbraith LKML-Reference: Signed-off-by: Ingo Molnar commit c2990a2a582d73562d4dcf2502c39892a19a691d Author: Mike Galbraith Date: Sun May 24 08:35:49 2009 +0200 perf top: fix segfault c6eb13 increased stack usage such that perf-top now croaks on startup. Take event_array and mmap_array off the stack to prevent segfault on boxen with smallish ulimit -s setting. Signed-off-by: Mike Galbraith Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: Signed-off-by: Ingo Molnar commit 475c55797323b67435083f6e2eb8ee670f6410ec Author: Peter Zijlstra Date: Sat May 23 18:29:01 2009 +0200 perf_counter: Remove perf_counter_context::nr_enabled now that pctrl() no longer disables other people's counters, remove the PMU cache code that deals with that. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090523163013.032998331@chello.nl> Signed-off-by: Ingo Molnar commit 082ff5a2767a0679ee543f14883adbafb631ffbe Author: Peter Zijlstra Date: Sat May 23 18:29:00 2009 +0200 perf_counter: Change pctrl() behaviour Instead of en/dis-abling all counters acting on a particular task, en/dis- able all counters we created. [ v2: fix crash on first counter enable ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090523163012.916937244@chello.nl> Signed-off-by: Ingo Molnar commit 79f52b77b89e8b7aa9fbe62135eea198a2ecbd5b Author: Dave Kleikamp Date: Sat May 23 20:28:41 2009 -0500 jfs: Add missing mutex_unlock call to error path Jan Kucera found an missing call to mutex_unlock() with his static code checker. It's an unlikely error path to hit in the real world, but it should be fixed. Signed-off-by: Dave Kleikamp Reported-by: Jan Kucera commit ee0736627d3347be0be2769fa7b26431f9726c9d Merge: cf9972a 0af48f4 Author: H. Peter Anvin Date: Sat May 23 16:42:19 2009 -0700 Merge branch 'x86/urgent' into x86/setup Resolved conflicts: arch/x86/boot/memory.c Signed-off-by: H. Peter Anvin commit a366695592ebc9151dd5a248681270f0925d8324 Author: Abhijeet Joglekar Date: Fri May 1 10:01:26 2009 -0700 [SCSI] libfc,fcoe,fnic: Separate rport and lport max retry counts This allows fnic to configure number of retries for lport and rport separately. Signed-off-by: Abhijeet Joglekar Acked-by: Robert Love Signed-off-by: James Bottomley commit d17bf602fbfe4a5ab134a90f6c082fa161d398ee Author: Eric Moore Date: Mon May 18 13:02:49 2009 -0600 [SCSI] mpt2sas: bump driver version to 01.100.03.00 Bump driver version. Signed-off-by: Eric Moore Signed-off-by: James Bottomley commit d5d135b3a76750df250e18956476b6b2c4ad97c2 Author: Eric Moore Date: Mon May 18 13:02:08 2009 -0600 [SCSI] mpt2sas: using the same naming convention for all static function This fix's is for all local function so their name has the "_" preceeding the module name, then function name. Most the code is already is using this naming convention. Signed-off-by: Eric Moore Signed-off-by: James Bottomley commit ddf59a35e98aa12255ed64c892271339504cc65c Author: Eric Moore Date: Mon May 18 13:01:29 2009 -0600 [SCSI] mpt2sas: add query task support for MPT2COMMAND ioctl This patch will find an active mid for a query_task request via the ioctl path. This code is already there for task_abort, so this patch combining code using the same fuction _ctl_set_task_mid(), previously _ctl_do_task_abort(). Signed-off-by: Eric Moore Signed-off-by: James Bottomley commit 993e0da7b767c0a7c1fd0079b16f3d28e6f25a48 Author: Eric Moore Date: Mon May 18 13:00:45 2009 -0600 [SCSI] mpt2sas: LUN Reset Support Adding new eh_target_reset_handler for target reset. Change the eh_device_reset_handler so its sending MPI2_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET, instead of MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET. Add new function _scsih_scsi_lookup_find_by_lun as a sanity check to insure I_T_L commands are completed upon completing lun reset. Signed-off-by: Eric Moore Signed-off-by: James Bottomley commit 3c621b3ee1432e7a2aca4a3b670b1d05f19ecf9c Author: Eric Moore Date: Mon May 18 12:59:41 2009 -0600 [SCSI] mpt2sas: T10 DIF Support This add support for type 1 and 3 DIF support per the Oracle API. Signed-off-by: Eric Moore Signed-off-by: James Bottomley commit 6fcf41d1d8796f41b893754324704e23971c2ea1 Author: Christof Schmitt Date: Fri May 15 13:18:21 2009 +0200 [SCSI] zfcp: Keep ccw device and model id in zfcp_ccw.c Keep the information about the device and model id in zfcp_ccw. This requires an additional helper function to check for the privileged cfdc subchannel, but it allows the removal of the redundant defines from the zfcp_def header file. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit ea460a81919f2b3410e7fb30183c0256d068d87a Author: Swen Schillig Date: Fri May 15 13:18:20 2009 +0200 [SCSI] zfcp: Changed D_ID left port disabled If the destination ID (D_ID) of a remote storage port changed, e.g. re-plugged cable on the switch in a different switch port, the port was never (re-)attached within Linux. This patch fixes the broken mapping between the WWPN and the D_ID. Signed-off-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit a17c5855643afa7838f542cbd0a1ed9a73968cef Author: Martin Petermann Date: Fri May 15 13:18:19 2009 +0200 [SCSI] zfcp: Increase ref counter for port open requests In rare cases, open port request might timeout, erp calls zfcp_port_put, port gets dequeued. Now, the late returning (or dismissed) fsf-port-open calls the fsf_port_open_handler that tries to reference the port data structure leading to a kernel oops. Signed-off-by: Martin Petermann Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit dceab655d9f7d99881c2033c8ff4e1c7b444e104 Author: Christof Schmitt Date: Fri May 15 13:18:18 2009 +0200 [SCSI] zfcp: Add comments to switch/case fallthroughs Add comments where there is a deliberate fall through in switch/case statements. This makes some code checkers happy and makes it clear that there is no missing break statement. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit bc90c8632f63cd94246e3fb6f1b6d7ecba48f1a0 Author: Christof Schmitt Date: Fri May 15 13:18:17 2009 +0200 [SCSI] zfcp: Remove unnecessary default case and assignments enum dma_data_direction only has the 4 values DMA_BIDIRECTIONAL, DMA_TO_DEVICE, DMA_FROM_DEVICE and DMA_NONE. No need to have the default case. While changing this, setup sbtype in one place to make sparse happy. The default value of retval is already -EIO, so remove the additional assignment for these two cases. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit a40a1bafe7da0afe61b1c20fc50e18c07ce724f9 Author: Christof Schmitt Date: Fri May 15 13:18:16 2009 +0200 [SCSI] zfcp: Make queue_depth adjustable zfcp did always set the queue_depth for SCSI devices to 32, not allowing to change this. Introduce a kernel parameter zfcp.queue_depth and the change_queue_depth callback to allow changing the queue_depth when it is required. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit 955a21555dc8dc4a81da7063d595cd7558f413ce Author: Christof Schmitt Date: Fri May 15 13:18:15 2009 +0200 [SCSI] zfcp: Update message and add description Update the newly introduced message for the boxed status to conform to match the style of s390 and zfcp messages. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit f0216ae9bd0ea8a45736f386a3b8058aefc64dd8 Author: Christof Schmitt Date: Fri May 15 13:18:14 2009 +0200 [SCSI] zfcp: Use correct req_id for traces The zfcp traces used the fsf_req address in place of the req_id. Change this to save the correct req_id. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley commit f9da3be5afc08c40e7f7a395c8935d500a6898b1 Author: Andy Yan Date: Thu May 14 20:41:21 2009 -0400 [SCSI] mvsas: remove all the casts from void * or to void * Signed-off-by: Ying Chu Signed-off-by: Andy Yan Signed-off-by: Ke Wei commit 4421c9ebeeacf3d9c4e6aa558e1a777178e71add Author: Mike Christie Date: Wed May 13 17:57:50 2009 -0500 [SCSI] libiscsi: add debug printks for iscsi command completion path This patch just adds some debug statements for the abort and completion paths. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit b3cd5050bf8eb32ceecee129cac7c59e6f1668c4 Author: Mike Christie Date: Wed May 13 17:57:49 2009 -0500 [SCSI] libiscsi: add task aborted state If a task did not complete normally due to a TMF, libiscsi will now complete the task with the state ISCSI_TASK_ABRT_TMF. Drivers like bnx2i that need to free resources if a command did not complete normally can then check the task state. If a driver does not need to send a special command if we have dropped the session then they can check for ISCSI_TASK_ABRT_SESS_RECOV. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 1336aed10b8af791378b017f0fa8da4e5b827b8d Author: Mike Christie Date: Wed May 13 17:57:48 2009 -0500 [SCSI] libiscsi: check if iscsi host has work queue before queueing work Instead of having libiscsi check if the offload bit is set, have it check if the lld created a work queue. I think this is more clear. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 301e0f7e4d78e956c58b66888e134dbdb44ea28e Author: Mike Christie Date: Wed May 13 17:57:47 2009 -0500 [SCSI] libiscsi: don't let io sit in queue when session has failed If the session is failed, but we have not yet fully transitioned to the recovery stage we were still queueuing IO. The idea is that for some failures we can recvover at the command level and still continue to execute other IO. Well, we never have added the recovery within a command code, so queueing up IO here just creates the possibility that it might time time out so this just has us requeue the IO the scsi layer for now. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 3bbaaad95fd38dedb7c66a601f14825b4e0c5a59 Author: Mike Christie Date: Wed May 13 17:57:46 2009 -0500 [SCSI] libiscsi: handle cleanup task races bnx2i needs to send a hardware specific cleanup command if a command has not completed normally (iscsi/scsi response from target), and the session is still ok (this is the case when we send a TMF to stop the command). At this time it will need to drop the session lock. The problem with the current code is that fail_all_commands assumes we will hold the lock the entire time, so it uses list_for_each_entry_safe. If while bnx2i drops the session lock multiple cmds complete then list_for_each_entry_safe will not handle this correctly. This patch removes the running lists and just has us loop over the cmds array (in later patches we will then replace that array with a block tag map at the session level). It also fixes up the completion path so that if the TMF code and the normal recv path were completing the same command then they both do not try to do release the refcount taken when the task is queued. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 4c48a82935f833d94fcf44c2b0c5d2922acfc77a Author: Mike Christie Date: Wed May 13 17:57:45 2009 -0500 [SCSI] libiscsi: fix iscsi transport checks to account for slower links If we have not got any pdus for recv_timeout seconds, then we will send a iscsi ping/nop to make sure the target is still around. The problem is if this is a slow link, and the ping got queued after the data for a data_out (read), then the transport code could think the ping has failed when it is just slowly making its way through the network. This patch has us check if we are making progress while the nop is outstanding. If we are still reading in data, then we do not fail the session at that time. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit d1acfae514425d680912907c6554852f1e258551 Author: Mike Christie Date: Wed May 13 17:57:44 2009 -0500 [SCSI] libiscsi_tcp: update recv tracking for each skb instead of iscsi pdu Everytime we read in a pdu libiscsi will update a tracking field. It uses this to decide when to check if the transport might be bad. If we have not got data in recv_timeout seconds then we will send a iscsi ping/nop. If we are on a slow link then it could take a while to read in all the data for a data_in. In that case we might send a ping/nop when we do not need to or we might drop a session thinking it is bad when the lower layer is making forward progress on it. This patch has libiscsi_tcp update the recv tracking for each skb (basically network packet from our point of view) instead of the entire iscsi pdu+data, so we account for these cases where data is coming in slowly. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 26013ad4c43f49a038a6489c35e9b901491339fe Author: Mike Christie Date: Wed May 13 17:57:43 2009 -0500 [SCSI] libiscsi: fix nop response/reply and session cleanup race If we are responding to a nop from the target by sending our nop, and the session is getting torn down, then iscsi_start_session_recovery could set the conn stop bits while the recv path is sending the nop response and we will hit the bug ons in __iscsi_conn_send_pdu. This has us check the state in __iscsi_conn_send_pdu and fail all incoming mgmt IO if we are not logged in and if the pdu is not login related. It also changes the ordering of the setting of conn stop state bits so they are set after the session state is set (both are set under the session lock). Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit edbc9aa0580c0aca96ac8d11bfb2defa81d91bb3 Author: Mike Christie Date: Wed May 13 17:57:42 2009 -0500 [SCSI] libiscsi: have iscsi_data_in_rsp call iscsi_update_cmdsn This has iscsi_data_in_rsp call iscsi_update_cmdsn when a pdu is completed like is done for other pdu's that are don. For libiscsi_tcp, this means that it calls iscsi_update_cmdsn when it is handling the pdu internally to only transfer data, but if there is status then it does not need to call it since the completion handling will do it. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 8f9256cea10ca43ac80f66e176643eb41db34244 Author: Mike Christie Date: Wed May 13 17:57:41 2009 -0500 [SCSI] libiscsi: export iscsi_itt_to_task for bnx2i bnx2i needs to be able to look up mgmt task like login and nop, because it does some processing of them on the completion path. This exports iscsi_itt_to_task so it can look up the task. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 5700b1af93388544843a453e3c68f8f928bd1e88 Author: Mike Christie Date: Wed May 13 17:57:40 2009 -0500 [SCSI] libiscsi: handle param allocation failures If we could not allocate the initiator name or some other id like the hwaddress or netdev, then userspace could deal with the failure by just running in a dregraded mode. Now we want to be able to switch values for the params and we want some feedback, so this patch will check if a string like the initiatorname could not be allocated and return an error. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 184b57c630c86d35b7f92d4b6545fdf07647c5d5 Author: Mike Christie Date: Wed May 13 17:57:39 2009 -0500 [SCSI] libiscsi: check of LLD has a alloc pdu callout. bnx2i does not have one. It currently preallocates the bdt when the session is setup. We probably want to change that to a dma pool, then allocate from the pool in the alloc pdu. Until then check if there is a alloc pdu callout. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 10eb0f013c63c71c82ede77945a5f390c10cfda6 Author: Mike Christie Date: Wed May 13 17:57:38 2009 -0500 [SCSI] iscsi: pass ep connect shost When we create the tcp/ip connection by calling ep_connect, we currently just go by the routing table info. I think there are two problems with this. 1. Some drivers do not have access to a routing table. Some drivers like qla4xxx do not even know about other ports. 2. If you have two initiator ports on the same subnet, the user may have set things up so that session1 was supposed to be run through port1. and session2 was supposed to be run through port2. It looks like we could end with both sessions going through one of the ports. Fixes for cxgb3i from Karen Xie. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 5a2537959fa8781012e8c286fc1614e0f6991327 Author: Zhenwen Xu Date: Tue May 12 13:29:13 2009 -0700 [SCSI] NCR_D700: fix IRQ handler return type drivers/scsi/NCR_D700.c: In function `NCR_D700_probe': drivers/scsi/NCR_D700.c:322: warning: passing argument 2 of `request_irq' from incompatible pointer type drivers/scsi/NCR_D700.c:322: warning: passing argument 2 of `request_irq' from incompatible pointer type drivers/scsi/NCR_D700.c:322: warning: passing argument 2 of `request_irq' from incompatible pointer type Signed-off-by: Zhenwen Xu Signed-off-by: Andrew Morton Signed-off-by: James Bottomley commit 9870d9a2428550e7ac3164a26306ad07a99051ae Author: Andy Yan Date: Mon May 11 22:19:25 2009 +0800 [SCSI] mvsas: performance improvement using domain_device->lldd_dev Using sticky field to improve retrieve performance by eliminating some lookups in . Remove some spurious casts. Signed-off-by: Ying Chu Signed-off-by: Andy Yan Signed-off-by: Ke Wei Signed-off-by: James Bottomley commit 77db27cdcbc8ed371fd2f154cbadc7ff32ae8901 Author: Andy Yan Date: Mon May 11 21:56:31 2009 +0800 [SCSI] mvsas: correct bit map usage Utilize DECLARE_BITMAP to define the tags array. Signed-off-by: Ying Chu Signed-off-by: Andy Yan Signed-off-by: Ke Wei Signed-off-by: James Bottomley commit 0f980a871678b7ec143fcb45b31bf9234e4585c8 Author: Andy Yan Date: Mon May 11 21:49:52 2009 +0800 [SCSI] mvsas: bug fix, null pointer may be used Null pointer check to avoid corruption. Signed-off-by: Ying Chu Signed-off-by: Andy Yan Signed-off-by: Ke Wei Signed-off-by: James Bottomley commit 0b84b7094e87769120def1e703b8b4d037281038 Author: Andy Yan Date: Mon May 11 20:05:26 2009 +0800 [SCSI] mvsas: bug fix of dead lock TMF task should be issued with Interrupt Disabled, or Deadlock may take place. Clean-up unused parameters and conditonal lock. Signed-off-by: Ying Chu Signed-off-by: Andy Yan Signed-off-by: Ke Wei Signed-off-by: James Bottomley commit 2b288133ab6306b1761e0a2ef943b944ead6ad69 Author: Andy Yan Date: Mon May 11 20:01:55 2009 +0800 [SCSI] mvsas: bug fix with setting task management frame type Correct frame type setting according to parameter. Signed-off-by: Ying Chu Signed-off-by: Andy Yan Signed-off-by: Ke Wei Signed-off-by: James Bottomley commit 6ff63896e5bd624d8563f4b67fe2fe06ce99c8dc Author: Kleber S. Souza Date: Mon May 4 10:41:02 2009 -0300 [SCSI] ipr: fix PCI permanent error handler The ipr driver can hang if it encounters enough PCI errors to trigger the permanent error handler. The driver will attempt to initiate a "bringdown" of the adapter and fail all pending ops back. However, this bringdown is unlike any other bringdown of the adapter in the code as the driver. In this code path we end up failing back ops with allow_cmds still set to 1. This results in some commands, the HCAM commands in particular, getting immediately re-issued to the adapter on the done call, which results in an infinite loop in ipr_fail_all_ops. Fix this by setting allow_cmds to zero in this path. Signed-off-by: Kleber S. Souza [brking@linux.vnet.ibm.com: alternate patch substituted] Signed-off-by: Brian King Signed-off-by: James Bottomley commit a3ec723a949d65bf0349cdf60958036454927729 Author: Eric Piel Date: Mon May 4 12:43:02 2009 +0200 [SCSI] Update wording of CONFIG_SCSI_MULTI_LUN help I had to set CONFIG_SCSI_MULTI_LUN to y in order to get my SE W595 working when plugging it as a mass storage. Looking at SCSI option to get a phone behaving correctly was convoluted to say the least. There are quite a few other reports about USB card readers needing this option as well. This patch improves the help text to make the use of the option more obvious. Signed-off-by: Eric Piel Signed-off-by: James Bottomley commit 16b3858ec967f4d9817f6958cc7a0bf1222355f3 Author: Roel Kluin Date: Sat May 2 22:14:54 2009 +0200 [SCSI] ibmvscsi: Remove redundant test on unsigned. Signed-off-by: Roel Kluin Acked by: Brian King Signed-off-by: James Bottomley commit 1da2019fffc65c02a613305919bac28c9bdfaf99 Author: Kai Makisara Date: Sat May 2 08:49:34 2009 +0300 [SCSI] st: fix gcc 4.4 warning This patch fixes the GCC 4.4 warning reported by David Binderman and Sergey Senozhatsky. The old version was working correctly but was not easy to read. Signed-off-by: Kai Makisara Signed-off-by: James Bottomley commit 5c10e63c943b4c67561ddc6bf61e01d4141f881f Author: Takahiro Yasui Date: Wed Apr 29 12:13:02 2009 -0400 [SCSI] limit state transitions in scsi_internal_device_unblock scsi timeout on two or more devices may cause extremely long execution time for user applications because SDEV_OFFLINE state is changed to SDEV_RUNNING state during scsi error recovery procedures triggered by a bus reset or a host reset of scsi LLD, and scsi timeout can happens on the same devices many times. This happens because scsi_internal_device_unblock() changes device's state to SDEV_RUNNING even if a device in other states than SDEV_BLOCK, while the following two transitions are required in this function. SDEV_BLOCK -> SDEV_RUNNING SDEV_CREATED_BLOCK -> SDEV_CREATED Otherwise, it returns -EINVAL. Signed-off-by: Takahiro Yasui [matthew@wil.cx: supplied rewritten base for patch] Signed-off-by: Matthew Wilcox Signed-off-by: James Bottomley commit aa9c67f53d1969cf1db4c9c2db3a78c4ceb96469 Author: Peter Zijlstra Date: Sat May 23 18:28:59 2009 +0200 perf_counter: Simplify context cleanup Use perf_counter_remove_from_context() to remove counters from the context. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090523163012.796275849@chello.nl> Signed-off-by: Ingo Molnar commit 1a482f38c5aafeb3576079a38a5b21b46619f3d2 Author: Peter Zijlstra Date: Sat May 23 18:28:58 2009 +0200 perf_counter: Fix userspace build recent userspace (F11) seems to already include the linux/unistd.h bits which means we cannot include the version in the kernel sources due to the header guards being the same. Ensure we include the kernel version first. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090523163012.739756497@chello.nl> Signed-off-by: Ingo Molnar commit 682076ae1de0aba9c2da509f7b19dc03e30a6e1f Author: Peter Zijlstra Date: Sat May 23 18:28:57 2009 +0200 perf_counter: Sanitize context locking Ensure we're consistent with the context locks. context->mutex context->lock list_{add,del}_counter(); so that either lock is sufficient to stabilize the context. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090523163012.618790733@chello.nl> Signed-off-by: Ingo Molnar commit fccc714b3148ab9741fafc1e90c3876d50df6093 Author: Peter Zijlstra Date: Sat May 23 18:28:56 2009 +0200 perf_counter: Sanitize counter->mutex s/counter->mutex/counter->child_mutex/ and make sure its only used to protect child_list. The usage in __perf_counter_exit_task() doesn't appear to be problematic since ctx->mutex also covers anything related to fd tear-down. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090523163012.533186528@chello.nl> Signed-off-by: Ingo Molnar commit e220d2dcb944c5c488b6855d15ec66d76900514f Author: Peter Zijlstra Date: Sat May 23 18:28:55 2009 +0200 perf_counter: Fix dynamic irq_period logging We call perf_adjust_freq() from perf_counter_task_tick() which is is called under the rq->lock causing lock recursion. However, it's no longer required to be called under the rq->lock, so remove it from under it. Also, fix up some related comments. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: John Kacur LKML-Reference: <20090523163012.476197912@chello.nl> Signed-off-by: Ingo Molnar commit 948cd52906baf1f92aeea2f9b5c515db1b2e592a Author: Paul Mundt Date: Fri May 22 10:40:09 2009 +0900 sparseirq: Allow early irq_desc allocation Presently non-legacy IRQs have their irq_desc allocated with kzalloc_node(). This assumes that all callers of irq_to_desc_node_alloc() will be sufficiently late in the boot process that kmalloc is available. While porting sparseirq support to sh this blew up immediately, as at the time that we register the CPU's interrupt vector map only bootmem is available. Check slab_is_available() to work out which path to use. [ Impact: fix SH early boot crash with sparseirq enabled ] Signed-off-by: Paul Mundt Acked-by: Yinghai Lu Cc: Andrew Morton Cc: Mel Gorman LKML-Reference: <20090522014008.GA2806@linux-sh.org> Signed-off-by: Ingo Molnar commit 0154724d487586241c1ad57cfd348ed2ff2274e2 Author: Mark Brown Date: Sat May 23 00:01:05 2009 +0100 ASoC: Fix WM9081 PowerPC compiler issues Ensure that we always set a new sysclk when using the FLL in master mode and pick out the correct value for the sample rate in hw_params(). Signed-off-by: Mark Brown commit 3b77f777b8f1c001b63e317c4ce317292ff0ff94 Author: Martin K. Petersen Date: Sat May 23 08:23:16 2009 +0200 ide-disk: fix missing max_sectors accessor function The recent move to accessor functions for querying queue limits missed an entry in ide-disk.c: drivers/ide/ide-disk.c: In function ‘ide_disk_setup’: drivers/ide/ide-disk.c:642: error: ‘struct request_queue’ has no member named ‘max_sectors’ Fix it. Signed-off-by: Martin K. Petersen Signed-off-by: Jens Axboe commit c72758f33784e5e2a1a4bb9421ef3e6de8f9fcf3 Author: Martin K. Petersen Date: Fri May 22 17:17:53 2009 -0400 block: Export I/O topology for block devices and partitions To support devices with physical block sizes bigger than 512 bytes we need to ensure proper alignment. This patch adds support for exposing I/O topology characteristics as devices are stacked. logical_block_size is the smallest unit the device can address. physical_block_size indicates the smallest I/O the device can write without incurring a read-modify-write penalty. The io_min parameter is the smallest preferred I/O size reported by the device. In many cases this is the same as the physical block size. However, the io_min parameter can be scaled up when stacking (RAID5 chunk size > physical block size). The io_opt characteristic indicates the optimal I/O size reported by the device. This is usually the stripe width for arrays. The alignment_offset parameter indicates the number of bytes the start of the device/partition is offset from the device's natural alignment. Partition tools and MD/DM utilities can use this to pad their offsets so filesystems start on proper boundaries. Signed-off-by: Martin K. Petersen Signed-off-by: Jens Axboe commit cd43e26f071524647e660706b784ebcbefbd2e44 Author: Martin K. Petersen Date: Fri May 22 17:17:52 2009 -0400 block: Expose stacked device queues in sysfs Currently stacking devices do not have a queue directory in sysfs. However, many of the I/O characteristics like sector size, maximum request size, etc. are queue properties. This patch enables the queue directory for MD/DM devices. The elevator code has been modified to deal with queues that do not have an I/O scheduler. Signed-off-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 025146e13b63483add912706c101fb0fb6f015cc Author: Martin K. Petersen Date: Fri May 22 17:17:51 2009 -0400 block: Move queue limits to an embedded struct To accommodate stacking drivers that do not have an associated request queue we're moving the limits to a separate, embedded structure. Signed-off-by: Martin K. Petersen Signed-off-by: Jens Axboe commit ae03bf639a5027d27270123f5f6e3ee6a412781d Author: Martin K. Petersen Date: Fri May 22 17:17:50 2009 -0400 block: Use accessor functions for queue limits Convert all external users of queue limits to using wrapper functions instead of poking the request queue variables directly. Signed-off-by: Martin K. Petersen Signed-off-by: Jens Axboe commit e1defc4ff0cf57aca6c5e3ff99fa503f5943c1f1 Author: Martin K. Petersen Date: Fri May 22 17:17:49 2009 -0400 block: Do away with the notion of hardsect_size Until now we have had a 1:1 mapping between storage device physical block size and the logical block sized used when addressing the device. With SATA 4KB drives coming out that will no longer be the case. The sector size will be 4KB but the logical block size will remain 512-bytes. Hence we need to distinguish between the physical block size and the logical ditto. This patch renames hardsect_size to logical_block_size. Signed-off-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 9bd7de51ee8537094656149eaf45338cadb7d7d4 Merge: e4b6363 6a44587 Author: Jens Axboe Date: Fri May 22 20:28:35 2009 +0200 Merge branch 'master' into for-2.6.31 Conflicts: drivers/ide/ide-io.c Signed-off-by: Jens Axboe commit e4b636366c00738b9609cda307014d71b1225b7f Merge: b9ed725 279e677 Author: Jens Axboe Date: Fri May 22 20:25:34 2009 +0200 Merge branch 'master' into for-2.6.31 Conflicts: drivers/block/hd.c drivers/block/mg_disk.c Signed-off-by: Jens Axboe commit c6eb13847ba081552d2af644219bddeff7110caf Author: Ingo Molnar Date: Fri May 22 18:18:28 2009 +0200 perf_counter tools: increase limits I tried to run with 300 active counters and the tools bailed out because our limit was at 64. So increase the counter limit to 1024 and the CPU limit to 4096. Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 4c9773ed7946fc375edba057770f5ef16d8b44fe Merge: 9f36d31 5993856 Author: Bartlomiej Zolnierkiewicz Date: Fri May 22 17:10:55 2009 +0200 Merge branch 'for-linus' into for-next commit 86ed3669f068b514ab85ffd548456a342b3fb8d3 Author: Mark Brown Date: Fri May 22 15:01:19 2009 +0100 ASoC: WM9081 mono DAC with integrated 2.6W class AB/D amplifier driver The WM9081 is designed to provide high power output at low distortion levels in space-constrained portable applications. Signed-off-by: Mark Brown commit b4852b793a1dd74ccde5572d8a8f73e948a5b1a1 Author: Peter Ujfalusi Date: Fri May 22 15:12:15 2009 +0300 ASoC: TWL4030: Differentiate the playback streams Give unique stream names for the two playback streams so DAPM can figure out which codec_dai is in use. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 910431c7f2e963017d767b29c80ae706421e569f Author: Ingo Molnar Date: Fri May 22 12:32:15 2009 +0200 perf_counter: fix !PERF_COUNTERS build failure Update the !CONFIG_PERF_COUNTERS prototype too, for perf_counter_task_sched_out(). [ Impact: build fix ] Signed-off-by: Paul Mackerras Acked-by: Peter Zijlstra Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo LKML-Reference: <18966.10666.517218.332164@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 564c2b210add41df9a3a5aaa365c1d97cff6110d Author: Paul Mackerras Date: Fri May 22 14:27:22 2009 +1000 perf_counter: Optimize context switch between identical inherited contexts When monitoring a process and its descendants with a set of inherited counters, we can often get the situation in a context switch where both the old (outgoing) and new (incoming) process have the same set of counters, and their values are ultimately going to be added together. In that situation it doesn't matter which set of counters are used to count the activity for the new process, so there is really no need to go through the process of reading the hardware counters and updating the old task's counters and then setting up the PMU for the new task. This optimizes the context switch in this situation. Instead of scheduling out the perf_counter_context for the old task and scheduling in the new context, we simply transfer the old context to the new task and keep using it without interruption. The new context gets transferred to the old task. This means that both tasks still have a valid perf_counter_context, so no special case is introduced when the old task gets scheduled in again, either on this CPU or another CPU. The equivalence of contexts is detected by keeping a pointer in each cloned context pointing to the context it was cloned from. To cope with the situation where a context is changed by adding or removing counters after it has been cloned, we also keep a generation number on each context which is incremented every time a context is changed. When a context is cloned we take a copy of the parent's generation number, and two cloned contexts are equivalent only if they have the same parent and the same generation number. In order that the parent context pointer remains valid (and is not reused), we increment the parent context's reference count for each context cloned from it. Since we don't have individual fds for the counters in a cloned context, the only thing that can make two clones of a given parent different after they have been cloned is enabling or disabling all counters with prctl. To account for this, we keep a count of the number of enabled counters in each context. Two contexts must have the same number of enabled counters to be considered equivalent. Here are some measurements of the context switch time as measured with the lat_ctx benchmark from lmbench, comparing the times obtained with and without this patch series: -----Unmodified----- With this patch series Counters: none 2 HW 4H+4S none 2 HW 4H+4S 2 processes: Average 3.44 6.45 11.24 3.12 3.39 3.60 St dev 0.04 0.04 0.13 0.05 0.17 0.19 8 processes: Average 6.45 8.79 14.00 5.57 6.23 7.57 St dev 1.27 1.04 0.88 1.42 1.46 1.42 32 processes: Average 5.56 8.43 13.78 5.28 5.55 7.15 St dev 0.41 0.47 0.53 0.54 0.57 0.81 The numbers are the mean and standard deviation of 20 runs of lat_ctx. The "none" columns are lat_ctx run directly without any counters. The "2 HW" columns are with lat_ctx run under perfstat, counting cycles and instructions. The "4H+4S" columns are lat_ctx run under perfstat with 4 hardware counters and 4 software counters (cycles, instructions, cache references, cache misses, task clock, context switch, cpu migrations, and page faults). [ Impact: performance optimization of counter context-switches ] Signed-off-by: Paul Mackerras Acked-by: Peter Zijlstra Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo LKML-Reference: <18966.10666.517218.332164@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit a63eaf34ae60bdb067a354cc8def2e8f4a01f5f4 Author: Paul Mackerras Date: Fri May 22 14:17:31 2009 +1000 perf_counter: Dynamically allocate tasks' perf_counter_context struct This replaces the struct perf_counter_context in the task_struct with a pointer to a dynamically allocated perf_counter_context struct. The main reason for doing is this is to allow us to transfer a perf_counter_context from one task to another when we do lazy PMU switching in a later patch. This has a few side-benefits: the task_struct becomes a little smaller, we save some memory because only tasks that have perf_counters attached get a perf_counter_context allocated for them, and we can remove the inclusion of in sched.h, meaning that we don't end up recompiling nearly everything whenever perf_counter.h changes. The perf_counter_context structures are reference-counted and freed when the last reference is dropped. A context can have references from its task and the counters on its task. Counters can outlive the task so it is possible that a context will be freed well after its task has exited. Contexts are allocated on fork if the parent had a context, or otherwise the first time that a per-task counter is created on a task. In the latter case, we set the context pointer in the task struct locklessly using an atomic compare-and-exchange operation in case we raced with some other task in creating a context for the subject task. This also removes the task pointer from the perf_counter struct. The task pointer was not used anywhere and would make it harder to move a context from one task to another. Anything that needed to know which task a counter was attached to was already using counter->ctx->task. The __perf_counter_init_context function moves up in perf_counter.c so that it can be called from find_get_context, and now initializes the refcount, but is otherwise unchanged. We were potentially calling list_del_counter twice: once from __perf_counter_exit_task when the task exits and once from __perf_counter_remove_from_context when the counter's fd gets closed. This adds a check in list_del_counter so it doesn't do anything if the counter has already been removed from the lists. Since perf_counter_task_sched_in doesn't do anything if the task doesn't have a context, and leaves cpuctx->task_ctx = NULL, this adds code to __perf_install_in_context to set cpuctx->task_ctx if necessary, i.e. in the case where the current task adds the first counter to itself and thus creates a context for itself. This also adds similar code to __perf_counter_enable to handle a similar situation which can arise when the counters have been disabled using prctl; that also leaves cpuctx->task_ctx = NULL. [ Impact: refactor counter context management to prepare for new feature ] Signed-off-by: Paul Mackerras Acked-by: Peter Zijlstra Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo LKML-Reference: <18966.10075.781053.231153@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 87ec21741138bb42e7f943bb142b1d8567c10925 Author: Steven Whitehouse Date: Fri May 22 10:54:50 2009 +0100 GFS2: Move gfs2_unlink_ok into ops_inode.c Another function which is only called from one ops_inode.c so we move it and make it static. Signed-off-by: Steven Whitehouse commit 536baf02f650f4547f105386878b4736fbc181e8 Author: Steven Whitehouse Date: Fri May 22 10:48:59 2009 +0100 GFS2: Move gfs2_readlinki into ops_inode.c Move gfs2_readlinki into ops_inode.c and make it static Signed-off-by: Steven Whitehouse commit 2286dbfad1fb622ee2691537e5caaedee4618860 Author: Steven Whitehouse Date: Fri May 22 10:45:09 2009 +0100 GFS2: Move gfs2_rmdiri into ops_inode.c Move gfs2_rmdiri() into ops_inode.c and make it static. Signed-off-by: Steven Whitehouse commit 9e6e0a128bca0a151d8d3fbd9459b22fc21cfebb Author: Steven Whitehouse Date: Fri May 22 10:36:01 2009 +0100 GFS2: Merge mount.c and ops_super.c into super.c mount.c only contained a single function, so is not really worth retaining on its own. All of the super related code is now either in super.c or ops_fstype.c Signed-off-by: Steven Whitehouse commit 7385ba44f8bcea15bf0d75ae2814f0cec63140b9 Author: Peter Ujfalusi Date: Fri May 22 10:13:16 2009 +0300 ASoC: SDP4030: Use the twl4030_setup_data for headset pop-removal With this patch the initial headset pop-removal related values are configured for the twl4030 codec (ramp delay and sysclk). Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 9da28c7b38170882b1c43d7d133ddce34e25f161 Author: Peter Ujfalusi Date: Fri May 22 10:13:15 2009 +0300 ASoC: TWL4030: Add support for platform dependent configuration twl4030_setup_data structure can be passed from platform drivers to the codec via the snd_soc_device->codec_data pointer. Currently the setup data has support for the Headset pop-removal related configuration, which differs from board to board. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 5c82f56736e4c3a9eaf53c94366b056c8622d79e Author: Mark Brown Date: Fri May 22 09:41:30 2009 +0100 AsoC: Make snd_soc_read() and snd_soc_write() functions Should be no impact on the generated code but it helps the compiler print clearer messages. Signed-off-by: Mark Brown commit b1e71b0622974953e46a284aa986504a90869a9b Author: Steven Whitehouse Date: Fri May 22 10:01:55 2009 +0100 GFS2: Clean up some file names This patch renames the ops_*.c files which have no counterpart without the ops_ prefix in order to shorten the name and make it more readable. In addition, ops_address.h (which was very small) is moved into inode.h and inode.h is cleaned up by adding extern where required. Signed-off-by: Steven Whitehouse commit 2c9e703c618106f5383226fbb1f526cb11034f8a Merge: 6470c07 5805977 Author: James Morris Date: Fri May 22 18:40:59 2009 +1000 Merge branch 'master' into next Conflicts: fs/exec.c Removed IMA changes (the IMA checks are now performed via may_open()). Signed-off-by: James Morris commit b9ed7252d219c1c663944bf03846eabb515dbe75 Author: Roel Kluin Date: Fri May 22 09:25:32 2009 +0200 xen-blkfront: beyond ARRAY_SIZE of info->shadow Do not go beyond ARRAY_SIZE of info->shadow Signed-off-by: Roel Kluin Acked-by: Jeremy Fitzhardinge Signed-off-by: Jens Axboe commit aaf22af46ff2b3f0a5c4fcaf1287ac6c28d4078e Author: Michal Simek Date: Thu May 21 17:27:58 2009 +0200 microblaze: Kbuild update Signed-off-by: Michal Simek commit 8fc40238b4ebf07cd11ca9707843338be22af72f Author: Paul Mundt Date: Fri May 22 14:21:03 2009 +0900 sh: Prefer slab_is_available() over after_bootmem. This kills off after_bootmem and switches to using slab_is_available() instead. Presently the only place this is used is by the sh64 ioremap, and there's not much point in keeping the reference around otherwise. Signed-off-by: Paul Mundt commit 36aa1e32f451b664adaf3fc9a77d8279b7a833b2 Author: Paul Mundt Date: Fri May 22 14:00:34 2009 +0900 sh: clkfwk: Make clock-cpg usable for non-legacy platforms. This adds a new SH_CLK_CPG for parts that have CPG support. SH_CLK_CPG_LEGACY is made to depend on this, and still needs to be set for platforms that want clock-cpg to register the legacy clocks. With this new config item in place, it is now possible to start layering more generic CPG code in place while other platforms transition off of the legacy clocks. Signed-off-by: Paul Mundt commit 62fad39be0662a924b60e4354b802525ceda0bb1 Author: Paul Mundt Date: Fri May 22 13:50:18 2009 +0900 sh: Add a NR_IRQS_LEGACY for external IRQ0-7. This adds a NR_IRQS_LEGACY definition, which will be used by sparse irq. Signed-off-by: Paul Mundt commit 2f3ed17e010e8c0873094016f93c1afbb4adb666 Author: Paul Mundt Date: Fri May 22 13:47:52 2009 +0900 sh: Wrap irq_to_desc_alloc_cpu() around CONFIG_SPARSE_IRQ temporarily. irq_to_desc_alloc_cpu() has been renamed to irq_to_desc_alloc_node() in -next, but as we can not presently enable SPARSE_IRQ without the early irq_desc alloc patch, protect it with an ifdef until the interface has settled and we are ready to enable it system-wide. Signed-off-by: Paul Mundt commit 5f8371cec93b94a24a55ba1de642ce6eade6d62c Merge: 8e9bb19 d8586ba Author: Paul Mundt Date: Fri May 22 13:29:37 2009 +0900 Merge branches 'sh/stable-updates' and 'sh/sparseirq' commit 7fc1e5c15fde0fa9d2c08441f6898a9e51593d47 Author: Roel Kluin Date: Thu May 21 18:25:23 2009 +0000 sh: clkfwk: beyond ARRAY_SIZE of onchip_ops for sh7722. Do not go beyond ARRAY_SIZE of onchip_ops Signed-off-by: Roel Kluin Signed-off-by: Paul Mundt commit 6470c077cae12227318f40f3e6d756caadcce4b0 Author: Roel Kluin Date: Thu May 21 18:42:54 2009 +0200 smack: do not beyond ARRAY_SIZE of data Do not go beyond ARRAY_SIZE of data Signed-off-by: Roel Kluin Acked-by: Casey Schaufler Signed-off-by: James Morris commit c9d9ac525a0285a5b5ad9c3f9aa8b7c1753e6121 Author: Mimi Zohar Date: Tue May 19 13:25:58 2009 -0400 integrity: move ima_counts_get Based on discussion on lkml (Andrew Morton and Eric Paris), move ima_counts_get down a layer into shmem/hugetlb__file_setup(). Resolves drm shmem_file_setup() usage case as well. HD comment: I still think you're doing this at the wrong level, but recognize that you probably won't be persuaded until a few more users of alloc_file() emerge, all wanting your ima_counts_get(). Resolving GEM's shmem_file_setup() is an improvement, so I'll say Acked-by: Hugh Dickins Signed-off-by: Mimi Zohar Signed-off-by: James Morris commit b9fc745db833bbf74b4988493b8cd902a84c9415 Author: Mimi Zohar Date: Tue May 19 13:25:57 2009 -0400 integrity: path_check update - Add support in ima_path_check() for integrity checking without incrementing the counts. (Required for nfsd.) - rename and export opencount_get to ima_counts_get - replace ima_shm_check calls with ima_counts_get - export ima_path_check Signed-off-by: Mimi Zohar Signed-off-by: James Morris commit 932995f0ce52525b32ff5127b522c2c164de3810 Author: Eric Paris Date: Thu May 21 15:43:32 2009 -0400 IMA: Add __init notation to ima functions A number of IMA functions only used during init are not marked with __init. Add those notations so they are freed automatically. Signed-off-by: Eric Paris Acked-by: Mimi Zohar Signed-off-by: James Morris commit 5789ba3bd0a3cd20df5980ebf03358f2eb44fd67 Author: Eric Paris Date: Thu May 21 15:47:06 2009 -0400 IMA: Minimal IMA policy and boot param for TCB IMA policy The IMA TCB policy is dangerous. A normal use can use all of a system's memory (which cannot be freed) simply by building and running lots of executables. The TCB policy is also nearly useless because logging in as root often causes a policy violation when dealing with utmp, thus rendering the measurements meaningless. There is no good fix for this in the kernel. A full TCB policy would need to be loaded in userspace using LSM rule matching to get both a protected and useful system. But, if too little is measured before userspace can load a real policy one again ends up with a meaningless set of measurements. One option would be to put the policy load inside the initrd in order to get it early enough in the boot sequence to be useful, but this runs into trouble with the LSM. For IMA to measure the LSM policy and the LSM policy loading mechanism it needs rules to do so, but we already talked about problems with defaulting to such broad rules.... IMA also depends on the files being measured to be on an FS which implements and supports i_version. Since the only FS with this support (ext4) doesn't even use it by default it seems silly to have any IMA rules by default. This should reduce the performance overhead of IMA to near 0 while still letting users who choose to configure their machine as such to inclue the ima_tcb kernel paramenter and get measurements during boot before they can load a customized, reasonable policy in userspace. Signed-off-by: Eric Paris Acked-by: Mimi Zohar Signed-off-by: James Morris commit 30cff215b54b20d201a2bd7d50361c4c14700281 Author: Magnus Damm Date: Wed May 20 13:44:40 2009 +0000 sh: clkfwk branch compile fix for clock-sh7722 Fix clkfwk branch compile error in clock-sh7722.c. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit d8586ba6e1415150e1bab89f0a05447bb6f2d6d5 Author: Paul Mundt Date: Fri May 22 01:36:13 2009 +0900 sh: irq: Provide an arch_probe_nr_irqs() that wraps the machvec def. This is just a simple arch_probe_nr_irqs() stub that wraps to the platform defined number of IRQs. This can be made gradually more intelligent based on what we can infer from the INTC tables and so on. Signed-off-by: Paul Mundt commit 05ff3004d278b54760abd71530506d803182c71d Author: Paul Mundt Date: Fri May 22 01:28:33 2009 +0900 sh: irq: Teach ipr and intc about dynamically allocating irq_descs. This hooks in irq_to_desc_alloc_cpu() to the necessary code paths in the intc and ipr controller registration paths. As these are the primary call paths for all SH CPUs, this alone will make all CPUs sparse IRQ ready. There is the added benefit now that each CPU contains specific IPR and INTC tables, so only the vectors with interrupt sources backing them will ever see an irq_desc instantiation. This effectively packs irq_desc down to match the CPU, rather than padding NR_IRQS out to cover the valid vector range. Boards with extra sources will still have to fiddle with the nr_irqs setting, but they can continue doing so through the machvec as before. Signed-off-by: Paul Mundt commit fa1d43ab451084785153d37ae559c4fdd1546a5b Author: Paul Mundt Date: Fri May 22 01:26:16 2009 +0900 sh: irq: Convert from irq_desc[] to irq_to_desc(). This converts a few places that were using the old irq_desc[] array over to the shiny new irq_to_desc() helper. Preperatory work for sparse irq support. Signed-off-by: Paul Mundt commit 55620c86ebc29013c0d26c5b3bc423faea299fee Author: Paul Mundt Date: Fri May 22 01:16:17 2009 +0900 sh: irq: Rework the SR.IMASK bitmap handling. This tidies up how the SR.IMASK bitmap is managed, using the bitmap API directly instead. At the same time, tidy up the irq_chip conversion a bit. Signed-off-by: Paul Mundt commit b9479e666563d5c28eb861d2a8f6334666025384 Author: Michal Simek Date: Thu May 21 16:33:07 2009 +0200 microblaze: Fix cast warning for __va in prom.c __va expect 32bit value but of_read_ulong(of_read_number) returns 64bit value Signed-off-by: Michal Simek commit e93b55bfb3ead1cb4d9df7a5e0686318cfa8690c Author: Michal Simek Date: Thu May 21 13:53:56 2009 +0200 Microblaze: Remove unused variable from paging init Signed-off-by: Michal Simek commit cda1fd5a60e97a1a1bf96606f201818b207b2c5c Author: Michal Simek Date: Tue May 19 14:33:47 2009 +0200 microblaze: Cleanup compiled-in rootfs in BSS section This patch is based on patch from Steve Magnani. There were bug for compiled-in rootfs. We have to move moving rootfs which is in BSS section to _ebss section which is at the end of kernel and then clear bss section not vice-versa. Signed-off-by: Michal Simek commit 1dff89a9c7fab71b43ba79cc1aa6c6dbad582a35 Author: Michal Simek Date: Thu May 21 08:20:30 2009 +0200 microblaze: Fix early cmdline for CMDLINE_FORCE This patch fixed parsing early parameters because current implementation does that early parse DTS command line and then parse CMDLINE line which is compiled-in. For case that DTS doesn't contain command line is copied command line from kernel with is done in prom.c that's why I can remove it from machine_early_init. Signed-off-by: Michal Simek commit 1ce97e564b628bee30b8dbb64e5e653a484308f6 Author: Steven Whitehouse Date: Thu May 21 15:18:19 2009 +0100 GFS2: Be more aggressive in reclaiming unlinked inodes This patch increases the frequency with which gfs2 looks for unlinked, but still allocated inodes. Its the equivalent operation to ext3's orphan list, but done with bitmaps in the resource groups. This also fixes a bug where a field in the rgrp was too small. Signed-off-by: Steven Whitehouse commit 6e3d4e1d16a19f8462beb5bfe5f2c464770e795e Author: Steve Magnani Date: Sun May 17 20:32:07 2009 -0500 microblaze: Guard __HAVE_ARCH macros with __KERNEL__ in string.h A polarity reversal in the __KERNEL__ guard prevents the __HAVE_ARCH flags from being defined in kernel compilation. I noticed that there's now an option for assembly-optimized versions of memcpy and memmove. I believe this may be buggy; when I turn it on, all my printk output gets smashed together, as if the newlines aren't getting copied. Signed-off-by: Steven J. Magnani Signed-off-by: Michal Simek commit c3055d14565516867e7a45553b90cb88d6277ec9 Author: Thomas Chou Date: Tue May 19 22:48:10 2009 +0800 microblaze: clean LDFLAGS to build kernel Extra LDFLAGS from user space building may cause kernel failed to compile. Signed-off-by: Thomas Chou Signed-off-by: Michal Simek commit 5af90438023786e27178cc542f9a775594f8a126 Author: Steve Magnani Date: Mon May 18 03:22:40 2009 +0200 microblaze: Fix paging init-zone initialization This patch fix problem with bad zone initialization. This bug wasn't perform because Microblaze doesn't define CONFIG_ZONE_DMA and ZONE_NORMAL was 0 for this case that's why free_area_init works with correct values. Original message: I believe that the switch from ZONE_DMA (== 0) to ZONE_NORMAL broke the free area initialization. Signed-off-by: Steven J. Magnani Signed-off-by: Michal Simek commit f2224ff07f345f3f9716071cc90ee50e29af7497 Author: Arnd Bergmann Date: Mon Apr 27 17:38:25 2009 +0200 microblaze: use generic dma-mapping-broken.h Microblaze does not support the Linux DMA mapping API at this point, so disable CONFIG_NO_DMA. This lets us use the generic dma-mapping-broken.h implementation instead of providing a different copy. Any drivers that try to use DMA mapping now get omitted from Kconfig or produce a link error, rather than failing silently at run time. Signed-off-by: Arnd Bergmann Signed-off-by: Michal Simek commit a6029d1c8cfc9ac2609195f31c2e70b584d3496e Author: Michal Simek Date: Tue May 12 12:10:52 2009 +0200 microblaze: prepare signal handling for generic unistd.h We need to define set_restore_sigmask() in order to get pselect and ppoll. Also, the setup_frame function can not be used when __NR_sigreturn is not defined. Signed-off-by: Arnd Bergmann Signed-off-by: Michal Simek commit 732703af9c3478c3f935dd5ae80140b9b12bda09 Author: Arnd Bergmann Date: Tue Mar 31 15:30:31 2009 +0200 microblaze: clean up checksum.c This changes the function prototypes in the checksum code to have the usual prototypes, typically by turning int arguments into __wsum. Also change csum_partial_copy_from_user() to operate on the right address space and export ip_fast_csum, which is used in modular networking code. The new version is now sparse-clean including endianess checks. Signed-off-by: Arnd Bergmann Signed-off-by: Michal Simek commit 838d2406ee62595c1b40d1d03b48bc9a2102258b Author: Arnd Bergmann Date: Fri May 1 13:36:13 2009 +0000 microblaze: remove bad_user_access_length This function was actually causing harm, by hiding errors about invalid sized get_user/put_user accesses. Signed-off-by: Arnd Bergmann Signed-off-by: Michal Simek commit bb09791344d02c8caff596dc084b1542dcb70efe Author: Arnd Bergmann Date: Thu Apr 30 22:38:58 2009 +0000 microblaze: do not include types.h in ptrace.h linux/types.h breaks the uclibc build, so don't include it here. Signed-off-by: Arnd Bergmann Signed-off-by: Michal Simek commit 0c60155e14eb00fa13836a710a2d2efb63d8861c Author: Arnd Bergmann Date: Fri May 1 21:44:51 2009 +0000 microblaze: add a dummy pgprot_noncached Some device drivers call this, so add a macro that pretends to do this. Since there is no MMU support, it won't actually result in an uncached mapping, though. Signed-off-by: Arnd Bergmann Signed-off-by: Michal Simek commit 6b4374261a067e2e1b78602eb5e631a4e027dacf Author: Arnd Bergmann Date: Fri May 1 21:36:44 2009 +0000 microblaze: add security initcalls The security subsystem has its own initcalls, which need support in vmlinux.lds.S. Signed-off-by: Arnd Bergmann Signed-off-by: Michal Simek commit 122eec2f023f25fdd491ee9eb8eface4ded70728 Author: Arnd Bergmann Date: Sun May 10 14:32:11 2009 +0000 microblaze: remove cacheable_memcpy This function is neither declared nor used anywhere outside of ppc32, so remove it from microblaze. Signed-off-by: Arnd Bergmann Signed-off-by: Michal Simek commit 70f4cc29350222ff6baf70265f6482fc01565d48 Author: Arnd Bergmann Date: Sun May 10 14:26:52 2009 +0000 microblaze: kill incorrect __bad_xchg definition The whole point of the __bad_xchg declaration in system.h is to give a linker error when a variable of invalid size is passed to __xchg. The out of line definition in traps.c defeats this purpose and does not any value, so remove it here. Signed-off-by: Arnd Bergmann Signed-off-by: Michal Simek commit 353b431bafc42ed8782c7aec7fb819ca4e385ab1 Author: Arnd Bergmann Date: Fri May 1 13:37:46 2009 +0000 microblaze: fix __user annotations The microblaze signal handling code gets some __user pointers wrong, as shown by sparse. This adds the annotations where appropriate and change sys_rt_sigreturn to correctly pass a user stack down to do_sigaltstack instead of a kernel structure. Signed-off-by: Arnd Bergmann Signed-off-by: Michal Simek commit 5af7fa68103e7b2efb0fd9d901b1c25bad96fd21 Author: Arnd Bergmann Date: Fri May 1 21:48:15 2009 +0000 microblaze: export some symbols Some device drivers require the symbols _ebss, kernel_thread, __page_offset or ___range_ok, so export them. Signed-off-by: Arnd Bergmann Signed-off-by: Michal Simek commit 6fa612b56c575a5235568593eab4240c90608630 Author: Michal Simek Date: Mon May 11 15:49:12 2009 +0200 microblaze: Kconfig: Enable drivers for Microblaze Signed-off-by: Michal Simek commit 873a2e89c5e32a5c72a9ece76fcb871358ae22d2 Author: Michal Simek Date: Mon May 11 15:37:26 2009 +0200 microblaze: Remove POWERPC reference from Microblaze gpio.h Signed-off-by: Michal Simek commit 60a0b8f93664621a07b93273fc8ebc29590c62f5 Author: Steven Whitehouse Date: Thu May 21 12:23:12 2009 +0100 GFS2: Add a rgrp bitmap full flag During block allocation, it is useful to know if sections of disk are full on a finer grained basis than a single resource group. This can make a performance difference when resource groups have larger numbers of bitmap blocks, since we no longer have to search them all block by block in each individual bitmap. The full flag is set on a per-bitmap basis when it has been searched and found to have no free space. It is then skipped in subsequent searches until the flag is reset. The resetting occurs if we have to drop the glock on the resource group for any reason, or if we deallocate some blocks within that resource group and thus free up some space. Signed-off-by: Steven Whitehouse commit b0d428adebe9f1232c72bf4c686a6f0eed047cc2 Author: Randy Dunlap Date: Mon Apr 27 21:49:31 2009 -0700 [SCSI] fcoe, libfc: fix function declarations to be ANSI-compliant Fix function declarations: drivers/scsi/fcoe/fcoe.c:1356:28: warning: non-ANSI function declaration of function 'fcoe_dev_setup' drivers/scsi/libfc/fc_rport.c:1293:20: warning: non-ANSI function declaration of function 'fc_setup_rport' drivers/scsi/libfc/fc_rport.c:1302:23: warning: non-ANSI function declaration of function 'fc_destroy_rport' [jejb: fixed wrong doc in comment noticed during inspection] Signed-off-by: Randy Dunlap Signed-off-by: James Bottomley commit 73da9c13d4df3c1715029aa45edc78d71b617dfd Author: FUJITA Tomonori Date: Wed Apr 22 17:42:25 2009 -0700 [SCSI] scsi_debug: fix virtual disk larger than 1TB Signed-off-by: FUJITA Tomonori Acked-by: Douglas Gilbert Signed-off-by: James Bottomley commit f381642d8f8963e62f5d45774505fd936f2b6072 Author: Kleber S. Souza Date: Wed Apr 22 10:50:28 2009 -0300 [SCSI] ipr: ipr_remove() marked __devexit Marking the ipr clean up function ipr_remove() as __devexit and using __devexit_p() macro in its address reference. Signed-off-by: Kleber Sacilotto de Souza Reported-by: Breno Leitao Acked-by: Brian King Signed-off-by: James Bottomley commit 8f03226358972f93cd45be0a710927cbb7fd5127 Author: Chauhan, Vijay Date: Mon Apr 20 18:14:23 2009 +0530 [SCSI] scsi_dh_rdac: Retry for NOT_READY(02/04/01) in rdac device handler During device discovery read capacity fails with 0x020401 and sets the device size to 0. As a reason any I/O submitted to this path gets killed at sd_prep_fn with BLKPREP_KILL. This patch is to retry for 0x020401. NEED_RETRY in scsi_decide_disposition does not give sufficient time for the device to become ready. Signed-off-by: Vijay Chauhan Signed-off-by: James Bottomley commit fa8584566cc9cdaf067dbc12132792887a521da9 Author: Aaro Koskinen Date: Tue Apr 14 15:47:00 2009 -0500 [SCSI] sym53c8xx_2: slave_alloc/destroy safety (2.6.27.5) Make the sym53c8xx_2 driver slave_alloc/destroy less unsafe. References to the destroyed LCB are cleared from the target structure (instead of leaving a dangling pointer), and when the last LCB for the target is destroyed the reference to the upper layer target data is cleared. The host lock is used to prevent a race with the interrupt handler. Also user commands are prevented for targets with all LCBs destroyed. Signed-off-by: Aaro Koskinen Tested-by: Tony Battersby Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 410604d25faddb1b4f0f9667b7452c06cc06cea1 Author: Aaro Koskinen Date: Tue Apr 14 15:46:59 2009 -0500 [SCSI] sym53c8xx_2: lun to_clear flag not re-initialized (2.6.27.5) (Resent with proper formatting) Fix for the sym53c8xx_2 driver to initialize lun's to_clear flag after a bus reset (a failed clear can trigger a bus reset and it should not be attemped again after that). Signed-off-by: Aaro Koskinen Tested-by: Tony Battersby Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 413e6e18b483de272bdafa56e5c086c75f11d681 Author: Michael Reed Date: Wed Apr 8 14:34:33 2009 -0500 [SCSI] qla1280: error recovery rewrite The driver now waits for the scsi commands associated with a particular error recovery step to be returned to the mid-layer, and returns the appropriate SUCCESS or FAILED status. Removes unneeded polling of chip for interrupts. This patch also bumps the driver version number. Signed-off-by: Michael Reed Signed-off-by: James Bottomley commit fd65e5e93cbd9d2f34bbb0f0b2f46a30a1d20915 Author: Michael Reed Date: Wed Apr 8 14:33:48 2009 -0500 [SCSI] qla1280: driver clean up Remove some unneeded, inactive and unused code, make some trivial corrections to comments and a printk, and return a proper status in qla1280_queuecommand. No fundamental logic changes are made. Signed-off-by: Michael Reed Signed-off-by: James Bottomley commit 14faf12f7df8404c3e8e54baad8d178c327a2f87 Author: Alan Stern Date: Thu Mar 12 11:08:51 2009 -0400 [SCSI] Increase default timeout for INQUIRY This patch (as1224) changes the default timeout for INQUIRY commands from 3 seconds to 20 seconds, which is the value used by Windows for USB Mass-Storage devices. Some of these devices, like the Corsair Flash Voyager (see Bugzilla #12188) really do need a long timeout. Signed-off-by: Alan Stern Signed-off-by: James Bottomley commit 20b09c2992fefbe78f8cede7b404fb143a413c52 Author: Andy Yan Date: Fri May 8 17:46:40 2009 -0400 [SCSI] mvsas: add support for 94xx; layout change; bug fixes This version contains following main changes - Switch to new layout to support more types of ASIC. - SSP TMF supported and related Error Handing enhanced. - Support flash feature with delay 2*HZ when PHY changed. - Support Marvell 94xx series ASIC for 6G SAS/SATA, which has 2 88SE64xx chips but any different register description. - Support SPI flash for HBA-related configuration info. - Other patch enhanced from kernel side such as increasing PHY type [jejb: fold back in DMA_BIT_MASK changes] Signed-off-by: Ying Chu Signed-off-by: Andy Yan Signed-off-by: Ke Wei Signed-off-by: Jeff Garzik Signed-off-by: James Bottomley commit dd4969a892ea522ecf9d7d826ba1531ce044d46f Author: Jeff Garzik Date: Fri May 8 17:44:01 2009 -0400 [SCSI] mvsas: split driver into multiple files Split mvsas driver into multiple source codes, based on the split and function distribution found in Marvell's mvsas update. Signed-off-by: Jeff Garzik Signed-off-by: James Bottomley commit 2ad52f473bbc1aa5b33c4a329b8a359f125e19d1 Author: Jeff Garzik Date: Fri May 8 16:35:37 2009 -0400 [SCSI] mvsas: move into new directory drivers/scsi/mvsas/ Zero functional changes, just file movement. This commit prepares for the upcoming integration of the Marvell-provided driver update that splits the driver into support for both 64xx and 94xx chip families. Signed-off-by: Jeff Garzik Signed-off-by: James Bottomley commit a03706017e443ced6e354d434142989c9e8653d7 Author: Andrew Vasquez Date: Mon Apr 6 22:33:51 2009 -0700 [SCSI] qla2xxx: Update version number to 8.03.01-k2. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit e5b68a61e15ca8e200c60cfd4dbe1818e6beb4e1 Author: Anirban Chakraborty Date: Mon Apr 6 22:33:50 2009 -0700 [SCSI] qla2xxx: Use port number to compute nvram/vpd parameter offsets. Read adapter's physical port number from interrupt pin register and use it instead of pci function number to offset into the nvram to obtain the port's configuration parameters. Signed-off-by: Anirban Chakraborty Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit e337d9070e5821e7c8e5973679bdd34376263bd1 Author: Andrew Vasquez Date: Mon Apr 6 22:33:49 2009 -0700 [SCSI] qla2xxx: Add an override option to specify ISP firmware load semantics. As it may be useful during debugging to use a specific firmware image. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit b469a7cbe9bf68939c90f4ac6bc2bb99e47d7229 Author: Andrew Vasquez Date: Mon Apr 6 22:33:48 2009 -0700 [SCSI] qla2xxx: Don't try to 'stop' firmware if already in ROM code. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit a13d8ac057705c479b8bf15e5303f18f899502f9 Author: Michael Reed Date: Mon Apr 6 22:33:47 2009 -0700 [SCSI] qla2xxx: Conditionally disable automatic queue full tracking. Changing a lun's queue depth (/sys/block/sdX/device/queue_depth) isn't sticky when the device is connected via a QLogic fibre channel adapter. The QLogic qla2xxx fibre channel driver dynamically adjusts a lun's queue depth. If a user has a specific need to limit the number of commands issued to a lun (say a tape drive, or a shared raid where the total commands issued to all luns is limited at the controller level, for example) and writes a limiting value to /sys/block/sdXX/device/queue_depth, the qla2xxx driver will silently and gradually increase the queue depth back to the driver limit of ql2xmaxqdepth. While reducing this value (module parameter) or increasing the interval between ramp ups (ql2xqfullrampup) offers the potential for a work around it would be better to have the option of just disabling the dynamic adjustment of queue depth. This patch implements an "off switch" as a module parameter. Signed-off-by: Michael Reed Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit e1f916035f149540e5090207ceafca9ba779084e Author: Joe Carnuccio Date: Mon Apr 6 22:33:46 2009 -0700 [SCSI] qla2xxx: Perform an implicit login to the Management Server. Set the conditional plogi option bit whenever logging in the fabric management server (if it is already logged in, it does not need an explicit login; an implicit login suffices). Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 7d0dba174af217c73931532adf6bffb91d16c40f Author: Andrew Vasquez Date: Mon Apr 6 22:33:45 2009 -0700 [SCSI] qla2xxx: Restrict model-name/description device-table usage. Information present in static table is only valid for pre-ISP25xx adapters. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit fc3ea9bcb86a1c5126807f747291563e08405944 Author: Harish Zunjarrao Date: Mon Apr 6 22:33:44 2009 -0700 [SCSI] qla2xxx: Correct hard-coded address of a second-port's NVRAM. Signed-off-by: Harish Zunjarrao Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 8f979751367b9975fe606bce6a64b9d871dcfcfa Author: Andrew Vasquez Date: Mon Apr 6 22:33:43 2009 -0700 [SCSI] qla2xxx: Correct typo in read_nvram() callback. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 67c2e93ae7465a3e279503ceddd7bd153d74bcf8 Author: Anirban Chakraborty Date: Mon Apr 6 22:33:42 2009 -0700 [SCSI] qla2xxx: Remove reference to request queue from scsi request block. srbs used to maintain a reference to the request queue on which it was enqueued. This is no longer required as the request queue pointer is now maintained in the scsi host that issues the srb. Signed-off-by: Anirban Chakraborty Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 68ca949cdb04b4dc71451a999148fbc5f187a220 Author: Anirban Chakraborty Date: Mon Apr 6 22:33:41 2009 -0700 [SCSI] qla2xxx: Add CPU affinity support. Set the module parameter ql2xmultique_tag to 1 to enable this feature. In this mode, the total number of response queues created is equal to the number of online cpus. Turning the block layer's rq_affinity mode on enables requests to be routed to the proper cpu and at the same time it enables completion of the IO in a response queue that is affined to the cpu in the request path. Signed-off-by: Anirban Chakraborty Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 2afa19a9377ca61b9489e44bf50029574fbe63be Author: Anirban Chakraborty Date: Mon Apr 6 22:33:40 2009 -0700 [SCSI] qla2xxx: Add QoS support. Set the number of request queues to the module paramater ql2xmaxqueues. Each vport gets a request queue. The QoS value set to the request queues determines priority control for queued IOs. If QoS value is not specified, the vports use the default queue 0. Signed-off-by: Anirban Chakraborty Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 7640335ea5b1a2da0d64303e6003012c619ae01a Author: Andrew Vasquez Date: Mon Apr 6 22:33:39 2009 -0700 [SCSI] qla2xxx: Correct compilation failures when DEBUG'n' options are enabled. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit bad7001c200458c24864df6f2b1b66548bca7c75 Author: Andrew Vasquez Date: Mon Apr 6 22:33:38 2009 -0700 [SCSI] qla2xxx: Export additional FCoE attributes for application support. Cull and export VN_Port MAC address and VLAN_ID information on supported FCoE ISPs. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit d53b48d512ef477c939aba09c7e258b8dc331b6a Author: Seokmann Ju Date: Mon Apr 6 22:33:37 2009 -0700 [SCSI] qla2xxx: Correct bus-reset behaviour with recent ISPs. The short-circuit to skip the non-applicable 'full-login-lip' process on 81xx ISPs was nested too deeply in the 'bus-reset' routine, as the code in qla2x00_loop_reset() should skip the whole enable_lip_full_login process. The original code could cause device tear-down due to the qla2x00_wait_for_loop_ready() call taking a large amount of time. Signed-off-by: Seokmann Ju Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 45d7c46d54dae008f66db58e6bd31d9b31833043 Merge: 279e677 2b69a8a Author: James Bottomley Date: Wed May 20 17:20:44 2009 -0500 Merge branch 'scsi-fixes' into merge-base commit c6ac4c18fbc92a26df71ece609b082bc3099676b Author: H. Peter Anvin Date: Wed May 20 11:26:09 2009 -0700 x86, boot: correct the calculation of ZO_INIT_SIZE Correct the calculation of ZO_INIT_SIZE (the amount of memory we need during decompression). One symbol (ZO_startup_32) was missing from zoffset.h, and another (ZO_z_extract_offset) was misspelled. [ Impact: build fix ] Signed-off-by: H. Peter Anvin commit 34adc8062227f41b04ade0ff3fbd1dbe3002669e Author: Ingo Molnar Date: Wed May 20 20:13:28 2009 +0200 perf_counter: Fix context removal deadlock Disable the PMU globally before removing a counter from a context. This fixes the following lockup: [22081.741922] ------------[ cut here ]------------ [22081.746668] WARNING: at arch/x86/kernel/cpu/perf_counter.c:803 intel_pmu_handle_irq+0x9b/0x24e() [22081.755624] Hardware name: X8DTN [22081.758903] perfcounters: irq loop stuck! [22081.762985] Modules linked in: [22081.766136] Pid: 11082, comm: perf Not tainted 2.6.30-rc6-tip #226 [22081.772432] Call Trace: [22081.774940] [] ? intel_pmu_handle_irq+0x9b/0x24e [22081.781993] [] ? intel_pmu_handle_irq+0x9b/0x24e [22081.788368] [] ? warn_slowpath_common+0x77/0xa3 [22081.794649] [] ? warn_slowpath_fmt+0x40/0x45 [22081.800696] [] ? intel_pmu_handle_irq+0x9b/0x24e [22081.807080] [] ? perf_counter_nmi_handler+0x3f/0x4a [22081.813751] [] ? notifier_call_chain+0x58/0x86 [22081.819951] [] ? notify_die+0x2d/0x32 [22081.825392] [] ? do_nmi+0x8e/0x242 [22081.830538] [] ? nmi+0x1a/0x20 [22081.835342] [] ? selinux_file_free_security+0x0/0x1a [22081.842105] [] ? x86_pmu_disable_counter+0x15/0x41 [22081.848673] <> [] ? x86_pmu_disable+0x86/0x103 [22081.855512] [] ? __perf_counter_remove_from_context+0x0/0xfe [22081.862926] [] ? counter_sched_out+0x30/0xce [22081.868909] [] ? __perf_counter_remove_from_context+0x59/0xfe [22081.876382] [] ? smp_call_function_single+0x6c/0xe6 [22081.882955] [] ? perf_release+0x86/0x14c [22081.888600] [] ? __fput+0xe7/0x195 [22081.893718] [] ? filp_close+0x5b/0x62 [22081.899107] [] ? put_files_struct+0x64/0xc2 [22081.905031] [] ? do_exit+0x1e2/0x6ef [22081.910360] [] ? _spin_lock_irqsave+0x9/0xe [22081.916292] [] ? do_group_exit+0x67/0x93 [22081.921953] [] ? sys_exit_group+0x12/0x16 [22081.927759] [] ? system_call_fastpath+0x16/0x1b [22081.934076] ---[ end trace 3a3936ce3e1b4505 ]--- And could potentially also fix the lockup reported by Marcelo Tosatti. Also, print more debug info in case of a detected lockup. [ Impact: fix lockup ] Reported-by: Marcelo Tosatti Acked-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 5537937696c55530447c20aa27daccb8d0d29b33 Author: Ming Lei Date: Mon May 18 23:04:46 2009 +0800 ftrace: fix check for return value of register_module_notifier in event_trace_init register_module_notifier() returns zero in the success case. So fix the inverted fail case check in trace events modules handler. [ Impact: fix spurious warning on ftrace initialization] Reported-by: Li Zefan Signed-off-by: Ming Lei Signed-off-by: Frederic Weisbecker commit 3e3ee6dc949d25423f72bb5ee5f58dfa79ac85c7 Author: Takashi Iwai Date: Wed May 20 16:47:59 2009 +0200 ALSA: ctxfi - Add depends on X86 The ctxfi driver requires explicitly the 4k page size, and gives a build error on architectures with non-4k pages. As a workaround, just add the kconfig dependency on X86, which is the only architecture ever tested. Signed-off-by: Takashi Iwai commit afedadf23a2c90f3ba0d963282cbe6a6be129494 Author: Peter Zijlstra Date: Wed May 20 12:21:22 2009 +0200 perf_counter: Optimize sched in/out of counters Avoid a function call for !group counters by directly calling the counter function. [ Impact: micro-optimize the code ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Marcelo Tosatti Cc: John Kacur LKML-Reference: <20090520102553.511933670@chello.nl> Signed-off-by: Ingo Molnar commit b986d7ec0f8b7ea3cc7366d80a137fbe839df227 Author: Peter Zijlstra Date: Wed May 20 12:21:21 2009 +0200 perf_counter: Optimize disable of time based sw counters Currently we call hrtimer_cancel() unconditionally on disable of time based software counters. Avoid when possible. [ Impact: micro-optimize the code ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: Marcelo Tosatti Cc: John Kacur LKML-Reference: <20090520102553.388185031@chello.nl> Signed-off-by: Ingo Molnar commit 26b119bc811a73bac6ecf95bdf284bf31c7955f0 Author: Peter Zijlstra Date: Wed May 20 12:21:20 2009 +0200 perf_counter: Log irq_period changes For the dynamic irq_period code, log whenever we change the period so that analyzing code can normalize the event flow. [ Impact: add new feature to allow more precise profiling ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: Marcelo Tosatti Cc: John Kacur LKML-Reference: <20090520102553.298769743@chello.nl> Signed-off-by: Ingo Molnar commit d7b629a34fc4134a43c730b5f0197855dc4948d0 Author: Peter Zijlstra Date: Wed May 20 12:21:19 2009 +0200 perf_counter: Solve the rotate_ctx vs inherit race differently Instead of disabling RR scheduling of the counters, use a different list that does not get rotated to iterate the counters on inheritance. [ Impact: cleanup, optimization ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: Marcelo Tosatti Cc: John Kacur LKML-Reference: <20090520102553.237504544@chello.nl> Signed-off-by: Ingo Molnar commit 09010978345e8883003bf411bb99753710eb5a3a Author: Steven Whitehouse Date: Wed May 20 10:48:47 2009 +0100 GFS2: Improve resource group error handling This patch improves the error handling in the case where we discover that the summary information in the resource group doesn't match the bitmap information while in the process of allocating blocks. Originally this resulted in a kernel bug, but this patch changes that so that we return -EIO and print some messages explaining what went wrong, and how to fix it. We also remember locally not to try and allocate from the same rgrp again, so that a subsequent allocation in a different rgrp should succeed. Signed-off-by: Steven Whitehouse commit 6943c92e87c4aa2a6d7a1f4dbd79cf4a0b5fd67b Author: Peter Ujfalusi Date: Mon May 18 16:02:05 2009 +0300 ASoC: TWL4030: Move the Headset pop-attenuation code to PGA event This patch adds SND_SOC_DAPM_PGA_E to the headset path, which handles the headset ramp up and down sequences needed for the pop noise removal. With this patch the order of the internal components in the twl4030 codec is turned on and off in a correct order. Signed-off-by: Peter Ujfalusi Tested-by: Anuj Aggarwal Tested-by: Jarkko Nikula Tested-by: Misael Lopez Cruz Signed-off-by: Mark Brown commit 4005d39a5f5549f1f6afe88abceed78b2ab225b6 Author: Peter Ujfalusi Date: Mon May 18 16:02:04 2009 +0300 ASoC: TWL4030: Change DAPM routings and controls for DACs and PGAs Restructuring the twl4030 codec's DAPM routing to be able to handle the power sequences correctly. The twl4030 codec internal implementation have this order: DAC -> Analog PGA -> Mixer/Mux While the ASoC framework expects the following order: DAC -> Mixer -> Analog PGA This patch moves the Analog PGA handling from SND_SOC_DAPM_PGA to _MIXER and adds two levels of mixer to handle the digital and analog loopback functionality. Now the analog loopback does not powers on any of the DACs. Signed-off-by: Peter Ujfalusi Tested-by: Anuj Aggarwal Tested-by: Jarkko Nikula Tested-by: Misael Lopez Cruz Signed-off-by: Mark Brown commit 2070887fdeacd9c13f3e805e3f0086c9f22a4d93 Author: Thomas Gleixner Date: Tue May 19 23:04:59 2009 +0200 futex: fix restart in wait_requeue_pi If the waiter has been requeued to the outer PI futex and is interrupted by a signal and the thread handles the signal then ERESTART_RESTARTBLOCK is changed to EINTR and the restart block is discarded. That way we return an unexcpected EINTR to user space instead of ending up in futex_lock_pi_restart. But we do not need to restart the syscall because we know that the condition has changed since we have been requeued. If we would simply restart the syscall then we would drop out via the comparison of the user space value with EWOULDBLOCK. The user space side needs to handle EWOULDBLOCK anyway as the enqueueing on the inner futex can race with a requeue/wake. So we can simply return EWOULDBLOCK to user space which also signals that we did not take the outer futex and let user space handle it in the same way it has to handle the requeue/wake race. Signed-off-by: Thomas Gleixner commit 1c840c14906d4ddf66c1f4f5daea059aad951c82 Author: Thomas Gleixner Date: Wed May 20 09:22:40 2009 +0200 futex: fix restart for early wakeup in futex_wait_requeue_pi() The futex_wait_requeue_pi op should restart unconditionally like futex_lock_pi. The user of that function e.g. pthread_cond_wait can not be interrupted so we do not care about the SA_RESTART flag of the signal. Clean up the FIXMEs. Signed-off-by: Thomas Gleixner commit c8b15a706d921baed3195407e4f55270112bb3c6 Author: Thomas Gleixner Date: Wed May 20 09:18:50 2009 +0200 futex: cleanup error exit Reuse the put_key_ref(key2) call in the exit path. Signed-off-by: Thomas Gleixner commit 521c180874dae86f675d23c4eade4dba8b1f2cc8 Merge: f1a11e0 64d1304 Author: Thomas Gleixner Date: Wed May 20 09:02:28 2009 +0200 Merge branch 'core/urgent' into core/futexes Merge reason: this branch was on an pre -rc1 base, merge it up to -rc6+ to get the latest upstream fixes. Conflicts: kernel/futex.c Signed-off-by: Thomas Gleixner commit 0a7ae2ff0d29bb3b327edff4c8ab67b3834fa811 Author: Jens Axboe Date: Wed May 20 08:54:31 2009 +0200 block: change the tag sync vs async restriction logic Make them fully share the tag space, but disallow async requests using the last any two slots. Signed-off-by: Jens Axboe commit 62669e61a5f559826b1d2e863649a6005eee629b Author: Paul Mundt Date: Wed May 20 11:27:13 2009 +0900 sh: mach-hp6xx: Fix up the hp6xx build for hd64461 changes. Fixes several compile errors due to the recent hd64461 I/O base changes. Signed-off-by: Paul Mundt commit c44d70a340554a33071339064a303ac0f1a31623 Author: Ingo Molnar Date: Sun May 17 11:24:08 2009 +0200 perf_counter: fix counter inheritance race Context rotation should not occur when we are in the middle of walking the counter list when inheriting counters ... [ Impact: fix occasionally incorrect perf stat results ] Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: Marcelo Tosatti Signed-off-by: Ingo Molnar commit 33b2fb303fe7f6b08bbb32f708e67b96eaa94a7a Author: Ingo Molnar Date: Sun May 17 11:08:41 2009 +0200 perf_counter: fix counter freeing logic Fix counter lifetime bugs which explain the crashes reported by Marcelo Tosatti and Arnaldo Carvalho de Melo. The new rule is: flushing + freeing is only done for a task's own counters, never for other tasks. [ Impact: fix crashes/lockups with inherited counters ] Reported-by: Arnaldo Carvalho de Melo Reported-by: Marcelo Tosatti Acked-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Signed-off-by: Ingo Molnar commit e24805dd85283ac0912b9c400768a4d171b400ff Author: Atsushi Nemoto Date: Tue May 19 22:12:15 2009 +0900 ASoC: Add TXx9 AC link controller driver (v3) This patch adds support for the integrated ACLC of the TXx9 family. Signed-off-by: Atsushi Nemoto Signed-off-by: Mark Brown commit ac36552a52a6ec8563ac0a109e2a0935673f4abb Author: Boaz Harrosh Date: Tue May 19 19:54:09 2009 +0200 scsi_lib: remove unused variable The last request completion cleanup in scsi_lib left an unused this_count variable in scsi_io_completion(). (It was used before in a code segment that now uses blk_end_request_all()) Signed-off-by: Boaz Harrosh Acked-by: Tejun Heo Acked-by: FUJITA Tomonori Signed-off-by: Jens Axboe commit 53674ac5a997a8eedbb2dfdc308b895170746c8b Author: Jens Axboe Date: Tue May 19 19:52:35 2009 +0200 block: add warning to blk_make_request() Add a note about how one needs to be careful when setting up these bio chains. Extracted from Boaz's updated patch. Signed-off-by: Jens Axboe commit c5642f4bbae30122beb696e723f6da273caa570e Author: Stephen Smalley Date: Tue May 19 09:02:23 2009 -0400 selinux: remove obsolete read buffer limit from sel_read_bool On Tue, 2009-05-19 at 00:05 -0400, Eamon Walsh wrote: > Recent versions of coreutils have bumped the read buffer size from 4K to > 32K in several of the utilities. > > This means that "cat /selinux/booleans/xserver_object_manager" no longer > works, it returns "Invalid argument" on F11. getsebool works fine. > > sel_read_bool has a check for "count > PAGE_SIZE" that doesn't seem to > be present in the other read functions. Maybe it could be removed? Yes, that check is obsoleted by the conversion of those functions to using simple_read_from_buffer(), which will reduce count if necessary to what is available in the buffer. Signed-off-by: Stephen Smalley Signed-off-by: James Morris commit ef9e8b14a5c1d0afbaf12b4c3b271188ddfc52a4 Author: Steven Whitehouse Date: Tue May 19 14:25:16 2009 +0100 GFS2: Don't warn when delete inode fails on ro filesystem If the filesystem is read-only, then we expect that delete inode will fail, so there is no need to warn about it. Signed-off-by: Steven Whitehouse commit 4c6f18fc81565967da20f2d4a3922cdba33f8e2b Author: Yinghai Lu Date: Mon May 18 10:23:28 2009 -0700 x86, io-apic: Don't mark pin_programmed early Peter bisected that: | commit b9c61b70075c87a8612624736faf4a2de5b1ed30 | Date: Wed May 6 10:10:06 2009 -0700 | | x86/pci: update pirq_enable_irq() to setup io apic routing | | So we can set io apic routing only when enabling the device irq. wrecked his opteron box, ata1 interrupts fail to get through. ata1 is using irq 11: [ 1.451839] sata_svw 0000:01:0e.0: version 2.3 [ 1.456333] sata_svw 0000:01:0e.0: PCI INT A -> GSI 11 (level, low) -> IRQ 11 [ 1.463639] scsi0 : sata_svw [ 1.466949] scsi1 : sata_svw [ 1.470022] scsi2 : sata_svw [ 1.473090] scsi3 : sata_svw [ 1.476112] ata1: SATA max UDMA/133 mmio m8192@0xff3fe000 port 0xff3fe000 irq 11 [ 1.483490] ata2: SATA max UDMA/133 mmio m8192@0xff3fe000 port 0xff3fe100 irq 11 [ 1.490870] ata3: SATA max UDMA/133 mmio m8192@0xff3fe000 port 0xff3fe200 irq 11 [ 1.498247] ata4: SATA max UDMA/133 mmio m8192@0xff3fe000 port 0xff3fe300 irq 11 that pin is overlapped with pin with legacy ones. We should not set bits in pin_programmed here, so that those bit could be set later via io_apic_set_pci_routing(). [ Impact: fix boot hang on certain systems ] Reported-by: Peter Zijlstra Signed-off-by: Yinghai Lu Tested-by: Peter Zijlstra Cc: Jack Steiner LKML-Reference: <4A119990.9020606@kernel.org> Signed-off-by: Ingo Molnar commit 4aee2ad461889132bfb5a1518a9580d00e17008c Author: Jaswinder Singh Rajput Date: Tue May 19 17:07:01 2009 +0530 x86: asm/processor.h: remove double declaration Remove double declaration of: extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c); extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); extern unsigned short num_cache_leaves; they are already defined in the same file. [ Impact: cleanup ] Signed-off-by: Jaswinder Singh Rajput LKML-Reference: <1242733021.3377.1.camel@localhost.localdomain> Signed-off-by: Ingo Molnar commit fa7979663190240b838ab8c8bad7f59e618bf77c Author: Takashi Iwai Date: Tue May 19 12:50:04 2009 +0200 ALSA: hda - Fix digital beep tone calculation The digital beep tone is calculated in two different ways depending on the codec chip. The standard one is using a divider, and another one is a linear tone for IDT/STAC codecs. Currently, only the latter type is used for all codecs, which resulted in a wrong tone pitch. This patch adds the calculation of the standard HD-audio type. Also clean-up the fields in hda_beep struct. Reference: bko#13162 http://bugzilla.kernel.org/show_bug.cgi?id=13162 Signed-off-by: Takashi Iwai commit 4abc1cc2f9fe4b6bb3acc1d78e2c15af47b8133d Author: Takashi Iwai Date: Tue May 19 12:16:46 2009 +0200 ALSA: hda - Add prefix to kernel messages Add proper prefix to each kernel message in hda_intel.c. Also, avoid the unneeded prefix when CONFIG_SND_VERBOSE_PRINTK is used together with snd_print*(). Reference: bko#13207 http://bugzilla.kernel.org/show_bug.cgi?id=13207 Signed-off-by: Takashi Iwai commit a411f4bbb89f1f08687b344064d6775bce1e4658 Author: Boaz Harrosh Date: Sun May 17 19:00:01 2009 +0300 block: Un-export blk_rq_append_bio OSD was the last in-tree user of blk_rq_append_bio(). Now that it is fixed blk_rq_append_bio is un-exported and is only used internally by block layer. Signed-off-by: Boaz Harrosh Signed-off-by: Jens Axboe commit c29b70f6ee4f2fa3ef07f55bc9082945861e5391 Author: Boaz Harrosh Date: Sun May 17 18:58:41 2009 +0300 libosd: Use of new blk_make_request Use new blk_make_request() to allocate a request from bio and avoid using deprecated blk_rq_append_bio(). This patch is dependent on a block layer patch titled: [BLOCK] New blk_make_request() takes bio returns request This is the last usage of blk_rq_append_bio in osd, it can now be un-exported. Signed-off-by: Boaz Harrosh CC: Jeff Garzik CC: FUJITA Tomonori Signed-off-by: Jens Axboe commit 79eb63e9e5875b84341a3a05f8e6ae9cdb4bb6f6 Author: Boaz Harrosh Date: Sun May 17 18:57:15 2009 +0300 block: Add blk_make_request(), takes bio, returns a request New block API: given a struct bio allocates a new request. This is the parallel of generic_make_request for BLOCK_PC commands users. The passed bio may be a chained-bio. The bio is bounced if needed inside the call to this member. This is in the effort of un-exporting blk_rq_append_bio(). Signed-off-by: Boaz Harrosh CC: Jeff Garzik Signed-off-by: Jens Axboe commit bc38bf106c967389a465d926be22c7371abba69d Author: Boaz Harrosh Date: Sun May 17 18:56:17 2009 +0300 libosd: Use new blk_rq_map_kern Now that blk_rq_map_kern will append the buffer onto the request we can use it easily for adding extra segments (eg. attributes) This patch is dependent on a block layer patch titled: [BLOCK] allow blk_rq_map_kern to append to requests Signed-off-by: Boaz Harrosh Signed-off-by: Jens Axboe commit 3a5a39276d2a32b05b1ee25b384516805b17cf87 Author: James Bottomley Date: Sun May 17 18:55:18 2009 +0300 block: allow blk_rq_map_kern to append to requests Use blk_rq_append_bio() internally instead of blk_rq_bio_prep() so blk_rq_map_kern can be called multiple times, to map multiple buffers. This is in the effort to un-export blk_rq_append_bio() Signed-off-by: James Bottomley Signed-off-by: Boaz Harrosh Signed-off-by: Jens Axboe commit b2858d7d1639c04ca3c54988d76c5f7300b76f1c Author: Miklos Szeredi Date: Tue May 19 11:37:46 2009 +0200 splice: fix kmaps in default_file_splice_write() Unfortunately multiple kmap() within a single thread are deadlockable, so writing out multiple buffers with writev() isn't possible. Change the implementation so that it does a separate write() for each buffer. This actually simplifies the code a lot since the splice_from_pipe() helper can be used. This limitation is caused by HIGHMEM pages, and so only affects a subset of architectures and configurations. In the future it may be worth to implement default_file_splice_write() in a more efficient way on configs that allow it. Signed-off-by: Miklos Szeredi Signed-off-by: Jens Axboe commit 4fc981ef9e7c0953d5c4896ce088b19c50cb018f Author: Tejun Heo Date: Tue May 19 18:33:06 2009 +0900 bio: always copy back data for copied kernel requests When a read bio_copy_kern() request fails, the content of the bounce buffer is not copied back. However, as request failure doesn't necessarily mean complete failure, the buffer state can be useful. This behavior is also inconsistent with the user map counterpart and causes the subtle difference between bounced and unbounced IO causes confusion. This patch makes bio_copy_kern_endio() ignore @err and always copy back data on request completion. Signed-off-by: Tejun Heo Cc: Boaz Harrosh Cc: James Bottomley Signed-off-by: Jens Axboe commit 5f49f63178360b07a095bd33b0d850d60edf7590 Author: Tejun Heo Date: Tue May 19 18:33:05 2009 +0900 block: set rq->resid_len to blk_rq_bytes() on issue In commit c3a4d78c580de4edc9ef0f7c59812fb02ceb037f, while introducing rq->resid_len, the default value of residue count was changed from full count to zero. The conversion was done under the assumption that when a request fails residue count wasn't defined. However, Boaz and James pointed out that this wasn't true and the residue count should be preserved for failed requests too. This patchset restores the original behavior by setting rq->resid_len to blk_rq_bytes(rq) on request start and restoring explicit clearing in affected drivers. While at it, take advantage of the fact that rq->resid_len is set to full count where applicable. * ide-cd: rq->resid_len cleared on pc success * mptsas: req->resid_len cleared on success * sas_expander: rsp/req->resid_len cleared on success * mpt2sas_transport: req->resid_len cleared on success * ide-cd, ide-tape, mptsas, sas_host_smp, mpt2sas_transport, ub: take advantage of initial full count to simplify code Boaz Harrosh spotted bug in resid_len initialization. Fixed as suggested. Signed-off-by: Tejun Heo Acked-by: Borislav Petkov Cc: Boaz Harrosh Cc: James Bottomley Cc: Pete Zaitcev Cc: Bartlomiej Zolnierkiewicz Cc: Sergei Shtylyov Cc: Eric Moore Cc: Darrick J. Wong Signed-off-by: Jens Axboe commit 3755100dd5f66761aaaa7ae44c70b319a7c78a56 Author: Tejun Heo Date: Tue May 19 18:33:04 2009 +0900 ub: use __blk_end_request_all() ub_end_rq() always tries to complete full request. The @cmd_len parameter was there because rq->data_len used to be overwritten with residue count. Drop @cmd_len and use __blk_end_request_all(). Signed-off-by: Tejun Heo Cc: Pete Zaitcev Signed-off-by: Jens Axboe commit 11a728110633320d95935a1ba79c038db303596f Author: Lopez Cruz, Misael Date: Mon May 18 11:53:04 2009 -0500 ASoC: SDP3430: Connect twl4030 voice DAI to McBSP3 Connect twl4030 voice DAI to McBSP3 in sdp3430 machine driver. Voice DAI init function enables corresponding interface by writting directly to VOICE_IF codec register. Signed-off-by: Misael Lopez Cruz Acked-by: Peter Ujflausi Signed-off-by: Mark Brown commit b74bd40fa4ae018898c8a6429c2a7daf61516524 Author: Lopez Cruz, Misael Date: Mon May 18 11:52:55 2009 -0500 ASoC: TWL4030: Add control for selecting codec operation mode Add a control for selecting the codec operation mode. TWL4030 codec has two modes: - Option 1. Audio only (4 audio DACs) - Option 2. Voice/Audio (2 audio DACs and voice ADC/DAC) Control is restricted when a stream is ongoing, since codec's operation mode cannot be changed on-the-fly. Signed-off-by: Misael Lopez Cruz Acked-by: Peter Ujflausi Signed-off-by: Mark Brown commit e9ccb73ab57ada469602506496c42e5b4468ac3e Author: Steven Whitehouse Date: Tue May 19 10:23:23 2009 +0100 GFS2: Update docs Update a few things which were out of date, and fix a typo. Signed-off-by: Steven Whitehouse commit fe64d517df0970a68417184a12fcd4ba0589cc28 Author: Steven Whitehouse Date: Tue May 19 10:01:18 2009 +0100 GFS2: Umount recovery race fix This patch fixes a race condition where we can receive recovery requests part way through processing a umount. This was causing problems since the recovery thread had already gone away. Looking in more detail at the recovery code, it was really trying to implement a slight variation on a work queue, and that happens to align nicely with the recently introduced slow-work subsystem. As a result I've updated the code to use slow-work, rather than its own home grown variety of work queue. When using the wait_on_bit() function, I noticed that the wait function that was supplied as an argument was appearing in the WCHAN field, so I've updated the function names in order to produce more meaningful output. Signed-off-by: Steven Whitehouse commit 181da78cd048ce866b05a2e0208ea09d2f80e721 Author: Peter Ujfalusi Date: Tue May 19 10:51:03 2009 +0300 ASoC: TWL4030: Fix Analog capture path for AUXR AUXR is selected by bit 2 and not by bit 1 in the ANAMICR register. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit fd51d251e4cdb21f68e9dbc4336514d64a105a79 Author: Stefan Raspl Date: Tue May 19 09:59:08 2009 +0200 blktrace: remove debugfs entries on bad path debugfs directory entries for devices are not removed on some of the failure pathes in do_blk_trace_setup(). One way to reproduce is to start blktrace on multiple devices with insufficient Vmalloc space: Devices will fail with a message like this: BLKTRACESETUP(2) /dev/sdu failed: 5/Input/output error If so, the respective entries in debugfs (e.g. /sys/kernel/debug/block/sdu) will remain and subsequent attempts to start blktrace on the respective devices will not succeed due to existing directories. [ Impact: fix /debug/tracing file cleanup corner case ] Signed-off-by: Stefan Raspl Acked-by: Li Zefan Cc: Li Zefan Cc: schwidefsky@de.ibm.com Cc: heiko.carstens@de.ibm.com LKML-Reference: <4A1266CC.5040801@linux.vnet.ibm.com> Signed-off-by: Ingo Molnar commit 143c145e3a475065a4be661468d0df1bd0b25f74 Author: Li Zefan Date: Tue May 19 14:43:15 2009 +0800 tracing/events: Documentation updates - fix some typos - document the difference between '>' and '>>' - document the 'enable' toggle - remove section "Defining an event-enabled tracepoint", since it's out-dated and sample/trace_events/ already serves this purpose. v2: add "Updated by Li Zefan" [ Impact: make documentation up-to-date ] Signed-off-by: Li Zefan Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: "Theodore Ts'o" LKML-Reference: <4A125503.5060406@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 4200efd9acda4accf24640f1e77d24fdcdb524df Author: Ingo Molnar Date: Tue May 19 09:22:19 2009 +0200 sched: properly define the sched_group::cpumask and sched_domain::span fields Properly document the variable-size structure tricks we are doing wrt. struct sched_group and sched_domain, and use the field[0] GCC extension instead of defining a vla array. Dont use unions for this, as pointed out by Linus. [ Impact: cleanup, un-confuse Sparse and LLVM ] Reported-by: Jeff Garzik Acked-by: Linus Torvalds LKML-Reference: Signed-off-by: Ingo Molnar commit 75834fc3b6fcff00327f5d2a18760c1e8e0179c5 Author: Eric Paris Date: Mon May 18 10:26:10 2009 -0400 SELinux: move SELINUX_MAGIC into magic.h The selinuxfs superblock magic is used inside the IMA code, but is being defined in two places and could someday get out of sync. This patch moves the declaration into magic.h so it is only done once. Signed-off-by: Eric Paris Signed-off-by: James Morris commit f83fba8baab9e95fff0fe2be0e1e32a1650bdd7f Author: Mark Brown Date: Mon May 18 15:44:43 2009 +0100 ASoC: Add debug trace for bias level transitions A standard way of making sure we know when the bias level changes. Signed-off-by: Mark Brown commit 452c5eaa0d5162e02ffee742ea17540887bc2904 Author: Mark Brown Date: Sun May 17 21:41:23 2009 +0100 ASoC: Integrate bias management with DAPM power management Rather than managing the bias level of the system based on if there is an active audio stream manage it based on there being an active DAPM widget. This simplifies the code a little, moving the power handling into one place, and improves audio performance for bypass paths when no playbacks or captures are active. Signed-off-by: Mark Brown commit aef908434cd24dd5529065bf5d781773fad21125 Author: Mark Brown Date: Sat May 16 17:53:16 2009 +0100 ASoC: Make DAPM sysfs entries non-optional sysfs is so standard these days there's no point. Signed-off-by: Mark Brown commit 6d3ddc81f5762d54ce7d1db70eb757c6c12fabbc Author: Mark Brown Date: Sat May 16 17:47:29 2009 +0100 ASoC: Split DAPM power checks from sequencing of power changes DAPM has always applied any changes to the power state of widgets as soon as it has determined that they are required. Instead of doing this store all the changes that are required on lists of widgets to power up and down, then iterate over those lists and apply the changes. This changes the sequence in which changes are implemented, doing all power downs before power ups and always using the up/down sequences (previously they were only used when changes were due to DAC/ADC power events). The error handling is also changed so that we continue attempting to power widgets if some changes fail. The main benefit of this is to allow future changes to do optimisations over the whole power sequence and to reduce the number of walks of the widget graph required to check the power status of widgets. Signed-off-by: Mark Brown commit eb4c41d30ba1f973c8b10be3644571ab997ae0d6 Author: Torben Schulz Date: Mon May 18 15:02:35 2009 +0200 ALSA: hda - Improved MacBook 3,1 support This patch adds support for MacBook 3,1 sound by adding a model new "mb31" with the appropriate init verbs, mixers and channel modes to the ALC883 configuration. patch_alc882() and patch_alc883() are modified to handle the MacBook 3,1 sound-chip (Realtek ALC889A) correctly. Signed-off-by: Torben Schulz Signed-off-by: Takashi Iwai commit f831cc03490c78a76e2d35ad77ec2292d0323728 Author: Jens Axboe Date: Mon May 18 14:44:45 2009 +0200 virtio_blk: get rid of unused variable drivers/block/virtio_blk.c: In function 'blk_done': drivers/block/virtio_blk.c:53: warning: unused variable 'nr_bytes' Leftover from commit 1cde26f928863d90e9e7c1217880c8450464d305 Signed-off-by: Jens Axboe commit 1cde26f928863d90e9e7c1217880c8450464d305 Author: Hannes Reinecke Date: Mon May 18 14:41:30 2009 +0200 virtio_blk: SG_IO passthru support Add support for SG_IO passthru to virtio_blk. We add the scsi command block after the normal outhdr, and the scsi inhdr with full status information aswell as the sense buffer before the regular inhdr. [hch: forward ported, added the VIRTIO_BLK_F_SCSI flags, some comments and tested the whole beast] [axboe: updated to use ->resid and not dual-path the byte count] Signed-off-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Rusty Russell (+ checkpatch.pl tweak) Signed-off-by: Jens Axboe commit 6c3b46f74587d46e71b8c2b78fdca626a3aca280 Author: Christoph Hellwig Date: Mon May 18 14:38:28 2009 +0200 virtio_blk: don't blindly derefence req->rq_disk request->rq_disk is only set for FS requests or BLOCK_PC requests originating from the generic block layer scsi ioctls. It's not set for requests origination from other soures or internal cache flush commands implemented by the patch I'll send after this. So instead of using it to get at the private data in do_virtblk_request setup queue->queuedata and use it. Signed-off-by: Christoph Hellwig Signed-off-by: Rusty Russell Signed-off-by: Jens Axboe commit 313f6e2d40bd67e394a65e7d64acd0cf9c9d248d Author: Takashi Iwai Date: Mon May 18 12:40:52 2009 +0200 ALSA: hda - Avoid conflicts with snd-ctxfi driver The PCI entries of Creative with HD-audio class can be the devices with emu20k1/emu20k2 chips. These are supported better by snd-ctxfi driver. With that driver, the device will mutate from HD-audio to its native class. This patch adds a simple ifdef to avoid the conflict of device probe between snd-hda-intel and snd-ctxfi drivers. 1102:0009 seems still OK to be added as it has no emu20kx chip, and is a pure HD-audio device. Signed-off-by: Takashi Iwai commit 6c627f3978bf3059d45713e2e1240b7c43cc85f5 Author: Takashi Iwai Date: Mon May 18 12:33:36 2009 +0200 ALSA: hda - Show the actual chip name in 'unkown model' messages Show the actual chip name in 'unknown model..' info messages for Realtek codecs. Signed-off-by: Takashi Iwai commit b7a755a8a145a7e34e735bda9c452317de7a538a Author: Misael Lopez Cruz Date: Sun May 17 20:02:31 2009 -0500 ASoC: TWL4030: Enable/disable voice digital filters Enable TWL4030 VTXL/VTXR and VRX digital filters for uplink and downlink paths, respectively. This patch also corrects voice 8/16kHz mode selection bit (SEL_16K) of CODEC_MODE register. Signed-off-by: Misael Lopez Cruz Acked-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 24ed0c4bfc7d2d7507bb9d50f7f3bbdcd85d76dd Author: Ming Lei Date: Sun May 17 15:31:38 2009 +0800 tracing: fix check for return value of register_module_notifier return zero should be correct, so fix it. [ Impact: eliminate incorrect syslog message ] Signed-off-by: Ming Lei Acked-by: Frederic Weisbecker Acked-by: Li Zefan Cc: rostedt@goodmis.org LKML-Reference: <1242545498-7285-1-git-send-email-tom.leiming@gmail.com> Signed-off-by: Ingo Molnar commit 1079cac0f4eb7d968395378b1625979d4c818dd6 Merge: 5872144 1406de8 Author: Ingo Molnar Date: Mon May 18 10:15:09 2009 +0200 Merge commit 'v2.6.30-rc6' into tracing/core Merge reason: we were on an -rc4 base, sync up to -rc6 Signed-off-by: Ingo Molnar commit b68f1d2e7aa21029d73c7d453a8046e95d351740 Author: Ingo Molnar Date: Sun May 17 19:37:25 2009 +0200 perf_counter, x86: speed up the scheduling fast-path We have to set up the LVT entry only at counter init time, not at every switch-in time. There's friction between NMI and non-NMI use here - we'll probably remove the per counter configurability of it - but until then, dont slow down things ... [ Impact: micro-optimization ] Cc: Peter Zijlstra Cc: Srivatsa Vaddagiri Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: Marcelo Tosatti LKML-Reference: Signed-off-by: Ingo Molnar commit f1bdb523880c7f6990e9e8e50b0fc972ca475e84 Author: Yinghai Lu Date: Fri May 15 13:05:16 2009 -0700 x86, irq: don't call mp_config_acpi_gsi() if update_mptable is not enabled Len expressed concern that the update_mptable feature has side-effects on the ACPI code. Make it sure explicitly that the code only ever gets called if the (default disabled) update_mptable boot quirk option is disabled. [ Impact: isolate the update_mptable feature from ACPI code more ] Signed-off-by: Yinghai Lu Cc: Len Brown LKML-Reference: <4A0DC832.5090200@kernel.org> Signed-off-by: Ingo Molnar commit 629e15d245f46bef9d26199b450f882f9437a8fe Author: Yinghai Lu Date: Fri May 15 13:05:16 2009 -0700 x86, irq: update_mptable needs pci_routeirq To get all device irq routing and to save them. This is basically an implicit pci=routeirq enablement if (and on if) the update_mptable boot option (which is off by default) has been specified. [ Impact: extend the update_mptable boot opion's scope ] Signed-off-by: Yinghai Lu Cc: Jesse Barnes LKML-Reference: <4A0DB7B4.4060702@kernel.org> Signed-off-by: Ingo Molnar commit 35d5a9a61490bf39d2e48d7f499c8c801a39ebe9 Author: Yinghai Lu Date: Fri May 15 13:59:37 2009 -0700 x86: fix system without memory on node0 Jack found a boot crash on a system which doesn't have memory on node0. It turns out with recent per_cpu changes, node_number for BSP will always be 0, and it is not consistent to cpu_to_node() that might set it to a different (nearer) node already. aka when numa_set_node() for node0 is called early before per_cpu area is setup: two places touched that per_cpu(node_number,): 1. in cpu/common.c::cpu_init() and it is not for BP | #ifdef CONFIG_NUMA | if (cpu != 0 && percpu_read(node_number) == 0 && | cpu_to_node(cpu) != NUMA_NO_NODE) | percpu_write(node_number, cpu_to_node(cpu)); | #endif for BP: traps_init ==> cpu_init for AP: start_secondary ==> cpu_init 2. cpu/intel.c or amd.c::srat_detect_node via numa_set_node() for BP: check_bugs ==> identify_boot_cpu ==> identify_cpu() that is rather later before numa_node_id() is used for BP... for AP: start_secondary => smp_callin => smp_store_cpu_info() => => identify_secondary_cpu => identify_cpu() so try to set that for BP earlier in setup_per_cpu_areas(), and don't bother to set that for APs there (it will be updated later and will be used later) (and don't mess the 0 before the copying BP per_cpu data to APs) [ Impact: fix boot crash on memoryless node-0 ] Reported-and-tested-by: Jack Steiner Cc: Tejun Heo Signed-off-by: Yinghai Lu LKML-Reference: <4A0C4A02.7050401@kernel.org> Signed-off-by: Ingo Molnar commit 7c43769a9776141ec23ca81a1bdd5a9c0512f165 Author: Yinghai Lu Date: Fri May 15 13:59:37 2009 -0700 x86, mm: Fix node_possible_map logic Recently there were some changes to the meaning of node_possible_map, and it is quite strange: - the node without memory would be set in node_possible_map - but some node with less NODE_MIN_SIZE will be kicked out of node_possible_map. fix it by adding strict_setup_node_bootmem(). Also, remove unparse_node(). so result will be: 1. cpu_to_node() will return online node only (nearest one) 2. apicid_to_node() still returns the node that could be not online but is set in node_possible_map. 3. node_possible_map will include nodes that mem on it are less NODE_MIN_SIZE v2: after move_cpus_to_node change. [ Impact: get node_possible_map right ] Signed-off-by: Yinghai Lu Tested-by: Jack Steiner LKML-Reference: <4A0C49BE.6080800@kernel.org> [ v3: various small cleanups and comment clarifications ] Signed-off-by: Ingo Molnar commit 888a589f6be07d624e21e2174d98375e9f95911b Author: Yinghai Lu Date: Fri May 15 13:59:37 2009 -0700 mm, x86: remove MEMORY_HOTPLUG_RESERVE related code after: | commit b263295dbffd33b0fbff670720fa178c30e3392a | Author: Christoph Lameter | Date: Wed Jan 30 13:30:47 2008 +0100 | | x86: 64-bit, make sparsemem vmemmap the only memory model we don't have MEMORY_HOTPLUG_RESERVE anymore. Historically, x86-64 had an architecture-specific method for memory hotplug whereby it scanned the SRAT for physical memory ranges that could be potentially used for memory hot-add later. By reserving those ranges without physical memory, the memmap would be allocated and left dormant until needed. This depended on the DISCONTIG memory model which has been removed so the code implementing HOTPLUG_RESERVE is now dead. This patch removes the dead code used by MEMORY_HOTPLUG_RESERVE. (Changelog authored by Mel.) v2: updated changelog, and remove hotadd= in doc [ Impact: remove dead code ] Signed-off-by: Yinghai Lu Reviewed-by: Christoph Lameter Reviewed-by: Mel Gorman Workflow-found-OK-by: Andrew Morton LKML-Reference: <4A0C4910.7090508@kernel.org> Signed-off-by: Ingo Molnar commit b286e21868ea1af724a7a4802da2c8e144fa70de Merge: ed077b5 1406de8 Author: Ingo Molnar Date: Mon May 18 09:12:45 2009 +0200 Merge commit 'v2.6.30-rc6' into x86/mm Merge reason: sync up to -rc6 which has changes to mm/ which we are going to touch in the commits to follow as well. Signed-off-by: Ingo Molnar commit 2759c3287de27266e06f1f4e82cbd2d65f6a044c Author: Yinghai Lu Date: Fri May 15 13:05:16 2009 -0700 x86: don't call read_apic_id if !cpu_has_apic should not call that if apic is disabled. [ Impact: fix crash on certain UP configs ] Signed-off-by: Yinghai Lu Cc: Cyrill Gorcunov LKML-Reference: <4A09CCBB.2000306@kernel.org> Signed-off-by: Ingo Molnar commit e5198075c67a22ec9a09565b1ce88d3d3f5ba855 Author: Yinghai Lu Date: Fri May 15 13:05:16 2009 -0700 x86, apic: introduce io_apic_irq_attr according to Ingo, io_apic irq-setup related functions have too many parameters with a repetitive signature. So reduce related funcs to get less params by passing a pointer to a newly defined io_apic_irq_attr structure. v2: io_apic_irq ==> irq_attr triggering ==> trigger v3: add set_io_apic_irq_attr [ Impact: cleanup ] Signed-off-by: Yinghai Lu Cc: Andrew Morton Cc: Jesse Barnes Cc: Len Brown LKML-Reference: <4A08ACD3.2070401@kernel.org> Signed-off-by: Ingo Molnar commit c0daaf3f1f672defa3a45ca449b76d0e86c55892 Author: Paul Mackerras Date: Mon May 18 14:02:12 2009 +1000 perf_counter: powerpc: initialize cpuhw pointer before use Commit 9e35ad38 ("perf_counter: Rework the perf counter disable/enable") added code to the powerpc hw_perf_enable (renamed from hw_perf_restore) to test cpuhw->disabled and return immediately if it is not set (i.e. if the PMU is already enabled). Unfortunately the test got added before cpuhw was initialized, resulting in an oops the first time hw_perf_enable got called. This fixes it by moving the initialization of cpuhw to before cpuhw->disabled is tested. [ Impact: fix oops-causing bug on powerpc ] Signed-off-by: Paul Mackerras Cc: Peter Zijlstra Cc: Corey Ashford LKML-Reference: <18960.56772.869734.304631@drongo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit dc3f81b129b5439ba7bac265bbc6a51a39275dae Merge: d2517a4 1406de8 Author: Ingo Molnar Date: Mon May 18 07:37:44 2009 +0200 Merge commit 'v2.6.30-rc6' into perfcounters/core Merge reason: this branch was on an -rc4 base, merge it up to -rc6 to get the latest upstream fixes. Signed-off-by: Ingo Molnar commit 0f7ee7c17241915fdaff49d1a36f5aafd80a7dce Author: Manish Katiyar Date: Sun May 17 23:52:51 2009 -0400 ext2: Fix memory leak in ext2_fill_super() in case of a failed mount Signed-off-by: Manish Katiyar Signed-off-by: "Theodore Ts'o" commit de5ce037304f2c88a319b1c3b808ab0c4c618c1c Author: Manish Katiyar Date: Sun May 17 23:52:47 2009 -0400 ext3: Fix memory leak in ext3_fill_super() in case of a failed mount Signed-off-by: Manish Katiyar Signed-off-by: "Theodore Ts'o" commit f68301656b5f5d2de104f2687add6beeb8f3c3b9 Author: Manish Katiyar Date: Sun May 17 23:52:44 2009 -0400 ext4: Fix memory leak in ext4_fill_super() in case of a failed mount Signed-off-by: Manish Katiyar Signed-off-by: "Theodore Ts'o" commit 0568c518937ee3a9b6a94d18bae9c150fe5d6832 Author: Theodore Ts'o Date: Sun May 17 23:31:23 2009 -0400 ext4: down i_data_sem only for read when walking tree for fiemap Not sure why I put this in as down_write originally; all we are doing is walking the tree, nothing will change under us and concurrent reads should be no problem. Signed-off-by: Eric Sandeen Signed-off-by: "Theodore Ts'o" commit 6fd058f7791087648c683eb8572edf3be3c4c23c Author: Theodore Ts'o Date: Sun May 17 15:38:01 2009 -0400 ext4: Add a comprehensive block validity check to ext4_get_blocks() To catch filesystem bugs or corruption which could lead to the filesystem getting severly damaged, this patch adds a facility for tracking all of the filesystem metadata blocks by contiguous regions in a red-black tree. This allows quick searching of the tree to locate extents which might overlap with filesystem metadata blocks. This facility is also used by the multi-block allocator to assure that it is not allocating blocks out of the system zone, as well as by the routines used when reading indirect blocks and extents information from disk to make sure their contents are valid. Signed-off-by: "Theodore Ts'o" commit 5b740ea975c4ce3da12ac21b56f9e43354ca4327 Author: Julia Lawall Date: Sun May 17 11:29:21 2009 +0200 sound: use dev_set_drvdata Eliminate direct accesses to the driver_data field. cf 82ab13b26f15f49be45f15ccc96bfa0b81dfd015 The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ struct device *dev; expression E; type T; @@ - dev->driver_data = (T)E + dev_set_drvdata(dev, E) @@ struct device *dev; type T; @@ - (T)dev->driver_data + dev_get_drvdata(dev) // Signed-off-by: Julia Lawall Signed-off-by: Takashi Iwai commit 9f36d31437922354d104a2db407f397e79e4027e Author: Bartlomiej Zolnierkiewicz Date: Sun May 17 19:12:25 2009 +0200 ide: remove hw_regs_t typedef Remove hw_regs_t typedef and rename struct hw_regs_s to struct ide_hw. There should be no functional changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit dca3983059a4481e4ae97bbf0ac4b4c21429e1a5 Author: Bartlomiej Zolnierkiewicz Date: Sun May 17 19:12:24 2009 +0200 ide: pass number of ports to ide_host_{alloc,add}() (v2) Pass number of ports to ide_host_{alloc,add}() and then update all users accordingly. v2: - drop no longer needed NULL initializers in buddha.c, cmd640.c and gayle.c (noticed by Sergei) There should be no functional changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 29e52cf793ded6bece50de50e738596f94f07d9f Author: Bartlomiej Zolnierkiewicz Date: Sun May 17 19:12:22 2009 +0200 ide: remove chipset field from hw_regs_t * Convert host drivers that still use hw_regs_t's chipset field to use the one in struct ide_port_info instead. * Move special handling of ide_pci chipset type from ide_hw_configure() to ide_init_port(). * Remove chipset field from hw_regs_t. While at it: - remove stale comment in delkin_cb.c There should be no functional changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit ca1b96e00ab5d1b0838965834469a0284c81a517 Author: Bartlomiej Zolnierkiewicz Date: Sun May 17 19:12:21 2009 +0200 ide: replace special_t typedef by IDE_SFLAG_* flags Replace: - special_t typedef by IDE_SFLAG_* flags - 'special_t special' ide_drive_t's field by 'u8 special_flags' one There should be no functional changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 582078ee3d7dacd74a7b3fe02ea258cadf32b602 Author: Bartlomiej Zolnierkiewicz Date: Sun May 17 19:12:18 2009 +0200 ide: merge ide_disk_special() into do_special() (v2) While at it: - change debug printk() level to KERN_DEBUG and use __func__ - update documentation v2: - fix DEBUG build (noticed by Sergei) There should be no functional changes caused by this patch. Cc: Sergei Shtylyov Cc: Joe Perches Signed-off-by: Bartlomiej Zolnierkiewicz commit 5f582c8e2193e3848039de87e6a3ace7cbc7ed88 Author: Bartlomiej Zolnierkiewicz Date: Sun May 17 19:12:18 2009 +0200 ide: BUG() on unknown flags in ide_disk_special() Signed-off-by: Bartlomiej Zolnierkiewicz commit 6029336426a2b43e4bc6f4a84be8789a047d139e Author: Joao Ramos Date: Sun May 17 17:22:54 2009 +0200 ide: try to use PIO Mode 0 during probe if possible Initially set PIO Mode 0 for all host drivers that have a 'set_pio_mode' method before the IDE core figures out the most suited PIO mode for the attached device. Signed-off-by: Joao Ramos Cc: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit e8e7526c3c0863be25ab03a0871ee0978de5ba50 Author: Mark de Wever Date: Sun May 17 17:22:53 2009 +0200 ide-tape: fix debug call This error only occurs when IDETAPE_DEBUG_LOG is enabled. Signed-off-by: Mark de Wever Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit d2517a49d55536b38c7a87e5289550cfedaa4dcc Author: Ingo Molnar Date: Sun May 17 10:04:45 2009 +0200 perf_counter, x86: fix zero irq_period counters The quirk to irq_period unearthed an unrobustness we had in the hw_counter initialization sequence: we left irq_period at 0, which was then quirked up to 2 ... which then generated a _lot_ of interrupts during 'perf stat' runs, slowed them down and skewed the counter results in general. Initialize irq_period to the maximum instead. [ Impact: fix perf stat results ] Cc: Peter Zijlstra Cc: Srivatsa Vaddagiri Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: Marcelo Tosatti Signed-off-by: Ingo Molnar commit 0203026b58b4299ba7281c0b4b417207c1f05d0e Author: Ingo Molnar Date: Sun May 17 11:24:08 2009 +0200 perf_counter: fix threaded task exit Flushing counters in __exit_signal() with irqs disabled is not a good idea as perf_counter_exit_task() acquires mutexes. So flush it before acquiring the tasklist lock. (Note, we still need a fix for when the PID has been unhashed.) [ Impact: fix crash with inherited counters ] Cc: Peter Zijlstra Cc: Srivatsa Vaddagiri Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: Marcelo Tosatti Signed-off-by: Ingo Molnar commit 856d56b9e5de650a64a6c41c17aaed702b55d578 Author: Peter Zijlstra Date: Fri May 15 20:45:59 2009 +0200 perf_counter: Fix counter inheritance Srivatsa Vaddagiri reported that a Java workload triggers this warning in kernel/exit.c: WARN_ON_ONCE(!list_empty(&tsk->perf_counter_ctx.counter_list)); Add the inherited counter propagation on self-detach, this could cause counter leaks and incomplete stats in threaded code like the below: #include #include void *thread(void *arg) { sleep(5); return NULL; } void main(void) { pthread_t thr; pthread_create(&thr, NULL, thread, NULL); } Reported-by: Srivatsa Vaddagiri Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: Marcelo Tosatti Signed-off-by: Ingo Molnar commit 8bc2095951517e2c74b8aeeca4685ddd6b16ed4b Author: Peter Zijlstra Date: Fri May 15 20:45:59 2009 +0200 perf_counter: Fix inheritance cleanup code Clean up code that open-coded the list_{add,del}_counter() code in __perf_counter_exit_task() which consequently diverged. This could lead to software counter crashes. Also, fold the ctx->nr_counter inc/dec into those functions and clean up some of the related code. [ Impact: fix potential sw counter crash, cleanup ] Signed-off-by: Peter Zijlstra Cc: Srivatsa Vaddagiri Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: Marcelo Tosatti Signed-off-by: Ingo Molnar Signed-off-by: Ingo Molnar commit fdac1c76beb9d142675c852834a64a77703bd450 Merge: 0368241 d878829 Author: Bartlomiej Zolnierkiewicz Date: Sat May 16 19:49:03 2009 +0200 Merge branch 'for-linus' into for-next commit 812a2cca295ee7f56cd1b988a0f93646285c214a Author: Takashi Iwai Date: Sat May 16 10:00:49 2009 +0200 ALSA: hda - Split codec->name to vendor and chip name strings Split the name string in hda_codec struct to vendor_name and chip_name strings to be stored directly from the preset name. Since mostly only the chip name is referred in many patch_*.c, this results in the reduction of many codes in the end. Signed-off-by: Takashi Iwai commit 748285ccf7ea76d3d76d0d5f2945ad6fb91f5329 Author: David Teigland Date: Fri May 15 10:50:57 2009 -0500 dlm: use more NOFS allocation Change some GFP_KERNEL allocations to use either GFP_NOFS or ls_allocation (when available) which the fs sets to GFP_NOFS. The point is to prevent allocations from going back into the cluster fs in places where that might lead to deadlock. Signed-off-by: David Teigland commit 52650257ea06bb15c2e2bbe854cbdf463726141a Author: Jaswinder Singh Rajput Date: Thu May 14 12:35:46 2009 +0530 x86, mtrr: replace MTRRdefType_MSR with msr-index's MSR_MTRRdefType Use standard msr-index.h's MSR declaration and no need to declare again. [ Impact: cleanup, no object code change ] Signed-off-by: Jaswinder Singh Rajput Signed-off-by: H. Peter Anvin commit ba5673ff1ff5f428256db4cedd4b05b7be008bb6 Author: Jaswinder Singh Rajput Date: Thu May 14 12:29:25 2009 +0530 x86, mtrr: replace MTRRfix4K_C0000_MSR with msr-index's MSR_MTRRfix4K_C0000 Use standard msr-index.h's MSR declaration and no need to declare again. [ Impact: cleanup, no object code change ] Signed-off-by: Jaswinder Singh Rajput Signed-off-by: H. Peter Anvin commit 654ac05801ae806661c8fdeb3b5c420a31cbc5b1 Author: Jaswinder Singh Rajput Date: Thu May 14 12:21:54 2009 +0530 x86, mtrr: remove mtrr MSRs double declaration Removed MTRR MSR from mtrr/mtrr.h as these are already declared in msr-index.h and nobody is using them: MTRRfix16K_A0000_MSR MTRRfix4K_C8000_MSR MTRRfix4K_D0000_MSR MTRRfix4K_D8000_MSR MTRRfix4K_E0000_MSR MTRRfix4K_E8000_MSR MTRRfix4K_F0000_MSR MTRRfix4K_F8000_MSR Use standard msr-index.h's MSR declaration and no need to declare again [ Impact: cleanup, no object code change ] Signed-off-by: Jaswinder Singh Rajput Signed-off-by: H. Peter Anvin commit 7d9d55e449089df8463bca2045d702ae6cda64a2 Author: Jaswinder Singh Rajput Date: Thu May 14 12:15:32 2009 +0530 x86, mtrr: replace MTRRfix16K_80000_MSR with msr-index's MSR_MTRRfix16K_80000 Use standard msr-index.h's MSR declaration and no need to declare again [ Impact: cleanup, no object code change ] Signed-off-by: Jaswinder Singh Rajput Signed-off-by: H. Peter Anvin commit a036c7a358cc9d7ed28a188480b9a4d709e09b24 Author: Jaswinder Singh Rajput Date: Thu May 14 12:10:43 2009 +0530 x86, mtrr: replace MTRRfix64K_00000_MSR with msr-index's MSR_MTRRfix64K_00000 Use standard msr-index.h's MSR declaration and no need to declare again. [ Impact: cleanup, no object code change ] Signed-off-by: Jaswinder Singh Rajput Signed-off-by: H. Peter Anvin commit d9bcc01d58d18ed287091707b0b45c6ac888a11a Author: Jaswinder Singh Rajput Date: Thu May 14 12:06:12 2009 +0530 x86, mtrr: replace MTRRcap_MSR with msr-index's MSR_MTRRcap Use standard msr-index.h's MSR declaration and no need to declare again. [ Impact: cleanup, no object code change ] Signed-off-by: Jaswinder Singh Rajput Signed-off-by: H. Peter Anvin commit 0bbd0d4be8d5d3676c126e06e3c75c16def00441 Author: Paul Mackerras Date: Thu May 14 13:31:48 2009 +1000 perf_counter: powerpc: supply more precise information on counter overflow events This uses values from the MMCRA, SIAR and SDAR registers on powerpc to supply more precise information for overflow events, including a data address when PERF_RECORD_ADDR is specified. Since POWER6 uses different bit positions in MMCRA from earlier processors, this converts the struct power_pmu limited_pmc5_6 field, which only had 0/1 values, into a flags field and defines bit values for its previous use (PPMU_LIMITED_PMC5_6) and a new flag (PPMU_ALT_SIPR) to indicate that the processor uses the POWER6 bit positions rather than the earlier positions. It also adds definitions in reg.h for the new and old positions of the bit that indicates that the SIAR and SDAR values come from the same instruction. For the data address, the SDAR value is supplied if we are not doing instruction sampling. In that case there is no guarantee that the address given in the PERF_RECORD_ADDR subrecord will correspond to the instruction whose address is given in the PERF_RECORD_IP subrecord. If instruction sampling is enabled (e.g. because this counter is counting a marked instruction event), then we only supply the SDAR value for the PERF_RECORD_ADDR subrecord if it corresponds to the instruction whose address is in the PERF_RECORD_IP subrecord. Otherwise we supply 0. [ Impact: support more PMU hardware features on PowerPC ] Signed-off-by: Paul Mackerras Acked-by: Peter Zijlstra Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo LKML-Reference: <18955.37028.48861.555309@drongo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 9d23a90a67261e73b2fcac04d8ca963c6b496afb Author: Paul Mackerras Date: Thu May 14 21:48:08 2009 +1000 perf_counter: allow arch to supply event misc flags and instruction pointer At present the values we put in overflow events for the misc flags indicating processor mode and the instruction pointer are obtained using the standard user_mode() and instruction_pointer() functions. Those functions tell you where the performance monitor interrupt was taken, which might not be exactly where the counter overflow occurred, for example because interrupts were disabled at the point where the overflow occurred, or because the processor had many instructions in flight and chose to complete some more instructions beyond the one that caused the counter overflow. Some architectures (e.g. powerpc) can supply more precise information about where the counter overflow occurred and the processor mode at that point. This introduces new functions, perf_misc_flags() and perf_instruction_pointer(), which arch code can override to provide more precise information if available. They have default implementations which are identical to the existing code. This also adds a new misc flag value, PERF_EVENT_MISC_HYPERVISOR, for the case where a counter overflow occurred in the hypervisor. We encode the processor mode in the 2 bits previously used to indicate user or kernel mode; the values for user and kernel mode are unchanged and hypervisor mode is indicated by both bits being set. [ Impact: generalize perfcounter core facilities ] Signed-off-by: Paul Mackerras Acked-by: Peter Zijlstra Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo LKML-Reference: <18956.1272.818511.561835@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit ef923214a4816c289e4af2d67a9ebb1a31e4ac61 Author: Paul Mackerras Date: Thu May 14 13:29:14 2009 +1000 perf_counter: powerpc: use u64 for event codes internally Although the perf_counter API allows 63-bit raw event codes, internally in the powerpc back-end we had been using 32-bit event codes. This expands them to 64 bits so that we can add bits for specifying threshold start/stop events and instruction sampling modes later. This also corrects the return value of can_go_on_limited_pmc; we were returning an event code rather than just a 0/1 value in some circumstances. That didn't particularly matter while event codes were 32-bit, but now that event codes are 64-bit it might, so this fixes it. [ Impact: extend PowerPC perfcounter interfaces from u32 to u64 ] Signed-off-by: Paul Mackerras Acked-by: Peter Zijlstra Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo LKML-Reference: <18955.36874.472452.353104@drongo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 391fbdc5d527149578490db2f1619951d91f3561 Author: Christine Caulfield Date: Thu May 7 10:54:16 2009 -0500 dlm: connect to nodes earlier Make network connections to other nodes earlier, in the context of dlm_recoverd. This avoids connecting to nodes from dlm_send where we try to avoid allocations which could possibly deadlock if memory reclaim goes into the cluster fs which may try to do a dlm operation. Signed-off-by: Christine Caulfield Signed-off-by: David Teigland commit b04b4f7862de8d6e8b536853aaf66a6c1bb05cbd Author: Alexander Beregalov Date: Fri May 15 18:00:38 2009 +0400 ALSA: parisc/harmony: fix printk format warning Fix this warning: sound/parisc/harmony.c:938: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'resource_size_t' Signed-off-by: Alexander Beregalov Signed-off-by: Takashi Iwai commit 2e569d36729c8105ae066a9b105068305442cc77 Author: Peter Zijlstra Date: Fri May 15 15:37:47 2009 +0200 perf_counter: frequency based adaptive irq_period, 32-bit fix fix: kernel/built-in.o: In function `perf_counter_alloc': perf_counter.c:(.text+0x7ddc7): undefined reference to `__udivdi3' [ Impact: build fix on 32-bit systems ] Reported-by: Ingo Molnar Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: <1242394667.6642.1887.camel@laptop> Signed-off-by: Ingo Molnar commit 2fc998907947f92b1b9113faad531d7f5a857987 Author: Nickolas Lloyd Date: Fri May 15 15:33:30 2009 +0200 ALSA: hda - add controls to toggle DC bias on mic ports This patch adds a mixer control for the STAC92XX boards to control the DC bias of mic ports, allowing recording from both powered and non-powered sources. It replaces the "Mic Output Switch" with "Mic Jack Mode" to switch between Mic, Line In, and Line Out. Signed-off-by: Nickolas Lloyd Signed-off-by: Takashi Iwai commit 2d02494f5a90f2e4b3c4c6acc85ec94674cdc431 Author: Thomas Gleixner Date: Sat May 2 20:08:52 2009 +0200 sched, timers: cleanup avenrun users avenrun is an rough estimate so we don't have to worry about consistency of the three avenrun values. Remove the xtime lock dependency and provide a function to scale the values. Cleanup the users. [ Impact: cleanup ] Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra commit dce48a84adf1806676319f6f480e30a6daa012f9 Author: Thomas Gleixner Date: Sat Apr 11 10:43:41 2009 +0200 sched, timers: move calc_load() to scheduler Dimitri Sivanich noticed that xtime_lock is held write locked across calc_load() which iterates over all online CPUs. That can cause long latencies for xtime_lock readers on large SMP systems. The load average calculation is an rough estimate anyway so there is no real need to protect the readers vs. the update. It's not a problem when the avenrun array is updated while a reader copies the values. Instead of iterating over all online CPUs let the scheduler_tick code update the number of active tasks shortly before the avenrun update happens. The avenrun update itself is handled by the CPU which calls do_timer(). [ Impact: reduce xtime_lock write locked section ] Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra commit f5456a6b056b709282e87a68b4c1b81ac2e866fa Author: Peter Zijlstra Date: Fri May 15 15:19:29 2009 +0200 perf top: update to use the new freq interface Provide perf top -F as alternative to -c. [ Impact: new 'perf top' feature ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo LKML-Reference: <20090515132018.707922166@chello.nl> Signed-off-by: Ingo Molnar commit 60db5e09c13109b13830cc9dcae688003fd39e79 Author: Peter Zijlstra Date: Fri May 15 15:19:28 2009 +0200 perf_counter: frequency based adaptive irq_period Instead of specifying the irq_period for a counter, provide a target interrupt frequency and dynamically adapt the irq_period to match this frequency. [ Impact: new perf-counter attribute/feature ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo LKML-Reference: <20090515132018.646195868@chello.nl> Signed-off-by: Ingo Molnar commit 789f90fcf6b0b54e655740e9396c954378542c79 Author: Peter Zijlstra Date: Fri May 15 15:19:27 2009 +0200 perf_counter: per user mlock gift Instead of a per-process mlock gift for perf-counters, use a per-user gift so that there is less of a DoS potential. [ Impact: allow less worst-case unprivileged memory consumption ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo LKML-Reference: <20090515132018.496182835@chello.nl> Signed-off-by: Ingo Molnar commit 548e1ddf255b4ebfb4ef20c08936fd8d4deb3bd9 Author: Peter Zijlstra Date: Fri May 15 15:19:26 2009 +0200 perf_counter: remove perf_disable/enable exports Now that ACPI idle doesn't use it anymore, remove the exports. [ Impact: remove dead code/data ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo LKML-Reference: <20090515132018.429826617@chello.nl> Signed-off-by: Ingo Molnar commit f1a11e0576c7a73d759d05d776692b2b2d37172b Author: Thomas Gleixner Date: Tue May 5 19:21:40 2009 +0200 futex: remove the wait queue The waitqueue which is used in struct futex_q is a leftover from the futexfd implementation. There is no need to use a waitqueue at all, as the waiting task is the only user of it. The waitqueue just adds additional locking and a loop in the wake up path which both can be avoided. We have already a task reference in struct futex_q which is used for PI futexes. Use it for normal futexes as well and just wake up the task directly. The logic of signalling the futex wakeup via setting q->lock_ptr to NULL is kept with the difference that we set it NULL before doing the wakeup. This opens an exit race window vs. a non futex wake up of the to be woken up task, which we prevent with get_task_struct / put_task_struct on the waiter. [ Impact: simplification ] Signed-off-by: Thomas Gleixner commit 6e03a201bbe8137487f340d26aa662110e324b20 Author: David Woodhouse Date: Thu Apr 9 22:04:07 2009 -0700 firmware: speed up request_firmware(), v3 Rather than calling vmalloc() repeatedly to grow the firmware image as we receive data from userspace, just allocate and fill individual pages. Then vmap() the whole lot in one go when we're done. A quick test with a 337KiB iwlagn firmware shows the time taken for request_firmware() going from ~32ms to ~5ms after I apply this patch. [v2: define PAGE_KERNEL_RO as PAGE_KERNEL where necessary, use min_t()] [v3: kunmap() takes the struct page *, not the virtual address] Signed-off-by: David Woodhouse Tested-by: Sachin Sant commit 2bf2778e0fb38255e55ab5e10022132b0a72420e Author: Takashi Iwai Date: Fri May 15 12:20:52 2009 +0200 ASoC: Optimize switch/case in magician.c Use default to optimize the switch/case in magicial_playback_hw_params(), which also fixes the compile warnings below: sound/soc/pxa/magician.c:89: warning: 'acds' may be used uninitialized in this function sound/soc/pxa/magician.c:89: warning: 'acps' may be used uninitialized in this function Signed-off-by: Takashi Iwai commit 2baaec28068d07db3d4ae6ba885fa07255b2ad79 Author: Takashi Iwai Date: Fri May 15 12:18:47 2009 +0200 ASoC: Add missing __devexit in wm8940.c Signed-off-by: Takashi Iwai commit 58d7e993b16b62d30f8ef27757614056fe4def11 Author: Ingo Molnar Date: Fri May 15 11:03:23 2009 +0200 perf stat: handle Ctrl-C Before this change, if a long-running perf stat workload was Ctrl-C-ed, the utility exited without displaying statistics. After the change, the Ctrl-C gets propagated into the workload (and causes its early exit there), but perf stat itself will still continue to run and will display counter results. This is useful to run open-ended workloads, let them run for a while, then Ctrl-C them to get the stats. [ Impact: extend perf stat with new functionality ] Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar commit 5f592bb99b2634b2c515bb75d92cae14b1e22c51 Merge: dd4a416 81a4275 Author: Takashi Iwai Date: Fri May 15 10:30:21 2009 +0200 Merge branch 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc commit 81a4275bff16b0a63074669541be6eb4d5279f26 Merge: 63c26ba f492ec9 Author: Mark Brown Date: Fri May 15 08:59:52 2009 +0100 Merge branch 'for-2.6.30' into for-2.6.31 commit 251e8e3c7235f5944805a64f24c79fc4696793f1 Author: Ingo Molnar Date: Thu May 14 05:16:59 2009 +0200 perf_counter: Remove ACPI quirk We had a disable/enable around acpi_idle_do_entry() due to an erratum in an early prototype CPU i had access to. That erratum has been fixed in the BIOS so remove the quirk. The quirk also kept us from profiling interrupts that hit the ACPI idle instruction - so this is an improvement as well, beyond a cleanup and a micro-optimization. [ Impact: improve profiling scope, cleanup, micro-optimization ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: Signed-off-by: Ingo Molnar commit 9029a5e3801f1cc7cdaab80169d82427acf928d8 Author: Ingo Molnar Date: Fri May 15 08:26:20 2009 +0200 perf_counter: x86: Protect against infinite loops in intel_pmu_handle_irq() intel_pmu_handle_irq() can lock up in an infinite loop if the hardware does not allow the acking of irqs. Alas, this happened in testing so make this robust and emit a warning if it happens in the future. Also, clean up the IRQ handlers a bit. [ Impact: improve perfcounter irq/nmi handling robustness ] Acked-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: Signed-off-by: Ingo Molnar commit 1c80f4b598d9b075a2a0be694e28be93a6702bcc Author: Ingo Molnar Date: Fri May 15 08:25:22 2009 +0200 perf_counter: x86: Disallow interval of 1 On certain CPUs i have observed a stuck PMU if interval was set to 1 and NMIs were used. The PMU had PMC0 set in MSR_CORE_PERF_GLOBAL_STATUS, but it was not possible to ack it via MSR_CORE_PERF_GLOBAL_OVF_CTRL, and the NMI loop got stuck infinitely. [ Impact: fix rare hangs during high perfcounter load ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: Signed-off-by: Ingo Molnar commit a4016a79fcbd139e7378944c0d86a39fdbc70ecc Author: Peter Zijlstra Date: Thu May 14 14:52:17 2009 +0200 perf_counter: x86: Robustify interrupt handling Two consecutive NMIs could daze and confuse the machine when the first would handle the overflow of both counters. [ Impact: fix false-positive syslog messages under multi-session profiling ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: Signed-off-by: Ingo Molnar commit 9e35ad388bea89f7d6f375af4c0ae98803688666 Author: Peter Zijlstra Date: Wed May 13 16:21:38 2009 +0200 perf_counter: Rework the perf counter disable/enable The current disable/enable mechanism is: token = hw_perf_save_disable(); ... /* do bits */ ... hw_perf_restore(token); This works well, provided that the use nests properly. Except we don't. x86 NMI/INT throttling has non-nested use of this, breaking things. Therefore provide a reference counter disable/enable interface, where the first disable disables the hardware, and the last enable enables the hardware again. [ Impact: refactor, simplify the PMU disable/enable logic ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: Signed-off-by: Ingo Molnar commit 962bf7a66edca4d36a730a38ff8410a67f560e40 Author: Peter Zijlstra Date: Wed May 13 13:21:36 2009 +0200 perf_counter: x86: Fix up the amd NMI/INT throttle perf_counter_unthrottle() restores throttle_ctrl, buts its never set. Also, we fail to disable all counters when throttling. [ Impact: fix rare stuck perf-counters when they are throttled ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: Signed-off-by: Ingo Molnar commit 53020fe81eecd0b7be295868ce5850ef8f41074e Author: Peter Zijlstra Date: Wed May 13 21:26:19 2009 +0200 perf_counter: Fix perf_output_copy() WARN to account for overflow The simple reservation test in perf_output_copy() failed to take unsigned int overflow into account, fix this. [ Impact: fix false positive warning with more than 4GB of profiling data ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: Signed-off-by: Ingo Molnar commit a026dfecc035f213c1cfa0bf6407ce3155f6a9df Author: Peter Zijlstra Date: Wed May 13 10:02:57 2009 +0200 perf_counter: x86: Allow unpriviliged use of NMIs Apply sysctl_perf_counter_priv to NMIs. Also, fail the counter creation instead of silently down-grading to regular interrupts. [ Impact: allow wider perf-counter usage ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: Signed-off-by: Ingo Molnar commit f5a5a2f6e69e88647ae12da39f0ff3a510bcf0a6 Author: Ingo Molnar Date: Wed May 13 12:54:01 2009 +0200 perf_counter: x86: Fix throttling If counters are disabled globally when a perfcounter IRQ/NMI hits, and if we throttle in that case, we'll promote the '0' value to the next lapic IRQ and disable all perfcounters at that point, permanently ... Fix it. [ Impact: fix hung perfcounters under load ] Acked-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: Signed-off-by: Ingo Molnar commit ec3232bdf8518bea8410f0027f870b24d3aa8753 Author: Peter Zijlstra Date: Wed May 13 09:45:19 2009 +0200 perf_counter: x86: More accurate counter update Take the counter width into account instead of assuming 32 bits. In particular Nehalem has 44 bit wide counters, and all arithmetics should happen on a 44-bit signed integer basis. [ Impact: fix rare event imprecision, warning message on Nehalem ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: Signed-off-by: Ingo Molnar commit 1a853e36871b533ccc3f3c5bdd5cd0d867043a00 Author: Arnaldo Carvalho de Melo Date: Thu May 14 22:50:46 2009 -0300 perf record: Allow specifying a pid to record Allow specifying a pid instead of always fork+exec'ing a command. Because the PERF_EVENT_COMM and PERF_EVENT_MMAP events happened before we connected, we must synthesize them so that 'perf report' can get what it needs. [ Impact: add new command line option ] Signed-off-by: Arnaldo Carvalho de Melo Cc: Clark Williams Cc: John Kacur Cc: Peter Zijlstra LKML-Reference: <20090515015046.GA13664@ghostprotocols.net> Signed-off-by: Ingo Molnar commit 5872144f64b34a5942f6b4acedc90b02de72c58b Author: Li Zefan Date: Fri May 15 11:07:56 2009 +0800 tracing/filters: fix off-by-one bug We should leave the last slot for the ending '\0'. [ Impact: fix possible crash when the length of an operand is 128 ] Signed-off-by: Li Zefan LKML-Reference: <4A0CDC8C.30602@cn.fujitsu.com> Signed-off-by: Steven Rostedt commit 8cd995b6deedf98b7694ed32a786ee7f793d1eec Author: Li Zefan Date: Fri May 15 11:07:27 2009 +0800 tracing/filters: add missing unlock in a failure path [ Impact: fix deadlock in a rare case we fail to allocate memory ] Signed-off-by: Li Zefan LKML-Reference: <4A0CDC6F.7070200@cn.fujitsu.com> Signed-off-by: Steven Rostedt commit 1ec7c4849c214fc78b023230264399836ea3b245 Author: Steven Rostedt Date: Thu May 14 23:40:06 2009 -0400 tracing: stop stack trace on first empty entry The stack tracer stores eight entries in the ring buffer when an event traces the stack. The output outputs all eight entries regardless of how many entries were recorded. This patch breaks out of the loop when a null entry is discovered. [ Impact: only print the stack that is recorded ] Signed-off-by: Steven Rostedt commit 29a679754b1a2581ee456eada6c2de7ce95068bb Author: Steven Rostedt Date: Thu May 14 23:19:09 2009 -0400 x86/stacktrace: return 0 instead of -1 for stack ops If we return -1 in the ops->stack for the stacktrace saving, we end up breaking out of the loop if the stack we are tracing is in the exception stack. This causes traces like: -0 [002] 34263.745825: raise_softirq_irqoff <-__blk_complete_request -0 [002] 34263.745826: <= 0 <= 0 <= 0 <= 0 <= 0 <= 0 <= 0 By returning "0" instead, the irq stack is saved as well, and we see: -0 [003] 883.280992: raise_softirq_irqoff <-__hrtimer_star t_range_ns -0 [003] 883.280992: <= hrtimer_start_range_ns <= tick_nohz_restart_sched_tick <= cpu_idle <= start_secondary <= <= 0 <= 0 [ Impact: record stacks from interrupts ] Signed-off-by: Steven Rostedt commit 639138a991aaf1a3f65cc66700d097edc5f602fe Author: Magnus Damm Date: Fri May 15 12:07:17 2009 +0900 sound: oss: sh_dac_audio timer fixes. This patch modifies sh_dac_audio in the following ways: - use high resolution timer instead of TMU1 - fix cpu/dac.h include - add future rewrite comment Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit bec36eca6f5d1d83a9c3733fc40ba173ad849df2 Author: Paul Mundt Date: Fri May 15 12:03:04 2009 +0900 sh: hd64461: Fix up I/O base register offsets. hd64461 is mapped in a fixed location, so the I/O base itself is fairly meaningless as a configuration item. Additionally, this makes it impossible to share hd64461 code alongside generic drivers (in the case of sh_dac_audio), so simply make it commonly defined and permit the mach_is_foo() logic to work out the proper semantics. Signed-off-by: Paul Mundt commit c3d20103d08e5c0b6738fbd0acf3ca004e5356c5 Author: Eric Paris Date: Tue May 12 15:14:23 2009 -0400 IMA: do not measure everything opened by root by default The IMA default policy measures every single file opened by root. This is terrible for most users. Consider a system (like mine) with virtual machine images. When those images are touched (which happens at boot for me) those images are measured. This is just way too much for the default case. Signed-off-by: Eric Paris Acked-by: Mimi Zohar Signed-off-by: James Morris commit f850a7c040d9faafb41bceb0a05d6bb7432c8c7a Author: Eric Paris Date: Tue May 12 15:13:55 2009 -0400 IMA: remove read permissions on the ima policy file The IMA policy file does not implement read. Trying to just open/read/close the file will load a blank policy and you cannot then change the policy without a reboot. This removes the read permission from the file so one must at least be attempting to write... Signed-off-by: Eric Paris Acked-by: Mimi Zohar Signed-off-by: James Morris commit 63c26baa2aa624b023892d66ed696525fc787560 Author: Marek Vasut Date: Thu May 14 20:52:46 2009 +0100 ASoC: Support AC97 link off by default on WM9712 The WM9712 can be configured by resistor strapping GPIO4 to behave like the WM9713 and default to leaving the AC97 link disabled after cold reset until a warm reset occurs. In this configuration we need to issue a warm reset after cold to bring the link up so do so. The warm reset will be harmless on systems that don't need it. [Changelog rewritten to document the reasoning. -- broonie] Signed-off-by: Marek Vasut Signed-off-by: Mark Brown commit c13cb78ace34ef9e4cfa2a2fae9a7772d90d6ace Merge: d34c430 916465a Author: Mark Brown Date: Thu May 14 20:35:51 2009 +0100 Merge branch 'pxa2xx-i2s' into for-2.6.31 commit 916465a841937a60baac6144ae3f41b0d1560f3b Author: Karl Beldan Date: Wed May 13 22:16:59 2009 +0200 ASoC: pxa2xx-i2s: Fix suspend/resume pxa2xx_i2s_resume is : - unconditionnaly setting SACR0_ENB - unsetting SACR0_ENB in saved SACR0 pxa_i2s.sacr0 fix these. In pxa2xx_i2s_{resume,suspend}, save/restore registers even when !dai->active. Signed-off-by: Karl Beldan Signed-off-by: Mark Brown commit 9bc04fd1677a956fdd7c5645a09de34ca9a8f1a6 Author: Karl Beldan Date: Wed May 13 22:16:52 2009 +0200 ASoC: pxa2xx-i2s: Fix inappropriate release of i2s clock i2s_clk is 'put' for no reason in pxa2xx_i2s_shutdown. Now we 'get' i2s_clk at probe and 'put' it at driver removal or when probe fails. Signed-off-by: Karl Beldan Signed-off-by: Mark Brown commit 34555c1077ac8f4854e0db9ad11b989a6908d210 Author: Karl Beldan Date: Wed May 13 22:16:46 2009 +0200 ASoC: pxa2xx-i2s: Handle SACR1_DRPL and SACR1_DREC separately - hw_params enables both RPL and REC functions each time : Enable the appropriate function in pxa2xx_i2s_trigger. - pxa2xx_i2s_shutdown disables i2s anytime one of RPL or REC function is off : Turn it off only when both functions are off. Signed-off-by: Karl Beldan Signed-off-by: Mark Brown commit b243b77c708665d7af8c5e42611c27c89f918788 Author: Karl Beldan Date: Thu May 14 10:25:42 2009 +0200 ASoC: pxa2xx-i2s: Proper hw initialization Make sure we are in a know good state at end of probe : Reset FIFO logic and registers, and make sure REC and RPL functions along with FIFO service are disabled (SACR0_RST enables REC and RPL). Resetting loses current settings so remove reset from stream startup. Now reset occurs only at probe. Signed-off-by: Karl Beldan Signed-off-by: Mark Brown commit 2ac3b6e00acb46406c993d57921f86a594aafe08 Author: Theodore Ts'o Date: Thu May 14 13:57:08 2009 -0400 ext4: Clean up ext4_get_blocks() so it does not depend on bh_result->b_state The ext4_get_blocks() function was depending on the value of bh_result->b_state as an input parameter to decide whether or not update the delalloc accounting statistics by calling ext4_da_update_reserve_space(). We now use a separate flag, EXT4_GET_BLOCKS_UPDATE_RESERVE_SPACE, to requests this update, so that all callers of ext4_get_blocks() can clear map_bh.b_state before calling ext4_get_blocks() without worrying about any consistency issues. Signed-off-by: "Theodore Ts'o" commit 7442f9dadb8626bd9e7e01445560499560b99f5d Author: Takashi Iwai Date: Thu May 14 18:20:33 2009 +0200 ALSA: hda - Add a quirk entry for Macbook Pro 5,1 Added the codec SSID for MacBook Pro 5,1 as compatible as MP51. However, the headphone auto-muting function doesn't work. So, this is just a tentative solution. Signed-off-by: Takashi Iwai commit 2fa3cdfb319055fd8b25abdafa413e16f00ad493 Author: Theodore Ts'o Date: Thu May 14 09:29:45 2009 -0400 ext4: Merge ext4_da_get_block_write() into mpage_da_map_blocks() The static function ext4_da_get_block_write() was only used by mpage_da_map_blocks(). So to simplify the code, merge that function into mpage_da_map_blocks(). Signed-off-by: "Theodore Ts'o" commit b3e0afe61e8271a8d082478752a67e5c279c8f23 Author: Takashi Iwai Date: Thu May 14 15:19:30 2009 +0200 ALSA: ctxfi - Add prefix to debug prints Added ctxfi: prefix to each debug print. Signed-off-by: Takashi Iwai commit 35b053becb64eba13f3ea5c8c51023997169ff34 Author: Takashi Iwai Date: Thu May 14 15:17:16 2009 +0200 ALSA: ctxfi - Avoid unneeded pci_read_config_*() calls Use struct pci subsystem_device and revision fields instead of unneeded calls of pci_read_config_*(). Signed-off-by: Takashi Iwai commit 9fc20f030ba457d20eb994e1def7e2ce7d5ae1a8 Author: Takashi Iwai Date: Thu May 14 15:14:18 2009 +0200 ALSA: ctxfi - Move PCI ID definitions to linux/pci_ids.h Signed-off-by: Takashi Iwai commit 903dba1eae49270a8c2275636071c3a238c8104d Author: Jean Delvare Date: Thu May 14 14:37:21 2009 +0200 ALSA: keywest: Get rid of useless i2c_device_name() macro The i2c_device_name() macro is used only once and doesn't have much value, it hurts redability more than it helps. Get rid of it. Signed-off-by: Jean Delvare Cc: Benjamin Herrenschmidt Signed-off-by: Takashi Iwai commit d34c43078236b41146877c49af341ab85b5fb8db Author: Jon Smirl Date: Wed May 13 21:59:14 2009 -0400 ASoC: Add SNDRV_PCM_FMTBIT_S32_BE as a valid AC97 format Signed-off-by: Jon Smirl Signed-off-by: Mark Brown commit 14610ce711a363028ffffad98947d57f21fa5372 Author: Anuj Aggarwal Date: Thu May 14 13:59:19 2009 +0530 ASoC: Added OMAP3 EVM support in ASoC. Resending the patch after fixing the minor issues. Signed-off-by: Anuj Aggarwal Signed-off-by: Mark Brown commit d0da727e025da8b443a4a614dbb7a031b89857d0 Author: Takashi Iwai Date: Thu May 14 10:56:04 2009 +0200 ALSA: ctxfi - Add missing inclusion of linux/delay.h Signed-off-by: Takashi Iwai commit 9304d0ccf1922b9b954b6e9223d1b2bc83198ad2 Author: Magnus Damm Date: Thu May 14 07:53:39 2009 +0000 sh: intc tables for sh7770 This patch adds INTC tables for sh7770, thanks goes to Paul for the first prototype version. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit ad3256e361663923342bff7f292dd289f794aa33 Author: Paul Mundt Date: Thu May 14 17:40:08 2009 +0900 sh: Provide FORCE_MAX_ZONEORDER. Several platforms want to be able to do large physically contiguous allocations (primarily nommu and video codecs on SH-Mobile), provide a MAX_ORDER override for those cases. Tested-by: Conrad Parker Signed-off-by: Paul Mundt commit 549b5e358d17a8c04953ed80896ce07d37722451 Author: Paul Mundt Date: Thu May 14 17:38:46 2009 +0900 sh: clkfwk: Add MSTP bits to SH7785 clock framework. This plugs in all of the MSTP functions in to the clock framework, and hands them off to the platform devices that want them. Signed-off-by: Paul Mundt commit 77f6bf57ba9d2c50173536dbfdacdab27cb867ca Author: Andrew Morton Date: Thu May 14 09:49:44 2009 +0200 splice: fix error return code fs/splice.c: In function 'default_file_splice_read': fs/splice.c:566: warning: 'error' may be used uninitialized in this function which is sort-of true. The code will in fact return -ENOMEM instead of the kernel_readv() return value. Cc: Miklos Szeredi Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit 8cc72361481f00253f1e468ade5795427386d593 Author: Wai Yew CHAY Date: Thu May 14 08:05:58 2009 +0200 ALSA: SB X-Fi driver merge The Sound Blaster X-Fi driver supports Creative solutions based on 20K1 and 20K2 chipsets. Supported hardware : Creative Sound Blaster X-Fi Titanium Fatal1ty® Champion Series Creative Sound Blaster X-Fi Titanium Fatal1ty Professional Series Creative Sound Blaster X-Fi Titanium Professional Audio Creative Sound Blaster X-Fi Titanium Creative Sound Blaster X-Fi Elite Pro Creative Sound Blaster X-Fi Platinum Creative Sound Blaster X-Fi Fatal1ty Creative Sound Blaster X-Fi XtremeGamer Creative Sound Blaster X-Fi XtremeMusic Current release features: * ALSA PCM Playback * ALSA Record * ALSA Mixer Note: * External I/O modules detection not included. Signed-off-by: Wai Yew CHAY Singed-off-by: Ryan RICHARDS Signed-off-by: Takashi Iwai commit b103387037cea2ba0f04b44d408d54c53f678061 Author: Eric Paris Date: Wed May 13 12:50:40 2009 -0400 TPM: get_event_name stack corruption get_event_name uses sprintf to fill a buffer declared on the stack. It fills the buffer 2 bytes at a time. What the code doesn't take into account is that sprintf(buf, "%02x", data) actually writes 3 bytes. 2 bytes for the data and then it nul terminates the string. Since we declare buf to be 40 characters long and then we write 40 bytes of data into buf sprintf is going to write 41 characters. The fix is to leave room in buf for the nul terminator. Signed-off-by: Eric Paris Signed-off-by: James Morris commit bb74a6e5c5535ddd977aa161c72bef738e566daa Author: Mark Brown Date: Wed May 13 17:23:54 2009 +0100 ASoC: Point at kernel.org git The Wolfson git is not currently tracking bleeding edge ASoC so change to my kernel.org git which is doing so. Signed-off-by: Mark Brown commit 8c10dc4f54d315ce801dc9ef4018aab8d0d75a7b Author: Karl Beldan Date: Mon May 11 23:49:41 2009 +0200 ASoC: pxa2xx-i2s: Proper initialization Reset FIFO logic and registers, and make sure REC and RPL functions along with FIFO service are disabled at probe. Signed-off-by: Karl Beldan Signed-off-by: Mark Brown commit 334034c132017fa662716b70591b2297ed7f238c Author: Thomas Gleixner Date: Tue May 12 13:37:11 2009 -0700 avr32: remove obsolete hw_interrupt_type The defines and typedefs (hw_interrupt_type, no_irq_type, irq_desc_t) have been kept around for migration reasons. After more than two years it's time to remove them finally. This patch cleans up one of the remaining users. When all such patches hit mainline we can remove the defines and typedefs finally. Impact: cleanup Convert the last remaining users to struct irq_chip and remove the define. Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Haavard Skinnemoen commit 9582d41135c0d362f04ed6bf3dc8d693a7eafee2 Author: Steven Whitehouse Date: Wed May 13 15:06:25 2009 +0100 GFS2: Remove a couple of unused sysfs entries These two tunables are pointless and would never need to be changed anyway. There is also a race between them and umount as the deamons which they refer to might have gone away. The easiest way to fix the race is to remove the interface. Signed-off-by: Steven Whitehouse commit 48c2b613616235d7c97fda5982f50100a6c79166 Author: Steven Whitehouse Date: Wed May 13 14:49:48 2009 +0100 GFS2: Add commit= mount option It has always been possible to adjust the gfs2 log commit interval, but only from the sysfs interface. This adds a mount option, commit=, which will be familar to ext3 users. The sysfs interface continues to be available as well, although this might be removed in the future. Also this patch cleans up some duplicated structures in the GFS2 sysfs code. Signed-off-by: Steven Whitehouse commit cedcf3366f2191885aff92d33d6078ef08203e52 Author: Paul Mundt Date: Wed May 13 21:51:28 2009 +0900 sh: clkfwk: Map tree hierarchy in debugfs. This adopts the OMAP clock framework debugfs bits and replaces the aging procfs bits. The procfs clocks entry was primarily a debugging aid, and used to be tied in to cpuinfo before the clock list grew too unweildly. Signed-off-by: Paul Mundt commit cc96eace48fdf0f8925a74c6c1f7ffa512e458d2 Author: Paul Mundt Date: Wed May 13 20:28:15 2009 +0900 sh: clkfwk: rate table construction and rounding for SH7785. This adds support for constructing a rate table by looking at potential divisors for a specified clock. Each FQRMR clock is given its own table. Presently each table is rebuilt when the parent propagates down a new rate, so some more logic needs to be added to do this more intelligently. Additionally, a fairly generic round_rate() implementation is then layered on top of it, which subsequently provides us with cpufreq support. Signed-off-by: Paul Mundt commit a1c0643ff9f360a30644f6e3cd643ca2a5083aea Author: Steven Whitehouse Date: Wed May 13 10:56:52 2009 +0100 GFS2: Move journal live test at transaction start There seems little point grabbing the transaction glock only to have to release it again if the journal isn't live. This moves the test earlier to avoid grabbing the lock when we don't need it in the first place. Signed-off-by: Steven Whitehouse commit 22b530e0287724f00dde9a15a94d408c3334e86c Author: Takashi Iwai Date: Wed May 13 11:32:52 2009 +0200 ALSA: hda - Disable fallback to model=acer for Acer laptops The model=acer for ALC883/889 doesn't work well for the recent Acer Aspire laptops. Since model=auto works better nowadays, it's safer to use the default fallback instead of the Acer specific one. Signed-off-by: Takashi Iwai commit a77b5ac0ea8e47c77008d3a9a9976dcfbc01c42a Author: Paul Mundt Date: Wed May 13 17:55:00 2009 +0900 sh: clkfwk: Update SH7785 for refactored clock framework. This updates the SH7785 CPU code as well as the SH7785LCR board support code for making use of the newly refactored clock framework. Support for the legacy CPG clocks is dropped at this point, with the extal frequency fed in from the board code. Signed-off-by: Paul Mundt commit 253b0887b3736160feac9ccdcf146a2073e41463 Author: Paul Mundt Date: Wed May 13 17:38:11 2009 +0900 sh: clkfwk: Rework legacy CPG clock handling. This moves out the old legacy CPG clocks to their own file, and converts over the existing users. With these clocks going away and each CPU dealing with them on their own, CPUs can gradually move over to the new interface. Signed-off-by: Paul Mundt commit 100890c55e326a9acb4429593c5ad2012c194564 Author: Paul Mundt Date: Wed May 13 17:05:51 2009 +0900 sh: clkfwk: Provide a generic clk_set_rate_ex() path for root clocks. In the case of root clocks (such as clkin oscillators, extal, etc.), the rate information is entirely platform dependent and needs to be lazily set and propagated from the platform code. This provides a method for establishing the rate update on these types of clocks that define no set_rate() op of their own. Signed-off-by: Paul Mundt commit d672fef02738582bdeae6e77176e141eeb9169bc Author: Paul Mundt Date: Wed May 13 17:03:09 2009 +0900 sh: clkfwk: Handle NULL clkops for root clocks. root clocks may simply be placeholders for rate and ancestry information, and have no real associated operations of their own. Account for this, so we are still able to use these sorts of clocks for rate propagation. Signed-off-by: Paul Mundt commit af777ce42d3d51cdef353ce296d6f99dc503feef Author: Paul Mundt Date: Wed May 13 16:59:40 2009 +0900 sh: clkfwk: module_clk -> peripheral_clk rename. For consistenct naming, and to allow us to fix up some confusion in the SH-Mobile clock framework, amongst other places. Signed-off-by: Paul Mundt commit 4f23122858a27ba97444b9b37a066d83edebd4c8 Author: Jens Axboe Date: Wed May 13 08:35:35 2009 +0200 splice: fix repeated kmap()'s in default_file_splice_read() We cannot reliably map more than one page at the time, or we risk deadlocking. Just allocate the pages from low mem instead. Reported-by: Andrew Morton Signed-off-by: Jens Axboe commit 5bb9efe33ea4001a17ab98186a40a134a3061d67 Author: Peter Zijlstra Date: Wed May 13 08:12:51 2009 +0200 perf_counter: fix print debug irq disable inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. bash/15802 [HC0[0]:SC0[0]:HE1:SE1] takes: (sysrq_key_table_lock){?.....}, Don't unconditionally enable interrupts in the perf_counter_print_debug() path. [ Impact: fix potential deadlock pointed out by lockdep ] LKML-Reference: Reported-by: Ingo Molnar Signed-off-by: Peter Zijlstra commit c4f68236e41641494f9c8a418ccc0678c335bbb5 Author: H. Peter Anvin Date: Tue May 12 11:37:34 2009 -0700 x86-64: align __PHYSICAL_START, remove __KERNEL_ALIGN Handle the misconfiguration where CONFIG_PHYSICAL_START is incompatible with CONFIG_PHYSICAL_ALIGN. This is a configuration error, but one which arises easily since Kconfig doesn't have the smarts to express the true relationship between these two variables. Hence, align __PHYSICAL_START the same way we align LOAD_PHYSICAL_ADDR in . For non-relocatable kernels, this would cause the boot to fail. [ Impact: fix boot failures for non-relocatable kernels ] Reported-by: Ingo Molnar Signed-off-by: H. Peter Anvin commit 7ed42a28b269f8682eefae27f5c11187eb56e63b Author: H. Peter Anvin Date: Tue May 12 11:33:08 2009 -0700 x86, boot: correct sanity checks in boot/compressed/misc.c arch/x86/boot/compressed/misc.c contains several sanity checks on the output address. Correct constraints that are no longer correct: - the alignment test should be MIN_KERNEL_ALIGN on both 32 and 64 bits. - the 64 bit maximum address was set to 2^40, which was the limit of one specific x86-64 implementation. Change the test to 2^46, the current Linux limit, and at least try to test the end rather than the beginning. - for non-relocatable kernels, test against LOAD_PHYSICAL_ADDR on both 32 and 64 bits. [ Impact: fix potential boot failure due to invalid tests ] Signed-off-by: H. Peter Anvin commit a2dc52b5d1d8cc280b3e795abf1c80ac8c49f30c Author: Theodore Ts'o Date: Tue May 12 13:51:29 2009 -0400 ext4: Add BUG_ON debugging checks to noalloc_get_block_write() Enforce that noalloc_get_block_write() is only called to map one block at a time, and that it always is successful in finding a mapping for given an inode's logical block block number if it is called with create == 1. Signed-off-by: "Theodore Ts'o" commit b920c75502cb2c48654ef196d647c8eb81ab608a Author: Theodore Ts'o Date: Thu May 14 00:54:29 2009 -0400 ext4: Add documentation to the ext4_*get_block* functions This adds more documentation to various internal functions in fs/ext4/inode.c, most notably ext4_ind_get_blocks(), ext4_da_get_block_write(), ext4_da_get_block_prep(), ext4_normal_get_block_write(). In addition, the static function ext4_normal_get_block_write() has been renamed noalloc_get_block_write(), since it is used in many places far beyond ext4_normal_writepage(). Plenty of warnings have been added to the noalloc_get_block_write() function, since the way it is used is amazingly fragile. Signed-off-by: "Theodore Ts'o" commit c21770573319922e3f3fcb331cfaa290c49f1c81 Author: Theodore Ts'o Date: Thu May 14 00:58:52 2009 -0400 ext4: Define a new set of flags for ext4_get_blocks() The functions ext4_get_blocks(), ext4_ext_get_blocks(), and ext4_ind_get_blocks() used an ad-hoc set of integer variables used as boolean flags passed in as arguments. Use a single flags parameter and a setandard set of bitfield flags instead. This saves space on the call stack, and it also makes the code a bit more understandable. Signed-off-by: "Theodore Ts'o" commit 12b7ac176831df1aa58a787e67c3e5d698b30163 Author: Theodore Ts'o Date: Thu May 14 00:57:44 2009 -0400 ext4: Rename ext4_get_blocks_wrap() to be ext4_get_blocks() Another function rename for clarity's sake. The _wrap prefix simply confuses people, and didn't add much people trying to follow the code paths. Signed-off-by: "Theodore Ts'o" commit 7537d81aa7b7cd31b0caeac8091456e93d96fa8d Author: Abhijith Das Date: Tue May 12 11:16:20 2009 -0500 GFS2: Fix timestamps on write This patch copies the timestamps from the vfs inode into gfs2 and syncs it to the disk inode during writes. Signed-off-by: Abhijith Das Signed-off-by: Steven Whitehouse commit b5710ce92a8cf8e3fc0ffc230cfdbfa23463f1c8 Author: Cyrill Gorcunov Date: Tue May 12 18:51:28 2009 +0400 x86/pci: add 4 more return parameters to IO_APIC_get_PCI_irq_vector(), fix Fix trivial typo in the drivers/pci/hotplug/ibmphp_core.c changes. [ Impact: build fix ] Signed-off-by: Cyrill Gorcunov CC: Yinghai Lu Cc: eswierk@aristanetworks.com LKML-Reference: <20090512145128.GA10220@lenovo> Signed-off-by: Ingo Molnar commit e758a33d6fc5b9d6a3ae489863d04fcecad8120b Author: Paul Mackerras Date: Tue May 12 21:59:01 2009 +1000 perf_counter: call hw_perf_save_disable/restore around group_sched_in I noticed that when enabling a group via the PERF_COUNTER_IOC_ENABLE ioctl on the group leader, the counters weren't enabled and counting immediately on return from the ioctl, but did start counting a little while later (presumably after a context switch). The reason was that __perf_counter_enable calls group_sched_in which calls hw_perf_group_sched_in, which on powerpc assumes that the caller has called hw_perf_save_disable already. Until commit 46d686c6 ("perf_counter: put whole group on when enabling group leader") it was true that all callers of group_sched_in had called hw_perf_save_disable first, and the powerpc hw_perf_group_sched_in relies on that (there isn't an x86 version). This fixes the problem by putting calls to hw_perf_save_disable / hw_perf_restore around the calls to group_sched_in and counter_sched_in in __perf_counter_enable. Having the calls to hw_perf_save_disable/restore around the counter_sched_in call is harmless and makes this call consistent with the other call sites of counter_sched_in, which have all called hw_perf_save_disable first. [ Impact: more precise counter group disable/enable functionality ] Signed-off-by: Paul Mackerras Cc: Peter Zijlstra Cc: Corey Ashford LKML-Reference: <18953.25733.53359.147452@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit fd5b12458b25a88eb6f6b56464846d98a45e8928 Merge: 9fe5ee0 8be5f1a Author: Paul Mundt Date: Tue May 12 19:54:36 2009 +0900 Merge branch 'master' into sh/clkfwk commit 8be5f1a68f2c14082939dd54e7037dcee2eb54f8 Author: Paul Mundt Date: Tue May 12 19:53:55 2009 +0900 sh: Kill off the remnants of the old timer code. Now with all of the TMU users moved over to the new TMU driver, and the old TMU driver killed off, the left-over infrastructure can go along with it. Signed-off-by: Paul Mundt commit f19900b2e608b604777a74d6d711bbf744657756 Author: Magnus Damm Date: Tue May 12 10:25:54 2009 +0000 sh: remove old TMU driver This patch removes the old TMU driver (CONFIG_SH_TMU/timer-tmu.c) As replacement, select the sh_tmu driver with CONFIG_SH_TIMER_TMU and configure timer channel using platform data. If multiple TMU channels are enabled using platform data, use the earlytimer parameter on the kernel command line to select channel. For instance, use "earlytimer=sh_tmu.0" to select the first channel. To verify which timer is being used, look at printouts or the timer irq count in /proc/interrupts. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 2b23a8826a60268ec52302729911dd7ac6b10776 Author: Magnus Damm Date: Tue May 12 10:21:11 2009 +0000 sh: CMT platform data for sh7720/sh7721 This patch adds CMT platform data for sh7720 and sh7721. All 5 32-bit CMT channels unfortunately share a single IRQ. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 4a1a5a2f60ceabc026ba28cdbf81d7d47603b480 Author: Magnus Damm Date: Tue May 12 10:17:52 2009 +0000 sh: TMU platform data for sh7720/sh7721 This patch adds TMU platform data for sh7720 and sh7721. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit e5ad00896a381937326ac55fc173630fe731d041 Author: Magnus Damm Date: Tue May 12 10:15:30 2009 +0000 sh: TMU platform data for sh7710/sh7712 This patch adds TMU platform data for sh7710 and sh7712. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit c8a9011bce6c43f4988cbcf1db8fc31433e69964 Author: Magnus Damm Date: Tue May 12 10:04:49 2009 +0000 sh: TMU platform data for sh7706/sh7707/sh7708/sh7709 Add TMU platform data for sh7706/sh7707/sh7708/sh7709. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit acd664ab54a449a7257dcb3c7ef9cd1e310b4c4f Author: Magnus Damm Date: Tue May 12 10:01:01 2009 +0000 sh: TMU platform data for sh7705 This patch adds TMU platform data for sh7705. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 6a3501b63d30643120566cc1efba5acd0e64b12d Author: Magnus Damm Date: Tue May 12 09:50:46 2009 +0000 sh: TMU platform data for sh7724 This patch adds TMU platform data for sh7724. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit f2710ebcd0a0404ccca3bbad68fd3639fe87ba6f Author: Magnus Damm Date: Tue May 12 09:48:21 2009 +0000 sh: TMU platform data for sh7366 This patch adds TMU platform data for sh7366. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit e37677a429a67cb45004b060ea3376e500bc73c4 Author: Magnus Damm Date: Tue May 12 09:39:06 2009 +0000 sh: TMU platform data for sh7343 This patch adds TMU platform data for sh7343. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 67d889bd828a3cbf36ef27bd4a5c5f7ec76e20b9 Author: Magnus Damm Date: Tue May 12 09:34:26 2009 +0000 sh: add sh4-202 INTC tables This patch adds INTC tables for sh4-202 with support for HUDI, TMU0, TMU1, TMU2, RTC, SCIF and WDT. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 5f8a29ba39d52b2eaaed907b3cb3016b949a8f9b Author: Magnus Damm Date: Tue May 12 09:28:25 2009 +0000 sh: TMU platform data for sh4-202 This patch adds TMU platform data for sh4-202. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit f251935e02e89aa203e0729bfd727175018cec6f Author: Magnus Damm Date: Tue May 12 09:20:08 2009 +0000 sh: TMU platform data for sh7770 This patch adds TMU platform data for sh7770. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 5d8728a71f416fd38a0945271c71cb2933fc5734 Author: Magnus Damm Date: Tue May 12 09:18:13 2009 +0000 sh: add sh7770_generic_defconfig This patch adds a generic sh7770 defconfig file. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 0ee8b4d7c7d39d9a9913e27686ef786642c3ccbb Author: Magnus Damm Date: Tue May 12 09:13:59 2009 +0000 sh: TMU platform data for sh7763 This patch adds TMU platform data for sh7763. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit dd4a416442a2fb4bd761163277d37ab6ce75ee4e Merge: ddc4097 13e2c86 Author: Takashi Iwai Date: Tue May 12 12:32:07 2009 +0200 Merge branch 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc commit 9fe5ee0efb1b1d4a0939bc4252a8427e3337d96a Author: Paul Mundt Date: Tue May 12 19:29:04 2009 +0900 sh: clkfwk: Use arch_clk_init() for on-chip clock registration. CPUs registering on-chip clocks should be using arch_clk_init() with the new scheme so that the CPUs have the opportunity to establish the topology prior to the initial root clock rate propagation. This ensures that CPUs with on-chip clocks that use CLK_ENABLE_ON_INIT are properly enabled at the initial propagation time, without having to further poke the root clocks. Signed-off-by: Paul Mundt commit 4797f6b021a3fa399942245d07a1feb30df81bb8 Author: Yinghai Lu Date: Sat May 2 10:40:57 2009 -0700 x86: read apic ID in the !acpi_lapic case Ed found that on 32-bit, boot_cpu_physical_apicid is not read right, when the mptable is broken. Interestingly, actually three paths use/set it: 1. acpi: at that time that is already read from reg 2. mptable: only read from mptable 3. no madt, and no mptable, that use default apic id 0 for 64-bit, -1 for 32-bit so we could read the apic id for the 2/3 path. We trust the hardware register more than we trust a BIOS data structure (the mptable). We can also avoid the double set_fixmap() when acpi_lapic is used, and also need to move cpu_has_apic earlier and call apic_disable(). Also when need to update the apic id, we'd better read and set the apic version as well - so that quirks are applied precisely. v2: make path 3 with 64bit, use -1 as apic id, so could read it later. v3: fix whitespace problem pointed out by Ed Swierk v5: fix boot crash [ Impact: get correct apic id for bsp other than acpi path ] Reported-by: Ed Swierk Signed-off-by: Yinghai Lu Acked-by: Cyrill Gorcunov LKML-Reference: <49FC85A9.2070702@kernel.org> [ v4: sanity-check in the ACPI case too ] Signed-off-by: Ingo Molnar commit 6cda3eb62ef42aa5acd649bf99c8db544e0f4051 Merge: b9c61b70 cec6be6 Author: Ingo Molnar Date: Tue May 12 12:17:30 2009 +0200 Merge branch 'x86/apic' into irq/numa Merge reason: both topics modify the APIC code but were able to do it in parallel so far. An upcoming patch generates a conflict so merge them to avoid the conflict. Signed-off-by: Ingo Molnar commit ddc4097b77bbb227851a44287acb2fb8a9896cc1 Merge: bec4c99 ae31c1f Author: Takashi Iwai Date: Tue May 12 11:57:09 2009 +0200 Merge branch 'topic/drvdata-fix' into topic/asoc commit 511b4c171a8054506e8898c40833e31270689b8b Author: Takashi Iwai Date: Tue May 12 11:51:46 2009 +0200 ALSA: hdsp - Add a comment about external firmwares for hdsp When the hdsp driver is built in kernel, the corresponding firmware files have to be built into the kernel as well (otherwise the boot will hang up for fairly long time), but there is no way to control it in Kconfig yet, unfortunately. Instead, show a comment for user just to make sure. Signed-off-by: Takashi Iwai commit 13e2c86c20f5d07b20d5a6dee24bcdd2b30b859f Merge: 97b8096 1ffafeb Author: Mark Brown Date: Tue May 12 10:53:33 2009 +0100 Merge branch 'for-2.6.30' into for-2.6.31 commit 97b8096dc92ae62b1d40e6bec7e7b257d2b30161 Author: Joonyoung Shim Date: Mon May 11 20:36:08 2009 +0900 ASoC: TWL4030: change DAPM for analog microphone selection The inputs of the twl4030 codec can be mixed, so we will use the mixer DAPM for the analog microphone registers(0x05, 0x06), but if we enable more than one input at the same time, the input impedance of the input amplifier will be reduced. Signed-off-by: Joonyoung Shim Acked-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 7de0a0aee5cf24639c14b17ab4077f5dba0d7cb9 Author: Mark Brown Date: Mon May 11 20:05:57 2009 +0100 ASoC: Enforce symmetric rates for PXA2xx I2S There is a single I2S_SYNC pin on the chip. Signed-off-by: Mark Brown commit eaaa5328835d8085d24221a0e5ceaacbe14a7523 Author: Mike Rapoport Date: Mon May 11 15:05:29 2009 +0300 ASoC: em-x270: make the driver support also eXeda and CM-X300 machines Signed-off-by: Mike Rapoport Signed-off-by: Mark Brown commit 8e365f9b6e583e82dff96ff415ff9cc2106f5b3c Author: Raphael Doursenaud Date: Tue May 12 11:49:39 2009 +0200 ALSA: hdsp: allow firmware loading from inside the kernel Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and in-kernel driver. Also corrected a typo in the comment. Signed-off-by: Raphael Doursenaud Signed-off-by: Takashi Iwai commit ed077b58f6146684069975122b1728a9d248a501 Author: Shaohua Li Date: Tue May 12 16:40:00 2009 +0800 x86: make sparse mem work in non-NUMA mode With sparse memory, holes should not be marked present for memmap. This patch makes sure sparsemem really works on SMP mode (!NUMA). [ Impact: use less memory to map fragmented RAM, avoid boot-OOM/crash ] Signed-off-by: Shaohua Li Signed-off-by: Sheng Yang LKML-Reference: <1242117600.22431.0.camel@sli10-desk.sh.intel.com> Signed-off-by: Ingo Molnar commit bf78ad69cd351798b9447a269c6bd41ce1f111f4 Author: Amerigo Wang Date: Mon May 11 23:29:09 2009 -0400 x86: process.c, remove useless headers is not needed by these files, remove them. [ Impact: cleanup ] Signed-off-by: WANG Cong Cc: akpm@linux-foundation.org LKML-Reference: <20090512032956.5040.77055.sendpatchset@localhost.localdomain> Signed-off-by: Ingo Molnar commit 9d62dcdfa6f6fc843f7d9b494bcd48f00b94f883 Author: Amerigo Wang Date: Mon May 11 22:05:28 2009 -0400 x86: merge process.c a bit Merge arch_align_stack() and arch_randomize_brk(), since they are the same. Tested on x86_64. [ Impact: cleanup ] Signed-off-by: Amerigo Wang Signed-off-by: Ingo Molnar commit 2b1ccc0ee918a653d0483fdad9dd6112ce8e9043 Author: Jens Axboe Date: Tue May 12 11:11:48 2009 +0200 splice: fix misleading comment Splice is tied to pipes by design, it'll not change. And now that the splice stuff is in splice.h (and note pipe.h), the rest of the comment is out-of-date as well. Signed-off-by: Jens Axboe commit 871b72dd1e12afc3f024479531d25a9339d2e3f9 Author: Dmitry Adamushko Date: Mon May 11 23:48:27 2009 +0200 x86: microcode: use smp_call_function_single instead of set_cpus_allowed, cleanup of synchronization logic * Solve issues described in 6f66cbc63081fd70e3191b4dbb796746780e5ae1 in a way that doesn't resort to set_cpus_allowed(); * in fact, only collect_cpu_info and apply_microcode callbacks must run on a target cpu, others will do just fine on any other. smp_call_function_single() (as suggested by Ingo) is used to run these callbacks on a target cpu. * cleanup of synchronization logic of the 'microcode_core' part The generic 'microcode_core' part guarantees that only a single cpu (be it a full-fledged cpu, one of the cores or HT) is being updated at any particular moment of time. In general, there is no need for any additional sync. mechanism in arch-specific parts (the patch removes existing spinlocks). See also the "Synchronization" section in microcode_core.c. * return -EINVAL instead of -1 (which is translated into -EPERM) in microcode_write(), reload_cpu() and mc_sysdev_add(). Other suggestions for an error code? * use 'enum ucode_state' as return value of request_microcode_{fw, user} to gain more flexibility by distinguishing between real error cases and situations when an appropriate ucode was not found (which is not an error per-se). * some minor cleanups Thanks a lot to Hugh Dickins for review/suggestions/testing! Reference: http://marc.info/?l=linux-kernel&m=124025889012541&w=2 [ Impact: refactor and clean up microcode driver locking code ] Signed-off-by: Dmitry Adamushko Acked-by: Hugh Dickins Cc: Andrew Morton Cc: Rusty Russell Cc: Andreas Herrmann Cc: Peter Oruba Cc: Arjan van de Ven LKML-Reference: <1242078507.5560.9.camel@earth> [ did some more cleanups ] Signed-off-by: Ingo Molnar arch/x86/include/asm/microcode.h | 25 ++ arch/x86/kernel/microcode_amd.c | 58 ++---- arch/x86/kernel/microcode_core.c | 326 +++++++++++++++++++++----------------- arch/x86/kernel/microcode_intel.c | 92 +++------- 4 files changed, 261 insertions(+), 240 deletions(-) (~20 new comment lines) commit ae31c1fbdbb18d917b0a1139497c2dbd35886989 Author: Greg Kroah-Hartman Date: Mon May 4 12:40:54 2009 -0700 sound: remove driver_data direct access of struct device In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Signed-off-by: Greg Kroah-Hartman Acked-by: Mark Brown Signed-off-by: Takashi Iwai commit f3f8290cb3fa4aa627321530bb85d5f35e487433 Author: Paul Mundt Date: Tue May 12 16:07:40 2009 +0900 sh: clkfwk: Handle clk_get_sys() returning an ERR_PTR. clk_get() needs to also perform an IS_ERR() check to see whether clk_get_sys() failed or not. Signed-off-by: Paul Mundt commit e458824f9d32e9bf7700d1eb0d201749af48eee0 Author: Tejun Heo Date: Tue May 12 08:49:32 2009 +0200 scsi: fix resid_len mis-conversion in scsi_end_request() Commit c3a4d78c580de4edc9ef0f7c59812fb02ceb037f introduced rq->data_len and converted residual count users to it. While converting, it mistakenly converted scsi_end_request() to finish requests with residual count when it wants to do is fully complete the request. Fix it by using blk_end_request_all() instead. This bug was spotted by Boaz Harrosh. Signed-off-by: Tejun Heo Spotted-by: Boaz Harrosh Cc: FUJITA Tomonori Cc: James Bottomley Signed-off-by: Jens Axboe commit 9541ba1d665542c96f7c0b5b836bbc1fd9d961b6 Author: Chris Pockelé Date: Tue May 12 08:08:53 2009 +0200 ALSA: hda - Add support of Samsung NC10 mini notebook Add specific configuration for Samsung NC10 mini notebook. Internal mic/speakers will be correctly muted when plugging in external ones. Mixer controls are added for speakers, headphones and PC beep. "Boost" is added for the microphones. Signed-off-by: Chris Pockelé Signed-off-by: Takashi Iwai commit e4d996ca806e93dddb5d76c0d3d859b494c559f6 Author: Theodore Ts'o Date: Tue May 12 00:25:28 2009 -0400 ext4: Rename ext4_get_blocks_handle() to be ext4_ind_get_blocks() The static function ext4_get_blocks_handle() is badly named. Of *course* it takes a handle. Since its counterpart for extent-based file is ext4_ext_get_blocks(), rename it to be ext4_ind_get_blocks(). Signed-off-by: "Theodore Ts'o" commit f888e652d758bfe0c04c209b72a05972daeba386 Author: Theodore Ts'o Date: Tue May 12 00:21:29 2009 -0400 ext4: Simplify function signature for ext4_da_get_block_write() The function ext4_da_get_block_write() is called in exactly one write, and the last argument, create, is always 1. Remove it to simplify the code slightly. Signed-off-by: "Theodore Ts'o" commit bc8e67409ccdcff72c3f1656b1fb1aad7ff396db Author: Vincent Minet Date: Fri May 15 08:33:18 2009 -0400 ext4: Fix spinlock assertions on UP systems On UP systems without DEBUG_SPINLOCK, ext4_is_group_locked always fails which triggers a BUG_ON() call. This patch fixes it by using assert_spin_locked instead. Signed-off-by: Vincent Minet Signed-off-by: "Theodore Ts'o" commit 168b6b1d0594c7866caa73b12f3b8d91075695f2 Author: Steven Rostedt Date: Mon May 11 22:11:05 2009 -0400 ring-buffer: move code around to remove some branches This is a bit of micro-optimizations. But since the ring buffer is used in tracing every function call, it is an extreme hot path. Every nanosecond counts. This change shows over 5% improvement in the ring-buffer-benchmark. [ Impact: more efficient code ] Signed-off-by: Steven Rostedt commit 88eb0125362f2ab272cbaf84252cf101ddc2dec9 Author: Steven Rostedt Date: Mon May 11 16:28:23 2009 -0400 ring-buffer: use internal time stamp function The ring_buffer_time_stamp that is exported adds a little more overhead than is needed for using it internally. This patch adds an internal timestamp function that can be inlined (a single line function) and used internally for the ring buffer. [ Impact: a little less overhead to the ring buffer ] Signed-off-by: Steven Rostedt commit 0f0c85fc80adbbd2265d89867d743f929d516805 Author: Steven Rostedt Date: Mon May 11 16:08:00 2009 -0400 ring-buffer: small optimizations Doing some small changes in the fast path of the ring buffer recording saves over 3% in the ring-buffer-benchmark test. [ Impact: a little faster ring buffer recording ] Signed-off-by: Steven Rostedt commit d93e4c940f51ae06b59c14523c4d55947f9597d6 Author: Eric Paris Date: Mon May 11 20:47:15 2009 -0400 securityfs: securityfs_remove should handle IS_ERR pointers Both of the securityfs users (TPM and IMA) can call securityfs_remove and pass an IS_ERR(dentry) in their failure paths. This patch handles those rather than panicing when it tries to start deferencing some negative memory. Signed-off-by: Eric Paris Signed-off-by: James Morris commit 1a62e958fa4aaeeb752311b4f5e16b2a86737b23 Author: Eric Paris Date: Mon May 11 13:59:22 2009 -0400 IMA: open all files O_LARGEFILE If IMA tried to measure a file which was larger than 4G dentry_open would fail with -EOVERFLOW since IMA wasn't passing O_LARGEFILE. This patch passes O_LARGEFILE to all IMA opens to avoid this problem. Signed-off-by: Eric Paris Acked-by: Mimi Zohar Signed-off-by: James Morris commit f06dd16a03f6f7f72fab4db03be36e28c28c6fd6 Author: Eric Paris Date: Mon May 11 13:59:16 2009 -0400 IMA: Handle dentry_open failures Currently IMA does not handle failures from dentry_open(). This means that we leave a pointer set to ERR_PTR(errno) and then try to use it just a few lines later in fput(). Oops. Signed-off-by: Eric Paris Acked-by: Mimi Zohar Signed-off-by: James Morris commit 37bcbf13d32e4e453e9def79ee72bd953b88302f Author: Eric Paris Date: Mon May 11 13:59:10 2009 -0400 IMA: use current_cred() instead of current->cred Proper invocation of the current credentials is to use current_cred() not current->cred. This patches makes IMA use the new method. Signed-off-by: Eric Paris Acked-by: Mimi Zohar Signed-off-by: James Morris commit 5031296c57024a78ddad4edfc993367dbf4abb98 Author: H. Peter Anvin Date: Thu May 7 16:54:11 2009 -0700 x86: add extension fields for bootloader type and version A long ago, in days of yore, it all began with a god named Thor. There were vikings and boats and some plans for a Linux kernel header. Unfortunately, a single 8-bit field was used for bootloader type and version. This has generally worked without *too* much pain, but we're getting close to flat running out of ID fields. Add extension fields for both type and version. The type will be extended if it the old field is 0xE; the version is a simple MSB extension. Keep /proc/sys/kernel/bootloader_type containing (type << 4) + (ver & 0xf) for backwards compatiblity, but also add /proc/sys/kernel/bootloader_version which contains the full version number. [ Impact: new feature to support more bootloaders ] Signed-off-by: H. Peter Anvin commit fe83fcc0a14dcf71996de5eb84771b2369ba7abc Author: H. Peter Anvin Date: Mon May 11 16:23:16 2009 -0700 x86, defconfig: update kernel position parameters Update CONFIG_RELOCATABLE, CONFIG_PHYSICAL_START and CONFIG_PHYSICAL_ALIGN to reflect the current defaults. [ Impact: make defconfig match Kconfig defaults ] Signed-off-by: H. Peter Anvin commit c4a994645d04d5fa6bfa52a3204af87dd92168d5 Author: H. Peter Anvin Date: Mon May 11 16:20:12 2009 -0700 x86, defconfig: update to current, no material changes Update defconfigs to reflect current configuration files. No other changes. [ Impact: updates defconfigs to match what "make defconfig" generates ] Signed-off-by: H. Peter Anvin commit 26717808f93a27c22d4853c4fb17fa225f4ccc68 Author: H. Peter Anvin Date: Thu May 7 14:19:34 2009 -0700 x86: make CONFIG_RELOCATABLE the default Remove the EXPERIMENTAL tag from CONFIG_RELOCATABLE and make it the default. Relocatable kernels have been used for a while now, and should now have identical semantics to non-relocatable kernels when loaded by a non-relocating bootloader. Signed-off-by: H. Peter Anvin commit ceefccc93932b920a8ec6f35f596db05202a12fe Author: H. Peter Anvin Date: Mon May 11 16:12:16 2009 -0700 x86: default CONFIG_PHYSICAL_START and CONFIG_PHYSICAL_ALIGN to 16 MB Default CONFIG_PHYSICAL_START and CONFIG_PHYSICAL_ALIGN each to 16 MB, so that both non-relocatable and relocatable kernels are loaded at 16 MB by a non-relocating bootloader. This is somewhat hacky, but it appears to be the only way to do this that does not break some some set of existing bootloaders. We want to avoid the bottom 16 MB because of large page breakup, memory holes, and ZONE_DMA. Embedded systems may need to reduce this, or update their bootloaders to be aware of the new min_alignment field. [ Impact: performance improvement, avoids problems on some systems ] Signed-off-by: H. Peter Anvin commit d297366ba692faf1f0384811a6ff0b20c3470b1b Author: H. Peter Anvin Date: Mon May 11 16:06:23 2009 -0700 x86: document new bzImage fields Document the new bzImage fields for kernel memory placement. [ Impact: adds documentation ] Signed-off-by: H. Peter Anvin commit 37ba7ab5e33cebc25c68fffe33e9f21e7c2014e8 Author: H. Peter Anvin Date: Mon May 11 15:56:08 2009 -0700 x86, boot: make kernel_alignment adjustable; new bzImage fields Make the kernel_alignment field adjustable; this allows us to set it to a large value (intended to be 16 MB to avoid ZONE_DMA contention, memory holes and other weirdness) while a smart bootloader can still force a loading at a lesser alignment if absolutely necessary. Also export pref_address (preferred loading address, corresponding to the link-time address) and init_size, the total amount of linear memory the kernel will require during initialization. [ Impact: allows better kernel placement, gives bootloader more info ] Signed-off-by: H. Peter Anvin commit 99aa45595f45603526513d5e29fc00f8afbf3913 Author: H. Peter Anvin Date: Mon May 11 16:02:10 2009 -0700 x86, boot: remove dead code from boot/compressed/head_*.S Remove a couple of lines of dead code from arch/x86/boot/compressed/head_*.S; all of these update registers that are dead in the current code. [ Impact: cleanup ] Signed-off-by: H. Peter Anvin commit 2ff799d3cff1ecb274049378b28120ee5c1c5e5f Author: Vaidyanathan Srinivasan Date: Mon May 11 20:09:14 2009 +0530 sched: Don't export sched_mc_power_savings on multi-socket single core system Fix to prevent sched_mc_power_saving from being exported through sysfs for multi-scoket single core system. Max cores should be always greater than one (1). My earlier patch that introduced fix for not exporting 'sched_mc_power_saving' on laptops broke it on multi-socket single core system. This fix addresses issue on both laptop and multi-socket single core system. Below are the Test results: 1. Single socket - multi-core Before Patch: Does not export 'sched_mc_power_saving' After Patch: Does not export 'sched_mc_power_saving' Result: Pass 2. Multi Socket - single core Before Patch: exports 'sched_mc_power_saving' After Patch: Does not export 'sched_mc_power_saving' Result: Pass 3. Multi Socket - Multi core Before Patch: exports 'sched_mc_power_saving' After Patch: exports 'sched_mc_power_saving' [ Impact: make the sched_mc_power_saving control available more consistently ] Signed-off-by: Mahesh Salgaonkar Cc: Suresh B Siddha Cc: Venkatesh Pallipadi Cc: Peter Zijlstra LKML-Reference: <20090511143914.GB4853@dirshya.in.ibm.com> Signed-off-by: Ingo Molnar commit 40b387a8a9a821878ecdf9fb117958c426fc1385 Author: H. Peter Anvin Date: Mon May 11 14:41:55 2009 -0700 x86, boot: use LOAD_PHYSICAL_ADDR on 64 bits Use LOAD_PHYSICAL_ADDR instead of CONFIG_PHYSICAL_START in the 64-bit decompression code, for equivalence with the 32-bit code. [ Impact: cleanup, increases code similarity ] Signed-off-by: H. Peter Anvin commit 77d1a4999502c260df0eb2de437d320bf8c64b36 Author: H. Peter Anvin Date: Mon May 11 14:21:12 2009 -0700 x86, boot: make symbols from the main vmlinux available Make symbols from the main vmlinux, as opposed to just compressed/vmlinux, available to header.S. Also, export a few additional symbols. This will be used in a subsequent patch to export the total memory footprint of the kernel. [ Impact: enable future enhancement ] Signed-off-by: H. Peter Anvin commit 0dae89572cbcd5f676ea52a9448d9639d97a53d6 Author: Paul Mundt Date: Tue May 12 06:18:09 2009 +0900 sh: clkfwk: Wire up clk_get_sys() support. This stubs in clk_get_sys() from the ARM clkdev implementation. Tentatively conver the clk_get() lookup code to use this, and once the rest of the in-tree users are happy with this, it can replace the fallback lookups. Signed-off-by: Paul Mundt commit 31cb31f76e030ae05ed45f409ce5eb68ef2987f6 Author: Roel Kluin Date: Mon May 11 21:57:08 2009 +0200 ASoC: remove driver_data direct access of struct device Signed-off-by: Mark Brown commit 007e8363b656768fe3f59c180824ff704680bb25 Author: Paul Mundt Date: Tue May 12 06:05:32 2009 +0900 sh: clkfwk: Kill off clk_recalc_rate(). The only user for this is the SH-Mobile r_clk, which is now added as a root clock and can be kicked via propagate_rate() as usual. Given that, there is no longer any need for the special clk_recalc_rate(), so we kill it off. Signed-off-by: Paul Mundt commit f5c84cf50812c80133e64683d0500b2416d55cb3 Author: Paul Mundt Date: Tue May 12 05:59:27 2009 +0900 sh: clkfwk: Tidy up on-chip clock registration and rate propagation. This tidies up the set_rate hack that the on-chip clocks were abusing to trigger rate propagation, which is now handled generically. Additionally, now that CLK_ENABLE_ON_INIT is wired up where it needs to be for these clocks, the clk_enable() can go away. In some cases this was bumping up the refcount higher than it should have been. Signed-off-by: Paul Mundt commit aa87aa343f2cd236b5eccd643abd4df918ed5c4f Author: Paul Mundt Date: Tue May 12 05:51:05 2009 +0900 sh: clkfwk: Improve the generic clk_set_parent() implementation. This causes the generic clk_set_parent() implementation to be a bit more intelligent. A clk_reparent() is added to move the clock over to the new parent's sibling list, which then allows the generic rate propagation code to succeed. This also becomes a nop if the new and old parents are unchanged. Signed-off-by: Paul Mundt commit ae891a4264c91246c0b4c22be68b9838747ae48d Author: Paul Mundt Date: Tue May 12 05:30:10 2009 +0900 sh: clkfwk: Fix up the clk_enable() error path. There are a couple of instances where a clk_enable() can fail, which the SH-Mobile code presently handles, but doesn't get reported all the way back up. This fixes up the return type so the errors make it all the way down to the drivers. Additionally, we now also error out properly if the parent enable fails. Prep work for aggressively turning off unused clocks on boot. Signed-off-by: Paul Mundt commit 154502e160e02dee7b00ec2149762ae5d48e0bb4 Author: Paul Mundt Date: Tue May 12 05:18:13 2009 +0900 sh: clkfwk: Convert SH-Mobile CPUs to use CLK_ENABLE_ON_INIT. Kill off all of the clk_always_enabled leftovers and use the new flag directly. Signed-off-by: Paul Mundt commit 4ff29ff8e8723a41e7defd8bc78a7b16cbf940a2 Author: Paul Mundt Date: Tue May 12 05:14:53 2009 +0900 sh: clkfwk: Consolidate the ALWAYS_ENABLED / NEEDS_INIT mess. There is no real distinction here in behaviour, either a clock needs to be enabled on initialiation or not. The ALWAYS_ENABLED flag was always intended to only apply to clocks that were physically always on and could simply not be disabled at all from software. Unfortunately over time this was abused and the meaning became a bit blurry. So, we kill off both of all of those paths now, as well as the newer NEEDS_INIT flag, and consolidate on a CLK_ENABLE_ON_INIT. Clocks that need to be enabled on initialization can set this, and it will purposely enable them and bump the refcount up. Signed-off-by: Paul Mundt commit b1f6cfe48c3cb1dfa77db3d2f42f765febaef9bc Author: Paul Mundt Date: Tue May 12 04:27:43 2009 +0900 sh: clkfwk: refactor rate propagation. This resyncs the rate propagation strategy with the scheme used by the OMAP clock framework. Child clocks are tracked on a list under each parent and propagation happens there specifically rather than constantly iterating over the global clock list. Signed-off-by: Paul Mundt commit a02cb230bb4fca04f091746c593de720a0e3a94a Author: Paul Mundt Date: Tue May 12 03:50:44 2009 +0900 sh: clkfwk: Add a followparent_recalc() helper. This adds a followparent_recalc() helper for clocks that just follow the parent's rate. Switch over the few CPUs that use this scheme for some of their clocks. Signed-off-by: Paul Mundt commit b68d8201433a91cabbcbeae48b53d8c1c426433a Author: Paul Mundt Date: Tue May 12 03:45:08 2009 +0900 sh: clkfwk: Make recalc return an unsigned long. This is prep work for cleaning up some of the rate propagation bits. Trivial conversion. Signed-off-by: Paul Mundt commit be957c447f7233a67904a1b11eb3ab61e702bf4d Author: Steven Rostedt Date: Mon May 11 14:42:53 2009 -0400 ring-buffer: move calculation of event length The event length is calculated and passed in to rb_reserve_next_event in two different locations. Having rb_reserve_next_event do the calculations directly makes only one location to do the change and causes the calculation to be inlined by gcc. Before: text data bss dec hex filename 16538 24 12 16574 40be kernel/trace/ring_buffer.o After: text data bss dec hex filename 16490 24 12 16526 408e kernel/trace/ring_buffer.o [ Impact: smaller more efficient code ] Signed-off-by: Steven Rostedt commit 1cd8d7358948909ab80b254eb14bcebc555ad417 Author: Steven Rostedt Date: Mon May 11 14:08:09 2009 -0400 ring-buffer: remove type parameter from rb_reserve_next_event The rb_reserve_next_event is only called for the data type (type = 0). There is no reason to pass in the type to the function. Before: text data bss dec hex filename 16554 24 12 16590 40ce kernel/trace/ring_buffer.o After: text data bss dec hex filename 16538 24 12 16574 40be kernel/trace/ring_buffer.o [ Impact: cleaner, smaller and slightly more efficient code ] Signed-off-by: Steven Rostedt commit d988ff94c1074c4c914235c8591bcceafb585ecf Author: Steven Rostedt Date: Fri May 8 11:03:57 2009 -0400 ring-buffer: check for divide by zero in ring-buffer-benchmark Although we check if "missed" is not zero, we divide by hit + missed, and the addition can possible overflow and become a divide by zero. This patch checks for this case, and will report it when it happens then modify "hit" to make the calculation be non zero. [ Impact: prevent possible divide by zero in ring-buffer-benchmark ] Reported-by: Andrew Morton Signed-off-by: Steven Rostedt commit 5a772b2b3c68e7e0b503c5a48469113bb0634314 Author: Steven Rostedt Date: Fri May 8 10:56:33 2009 -0400 ring-buffer: replace constants with time macros in ring-buffer-benchmark The use of numeric constants is discouraged. It is cleaner and more descriptive to use macros for constant time conversions. This patch also removes an extra new line. [ Impact: more descriptive time conversions ] Reported-by: Andrew Morton Signed-off-by: Steven Rostedt commit 0c23590f00f85467b318ad0c20c36796a5bd4c60 Author: Alexey Dobriyan Date: Mon May 4 03:30:15 2009 +0400 x86, 64-bit: ifdef out struct thread_struct::ip struct thread_struct::ip isn't used on x86_64, struct pt_regs::ip is used instead. kgdb should be reading 0 always, but I can't check it. [ Impact: (potentially) reduce thread_struct size on 64-bit ] Signed-off-by: Alexey Dobriyan Cc: containers@lists.linux-foundation.org LKML-Reference: <20090503233015.GJ16631@x200.localdomain> Signed-off-by: Ingo Molnar commit d756f4adb9d8a86e347a2d5435bb5cc95744733e Author: Alexey Dobriyan Date: Mon May 4 03:29:52 2009 +0400 x86, 32-bit: ifdef out struct thread_struct::fs After commit 464d1a78fbf8cf6c7fd970e7b3e2db50a320ce28 aka "[PATCH] i386: Convert i386 PDA code to use %fs" %fs saved during context switch moved from thread_struct to pt_regs and value on thread_struct became unused. [ Impact: reduce thread_struct size on 32-bit ] Signed-off-by: Alexey Dobriyan Cc: containers@lists.linux-foundation.org LKML-Reference: <20090503232952.GI16631@x200.localdomain> Signed-off-by: Ingo Molnar commit cec6be6d1069d697beb490bbb40a290d5ff554a2 Author: Cyrill Gorcunov Date: Mon May 11 17:41:40 2009 +0400 x86: apic: Fixmap apic address even if apic disabled In case if apic were disabled by boot option we still need read_apic operation. So fixmap a fake apic area if needed. [ Impact: fix boot crash ] Signed-off-by: Cyrill Gorcunov Cc: yinghai@kernel.org Cc: eswierk@aristanetworks.com LKML-Reference: <20090511134140.GH4624@lenovo> Signed-off-by: Ingo Molnar commit ccc195655fb25d7d967b278c4a4725dc5e7a6bf4 Author: Magnus Damm Date: Mon May 11 11:37:16 2009 +0000 sh: TMU platform data for sh7780 This patch adds TMU platform data for sh7780. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 50e2d0d3b4ffc945a6c27f16d4e5e557e725ec67 Author: Magnus Damm Date: Mon May 11 11:34:16 2009 +0000 sh: r7780 highlander clock fixes Update the r7780 highlander defconfig to fix PCLK value, while at it fix cmdline on r7785. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 3d6ad460214cc72b93333f51f498441a56d622e9 Author: Magnus Damm Date: Mon May 11 09:01:08 2009 +0000 sh: multiple vectors per irq - sh7760 Update intc tables and platform data to use one linux irq per maskable interrupt source instead of keeping the one-to-one mapping between vectors and linux irqs. This fixes potential irq masking issues for sh7760 hardware blocks such as DMAC/TMU2/REF. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 41fb454ebe6024f5c1e3b3cbc0abc0da762e7b51 Merge: 19c1a6f 091bf76 Author: Ingo Molnar Date: Mon May 11 14:44:27 2009 +0200 Merge commit 'v2.6.30-rc5' into core/iommu Merge reason: core/iommu was on an .30-rc1 base, update it to .30-rc5 to refresh. Signed-off-by: Ingo Molnar commit 97a52714658cd959a3cfa35c5b6f489859f0204b Author: Andreas Herrmann Date: Fri May 8 18:23:50 2009 +0200 x86: display extended apic registers with print_local_APIC and cpu_debug code Both print_local_APIC (used when apic=debug kernel param is set) and cpu_debug code missed support for some extended APIC registers that I'd like to see. This adds support to show: - extended APIC feature register - extended APIC control register - extended LVT registers [ Impact: print more debug info ] Signed-off-by: Andreas Herrmann Cc: Jaswinder Singh Rajput Cc: Cyrill Gorcunov LKML-Reference: <20090508162350.GO29045@alberich.amd.com> Signed-off-by: Ingo Molnar commit 0b0a47f5c4a30b58432e20ae1706a27baea91a88 Author: Miklos Szeredi Date: Thu May 7 15:37:37 2009 +0200 splice: implement default splice_write method If f_op->splice_write() is not implemented, fall back to a plain write. Use vfs_writev() to write from the pipe buffers. This will allow splice on all filesystems and file types. This includes "direct_io" files in fuse which bypass the page cache. Signed-off-by: Miklos Szeredi Signed-off-by: Jens Axboe commit 6818173bd658439b83896a2a7586f64ab51bf29c Author: Miklos Szeredi Date: Thu May 7 15:37:36 2009 +0200 splice: implement default splice_read method If f_op->splice_read() is not implemented, fall back to a plain read. Use vfs_readv() to read into previously allocated pages. This will allow splice and functions using splice, such as the loop device, to work on all filesystems. This includes "direct_io" files in fuse which bypass the page cache. Signed-off-by: Miklos Szeredi Signed-off-by: Jens Axboe commit 7c77f0b3f9208c339a4b40737bb2cb0f0319bb8d Author: Miklos Szeredi Date: Thu May 7 15:37:35 2009 +0200 splice: implement pipe to pipe splicing Allow splice(2) to work when both the input and the output is a pipe. Based on the impementation of the tee(2) syscall, but instead of duplicating the buffer references move the buffers from the input pipe to the output pipe. Moving the whole buffer only succeeds if the full length of the buffer is spliced. Otherwise duplicate the buffer, just like tee(2), set the length of the output buffer and advance the offset on the input buffer. Since splice is operating on two pipes, special care needs to be taken with locking to prevent AN ABBA deadlock. Again this is done similarly to the tee(2) syscall, first preparing the input and output pipes so there's data to consume and space for that data, and then doing the move operation while holding both locks. If other processes are doing I/O on the same pipes parallel to the splice, then by the time both inodes are locked there might be no buffers left to move, or no space to move them to. In this case retry the whole operation, including the preparation phase. This could lead to starvation, but I'm not sure if that's serious enough to worry about. Signed-off-by: Miklos Szeredi Signed-off-by: Jens Axboe commit 48bf2b1711dc498494e77705c415ee46bb508fd9 Author: Steven Whitehouse Date: Wed Apr 29 13:59:35 2009 +0100 GFS2: Something nonlinear this way comes! For some reason GFS2 has been missing support for non-linear mappings. This patch fixes that, and also avoids taking any locks for mmap in the O_NOATIME case. In fact we don't actually need to take the lock here at all - just doing file_accessed() would be enough, but we have to take the lock eventually and this helps it hit disk (and thus be seen by other nodes) faster. Signed-off-by: Steven Whitehouse commit 4a0f9a321a113392b448e477018311d14fba2b34 Author: Steven Whitehouse Date: Mon Apr 20 08:16:26 2009 +0100 GFS2: Optimise writepage for metadata This adds a GFS2 specific writepage for metadata, rather than continuing to use the VFS function. As a result we now tag all our metadata I/O with the correct flag so that blktraces will now be less confusing. Also, the generic function was checking for a number of corner cases which cannot happen on the metadata address spaces so that this should be faster too. Signed-off-by: Steven Whitehouse commit c969f58ca43fc403c75f5d3da4cf1e21de7afaa0 Author: Steven Whitehouse Date: Tue Apr 7 14:13:01 2009 +0100 GFS2: Update the rw flags After Jens recent updates: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a1f242524c3c1f5d40f1c9c343427e34d1aadd6e et al. this is a patch to bring gfs2 uptodate with the core code. Also I've managed to squash another call to ll_rw_block() along the way. There is still one part of the GFS2 I/O paths which are not correctly annotated and that is due to the sharing of the writeback code between the data and metadata address spaces. I would like to change that too, but this patch is still worth doing on its own, I think. Signed-off-by: Steven Whitehouse commit 79c5d3ce614d8fe706545c7bca2158b63db6bb5e Author: Li Zefan Date: Mon May 11 15:06:46 2009 +0800 blktrace: from-sector redundant in trace_block_remap, cleanup The last argument of block_remap prober is the original sector before remap, so it should be 'from', not 'to'. [ Impact: clean up ] Signed-off-by: Li Zefan Cc: "Alan D. Brunelle" Cc: Jens Axboe Cc: Arnaldo Carvalho de Melo Cc: KOSAKI Motohiro LKML-Reference: <4A07CE86.5090301@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 7961386fe9596e6bf03d09948a73c5df9653325b Merge: aa47b7e 091bf76 Author: Ingo Molnar Date: Mon May 11 12:59:32 2009 +0200 Merge commit 'v2.6.30-rc5' into sched/core Merge reason: sched/core was on .30-rc1 before, update to latest fixes Signed-off-by: Ingo Molnar commit 049862579333cc6cd9e6edfd6987cd0addfd8c59 Author: Li Zefan Date: Mon May 11 14:33:23 2009 +0800 blktrace: pdu_buf of pc events should be unsigned I got this: 8,0 1 305.417782332 2037 I R 32 (ffffff9e 10 00 ...) [bash] It should be: 8,0 1 305.417782332 2037 I R 32 (9e 10 00 ...) [bash] [ Impact: fix output of pc events ] Signed-off-by: Li Zefan Cc: Jens Axboe Cc: Arnaldo Carvalho de Melo Cc: Steven Rostedt Cc: Frederic Weisbecker LKML-Reference: <4A07C6B3.9080802@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 615a3f1e055ac9b0ae74e1f935a12ea2cfe2a2ad Author: Paul Mackerras Date: Mon May 11 15:50:21 2009 +1000 perf_counter: call atomic64_set for counter->count A compile warning triggered because we are calling atomic_set(&counter->count). But since counter->count is an atomic64_t, we have to use atomic64_set. So the count can be set short, resulting in the reset ioctl only resetting the low word. [ Impact: clear counter properly during the reset ioctl ] Signed-off-by: Paul Mackerras Cc: Peter Zijlstra Cc: Corey Ashford LKML-Reference: <18951.48285.270311.981806@drongo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit a08b159fc243dbfe415250466d24cfc5010deee5 Author: Paul Mackerras Date: Mon May 11 15:46:10 2009 +1000 perf_counter: don't count scheduler ticks as context switches The context-switch software counter gives inflated values at present because each scheduler tick and each process-wide counter enable/disable prctl gets counted as a context switch. This happens because perf_counter_task_tick, perf_counter_task_disable and perf_counter_task_enable all call perf_counter_task_sched_out, which calls perf_swcounter_event to record a context switch event. This fixes it by introducing a variant of perf_counter_task_sched_out with two underscores in front for internal use within the perf_counter code, and makes perf_counter_task_{tick,disable,enable} call it. This variant doesn't record a context switch event, and takes a struct perf_counter_context *. This adds the new variant rather than changing the behaviour or interface of perf_counter_task_sched_out because that is called from other code. [ Impact: fix inflated context-switch event counts ] Signed-off-by: Paul Mackerras Cc: Peter Zijlstra Cc: Corey Ashford LKML-Reference: <18951.48034.485580.498953@drongo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 6751b71ea2c7ab8c0d65f01973a3fc8ea16992f4 Author: Paul Mackerras Date: Mon May 11 12:08:02 2009 +1000 perf_counter: Put whole group on when enabling group leader Currently, if you have a group where the leader is disabled and there are siblings that are enabled, and then you enable the leader, we only put the leader on the PMU, and not its enabled siblings. This is incorrect, since the enabled group members should be all on or all off at any given point. This fixes it by adding a call to group_sched_in in __perf_counter_enable in the case where we're enabling a group leader. To avoid the need for a forward declaration this also moves group_sched_in up before __perf_counter_enable. The actual content of group_sched_in is unchanged by this patch. [ Impact: fix bug in counter enable code ] Signed-off-by: Paul Mackerras Cc: Peter Zijlstra Cc: Corey Ashford LKML-Reference: <18951.34946.451546.691693@drongo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 8823392360dc4992f87bf4c623834d315f297493 Author: Mike Galbraith Date: Sun May 10 10:53:05 2009 +0200 perf_counter, x86: clean up throttling printk s/PERFMON/perfcounters for perfcounter interrupt throttling warning. 'perfmon' is the CPU feature name that is Intel-only, while we do throttling in a generic way. [ Impact: cleanup ] Signed-off-by: Mike Galbraith Cc: Robert Richter Cc: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: Signed-off-by: Ingo Molnar commit 087fa4e964e04371a67f340e1f6ac92c5db5e0a6 Author: Pekka Enberg Date: Thu May 7 15:35:42 2009 +0300 x86: use sparse_memory_present_with_active_regions() on UMA There's no need to use call memory_present() manually on UMA because initmem_init() sets up early_node_map by calling e820_register_active_regions(). [ Impact: cleanup ] Signed-off-by: Pekka Enberg LKML-Reference: <1241699742.17846.31.camel@penberg-laptop> Signed-off-by: Ingo Molnar commit 3551f88f6439cf4da3f5a3747b320280e30500de Author: Pekka Enberg Date: Thu May 7 15:35:41 2009 +0300 x86: unify 64-bit UMA and NUMA paging_init() 64-bit UMA and NUMA versions of paging_init() are almost identical. Therefore, merge the copy in mm/numa_64.c to mm/init_64.c to remove duplicate code. [ Impact: cleanup ] Signed-off-by: Pekka Enberg LKML-Reference: <1241699741.17846.30.camel@penberg-laptop> Signed-off-by: Ingo Molnar commit c42f32dca3855d8f867387ec6993d9b62516a00e Author: Magnus Damm Date: Mon May 11 09:06:24 2009 +0000 sh: TMU platform data for sh7760 This patch adds TMU platform data for sh7760. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 03f408f1aad8d0f5eb6380732bffc0f72b250fa7 Author: Magnus Damm Date: Mon May 11 08:54:54 2009 +0000 sh: TMU platform data for sh775x This patch adds TMU platform data for sh775x. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 53c0054c3f11b49fc09f24e46f58661def952728 Author: Magnus Damm Date: Mon May 11 08:45:27 2009 +0000 sh: include empty_zero_page in text Include empty_zero_page in _text. This fixes a problem introduced by c3e2586b794b12ffcdf69b4e547030b51e18e6d9 which results in broken boot on R2D-Plus. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 0964b0562bb9c93194e852b47bab2397b9e11c18 Author: Yinghai Lu Date: Fri May 8 00:37:34 2009 -0700 x86: Allow 1MB of slack between the e820 map and SRAT, not 4GB It is expected that there might be slight differences between the e820 map and the SRAT table and the intention was that 1MB of slack be allowed. The calculation comparing e820ram and pxmram assumes the units are bytes, when they are in fact pages. This means 4GB of slack is being allowed, not 1MB. This patch makes the correct comparison. comment is from Mel. [ Impact: don't accept buggy SRATs that could dump up to 4G of RAM ] Signed-off-by: Yinghai Lu Acked-by: Mel Gorman Cc: Andrew Morton LKML-Reference: <4A03E13E.6050107@kernel.org> Signed-off-by: Ingo Molnar commit b37ab91907e9002925f4217e3bbd496aa12c2fa3 Author: Yinghai Lu Date: Fri May 8 00:36:44 2009 -0700 x86: Sanity check the e820 against the SRAT table using e820 map only node_cover_memory() sanity checks the SRAT table by ensuring that all PXMs cover the memory reported in the e820. However, when calculating the size of the holes in the e820, it uses the early_node_map[] which contains information taken from both SRAT and e820. If the SRAT is missing an entry, then it is not detected that the SRAT table is incorrect and missing entries. This patch uses the e820 map to calculate the holes instead of early_node_map[]. comment is from Mel. [ Impact: reject incorrect SRAT tables ] Signed-off-by: Yinghai Lu Acked-by: Mel Gorman Cc: Andrew Morton LKML-Reference: <4A03E10C.60906@kernel.org> Signed-off-by: Ingo Molnar commit 4401da6111ac58f94234417427d06a72c4048c74 Author: Yinghai Lu Date: Sat May 2 10:40:57 2009 -0700 x86: read apic ID in the !acpi_lapic case Ed found that on 32-bit, boot_cpu_physical_apicid is not read right, when the mptable is broken. Interestingly, actually three paths use/set it: 1. acpi: at that time that is already read from reg 2. mptable: only read from mptable 3. no madt, and no mptable, that use default apic id 0 for 64-bit, -1 for 32-bit so we could read the apic id for the 2/3 path. We trust the hardware register more than we trust a BIOS data structure (the mptable). We can also avoid the double set_fixmap() when acpi_lapic is used, and also need to move cpu_has_apic earlier and call apic_disable(). Also when need to update the apic id, we'd better read and set the apic version as well - so that quirks are applied precisely. v2: make path 3 with 64bit, use -1 as apic id, so could read it later. v3: fix whitespace problem pointed out by Ed Swierk [ Impact: get correct apic id for bsp other than acpi path ] Reported-by: Ed Swierk Signed-off-by: Yinghai Lu Acked-by: Cyrill Gorcunov LKML-Reference: <49FC85A9.2070702@kernel.org> [ v4: sanity-check in the ACPI case too ] Signed-off-by: Ingo Molnar commit 80989ce0643c1034822f3e339ed8d790b649abe1 Author: Yinghai Lu Date: Sat May 9 23:47:42 2009 -0700 x86: clean up and and print out initial max_pfn_mapped Do this so we can check the range that is mapped before init_memory_mapping(). To be able to print out meaningful info, we first have to fix 64-bit to have max_pfn_mapped assigned before that call. This also unifies the code-path a bit. [ Impact: print more debug info, cleanup ] Signed-off-by: Yinghai Lu LKML-Reference: <49BF0978.40605@kernel.org> Signed-off-by: Ingo Molnar commit b1f744937f1be3e6d3009382a755679133cf782d Author: FUJITA Tomonori Date: Mon May 11 17:56:09 2009 +0900 block: move completion related functions back to blk-core.c Let's put the completion related functions back to block/blk-core.c where they have lived. We can also unexport blk_end_bidi_request() and __blk_end_bidi_request(), which nobody uses. Signed-off-by: FUJITA Tomonori Signed-off-by: Jens Axboe commit e6bb7a96c2c36f20c05ef648f15bd3c2b1834c78 Author: FUJITA Tomonori Date: Mon May 11 17:56:08 2009 +0900 scsi: simplify the bidi completion Let's use blk_end_request_all() instead of blk_end_bidi_request(). Signed-off-by: FUJITA Tomonori Signed-off-by: Jens Axboe commit 1822952ba2b9f22f79019d07ebbeca31dc14b718 Author: FUJITA Tomonori Date: Mon May 11 17:56:07 2009 +0900 block: let blk_end_request_all handle bidi requests blk_end_request_all() and __blk_end_request_all() should finish all bytes including bidi, by definition. That's what all bidi users need , bidi requests must be complete as a whole (partial completion is impossible). Signed-off-by: FUJITA Tomonori Signed-off-by: Jens Axboe commit 3e0c373749d7eb5b354ac0b043f2b2cdf84eefef Author: Yinghai Lu Date: Sat May 9 23:47:42 2009 -0700 x86: clean up and fix setup_clear/force_cpu_cap handling setup_force_cpu_cap() only have one user (Xen guest code), but it should not reuse cleared_cpu_cpus, otherwise it will have problems on SMP. Need to have a separate cpu_cpus_set array too, for forced-on flags, beyond the forced-off flags. Also need to setup handling before all cpus caps are combined. [ Impact: fix the forced-set CPU feature flag logic ] Cc: H. Peter Anvin Cc: Jeremy Fitzhardinge Cc: Rusty Russell Signed-off-by: Yinghai Lu LKML-Reference: Signed-off-by: Ingo Molnar commit 61fe91e1319556f32bebfd7ed2c68ef02e2c17f7 Author: Yinghai Lu Date: Sat May 9 23:47:42 2009 -0700 x86: apic: Check rev 3 fadt correctly for physical_apic bit Impact: fix fadt version checking FADT2_REVISION_ID has value 3 aka rev 3 FADT. So need to use >= instead of >, as other places in the code do. [ Impact: extend scope of APIC boot quirk ] Signed-off-by: Yinghai Lu LKML-Reference: Signed-off-by: Ingo Molnar commit b9c61b70075c87a8612624736faf4a2de5b1ed30 Author: Yinghai Lu Date: Wed May 6 10:10:06 2009 -0700 x86/pci: update pirq_enable_irq() to setup io apic routing So we can set io apic routing only when enabling the device irq. This is advantageous for IRQ descriptor allocation affinity: if we set up the IO-APIC entry later, we have a chance to allocate the IRQ descriptor later and know which device it is on and can set affinity accordingly. [ Impact: standardize/enhance irq-enabling sequence for mptable irqs ] Signed-off-by: Yinghai Lu Acked-by: Jesse Barnes Cc: Len Brown Cc: Andrew Morton LKML-Reference: <4A01C46E.8000501@kernel.org> Signed-off-by: Ingo Molnar commit 5ef2183768bb7d64b85eccbfa1537a61cbefa97c Author: Yinghai Lu Date: Wed May 6 10:08:50 2009 -0700 x86/acpi: move setup io apic routing out of CONFIG_ACPI scope So we could set io apic routing when ACPI is not enabled. [ Impact: prepare for new functionality ] Signed-off-by: Yinghai Lu Cc: Andrew Morton Cc: Jesse Barnes Cc: Len Brown LKML-Reference: <4A01C422.5070400@kernel.org> Signed-off-by: Ingo Molnar commit e20c06fd6950265a899edd96a02dc2e6ae2d1ce5 Author: Yinghai Lu Date: Wed May 6 10:08:22 2009 -0700 x86/pci: add 4 more return parameters to IO_APIC_get_PCI_irq_vector() To prepare those params for pcibios_irq_enable() to call setup_io_apic_routing(). [ Impact: extend function call API to prepare for new functionality ] Signed-off-by: Yinghai Lu Acked-by: Jesse Barnes Cc: Len Brown Cc: Andrew Morton LKML-Reference: <4A01C406.2040303@kernel.org> Signed-off-by: Ingo Molnar commit bdfe8ac153546537ed24de69610ea781a734f785 Author: Yinghai Lu Date: Wed May 6 10:07:41 2009 -0700 x86/acpi: move pin_programmed bit map to io_apic.c Prepare to call setup_io_apic_routing() in pcibios_irq_enable() also remove not needed member apic_id. [ Impact: clean up, prepare for future change ] Signed-off-by: Yinghai Lu Cc: Andrew Morton Cc: Jesse Barnes Cc: Len Brown LKML-Reference: <4A01C3DD.3050104@kernel.org> Signed-off-by: Ingo Molnar commit a31f82057ce6f7ced578d64c07a72ccbdc7336e4 Author: Yinghai Lu Date: Wed May 6 10:06:15 2009 -0700 x86/acpi: call mp_config_acpi_gsi() in mp_register_gsi() The patch to call mp_config_acpi_gsi() from the ACPI IRQ registration code never got mainline because there were open discussions about it. This call is needed to properly update the kernel's copy of the mptable, when the update_mptable boot parameter is needed. Now that the dust has settled with the APIC unification, and since there were no objections when the patch was re-submitted, try this again. [ Impact: fix the update_mptable boot parameter ] Signed-off-by: Yinghai Lu Cc: Andrew Morton Cc: Jesse Barnes Cc: Len Brown LKML-Reference: <4A01C387.7090103@kernel.org> Signed-off-by: Ingo Molnar commit ee214558c2e959781a406e76c5b34364da638e1d Author: Yinghai Lu Date: Wed May 6 10:07:07 2009 -0700 x86: fix alloc_mptable() Fix the conditions when we stop updating the mptable due to running out of slots. [ Impact: fix memory corruption / non-working update_mptable boot parameter ] Signed-off-by: Yinghai Lu Cc: Andrew Morton Cc: Jesse Barnes Cc: Len Brown LKML-Reference: <4A01C3BB.1000609@kernel.org> Signed-off-by: Ingo Molnar commit b9e0353fc85dab4ef5ebcef2bd09ebc4ce6d5a7b Author: Yinghai Lu Date: Wed May 6 10:05:32 2009 -0700 x86/acpi: remove irq-compression trick on 32-bit We already have a per cpu vector on 32-bit via recent changes, and don't need this trick any more (which trick obfuscates the real GSI mappings and which only triggers on larger systems to begin with): On 3 ioapic system (24 per ioapic) before patch I got: ACPI: PCI Interrupt Link [ILSB] enabled at IRQ 71 IOAPIC[2]: Set routing entry (10-23 -> 0xa9 -> IRQ 64 Mode:1 Active:1) pci 0000:80:01.1: PCI INT A -> Link[ILSB] -> GSI 71 (level, low) -> IRQ 64 ACPI: PCI Interrupt Link [LE5B] enabled at IRQ 67 IOAPIC[2]: Set routing entry (10-19 -> 0xb1 -> IRQ 65 Mode:1 Active:1) pci 0000:83:00.0: PCI INT B -> Link[LE5B] -> GSI 67 (level, low) -> IRQ 65 ACPI: PCI Interrupt Link [LE5A] enabled at IRQ 66 IOAPIC[2]: Set routing entry (10-18 -> 0xb9 -> IRQ 66 Mode:1 Active:1) pci 0000:83:00.1: PCI INT A -> Link[LE5A] -> GSI 66 (level, low) -> IRQ 66 ACPI: PCI Interrupt Link [LE5D] enabled at IRQ 65 IOAPIC[2]: Set routing entry (10-17 -> 0xc1 -> IRQ 67 Mode:1 Active:1) pci 0000:84:00.0: PCI INT B -> Link[LE5D] -> GSI 65 (level, low) -> IRQ 67 ACPI: PCI Interrupt Link [LE5C] enabled at IRQ 64 IOAPIC[2]: Set routing entry (10-16 -> 0xc9 -> IRQ 68 Mode:1 Active:1) pci 0000:84:00.1: PCI INT A -> Link[LE5C] -> GSI 64 (level, low) -> IRQ 68 pci 0000:87:00.0: PCI INT B -> Link[LE5A] -> GSI 66 (level, low) -> IRQ 66 pci 0000:87:00.1: PCI INT A -> Link[LE5D] -> GSI 65 (level, low) -> IRQ 67 pci 0000:88:00.0: PCI INT B -> Link[LE5C] -> GSI 64 (level, low) -> IRQ 68 pci 0000:88:00.1: PCI INT A -> Link[LE5B] -> GSI 67 (level, low) -> IRQ 65 pci 0000:8b:00.0: PCI INT B -> Link[LE5A] -> GSI 66 (level, low) -> IRQ 66 pci 0000:8b:00.1: PCI INT A -> Link[LE5D] -> GSI 65 (level, low) -> IRQ 67 pci 0000:8c:00.0: PCI INT B -> Link[LE5C] -> GSI 64 (level, low) -> IRQ 68 pci 0000:8c:00.1: PCI INT A -> Link[LE5B] -> GSI 67 (level, low) -> IRQ 65 after the patch we get: ACPI: PCI Interrupt Link [ILSB] enabled at IRQ 71 IOAPIC[2]: Set routing entry (10-23 -> 0xa9 -> IRQ 71 Mode:1 Active:1) pci 0000:80:01.1: PCI INT A -> Link[ILSB] -> GSI 71 (level, low) -> IRQ 71 ACPI: PCI Interrupt Link [LE5B] enabled at IRQ 67 IOAPIC[2]: Set routing entry (10-19 -> 0xb1 -> IRQ 67 Mode:1 Active:1) pci 0000:83:00.0: PCI INT B -> Link[LE5B] -> GSI 67 (level, low) -> IRQ 67 ACPI: PCI Interrupt Link [LE5A] enabled at IRQ 66 IOAPIC[2]: Set routing entry (10-18 -> 0xb9 -> IRQ 66 Mode:1 Active:1) pci 0000:83:00.1: PCI INT A -> Link[LE5A] -> GSI 66 (level, low) -> IRQ 66 ACPI: PCI Interrupt Link [LE5D] enabled at IRQ 65 IOAPIC[2]: Set routing entry (10-17 -> 0xc1 -> IRQ 65 Mode:1 Active:1) pci 0000:84:00.0: PCI INT B -> Link[LE5D] -> GSI 65 (level, low) -> IRQ 65 ACPI: PCI Interrupt Link [LE5C] enabled at IRQ 64 IOAPIC[2]: Set routing entry (10-16 -> 0xc9 -> IRQ 64 Mode:1 Active:1) pci 0000:84:00.1: PCI INT A -> Link[LE5C] -> GSI 64 (level, low) -> IRQ 64 pci 0000:87:00.0: PCI INT B -> Link[LE5A] -> GSI 66 (level, low) -> IRQ 66 pci 0000:87:00.1: PCI INT A -> Link[LE5D] -> GSI 65 (level, low) -> IRQ 65 pci 0000:88:00.0: PCI INT B -> Link[LE5C] -> GSI 64 (level, low) -> IRQ 64 pci 0000:88:00.1: PCI INT A -> Link[LE5B] -> GSI 67 (level, low) -> IRQ 67 pci 0000:8b:00.0: PCI INT B -> Link[LE5A] -> GSI 66 (level, low) -> IRQ 66 pci 0000:8b:00.1: PCI INT A -> Link[LE5D] -> GSI 65 (level, low) -> IRQ 65 pci 0000:8c:00.0: PCI INT B -> Link[LE5C] -> GSI 64 (level, low) -> IRQ 64 pci 0000:8c:00.1: PCI INT A -> Link[LE5B] -> GSI 67 (level, low) -> IRQ 67 As it can be seen that GSIs now get mapped lineary. [ Impact: simplify irq number mapping on bigger 32-bit systems ] Signed-off-by: Yinghai Lu Cc: Andrew Morton Cc: Jesse Barnes Cc: Len Brown LKML-Reference: <4A01C35C.7060207@kernel.org> Signed-off-by: Ingo Molnar commit fa1285b3d1955c3719413d950224977a900f91f9 Merge: 01f2bd4 9da2927 Author: Takashi Iwai Date: Mon May 11 10:23:36 2009 +0200 Merge branch 'topic/hda-vt-spdif' into topic/hda commit 7bce6c2740fab36708233e998a9e53115649b193 Author: Yoshihiro Shimoda Date: Mon May 11 06:51:28 2009 +0000 sh: sh7785lcr: fix I2C device address map for 32-bit mode This fixes up the broken I2C offset in 32-bit mode. The cause is because the board datasheet had a mistake. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Paul Mundt commit 9934c8c04561413609d2bc38c6b9f268cba774a4 Author: Tejun Heo Date: Fri May 8 11:54:16 2009 +0900 block: implement and enforce request peek/start/fetch Till now block layer allowed two separate modes of request execution. A request is always acquired from the request queue via elv_next_request(). After that, drivers are free to either dequeue it or process it without dequeueing. Dequeue allows elv_next_request() to return the next request so that multiple requests can be in flight. Executing requests without dequeueing has its merits mostly in allowing drivers for simpler devices which can't do sg to deal with segments only without considering request boundary. However, the benefit this brings is dubious and declining while the cost of the API ambiguity is increasing. Segment based drivers are usually for very old or limited devices and as converting to dequeueing model isn't difficult, it doesn't justify the API overhead it puts on block layer and its more modern users. Previous patches converted all block low level drivers to dequeueing model. This patch completes the API transition by... * renaming elv_next_request() to blk_peek_request() * renaming blkdev_dequeue_request() to blk_start_request() * adding blk_fetch_request() which is combination of peek and start * disallowing completion of queued (not started) requests * applying new API to all LLDs Renamings are for consistency and to break out of tree code so that it's apparent that out of tree drivers need updating. [ Impact: block request issue API cleanup, no functional change ] Signed-off-by: Tejun Heo Cc: Rusty Russell Cc: James Bottomley Cc: Mike Miller Cc: unsik Kim Cc: Paul Clements Cc: Tim Waugh Cc: Geert Uytterhoeven Cc: David S. Miller Cc: Laurent Vivier Cc: Jeff Garzik Cc: Jeremy Fitzhardinge Cc: Grant Likely Cc: Adrian McMenamin Cc: Stephen Rothwell Cc: Bartlomiej Zolnierkiewicz Cc: Borislav Petkov Cc: Sergei Shtylyov Cc: Alex Dubov Cc: Pierre Ossman Cc: David Woodhouse Cc: Markus Lidel Cc: Stefan Weinhuber Cc: Martin Schwidefsky Cc: Pete Zaitcev Cc: FUJITA Tomonori Signed-off-by: Jens Axboe commit 2343046826a8ca426b07601d9593ee046c298b68 Author: Tejun Heo Date: Fri May 8 11:54:14 2009 +0900 gdrom: dequeue in-flight request gdrom already dequeues and fully completes requests on normal path and the error paths can be easily converted to do so too. Clean it up and dequeue requests on error paths too. While at it remove superflous blk_fs_request() && !blk_rq_sectors() condition check. [ Impact: dequeue in-flight request, cleanup ] Signed-off-by: Tejun Heo Cc: Adrian McMenamin Signed-off-by: Jens Axboe commit 296b2f6ae654581adc27f0d6f0af454c7f3d06ee Author: Tejun Heo Date: Fri May 8 11:54:15 2009 +0900 block: convert to dequeueing model (easy ones) plat-omap/mailbox, floppy, viocd, mspro_block, i2o_block and mmc/card/queue are already pretty close to dequeueing model and can be converted with simple changes. Convert them. While at it, * xen-blkfront: !fs check moved downwards to share dequeue call with normal path. * mspro_block: __blk_end_request(..., blk_rq_cur_byte()) converted to __blk_end_request_cur() * mmc/card/queue: loop of __blk_end_request() converted to __blk_end_request_all() [ Impact: dequeue in-flight request ] Signed-off-by: Tejun Heo Cc: Rusty Russell Cc: Jeremy Fitzhardinge Cc: Stephen Rothwell Cc: Alex Dubov Cc: Markus Lidel Cc: Pierre Ossman Signed-off-by: Jens Axboe commit fb3ac7f6b811eac8e0aafa3df1c16ed872e898a8 Author: Tejun Heo Date: Fri May 8 11:54:13 2009 +0900 z2ram: dequeue in-flight request z2ram processes requests one-by-one synchronously and can be easily converted to dequeueing model. Convert it. [ Impact: dequeue in-flight request ] Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 6b0bf407b586b6ba8e060ad9979cb2bc3370b7eb Author: Tejun Heo Date: Fri May 8 11:54:12 2009 +0900 jsflash: dequeue in-flight request jsflash processes requests one-by-one synchronously from a kthread and can be easily converted to dequeueing model. Convert it. [ Impact: dequeue in-flight request ] Signed-off-by: Tejun Heo Cc: Pete Zaitcev Signed-off-by: Jens Axboe commit 1498ada7a8e80afe324f2b8d86158925d0096ec9 Author: Tejun Heo Date: Fri May 8 11:54:11 2009 +0900 mtd_blkdevs: dequeue in-flight request mtd_blkdevs processes requests one-by-one synchronously from a kthread and can be easily converted to dequeueing model. Convert it. [ Impact: dequeue in-flight request ] Signed-off-by: Tejun Heo Cc: David Woodhouse Signed-off-by: Jens Axboe commit bab2a807a489822ded0c9d4a5344c80bcac10b0a Author: Tejun Heo Date: Fri May 8 11:54:10 2009 +0900 xd: dequeue in-flight request xd processes requests one-by-one synchronously and can be easily converted to dequeueing model. Convert it. While at it, use rq_cur_bytes instead of rq_bytes when checking for sector overflow. This is for for consistency and better behavior for merged requests. [ Impact: dequeue in-flight request ] Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 06b0608e2b46465e8e663214e7db982ddb000346 Author: Tejun Heo Date: Fri May 8 11:54:09 2009 +0900 swim: dequeue in-flight request swim processes requests one-by-one synchronously and can easily be converted to dequeuing model. Convert it. [ Impact: dequeue in-flight request ] Signed-off-by: Tejun Heo Cc: Laurent Vivier Signed-off-by: Jens Axboe commit 9e31bebee2d8b5f8abe9677f2a29b90cba848657 Author: Tejun Heo Date: Fri May 8 11:54:08 2009 +0900 amiflop: dequeue in-flight request Request processing in amiflop is done sequentially in redo_fd_request() proper and redo_fd_request() can easily be converted to track in-flight request. Remove CURRENT, track in-flight request directly and dequeue it when processing starts. [ Impact: dequeue in-flight request ] Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 10e1e629b386aef97bf66de6ef28d450bec06ee3 Author: Tejun Heo Date: Fri May 8 11:54:07 2009 +0900 ps3disk: dequeue in-flight request Other than in issue error paths, ps3disk always completely finishes fetched requests. With full completion on error paths, it can be easily converted to dequeueing model. * After L1 r/w call failure, ps3disk_submit_request_sg() now fails the whole request. Issue failure isn't likely to benefit from partial retry anyway and ps3disk uses full failure in completion error path too, so I don't think this amounts to any meaningful functionality loss. * flush completion is converted to _all for consistency. It doesn't make any functional difference. [ Impact: dequeue in-flight request ] Signed-off-by: Tejun Heo Cc: Geert Uytterhoeven Signed-off-by: Jens Axboe commit b12d4f82c1a3cdcb2441c803a3368a9426f2f47f Author: Tejun Heo Date: Fri May 8 11:54:06 2009 +0900 paride: dequeue in-flight request pd/pf/pcd have track in-flight request by pd/pf/pcd_req. They can be converted to dequeueing model by updating fetching and completion paths. Convert them. Note that removal of elv_next_request() call from pf_next_buf() doesn't make any functional difference. The path is traveled only during partial completion of a request and elv_next_request() call must return the same request anyway. [ Impact: dequeue in-flight request ] Signed-off-by: Tejun Heo Cc: Tim Waugh Signed-off-by: Jens Axboe commit 2d75ce084eec2a8154225c7e978191b364029003 Author: Tejun Heo Date: Fri May 8 11:54:05 2009 +0900 xsysace: dequeue in-flight request xsysace already tracks in-flight request using ace->req. Converting to dequeueing model is mostly a matter of adding dequeueing call after request fetching. The only tricky part is handling CF removal which should complete both in flight and on queue requests. Convert to dequeueing model. While at it, remove explicit blk_rq_cur_bytes() and use __blk_end_request_cur() instead. [ Impact: dequeue in-flight request ] Signed-off-by: Tejun Heo Cc: Grant Likely Signed-off-by: Jens Axboe commit f4bd4b90bfa86e867111aa182895cb5ac203aa7a Author: Tejun Heo Date: Fri May 8 11:54:04 2009 +0900 swim3: dequeue in-flight request swim3 has at most single request in flight and already tracks it using fd_req. Convert it to dequeuing model by updating request fetching and wrapping completion function. [ Impact: dequeue in-flight request ] Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit a336ca6fe6e0c46b2eef0e520951acb4e6cb2976 Author: Tejun Heo Date: Fri May 8 11:54:03 2009 +0900 ataflop: dequeue and track in-flight request ataflop has single request in flight. Till now, whenever it needs to access the in-flight request it called elv_next_request(). This patch makes ataflop track the in-flight request directly and dequeue it when processing starts. The added complexity is minimal and this will help future block layer changes. [ Impact: dequeue in-flight request, one elv_next_request() per request ] Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 8a12c4a456c7ee261a85c2cbec835601e6aae05a Author: Tejun Heo Date: Fri May 8 11:54:02 2009 +0900 hd: dequeue and track in-flight request hd has at most single request in flight. Till now, whenever it needs to access the in-flight request it called elv_next_request(). This patch makes hd track the in-flight request directly and dequeue it when processing starts. The added complexity is minimal and this will help future block layer changes. [ Impact: dequeue in-flight request, one elv_next_request() per request ] Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 5b36ad6000ddea390aca3c3b67ead7616ace2ffc Author: Tejun Heo Date: Fri May 8 11:54:01 2009 +0900 mg_disk: dequeue and track in-flight request mg_disk has at most single request in flight per device. Till now, whenever it needs to access the in-flight request it called elv_next_request(). This patch makes mg_disk track the in-flight request directly using mg_host->req and dequeue it when processing starts. q->queuedata is set to mg_host so that mg_host can be determined without fetching request from the queue. [ Impact: dequeue in-flight request, one elv_next_request() per request ] Signed-off-by: Tejun Heo Cc: unsik Kim Signed-off-by: Jens Axboe commit 9a8d23d8855e554fc5887f14cb008b55c4300ccc Author: Tejun Heo Date: Fri May 8 11:54:00 2009 +0900 mg_disk: fix queue hang / infinite retry on !fs requests Both request functions in mg_disk simply return when they encounter a !fs request, which means the request will never be cleared from the queue causing queue hang and indefinite retry of the request. Fix it. While at it, flatten condition checks and add unlikely to !fs tests. [ Impact: fix possible queue hang / infinite retry of !fs requests ] Signed-off-by: Tejun Heo Cc: unsik Kim Signed-off-by: Jens Axboe commit 8f6205cd572fece673da0255d74843680f67f879 Author: Tejun Heo Date: Fri May 8 11:53:59 2009 +0900 ide: dequeue in-flight request ide generally has single request in flight and tracks it using hwif->rq and all state handlers follow the following convention. * ide_started is returned if the request is in flight. * ide_stopped is returned if the queue needs to be restarted. The request might or might not have been processed fully or partially. * hwif->rq is set to NULL, when an issued request completes. So, dequeueing model can be implemented by dequeueing after fetch, requeueing if hwif->rq isn't NULL on ide_stopped return and doing about the same thing on completion / port unlock paths. These changes can be made in ide-io proper. In addition to the above main changes, the following updates are necessary. * ide-cd shouldn't dequeue a request when issuing REQUEST SENSE for it as the request is already dequeued. * ide-atapi uses request queue as stack when issuing REQUEST SENSE to put the REQUEST SENSE in front of the failed request. This now needs to be done using requeueing. [ Impact: dequeue in-flight request ] Signed-off-by: Tejun Heo Cc: Bartlomiej Zolnierkiewicz Cc: Borislav Petkov Cc: Sergei Shtylyov Signed-off-by: Jens Axboe commit 1011c1b9f2e45ce7c6e38888d2b83936aec38771 Author: Tejun Heo Date: Thu May 7 22:24:45 2009 +0900 block: blk_rq_[cur_]_{sectors|bytes}() usage cleanup With the previous changes, the followings are now guaranteed for all requests in any valid state. * blk_rq_sectors() == blk_rq_bytes() >> 9 * blk_rq_cur_sectors() == blk_rq_cur_bytes() >> 9 Clean up accessor usages. Notable changes are * nbd,i2o_block: end_all used instead of explicit byte count * scsi_lib: unnecessary conditional on request type removed [ Impact: cleanup ] Signed-off-by: Tejun Heo Cc: Paul Clements Cc: Pete Zaitcev Cc: Alex Dubov Cc: Markus Lidel Cc: David Woodhouse Cc: James Bottomley Cc: Boaz Harrosh Signed-off-by: Jens Axboe commit a2dec7b36364a5cc564c4d76cf16d2e7d33f5c05 Author: Tejun Heo Date: Thu May 7 22:24:44 2009 +0900 block: hide request sector and data_len Block low level drivers for some reason have been pretty good at abusing block layer API. Especially struct request's fields tend to get violated in all possible ways. Make it clear that low level drivers MUST NOT access or manipulate rq->sector and rq->data_len directly by prefixing them with double underscores. This change is also necessary to break build of out-of-tree codes which assume the previous block API where internal fields can be manipulated and rq->data_len carries residual count on completion. [ Impact: hide internal fields, block API change ] Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 34b7d2c957199834c474c9d46739265643f4d9c7 Author: Tejun Heo Date: Thu May 7 22:24:43 2009 +0900 ide: cleanup rq->data_len usages With recent unification of fields, it's now guaranteed that rq->data_len always equals blk_rq_bytes(). Convert all direct users to accessors. [ Impact: convert direct rq->data_len usages to blk_rq_bytes() ] Signed-off-by: Tejun Heo Acked-by: Bartlomiej Zolnierkiewicz Cc: Borislav Petkov Cc: Sergei Shtylyov Signed-off-by: Jens Axboe commit b0790410300abaaf4f25f702803beff701baebf1 Author: Tejun Heo Date: Thu May 7 22:24:42 2009 +0900 block: cleanup rq->data_len usages With recent unification of fields, it's now guaranteed that rq->data_len always equals blk_rq_bytes(). Convert all non-IDE direct users to accessors. IDE will be converted in a separate patch. Boaz: spotted incorrect data_len/resid_len conversion in osd. [ Impact: convert direct rq->data_len usages to blk_rq_bytes() ] Signed-off-by: Tejun Heo Acked-by: Sergei Shtylyov Cc: Pete Zaitcev Cc: Eric Moore Cc: Markus Lidel Cc: Darrick J. Wong Cc: James Bottomley Cc: Eric Moore Cc: Boaz Harrosh Cc: FUJITA Tomonori Signed-off-by: Jens Axboe commit 2e46e8b27aa57c6bd34b3102b40ee4d0144b4fab Author: Tejun Heo Date: Thu May 7 22:24:41 2009 +0900 block: drop request->hard_* and *nr_sectors struct request has had a few different ways to represent some properties of a request. ->hard_* represent block layer's view of the request progress (completion cursor) and the ones without the prefix are supposed to represent the issue cursor and allowed to be updated as necessary by the low level drivers. The thing is that as block layer supports partial completion, the two cursors really aren't necessary and only cause confusion. In addition, manual management of request detail from low level drivers is cumbersome and error-prone at the very least. Another interesting duplicate fields are rq->[hard_]nr_sectors and rq->{hard_cur|current}_nr_sectors against rq->data_len and rq->bio->bi_size. This is more convoluted than the hard_ case. rq->[hard_]nr_sectors are initialized for requests with bio but blk_rq_bytes() uses it only for !pc requests. rq->data_len is initialized for all request but blk_rq_bytes() uses it only for pc requests. This causes good amount of confusion throughout block layer and its drivers and determining the request length has been a bit of black magic which may or may not work depending on circumstances and what the specific LLD is actually doing. rq->{hard_cur|current}_nr_sectors represent the number of sectors in the contiguous data area at the front. This is mainly used by drivers which transfers data by walking request segment-by-segment. This value always equals rq->bio->bi_size >> 9. However, data length for pc requests may not be multiple of 512 bytes and using this field becomes a bit confusing. In general, having multiple fields to represent the same property leads only to confusion and subtle bugs. With recent block low level driver cleanups, no driver is accessing or manipulating these duplicate fields directly. Drop all the duplicates. Now rq->sector means the current sector, rq->data_len the current total length and rq->bio->bi_size the current segment length. Everything else is defined in terms of these three and available only through accessors. * blk_recalc_rq_sectors() is collapsed into blk_update_request() and now handles pc and fs requests equally other than rq->sector update. This means that now pc requests can use partial completion too (no in-kernel user yet tho). * bio_cur_sectors() is replaced with bio_cur_bytes() as block layer now uses byte count as the primary data length. * blk_rq_pos() is now guranteed to be always correct. In-block users converted. * blk_rq_bytes() is now guaranteed to be always valid as is blk_rq_sectors(). In-block users converted. * blk_rq_sectors() is now guaranteed to equal blk_rq_bytes() >> 9. More convenient one is used. * blk_rq_bytes() and blk_rq_cur_bytes() are now inlined and take const pointer to request. [ Impact: API cleanup, single way to represent one property of a request ] Signed-off-by: Tejun Heo Cc: Boaz Harrosh Signed-off-by: Jens Axboe commit 9780e2dd8254351f6cbe11304849126b51dbd561 Author: Tejun Heo Date: Thu May 7 22:24:40 2009 +0900 ide: convert to rq pos and nr_sectors accessors ide doesn't manipulate request fields anymore and thus all hard and their soft equivalents are always equal. Convert all references to accessors. [ Impact: use pos and nr_sectors accessors ] Signed-off-by: Tejun Heo Acked-by: Bartlomiej Zolnierkiewicz Cc: Borislav Petkov Cc: Sergei Shtylyov Signed-off-by: Jens Axboe commit 83096ebf1263b2c1ee5e653ba37d993d02e3eb7b Author: Tejun Heo Date: Thu May 7 22:24:39 2009 +0900 block: convert to pos and nr_sectors accessors With recent cleanups, there is no place where low level driver directly manipulates request fields. This means that the 'hard' request fields always equal the !hard fields. Convert all rq->sectors, nr_sectors and current_nr_sectors references to accessors. While at it, drop superflous blk_rq_pos() < 0 test in swim.c. [ Impact: use pos and nr_sectors accessors ] Signed-off-by: Tejun Heo Acked-by: Geert Uytterhoeven Tested-by: Grant Likely Acked-by: Grant Likely Tested-by: Adrian McMenamin Acked-by: Adrian McMenamin Acked-by: Mike Miller Cc: James Bottomley Cc: Bartlomiej Zolnierkiewicz Cc: Borislav Petkov Cc: Sergei Shtylyov Cc: Eric Moore Cc: Alan Stern Cc: FUJITA Tomonori Cc: Pete Zaitcev Cc: Stephen Rothwell Cc: Paul Clements Cc: Tim Waugh Cc: Jeff Garzik Cc: Jeremy Fitzhardinge Cc: Alex Dubov Cc: David Woodhouse Cc: Martin Schwidefsky Cc: Dario Ballabio Cc: David S. Miller Cc: Rusty Russell Cc: unsik Kim Cc: Laurent Vivier Signed-off-by: Jens Axboe commit 5b93629b4509c03ffa87a9316412fedf6f58cb37 Author: Tejun Heo Date: Thu May 7 22:24:38 2009 +0900 block: implement blk_rq_pos/[cur_]sectors() and convert obvious ones Implement accessors - blk_rq_pos(), blk_rq_sectors() and blk_rq_cur_sectors() which return rq->hard_sector, rq->hard_nr_sectors and rq->hard_cur_sectors respectively and convert direct references of the said fields to the accessors. This is in preparation of request data length handling cleanup. Geert : suggested adding const to struct request * parameter to accessors Sergei : spotted error in patch description [ Impact: cleanup ] Signed-off-by: Tejun Heo Acked-by: Geert Uytterhoeven Acked-by: Stephen Rothwell Tested-by: Grant Likely Acked-by: Grant Likely Ackec-by: Sergei Shtylyov Cc: Bartlomiej Zolnierkiewicz Cc: Borislav Petkov Cc: James Bottomley Signed-off-by: Jens Axboe commit c3a4d78c580de4edc9ef0f7c59812fb02ceb037f Author: Tejun Heo Date: Thu May 7 22:24:37 2009 +0900 block: add rq->resid_len rq->data_len served two purposes - the length of data buffer on issue and the residual count on completion. This duality creates some headaches. First of all, block layer and low level drivers can't really determine what rq->data_len contains while a request is executing. It could be the total request length or it coulde be anything else one of the lower layers is using to keep track of residual count. This complicates things because blk_rq_bytes() and thus [__]blk_end_request_all() relies on rq->data_len for PC commands. Drivers which want to report residual count should first cache the total request length, update rq->data_len and then complete the request with the cached data length. Secondly, it makes requests default to reporting full residual count, ie. reporting that no data transfer occurred. The residual count is an exception not the norm; however, the driver should clear rq->data_len to zero to signify the normal cases while leaving it alone means no data transfer occurred at all. This reverse default behavior complicates code unnecessarily and renders block PC on some drivers (ide-tape/floppy) unuseable. This patch adds rq->resid_len which is used only for residual count. While at it, remove now unnecessasry blk_rq_bytes() caching in ide_pc_intr() as rq->data_len is not changed anymore. Boaz : spotted missing conversion in osd Sergei : spotted too early conversion to blk_rq_bytes() in ide-tape [ Impact: cleanup residual count handling, report 0 resid by default ] Signed-off-by: Tejun Heo Cc: James Bottomley Cc: Bartlomiej Zolnierkiewicz Cc: Borislav Petkov Cc: Sergei Shtylyov Cc: Mike Miller Cc: Eric Moore Cc: Alan Stern Cc: FUJITA Tomonori Cc: Doug Gilbert Cc: Mike Miller Cc: Eric Moore Cc: Darrick J. Wong Cc: Pete Zaitcev Cc: Boaz Harrosh Signed-off-by: Jens Axboe commit 9720aef2539c10e3a872e9a92beec225030d99db Author: Tejun Heo Date: Thu May 7 22:24:36 2009 +0900 ide-tape: don't initialize rq->sector for rw requests rq->sector is set to the tape->first_frame but it's never actually used and not even in the correct unit (512 byte sectors). Don't set it. [ Impact: cleanup ] Signed-off-by: Tejun Heo Acked-by: Borislav Petkov Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Jens Axboe commit 53d6979ab6747e758207e8ac861b96d0da0d3332 Author: Tejun Heo Date: Thu May 7 22:24:35 2009 +0900 nbd: don't clear rq->sector and nr_sectors unnecessarily There's no reason to clear rq->sector and nr_sectors after calling blk_rq_init(). They're guaranteed to be clear. Drop unnecessary clearing. [ Impact: cleanup ] Signed-off-by: Tejun Heo Cc: Paul Clements Signed-off-by: Jens Axboe commit 7a309490da98981558a07183786201f02a6341e2 Merge: 9a8709d 091bf76 Author: Ingo Molnar Date: Mon May 11 09:33:06 2009 +0200 Merge commit 'v2.6.30-rc5' into x86/apic Merge reason: this branch was on a .30-rc2 base - sync it up with all the latest fixes. Signed-off-by: Ingo Molnar commit 5d423ccd7ba4285f1084e91b26805e1d0ae978ed Author: Yinghai Lu Date: Wed May 6 08:07:52 2009 -0700 x86/pci: remove rounding quirk from e820_setup_gap() Now that the e820 code explicitly reserves 'potentially dangerous' free physical memory address space to protect ACPI stolen RAM, there's no need for the rounding quirk in the PCI allocator anymore. Also, this quirk was open-ended iteration that could end up reserving a lot of free space and potentially breaking drivers - such as the one reported by Yannick Roehlly where there's a PCI device with a large memory resource. So remove it. [ Impact: make more of the PCI hole available for assigning pci devices ] Reported-by: Yannick Roehlly Signed-off-by: Yinghai Lu Acked-by: Jesse Barnes Cc: Ivan Kokshaysky Cc: Linus Torvalds Cc: Andrew Morton LKML-Reference: <4A01A7C8.5090701@kernel.org> Signed-off-by: Ingo Molnar commit 45fbe3ee01b8e463b28c2751b5dcc0cbdc142d90 Author: Linus Torvalds Date: Wed May 6 08:06:44 2009 -0700 x86, e820, pci: reserve extra free space near end of RAM The point is to take all RAM resources we have, and _after_ we've added all the resources we've seen in the E820 tree, we then _also_ try to add fake reserved entries for any "round up to X" at the end of the RAM resources. [ Impact: improve PCI mem-resource allocation robustness, protect "stolen RAM" ] Reported-by: Yannick Roehlly Acked-by: Jesse Barnes Signed-off-by: Yinghai Lu Cc: Ivan Kokshaysky Cc: Andrew Morton Cc: yannick.roehlly@free.fr LKML-Reference: <4A01A784.2050407@kernel.org> Signed-off-by: Ingo Molnar commit 134cbf35c739bf89c51fd975a33a6b87507482c4 Merge: 2feceef 091bf76 Author: Ingo Molnar Date: Mon May 11 09:33:06 2009 +0200 Merge commit 'v2.6.30-rc5' into x86/mm Merge reason: this branch was on a .30-rc2 base - sync it up with all the latest fixes. Signed-off-by: Ingo Molnar commit 01f2bd48d08c6bbde12d86b66c760612e33e49a9 Author: Takashi Iwai Date: Mon May 11 08:12:43 2009 +0200 ALSA: hda - Add missing models for Realtek codecs Added the missing descriptions and the model names for Realtek codecs to the documentation and the config table. Signed-off-by: Takashi Iwai commit 780f98ff1fa9cfcab177f6b5ab09b11321f1e5c8 Author: Paul Mundt Date: Mon May 11 12:15:14 2009 +0900 sh: Account for INITIAL_JIFFIES when using jiffies clocksource. In the case where we fall back on the generic jiffies clocksource, INITIAL_JIFFIES needs to be accounted for so that printk times aren't completely skewed. Signed-off-by: Paul Mundt commit d9d674e50007362567edb5df65c05dd56a5964bf Author: Paul Mundt Date: Mon May 11 12:12:38 2009 +0900 sh: Fix up typo in arch/sh/kernel/vmlinux.lds.S .init_ramfs ought to be .init.ramfs, fix it up. Signed-off-by: Paul Mundt commit 107db7c7dd137aeb7361b8c2606ac936c0be58ff Author: David Howells Date: Fri May 8 13:55:27 2009 +0100 CRED: Guard the setprocattr security hook against ptrace Guard the setprocattr security hook against ptrace by taking the target task's cred_guard_mutex around it. The problem is that setprocattr() may otherwise note the lack of a debugger, and then perform an action on that basis whilst letting a debugger attach between the two points. Holding cred_guard_mutex across the test and the action prevents ptrace_attach() from doing that. Signed-off-by: David Howells Signed-off-by: James Morris commit 5e751e992f3fb08ba35e1ca8095ec8fbf9eda523 Author: David Howells Date: Fri May 8 13:55:22 2009 +0100 CRED: Rename cred_exec_mutex to reflect that it's a guard against ptrace Rename cred_exec_mutex to reflect that it's a guard against foreign intervention on a process's credential state, such as is made by ptrace(). The attachment of a debugger to a process affects execve()'s calculation of the new credential state - _and_ also setprocattr()'s calculation of that state. Signed-off-by: David Howells Signed-off-by: James Morris commit 82afae6016b672acb90ceb8e773bba0bd977d2a3 Author: Erdem Aktas Date: Sun May 10 02:13:19 2009 -0400 perf_counter tools: fix buffer overwrite problem for perf top command There is a buffer overwrite problem in builtin-top.c line 526, When I tried to use ./perf top command, it was giving memory corruption problem. [ Impact: fix 'perf top' crash ] LKML-Reference: <3fee128b0905092313x608e65e0l7b1116d86914114f@mail.gmail.com> Signed-off-by: Ingo Molnar commit 567bb8fd47624cb9f894c64ce9530d43d5862a71 Author: Paul Mundt Date: Sun May 10 14:25:39 2009 +0900 sh: Fix up R0 dependence in __arch_swab16/32. There is nothing in these routines that inherently depends on R0 use. Given that these routines are inlined, it is rather easy to blow up the compiler by exhausting the spill class when performing a 64-bit swab. This presently manifests itself as the following: CC fs/ocfs2/suballoc.o fs/ocfs2/suballoc.c: In function 'ocfs2_reserve_suballoc_bits': fs/ocfs2/suballoc.c:638: error: unrecognizable insn: (insn 2793 1230 1231 103 arch/sh/include/asm/swab.h:33 (set (reg:HI 853) (subreg:HI (reg:SI 149 macl) 2)) -1 (expr_list:REG_DEAD (reg:SI 149 macl) (nil))) fs/ocfs2/suballoc.c:638: internal compiler error: in extract_insn, at recog.c:1991 This patch switches over to using an arbitrarily assigned register instead. While the same issue does not exist in the SH-5 case, there is likewise no harm in having an alternate register used for the byterev/shari pair. Signed-off-by: Paul Mundt commit 457daa2b66e07bbd2280b9f8d2b03e800f357243 Author: Paul Mundt Date: Sun May 10 01:28:01 2009 +0900 sh: Hook up cc-cross-prefix support. This implements a simple case that just iterates through the common cases, looking at UTS_MACHINE for hints. Signed-off-by: Paul Mundt commit b412a49af970e703124fa3259bf24165c0c74024 Author: Paul Mundt Date: Sun May 10 01:23:25 2009 +0900 sh: Consolidate the boot link and entry offset definitions. Consolidate these in a single place in the Kconfig menus. At the same time, disable their interactivity and set them according to the board config defaults. Signed-off-by: Paul Mundt commit 1eca133cc9f978a8c44788fc5b2fe54219f9425c Author: Paul Mundt Date: Sun May 10 00:58:21 2009 +0900 sh: Merge the split arch/sh/boot/compressed/ Makefiles. This kills off the _64 variant and moves the _32 one over as the generic one to use. Signed-off-by: Paul Mundt commit b20883562455060272126c36563a7d8edafc30d3 Author: Paul Mundt Date: Sun May 10 00:55:45 2009 +0900 sh: Provide a BITS definition, use it in the arch/sh/boot/ Makefiles. This introduces a BITS export that can handily be picked up by Makefiles for cleaner sharing. Reflect its use in arch/sh/boot/compressed/ in preparation for unifying the Makefiles. Signed-off-by: Paul Mundt commit a2e76c80d93ec3c59a030b6ca37b9087033565c1 Author: Paul Mundt Date: Sun May 10 00:54:39 2009 +0900 sh: Provide a tighter BOOT_LINK_OFFSET definition for the Cayman board. Signed-off-by: Paul Mundt commit 20b27fa33743c6ef77a1248421fab51e8bf21a25 Author: Paul Mundt Date: Sun May 10 00:36:22 2009 +0900 sh: Fix up the sh64 zImage build. Signed-off-by: Paul Mundt commit 151ab22cf71b7a1b9dd696d65a1a41e13d90cd00 Author: Mark Brown Date: Sat May 9 16:22:58 2009 +0100 ASoC: Fix up CODEC DAI formats for big endian CPUs ASoC uses the standard ALSA data format definitions to specify the wire format used between the CPU and CODEC. Since the ALSA data formats all include the endianess of the data but this information is not relevant by the time the data has been encoded onto the serial link to the CODEC this means that either all the CODEC drivers need to declare both big and little endian variants or the core needs to fix up the format constraints specified by CODEC drivers. For now take the latter approach - this will need to be revisited if any CODECs are endianness dependant. Signed-off-by: Mark Brown commit 7b022d07a0fd2ce02d4456b732c674ff1d16f5ce Author: Paul Mundt Date: Sun May 10 00:25:08 2009 +0900 sh: Tidy up the ldscript output format specifier. Tie this in to the Makefile directly, where we already know what we are running on. This tidies up the linker script a bit, and is prep work for unifying the arch/sh/boot/compressed linker scripts. Signed-off-by: Paul Mundt commit dce97c8cb2ad365fa87dc6924d99528c21c63912 Author: Paul Mundt Date: Sat May 9 23:36:10 2009 +0900 sh: Move the unified linker script in place, kill off old _64 one. Just forcefully rename the _32 variant overtop, and kill off the now unused _64 version. Signed-off-by: Paul Mundt commit c3e2586b794b12ffcdf69b4e547030b51e18e6d9 Author: Paul Mundt Date: Sat May 9 23:33:02 2009 +0900 sh: Integrate sh64 bits in vmlinux_32.lds.S. This adds all of the requisite bits from vmlinux_64.lds.S in to the _32 variant, resulting in a unified and generic linker script that can be shared across both. Signed-off-by: Paul Mundt commit 7cd0378ef4c0d7b05e7dcb1daa115b841ffdc31a Author: Paul Mundt Date: Sat May 9 18:03:37 2009 +0900 sh: Fix up SHmedia module ELF relocations. This fixes up the LSB setting for SHmedia branching in updated symbols when processing module relocations. Signed-off-by: Paul Mundt commit 1031a3a57ed76f5cb8754a89ddb22f3d9ebe8861 Author: Paul Mundt Date: Sat May 9 17:57:21 2009 +0900 sh: Provide an __sdivsi3_2 export for sh64. Newer code paths that are heavier in 64-bit math manage to get this generated by newer compilers, provide a definition and export accordingly. This is trivially wrapped around the existing __sdivsi3 code. Signed-off-by: Paul Mundt commit f15b18d0755b3ee4b29991fc2fde535ee41df53c Author: Ingo Molnar Date: Sat May 9 10:04:22 2009 +0200 perf_counter tools: remove debug code from builtin-stat.c Signed-off-by: Ingo Molnar commit 2bcfffa42309b6f73042c62459bf5207762a271d Author: Paul Mundt Date: Sat May 9 16:02:08 2009 +0900 sh: Rename opcode_t to insn_size_t. This is now clashing with a driver, so just rename it. Signed-off-by: Paul Mundt commit 6dbe47a170f80159f23c856ad4e02f2685c6f6cb Author: Paul Mundt Date: Sat May 9 14:44:30 2009 +0900 sh: Provide __read_{read,write}sl() definitions for sh64. These are presently only defined for sh32, use the plain unoptimized versions for sh64. Fixes up smsc911x build. Signed-off-by: Paul Mundt commit 2fedaacdc07e053d93e0607047a96d282f62aca2 Author: Paul Mundt Date: Sat May 9 14:38:49 2009 +0900 sh: Cleanup irqflags size mismatch on SH-5 build. Signed-off-by: Paul Mundt commit e9e8b1fb995543c4cc3930f465923a552b2e48b7 Author: Paul Mundt Date: Sat May 9 14:31:37 2009 +0900 sh: Fix up the sh64 earlyprintk build. sci_rxd_in() on SH-5 wants to be using SCSPTR, not SCSPTR2. Signed-off-by: Paul Mundt commit b30505c81a9d4adea8b70ecff512b0216929b797 Author: Darren Hart Date: Thu May 7 15:40:14 2009 -0700 futex: add requeue-pi documentation Add Documentation/futex-requeue-pi.txt describing the motivation for the newly added FUTEX_*REQUEUE_PI op codes and their implementation. [ Impact: add documentation ] Signed-off-by: Darren Hart Cc: Sripathi Kodi Cc: Peter Zijlstra Cc: John Stultz Cc: Steven Rostedt Cc: Dinakar Guniguntala Cc: Ulrich Drepper Cc: Eric Dumazet Cc: Jakub Jelinek LKML-Reference: <4A03634E.3080609@us.ibm.com> [ reformatted the file ] Signed-off-by: Ingo Molnar commit 778dedae0cb76a441145f3a0c5d59fcb3ba296d5 Author: Huang Weiyi Date: Sat May 9 12:54:34 2009 +0800 x86: mce: remove duplicated #include Remove duplicated #include in arch/x86/kernel/cpu/mcheck/mce_intel_64.c. [ Impact: cleanup ] Signed-off-by: Huang Weiyi Signed-off-by: Ingo Molnar commit 02a884c0fe7ec8459d00d34b7d4101af21fc4a86 Author: H. Peter Anvin Date: Fri May 8 17:42:16 2009 -0700 x86, boot: determine compressed code offset at compile time Determine the compressed code offset (from the kernel runtime address) at compile time. This allows some minor optimizations in arch/x86/boot/compressed/head_*.S, but more importantly it makes this value available to the build process, which will enable a future patch to export the necessary linear memory footprint into the bzImage header. [ Impact: cleanup, future patch enabling ] Signed-off-by: H. Peter Anvin commit 36d3793c947f1ef7ba3d24eeeddc1be41adc5ab4 Author: H. Peter Anvin Date: Fri May 8 16:45:15 2009 -0700 x86, boot: use appropriate rep string for move and clear In the pre-decompression code, use the appropriate largest possible rep movs and rep stos to move code and clear bss, respectively. For reverse copy, do note that the initial values are supposed to be the address of the first (highest) copy datum, not one byte beyond the end of the buffer. rep strings are not necessarily the fastest way to perform these operations on all current processors, but are likely to be in the future, and perhaps more importantly, we want to encourage the architecturally right thing to do here. This also fixes a couple of trivial inefficiencies on 64 bits. [ Impact: trivial performance enhancement, increase code similarity ] Signed-off-by: H. Peter Anvin commit 97541912785369925723b6255438ad9fce2ddf04 Author: H. Peter Anvin Date: Wed May 6 17:56:51 2009 -0700 x86, boot: zero EFLAGS on 32 bits The 64-bit code already clears EFLAGS as soon as it has a stack. This seems like a reasonable precaution, so do it on 32 bits as well. [ Impact: extra paranoia ] Signed-off-by: H. Peter Anvin commit 0a137736704ef9af719409933b3c33e138461786 Author: H. Peter Anvin Date: Fri May 8 16:27:41 2009 -0700 x86, boot: set up the decompression stack as early as possible Set up the decompression stack as soon as we know where it needs to go. That way we have a full-service stack as soon as possible, rather than relying on the BP_scratch field. Note that the stack does need to be empty during bss zeroing (or else the stack needs to be moved out of the bss segment, which is also an option.) [ Impact: cleanup, minor paranoia ] Signed-off-by: H. Peter Anvin commit 5b11f1cee5797b38d16b94d8745b12b6727a8373 Author: H. Peter Anvin Date: Fri May 8 16:20:34 2009 -0700 x86, boot: straighten out ranges to copy/zero in compressed/head*.S Both on 32 and 64 bits, we copy all the way up to the end of bss, except that on 64 bits there is a hack to avoid copying on top of the page tables. There is no point in copying bss at all, especially since we are just about to zero it all anyway. To clean up and unify the handling, we now do: - copy from startup_32 to _bss. - zero from _bss to _ebss. - the _ebss symbol is aligned to an 8-byte boundary. - the page tables are moved to a separate section. Use _bss as the copy endpoint since _edata may be misaligned. [ Impact: cleanup, trivial performance improvement ] Signed-off-by: H. Peter Anvin commit b40d68d5b5b799caaf99d2e073e62962e6d917ce Author: H. Peter Anvin Date: Fri May 8 15:59:13 2009 -0700 x86, boot: stylistic cleanups for boot/compressed/head_64.S Clean up style issues in arch/x86/boot/compressed/head_64.S. This file had a lot fewer style issues than its 32-bit cousin, but the ones it has are worth fixing, especially since it makes the two files more similar. [ Impact: cleanup, no object code change ] Signed-off-by: H. Peter Anvin commit 5f64ec64e7f9b246c0a94f34cdf7782f98a6e55d Author: H. Peter Anvin Date: Fri May 8 15:45:17 2009 -0700 x86, boot: stylistic cleanups for boot/compressed/head_32.S Reformat arch/x86/boot/compressed/head_32.S to be closer to currently preferred kernel assembly style, that is: - opcode and operand separated by tab - operands separated by ", " - C-style comments This also makes it more similar to head_64.S. [ Impact: cleanup, no object code change ] Signed-off-by: H. Peter Anvin commit bd2a36984c50bb546a7d04cb395fddcf98a1092c Author: H. Peter Anvin Date: Tue May 5 23:24:50 2009 -0700 x86, boot: use BP_scratch in arch/x86/boot/compressed/head_*.S Use the BP_scratch symbol from asm-offsets.h instead of hard-coding the location. [ Impact: cleanup ] Signed-off-by: H. Peter Anvin commit 283ab1c0bd462dd0b179393fb081a626f6687413 Author: H. Peter Anvin Date: Fri May 8 15:32:47 2009 -0700 x86, boot: follow standard Kbuild style for compression suffix When generating the compression suffix in arch/x86/boot/compressed/Makefile, follow standard Kbuild conventions, that is: - Use a dash not underscore before y/m/n endings - Use := whenever possible. Requested-by: Sam Ravnborg Signed-off-by: H. Peter Anvin commit 5f11e02019ef44f041e6e38a1363fa2fd4b8785d Author: H. Peter Anvin Date: Tue May 5 22:53:11 2009 -0700 x86, boot: simplify arch/x86/boot/compressed/Makefile Simplify the arch/x86/boot/compressed/Makefile, by using the new capability of specifying multiple inputs to a compressor, and the CONFIG_X86_NEED_RELOCS Kconfig symbol. Signed-off-by: H. Peter Anvin Acked-by: Sam Ravnborg commit 845adf7266a7ba6970bf982ffd96abc60d2018ab Author: H. Peter Anvin Date: Tue May 5 21:20:51 2009 -0700 x86: add a Kconfig symbol for when relocations are needed We only need to build relocations when we are building a 32-bit relocatable kernel. Rather than unnecessarily complicating the Makefiles, make an explicit Kbuild symbol for this. [ Impact: permits future cleanup ] Signed-off-by: H. Peter Anvin Cc: Sam Ravnborg commit d3dd3b5a29bb9582957451531fed461628dfc834 Author: H. Peter Anvin Date: Tue May 5 21:17:15 2009 -0700 kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs Allow the compression commands in Kbuild (i.e. gzip, bzip2, lzma) to take multiple input files and emit the concatenated compressed output. This avoids an intermediate step when a kernel image is built from multiple components, such as the relocatable x86-32 kernel. Sam Ravnborg integrated the bin_size script into the Makefile. [ Impact: new build feature, not yet used ] Signed-off-by: H. Peter Anvin Acked-by: Sam Ravnborg commit 0b4eb462da10f832b28d518abffa4d77805928a0 Author: H. Peter Anvin Date: Thu Apr 30 17:59:36 2009 -0700 x86, boot: align the .bss section in the decompressor Aligning the .bss section makes it trivial to use large operation sizes for moving the initialized sections and clearing the .bss. The alignment chosen (L1 cache) is somewhat arbitrary, but should be large enough to avoid all known performance traps and small enough to not cause troubles. [ Impact: trivial performance enhancement, future patch prep ] Signed-off-by: H. Peter Anvin commit a789ed5fb6d0256c4177c2cc27e06520ddbe4d4c Author: Jeremy Fitzhardinge Date: Fri Apr 24 00:26:50 2009 -0700 xen: cache cr0 value to avoid trap'n'emulate for read_cr0 stts() is implemented in terms of read_cr0/write_cr0 to update the state of the TS bit. This happens during context switch, and so is fairly performance critical. Rather than falling back to a trap-and-emulate native read_cr0, implement our own by caching the last-written value from write_cr0 (the TS bit is the only one we really care about). Impact: optimise Xen context switches Signed-off-by: Jeremy Fitzhardinge commit b80119bb35a49a4e8dbfb9708872adfd5cf38dee Author: Jeremy Fitzhardinge Date: Fri Apr 24 00:22:08 2009 -0700 xen/x86-64: clean up warnings about IST-using traps Ignore known IST-using traps. Aside from the debugger traps, they're low-level faults which Xen will handle for us, so the kernel needn't worry about them. Keep warning in case unknown trap starts using IST. Impact: suppress spurious warnings Signed-off-by: Jeremy Fitzhardinge commit 6cac5a924668a56c7ccefc345805f1fe0536a90e Author: Jeremy Fitzhardinge Date: Sun Mar 29 19:56:29 2009 -0700 xen/x86-64: fix breakpoints and hardware watchpoints Native x86-64 uses the IST mechanism to run int3 and debug traps on an alternative stack. Xen does not do this, and so the frames were being misinterpreted by the ptrace code. This change special-cases these two exceptions by using Xen variants which run on the normal kernel stack properly. Impact: avoid crash or bad data when IST trap is invoked under Xen Signed-off-by: Jeremy Fitzhardinge commit 4671c79408a3f8a5a6a45e39c4c164dada3a5678 Author: Steven Rostedt Date: Fri May 8 16:27:41 2009 -0400 tracing: add trace_set_clr_event to export event enabling function Other parts of the kernel may need to be able to enable or disable specific events. Especially parts that create trace events. [ Impact: allow enabling of trace events by those that create the event ] Signed-off-by: Steven Rostedt commit 29f93943d1916d1a3faa3f10f4a06994347ac990 Author: Steven Rostedt Date: Fri May 8 16:06:47 2009 -0400 tracing: initialize return value for __ftrace_set_clr_event Commit 8f31bfe538ebafac187d2d4465a92e1d9ee6d8c2 tracing/events: clean up for ftrace_set_clr_event() Moved out the code for ftrace_set_clr_event into a helper funciton but did not initialize the return value. As a result, we do not warn about a typo in the echoing of events in set_event. This patch restores the old warning: # echo foobar > set_event -bash: echo: write error: Invalid argument [ Impact: restore warning of invalid entries to set_event ] Signed-off-by: Steven Rostedt commit f370e1e2f195ec1e6420e26fc83e0319595db578 Author: Peter Zijlstra Date: Fri May 8 18:52:24 2009 +0200 perf_counter: add PERF_RECORD_CPU Allow recording the CPU number the event was generated on. RFC: this leaves a u32 as reserved, should we fill in the node_id() there, or leave this open for future extention, as userspace can already easily do the cpu->node mapping if needed. [ Impact: extend perfcounter output record format ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090508170029.008627711@chello.nl> Signed-off-by: Ingo Molnar commit a85f61abe11a46553c4562e74edb27ebc782aeb7 Author: Peter Zijlstra Date: Fri May 8 18:52:23 2009 +0200 perf_counter: add PERF_RECORD_CONFIG Much like CONFIG_RECORD_GROUP records the hw_event.config to identify the values, allow to record this for all counters. [ Impact: extend perfcounter output record format ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090508170028.923228280@chello.nl> Signed-off-by: Ingo Molnar commit 3df5edad87a998273aa5a9a8c728c05d855ad00e Author: Peter Zijlstra Date: Fri May 8 18:52:22 2009 +0200 perf_counter: rework ioctl()s Corey noticed that ioctl()s on grouped counters didn't work on the whole group. This extends the ioctl() interface to take a second argument that is interpreted as a flags field. We then provide PERF_IOC_FLAG_GROUP to toggle the behaviour. Having this flag gives the greatest flexibility, allowing you to individually enable/disable/reset counters in a group, or all together. [ Impact: fix group counter enable/disable semantics ] Reported-by: Corey Ashford Signed-off-by: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <20090508170028.837558214@chello.nl> Signed-off-by: Ingo Molnar commit 7fc23a5380797012e92a9633169440f2f4a21253 Author: Peter Zijlstra Date: Fri May 8 18:52:21 2009 +0200 perf_counter: optimize perf_counter_task_tick() perf_counter_task_tick() does way too much work to find out there's nothing to do. Provide an easy short-circuit for the normal case where there are no counters on the system. [ Impact: micro-optimization ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090508170028.750619201@chello.nl> Signed-off-by: Ingo Molnar commit b4df0a6c9d88cfff77c73d33873cd60f9ab909b6 Author: Sergey Lapin Date: Fri May 8 19:19:41 2009 +0400 ASoC: AFEB9260 driver ASoC driver for AT91SAM9260-based AFEB9260 board Signed-off-by: Sergey Lapin Signed-off-by: Mark Brown commit bf8b9a63c18a1a7777571650de0c9f4fd4368ca0 Author: Jaswinder Singh Rajput Date: Fri May 8 20:53:58 2009 +0530 x86: msr-index.h remove duplicate MSR C001_0015 declaration MSRC001_0015 Hardware Configuration Register (HWCR) is already defined as MSR_K7_HWCR. And HWCR is available for >= K7. So MSR_K8_HWCR is not required and no-one is using it. [ Impact: cleanup, no object code change ] Signed-off-by: Jaswinder Singh Rajput commit cd89436e54b29a07a383ee82f2f718d8c9d24cc4 Author: Peter Griffin Date: Fri May 8 15:51:51 2009 +0100 sh: Add UBC trap vector for SH2A Signed-off-by: Peter Griffin Signed-off-by: Paul Mundt commit ba0d474082dfa37fb0efd439b4d0c0234ceb1e80 Author: Peter Griffin Date: Fri May 8 15:50:54 2009 +0100 sh: Add ptrace support for NOMMU debugging Signed-off-by: Peter Griffin Signed-off-by: Paul Mundt commit e73173dbe55e5b4c2306728aad50c8e42194f6d5 Author: Kieran Bingham Date: Fri May 8 15:49:50 2009 +0100 sh: Fix UBC setup and registers for SH2A Signed-off-by: Kieran Bingham Signed-off-by: Peter Griffin Signed-off-by: Paul Mundt commit be6514c6295cc79498eeb9a8f933451082ca9e69 Author: Kieran Bingham Date: Fri May 8 15:48:15 2009 +0100 sh: Add in some ptrace definitions from GDB. Plugs in PT_TEXT_END_ADDR/PT_TEXT_ADDR/PT_DATA_ADDR/PT_TEXT_LEN definitions. Signed-off-by: Kieran Bingham Signed-off-by: Peter Griffin Signed-off-by: Paul Mundt commit 168f36237b16e2b3159e24c7d3b658e3c912d149 Author: Yoshinori Sato Date: Tue Apr 28 04:40:15 2009 +0000 serial: sh-sci: Fix up h8300 support. - Dummy SCIF functions define. - h8300 specific header include. Signed-off-by: Yoshinori Sato Signed-off-by: Paul Mundt commit 54507f6ee99778a727ff1b38a1f4050fe6479835 Author: Paul Mundt Date: Fri May 8 23:48:33 2009 +0900 serial: sh-sci: Fix up section mismatch in error path. The sci_probe_single() path attempts to use sci_remove() for the error path, while sci_remove() is still flagged as __devexit. So, we simply discard the section annotation. Signed-off-by: Paul Mundt commit 3b226e15beb5ecf068738e796811afd1e5b3f81f Author: Paul Mundt Date: Fri May 8 23:28:54 2009 +0900 sh: Add clock id to sh-sci platform data on SH-Mobile CPUs. This adds the clock specifier to all of the SH-Mobile sh-sci ports. Impacted CPUs are SH7343/SH7366/SH7722/SH7723/SH7724. Signed-off-by: Paul Mundt commit 501b825d01efb93766c87d29f299851152cf4eb0 Author: Magnus Damm Date: Wed Jan 21 15:14:30 2009 +0000 sh-sci: improve clock framework support Use enable/disable hooks for clock framework integration. Make sure we control the clock for the serial console as well. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 08f8cb315fdf9195b472aeb440ae65b189b151da Author: Magnus Damm Date: Wed Jan 21 15:14:22 2009 +0000 sh-sci: ioremap() in a single place Handle ioremap() in sci_config_port only. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 7ed7e0711b3ff85b3e15591081b42f2af96d584b Author: Magnus Damm Date: Wed Jan 21 15:14:14 2009 +0000 sh-sci: replace sci_init_ports() Replace sci_init_ports() with sci_init_single(). Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 0ee70712922c15252183db8b50a7e369c96017c0 Author: Magnus Damm Date: Wed Jan 21 15:13:50 2009 +0000 sh-sci: allow single port platform devices Allow registration of single port sh-sci platform devices. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit a5660adae85918f2ab6b10ab58e2f574c1bd5ce1 Author: Magnus Damm Date: Wed Jan 21 15:14:38 2009 +0000 sh-sci: use to_sci_port() if possible Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 22e336b776f743cbabfc5c946bff9ccf7ccc756b Merge: a9fd4f3 5dd17cb Author: Takashi Iwai Date: Fri May 8 16:03:20 2009 +0200 Merge branch 'fix/hda' into topic/hda commit dc8e6f5bfcd6a307a8196d3e41fd9798be5a1c76 Author: Magnus Damm Date: Wed Jan 21 15:14:06 2009 +0000 sh-sci: rework serial console support Rework sh-sci serial console code. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit a9fd4f3fcdc7e5757424f7e5888f660cf34bb1a9 Author: Takashi Iwai Date: Fri May 8 15:57:59 2009 +0200 ALSA: hda - Clean up Realtek auto-mute unsol routines Most of unsol handlers defined in patch_realtek.c can be classified to two types, mute via amp of pins and mute via ctl bits of pins. Thus there are a big room to generalize each implementation. This patch creates two generic functions, alc_automute_amp() and alc_automute_pin(). The latter is actually changed from the previous alc_sku_automute(). Each caller needs to initialize hp_pins and speaker_pins properly at own init_hook. Signed-off-by: Takashi Iwai commit 9080b72819650c3a757d173a19bc930d603b79d6 Author: Magnus Damm Date: Wed Jan 21 15:13:58 2009 +0000 sh-sci: remove early_sci_setup() Remove unused early_sci_setup() function from sh-sci. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit e552de2413edad1a7b0c7f82a2f2753e4f905d93 Author: Magnus Damm Date: Wed Jan 21 15:13:42 2009 +0000 sh-sci: add platform device private data This patch adds per-platform private data to the sh-sci driver. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit b72519b518211ecb7c4c7b5e660ac6235ca7d1b7 Author: Takashi Iwai Date: Fri May 8 14:31:55 2009 +0200 ALSA: hda - Clean up for ALC262 HP model auto-mute functions Just clean up, no functional changes. Signed-off-by: Takashi Iwai commit 7b551f9daa9bd9533ba4ce31622ed4be1dd97d3e Author: Paul Mundt Date: Fri May 8 22:14:01 2009 +0900 sh: Kill off the GENERIC_CALIBRATE_DELAY ifndef. Now that everyone is using the clock framework directly and we unconditionally provide our own calibrate_delay() function, having it wrapped in an ifndef is no longer useful. So, kill it off. Signed-off-by: Paul Mundt commit ccdaeb4c8f982900a2abf722e34b60131394d8eb Author: Paul Mundt Date: Fri May 8 22:09:30 2009 +0900 sh: TMU platform data for SH-X3 proto CPU. Signed-off-by: Paul Mundt commit c3d480ded1584dc17f6e82f49af4155380a51dda Author: Paul Mundt Date: Fri May 8 21:57:04 2009 +0900 sh: TMU platform data for SH7786. Wires up all 12 TMU channels, with TMU0 and 1 used as clockevent and clocksource respectively. Signed-off-by: Paul Mundt commit 42171c17f267d7fdc5167ad7b6b5fb9edfd04186 Author: Takashi Iwai Date: Fri May 8 14:11:43 2009 +0200 ALSA: hda - Fix and clean up hippo-compat HP auto-muting The speaker auto-muting per HP plugging for ALC262 HIPPO and compatible devices is slightly buggy as the "Master" or "Front" mixer control can still toggle the speaker output even if the headphone is plugged. This patch fixes the issue, and clean up the hippo-related codes together with fixes of some inconsistent mixer names. Signed-off-by: Takashi Iwai commit c142b15dc56ee6d55cb97a062e3c8e9c61e384c0 Author: Li Zefan Date: Fri May 8 10:32:05 2009 +0800 tracing/events: simplify system_enable_read() A smarter way to figure out the output of an enable file. [ Impact: clean up ] Signed-off-by: Li Zefan Acked-by: Steven Rostedt Acked-by: Frederic Weisbecker LKML-Reference: <4A0399A5.2080603@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 8f31bfe538ebafac187d2d4465a92e1d9ee6d8c2 Author: Li Zefan Date: Fri May 8 10:31:42 2009 +0800 tracing/events: clean up for ftrace_set_clr_event() Add a helper function __ftrace_set_clr_event(), and replace some ftrace_set_clr_event() calls with this helper, thus we don't need any kstrdup() or kmalloc(). As a side effect, this patch fixes an issue in self tests code, which is similar to the one fixed in commit d6bf81ef0f7474434c2a049e8bf3c9146a14dd96 ("tracing: append ":*" to internal setting of system events") It's a small issue and won't cause any bug in fact, but we should do things right anyway. [ Impact: prevent spurious event-enabling in tracing self-tests ] Signed-off-by: Li Zefan Acked-by: Steven Rostedt Acked-by: Frederic Weisbecker LKML-Reference: <4A03998E.3020503@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit c29418c2ae15ee9171bc136ad261c497b95a46fc Author: Paul Mundt Date: Fri May 8 20:32:56 2009 +0900 sh: Always fixup unaligned userspace accesses on sh64. sh64 has traditionally had this configurable via a Kconfig option (CONFIG_SH64_USER_MISALIGNED_FIXUP). In practice it has never really been terribly useful to turn this off, so just get rid of the option entirely. We leave the sysctl around so we don't end up breaking existing root file systems, and to allow folks that really want this off to do so at their own risk. Signed-off-by: Paul Mundt commit 30d88cf52f229c3e0c90b8d71036960ccc2db4e2 Author: Paul Mundt Date: Fri May 8 20:20:56 2009 +0900 sh: Kill off extra cflags Kconfig entry. There is no real reason to use this anymore, as the build system generally knows what it is doing with regards to cflags mangling. Signed-off-by: Paul Mundt commit bec4c99e8637b5b8bd4b0513eacb51da25885e3b Author: Mark Brown Date: Wed May 6 10:36:34 2009 +0100 ASoC: Fix file patterns for PXA sound drivers The file matches for PXA sound drivers missed the generic AC97 support and were overly specific within sound/soc/pxa, omitting all machine drivers and the SSP driver. Signed-off-by: Mark Brown commit c198d811812417961582d4e25360372ca1eccdae Author: Peter Ujfalusi Date: Thu May 7 14:32:00 2009 +0300 ASoC: TWL4030: Fix typo in twl4030_codec_mute function Copy-paste error: TWL4030_PRECKL_GAIN >> TWL4030_PRECKR_GAIN It has not caused problems, since TWL4030_PRECKL_GAIN == TWL4030_PRECKR_GAIN == 0x30 Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 6eac1af01112d1919b1c432f6591e6368e8d538f Author: Paul Mundt Date: Fri May 8 19:48:47 2009 +0900 sh: Always select RTC_LIB, not just for SUPERH32. The RTC_LIB helpers are used in arch/sh/kernel/time.c, which was previously only the case for the 32-bit variant. Now that this has become the common implementation, move the RTC_LIB select to reflect that. Fixes up the sh64 build. Signed-off-by: Paul Mundt commit 7e4e0bd50e80df2fe5501f48f872448376cdd997 Author: Robert Richter Date: Wed May 6 12:10:23 2009 +0200 oprofile: introduce module_param oprofile.cpu_type This patch removes module_param oprofile.force_arch_perfmon and introduces oprofile.cpu_type=archperfmon instead. This new parameter can be reused for other models and architectures. Currently only archperfmon is supported. Cc: Andi Kleen Signed-off-by: Robert Richter commit 6adf406f0a0eaf37251018d15f51e93f5b538ee6 Author: Andi Kleen Date: Mon Apr 27 17:44:13 2009 +0200 oprofile: add support for Core i7 and Atom The registers are about the same as other Family 6 CPUs so we only need to add detection. I'm not completely happy with calling Nehalem Core i7 because there will be undoubtedly other Nehalem based CPUs in the future with different marketing names, but it's the best we got for now. Requires updated oprofile userland for the new event files. If you don't want to update right now you can also use oprofile.force_arch_perfmon=1 (added in the next patch) with 0.9.4 Signed-off-by: Andi Kleen Signed-off-by: Robert Richter commit 1f3d7b60691993d8d368d8dd7d5d85871d41e8f5 Author: Andi Kleen Date: Mon Apr 27 17:44:12 2009 +0200 oprofile: remove undocumented oprofile.p4force option There are no new P4s and the oprofile code knows about all existing ones, so we don't really need the p4force option anymore. Remove it. Signed-off-by: Andi Kleen Signed-off-by: Robert Richter commit 1dcdb5a9e7c235e6e80f1f4d5b8247b3e5347e48 Author: Andi Kleen Date: Mon Apr 27 17:44:11 2009 +0200 oprofile: re-add force_arch_perfmon option This re-adds the force_arch_perfmon option that was in the original arch perfmon patchkit. Originally this was rejected in favour of a generalized perfmon=name option, but it turned out implementing the later in a reliable way is hard (and it would have been easy to crash the kernel if a user gets it wrong) But now Atom and Core i7 support being readded a user would need to update their oprofile userland to beyond 0.9.4 to use oprofile again on Atom or Core i7. To avoid this problem readd the force_arch_perfmon option. Signed-off-by: Andi Kleen Signed-off-by: Robert Richter commit b366328335b98373325977e116d2423f500708ac Author: Paul Mundt Date: Fri May 8 18:01:03 2009 +0900 sh: Drop dead rules from arch/sh/kernel/Makefile_64. Several of these options are specific to the SHcompact ISA and will need to be rewritten for SHmedia if they are to be supported at all. Drop the impossible rules for now. Signed-off-by: Paul Mundt commit 6b2e8523df148c15ea5abf13075026fb8bdb3f86 Author: Jeremy Fitzhardinge Date: Thu May 7 11:56:49 2009 -0700 xen: reserve Xen start_info rather than e820 reserving Use reserve_early rather than e820 reservations for Xen start info and mfn->pfn table, so that the memory use is a bit more self-documenting. [ Impact: cleanup ] Signed-off-by: Jeremy Fitzhardinge Cc: Xen-devel Cc: Linus Torvalds LKML-Reference: <4A032EF1.6070708@goop.org> Signed-off-by: Ingo Molnar commit f066a155334642b8a206eec625b1925d88c48aeb Merge: e7c0648 33df4db Author: Ingo Molnar Date: Fri May 8 10:50:00 2009 +0200 Merge branch 'x86/urgent' into x86/xen Conflicts: arch/frv/include/asm/pgtable.h arch/x86/include/asm/required-features.h arch/x86/xen/mmu.c Merge reason: x86/xen was on a .29 base still, move it to a fresher branch and pick up Xen fixes as well, plus resolve conflicts Signed-off-by: Ingo Molnar commit 47dd6f4439811c6c83d9abf2f364bcb6d2684640 Author: Magnus Damm Date: Fri May 8 08:32:18 2009 +0000 sh: TMU platform data for sh7723 This patch adds TMU platform data for sh7723. Both clockevent and clocksource support is enabled. While at it, adjust the CMT clocksource rating to prioritize the TMU. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 583d1d549ff107500481461cec0325189c5349ec Author: Magnus Damm Date: Fri May 8 08:27:19 2009 +0000 sh: enable TMU clocksource on sh7722 This patch enables the TMU clocksource on sh7722. To prioritize TMU over CMT we also adjust the CMT clock source rating. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 4f5ecaa05493dfddf155b40224b951592bfce325 Author: Magnus Damm Date: Fri May 8 08:23:29 2009 +0000 sh: clock framework update, fix count and kill off kref This patch updates the clock framework use count code. With this patch the enable() and disable() callbacks only get called when counting from and to zero. While at it the kref stuff gets replaced with an int. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 7d170b1bc540a1d83098a9f27cf4939e026fda81 Author: Paul Mundt Date: Fri May 8 17:41:59 2009 +0900 sh: Move out cayman-specific panic handler code to its own file. This moves out the cayman-specific panic handler code to a better location, and leaves the generic implementation a simple stub that is still used under emulation. Signed-off-by: Paul Mundt commit ef9f89996e450e9686816b6fc1e34d7b9a65766c Author: Paul Mundt Date: Fri May 8 17:36:57 2009 +0900 sh: Kill off unused sh64 debug code. None of the print_page() code and associated helpers are presently used by anything in-tree, so just kill it off. Signed-off-by: Paul Mundt commit cb3a86c89ebdf917b88665f70e06863986fbab5c Author: Paul Mundt Date: Fri May 8 17:25:35 2009 +0900 sh: Kill off sh64's hand-rolled syscall tracer. This is no longer necessary, as there are now sufficient generic alternatives available. Signed-off-by: Paul Mundt commit 1af2fe45fec15bdba446c22b9b602699cdabfc9f Author: Paul Mundt Date: Fri May 8 16:59:05 2009 +0900 sh: Kill off the global rtc_lock with extreme prejudice. Now that all of the possible users for rtc_lock have gone away, it is no longer necessary to keep this lock definition around. This follows several other architectures that have either recently dropped it or never supported it in the first place. Signed-off-by: Paul Mundt commit cd1408f22d2fd8f0d09c082b07cf0b9bcfb6eac9 Author: Paul Mundt Date: Fri May 8 16:57:35 2009 +0900 sh: mach-sh03: Give the sh03 rtc its own spinlock. This converts the sh03 rtc code off of using the global rtc_lock and on to its own spinlock. There are no other possible users of the rtc_lock, so serializing with it is not necessary. Signed-off-by: Paul Mundt commit d254117099d711f215e62427f55dfb8ebd5ad011 Merge: 07ff7a0 8c9ed89 Author: James Morris Date: Fri May 8 17:56:47 2009 +1000 Merge branch 'master' into next commit 6459d7bb72e9767bc7d22f2ee44aab35188e4b8a Author: Paul Mundt Date: Fri May 8 16:47:48 2009 +0900 sh: Kill off dead timer sysclass pm hooks. With the conversion to generic clockevents these are completely unused, so just kill it off. Signed-off-by: Paul Mundt commit 5ac5496411b30d41945a996fe7a7fb5abccf2aaa Author: Paul Mundt Date: Fri May 8 16:44:00 2009 +0900 sh: Kill off dead handle_timer_tick() code. Nothing is using this anymore now that we have fully converted to generic time, so kill it off completely. Signed-off-by: Paul Mundt commit 6d134b9e8d3f32331ad2faca2db8186f54198931 Author: Paul Mundt Date: Fri May 8 16:36:13 2009 +0900 sh: Wire up GENERIC_CMOS_UPDATE for the platforms that need it. Now that everything has converted over to generic timekeeping, we need an alternate method for keeping the RTC updated for those platforms that are still using the rtc_sh_get/set_time pairs, presently limited to SH-03 and the Dreamcast. This wires up the GENERIC_CMOS_UPDATE hooks for those to maintain the same behaviour. Signed-off-by: Paul Mundt commit b179b72fad5c88c3b616fb88a9ae7cbbc1a750d3 Author: Paul Mundt Date: Fri May 8 16:17:36 2009 +0900 sh: Rename arch/sh/kernel/time_32.c to arch/sh/kernel/time.c. This is now fully generic, and used both by _32 and _64 variants. Rename it accordingly. Signed-off-by: Paul Mundt commit add47067a8ca324e9d26c4373350dc3cce7f1e7f Author: Paul Mundt Date: Fri May 8 16:12:17 2009 +0900 sh: Finish the sh64 migration off of ARCH_USES_GETTIMEOFFSET. This adds sh_tmu support to the SH-5 subtypes, which subsequently allows us to kill off time_64.c and use the now generic time_32.c. As a bonus, SH-5 now supports highres timers and tickless for the first time. Signed-off-by: Paul Mundt commit c2ecb4c4a7da16288062a057b693b7b1e16aaf88 Author: Paul Mundt Date: Fri May 8 15:39:25 2009 +0900 sh: Move out rtc-sh registration from time_64.c to setup-sh5.c Now that the onchip_remap() mess is sorted out, the rtc-sh support code for SH-5 can follow the same approach as the other CPUs. Signed-off-by: Paul Mundt commit 4fa48e1774992fd03a4cd83a0f2adecb288c46f8 Author: Paul Mundt Date: Fri May 8 15:28:15 2009 +0900 sh: Enable new TMU driver support for all SH-3 and SH-4 CPUs. The TMU block is supported on all SH-3 and SH-4 subtypes, so just select it there, rather than conditionalizing it per subtype. Signed-off-by: Paul Mundt commit 9da29271bea5d831d745f3ceb7f6f6b2def13a5b Author: Takashi Iwai Date: Thu May 7 16:31:14 2009 +0200 ALSA: hda - Fix secondary SPDIF on VT1708S and VT1702 codecs VIA VT1708S and VT1702 codecs can have two SPDIF outputs. One of them should have been handled as the extra digital out, but it's not properly accessed. This patch fixes the handling of the secondary SPDIF on these codecs with the slave dig-out as found in patch_sigmatel.c. This makes the use of such a device easier (for normal users). Signed-off-by: Takashi Iwai commit ec91d1335f478c5cd089d82ffbf936075c5f24c8 Author: Felix Blyakher Date: Thu May 7 19:49:45 2009 -0500 xfs: fix double unlock in xfs_swap_extents() Regreesion from commit ef8f7fc, which rearranged the code in xfs_swap_extents() leading to double unlock of xfs inode ilock. That resulted in xfs_fsr deadlocking itself on platforms, which don't handle double unlock of rw_semaphore nicely. It caused the count go negative, which represents the write holder, without really having one. ia64 is one of the platforms where deadlock was easily reproduced and the fix was tested. Signed-off-by: Eric Sandeen Reviewed-by: Eric Sandeen Signed-off-by: Felix Blyakher commit e367592cc93ac653e7bc0bebbc9bb713a77e2696 Author: Magnus Damm Date: Thu May 7 10:55:37 2009 +0000 sh: TMU platform data for sh7785 This patch adds TMU platform data for sh7785. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 06ee846a25642c434c55209151c633f538c12022 Author: Magnus Damm Date: Thu May 7 10:44:55 2009 +0000 sh: r7785 highlander clock fixes Update the r7785 highlander defconfig to fix PCLK value and that mode4 is set high. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit b3cacf318172757783d8272fc333284dd4f50140 Author: Magnus Damm Date: Thu May 7 10:31:39 2009 +0000 sh: call clock framework init() callback once Make sure that clk->ops->init() only gets called once in the case of CLK_ALWAYS_ENABLED. Without this patch the init() callback may be called multiple times. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 5dafc91fca9135a7b0acb76d9709f4abfad92d6e Author: Magnus Damm Date: Thu May 7 10:17:44 2009 +0000 sh: sh7785 early scif fix This patch moves the SH4 case of EARLY_SCIF_CONSOLE_PORT so the SH7785 default value gets used. Without this patch the value for SH7785 is set to 0xffe80000. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 74f4fd21664148b8c454cc07bfe74e4dd51cf07b Author: Steven Rostedt Date: Thu May 7 19:58:55 2009 -0400 ring-buffer: change WARN_ON from checking preempt_count to preemptible There's a WARN_ON in the ring buffer code that makes sure preemption is disabled. It checks "!preempt_count()". But when CONFIG_PREEMPT is not enabled, preempt_count() is always zero, and this will trigger the warning. [ Impact: prevent false warning on non preemptible kernels ] Signed-off-by: Steven Rostedt commit 7da3046d6ce6ea97494020081c509b642b7016af Author: Steven Rostedt Date: Thu May 7 19:52:20 2009 -0400 ring-buffer: add total count in ring-buffer-benchmark It is nice to see the overhead of the benchmark test when tracing is disabled. That is, we turn off the ring buffer just to see what the cost of running the loop that calls into the ring buffer is. Currently, if no entries wer made, we get 0. This is not informative. This patch changes it to check if we had any "missed" (non recorded) events. If so, a total count is also reported. [ Impact: evaluate the over head of the ring buffer benchmark test ] Signed-off-by: Steven Rostedt commit 0574ea421b90e0e45a72c447dd3c2c79ffd8c153 Author: Steven Rostedt Date: Thu May 7 14:20:28 2009 -0400 ring-buffer: only periodically call cond_resched to ring-buffer-benchmark Calling cond_resched at every iteration of the loop adds a bit of overhead to the benchmark. This patch does two things. 1) only calls cond-resched when CONFIG_PREEMPT is not enabled 2) only calls cond-resched after so many traces has been performed. [ Impact: less overhead to the ring-buffer-benchmark ] Signed-off-by: Steven Rostedt commit 65b77242043f74bca6a0d733c0e48ef03a8c9893 Author: Steven Rostedt Date: Thu May 7 12:49:27 2009 -0400 tracing: have menu default enabled when kernel debug is configured Tracing can be very helpful to debug the kernel. When DEBUG_KERNEL is enabled it is nice to enable the trace menu as well. This patch only make the tracing menu enabled by default, it does not make any of the tracers enabled. And the menu is only enabled by default if DEBUG_KERNEL is enabled. [ Impact: show tracing options to those debugging the kernel ] Signed-off-by: Steven Rostedt commit d6bf81ef0f7474434c2a049e8bf3c9146a14dd96 Author: Steven Rostedt Date: Thu May 7 11:49:35 2009 -0400 tracing: append ":*" to internal setting of system events The system enabling of events uses the same code as the set_event file. It passes in the name of the system to the parser and that will enable all the events that has that system as a name. The problem is that it will also enable events with the same name as the system. If you have system name foo, and system name bar, but within the system bar, there exists an event called foo. By setting the system name foo, you will also be enabling the event foo in the system bar. This is not an expected result. The solution is to pass in "foo:*", which will only enable the system foo and not events called foo. [ Impact: prevent accidental enabling of events with same name as a system ] Reported-by: Li Zefan Signed-off-by: Steven Rostedt commit 29c8000ee7da3a6756d26143991e573eaaf2a9f6 Author: Steven Rostedt Date: Thu May 7 11:13:42 2009 -0400 ring-buffer: remove complex calculations in ring-buffer-test Ingo Molnar thought that the code to calculate the time in cond_resched is a bit too ugly and is not needed. This patch removes it and replaces it with a simple call to cond_resched. I kept the comment that explains the reason for the cond_resched. [ Impact: remove ugly code ] Reported-by: Ingo Molnar Signed-off-by: Steven Rostedt commit 8511a2728ab82cab398e39d019f5cf1246021c1c Author: David Teigland Date: Wed Apr 8 15:38:43 2009 -0500 dlm: fix use count with multiple joins When a lockspace was joined multiple times, the global dlm use count was incremented when it should not have been. This caused the global dlm threads to not be stopped when all lockspaces were eventually be removed. Signed-off-by: David Teigland commit 08ce4c91e44d51bb6c946f2756825a462d53c545 Author: Geert Uytterhoeven Date: Tue Apr 7 23:40:39 2009 +0200 dlm: Make name input parameter of {,dlm_}new_lockspace() const | fs/gfs2/lock_dlm.c:207: warning: passing argument 1 of 'dlm_new_lockspace' discards qualifiers from pointer target type Signed-off-by: Geert Uytterhoeven Signed-off-by: David Teigland commit 0ad5d703c6c0fcd385d956555460df95dff7eb7e Merge: 44347d9 1cb81b1 Author: Ingo Molnar Date: Thu May 7 11:18:34 2009 +0200 Merge branch 'tracing/hw-branch-tracing' into tracing/core Merge reason: this topic is ready for upstream now. It passed Oleg's review and Andrew had no further mm/* objections/observations either. Signed-off-by: Ingo Molnar commit 41d5545d23d2ccf4d34725094dccebd37f15c1c4 Author: Kacper Szczesniak Date: Thu May 7 12:47:43 2009 +0200 ALSA: hda - Add support for MacBook 5.1 (Aluminium) Signed-off-by: Kacper Szczesniak Signed-off-by: Takashi Iwai commit 44347d947f628060b92449702071bfe1d31dfb75 Merge: d94fc52 413f81e Author: Ingo Molnar Date: Thu May 7 11:17:13 2009 +0200 Merge branch 'linus' into tracing/core Merge reason: tracing/core was on a .30-rc1 base and was missing out on on a handful of tracing fixes present in .30-rc5-almost. Signed-off-by: Ingo Molnar commit c51279ec0d2d959e13831ae84b714301f0494f27 Author: Paul Mundt Date: Thu May 7 18:17:20 2009 +0900 sh: Kill off unused SH-5 irq_describe cruft. Signed-off-by: Paul Mundt commit 0fb849b9d743a20056f2418cd955e5c650658663 Author: Paul Mundt Date: Thu May 7 18:10:27 2009 +0900 sh: Integrate the SH-5 onchip_remap() more coherently. Presently this is special-cased for early initialization. While there are situations where these static early initializations are still necessary, with minor changes it is possible to use this for the regular ioremap implementation as well. This allows us to kill off the special-casing for the remap completely and to start tidying up all of the SH-5 special-casing in drivers. Signed-off-by: Paul Mundt commit ae318a148e4d255dfbc87d963fdd6031c2af9c46 Author: Paul Mundt Date: Thu May 7 17:55:09 2009 +0900 sh: sh64 still needs ARCH_USES_GETTIMEOFFSET temporarily. sh64 is still using this, so re-enable it temporarily while SH-5 gets converted to use the generic code. Signed-off-by: Paul Mundt commit d94fc523f3c35bd8013f04827e94756cbc0212f4 Author: Li Zefan Date: Thu May 7 15:11:15 2009 +0800 tracing/events: fix concurrent access to ftrace_events list, fix In filter_add_subsystem_pred() we should release event_mutex before calling filter_free_subsystem_preds(), since both functions hold event_mutex. [ Impact: fix deadlock when writing invalid pred into subsystem filter ] Signed-off-by: Li Zefan Cc: tzanussi@gmail.com Cc: a.p.zijlstra@chello.nl Cc: fweisbec@gmail.com Cc: rostedt@goodmis.org LKML-Reference: <4A028993.7020509@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 5928c3cc0ffcb6894bbab6be591b7ae1786b2d87 Author: Frederic Weisbecker Date: Sun May 3 03:03:57 2009 +0200 tracing/filters: support for operator reserved characters in strings When we set a filter for an event, such as: echo "name == my_lock_name" > \ /debug/tracing/events/lockdep/lock_acquired/filter then the following order of token type is parsed: - space - operator - parentheses - operand Because the operators and parentheses have a higher precedence than the operand characters, which is normal, then we can't use any string containing such special characters: ()=<>!&| To get this support and also avoid ambiguous intepretation from the parser or the human, we can do it using double quotes so that we keep the usual languages habits. Then after this patch you can still declare string condition like before: echo name == myname But if you want to compare against a string containing an operator character, you can use double quotes: echo 'name == "&myname"' Don't forget to include the whole expression into single quotes or the double ones will be eaten by echo. [ Impact: support strings with special characters for tracing filters ] Cc: Tom Zanussi Cc: Steven Rostedt Cc: Li Zefan Cc: Zhaolei Signed-off-by: Frederic Weisbecker commit e8808c1019b048a43686dbd25c188a035842c2e2 Author: Frederic Weisbecker Date: Sun May 3 02:48:52 2009 +0200 tracing/filters: support for filters of dynamic sized arrays Currently the filtering infrastructure supports well the numeric types and fixed sized array types. But the recently added __string() field uses a specific indirect offset mechanism which requires a specific predicate. Until now it wasn't supported. This patch adds this support and implies very few changes, only a new predicate is needed, the management of this specific field can be done through the usual string helpers in the filtering infrastructure. [ Impact: support all kinds of strings in the tracing filters ] Cc: Tom Zanussi Cc: Steven Rostedt Cc: Li Zefan Cc: Zhaolei Signed-off-by: Frederic Weisbecker commit 5e7c03442574ed0376c0621bfb0c477d79c12c71 Author: Daniel Mack Date: Wed May 6 01:26:01 2009 +0200 ASoC: cs4270: add power management support Signed-off-by: Daniel Mack Acked-by: Timur Tabi Signed-off-by: Mark Brown commit ee1acbfabd5270b40ce2cfdc202070b7ca91cdff Author: Paul Mundt Date: Thu May 7 16:38:16 2009 +0900 sh: Handle shm_align_mask also for HAVE_ARCH_UNMAPPED_AREA_TOPDOWN. Presently shm_align_mask is only looked at for the bottom up case, but we still want this for proper colouring constraints in the topdown case. Signed-off-by: Paul Mundt commit aa47b7e0f89b9998dad4d1667447e8cb7703ff4e Author: David Rientjes Date: Mon May 4 01:38:05 2009 -0700 sched: emit thread info flags with stack trace When a thread is oom killed and fails to exit, it's helpful to know which threads have access to memory reserves if the machine livelocks. This is done by testing for the TIF_MEMDIE thread info flag and should be displayed alongside stack traces to identify tasks that have access to such reserves but are still stuck allocating pages, for instance. It would probably be helpful in other cases as well, so all thread info flags are emitted when showing a task. ( v2: fix warning reported by Stephen Rothwell ) [ Impact: extend debug printout info ] Signed-off-by: David Rientjes Cc: Peter Zijlstra Cc: Stephen Rothwell LKML-Reference: Signed-off-by: Ingo Molnar commit 643bec956544d376b7c2a80a3d5c3d0bf94da8d3 Author: Ingo Molnar Date: Thu May 7 09:12:50 2009 +0200 x86: clean up arch/x86/kernel/tsc_sync.c a bit - remove unused define - make the lock variable definition stand out some more - convert KERN_* to pr_info() / pr_warning() [ Impact: cleanup ] LKML-Reference: Signed-off-by: Ingo Molnar commit 40c8bca76ecaa6b663d403d34f0fcd422bbdbffd Author: Paul Mundt Date: Thu May 7 15:24:36 2009 +0900 sh: Flag IRQSTACKS as BROKEN for now. There still seems to be some stack corruption to sort out here, so flag this as BROKEN until this issue is sorted out. Signed-off-by: Paul Mundt commit 975e5f45500dff6d15c0001bb662e9aac0ce0076 Author: Samuel Bronson Date: Wed May 6 22:27:55 2009 -0400 x86: use symbolic name for VM86_SIGNAL when used as vm86 default return This code has apparently used "0" and not VM86_SIGNAL since Linux 1.1.9, when Linus added VM86_SIGNAL to vm86.h. This patch changes the code to use the symbolic name. The magic 0 tripped me up in trying to extend the vm86(2) manpage to actually explain vm86()'s interface -- my greps for VM86_SIGNAL came up fruitless. [ Impact: cleanup; no object code change ] Signed-off-by: Samuel Bronson Signed-off-by: H. Peter Anvin commit 8ae79a138e88aceeeb07077bff2883245fb7c218 Author: Steven Rostedt Date: Wed May 6 22:52:15 2009 -0400 tracing: add hierarchical enabling of events With the current event directory, you can only enable individual events. The file debugfs/tracing/set_event is used to be able to enable or disable several events at once. But that can still be awkward. This patch adds hierarchical enabling of events. That is, each directory in debugfs/tracing/events has an "enable" file. This file can enable or disable all events within the directory and below. # echo 1 > /debugfs/tracing/events/enable will enable all events. # echo 1 > /debugfs/tracing/events/sched/enable will enable all events in the sched subsystem. # echo 1 > /debugfs/tracing/events/enable # echo 0 > /debugfs/tracing/events/irq/enable will enable all events, but then disable just the irq subsystem events. When reading one of these enable files, there are four results: 0 - all events this file affects are disabled 1 - all events this file affects are enabled X - there is a mixture of events enabled and disabled ? - this file does not affect any event Signed-off-by: Steven Rostedt commit 9456f0fa6d3cb944d3b9fc31c9a244e0362c26ea Author: Steven Rostedt Date: Wed May 6 21:54:09 2009 -0400 tracing: reset ring buffer when removing modules with events Li Zefan found that there's a race using the event ids of events and modules. When a module is loaded, an event id is incremented. We only have 16 bits for event ids (65536) and there is a possible (but highly unlikely) race that we could load and unload a module that registers events so many times that the event id counter overflows. When it overflows, it then restarts and goes looking for available ids. An id is available if it was added by a module and released. The race is if you have one module add an id, and then is removed. Another module loaded can use that same event id. But if the old module still had events in the ring buffer, the new module's call back would get bogus data. At best (and most likely) the output would just be garbage. But if the module for some reason used pointers (not recommended) then this could potentially crash. The safest thing to do is just reset the ring buffer if a module that registered events is removed. [ Impact: prevent unpredictable results of event id overflows ] Reported-by: Li Zefan LKML-Reference: <49FEAFD0.30106@cn.fujitsu.com> Signed-off-by: Steven Rostedt commit 71e1c8ac42ae4038ddb1367cce7097ab868dc532 Author: Steven Rostedt Date: Wed May 6 21:20:39 2009 -0400 tracing: update sample with TRACE_INCLUDE_FILE When creating trace events for ftrace, the header file with the TRACE_EVENT macros must also have a macro called TRACE_SYSTEM. This macro describes the name of the system the TRACE_EVENTS are defined for. It also doubles as a way for the define_trace.h file to include the file that included it. For example: in irq.h #define TRACE_SYSTEM irq [...] #include The define_trace will use TRACE_SYSTEM to include irq.h. But if the name of the trace system does not match the name of the trace header file, one can override it with: Which will change define_trace.h to inclued foo_trace.h instead of foo.h The sample comments this, but people that use the sample code will more likely use the code and not read the comments. This patch changes the sample code to use the TRACE_INCLUDE_FILE to better show developers how to use it. [ Impact: make sample less confusing to developers ] Reported-by: Christoph Hellwig Signed-off-by: Steven Rostedt commit 3e07a4f680adc66dfa175aa5021aedf340251b12 Author: Steven Rostedt Date: Wed May 6 18:36:59 2009 -0400 ring-buffer: change test to be more latency friendly The ring buffer benchmark/test runs a producer for 10 seconds. This is done with preemption and interrupts enabled. But if the kernel is not compiled with CONFIG_PREEMPT, it basically stops everything but interrupts for 10 seconds. Although this is just a test and is not for production, this attribute can be quite annoying. It can also spawn badness elsewhere. This patch solves the issues by calling "cond_resched" when the system is not compiled with CONFIG_PREEMPT. It also keeps track of the time spent to call cond_resched such that it does not go against the time calculations. That is, if the task schedules away, the time scheduled out is removed from the test data. Note, this only works for non PREEMPT because we do not know when the task is scheduled out if we have PREEMPT enabled. [ Impact: prevent test from stopping the world for 10 seconds ] Signed-off-by: Steven Rostedt commit 6634ff26cce2da04e5c2a5481bcb8888e7d01786 Author: Steven Rostedt Date: Wed May 6 15:30:07 2009 -0400 ring-buffer: make moving the tail page a separate function Ingo Molnar thought the code would be cleaner if we used a function call instead of a goto for moving the tail page. After implementing this, it seems that gcc still inlines the result and the output is pretty much the same. Since this is considered a cleaner approach, might as well implement it. [ Impact: code clean up ] Signed-off-by: Steven Rostedt commit 00c81a58c5b4e0de14ee33bfbc3d71c90f69f9ea Author: Steven Rostedt Date: Wed May 6 12:40:51 2009 -0400 ring-buffer: check for failed allocation in ring buffer benchmark The result of the allocation of the ring buffer read page in the ring buffer bench mark does not check the return to see if a page was actually allocated. This patch fixes that. [ Impact: avoid NULL dereference ] Signed-off-by: Steven Rostedt commit 8e7abf1c62941ebb7a1416cbc62392c8a0902625 Author: Steven Rostedt Date: Wed May 6 10:26:45 2009 -0400 ring-buffer: remove unneeded conditional in rb_reserve_next The code in __rb_reserve_next checks on page overflow if it is the original commiter and then resets the page back to the original setting. Although this is fine, and the code is correct, it is a bit fragil. Some experimental work I did breaks it easily. The better and more robust solution is to have all commiters that overflow the page, simply subtract what they added. [ Impact: more robust ring buffer account management ] Signed-off-by: Steven Rostedt commit 72cbfd45fac627de4bd38c203baaac40cd26477c Author: Takashi Iwai Date: Wed May 6 17:33:19 2009 +0200 ALSA: ice1724 - Add ESI Maya44 support Added the support for ESI Maya44 board to ice1724 driver. Signed-off-by: Takashi Iwai commit 2bf864ac963c5126a9c7c3dce0958390fb612270 Author: Takashi Iwai Date: Wed May 6 17:30:17 2009 +0200 ALSA: ice1724 - Allow spec driver to create own routing controls Added a new flag, own_routing, to allow spec drivers to create own routing controls. Also, the basic get/put calls are changed to be external for later use by maya44 driver. Signed-off-by: Takashi Iwai commit d82b64f4764755d765038cf95b1dbe7db039592a Author: Takashi Iwai Date: Wed May 6 17:25:42 2009 +0200 ALSA: ice1724 - Add PCI postint to reset sequence Add the PCI posting to ensure the reset sequence in snd_vt1724_chip_reset(). Signed-off-by: Takashi Iwai commit a5b7b5c1d05387ffeaf0487482806ec6c5968ac7 Author: Takashi Iwai Date: Wed May 6 17:22:07 2009 +0200 ALSA: ice1724 - Clean up definitions of DMA records Rename some vt1724_pcm_reg records to more generic and consistent ones. Signed-off-by: Takashi Iwai commit 92d71005e2f305d6dca126d8b8497e885b842dba Author: Takashi Iwai Date: Wed May 6 17:18:34 2009 +0200 ALSA: ice1724 - Check error in set_rate function The set_rate might return error but the current code doesn't check it. This patch adds a proper error check. Signed-off-by: Takashi Iwai commit 35cf723e99c0e26ddf51f037dffaa4ff2c2c9106 Author: Christoph Hellwig Date: Wed May 6 12:33:38 2009 +0200 tracing: small trave_events sample Makefile cleanup Use -I$(src) to add the current directory the include path. [ Impact: cleanup ] Signed-off-by: Christoph Hellwig Acked-by: Steven Rostedt LKML-Reference: Signed-off-by: Ingo Molnar commit 48dd0fed90e2b1f1ba87401439b85942181c6df3 Author: Jaswinder Singh Rajput Date: Wed May 6 15:45:45 2009 +0530 tracing: trace_output.c, fix false positive compiler warning This compiler warning: CC kernel/trace/trace_output.o kernel/trace/trace_output.c: In function ‘register_ftrace_event’: kernel/trace/trace_output.c:544: warning: ‘list’ may be used uninitialized in this function Is wrong as 'list' is always initialized - but GCC (4.3.2) does not recognize this relationship properly. Work around the warning by initializing the variable to NULL. [ Impact: fix false positive compiler warning ] Signed-off-by: Jaswinder Singh Rajput Acked-by: Steven Rostedt LKML-Reference: Signed-off-by: Ingo Molnar commit 22a7c31a9659deaddafbbcec6562d44141e84474 Author: Alan D. Brunelle Date: Mon May 4 16:35:08 2009 -0400 blktrace: from-sector redundant in trace_block_remap Remove redundant from-sector parameter: it's /always/ the bio's sector passed in. [ Impact: cleanup ] Signed-off-by: Alan D. Brunelle Reviewed-by: Li Zefan Reviewed-by: KOSAKI Motohiro Cc: Jens Axboe Cc: Arnaldo Carvalho de Melo LKML-Reference: <49FF517C.7000503@hp.com> Signed-off-by: Ingo Molnar commit a42aaa3bbce85ac487ad4fad5db99e8e91b7aac1 Author: Alan D. Brunelle Date: Mon May 4 16:27:26 2009 -0400 blktrace: correct remap names This attempts to clarify names utilized during block I/O remap operations (partition, volume manager). It correctly matches up the /from/ information for both device & sector. This takes in the concept from Kosaki Motohiro and extends it to include better naming for the "device_from" field. [ Impact: cleanup ] Signed-off-by: Alan D. Brunelle Reviewed-by: Li Zefan Reviewed-by: KOSAKI Motohiro Cc: Jens Axboe Cc: Arnaldo Carvalho de Melo LKML-Reference: <49FF4FAE.3000301@hp.com> Signed-off-by: Ingo Molnar commit de1d7286060430e79a1d50ad6e5fee8fe863c5f6 Author: Mathieu Desnoyers Date: Tue May 5 16:49:59 2009 +0800 tracepoint: trace_sched_migrate_task(): remove parameter The orig_cpu parameter in trace_sched_migrate_task() is not necessary, it can be got by using task_cpu(p) in the probe. [ Impact: micro-optimization ] Signed-off-by: Mathieu Desnoyers [ modified from Mathieu's patch. The original patch is at: http://marc.info/?l=linux-kernel&m=123791201716239&w=2 ] Signed-off-by: Xiao Guangrong Cc: fweisbec@gmail.com Cc: rostedt@goodmis.org Cc: Li Zefan Cc: zhaolei@cn.fujitsu.com Cc: laijs@cn.fujitsu.com LKML-Reference: <49FFFDB7.1050402@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 20c8928abe70e204bd077ab6cfe23002d7788983 Author: Li Zefan Date: Wed May 6 10:33:45 2009 +0800 tracing/events: fix concurrent access to ftrace_events list A module will add/remove its trace events when it gets loaded/unloaded, so the ftrace_events list is not "const", and concurrent access needs to be protected. This patch thus fixes races between loading/unloding modules and read 'available_events' or read/write 'set_event', etc. Below shows how to reproduce the race: # for ((; ;)) { cat /mnt/tracing/available_events; } > /dev/null & # for ((; ;)) { insmod trace-events-sample.ko; rmmod sample; } & After a while: BUG: unable to handle kernel paging request at 0010011c IP: [] t_next+0x1b/0x2d ... Call Trace: [] ? seq_read+0x217/0x30d [] ? seq_read+0x0/0x30d [] ? vfs_read+0x8f/0x136 [] ? sys_read+0x40/0x65 [] ? sysenter_do_call+0x12/0x36 [ Impact: fix races when concurrent accessing ftrace_events list ] Signed-off-by: Li Zefan Acked-by: Steven Rostedt Acked-by: Frederic Weisbecker Cc: Tom Zanussi Cc: Peter Zijlstra LKML-Reference: <4A00F709.3080800@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 2df75e415709ad12862028916c772c1f377f6a7c Author: Li Zefan Date: Wed May 6 10:33:04 2009 +0800 tracing/events: fix memory leak when unloading module When unloading a module, memory allocated by init_preds() and trace_define_field() is not freed. [ Impact: fix memory leak ] Signed-off-by: Li Zefan Acked-by: Frederic Weisbecker Acked-by: Steven Rostedt Cc: Tom Zanussi LKML-Reference: <4A00F6E0.3040503@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 96d17980fabeb757706d2d6db5a28580a6156bfc Author: Li Zefan Date: Wed May 6 10:32:32 2009 +0800 tracing/events: make SAMPLE_TRACE_EVENTS default to n Normally a config should be default to n. This patch also makes the sample module-only, like SAMPLE_MARKERS and SAMPLE_TRACEPOINTS. [ Impact: don't build trace event sample by default ] Signed-off-by: Li Zefan Acked-by: Steven Rostedt Acked-by: Frederic Weisbecker LKML-Reference: <4A00F6C0.8090803@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit fd6da10a617f483348ee32bcfe53fd20c302eca1 Author: Li Zefan Date: Wed May 6 10:32:13 2009 +0800 tracing/events: don't say hi when loading the trace event sample The sample is useful for testing, and I'm using it. But after loading the module, it keeps saying hi every 10 seconds, this may be disturbing. Also Steven said commenting out the "hi" helped in causing races. :) [ Impact: make testing a bit easier ] Signed-off-by: Li Zefan Acked-by: Steven Rostedt Acked-by: Frederic Weisbecker LKML-Reference: <4A00F6AD.2070008@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 3611dfb8eda847c1c8e1a052f57206f7fddc6a7c Merge: 16c8a10 a511e3f Author: Ingo Molnar Date: Wed May 6 08:46:27 2009 +0200 Merge branch 'core/locking' into perfcounters/core Merge reason: we moved a mutex.h commit that originated from the perfcounters tree into core/locking - but now merge back that branch to solve a merge artifact and to pick up cleanups of this commit that happened in core/locking. Signed-off-by: Ingo Molnar commit b2e5d8588de0b5341eddad87dbe48d2185eaa3dd Author: Ingo Molnar Date: Wed May 6 07:55:33 2009 +0200 irq: change ->set_affinity() to return status, fix This build failure: arch/powerpc/sysdev/mpic.c:810: error: conflicting types for 'mpic_set_affinity' arch/powerpc/sysdev/mpic.h:39: error: previous declaration of 'mpic_set_affinity' was here make[2]: *** [arch/powerpc/sysdev/mpic.o] Error 1 make[2]: *** Waiting for unfinished jobs.... Triggers because the function prototype was not updated when the function call signature got changed by: d5dedd4: irq: change ->set_affinity() to return status [ Impact: build fix on powerpc ] Cc: Benjamin Herrenschmidt Cc: Yinghai Lu Cc: Andrew Morton Cc: Rusty Russell Cc: linux-arch@vger.kernel.org LKML-Reference: <49F654E9.4070809@kernel.org> Signed-off-by: Ingo Molnar commit 5092dbc96f3acdac5433b27c06860352dc6d23b9 Author: Steven Rostedt Date: Tue May 5 22:47:18 2009 -0400 ring-buffer: add benchmark and tester This patch adds code that can benchmark the ring buffer as well as test it. This code can be compiled into the kernel (not recommended) or as a module. A separate ring buffer is used to not interfer with other users, like ftrace. It creates a producer and a consumer (option to disable creation of the consumer) and will run for 10 seconds, then sleep for 10 seconds and then repeat. While running, the producer will write 10 byte loads into the ring buffer with just putting in the current CPU number. The reader will continually try to read the buffer. The reader will alternate from reading the buffer via event by event, or by full pages. The output is a pr_info, thus it will fill up the syslogs. Starting ring buffer hammer End ring buffer hammer Time: 9000349 (usecs) Overruns: 12578640 Read: 5358440 (by events) Entries: 0 Total: 17937080 Missed: 0 Hit: 17937080 Entries per millisec: 1993 501 ns per entry Sleeping for 10 secs Starting ring buffer hammer End ring buffer hammer Time: 9936350 (usecs) Overruns: 0 Read: 28146644 (by pages) Entries: 74 Total: 28146718 Missed: 0 Hit: 28146718 Entries per millisec: 2832 353 ns per entry Sleeping for 10 secs Time: is the time the test ran Overruns: the number of events that were overwritten and not read Read: the number of events read (either by pages or events) Entries: the number of entries left in the buffer (the by pages will only read full pages) Total: Entries + Read + Overruns Missed: the number of entries that failed to write Hit: the number of entries that were written The above example shows that it takes ~353 nanosecs per entry when there is a reader, reading by pages (and no overruns) The event by event reader slowed the producer down to 501 nanosecs. [ Impact: see how changes to the ring buffer affect stability and performance ] Signed-off-by: Steven Rostedt commit 2feceeff1e771850e49f9074307f071964fd9e3e Author: H. Peter Anvin Date: Tue May 5 19:07:07 2009 -0700 x86: fix typo in address space documentation Fix a trivial typo in Documentation/x86/x86_64/mm.txt. [ Impact: documentation only ] Signed-off-by: H. Peter Anvin Cc: Rik van Riel commit c898faf91b3ec6b0f6efa35831b3984fa3331db0 Author: Rik van Riel Date: Tue May 5 17:28:56 2009 -0400 x86: 46 bit physical address support on 64 bits Extend the maximum addressable memory on x86-64 from 2^44 to 2^46 bytes. This requires some shuffling around of the vmalloc and virtual memmap memory areas, to keep them away from the direct mapping of up to 64TB of physical memory. This patch also introduces a guard hole between the vmalloc area and the virtual memory map space. There's really no good reason why we wouldn't have a guard hole there. [ Impact: future hardware enablement ] Signed-off-by: Rik van Riel LKML-Reference: <20090505172856.6820db22@cuia.bos.redhat.com> Signed-off-by: H. Peter Anvin commit aa20ae8444fc6c318272c643f856d8d8ad3e198d Author: Steven Rostedt Date: Tue May 5 21:16:11 2009 -0400 ring-buffer: move big if statement down In the hot path of the ring buffer "__rb_reserve_next" there's a big if statement that does not even return back to the work flow. code; if (cross to next page) { [ lots of code ] return; } more code; The condition is even the unlikely path, although we do not denote it with an unlikely because gcc is fine with it. The condition is true when the write crosses a page boundary, and we need to start at a new page. Having this if statement makes it hard to read, but calling another function to do the work is also not appropriate, because we are using a lot of variables that were set before the if statement, and we do not want to send them as parameters. This patch changes it to a goto: code; if (cross to next page) goto next_page; more code; return; next_page: [ lots of code] This makes the code easier to understand, and a bit more obvious. The output from gcc is practically identical. For some reason, gcc decided to use different registers when I switched it to a goto. But other than that, the logic is the same. [ Impact: easier to read code ] Signed-off-by: Steven Rostedt commit 07ff7a0b187f3951788f64ae1f30e8109bc8e9eb Author: Mimi Zohar Date: Tue May 5 13:13:10 2009 -0400 integrity: remove __setup auditing msgs Remove integrity audit messages from __setup() Signed-off-by: Mimi Zohar Signed-off-by: James Morris commit e5e520a715dcea6b72f6b9417b203a4b1e813a8b Author: Mimi Zohar Date: Tue May 5 13:13:00 2009 -0400 integrity: use audit_log_string Based on a request from Eric Paris to simplify parsing, replace audit_log_format statements containing "%s" with audit_log_string(). Signed-off-by: Mimi Zohar Acked-by: Eric Paris Signed-off-by: James Morris commit 53fc0e2259f261602a2750dcc82b8d7bf04d3c35 Author: Mimi Zohar Date: Tue May 5 13:12:48 2009 -0400 integrity: lsm audit rule matching fix An audit subsystem change replaced AUDIT_EQUAL with Audit_equal. Update calls to security_filter_rule_init()/match() to reflect the change. Signed-off-by: Mimi Zohar Signed-off-by: James Morris commit 94487d6d53af5acae10cf9fd52f74498994d46b1 Author: Steven Rostedt Date: Tue May 5 19:22:53 2009 -0400 tracing: use proper export symbol for tracing api When adding the EXPORT_SYMBOL to some of the tracing API, I accidently used EXPORT_SYMBOL instead of EXPORT_SYMBOL_GPL. This patch fixes that mistake. [ Impact: export the tracing code only for GPL modules ] Reported-by: Christoph Hellwig Signed-off-by: Steven Rostedt commit 31b6e76e21b2ffd3cb2f6fe4149790a9fdadce2d Author: Tim Abbott Date: Thu Apr 30 20:06:11 2009 -0400 ftrace: use .sched.text, not .text.sched in recordmcount.pl The only references in the kernel to the .text.sched section are in recordmcount.pl. Since the code it has is intended to be example code it should refer to real kernel sections. So change it to .sched.text instead. [ Impact: consistency in comments ] Signed-off-by: Tim Abbott LKML-Reference: <1241136371-10768-1-git-send-email-tabbott@mit.edu> Acked-by: Sam Ravnborg Signed-off-by: Steven Rostedt commit 41ede23eded40832c955d98d4b71bc244809abb3 Author: Steven Rostedt Date: Fri May 1 20:26:54 2009 -0400 ring-buffer: disable writers when resetting buffers As a precaution, it is best to disable writing to the ring buffers when reseting them. [ Impact: prevent weird things if write happens during reset ] Signed-off-by: Steven Rostedt commit afbab76a62b69ea6197e19727d4b8a8aef8deb25 Author: Steven Rostedt Date: Fri May 1 19:40:05 2009 -0400 ring-buffer: have read page swap increment counter with page entries In the swap page ring buffer code that is used by the ftrace splice code, we scan the page to increment the counter of entries read. With the number of entries already in the page we simply need to add it. [ Impact: speed up reading page from ring buffer ] Signed-off-by: Steven Rostedt commit 778c55d44eb4f5f658915ed631d68ed9d1ac3ad1 Author: Steven Rostedt Date: Fri May 1 18:44:45 2009 -0400 ring-buffer: record page entries in buffer page descriptor Currently, when the ring buffer writer overflows the buffer and must write over non consumed data, we increment the overrun counter by reading the entries on the page we are about to overwrite. This reads the entries one by one. This is not very effecient. This patch adds another entry counter into each buffer page descriptor that keeps track of the number of entries on the page. Now on overwrite, the overrun counter simply needs to add the number of entries that is on the page it is about to overwrite. [ Impact: speed up of ring buffer in overwrite mode ] Signed-off-by: Steven Rostedt commit 41c51c98f588edcdf6141cff1895df738e03ddd4 Author: Oleg Nesterov Date: Sun May 3 23:11:18 2009 +0200 rcu: rcu_sched_grace_period(): kill the bogus flush_signals() As a kernel thread, rcu_sched_grace_period() runs with all signals ignored. It can never receive a signal even if it sleeps in TASK_INTERRUPTIBLE, it needs the explicit allow_signal() to be visible for signals. [ Impact: reduce kernel size, remove dead code ] Signed-off-by: Oleg Nesterov Reviewed-by: Paul E. McKenney Cc: Andrew Morton LKML-Reference: <20090503211118.GA22973@redhat.com> Signed-off-by: Ingo Molnar commit e4906eff9e6fbd2d311abcbcc53d5a531773c982 Author: Steven Rostedt Date: Thu Apr 30 20:49:44 2009 -0400 ring-buffer: convert cpu buffer entries to local_t The entries counter in cpu buffer is not atomic. It can be updated by other interrupts or from another CPU (readers). But making entries into "atomic_t" causes an atomic operation that can hurt performance. Instead we convert it to a local_t that will increment a counter with a local CPU atomic operation (if the arch supports it). Instead of fighting with readers and overwrites that decrement the counter, I added a "read" counter. Every time a reader reads an entry it is incremented. We already have a overrun counter and with that, the entries counter and the read counter, we can calculate the total number of entries in the buffer with: (entries - overrun) - read As long as the total number of entries in the ring buffer is less than the word size, this will work. But since the entries counter was previously a long, this is no different than what we had before. Thanks to Andrew Morton for pointing out in the first version that atomic_t does not replace unsigned long. I switched to atomic_long_t even though it is signed. A negative count is most likely a bug. [ Impact: keep accurate count of cpu buffer entries ] Signed-off-by: Steven Rostedt commit 16c8a10932aef971292c9570eb5f60b5d4e83ed2 Author: Peter Zijlstra Date: Tue May 5 17:50:27 2009 +0200 perf_counter: tools: update the tools to support process and inherited counters "perf record": - per task counter - inherit switch - nmi switch "perf report": - userspace/kernel filter "perf stat": - userspace/kernel filter Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090505155437.389163017@chello.nl> Signed-off-by: Ingo Molnar commit 2023b359214bbc5bad31571cf50d7fb83b535c0a Author: Peter Zijlstra Date: Tue May 5 17:50:26 2009 +0200 perf_counter: inheritable sample counters Redirect the output to the parent counter and put in some sanity checks. [ Impact: new perfcounter feature - inherited sampling counters ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090505155437.331556171@chello.nl> Signed-off-by: Ingo Molnar commit 22c1558e51c210787c6cf75d8905246fc91ec030 Author: Peter Zijlstra Date: Tue May 5 17:50:25 2009 +0200 perf_counter: fix the output lock Use -1 instead of 0 as unlocked, since 0 is a valid cpu number. ( This is not an issue right now but will be once we allow multiple counters to output to the same mmap area. ) [ Impact: prepare code for multi-counter profile output ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090505155437.232686598@chello.nl> Signed-off-by: Ingo Molnar commit c5078f78b455fbf67ea71442c7e7ca8acf9ff095 Author: Peter Zijlstra Date: Tue May 5 17:50:24 2009 +0200 perf_counter: provide an mlock threshold Provide a threshold to relax the mlock accounting, increasing usability. Each counter gets perf_counter_mlock_kb for free. [ Impact: allow more mmap buffering ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090505155437.112113632@chello.nl> Signed-off-by: Ingo Molnar commit 6de6a7b95705b859b61430fa3afa1403034eb3e6 Author: Peter Zijlstra Date: Tue May 5 17:50:23 2009 +0200 perf_counter: add ioctl(PERF_COUNTER_IOC_RESET) Provide a way to reset an existing counter - this eases PAPI libraries around perfcounters. Similar to read() it doesn't collapse pending child counters. [ Impact: new perfcounter fd ioctl method to reset counters ] Suggested-by: Corey Ashford Signed-off-by: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <20090505155437.022272933@chello.nl> Signed-off-by: Ingo Molnar commit c66de4a5be7913247bd83d79168f8e4420c9cfbc Author: Peter Zijlstra Date: Tue May 5 17:50:22 2009 +0200 perf_counter: uncouple data_head updates from wakeups Keep data_head up-to-date irrespective of notifications. This fixes the case where you disable a counter and don't get a notification for the last few pending events, and it also allows polling usage. [ Impact: increase precision of perfcounter mmap-ed fields ] Suggested-by: Corey Ashford Signed-off-by: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <20090505155436.925084300@chello.nl> Signed-off-by: Ingo Molnar commit 80ab8817bf9b740df1f0778c41875e93151409bf Author: Daniel Mack Date: Tue May 5 11:25:00 2009 +0200 ASoC: cs4270: introduce CS4270_I2C_INCR Replace the magic 0x80 value with a suitable macro definition. Signed-off-by: Daniel Mack Acked-by: Timur Tabi Signed-off-by: Mark Brown commit 60aa605dfce2976e54fa76e805ab0f221372d4d9 Author: Peter Zijlstra Date: Tue May 5 17:50:21 2009 +0200 sched: rt: document the risk of small values in the bandwidth settings Thomas noted that we should disallow sysctl_sched_rt_runtime == 0 for (!RT_GROUP) since the root group always has some RT tasks in it. Further, update the documentation to inspire clue. [ Impact: exclude corner-case sysctl_sched_rt_runtime value ] Reported-by: Thomas Gleixner Signed-off-by: Peter Zijlstra LKML-Reference: <20090505155436.863098054@chello.nl> Signed-off-by: Ingo Molnar commit c8d771835e18c938dae8690611d65fe98ad30f58 Author: Steven Rostedt Date: Wed Apr 29 18:03:45 2009 -0400 tracing: export stats of ring buffers to userspace This patch adds stats to the ftrace ring buffers: # cat /debugfs/tracing/per_cpu/cpu0/stats entries: 42360 overrun: 30509326 commit overrun: 0 nmi dropped: 0 Where entries are the total number of data entries in the buffer. overrun is the number of entries not consumed and were overwritten by the writer. commit overrun is the number of entries dropped due to nested writers wrapping the buffer before the initial writer finished the commit. nmi dropped is the number of entries dropped due to the ring buffer lock being held when an nmi was going to write to the ring buffer. Note, this field will be meaningless and will go away when the ring buffer becomes lockless. [ Impact: let userspace know what is happening in the ring buffers ] Signed-off-by: Steven Rostedt commit f0d2c681ac0a85142fc8abe65fc33fcad35cb9b7 Author: Steven Rostedt Date: Wed Apr 29 13:43:37 2009 -0400 ring-buffer: add counters for commit overrun and nmi dropped entries The WARN_ON in the ring buffer when a commit is preempted and the buffer is filled by preceding writes can happen in normal operations. The WARN_ON makes it look like a bug, not to mention, because it does not stop tracing and calls printk which can also recurse, this is prone to deadlock (the WARN_ON is not in a position to recurse). This patch removes the WARN_ON and replaces it with a counter that can be retrieved by a tracer. This counter is called commit_overrun. While at it, I added a nmi_dropped counter to count any time an NMI entry is dropped because the NMI could not take the spinlock. [ Impact: prevent deadlock by printing normal case warning ] Signed-off-by: Steven Rostedt commit d6ce96dabe2c4409fd009ec14250a1fdbab4b133 Author: Steven Rostedt Date: Tue May 5 01:15:24 2009 -0400 ring-buffer: export symbols I'm adding a module to do a series of tests on the ring buffer as well as benchmarks. This module needs to have more of the ring buffer API exported. There's nothing wrong with reading the ring buffer from a module. [ Impact: allow modules to read pages from the ring buffer ] Signed-off-by: Steven Rostedt commit e6e55122a54db87e22c67477de2a9978a3e4c81b Author: Mark Brown Date: Tue May 5 11:10:24 2009 +0100 ASoC: Add headers to match patterns in MAINTAINERS Signed-off-by: Mark Brown commit ae1ec5e1e97f67d41e641a73380129e5905e41cc Author: Takashi Iwai Date: Mon Oct 13 03:08:53 2008 +0200 ALSA: usbaudio - Add delay account Manage the PCM delay account based on the queued URBs. Signed-off-by: Takashi Iwai commit 4bbe1ddf89a5ba3ec30fe5980912d8bda3a3cbb2 Author: Takashi Iwai Date: Mon Oct 13 03:07:14 2008 +0200 ALSA: Add extra delay count in PCM Added runtime->delay field to adjust the delayed samples for snd_pcm_delay(). Typically a hardware FIFO length is stored in this field, so that the extra delay between hwptr and applptr can be computed. Signed-off-by: Takashi Iwai commit bbd993077d788589a86a718ba7a7895ba5e71a17 Author: Mark Brown Date: Tue May 5 10:27:38 2009 +0100 ASoC: Remove redundant codec pointer from DAIs The DAI structure has two pointers to the codec, one in the body of the DAI and one in a union for a parent pointer. Drop the parent pointer version. Signed-off-by: Mark Brown commit b290750172b97cb48497a277b3e628083e7246cb Merge: f3831a5 97a775c Author: Mark Brown Date: Tue May 5 10:13:01 2009 +0100 Merge branch 'for-2.6.30' into for-2.6.31 commit f3831a592fe4332a70baad64a860b345398885b7 Merge: 376f783 8560b93 Author: Mark Brown Date: Tue May 5 10:12:55 2009 +0100 Merge commit 'takashi/topic/asoc' into for-2.6.31 commit 376f7839b72ec526173cafb5d8eadfc61e2effdf Author: Peter Ujfalusi Date: Tue May 5 08:55:47 2009 +0300 ASoC: TWL4030: Add VIBRA output This patch adds support for the VIBRA output on TWL4030 codec. The VIBRA output can be driven with audio data or with local vibrator driver. Add the needed DAPM elements and routes for the VIBRA output and controls for the VIBRA driver configuration. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit a195b51bc5abc745f12b7b2fe0e3422f55c1953f Author: Jonathan Cameron Date: Mon May 4 14:54:11 2009 +0000 ASoC: IMote2 ASoC Support This patch adds the ASoC side of the board support for the Crossbow IMB400 daughter board. Thanks to Crossbow for considerable assistance. Signed-off-by: Jonathan Cameron Signed-off-by: Mark Brown commit ee8f6894f358b6a04d8190fd78990749de98a498 Author: Lopez Cruz, Misael Date: Thu Apr 30 21:48:08 2009 -0500 ASoC: TWL4030: Add voice digital loopback: sidetone This patch add voice digital loopback (sidetone) to the twl4030 driver. It mixes voice uplink attenuated (by sidetone gain) with voice downlink when the codec is working in option2 (voice/audio mode). Signed-off-by: Misael Lopez Cruz Acked-by: Peter Ujfalusi Signed-off-by: Mark Brown commit fcd274a345875b05c348ba19bc6b3dd48ecbb7d0 Author: Lopez Cruz, Misael Date: Thu Apr 30 21:47:22 2009 -0500 ASoC: TWL4030: Add VDL analog bypass This patch adds voice downlink analog bypass switch. It follows the same approach as in other analog bypass switches. DAC switch is moved from 'DAC Voice' to 'Analog Voice Playback Mixer', that will also allow voice DAC to be powered in digital voice loopback (sidetone). Signed-off-by: Misael Lopez Cruz Acked-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 066d7dea32c9bffe6decc0abe465627656cdd84e Author: Ingo Molnar Date: Mon May 4 19:04:09 2009 +0200 perf_counter: fix fixed-purpose counter support on v2 Intel-PERFMON Fixed-purpose counters stopped working in a simple 'perf stat ls' run: cache references cache misses Due to: ef7b3e0: perf_counter, x86: remove vendor check in fixed_mode_idx() Which made x86_pmu.num_counters_fixed matter: if it's nonzero, the fixed-purpose counters are utilized. But on v2 perfmon this field is not set (despite there being fixed-purpose PMCs). So add a quirk to set the number of fixed-purpose counters to at least three. [ Impact: add quirk for three fixed-purpose counters on certain Intel CPUs ] Cc: Robert Richter Cc: Paul Mackerras Cc: Peter Zijlstra LKML-Reference: <1241002046-8832-28-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 1dce8d99b85aba6eddb8b8260baea944922e6fe7 Author: Ingo Molnar Date: Mon May 4 19:23:18 2009 +0200 perf_counter: convert perf_resource_mutex to a spinlock Now percpu counters can be initialized very early. But the init sequence uses mutex_lock(). Fortunately, perf_resource_mutex should be a spinlock anyway, so convert it. [ Impact: fix crash due to early init mutex use ] LKML-Reference: Signed-off-by: Ingo Molnar commit 0d905bca23aca5c86a10ee101bcd3b1abbd40b25 Author: Ingo Molnar Date: Mon May 4 19:13:30 2009 +0200 perf_counter: initialize the per-cpu context earlier percpu scheduling for perfcounters wants to take the context lock, but that lock first needs to be initialized. Currently it is an early_initcall() - but that is too late, the task tick runs much sooner than that. Call it explicitly from the scheduler init sequence instead. [ Impact: fix access-before-init crash ] LKML-Reference: Signed-off-by: Ingo Molnar commit ba77813a2a22d631fe5bc0bf1ec0d11350544b70 Author: Peter Zijlstra Date: Mon May 4 18:47:44 2009 +0200 perf_counter: x86: fixup nmi_watchdog vs perf_counter boo-boo Invert the atomic_inc_not_zero() test so that we will indeed detect the first activation. Also rename the global num_counters, since its easy to confuse with x86_pmu.num_counters. [ Impact: fix non-working perfcounters on AMD CPUs, cleanup ] Signed-off-by: Peter Zijlstra LKML-Reference: <1241455664.7620.4938.camel@twins> Signed-off-by: Ingo Molnar commit b82914ce33146186d554b0f5c41e4e13693614ce Author: Ingo Molnar Date: Mon May 4 18:54:32 2009 +0200 perf_counter: round-robin per-CPU counters too This used to be unstable when we had the rq->lock dependencies, but now that they are that of the past we can turn on percpu counter RR too. [ Impact: handle counter over-commit for per-CPU counters too ] LKML-Reference: Signed-off-by: Ingo Molnar commit 8560b9321f9050968f393ce1ec67e47c1a0bd5cf Merge: 72e3198 6574612 Author: Takashi Iwai Date: Mon May 4 16:05:23 2009 +0200 Merge branch 'fix/asoc' into topic/asoc commit b0ec3a30bc01c15cc6277b223fae136f7b71e90c Author: Krzysztof Helt Date: Sun May 3 10:39:19 2009 +0200 ALSA: sc6000: enable joystick port Add module parameter to enable or disable joystick port (gameport) on the SC6600 and later cards. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai commit 514bf54cd8c7f172816d3c003a6d022e9165a29b Author: James Gardiner Date: Sun May 3 04:00:44 2009 -0400 ALSA: hda - Addition for HP dv4-1222nr laptop support Signed-off-by: James Gardiner Signed-off-by: Takashi Iwai commit 25483efeb2e56521e418a59fa93401be156dc3bb Author: Paul Mundt Date: Sun May 3 18:29:27 2009 +0900 sh: Move dummy clockevents broadcast timer to its new home. The old arch/sh/kernel/timers/ directly will be going away completely once the rest of the TMU users are migrated, so move the dummy broadcast driver up a level in preparation. Signed-off-by: Paul Mundt commit dec56e6312434b2536fedf9d7e9e73d666aaf0a8 Author: Paul Mundt Date: Sun May 3 18:18:14 2009 +0900 sh: Kill off the now unused ARCH_USES_GETTIMEOFFSET code. Now that the stragglers (MTU2/CMT/etc.) have been rewritten and we are selecting both GENERIC_TIME and GENERIC_CLOCKEVENTS, the get_offset() timer op is completely unused. As a result, we are now able to kill off the ARCH_USES_GETTIMEOFFSET references. Signed-off-by: Paul Mundt commit 938edae11ee3a7b20b6d754074a0f2c2edc4534b Author: Paul Mundt Date: Sun May 3 18:12:26 2009 +0900 sh: select both GENERIC_TIME and GENERIC_CLOCKEVENTS. Now that the rest of the timers that didn't support clockevents have been rewritten, both of these can be enabled by default. Signed-off-by: Paul Mundt commit d1fcc0a8db5e47c1abaa783a3e83dbf5f2184969 Author: Paul Mundt Date: Sun May 3 18:05:42 2009 +0900 clocksource: sh_mtu2/cmt_register() should be static. Neither of these need to be exported, so just make them static. Signed-off-by: Paul Mundt commit 46a12f7426d71cabc08972cf8d3ffdd441d26a3a Author: Paul Mundt Date: Sun May 3 17:57:17 2009 +0900 sh: Consolidate MTU2/CMT/TMU timer platform data. All of the SH timers use a roughly identical structure for platform data, which presently is broken out for each block. Consolidate all of these definitions, as there is no reason for them to be broken out in the first place. Signed-off-by: Paul Mundt commit 9a8709d44139748fe2e0ab56d20d8c384c8b65ad Author: Cyrill Gorcunov Date: Sat May 2 00:25:11 2009 +0400 x86: uv - prevent NULL dereference in uv_system_init() We may reach NULL dereference oops if kmalloc failed. Prevent it with explicit BUG_ON. [ Impact: more controlled assert in 'impossible' scenario ] Signed-off-by: Cyrill Gorcunov Acked-by: Jack Steiner LKML-Reference: <20090501202511.GE4633@lenovo> Signed-off-by: Ingo Molnar commit d43a41bf8b504a1d9f0b4ce7e17d803f4ef39d84 Author: Magnus Damm Date: Fri May 1 06:58:52 2009 +0000 sh: TMU platform data for sh7722 This patch adds TMU platform data for sh7722. Only clockevent mode is enabled for now, clocksource requires this patch: "clocksource: setup mult_orig in clocksource_enable()" Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 9570ef20423b549757aa484ad388f9a7d5bdc4d9 Author: Magnus Damm Date: Fri May 1 06:51:00 2009 +0000 clocksource: SuperH TMU Timer driver This patch adds a TMU driver for the SuperH architecture. The TMU driver is a platform driver with early platform support to allow using a TMU channel as clockevent or clocksource during system bootup or later. Clocksource or clockevent can be selected. Both periodic and oneshot clockevents are supported. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 3969c52d4d2fef5a4b9e3ab0e51b3901e1cc8b83 Author: Jaswinder Singh Rajput Date: Sun May 3 11:11:35 2009 +0530 x86: cpufeature.h fix name for X86_FEATURE_MCE X86_FEATURE_MCE = Machine Check Exception X86_FEATURE_MCA = Machine Check Architecture [ Impact: cleanup ] Signed-off-by: Jaswinder Singh Rajput LKML-Reference: <1241329295.6321.1.camel@localhost.localdomain> Signed-off-by: Ingo Molnar commit 3280c8865e1b738604bacdea54738acef31e8c12 Author: Magnus Damm Date: Thu Apr 30 07:12:09 2009 +0000 sh: remove old MTU2 driver This patch removes the old MTU2 driver (CONFIG_SH_MTU2/timer-mtu2.c) As replacement, select the sh_cmt driver with CONFIG_SH_TIMER_MTU2 and configure timer channel using platform data. If multiple MTU channels are enabled using platform data, use the earlytimer parameter on the kernel command line to select channel. For instance, use "earlytimer=sh_mtu2.0" to select the first channel. To verify which timer is being used, look at printouts or the timer irq count in /proc/interrupts. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 1cbac972ba28e706fa9ce4d4c81830040bc811ee Author: Cyrill Gorcunov Date: Sat May 2 13:39:56 2009 +0400 x86: uv io-apic - use BUILD_BUG_ON instead of BUG_ON The expression is known to be true/false at compilation time so we're allowed to use build-time instead of run-time check. Also align 'entry' items assignment. [ Impact: shrink kernel a bit, cleanup ] Signed-off-by: Cyrill Gorcunov Cc: Jack Steiner LKML-Reference: <20090502093956.GB4791@lenovo> Signed-off-by: Ingo Molnar commit da107c6ef919b3afd9c9b405a4f71e03b5725b04 Author: Magnus Damm Date: Thu Apr 30 07:06:26 2009 +0000 sh: sh2a MTU2 platform data This patch adds MTU2 platform data for the following cpus: - sh7201 (3/5 channels) - sh7203/sh7263 (2/4 channels) - sh7206 (3/5 channels) - MXG (3/5 channels) Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit d5ed4c2e5ce9f5f6fd6a5a39ee1196a1f8a46eed Author: Magnus Damm Date: Thu Apr 30 07:02:49 2009 +0000 clocksource: SuperH MTU2 Timer driver This patch adds a MTU2 driver for the SuperH architecture. The MTU2 driver is a platform driver with early platform support to allow using a MTU2 channel as only clockevent during system bootup. Clocksource on sh2a is currently unsupported due to code generation issues with 64-bit math, so at this point only periodic clockevent support is in place. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 7563431107f6debf57c1dbecfb9498cf31a1c036 Author: john stultz Date: Fri May 1 13:10:28 2009 -0700 time: sh: convert to use arch_getoffset() infrastructure Convert sh to use GENERIC_TIME via the arch_getoffset() infrastructure. Signed-off-by: John Stultz Signed-off-by: Andrew Morton Signed-off-by: Paul Mundt commit d80498398276ca8eee7ebdbe0d47e06d01317439 Author: Thomas Gleixner Date: Sat May 2 20:01:20 2009 +0000 sh: remove obsolete hw_interrupt_type Impact: cleanup Convert the last remaining users to struct irq_chip and remove the define. Signed-off-by: Thomas Gleixner Signed-off-by: Paul Mundt commit 0cd5f7b0c7fd96f9f00187ef2ad2328de28ae326 Author: Thomas Gleixner Date: Sat May 2 20:00:44 2009 +0000 sh: remove obsolete no_irq_type Impact: cleanup convert the last remaining users to no_irq_chip Signed-off-by: Thomas Gleixner Signed-off-by: Paul Mundt commit 66fdc951720406deb3b0f17094cb16ec623f525d Merge: f425752 7d27558 Author: Paul Mundt Date: Sun May 3 17:24:55 2009 +0900 Merge branch 'timers/clocksource' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip commit a454ab3110175d710f4f9a96226a26ce4d5d5de2 Author: Ingo Molnar Date: Sun May 3 10:09:03 2009 +0200 x86, mm: fault.c, use printk_once() in is_errata93() Andrew pointed out that the 'once' variable has a needlessly function-global scope. We can in fact eliminate it completely, via the use of printk_once(). [ Impact: cleanup ] Reported-by: Andrew Morton Cc: Linus Torvalds Signed-off-by: Ingo Molnar commit dab6f6a3401f596fe934f41fc5da3f401adfdfb1 Author: Mike Galbraith Date: Sat May 2 08:02:36 2009 +0200 perf_counter tools: fix build error ctype.h crawled out of the bit bucket :) Signed-off-by: Ingo Molnar commit 955ce5f5be67dfe0d1d096b543af33fe8a1ce3dd Author: Aneesh Kumar K.V Date: Sat May 2 20:35:09 2009 -0400 ext4: Convert ext4_lock_group to use sb_bgl_lock We have sb_bgl_lock() and ext4_group_info.bb_state bit spinlock to protech group information. The later is only used within mballoc code. Consolidate them to use sb_bgl_lock(). This makes the mballoc.c code much simpler and also avoid confusion with two locks protecting same info. Signed-off-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" commit eefd7f03b86b8a319890e7fac5a6fcc7f8694b76 Author: Theodore Ts'o Date: Sat May 2 19:05:37 2009 -0400 ext4: fix the length returned by fiemap for an unallocated extent If the file's blocks have not yet been allocated because of delayed allocation, the length of the extent returned by fiemap is incorrect. This commit fixes this bug. Signed-off-by: "Theodore Ts'o" commit 4072604b9dd18f25a98cc0f4d3d4553ed1ad4152 Author: Mark Brown Date: Sat May 2 12:28:25 2009 +0100 ASoC: Remove unused DAI format defines The defines for TDM and synchronous clocks are not used - they are mostly a legacy of the automatic clocking configuration. TDM will require configuration of the number of timeslots and which ones to use so can't be fit into the DAI format and synchronous mode is handled by symmetric_rates (and needs to be done by constraints rather than when the DAI format is being configured). Signed-off-by: Mark Brown commit 33f503c96c976fd585dedb76514ca6cb286e60d9 Author: Mark Brown Date: Sat May 2 12:24:55 2009 +0100 ASoC: Use a shared define for AC97 CODEC data formats The AC97 wire format is completely fixed so CODECs don't have any choice about the formats they accept but controllers accept a variety of data formats and render them down onto the bus. Have a shared define so all the CODEC drivers will interoperate with any of our controller drivers. Signed-off-by: Mark Brown commit 7d27558c4138ac6b3684dea35c2f4379b940a7dd Author: john stultz Date: Fri May 1 13:10:26 2009 -0700 timekeeping: create arch_gettimeoffset infrastructure Some arches don't supply their own clocksource. This is mainly the case in architectures that get their inter-tick times by reading the counter on their interval timer. Since these timers wrap every tick, they're not really useful as clocksources. Wrapping them to act like one is possible but not very efficient. So we provide a callout these arches can implement for use with the jiffies clocksource to provide finer then tick granular time. [ Impact: ease the migration to generic time keeping ] Signed-off-by: John Stultz Signed-off-by: Andrew Morton Signed-off-by: Thomas Gleixner commit a25cbd045a2ffc42787d4dbcbb9c7118f5f42732 Author: Magnus Damm Date: Fri May 1 14:45:46 2009 +0900 clocksource: setup mult_orig in clocksource_enable() Setup clocksource mult_orig in clocksource_enable(). Clocksource drivers can save power by using keeping the device clock disabled while the clocksource is unused. In practice this means that the enable() and disable() callbacks perform clk_enable() and clk_disable(). The enable() callback may also use clk_get_rate() to get the clock rate from the clock framework. This information can then be used to calculate the shift and mult variables. Currently the mult_orig variable is setup from mult at registration time only. This is conflicting with the above case since the clock is disabled and the mult variable is not yet calculated at the time of registration. Moving the mult_orig setup code to clocksource_enable() allows us to both handle the common case with no enable() callback and the mult-changed-after-enable() case. [ Impact: allow dynamic clock source usage ] Signed-off-by: Magnus Damm LKML-Reference: <20090501054546.8193.10688.sendpatchset@rx1.opensource.se> Signed-off-by: Thomas Gleixner commit c9877b205f6ce7943bb95281342f4001cc1c00ec Author: Eric Sandeen Date: Fri May 1 23:32:06 2009 -0400 ext4: fix for fiemap last-block test Carl Henrik Lunde reported and debugged this; the test for the last allocated block was comparing bytes to blocks in this test: if (logical + length - 1 == EXT_MAX_BLOCK || ext4_ext_next_allocated_block(path) == EXT_MAX_BLOCK) flags |= FIEMAP_EXTENT_LAST; so any extent which ended right at 4G was stopping the extent walk. Just replacing these values with the extent block & length should fix it. Also give blksize_bits a saner type, and reverse the order of the tests to make the more likely case tested first. Signed-off-by: Eric Sandeen Reported-by: Carl Henrik Lunde Tested-by: Carl Henrik Lunde Signed-off-by: "Theodore Ts'o" commit 19ba0559f9ce104171ab16706893ce01f03ef116 Author: Aneesh Kumar K.V Date: Wed May 13 18:12:05 2009 -0400 vfs: Enable FS_IOC_FIEMAP and FIGETBSZ for all filetypes The fiemap and get_blk_size ioctls should be enabled even for directories. So move it outisde file_ioctl. Signed-off-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" commit abc8746eb91fb01e8d411896f80f7687c0d8372e Author: Aneesh Kumar K.V Date: Sat May 2 22:54:32 2009 -0400 ext4: hook fiemap operation for directories Add fiemap callback for directories Signed-off-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" commit f40339031b04279c3fdde7ac5fe97db33b2a7694 Author: Curt Wohlgemuth Date: Fri May 1 20:27:20 2009 -0400 ext4: Make the length of the mb_history file tunable In memory-constrained systems with many partitions, the ~68K for each partition for the mb_history buffer can be excessive. This patch adds a new mount option, mb_history_length, as well as a way of setting the default via a module parameter (or via a sysfs parameter in /sys/module/ext4/parameter/default_mb_history_length). If the mb_history_length is set to zero, the mb_history facility is disabled entirely. Signed-off-by: Curt Wohlgemuth Signed-off-by: "Theodore Ts'o" commit bb23c20a851a5038b255a3c0d0aa56093c1da3f8 Author: Theodore Ts'o Date: Fri May 1 19:44:44 2009 -0400 ext4: Move fs/ext4/group.h into ext4.h Move the function prototypes in group.h into ext4.h so they are all defined in one place. Signed-off-by: "Theodore Ts'o" commit 6f0aced639d346e5f54eea9fcb2784b633493d09 Author: Cyrill Gorcunov Date: Fri May 1 23:54:25 2009 +0400 x86, apic: use pr_ macro Replace recenly appeared printk with pr_ macro (the file already use a lot of them). [ Impact: cleanup ] Signed-off-by: Cyrill Gorcunov LKML-Reference: <20090501195425.GB4633@lenovo> Signed-off-by: Ingo Molnar commit 596397b77c895d0fa3674f579c94ad5ea88ef01d Author: Theodore Ts'o Date: Fri May 1 13:49:15 2009 -0400 ext4: Move fs/ext4/namei.h into ext4.h The fs/ext4/namei.h header file had only a single function declaration, and should have never been a standalone file. Move it into ext4.h, where should have been from the beginning. Signed-off-by: "Theodore Ts'o" commit ca0faba0e8ac844dc0279825eb8db876b5962ea5 Author: Theodore Ts'o Date: Sun May 3 16:33:44 2009 -0400 ext4: Move the ext4_sb.h header file into ext4.h There is no longer a reason for a separate ext4_sb.h header file, so move it into ext4.h just to make life easier for developers to find the relevant data structures and typedefs. Should also speed up compiles slightly, too. Signed-off-by: "Theodore Ts'o" commit d444c3c38189b3f18337a213855ac1c07af4e2d9 Author: Theodore Ts'o Date: Fri May 1 13:44:33 2009 -0400 ext4: Move the ext4_i.h header file into ext4.h There is no longer a reason for a separate ext4_i.h header file, so move it into ext4.h just to make life easier for developers to find the relevant data structures and typedefs. Should also speed up compiles slightly, too. Signed-off-by: "Theodore Ts'o" commit 4420471f14b79f2a42e4603be7794ea49b68bca4 Merge: 15e957d e0e4214 Author: Ingo Molnar Date: Fri May 1 19:02:50 2009 +0200 Merge branch 'x86/apic' into irq/numa Conflicts: arch/x86/kernel/apic/io_apic.c Merge reason: non-trivial interaction between ongoing work in io_apic.c and the NUMA migration feature in the irq tree. Signed-off-by: Ingo Molnar commit 15e957d08dd4a841359cfec59ecb74041e0097aa Author: Yinghai Lu Date: Thu Apr 30 01:17:50 2009 -0700 x86/irq: use move_irq_desc() in create_irq_nr() move_irq_desc() will try to move irq_desc to the home node if the allocated one is not correct, in create_irq_nr(). ( This can happen on devices that are on different nodes that are using MSI, when drivers are loaded and unloaded randomly. ) v2: fix non-smp build v3: add NUMA_IRQ_DESC to eliminate #ifdefs [ Impact: improve irq descriptor locality on NUMA systems ] Signed-off-by: Yinghai Lu Cc: Andrew Morton Cc: Suresh Siddha Cc: "Eric W. Biederman" Cc: Rusty Russell LKML-Reference: <49F95EAE.2050903@kernel.org> Signed-off-by: Ingo Molnar commit 75507efb1372b6acf1aa6bf00ebd49ce196fd994 Author: Theodore Ts'o Date: Fri May 1 12:58:36 2009 -0400 ext4: Don't avoid using BLOCK_UNINIT block groups in mballoc By avoiding the use of not-yet-used block groups (i.e., block groups with the BLOCK_UNINIT flag), mballoc had a tendency to create large files with large non-contiguous gaps. In addition avoiding the use of new block groups had a tendency to push regular file data into the first block group in a flex_bg group, which slows down the speed of e2fsck pass 2, since it has a tendency to seek much more. For example: Before Patch After Patch Time in seconds Time in seconds Real / User/ Sys MB/s Real / User/ Sys MB/s Pass 1 8.52 / 2.21 / 0.46 20.43 8.84 / 4.97 / 1.11 19.68 Pass 2 21.16 / 1.02 / 1.86 11.30 6.54 / 1.77 / 1.78 36.39 Pass 3 0.01 / 0.00 / 0.00 139.00 0.01 / 0.01 / 0.00 128.90 Pass 4 0.16 / 0.15 / 0.00 0.00 0.17 / 0.17 / 0.00 0.00 Pass 5 2.52 / 1.99 / 0.09 0.79 2.31 / 1.78 / 0.06 0.86 Total 32.40 / 5.11 / 2.49 12.81 17.99 / 8.75 / 2.98 23.01 This was on a sample 80 gig root filesystem which was approximately 50% full. Note the improved e2fsck pass 2 performance, by over a factor of 3, due to a decreased number of seeks. (The total amount of I/O in pass 2 was unchanged; the layout of the directory blocks was simply much better from e2fsck's's perspective.) Other changes as a result of this patch on this sample filesystem: Before Patch After Patch # of non-contig files 762 779 # of non-contig directories 571 570 # of BLOCK_UNINIT bg's 307 293 # of INODE_UNINIT bg's 503 503 Out of 640 block groups, of which 333 were in use, this patch caused an extra 14 block groups to be utilized. The number of non-contiguous files did go up slightly, but when measured against the 99.9% of the files (603,154) which were contiguously allocated, this is pretty insignificant. Signed-off-by: "Theodore Ts'o" Signed-off-by: Andreas Dilger commit 4ba67c1d48aeedcc31630bb40b6179fc7d360f90 Author: Thomas Gleixner Date: Fri May 1 18:48:06 2009 +0200 perfcounter tools: get the syscall number from arch/*/include/asm/unistd.h Avoid further confusion during development Signed-off-by: Thomas Gleixner commit 7bd5469cd938eec6a76b3135e6becd9b5e096e98 Author: Thomas Gleixner Date: Fri May 1 18:42:47 2009 +0200 perfcounter tools: fix pointer mismatch Neither process_options nor execvp take an const **char as argument. Signed-off-by: Thomas Gleixner commit a92e70237c8abbd1c3241133bf72f2cd07c90eae Author: Thomas Gleixner Date: Fri May 1 18:39:47 2009 +0200 perfcounter tools: make rdclock an inline function Signed-off-by: Thomas Gleixner commit 6eda5838bc5771578986429cde4a0870e1e5f5e1 Author: Thomas Gleixner Date: Fri May 1 18:29:57 2009 +0200 perfcounter tools: move common defines ... to local header file No change, move of duplicated stuff only. Signed-off-by: Thomas Gleixner commit 3666932bf2212a8fa77e344c5d946e86787bdbbe Author: Thomas Gleixner Date: Fri May 1 17:37:51 2009 +0200 perf_counter tools: remove build generated files These files are generated during the build process. No need to have them in the git repository. Signed-off-by: Thomas Gleixner commit e0202f56a82cd1170c6f1c520db669431cf26ddc Author: Ingo Molnar Date: Fri May 1 16:51:44 2009 +0200 perf_counter tools: fix x86 syscall numbers Signed-off-by: Ingo Molnar commit 9ee1983c9aa18f12388ef660d0c76a23dc112959 Author: Jason Baron Date: Thu Apr 30 13:29:47 2009 -0400 tracing: add irq tracepoint documentation Document irqs for the newly created docbook. [ Impact: add documentation ] Signed-off-by: Jason Baron Acked-by: Randy Dunlap Cc: akpm@linux-foundation.org Cc: rostedt@goodmis.org Cc: fweisbec@gmail.com Cc: mathieu.desnoyers@polymtl.ca Cc: wcohen@redhat.com LKML-Reference: <73ff42be3420157667ec548e9b0e409c3cfad05f.1241107197.git.jbaron@redhat.com> Signed-off-by: Ingo Molnar commit a76f8c6da1e48fd4ef025f42c736389532ff30ba Author: Jason Baron Date: Thu Apr 30 13:29:42 2009 -0400 tracing: add new tracepoints docbook Add tracepoint docbook. This will help us document and understand what tracepoints are in the kernel. Since there are multiple macros, and files that contain tracepoints. [ Impact: add documentation ] Signed-off-by: Jason Baron Acked-by: Randy Dunlap Cc: akpm@linux-foundation.org Cc: rostedt@goodmis.org Cc: fweisbec@gmail.com Cc: mathieu.desnoyers@polymtl.ca Cc: wcohen@redhat.com LKML-Reference: <84160b6bd94aff02455da7e12bad054d34c579a0.1241107197.git.jbaron@redhat.com> Signed-off-by: Ingo Molnar commit 56afb0f8823650f53a5f0e96d69a282e8892c61b Author: Jason Baron Date: Thu Apr 30 13:29:36 2009 -0400 kerneldoc, tracing: make kernel-doc understand TRACE_EVENT() macro (take #2) Add support to kernel-doc for tracepoint comments above TRACE_EVENT() macro definitions. Paves the way for tracepoint docbook. [ Impact: extend DocBook infrastructure ] Signed-off-by: Jason Baron Acked-by: Randy Dunlap Cc: akpm@linux-foundation.org Cc: rostedt@goodmis.org Cc: fweisbec@gmail.com Cc: mathieu.desnoyers@polymtl.ca Cc: wcohen@redhat.com LKML-Reference: Signed-off-by: Ingo Molnar commit e5791a808ae91a9e7e1b65ea9b8de0f96a043d88 Author: Peter Zijlstra Date: Fri May 1 12:23:19 2009 +0200 perf_counter: documentation update Update the documentation to reflect the current state of affairs [ Impact: documentation update ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090501102533.296727903@chello.nl> Signed-off-by: Ingo Molnar commit 585e3374d9d29376c2c37d821c8b7637dd48ca95 Author: Peter Zijlstra Date: Fri May 1 12:23:18 2009 +0200 perf_counter: tool: handle 0-length data files Avoid perf-report barfing on 0-length data files. [ Impact: fix perf-report SIGBUS ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090501102533.196245693@chello.nl> Signed-off-by: Ingo Molnar commit 63a809a2dc53b91268dd915bbcbd425063893676 Author: Peter Zijlstra Date: Fri May 1 12:23:17 2009 +0200 perf_counter: fix nmi-watchdog interaction When we don't have any perf-counters active, don't act like we know what the NMI is for. [ Impact: fix hard hang with nmi_watchdog=2 ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090501102533.109867793@chello.nl> Signed-off-by: Ingo Molnar commit c33a0bc4e41ef169d6e807d8abb9502544b518e5 Author: Peter Zijlstra Date: Fri May 1 12:23:16 2009 +0200 perf_counter: fix race in perf_output_* When two (or more) contexts output to the same buffer, it is possible to observe half written output. Suppose we have CPU0 doing perf_counter_mmap(), CPU1 doing perf_counter_overflow(). If CPU1 does a wakeup and exposes head to user-space, then CPU2 can observe the data CPU0 is still writing. [ Impact: fix occasionally corrupted profiling records ] Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090501102533.007821627@chello.nl> Signed-off-by: Ingo Molnar commit 78a3d9d5654a7fd99cf8b2ab06b9497b9c7aad64 Author: Oleg Nesterov Date: Wed Apr 29 18:01:23 2009 +0200 do_wait: do take security_task_wait() into account I was never able to understand what should we actually do when security_task_wait() fails, but the current code doesn't look right. If ->task_wait() returns the error, we update *notask_error correctly. But then we either reap the child (despite the fact this was forbidden) or clear *notask_error (and hide the securiy policy problems). This patch assumes that "stolen by ptrace" doesn't matter. If selinux denies the child we should ignore it but make sure we report -EACCESS instead of -ECHLD if there are no other eligible children. Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Signed-off-by: James Morris commit 3c56999eec7acc105a31b4546c94aad2fb844b13 Merge: bad7600 12d1611 Author: Thomas Gleixner Date: Thu Apr 30 21:12:13 2009 +0200 Merge branch 'core/signal' into perfcounters/core This is necessary to avoid the conflict of syscall numbers. Conflicts: arch/x86/ia32/ia32entry.S arch/x86/include/asm/unistd_32.h arch/x86/include/asm/unistd_64.h Fixes up the borked syscall numbers of perfcounters versus preadv/pwritev as well. Signed-off-by: Thomas Gleixner commit 420118caa32c8ccdf9fce5a623b9de3f951573c5 Author: Louis Rilling Date: Wed Jan 28 19:18:33 2009 +0100 configfs: Rework configfs_depend_item() locking and make lockdep happy configfs_depend_item() recursively locks all inodes mutex from configfs root to the target item, which makes lockdep unhappy. The purpose of this recursive locking is to ensure that the item tree can be safely parsed and that the target item, if found, is not about to leave. This patch reworks configfs_depend_item() locking using configfs_dirent_lock. Since configfs_dirent_lock protects all changes to the configfs_dirent tree, and protects tagging of items to be removed, this lock can be used instead of the inodes mutex lock chain. This needs that the check for dependents be done atomically with CONFIGFS_USET_DROPPING tagging. Now lockdep looks happy with configfs. [ Lifted the setting of s_type into configfs_new_dirent() to satisfy the atomic setting of CONFIGFS_USET_CREATING -- Joel ] Signed-off-by: Louis Rilling Signed-off-by: Joel Becker commit e74cc06df3b05e2b2c1611a043f6e6dcadaab1eb Author: Louis Rilling Date: Wed Jan 28 19:18:32 2009 +0100 configfs: Silence lockdep on mkdir() and rmdir() When attaching default groups (subdirs) of a new group (in mkdir() or in configfs_register()), configfs recursively takes inode's mutexes along the path from the parent of the new group to the default subdirs. This is needed to ensure that the VFS will not race with operations on these sub-dirs. This is safe for the following reasons: - the VFS allows one to lock first an inode and second one of its children (The lock subclasses for this pattern are respectively I_MUTEX_PARENT and I_MUTEX_CHILD); - from this rule any inode path can be recursively locked in descending order as long as it stays under a single mountpoint and does not follow symlinks. Unfortunately lockdep does not know (yet?) how to handle such recursion. I've tried to use Peter Zijlstra's lock_set_subclass() helper to upgrade i_mutexes from I_MUTEX_CHILD to I_MUTEX_PARENT when we know that we might recursively lock some of their descendant, but this usage does not seem to fit the purpose of lock_set_subclass() because it leads to several i_mutex locked with subclass I_MUTEX_PARENT by the same task. >From inside configfs it is not possible to serialize those recursive locking with a top-level one, because mkdir() and rmdir() are already called with inodes locked by the VFS. So using some mutex_lock_nest_lock() is not an option. I am proposing two solutions: 1) one that wraps recursive mutex_lock()s with lockdep_off()/lockdep_on(). 2) (as suggested earlier by Peter Zijlstra) one that puts the i_mutexes recursively locked in different classes based on their depth from the top-level config_group created. This induces an arbitrary limit (MAX_LOCK_DEPTH - 2 == 46) on the nesting of configfs default groups whenever lockdep is activated but this limit looks reasonably high. Unfortunately, this also isolates VFS operations on configfs default groups from the others and thus lowers the chances to detect locking issues. Nobody likes solution 1), which I can understand. This patch implements solution 2). However lockdep is still not happy with configfs_depend_item(). Next patch reworks the locking of configfs_depend_item() and finally makes lockdep happy. [ Note: This hides a few locking interactions with the VFS from lockdep. That was my big concern, because we like lockdep's protection. However, the current state always dumps a spurious warning. The locking is correct, so I tell people to ignore the warning and that we'll keep our eyes on the locking to make sure it stays correct. With this patch, we eliminate the warning. We do lose some of the lockdep protections, but this only means that we still have to keep our eyes on the locking. We're going to do that anyway. -- Joel ] Signed-off-by: Louis Rilling Signed-off-by: Joel Becker commit bf293c17b26b8854241df08b9b63f7270cbde012 Author: Remis Lima Baima Date: Thu Apr 30 18:36:23 2009 +0200 x86: added 'ifndef _ASM_X86_IOMAP_H' to iomap.h iomap.h misses the include guards. [ Impact: cleanup ] Signed-off-by: Remis Lima Baima Signed-off-by: Arnd Bergmann LKML-Reference: <200904301836.23885.arnd@arndb.de> Signed-off-by: Ingo Molnar commit 12d161147f828192b5bcc33166f468a827832767 Author: Thomas Gleixner Date: Sat Apr 4 21:01:10 2009 +0000 x86: hookup sys_rt_tgsigqueueinfo Make the new sys_rt_tgsigqueueinfo available for x86. Signed-off-by: Thomas Gleixner commit 62ab4505e3efaf67784f84059e0fb9cedb1728ea Author: Thomas Gleixner Date: Sat Apr 4 21:01:06 2009 +0000 signals: implement sys_rt_tgsigqueueinfo sys_kill has the per thread counterpart sys_tgkill. sigqueueinfo is missing a thread directed counterpart. Such an interface is important for migrating applications from other OSes which have the per thread delivery implemented. Signed-off-by: Thomas Gleixner Reviewed-by: Oleg Nesterov Acked-by: Roland McGrath Acked-by: Ulrich Drepper commit 30b4ae8a4498543863501f707879b7220b649602 Author: Thomas Gleixner Date: Sat Apr 4 21:01:01 2009 +0000 signals: split do_tkill Split out the code from do_tkill to make it reusable by the follow up patch which implements sys_rt_tgsigqueueinfo Signed-off-by: Thomas Gleixner Reviewed-by: Oleg Nesterov commit 03682411b1ccd38cbde2e9a6ab43884ff34fbefc Author: Anton Vorontsov Date: Thu Apr 30 18:38:01 2009 +0200 alim15x3: Remove historical hacks, re-enable init_hwif for PowerPC Some time ago we had to disable init_hwif callback for PowerPC builds. That was because of a historical IRQ overwrite in the driver, which was causing IDE malfunction on the MPC8610HPCD PowerPC boards. It's unclear whether this overwrite is still useful, but it is proven to cause a bit of harm, and today some PowerPC targets (Xilinx ML510, as reported by Roderick Colenbrander) need the init_hwif, so we have to re-enable it and remove the overwrite. Reported-by: Roderick Colenbrander Suggested-by: Bartlomiej Zolnierkiewicz Cc: Benjamin Herrenschmidt Signed-off-by: Anton Vorontsov Signed-off-by: Bartlomiej Zolnierkiewicz commit 23a39eede5f04eb8c4e8d6622231d98fe46bdc65 Merge: b656eba 96c1674 Author: Bartlomiej Zolnierkiewicz Date: Thu Apr 30 18:28:35 2009 +0200 Merge branch 'for-linus' into for-next commit 71437552f2564c0d0c5cc4995045683051c5fe62 Author: Mark Brown Date: Thu Apr 30 13:42:04 2009 +0100 ASoC: Use platform device resource for S3C64xx IISv2 Signed-off-by: Mark Brown commit abbc82466967064e4eaafa367fc225a8c803569c Author: Mark Brown Date: Thu Apr 30 13:21:52 2009 +0100 ASoC: Staticise txctrl and rxctrl for S3C IISv2 They aren't used by anything external and aren't prototyped; if any users appear they can be exported again for them. Also report what modes we have a problem with when we encounter invalid mode configurations. Signed-off-by: Mark Brown commit 38e43c81a07de8ee8a757a9c93dd3a4937dd35e0 Author: Mark Brown Date: Thu Apr 30 13:14:38 2009 +0100 ASoC: Display S3C IISv2 mode and MS errors by default Signed-off-by: Mark Brown commit af3ea7bdc77be000f69a41e7c41060f72b5a7111 Author: Mark Brown Date: Thu Apr 30 13:13:55 2009 +0100 ASoC: Display the clock rate used as the basis for rate calculation Aids debugging. Signed-off-by: Mark Brown commit c86bde54062a4d02c1b58203b7802797e4007a8a Author: Mark Brown Date: Thu Apr 30 13:09:33 2009 +0100 ASoC: Allow use of resource from the platform device for S3C IISv2 Signed-off-by: Mark Brown commit 07736d48051869c37838635b41850618aa63b9a7 Author: Mark Brown Date: Thu Apr 30 13:13:14 2009 +0100 ASoC: Fix boot warnings from S3C IISv2 On startup we try to make sure that the port is quiesced but if the port is already stopped then this will generate a warning about the RX/TX mode configuration. Configure the mode before doing the teardown to suppress these warnings. Signed-off-by: Mark Brown commit 553b1dd58c5cf1abd6d0965041169400a3cff1ad Author: Mark Brown Date: Wed Apr 29 20:29:25 2009 +0100 ASoC: Fix data format configuration for S3C64xx IISv2 and add 24 bit The data format configuration for S3C64xx IISv2 is completely different to that for S3C24xx. Instead of a single bit configuration in bit 0 of IISMOD we have format selection in bits 13 and 14 and bit clock rate selection in bits 1 and 2. While we're here add support for 24 bit samples in S3C64xx. At some point it may be desirable to expose the bit clock rate selection to users but given the limited configuration options that may not be required. Signed-off-by: Mark Brown commit 51438449e717db54550b4676f38208092eb654da Author: Mark Brown Date: Wed Apr 29 20:30:39 2009 +0100 ASoC: Make S3C64xx clock export function to return struct clk This makes the interface usable with the s3c-iis-v2 rate calculator and consistent with S3C2412. Signed-off-by: Mark Brown commit 8a0f62b842e2f189e36d9f4c575ee15da9c605ff Author: Mark Brown Date: Wed Apr 29 20:28:47 2009 +0100 ASoC: Check for supported CPUs when building s3c-i2s-v2 Signed-off-by: Mark Brown commit 09aa60df92a9c5ff00e156c0dbc79f166d406a7f Author: Mark Brown Date: Wed Apr 29 18:51:48 2009 +0100 ASoC: Fix error message formatting in s3c64xx-i2s driver Signed-off-by: Mark Brown commit bad760089c1ef7fe525c0f268a4078b9cb483903 Author: Ingo Molnar Date: Thu Apr 30 14:14:37 2009 +0200 perf_counter tools: fix infinite loop in perf-report on zeroed event records Bail out early if a record has zero size - we have no chance to make reliable progress in that case. Print out the offset where this happens, and print the number of bytes we missed out on. Signed-off-by: Ingo Molnar commit 66cf782996f3d57d3cc199f0a2d47a54e2aa5991 Author: Ingo Molnar Date: Thu Apr 30 13:53:33 2009 +0200 perf_counter tools: perf stat: make -l default-on Turn on scaling display by default - this is less confusing. Signed-off-by: Ingo Molnar commit aac3f3c2c41ce49a6dbb98d9145265c00a964dc2 Author: Ingo Molnar Date: Thu Apr 30 13:52:19 2009 +0200 perf_counter tools: add perf-report to the Makefile Build it explicitly until it's a proper builtin command. Signed-off-by: Ingo Molnar commit 83c4832683bc8ebcd1687b3c0bf3ba1ab253dd4f Author: Sam Ravnborg Date: Thu Apr 30 12:03:16 2009 +0200 x86: boot/compressed/vmlinux.lds.S: fix build of bzImage with 64 bit compiler Jesper reported that he saw following build issue: > ld:arch/x86/boot/compressed/vmlinux.lds:9: syntax error > make[2]: *** [arch/x86/boot/compressed/vmlinux] Error 1 > make[1]: *** [arch/x86/boot/compressed/vmlinux] Error 2 > make: *** [bzImage] Error 2 CPP defines the symbol "i386" to "1". Undefine this to fix it. [ Impact: build fix with certain tool chains ] Reported-by: Jesper Dangaard Brouer Signed-off-by: Sam Ravnborg Cc: Linus Torvalds LKML-Reference: Signed-off-by: Ingo Molnar commit ba9c22f2c01cf5c88beed5a6b9e07d42e10bd358 Author: Darren Hart Date: Mon Apr 20 22:22:22 2009 -0700 futex: remove FUTEX_REQUEUE_PI (non CMP) The new requeue PI futex op codes were modeled after the existing FUTEX_REQUEUE and FUTEX_CMP_REQUEUE calls. I was unaware at the time that FUTEX_REQUEUE was only around for compatibility reasons and shouldn't be used in new code. Ulrich Drepper elaborates on this in his Futexes are Tricky paper: http://people.redhat.com/drepper/futex.pdf. The deprecated call doesn't catch changes to the futex corresponding to the destination futex which can lead to deadlock. Therefor, I feel it best to remove FUTEX_REQUEUE_PI and leave only FUTEX_CMP_REQUEUE_PI as there are not yet any existing users of the API. This patch does change the OP code value of FUTEX_CMP_REQUEUE_PI to 12 from 13. Since my test case is the only known user of this API, I felt this was the right thing to do, rather than leave a hole in the enumeration. I chose to continue using the _CMP_ modifier in the OP code to make it explicit to the user that the test is being done. Builds, boots, and ran several hundred iterations requeue_pi.c. Signed-off-by: Darren Hart LKML-Reference: <49ED580E.1050502@us.ibm.com> Signed-off-by: Thomas Gleixner commit 9518e0e4350a5ea8ca200ce320b28d6284a7b0ce Author: Pekka Enberg Date: Tue Apr 28 16:00:50 2009 +0300 x86: move per-cpu mmu_gathers to mm/init.c [ Impact: cleanup ] Signed-off-by: Pekka Enberg LKML-Reference: <1240923650.1982.22.camel@penberg-laptop> Signed-off-by: Ingo Molnar commit 2b72394e4089643f11669d9610907a1442fe044a Author: Pekka Enberg Date: Tue Apr 28 16:00:49 2009 +0300 x86: move max_pfn_mapped and max_low_pfn_mapped to setup.c This patch moves the max_pfn_mapped and max_low_pfn_mapped global variables to kernel/setup.c where they're initialized. [ Impact: cleanup ] Signed-off-by: Pekka Enberg LKML-Reference: <1240923649.1982.21.camel@penberg-laptop> Signed-off-by: Ingo Molnar commit a511e3f968c462a55ef58697257f5347c73d306e Author: Andrew Morton Date: Wed Apr 29 15:59:58 2009 -0700 mutex: add atomic_dec_and_mutex_lock(), fix include/linux/mutex.h:136: warning: 'mutex_lock' declared inline after being called include/linux/mutex.h:136: warning: previous declaration of 'mutex_lock' was here uninline it. [ Impact: clean up and uninline, address compiler warning ] Signed-off-by: Andrew Morton Cc: Al Viro Cc: Christoph Hellwig Cc: Eric Paris Cc: Paul Mackerras Cc: Peter Zijlstra LKML-Reference: <200904292318.n3TNIsi6028340@imap1.linux-foundation.org> Signed-off-by: Ingo Molnar commit c5dd016cdf0a040e1de0b691e274fbfe642b2cdc Author: Paul Mackerras Date: Thu Apr 30 09:48:16 2009 +1000 perf_counter: update copyright notice This adds my name to the list of copyright holders on the core perf_counter.c, since I have contributed a significant amount of the code in there. Signed-off-by: Paul Mackerras Cc: Peter Zijlstra Cc: Robert Richter LKML-Reference: <18936.59200.888049.746658@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit f425752fc66acf1d4e47970ea704ed7d31c14173 Author: Magnus Damm Date: Thu Apr 30 04:09:26 2009 +0000 sh: remove old CMT driver This patch removes the old CMT driver (CONFIG_SH_CMT/timer-cmt.c) As replacement, select the sh_cmt driver with CONFIG_SH_TIMER_CMT and configure timer channel using platform data. If multiple CMT channels are enabled using platform data, use the earlytimer parameter on the kernel command line to select channel. For instance, use "earlytimer=sh_cmt.0" to select the first channel. To verify which timer is being used, look at printouts or the timer irq count in /proc/interrupts. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 698aa99da5f5e2b4c666fd21ab77306f0225b8f5 Author: Magnus Damm Date: Thu Apr 30 04:08:18 2009 +0000 sh: sh2/sh2a 16-bit CMT platform data This patch adds 16-bit cmt platform data for the following cpus: - sh7619 (2 channels) - sh7203/sh7263 (2 channels) - sh7206 (2 channels) Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 3014f47460ecfb13d4169daae51f26a20bacfa17 Author: Magnus Damm Date: Wed Apr 29 14:50:37 2009 +0000 clocksource: sh_cmt 16-bit fixes This patch contains various fixes for 16-bit cmt hardware. With this applied periodic clockevents work fine on sh7203. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit e6be3a25861429166f945499c7ee616875bc3db9 Author: Magnus Damm Date: Thu Apr 30 12:56:37 2009 +0900 sh: pass through ioremap() for non-mmu processors. All 32-bit SuperH processors currently go through __ioremap_mode() and check for IO_TRAPPED and directly mapped segments. With this patch we simplify the MMU less case with a pass through version of __ioremap_mode() which just returns the physical address. The effects of this is change are: - fix non-MMU ioremap() of high address hardware blocks (sh7203 CMT) - make sure IO_TRAPPED is not selected Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit ecd6de3c88e8cbcad175b2eab48ba05c2014f7b6 Author: Oleg Nesterov Date: Wed Apr 29 16:02:24 2009 +0200 selinux: selinux_bprm_committed_creds() should wake up ->real_parent, not ->parent. We shouldn't worry about the tracer if current is ptraced, exec() must not succeed if the tracer has no rights to trace this task after cred changing. But we should notify ->real_parent which is, well, real parent. Also, we don't need _irq to take tasklist, and we don't need parent's ->siglock to wake_up_interruptible(real_parent->signal->wait_chldexit). Since we hold tasklist, real_parent->signal must be stable. Otherwise spin_lock(siglock) is not safe too and can't help anyway. Signed-off-by: Oleg Nesterov Signed-off-by: James Morris commit 3bcac0263f0b45e67a64034ebcb69eb9abb742f4 Author: David Howells Date: Wed Apr 29 13:45:05 2009 +0100 SELinux: Don't flush inherited SIGKILL during execve() Don't flush inherited SIGKILL during execve() in SELinux's post cred commit hook. This isn't really a security problem: if the SIGKILL came before the credentials were changed, then we were right to receive it at the time, and should honour it; if it came after the creds were changed, then we definitely should honour it; and in any case, all that will happen is that the process will be scrapped before it ever returns to userspace. Signed-off-by: David Howells Signed-off-by: Oleg Nesterov Signed-off-by: James Morris commit 88c48db9788862d0290831d081bc3c64e13b592f Author: Eric Paris Date: Wed Apr 29 14:00:25 2009 -0400 SELinux: drop secondary_ops->sysctl We are still calling secondary_ops->sysctl even though the capabilities module does not define a sysctl operation. Signed-off-by: Eric Paris Acked-by: Stephen Smalley Signed-off-by: James Morris commit 23b94b967f118bef941369238f33c8140be46539 Author: Luis Henriques Date: Wed Apr 29 21:54:51 2009 +0100 locking, rtmutex.c: Documentation cleanup Two minor updates on functions documentation: - Updated documentation for function rt_mutex_unlock(), which contained an incorrect name - Removed extra '*' from comment in function rt_mutex_destroy() [ Impact: cleanup ] Signed-off-by: Luis Henriques Cc: Steven Rostedt LKML-Reference: <20090429205451.GA23154@hades.domain.com> Signed-off-by: Ingo Molnar commit 43f6201a22dbf1c5abe1cab96b49bd56fa9df8f4 Author: Robert Richter Date: Wed Apr 29 16:55:56 2009 +0200 perf_counter, x86: rename bitmasks to ->used_mask and ->active_mask Standardize on explicitly mentioning '_mask' in fields that are not plain flags but masks. This avoids typos like: if (cpuc->used) (which could easily slip through review unnoticed), while if a typo looks like this: if (cpuc->used_mask) it might get noticed during review. [ Impact: cleanup ] Signed-off-by: Robert Richter Cc: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <1241016956-24648-1-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 0c8b946e3ebb3846103486420ea7430a4b5e5b1b Author: Frederic Weisbecker Date: Wed Apr 15 17:48:18 2009 +0200 vsprintf: introduce %pf format specifier A printf format specifier which would allow us to print a pure function name has been suggested by Andrew Morton a couple of months ago. The current %pF is very convenient to print a function symbol, but often we only want to print the name of the function, without its asm offset. That's what %pf does in this patch. The lowecase f has been chosen for its intuitive meaning of a 'weak kind of %pF'. The support for this new format would be welcome by the tracing code where the need to print pure function names is often needed. This is also true for other parts of the kernel: $ git-grep -E "kallsyms_lookup\(.+?\)" arch/blackfin/kernel/traps.c: symname = kallsyms_lookup(address, &symsize, &offset, &modname, namebuf); arch/powerpc/xmon/xmon.c: name = kallsyms_lookup(pc, &size, &offset, NULL, tmpstr); arch/sh/kernel/cpu/sh5/unwind.c: sym = kallsyms_lookup(pc, NULL, &offset, NULL, namebuf); arch/x86/kernel/ftrace.c: kallsyms_lookup((unsigned long) syscall, NULL, NULL, NULL, str); kernel/kprobes.c: sym = kallsyms_lookup((unsigned long)p->addr, NULL, kernel/lockdep.c: return kallsyms_lookup((unsigned long)key, NULL, NULL, NULL, str); kernel/trace/ftrace.c: kallsyms_lookup(rec->ip, NULL, NULL, NULL, str); kernel/trace/ftrace.c: kallsyms_lookup(rec->ip, NULL, NULL, NULL, str); kernel/trace/ftrace.c: kallsyms_lookup((unsigned long)rec->ops->func, NULL, NULL, NULL, str); kernel/trace/ftrace.c: kallsyms_lookup(rec->ip, NULL, NULL, NULL, str); kernel/trace/ftrace.c: kallsyms_lookup(rec->ip, NULL, NULL, NULL, str); kernel/trace/ftrace.c: kallsyms_lookup(rec->ip, NULL, NULL, &modname, str); kernel/trace/ftrace.c: kallsyms_lookup(*ptr, NULL, NULL, NULL, str); kernel/trace/trace_functions.c: kallsyms_lookup(ip, NULL, NULL, NULL, str); kernel/trace/trace_output.c: kallsyms_lookup(address, NULL, NULL, NULL, str); Changes in v2: - Add the explanation of the %pf role for vsnprintf() and bstr_printf() - Change the comments by dropping the "asm offset" notion and only define the %pf against the actual function offset notion. Signed-off-by: Frederic Weisbecker Acked-by: Mike Frysinger Cc: Linus Torvalds Cc: Zhaolei Cc: Tom Zanussi Cc: Li Zefan Cc: Andrew Morton Cc: Steven Rostedt LKML-Reference: <20090415154817.GC5989@nowhere> Signed-off-by: Ingo Molnar commit 6321e3ed2acf3ee9643cdd403e1c88605d7944ba Author: Christoph Hellwig Date: Tue Feb 24 08:39:02 2009 -0500 xfs: fix getbmap vs mmap deadlock xfs_getbmap (or rather the formatters called by it) copy out the getbmap structures under the ilock, which can deadlock against mmap. This has been reported via bugzilla a while ago (#717) and has recently also shown up via lockdep. So allocate a temporary buffer to format the kernel getbmap structures into and then copy them out after dropping the locks. A little problem with this is that we limit the number of extents we can copy out by the maximum allocation size, but I see no real way around that. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen Reviewed-by: Felix Blyakher Signed-off-by: Felix Blyakher commit 4be4a00fb55879ef44b5914c189aecffa828deb4 Author: Christoph Hellwig Date: Wed Apr 29 10:50:48 2009 -0400 xfs: a couple getbmap cleanups - reshuffle various conditionals for data vs attr fork to make the code more readable - do fine-grainded goto-based error handling - exit early from conditionals instead of keeping a long else branch around - allow kmem_alloc to fail Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen Reviewed-by: Felix Blyakher Signed-off-by: Felix Blyakher commit b1fca26631f76a5e8b18435a43f5d82b8734da4b Author: Eric Paris Date: Mon Mar 23 18:22:09 2009 +0100 mutex: add atomic_dec_and_mutex_lock() Much like the atomic_dec_and_lock() function in which we take an hold a spin_lock if we drop the atomic to 0 this function takes and holds the mutex if we dec the atomic to 0. Signed-off-by: Eric Paris Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Orig-LKML-Reference: <20090323172417.410913479@chello.nl> Signed-off-by: Ingo Molnar commit 2ac00af7a6d2e65013e6f28bd1f37c0cd98ba134 Author: Olaf Weber Date: Fri Apr 17 16:12:45 2009 -0500 xfs: add more checks to superblock validation There had been reports where xfs filesystem was randomly corrupted with fsfuzzer, and xfs failed to handle it gracefully. This patch fixes couple of reported problem by providing additional checks in the superblock validation routine. Signed-off-by: Olaf Weber Reviewed-by: Josef 'Jeff' Sipek Reviewed-by: Christoph Hellwig Signed-off-by: Felix Blyakher commit f25181f598cf4a8ccc40a51d8b74f8b555ecddee Author: Lachlan McIlroy Date: Thu Apr 23 22:18:00 2009 -0400 xfs_file_last_byte() needs to acquire ilock We had some systems crash with this stack: [] ia64_leave_kernel+0x0/0x280 [] xfs_bmbt_get_startoff+0x0/0x20 [xfs] [] xfs_bmap_last_offset+0x210/0x280 [xfs] [] xfs_file_last_byte+0x70/0x1a0 [xfs] [] xfs_itruncate_start+0xc0/0x1a0 [xfs] [] xfs_inactive_free_eofblocks+0x290/0x460 [xfs] [] xfs_release+0x1b0/0x240 [xfs] [] xfs_file_release+0x70/0xa0 [xfs] [] __fput+0x1a0/0x420 [] fput+0x40/0x60 The problem here is that xfs_file_last_byte() does not acquire the inode lock and can therefore race with another thread that is modifying the extext list. While xfs_bmap_last_offset() is trying to lookup what was the last extent some extents were merged and the extent list shrunk so the index we lookup is now beyond the end of the extent list and potentially in a freed buffer. Signed-off-by: Lachlan McIlroy Reviewed-by: Christoph Hellwig Reviewed-by: Felix Blyakher Signed-off-by: Felix Blyakher commit ab7ef2e50a557af92f4f90689f51fadadafc16b2 Author: Paul Mackerras Date: Wed Apr 29 22:38:51 2009 +1000 perf_counter: powerpc: allow use of limited-function counters POWER5+ and POWER6 have two hardware counters with limited functionality: PMC5 counts instructions completed in run state and PMC6 counts cycles in run state. (Run state is the state when a hardware RUN bit is 1; the idle task clears RUN while waiting for work to do and sets it when there is work to do.) These counters can't be written to by the kernel, can't generate interrupts, and don't obey the freeze conditions. That means we can only use them for per-task counters (where we know we'll always be in run state; we can't put a per-task counter on an idle task), and only if we don't want interrupts and we do want to count in all processor modes. Obviously some counters can't go on a limited hardware counter, but there are also situations where we can only put a counter on a limited hardware counter - if there are already counters on that exclude some processor modes and we want to put on a per-task cycle or instruction counter that doesn't exclude any processor mode, it could go on if it can use a limited hardware counter. To keep track of these constraints, this adds a flags argument to the processor-specific get_alternatives() functions, with three bits defined: one to say that we can accept alternative event codes that go on limited counters, one to say we only want alternatives on limited counters, and one to say that this is a per-task counter and therefore events that are gated by run state are equivalent to those that aren't (e.g. a "cycles" event is equivalent to a "cycles in run state" event). These flags are computed for each counter and stored in the counter->hw.counter_base field (slightly wonky name for what it does, but it was an existing unused field). Since the limited counters don't freeze when we freeze the other counters, we need some special handling to avoid getting skew between things counted on the limited counters and those counted on normal counters. To minimize this skew, if we are using any limited counters, we read PMC5 and PMC6 immediately after setting and clearing the freeze bit. This is done in a single asm in the new write_mmcr0() function. The code here is specific to PMC5 and PMC6 being the limited hardware counters. Being more general (e.g. having a bitmap of limited hardware counter numbers) would have meant more complex code to read the limited counters when freezing and unfreezing the normal counters, with conditional branches, which would have increased the skew. Since it isn't necessary for the code to be more general at this stage, it isn't. This also extends the back-ends for POWER5+ and POWER6 to be able to handle up to 6 counters rather than the 4 they previously handled. Signed-off-by: Paul Mackerras Acked-by: Peter Zijlstra Cc: Robert Richter LKML-Reference: <18936.19035.163066.892208@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 98144511427c192e4249ff66a3f9debc55c59411 Author: Ingo Molnar Date: Wed Apr 29 14:52:50 2009 +0200 perf_counter: add/update copyrights Acked-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 38105f0234d4795c77c7c6845916caf3a395c451 Author: Robert Richter Date: Wed Apr 29 12:47:26 2009 +0200 perf_counter: update 'perf top' documentation The documentation about the perf-top build was outdated after perfstat has been implemented. This updates it. [ Impact: update documentation ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-30-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 19d84dab55a383d75c885b5c1a618f5ead96f2f6 Author: Robert Richter Date: Wed Apr 29 12:47:25 2009 +0200 perf_counter, x86: remove unused function argument in intel_pmu_get_status() The mask argument is unused and thus can be removed. [ Impact: cleanup ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-29-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit ef7b3e09ffdcd5200aea9523f6b56d331d1c4fc0 Author: Robert Richter Date: Wed Apr 29 12:47:24 2009 +0200 perf_counter, x86: remove vendor check in fixed_mode_idx() The function fixed_mode_idx() is used generically. Now it checks the num_counters_fixed value instead of the vendor to decide if fixed counters are present. [ Impact: generalize code ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-28-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit c619b8ffb1cec6a431687a35695dc6fd292a79e6 Author: Robert Richter Date: Wed Apr 29 12:47:23 2009 +0200 perf_counter, x86: introduce max_period variable In x86 pmus the allowed counter period to programm differs. This introduces a max_period value and allows the generic implementation for all models to check the max period. [ Impact: generalize code ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-27-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 4b7bfd0d276da3a006d37e85d3cf900d7a14ae2a Author: Robert Richter Date: Wed Apr 29 12:47:22 2009 +0200 perf_counter, x86: return raw count with x86_perf_counter_update() To check on AMD cpus if a counter overflows, the upper bit of the raw counter value must be checked. This value is already internally available in x86_perf_counter_update(). Now, the value is returned so that it can be used directly to check for overflows. [ Impact: micro-optimization ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-26-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit a29aa8a7ff93e4196d558036928597e68337dd8d Author: Robert Richter Date: Wed Apr 29 12:47:21 2009 +0200 perf_counter, x86: implement the interrupt handler for AMD cpus This patch implements the interrupt handler for AMD performance counters. In difference to the Intel pmu, there is no single status register and also there are no fixed counters. This makes the handler very different and it is useful to make the handler vendor specific. To check if a counter is overflowed the upper bit of the counter is checked. Only counters where the active bit is set are checked. With this patch throttling is enabled for AMD performance counters. This patch also reenables Linux performance counters on AMD cpus. [ Impact: re-enable perfcounters on AMD CPUs ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-25-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 85cf9dba92152bb4edec118b2f4f0be1ae7fdcab Author: Robert Richter Date: Wed Apr 29 12:47:20 2009 +0200 perf_counter, x86: change and remove pmu initialization checks Some functions are only called if the pmu was proper initialized. That initalization checks can be removed. The way to check initialization changed too. Now, the pointer to the interrupt handler is checked. If it exists the pmu is initialized. This also removes a static variable and uses struct x86_pmu as only data source for the check. [ Impact: simplify code ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-24-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit d43698918bd46c71d494555fb92195fbea1fcb6c Author: Robert Richter Date: Wed Apr 29 12:47:19 2009 +0200 perf_counter, x86: rework counter disable functions As for the enable function, this patch reworks the disable functions and introduces x86_pmu_disable_counter(). The internal function i/f in struct x86_pmu changed too. [ Impact: refactor and generalize code ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-23-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 7c90cc45f89af4dd4617f97d452740ad95b800d5 Author: Robert Richter Date: Wed Apr 29 12:47:18 2009 +0200 perf_counter, x86: rework counter enable functions There is vendor specific code in generic x86 code, and there is vendor specific code that could be generic. This patch introduces x86_pmu_enable_counter() for x86 generic code. Fixed counter code for Intel is moved to Intel only functions. In the end, checks and calls via function pointers were reduced to the necessary. Also, the internal function i/f changed. [ Impact: refactor and generalize code ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-22-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 6f00cada07bb5da7f751929d3173494dcc5446cc Author: Robert Richter Date: Wed Apr 29 12:47:17 2009 +0200 perf_counter, x86: consistent use of type int for counter index The type of counter index is sometimes implemented as unsigned int. This patch changes this to have a consistent usage of int. [ Impact: cleanup ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-21-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 095342389e2ed8deed07b3076f990260ce3c7c9f Author: Robert Richter Date: Wed Apr 29 12:47:16 2009 +0200 perf_counter, x86: generic use of cpuc->active cpuc->active will now be used to indicate an enabled counter which implies also valid pointers of cpuc->counters[]. In contrast, cpuc->used only locks the counter, but it can be still uninitialized. [ Impact: refactor and generalize code ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-20-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 93904966934193204ad08e951f806d5631c29eb3 Author: Robert Richter Date: Wed Apr 29 12:47:15 2009 +0200 perf_counter, x86: rename cpuc->active_mask This is to have a consistent naming scheme with cpuc->used. [ Impact: cleanup ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-19-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit bb775fc2d1dcd1aa6eafde37a8289ba2d80783aa Author: Robert Richter Date: Wed Apr 29 12:47:14 2009 +0200 perf_counter, x86: make x86_pmu_read() static inline [ Impact: micro-optimization ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-18-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit faa28ae018ed004a22aa4a7704e04ccdde4a941e Author: Robert Richter Date: Wed Apr 29 12:47:13 2009 +0200 perf_counter, x86: make pmu version generic This makes the use of the version variable generic. Also, some debug messages have been generalized. [ Impact: refactor and generalize code ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-17-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 0933e5c6a680ba8d8d786a6f7fa377b7ec0d1e49 Author: Robert Richter Date: Wed Apr 29 12:47:12 2009 +0200 perf_counter, x86: move counter parameters to struct x86_pmu [ Impact: refactor and generalize code ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-16-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 4a06bd8508f65ad1dd5cd2046b85694813fa36a2 Author: Robert Richter Date: Wed Apr 29 12:47:11 2009 +0200 perf_counter, x86: make x86_pmu data a static struct Instead of using a pointer to reference to the x86 pmu we now have one single data structure that is initialized at the beginning. This saves the pointer access when using this memory. [ Impact: micro-optimization ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-15-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 72eae04d3a3075c26d39e1e685acfc8e8c29db64 Author: Robert Richter Date: Wed Apr 29 12:47:10 2009 +0200 perf_counter, x86: modify initialization of struct x86_pmu This patch adds an error handler and changes initialization of struct x86_pmu. No functional changes. Needed for follow-on patches. [ Impact: cleanup ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-14-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 55de0f2e57994b525324bf0d04d242d9358a2417 Author: Robert Richter Date: Wed Apr 29 12:47:09 2009 +0200 perf_counter, x86: rename intel only functions [ Impact: cleanup ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-13-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 26816c287e13eedc67bc4ed0cd40c138314b7c7d Author: Robert Richter Date: Wed Apr 29 12:47:08 2009 +0200 perf_counter, x86: rename __hw_perf_counter_set_period into x86_perf_counter_set_period [ Impact: cleanup ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-12-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit dee5d9067ca78b317538fd67930be4e09a83dbc5 Author: Robert Richter Date: Wed Apr 29 12:47:07 2009 +0200 perf_counter, x86: remove ack_status() from struct x86_pmu This function is Intel only and not necessary for AMD cpus. [ Impact: simplify code ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-11-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit b7f8859a8ed1937e2139c17b84878f1d413fa659 Author: Robert Richter Date: Wed Apr 29 12:47:06 2009 +0200 perf_counter, x86: remove get_status() from struct x86_pmu This function is Intel only and not necessary for AMD cpus. [ Impact: simplify code ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-10-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 39d81eab2374d71b2d9c82f66258a1a4f57ddd2e Author: Robert Richter Date: Wed Apr 29 12:47:05 2009 +0200 perf_counter, x86: make interrupt handler model specific This separates the perfcounter interrupt handler for AMD and Intel cpus. The AMD interrupt handler implementation is a follow-on patch. [ Impact: refactor and clean up code ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-9-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 5f4ec28ffe77c840354cce1820a3436106e9e0f1 Author: Robert Richter Date: Wed Apr 29 12:47:04 2009 +0200 perf_counter, x86: rename struct pmc_x86_ops into struct x86_pmu This patch renames struct pmc_x86_ops into struct x86_pmu. It introduces a structure to describe an x86 model specific pmu (performance monitoring unit). It may contain ops and data. The new name of the structure fits better, is shorter, and thus better to handle. Where it was appropriate, names of function and variable have been changed too. [ Impact: cleanup ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-8-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 4aeb0b4239bb3b67ed402cb9cef3e000c892cadf Author: Robert Richter Date: Wed Apr 29 12:47:03 2009 +0200 perfcounters: rename struct hw_perf_counter_ops into struct pmu This patch renames struct hw_perf_counter_ops into struct pmu. It introduces a structure to describe a cpu specific pmu (performance monitoring unit). It may contain ops and data. The new name of the structure fits better, is shorter, and thus better to handle. Where it was appropriate, names of function and variable have been changed too. [ Impact: cleanup ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-7-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 527e26af3741a2168986d8b82653ffe173891324 Author: Robert Richter Date: Wed Apr 29 12:47:02 2009 +0200 perf_counter, x86: protect per-cpu variables with compile barriers only Per-cpu variables needn't to be protected with cpu barriers (smp_wmb()). Protection is only needed for preemption on the same cpu (rescheduling or the nmi handler). This can be done using a compiler barrier only. [ Impact: micro-optimization ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-6-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 4295ee62660b13ddb87d41539f49b239e6e7d56f Author: Robert Richter Date: Wed Apr 29 12:47:01 2009 +0200 perf_counter, x86: rework pmc_amd_save_disable_all() and pmc_amd_restore_all() MSR reads and writes are expensive. This patch adds checks to avoid its usage where possible. [ Impact: micro-optimization on AMD CPUs ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-5-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 4138960a9251a265002b5cf07e671a49f8495381 Author: Robert Richter Date: Wed Apr 29 12:47:00 2009 +0200 perf_counter, x86: add default path to cpu detection This quits hw counter initialization immediately if no cpu is detected. [ Impact: cleanup ] Signed-off-by: Robert Richter Cc: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <1241002046-8832-4-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit 829b42dd395c5801f6ae87da87ecbdcfd5ef1a6c Author: Robert Richter Date: Wed Apr 29 12:46:59 2009 +0200 perf_counter, x86: declare perf_max_counters only for CONFIG_PERF_COUNTERS This is only needed for CONFIG_PERF_COUNTERS enabled. [ Impact: cleanup ] Signed-off-by: Robert Richter Acked-by: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <1241002046-8832-3-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit da1a776be1ac7f78bb30ececbec4c1383163b079 Author: Robert Richter Date: Wed Apr 29 12:46:58 2009 +0200 perf_counter, x86: remove X86_FEATURE_ARCH_PERFMON flag for AMD cpus X86_FEATURE_ARCH_PERFMON is an Intel hardware feature that does not work on AMD CPUs. The flag is now only used in Intel specific code (especially initialization). [ Impact: refactor code ] Signed-off-by: Robert Richter Acked-by: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <1241002046-8832-2-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar commit e7fd5d4b3d240f42c30a9e3d20a4689c4d3a795a Merge: 1130b02 56a50ad Author: Ingo Molnar Date: Wed Apr 29 14:46:59 2009 +0200 Merge branch 'linus' into perfcounters/core Merge reason: This brach was on -rc1, refresh it to almost-rc4 to pick up the latest upstream fixes. Signed-off-by: Ingo Molnar commit 50fa610a3b6ba7cf91d7a92229177dfaff2b81a1 Author: David Howells Date: Tue Apr 28 15:01:38 2009 +0100 sched: Document memory barriers implied by sleep/wake-up primitives Add a section to the memory barriers document to note the implied memory barriers of sleep primitives (set_current_state() and wrappers) and wake-up primitives (wake_up() and co.). Also extend the in-code comments on the wake_up() functions to note these implied barriers. [ Impact: add documentation ] Signed-off-by: David Howells Cc: Oleg Nesterov Cc: Linus Torvalds Cc: Andrew Morton LKML-Reference: <20090428140138.1192.94723.stgit@warthog.procyon.org.uk> Signed-off-by: Ingo Molnar commit a0e39ed378fb6ba916522764cd508fa7d42ad495 Author: Heiko Carstens Date: Wed Apr 29 13:51:39 2009 +0200 tracing: fix build failure on s390 "tracing: create automated trace defines" causes this compile error on s390, as reported by Sachin Sant against linux-next: kernel/built-in.o: In function `__do_softirq': (.text+0x1c680): undefined reference to `__tracepoint_softirq_entry' This happens because the definitions of the softirq tracepoints were moved from kernel/softirq.c to kernel/irq/handle.c. Since s390 doesn't support generic hardirqs handle.c doesn't get compiled and the definitions are missing. So move the tracepoints to softirq.c again. [ Impact: fix build failure on s390 ] Reported-by: Sachin Sant Signed-off-by: Heiko Carstens Cc: Steven Rostedt Cc: fweisbec@gmail.com LKML-Reference: <20090429135139.5fac79b8@osiris.boeblingen.de.ibm.com> Signed-off-by: Ingo Molnar commit 8b3725621074040d380664964ffbc40610aef8c6 Author: Tom Zanussi Date: Tue Apr 28 03:04:59 2009 -0500 tracing/filters: a better event parser Replace the current event parser hack with a better one. Filters are no longer specified predicate by predicate, but all at once and can use parens and any of the following operators: numeric fields: ==, !=, <, <=, >, >= string fields: ==, != predicates can be combined with the logical operators: &&, || examples: "common_preempt_count > 4" > filter "((sig >= 10 && sig < 15) || sig == 17) && comm != bash" > filter If there was an error, the erroneous string along with an error message can be seen by looking at the filter e.g.: ((sig >= 10 && sig < 15) || dsig == 17) && comm != bash ^ parse_error: Field not found Currently the caret for an error always appears at the beginning of the filter; a real position should be used, but the error message should be useful even without it. To clear a filter, '0' can be written to the filter file. Filters can also be set or cleared for a complete subsystem by writing the same filter as would be written to an individual event to the filter file at the root of the subsytem. Note however, that if any event in the subsystem lacks a field specified in the filter being set, the set will fail and all filters in the subsytem are automatically cleared. This change from the previous version was made because using only the fields that happen to exist for a given event would most likely result in a meaningless filter. Because the logical operators are now implemented as predicates, the maximum number of predicates in a filter was increased from 8 to 16. [ Impact: add new, extended trace-filter implementation ] Signed-off-by: Tom Zanussi Acked-by: Steven Rostedt Cc: fweisbec@gmail.com Cc: Li Zefan LKML-Reference: <1240905899.6416.121.camel@tropicana> Signed-off-by: Ingo Molnar commit a118e4d1402f1349fe3d953493e4168a300a752d Author: Tom Zanussi Date: Tue Apr 28 03:04:53 2009 -0500 tracing/filters: distinguish between signed and unsigned fields The new filter comparison ops need to be able to distinguish between signed and unsigned field types, so add an is_signed flag/param to the event field struct/trace_define_fields(). Also define a simple macro, is_signed_type() to determine the signedness at compile time, used in the trace macros. If the is_signed_type() macro won't work with a specific type, a new slightly modified version of TRACE_FIELD() called TRACE_FIELD_SIGN(), allows the signedness to be set explicitly. [ Impact: extend trace-filter code for new feature ] Signed-off-by: Tom Zanussi Acked-by: Steven Rostedt Cc: fweisbec@gmail.com Cc: Li Zefan LKML-Reference: <1240905893.6416.120.camel@tropicana> Signed-off-by: Ingo Molnar commit 30e673b230f9d556eb81ef68a7b1a08c8b3b142c Author: Tom Zanussi Date: Tue Apr 28 03:04:47 2009 -0500 tracing/filters: move preds into event_filter object Create a new event_filter object, and move the pred-related members out of the call and subsystem objects and into the filter object - the details of the filter implementation don't need to be exposed in the call and subsystem in any case, and it will also help make the new parser implementation a little cleaner. [ Impact: refactor trace-filter code to prepare for new features ] Signed-off-by: Tom Zanussi Acked-by: Steven Rostedt Cc: fweisbec@gmail.com Cc: Li Zefan LKML-Reference: <1240905887.6416.119.camel@tropicana> Signed-off-by: Ingo Molnar commit fd0731944333db6e9e91b6954c6ef95f4b71ab04 Author: Ingo Molnar Date: Wed Apr 29 12:56:58 2009 +0200 x86, vmlinux.lds: fix relocatable symbols __init_begin/_end symbols should be inside sections as well, otherwise the relocatable kernel gets confused when freeing init sections in the wrong place. [ Impact: fix bootup crash ] Cc: Sam Ravnborg Cc: Tim Abbott Cc: Linus Torvalds LKML-Reference: <20090429105056.GA28720@uranus.ravnborg.org> Signed-off-by: Ingo Molnar commit 0f9a623dd6c9b5b4dd00c232f29525bfc7a8ecf2 Author: Stuart Bennett Date: Tue Apr 28 20:17:51 2009 +0100 tracing: x86, mmiotrace: only register for die notifier when tracer active Follow up to afcfe024aebd74b0984a41af9a34e009cf5badaf in Linus' tree ("x86: mmiotrace: quieten spurious warning message") Signed-off-by: Stuart Bennett Acked-by: Pekka Paalanen Cc: Steven Rostedt LKML-Reference: <1240946271-7083-5-git-send-email-stuart@freedesktop.org> Signed-off-by: Ingo Molnar commit 46e91d00b1165b14b484aa33800e1bba0794ae1a Author: Stuart Bennett Date: Tue Apr 28 20:17:50 2009 +0100 tracing: x86, mmiotrace: refactor clearing/restore of page presence * change function names to clear_* from set_*: in reality we only clear and restore page presence, and never unconditionally set present. Using clear_*({true, false}, ...) is therefore more honest than set_*({false, true}, ...) * upgrade presence storage to pteval_t: doing user-space tracing will require saving and manipulation of the _PAGE_PROTNONE bit, in addition to the existing _PAGE_PRESENT changes, and having multiple bools stored and passed around does not seem optimal [ Impact: refactor, clean up mmiotrace code ] Signed-off-by: Stuart Bennett Acked-by: Pekka Paalanen Cc: Steven Rostedt LKML-Reference: <1240946271-7083-4-git-send-email-stuart@freedesktop.org> Signed-off-by: Ingo Molnar commit 0492e1bb8fe7d122901c9f3af75e537d4129712e Author: Stuart Bennett Date: Tue Apr 28 20:17:49 2009 +0100 tracing: x86, mmiotrace: code consistency/legibility improvement kmmio_probe being *p and kmmio_fault_page being sometimes *f and sometimes *p is not helpful. [ Impact: cleanup ] Signed-off-by: Stuart Bennett Acked-by: Pekka Paalanen Cc: Steven Rostedt LKML-Reference: <1240946271-7083-3-git-send-email-stuart@freedesktop.org> Signed-off-by: Ingo Molnar commit 91fd7fe809bdf4d8aa56559d17b9f25a1a6fe732 Author: Ingo Molnar Date: Wed Apr 29 10:58:38 2009 +0200 x86, vmlinux.lds: add copyright Acked-by: Sam Ravnborg Cc: Tim Abbott Cc: Linus Torvalds LKML-Reference: <1240991249-27117-2-git-send-email-sam@ravnborg.org> Signed-off-by: Ingo Molnar commit 091e52c3551d3031343df24b573b770b4c6c72b6 Author: Sam Ravnborg Date: Wed Apr 29 09:47:29 2009 +0200 x86, vmlinux.lds: unify remaining parts 32 bit: - explicit page align .bss - move ALING() out of .brk output section - discard *(.eh_frame) 64 bit: - move ALIGN() out of .bss output section - move ALIGN() out of .brk output section - use a dedicated section to define _end [ Impact: unify and fix section alignments in linker script ] Signed-off-by: Sam Ravnborg Cc: Tim Abbott Cc: Linus Torvalds LKML-Reference: <1240991249-27117-13-git-send-email-sam@ravnborg.org> Signed-off-by: Ingo Molnar commit 9d16e78318f174fd4b07916a93e41749d5199267 Author: Sam Ravnborg Date: Wed Apr 29 09:47:28 2009 +0200 x86, vmlinux.lds: unify percpu 32 bit: - move __init_end outside the .bss output section It really did not belong in there [ Impact: 64-bit: cleanup, 32-bit: refactor linker script ] Signed-off-by: Sam Ravnborg Cc: Tim Abbott Cc: Linus Torvalds LKML-Reference: <1240991249-27117-12-git-send-email-sam@ravnborg.org> Signed-off-by: Ingo Molnar commit bf6a57418d5445c98047edbec022c9e54d1526e6 Author: Sam Ravnborg Date: Wed Apr 29 09:47:27 2009 +0200 x86, vmlinux.lds: unify .exit.* and .init.ramfs [ Impact: cleanup ] Signed-off-by: Sam Ravnborg Cc: Tim Abbott Cc: Linus Torvalds LKML-Reference: <1240991249-27117-11-git-send-email-sam@ravnborg.org> Signed-off-by: Ingo Molnar commit ae61836289a415351caa524d328110aaeae100d4 Author: Sam Ravnborg Date: Wed Apr 29 09:47:26 2009 +0200 x86, vmlinux.lds: unify parainstructions 32 bit: - increase alignment from 4 to 8 for .parainstructions - increase alignment from 4 to 8 for .altinstructions 64 bit: - move ALIGN() outside output section for .altinstructions None of the above should result in any functional change. [ Impact: refactor and unify linker script ] Signed-off-by: Sam Ravnborg Cc: Tim Abbott Cc: Linus Torvalds LKML-Reference: <1240991249-27117-10-git-send-email-sam@ravnborg.org> Signed-off-by: Ingo Molnar commit e58bdaa8f810332e5c1760ce496b01e07d51642c Author: Sam Ravnborg Date: Wed Apr 29 09:47:25 2009 +0200 x86, vmlinux.lds: unify first part of initdata 32-bit: - Move definition of __init_begin outside output_section because it covers more than one section - Move ALIGN() for end-of-section inside .smp_locks output section. Same effect but the intent is better documented that we need both start and end aligned. 64-bit: - Move ALIGN() outside output section in .init.setup - Deleted unused __smp_alt_* symbols None of the above should result in any functional change. [ Impact: refactor and unify linker script ] Signed-off-by: Sam Ravnborg Cc: Tim Abbott Cc: Linus Torvalds LKML-Reference: <1240991249-27117-9-git-send-email-sam@ravnborg.org> Signed-off-by: Ingo Molnar commit ff6f87e1626e10beef675084c9b5384a9477e3d5 Author: Sam Ravnborg Date: Wed Apr 29 09:47:24 2009 +0200 x86, vmlinux.lds: move vsyscall output sections [ Impact: cleanup ] Signed-off-by: Sam Ravnborg Cc: Tim Abbott Cc: Linus Torvalds LKML-Reference: <1240991249-27117-8-git-send-email-sam@ravnborg.org> Signed-off-by: Ingo Molnar commit 1f6397bac55040cd520d9eaf299e155a7aa01d5f Author: Sam Ravnborg Date: Wed Apr 29 09:47:23 2009 +0200 x86, vmlinux.lds: unify data output sections For 64 bit the following functional changes are introduced: - .data.page_aligned has moved - .data.cacheline_aligned has moved - .data.read_mostly has moved - ALIGN() moved out of output section for .data.cacheline_aligned - ALIGN() moved out of output section for .data.page_aligned Notice that 32 bit and 64 bit has different location of _edata. .data_nosave is 32 bit only as 64 bit is special due to PERCPU. [ Impact: 32-bit: cleanup, 64-bit: use 32-bit linker script ] Signed-off-by: Sam Ravnborg Cc: Tim Abbott Cc: Linus Torvalds LKML-Reference: <1240991249-27117-7-git-send-email-sam@ravnborg.org> Signed-off-by: Ingo Molnar commit 448bc3ab0d03e77fee8e4264de0d001fc87bc164 Author: Sam Ravnborg Date: Wed Apr 29 09:47:22 2009 +0200 x86, vmlinux.lds: unify exception table [ Impact: cleanup ] Signed-off-by: Sam Ravnborg Cc: Tim Abbott Cc: Linus Torvalds LKML-Reference: <1240991249-27117-6-git-send-email-sam@ravnborg.org> Signed-off-by: Ingo Molnar commit dfc20895d944cfa81d8ff00809b68ecb8f72cbb0 Author: Sam Ravnborg Date: Wed Apr 29 09:47:21 2009 +0200 x86, vmlinux.lds: unify .text output sections 32 bit x86 had a dedicated .text.head output section, whereas 64 bit had it all in a single output section. In the unified version the dedicated .text.head output section was kept to have full control over the head code. 32 bit: - Moved definition of _stext to the linker script. The definition is located _after_ .text.page_aligned as this is what 32 bit did before. The ALIGN(8) was introduced so we hit the exact same address (on the tested config) before and after the move. I assume that it is a bug that _stext did not cover the .text.page_aligned section - if this is true it can be fixed in a follow-up patch (and the ugly ALIGN() can be dropped). [ Impact: 64-bit: cleanup, 32-bit: use the 64-bit linker script ] Signed-off-by: Sam Ravnborg Cc: Tim Abbott Cc: Linus Torvalds LKML-Reference: <1240991249-27117-5-git-send-email-sam@ravnborg.org> Signed-off-by: Ingo Molnar commit 444e0ae4831f99ba25062d9a5ccb7117c62841a0 Author: Sam Ravnborg Date: Wed Apr 29 09:47:20 2009 +0200 x86, vmlinux.lds: unify start/end of SECTIONS [ Impact: cleanup ] Signed-off-by: Sam Ravnborg Cc: Tim Abbott Cc: Linus Torvalds LKML-Reference: <1240991249-27117-4-git-send-email-sam@ravnborg.org> Signed-off-by: Ingo Molnar commit afb8095a7eab32e5760613fa73d2f80a39cc45bf Author: Sam Ravnborg Date: Wed Apr 29 09:47:19 2009 +0200 x86, vmlinux.lds: unify PHDRS PHDRS are not equal for the two - so use ifdefs to cover up for that. On the assumption that they may become equal the ifdef is inside the PHDRS definiton. [ Impact: cleanup ] Signed-off-by: Sam Ravnborg Cc: Tim Abbott Cc: Linus Torvalds LKML-Reference: <1240991249-27117-3-git-send-email-sam@ravnborg.org> Signed-off-by: Ingo Molnar commit 17ce265d6a1789eae5eb739a3bb7fcffdb3e87c5 Author: Sam Ravnborg Date: Wed Apr 29 09:47:18 2009 +0200 x86, vmlinux.lds: unify header/footer Merge everything except PHDRS and SECTIONS into vmlinux.lds.S. [ Impact: cleanup ] Signed-off-by: Sam Ravnborg Cc: Tim Abbott Cc: Linus Torvalds LKML-Reference: <1240991249-27117-2-git-send-email-sam@ravnborg.org> Signed-off-by: Ingo Molnar commit aee6a166a5401dcfcb17fcdc055e5edf2a4f4042 Author: Sam Ravnborg Date: Wed Apr 29 09:47:17 2009 +0200 x86: beautify vmlinux_32.lds.S Beautify vmlinux_32.lds.S: - Use tabs for indent - Located curly braces like in C code - Rearranged a few comments To see actual differences use "git diff -b" which ignore 'whitespace' changes. The beautification is done to prepare a unification of the _32 and _64 variants of the linker scripts. [ Impact: cleanup ] Signed-off-by: Sam Ravnborg Cc: Tim Abbott Cc: Linus Torvalds LKML-Reference: <1240991249-27117-1-git-send-email-sam@ravnborg.org> Signed-off-by: Ingo Molnar commit 7d7d2b803159d4edeb051b0e5efbc1a8d9ef1c67 Author: Steven Rostedt Date: Mon Apr 27 12:37:49 2009 -0400 ring-buffer: fix printk output The warning output in trace_recursive_lock uses %d for a long when it should be %ld. [ Impact: fix compile warning ] Signed-off-by: Steven Rostedt commit f2957f1f196b0217644a17c1379855a118a37d72 Author: Steven Rostedt Date: Wed Apr 29 00:26:30 2009 -0400 tracing: have splice only copy full pages Splice works with pages, it is much more effecient to use an entire page than to copy bits over several pages. Using logdev to trace the internals of the splice mechanism, I was able to see that splice can be very aggressive. When tracing is occurring, and the reader caught up to the writer, and the writer is on the reader page, the reader will copy what is there into the splice page. Splice may iterate over several pages and if the writer is still writing to the page, the reader will keep copying bits to new pages to pass to userspace. This patch changes it to only pass data to userspace if the page is full (the writer has left the page). This has a small side effect that splice can not read a partial page, and must wait for the page to fill. This should not be an issue. If tracing has stopped, then a use of "read" will still read all of the page. [ Impact: better performance for ring buffer splice code ] Signed-off-by: Steven Rostedt commit 93459c6cb9816c52200993d29dd18cea1daee335 Author: Steven Rostedt Date: Wed Apr 29 00:23:13 2009 -0400 tracing: only add splice page if entries exist The splice code allocates a page even when the ring buffer is empty. It detects the ring buffer being empty when it it fails to copy anything from the ring buffer into the page. This patch adds a check to see if there is anything in the ring buffer before allocating a page. Thanks to logdev for letting me trace the tracer to find this. [ Impact: speed up due to removing unnecessary allocation ] Signed-off-by: Steven Rostedt commit 5beae6efd1004b44c3e257dc96087978e4c763c1 Author: Steven Rostedt Date: Wed Apr 29 00:16:21 2009 -0400 tracing: fix ref count in splice pages The pages allocated for the splice binary buffer did not initialize the ref count correctly. This caused pages not to be freed and causes a drastic memory leak. Thanks to logdev I was able to trace the tracer to find where the leak was. [ Impact: stop memory leak when using splice ] Signed-off-by: Steven Rostedt commit 72e31981a4e91f84c5b5e8994f5d25b1cf22b6cf Merge: 6be01cf 18cc8d8 Author: Mark Brown Date: Tue Apr 28 19:33:45 2009 +0100 Merge branch 'for-2.6.30' into for-2.6.31 commit edc953fa4ebc0265ef3b1754fe116a9fd4264e15 Author: Mathieu Desnoyers Date: Tue Apr 28 11:13:46 2009 -0400 x86: clean up alternative.h Alternative header duplicates assembly that could be merged in one single macro. Merging this into this macro also allows to directly declare ALTERNATIVE() statements within assembly code. Uses a __stringify() of the feature bits rather than passing a "i" operand. Leave the old %0 operand as-is (set to 0), unused to stay compatible with API. (v2: tab alignment fixes) [ Impact: cleanup ] Signed-off-by: Mathieu Desnoyers LKML-Reference: <20090428151346.GA31212@Krystal> Signed-off-by: Ingo Molnar commit cd891ae0305601bdb4d2e7e85282961c4ff256cd Author: Steven Rostedt Date: Tue Apr 28 11:39:34 2009 -0400 tracing: convert ftrace_dump spinlocks to raw ftrace_dump is used for printing out the contents of the ftrace ring buffer to the console on failure. Currently it uses a spinlock to synchronize the output from multiple failures on different CPUs. This spin lock currently is a normal spinlock and can cause issues with lockdep and lock tracing. This patch converts it to raw since it is for error handling only. The lock is local to the ftrace_dump and is not used by any other infrastructure. [ Impact: prevent ftrace_dump from locking up by internal tracing ] Signed-off-by: Steven Rostedt commit 08cbf542bf24fb0481a54526b177347ae4046f5e Author: Tejun Heo Date: Tue Apr 14 10:54:53 2009 +0900 fuse: export symbols to be used by CUSE Export the following symbols for CUSE. fuse_conn_put() fuse_conn_get() fuse_conn_kill() fuse_send_init() fuse_do_open() fuse_sync_release() fuse_direct_io() fuse_do_ioctl() fuse_file_poll() fuse_request_alloc() fuse_get_req() fuse_put_request() fuse_request_send() fuse_abort_conn() fuse_dev_release() fuse_dev_operations Signed-off-by: Tejun Heo Signed-off-by: Miklos Szeredi commit a325f9b92273d6c64ec56167905b951b9827ec33 Author: Tejun Heo Date: Tue Apr 14 10:54:52 2009 +0900 fuse: update fuse_conn_init() and separate out fuse_conn_kill() Update fuse_conn_init() such that it doesn't take @sb and move bdi registration into a separate function. Also separate out fuse_conn_kill() from fuse_put_super(). These will be used to implement cuse. Signed-off-by: Tejun Heo Signed-off-by: Miklos Szeredi commit 797759aaf31351a1ab1b9130c4f180ce496f46c5 Author: Miklos Szeredi Date: Tue Apr 28 16:56:41 2009 +0200 fuse: don't use inode in fuse_file_poll Use ff->fc and ff->nodeid instead of file->f_dentry->d_inode in the fuse_file_poll() implementation. This prepares this function for use by CUSE, where the inode is not owned by a fuse filesystem. Signed-off-by: Miklos Szeredi commit d36f248710c05714f37d921258b630bd1456b99f Author: Miklos Szeredi Date: Tue Apr 28 16:56:39 2009 +0200 fuse: don't use inode in fuse_do_ioctl() helper Create a helper for sending an IOCTL request that doesn't use a struct inode. This prepares this function for use by CUSE, where the inode is not owned by a fuse filesystem. Signed-off-by: Miklos Szeredi commit 8b0797a4984de4406de25808e1a424344de543e4 Author: Miklos Szeredi Date: Tue Apr 28 16:56:39 2009 +0200 fuse: don't use inode in fuse_sync_release() Make fuse_sync_release() a generic helper function that doesn't need a struct inode pointer. This makes it suitable for use by CUSE. Change return value of fuse_release_common() from int to void. Signed-off-by: Miklos Szeredi commit 91fe96b403f8a0a4a8a045a39b1bd549b0da7941 Author: Miklos Szeredi Date: Tue Apr 28 16:56:37 2009 +0200 fuse: create fuse_do_open() helper for CUSE Create a helper for sending an OPEN request that doesn't need a struct inode pointer. Signed-off-by: Miklos Szeredi commit c7b7143c6342b8751d47b03a025ac5c0ac1ae809 Author: Miklos Szeredi Date: Tue Apr 28 16:56:37 2009 +0200 fuse: clean up args in fuse_finish_open() and fuse_release_fill() Move setting ff->fh, ff->nodeid and file->private_data outside fuse_finish_open(). Add ->open_flags member to struct fuse_file. This simplifies the argument passing to fuse_finish_open() and fuse_release_fill(), and paves the way for creating an open helper that doesn't need an inode pointer. Signed-off-by: Miklos Szeredi commit 2106cb18930312af9325d3418e138569c5b903cc Author: Miklos Szeredi Date: Tue Apr 28 16:56:37 2009 +0200 fuse: don't use inode in helpers called by fuse_direct_io() Use ff->fc and ff->nodeid instead of passing down the inode. This prepares this function for use by CUSE, where the inode is not owned by a fuse filesystem. Signed-off-by: Miklos Szeredi commit da5e4714578ff323f7a61af490fc3539e68f188b Author: Miklos Szeredi Date: Tue Apr 28 16:56:36 2009 +0200 fuse: add members to struct fuse_file Add new members ->fc and ->nodeid to struct fuse_file. This will aid in converting functions for use by CUSE, where the inode is not owned by a fuse filesystem. Signed-off-by: Miklos Szeredi commit d09cb9d7f6e4cb1dd0cf12ee0d352440291c74cf Author: Miklos Szeredi Date: Tue Apr 28 16:56:36 2009 +0200 fuse: prepare fuse_direct_io() for CUSE Move code operating on the inode out from fuse_direct_io(). This prepares this function for use by CUSE, where the inode is not owned by a fuse filesystem. Signed-off-by: Miklos Szeredi commit 2d698b070382442f817813b9dd0103034e5bca81 Author: Miklos Szeredi Date: Tue Apr 28 16:56:36 2009 +0200 fuse: clean up fuse_write_fill() Move out code from fuse_write_fill() which is not common to all callers. Remove two function arguments which become unnecessary. Also remove unnecessary memset(), the request is already initialized to zero. Signed-off-by: Miklos Szeredi commit b0be46ebf72ca7478c1c4bd0153c42f90e768a03 Author: Miklos Szeredi Date: Tue Apr 28 16:56:36 2009 +0200 fuse: use struct path in release structure Use struct path instead of separate dentry and vfsmount in req->misc.release. Signed-off-by: Miklos Szeredi commit 6b2db28a7a2da1064df9e179d9b6d07b0bfe156a Author: Tejun Heo Date: Tue Apr 14 10:54:49 2009 +0900 fuse: misc cleanups * fuse_file_alloc() was structured in weird way. The success path was split between else block and code following the block. Restructure the code such that it's easier to read and modify. * Unindent success path of fuse_release_common() to ease future changes. Signed-off-by: Tejun Heo Signed-off-by: Miklos Szeredi commit 1130b0296184bc21806225fd06d533515a99d2db Author: Peter Zijlstra Date: Tue Apr 28 14:56:18 2009 +0200 perf_counter tools: fix Documentation/perf_counter build error Mike Galbraith reported: > marge:..Documentation/perf_counter # make > CC builtin-stat.o > In file included from builtin-stat.c:71: > /usr/include/ctype.h:102: error: expected expression before ‘]’ token Remove the ctype.h include. Signed-off-by: Ingo Molnar commit 4278600644dee621bd50d7498e244b135612e0f6 Author: Paul Mundt Date: Tue Apr 28 23:12:10 2009 +0900 sh: register the rtc-generic platform device properly. The device registration was accidentally omitted, add it back in. Do some basic device probing as well, so this doesn't show up for platforms that tie in to the RTC interface properly. Signed-off-by: Paul Mundt commit cb6605c1e4d2a2eaffdde433fbfe1567ca688458 Author: Takashi Iwai Date: Tue Apr 28 13:03:19 2009 +0200 ALSA: hda - Fix a typo in patch_realtek.c again The commmit dfed0ef9b3ff9e37903920b6938ed33344ad0b3d was reverted accidentally by the merge of auto-detection fix patch. Fixed again now. Signed-off-by: Takashi Iwai commit 2a2ed0dfc9ec44a899c7d4672f73f2c045099118 Author: Takashi Iwai Date: Tue Apr 28 13:01:26 2009 +0200 ALSA: hda - Don't enable auto-mute but for speakers in patch_realtek.c Enable auto-muting in model=auto only for devices with HP and speakers. For devices with HP and line-outs, don't enable the auto-muting. Also, add a debug print to show the auto-mute feature. Signed-off-by: Takashi Iwai commit 56b581ea9591b5767b1e0204c6a06c7d0c49396e Author: Yinghai Lu Date: Mon Apr 27 18:02:46 2009 -0700 irq: make ht irq_desc more numa aware Try to get irq_desc on the same node as create_irq_nr(). [ Impact: optimization, make HT IRQs more NUMA-aware ] Signed-off-by: Yinghai Lu Cc: Andrew Morton Cc: Suresh Siddha Cc: "Eric W. Biederman" Cc: Rusty Russell LKML-Reference: <49F655B6.8020109@kernel.org> Signed-off-by: Ingo Molnar commit d047f53a2ecce37e3bdf79eac5a326fbaadb3628 Author: Yinghai Lu Date: Mon Apr 27 18:02:23 2009 -0700 x86/irq: change MSI irq_desc to be more numa aware Try to get irq_desc on the home node in create_irq_nr(). v2: don't check if we can move it when sparse_irq is not used v3: use move_irq_des, if that node is not what we want [ Impact: optimization, make MSI IRQ descriptors more NUMA aware ] Signed-off-by: Yinghai Lu Cc: Andrew Morton Cc: Suresh Siddha Cc: "Eric W. Biederman" Cc: Rusty Russell LKML-Reference: <49F6559F.7070005@kernel.org> Signed-off-by: Ingo Molnar commit 024154cfdd802654cb236a18c78b6e37351e2c49 Author: Yinghai Lu Date: Mon Apr 27 18:01:50 2009 -0700 irq: change io_apic_set_pci_routing() to use device parameter Make actual use of the device parameter passed down to io_apic_set_pci_routing() - to have the IRQ descriptor on the home node of the device. If no device has been passed down, we assume it's a platform device and use the boot node ID for the IRQ descriptor. [ Impact: optimization, make IO-APIC code more NUMA aware ] Signed-off-by: Yinghai Lu Cc: Andrew Morton Cc: Suresh Siddha Cc: "Eric W. Biederman" Cc: Rusty Russell LKML-Reference: <49F6557E.3080101@kernel.org> Signed-off-by: Ingo Molnar commit a2f809b08ae4dddc1015c7dcd8659e5729e45b3e Author: Yinghai Lu Date: Mon Apr 27 18:01:20 2009 -0700 irq: change ACPI GSI APIs to also take a device argument We want to use dev_to_node() later on, to be aware of the 'home node' of the GSI in question. [ Impact: cleanup, prepare the IRQ code to be more NUMA aware ] Signed-off-by: Yinghai Lu Acked-by: Len Brown Cc: Andrew Morton Cc: Suresh Siddha Cc: "Eric W. Biederman" Cc: Rusty Russell Cc: Len Brown Cc: Bjorn Helgaas Cc: Tony Luck Cc: linux-acpi@vger.kernel.org Cc: linux-ia64@vger.kernel.org LKML-Reference: <49F65560.20904@kernel.org> Signed-off-by: Ingo Molnar commit 85ac16d033370caf6f48d743c8dc8103700f5cc5 Author: Yinghai Lu Date: Mon Apr 27 18:00:38 2009 -0700 x86/irq: change irq_desc_alloc() to take node instead of cpu This simplifies the node awareness of the code. All our allocators only deal with a NUMA node ID locality not with CPU ids anyway - so there's no need to maintain (and transform) a CPU id all across the IRq layer. v2: keep move_irq_desc related [ Impact: cleanup, prepare IRQ code to be NUMA-aware ] Signed-off-by: Yinghai Lu Cc: Andrew Morton Cc: Suresh Siddha Cc: "Eric W. Biederman" Cc: Rusty Russell Cc: Jeremy Fitzhardinge LKML-Reference: <49F65536.2020300@kernel.org> Signed-off-by: Ingo Molnar commit 57b150cce8e004ddd36330490a68bfb59b7271e9 Author: Yinghai Lu Date: Mon Apr 27 17:59:53 2009 -0700 irq: only update affinity if ->set_affinity() is sucessfull irq_set_affinity() and move_masked_irq() try to assign affinity before calling chip set_affinity(). Some archs are assigning it in ->set_affinity() again. We do something like: cpumask_cpy(desc->affinity, mask); desc->chip->set_affinity(mask); But in the failure path, affinity should not be touched - otherwise we'll end up with a different affinity mask despite the failure to migrate the IRQ. So try to update the afffinity only if set_affinity returns with 0. Also call irq_set_thread_affinity accordingly. v2: update after "irq, x86: Remove IRQ_DISABLED check in process context IRQ move" v3: according to Ingo, change set_affinity() in irq_chip should return int. v4: update comments by removing moving irq_desc code. [ Impact: fix /proc/irq/*/smp_affinity setting corner case bug ] Signed-off-by: Yinghai Lu Cc: Andrew Morton Cc: Suresh Siddha Cc: "Eric W. Biederman" Cc: Rusty Russell LKML-Reference: <49F65509.60307@kernel.org> Signed-off-by: Ingo Molnar commit d5dedd4507d307eb3f35f21b6e16f336fdc0d82a Author: Yinghai Lu Date: Mon Apr 27 17:59:21 2009 -0700 irq: change ->set_affinity() to return status according to Ingo, change set_affinity() in irq_chip should return int, because that way we can handle failure cases in a much cleaner way, in the genirq layer. v2: fix two typos [ Impact: extend API ] Signed-off-by: Yinghai Lu Cc: Andrew Morton Cc: Suresh Siddha Cc: "Eric W. Biederman" Cc: Rusty Russell Cc: linux-arch@vger.kernel.org LKML-Reference: <49F654E9.4070809@kernel.org> Signed-off-by: Ingo Molnar commit fcef5911c7ea89b80d5bfc727f402f37c9eefd57 Author: Yinghai Lu Date: Mon Apr 27 17:58:23 2009 -0700 x86/irq: remove leftover code from NUMA_MIGRATE_IRQ_DESC The original feature of migrating irq_desc dynamic was too fragile and was causing problems: it caused crashes on systems with lots of cards with MSI-X when user-space irq-balancer was enabled. We now have new patches that create irq_desc according to device numa node. This patch removes the leftover bits of the dynamic balancer. [ Impact: remove dead code ] Signed-off-by: Yinghai Lu Cc: Andrew Morton Cc: Suresh Siddha Cc: "Eric W. Biederman" Cc: Rusty Russell LKML-Reference: <49F654AF.8000808@kernel.org> Signed-off-by: Ingo Molnar commit 9ec4fa271faf2db3b8e1419c998da1ca6b094eb6 Author: Yinghai Lu Date: Mon Apr 27 17:57:18 2009 -0700 irq, cpumask: correct CPUMASKS_OFFSTACK typo and fix fallout CPUMASKS_OFFSTACK is not defined anywhere (it is CPUMASK_OFFSTACK). It is a typo and init_allocate_desc_masks() is called before it set affinity to all cpus... Split init_alloc_desc_masks() into all_desc_masks() and init_desc_masks(). Also use CPUMASK_OFFSTACK in alloc_desc_masks(). [ Impact: fix smp_affinity copying/setup when moving irq_desc between CPUs ] Signed-off-by: Yinghai Lu Acked-by: Rusty Russell Cc: Andrew Morton Cc: Suresh Siddha Cc: "Eric W. Biederman" LKML-Reference: <49F6546E.3040406@kernel.org> Signed-off-by: Ingo Molnar commit 8e0b842948156e3463879caed12b4ce51bed772e Author: Magnus Damm Date: Tue Apr 28 08:19:50 2009 +0000 sh: setup timers in late_time_init() This patch moves the SuperH timer setup code from time_init() to late_time_init(). Good things about this change: - interrupts: they are enabled at late_time_init() - mm: regular kmalloc() can be used at late_time_init() Together with moving to late_time_init() this patch changes the sh_cmt driver to always allocate with kmalloc(). This simplifies the code a bit and also fixes section mismatches. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 5b644c7a218702668d7b610994e7dcbc3d4705d3 Author: Magnus Damm Date: Tue Apr 28 08:17:54 2009 +0000 clocksource: improve sh_cmt clocksource overflow handling This patch improves the sh_cmt clocksource handling. Currently the counter value is ignored in the case of overflow. With this patch the overflow flag is read before and after reading the counter, removing any counter value and overflow flag mismatch issues. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 299f293b3428ae6d73406642cd7d41f08d524c83 Merge: 1103f9b 4a79ba3 Author: Takashi Iwai Date: Tue Apr 28 09:51:57 2009 +0200 Merge branch 'topic/hda-realtek-amp' into topic/hda commit 1103f9b241447845e63d798e6ba652b4d55b700c Merge: 3b1db01 7315613 Author: Takashi Iwai Date: Tue Apr 28 09:51:49 2009 +0200 Merge branch 'fix/hda' into topic/hda commit f68adec3c7155a8bbf32a90cb4c4d0737df045d9 Author: Bartlomiej Zolnierkiewicz Date: Tue Apr 28 13:06:17 2009 +0900 mg_disk: use defines from While at it: - remove MG_REG_HEAD_MUST_BE_ON define - remove MG_REG_CTRL_INTR_ENABLE define - remove MG_REG_HEAD_LBA_MODE define - remove unused defines Cc: unsik Kim Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 8a11a789c39cd6f61de4243234cf44a46c23ffd0 Author: Bartlomiej Zolnierkiewicz Date: Tue Apr 28 13:06:16 2009 +0900 mg_disk: fix dependency on libata Add local copies of ata_id_string() and ata_id_c_string() to mg_disk so there is no need for the driver to depend on ATA and SCSI. [ Impact: break dependency on libata by copying ata id string functions ] Cc: unsik Kim Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit a03bb5a32fff4aa23f081a3cff7e98d4084104cd Author: Tejun Heo Date: Tue Apr 28 13:06:15 2009 +0900 mg_disk: clean up request completion paths mg_disk implements its own partial completion. Convert to standard block layer partial completion. [ Impact: cleanup ] Signed-off-by: Tejun Heo Cc: unsik Kim Signed-off-by: Jens Axboe commit eec9462088a26c046d4db3100796a340a50890b8 Author: Tejun Heo Date: Tue Apr 28 13:06:14 2009 +0900 mg_disk: fold mg_disk.h into mg_disk.c include/linux/mg_disk.h is used only by drivers/block/mg_disk.c. No reason to put it in a separate header. Fold it into mg_disk.c. [ Impact: cleanup ] Signed-off-by: Tejun Heo Cc: unsik Kim Signed-off-by: Jens Axboe commit e138b4e08ef65771000fbe6d93d67e3960ff862b Author: Tejun Heo Date: Tue Apr 28 13:06:13 2009 +0900 swim: clean up request completion paths swim curiously tries to update request parameters before calling __blk_end_request() when __blk_end_request() will do it anyway and unnecessarily checks whether current_nr_sectors is zero right after fetching. Drop unnecessary stuff and use standard block layer mechanisms. [ Impact: cleanup ] Signed-off-by: Tejun Heo Cc: Laurent Vivier Signed-off-by: Jens Axboe commit 467ca759fc83fc35cb7d15aec0d74c62cffc4481 Author: Tejun Heo Date: Tue Apr 28 13:06:12 2009 +0900 swim3: clean up request completion paths swim3 curiously tries to update request parameters before calling __blk_end_request() when __blk_end_request() will do it anyway, and it updates request for partial completion manually instead of using blk_update_request(). Also, it does some spurious checks on rq such as testing whether rq->sector is negative or current_nr_sectors is zero right after fetching. Drop unnecessary stuff and use standard block layer mechanisms. [ Impact: cleanup ] Signed-off-by: Tejun Heo Cc: Benjamin Herrenschmidt Signed-off-by: Jens Axboe commit e091eb67af957bac4e4f7410c5d1aa263ee483a4 Author: Tejun Heo Date: Tue Apr 28 13:06:11 2009 +0900 hd: clean up request completion paths hd read/write_intr() functions manually manipulate request to incrementally complete it, which block layer already supports. Simply use block layer completion routines instead of manual partial completion. While at it, clear unnecessary elv_next_request() check at the tail of read_intr(). This also makes read and write_intr() more consistent. [ Impact: cleanup ] Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit f81f2f7c9fee307e371f37424577d46f9eaf8692 Author: Tejun Heo Date: Tue Apr 28 13:06:10 2009 +0900 ubd: drop unnecessary rq->sector manipulation ubd curiously updates rq->sector while issuing the request in multiple pieces. Don't do it and simply use local copy of sector. [ Impact: cleanup ] Signed-off-by: Tejun Heo Cc: Jeff Dike Signed-off-by: Jens Axboe commit 4d6c84d91d1a539ebc47d1a36a35e9390ba11fdc Author: Tejun Heo Date: Tue Apr 28 13:06:09 2009 +0900 ubd: cleanup completion path ubd had its own block request partial completion mechanism, which is unnecessary as block layer already does it. Kill ubd_end_request() and ubd_finish() and replace them with direct call to blk_end_request(). [ Impact: cleanup ] Signed-off-by: Tejun Heo Cc: Jeff Dike Signed-off-by: Jens Axboe commit 044208506d35bd62396c4673176e2c12393905b8 Author: Tejun Heo Date: Tue Apr 28 13:06:08 2009 +0900 sunvdc: kill vdc_end_request() vdc_end_request() is a thin silly wrapper on top of __blk_end_request(). Kill it. [ Impact: cleanup ] Signed-off-by: Tejun Heo Acked-by: David S. Miller Signed-off-by: Jens Axboe commit cd4c34ebec155e5c10f897d9bebf618248121e70 Author: Tejun Heo Date: Tue Apr 28 13:06:07 2009 +0900 ps3disk: simplify request completion ps3disk_interrupt() always completes requests fully but it uses rq->hard_cur_sectors for FLUSH requests for some reason. Drop them and simply use __blk_end_request_all(). [ Impact: cleanup ] Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 5b5c5d12b91cb6b2a2967f06aef35d59008dc2e7 Author: Tejun Heo Date: Tue Apr 28 13:06:06 2009 +0900 amiflop,ataflop,xd,mg_disk: clean up unnecessary stuff from block drivers rq_data_dir() can only be READ or WRITE and rq->sector and nr_sectors are always automatically updated after partial request completion. Don't worry about rq_data_dir() not being either READ or WRITE or manually update sector and nr_sectors. [ Impact: cleanup ] Signed-off-by: Tejun Heo Cc: Jörg Dorchain Cc: Geert Uytterhoeven Cc: unsik Kim Signed-off-by: Jens Axboe commit 4c94dece1baf320d925cedb231489c4e0358ac5a Author: Tejun Heo Date: Tue Apr 28 13:06:05 2009 +0900 block: don't init rq fields unnecessarily blk_get_request() always returns properly zeroed requests. Don't set fields to zero/NULL unnecessarily. [ Impact: cleanup ] Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 9fd8d0e1bcb848257968d9a7d73ca4d890ea8bd1 Author: Tejun Heo Date: Tue Apr 28 13:06:04 2009 +0900 block: make blk_end_request_cur() return bool In the process of mindlessly copying [__]blk_end_request_all(), [__]blk_end_request_cur() ended up returning void even though they're partial completion functions. Fix it. [ Impact: fix braindead API ] Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 9eb55b030c4b3227334ee4482402096cd1d1a6fe Author: Nikanth Karthikesan Date: Mon Apr 27 14:53:54 2009 +0200 block: catch trying to use more bits than request->cmd_flags has Signed-off-by: Nikanth Karthikesan Signed-off-by: Jens Axboe commit c69d48540c201394d08cb4d48b905e001313d9b8 Author: Jens Axboe Date: Fri Apr 24 08:12:19 2009 +0200 block: include discard requests in IO accounting We currently don't do merging on discard requests, but we potentially could. If we do, then we need to include discard requests in the IO accounting, or merging would end up decrementing in_flight IO counters for an IO which never incremented them. So enable accounting for discard requests. Problem found by Nikanth Karthikesan Signed-off-by: Jens Axboe commit c2553b5844b06910435e40cfab9e6f384840cb97 Author: Jens Axboe Date: Fri Apr 24 08:10:11 2009 +0200 block: make blk_do_io_stat() do the full "is this rq accountable" checks We currently check for file system requests outside of blk_do_io_stat(rq), but we may as well just include it. Signed-off-by: Jens Axboe commit 731ec497e5888c6792ad62613ae9be97eebcd7ca Author: Tejun Heo Date: Thu Apr 23 11:05:20 2009 +0900 block: kill rq->data Now that all block request data transfer is done via bio, rq->data isn't used. Kill it. While at it, make the roles of rq->special and buffer clear. [ Impact: drop now unncessary field from struct request ] Signed-off-by: Tejun Heo Cc: Boaz Harrosh commit ec24751a6b57e1373a12361e581b2458bc9bb791 Author: Tejun Heo Date: Thu Apr 23 11:05:20 2009 +0900 arm-omap: don't abuse rq->data omap mailbox uses rq->data as the second opaque pointer to carry mbox_msg_t and rq->special message argument which is needed only for tx. Add and use omap_msg_tx_data struct for tx and use rq->special for mbox_msg_t for rx such that only rq->special is used as opaque pointer. [ Impact: cleanup rq->data usage, extra kmalloc in msg_send ] Signed-off-by: Tejun Heo Cc: Russell King commit f06d9a2b52e246a66b606130cea3f0d7b7be17a7 Author: Tejun Heo Date: Thu Apr 23 11:05:19 2009 +0900 block: replace end_request() with [__]blk_end_request_cur() end_request() has been kept around for backward compatibility; however, it's about time for it to go away. * There aren't too many users left. * Its use of @updtodate is pretty confusing. * In some cases, newer code ends up using mixture of end_request() and [__]blk_end_request[_all](), which is way too confusing. So, add [__]blk_end_request_cur() and replace end_request() with it. Most conversions are straightforward. Noteworthy ones are... * paride/pcd: next_request() updated to take 0/-errno instead of 1/0. * paride/pf: pf_end_request() and next_request() updated to take 0/-errno instead of 1/0. * xd: xd_readwrite() updated to return 0/-errno instead of 1/0. * mtd/mtd_blkdevs: blktrans_discard_request() updated to return 0/-errno instead of 1/0. Unnecessary local variable res initialization removed from mtd_blktrans_thread(). [ Impact: cleanup ] Signed-off-by: Tejun Heo Acked-by: Joerg Dorchain Acked-by: Geert Uytterhoeven Acked-by: Grant Likely Acked-by: Laurent Vivier Cc: Tim Waugh Cc: Stephen Rothwell Cc: Paul Mackerras Cc: Jeremy Fitzhardinge Cc: Markus Lidel Cc: David Woodhouse Cc: Pete Zaitcev Cc: unsik Kim commit 40cbbb781d3eba5d6ac0860db078af490e5c7c6b Author: Tejun Heo Date: Thu Apr 23 11:05:19 2009 +0900 block: implement and use [__]blk_end_request_all() There are many [__]blk_end_request() call sites which call it with full request length and expect full completion. Many of them ensure that the request actually completes by doing BUG_ON() the return value, which is awkward and error-prone. This patch adds [__]blk_end_request_all() which takes @rq and @error and fully completes the request. BUG_ON() is added to to ensure that this actually happens. Most conversions are simple but there are a few noteworthy ones. * cdrom/viocd: viocd_end_request() replaced with direct calls to __blk_end_request_all(). * s390/block/dasd: dasd_end_request() replaced with direct calls to __blk_end_request_all(). * s390/char/tape_block: tapeblock_end_request() replaced with direct calls to blk_end_request_all(). [ Impact: cleanup ] Signed-off-by: Tejun Heo Cc: Russell King Cc: Stephen Rothwell Cc: Mike Miller Cc: Martin Schwidefsky Cc: Jeff Garzik Cc: Rusty Russell Cc: Jeremy Fitzhardinge Cc: Alex Dubov Cc: James Bottomley commit b243ddcbe9be146172baa544dadecebf156eda0e Author: Tejun Heo Date: Thu Apr 23 11:05:18 2009 +0900 block: move rq->start_time initialization to blk_rq_init() rq->start_time was initialized in init_request_from_bio() so special requests didn't have start_time set. This has been okay as start_time has been used only for fs requests; however, there is no indication of this actually is the case or not. Set rq->start_time in blk_rq_init() and guarantee that all initialized rq's have its start_time set. This improves consistency at virtually no cost and future changes will make use of the timestamp for !bio requests. [ Impact: rq->start_time is valid for all requests ] Signed-off-by: Tejun Heo commit 2e60e02297cf54e367567f2d85b2ca56b1c4a906 Author: Tejun Heo Date: Thu Apr 23 11:05:18 2009 +0900 block: clean up request completion API Request completion has gone through several changes and became a bit messy over the time. Clean it up. 1. end_that_request_data() is a thin wrapper around end_that_request_data_first() which checks whether bio is NULL before doing anything and handles bidi completion. blk_update_request() is a thin wrapper around end_that_request_data() which clears nr_sectors on the last iteration but doesn't use the bidi completion. Clean it up by moving the initial bio NULL check and nr_sectors clearing on the last iteration into end_that_request_data() and renaming it to blk_update_request(), which makes blk_end_io() the only user of end_that_request_data(). Collapse end_that_request_data() into blk_end_io(). 2. There are four visible completion variants - blk_end_request(), __blk_end_request(), blk_end_bidi_request() and end_request(). blk_end_request() and blk_end_bidi_request() uses blk_end_request() as the backend but __blk_end_request() and end_request() use separate implementation in __blk_end_request() due to different locking rules. blk_end_bidi_request() is identical to blk_end_io(). Collapse blk_end_io() into blk_end_bidi_request(), separate out request update into internal helper blk_update_bidi_request() and add __blk_end_bidi_request(). Redefine [__]blk_end_request() as thin inline wrappers around [__]blk_end_bidi_request(). 3. As the whole request issue/completion usages are about to be modified and audited, it's a good chance to convert completion functions return bool which better indicates the intended meaning of return values. 4. The function name end_that_request_last() is from the days when it was a public interface and slighly confusing. Give it a proper internal name - blk_finish_request(). 5. Add description explaning that blk_end_bidi_request() can be safely used for uni requests as suggested by Boaz Harrosh. The only visible behavior change is from #1. nr_sectors counts are cleared after the final iteration no matter which function is used to complete the request. I couldn't find any place where the code assumes those nr_sectors counters contain the values for the last segment and this change is good as it makes the API much more consistent as the end result is now same whether a request is completed using [__]blk_end_request() alone or in combination with blk_update_request(). API further cleaned up per Christoph's suggestion. [ Impact: cleanup, rq->*nr_sectors always updated after req completion ] Signed-off-by: Tejun Heo Reviewed-by: Boaz Harrosh Cc: Christoph Hellwig commit 0b302d5aa7975006fa2ec3d66386610b9b36c669 Author: Tejun Heo Date: Thu Apr 23 11:05:18 2009 +0900 block: kill blk_end_request_callback() With recent IDE updates, blk_end_request_callback() doesn't have any user now. Kill it. [ Impact: removal of unused convoluted interface ] Signed-off-by: Tejun Heo commit 158dbda0068e63c7cce7bd47c123bd1dfa5a902c Author: Tejun Heo Date: Thu Apr 23 11:05:18 2009 +0900 block: reorganize request fetching functions Impact: code reorganization elv_next_request() and elv_dequeue_request() are public block layer interface than actual elevator implementation. They mostly deal with how requests interact with block layer and low level drivers at the beginning of rqeuest processing whereas __elv_next_request() is the actual eleveator request fetching interface. Move the two functions to blk-core.c. This prepares for further interface cleanup. Signed-off-by: Tejun Heo commit 5efccd17ceb0fc43837a331297c2c407969d7201 Author: Tejun Heo Date: Thu Apr 23 11:05:18 2009 +0900 block: reorder request completion functions Reorder request completion functions such that * All request completion functions are located together. * Functions which are used by only one caller is put right above the caller. * end_request() is put after other completion functions but before blk_update_request(). This change is for completion function cleanup which will follow. [ Impact: cleanup, code reorganization ] Signed-off-by: Tejun Heo commit 2eef33e439ba9ae387cdc3f1abcef2f3f6c4e7a8 Author: Tejun Heo Date: Thu Apr 23 11:05:18 2009 +0900 block: clean up misc stuff after block layer timeout conversion * In blk_rq_timed_out_timer(), else { if } to else if * In blk_add_timer(), simplify if/else block [ Impact: cleanup ] Signed-off-by: Tejun Heo commit 10732f5661fb7adf62e20733b0030fc0fc93b0c4 Author: Tejun Heo Date: Thu Apr 23 11:05:18 2009 +0900 block: cleanup REQ_SOFTBARRIER usages blk_insert_request() doesn't need to worry about REQ_SOFTBARRIER. Don't set it. Combined with recent ide updates, REQ_SOFTBARRIER is now only used in elevator proper and for discard requests. [ Impact: cleanup ] Signed-off-by: Tejun Heo commit e4025f6c21f1389696c069be2dc647f364925c45 Author: Tejun Heo Date: Thu Apr 23 11:05:17 2009 +0900 block: don't set REQ_NOMERGE unnecessarily RQ_NOMERGE_FLAGS already clears defines which REQ flags aren't mergeable. There is no reason to specify it superflously. It only adds to confusion. Don't set REQ_NOMERGE for barriers and requests with specific queueing directive. REQ_NOMERGE is now exclusively used by the merging code. [ Impact: cleanup ] Signed-off-by: Tejun Heo commit a7f557923441186a3cdbabc54f1bcacf42b63bf5 Author: Tejun Heo Date: Thu Apr 23 11:05:17 2009 +0900 block: kill blk_start_queueing() blk_start_queueing() is identical to __blk_run_queue() except that it doesn't check for recursion. None of the current users depends on blk_start_queueing() running request_fn directly. Replace usages of blk_start_queueing() with [__]blk_run_queue() and kill it. [ Impact: removal of mostly duplicate interface function ] Signed-off-by: Tejun Heo commit a538cd03be6f363d039daa94199c28cfbd508455 Author: Tejun Heo Date: Thu Apr 23 11:05:17 2009 +0900 block: merge blk_invoke_request_fn() into __blk_run_queue() __blk_run_queue wraps blk_invoke_request_fn() such that it additionally removes plug and bails out early if the queue is empty. Both extra operations have their own pending mechanisms and don't cause any harm correctness-wise when they are done superflously. The only user of blk_invoke_request_fn() being blk_start_queue(), there isn't much reason to keep both functions around. Merge blk_invoke_request_fn() into __blk_run_queue() and make blk_start_queue() use __blk_run_queue() instead. [ Impact: merge two subtly different internal functions ] Signed-off-by: Tejun Heo commit db2dbb12dc47a50c7a4c5678f526014063e486f6 Author: Jeff Moyer Date: Wed Apr 22 14:08:13 2009 +0200 block: implement blkdev_readpages Doing a proper block dev ->readpages() speeds up the crazy dump(8) approach of using interleaved process IO. Signed-off-by: Jeff Moyer Signed-off-by: Jens Axboe commit db29a6b49674085f136331014ba0eee249c16a2c Author: Bartlomiej Zolnierkiewicz Date: Tue Apr 21 09:27:03 2009 +0200 block: enable by default support for large devices and files on 32-bit archs Enable by default support for large devices and files (CONFIG_LBD): - With 1TB disks being a commodity hardware it is quite easy to hit 2TB limitation while building RAIDs etc. and many distros have been using CONFIG_LBD=y by default already (at least Fedora 10 and openSUSE 11.1). - This should also prevent a subtle ext4 filesystem compatibility issue: mke2fs.ext4 defaults to creating filesystems with huge_files feature enabled and such filesystems cannot be later mounted read-write on machines with CONFIG_LBD=n (it should be quite easy to hit this issue when trying to use filesystem created using distro kernel on system running the self-build kernel, think about USB disk enclosures & co.). While at it: - Clarify config option help text w.r.t. mounting ext4 filesystems (they can be mounted with CONFIG_LBD=n but in the read-only mode). Cc: "Theodore Ts'o" Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Jens Axboe commit 586cf2681f527ce8b85b9bd57c8b9f7945fbe051 Author: Tejun Heo Date: Tue Apr 21 12:16:56 2009 +0900 ide-dma: don't reset request fields on dma_timeout_retry() Impact: drop unnecessary code Now that everything uses bio and block operations, there is no need to reset request fields manually when retrying a request. Every field is guaranteed to be always valid. Drop unnecessary request field resetting from ide_dma_timeout_retry(). Signed-off-by: Tejun Heo commit 5ad960fe8d0e4f99fe2b8dded45e8251137293c9 Author: Tejun Heo Date: Sun Apr 19 08:46:03 2009 +0900 ide: drop rq->data handling from ide_map_sg() Impact: remove code path which is no longer necessary All IDE data transfers now use rq->bio. Simplify ide_map_sg() accordingly. Signed-off-by: Tejun Heo Cc: Jens Axboe commit 29d1a4371035e01b0d079bc5aa88b50f5af7a566 Author: Tejun Heo Date: Sun Apr 19 08:46:03 2009 +0900 ide-atapi: kill unused fields and callbacks Impact: remove fields and code paths which are no longer necessary Now that ide-tape uses standard mechanisms to transfer data, special case handling for bh handling can be dropped from ide-atapi. Drop the followings. * pc->cur_pos, b_count, bh and b_data * drive->pc_update_buffers() and pc_io_buffers(). Signed-off-by: Tejun Heo commit 4344d07fb8dbf0cbfec1f7d7c1afeccaceaaa120 Author: Tejun Heo Date: Sun Apr 19 08:46:03 2009 +0900 ide-tape: simplify read/write functions Impact: cleanup idetape_chrdev_read/write() functions are unnecessarily complex when everything can be handled in a single loop. Collapse idetape_add_chrdev_read/write_request() into the rw functions and simplify the implementation. Signed-off-by: Tejun Heo commit 71294cf93d22ceaa75448cc6ebee2c65897be8c2 Author: Tejun Heo Date: Sun Apr 19 08:46:03 2009 +0900 ide-tape: use byte size instead of sectors on rw issue functions Impact: cleanup Byte size is what most issue functions deal with, make idetape_queue_rw_tail() and its wrappers take byte size instead of sector counts. idetape_chrdev_read() and write() functions are converted to use tape->buffer_size instead of ctl from tape->cap. This cleans up code a little bit and will ease the next r/w reimplementation. Signed-off-by: Tejun Heo commit 3596b66452491a3cff26256a5e6e6061a66c4142 Author: Tejun Heo Date: Sun Apr 19 08:46:02 2009 +0900 ide-tape: unify r/w init paths Impact: cleanup Read and write init paths are almost identical. Unify them into idetape_init_rw(). Signed-off-by: Tejun Heo commit 6cf3d545f7d71b183e5b89960d4cc850a42c410d Author: Tejun Heo Date: Sun Apr 19 08:46:02 2009 +0900 ide-tape: kill idetape_bh Impact: kill now unnecessary idetape_bh With everything using standard mechanisms, there is no need for idetape_bh anymore. Kill it and use tape->buf, cur and valid to describe data buffer instead. Changes worth mentioning are... * idetape_queue_rq_tail() now always queue tape->buf and and adjusts buffer state properly before completion. * idetape_pad_zeros() clears the buffer only once. Signed-off-by: Tejun Heo commit e998f30b45efb99a3c3ce7b5483f76317a17abed Author: Tejun Heo Date: Sun Apr 19 08:46:02 2009 +0900 ide-tape: use standard data transfer mechanism Impact: use standard way to transfer data ide-tape uses rq in an interesting way. For r/w requests, rq->special is used to carry a private buffer management structure idetape_bh and rq->nr_sectors and current_nr_sectors are initialized to the number of idetape blocks which isn't necessary 512 bytes. Also, rq->current_nr_sectors is used to report back the residual count in units of idetape blocks. This peculiarity taxes both block layer and ide. ide-atapi has different paths and hooks to accomodate it and what a rq means becomes quite confusing and making changes at the block layer becomes quite difficult and error-prone. This patch makes ide-tape use bio instead. With the previous patch, ide-tape currently is using single contiguos buffer so replacing it isn't difficult. Data buffer is mapped into bio using blk_rq_map_kern() in idetape_queue_rw_tail(). idetape_io_buffers() and idetape_update_buffers() are dropped and pc->bh is set to null to tell ide-atapi to use standard data transfer mechanism and idetape_bh byte counts are updated by the issuer on completion using the residual count. This change also nicely removes the FIXME in ide_pc_intr() where ide-tape rqs need to be completed using ide_rq_bytes() instead of blk_rq_bytes() (although this didn't really matter as the request didn't have bio). Signed-off-by: Tejun Heo Cc: Jens Axboe commit 7b13354eeaabaf6283b8c669a7d67d104ce7c638 Author: Tejun Heo Date: Sun Apr 19 08:46:02 2009 +0900 ide-tape: use single continuous buffer Impact: simpler buffer allocation and handling, kills OOM, fix DMA transfers ide-tape has its own multiple buffer mechanism using struct idetape_bh. It allocates buffer with decreasing order-of-two allocations so that it results in minimum number of segments. However, the implementation is quite complex and works in a way that no other block or ide driver works necessitating a lot of special case handling. The benefit this complex allocation scheme brings is questionable as PIO or DMA the number of segments (16 maximum) doesn't make any noticeable difference and it also doesn't negate the need for multiple order allocation which can fail under memory pressure or high fragmentation although it does lower the highest order necessary by one when the buffer size isn't power of two. As the first step to remove the custom buffer management, this patch makes ide-tape allocate single continous buffer. The maximum order is four. I doubt the change would cause any trouble but if it ever matters, it should be converted to regular sg mechanism like everyone else and even in that case dropping custom buffer handling and moving to standard mechanism first make sense as an intermediate step. This patch makes the first bh to contain the whole buffer and drops multi bh handling code. Following patches will make further changes. This patch has the side effect of killing OOM triggered by allocation path and fixing DMA transfers. Previously, bug in alloc path triggered OOM on command issue and commands were passed to DMA engine without DMA-mapping all the segments. Signed-off-by: Tejun Heo commit eb6a61bb9543aa54d62595e27206b3d3c0293bcc Author: Tejun Heo Date: Sun Apr 19 08:46:02 2009 +0900 ide-atapi,tape,floppy: allow ->pc_callback() to change rq->data_len Impact: allow residual count implementation in ->pc_callback() rq->data_len has two duties - carrying the number of input bytes on issue and carrying residual count back to the issuer on completion. ide-atapi completion callback ->pc_callback() is the right place to do this but currently ide-atapi depends on rq->data_len carrying the original request size after calling ->pc_callback() to complete the pc request. This patch makes ide_pc_intr(), ide_tape_issue_pc() and ide_floppy_issue_pc() cache length to complete before calling ->pc_callback() so that it can modify rq->data_len as necessary. Note: As using rq->data_len for two purposes can make cases like this incorrect in subtle ways, future changes will introduce separate field for residual count. Signed-off-by: Tejun Heo Cc: Jens Axboe commit 08f370f0a2fb223bf48d0bfa2a173be0393c19dc Author: Tejun Heo Date: Sun Apr 19 08:46:02 2009 +0900 ide-tape,floppy: fix failed command completion after request sense Impact: fix infinite retry loop After a command failed, ide-tape and floppy inserts REQUEST_SENSE in front of the failed command and according to the result, sets pc->retries, flags and errors. After REQUEST_SENSE is complete, the failed command is again at the front of the queue and if the verdict was to terminate the request, the issue functions tries to complete it directly by calling drive->pc_callback() and returning ide_stopped. However, drive->pc_callback() doesn't complete a request. It only prepares for completion of the request. As a result, this creates an infinite loop where the failed request is retried perpetually. Fix it by actually ending the request by calling ide_complete_rq(). Signed-off-by: Tejun Heo commit 765139ef5f1a4b1d5cb1f1a7a12de7ee61f6500f Author: Tejun Heo Date: Sun Apr 19 07:00:43 2009 +0900 ide-pm: don't abuse rq->data Impact: cleanup rq->data usage ide-pm uses rq->data to carry pointer to struct request_pm_state through request queue and rq->special is used to carray pointer to local struct ide_cmd, which isn't necessary. Use rq->special for request_pm_state instead and use local ide_cmd in ide_start_power_step(). Signed-off-by: Tejun Heo Cc: Jens Axboe commit 02e7cf8f848841ca21864ccd019e480b73c323b7 Author: Tejun Heo Date: Sun Apr 19 07:00:42 2009 +0900 ide-cd,atapi: use bio for internal commands Impact: unify request data buffer handling rq->data is used mostly to pass kernel buffer through request queue without using bio. There are only a couple of places which still do this in kernel and converting to bio isn't difficult. This patch converts ide-cd and atapi to use bio instead of rq->data for request sense and internal pc commands. With previous change to unify sense request handling, this is relatively easily achieved by adding blk_rq_map_kern() during sense_rq prep and PC issue. If blk_rq_map_kern() fails for sense, the error is deferred till sense issue and aborts the failed command which triggered the sense. Note that this is a slim possibility as sense prep is done on each command issue, so for the above condition to actually trigger, all preps since the last sense issue till the issue of the request which would require a sense should fail. * do_request functions might sleep now. This should be okay as ide request_fn - do_ide_request() - is invoked only from make_request and plug work. Make sure this is the case by adding might_sleep() to do_ide_request(). * Functions which access the read sense data before the sense request is complete now should access bio_data(sense_rq->bio) as the sense buffer might have been copied during blk_rq_map_kern(). * ide-tape updated to map sg. * cdrom_do_block_pc() now doesn't have to deal with REQ_TYPE_ATA_PC special case. Simplified. * tp_ops->output/input_data path dropped from ide_pc_intr(). Signed-off-by: Tejun Heo commit 068753203e6cd085664a62e0fc0636e19b148a12 Author: Borislav Petkov Date: Sun Apr 19 07:00:42 2009 +0900 ide-atapi: convert ide-{floppy,tape} to using preallocated sense buffer Since we're issuing REQ_TYPE_SENSE now we need to allow those types of rqs in the ->do_request callbacks. As a future improvement, sense_len assignment might be unified across all ATAPI devices. Borislav to check with specs and test. As a result, get rid of ide_queue_pc_head() and drive->request_sense_rq. tj: * Init request sense ide_atapi_pc from sense request. In the longer timer, it would probably better to fold ide_create_request_sense_cmd() into its only current user - ide_floppy_get_format_progress(). * ide_retry_pc() no longer takes @disk. CC: Bartlomiej Zolnierkiewicz CC: FUJITA Tomonori Signed-off-by: Borislav Petkov Signed-off-by: Tejun Heo commit c457ce874a0f3dfa3d5e9f2309789f6f34e24325 Author: Borislav Petkov Date: Sun Apr 19 07:00:42 2009 +0900 ide-cd: convert to using generic sense request Preallocate a sense request in the ->do_request method and reinitialize it only on demand, in case it's been consumed in the IRQ handler path. The reason for this is that we don't want to be mapping rq to bio in the IRQ path and introduce all kinds of unnecessary hacks to the block layer. tj: * Both user and kernel PC requests expect sense data to be stored in separate storage other than drive->sense_data. Copy sense data to rq->sense on completion if rq->sense is not NULL. This fixes bogus sense data on PC requests. As a result, remove cdrom_queue_request_sense. CC: Bartlomiej Zolnierkiewicz CC: FUJITA Tomonori Signed-off-by: Borislav Petkov Signed-off-by: Tejun Heo commit e69d800f7e8797a8e3423380ee9d8ca1cb90c388 Author: Borislav Petkov Date: Sun Apr 19 07:00:42 2009 +0900 ide: add helpers for preparing sense requests This is in preparation of removing the queueing of a sense request out of the IRQ handler path. Use struct request_sense as a general sense buffer for all ATAPI devices ide-{floppy,tape,cd}. tj: * blk_get_request(__GFP_WAIT) can't be called from do_request() as it can cause deadlock. Converted to use inline struct request and blk_rq_init(). * Added xfer / cdb len selection depending on device type. * All sense prep logics folded into ide_prep_sense() which never fails. * hwif->rq clearing and sense_rq used handling moved into ide_queue_sense_rq(). * blk_rq_map_kern() conversion is moved to later patch. CC: Bartlomiej Zolnierkiewicz CC: FUJITA Tomonori Signed-off-by: Borislav Petkov Signed-off-by: Tejun Heo commit 1f181d2b1569dfb88a584a6e1847e9e1c7645951 Author: Tejun Heo Date: Sun Apr 19 07:00:42 2009 +0900 ide-cd: don't abuse rq->buffer Impact: rq->buffer usage cleanup ide-cd uses rq->buffer to carry pointer to the original request when issuing REQUEST_SENSE. Use rq->special instead. Signed-off-by: Tejun Heo Cc: Jens Axboe commit ac0b0113ddbab3ed2388132d368c97292f9f3c84 Author: Tejun Heo Date: Sun Apr 19 07:00:42 2009 +0900 ide-atapi: don't abuse rq->buffer Impact: rq->buffer usage cleanup ide-atapi uses rq->buffer as private opaque value for internal special requests. rq->special isn't used for these cases (the only case where rq->special is used is for ide-tape rw requests). Use rq->special instead. Signed-off-by: Tejun Heo Cc: Jens Axboe commit d868ca24302e99a0e8a86071ca2c66273edf97d9 Author: Tejun Heo Date: Sun Apr 19 07:00:42 2009 +0900 ide-taskfile: don't abuse rq->buffer Impact: rq->buffer usage cleanup ide_raw_taskfile() directly uses rq->buffer to carry pointer to the data buffer. This complicates both block interface and ide backend request handling. Use blk_rq_map_kern() instead and drop special handling for REQ_TYPE_ATA_TASKFILE from ide_map_sg(). Note that REQ_RW setting is moved upwards as blk_rq_map_kern() uses it to initialize bio rw flag. Signed-off-by: Tejun Heo Cc: Jens Axboe commit 8968932e54db35cf9d69cfbbd50c26dfaaa586c7 Author: Tejun Heo Date: Sun Apr 19 07:00:42 2009 +0900 ide-floppy: block pc always uses bio Impact: remove unnecessary code path Block pc requests always use bio and rq->data is always NULL. No need to worry about !rq->bio cases in idefloppy_block_pc_cmd(). Note that ide-atapi uses ide_pio_bytes() for bio PIO transfer which handle sg fine. Signed-off-by: Tejun Heo Cc: Jens Axboe commit 59a4f6f355fc718581ddcf1bb45a469d4756c035 Author: Tejun Heo Date: Sun Apr 19 07:00:41 2009 +0900 ide-cd: clear sense buffer before issuing request sense Impact: code simplification ide_cd_request_sense_fixup() clears the tail of the sense buffer if the device didn't completely fill it. This patch makes cdrom_queue_request_sense() clear the sense buffer before issuing the command instead of clearing it afterwards. This simplifies code and eases future changes. Signed-off-by: Tejun Heo commit 214ae19104141404f18ad6651752eb38e3dd584e Author: Tejun Heo Date: Sun Apr 19 07:00:41 2009 +0900 ide kill unused ide_cmd->special Impact: removal of unused field No one uses ide_cmd->special anymore. Kill it. Signed-off-by: Tejun Heo commit b2963ac1738542d30305d7e12c8c078a383a425c Author: Tejun Heo Date: Sun Apr 19 07:00:41 2009 +0900 ide: don't set REQ_SOFTBARRIER ide doesn't have to worry about REQ_SOFTBARRIER. Don't set it. Signed-off-by: Tejun Heo commit 220d06b5531e7b8a6226b2fdfb21198c3ccc4f76 Author: Tejun Heo Date: Sun Apr 19 07:00:41 2009 +0900 ide: use blk_run_queue() instead of blk_start_queueing() blk_start_queueing() is being phased out in favor of [__]blk_run_queue(). Switch. Signed-off-by: Tejun Heo commit 0de57fb93b1daaeaecb658a98b3299ae460c02e9 Author: Tejun Heo Date: Sun Apr 19 07:00:41 2009 +0900 ide-tape: remove back-to-back REQUEST_SENSE detection Impact: fix an oops which always triggers ide_tape_issue_pc() assumed drive->pc isn't NULL on invocation when checking for back-to-back request sense issues but drive->pc can be NULL and even when it's not NULL, it's not safe to dereference it once the previous command is complete because pc could have been freed or was on stack. Kill back-to-back REQUEST_SENSE detection. Signed-off-by: Tejun Heo commit 924cec7789f65ab7f022256f6533ecba0747b5f3 Author: Tejun Heo Date: Sun Apr 19 07:00:41 2009 +0900 block: clear req->errors on bio completion only for fs requests Impact: subtle behavior change For fs requests, rq is only carrier of bios and rq error status as a whole doesn't mean much. This is the reason why rq->errors is being cleared on each partial completion of a request as on each partial completion the error status is transferred to the respective bios. For pc requests, rq->errors is used to carry error status to the issuer and thus __end_that_request_first() doesn't clear it on such cases. The condition was fine till now as only fs and pc requests have used bio and thus the bio completion path. However, future changes will unify data accesses to bio and all non fs users care about rq error status. Clear rq->errors on bio completion only for fs requests. In general, the implicit clearing is a bit too subtle especially as the meaning of rq->errors is completely dependent on low level drivers. Unifying / cleaning up rq->errors usage and letting llds manage it would be better. TODO comment added. Signed-off-by: Tejun Heo Acked-by: Jens Axboe commit e686307fdc84f249490e6c9da92fcb2424491f14 Author: Akinobu Mita Date: Fri Apr 17 08:41:21 2009 +0200 loop: use BIO list management functions Now that the bio list management stuff is generic, convert loop to use bio lists instead of its own private bio list implementation. Cc: Jens Axboe Cc: Christoph Hellwig Signed-off-by: Akinobu Mita Signed-off-by: Jens Axboe commit e93b9fb7d85da4fd9d5171649e5ddcac1dd572bf Author: Tejun Heo Date: Tue Apr 28 12:38:33 2009 +0900 hd: fix locking hd dance around local irq and HD_IRQ enable without achieving much. It ends up transferring data from irq handler with both local irq and HD_IRQ disabled. The only place it actually does something is while transferring the first block of a request which it does with HD_IRQ disabled but local irq enabled. Unfortunately, the dancing is horribly broken from locking POV. IRQ and timeout handlers access block queue without grabbing the queue lock and running the driver in SMP configuration crashes the whole machine pretty quickly. Remove meaningless irq enable/disable dancing and add proper locking in issue, irq and timeout paths. Signed-off-by: Tejun Heo commit 7090a0a97f55cbf47547a140fcc5a349f32c598c Author: Bartlomiej Zolnierkiewicz Date: Tue Apr 28 12:38:33 2009 +0900 mg_disk: fix CONFIG_LBD=y warning drivers/block/mg_disk.c: In function ‘mg_dump_status’: drivers/block/mg_disk.c:265: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘sector_t’ [ Impact: kill build warning ] Cc: unsik Kim Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Tejun Heo commit ac2ff946a53e7bd0ae98f4e5d1d6c1b1dced82e5 Author: Tejun Heo Date: Tue Apr 28 12:38:32 2009 +0900 mg_disk: fix locking IRQ and timeout handlers call functions which expect locked queue lock without locking it. Fix it. While at it, convert 0s used as null pointer constant to NULLs. [ Impact: fix locking, cleanup ] Signed-off-by: Tejun Heo Cc: unsik Kim commit 6be01cfb854818298753bfce65543dbc81d51d5a Author: Mark Brown Date: Mon Apr 27 20:57:42 2009 +0100 ASoC: Staticise TLV values in WM8940 Signed-off-by: Mark Brown commit 2625240d0732ac259591ed54371bc01e7bbfdd14 Merge: 1a4ba05 0c95de7 Author: Mark Brown Date: Mon Apr 27 20:47:35 2009 +0100 Merge branch 'for-2.6.30' into for-2.6.31 commit 1a4ba05ec8369d62c10155a8931e81267bfbd31c Author: Daniel Mack Date: Fri Apr 24 16:37:45 2009 +0200 ASoC: cs4270: add Master Playback Switch This adds a new control named 'Master Playback Switch' for cs4270 codecs. It is implemented using the new SOC_DOUBLE_EXT macro to catch the put function and store the information about manually set mute controls from userspace. When a manual mute is set, we don't want the soc core to un-mute the outputs. Renamed cs4270_mute() to cs4270_dai_mute() to avoid confusion. Signed-off-by: Daniel Mack Acked-by: Timur Tabi Signed-off-by: Mark Brown commit 9c935386512a3faa1be1c3d81cba38b7259a43f5 Author: Daniel Mack Date: Fri Apr 24 15:00:25 2009 +0200 ASoC: cs4270: fix Master Capture Switch polarity The control modifies the MUTE register, hence the polarity must be inverted. Signed-off-by: Daniel Mack Acked-By: Timur Tabi Signed-off-by: Mark Brown commit 0b5e92c5e020ee7437fa5304a8451d6dd08d1a26 Author: Jonathan Cameron Date: Mon Apr 27 13:49:44 2009 +0000 ASoC WM8940 Driver Signed-off-by: Jonathan Cameron Signed-off-by: Mark Brown commit a7be4d92d989fc53d840d24cba2ebea9e5ad8480 Author: Mark Brown Date: Mon Apr 27 20:24:15 2009 +0100 ASoC: Use our registration function for S3C64xx Make sure we get the DAI operations initialised. Signed-off-by: Mark Brown commit 5c556a6e190897a0f1ff14e13722591828412031 Author: Mark Brown Date: Mon Apr 27 20:23:19 2009 +0100 ASoC: s3c-i2s-v2 diagnostic improvements Say what invalid values we're seeing when we see an invalid value and ensure that errors are displayed by default. Signed-off-by: Mark Brown commit 008db442efa542357314593c71ab9966be909855 Author: Mark Brown Date: Mon Apr 27 19:17:08 2009 +0100 ASoC: Include WM8350 register definitions in CODEC header It's expected behaviour for the CODEC header to provide them but the WM8350 doesn't due to having all the registers together under drivers/mfd. Signed-off-by: Mark Brown commit 4bc4d8998a472cd64aa66a4abad3d833be901028 Author: Mark Brown Date: Mon Apr 27 14:28:44 2009 +0100 ASoC: Enforce symmetric rates for S3C64xx I2S interface There is only one LRCLK pin on each interface. Signed-off-by: Mark Brown commit 4a79ba34cada6a5a4ee86ed53aa8a73ba1e6fc51 Author: Takashi Iwai Date: Wed Apr 22 16:31:35 2009 +0200 ALSA: hda - Add amp initialization for realtek auto mode In the realtek auto-probing mode, the initialization of amp with some magic COEF or EAPD verbs is applied only when the codec SSID has valid values to satisfy the realtek's definition. However, many devices don't provide in that way, thus the device doesn't work as is. This patch allows the same initialization code even if the SSID doesn't pass the bit test. Also, alc_subsystem_id() is changed just to check and define the type, so that it's called in the parser, instead of the initializer. Signed-off-by: Takashi Iwai commit c2e0090c668fc99f5be65fd9907da781cb6a2ef5 Author: Jean-Christophe PLAGNIOL-VILLARD Date: Mon Apr 27 17:54:41 2009 +0900 sh: mach-r2d: add physmap-flash support for R2D+ boards. The RTS7751R2D_1 boards only support 1MB of socket-mounted MBM29F040 flash, which we just leave alone as it's not terribly interesting. This adds support for the s29gl256p on the r2d+ boards that makes a bit more sense to expose to the user. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Paul Mundt commit 47c8a08bbe77ad3c06f63919a14b0f0b0cd54390 Author: Paul Mundt Date: Mon Apr 27 17:34:39 2009 +0900 sh: rtc-generic support. This adds rtc-generic support for SUPERH32. Signed-off-by: Paul Mundt commit e0e42142bab96404de535cceb85d6533d5ad7942 Author: Yinghai Lu Date: Sun Apr 26 23:39:38 2009 -0700 x86: Use dmi check in apic_is_clustered() on 64-bit to mark the TSC unstable We will have systems with 2 and more sockets 8cores/2thread, but we treat them as multi chassis - while they could have a stable TSC domain. Use DMI check instead. [ Impact: do not turn possibly stable TSCs off incorrectly ] Signed-off-by: Yinghai Lu Cc: Ravikiran Thirumalai LKML-Reference: <49F5532A.5000802@kernel.org> Signed-off-by: Ingo Molnar commit b2ba83ff4f4405cebc10884121ee71338a1a6c94 Author: Yinghai Lu Date: Sun Apr 26 23:38:08 2009 -0700 x86: apic: Remove duplicated macros XAPIC_DEST_* is dupliicated to the one in apicdef.h [ Impact: cleanup ] Signed-off-by: Yinghai Lu LKML-Reference: <49F552D0.5050505@kernel.org> Signed-off-by: Ingo Molnar commit 148be2c15d4a866fbc7a8f55342e4fd4de73be61 Author: Ingo Molnar Date: Mon Apr 27 08:02:14 2009 +0200 perf_counter tools: move helper library to util/* Clean up the top level directory a bit by moving all the helper libraries to util/*.[ch]. Signed-off-by: Ingo Molnar commit 5be7c0a4d3dfe25091f2e4e524103e81d9e7e180 Author: Paul Mundt Date: Mon Apr 27 14:40:47 2009 +0900 sh: select GENERIC_TIME for new CMT driver. Signed-off-by: Paul Mundt commit fc4967b8c6a1540ebce9ac48e44b8d44e7fac971 Author: Paul Mundt Date: Mon Apr 27 14:06:26 2009 +0900 sh: update defconfigs for PCI changes. Signed-off-by: Paul Mundt commit 51b26ada79b605ed709ddcedbb6012e8f8e0ebed Author: Linus Torvalds Date: Sun Apr 26 10:12:47 2009 -0700 x86: unify arch/x86/boot/compressed/vmlinux_*.lds Look at the: diff -u arch/x86/boot/compressed/vmlinux_*.lds output and realize that they're basially exactly the same except for trivial naming differences, and the fact that the 64-bit version has a "pgtable" thing. So unify them. There's some trivial cleanup there (make the output format a Kconfig thing rather than doing #ifdef's for it, and unify both 32-bit and 64-bit BSS end to "_ebss", where 32-bit used to use the traditional "_end"), but other than that it's really very mindless and straigt conversion. For example, I think we should aim to remove "startup_32" vs "startup_64", and just call it "startup", and get rid of one more difference. I didn't do that. Also, notice the comment in the unified vmlinux.lds.S talks about "head_64" and "startup_32" which is an odd and incorrect mix, but that was actually what the old 64-bit only lds file had, so the confusion isn't new, and now that mixing is arguably more accurate thanks to the vmlinux.lds.S file being shared between the two cases ;) [ Impact: cleanup, unification ] Signed-off-by: Linus Torvalds Acked-by: Sam Ravnborg Signed-off-by: Ingo Molnar commit 0a3ec21fcd311b26ab0f249d62960e127bc20ca8 Author: Sam Ravnborg Date: Sun Apr 26 23:07:42 2009 +0200 x86: beautify vmlinux_64.lds.S Beautify vmlinux_64.lds.S: - Use tabs for indent - Located curly braces like in C code - Rearranged a few comments There is no functional changes in this patch The beautification is done to prepare a unification of the _32 and the _64 variants of the linker scripts. [ Impact: cleanup ] Signed-off-by: Sam Ravnborg Cc: Tim Abbott Cc: Linus Torvalds LKML-Reference: <20090426210742.GA3464@uranus.ravnborg.org> Signed-off-by: Ingo Molnar commit 339b042bb408877dcb734d896cdb52dd20600aab Merge: 19bdc9d 6b34808 3e98f9f Author: Paul Mundt Date: Mon Apr 27 09:45:43 2009 +0900 Merge branches 'sh/stable-updates' and 'sh/pci-rework' commit 701970b3a83cc639c1ec8fc6f40a7871cb99426f Author: Steven Rostedt Date: Fri Apr 24 23:11:22 2009 -0400 tracing/events: make modules have their own file_operations structure For proper module reference counting, the file_operations that modules use must have the "owner" field set to the module. Unfortunately, the trace events use share file_operations. The same file_operations are used by all both kernel core and all modules. This patch makes the modules allocate their own file_operations and copies the functions from the core kernel. This allows those file operations to be owned by the module. Care is taken to free this code on module unload. Thanks to Greg KH for reminding me that file_operations must be owned by the module to have reference counting take place. [ Impact: fix modular tracepoints / potential crash ] Signed-off-by: Steven Rostedt Acked-by: Greg Kroah-Hartman commit 32ed5058ce90024efcd811254b4b1de0468099df Author: Theodore Ts'o Date: Sat Apr 25 22:53:39 2009 -0400 ext4: Replace lock/unlock_super() with an explicit lock for resizing Use a separate lock to protect s_groups_count and the other block group descriptors which get changed via an on-line resize operation, so we can stop overloading the use of lock_super(). Signed-off-by: "Theodore Ts'o" commit 3b9d4ed26680771295d904a6b83e88e620780893 Author: Theodore Ts'o Date: Sat Apr 25 22:54:04 2009 -0400 ext4: Replace lock/unlock_super() with an explicit lock for the orphan list Use a separate lock to protect the orphan list, so we can stop overloading the use of lock_super(). Signed-off-by: "Theodore Ts'o" commit a63c9eb2ce6f5028da90f282798232c4f398ceb8 Author: Theodore Ts'o Date: Fri May 1 01:59:42 2009 -0400 ext4: ext4_mark_recovery_complete() doesn't need to use lock_super The function ext4_mark_recovery_complete() is called from two call paths: either (a) while mounting the filesystem, in which case there's no danger of any other CPU calling write_super() until the mount is completed, and (b) while remounting the filesystem read-write, in which case the fs core has already locked the superblock. This also allows us to take out a very vile unlock_super()/lock_super() pair in ext4_remount(). Signed-off-by: "Theodore Ts'o" commit 114e9fc90703bd6aac0229fb559e97caa6c49770 Author: Theodore Ts'o Date: Sat Apr 25 15:48:07 2009 -0400 ext4: Remove outdated comment about lock_super() ext4_fill_super() is no longer called by read_super(), and it is no longer called with the superblock locked. The unlock_super()/lock_super() is no longer present, so this comment is entirely superfluous. Signed-off-by: "Theodore Ts'o" commit 8df9675f8b498d0bfa1f0b5b06f56bf1ff366dd5 Author: Theodore Ts'o Date: Fri May 1 08:50:38 2009 -0400 ext4: Avoid races caused by on-line resizing and SMP memory reordering Ext4's on-line resizing adds a new block group and then, only at the last step adjusts s_groups_count. However, it's possible on SMP systems that another CPU could see the updated the s_group_count and not see the newly initialized data structures for the just-added block group. For this reason, it's important to insert a SMP read barrier after reading s_groups_count and before reading any (for example) the new block group descriptors allowed by the increased value of s_groups_count. Unfortunately, we rather blatently violate this locking protocol documented in fs/ext4/resize.c. Fortunately, (1) on-line resizes happen relatively rarely, and (2) it seems rare that the filesystem code will immediately try to use just-added block group before any memory ordering issues resolve themselves. So apparently problems here are relatively hard to hit, since ext3 has been vulnerable to the same issue for years with no one apparently complaining. Signed-off-by: "Theodore Ts'o" commit 9ca92389c5312a51e819c15c762f0abdc7f3129b Author: Theodore Ts'o Date: Fri May 1 12:52:25 2009 -0400 ext4: Use separate super_operations structure for no_journal filesystems By using a separate super_operations structure for filesystems that have and don't have journals, we can simply ext4_write_super() --- which is only needed when no journal is present --- and ext4_freeze(), ext4_unfreeze(), and ext4_sync_fs(), which are only needed when the journal is present. Signed-off-by: "Theodore Ts'o" commit 7234ab2a55e77784b44cf2d862136d9e41b8d98a Author: Theodore Ts'o Date: Thu Apr 30 21:24:04 2009 -0400 ext4: Fix and simplify s_dirt handling The s_dirt flag wasn't completely handled correctly, but it didn't really matter when journalling was enabled. It turns out that when ext4 runs without a journal, we don't clear s_dirt in places where we should have, with the result that the high-level write_super() function was writing the superblock when it wasn't necessary. So we fix this by making ext4_commit_super() clear the s_dirt flag, and removing many of the other places where s_dirt is manipulated. When journalling is enabled, the s_dirt flag might be left set more often, but s_dirt really doesn't matter when journalling is enabled. Signed-off-by: "Theodore Ts'o" commit e2d670523c6c4ccb0fca9f3ab1b8f066d9aa57d6 Author: Theodore Ts'o Date: Fri May 1 00:33:44 2009 -0400 ext4: Simplify ext4_commit_super()'s function signature The ext4_commit_super() function took both a struct super_block * and a struct ext4_super_block *, but the struct ext4_super_block can be derived from the struct super_block. Signed-off-by: "Theodore Ts'o" commit f7c439504ccba0cca43271e651013ab97a221c62 Author: Theodore Ts'o Date: Fri Apr 24 23:31:59 2009 -0400 ext4: Use is_power_of_2() for clarity Signed-off-by: Robert P. J. Day Signed-off-by: "Theodore Ts'o" commit c5ca7c7636fa689a9746b6032f83aa7fffec31c6 Author: Theodore Ts'o Date: Mon Apr 27 22:48:48 2009 -0400 ext4: Fallback to vmalloc if kmalloc can't allocate s_flex_groups array For very large filesystems, the s_flex_groups array can get quite big. For example, a filesystem that can be resized up to 16TB will have 8192 flex groups (assuming the default flex_bg size of 16), so the array is 96k, which is *very* marginal for kmalloc(). On the other hand, a 160GB filesystem without the resize_inode feature will only require 960 bytes. So we try to allocate the array first using kmalloc(), and if that fails, we'll try to use vmalloc() instead. Signed-off-by: "Theodore Ts'o" commit 29fa89d088941d79765d60f22d5ccdd6b8696e11 Author: Aneesh Kumar K.V Date: Tue May 12 16:30:27 2009 -0400 ext4: Mark the unwritten buffer_head as mapped during write_begin Setting BH_Unwritten buffer_heads as BH_Mapped avoids multiple (unnecessary) calls to get_block() during the call to the write(2) system call. Setting BH_Unwritten buffer heads as BH_Mapped requires that the writepages() functions can handle BH_Unwritten buffer_heads. After this commit, things work as follows: ext4_ext_get_block() returns unmapped, unwritten, buffer head when called with create = 0 for prealloc space. This makes sure we handle the read path and non-delayed allocation case correctly. Even though the buffer head is marked unmapped we have valid b_blocknr and b_bdev values in the buffer_head. ext4_da_get_block_prep() called for block resrevation will now return mapped, unwritten, new buffer_head for prealloc space. This avoids multiple calls to get_block() for write to same offset. By making such buffers as BH_New, we also assure that sub-block zeroing of buffered writes happens correctly. Signed-off-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" commit 8fb0e342481c4d80040670fec915f0b9c7c6499a Author: Aneesh Kumar K.V Date: Tue May 12 16:22:37 2009 -0400 vfs: Add BUG_ON for delayed and unwritten flags in submit_bh() The BH_Delay and BH_Unwritten flags should never leak out to submit_bh(). So add some BUG_ON() checks to submit_bh so we can get a stack trace and determine how and why this might have happened. (Note that only XFS and ext4 use these buffer head flags, and XFS does not use submit_bh(). So this patch should only modify behavior for ext4.) Signed-off-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" Cc: linux-fsdevel@vger.kernel.org commit 79ffab34391933ee3b95dac7f25c0478fa2f8f1e Author: Aneesh Kumar K.V Date: Wed May 13 15:13:42 2009 -0400 ext4: Properly initialize the buffer_head state These struct buffer_heads are allocated on the stack (and hence are initialized with stack garbage). They are only used to call a get_blocks() function, so that's mostly OK, but b_state must be initialized to be 0 so we don't have any unexpected BH_* flags set by accident, such as BH_Unwritten or BH_Delay. Signed-off-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" commit 060fa5c83e67901ba47ab484cfcdb32737d630ba Author: Steven Rostedt Date: Fri Apr 24 12:20:52 2009 -0400 tracing/events: reuse trace event ids after overflow With modules being able to add trace events, and the max trace event counter is 16 bits (65536) we can overflow the counter easily with a simple while loop adding and removing modules that contain trace events. This patch links together the registered trace events and on overflow searches for available trace event ids. It will still fail if over 65536 events are registered, but considering that a typical kernel only has 22000 functions, 65000 events should be sufficient. Reported-by: Li Zefan Signed-off-by: Steven Rostedt commit 008bec397cdabd22a6f4e4c16a746a86a046f8af Author: Mark Brown Date: Fri Apr 24 16:27:09 2009 +0100 ASoC: S3C2412: Failing to get the I2S clock is an error Signed-off-by: Mark Brown commit 172fd9e26200668ebaf3e1d6d09b36d5d531bfa6 Author: Mark Brown Date: Fri Apr 24 16:33:10 2009 +0100 ASoC: Fix S3C64xx IIS device registration and support both ports The S3C64xx IIS code had a number of problems with device registration. The hardware has two IIS ports of which the driver supported only one at once via a single exported DAI, attempting to identify the DAI to use based on the dev->id of the ASoC platform device. As well as limiting the driver to only supporting one IIS port at once this also meant that the ID of the soc-audio device (or in future the card device) had to match the IIS ID. Fix both problems by converting the driver to register the DAIs based on probing of platform devices registered by the arch/arm code, using those platform devices to interact with the clock API. Signed-off-by: Mark Brown commit 7629ad24f2b3df95c8b4cd8869e3c04e1df6c442 Author: Daniel Mack Date: Fri Apr 24 16:37:44 2009 +0200 ASoC: add SOC_DOUBLE_EXT macro Add a macro for double controls with special callback functions. Signed-off-by: Daniel Mack Signed-off-by: Mark Brown commit a8353a57299f965ca8747b1b062490aef2c9ca50 Author: Peter Ujfalusi Date: Fri Apr 24 11:03:21 2009 +0300 ASoC: Beagle: Add support for 4 channel This patch adds support for the four channel TDM mode on Beagle board. Depending on the channel count, the interface needs to be configured differently (I2S for stereo DSP_A for four channels) Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit b8e65554d80b4c560d201362d0e8fa02109d89fd Author: Steven Rostedt Date: Fri Apr 24 11:50:39 2009 -0400 tracing: remove deprecated TRACE_FORMAT The TRACE_FORMAT macro has been deprecated by the TRACE_EVENT macro. There are no more users. All new users must use the TRACE_EVENT macro. [ Impact: remove old functionality ] Cc: Peter Zijlstra Signed-off-by: Steven Rostedt commit 160031b556e93590fa8635210d73d93c3d3853a9 Author: Steven Rostedt Date: Fri Apr 24 11:26:55 2009 -0400 tracing/irq: convert irq traces to use TRACE_EVENT macro The TRACE_FORMAT will soon be deprecated. This patch converts it to the TRACE_EVENT macro. Note, this change should also speed up the tracing. [ Impact: remove a user of deprecated TRACE_FORMAT ] Cc: Jason Baron Signed-off-by: Steven Rostedt commit 39517091f88fae32b52254b561ced78da1eaf0a7 Author: Steven Rostedt Date: Fri Apr 24 11:05:52 2009 -0400 tracing/lockdep: convert lockdep to use TRACE_EVENT macro The TRACE_FORMAT will soon be deprecated. This patch converts it to the TRACE_EVENT macro. Note, this change should also speed up the tracing. [ Impact: remove a user of deprecated TRACE_FORMAT ] Cc: Peter Zijlstra Signed-off-by: Steven Rostedt commit 1cb81b143fa8f0e4629f10690862e2e52ca792ff Author: Markus Metzger Date: Fri Apr 24 09:51:43 2009 +0200 x86, bts, mm: clean up buffer allocation The current mm interface is asymetric. One function allocates a locked buffer, another function only refunds the memory. Change this to have two functions for accounting and refunding locked memory, respectively; and do the actual buffer allocation in ptrace. [ Impact: refactor BTS buffer allocation code ] Signed-off-by: Markus Metzger Acked-by: Andrew Morton Cc: Peter Zijlstra LKML-Reference: <20090424095143.A30265@sedona.ch.intel.com> Signed-off-by: Ingo Molnar commit 7e0bfad24d85de7cf2202a7b0ce51de11a077b21 Author: Markus Metzger Date: Fri Apr 24 09:44:48 2009 +0200 x86, bts: reenable ptrace branch trace support The races found by Oleg Nesterov have been fixed. Reenable branch trace support. Signed-off-by: Markus Metzger Acked-by: Oleg Nesterov LKML-Reference: <20090424094448.A30216@sedona.ch.intel.com> Signed-off-by: Ingo Molnar commit 782cc5ae6331d63b4febaa312c9d14493aafa9b8 Author: Markus Metzger Date: Fri Apr 24 09:43:09 2009 +0200 x86, ds: fix buffer alignment in debug store selftest The debug store selftest code uses a stack-allocated buffer, which is not necessarily correctly aligned. For tests using a buffer to hold a single entry, the buffer that is passed to ds_request must already be suitably aligned. Pass a suitably aligned portion of the bigger buffer. [ Impact: fix hw-branch-tracer self-test failure ] Signed-off-by: Markus Metzger Cc: markus.t.metzger@gmail.com LKML-Reference: <20090424094309.A30145@sedona.ch.intel.com> Signed-off-by: Ingo Molnar commit 416dfdcdb894432547ead4fcb9fa6a36b396059e Merge: 56449f4 0910697 Author: Ingo Molnar Date: Fri Apr 24 10:11:18 2009 +0200 Merge commit 'v2.6.30-rc3' into tracing/hw-branch-tracing Conflicts: arch/x86/kernel/ptrace.c Merge reason: fix the conflict above, and also pick up the CONFIG_BROKEN dependency change from upstream so that we can remove it here. Signed-off-by: Ingo Molnar commit 3e98f9f15e916c48dfc5231d7e6a59be7f122764 Author: Paul Mundt Date: Fri Apr 24 15:39:39 2009 +0900 sh: pci: Fix up the build for CONFIG_PCI=n. Signed-off-by: Paul Mundt commit 0cfcdedaddf2468cb53e3cff9c3abfef14b4d784 Author: Krzysztof Helt Date: Thu Apr 23 21:46:19 2009 +0200 ALSA: sc6000: fix older card initialization The last patch to handle newer cards like SC7000 broke initialization of the SC6000. Fix this. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai commit 334d4169a6592d3fcd863bbe822a8f6985ffa9af Author: Lai Jiangshan Date: Fri Apr 24 11:27:05 2009 +0800 ring_buffer: compressed event header RB_MAX_SMALL_DATA = 28bytes is too small for most tracers, it wastes an 'u32' to save the actually length for events which data size > 28. This fix uses compressed event header and enlarges RB_MAX_SMALL_DATA. [ Impact: saves about 0%-12.5%(depends on tracer) memory in ring_buffer ] Signed-off-by: Lai Jiangshan LKML-Reference: <49F13189.3090000@cn.fujitsu.com> Signed-off-by: Steven Rostedt commit c2518c4366f087ebc10b3919cb2461bbe4f42d0c Author: Steven Rostedt Date: Thu Apr 23 23:26:18 2009 -0400 tracing: fix cut and paste macro error In case a module uses the TRACE_EVENT macro for creating automated events in ftrace, it may choose to use a different file name than the defined system name, or choose to use a different path than the default "include/trace/events" include path. If this is done, then before including trace/define_trace.h the header would define either "TRACE_INCLUDE_FILE" for the file name or "TRACE_INCLUDE_PATH" for the include path. If it does not define these, then the define_trace.h defines them instead. If define trace defines them, then define_trace.h should also undefine them before exiting. To do this a macro is used to note this: #ifndef TRACE_INCLUDE_FILE # define TRACE_INCLUDE_FILE TRACE_SYSTEM # define UNDEF_TRACE_INCLUDE_FILE #endif [...] #ifdef UNDEF_TRACE_INCLUDE_FILE # undef TRACE_INCLUDE_FILE # undef UNDEF_TRACE_INCLUDE_FILE #endif The UNDEF_TRACE_INCLUDE_FILE acts as a CPP variable to know to undef the TRACE_INCLUDE_FILE before leaving define_trace.h. Unfortunately, due to cut and paste errors, the macros between FILE and PATH got mixed up. [ Impact: undef TRACE_INCLUDE_FILE and/or TRACE_INCLUDE_PATH when needed ] Signed-off-by: Steven Rostedt commit d7285c6b5c54397fdf112c2fb98ee43193173aa9 Author: Chris Wright Date: Thu Apr 23 10:21:38 2009 -0700 x86: use native register access for native tlb flushing currently these are paravirtulaized, doesn't appear any callers rely on this (no pv_ops backends are using native_tlb and overriding cr3/4 access). [ Impact: fix lockdep warning with paravirt and function tracer ] Signed-off-by: Chris Wright LKML-Reference: <20090423172138.GR3036@sequoia.sous-sol.org> Signed-off-by: Steven Rostedt commit 75db37d2f4c0ad9466ead57d467277d097b4105c Author: Steven Rostedt Date: Thu Mar 26 11:43:36 2009 -0400 tracing: add size checks for exported ftrace internal structures The events exported by TRACE_EVENT are automated and are guaranteed to be correct when used. The internal ftrace structures on the other hand are more manually exported. These require the ftrace maintainer to make sure they are up to date. This patch adds a size check to help flag when a type changes in an internal ftrace data structure, and the update needs to be reflected in the export. If a export is incorrect, then the only harm is that the user space tools will not know how to correctly read the internal structures of ftrace. [ Impact: help prevent inconsistent ftrace format print outs ] Signed-off-by: Steven Rostedt commit 89ec0dee9eba6275d47be0b878cf5f6d5c2fb6eb Author: Steven Rostedt Date: Thu Mar 26 11:03:29 2009 -0400 tracing: increase size of number of possible events With the new event tracing registration, we must increase the number of events that can be registered. Currently the type field is only one byte, which leaves us only 256 possible events. Since we do not save the CPU number in the tracer anymore (it is determined by the per cpu ring buffer that is used) we have an extra byte to use. This patch increases the size of type from 1 byte (256 events) to 2 bytes (65,536 events). It also adds a WARN_ON_ONCE if we exceed that limit. [ Impact: allow more than 255 events ] Signed-off-by: Steven Rostedt commit 9be24414aad047dcf9d8d2a9a929321536c7ebec Author: Steven Rostedt Date: Thu Mar 26 10:25:24 2009 -0400 tracing/wakeup: move access to wakeup_cpu into spinlock The code had the following outside the lock: if (next != wakeup_task) return; pc = preempt_count(); /* The task we are waiting for is waking up */ data = wakeup_trace->data[wakeup_cpu]; On initialization, wakeup_task is NULL and wakeup_cpu -1. This code is not under a lock. If wakeup_task is set on another CPU as that task is waking up, we can see the wakeup_task before wakeup_cpu is set. If we read wakeup_cpu while it is still -1 then we will have a bad data pointer. This patch moves the reading of wakeup_cpu within the protection of the spinlock used to protect the writing of wakeup_cpu and wakeup_task. [ Impact: remove possible race causing invalid pointer dereference ] Reported-by: Maneesh Soni Signed-off-by: Steven Rostedt commit b656eba122929881c52d38ae16637167aaa5b88b Merge: 24fc484 b930f96 Author: Bartlomiej Zolnierkiewicz Date: Thu Apr 23 22:56:58 2009 +0200 Merge branch 'for-linus' into for-next commit 8a1f936acdfd53cb0a981f3f80483863dcd84fa9 Author: Peter Ujfalusi Date: Thu Apr 23 14:36:49 2009 +0300 ASoC: TWL4030: Add 4 channel TDM support Support for 4 channel TDM (SND_SOC_DAIFMT_DSP_A) for twl4030 codec. The channel allocations are: Playback: TDM i2s TWL RX Channel 1 Left SDRL2 Channel 3 Right SDRR2 Channel 2 -- SDRL1 Channel 4 -- SDRR1 Capture: TDM i2s TWL TX Channel 1 Left TXL1 Channel 3 Right TXR1 Channel 2 -- TXL2 Channel 4 -- TXR2 Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 31a00c6b7c0c4f01be49f02660de920c8b82b613 Author: Peter Ujfalusi Date: Thu Apr 23 14:36:48 2009 +0300 ASoC: OMAP: Add 4 channel support to mcbsp Add 4 channel support to omap-mcbsp. This mode is going to be used by the twl4030 codec, when it is configured in Option1 mode. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit b933453f1965c1e3136cb5fd69abd6e6927fb5d7 Merge: 8eb9fea a396e32 Author: Mark Brown Date: Thu Apr 23 16:09:52 2009 +0100 Merge branch 'for-2.6.30' into for-2.6.31 commit 8eb9feabe566d8272510d5fb33f55a72e3ab3ce4 Author: Eric Miao Date: Thu Apr 23 17:57:46 2009 +0800 ASoC: change stereo/mono to 32-bit/16-bit for pxa-ssp The original idea came from pHilipp, and this makes the code looks more consistent. Signed-off-by: Eric Miao Signed-off-by: Mark Brown commit 049da6393fb30b62e418beb59a74dfcad513fc6d Merge: 2d7e71f 19ab054 Author: Mark Brown Date: Thu Apr 23 10:37:17 2009 +0100 Merge branch 'for-2.6.30' into for-2.6.31 commit 2d7e71fa231035d69faffbfe506ef23638385994 Author: Eric Miao Date: Thu Apr 23 17:05:38 2009 +0800 ASoC: simplify the SSP DMA parameters settings by run-time generation The SSP DMA parameters can actually be easily generated at run-time since they are almost similar except for the FIFO width and direction. Another benefit is the re-use of information from 'struct ssp_device', like SSDR physical FIFO address and DRCMR register index for both directions. Signed-off-by: Eric Miao Signed-off-by: Mark Brown Reviewed-by: pHilipp Zabel commit 1a787e7ad242312af0afb2156596d42ee5e0c6bc Author: Joonyoung Shim Date: Wed Apr 22 13:13:34 2009 +0900 ASoC: TWL4030: Add VDL path support Add DAPMs for VDL(Voice Down Link) path. To support VDL path, we have to change DAPMs of outputs(Earpiece, PreDrive Left/Right, Headset Left/Right, Carkit Left/Right) from mux to mixer. Signed-off-by: Joonyoung Shim Acked-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 291ce18ceb84aca79368369885eec2d329ae16c5 Author: Mark Brown Date: Wed Apr 22 21:36:14 2009 +0100 ASoC: Implement WM8903 digital sidetone support Signed-off-by: Mark Brown commit 727fb909e541ebd09d5b552afef02a147978c151 Author: Mark Brown Date: Wed Apr 22 21:06:14 2009 +0100 ASoC: Remove redundant rate constraint for WM8903 This is now handled by symmetric_rates. Signed-off-by: Mark Brown commit d7d5c5476a12333a33b7a14ebb10eccc729c01cb Author: Mark Brown Date: Wed Apr 22 21:03:50 2009 +0100 ASoC: Actively manage the DC servo for WM8903 Save a little extra power by enabling the DC servo offset correction for the output channels only when the relevant channels are enabled. Signed-off-by: Mark Brown commit 4dbfe8097157fde1f8054f48f991ea45833852cd Author: Mark Brown Date: Wed Apr 22 20:32:40 2009 +0100 ASoC: Optimise configuration of WM8903 DC servo Modify the default startup sequence in the chip to set the DC servo dither level for optimal performance. Signed-off-by: Mark Brown commit c2aef4ffd24dab5c8e94c66e4042ad39d38bcf39 Author: Mark Brown Date: Wed Apr 22 20:04:44 2009 +0100 ASoC: Support CLK_DSP in WM8903 CLK_DSP provides a master clock for the DAC and ADC related functionality on the device. Signed-off-by: Mark Brown commit 42768a12822c3a0a6d7db69445281db975938294 Author: Mark Brown Date: Wed Apr 22 18:39:39 2009 +0100 ASoC: Use DAPM supply widget for WM8903 charge pump Signed-off-by: Mark Brown commit 24fc484ab2291d242d1d6bfb5ca5b781061a8578 Merge: 2ecf0a5 83cff83 Author: Bartlomiej Zolnierkiewicz Date: Wed Apr 22 20:38:45 2009 +0200 Merge branch 'for-linus' into for-next commit 246d0a17f5e09af0794960164269fc8988a8811c Author: Mark Brown Date: Wed Apr 22 18:24:55 2009 +0100 ASoC: Add power supply widget to DAPM Many modern CODECs have shared resources on chip which must be enabled for portions of the chip to work but which can be disabled at other times in order to achieve power savings. Examples of such resources include power supplies and some internal clocks. Since these widgets are dependencies for the audio path but do not carry audio signals they require slightly different handling to most widgets - they do not contribute to the audio path and so should not be counted as either inputs or outputs during path walks. Cases where one supply provides a supply for another will require additional work. There is also room for more optimisation of the graph walking to avoid repeated checks for the same thing. Signed-off-by: Mark Brown commit 1b4246a1fc487370665bf6c55aac8eae379642c0 Author: Joonyoung Shim Date: Wed Apr 22 10:56:50 2009 +0900 ASoC: OMAP: Add checking to detect bufferless pcms Add checking in hw_params and prepare to detect bufferless pcms(i.e. BT <--> codec). Signed-off-by: Joonyoung Shim Signed-off-by: Mark Brown commit 6a74aa40907757ec98d8710ff66cd4cfe064e7d8 Author: Frederic Weisbecker Date: Wed Apr 22 00:41:09 2009 +0200 tracing/events: protect __get_str() The __get_str() macro is used in a code part then its content should be protected with parenthesis. [ Impact: make macro definition more robust ] Reported-by: Steven Rostedt Signed-off-by: Frederic Weisbecker commit 7e7ca9a22dbbc5c91763cd16923c7509918709b6 Author: Frederic Weisbecker Date: Sun Apr 19 04:54:49 2009 +0200 tracing/lock: provide lock_acquired event support for dynamic size string Now that we can support the dynamic sized string, make the lock tracing able to use it, making it safe against modules removal and consuming the right amount of memory needed for each lock name Changes in v2: adapt to the __ending_string() updates and the opening_string() removal. [ Impact: protect lock tracer against module removal ] Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Steven Rostedt commit 9cbf117662e24c6d33245666804487f92c21b59d Author: Frederic Weisbecker Date: Sun Apr 19 04:51:29 2009 +0200 tracing/events: provide string with undefined size support This patch provides the support for dynamic size strings on event tracing. The key concept is to use a structure with an ending char array field of undefined size and use such ability to allocate the minimal size on the ring buffer to make one or more string entries fit inside, as opposite to a fixed length strings with upper bound. The strings themselves are represented using fields which have an offset value from the beginning of the entry. This patch provides three new macros: __string(item, src) This one declares a string to the structure inside TP_STRUCT__entry. You need to provide the name of the string field and the source that will be copied inside. This will also add the dynamic size of the string needed for the ring buffer entry allocation. A stack allocated structure is used to temporarily store the offset of each strings, avoiding double calls to strlen() on each event insertion. __get_str(field) This one will give you a pointer to the string you have created. This is an abstract helper to resolve the absolute address given the field name which is a relative address from the beginning of the trace_structure. __assign_str(dst, src) Use this macro to automatically perform the string copy from src to dst. src must be a variable to assign and dst is the name of a __string field. Example on how to use it: TRACE_EVENT(my_event, TP_PROTO(char *src1, char *src2), TP_ARGS(src1, src2), TP_STRUCT__entry( __string(str1, src1) __string(str2, src2) ), TP_fast_assign( __assign_str(str1, src1); __assign_str(str2, src2); ), TP_printk("%s %s", __get_str(src1), __get_str(src2)) ) Of course you can mix-up any __field or __array inside this TRACE_EVENT. The position of the __string or __assign_str doesn't matter. Changes in v2: Address the suggestion of Steven Rostedt: drop the opening_string() macro and redefine __ending_string() to get the size of the string to be copied instead of overwritting the whole ring buffer allocation. Changes in v3: Address other suggestions of Steven Rostedt and Peter Zijlstra with some changes: drop the __ending_string and the need to have only one string field. Use offsets instead of absolute addresses. [ Impact: allow more compact memory usage for string tracing ] Signed-off-by: Frederic Weisbecker Cc: Steven Rostedt Cc: Li Zefan Cc: Peter Zijlstra commit ff166cb57a17124af75714a9c11f448f56f1a4a3 Author: Suresh Siddha Date: Mon Apr 20 13:02:30 2009 -0700 x86: x2apic, IR: remove reinit_intr_remapped_IO_APIC() When interrupt-remapping is enabled, we are relying on setup_IO_APIC_irqs() to configure remapped entries in the IO-APIC, which comes little bit later after enabling interrupt-remapping. Meanwhile, restoration of old io-apic entries after enabling interrupt-remapping will not make the interrupts through io-apic functional anyway. So remove the unnecessary reinit_intr_remapped_IO_APIC() step. The longer story: When interrupt-remapping is enabled, IO-APIC entries need to be setup in the re-mappable format (pointing to interrupt-remapping table entries setup by the OS). This remapping configuration is happening in the same place where we traditionally configure IO-APIC (i.e., in setup_IO_APIC_irqs()). So when we enable interrupt-remapping successfully, there is no need to restore old io-apic RTE entries before we actually do a complete configuration shortly in setup_IO_APIC_irqs(). Old IO-APIC RTE's may be in traditional format (non re-mappable) or in re-mappable format pointing to interrupt-remapping table entries setup by BIOS. Restoring both of these will not make IO-APIC functional. We have to rely on setup_IO_APIC_irqs() for proper configuration by OS. So I am removing this unnecessary and broken step. [ Impact: remove unnecessary/broken IO-APIC setup step ] Signed-off-by: Suresh Siddha Acked-by: Weidong Han Cc: dwmw2@infradead.org LKML-Reference: <20090420200450.552359000@linux-os.sc.intel.com> Signed-off-by: Ingo Molnar commit 7a4f453b6d7379a7c380825949977c5a838aa012 Author: Li Zefan Date: Wed Apr 22 16:53:34 2009 +0800 tracing/events: make struct trace_entry->type to be int type struct trace_entry->type is unsigned char, while trace event's id is int type, thus for a event with id >= 256, it's entry->type is cast to (id % 256), and then we can't see the trace output of this event. # insmod trace-events-sample.ko # echo foo_bar > /mnt/tracing/set_event # cat /debug/tracing/events/trace-events-sample/foo_bar/id 256 # cat /mnt/tracing/trace_pipe <...>-3548 [001] 215.091142: Unknown type 0 <...>-3548 [001] 216.089207: Unknown type 0 <...>-3548 [001] 217.087271: Unknown type 0 <...>-3548 [001] 218.085332: Unknown type 0 [ Impact: fix output for trace events with id >= 256 ] Signed-off-by: Li Zefan Acked-by: Frederic Weisbecker Cc: Steven Rostedt Cc: Tom Zanussi LKML-Reference: <49EEDB0E.5070207@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 19bdc9d061bcb71efd2b53083d96b59bbe1a1751 Author: Magnus Damm Date: Fri Apr 17 05:26:31 2009 +0000 clocksource: sh_cmt clocksource support Add clocksource support to the sh_cmt driver. With this in place we can do tickless with a single CMT channel. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 99ce567ba912109c78762246c964327f3f81f27d Merge: 8fb2bae ccc5ff9 Author: Paul Mundt Date: Wed Apr 22 09:27:47 2009 +0900 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 commit 3b1db01990f0e533d1ed548dc1796eb84beddc20 Merge: dfed0ef 5bd3729 Author: Takashi Iwai Date: Tue Apr 21 18:37:53 2009 +0200 Merge branch 'fix/hda' into topic/hda commit dfed0ef9b3ff9e37903920b6938ed33344ad0b3d Author: Takashi Iwai Date: Tue Apr 21 18:33:12 2009 +0200 ALSA: hda - Fix a typo in debug print for realtek auto-detection The NID and ASS numbers were swapped... Signed-off-by: Takashi Iwai commit 3554228d4289098a8fe5cfd87512ec32a19bbe5a Author: Steven Rostedt Date: Tue Apr 21 09:41:26 2009 -0400 ring-buffer: only warn on wrap if buffer is bigger than two pages On boot up, to save memory, ftrace allocates the minimum buffer which is two pages. Ftrace also goes through a series of tests (when configured) on boot up. These tests can fill up a page within a single interrupt. The ring buffer also has a WARN_ON when it detects that the buffer was completely filled within a single commit (other commits are allowed to be nested). Combine the small buffer on start up, with the tests that can fill more than a single page within an interrupt, this can trigger the WARN_ON. This patch makes the WARN_ON only happen when the ring buffer consists of more than two pages. [ Impact: prevent false WARN_ON in ftrace startup tests ] Reported-by: Ingo Molnar LKML-Reference: <20090421094616.GA14561@elte.hu> Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit a3b48c88f2d5a34c0e25aec0a3dab8069e5a9a72 Author: Takashi Iwai Date: Tue Apr 21 13:37:29 2009 +0200 ALSA: hda - minor optimization in hda_set_power_state() Check the target power-state before checking EAPD exception to reduce unneeded verb executions. Signed-off-by: Takashi Iwai commit f66578a7637b87810cbb9041c4e3a77fd2fa4706 Author: Li Zefan Date: Tue Apr 21 17:12:11 2009 +0800 tracing/filters: allow user-input to be integer-like string Suppose we would like to trace all tasks named '123', but this will fail: # echo 'parent_comm == 123' > events/sched/sched_process_fork/filter bash: echo: write error: Invalid argument Don't guess the type of the filter pred in filter_parse(), but instead we check it in __filter_add_pred(). [ Impact: extend allowed filter field string values ] Signed-off-by: Li Zefan Cc: Tom Zanussi Cc: Steven Rostedt Cc: Frederic Weisbecker LKML-Reference: <49ED8DEB.6000700@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit e8082f3f5a17d7a7bfc7dd1050a3f958dc034e9a Author: Li Zefan Date: Tue Apr 21 17:11:46 2009 +0800 tracing/filters: don't remove old filters when failed to write subsys->filter If writing subsys->filter returns EINVAL or ENOSPC, the original filters in subsys/ and subsys/events/ will be removed. This is definitely wrong. [ Impact: fix filter setting semantics on error condition ] Signed-off-by: Li Zefan Cc: Tom Zanussi Cc: Steven Rostedt Cc: Frederic Weisbecker LKML-Reference: <49ED8DD2.2070700@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit b97bedcdedb4ae95b2128a4770dfc160e113b174 Merge: 8589407 586be3f Author: Takashi Iwai Date: Tue Apr 21 11:11:54 2009 +0200 Merge branch 'topic/hda-cache' into topic/hda commit 586be3fcf97eec22fbc0ef6d67e823706aea7167 Author: Takashi Iwai Date: Tue Mar 24 07:43:24 2009 +0100 ALSA: hda - Add debug prints for Realtek auto-init Added a couple of debug prints to show the checked id numbers in alc_subsystem_id(). Signed-off-by: Takashi Iwai commit b613291fb21a2d74eb8323d97fe9aa5d281b306c Author: Takashi Iwai Date: Tue Mar 24 07:36:09 2009 +0100 ALSA: hda - Retry codec-verbs at errors The current error-recovery scheme for the codec communication errors doesn't work always well. Especially falling back to the single-command mode causes the fatal problem on many systems. In this patch, the problematic verb is re-issued again after the error (even with polling mode) instead of the single-cmd mode. The single-cmd mode will be used only when specified via the command option explicitly, mainly just for testing. Signed-off-by: Takashi Iwai commit 92c7c8a7d6e03eb4c0a3c5888e35dbc45f24744c Author: Takashi Iwai Date: Tue Mar 24 07:32:14 2009 +0100 ALSA: hda - Cache PCM and STREAM parameters queries Cache quries for PCM and STREAM parameters as well as ampcap and pincap sharing the hash table. This will reduce the superfluous access of the same codec verbs. Signed-off-by: Takashi Iwai commit 89388913f2c88a2cd15d24abab571b17a2596127 Author: Pekka Enberg Date: Tue Apr 21 11:39:27 2009 +0300 x86: unify noexec handling This patch unifies noexec handling on 32-bit and 64-bit. [ Impact: cleanup ] Signed-off-by: Pekka Enberg [ mingo@elte.hu: build fix ] LKML-Reference: <1240303167.771.69.camel@penberg-laptop> Signed-off-by: Ingo Molnar commit 8ecee4620e76aae418bfa0e8cc830e92cb559bbb Merge: 6424fb3 a939b96 Author: Ingo Molnar Date: Tue Apr 21 10:46:39 2009 +0200 Merge branch 'linus' into x86/mm Merge reason: refresh the topic: there's been 290 non-merges commits upstream to arch/x86 alone. Signed-off-by: Ingo Molnar commit 9d6c26e73bd248c286bb3597aaf788716e8fcceb Author: Suresh Siddha Date: Mon Apr 20 13:02:31 2009 -0700 x86: x2apic, IR: Make config X86_UV dependent on X86_X2APIC Instead of selecting X86_X2APIC, make config X86_UV dependent on X86_X2APIC. This will eliminate enabling CONFIG_X86_X2APIC with out enabling CONFIG_INTR_REMAP. [ Impact: cleanup ] Signed-off-by: Suresh Siddha Acked-by: Jack Steiner Cc: dwmw2@infradead.org Cc: Suresh Siddha Cc: Weidong Han LKML-Reference: <20090420200450.694598000@linux-os.sc.intel.com> Signed-off-by: Ingo Molnar commit 39d83a5d684a457046aa2a6dac60f105966e78e9 Author: Suresh Siddha Date: Mon Apr 20 13:02:29 2009 -0700 x86: x2apic, IR: Clean up panic() with nox2apic boot option Instead of panic() ignore the "nox2apic" boot option when BIOS has already enabled x2apic prior to OS handover. [ Impact: printk warning instead of panic() when BIOS has enabled x2apic already ] Signed-off-by: Suresh Siddha Cc: dwmw2@infradead.org Cc: Weidong Han LKML-Reference: <20090420200450.425091000@linux-os.sc.intel.com> Signed-off-by: Ingo Molnar commit 25629d810a52176758401184d9b437fbb7f79195 Author: Suresh Siddha Date: Mon Apr 20 13:02:28 2009 -0700 x86: x2apic, IR: Move eoi_ioapic_irq() into a CONFIG_INTR_REMAP section Address the following complier warning: arch/x86/kernel/apic/io_apic.c:2543: warning: `eoi_ioapic_irq' defined but not used By moving that function (and eoi_ioapic_irq()) into an existing #ifdef CONFIG_INTR_REMAP section of the code. [ Impact: cleanup ] Signed-off-by: Suresh Siddha Cc: dwmw2@infradead.org Cc: Weidong Han LKML-Reference: <20090420200450.271099000@linux-os.sc.intel.com> Signed-off-by: Ingo Molnar Cc: Weidong Han commit fc1edaf9e7cc4d4696f83dee495b8f158d01c4eb Author: Suresh Siddha Date: Mon Apr 20 13:02:27 2009 -0700 x86: x2apic, IR: Clean up X86_X2APIC and INTR_REMAP config checks Add x2apic_supported() to clean up CONFIG_X86_X2APIC checks. Fix CONFIG_INTR_REMAP checks. [ Impact: cleanup ] Signed-off-by: Suresh Siddha Cc: dwmw2@infradead.org Cc: Suresh Siddha Cc: Weidong Han LKML-Reference: <20090420200450.128993000@linux-os.sc.intel.com> Signed-off-by: Ingo Molnar commit ef9dfa4b1052af23a603de382d4665b2d1fccc61 Author: Takashi Iwai Date: Tue Apr 21 08:53:41 2009 +0200 ALSA: Remove deprecated include/sound/driver.h Signed-off-by: Takashi Iwai commit cd474f2d548af3c0eb932d9d47ec11483861aa6f Author: Takashi Iwai Date: Tue Apr 21 08:53:08 2009 +0200 ALSA: Remove deprecated snd_card_new() Signed-off-by: Takashi Iwai commit 6e29ec5701e9d44fa02b96c1c5c45f7516182b65 Author: Gautham R Shenoy Date: Tue Apr 21 08:40:49 2009 +0530 sched: Replace first_cpu() with cpumask_first() in ILB nomination code Stephen Rothwell reported this build warning: > kernel/sched.c: In function 'find_new_ilb': > kernel/sched.c:4355: warning: passing argument 1 of '__first_cpu' from incompatible pointer type > > Possibly caused by commit f711f6090a81cbd396b63de90f415d33f563af9b > ("sched: Nominate idle load balancer from a semi-idle package") from > the sched tree. Should this call to first_cpu be cpumask_first? For !(CONFIG_SCHED_MC || CONFIG_SCHED_SMT), find_new_ilb() nominates the Idle load balancer as the first cpu from the nohz.cpu_mask. This code uses the older API first_cpu(). Replace it with cpumask_first(), which is the correct API here. [ Impact: cleanup, address build warning ] Reported-by: Stephen Rothwell Signed-off-by: Gautham R Shenoy Cc: Rusty Russell LKML-Reference: <20090421031049.GA4140@in.ibm.com> Signed-off-by: Ingo Molnar commit 858940773ad5f9dfe32ddb34fa1c90638c5a39df Merge: 7670dc4 622e84c Author: Takashi Iwai Date: Tue Apr 21 07:41:12 2009 +0200 Merge branch 'fix/hda' into topic/hda commit 2ecf0a57c60dcb588f310d94412118e15c510532 Author: Tejun Heo Date: Tue Apr 21 12:16:56 2009 +0900 ide-dma: don't reset request fields on dma_timeout_retry() Impact: drop unnecessary code Now that everything uses bio and block operations, there is no need to reset request fields manually when retrying a request. Every field is guaranteed to be always valid. Drop unnecessary request field resetting from ide_dma_timeout_retry(). Signed-off-by: Tejun Heo commit cb4764a6dbffd9bb3cf759421ae82384071a933d Author: Steven Rostedt Date: Mon Apr 20 18:16:44 2009 -0400 tracing: use nowakeup version of commit for function event trace tests The startup tests for the event tracer also runs with the function tracer enabled. The "wakeup" version of the trace commit was used which can grab spinlocks. If a task was preempted by an NMI that called a function being traced, it could deadlock due to the function tracer trying to grab the same lock. Thanks to Frederic Weisbecker for pointing out where the bug was. Reported-by: Ingo Molnar Reported-by: Frederic Weisbecker Signed-off-by: Steven Rostedt commit aa18efb2a2f07e1cf062039848e9d369bb358724 Author: Steven Rostedt Date: Mon Apr 20 16:16:11 2009 -0400 tracing: use recursive counter over irq level Althought using the irq level (hardirq_count, softirq_count and in_nmi) was nice to detect bad recursion right away, but since the counters are not atomically updated with respect to the interrupts, the function tracer might trigger the test from an interrupt handler before the hardirq_count is updated. This will trigger a false warning. This patch converts the recursive detection to a simple counter. If the depth is greater than 16 then the recursive detection will trigger. 16 is more than enough for any nested interrupts. [ Impact: fix false positive trace recursion detection ] Signed-off-by: Steven Rostedt commit ff743345bf7685a207868048a70e23164c4785e5 Author: Peter Zijlstra Date: Fri Mar 13 12:21:26 2009 +0100 sched: remove extra call overhead for schedule() Lai Jiangshan's patch reminded me that I promised Nick to remove that extra call overhead in schedule(). Signed-off-by: Peter Zijlstra LKML-Reference: <20090313112300.927414207@chello.nl> Signed-off-by: Ingo Molnar commit f1f9b3b1795da8625e0e6096813c9d18d4a344ce Author: Ingo Molnar Date: Mon Apr 20 20:38:21 2009 +0200 perfcounters, sched: remove __task_delta_exec() This function was left orphan by the latest round of sw-counter cleanups. [ Impact: remove unused kernel function ] Signed-off-by: Ingo Molnar commit e395898e98119085f666febbc7b631dd69bc637f Author: Steven Rostedt Date: Mon Apr 20 13:32:44 2009 -0400 tracing: remove recursive test from ring_buffer_event_discard The ring_buffer_event_discard is not tied to ring_buffer_lock_reserve. It can be called inside or outside the reserve/commit. Even if it is called inside the reserve/commit the commit part must also be called. Only ring_buffer_discard_commit can be used as a replacement for ring_buffer_unlock_commit. This patch removes the trace_recursive_unlock from ring_buffer_event_discard since it would be the wrong place to do so. [Impact: prevent breakage in trace recursive testing ] Cc: Frederic Weisbecker Signed-off-by: Steven Rostedt commit 17487bfeb6cfb05920e6a9d5a54f345f2917b4e7 Author: Steven Rostedt Date: Mon Apr 20 13:24:21 2009 -0400 tracing: fix recursive test level calculation The recursive tests to detect same level recursion in the ring buffers did not account for the hard/softirq_counts to be shifted. Thus the numbers could be larger than then mask to be tested. This patch includes the shift for the calculation of the irq depth. [ Impact: stop false positives in trace recursion detection ] Signed-off-by: Steven Rostedt commit b75576d76d4be50196773f36709cb7a4f5ac2ab7 Author: Mark Brown Date: Mon Apr 20 17:56:13 2009 +0100 ASoC: Make the DAPM power check an operation on the widget Rather than having switch statements at point of use make the DAPM power check a member of the widget structure and set it when we instantiate the widget. Signed-off-by: Mark Brown commit 6ea31b9f0a0307e16656af27fcda3160e2a64a1b Author: Mark Brown Date: Mon Apr 20 17:15:41 2009 +0100 ASoC: Factor out DAPM power checks for DACs and ADCs This also switches us to using a switch statement for the widget type in dapm_power_widget(). Signed-off-by: Mark Brown commit cd0f2d4736ae8efabc60e54ecc8f677d0eddce02 Author: Mark Brown Date: Mon Apr 20 16:56:59 2009 +0100 ASoC: Factor out generic widget power checks This will form a basis for further power check refactoring: the overall goal of these changes is to allow us to check power separately to applying it, allowing improvements in the power sequencing algorithms. Signed-off-by: Mark Brown commit 23de29de2d8b227943be191d59fb6d983996d55e Author: Steven Rostedt Date: Mon Apr 20 12:59:29 2009 -0400 tracing: remove dangling semicolon Due to a cut and paste error, the trace_seq_putc had a semicolon after the prototype but before the stub function when tracing is disabled. [Impact: fix compile error ] Signed-off-by: Steven Rostedt commit 28d20e2d6e94434827e11c310788b87204b84559 Author: Steven Rostedt Date: Mon Apr 20 12:12:44 2009 -0400 tracing/events: call the correct event trace selftest init function The late_initcall calls a helper function instead of the proper init event selftest function. This update may have been lost due to conflicting merges. [ Impact: fix compiler warning and call extended event trace self tests ] Signed-off-by: Steven Rostedt commit a7abe97fd8e7a6ccabba5a04a9f17be9211d418c Author: Steven Rostedt Date: Mon Apr 20 10:59:34 2009 -0400 tracing: rename EVENT_TRACER config to ENABLE_EVENT_TRACING Currently we have two configs: EVENT_TRACING and EVENT_TRACER. All tracers enable EVENT_TRACING. The EVENT_TRACER is only a convenience to enable the EVENT_TRACING when no other tracers are enabled. The names EVENT_TRACER and EVENT_TRACING are too similar and confusing. This patch renames EVENT_TRACER to ENABLE_EVENT_TRACING to be more appropriate to what it actually does, as well as add a comment in the help menu to explain the option's purpose. [ Impact: rename config option to reduce confusion ] Reported-by: Ingo Molnar Signed-off-by: Steven Rostedt commit 125e702b09a28a502e145fb434678ee27720fc48 Author: Ingo Molnar Date: Mon Apr 20 16:13:46 2009 +0200 perf_counter tools: fix 'make install' Remove Git leftovers from this area. Signed-off-by: Ingo Molnar commit 6142fdd968c76a0f2ee753c39bd5be8d1bb4ef04 Author: Ingo Molnar Date: Mon Apr 20 16:05:55 2009 +0200 perf_counter tools: add 'perf help' Signed-off-by: Ingo Molnar commit cc13a5913797365b683212f5fca5fb04bb3582eb Author: Ingo Molnar Date: Mon Apr 20 16:01:30 2009 +0200 perf_counter tools: fix --version Hook up the 'perf version' built-in command. Signed-off-by: Ingo Molnar commit e33e0a43736307512422e41aee6e24d5a8c39181 Author: Ingo Molnar Date: Mon Apr 20 15:58:01 2009 +0200 perf_counter tools: add 'perf record' command Move perf-record.c into the perf suite of commands. Signed-off-by: Ingo Molnar commit 1d8c8b209e9351a7de1307d7b9b6df4222b8d742 Author: Ingo Molnar Date: Mon Apr 20 15:52:29 2009 +0200 perf_counter tools: add help texts Add Documentation/perf-stat.txt and Documentation/perf-top.txt. The template that was used for it: Documentation/git-add.txt from Git. Fix up small bugs to make these help texts show up both in the 'perf' common-command summary output screen, and on the individual help screens. Signed-off-by: Ingo Molnar commit ddcacfa0febff6454dba6cea1931f3020a9f6c24 Author: Ingo Molnar Date: Mon Apr 20 15:37:32 2009 +0200 perf_counter tools: separate kerneltop into 'perf top' and 'perf stat' Lets use the Git framework of built-in commands. Signed-off-by: Ingo Molnar commit 6f06ccbc86f8a02aa32271263249657ce484eb25 Author: Ingo Molnar Date: Mon Apr 20 15:22:22 2009 +0200 perf_counter tools: clean up after introduction of the Git command framework Signed-off-by: Ingo Molnar commit 0780060124011b94af55830939c86cc0916be0f5 Author: Ingo Molnar Date: Mon Apr 20 15:00:56 2009 +0200 perf_counter tools: add in basic glue from Git First very raw version at having a central 'perf' command and a list of subcommands: perf top perf stat perf record perf report ... This is done by picking up Git's collection of utility functions, and hacking them to build fine in this new environment. Signed-off-by: Ingo Molnar commit d24e473e5b2ca86d1288b9416227ccc603313d0f Author: Ingo Molnar Date: Mon Apr 20 13:32:07 2009 +0200 perf_counter: copy in Git's top Makefile We'd like to have a similar user-space structure as Git has, for the perfcounter tools - so copy in Git's toplevel makefile as-is. We'll strip it down in subsequent commits to make it fit the perfcounters code. The Git version used: 66996ec: Sync with 1.6.2.4 Signed-off-by: Ingo Molnar commit 4ed9f0716e46bb9646f26e73f4a1b5b24db7947a Author: Steven Rostedt Date: Mon Apr 20 10:47:36 2009 -0400 tracing: create menuconfig for tracing infrastructure During testing we often use randconfig to test various kernels. The current configuration set up does not give an easy way to disable all tracing with a single config. The case where randconfig would test all tracing disabled is very unlikely. This patch adds a config option to enable or disable all tracing. It is hooked into the tracing menu just like other submenus are done. [ Impact: allow randconfig to easily produce all traces disabled ] Reported-by: Ingo Molnar Signed-off-by: Steven Rostedt commit 9ae5b8790037d05d32746f521af146c32089bfec Author: Steven Rostedt Date: Mon Apr 20 10:27:58 2009 -0400 tracing: change branch profiling to a choice selection This patch makes the branch profiling into a choice selection: None - no branch profiling likely/unlikely - only profile likely/unlikely branches all - profile all branches The all profiler will also enable the likely/unlikely branches. This does not change the way the profiler works or the dependencies between the profilers. What this patch does, is keep the branch profiling from being selected by an allyesconfig make. The branch profiler is very intrusive and it is known to break various architecture builds when selected as an allyesconfig. [ Impact: prevent branch profiler from being selected in allyesconfig ] Reported-by: Heiko Carstens Reported-by: Al Viro Reported-by: Stephen Rothwell Reported-by: Andrew Morton Signed-off-by: Steven Rostedt commit cf242007a1eb29dcf93d1cb34713ec9b3f4a0e1b Author: Paul Mundt Date: Mon Apr 20 21:53:33 2009 +0900 sh: pci: Rename pci-new.c to pci.c. pci-new.c is now in a state to replace the old pci.c, rename it accordingly. Signed-off-by: Paul Mundt commit 35bcfffd86aac933205fbf8401e3e7e4dde68264 Author: Paul Mundt Date: Mon Apr 20 21:51:19 2009 +0900 sh: pci: Roll pci-lib in to pci-new. Now that the pci-auto cruft is gone, pci-lib can go away. Roll it back in to pci-new.c where it originally split off from. Signed-off-by: Paul Mundt commit 805fcc88999162b361ef0b0ce25782ef65f147d7 Author: Paul Mundt Date: Mon Apr 20 21:46:42 2009 +0900 sh: pci: Kill off the last remnants of the now unused pci-auto code. Signed-off-by: Paul Mundt commit 2d5efc190eb415dbff79ffab4f8ea731ab0288a9 Author: Paul Mundt Date: Mon Apr 20 21:42:59 2009 +0900 sh: pci: Move the se7751 fixups in to arch/sh/drivers/pci/. The se7751 was still doing the PCI fixups in its own board directory, so we move it over to arch/sh/drivers/pci/ with the rest of the board fixups. It has bitrotted significantly over the years, so will still likely need a bit of work to bring back up to date. Signed-off-by: Paul Mundt commit 951a681bda844491de8699b3bdc6c3899cbd4c9f Author: Paul Mundt Date: Mon Apr 20 21:34:36 2009 +0900 sh: pci: Convert dreamcast to new-style interface. Signed-off-by: Paul Mundt commit 37c8ac361efdbae969eff1a603bc39412d3e873f Author: Paul Mundt Date: Mon Apr 20 21:27:15 2009 +0900 sh: pci: Consolidate lboxre2 and r2d IRQ fixups. Signed-off-by: Paul Mundt commit 84972ec0c206b73ffb74e5114b574186ce6166b8 Author: Paul Mundt Date: Mon Apr 20 21:17:10 2009 +0900 sh: pci: Rename SH7751 platform ops files to fixups. None of these contain pci_ops, only IRQ routing bits, rename them accordingly. Signed-off-by: Paul Mundt commit 757e3c16f8bafa2a470aebf9b04671c5d4d18f49 Author: Paul Mundt Date: Mon Apr 20 21:11:07 2009 +0900 sh: pci: Rewrite SH7751 PCI support to follow SH7780. This follows the similar sort of scheme that the refactored SH7780 code uses, using a 64MB CS3 mapping to handle the window0 case, and simply discarding window1. This vastly simplifies the code, and allows most of the board-specific setup to go die. Signed-off-by: Paul Mundt commit 9b5b0c01598f9782690b09ce6c49f4ba116dde44 Merge: 7154b3e b08f7a6 Author: Mark Brown Date: Mon Apr 20 12:45:40 2009 +0100 Merge branch 'for-2.6.30' into for-2.6.31 commit 7154b3e80203ee91f9ba7d0a43d3daa05c49d9e9 Author: Joonyoung Shim Date: Mon Apr 20 19:21:35 2009 +0900 ASoC: TWL4030: Add support Voice DAI Add Voice DAI to support the PCM voice interface of the twl4030 codec. The PCM voice interface can be used with 8-kHz(voice narrowband) or 16-kHz(voice wideband) sampling rates, and 16bits, and mono RX and mono TX or stereo TX. The PCM voice interface has two modes - PCM mode1 : This uses the normal FS polarity and the rising edge of the clock signal. - PCM mode2 : This uses the FS polarity inverted and the falling edge of the clock signal. If the system master clock is not 26MHz or the twl4030 codec mode is not option2, the voice PCM interface is not available. Signed-off-by: Joonyoung Shim Acked-by: Peter Ujfalusi Signed-off-by: Mark Brown commit a5b08047129f214af1899bd9088605c7adc21ed5 Author: Paul Mundt Date: Mon Apr 20 20:41:45 2009 +0900 sh: pci: Rename ops-cayman -> fixups-cayman. Now that ops-cayman.c only contains IRQ routing fixups, rename it. Signed-off-by: Paul Mundt commit 48e4237d96fdcb1237b63bcddb37771f97452eec Author: Paul Mundt Date: Mon Apr 20 20:40:48 2009 +0900 sh: pci: Convert the SH-5 code over to the new interface. Signed-off-by: Paul Mundt commit 3444f5ec49bc6cb901ffea38e085db1d76e1189c Author: Paul Mundt Date: Mon Apr 20 20:22:05 2009 +0900 sh: pci: Tidy up the dreamcast PCI support. Signed-off-by: Paul Mundt commit 0db38cea69fc478a5c25b3c915ec680cc5538783 Author: Paul Mundt Date: Mon Apr 20 19:54:47 2009 +0900 sh: pci: Kill off legacy ide quirks. These fixups seem to have bitrotted a bit since their introduction in the 2.4 days. As we never had much use for them in the first place, and nothing is using them any more, kill them off the rest of the way. Signed-off-by: Paul Mundt commit 0e75148108914062cb46ad3dc8f054a628018df7 Author: Paul Mundt Date: Mon Apr 20 19:48:48 2009 +0900 sh: pci: Consolidate pcibios_setup() in pci-lib. This wasn't really being used for anything useful, so just stub it in pci-lib. Signed-off-by: Paul Mundt commit c563bf0965c86cc6087b09c34ca063fe96d6deca Author: Paul Mundt Date: Mon Apr 20 19:39:57 2009 +0900 sh: pci: Kill off dead references to is_pci_ioaddr and friends. Some old boards are still using this in their I/O routines, kill it off. Signed-off-by: Paul Mundt commit d556fcc101c4b0d57ac9742ab806a6bfed78eac1 Author: Paul Mundt Date: Mon Apr 20 19:31:20 2009 +0900 sh: pci: Flag the dreamcast BBA as IORESOURCE_PCI_FIXED. This isn't a real BAR, so prevent any attempts to move it, as we don't wish to encourage a bus luck by overzealous PCI initialization code. Signed-off-by: Paul Mundt commit bb3396477bf46c7cae6bd04b969580277957966e Author: Paul Mundt Date: Mon Apr 20 19:26:45 2009 +0900 sh: pci: Kill off superfluous lboxre2 pci fixups. This is a verbatim copy of the r2d one, use that instead. Signed-off-by: Paul Mundt commit 5ba7205fc49ff72e88784c94fb661f93e7ae7d36 Author: Paul Mundt Date: Mon Apr 20 19:00:32 2009 +0900 sh: pci: Kill off the now unused hose->io_base. Nothing is using this any more, so kill it off. Signed-off-by: Paul Mundt commit 3f8daeacd7ed7a502daf0998e2515cea4f467f21 Author: Paul Mundt Date: Mon Apr 20 18:53:41 2009 +0900 sh: pci: Consolidate the remaining common bits. This moves the remaining common bits in to pci-lib. Thereby reducing pci.c/pci-new.c to simple bus fixups and controller registration. As more platforms are moved over, the old code will disappear completely and the pci-new bits will be rolled in to pci-lib, eventually replacing pci.c completely. Signed-off-by: Paul Mundt commit 5160d3f782a5e0cdb3bdaa8a891a1fb9d9ab83ec Author: Paul Mundt Date: Mon Apr 20 18:47:21 2009 +0900 sh: pci: Consolidate bus<->resource mapping in pci-lib. Now that the io and mem offsets are tracked accordingly, the pci-new version of the bus<->resource mappers can be used generically. This moves them in to pci-lib. Signed-off-by: Paul Mundt commit 09cfeb133e3cac39b8b9a2cb1d8ab4f77e396248 Author: Paul Mundt Date: Mon Apr 20 18:42:00 2009 +0900 sh: pci: Track io and mem_offset per-channel. This implements a per-hose offset for I/O and mem resources. Signed-off-by: Paul Mundt commit e79066a659b893debe19010179d3f3f015d76d1c Author: Paul Mundt Date: Mon Apr 20 18:29:22 2009 +0900 sh: pci: New-style controller registration. This moves off of the board_pci_channels[] approach for bus registration and over to a cleaner register_pci_controller(), all derived from the MIPS code. Signed-off-by: Paul Mundt commit 99f95f117848088f2708b45c70be73152e78bb8a Author: Paul Mundt Date: Mon Apr 20 18:24:57 2009 +0900 sh: pci: Rework fixed region checks in ioremap(). Not all PCI channels have non-translatable memory windows, this is a special property of the on-chip PCIC with its 0xfd00... mapping, handle this explicitly. Signed-off-by: Paul Mundt commit f3b9aae16219aaeca2dd5a9ca69f7a10faa063df Author: Frederic Weisbecker Date: Sun Apr 19 23:39:33 2009 +0200 tracing/ring-buffer: Add unlock recursion protection on discard The pair of helpers trace_recursive_lock() and trace_recursive_unlock() have been introduced recently to provide generic tracing recursion protection. They are used in a symetric way: - trace_recursive_lock() on buffer reserve - trace_recursive_unlock() on buffer commit However sometimes, we don't commit but discard on entry to the buffer, ie: in case of filter checking. Then we must also unlock the recursion protection on discard time, otherwise the tracing gets definitely deactivated and a warning is raised spuriously, such as: 111.119821] ------------[ cut here ]------------ [ 111.119829] WARNING: at kernel/trace/ring_buffer.c:1498 ring_buffer_lock_reserve+0x1b7/0x1d0() [ 111.119835] Hardware name: AMILO Li 2727 [ 111.119839] Modules linked in: [ 111.119846] Pid: 5731, comm: Xorg Tainted: G W 2.6.30-rc1 #69 [ 111.119851] Call Trace: [ 111.119863] [] warn_slowpath+0xd8/0x130 [ 111.119873] [] ? __lock_acquire+0x19f/0x1ae0 [ 111.119882] [] ? __lock_acquire+0x19f/0x1ae0 [ 111.119891] [] ? native_sched_clock+0x20/0x70 [ 111.119899] [] ? put_lock_stats+0xe/0x30 [ 111.119906] [] ? lock_release_holdtime+0xa8/0x150 [ 111.119913] [] ring_buffer_lock_reserve+0x1b7/0x1d0 [ 111.119921] [] trace_buffer_lock_reserve+0x30/0x70 [ 111.119930] [] trace_current_buffer_lock_reserve+0x20/0x30 [ 111.119939] [] ftrace_raw_event_sched_switch+0x58/0x100 [ 111.119948] [] __schedule+0x3a7/0x4cd [ 111.119957] [] ? ftrace_call+0x5/0x2b [ 111.119964] [] ? ftrace_call+0x5/0x2b [ 111.119971] [] schedule+0x18/0x40 [ 111.119977] [] preempt_schedule+0x39/0x60 [ 111.119985] [] _read_unlock+0x53/0x60 [ 111.119993] [] sock_def_readable+0x72/0x80 [ 111.120002] [] unix_stream_sendmsg+0x24d/0x3d0 [ 111.120011] [] sock_aio_write+0x143/0x160 [ 111.120019] [] ? ftrace_call+0x5/0x2b [ 111.120026] [] ? sock_aio_write+0x0/0x160 [ 111.120033] [] ? sock_aio_write+0x0/0x160 [ 111.120042] [] do_sync_readv_writev+0xf3/0x140 [ 111.120049] [] ? ftrace_call+0x5/0x2b [ 111.120057] [] ? autoremove_wake_function+0x0/0x40 [ 111.120067] [] ? cap_file_permission+0x9/0x10 [ 111.120074] [] ? security_file_permission+0x16/0x20 [ 111.120082] [] do_readv_writev+0xd4/0x1f0 [ 111.120089] [] ? ftrace_call+0x5/0x2b [ 111.120097] [] ? ftrace_call+0x5/0x2b [ 111.120105] [] vfs_writev+0x48/0x70 [ 111.120111] [] sys_writev+0x55/0xc0 [ 111.120119] [] system_call_fastpath+0x16/0x1b [ 111.120125] ---[ end trace 15605f4e98d5ccb5 ]--- [ Impact: fix spurious warning triggering tracing shutdown ] Signed-off-by: Frederic Weisbecker commit 7670dc41b51983b369f9adfb8694a580e7b0cef2 Author: Takashi Iwai Date: Mon Apr 20 10:51:11 2009 +0200 ALSA: hda - Use snd_hda_codec_get_pincfg() in patch_ca0110.c Use the new function to reduce the access and allow the user setup via sysfs, too. Signed-off-by: Takashi Iwai commit 67667263674663767ddf4250bab2437a00ee780e Author: Takashi Iwai Date: Mon Apr 20 10:49:25 2009 +0200 ALSA: hda - Fix channels_max setting for CA0110 Added the missing definition of max channels for CA0110, which resulted in an error at opening PCM devices. Signed-off-by: Takashi Iwai commit 0bb34a6bf1f71d5ad2abfda582a2c2794957bc7b Author: Paul Mundt Date: Mon Apr 20 16:38:00 2009 +0900 sh: pci: Consolidate pci_iomap() and use the generic I/O base. This consolidates the pci_iomap() definitions and reworks how the I/O port base is handled. PCI channels can register their own I/O map base, or if none is provided, the system-wide generic I/O base is used instead. Functionally nothing changes, while this allows us to kill off lots of I/O address special casing and lookups. Signed-off-by: Paul Mundt commit 394b6d2fe624246e258a218dac68d44fe9a8411f Author: Paul Mundt Date: Mon Apr 20 16:18:46 2009 +0900 sh: pci: Kill off unused pcibios_fixup(). This is left over cruft that hasn't been used by anything in a long time, kill off bits that weren't purged previously. Signed-off-by: Paul Mundt commit a3c0e0d0032d5bbfd7dc04827a257c717d432a5b Author: Paul Mundt Date: Mon Apr 20 16:14:29 2009 +0900 sh: pci: Consolidate pcibios_align_resource() definitions. This introduces a saner pcibios_align_resource() that can be used regardless of whether pci-auto or pci-new are being used, and consolidates it in pci-lib.c. Signed-off-by: Paul Mundt commit 9833385131fc4e8c52f95320ab899051d1c06831 Author: Paul Mundt Date: Mon Apr 20 15:51:45 2009 +0900 sh: pci: HAVE_PCI_MMAP support. Derived from the MIPS version, now uses pgprot_noncached(). Signed-off-by: Paul Mundt commit 4c5107e44514a9bde74d0af77982705d602d9e39 Author: Paul Mundt Date: Mon Apr 20 15:43:36 2009 +0900 sh: pci: Split out new-style PCI core. This splits off a 'pci-new.c' which is aimed at gradually replacing the pci-auto backend and the arch/sh/drivers/pci/pci.c core respectively. Signed-off-by: Paul Mundt commit 9ade1217c9ba39ad2f004a898ddfbb815fd5fe74 Author: Paul Mundt Date: Mon Apr 20 15:38:25 2009 +0900 sh: pci: Drop asm-generic/pci.h, so we can use our own fixups. The new PCI code wants its own bus<->resource mappings instead of the generic equivalents, so drop the asm-generic include in preparation. Signed-off-by: Paul Mundt commit e057a5e5647a1c9d0d0054fbd298bfa04b3d1cb4 Author: Frederic Weisbecker Date: Sun Apr 19 23:38:12 2009 +0200 tracing/core: Add current context on tracing recursion warning In case of tracing recursion detection, we only get the stacktrace. But the current context may be very useful to debug the issue. This patch adds the softirq/hardirq/nmi context with the warning using lockdep context display to have a familiar output. v2: Use printk_once() v3: drop {hardirq,softirq}_context which depend on lockdep, only keep what is part of current->trace_recursion, sufficient to debug the warning source. [ Impact: print context necessary to debug recursion ] Signed-off-by: Frederic Weisbecker commit 667c5296cc76fefe0abcb79228952b28d9af45e3 Author: Cyrill Gorcunov Date: Sun Apr 19 11:43:11 2009 +0400 x86: es7000, uv - use __cpuinit for kicking secondary cpus The caller already has __cpuinit attribute. [ Impact: save memory, address section mismatch warning ] Signed-off-by: Cyrill Gorcunov Cc: Yinghai Lu Cc: Pavel Emelyanov LKML-Reference: <20090419074311.GA8670@lenovo> Signed-off-by: Ingo Molnar commit cece3155d869a50ba534ed161b5a05e8a29dcad0 Author: Cyrill Gorcunov Date: Sat Apr 18 23:45:28 2009 +0400 x86: smpboot - wakeup_secondary should be done via __cpuinit section A caller (do_boot_cpu) already has __cpuinit attribute. Since HOTPLUG_CPU depends on SMP && HOTPLUG it doesn't lead to panic at moment. [ Impact: cleanup ] Signed-off-by: Cyrill Gorcunov LKML-Reference: <20090418194528.GD25510@lenovo> Signed-off-by: Ingo Molnar commit 9a2755c3569e4db92bd9b1daadeddb4045b0cccd Author: Weidong Han Date: Fri Apr 17 16:42:16 2009 +0800 x86, intr-remap: fix x2apic/intr-remap resume Interrupt remapping was decoupled from x2apic. Shouldn't check x2apic before resume interrupt remapping. Otherwise, interrupt remapping won't be resumed when x2apic is not enabled. [ Impact: fix potential intr-remap resume hang on !x2apic ] Signed-off-by: Suresh Siddha Signed-off-by: Weidong Han Acked-by: David Woodhouse Cc: iommu@lists.linux-foundation.org Cc: allen.m.kay@intel.com Cc: fenghua.yu@intel.com LKML-Reference: <1239957736-6161-6-git-send-email-weidong.han@intel.com> Signed-off-by: Ingo Molnar commit 03ea81550676296d94596e4337c771c6ba29f542 Author: Weidong Han Date: Fri Apr 17 16:42:15 2009 +0800 x86, intr-remap: add option to disable interrupt remapping Add option "nointremap" to disable interrupt remapping. [ Impact: add new boot option ] Signed-off-by: Suresh Siddha Signed-off-by: Weidong Han Acked-by: David Woodhouse Cc: iommu@lists.linux-foundation.org Cc: allen.m.kay@intel.com Cc: fenghua.yu@intel.com LKML-Reference: <1239957736-6161-5-git-send-email-weidong.han@intel.com> Signed-off-by: Ingo Molnar commit 937582382c71b75b29fbb92615629494e1a05ac0 Author: Weidong Han Date: Fri Apr 17 16:42:14 2009 +0800 x86, intr-remap: enable interrupt remapping early Currently, when x2apic is not enabled, interrupt remapping will be enabled in init_dmars(), where it is too late to remap ioapic interrupts, that is, ioapic interrupts are really in compatibility mode, not remappable mode. This patch always enables interrupt remapping before ioapic setup, it guarantees all interrupts will be remapped when interrupt remapping is enabled. Thus it doesn't need to set the compatibility interrupt bit. [ Impact: refactor intr-remap init sequence, enable fuller remap mode ] Signed-off-by: Suresh Siddha Signed-off-by: Weidong Han Acked-by: David Woodhouse Cc: iommu@lists.linux-foundation.org Cc: allen.m.kay@intel.com Cc: fenghua.yu@intel.com LKML-Reference: <1239957736-6161-4-git-send-email-weidong.han@intel.com> Signed-off-by: Ingo Molnar commit 5d0ae2db6deac4f15dac4f42f23bc56448fc8d4d Author: Weidong Han Date: Fri Apr 17 16:42:13 2009 +0800 x86, intr-remap: fix ack for interrupt remapping Shouldn't call ack_apic_edge() in ir_ack_apic_edge(), because ack_apic_edge() does more than just ack: it also does irq migration in the non-interrupt-remapping case. But there is no such need for interrupt-remapping case, as irq migration is done in the process context. Similarly, ir_ack_apic_level() shouldn't call ack_apic_level, and instead should do the local cpu's EOI + directed EOI to the io-apic. ack_x2APIC_irq() is not neccessary, because ack_APIC_irq() will use MSR write for x2apic, and uncached write for non-x2apic. [ Impact: simplify/standardize intr-remap IRQ acking, fix on !x2apic ] Signed-off-by: Suresh Siddha Signed-off-by: Weidong Han Acked-by: David Woodhouse Cc: iommu@lists.linux-foundation.org Cc: allen.m.kay@intel.com Cc: fenghua.yu@intel.com LKML-Reference: <1239957736-6161-3-git-send-email-weidong.han@intel.com> Signed-off-by: Ingo Molnar commit 2b2fd87a6ef56ba7647a578e81bb8c8efda166b8 Author: Weidong Han Date: Fri Apr 17 16:42:12 2009 +0800 docs, x86: add nox2apic back to kernel-parameters.txt "nox2apic" was removed from kernel-parameters.txt by mistake, when entries were sorted in alpha order (commit 0cb55ad2). But this early parameter is still there, add it back to kernel-parameters.txt. [ Impact: add boot parameter description ] Signed-off-by: Suresh Siddha Signed-off-by: Weidong Han Acked-by: David Woodhouse Cc: Randy Dunlap Cc: iommu@lists.linux-foundation.org Cc: allen.m.kay@intel.com Cc: fenghua.yu@intel.com LKML-Reference: <1239957736-6161-2-git-send-email-weidong.han@intel.com> Signed-off-by: Ingo Molnar commit 8fb2bae4b41eb64f6e233e9bd3f3a789fbb04a06 Author: Paul Mundt Date: Sun Apr 19 13:14:29 2009 +0900 sh: sh7724: Register CMT as an early platform device here too. Follows the SH7722/SH7723 changes. Signed-off-by: Paul Mundt commit d9aed8b95f062b2f96e37b0e07373f36a6e7066d Author: Paul Mundt Date: Sun Apr 19 13:12:04 2009 +0900 sh: sh7724: Don't default enable the RTC clock. rtc-sh takes care of this now, so no need to have this always enabled. Signed-off-by: Paul Mundt commit 22fd67c5c94a188ded2bb7c78369fd751d1bb187 Merge: b8c193f 28fde68 bc9f3d4 Author: Paul Mundt Date: Sun Apr 19 13:08:33 2009 +0900 Merge branches 'sh/earlytimer' and 'sh/shmobile-r2r-staging' commit 28fde6863e6ed1f4bfb7cef080e67bf439c20628 Author: Magnus Damm Date: Wed Apr 15 10:50:30 2009 +0000 sh: Early Platform Data for SuperH Mobile Use plat_early_device_setup() to register Early Platform Data for SuperH Mobile processors. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 87a00dc059e3af46303f1f56b0e8df41af988c7b Author: Magnus Damm Date: Wed Apr 15 10:50:21 2009 +0000 sh: Add plat_early_device_setup() Add a plat_early_device_setup() function to allow processor-specific code to register Early Platform Data. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit eaab89197b733d0f81f07d6c44294b674479fda8 Author: Magnus Damm Date: Wed Apr 15 10:50:12 2009 +0000 sh: arch earlytimer support Extend the 32-bit SuperH timer code to register and probe the earlytimer class of Early Platform Drivers. This registers the sh_cmt driver if compiled-in. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit e475eedb09ee9a0fd855f3e923aa9af31c17d141 Author: Magnus Damm Date: Wed Apr 15 10:50:04 2009 +0000 clocksource: sh_cmt earlytimer support Add Early Platform Driver support to the sh_cmt driver using the earlytimer class. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 2c316bb57ad4e9f0f3de2d7ef1ae85530c2a7e69 Author: Tejun Heo Date: Sun Apr 19 08:46:03 2009 +0900 ide: drop rq->data handling from ide_map_sg() Impact: remove code path which is no longer necessary All IDE data transfers now use rq->bio. Simplify ide_map_sg() accordingly. Signed-off-by: Tejun Heo Cc: Jens Axboe commit 6d7003877c2f0578f1c08f66d05c3f72ef4ae596 Author: Tejun Heo Date: Sun Apr 19 08:46:03 2009 +0900 ide-atapi: kill unused fields and callbacks Impact: remove fields and code paths which are no longer necessary Now that ide-tape uses standard mechanisms to transfer data, special case handling for bh handling can be dropped from ide-atapi. Drop the followings. * pc->cur_pos, b_count, bh and b_data * drive->pc_update_buffers() and pc_io_buffers(). Signed-off-by: Tejun Heo commit 07bd9686c50c2b1f10e48089d4fb836a971f5177 Author: Tejun Heo Date: Sun Apr 19 08:46:03 2009 +0900 ide-tape: simplify read/write functions Impact: cleanup idetape_chrdev_read/write() functions are unnecessarily complex when everything can be handled in a single loop. Collapse idetape_add_chrdev_read/write_request() into the rw functions and simplify the implementation. Signed-off-by: Tejun Heo commit 6bb11dd14f70228f8dab25fd25dabeb9bc74926d Author: Tejun Heo Date: Sun Apr 19 08:46:03 2009 +0900 ide-tape: use byte size instead of sectors on rw issue functions Impact: cleanup Byte size is what most issue functions deal with, make idetape_queue_rw_tail() and its wrappers take byte size instead of sector counts. idetape_chrdev_read() and write() functions are converted to use tape->buffer_size instead of ctl from tape->cap. This cleans up code a little bit and will ease the next r/w reimplementation. Signed-off-by: Tejun Heo commit 88f1b941c5c94016a59144a3c94c9ca31eb16205 Author: Tejun Heo Date: Sun Apr 19 08:46:02 2009 +0900 ide-tape: unify r/w init paths Impact: cleanup Read and write init paths are almost identical. Unify them into idetape_init_rw(). Signed-off-by: Tejun Heo commit 963da55c4b9eeeb2085ca74ba927cf77bce966d4 Author: Tejun Heo Date: Sun Apr 19 08:46:02 2009 +0900 ide-tape: kill idetape_bh Impact: kill now unnecessary idetape_bh With everything using standard mechanisms, there is no need for idetape_bh anymore. Kill it and use tape->buf, cur and valid to describe data buffer instead. Changes worth mentioning are... * idetape_queue_rq_tail() now always queue tape->buf and and adjusts buffer state properly before completion. * idetape_pad_zeros() clears the buffer only once. Signed-off-by: Tejun Heo commit 21d9c5d227593d15630ae83a336d1519653e9b8a Author: Tejun Heo Date: Sun Apr 19 08:46:02 2009 +0900 ide-tape: use standard data transfer mechanism Impact: use standard way to transfer data ide-tape uses rq in an interesting way. For r/w requests, rq->special is used to carry a private buffer management structure idetape_bh and rq->nr_sectors and current_nr_sectors are initialized to the number of idetape blocks which isn't necessary 512 bytes. Also, rq->current_nr_sectors is used to report back the residual count in units of idetape blocks. This peculiarity taxes both block layer and ide. ide-atapi has different paths and hooks to accomodate it and what a rq means becomes quite confusing and making changes at the block layer becomes quite difficult and error-prone. This patch makes ide-tape use bio instead. With the previous patch, ide-tape currently is using single contiguos buffer so replacing it isn't difficult. Data buffer is mapped into bio using blk_rq_map_kern() in idetape_queue_rw_tail(). idetape_io_buffers() and idetape_update_buffers() are dropped and pc->bh is set to null to tell ide-atapi to use standard data transfer mechanism and idetape_bh byte counts are updated by the issuer on completion using the residual count. This change also nicely removes the FIXME in ide_pc_intr() where ide-tape rqs need to be completed using ide_rq_bytes() instead of blk_rq_bytes() (although this didn't really matter as the request didn't have bio). Signed-off-by: Tejun Heo Cc: Jens Axboe commit 35ab8d3251833e4052aa64b09b08195e949518c7 Author: Tejun Heo Date: Sun Apr 19 08:46:02 2009 +0900 ide-tape: use single continuous buffer Impact: simpler buffer allocation and handling, kills OOM, fix DMA transfers ide-tape has its own multiple buffer mechanism using struct idetape_bh. It allocates buffer with decreasing order-of-two allocations so that it results in minimum number of segments. However, the implementation is quite complex and works in a way that no other block or ide driver works necessitating a lot of special case handling. The benefit this complex allocation scheme brings is questionable as PIO or DMA the number of segments (16 maximum) doesn't make any noticeable difference and it also doesn't negate the need for multiple order allocation which can fail under memory pressure or high fragmentation although it does lower the highest order necessary by one when the buffer size isn't power of two. As the first step to remove the custom buffer management, this patch makes ide-tape allocate single continous buffer. The maximum order is four. I doubt the change would cause any trouble but if it ever matters, it should be converted to regular sg mechanism like everyone else and even in that case dropping custom buffer handling and moving to standard mechanism first make sense as an intermediate step. This patch makes the first bh to contain the whole buffer and drops multi bh handling code. Following patches will make further changes. This patch has the side effect of killing OOM triggered by allocation path and fixing DMA transfers. Previously, bug in alloc path triggered OOM on command issue and commands were passed to DMA engine without DMA-mapping all the segments. Signed-off-by: Tejun Heo commit b3071d190d6757b14af002a9d79832f12de61bce Author: Tejun Heo Date: Sun Apr 19 08:46:02 2009 +0900 ide-atapi,tape,floppy: allow ->pc_callback() to change rq->data_len Impact: allow residual count implementation in ->pc_callback() rq->data_len has two duties - carrying the number of input bytes on issue and carrying residual count back to the issuer on completion. ide-atapi completion callback ->pc_callback() is the right place to do this but currently ide-atapi depends on rq->data_len carrying the original request size after calling ->pc_callback() to complete the pc request. This patch makes ide_pc_intr(), ide_tape_issue_pc() and ide_floppy_issue_pc() cache length to complete before calling ->pc_callback() so that it can modify rq->data_len as necessary. Note: As using rq->data_len for two purposes can make cases like this incorrect in subtle ways, future changes will introduce separate field for residual count. Signed-off-by: Tejun Heo Cc: Jens Axboe commit ea7066afcd590e4663e6dc010f93704164050f48 Author: Tejun Heo Date: Sun Apr 19 08:46:02 2009 +0900 ide-tape,floppy: fix failed command completion after request sense Impact: fix infinite retry loop After a command failed, ide-tape and floppy inserts REQUEST_SENSE in front of the failed command and according to the result, sets pc->retries, flags and errors. After REQUEST_SENSE is complete, the failed command is again at the front of the queue and if the verdict was to terminate the request, the issue functions tries to complete it directly by calling drive->pc_callback() and returning ide_stopped. However, drive->pc_callback() doesn't complete a request. It only prepares for completion of the request. As a result, this creates an infinite loop where the failed request is retried perpetually. Fix it by actually ending the request by calling ide_complete_rq(). Signed-off-by: Tejun Heo commit fc38b521dcffcb07447cd98fedc56f495c10b90d Author: Tejun Heo Date: Sun Apr 19 07:00:43 2009 +0900 ide-pm: don't abuse rq->data Impact: cleanup rq->data usage ide-pm uses rq->data to carry pointer to struct request_pm_state through request queue and rq->special is used to carray pointer to local struct ide_cmd, which isn't necessary. Use rq->special for request_pm_state instead and use local ide_cmd in ide_start_power_step(). Signed-off-by: Tejun Heo Cc: Jens Axboe commit 5c4be57249e2e09136446597d2fe2a967c6ffef0 Author: Tejun Heo Date: Sun Apr 19 07:00:42 2009 +0900 ide-cd,atapi: use bio for internal commands Impact: unify request data buffer handling rq->data is used mostly to pass kernel buffer through request queue without using bio. There are only a couple of places which still do this in kernel and converting to bio isn't difficult. This patch converts ide-cd and atapi to use bio instead of rq->data for request sense and internal pc commands. With previous change to unify sense request handling, this is relatively easily achieved by adding blk_rq_map_kern() during sense_rq prep and PC issue. If blk_rq_map_kern() fails for sense, the error is deferred till sense issue and aborts the failed command which triggered the sense. Note that this is a slim possibility as sense prep is done on each command issue, so for the above condition to actually trigger, all preps since the last sense issue till the issue of the request which would require a sense should fail. * do_request functions might sleep now. This should be okay as ide request_fn - do_ide_request() - is invoked only from make_request and plug work. Make sure this is the case by adding might_sleep() to do_ide_request(). * Functions which access the read sense data before the sense request is complete now should access bio_data(sense_rq->bio) as the sense buffer might have been copied during blk_rq_map_kern(). * ide-tape updated to map sg. * cdrom_do_block_pc() now doesn't have to deal with REQ_TYPE_ATA_PC special case. Simplified. * tp_ops->output/input_data path dropped from ide_pc_intr(). Signed-off-by: Tejun Heo commit 6b544fcc8cd0a04eb42de9d1ecdd345e979d6ada Author: Borislav Petkov Date: Sun Apr 19 07:00:42 2009 +0900 ide-atapi: convert ide-{floppy,tape} to using preallocated sense buffer Since we're issuing REQ_TYPE_SENSE now we need to allow those types of rqs in the ->do_request callbacks. As a future improvement, sense_len assignment might be unified across all ATAPI devices. Borislav to check with specs and test. As a result, get rid of ide_queue_pc_head() and drive->request_sense_rq. tj: * Init request sense ide_atapi_pc from sense request. In the longer timer, it would probably better to fold ide_create_request_sense_cmd() into its only current user - ide_floppy_get_format_progress(). * ide_retry_pc() no longer takes @disk. CC: Bartlomiej Zolnierkiewicz CC: FUJITA Tomonori Signed-off-by: Borislav Petkov Signed-off-by: Tejun Heo commit 746d5e43274e9ea6cbd58818afc9239d41fb4e1e Author: Borislav Petkov Date: Sun Apr 19 07:00:42 2009 +0900 ide-cd: convert to using generic sense request Preallocate a sense request in the ->do_request method and reinitialize it only on demand, in case it's been consumed in the IRQ handler path. The reason for this is that we don't want to be mapping rq to bio in the IRQ path and introduce all kinds of unnecessary hacks to the block layer. tj: * Both user and kernel PC requests expect sense data to be stored in separate storage other than drive->sense_data. Copy sense data to rq->sense on completion if rq->sense is not NULL. This fixes bogus sense data on PC requests. As a result, remove cdrom_queue_request_sense. CC: Bartlomiej Zolnierkiewicz CC: FUJITA Tomonori Signed-off-by: Borislav Petkov Signed-off-by: Tejun Heo commit a1df5169f9bf08f6067029bfb840a05e282b1b97 Author: Borislav Petkov Date: Sun Apr 19 07:00:42 2009 +0900 ide: add helpers for preparing sense requests This is in preparation of removing the queueing of a sense request out of the IRQ handler path. Use struct request_sense as a general sense buffer for all ATAPI devices ide-{floppy,tape,cd}. tj: * blk_get_request(__GFP_WAIT) can't be called from do_request() as it can cause deadlock. Converted to use inline struct request and blk_rq_init(). * Added xfer / cdb len selection depending on device type. * All sense prep logics folded into ide_prep_sense() which never fails. * hwif->rq clearing and sense_rq used handling moved into ide_queue_sense_rq(). * blk_rq_map_kern() conversion is moved to later patch. CC: Bartlomiej Zolnierkiewicz CC: FUJITA Tomonori Signed-off-by: Borislav Petkov Signed-off-by: Tejun Heo commit cbfd082abfcbed8c57a12636f36e9bead8d6cfc6 Author: Tejun Heo Date: Sun Apr 19 07:00:42 2009 +0900 ide-cd: don't abuse rq->buffer Impact: rq->buffer usage cleanup ide-cd uses rq->buffer to carry pointer to the original request when issuing REQUEST_SENSE. Use rq->special instead. Signed-off-by: Tejun Heo Cc: Jens Axboe commit c267cc1c4db4ccb3406d045a8da8660f0bbfe08d Author: Tejun Heo Date: Sun Apr 19 07:00:42 2009 +0900 ide-atapi: don't abuse rq->buffer Impact: rq->buffer usage cleanup ide-atapi uses rq->buffer as private opaque value for internal special requests. rq->special isn't used for these cases (the only case where rq->special is used is for ide-tape rw requests). Use rq->special instead. Signed-off-by: Tejun Heo Cc: Jens Axboe commit eace4cb04c0edc9388e987bf9bbdef461f6daca4 Author: Tejun Heo Date: Sun Apr 19 07:00:42 2009 +0900 ide-taskfile: don't abuse rq->buffer Impact: rq->buffer usage cleanup ide_raw_taskfile() directly uses rq->buffer to carry pointer to the data buffer. This complicates both block interface and ide backend request handling. Use blk_rq_map_kern() instead and drop special handling for REQ_TYPE_ATA_TASKFILE from ide_map_sg(). Note that REQ_RW setting is moved upwards as blk_rq_map_kern() uses it to initialize bio rw flag. Signed-off-by: Tejun Heo Cc: Jens Axboe commit 7f006dc24fae158131116c9472874f12e16cf040 Author: Tejun Heo Date: Sun Apr 19 07:00:42 2009 +0900 ide-floppy: block pc always uses bio Impact: remove unnecessary code path Block pc requests always use bio and rq->data is always NULL. No need to worry about !rq->bio cases in idefloppy_block_pc_cmd(). Note that ide-atapi uses ide_pio_bytes() for bio PIO transfer which handle sg fine. Signed-off-by: Tejun Heo Cc: Jens Axboe commit 1873b90cdea038715ec7140fccc2116fb930ffb5 Author: Tejun Heo Date: Sun Apr 19 07:00:41 2009 +0900 ide-cd: clear sense buffer before issuing request sense Impact: code simplification ide_cd_request_sense_fixup() clears the tail of the sense buffer if the device didn't completely fill it. This patch makes cdrom_queue_request_sense() clear the sense buffer before issuing the command instead of clearing it afterwards. This simplifies code and eases future changes. Signed-off-by: Tejun Heo commit 46a802e852c2106d755f697819ea80cd3ffdc222 Author: Tejun Heo Date: Sun Apr 19 07:00:41 2009 +0900 ide kill unused ide_cmd->special Impact: removal of unused field No one uses ide_cmd->special anymore. Kill it. Signed-off-by: Tejun Heo commit 55f3f399422a4a3f6cb84ea4096dfaddf8817399 Author: Tejun Heo Date: Sun Apr 19 07:00:41 2009 +0900 ide: don't set REQ_SOFTBARRIER ide doesn't have to worry about REQ_SOFTBARRIER. Don't set it. Signed-off-by: Tejun Heo commit 853280a4dc8e3cc97ff10c1c02234d96078f437b Author: Tejun Heo Date: Sun Apr 19 07:00:41 2009 +0900 ide: use blk_run_queue() instead of blk_start_queueing() blk_start_queueing() is being phased out in favor of [__]blk_run_queue(). Switch. Signed-off-by: Tejun Heo commit 1e75540ec5202cae63cd238c86bd880e3d496546 Author: Tejun Heo Date: Sun Apr 19 07:00:41 2009 +0900 ide-tape: remove back-to-back REQUEST_SENSE detection Impact: fix an oops which always triggers ide_tape_issue_pc() assumed drive->pc isn't NULL on invocation when checking for back-to-back request sense issues but drive->pc can be NULL and even when it's not NULL, it's not safe to dereference it once the previous command is complete because pc could have been freed or was on stack. Kill back-to-back REQUEST_SENSE detection. Signed-off-by: Tejun Heo commit 6f41469c627fe118121dfce2a8134ad24da3df28 Author: Tejun Heo Date: Sun Apr 19 07:00:41 2009 +0900 block: clear req->errors on bio completion only for fs requests Impact: subtle behavior change For fs requests, rq is only carrier of bios and rq error status as a whole doesn't mean much. This is the reason why rq->errors is being cleared on each partial completion of a request as on each partial completion the error status is transferred to the respective bios. For pc requests, rq->errors is used to carry error status to the issuer and thus __end_that_request_first() doesn't clear it on such cases. The condition was fine till now as only fs and pc requests have used bio and thus the bio completion path. However, future changes will unify data accesses to bio and all non fs users care about rq error status. Clear rq->errors on bio completion only for fs requests. In general, the implicit clearing is a bit too subtle especially as the meaning of rq->errors is completely dependent on low level drivers. Unifying / cleaning up rq->errors usage and letting llds manage it would be better. TODO comment added. Signed-off-by: Tejun Heo Acked-by: Jens Axboe commit 8e668b5b3455207e4540fc7ccab9ecf70142f288 Author: Steven Rostedt Date: Fri Apr 17 17:17:55 2009 -0400 tracing: remove format attribute of inline function Due to a cut and paste error, I added the gcc attribute for printf format to the static inline stub of trace_seq_printf. This will cause a compile failure. [ Impact: fix compiler error when CONFIG_TRACING is off ] Reported-by: Ingo Molnar Signed-off-by: Steven Rostedt Cc: Andrew Morton Cc: =?ISO-8859-15?Q?Fr=E9d=E9ric_Weisbecker?= LKML-Reference: Signed-off-by: Ingo Molnar commit 3189cdb31622f4e40688ce5a6fc5d940b42bc805 Author: Steven Rostedt Date: Fri Apr 17 16:13:55 2009 -0400 tracing: protect trace_printk from recursion trace_printk can be called from any context, including NMIs. If this happens, then we must test for for recursion before grabbing any spinlocks. This patch prevents trace_printk from being called recursively. [ Impact: prevent hard lockup in lockdep event tracer ] Cc: Peter Zijlstra Cc: Frederic Weisbecker Signed-off-by: Steven Rostedt commit 261842b7c9099f56de2eb969c8ad65402d68e00e Author: Steven Rostedt Date: Thu Apr 16 21:41:52 2009 -0400 tracing: add same level recursion detection The tracing infrastructure allows for recursion. That is, an interrupt may interrupt the act of tracing an event, and that interrupt may very well perform its own trace. This is a recursive trace, and is fine to do. The problem arises when there is a bug, and the utility doing the trace calls something that recurses back into the tracer. This recursion is not caused by an external event like an interrupt, but by code that is not expected to recurse. The result could be a lockup. This patch adds a bitmask to the task structure that keeps track of the trace recursion. To find the interrupt depth, the following algorithm is used: level = hardirq_count() + softirq_count() + in_nmi; Here, level will be the depth of interrutps and softirqs, and even handles the nmi. Then the corresponding bit is set in the recursion bitmask. If the bit was already set, we know we had a recursion at the same level and we warn about it and fail the writing to the buffer. After the data has been committed to the buffer, we clear the bit. No atomics are needed. The only races are with interrupts and they reset the bitmask before returning anywy. [ Impact: detect same irq level trace recursion ] Signed-off-by: Steven Rostedt commit 12acd473d45cf2e40de3782cb2de712e5cd4d715 Author: Steven Rostedt Date: Fri Apr 17 16:01:56 2009 -0400 tracing: add EXPORT_SYMBOL_GPL for trace commits Not all the necessary symbols were exported to allow for tracing by modules. This patch adds them in. [ Impact: allow modules to commit data to the ring buffer ] Signed-off-by: Steven Rostedt commit b0afdc126d0515e76890f0a5f26b28501cfa298e Author: Steven Rostedt Date: Fri Apr 17 13:02:22 2009 -0400 tracing/events: enable code with EVENT_TRACING not EVENT_TRACER The CONFIG_EVENT_TRACER is the way to turn on event tracing when no other tracing has been configured. All code to get enabled should depend on CONFIG_EVENT_TRACING. That is what is enabled when TRACING (or CONFIG_EVENT_TRACER) is selected. This patch enables the include/trace/ftrace.h file when CONFIG_EVENT_TRACING is enabled. [ Impact: fix warning in event tracer selftest ] Signed-off-by: Steven Rostedt commit ac1adc55fc71c7515caa2eb0e63e49b3d1c6a47c Author: Tom Zanussi Date: Fri Apr 17 00:27:08 2009 -0500 tracing/filters: add filter_mutex to protect filter predicates This patch adds a filter_mutex to prevent the filter predicates from being accessed concurrently by various external functions. It's based on a previous patch by Li Zefan: "[PATCH 7/7] tracing/filters: make filter preds RCU safe" v2 changes: - fixed wrong value returned in a add_subsystem_pred() failure case noticed by Li Zefan. [ Impact: fix trace filter corruption/crashes on parallel access ] Signed-off-by: Tom Zanussi Reviewed-by: Li Zefan Tested-by: Li Zefan Cc: Frederic Weisbecker Cc: Steven Rostedt Cc: paulmck@linux.vnet.ibm.com LKML-Reference: <1239946028.6639.13.camel@tropicana> Signed-off-by: Ingo Molnar commit 46de405f25f1d9fa73b657ffbb752aa0cc87a91d Author: Zhaolei Date: Fri Apr 17 10:53:43 2009 +0800 tracing: Remove include/trace/kmem_event_types.h kmem_event_types.h is no longer necessary since tracepoint definitions are put into include/trace/events/kmem.h [ Impact: remove now-unused file. ] Signed-off-by: Zhao Lei Acked-by: Steven Rostedt Cc: Frederic Weisbecker Cc: Tom Zanussi LKML-Reference: <49E7EF37.2080205@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 9b94b3a19b13e094c10f65f24bc358f6ffe4eacd Author: Andreas Herrmann Date: Fri Apr 17 12:07:46 2009 +0200 x86: fixup numa_node information for AMD CPU northbridge functions Currently the numa_node attribute for these PCI devices is 0 (it corresponds to the numa_node for PCI bus 0). This is not a big issue but incorrect. This inconsistency can be fixed by reading the node number from CPU NB function 0. [ Impact: fill in dev->numa_node information, to optimize DMA allocations ] Signed-off-by: Andreas Herrmann Cc: jbarnes@virtuousgeek.org LKML-Reference: <20090417100746.GG16198@alberich.amd.com> Signed-off-by: Ingo Molnar commit 339ae5d3c3fc2025e3657637921495fd600027c7 Author: Li Zefan Date: Fri Apr 17 10:34:30 2009 +0800 tracing: fix file mode of trace and README trace is read-write and README is read-only. [ Impact: fix /debug/tracing/ file permissions. ] Signed-off-by: Li Zefan Acked-by: Frederic Weisbecker Acked-by: Steven Rostedt LKML-Reference: <49E7EAB6.4070605@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 76aa81118ddfbb3dc31533030cf3ec329dd067a6 Author: Jeremy Fitzhardinge Date: Thu Apr 16 23:35:39 2009 -0700 tracing: avoid warnings from zero-arg tracepoints Tracepoints with no arguments can issue two warnings: "field" defined by not used "ret" is uninitialized in this function Mark field as being OK to leave unused, and initialize ret. [ Impact: fix false positive compiler warnings. ] Signed-off-by: Jeremy Fitzhardinge Acked-by: Steven Rostedt Cc: mathieu.desnoyers@polymtl.ca LKML-Reference: <1239950139-1119-5-git-send-email-jeremy@goop.org> Signed-off-by: Ingo Molnar commit 9ea21c1ecdb35ecdcac5fd9d95f62a1f6a7ffec0 Author: Steven Rostedt Date: Thu Apr 16 12:15:44 2009 -0400 tracing/events: perform function tracing in event selftests We can find some bugs in the trace events if we stress the writes as well. The function tracer is a good way to stress the events. [ Impact: extend scope of event tracer self-tests ] Signed-off-by: Steven Rostedt Cc: Andrew Morton Cc: Peter Zijlstra Cc: Frederic Weisbecker LKML-Reference: <20090416161746.604786131@goodmis.org> Signed-off-by: Ingo Molnar commit 69abe6a5d18a9394baa325bab8f57748b037c517 Author: Avadh Patel Date: Fri Apr 10 16:04:48 2009 -0400 tracing: add saved_cmdlines file to show cached task comms Export the cached task comms to userspace. This allows user apps to translate the pids from a trace into their respective task command lines. [ Impact: let userspace apps reading binary buffer know comm's of pids ] Signed-off-by: Avadh Patel [ added error checking and use of buf pointer to index file_buf ] Signed-off-by: Steven Rostedt commit d1b182a8d49ed6416325b4e0a1cb0f17cd4e702a Author: Steven Rostedt Date: Wed Apr 15 16:53:47 2009 -0400 tracing/events/ring-buffer: expose format of ring buffer headers to users Currently, every thing needed to read the binary output from the ring buffers is available, with the exception of the way the ring buffers handles itself internally. This patch creates two special files in the debugfs/tracing/events directory: # cat /debug/tracing/events/header_page field: u64 timestamp; offset:0; size:8; field: local_t commit; offset:8; size:8; field: char data; offset:16; size:4080; # cat /debug/tracing/events/header_event type : 2 bits len : 3 bits time_delta : 27 bits array : 32 bits padding : type == 0 time_extend : type == 1 data : type == 3 This is to allow a userspace app to see if the ring buffer format changes or not. [ Impact: allow userspace apps to know of ringbuffer format changes ] Signed-off-by: Steven Rostedt commit 6b87a91f5417226c7fe62100b0e7217e7096b789 Author: Peter Ujfalusi Date: Fri Apr 17 15:55:08 2009 +0300 ASoC: TWL4030: Fix for the constraint handling The original implementation of the constraints were good against sane applications. If the opening sequence is: stream1_open, stream1_hw_params, stream2_open, stream2_hw_params -> the constraints are set correctly for stream2. But if the sequence is: stream1_open, stream2_open, stream2_hw_params, stream1_hw_params -> than stream2 would receive constraint rate = 0, sample_bits = 0, since the stream1 has not yet called hw_params... The command to trigger this event: gst-launch-0.10 alsasrc device=hw:0 ! alsasink device=hw:0 sync=false This patch does some 'black magic' in order to always set the correct constraints and sets it only when it is needed for the other stream. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit e6187007d6c365b551c69ea3df46f06fd1c8bd19 Author: Steven Rostedt Date: Wed Apr 15 13:36:40 2009 -0400 tracing/events: add startup tests for events As events start to become popular, and the new way to add tracing infrastructure into ftrace, it is important to catch any problems that might happen with a mistake in the TRACE_EVENT macro. This patch introduces a startup self test on the registered trace events. Note, it can only do a generic test, any type of testing that needs more involement is needed to be implemented by the tracepoint creators. The test goes down one by one enabling a trace point and running some random tasks (random in the sense that I just made them up). Those tasks are creating threads, grabbing mutexes and spinlocks and using workqueues. After testing each event individually, it does the same test after enabling each system of trace points. Like sched, irq, lockdep. Then finally it enables all tracepoints and performs the tasks again. The output to the console on bootup will look like this when everything works: Running tests on trace events: Testing event kfree_skb: OK Testing event kmalloc: OK Testing event kmem_cache_alloc: OK Testing event kmalloc_node: OK Testing event kmem_cache_alloc_node: OK Testing event kfree: OK Testing event kmem_cache_free: OK Testing event irq_handler_exit: OK Testing event irq_handler_entry: OK Testing event softirq_entry: OK Testing event softirq_exit: OK Testing event lock_acquire: OK Testing event lock_release: OK Testing event sched_kthread_stop: OK Testing event sched_kthread_stop_ret: OK Testing event sched_wait_task: OK Testing event sched_wakeup: OK Testing event sched_wakeup_new: OK Testing event sched_switch: OK Testing event sched_migrate_task: OK Testing event sched_process_free: OK Testing event sched_process_exit: OK Testing event sched_process_wait: OK Testing event sched_process_fork: OK Testing event sched_signal_send: OK Running tests on trace event systems: Testing event system skb: OK Testing event system kmem: OK Testing event system irq: OK Testing event system lockdep: OK Testing event system sched: OK Running tests on all trace events: Testing all events: OK [ folded in: tracing: add #include to fix build failure in test_work() This build failure occured on a few rare configs: kernel/trace/trace_events.c: In function ‘test_work’: kernel/trace/trace_events.c:975: error: implicit declaration of function ‘udelay’ kernel/trace/trace_events.c:980: error: implicit declaration of function ‘msleep’ delay.h is included in way too many other headers, hiding cases where new usage is added without header inclusion. [ Impact: build fix ] Signed-off-by: Ingo Molnar ] [ Impact: add event tracer self-tests ] Signed-off-by: Steven Rostedt commit 93eb677d74a4f7d3edfb678c94f6c0544d9fbad2 Author: Steven Rostedt Date: Wed Apr 15 13:24:06 2009 -0400 ftrace: use module notifier for function tracer The hooks in the module code for the function tracer must be called before any of that module code runs. The function tracer hooks modify the module (replacing calls to mcount to nops). If the code is executed while the change occurs, then the CPU can take a GPF. To handle the above with a bit of paranoia, I originally implemented the hooks as calls directly from the module code. After examining the notifier calls, it looks as though the start up notify is called before any of the module's code is executed. This makes the use of the notify safe with ftrace. Only the startup notify is required to be "safe". The shutdown simply removes the entries from the ftrace function list, and does not modify any code. This change has another benefit. It removes a issue with a reverse dependency in the mutexes of ftrace_lock and module_mutex. [ Impact: fix lock dependency bug, cleanup ] Cc: Rusty Russell Signed-off-by: Steven Rostedt commit 5043124e660fcc3ddefe4239ddfa017bf13f5081 Merge: 77857dc 9f76208 Author: Ingo Molnar Date: Fri Apr 17 16:18:22 2009 +0200 Merge branch 'linus' into x86/apic Merge reason: new intr-remap patches depend on the s2ram iommu fixes from upstream Signed-off-by: Ingo Molnar commit 62c7ae87cb5962d3dfaa6d916a15e4faa9e07363 Author: Paul Mundt Date: Fri Apr 17 20:37:16 2009 +0900 sh: pci: Start unifying the SH7780 PCIC initialization. This starts moving out the common initialization bits from the various fixup paths in to the shared init path. Signed-off-by: Paul Mundt commit a6d377b6969235a3b5a6e87bdcef387d0976b41c Author: Paul Mundt Date: Fri Apr 17 20:11:44 2009 +0900 sh: pci: Consolidate SH7780 PCIC IRQ routing. Now that the platform code is a bit leaner, we can start consolidating the various IRQ routing implementations. There are effectively only 2 variants, and the others can use those directly. Signed-off-by: Paul Mundt commit 4c7a47de897e89c25a40e228ac5319cbac7257fe Author: Paul Mundt Date: Fri Apr 17 17:21:36 2009 +0900 sh: pci: Kill off platform-specific multi-window mappings. Commit 68b42d1b548be1840aff7122fdebeb804daf0fa3 ("sh: sh7785lcr: Map whole PCI address space.") changed around the semantics of how various chip-selects are made accessible to PCI. Now that there is a single large mapping covering from CS0-CS6, there is no longer any need to do multi-window mapping. Subsequently, all of the differing implementations can be consolidated in to pci-sh7780. Signed-off-by: Paul Mundt commit ab1363a8929f32cc163cd3f50ca72f20d901b00c Author: Paul Mundt Date: Fri Apr 17 17:07:47 2009 +0900 sh: pci: Consolidate PCI I/O and mem window definitions for SH7780. This consolidates all of the PCI I/O and memory window definitions across the pci-sh7780 users in pci-sh7780 itself. No functional changes, in that every platform had exactly the same implementation. Signed-off-by: Paul Mundt commit f1dcab756687622b658154ded1657538984edcdb Author: Paul Mundt Date: Fri Apr 17 17:00:27 2009 +0900 sh: pci: Set the I/O port base to the SH7780 I/O window default. Presently the I/O port base isn't being set anywhere, which allows things like generic_inl() to blow up. Fix this up to point at the PCI IO window. Signed-off-by: Paul Mundt commit c66c1d79a94a7a302e2dc6c93da40902423eac3e Author: Paul Mundt Date: Fri Apr 17 16:38:00 2009 +0900 sh: pci: Set pci_cache_line_size on SH7780 via the PCICLS register. The SH7780 PCIC contains a read-only cache line size register that we can derive pci_cache_line_size from. So, make sure that the software idea of the cache line size actually matches the host controller's idea. Signed-off-by: Paul Mundt commit ab78cbcf6877334fc20868b7df7887349e2e01c8 Author: Paul Mundt Date: Fri Apr 17 15:08:01 2009 +0900 sh: pci: Use the proper write size for class/sub-class code. Don't use pci_write_reg() for these, as it defaults to 32-bit. Rather than using the helper, use __raw_writeb() directly. Signed-off-by: Paul Mundt commit 4e7b7fdb129995640f144b7de114e109c6b46a2a Author: Paul Mundt Date: Fri Apr 17 15:05:19 2009 +0900 sh: pci: Rework SH7780 host controller detection. This reworks how the host controller is probed, and makes it a bit more verbose in the event a new type of controller is detected. Additionally, we also log the revision information. This now uses the proper access sizes for the vendor/device registers, rather than relying on a larger access that encapsulated both of them. Not all devices support 32-bit read cycles for these registers. Signed-off-by: Paul Mundt commit 0bbc9bc3189f24de946777af43c9033c8c4871e4 Author: Paul Mundt Date: Fri Apr 17 14:09:09 2009 +0900 sh: pci: Set class/sub-class code correctly for SH7780 PCIC. The SH7780 PCI host controller implements a configuration header that requires a fair bit of hand-holding to initialize properly. By default it appears as a pre-2.0 host controller given the zeroed out class code, so fix this up properly. Some boards that happened to be using the R7780RP version of the PCIC fixups had set this correctly, but this belongs in the standard initialization, and is by no means board specific. Signed-off-by: Paul Mundt commit 7e4ba0d77c96d328ba968ddff4a464d4d2fa7abc Author: Paul Mundt Date: Fri Apr 17 14:07:57 2009 +0900 sh: pci: Prefer P1SEG over P1SEGADDR for CONFIG_CMD. P1SEGADDR is obsolete and will be killed off completely in the future, so transition off of it and reference P1SEG explicitly. Signed-off-by: Paul Mundt commit b627b4ed3d056c5d00e8f3cb32d033b0ee6619a9 Author: Paul Mundt Date: Fri Apr 17 13:00:18 2009 +0900 sh: pci: Move se7780 INTC fixups out of pci-sh7780.c. These fixups belong in the board INTC setup code, not in the middle of pci-sh7780.c. Signed-off-by: Paul Mundt commit 84971bb401866d79c6b353cb1d8861c2b4621867 Author: Paul Mundt Date: Fri Apr 17 12:44:25 2009 +0900 sh: pci: Kill off useless debugging printk() in pci-sh7780 init. Signed-off-by: Paul Mundt commit d1f0ae5e2e45e74cff4c3bdefb0fc77608cdfeec Author: Sam Ravnborg Date: Wed Apr 15 21:34:55 2009 +0200 x86: standardize Kbuild rules Introducing this Kbuild file allow us to: make arch/x86/ And thus building all the core part of x86. Signed-off-by: Sam Ravnborg Cc: Jaswinder Singh Rajput Signed-off-by: Ingo Molnar commit 8d98f2246d7c622198ae0b8ca66f1c82b8a25377 Merge: 3ba191c 002fbad Author: Mark Brown Date: Thu Apr 16 14:14:35 2009 +0100 Merge branch 'for-2.6.30' into for-2.6.31 commit 3ba191ce051a32b20757f063120496e860ea8f9d Author: Peter Ujfalusi Date: Wed Apr 15 15:38:56 2009 +0300 ASoC: OMAP: Add DSP_A mode support for mcbsp DSP_A mode is similar to the DSP_B, but the MSB is delayed with one bclk (appears after the FS pulse and not under it). Signed-off-by: Peter Ujfalusi Acked-by: Jarkko Nikula Signed-off-by: Mark Brown commit c29b206ffd0700acb2dc1fdb70856cc4b907216c Author: Peter Ujfalusi Date: Wed Apr 15 15:38:55 2009 +0300 ASoC: OMAP: Use single-phase for DSP mode Use single-phase mode for the DSP mode and keep the dual phase mode for the I2S mode. The mono (1 channel) mode already used single phase mode, now it is more cleaner. There is no need to configure the second phase, when the single phase is used. Signed-off-by: Peter Ujfalusi Acked-by: Jarkko Nikula Signed-off-by: Mark Brown commit 0d960e8891459f5af85e5781bce3f1da5f7db0fb Author: Mark Brown Date: Thu Apr 16 10:08:39 2009 +0100 ASoC: Request shared rates for WM8903 It has a shared LRCLK. Signed-off-by: Mark Brown commit fd5dfad9cf51bc3575b5e50193403de4a3de23bc Author: Mark Brown Date: Wed Apr 15 21:37:46 2009 +0100 ASoC: Volume controls are never of boolean type Some limited volume controls (mostly simple attenuations) have only two settings so the ASoC info functions misreport them as booleans. Since we currently have no better information check for " Volume" in the control name and always report any controls matching as being integer. Signed-off-by: Mark Brown commit 3f1a4d826751d9759fc95da4e47d08d2745e0055 Author: Mark Brown Date: Wed Apr 15 21:35:26 2009 +0100 ASoC: Check we have DAI ops when calling via accessor functions Also make sure we're checking for the right operation while we're here. Signed-off-by: Mark Brown commit 0232ba9ce031d0fd8f331fa8b3c00e16901f54e6 Author: Paul Mundt Date: Thu Apr 16 18:01:31 2009 +0900 sh: pci: Kill off unused SH4_PCIC_NO_RESET code. Nothing ended up using this anymore, so just kill it off. Signed-off-by: Paul Mundt commit 18cb7109d3e83195b605ff2905981020e86f72ca Author: Takashi Iwai Date: Thu Apr 16 10:22:24 2009 +0200 ALSA: hda - Check strcpy length Check the length to copy via strlen() beforehand to avoid the stack corruption, or use strlcpy() to be safe in HD-audio codes. Signed-off-by: Takashi Iwai commit f3948f8857ef5de239f28a61dddb1554a0ae4c2c Author: Li Zefan Date: Wed Apr 15 11:02:56 2009 +0800 blktrace: fix context-info when mixed-using blk tracer and trace events When current tracer is set to blk tracer, TRACE_ITER_CONTEXT_INFO is unset, but actually context-info is printed: pdflush-431 [000] 821.181576: 8,0 P N [pdflush] And then if we enable TRACE_ITER_CONTEXT_INFO: # echo context-info > trace_options We'll see context-info printed twice. What's worse, when we use blk tracer and trace events at the same time, we'll see no context-info for trace events at all: jbd2_commit_logging: dev dm-0:8 transaction 333227 jbd2_end_commit: dev dm-0:8 transaction 333227 head 332814 rm-25433 [001] 9578.307485: 8,18 m N cfq25433 slice expired t=0 rm-25433 [001] 9578.307486: 8,18 m N cfq25433 put_queue This patch adds blk_tracer->set_flags(), and context-info flag is unset only when we set the output to classic mode. Note after this patch, one should unset context-info explicitly if he wants to get binary output that can be parsed by blkparse: # echo nocontext-info > trace_options # echo bin > trace_options # echo blk > current_tracer # cat trace_pipe | blkparse -i - Reported-by: Theodore Ts'o Signed-off-by: Li Zefan Cc: Jens Axboe Cc: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker Cc: Steven Rostedt LKML-Reference: <49E54E60.50408@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 1d54ad6da9192fed5dd3b60224d9f2dfea0dcd82 Author: Li Zefan Date: Tue Apr 14 14:00:05 2009 +0800 blktrace: add trace/ to /sys/block/sda Impact: allow ftrace-plugin blktrace to trace device-mapper devices To trace a single partition: # echo 1 > /sys/block/sda/sda1/enable To trace the whole sda instead: # echo 1 > /sys/block/sda/enable Thus we also fix an issue reported by Ted, that ftrace-plugin blktrace can't be used to trace device-mapper devices. Now: # echo 1 > /sys/block/dm-0/trace/enable echo: write error: No such device or address # mount -t ext4 /dev/dm-0 /mnt # echo 1 > /sys/block/dm-0/trace/enable # echo blk > /debug/tracing/current_tracer Reported-by: Theodore Tso Signed-off-by: Li Zefan Acked-by: "Theodore Ts'o" Cc: Arnaldo Carvalho de Melo Cc: Shawn Du Cc: Jens Axboe LKML-Reference: <49E42665.6020506@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 9908c30997b8a73c95f836170b9998dae9aa3f4a Author: Li Zefan Date: Tue Apr 14 13:59:34 2009 +0800 blktrace: support per-partition tracing for ftrace plugin The previous patch adds support to trace a single partition for relay+ioctl blktrace, and this patch is for ftrace plugin blktrace: # echo 1 > /sys/block/sda/sda7/enable # cat start_lba 102398373 # cat end_lba 102703545 Signed-off-by: Li Zefan Acked-by: "Theodore Ts'o" Cc: Arnaldo Carvalho de Melo Cc: Shawn Du Cc: Jens Axboe LKML-Reference: <49E42646.4060608@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit d0deef5b14af7d5bbd0003a0a2a1a32326e20a6d Author: Shawn Du Date: Tue Apr 14 13:58:56 2009 +0800 blktrace: support per-partition tracing Though one can specify '-d /dev/sda1' when using blktrace, it still traces the whole sda. To support per-partition tracing, when we start tracing, we initialize bt->start_lba and bt->end_lba to the start and end sector of that partition. Note some actions are per device, thus we don't filter 0-sector events. The original patch and discussion can be found here: http://marc.info/?l=linux-btrace&m=122949374214540&w=2 Signed-off-by: Shawn Du Signed-off-by: Li Zefan Acked-by: "Theodore Ts'o" Cc: Arnaldo Carvalho de Melo Cc: Jens Axboe LKML-Reference: <49E42620.4050701@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit f1a9ba8f15f89f3f444985251efaf809cd16da53 Author: Paul Mundt Date: Wed Mar 11 16:17:53 2009 +0900 sh: pci: drop duplicate PCIC fixups for SE7780 and SH7785LCR. SE7780 has the same PCIC fixup as SDK7780, and SH7785LCR the same as R7780RP. Switch to using those, and drop the duplicate code. Signed-off-by: Paul Mundt commit 3aabce8d3d2f9af2c08c2f590ac9acb272ca8c95 Author: Paul Mundt Date: Wed Mar 11 16:12:39 2009 +0900 sh: sh7785lcr: Update for recent PCI changes. Signed-off-by: Paul Mundt commit 10591578c84825a320734e59272f161385edcc41 Author: Paul Mundt Date: Wed Mar 11 15:58:04 2009 +0900 sh: drop duplicate symbol export on dreamcast and sh7785lcr. With board_pci_channels now being exported in a single place, update the boards that duplicated the export. Signed-off-by: Paul Mundt commit aa5d3ff99cc1f3dfe262ab9dd9179131fcfe39fd Author: Magnus Damm Date: Tue Feb 19 21:35:40 2008 +0900 sh: export board_pci_channels in one place Instead of sometimes exporting board_pci_channels[] in the board specific code just export it in one place. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 8ce0143b11cdc519b8e1fd94a262b654ef0bc3ab Author: Magnus Damm Date: Tue Feb 19 21:35:31 2008 +0900 sh: pci io port base address code Adds a __get_pci_io_base() function which is used to match a port range against struct pci_channel. This allows us to detect if a port range is assigned to pci or happens to be legacy port io. While at it, remove unused cpu-specific cruft. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit ef339f241b08a16af58897e6288ba200e0c7a8c7 Author: Magnus Damm Date: Tue Feb 19 21:35:22 2008 +0900 sh: pci memory range checking code This patch changes the code to use __is_pci_memory() instead of is_pci_memaddr(). __is_pci_memory() loops through all the pci channels on the system to match memory windows. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit ef53fdeb7e0cb139aff33665635b886700137abb Author: Magnus Damm Date: Tue Feb 19 21:35:14 2008 +0900 sh: add io_base member to pci_channel Store the io window base address in struct pci_channel and use that one instead of SH77xx_PCI_IO_BASE. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit e4c6a3604e07185046e2ce4be82a201f4447d788 Author: Magnus Damm Date: Tue Feb 19 21:35:04 2008 +0900 sh: add reg_base member to pci_channel Store the base address of the pci host controller registers in struct pci_channel and use the address in pci_read_reg() and pci_write_reg(). Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit b6706ef10f75921733d7275fd45d268f2f6254c8 Author: Magnus Damm Date: Tue Feb 19 21:34:55 2008 +0900 sh: hook in struct pci_channel in sysdata Store a struct pci_channel pointer in bus->sysdata. This makes whatever struct pci_channel assigned to a bus available for sh4_pci_read() and sh4_pci_write(). We also modify PCIBIOS_MIN_IO and PCIBIOS_MIN_MEM to use bus->sysdata - this to gives us support for multiple pci channels. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 710fa3c81151948ac4d836ef52b57cef91b0ab72 Author: Magnus Damm Date: Wed Mar 11 15:47:23 2009 +0900 sh: avoid using PCIBIOS_MIN_xxx Replaces PCIBIOS_MIN_IO and PCIBIOS_MIN_MEM with direct struct pci_channel access. This allows us to have more than one pci channel. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit d0e3db40e2a1352aa2a2f425a7d4631bddc03d51 Author: Magnus Damm Date: Wed Mar 11 15:46:14 2009 +0900 sh: add init member to pci_channel data This patch adds an init callback to struct pci_channel and makes sure it is initialized properly. Code is added to call this init function from pcibios_init(). Return values are adjusted and a warning is is printed if init fails. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit b8b47bfbe4eb1ae0e6891e49c86a5f4fb00413be Author: Magnus Damm Date: Wed Mar 11 15:41:51 2009 +0900 sh: pass along struct pci_channel These patches rework the pci code for the sh architecture. Currently each board implements some kind of ioport to address mapping. Some boards use generic_io_base others try passing addresses as io ports. This is the first set of patches that try to unify the pci code as much as possible to avoid duplicated code. This will in the end lead to fewer lines board specific code and more generic code. This patch makes sure a struct pci_channel pointer is passed along to various pci functions such as pci_read_reg(), pci_write_reg(), pci_fixup_pcic(), sh7751_pcic_init() and sh7780_pcic_init(). Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt commit 4e01f54bfd3f423db8fd6c91c4f0471f18aa0c50 Author: Takashi Iwai Date: Thu Apr 16 08:53:34 2009 +0200 ALSA: hda - Add Creative CA0110-IBG support Added the support for Creative SB X-Fi boards with UAA (HD-audio) mode. In the HD-audio mode, no multiple streams are supported by just it behaves like a normal HD-audio device. Signed-off-by: Takashi Iwai commit bc9f3d4291f8275924a9197a81208a5df0a15095 Author: Paul Mundt Date: Thu Apr 16 15:44:58 2009 +0900 sh: Add a generic defconfig for SH7724 platforms. Signed-off-by: Paul Mundt commit 59fe700dcbf3d6257ae86ca8c0192fc64b2eea1c Author: Paul Mundt Date: Thu Apr 16 15:43:42 2009 +0900 sh: Have SH7724 select ARCH_SHMOBILE. This is an SH-Mobile CPU, so select ARCH_SHMOBILE. This enables all of the PM functionality, amongst other things. Signed-off-by: Paul Mundt commit 6a3395beb99d7ae882ddf701c6fa6005ad7edebf Author: Paul Mundt Date: Thu Apr 16 15:36:13 2009 +0900 sh: sh7724: Add CMT clockevents support. This enables support for the CMT clockevents driver on SH7724. Signed-off-by: Paul Mundt commit ad95b78c9f735da11ff9ec760e9b038cd82aead6 Author: Kuninori Morimoto Date: Wed Apr 15 11:43:07 2009 +0900 sh: sh7724: Add VEU support. This adds uio_pdrv_genirq support for the VEU. Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt commit cd5b9ef776feff440e7a889d1a565ceabfecbfa1 Author: Kuninori Morimoto Date: Wed Apr 15 11:43:03 2009 +0900 sh: sh7724: Add VPU support. This adds uio_pdrv_genirq support for the VPU. Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt commit 40c7e8be556715079d0a9d7454ceb5371a2f0b39 Author: Kuninori Morimoto Date: Thu Apr 16 13:16:07 2009 +0900 sh: sh7724: Add I2C support. This adds support for the SH-Mobile I2C controller on the SH7724. Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt commit 47948d2bd6d27648a107a27357b3bc5ad054ff64 Author: Kuninori Morimoto Date: Wed Apr 15 11:42:47 2009 +0900 serial: sh-sci: SH7724 support. Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt commit 0207a2efb43d81e29e23662b5d035945688a103f Author: Kuninori Morimoto Date: Thu Apr 16 14:40:56 2009 +0900 sh: Add support for SH7724 (SH-Mobile R2R) CPU subtype. This implements initial support for the SH-Mobile R2R CPU. Based on Rev 0.11 of the initial SH7724 hardware manual. Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt commit ff7b1b4f000cea84f071c1b6aa2918b2119d66f1 Author: Steven Whitehouse Date: Wed Apr 15 16:55:05 2009 +0100 perfcounters: export perf_tpcounter_event Needed for modular tracepoint support. Signed-off-by: Steven Whitehouse Signed-off-by: Ingo Molnar commit 77857dc07247ed5fa700a197c96ef842d8dbebdf Author: Yinghai Lu Date: Wed Apr 15 11:57:01 2009 -0700 x86: use used_vectors in init_IRQ() Impact: fix crash with many devices I found this crash: [ 552.616646] general protection fault: 0403 [#1] SMP [ 552.620013] last sysfs file: /sys/devices/pci0000:00/0000:00:02.0/usb1/1-1/1-1:1.0/host13/target13:0:0/13:0:0:0/block/sr0/size [ 552.620013] CPU 0 [ 552.620013] Modules linked in: [ 552.620013] Pid: 0, comm: swapper Not tainted 2.6.30-rc1-tip-01931-g8fcafd8-dirty #28 Sun Fire X4440 [ 552.620013] RIP: 0010:[] [] default_idle+0x7d/0xda [ 552.620013] RSP: 0018:ffffffff81345e68 EFLAGS: 00010246 [ 552.620013] RAX: 0000000000000000 RBX: ffffffff8133d870 RCX: ffffc20000000000 [ 552.620013] RDX: 00000000001d0620 RSI: ffffffff8023bad8 RDI: ffffffff802a3169 [ 552.620013] RBP: ffffffff81345e98 R08: 0000000000000000 R09: ffffffff812244a0 [ 552.620013] R10: ffffffff81345dc8 R11: 7ebe1b6fa0bcac50 R12: 4ec4ec4ec4ec4ec5 [ 552.620013] R13: ffffffff813a54d0 R14: ffffffff813a7a40 R15: 0000000000000000 [ 552.620013] FS: 00000000006d1880(0000) GS:ffffc20000000000(0000) knlGS:0000000000000000 [ 552.620013] CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b [ 552.620013] CR2: 00007fec9d936a50 CR3: 000000007d1a9000 CR4: 00000000000006e0 [ 552.620013] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 552.620013] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 552.620013] Process swapper (pid: 0, threadinfo ffffffff81344000,task ffffffff812244a0) [ 552.620013] Stack: [ 552.620013] 0000000000000000 ffffc20000000000 00000000001d0620 7ebe1b6fa0bcac50 [ 552.620013] ffffffff8133d870 4ec4ec4ec4ec4ec5 ffffffff81345ec8 ffffffff8023bd84 [ 552.620013] 4ec4ec4ec4ec4ec5 ffffffff813a54d0 7ebe1b6fa0bcac50 ffffffff8133d870 [ 552.620013] Call Trace: [ 552.620013] [] c1e_idle+0x109/0x124 [ 552.620013] [] cpu_idle+0xb8/0x101 [ 552.620013] [] rest_init+0x7e/0x94 [ 552.620013] [] start_kernel+0x3dc/0x3fd [ 552.620013] [] x86_64_start_reservations+0xb9/0xd4 [ 552.620013] [] x86_64_start_kernel+0xee/0x109 [ 552.620013] Code: 48 8b 04 25 f8 b4 00 00 83 a0 3c e0 ff ff fb 0f ae f0 65 48 8b 04 25 f8 b4 00 00 f6 80 38 e0 ff ff 08 75 09 e8 71 76 06 00 fb f4 06 e8 68 76 06 00 fb 65 48 8b 04 25 f8 b4 00 00 83 88 3c e0 [ 552.620013] RIP [] default_idle+0x7d/0xda [ 552.620013] RSP [ 552.828646] ---[ end trace 4cbfc5c01382af7f ]--- Joerg Roedel said "The 0403 error code means that there was an external interrupt with vector 0x80. Yinghai, my theory is that the kernel on this machine has no 32bit emulation compiled in, right? In this case the selector points to a zero entry which may cause the #gpf right after the hlt. But I have no idea where the external int 0x80 comes from" it turns out that we could use 0x80 for external device on 64-bit when 32-bit emulation is disabled. But we forgot to set the gate for it. try to set gate for it by checking used_vectors. Also move apic_intr_init() early to avoid setting that gate two times. Signed-off-by: Yinghai Lu Cc: Andrew Morton Cc: Joerg Roedel LKML-Reference: <49E62DFD.6010904@kernel.org> Signed-off-by: Ingo Molnar commit 13318a7186d8e0ae08c996ea4111a945e7789772 Author: Miao Xie Date: Wed Apr 15 09:59:10 2009 +0800 sched: use group_first_cpu() instead of cpumask_first(sched_group_cpus()) Impact: cleanup This patch changes cpumask_first(sched_group_cpus()) to group_first_cpu() for maintainability. Signed-off-by: Miao Xie Acked-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 19c1a6f5764d787113fa323ffb18be7991208f82 Author: FUJITA Tomonori Date: Tue Apr 14 09:43:19 2009 +0900 x86 gart: reimplement IOMMU_LEAK feature by using DMA_API_DEBUG IOMMU_LEAK, GART's own feature, dumps the used IOMMU entries when IOMMU entries is full, which might be useful to find a bad driver that eats IOMMU entries. DMA_API_DEBUG provides the similar feature, debug_dma_dump_mappings, and it's better than GART's IOMMU_LEAK feature. GART's IOMMU_LEAK feature doesn't say who uses IOMMU entries so it's hard to find a bad driver. This patch reimplements the GART's IOMMU_LEAK feature by using DMA_API_DEBUG. Signed-off-by: FUJITA Tomonori Acked-by: Joerg Roedel Cc: Andrew Morton LKML-Reference: <1239669799-23579-2-git-send-email-fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Ingo Molnar commit e6a1a89d572c31b62d6dcf11a371c7323852d9b2 Author: FUJITA Tomonori Date: Wed Apr 15 18:22:41 2009 +0900 dma-debug: add dma_debug_resize_entries() to adjust the number of dma_debug_entries We use a static value for the number of dma_debug_entries. It can be overwritten by a kernel command line option. Some IOMMUs (e.g. GART) can't set an appropriate value by a kernel command line option because they can't know such value until they finish initializing up their hardware. This patch adds dma_debug_resize_entries() enables IOMMUs to adjust the number of dma_debug_entries anytime. Signed-off-by: FUJITA Tomonori Acked-by: Joerg Roedel Cc: fujita.tomonori@lab.ntt.co.jp Cc: akpm@linux-foundation.org LKML-Reference: <20090415182234R.fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Ingo Molnar commit b206525ad1f653b7da35f5827be93770d28eae11 Author: Jaswinder Singh Rajput Date: Tue Apr 14 23:04:37 2009 +0530 x86: k8 convert node_to_k8_nb_misc() from a macro to an inline function Converting node_to_k8_nb_misc() from a macro to an inline function makes compiler see the 'node' parameter in the !CONFIG_K8_NB too, which eliminates these compiler warnings: arch/x86/kernel/cpu/intel_cacheinfo.c: In function ‘show_cache_disable’: arch/x86/kernel/cpu/intel_cacheinfo.c:712: warning: unused variable ‘node’ arch/x86/kernel/cpu/intel_cacheinfo.c: In function ‘store_cache_disable’: arch/x86/kernel/cpu/intel_cacheinfo.c:739: warning: unused variable ‘node’ Signed-off-by: Jaswinder Singh Rajput Cc: Andreas Herrmann Cc: Mark Langsdorf LKML-Reference: <1239730477.2966.26.camel@ht.satnam> Signed-off-by: Ingo Molnar commit 05725f7eb4b8acb147c5fc7b91397b1f6bcab00d Author: Jiri Pirko Date: Tue Apr 14 20:17:16 2009 +0200 rculist: use list_entry_rcu in places where it's appropriate Use previously introduced list_entry_rcu instead of an open-coded list_entry + rcu_dereference combination. Signed-off-by: Jiri Pirko Reviewed-by: Paul E. McKenney Cc: dipankar@in.ibm.com LKML-Reference: <20090414181715.GA3634@psychotron.englab.brq.redhat.com> Signed-off-by: Ingo Molnar commit 9cfe06f8cd5c8c3ad6ab323973e87dde670642b8 Author: Steven Rostedt Date: Tue Apr 14 21:37:03 2009 -0400 tracing/events: add trace-events-sample This patch adds a sample to the samples directory on how to create and use TRACE_EVENT trace points. Signed-off-by: Steven Rostedt commit ad8d75fff811a6a230f7f43b05a6483099349533 Author: Steven Rostedt Date: Tue Apr 14 19:39:12 2009 -0400 tracing/events: move trace point headers into include/trace/events Impact: clean up Create a sub directory in include/trace called events to keep the trace point headers in their own separate directory. Only headers that declare trace points should be defined in this directory. Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neil Horman Cc: Zhao Lei Cc: Eduard - Gabriel Munteanu Cc: Pekka Enberg Signed-off-by: Steven Rostedt commit ecda8ae02a08ef065ff387f5cb2a2d4999da2408 Author: Steven Rostedt Date: Tue Apr 14 18:49:38 2009 -0400 tracing/events: fix lockdep system name Impact: fix compile error of lockdep event tracer Ingo Molnar pointed out that the system name for the lockdep tracer was "lock" which is used to include the event trace file name. It should be "lockdep" Reported-by: Ingo Molnar Signed-off-by: Steven Rostedt commit 61f919a12fbdc3fd20f980a34a118d597198a392 Author: Steven Rostedt Date: Tue Apr 14 18:22:32 2009 -0400 tracing/events: fix compile for modules disabled Impact: compile fix The addition of TRACE_EVENT for modules breaks the build for when modules are disabled. This code fixes that. Reported-by: Ingo Molnar Signed-off-by: Steven Rostedt commit 19e4529ee7345079eeacc8e40cf69a304a64dc23 Author: Stephen Rothwell Date: Tue Apr 14 17:27:18 2009 +1000 modules: Fix up build when CONFIG_MODULE_UNLOAD=n. Commit 3d43321b7015387cfebbe26436d0e9d299162ea1 ("modules: sysctl to block module loading") introduces a modules_disabled variable that is only defined if CONFIG_MODULE_UNLOAD is enabled, despite being used in other places. This moves it up and fixes up the build. CC kernel/module.o kernel/module.c: In function 'sys_init_module': kernel/module.c:2401: error: 'modules_disabled' undeclared (first use in this function) kernel/module.c:2401: error: (Each undeclared identifier is reported only once kernel/module.c:2401: error: for each function it appears in.) make[1]: *** [kernel/module.o] Error 1 make: *** [kernel/module.o] Error 2 Signed-off-by: Paul Mundt Signed-off-by: James Morris commit 6d723736e472f7a0cd5b62c84152fceead241328 Author: Steven Rostedt Date: Fri Apr 10 14:53:50 2009 -0400 tracing/events: add support for modules to TRACE_EVENT Impact: allow modules to add TRACE_EVENTS on load This patch adds the final hooks to allow modules to use the TRACE_EVENT macro. A notifier and a data structure are used to link the TRACE_EVENTs defined in the module to connect them with the ftrace event tracing system. It also adds the necessary automated clean ups to the trace events when a module is removed. Cc: Rusty Russell Signed-off-by: Steven Rostedt commit 17c873ec280a03894bc718af817f7f24fa787ae1 Author: Steven Rostedt Date: Fri Apr 10 18:12:50 2009 -0400 tracing/events: add export symbols for trace events in modules Impact: let modules add trace events The trace event code requires some functions to be exported to allow modules to use TRACE_EVENT. This patch adds EXPORT_SYMBOL_GPL to the necessary functions. Signed-off-by: Steven Rostedt commit a59fd6027218bd7c994e39d14afe0242f895144f Author: Steven Rostedt Date: Fri Apr 10 13:52:20 2009 -0400 tracing/events: convert event call sites to use a link list Impact: makes it possible to define events in modules The events are created by reading down the section that they are linked in by the macros. But this is not scalable to modules. This patch converts the manipulations to use a global link list, and on boot up it adds the items in the section to the list. This change will allow modules to add their tracing events to the list as well. Note, this change alone does not permit modules to use the TRACE_EVENT macros, but the change is needed for them to eventually do so. Signed-off-by: Steven Rostedt commit f42c85e74faa422cf0bc747ed808681145448f88 Author: Steven Rostedt Date: Mon Apr 13 12:25:37 2009 -0400 tracing/events: move the ftrace event tracing code to core This patch moves the ftrace creation into include/trace/ftrace.h and simplifies the work of developers in adding new tracepoints. Just the act of creating the trace points in include/trace and including define_trace.h will create the events in the debugfs/tracing/events directory. This patch removes the need of include/trace/trace_events.h Signed-off-by: Steven Rostedt commit 97f2025153499faa17267a0d4e18c7afaf73f39d Author: Steven Rostedt Date: Mon Apr 13 11:20:49 2009 -0400 tracing/events: move declarations from trace directory to core include In preparation to allowing trace events to happen in modules, we need to move some of the local declarations in the kernel/trace directory into include/linux. This patch simply moves the declarations and performs no context changes. Signed-off-by: Steven Rostedt commit 9504504cbab29ecb694186b1c5b15d3579c43c51 Author: Steven Rostedt Date: Sat Apr 11 12:59:57 2009 -0400 tracing: make trace_seq operations available for core kernel In the process to make TRACE_EVENT macro work for modules, the trace_seq operations must be available for core kernel code. These operations are quite useful and can be used for other implementations. The main idea is that we create a trace_seq handle that acts very much like the seq_file handle. struct trace_seq *s = kmalloc(sizeof(*s, GFP_KERNEL); trace_seq_init(s); trace_seq_printf(s, "some data %d\n", variable); printk("%s", s->buffer); The main use is to allow a top level function call several other functions that may store printf like data into the buffer. Then at the end, the top level function can process all the data with any method it would like to. It could be passed to userspace, output via printk or even use seq_file: trace_seq_to_user(s, ubuf, cnt); seq_puts(m, s->buffer); Signed-off-by: Steven Rostedt commit a8d154b009168337494fbf345671bab74d3e4b8b Author: Steven Rostedt Date: Fri Apr 10 09:36:00 2009 -0400 tracing: create automated trace defines This patch lowers the number of places a developer must modify to add new tracepoints. The current method to add a new tracepoint into an existing system is to write the trace point macro in the trace header with one of the macros TRACE_EVENT, TRACE_FORMAT or DECLARE_TRACE, then they must add the same named item into the C file with the macro DEFINE_TRACE(name) and then add the trace point. This change cuts out the needing to add the DEFINE_TRACE(name). Every file that uses the tracepoint must still include the trace/.h file, but the one C file must also add a define before the including of that file. #define CREATE_TRACE_POINTS #include This will cause the trace/mytrace.h file to also produce the C code necessary to implement the trace point. Note, if more than one trace/.h is used to create the C code it is best to list them all together. #define CREATE_TRACE_POINTS #include #include #include Thanks to Mathieu Desnoyers and Christoph Hellwig for coming up with the cleaner solution of the define above the includes over my first design to have the C code include a "special" header. This patch converts sched, irq and lockdep and skb to use this new method. Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neil Horman Cc: Zhao Lei Cc: Eduard - Gabriel Munteanu Cc: Pekka Enberg Signed-off-by: Steven Rostedt commit 72c6a9870f901045f2464c3dc6ee8914bfdc07aa Author: Jiri Pirko Date: Tue Apr 14 17:33:57 2009 +0200 rculist.h: introduce list_entry_rcu() and list_first_entry_rcu() I've run into the situation where I need to use list_first_entry with rcu-guarded list. This patch introduces this. Also simplify list_for_each_entry_rcu() to use new list_entry_rcu() instead of list_entry(). Signed-off-by: Jiri Pirko Reviewed-by: Paul E. McKenney Cc: dipankar@in.ibm.com LKML-Reference: <20090414153356.GC3999@psychotron.englab.brq.redhat.com> Signed-off-by: Ingo Molnar commit 56449f437add737a1e5e1cb7e00f63ac8ead1938 Author: Ingo Molnar Date: Tue Apr 14 11:24:36 2009 +0200 tracing: make the trace clocks available generally Jeremy Fitzhardinge reported this build failure: LD .tmp_vmlinux1 arch/x86/kernel/built-in.o: In function `ds_take_timestamp': git/linux/arch/x86/kernel/ds.c:1380: undefined reference to `trace_clock_global' git/linux/arch/x86/kernel/ds.c:1380: undefined reference to `trace_clock_global' Which is due to !CONFIG_TRACING && CONFIG_X86_DS=y. Expose the trace clock code to CONFIG_X86_DS as well. [ Unfortunately librarizing doesnt work well - ancient architectures with no raw_local_irq_save() primitive break the build. ] Reported-by: Jeremy Fitzhardinge LKML-Reference: <49E4413F.7070700@goop.org> Signed-off-by: Ingo Molnar commit 78ddb08feb7d4fbe3c0a9931804c51ee58be4023 Author: Johannes Weiner Date: Tue Apr 14 16:53:05 2009 +0200 wait: don't use __wake_up_common() '777c6c5 wait: prevent exclusive waiter starvation' made __wake_up_common() global to be used from abort_exclusive_wait(). It was needed to do a wake-up with the waitqueue lock held while passing down a key to the wake-up function. Since '4ede816 epoll keyed wakeups: add __wake_up_locked_key() and __wake_up_sync_key()' there is an appropriate wrapper for this case: __wake_up_locked_key(). Use it here and make __wake_up_common() private to the scheduler again. Signed-off-by: Johannes Weiner Cc: Andrew Morton Cc: Peter Zijlstra LKML-Reference: <1239720785-19661-1-git-send-email-hannes@cmpxchg.org> Signed-off-by: Ingo Molnar commit ea20d9293ce423a39717ed4375393129a2e701f9 Author: Steven Rostedt Date: Fri Apr 10 08:54:16 2009 -0400 tracing: consolidate trace and trace_event headers Impact: clean up Neil Horman (et. al.) criticized the way the trace events were broken up into two files. The reason for that was that ftrace needed to separate out the declarations from where the #include was used. It then dawned on me that the tracepoint.h header only needs to define the TRACE_EVENT macro if it is not already defined. The solution is simply to test if TRACE_EVENT is defined, and if it is not then the linux/tracepoint.h header can define it. This change consolidates all the .h and _event_types.h into the .h file. Reported-by: Neil Horman Reported-by: Theodore Tso Reported-by: Jiaying Zhang Cc: Zhaolei Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Jason Baron Cc: Mathieu Desnoyers Signed-off-by: Steven Rostedt commit 6967963d6d5cac40a091d075326f0e3ccb95c58a Merge: 9b1a88c 34e51ce Author: Mark Brown Date: Tue Apr 14 13:22:37 2009 +0100 Merge branch 'for-2.6.30' into for-2.6.31 commit c282866101bfde888a44da3babd2f9ab265ca6f9 Author: Krzysztof Helt Date: Sat Apr 4 14:48:32 2009 +0200 ALSA: sc6000: add support for SC-6600 and SC-7000 Add support for later cards based on CompuMedia ASC-9408 chipsets. These cards were produced by Gallant. This patch make the OSS aedsp16 driver redundant. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai commit 7e05575c422d45f393c2d9b5900e97a30bf69bea Author: FUJITA Tomonori Date: Tue Apr 14 12:12:29 2009 +0900 x86: calgary: remove IOMMU_DEBUG CONFIG_IOMMU_DEBUG has depends on CONFIG_GART_IOMMU: config IOMMU_DEBUG bool "Enable IOMMU debugging" depends on GART_IOMMU && DEBUG_KERNEL depends on X86_64 So it's not useful to have CONFIG_IOMMU_DEBUG in Calgary IOMMU code, which does the extra checking of the bitmap space management. And Calgary uses the iommu helper for the bitmap space management now so it would be better to have the extra checking feature in the iommu helper rather than Calgary code (if necessary). Signed-off-by: FUJITA Tomonori Acked-by: Muli Ben-Yehuda Cc: Joerg Roedel Cc: alexisb@us.ibm.com LKML-Reference: <20090414120827G.fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Ingo Molnar commit 8338c300642f67af5a8cc279ca5e088c7055b7eb Author: Takashi Iwai Date: Tue Apr 14 12:30:36 2009 +0200 ALSA: Add missing description of lx6464es to ALSA-Configuration.txt Signed-off-by: Takashi Iwai commit d7dee4d7744d039bf28e4f6d4f5674f44820265a Author: Takashi Iwai Date: Tue Apr 14 12:27:12 2009 +0200 ALSA: lx6464es - Disable lx_message_send() Disable lx_message_send() function temporarily as it's not used anywhere. Signed-off-by: Takashi Iwai commit 7852fd08fdc78bf43150137bdbfdfdccdefffe0f Author: Takashi Iwai Date: Tue Apr 14 12:25:52 2009 +0200 ALSA: lx6464es - Use snd_card_create() Use snd_card_create() instead of the obsoleted snd_card_new(). Signed-off-by: Takashi Iwai commit 02bec490450836ebbd628e97ec03f10b57def8ce Author: Tim Blechmann Date: Tue Mar 24 12:24:35 2009 +0100 ALSA: lx6464es - driver for the digigram lx6464es interface prototype of a driver for the digigram lx6464es 64 channel ethersound interface. Signed-off-by: Tim Blechmann Signed-off-by: Takashi Iwai commit 6424fb38667fffbbb1b90be0ffd9a0c540db6a4b Author: Yinghai Lu Date: Mon Apr 13 23:51:46 2009 -0700 x86: remove (null) in /sys kernel_page_tables Impact: cleanup %p prints out 0x000000000000000 as (null) so use %lx instead. Signed-off-by: Yinghai Lu LKML-Reference: <49E43282.1090607@kernel.org> Signed-off-by: Ingo Molnar commit e790fb0ba64bfec158e1219d899cb588275d12ab Author: Gautham R Shenoy Date: Tue Apr 14 10:25:35 2009 +0530 sched: Nominate a power-efficient ilb in select_nohz_balancer() The CPU that first goes idle becomes the idle-load-balancer and remains that until either it picks up a task or till all the CPUs of the system goes idle. Optimize this further to allow it to relinquish it's post once all it's siblings in the power-aware sched_domain go idle, thereby allowing the whole package-core to go idle. While relinquising the post, nominate another an idle-load balancer from a semi-idle core/package. Signed-off-by: Gautham R Shenoy Acked-by: Peter Zijlstra LKML-Reference: <20090414045535.7645.31641.stgit@sofia.in.ibm.com> Signed-off-by: Ingo Molnar commit f711f6090a81cbd396b63de90f415d33f563af9b Author: Gautham R Shenoy Date: Tue Apr 14 10:25:30 2009 +0530 sched: Nominate idle load balancer from a semi-idle package. Currently the nomination of idle-load balancer is done by choosing the first idle cpu in the nohz.cpu_mask. This may not be power-efficient, since such an idle cpu could come from a completely idle core/package thereby preventing the whole core/package from being in a low-power state. For eg, consider a quad-core dual package system. The cpu numbering need not be sequential and can something like [0, 2, 4, 6] and [1, 3, 5, 7]. With sched_mc/smt_power_savings and the power-aware IRQ balance, we try to keep as fewer Packages/Cores active. But the current idle load balancer logic goes against this by choosing the first_cpu in the nohz.cpu_mask and not taking the system topology into consideration. Improve the algorithm to nominate the idle load balancer from a semi idle cores/packages thereby increasing the probability of the cores/packages being in deeper sleep states for longer duration. The algorithm is activated only when sched_mc/smt_power_savings != 0. Signed-off-by: Gautham R Shenoy Acked-by: Peter Zijlstra LKML-Reference: <20090414045530.7645.12175.stgit@sofia.in.ibm.com> Signed-off-by: Ingo Molnar commit e7d43a74cb07cbc4b8e9b5e4a914816b33fb0719 Author: Jaswinder Singh Rajput Date: Tue Apr 14 13:18:28 2009 +0530 x86: avoid multiple declaration of kstack_depth_to_print Impact: cleanup asm/stacktrace.h is more appropriate so removing other 2 declarations. Signed-off-by: Jaswinder Singh Rajput Cc: Neil Horman LKML-Reference: <1239695308.3033.34.camel@ht.satnam> Signed-off-by: Ingo Molnar commit 66aa230e437d89ca56224135f617e2d8e391a3ef Author: Jaswinder Singh Rajput Date: Tue Apr 14 12:54:29 2009 +0530 x86: page_types.h unification of declarations Impact: unification of declarations, cleanup Unification of declarations: moved init_memory_mapping, initmem_init and free_initmem from page_XX_types.h to page_types.h Signed-off-by: Jaswinder Singh Rajput Acked-by: Pekka Enberg Cc: Andrew Morton LKML-Reference: <1239693869.3033.31.camel@ht.satnam> Signed-off-by: Ingo Molnar commit 6fd9b3a40b82081d9e6490b0d7cd656e9a78a134 Author: Paul E. McKenney Date: Mon Apr 13 21:31:18 2009 -0700 rcu: Update RCU tracing documentation for __rcu_pending This patch updates the RCU documentation to reflect the changes in tracing made in the previous patch in the set. Located-by: Anton Blanchard Tested-by: Anton Blanchard Signed-off-by: Paul E. McKenney Cc: anton@samba.org Cc: akpm@linux-foundation.org Cc: dipankar@in.ibm.com Cc: manfred@colorfullife.com Cc: cl@linux-foundation.org Cc: josht@linux.vnet.ibm.com Cc: schamp@sgi.com Cc: niv@us.ibm.com Cc: dvhltc@us.ibm.com Cc: ego@in.ibm.com Cc: laijs@cn.fujitsu.com Cc: rostedt@goodmis.org Cc: peterz@infradead.org Cc: penberg@cs.helsinki.fi Cc: andi@firstfloor.org Cc: "Paul E. McKenney" LKML-Reference: <12396834792865-git-send-email-> Signed-off-by: Ingo Molnar commit 7ba5c840e64d4a967379f1ae3eca73278180b11d Author: Paul E. McKenney Date: Mon Apr 13 21:31:17 2009 -0700 rcu: Add __rcu_pending tracing to hierarchical RCU Add tracing to __rcu_pending() to provide information on why RCU processing was kicked off. This is helpful for debugging hierarchical RCU, and might also be helpful in learning how hierarchical RCU operates. Located-by: Anton Blanchard Tested-by: Anton Blanchard Signed-off-by: Paul E. McKenney Cc: anton@samba.org Cc: akpm@linux-foundation.org Cc: dipankar@in.ibm.com Cc: manfred@colorfullife.com Cc: cl@linux-foundation.org Cc: josht@linux.vnet.ibm.com Cc: schamp@sgi.com Cc: niv@us.ibm.com Cc: dvhltc@us.ibm.com Cc: ego@in.ibm.com Cc: laijs@cn.fujitsu.com Cc: rostedt@goodmis.org Cc: peterz@infradead.org Cc: penberg@cs.helsinki.fi Cc: andi@firstfloor.org Cc: "Paul E. McKenney" LKML-Reference: <1239683479943-git-send-email-> Signed-off-by: Ingo Molnar commit 05cfbd66d07c44865983c8b65ae9d0037d874206 Merge: 31c9a24 ef631b0 Author: Ingo Molnar Date: Tue Apr 14 11:32:23 2009 +0200 Merge branch 'core/urgent' into core/rcu Merge reason: new patches to be queued up depend on: ef631b0: rcu: Make hierarchical RCU less IPI-happy Signed-off-by: Ingo Molnar commit ecfcc53fef3c357574bb6143dce6631e6d56295c Author: Etienne Basset Date: Wed Apr 8 20:40:06 2009 +0200 smack: implement logging V3 the following patch, add logging of Smack security decisions. This is of course very useful to understand what your current smack policy does. As suggested by Casey, it also now forbids labels with ', " or \ It introduces a '/smack/logging' switch : 0: no logging 1: log denied (default) 2: log accepted 3: log denied&accepted Signed-off-by: Etienne Basset Acked-by: Casey Schaufler Acked-by: Eric Paris Signed-off-by: James Morris commit 6e837fb152410e571a81aaadbd9884f0bc46a55e Author: Etienne Basset Date: Wed Apr 8 20:39:40 2009 +0200 smack: implement logging V3 This patch creates auditing functions usable by LSM to audit security events. It provides standard dumping of FS, NET, task etc ... events (code borrowed from SELinux) and provides 2 callbacks to define LSM specific auditing, which should be flexible enough to convert SELinux too. Signed-off-by: Etienne Basset Acked-by: Casey Schaufler cked-by: Eric Paris Signed-off-by: James Morris commit 0a19e53c1514ad8e9c3cbab40c6c3f52c86f403d Author: Tom Zanussi Date: Mon Apr 13 03:17:50 2009 -0500 tracing/filters: allow on-the-fly filter switching This patch allows event filters to be safely removed or switched on-the-fly while avoiding the use of rcu or the suspension of tracing of previous versions. It does it by adding a new filter_pred_none() predicate function which does nothing and by never deallocating either the predicates or any of the filter_pred members used in matching; the predicate lists are allocated and initialized during ftrace_event_calls initialization. Whenever a filter is removed or replaced, the filter_pred_* functions currently in use by the affected ftrace_event_call are immediately switched over to to the filter_pred_none() function, while the rest of the filter_pred members are left intact, allowing any currently executing filter_pred_* functions to finish up, using the values they're currently using. In the case of filter replacement, the new predicate values are copied into the old predicates after the above step, and the filter_pred_none() functions are replaced by the filter_pred_* functions for the new filter. In this case, it is possible though very unlikely that a previous filter_pred_* is still running even after the filter_pred_none() switch and the switch to the new filter_pred_*. In that case, however, because nothing has been deallocated in the filter_pred, the worst that can happen is that the old filter_pred_* function sees the new values and as a result produces either a false positive or a false negative, depending on the values it finds. So one downside to this method is that rarely, it can produce a bad match during the filter switch, but it should be possible to live with that, IMHO. The other downside is that at least in this patch the predicate lists are always pre-allocated, taking up memory from the start. They could probably be allocated on first-use, and de-allocated when tracing is completely stopped - if this patch makes sense, I could create another one to do that later on. Oh, and it also places a restriction on the size of __arrays in events, currently set to 128, since they can't be larger than the now embedded str_val arrays in the filter_pred struct. Signed-off-by: Tom Zanussi Acked-by: Frederic Weisbecker Cc: Steven Rostedt Cc: paulmck@linux.vnet.ibm.com LKML-Reference: <1239610670.6660.49.camel@tropicana> Signed-off-by: Ingo Molnar commit b5c851a88a369854c04e511cefb84ea2d0cfa209 Merge: eb02ce0 80a04d3 Author: Ingo Molnar Date: Tue Apr 14 00:02:16 2009 +0200 Merge branch 'linus' into tracing/core Merge reason: merge latest tracing fixes to avoid conflicts in kernel/trace/trace_events_filter.c with upcoming change Signed-off-by: Ingo Molnar commit eb02ce017dd83985041a7e54c6449f92d53b026f Author: Tom Zanussi Date: Wed Apr 8 03:15:54 2009 -0500 tracing/filters: use ring_buffer_discard_commit() in filter_check_discard() This patch changes filter_check_discard() to make use of the new ring_buffer_discard_commit() function and modifies the current users to call the old commit function in the non-discard case. It also introduces a version of filter_check_discard() that uses the global trace buffer (filter_current_check_discard()) for those cases. v2 changes: - fix compile error noticed by Ingo Molnar Signed-off-by: Tom Zanussi Cc: Steven Rostedt Cc: fweisbec@gmail.com LKML-Reference: <1239178554.10295.36.camel@tropicana> Signed-off-by: Ingo Molnar commit 5f77a88b3f8268b11940b51d2e03d26a663ceb90 Author: Tom Zanussi Date: Wed Apr 8 03:14:01 2009 -0500 tracing/infrastructure: separate event tracer from event support Add a new config option, CONFIG_EVENT_TRACING that gets selected when CONFIG_TRACING is selected and adds everything needed by the stuff in trace_export - basically all the event tracing support needed by e.g. bprint, minus the actual events, which are only included if CONFIG_EVENT_TRACER is selected. So CONFIG_EVENT_TRACER can be used to turn on or off the generated events (what I think of as the 'event tracer'), while CONFIG_EVENT_TRACING turns on or off the base event tracing support used by both the event tracer and the other things such as bprint that can't be configured out. Signed-off-by: Tom Zanussi Cc: Steven Rostedt Cc: fweisbec@gmail.com LKML-Reference: <1239178441.10295.34.camel@tropicana> Signed-off-by: Ingo Molnar commit 77d9f465d46fd67cdb82ee5e1ab99dd57a17c486 Author: Steven Rostedt Date: Thu Apr 2 01:16:59 2009 -0400 tracing/filters: use ring_buffer_discard_commit for discarded events The ring_buffer_discard_commit makes better usage of the ring_buffer when an event has been discarded. It tries to remove it completely if possible. This patch converts the trace event filtering to use ring_buffer_discard_commit instead of the ring_buffer_event_discard. Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit fa1b47dd85453ec7d4bcfe4aa4a2d172ba452fc3 Author: Steven Rostedt Date: Thu Apr 2 00:09:41 2009 -0400 ring-buffer: add ring_buffer_discard_commit The ring_buffer_discard_commit is similar to ring_buffer_event_discard but it can only be done on an event that has yet to be commited. Unpredictable results can happen otherwise. The main difference between ring_buffer_discard_commit and ring_buffer_event_discard is that ring_buffer_discard_commit will try to free the data in the ring buffer if nothing has addded data after the reserved event. If something did, then it acts almost the same as ring_buffer_event_discard followed by a ring_buffer_unlock_commit. Note, either ring_buffer_commit_discard and ring_buffer_unlock_commit can be called on an event, not both. This commit also exports both discard functions to be usable by GPL modules. Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit e45f2e2bd298e1ff687448e5fd15a3588b5807ec Author: Tom Zanussi Date: Tue Mar 31 00:49:16 2009 -0500 tracing/filters: add TRACE_EVENT_FORMAT_NOFILTER event macro Frederic Weisbecker suggested that the trace_special event shouldn't be filterable; this patch adds a TRACE_EVENT_FORMAT_NOFILTER event macro that allows an event format to be exported without having a filter attached, and removes filtering from the trace_special event. Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit e1112b4d96859367a93468027c9635e2ac04eb3f Author: Tom Zanussi Date: Tue Mar 31 00:48:49 2009 -0500 tracing/filters: add run-time field descriptions to TRACE_EVENT_FORMAT events This patch adds run-time field descriptions to all the event formats exported using TRACE_EVENT_FORMAT. It also hooks up all the tracers that use them (i.e. the tracers in the 'ftrace subsystem') so they can also have their output filtered by the event-filtering mechanism. When I was testing this, there were a couple of things that fooled me into thinking the filters weren't working, when actually they were - I'll mention them here so others don't make the same mistakes (and file bug reports. ;-) One is that some of the tracers trace multiple events e.g. the sched_switch tracer uses the context_switch and wakeup events, and if you don't set filters on all of the traced events, the unfiltered output from the events without filters on them can make it look like the filtering as a whole isn't working properly, when actually it is doing what it was asked to do - it just wasn't asked to do the right thing. The other is that for the really high-volume tracers e.g. the function tracer, the volume of filtered events can be so high that it pushes the unfiltered events out of the ring buffer before they can be read so e.g. cat'ing the trace file repeatedly shows either no output, or once in awhile some output but that isn't there the next time you read the trace, which isn't what you normally expect when reading the trace file. If you read from the trace_pipe file though, you can catch them before they disappear. Changes from v1: As suggested by Frederic Weisbecker: - get rid of externs in functions - added unlikely() to filter_check_discard() Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 5cda395f4a262788d8ed79ac8a26a2b821e5f751 Author: Alexander van Heukelum Date: Mon Apr 13 17:39:24 2009 +0200 x86: fix function definitions after: x86: apic - introduce imcr_ helpers The patch "introduce imcr_ helpers" introduced good comments, but also a few new compile warnings. This fixes the function definitions to have a 'void' return type. Signed-off-by: Alexander van Heukelum Acked-by: Cyrill Gorcunov LKML-Reference: <20090413153924.GA20287@mailshack.com> Signed-off-by: Ingo Molnar commit 0f3fd87ce43727d6b8573191ce89e874533b1429 Author: Luis Henriques Date: Mon Apr 13 20:24:50 2009 +0100 perf_counter: fix alignment in /proc/interrupts Trivial fix on columns alignment in /proc/interrupts file. Signed-off-by: Luis Henriques Cc: Peter Zijlstra LKML-Reference: <20090413192449.GA3920@hades.domain.com> Signed-off-by: Ingo Molnar commit 9b1a88c7105f593cc61a7acd3c51fcf4bf7b8038 Merge: f2644a2 6e498d5 Author: Mark Brown Date: Mon Apr 13 15:12:48 2009 +0100 Merge branch 'for-2.6.30' into for-2.6.31 commit f2644a2c00a06236a9c5e85488b0680825bad39c Author: Mark Brown Date: Tue Apr 7 19:20:14 2009 +0100 ASoC: Add WM8960 CODEC driver The WM8960 is a low power, high quality stereo codec designed for portable digital audio applications. Stereo class D speaker drivers provide 1W per channel into 8W loads. Guaranteed low leakage, excellent PSRR and pop/click suppression mechanisms enable direct battery connection for the speaker supply. The device also integrates a complete microphone interface and a stereo headphone driver. External component requirements are drastically reduced as no separate microphone, speaker or headphone amplifiers are required. Advanced on-chip digital signal processing performs automatic level control for the microphone or line input. Stereo 24-bit sigma-delta ADCs and DACs are used with low power over-sampling digital interpolation and decimation filters and a flexible digital audio interface. The master clock can be input directly or generated internally by an onboard PLL, supporting most commonly-used clocking schemes. This driver was originally written by Liam Girdwood, with substantial subsequent additions and updates for feature completeness and changes in the ASoC framework from me. Signed-off-by: Mark Brown commit a820532002e70e3a06f1ea7133e9b02443d07382 Author: Daniel Ribeiro Date: Wed Apr 8 10:51:24 2009 -0300 ASoC: pxa-ssp.c fix clock/frame invert SCMODE(0): Data Driven (Falling), Data Sampled (Rising), Idle State (Low) SCMODE(1): Data Driven (Rising), Data Sampled (Falling), Idle State (Low) SCMODE(2): Data Driven (Rising), Data Sampled (Falling), Idle State (High) SCMODE(3): Data Driven (Falling), Data Sampled (Rising), Idle State (High) SCMODE(3) does not invert the clock polarity compared to the default SCMODE(0). This patch also adds all possible NF/IF, NB/IB combinations to the DSP_A and DSP_B modes. Signed-off-by: Daniel Ribeiro Signed-off-by: Mark Brown commit 6bbcb459cd50807511491ddf96bca1ef92006bf8 Author: Mark Brown Date: Mon Apr 13 11:29:10 2009 +0100 ASoC: Move the WM9713 voice DAC powerdown to a DAPM event This ensures that we sync with the DAPM powerdown sequencing properly and don't need to bounce the power on the voice DAC so often. Signed-off-by: Mark Brown commit f6d655a6e6974e474a11b25052c29d10b80814b3 Author: Mark Brown Date: Mon Apr 13 11:27:03 2009 +0100 ASoC: Support DAPM events for DACs and ADCs Signed-off-by: Mark Brown commit 025756eca458b4a3d5e3d76baaffb2e8e3df79db Author: Mark Brown Date: Mon Apr 13 11:09:18 2009 +0100 ASoC: Factor out application of power for generic widgets This is simple code motion, intended to support future refactoring of the DAPM algorithms and (more immediately) the additon of events for DACs and ADCs. Signed-off-by: Mark Brown commit f4976116a98f108bf385f217332aadb3ca98fe66 Author: Mark Brown Date: Mon Apr 13 10:53:02 2009 +0100 ASoC: WM9713 requires symmetric rates on the voice DAI Signed-off-by: Mark Brown commit b9b34f24b23ba9e79e07c0980e7fff16af2a67d1 Author: Cyrill Gorcunov Date: Sun Apr 12 20:47:42 2009 +0400 x86: smp.c - align smp_ops assignments Impact: cleanup It's a bit hard to parse by eyes without them being aligned. Signed-off-by: Cyrill Gorcunov LKML-Reference: <20090412165058.924175574@openvz.org> Signed-off-by: Ingo Molnar commit 08306ce61d6848e6fbf74fa4cc693c3fb29e943f Author: Cyrill Gorcunov Date: Sun Apr 12 20:47:41 2009 +0400 x86: apic - introduce dummy apic operations Impact: refactor, speed up and robustize code In case if apic was disabled by kernel option or by hardware limits we can use dummy operations in apic->write to simplify the ack_APIC_irq() code. At the lame time the patch fixes the missed EOI in do_IRQ function (which has place if kernel is compiled as X86-32 and interrupt without handler happens where apic was not asked to be disabled via kernel option). Note that native_apic_write_dummy() consists of WARN_ON_ONCE to catch any buggy writes on enabled APICs. Could be removed after some time of testing. Signed-off-by: Cyrill Gorcunov LKML-Reference: <20090412165058.724788431@openvz.org> Signed-off-by: Ingo Molnar commit c0eaa4536f08b98fbcfa7fce5b7b0de1bebcb0e1 Author: Cyrill Gorcunov Date: Sun Apr 12 20:47:40 2009 +0400 x86: apic - introduce imcr_ helpers Impact: cleanup Distinguish port writting magic into helpers with comments. Signed-off-by: Cyrill Gorcunov LKML-Reference: <20090412165058.535921550@openvz.org> Signed-off-by: Ingo Molnar commit edea7148a87c099e5d5d4838285cc27e459588b7 Author: Cyrill Gorcunov Date: Sun Apr 12 20:47:39 2009 +0400 x86: irq.c - tiny cleanup Impact: cleanup, robustization 1) guard ack_bad_irq with printk_ratelimit since there is no guarantee we will not be flooded one day 2) use pr_emerg() helper Signed-off-by: Cyrill Gorcunov LKML-Reference: <20090412165058.277579847@openvz.org> Signed-off-by: Ingo Molnar commit 3fa89ca7ba5ba50b3924a11f6604b4bdce5f7842 Author: Jaswinder Singh Rajput Date: Sun Apr 12 20:37:25 2009 +0530 x86: vdso/vma.c declare vdso_enabled and arch_setup_additional_pages before they get used Impact: cleanup, address sparse warnings Addresses the problem pointed out by these sparse warning: arch/x86/vdso/vma.c:19:28: warning: symbol 'vdso_enabled' was not declared. Should it be static? arch/x86/vdso/vma.c:101:5: warning: symbol 'arch_setup_additional_pages' was not declared. Should it be static? Signed-off-by: Jaswinder Singh Rajput LKML-Reference: <1239548845.4170.2.camel@localhost.localdomain> Signed-off-by: Ingo Molnar commit 66de7792c02693b49671afe58c771fde3b092fc7 Author: Li Zefan Date: Wed Apr 1 16:19:19 2009 +0800 blktrace: fix output of BLK_TC_PC events BLK_TC_PC events should be treated differently with BLK_TC_FS events. Before this patch: # echo 1 > /sys/block/sda/sda1/trace/enable # echo pc > /sys/block/sda/sda1/trace/act_mask # echo blk > /debugfs/tracing/current_tracer # (generate some BLK_TC_PC events) # cat trace bash-2184 [000] 1774.275413: 8,7 I N [bash] bash-2184 [000] 1774.275435: 8,7 D N [bash] bash-2184 [000] 1774.275540: 8,7 I R [bash] bash-2184 [000] 1774.275547: 8,7 D R [bash] ksoftirqd/0-4 [000] 1774.275580: 8,7 C N 0 [0] bash-2184 [000] 1774.275648: 8,7 I R [bash] bash-2184 [000] 1774.275653: 8,7 D R [bash] ksoftirqd/0-4 [000] 1774.275682: 8,7 C N 0 [0] bash-2184 [000] 1774.275739: 8,7 I R [bash] bash-2184 [000] 1774.275744: 8,7 D R [bash] ksoftirqd/0-4 [000] 1774.275771: 8,7 C N 0 [0] bash-2184 [000] 1774.275804: 8,7 I R [bash] bash-2184 [000] 1774.275808: 8,7 D R [bash] ksoftirqd/0-4 [000] 1774.275836: 8,7 C N 0 [0] After this patch: # cat trace bash-2263 [000] 366.782149: 8,7 I N 0 (00 ..) [bash] bash-2263 [000] 366.782323: 8,7 D N 0 (00 ..) [bash] bash-2263 [000] 366.782557: 8,7 I R 8 (25 00 ..) [bash] bash-2263 [000] 366.782560: 8,7 D R 8 (25 00 ..) [bash] ksoftirqd/0-4 [000] 366.782582: 8,7 C N (25 00 ..) [0] bash-2263 [000] 366.782648: 8,7 I R 8 (5a 00 3f 00) [bash] bash-2263 [000] 366.782650: 8,7 D R 8 (5a 00 3f 00) [bash] ksoftirqd/0-4 [000] 366.782669: 8,7 C N (5a 00 3f 00) [0] bash-2263 [000] 366.782710: 8,7 I R 8 (5a 00 08 00) [bash] bash-2263 [000] 366.782713: 8,7 D R 8 (5a 00 08 00) [bash] ksoftirqd/0-4 [000] 366.782730: 8,7 C N (5a 00 08 00) [0] bash-2263 [000] 366.783375: 8,7 I R 36 (5a 00 08 00) [bash] bash-2263 [000] 366.783379: 8,7 D R 36 (5a 00 08 00) [bash] ksoftirqd/0-4 [000] 366.783404: 8,7 C N (5a 00 08 00) [0] This is what we do with PC events in user-space blktrace. Signed-off-by: Li Zefan Acked-by: Arnaldo Carvalho de Melo Cc: Jens Axboe Cc: Steven Rostedt Cc: Frederic Weisbecker LKML-Reference: <49D32387.9040106@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit b78825d608f30a47e3154ab6872a03f0de0c9d45 Author: Li Zefan Date: Wed Apr 1 16:18:53 2009 +0800 blktrace: fix output of unknown events Not all events are pc (packet command) events. An event is a pc event only if it has BLK_TC_PC bit set. Signed-off-by: Li Zefan Acked-by: Arnaldo Carvalho de Melo Cc: Jens Axboe Cc: Steven Rostedt Cc: Frederic Weisbecker LKML-Reference: <49D3236D.3090705@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit fc182a4330fc22ea1b68fa3d5064dd85a73a4c4a Author: Zhaolei Date: Fri Apr 10 14:27:38 2009 +0800 tracing, kmemtrace: Make kmem tracepoints use TRACE_EVENT macro TRACE_EVENT is a more generic way to define tracepoints. Doing so adds these new capabilities to this tracepoint: - zero-copy and per-cpu splice() tracing - binary tracing without printf overhead - structured logging records exposed under /debug/tracing/events - trace events embedded in function tracer output and other plugins - user-defined, per tracepoint filter expressions Signed-off-by: Zhao Lei Acked-by: Eduard - Gabriel Munteanu Acked-by: Pekka Enberg Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Tom Zanussi LKML-Reference: <49DEE6DA.80600@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 02af61bb50f5d5f0322dbe5ab2a0d75808d25c7b Author: Zhaolei Date: Fri Apr 10 14:26:18 2009 +0800 tracing, kmemtrace: Separate include/trace/kmemtrace.h to kmemtrace part and tracepoint part Impact: refactor code for future changes Current kmemtrace.h is used both as header file of kmemtrace and kmem's tracepoints definition. Tracepoints' definition file may be used by other code, and should only have definition of tracepoint. We can separate include/trace/kmemtrace.h into 2 files: include/linux/kmemtrace.h: header file for kmemtrace include/trace/kmem.h: definition of kmem tracepoints Signed-off-by: Zhao Lei Acked-by: Eduard - Gabriel Munteanu Acked-by: Pekka Enberg Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Tom Zanussi LKML-Reference: <49DEE68A.5040902@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 2c1b284e4fa260fd922b9a65c99169e2630c6862 Author: Jaswinder Singh Rajput Date: Sat Apr 11 00:03:10 2009 +0530 x86: clean up declarations and variables Impact: cleanup, no code changed - syscalls.h update declarations due to unifications - irq.c declare smp_generic_interrupt() before it gets used - process.c declare sys_fork() and sys_vfork() before they get used - tsc.c rename tsc_khz shadowed variable - apic/probe_32.c declare apic_default before it gets used - apic/nmi.c prev_nmi_count should be unsigned - apic/io_apic.c declare smp_irq_move_cleanup_interrupt() before it gets used - mm/init.c declare direct_gbpages and free_initrd_mem before they get used Signed-off-by: Jaswinder Singh Rajput Signed-off-by: Ingo Molnar commit abd41443ac76d3e9c29a8c1d9e9a3312306cc55e Author: Theodore Ts'o Date: Sat Apr 11 15:51:18 2009 -0400 tracing: Document the event tracing system Signed-off-by: "Theodore Ts'o" Cc: Theodore Ts'o Cc: Steven Rostedt LKML-Reference: <1239479479-2603-3-git-send-email-tytso@mit.edu> Signed-off-by: Ingo Molnar commit 56c49951747f250d8398582509e02ae5ce1d36d1 Author: Theodore Ts'o Date: Sat Apr 11 15:51:19 2009 -0400 tracing: Add documentation for the power tracer Signed-off-by: "Theodore Ts'o" Acked-by: Arjan van de Ven Cc: Frederic Weisbecker Cc: Steven Rostedt LKML-Reference: <1239479479-2603-4-git-send-email-tytso@mit.edu> Signed-off-by: Ingo Molnar commit 2de1f33e99cec5fd79542a1d0e26efb9c36a98bb Author: Jaswinder Singh Rajput Date: Sat Apr 11 12:55:26 2009 +0530 x86: apic/x2apic_cluster.c x86_cpu_to_logical_apicid should be static Impact: reduce kernel size a bit, address sparse warning Addresses the problem pointed out by this sparse warning: arch/x86/kernel/apic/x2apic_cluster.c:13:1: warning: symbol 'per_cpu__x86_cpu_to_logical_apicid' was not declared. Should it be static? Signed-off-by: Jaswinder Singh Rajput Cc: Suresh Siddha LKML-Reference: <1239434726.4418.24.camel@localhost.localdomain> Signed-off-by: Ingo Molnar commit f4c1724f3437ac70d8330968379148c954ca34c7 Author: Alexander Beregalov Date: Sun Apr 12 05:04:43 2009 +0400 ASoC: n810: replace BUG() with BUG_ON() Signed-off-by: Alexander Beregalov Signed-off-by: Mark Brown commit cf9972a921470b0a2da7906104bcd540b20e33bf Author: H. Peter Anvin Date: Sat Apr 11 22:24:05 2009 -0700 x86, setup: fix comment in the "glove box" code Impact: Comment change only The glove box is about avoiding problems with *registers* being touched, not *memory*. Signed-off-by: H. Peter Anvin commit a5a2a0c7fa039c59619bc908b3b1ed24734d442a Author: Darren Hart Date: Fri Apr 10 09:50:05 2009 -0700 futex: fix futex_wait_setup key handling If the get_futex_key() call were to fail, the existing code would try and put_futex_key() prior to returning. This patch makes sure we only put_futex_key() if get_futex_key() succeeded. Reported-by: Clark Williams Signed-off-by: Darren Hart LKML-Reference: <20090410165005.14342.16973.stgit@Aeon> Signed-off-by: Thomas Gleixner commit 47f16ca7631f9c6bad8e6d968cfb1433029b09ec Author: Ingo Molnar Date: Fri Apr 10 14:58:05 2009 +0200 x86, irqinit: preempt merge conflicts To make the topic merge life easier for tip:perfcounters/core, include two (inactive in this topic) IRQ vector initializations here. Also fix build bug - missing kprobes.h inclusion. Signed-off-by: Ingo Molnar commit 6265ff19ca08df0d96c859ae5e4dc2d9ad07070e Author: Andreas Herrmann Date: Thu Apr 9 15:47:10 2009 +0200 x86: cacheinfo: complete L2/L3 Cache and TLB associativity field definitions See "CPUID Specification" (AMD Publication #: 25481, Rev. 2.28, April 2008) Signed-off-by: Andreas Herrmann Cc: Mark Langsdorf LKML-Reference: <20090409134710.GA8026@alberich.amd.com> Signed-off-by: Ingo Molnar commit abdb5a5713330e17dfe91ab0d3e29c4744d95162 Author: Pekka Enberg Date: Thu Apr 9 11:52:30 2009 +0300 x86: remove some ifdefs from native_init_IRQ() Impact: cleanup Reviewed-by Cyrill Gorcunov Signed-off-by: Pekka Enberg Signed-off-by: Ingo Molnar commit ac3048dfd4740becf8d768844cf47ebee363c9f8 Author: Pekka Enberg Date: Thu Apr 9 11:52:29 2009 +0300 x86: define IA32_SYSCALL_VECTOR on 32-bit to reduce ifdefs Impact: cleanup We can remove some #ifdefs if we define IA32_SYSCALL_VECTOR on 32-bit. Reviewed-by Cyrill Gorcunov Signed-off-by: Pekka Enberg Signed-off-by: Ingo Molnar commit 31cb45ef2600d47191d51253ec94b5e3f689260d Author: Pekka Enberg Date: Thu Apr 9 11:52:28 2009 +0300 x86: unify irqinit_{32,64}.c into irqinit.c Impact: cleanup Reviewed-by Cyrill Gorcunov Signed-off-by: Pekka Enberg Signed-off-by: Ingo Molnar commit ab19c25abd14db28d7454f00805ea59f22ed6057 Author: Pekka Enberg Date: Thu Apr 9 11:52:27 2009 +0300 x86: unify apic_intr_init() in irqinit_{32,64}.c Impact: cleanup Reviewed-by Cyrill Gorcunov Signed-off-by: Pekka Enberg Signed-off-by: Ingo Molnar commit 778838600eb6973bdb6fd11e7f91b43cea4d6f45 Author: Pekka Enberg Date: Thu Apr 9 11:52:26 2009 +0300 x86: unify trivial differences in irqinit_{32,64}.c Impact: cleanup Reviewed-by Cyrill Gorcunov Signed-off-by: Pekka Enberg Signed-off-by: Ingo Molnar commit 320fd99672a44ece6d1cd0d838ba31c8ebbf5979 Author: Pekka Enberg Date: Thu Apr 9 11:52:25 2009 +0300 x86: unify native_init_IRQ() in irqinit_{32,64}.c Impact: cleanup Reviewed-by Cyrill Gorcunov Signed-off-by: Pekka Enberg Signed-off-by: Ingo Molnar commit 598c73d250ffb112715aa48fb325d79e255be23b Author: Pekka Enberg Date: Thu Apr 9 11:52:24 2009 +0300 x86: unify init_ISA_irqs() in irqinit_{32,64}.c Impact: cleanup Reviewed-by Cyrill Gorcunov Signed-off-by: Pekka Enberg Signed-off-by: Ingo Molnar commit b0096bb0b640d0a7713618b3472fd0f4adf30a96 Author: Pekka Enberg Date: Thu Apr 9 11:52:23 2009 +0300 x86: unify smp_intr_init() in irqinit_{32,64}.h Impact: cleanup Reviewed-by Cyrill Gorcunov Signed-off-by: Pekka Enberg Signed-off-by: Ingo Molnar commit d3496c85cae22fb7713af6ed542a6aeae8ee4210 Author: Pekka Enberg Date: Thu Apr 9 11:52:22 2009 +0300 x86: use identical loop constructs in 32-bit and 64-bit native_init_IRQ() Impact: cleanup Reviewed-by Cyrill Gorcunov Signed-off-by: Pekka Enberg Signed-off-by: Ingo Molnar commit 22813c45228160b07244a7c4ed7580388ac0f33d Author: Pekka Enberg Date: Thu Apr 9 11:52:21 2009 +0300 x86: introduce apic_intr_init() in irqinit_32.c Impact: cleanup Reviewed-by Cyrill Gorcunov Signed-off-by: Pekka Enberg Signed-off-by: Ingo Molnar commit 36290d87f5abf260a543e5b711be4ceed03e6b1a Author: Pekka Enberg Date: Thu Apr 9 11:52:20 2009 +0300 x86: introduce smp_intr_init() in irqinit_32.c Impact: cleanup Reviewed-by Cyrill Gorcunov Signed-off-by: Pekka Enberg Signed-off-by: Ingo Molnar commit 7371d9fcb88dc9185be9719f64744a339c537a92 Author: Pekka Enberg Date: Thu Apr 9 11:52:19 2009 +0300 x86: move init_ISA_irqs() in irqinit_32.c to match ordering in irqinit_64.c Impact: cleanup Reviewed-by Cyrill Gorcunov Signed-off-by: Pekka Enberg Signed-off-by: Ingo Molnar commit f465145235313c451164bdfa9037ac254bf00c9a Author: Pekka Enberg Date: Thu Apr 9 11:52:18 2009 +0300 x86: move x86_quirk_pre_intr_init() to irqinit_32.c Impact: cleanup In preparation for unifying irqinit_{32,64}.c, make x86_quirk_pre_intr_init() local to irqinit_32.c. Reviewed-by Cyrill Gorcunov Signed-off-by: Pekka Enberg Signed-off-by: Ingo Molnar commit 2fad2d9bb8310889f3261035b594b4e068b6eb8b Author: Mark Langsdorf Date: Thu Apr 9 15:31:53 2009 +0200 x86/docs: add description for cache_disable sysfs interface Signed-off-by: Mark Langsdorf Signed-off-by: Andreas Herrmann Cc: Andrew Morton LKML-Reference: <20090409133153.GL31527@alberich.amd.com> Signed-off-by: Ingo Molnar commit ba518bea2db21c72d44a6cbfd825b026ef9cdcb6 Author: Mark Langsdorf Date: Thu Apr 9 15:24:06 2009 +0200 x86: cacheinfo: disable L3 ECC scrubbing when L3 cache index is disabled (Use correct mask to zero out bits 24-28 by Andreas) Signed-off-by: Mark Langsdorf Signed-off-by: Andreas Herrmann Cc: Andrew Morton LKML-Reference: <20090409132406.GK31527@alberich.amd.com> Signed-off-by: Ingo Molnar commit f8b201fc7110c3673437254e8ba02451461ece0b Author: Mark Langsdorf Date: Thu Apr 9 15:18:49 2009 +0200 x86: cacheinfo: replace sysfs interface for cache_disable feature Impact: replace sysfs attribute Current interface violates against "one-value-per-sysfs-attribute rule". This patch replaces current attribute with two attributes -- one for each L3 Cache Index Disable register. Signed-off-by: Mark Langsdorf Signed-off-by: Andreas Herrmann Cc: Andrew Morton LKML-Reference: <20090409131849.GJ31527@alberich.amd.com> Signed-off-by: Ingo Molnar commit afd9fceec55225d33be878927056a548c2eef26c Author: Andreas Herrmann Date: Thu Apr 9 15:16:17 2009 +0200 x86: cacheinfo: use cached K8 NB_MISC devices instead of scanning for it Impact: avoid code duplication Signed-off-by: Andreas Herrmann Cc: Andrew Morton Cc: Mark Langsdorf LKML-Reference: <20090409131617.GI31527@alberich.amd.com> Signed-off-by: Ingo Molnar commit 845d8c761ec763871936c62b837c4a9ea6d0fbdb Author: Andreas Herrmann Date: Thu Apr 9 15:07:29 2009 +0200 x86: cacheinfo: correct return value when cache_disable feature is not active Impact: bug fix If user writes to "cache_disable" attribute on a CPU that does not support this feature, the process hangs due to an invalid return value in store_cache_disable(). Signed-off-by: Andreas Herrmann Cc: Andrew Morton Cc: Mark Langsdorf LKML-Reference: <20090409130729.GH31527@alberich.amd.com> Signed-off-by: Ingo Molnar commit bda869c614c937c318547c3ee1d65a316b693c21 Author: Andreas Herrmann Date: Thu Apr 9 15:05:10 2009 +0200 x86: cacheinfo: use L3 cache index disable feature only for CPUs that support it AMD family 0x11 CPU doesn't support the feature. Some AMD family 0x10 CPUs do not support it or have an erratum, see erratum #382 in "Revision Guide for AMD Family 10h Processors, 41322 Rev. 3.40 February 2009". Signed-off-by: Andreas Herrmann CC: Mark Langsdorf Cc: Andrew Morton LKML-Reference: <20090409130510.GG31527@alberich.amd.com> Signed-off-by: Ingo Molnar commit 5cb3d1d9d34ac04bcaa2034139345b2a5fea54c1 Author: Zhaolei Date: Thu Apr 9 14:08:18 2009 +0800 tracing, net, skb tracepoint: make skb tracepoint use the TRACE_EVENT() macro TRACE_EVENT is a more generic way to define a tracepoint. Doing so adds these new capabilities to this tracepoint: - zero-copy and per-cpu splice() tracing - binary tracing without printf overhead - structured logging records exposed under /debug/tracing/events - trace events embedded in function tracer output and other plugins - user-defined, per tracepoint filter expressions Signed-off-by: Zhao Lei Acked-by: Neil Horman Cc: "David S. Miller" Cc: Arnaldo Carvalho de Melo Cc: "Steven Rostedt ;" Cc: Frederic Weisbecker Cc: Tom Zanussi LKML-Reference: <49DD90D2.5020604@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit e71e99c294058a61b7a8b9bb6da2f745ac51aa4f Author: Steven Rostedt Date: Wed Mar 25 14:30:04 2009 -0400 x86, function-graph: only save return values on x86_64 Impact: speed up The return to handler portion of the function graph tracer should only need to save the return values. The caller already saved off the registers that the callee can modify. The returning function already saved the registers it modified. When we call our own trace function it too will save the registers that the callee must restore. There's no reason to save off anything more that the registers used to return the values. Note, I did a complete kernel build with this modification and the function graph tracer running on x86_64. Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 2062501ae6505dbc5bff3a792246c2661d114050 Author: Frederic Weisbecker Date: Mon Apr 6 01:49:33 2009 +0200 tracing/lockdep: report the time waited for a lock While trying to optimize the new lock on reiserfs to replace the bkl, I find the lock tracing very useful though it lacks something important for performance (and latency) instrumentation: the time a task waits for a lock. That's what this patch implements: bash-4816 [000] 202.652815: lock_contended: lock_contended: &sb->s_type->i_mutex_key bash-4816 [000] 202.652819: lock_acquired: &rq->lock (0.000 us) <...>-4787 [000] 202.652825: lock_acquired: &rq->lock (0.000 us) <...>-4787 [000] 202.652829: lock_acquired: &rq->lock (0.000 us) bash-4816 [000] 202.652833: lock_acquired: &sb->s_type->i_mutex_key (16.005 us) As shown above, the "lock acquired" field is followed by the time it has been waiting for the lock. Usually, a lock contended entry is followed by a near lock_acquired entry with a non-zero time waited. Signed-off-by: Frederic Weisbecker Acked-by: Peter Zijlstra Cc: Steven Rostedt LKML-Reference: <1238975373-15739-1-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar commit 1cad1252ed279ea59f3f8d3d3a5817eeb2f7a4d3 Merge: dcef788 93cfb3c Author: Ingo Molnar Date: Fri Apr 10 12:46:28 2009 +0200 Merge branch 'tracing/urgent' into tracing/core Merge reason: pick up both v2.6.30-rc1 [which includes tracing/urgent fixes] and pick up the current lineup of tracing/urgent fixes as well Signed-off-by: Ingo Molnar commit cf06de7b9cdd3efee7a59dced1977b3c21d43732 Author: H. Peter Anvin Date: Wed Apr 1 18:20:11 2009 -0700 x86, setup: "glove box" BIOS interrupts in the video code Impact: BIOS proofing "Glove box" off BIOS interrupts in the video code. LKML-Reference: <49DE7F79.4030106@zytor.com> Signed-off-by: H. Peter Anvin Cc: Pavel Machek Cc: Rafael J. Wysocki commit 0a706db320768f8f6e43bbf73b58d2aabdc93354 Author: H. Peter Anvin Date: Wed Apr 1 18:19:00 2009 -0700 x86, setup: "glove box" BIOS interrupts in the MCA code Impact: BIOS proofing "Glove box" off BIOS interrupts in the MCA code. LKML-Reference: <49DE7F79.4030106@zytor.com> Signed-off-by: H. Peter Anvin Cc: James Bottomley commit 3435d3476c5ed955d56a6216ed2d156847b3a575 Author: H. Peter Anvin Date: Wed Apr 1 18:17:17 2009 -0700 x86, setup: "glove box" BIOS interrupts in the EDD code Impact: BIOS proofing "Glove box" off BIOS interrupts in the EDD code. LKML-Reference: <49DE7F79.4030106@zytor.com> Signed-off-by: H. Peter Anvin commit d54ea252e4c92357226992cf65d94616a96e6fce Author: H. Peter Anvin Date: Wed Apr 1 18:14:26 2009 -0700 x86, setup: "glove box" BIOS interrupts in the APM code Impact: BIOS proofing "Glove box" off BIOS interrupts in the APM code. LKML-Reference: <49DE7F79.4030106@zytor.com> Signed-off-by: H. Peter Anvin Cc: Stephen Rothwell commit df7699c56421c0476704f24a43409ac8c505f3d2 Author: H. Peter Anvin Date: Wed Apr 1 18:13:46 2009 -0700 x86, setup: "glove box" BIOS interrupts in the core boot code Impact: BIOS proofing "Glove box" off BIOS interrupts in the core boot code. LKML-Reference: <49DE7F79.4030106@zytor.com> Signed-off-by: H. Peter Anvin commit 7a734e7dd93b9aea08ed51036a9a0e2c9dfd8dac Author: H. Peter Anvin Date: Wed Apr 1 18:08:28 2009 -0700 x86, setup: "glove box" BIOS calls -- infrastructure Impact: new interfaces (not yet used) For all the platforms out there, there is an infinite number of buggy BIOSes. This adds infrastructure to treat BIOS interrupts more like toxic waste and "glove box" them -- we switch out the register set, perform the BIOS interrupt, and then restore the previous state. LKML-Reference: <49DE7F79.4030106@zytor.com> Signed-off-by: H. Peter Anvin Cc: Pavel Machek Cc: Rafael J. Wysocki commit e7c064889606aab3569669078c69b87b2c527e72 Author: Jeremy Fitzhardinge Date: Sat Mar 7 23:48:41 2009 -0800 xen: add FIX_TEXT_POKE to fixmap FIX_TEXT_POKE[01] are used to map kernel addresses, so they're mapping pfns, not mfns. Signed-off-by: Jeremy Fitzhardinge commit 894bf92fdec9909fefcfe907786c6c6944a22052 Author: Peter Ujfalusi Date: Thu Apr 9 12:34:40 2009 +0300 ASoC: tlv320aic23: add DSP_A format support Add DSP_A interface format support by setting the LRP bit in DSP mode. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit d3d21c412d8525eb2e208d990ab5eee5fb0fe03d Author: Peter Zijlstra Date: Thu Apr 9 10:53:46 2009 +0200 perf_counter: log full path names Impact: fix perf-report output for /home mounted binaries, etc. dentry_path() only provide path-names up to the mount root, which is unsuited for out purpose, use d_path() instead. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090409085524.601794134@chello.nl> Signed-off-by: Ingo Molnar commit 1ccd15497869f3ed83b5225d410df53a96e52757 Author: Peter Zijlstra Date: Thu Apr 9 10:53:45 2009 +0200 perf_counter: sysctl for system wide perf counters Impact: add sysctl for paranoid/relaxed perfcounters policy Allow the use of system wide perf counters to everybody, but provide a sysctl to disable it for the paranoid security minded. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090409085524.514046352@chello.nl> Signed-off-by: Ingo Molnar commit 9ee318a7825929bc3734110b83ae8e20e53d9de3 Author: Peter Zijlstra Date: Thu Apr 9 10:53:44 2009 +0200 perf_counter: optimize mmap/comm tracking Impact: performance optimization The mmap/comm tracking code does quite a lot of work before it discovers there's no interest in it, avoid that by keeping a counter. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090409085524.427173196@chello.nl> Signed-off-by: Ingo Molnar commit b3828ebb3901adfe989d8d4157ed28247aeec132 Author: Ingo Molnar Date: Thu Apr 9 09:50:04 2009 +0200 perf_counter tools: include PID in perf-report output, tweak user/kernel printut It's handier than an entry. Also replace the kernel/user column with a more compact version: 0.52 cc1 [k] page_fault 0.57 :0 [k] _spin_lock 0.59 :7506 [.] 0.69 as [.] /usr/bin/as: 0.76 cc1 [.] /lib64/libc-2.8.so: _int_free 0.92 cc1 [k] clear_page_c 1.00 :7465 [.] 1.43 cc1 [.] /lib64/libc-2.8.so: memset 1.86 cc1 [.] /lib64/libc-2.8.so: _int_malloc 70.33 cc1 [.] /usr/libexec/gcc/x86_64-redhat-linux/4.3.2/cc1: Signed-off-by: Ingo Molnar commit 888fcee066a2f4abd0d0bc9418c0535f9b01e6e5 Author: Ingo Molnar Date: Thu Apr 9 09:48:22 2009 +0200 perf_counter: fix off task->comm by one strlen() does not include the \0. Signed-off-by: Ingo Molnar commit 002f128b473fb82f454654be5081b0919ee01ab2 Author: Paul Turner Date: Wed Apr 8 15:29:43 2009 -0700 sched: remove redundant hierarchy walk in check_preempt_wakeup Impact: micro-optimization Under group scheduling we traverse up until we are at common siblings to make the wakeup comparison on. At this point however, they should have the same parent so continuing to check up the tree is redundant. Signed-off-by: Paul Turner Acked-by: Peter Zijlstra LKML-Reference: Signed-off-by: Ingo Molnar commit d2de688891909b148efe83a6fc9520a9cd6015f0 Author: Stephen Rothwell Date: Thu Apr 9 15:17:22 2009 +1000 sparc64: extend TI_RESTART_BLOCK space by 8 bytes Impact: build fix Today's linux-next build (sparc64 defconfig) failed like this: arch/sparc/kernel/built-in.o: In function `trap_init': (.init.text+0x4): undefined reference to `thread_info_offsets_are_bolixed_dave' Caused by commit 52400ba946759af28442dee6265c5c0180ac7122 ("futex: add requeue_pi functionality") (from the tip-core tree) which changed the size of struct restart_block. Shift TI_KUNA_REGS and TI_KUNA_INSN up by 8 bytes to make space for the larger restart block. Signed-off-by: Stephen Rothwell Acked-by: "David S. Miller" Cc: Darren Hart LKML-Reference: <20090409151722.c8eabb56.sfr@canb.auug.org.au> Signed-off-by: Ingo Molnar commit ca8f2d7f019a8547f39ddb9ed0144932f12807f2 Author: Paul Mackerras Date: Thu Apr 9 14:42:56 2009 +1000 perf_counter: powerpc: add nmi_enter/nmi_exit calls Impact: fix potential deadlocks on powerpc Now that the core is using in_nmi() (added in e30e08f6, "perf_counter: fix NMI race in task clock"), we need the powerpc perf_counter_interrupt to call nmi_enter() and nmi_exit() in those cases where the interrupt happens when interrupts are soft-disabled. If interrupts were soft-enabled, we can treat it as a regular interrupt and do irq_enter/irq_exit around the whole routine. This lets us get rid of the test_perf_counter_pending() call at the end of perf_counter_interrupt, thus simplifying things a little. Signed-off-by: Paul Mackerras Cc: Peter Zijlstra LKML-Reference: <18909.31952.873098.336615@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 6c0b324435ff49fb3c68fe808a93853d81c7fb97 Author: Paul Mackerras Date: Thu Apr 9 09:27:37 2009 +1000 perf_counter: add MAINTAINERS entry This adds an entry in MAINTAINERS for the perf_counter subsystem. Signed-off-by: Paul Mackerras Acked-by: Peter Zijlstra LKML-Reference: <18909.13033.345975.434902@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit e85abf8f432bb2a13733ab7609fbb8e1500af51d Author: Gary Hade Date: Wed Apr 8 14:07:25 2009 -0700 x86: consolidate SMP code in io_apic.c Impact: Cleanup Reorganizes the code in arch/x86/kernel/io_apic.c by combining two '#ifdef CONFIG_SMP' regions. In addition to making the code easier to understand the first '#ifdef CONFIG_SMP' region is moved to a location later in the file which will reduce the need for function forward declarations when the code subsequently revised. The only changes other than relocating code to a different position in the file were the removal of the assign_irq_vector() forward declaration which was no longer needed and some line length reduction formatting changes. Signed-off-by: Gary Hade Cc: lcm@us.ibm.com LKML-Reference: <20090408210725.GC11159@us.ibm.com> Signed-off-by: Ingo Molnar commit 7ebcfcf19723254ebe90cdf8718436b9955a9a01 Author: Jonas Larsson Date: Tue Mar 31 11:16:52 2009 +0200 avr32: Solves problem with inverted MCI detect pin on Merisc board Same patch as before, modified to use bool. This patch solves the problem with the inverted mci detect pin on Merisc boards. Signed-off-by: Jonas Larsson Signed-off-by: Haavard Skinnemoen commit 1c1452be2e9ae282a7316c3b23987811bd7acda6 Author: Jonas Larsson Date: Tue Mar 31 11:16:48 2009 +0200 atmel-mci: Add support for inverted detect pin Same patch as before, modified to use bool. Also adds description of the new field in struct atmel_mci that I missed in the first patch. This patch adds Atmel MCI support for inverted detect pins. Signed-off-by: Jonas Larsson Acked-by: Pierre Ossman Signed-off-by: Haavard Skinnemoen commit 78f13e9525ba777da25c4ddab89f28e9366a8b7c Author: Peter Zijlstra Date: Wed Apr 8 15:01:33 2009 +0200 perf_counter: allow for data addresses to be recorded Paul suggested we allow for data addresses to be recorded along with the traditional IPs as power can provide these. For now, only the software pagefault events provide data addresses, but in the future power might as well for some events. x86 doesn't seem capable of providing this atm. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090408130409.394816925@chello.nl> Signed-off-by: Ingo Molnar commit 4d855457d84b819fefcd1cd1b0a2a0a0ec475c07 Author: Peter Zijlstra Date: Wed Apr 8 15:01:32 2009 +0200 perf_counter: move PERF_RECORD_TIME Move PERF_RECORD_TIME so that all the fixed length items come before the variable length ones. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090408130409.307926436@chello.nl> Signed-off-by: Ingo Molnar commit de9ac07bbf8f51e0ce40e5428c3a8f627bd237c2 Author: Peter Zijlstra Date: Wed Apr 8 15:01:31 2009 +0200 perf_counter: some simple userspace profiling # perf-record make -j4 kernel/ # perf-report | tail -15 0.39 cc1 [kernel] lock_acquired 0.42 cc1 [kernel] lock_acquire 0.51 cc1 [ user ] /lib64/libc-2.8.90.so: _int_free 0.51 as [kernel] clear_page_c 0.53 cc1 [ user ] /lib64/libc-2.8.90.so: memcpy 0.56 cc1 [ user ] /lib64/libc-2.8.90.so: _IO_vfprintf 0.63 cc1 [kernel] lock_release 0.67 cc1 [ user ] /lib64/libc-2.8.90.so: strlen 0.68 cc1 [kernel] debug_smp_processor_id 1.38 cc1 [ user ] /lib64/libc-2.8.90.so: _int_malloc 1.55 cc1 [ user ] /lib64/libc-2.8.90.so: memset 1.77 cc1 [kernel] __lock_acquire 1.88 cc1 [kernel] clear_page_c 3.61 as [ user ] /usr/bin/as: 59.16 cc1 [ user ] /usr/libexec/gcc/x86_64-redhat-linux/4.3.2/cc1: Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Cc: Arnaldo Carvalho de Melo LKML-Reference: <20090408130409.220518450@chello.nl> Signed-off-by: Ingo Molnar commit 8d1b2d9361b494bfc761700c348c65ebbe3deb5b Author: Peter Zijlstra Date: Wed Apr 8 15:01:30 2009 +0200 perf_counter: track task-comm data Similar to the mmap data stream, add one that tracks the task COMM field, so that the userspace reporting knows what to call a task. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090408130409.127422406@chello.nl> Signed-off-by: Ingo Molnar commit 8740f9418c78dcad694b46ab25d1645d5aef1f5e Author: Peter Zijlstra Date: Wed Apr 8 15:01:29 2009 +0200 perf_counter: add some comments Add a few comments because I was forgetting what field what for what functionality. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090408130409.036984214@chello.nl> Signed-off-by: Ingo Molnar commit 808382b33bb4c60df6379ec2db39f332cc56b82a Author: Peter Zijlstra Date: Wed Apr 8 15:01:28 2009 +0200 perf_counter: kerneltop: keep up with ABI changes Update kerneltop to use PERF_EVENT_MISC_OVERFLOW Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090408130408.947197470@chello.nl> Signed-off-by: Ingo Molnar commit 6b6e5486b3a168f0328c82a8d4376caf901472b1 Author: Peter Zijlstra Date: Wed Apr 8 15:01:27 2009 +0200 perf_counter: use misc field to widen type Push the PERF_EVENT_COUNTER_OVERFLOW bit into the misc field so that we can have the full 32bit for PERF_RECORD_ bits. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090408130408.891867663@chello.nl> Signed-off-by: Ingo Molnar commit 6fab01927e8bdbbc77bafba2abb4810c5591ad52 Author: Peter Zijlstra Date: Wed Apr 8 15:01:26 2009 +0200 perf_counter: provide misc bits in the event header Limit the size of each record to 64k (or should we count in multiples of u64 and have a 512K limit?), this gives 16 bits or spare room in the header, which we can use for misc bits, so as to not have to grow the record with u64 every time we have a few bits to report. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090408130408.769271806@chello.nl> Signed-off-by: Ingo Molnar commit e30e08f65c7ef6c230424264f09c3d53f117f58b Author: Peter Zijlstra Date: Wed Apr 8 15:01:25 2009 +0200 perf_counter: fix NMI race in task clock We should not be updating ctx->time from NMI context, work around that. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090408130408.681326666@chello.nl> Signed-off-by: Ingo Molnar commit e1b9aa3f47242e757c776a3771bb6613e675bf9c Author: Christoph Lameter Date: Thu Apr 2 13:21:44 2009 +0900 percpu: remove rbtree and use page->index instead Impact: use page->index for addr to chunk mapping instead of dedicated rbtree The rbtree is used to determine the chunk from the virtual address. However, we can already determine the page struct from a virtual address and there are several unused fields in page struct used by vmalloc. Use the index field to store a pointer to the chunk. Then there is no need anymore for an rbtree. tj: * s/(set|get)_chunk/pcpu_\1_page_chunk/ * Drop inline from the above two functions and moved them upwards so that they are with other simple helpers. * Initial pages might not (actually most of the time don't) live in the vmalloc area. With the previous patch to manually reverse-map both first chunks, this is no longer an issue. Removed pcpu_set_chunk() call on initial pages. Signed-off-by: Christoph Lameter Signed-off-by: Tejun Heo Cc: Martin Schwidefsky Cc: rusty@rustcorp.com.au Cc: Paul Mundt Cc: rmk@arm.linux.org.uk Cc: starvik@axis.com Cc: ralf@linux-mips.org Cc: davem@davemloft.net Cc: cooloney@kernel.org Cc: kyle@mcmartin.ca Cc: matthew@wil.cx Cc: grundler@parisc-linux.org Cc: takata@linux-m32r.org Cc: benh@kernel.crashing.org Cc: rth@twiddle.net Cc: ink@jurassic.park.msu.ru Cc: heiko.carstens@de.ibm.com Cc: Linus Torvalds Cc: Nick Piggin LKML-Reference: <49D43D58.4050102@kernel.org> Signed-off-by: Ingo Molnar commit ae9e6bc9f74f8247cbca50a6a93c80e0d686fa19 Author: Tejun Heo Date: Thu Apr 2 13:19:54 2009 +0900 percpu: don't put the first chunk in reverse-map rbtree Impact: both first chunks don't use rbtree, no functional change There can be two first chunks - reserved and dynamic with the former one being optional. Dynamic first chunk was linked on reverse-mapping rbtree while the reserved one was mapped manually using the start address and reserved offset limit. This patch makes both first chunks to be looked up manually without using the rbtree. This is to help getting rid of the rbtree. Signed-off-by: Tejun Heo Cc: Martin Schwidefsky Cc: rusty@rustcorp.com.au Cc: Paul Mundt Cc: rmk@arm.linux.org.uk Cc: starvik@axis.com Cc: ralf@linux-mips.org Cc: davem@davemloft.net Cc: cooloney@kernel.org Cc: kyle@mcmartin.ca Cc: matthew@wil.cx Cc: grundler@parisc-linux.org Cc: takata@linux-m32r.org Cc: benh@kernel.crashing.org Cc: rth@twiddle.net Cc: ink@jurassic.park.msu.ru Cc: heiko.carstens@de.ibm.com Cc: Linus Torvalds Cc: Nick Piggin Cc: Christoph Lameter LKML-Reference: <49D43CEA.3040609@kernel.org> Signed-off-by: Ingo Molnar commit 7333a8003cdc0470e8c0ae8b949cbc44f3165ff3 Author: Hidetoshi Seto Date: Wed Mar 25 10:50:34 2009 +0900 x86: smarten /proc/interrupts output for new counters Now /proc/interrupts of tip tree has new counters: CNT: Performance counter interrupts Format change of output, as like that by commit: commit 7a81d9a7da03d2f27840d659f97ef140d032f609 x86: smarten /proc/interrupts output should be applied to these new counters too. Signed-off-by: Hidetoshi Seto Cc: Jan Beulich LKML-Reference: <49C98DEA.8060208@jp.fujitsu.com> Signed-off-by: Ingo Molnar commit a4e94ef0dd391eae05bdeacd12b8da3510957a97 Author: Zhaolei Date: Fri Mar 27 17:07:05 2009 +0800 printk: add support of hh length modifier for printk Impact: new feature, extend vsprintf format strings hh is used as length modifier for signed char or unsigned char. It is supported by glibc, we add kernel support now. Signed-off-by: Zhao Lei Acked-by: Lai Jiangshan Acked-by: Frederic Weisbecker Cc: torvalds@linux-foundation.org Cc: Steven Rostedt LKML-Reference: <49CC9739.30107@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 42d7c5e353cef9062129b0de3ec9ddf10567b9ca Author: Becky Bruce Date: Wed Apr 8 09:09:21 2009 -0500 swiotlb: change swiotlb_bus_to[phys,virt] prototypes Add a hwdev argument that is needed on some architectures in order to access a per-device offset that is taken into account when producing a physical address (also needed to get from bus address to virtual address because the physical address is an intermediate step). Also make swiotlb_bus_to_virt weak so architectures can override it. Signed-off-by: Becky Bruce Acked-by: FUJITA Tomonori Signed-off-by: Kumar Gala Cc: jeremy@goop.org Cc: ian.campbell@citrix.com LKML-Reference: <1239199761-22886-8-git-send-email-galak@kernel.crashing.org> Signed-off-by: Ingo Molnar commit 380d687833aee098c4a2c3b35beaefe1c1f48d01 Author: Becky Bruce Date: Wed Apr 8 09:09:20 2009 -0500 swiotlb: use swiotlb_sync_single instead of duplicating code Right now both swiotlb_sync_single_range and swiotlb_sync_sg were duplicating the code in swiotlb_sync_single. Just call it instead. Also rearrange the sync_single code for readability. Note that the swiotlb_sync_sg code was previously doing a complicated comparison to determine if an addresses needed to be unmapped where a simple is_swiotlb_buffer() call would have sufficed. Signed-off-by: Becky Bruce Acked-by: FUJITA Tomonori Signed-off-by: Kumar Gala Cc: jeremy@goop.org Cc: ian.campbell@citrix.com LKML-Reference: <1239199761-22886-7-git-send-email-galak@kernel.crashing.org> Signed-off-by: Ingo Molnar commit 7fcebbd2d984eac3fdd6da2f4453e7c43d32de89 Author: Becky Bruce Date: Wed Apr 8 09:09:19 2009 -0500 swiotlb: rename unmap_single to do_unmap_single Previously, swiotlb_unmap_page and swiotlb_unmap_sg were duplicating very similar code. Refactor that code into a new unmap_single and unmap_single use do_unmap_single. Note that the swiotlb_unmap_sg code was previously doing a complicated comparison to determine if an addresses needed to be unmapped where a simple is_swiotlb_buffer() call would have sufficed. Signed-off-by: Becky Bruce Signed-off-by: Kumar Gala Cc: jeremy@goop.org Cc: ian.campbell@citrix.com LKML-Reference: <1239199761-22886-6-git-send-email-galak@kernel.crashing.org> Signed-off-by: Ingo Molnar commit ef5722f698bde01cfec2b98fff733a48663ebf55 Author: Becky Bruce Date: Wed Apr 8 09:09:18 2009 -0500 swiotlb: allow arch override of address_needs_mapping Some architectures require additional checking to determine if a device can dma to an address and need to provide their own address_needs_mapping.. Signed-off-by: Becky Bruce Acked-by: FUJITA Tomonori Signed-off-by: Kumar Gala Cc: jeremy@goop.org Cc: ian.campbell@citrix.com LKML-Reference: <1239199761-22886-5-git-send-email-galak@kernel.crashing.org> Signed-off-by: Ingo Molnar commit dd6b02fe427f30520d0adc94aa52352367227873 Author: Becky Bruce Date: Wed Apr 8 09:09:17 2009 -0500 swiotlb: map_page fix for highmem systems The current code calls virt_to_phys() on address that might be in highmem, which is bad. This wasn't needed, anyway, because we already have the physical address we need. Get rid of the now-unused virtual address as well. Signed-off-by: Becky Bruce Acked-by: FUJITA Tomonori Signed-off-by: Kumar Gala Cc: jeremy@goop.org Cc: ian.campbell@citrix.com LKML-Reference: <1239199761-22886-4-git-send-email-galak@kernel.crashing.org> Signed-off-by: Ingo Molnar commit 67131ad0514d7105b55003a0506209cf1bba3f00 Author: Becky Bruce Date: Wed Apr 8 09:09:16 2009 -0500 swiotlb: fix compile warning Squash a build warning seen on 32-bit powerpc caused by calling min() with 2 different types. Use min_t() instead. Signed-off-by: Becky Bruce Acked-by: FUJITA Tomonori Signed-off-by: Kumar Gala Cc: jeremy@goop.org Cc: ian.campbell@citrix.com LKML-Reference: <1239199761-22886-3-git-send-email-galak@kernel.crashing.org> Signed-off-by: Ingo Molnar commit ceb5ac3264686e75e6951de6a18d4baa9bdecb92 Author: Becky Bruce Date: Wed Apr 8 09:09:15 2009 -0500 swiotlb: comment corrections Impact: cleanup swiotlb_map/unmap_single are now swiotlb_map/unmap_page; trivially change all the comments to reference new names. Also, there were some comments that should have been referring to just plain old map_single, not swiotlb_map_single; fix those as well. Also change a use of the word "pointer", when what is referred to is actually a dma/physical address. Signed-off-by: Becky Bruce Acked-by: FUJITA Tomonori Signed-off-by: Kumar Gala Cc: jeremy@goop.org Cc: ian.campbell@citrix.com LKML-Reference: <1239199761-22886-2-git-send-email-galak@kernel.crashing.org> Signed-off-by: Ingo Molnar commit 02421f98ec55c3ff118f358740ff640f096c7ad6 Author: Yinghai Lu Date: Fri Apr 3 17:15:53 2009 -0700 x86: consistent about warm_reset_vector for UN_NON_UNIQUE_APIC Impact: cleanup didn't set it for UV_NON_UNIQUE_APIC, so don't restore it Signed-off-by: Yinghai Lu LKML-Reference: <49D6A6B9.6060501@kernel.org> Signed-off-by: Ingo Molnar commit cdc1cb0d4445f39561a65204d26f89365f917550 Author: Yinghai Lu Date: Fri Apr 3 17:15:14 2009 -0700 x86: make wakeup_secondary_cpu_via_init static Impact: cleanup Signed-off-by: Yinghai Lu LKML-Reference: <49D6A692.6040400@kernel.org> Signed-off-by: Ingo Molnar commit a59dacfdc9ba06903652fa4883bf1106278b18ec Author: Ingo Molnar Date: Fri Oct 17 14:38:08 2008 +0200 x86 early quirks: eliminate unused function Impact: cleanup this warning: arch/x86/kernel/early-quirks.c:99: warning: ‘ati_ixp4x0_rev’ defined but not used triggers because ati_ixp4x0_rev() is only used in the ACPI && X86_IO_APIC case. Signed-off-by: Ingo Molnar commit 4ecf458492c2d97b3f9d850a5f92d79792e0a7e7 Author: Jiri Slaby Date: Wed Apr 8 13:32:00 2009 +0200 x86_64: fix incorrect comments Impact: cleanup The comments which fxrstor_checking and fxsave_uset refer to is now in fxsave. Change the comments appropriately. Signed-off-by: Jiri Slaby Cc: Jiri Slaby LKML-Reference: <1239190320-23952-3-git-send-email-jirislaby@gmail.com> Signed-off-by: Ingo Molnar commit 34ba476a01e128aad51e02f9be854584e9ec73cf Author: Jiri Slaby Date: Wed Apr 8 13:31:59 2009 +0200 x86: unify restore_fpu_checking Impact: cleanup On x86_32, separate f*rstor to an inline function which makes restore_fpu_checking the same on both platforms -> move it outside the ifdefs. Signed-off-by: Jiri Slaby LKML-Reference: <1239190320-23952-2-git-send-email-jirislaby@gmail.com> Signed-off-by: Ingo Molnar commit fcb2ac5bdfa3a7a04fb9749b916f64400f4c35a8 Author: Jiri Slaby Date: Wed Apr 8 13:31:58 2009 +0200 x86_32: introduce restore_fpu_checking() Impact: cleanup, prepare FPU code unificaton Like on x86_64, return an error from restore_fpu and kill the task if it fails. Also rename restore_fpu to restore_fpu_checking which allows ifdefs to be removed in math_state_restore(). Signed-off-by: Jiri Slaby LKML-Reference: <1239190320-23952-1-git-send-email-jirislaby@gmail.com> Signed-off-by: Ingo Molnar commit bab5bc9e857638880facef76e4b4c3fa807f8c73 Author: Darren Hart Date: Tue Apr 7 23:23:50 2009 -0700 futex: fixup unlocked requeue pi case Thomas's testing caught a problem when the requeue target futex is unowned and multiple tasks are requeued to it. This patch ensures the FUTEX_WAITERS bit gets set if futex_requeue() will requeue one or more tasks in addition to the one acquiring the lock. Signed-off-by: Darren Hart Signed-off-by: Thomas Gleixner commit f708223d49ac39f5af1643985056206c98033f5b Author: Paul Mackerras Date: Wed Apr 8 20:30:18 2009 +1000 perf_counter: powerpc: set sample enable bit for marked instruction events Impact: enable access to hardware feature POWER processors have the ability to "mark" a subset of the instructions and provide more detailed information on what happens to the marked instructions as they flow through the pipeline. This marking is enabled by the "sample enable" bit in MMCRA, and there are synchronization requirements around setting and clearing the bit. This adds logic to the processor-specific back-ends so that they know which events relate to marked instructions and set the sampling enable bit if any event that we want to put on the PMU is a marked instruction event. It also adds logic to the generic powerpc code to do the necessary synchronization if that bit is set. Signed-off-by: Paul Mackerras Cc: Peter Zijlstra LKML-Reference: <18908.31930.1024.228867@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit dc66270b51a62b1a6888d5309229e638a305c47b Author: Paul Mackerras Date: Wed Apr 8 20:30:10 2009 +1000 perf_counter: fix powerpc build Commit 4af4998b ("perf_counter: rework context time") changed struct perf_counter_context to have a 'time' field instead of a 'time_now' field, but neglected to fix the place in the powerpc perf_counter.c where the time_now field was accessed. This fixes it. Signed-off-by: Paul Mackerras Cc: Peter Zijlstra LKML-Reference: <18908.31922.411398.147810@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit a34b50ddc265bae058c66661b096ef6384c5a8b1 Author: Ingo Molnar Date: Wed Apr 8 10:56:54 2009 +0200 mm, x86, ptrace, bts: defer branch trace stopping, remove dead code Remove the unused free_locked_buffer() API. Signed-off-by: Ingo Molnar commit 44bc9dc729e33a4ec6ebed4d0b6c08e8d20b42cf Author: Ingo Molnar Date: Wed Apr 8 10:47:17 2009 +0200 mm, x86, ptrace, bts: defer branch trace stopping, cleanup Andrew Morton noticed that mm.h needlessly includes sched.h - remove it. Reported-by: Andrew Morton Signed-off-by: Ingo Molnar commit 5ea472a77f8e4811ceee3f44a9deda6ad6e8b789 Merge: 6c009ec 577c9c4 Author: Ingo Molnar Date: Wed Apr 8 10:35:30 2009 +0200 Merge commit 'v2.6.30-rc1' into perfcounters/core Conflicts: arch/powerpc/include/asm/systbl.h arch/powerpc/include/asm/unistd.h include/linux/init_task.h Merge reason: the conflicts are non-trivial: PowerPC placement of sys_perf_counter_open has to be mixed with the new preadv/pwrite syscalls. Signed-off-by: Ingo Molnar commit 169aafbc8d3f05431b5cfeb60294a12b8ef2bcee Author: Jeremy Fitzhardinge Date: Tue Apr 7 13:37:26 2009 -0700 lguest: update lazy mmu changes to match lguest's use of kvm hypercalls Duplicate hcall -> kvm_hypercall0 convertion from "lguest: use KVM hypercalls". Signed-off-by: Jeremy Fitzhardinge Cc: Matias Zabaljauregui Cc: Rusty Russell commit 38f4b8c0da01ae7cd9b93386842ce272d6fde9ab Merge: a811454 8e2c4f2 Author: Jeremy Fitzhardinge Date: Tue Apr 7 13:34:16 2009 -0700 Merge commit 'origin/master' into for-linus/xen/master * commit 'origin/master': (4825 commits) Fix build errors due to CONFIG_BRANCH_TRACER=y parport: Use the PCI IRQ if offered tty: jsm cleanups Adjust path to gpio headers KGDB_SERIAL_CONSOLE check for module Change KCONFIG name tty: Blackin CTS/RTS Change hardware flow control from poll to interrupt driven Add support for the MAX3100 SPI UART. lanana: assign a device name and numbering for MAX3100 serqt: initial clean up pass for tty side tty: Use the generic RS485 ioctl on CRIS tty: Correct inline types for tty_driver_kref_get() splice: fix deadlock in splicing to file nilfs2: support nanosecond timestamp nilfs2: introduce secondary super block nilfs2: simplify handling of active state of segments nilfs2: mark minor flag for checkpoint created by internal operation nilfs2: clean up sketch file nilfs2: super block operations fix endian bug ... Conflicts: arch/x86/include/asm/thread_info.h arch/x86/lguest/boot.c drivers/xen/manage.c commit a811454027352c762e0d5bba1b1d8f7d26bf96ae Merge: 1943689 53152f9 Author: Jeremy Fitzhardinge Date: Tue Apr 7 13:16:04 2009 -0700 Merge branch 'for-linus/xen/core' into for-linus/xen/master * for-linus/xen/core: xen: honour VCPU availability on boot commit 299a75920379e75069b5c8ef9954408f2085f051 Merge: 5409fb4 80fbe6a Author: Mark Brown Date: Tue Apr 7 18:51:34 2009 +0100 Merge branch 's6000' into for-2.6.31 commit 5409fb4e327a84972483047ecf4fb41f279453e2 Author: Mark Brown Date: Tue Apr 7 18:45:21 2009 +0100 ASoC: Add WM8988 CODEC driver The WM8988 is a low power, high quality stereo CODEC designed for portable digital audio applications. The device integrates complete interfaces to 2 stereo headphone or line out ports. External component requirements are drastically reduced as no separate headphone amplifiers are required. Advanced on-chip digital signal processing performs graphic equaliser, 3-D sound enhancement and automatic level control for the microphone or line input. The WM8988 can operate as a master or a slave, with various master clock frequencies including 12 or 24MHz for USB devices, or standard 256fs rates like 12.288MHz and 24.576MHz. Different audio sample rates such as 96kHz, 48kHz, 44.1kHz are generated directly from the master clock without the need for an external PLL. Signed-off-by: Mark Brown commit 06f409d76f1d382167eb1cadde2e23a73272865d Author: Mark Brown Date: Tue Apr 7 18:10:13 2009 +0100 ASoC: Provide core support for symmetric sample rates Many devices require symmetric configurations of capture and playback data formats, often due to shared clocking but sometimes also due to other shared playback and record configuration in the device. Start providing core support for this by allowing the DAIs or the machine to specify that the sample rates used should be kept symmetric. A flag symmetric_rates is provided in the snd_soc_dai and snd_soc_dai_link structures. If this is set in either of the DAIs or in the machine then a constraint will be applied when a stream is already open preventing any changes in sample rate. Signed-off-by: Mark Brown commit 6553e192d48af88184029066c30c9464516ea0b7 Author: Mark Brown Date: Mon Apr 6 16:59:32 2009 +0100 ASoC: Display return code when failing to add a DAPM kcontrol Signed-off-by: Mark Brown commit 9c83633ad38138855181af6936e8ac570ef7e2cb Author: Dan Carpenter Date: Tue Apr 7 14:48:16 2009 +0300 missing unlock in jfs_quota_write() We should unlock &inode->i_mutex on the error path. This bug was in ext2_quota_write(). I sent a patch to them today as well. Found by smatch (http://repo.or.cz/w/smatch.git). Compile tested. regards, dan carpenter Signed-off-by: Dan Carpenter Signed-off-by: Dave Kleikamp commit dcef788eb9659b61a2110284fcce3ca6e63480d2 Author: Zhaolei Date: Tue Mar 31 15:26:14 2009 +0800 ftrace: clean up enable logic for sched_switch Unify sched_switch and sched_wakeup's action to following logic: Do record_cmdline when start_cmdline_record() is called. Start tracing events when the tracer is started. Signed-off-by: Zhao Lei LKML-Reference: <49D1C596.5050203@cn.fujitsu.com> Signed-off-by: Steven Rostedt commit 597af81537654097b67fd7a0c92775e66d4a86fe Author: Steven Rostedt Date: Fri Apr 3 15:24:12 2009 -0400 function-graph: use int instead of atomic for ftrace_graph_active Impact: cleanup The variable ftrace_graph_active is only modified under the ftrace_lock mutex, thus an atomic is not necessary for modification. Reported-by: Andrew Morton Signed-off-by: Steven Rostedt commit 5452af664f6fba26b80eb2c8c4ceae2999d5cf56 Author: Frederic Weisbecker Date: Fri Mar 27 00:25:38 2009 +0100 tracing/ftrace: factorize the tracing files creation Impact: cleanup Most of the tracing files creation follow the same pattern: ret = debugfs_create_file(...) if (!ret) pr_warning("Couldn't create ... entry\n") Unify it! Reported-by: Ingo Molnar Signed-off-by: Frederic Weisbecker LKML-Reference: <1238109938-11840-1-git-send-email-fweisbec@gmail.com> Signed-off-by: Steven Rostedt commit a5dec5573f3c7e63f2f9b5852b9759ea342a5ff9 Author: Li Zefan Date: Fri Mar 27 14:55:44 2009 +0800 tracing: use macros to denote usec and nsec per second Impact: cleanup Use USEC_PER_SEC and NSEC_PER_SEC instead of 1000000 and 1000000000. Signed-off-by: Li Zefan LKML-Reference: <49CC7870.9000309@cn.fujitsu.com> Acked-by: Frederic Weisbecker Signed-off-by: Steven Rostedt commit 86665c75da41889f92b774f31ea5a9a436f392a8 Merge: 93776a8 1bbe2a8 Author: Ingo Molnar Date: Tue Apr 7 14:41:14 2009 +0200 Merge branch 'tracing/urgent' into tracing/ftrace commit 93776a8ec746cf9d32c36e5a5b23d28d8be28826 Merge: 34886c8 d508afb Author: Ingo Molnar Date: Tue Apr 7 13:47:33 2009 +0200 Merge branch 'linus' into tracing/core Merge reason: update to upstream tracing facilities Signed-off-by: Ingo Molnar commit 017bc617657c928cb9a0c45a7a7e9f4e66695347 Author: Markus Metzger Date: Fri Apr 3 16:43:52 2009 +0200 x86, ds: support Core i7 Add debug store support for Core i7. Core i7 adds a reset value for each performance counter and a new PEBS record format. Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: oleg@redhat.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144607.088997000@intel.com> Signed-off-by: Ingo Molnar commit 150f5164c1258e05b7dea16f29e592f354c48f34 Author: Markus Metzger Date: Fri Apr 3 16:43:51 2009 +0200 x86, ds: allow small debug store buffers Check the buffer size more precisely to allow buffers for exactly one element provided the base address is already properly aligned. Add a debug store selftest. Reported-by: Stephane Eranian Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: oleg@redhat.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144606.139137000@intel.com> Signed-off-by: Ingo Molnar commit 608780a9048efa3e85fbc4d8649b26805cc588aa Author: Markus Metzger Date: Fri Apr 3 16:43:50 2009 +0200 x86, ds: fix bad ds_reset_pebs() Ds_reset_pebs() passed the wrong qualifier to a shared function resulting in a reset of bts, rather than pebs. Reported-by: Stephane Eranian Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: oleg@redhat.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144605.206510000@intel.com> Signed-off-by: Ingo Molnar commit 6047550d3d26fed88b18a208b31f8b90b5ef3e9b Author: Markus Metzger Date: Fri Apr 3 16:43:49 2009 +0200 x86, ds: dont use TIF_DEBUGCTLMSR Debug store already uses TIF_DS_AREA_MSR to trigger debug store context switch handling. No need to use TIF_DEBUGCTLMSR, as well. Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: oleg@redhat.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144604.256645000@intel.com> Signed-off-by: Ingo Molnar commit 0f4814065ff8c24ca8bfd75c9b73502be152c287 Author: Markus Metzger Date: Fri Apr 3 16:43:48 2009 +0200 x86, ptrace: add bts context unconditionally Add the ptrace bts context field to task_struct unconditionally. Initialize the field directly in copy_process(). Remove all the unneeded functionality used to initialize that field. Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: oleg@redhat.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144603.292754000@intel.com> Signed-off-by: Ingo Molnar commit ee811517a5604aa63fae803b7c044712699e1303 Author: Markus Metzger Date: Fri Apr 3 16:43:47 2009 +0200 x86, ds: use single debug store cpu configuration Use a single configuration for all cpus. Reported-by: Ingo Molnar Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: oleg@redhat.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144602.191165000@intel.com> Signed-off-by: Ingo Molnar commit 2311f0de21c17b2a8b960677a9cccfbfa52beb35 Author: Markus Metzger Date: Fri Apr 3 16:43:46 2009 +0200 x86, ds: add leakage warning Add a warning in case a debug store context is not removed before the task it is attached to is freed. Remove the old warning at thread exit. It is too early. Declare the debug store context field in thread_struct unconditionally. Remove ds_copy_thread() and ds_exit_thread() and do the work directly in process*.c. Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: oleg@redhat.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144601.254472000@intel.com> Signed-off-by: Ingo Molnar commit 3a68eef945b234f286406d96dc690fe17863c203 Author: Markus Metzger Date: Fri Apr 3 16:43:45 2009 +0200 x86, ds: add task tracing selftest Add selftests to cover per-task branch tracing. Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: oleg@redhat.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144600.329346000@intel.com> Signed-off-by: Ingo Molnar commit 01f6569ece6915616f6cae1d7d8b46ab8da9c1bd Author: Markus Metzger Date: Fri Apr 3 16:43:44 2009 +0200 x86, ds: selftest each cpu Perform debug store selftests on each cpu. Cover both the normal and the _noirq variant of the debug store interface. Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: oleg@redhat.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144559.394583000@intel.com> Signed-off-by: Ingo Molnar commit 84f201139245c30777ff858e71b8d7e134b8c3ed Author: Markus Metzger Date: Fri Apr 3 16:43:43 2009 +0200 x86, ds: fix bounds check in ds selftest Fix a bad bounds check in the debug store selftest. Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: oleg@redhat.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144558.450027000@intel.com> Signed-off-by: Ingo Molnar commit 353afeea24cc51aafc0ff21a72ec740b6f0af50c Author: Markus Metzger Date: Fri Apr 3 16:43:42 2009 +0200 x86, ds: fix compiler warning Size_t is defined differently on i386 and x86_64. Change type to avoid compiler warning. Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: oleg@redhat.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144557.523964000@intel.com> Signed-off-by: Ingo Molnar commit 4d657e51dfc042216febd4a007c6f36881f9256d Author: Markus Metzger Date: Fri Apr 3 16:43:41 2009 +0200 x86, hw-branch-tracer: allocate selftest iterator on heap Allocate the trace_iterator for the hw-branch-tracer selftest on the heap. Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: oleg@redhat.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144556.578777000@intel.com> Signed-off-by: Ingo Molnar commit de79f54f5347ad7ec6ff55ccbb6d4ab2a21f6a93 Author: Markus Metzger Date: Fri Apr 3 16:43:40 2009 +0200 x86, bts, hw-branch-tracer: add _noirq variants to the debug store interface The hw-branch-tracer uses debug store functions from an on_each_cpu() context, which is simply wrong since the functions may sleep. Add _noirq variants for most functions, which may be called with interrupts disabled. Separate per-cpu and per-task tracing and allow per-cpu tracing to be controlled from any cpu. Make the hw-branch-tracer use the new debug store interface, synchronize with hotplug cpu event using get/put_online_cpus(), and remove the unnecessary spinlock. Make the ptrace bts and the ds selftest code use the new interface. Defer the ds selftest. Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: oleg@redhat.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144555.658136000@intel.com> Signed-off-by: Ingo Molnar commit 35bb7600c17762bb129588c1877d2717fe325289 Author: Markus Metzger Date: Fri Apr 3 16:43:39 2009 +0200 x86, debugctlmsr: add _on_cpu variants to debugctlmsr functions Add functions to get and set the debugctlmsr on different cpus. Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: oleg@redhat.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144554.738772000@intel.com> Signed-off-by: Ingo Molnar commit 15879d042164650b93d83281ad5f87ad323bfbfe Author: Markus Metzger Date: Fri Apr 3 16:43:38 2009 +0200 x86, bts: use trace_clock_global() for timestamps Rename the bts_struct timestamp field to event. Use trace_clock_global() for time measurement. Reported-by: Ingo Molnar Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: oleg@redhat.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144553.773216000@intel.com> Signed-off-by: Ingo Molnar commit 38f801129ad07b9afa7f9bd3779f61b805416d8c Author: Markus Metzger Date: Fri Apr 3 16:43:37 2009 +0200 x86, bts: fix race between per-task and per-cpu branch tracing Per-task branch tracing installs a debug store context with the traced task. This immediately results in the branch trace control bits to be cleared for the next context switch of that task, if not set before. Either per-cpu or per-task tracing are allowed at the same time. An active per-cpu tracing would be disabled even if the per-task tracing request is rejected and the task debug store context removed. Check the tracing type (per-cpu or per-task) before installing a task debug store context. Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: oleg@redhat.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144552.856000000@intel.com> Signed-off-by: Ingo Molnar commit 8d99b3ac2726e5edd97ad147fa5c1f2acb63a745 Author: Markus Metzger Date: Fri Apr 3 16:43:36 2009 +0200 x86, bts: wait until traced task has been scheduled out In order to stop branch tracing for a running task, we need to first clear the branch tracing control bits before we may free the tracing buffer. If the traced task is running, the cpu might still trace that task after the branch trace control bits have cleared. Wait until the traced task has been scheduled out before proceeding. A similar problem affects the task debug store context. We first remove the context, then we need to wait until the task has been scheduled out before we can free the context memory. Reviewed-by: Oleg Nesterov Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144551.919636000@intel.com> Signed-off-by: Ingo Molnar commit e2b371f00a6f529f6362654239bdec8dcd510760 Author: Markus Metzger Date: Fri Apr 3 16:43:35 2009 +0200 mm, x86, ptrace, bts: defer branch trace stopping When a ptraced task is unlinked, we need to stop branch tracing for that task. Since the unlink is called with interrupts disabled, and we need interrupts enabled to stop branch tracing, we defer the work. Collect all branch tracing related stuff in a branch tracing context. Reviewed-by: Oleg Nesterov Signed-off-by: Markus Metzger Cc: Andrew Morton Cc: Peter Zijlstra Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144550.712401000@intel.com> Signed-off-by: Ingo Molnar commit a26b89f05d194413c7238e0bea071054f6b5d3c8 Author: Markus Metzger Date: Fri Apr 3 16:43:34 2009 +0200 sched, hw-branch-tracer: add wait_task_context_switch() function to sched.h Add a function to wait until some other task has been switched out at least once. This differs from wait_task_inactive() subtly, in that the latter will wait until the task has left the CPU. Signed-off-by: Markus Metzger Cc: markus.t.metzger@gmail.com Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: oleg@redhat.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144549.794157000@intel.com> Signed-off-by: Ingo Molnar commit cac94f979326212831c0ea44ed9ea1622b4f4e93 Author: Markus Metzger Date: Fri Apr 3 16:43:33 2009 +0200 x86, bts: fix race when bts tracer is removed When the bts tracer is removed while the traced task is running, the write to clear the bts tracer pointer races with context switch code. Read the tracer once during a context switch. When a new tracer is installed, the bts tracer is set in the ds context before the tracer is initialized in order to claim the context for that tracer. This may result in write accesses using an uninitialized trace configuration when scheduling timestamps have been requested. Store active tracing flags separately and only set active flags after the tracing configuration has been initialized. Reviewed-by: Oleg Nesterov Signed-off-by: Markus Metzger Cc: roland@redhat.com Cc: eranian@googlemail.com Cc: juan.villacis@intel.com Cc: ak@linux.jf.intel.com LKML-Reference: <20090403144548.881338000@intel.com> Signed-off-by: Ingo Molnar commit 2e8844e13ab73f1107aea4317a53ff5879f2e1d7 Merge: c78a395 d508afb Author: Ingo Molnar Date: Tue Apr 7 13:34:26 2009 +0200 Merge branch 'linus' into tracing/hw-branch-tracing Merge reason: update to latest tracing and ptrace APIs Signed-off-by: Ingo Molnar commit 6c009ecef8cca28c7c09eb16d0802e37915a76e1 Merge: 98c2aaf d508afb Author: Ingo Molnar Date: Tue Apr 7 12:05:21 2009 +0200 Merge branch 'linus' into perfcounters/core Merge reason: need the upstream facility added by: 7f1e2ca: hrtimer: fix rq->lock inversion (again) Signed-off-by: Ingo Molnar commit 98c2aaf8be5baf7193be37fb28bce8e7327158bc Author: Ingo Molnar Date: Tue Apr 7 11:30:17 2009 +0200 x86, perfcounters: add atomic64_xchg() Complete atomic64_t support on the 32-bit side by adding atomic64_xch(). Cc: Peter Zijlstra LKML-Reference: <20090406094518.445450972@chello.nl> Signed-off-by: Ingo Molnar commit 6278af660ff83fbafb18e53fc2747eb2ee6780fa Author: Mike Galbraith Date: Thu Apr 2 10:40:28 2009 +0200 perf_counter tools: kerneltop: display per function percentage along with event count ------------------------------------------------------------------------------ KernelTop: 90551 irqs/sec kernel:15.0% [NMI, 100000 CPU cycles], (all, 4 CPUs) ------------------------------------------------------------------------------ events pcnt RIP kernel function ______ ______ _____ ________________ _______________ 16871.00 - 19.1% - ffffffff80328e20 : clear_page_c 8810.00 - 9.9% - ffffffff8048ce80 : page_fault 4746.00 - 5.4% - ffffffff8048cae2 : _spin_lock 4428.00 - 5.0% - ffffffff80328e70 : copy_page_c 3340.00 - 3.8% - ffffffff80329090 : copy_user_generic_string! 2679.00 - 3.0% - ffffffff8028a16b : get_page_from_freelist 2254.00 - 2.5% - ffffffff80296f19 : unmap_vmas 2082.00 - 2.4% - ffffffff80297e19 : handle_mm_fault 1754.00 - 2.0% - ffffffff80288dc8 : __rmqueue_smallest 1553.00 - 1.8% - ffffffff8048ca58 : _spin_lock_irqsave 1400.00 - 1.6% - ffffffff8028cdc8 : release_pages 1337.00 - 1.5% - ffffffff80285400 : find_get_page 1335.00 - 1.5% - ffffffff80225a23 : do_page_fault 1299.00 - 1.5% - ffffffff802ba8e7 : __d_lookup 1174.00 - 1.3% - ffffffff802b38f3 : __link_path_walk 1155.00 - 1.3% - ffffffff802843e1 : perf_swcounter_ctx_event! 1137.00 - 1.3% - ffffffff8028d118 : ____pagevec_lru_add 963.00 - 1.1% - ffffffff802a670b : kmem_cache_alloc 885.00 - 1.0% - ffffffff8024bc61 : __wake_up_bit Display per function percentage along with event count. Signed-off-by: Mike Galbraith Cc: Peter Zijlstra Cc: Paul Mackerras Signed-off-by: Ingo Molnar commit bce379bf358738ab8efc8cda2594a299ac685085 Author: Peter Zijlstra Date: Mon Apr 6 11:45:13 2009 +0200 perf_counter: minimize context time updates Push the update_context_time() calls up the stack so that we get less invokations and thereby a less noisy output: before: # ./perfstat -e 1:0 -e 1:1 -e 1:1 -e 1:1 -l ls > /dev/null Performance counter stats for 'ls': 10.163691 cpu clock ticks (msecs) (scaled from 98.94%) 10.215360 task clock ticks (msecs) (scaled from 98.18%) 10.185549 task clock ticks (msecs) (scaled from 98.53%) 10.183581 task clock ticks (msecs) (scaled from 98.71%) Wall-clock time elapsed: 11.912858 msecs after: # ./perfstat -e 1:0 -e 1:1 -e 1:1 -e 1:1 -l ls > /dev/null Performance counter stats for 'ls': 9.316630 cpu clock ticks (msecs) 9.280789 task clock ticks (msecs) 9.280789 task clock ticks (msecs) 9.280789 task clock ticks (msecs) Wall-clock time elapsed: 9.574872 msecs Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090406094518.618876874@chello.nl> Signed-off-by: Ingo Molnar commit 849691a6cd40270ff5f4a8846d5f6bf8df663ffc Author: Peter Zijlstra Date: Mon Apr 6 11:45:12 2009 +0200 perf_counter: remove rq->lock usage Now that all the task runtime clock users are gone, remove the ugly rq->lock usage from perf counters, which solves the nasty deadlock seen when a software task clock counter was read from an NMI overflow context. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090406094518.531137582@chello.nl> Signed-off-by: Ingo Molnar commit a39d6f2556c4a19f58f538c6aa28bf8faca4fcb8 Author: Peter Zijlstra Date: Mon Apr 6 11:45:11 2009 +0200 perf_counter: rework the task clock software counter Rework the task clock software counter to use the context time instead of the task runtime clock, this removes the last such user. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090406094518.445450972@chello.nl> Signed-off-by: Ingo Molnar commit 4af4998b8aa35600f4c4a4f3c3a23baca6081d02 Author: Peter Zijlstra Date: Mon Apr 6 11:45:10 2009 +0200 perf_counter: rework context time Since perf_counter_context is switched along with tasks, we can maintain the context time without using the task runtime clock. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090406094518.353552838@chello.nl> Signed-off-by: Ingo Molnar commit 4c9e25428ff46b968a30f1dfafdba550cb6e4141 Author: Peter Zijlstra Date: Mon Apr 6 11:45:09 2009 +0200 perf_counter: change event definition Currently the definition of an event is slightly ambiguous. We have wakeup events, for poll() and SIGIO, which are either generated when a record crosses a page boundary (hw_events.wakeup_events == 0), or every wakeup_events new records. Now a record can be either a counter overflow record, or a number of different things, like the mmap PROT_EXEC region notifications. Then there is the PERF_COUNTER_IOC_REFRESH event limit, which only considers counter overflows. This patch changes then wakeup_events and SIGIO notification to only consider overflow events. Furthermore it changes the SIGIO notification to report SIGHUP when the event limit is reached and the counter will be disabled. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090406094518.266679874@chello.nl> Signed-off-by: Ingo Molnar commit 0c593b3411341e3a05a61f5527df36ab02bd11e8 Author: Peter Zijlstra Date: Mon Apr 6 11:45:08 2009 +0200 perf_counter: comment the perf_event_type stuff Describe the event format. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090406094518.211174347@chello.nl> Signed-off-by: Ingo Molnar commit 79f146415623fe74f39af67c0f6adc208939a410 Author: Peter Zijlstra Date: Mon Apr 6 11:45:07 2009 +0200 perf_counter: counter overflow limit Provide means to auto-disable the counter after 'n' overflow events. Create the counter with hw_event.disabled = 1, and then issue an ioctl(fd, PREF_COUNTER_IOC_REFRESH, n); to set the limit and enable the counter. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090406094518.083139737@chello.nl> Signed-off-by: Ingo Molnar commit 339f7c90b8a2f3aa2dd4267e79f797999e8a3c59 Author: Peter Zijlstra Date: Mon Apr 6 11:45:06 2009 +0200 perf_counter: PERF_RECORD_TIME By popular request, provide means to log a timestamp along with the counter overflow event. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090406094518.024173282@chello.nl> Signed-off-by: Ingo Molnar commit ebb3c4c4cb81d64cc041356915ec015e2c57092a Author: Peter Zijlstra Date: Mon Apr 6 11:45:05 2009 +0200 perf_counter: fix the mlock accounting Reading through the code I saw I forgot the finish the mlock accounting. Do so now. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090406094517.899767331@chello.nl> Signed-off-by: Ingo Molnar commit f6c7d5fe58b4846ee0cb4b98b6042489705eced4 Author: Peter Zijlstra Date: Mon Apr 6 11:45:04 2009 +0200 perf_counter: theres more to overflow than writing events Prepare for more generic overflow handling. The new perf_counter_overflow() method will handle the generic bits of the counter overflow, and can return a !0 return value, in which case the counter should be (soft) disabled, so that it won't count until it's properly disabled. XXX: do powerpc and swcounter Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090406094517.812109629@chello.nl> Signed-off-by: Ingo Molnar commit b6276f353bf490add62dcf7db0ebd75baa3e1a37 Author: Peter Zijlstra Date: Mon Apr 6 11:45:03 2009 +0200 perf_counter: x86: self-IPI for pending work Implement set_perf_counter_pending() with a self-IPI so that it will run ASAP in a usable context. For now use a second IRQ vector, because the primary vector pokes the apic in funny ways that seem to confuse things. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090406094517.724626696@chello.nl> Signed-off-by: Ingo Molnar commit 671dec5daf3b3c43c5777be282f00120a44cf37f Author: Peter Zijlstra Date: Mon Apr 6 11:45:02 2009 +0200 perf_counter: generalize pending infrastructure Prepare the pending infrastructure to do more than wakeups. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090406094517.634732847@chello.nl> Signed-off-by: Ingo Molnar commit 3c446b3d3b38f991f97e9d2df0ad26a60a94dcff Author: Peter Zijlstra Date: Mon Apr 6 11:45:01 2009 +0200 perf_counter: SIGIO support Provide support for fcntl() I/O availability signals. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090406094517.579788800@chello.nl> Signed-off-by: Ingo Molnar commit 9c03d88e328d5f28f13191622c2ea1349c36b799 Author: Peter Zijlstra Date: Mon Apr 6 11:45:00 2009 +0200 perf_counter: add more context information Change the callchain context entries to u16, so as to gain some space. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090406094517.457320003@chello.nl> Signed-off-by: Ingo Molnar commit a2e87d06ddbe6e6fdb8d6d2e5e985efe4efb07dd Author: Peter Zijlstra Date: Mon Apr 6 11:44:59 2009 +0200 perf_counter: update mmap() counter read, take 2 Update the userspace read method. Paul noted that: - userspace cannot observe ->lock & 1 on the same cpu. - we need a barrier() between reading ->lock and ->index to ensure we read them in that prticular order. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford LKML-Reference: <20090406094517.368446033@chello.nl> Signed-off-by: Ingo Molnar commit 7ba5779533819fc061b4afafcb4a609d55f37057 Author: Tetsuo Handa Date: Mon Apr 6 20:49:14 2009 +0900 tomoyo: remove "undelete domain" command. Since TOMOYO's policy management tools does not use the "undelete domain" command, we decided to remove that command. Signed-off-by: Kentaro Takeda Signed-off-by: Tetsuo Handa Signed-off-by: Toshiharu Harada Signed-off-by: James Morris commit 80fbe6ac9b47cbc11e174a9bf853834dc281da35 Author: Daniel Glöckner Date: Mon Apr 6 11:50:22 2009 +0200 ASoC: correct s6000 I2S clock polarity According to the data sheet data is clocked out on the falling edge and latched on the rising edge of the bit clock. While the left sample is transmitted the word clock line is low. Signed-off-by: Daniel Glöckner Signed-off-by: Mark Brown commit 52400ba946759af28442dee6265c5c0180ac7122 Author: Darren Hart Date: Fri Apr 3 13:40:49 2009 -0700 futex: add requeue_pi functionality PI Futexes and their underlying rt_mutex cannot be left ownerless if there are pending waiters as this will break the PI boosting logic, so the standard requeue commands aren't sufficient. The new commands properly manage pi futex ownership by ensuring a futex with waiters has an owner at all times. This will allow glibc to properly handle pi mutexes with pthread_condvars. The approach taken here is to create two new futex op codes: FUTEX_WAIT_REQUEUE_PI: Tasks will use this op code to wait on a futex (such as a non-pi waitqueue) and wake after they have been requeued to a pi futex. Prior to returning to userspace, they will acquire this pi futex (and the underlying rt_mutex). futex_wait_requeue_pi() is the result of a high speed collision between futex_wait() and futex_lock_pi() (with the first part of futex_lock_pi() being done by futex_proxy_trylock_atomic() on behalf of the top_waiter). FUTEX_REQUEUE_PI (and FUTEX_CMP_REQUEUE_PI): This call must be used to wake tasks waiting with FUTEX_WAIT_REQUEUE_PI, regardless of how many tasks the caller intends to wake or requeue. pthread_cond_broadcast() should call this with nr_wake=1 and nr_requeue=INT_MAX. pthread_cond_signal() should call this with nr_wake=1 and nr_requeue=0. The reason being we need both callers to get the benefit of the futex_proxy_trylock_atomic() routine. futex_requeue() also enqueues the top_waiter on the rt_mutex via rt_mutex_start_proxy_lock(). Signed-off-by: Darren Hart Reviewed-by: Thomas Gleixner Signed-off-by: Thomas Gleixner commit f801073f87aa22ddf0e9146355fec3993163790f Author: Darren Hart Date: Fri Apr 3 13:40:40 2009 -0700 futex: split out futex value validation code Refactor the code to validate the expected futex value in order to reuse it with the requeue_pi code. Signed-off-by: Darren Hart Reviewed-by: Thomas Gleixner Signed-off-by: Thomas Gleixner commit 9121e4783cd5c7e2a407763f3b61c2d573891133 Author: Darren Hart Date: Fri Apr 3 13:40:31 2009 -0700 futex: distangle futex_requeue() futex_requeue() is getting a bit long-winded, and will be getting more so after the requeue_pi patch. Factor out the actual requeueing into a nicely contained inline function to reduce function length and improve legibility. Signed-off-by: Darren Hart Reviewed-by: Thomas Gleixner Signed-off-by: Thomas Gleixner commit a72188d8a64ebe74722f1cf7ffac41b41ffdba21 Author: Darren Hart Date: Fri Apr 3 13:40:22 2009 -0700 futex: add FUTEX_HAS_TIMEOUT flag to restart.futex.flags Currently restart is only used if there is a timeout. The requeue_pi functionality requires restarting to futex_lock_pi() on signal after wakeup in futex_wait_requeue_pi() regardless of if there was a timeout or not. Using 0 for the timeout value is confusing as that could indicate an expired timer. The flag makes this explicit. While the check is not technically needed in futex_wait_restart(), doing so makes the code consistent with and will avoid confusion should the need arise to restart wait without a timeout. Signed-off-by: Darren Hart Reviewed-by: Thomas Gleixner Signed-off-by: Thomas Gleixner commit 8dac456a681bd94272ff50ecb31be6b669382c2b Author: Darren Hart Date: Fri Apr 3 13:40:12 2009 -0700 rt_mutex: add proxy lock routines This patch is a prerequisite for futex requeue_pi. It basically splits rt_mutex_slowlock() right down the middle, just before the first call to schedule(). It further adds helper functions which make use of the split and provide the rt-mutex preliminaries for futex requeue_pi. Signed-off-by: Darren Hart Reviewed-by: Thomas Gleixner Signed-off-by: Thomas Gleixner commit dd9739980b50c8cde33e1f8eb08b7e0140bcd61e Author: Darren Hart Date: Fri Apr 3 13:40:02 2009 -0700 futex: split out fixup owner logic from futex_lock_pi() Refactor the post lock acquisition logic from futex_lock_pi(). This code will be reused in futex_wait_requeue_pi(). Signed-off-by: Darren Hart Reviewed-by: Thomas Gleixner Signed-off-by: Thomas Gleixner commit 1a52084d0919c2799258737c21fb328a9de159b5 Author: Darren Hart Date: Fri Apr 3 13:39:52 2009 -0700 futex: split out atomic logic from futex_lock_pi() Refactor the atomic portion of futex_lock_pi() into futex_lock_pi_atomic(). This logic will be needed by requeue_pi, so modularize it to reduce code duplication. The only significant change is passing of the task to try and take the lock for. This simplifies the -EDEADLK test as if the lock is owned by task t, it's a deadlock, regardless of if we are doing requeue pi or not. This patch updates the corresponding comment accordingly. Signed-off-by: Darren Hart Reviewed-by: Thomas Gleixner Signed-off-by: Thomas Gleixner commit 4b1c486b3587d2abf50bee4a05eb488cd4045f2c Author: Darren Hart Date: Fri Apr 3 13:39:42 2009 -0700 futex: add helper to find the top prio waiter of a futex Improve legibility by wrapping finding the top waiter in a function. This will be used by the follow-on patches for enabling requeue pi. Signed-off-by: Darren Hart Reviewed-by: Thomas Gleixner Signed-off-by: Thomas Gleixner commit ca5f9524d61f54b1f618293ab92fc6b49cac864d Author: Darren Hart Date: Fri Apr 3 13:39:33 2009 -0700 futex: separate futex_wait_queue_me() logic from futex_wait() Refactor futex_wait() in preparation for futex_wait_requeue_pi(). In order to reuse a good chunk of the futex_wait() code for the upcoming futex_wait_requeue_pi() function, this patch breaks out the queue-to-wakeup section of futex_wait() into futex_wait_queue_me(). Signed-off-by: Darren Hart Reviewed-by: Thomas Gleixner Signed-off-by: Thomas Gleixner commit 92f22a3865abe87eea2609a6f8e5be5123f7ce4f Author: Peter Zijlstra Date: Thu Apr 2 11:12:04 2009 +0200 perf_counter: update mmap() counter read Paul noted that we don't need SMP barriers for the mmap() counter read because its always on the same cpu (otherwise you can't access the hw counter anyway). So remove the SMP barriers and replace them with regular compiler barriers. Further, update the comment to include a race free method of reading said hardware counter. The primary change is putting the pmc_read inside the seq-loop, otherwise we can still race and read rubbish. Noticed-by: Paul Mackerras Signed-off-by: Peter Zijlstra Cc: Corey Ashford Orig-LKML-Reference: <20090402091319.577951445@chello.nl> Signed-off-by: Ingo Molnar commit 5872bdb88a35fae7d224bd6b21e5f377e854ccfc Author: Peter Zijlstra Date: Thu Apr 2 11:12:03 2009 +0200 perf_counter: add more context information Put in counts to tell which ips belong to what context. ----- | | hv | -- nr | | kernel | -- | | user ----- Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Orig-LKML-Reference: <20090402091319.493101305@chello.nl> Signed-off-by: Ingo Molnar commit 3df70fd623bb109e0079e697c0276d220a4b7908 Author: Peter Zijlstra Date: Thu Apr 2 11:12:02 2009 +0200 perf_counter: kerneltop: update to new ABI Update to reflect the new record_type ABI changes. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Orig-LKML-Reference: <20090402091319.407283141@chello.nl> Signed-off-by: Ingo Molnar commit c457810ab4a825161aec6ef71b581e1bc8febd1a Author: Peter Zijlstra Date: Thu Apr 2 11:12:01 2009 +0200 perf_counter: per event wakeups By request, provide a way to request a wakeup every 'n' events instead of every page of output. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Corey Ashford Orig-LKML-Reference: <20090402091319.323309784@chello.nl> Signed-off-by: Ingo Molnar commit 8a057d84912f36e53f970c4d177cb4bb6b2f9e08 Author: Peter Zijlstra Date: Thu Apr 2 11:11:59 2009 +0200 perf_counter: move the event overflow output bits to record_type Per suggestion from Paul, move the event overflow bits to record_type and sanitize the enums a bit. Breaks the ABI -- again ;-) Suggested-by: Paul Mackerras Signed-off-by: Peter Zijlstra Cc: Corey Ashford Orig-LKML-Reference: <20090402091319.151921176@chello.nl> Signed-off-by: Ingo Molnar commit 9dd499889bdb12ac0e412ccdd718fe0d348258f2 Author: Mike Galbraith Date: Fri Mar 27 12:13:43 2009 +0100 perf_counter tools: kerneltop: add real-time data acquisition thread Decouple kerneltop display from event acquisition by introducing a separate data acquisition thread. This fixes annnoying kerneltop display refresh jitter and missed events. Also add a -r option, to switch the data acquisition thread to real-time priority. Signed-off-by: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Orig-LKML-Reference: Signed-off-by: Ingo Molnar commit 4e935e47177c3b26cf383e79849bae2a464d0160 Author: Peter Zijlstra Date: Mon Mar 30 19:07:16 2009 +0200 perf_counter: pmc arbitration Follow the example set by powerpc and try to play nice with oprofile and the nmi watchdog. Signed-off-by: Peter Zijlstra Acked-by: Paul Mackerras Orig-LKML-Reference: <20090330171024.459968444@chello.nl> Signed-off-by: Ingo Molnar commit d7d59fb323833682b117b528d77eeb8ef587036a Author: Peter Zijlstra Date: Mon Mar 30 19:07:15 2009 +0200 perf_counter: x86: callchain support Provide the x86 perf_callchain() implementation. Code based on the ftrace/sysprof code from Soeren Sandmann Pedersen. Signed-off-by: Peter Zijlstra Acked-by: Paul Mackerras Cc: Soeren Sandmann Pedersen Cc: Frederic Weisbecker Cc: Steven Rostedt Orig-LKML-Reference: <20090330171024.341993293@chello.nl> Signed-off-by: Ingo Molnar commit 394ee07623cf556c8daae2b3c00cf5fea47f0811 Author: Peter Zijlstra Date: Mon Mar 30 19:07:14 2009 +0200 perf_counter: provide generic callchain bits Provide the generic callchain support bits. If hw_event->callchain is set the arch specific perf_callchain() function is called upon to provide a perf_callchain_entry structure filled with the current callchain. If it does so, it is added to the overflow output event. Signed-off-by: Peter Zijlstra Acked-by: Paul Mackerras Orig-LKML-Reference: <20090330171024.254266860@chello.nl> Signed-off-by: Ingo Molnar commit 023c54c42288416b4f43c67bfd5049a76926fad6 Author: Peter Zijlstra Date: Mon Mar 30 19:07:13 2009 +0200 perf_counter tools: kerneltop: update event_types Go along with the new perf_event_type ABI. Signed-off-by: Peter Zijlstra Acked-by: Paul Mackerras Orig-LKML-Reference: <20090330171024.133985461@chello.nl> Signed-off-by: Ingo Molnar commit 5ed00415e304203a0a9dcaef226d6d3f1106070e Author: Peter Zijlstra Date: Mon Mar 30 19:07:12 2009 +0200 perf_counter: re-arrange the perf_event_type Breaks ABI yet again :-) Change the event type so that [0, 2^31-1] are regular event types, but [2^31, 2^32-1] forms a bitmask for overflow events. Signed-off-by: Peter Zijlstra Acked-by: Paul Mackerras Orig-LKML-Reference: <20090330171024.047961770@chello.nl> Signed-off-by: Ingo Molnar commit 78d613eb129fc4edf0e2cabfcc6a4c5285482d21 Author: Peter Zijlstra Date: Mon Mar 30 19:07:11 2009 +0200 perf_counter: small cleanup of the output routines Move the nmi argument to the _begin() function, so that _end() only needs the handle. This allows the _begin() function to generate a wakeup on event loss. Signed-off-by: Peter Zijlstra Acked-by: Paul Mackerras Orig-LKML-Reference: <20090330171023.959404268@chello.nl> Signed-off-by: Ingo Molnar commit 31f004df8d14212f0a8a2fb12a8ed44a3d80e2fb Author: Paul Mackerras Date: Mon Mar 30 19:07:10 2009 +0200 perf_counter tools: optionally scale counter values in perfstat mode Impact: new functionality This adds add an option to the perfstat mode of kerneltop to scale the reported counter values according to the fraction of time that each counter gets to count. This is invoked with the -l option (I used 'l' because s, c, a and e were all taken already.) This uses the new PERF_RECORD_TOTAL_TIME_{ENABLED,RUNNING} read format options. With this, we get output like this: $ ./perfstat -l -e 0:0,0:1,0:2,0:3,0:4,0:5 ./spin Performance counter stats for './spin': 4016072055 CPU cycles (events) (scaled from 66.53%) 2005887318 instructions (events) (scaled from 66.53%) 1762849 cache references (events) (scaled from 66.69%) 165229 cache misses (events) (scaled from 66.85%) 1001298009 branches (events) (scaled from 66.78%) 41566 branch misses (events) (scaled from 66.61%) Wall-clock time elapsed: 2438.227446 msecs This also lets us detect when a counter is zero because the counter never got to go on the CPU at all. In that case we print rather than 0. Signed-off-by: Paul Mackerras Signed-off-by: Peter Zijlstra Orig-LKML-Reference: <20090330171023.871484899@chello.nl> Signed-off-by: Ingo Molnar commit 9ea98e191255ee642e64a5745014424fc63f83b0 Author: Peter Zijlstra Date: Mon Mar 30 19:07:09 2009 +0200 perf_counter: x86: proper error propagation for the x86 hw_perf_counter_init() Now that Paul cleaned up the error propagation paths, pass down the x86 error as well. Signed-off-by: Peter Zijlstra Acked-by: Paul Mackerras Orig-LKML-Reference: <20090330171023.792822360@chello.nl> Signed-off-by: Ingo Molnar commit d5d2bc0dd0379deddb9ede66fec90a3083eaec57 Author: Paul Mackerras Date: Mon Mar 30 19:07:08 2009 +0200 perf_counter: make it possible for hw_perf_counter_init to return error codes Impact: better error reporting At present, if hw_perf_counter_init encounters an error, all it can do is return NULL, which causes sys_perf_counter_open to return an EINVAL error to userspace. This isn't very informative for userspace; it means that userspace can't tell the difference between "sorry, oprofile is already using the PMU" and "we don't support this CPU" and "this CPU doesn't support the requested generic hardware event". This commit uses the PTR_ERR/ERR_PTR/IS_ERR set of macros to let hw_perf_counter_init return an error code on error rather than just NULL if it wishes. If it does so, that error code will be returned from sys_perf_counter_open to userspace. If it returns NULL, an EINVAL error will be returned to userspace, as before. This also adapts the powerpc hw_perf_counter_init to make use of this to return ENXIO, EINVAL, EBUSY, or EOPNOTSUPP as appropriate. It would be good to add extra error numbers in future to allow userspace to distinguish the various errors that are currently reported as EINVAL, i.e. irq_period < 0, too many events in a group, conflict between exclude_* settings in a group, and PMU resource conflict in a group. [ v2: fix a bug pointed out by Corey Ashford where error returns from hw_perf_counter_init were not handled correctly in the case of raw hardware events.] Signed-off-by: Paul Mackerras Signed-off-by: Peter Zijlstra Orig-LKML-Reference: <20090330171023.682428180@chello.nl> Signed-off-by: Ingo Molnar commit 7595d63b3a9ce65d14c4fbd0e7de448a343d7215 Author: Paul Mackerras Date: Mon Mar 30 19:07:07 2009 +0200 perf_counter: powerpc: only reserve PMU hardware when we need it Impact: cooperate with oprofile At present, on PowerPC, if you have perf_counters compiled in, oprofile doesn't work. There is code to allow the PMU to be shared between competing subsystems, such as perf_counters and oprofile, but currently the perf_counter subsystem reserves the PMU for itself at boot time, and never releases it. This makes perf_counter play nicely with oprofile. Now we keep a count of how many perf_counter instances are counting hardware events, and reserve the PMU when that count becomes non-zero, and release the PMU when that count becomes zero. This means that it is possible to have perf_counters compiled in and still use oprofile, as long as there are no hardware perf_counters active. This also means that if oprofile is active, sys_perf_counter_open will fail if the hw_event specifies a hardware event. To avoid races with other tasks creating and destroying perf_counters, we use a mutex. We use atomic_inc_not_zero and atomic_add_unless to avoid having to take the mutex unless there is a possibility of the count going between 0 and 1. Signed-off-by: Paul Mackerras Signed-off-by: Peter Zijlstra Orig-LKML-Reference: <20090330171023.627912475@chello.nl> Signed-off-by: Ingo Molnar commit 3c1ba6fafecaed295017881f8863a18602f32c1d Author: Peter Zijlstra Date: Mon Mar 30 19:07:06 2009 +0200 perf_counter: kerneltop: parse the mmap data stream frob the kerneltop code to print the mmap data in the stream Better use would be collecting the IPs per PID and mapping them onto the provided userspace code.. TODO Signed-off-by: Peter Zijlstra Acked-by: Paul Mackerras Orig-LKML-Reference: <20090330171023.501902515@chello.nl> Signed-off-by: Ingo Molnar commit 0a4a93919bdc5cee48fe4367591e8e0449c1086c Author: Peter Zijlstra Date: Mon Mar 30 19:07:05 2009 +0200 perf_counter: executable mmap() information Currently the profiling information returns userspace IPs but no way to correlate them to userspace code. Userspace could look into /proc/$pid/maps but that might not be current or even present anymore at the time of analyzing the IPs. Therefore provide means to track the mmap information and provide it in the output stream. XXX: only covers mmap()/munmap(), mremap() and mprotect() are missing. Signed-off-by: Peter Zijlstra Acked-by: Paul Mackerras Cc: Andrew Morton Orig-LKML-Reference: <20090330171023.417259499@chello.nl> Signed-off-by: Ingo Molnar commit 195564390210977954fe4ef45b39cdee34f41b59 Author: Peter Zijlstra Date: Mon Mar 30 19:07:04 2009 +0200 perf_counter: kerneltop: simplify data_head read Now that the kernel side changed, match up again. Signed-off-by: Peter Zijlstra Acked-by: Paul Mackerras Orig-LKML-Reference: <20090330171023.327144324@chello.nl> Signed-off-by: Ingo Molnar commit 38ff667b321b00f5e6830e93fb4ab11a653a2920 Author: Peter Zijlstra Date: Mon Mar 30 19:07:03 2009 +0200 perf_counter: fix update_userpage() It just occured to me it is possible to have multiple contending updates of the userpage (mmap information vs overflow vs counter). This would break the seqlock logic. It appear the arch code uses this from NMI context, so we cannot possibly serialize its use, therefore separate the data_head update from it and let it return to its original use. The arch code needs to make sure there are no contending callers by disabling the counter before using it -- powerpc appears to do this nicely. Signed-off-by: Peter Zijlstra Acked-by: Paul Mackerras Orig-LKML-Reference: <20090330171023.241410660@chello.nl> Signed-off-by: Ingo Molnar commit 925d519ab82b6dd7aca9420d809ee83819c08db2 Author: Peter Zijlstra Date: Mon Mar 30 19:07:02 2009 +0200 perf_counter: unify and fix delayed counter wakeup While going over the wakeup code I noticed delayed wakeups only work for hardware counters but basically all software counters rely on them. This patch unifies and generalizes the delayed wakeup to fix this issue. Since we're dealing with NMI context bits here, use a cmpxchg() based single link list implementation to track counters that have pending wakeups. [ This should really be generic code for delayed wakeups, but since we cannot use cmpxchg()/xchg() in generic code, I've let it live in the perf_counter code. -- Eric Dumazet could use it to aggregate the network wakeups. ] Furthermore, the x86 method of using TIF flags was flawed in that its quite possible to end up setting the bit on the idle task, loosing the wakeup. The powerpc method uses per-cpu storage and does appear to be sufficient. Signed-off-by: Peter Zijlstra Acked-by: Paul Mackerras Orig-LKML-Reference: <20090330171023.153932974@chello.nl> Signed-off-by: Ingo Molnar commit 53cfbf593758916aac41db728f029986a62f1254 Author: Paul Mackerras Date: Wed Mar 25 22:46:58 2009 +1100 perf_counter: record time running and time enabled for each counter Impact: new functionality Currently, if there are more counters enabled than can fit on the CPU, the kernel will multiplex the counters on to the hardware using round-robin scheduling. That isn't too bad for sampling counters, but for counting counters it means that the value read from a counter represents some unknown fraction of the true count of events that occurred while the counter was enabled. This remedies the situation by keeping track of how long each counter is enabled for, and how long it is actually on the cpu and counting events. These times are recorded in nanoseconds using the task clock for per-task counters and the cpu clock for per-cpu counters. These values can be supplied to userspace on a read from the counter. Userspace requests that they be supplied after the counter value by setting the PERF_FORMAT_TOTAL_TIME_ENABLED and/or PERF_FORMAT_TOTAL_TIME_RUNNING bits in the hw_event.read_format field when creating the counter. (There is no way to change the read format after the counter is created, though it would be possible to add some way to do that.) Using this information it is possible for userspace to scale the count it reads from the counter to get an estimate of the true count: true_count_estimate = count * total_time_enabled / total_time_running This also lets userspace detect the situation where the counter never got to go on the cpu: total_time_running == 0. This functionality has been requested by the PAPI developers, and will be generally needed for interpreting the count values from counting counters correctly. In the implementation, this keeps 5 time values (in nanoseconds) for each counter: total_time_enabled and total_time_running are used when the counter is in state OFF or ERROR and for reporting back to userspace. When the counter is in state INACTIVE or ACTIVE, it is the tstamp_enabled, tstamp_running and tstamp_stopped values that are relevant, and total_time_enabled and total_time_running are determined from them. (tstamp_stopped is only used in INACTIVE state.) The reason for doing it like this is that it means that only counters being enabled or disabled at sched-in and sched-out time need to be updated. There are no new loops that iterate over all counters to update total_time_enabled or total_time_running. This also keeps separate child_total_time_running and child_total_time_enabled fields that get added in when reporting the totals to userspace. They are separate fields so that they can be atomic. We don't want to use atomics for total_time_running, total_time_enabled etc., because then we would have to use atomic sequences to update them, which are slower than regular arithmetic and memory accesses. It is possible to measure total_time_running by adding a task_clock counter to each group of counters, and total_time_enabled can be measured approximately with a top-level task_clock counter (though inaccuracies will creep in if you need to disable and enable groups since it is not possible in general to disable/enable the top-level task_clock counter simultaneously with another group). However, that adds extra overhead - I measured around 15% increase in the context switch latency reported by lat_ctx (from lmbench) when a task_clock counter was added to each of 2 groups, and around 25% increase when a task_clock counter was added to each of 4 groups. (In both cases a top-level task-clock counter was also added.) In contrast, the code added in this commit gives better information with no overhead that I could measure (in fact in some cases I measured lower times with this code, but the differences were all less than one standard deviation). [ v2: address review comments by Andrew Morton. ] Signed-off-by: Paul Mackerras Acked-by: Peter Zijlstra Cc: Andrew Morton Orig-LKML-Reference: <18890.6578.728637.139402@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 7730d8655880f41f2ea519aca2ca6a1413dfd2c9 Author: Peter Zijlstra Date: Wed Mar 25 12:48:31 2009 +0100 perf_counter: allow and require one-page mmap on counting counters A brainfart stopped single page mmap()s working. The rest of the code should be perfectly fine with not having any data pages. Reported-by: Paul Mackerras Signed-off-by: Peter Zijlstra Orig-LKML-Reference: <1237981712.7972.812.camel@twins> Signed-off-by: Ingo Molnar commit 00f0ad73ac90e3fba8b4cbe4cf21b2fb9a56cb72 Author: Peter Zijlstra Date: Wed Mar 25 12:30:27 2009 +0100 perf_counter: kerneltop: output event support Teach kerneltop about the new output ABI. XXX: anybody fancy integrating the PID/TID data into the output? Bump the mmap_data pages a little because we bloated the output and have to be more careful about overruns with structured data. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Mike Galbraith Cc: Arjan van de Ven Cc: Wu Fengguang Orig-LKML-Reference: <20090325113317.192910290@chello.nl> Signed-off-by: Ingo Molnar commit 4c4ba21d2c3659e4c0421533939b58a8fd9f06c9 Author: Peter Zijlstra Date: Wed Mar 25 12:30:26 2009 +0100 perf_counter: kerneltop: mmap_pages argument provide a knob to set the number of mmap data pages. Signed-off-by: Mike Galbraith Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Mike Galbraith Cc: Arjan van de Ven Cc: Wu Fengguang Orig-LKML-Reference: <20090325113317.104545398@chello.nl> Signed-off-by: Ingo Molnar commit ea5d20cf99db5d26d43b6d322d3ace17e08a6552 Author: Peter Zijlstra Date: Wed Mar 25 12:30:25 2009 +0100 perf_counter: optionally provide the pid/tid of the sampled task Allow cpu wide counters to profile userspace by providing what process the sample belongs to. This raises the first issue with the output type, lots of these options: group, tid, callchain, etc.. are non-exclusive and could be combined, suggesting a bitfield. However, things like the mmap() data stream doesn't fit in that. How to split the type field... Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Mike Galbraith Cc: Arjan van de Ven Cc: Wu Fengguang Orig-LKML-Reference: <20090325113317.013775235@chello.nl> Signed-off-by: Ingo Molnar commit 63e35b25d6b5c3136d22ef249dbbf96716aa08bf Author: Peter Zijlstra Date: Wed Mar 25 12:30:24 2009 +0100 perf_counter: sanity check on the output API Ensure we never write more than we said we would. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Mike Galbraith Cc: Arjan van de Ven Cc: Wu Fengguang Orig-LKML-Reference: <20090325113316.921433024@chello.nl> Signed-off-by: Ingo Molnar commit 5c1481943250ab65fa5130e05ec479c93216e9f7 Author: Peter Zijlstra Date: Wed Mar 25 12:30:23 2009 +0100 perf_counter: output objects Provide a {type,size} header for each output entry. This should provide extensible output, and the ability to mix multiple streams. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Mike Galbraith Cc: Arjan van de Ven Cc: Wu Fengguang Orig-LKML-Reference: <20090325113316.831607932@chello.nl> Signed-off-by: Ingo Molnar commit b9cacc7bf193df16532bfa7d7ca77fe50fc3c2e6 Author: Peter Zijlstra Date: Wed Mar 25 12:30:22 2009 +0100 perf_counter: more elaborate write API Provide a begin, copy, end interface to the output buffer. begin() reserves the space, copy() copies the data over, considering page boundaries, end() finalizes the event and does the wakeup. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Mike Galbraith Cc: Arjan van de Ven Cc: Wu Fengguang Orig-LKML-Reference: <20090325113316.740550870@chello.nl> Signed-off-by: Ingo Molnar commit c7138f37f905bb7987b1f9f5a8ee73667db39f25 Author: Peter Zijlstra Date: Tue Mar 24 13:18:16 2009 +0100 perf_counter: fix perf_poll() Impact: fix kerneltop 100% CPU usage Only return a poll event when there's actually been one, poll_wait() doesn't actually wait for the waitq you pass it, it only enqueues you on it. Only once all FDs have been iterated and none of thm returned a poll-event will it schedule(). Also make it return POLL_HUP when there's not mmap() area to read from. Further, fix a silly bug in the write code. Reported-by: Mike Galbraith Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Arjan van de Ven Orig-LKML-Reference: <1237897096.24918.181.camel@twins> Signed-off-by: Ingo Molnar commit f66c6b2066b44d4ab8e8ac1ee4cae543738fe2ac Author: Paul Mackerras Date: Mon Mar 23 10:29:36 2009 +1100 perf_counter: update documentation Impact: documentation fix This updates the perfcounter documentation to reflect recent changes. Signed-off-by: Paul Mackerras commit 0fd112e41cd6f6d4779cbe327c3632d087e31476 Author: Peter Zijlstra Date: Tue Mar 24 10:50:24 2009 +0100 perf_counter tools: remove glib dependency and fix bugs in kerneltop.c, fix poll() Paul Mackerras wrote: > I noticed the poll stuff is bogus - we have a 2D array of struct > pollfds (MAX_NR_CPUS x MAX_COUNTERS), we fill in a sub-array (with the > rest being uninitialized, since the array is on the stack) and then > pass the first nr_cpus elements to poll. Not what we really meant, I > suspect. :) Not even if we only have one counter, since it's the > counter dimension that varies fastest. This should fix the most obvious poll fubar.. not enough to fix the full problem though.. Reported-by: Paul Mackerras Reported-by: Mike Galbraith Signed-off-by: Peter Zijlstra Cc: Arjan van de Ven Orig-LKML-Reference: <18888.29986.340328.540512@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit cbe46555dc4de6403cd757139d42289b5f21abb9 Author: Paul Mackerras Date: Tue Mar 24 16:52:34 2009 +1100 perf_counter tools: remove glib dependency and fix bugs in kerneltop.c The glib dependency in kerneltop.c is only for a little bit of list manipulation, and I find it inconvenient. This adds a 'next' field to struct source_line, which lets us link them together into a list. The code to do the linking ourselves turns out to be no longer or more difficult than using glib. This also fixes a few other problems: - We need to #include to get PATH_MAX on powerpc. - We need to #include rather than have our own definitions of __u64 and __s64; on powerpc the installed headers define them to be unsigned long and long respectively, and if we have our own, different definition here that causes a compile error. - This takes out the x86 setting of errno from -ret in sys_perf_counter_open. My experiments on x86 indicate that the glibc syscall() does this for us already. - We had two CPU migration counters in the default set, which seems unnecessary; I changed one of them to a context switch counter. - In perfstat mode we were printing CPU cycles and instructions as milliseconds, and the cpu clock and task clock counters as events. This fixes that. - In perfstat mode we were still printing a blank line after the first counter, which was a holdover from when a task clock counter was automatically included as the first counter. This removes the blank line. - On a test machine here, parse_symbols() and parse_vmlinux() were taking long enough (almost 0.5 seconds) for the mmap buffer to overflow before we got to the first mmap_read() call, so this moves them before we open all the counters. - The error message if sys_perf_counter_open fails needs to use errno, not -fd[i][counter]. Signed-off-by: Paul Mackerras Acked-by: Peter Zijlstra Acked-by: Mike Galbraith Cc: Arjan van de Ven Orig-LKML-Reference: <18888.29986.340328.540512@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar commit 81cdbe0509542324ad7d3282ab67c2b6716df663 Author: Ingo Molnar Date: Mon Mar 23 22:29:50 2009 +0100 perf_counter tools: increase cpu-cycles again Commit b7368fdd7d decreased the CPU cycles interval 100-fold, but this is causig kerneltop failures on my Nehalem box: aldebaran:/home/mingo/linux/linux/Documentation/perf_counter> ./kerneltop KernelTop refresh period: 2 seconds ERROR: failed to keep up with mmap data 10,000 cycles is way too short. What we should do instead on mostly-idle systems is some sort of read/poll timeout, so that we display something every 2 seconds for sure. Cc: Wu Fengguang Cc: Peter Zijlstra Cc: Paul Mackerras Signed-off-by: Ingo Molnar commit 193e8df1b465f206f8a286202680702e1c153367 Author: Ingo Molnar Date: Mon Mar 23 22:23:16 2009 +0100 perf_counter tools: fix build warning in kerneltop.c Fix: kerneltop.c: In function ‘record_ip’: kerneltop.c:1005: warning: format ‘%016llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ Cc: Wu Fengguang Cc: Paul Mackerras Acked-by: Peter Zijlstra Orig-LKML-Reference: <20090323172417.677932499@chello.nl> Signed-off-by: Ingo Molnar commit 383c5f8cd7d253be0017d8d5a39cbb78aaf70206 Author: Ingo Molnar Date: Mon Mar 23 21:49:25 2009 +0100 perf_counter tools: tidy up in-kernel dependencies Remove now unified perfstat.c and perf_counter.h, and link to the in-kernel perf_counter.h. Cc: Wu Fengguang Cc: Paul Mackerras Acked-by: Peter Zijlstra Orig-LKML-Reference: <20090323172417.677932499@chello.nl> Signed-off-by: Ingo Molnar commit bcbcb37cdb67d8100acfa66df40c4d636c28c4d1 Author: Peter Zijlstra Date: Mon Mar 23 18:22:12 2009 +0100 perf_counter tools: use mmap() output update kerneltop to use the mmap() output to gather overflow information Signed-off-by: Peter Zijlstra Cc: Wu Fengguang Cc: Paul Mackerras Orig-LKML-Reference: <20090323172417.677932499@chello.nl> Signed-off-by: Ingo Molnar commit 803d4f3980f6e220b27311a283aab0a4d68b6709 Author: Peter Zijlstra Date: Mon Mar 23 18:22:11 2009 +0100 perf_counter tools: update to new syscall ABI update the kerneltop userspace to work with the latest syscall ABI Signed-off-by: Peter Zijlstra Cc: Wu Fengguang Cc: Paul Mackerras Orig-LKML-Reference: <20090323172417.559643732@chello.nl> Signed-off-by: Ingo Molnar commit 7b732a75047738e4f85438ed2f9cd34bf5f2a19a Author: Peter Zijlstra Date: Mon Mar 23 18:22:10 2009 +0100 perf_counter: new output ABI - part 1 Impact: Rework the perfcounter output ABI use sys_read() only for instant data and provide mmap() output for all async overflow data. The first mmap() determines the size of the output buffer. The mmap() size must be a PAGE_SIZE multiple of 1+pages, where pages must be a power of 2 or 0. Further mmap()s of the same fd must have the same size. Once all maps are gone, you can again mmap() with a new size. In case of 0 extra pages there is no data output and the first page only contains meta data. When there are data pages, a poll() event will be generated for each full page of data. Furthermore, the output is circular. This means that although 1 page is a valid configuration, its useless, since we'll start overwriting it the instant we report a full page. Future work will focus on the output format (currently maintained) where we'll likey want each entry denoted by a header which includes a type and length. Further future work will allow to splice() the fd, also containing the async overflow data -- splice() would be mutually exclusive with mmap() of the data. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Orig-LKML-Reference: <20090323172417.470536358@chello.nl> Signed-off-by: Ingo Molnar commit b09d2501ed3d294619cbfbcf828ad39324d0e548 Author: H. Peter Anvin Date: Wed Apr 1 17:21:56 2009 -0700 mutex: drop "inline" from mutex_lock() inside kernel/mutex.c Impact: build fix mutex_lock() is was defined inline in kernel/mutex.c, but wasn't declared so not in . This didn't cause a problem until checkin 3a2d367d9aabac486ac4444c6c7ec7a1dab16267 added the atomic_dec_and_mutex_lock() inline in between declaration and definion. This broke building with CONFIG_ALLOW_WARNINGS=n, e.g. make allnoconfig. Either from the source code nor the allnoconfig binary output I cannot find any internal references to mutex_lock() in kernel/mutex.c, so presumably this "inline" is now-useless legacy. Cc: Eric Paris Cc: Peter Zijlstra Cc: Paul Mackerras Orig-LKML-Reference: Signed-off-by: H. Peter Anvin commit 9ab772cd535c4b256a577eae516f9c7462346b2d Author: Eric Paris Date: Mon Mar 23 18:22:09 2009 +0100 mutex: add atomic_dec_and_mutex_lock() Much like the atomic_dec_and_lock() function in which we take an hold a spin_lock if we drop the atomic to 0 this function takes and holds the mutex if we dec the atomic to 0. Signed-off-by: Eric Paris Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Orig-LKML-Reference: <20090323172417.410913479@chello.nl> Signed-off-by: Ingo Molnar commit 37d81828385f8ff823caaaf1a83e72d065b6cfa1 Author: Paul Mackerras Date: Mon Mar 23 18:22:08 2009 +0100 perf_counter: add an mmap method to allow userspace to read hardware counters Impact: new feature giving performance improvement This adds the ability for userspace to do an mmap on a hardware counter fd and get access to a read-only page that contains the information needed to translate a hardware counter value to the full 64-bit counter value that would be returned by a read on the fd. This is useful on architectures that allow user programs to read the hardware counters, such as PowerPC. The mmap will only succeed if the counter is a hardware counter monitoring the current process. On my quad 2.5GHz PowerPC 970MP machine, userspace can read a counter and translate it to the full 64-bit value in about 30ns using the mmapped page, compared to about 830ns for the read syscall on the counter, so this does give a significant performance improvement. Signed-off-by: Paul Mackerras Signed-off-by: Peter Zijlstra Orig-LKML-Reference: <20090323172417.297057964@chello.nl> Signed-off-by: Ingo Molnar commit 96f6d4444302bb2ea2cf409529eef816462f6ce0 Author: Peter Zijlstra Date: Mon Mar 23 18:22:07 2009 +0100 perf_counter: avoid recursion Tracepoint events like lock_acquire and software counters like pagefaults can recurse into the perf counter code again, avoid that. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Orig-LKML-Reference: <20090323172417.152096433@chello.nl> Signed-off-by: Ingo Molnar commit f4a2deb4860497f4332cf6a1acddab3dd628ddf0 Author: Peter Zijlstra Date: Mon Mar 23 18:22:06 2009 +0100 perf_counter: remove the event config bitfields Since the bitfields turned into a bit of a mess, remove them and rely on good old masks. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Orig-LKML-Reference: <20090323172417.059499915@chello.nl> Signed-off-by: Ingo Molnar commit af9522cf133e9be6da8525a46a9ed7e7659f0e1a Author: Wu Fengguang Date: Fri Mar 20 10:08:10 2009 +0800 perf_counter tools: when no command is feed to perfstat, display help and exit Signed-off-by: Wu Fengguang Acked-by: Peter Zijlstra Cc: Paul Mackerras Signed-off-by: Ingo Molnar commit dda7c02f33833bfa9412ba6f0e410b0a18b42c88 Author: Wu Fengguang Date: Fri Mar 20 10:08:09 2009 +0800 perf_counter tools: cut down default count for cpu-cycles In my system, it takes kerneltop dozens of minutes to show up usable numbers. Make the default count 100 times smaller fixed this long startup latency. I'm not sure if it's the right solution though. Signed-off-by: Wu Fengguang Acked-by: Peter Zijlstra Cc: Paul Mackerras Signed-off-by: Ingo Molnar commit 3ab8d792b1348eaabfe550ba60902d781d160dd4 Author: Wu Fengguang Date: Fri Mar 20 10:08:08 2009 +0800 perf_counter tools: fix event_id type Signed-off-by: Wu Fengguang Acked-by: Peter Zijlstra Cc: Paul Mackerras Signed-off-by: Ingo Molnar commit ef45fa9e6c1694d3e8063f39749097a6e496b12c Author: Wu Fengguang Date: Fri Mar 20 10:08:07 2009 +0800 perf_counter tools: fix comment for sym_weight() Signed-off-by: Wu Fengguang Acked-by: Peter Zijlstra Cc: Paul Mackerras Signed-off-by: Ingo Molnar commit f7524bda8be8be98db356d6a83ac1da451ecdb2e Author: Wu Fengguang Date: Fri Mar 20 10:08:06 2009 +0800 perf_counter tools: move remaining code into kerneltop.c - perfstat.c can be safely removed now - perfstat: -s => -a for system wide accounting - kerneltop: add -S/--stat for perfstat mode - minor adjustments to kerneltop --help, perfstat --help Signed-off-by: Wu Fengguang Acked-by: Peter Zijlstra Cc: Paul Mackerras Signed-off-by: Ingo Molnar commit e3908612d93dff9d7746d85d37c42593254bf282 Author: Wu Fengguang Date: Fri Mar 20 10:08:05 2009 +0800 perf_counter tools: Reuse event_name() in kerneltop - can handle sw counters now - the outputs will look slightly different Acked-by: Peter Zijlstra Cc: Paul Mackerras Signed-off-by: Ingo Molnar commit 95bb3be1b3ca4a71cc168787b675d5b7852fc6be Author: Wu Fengguang Date: Fri Mar 20 10:08:04 2009 +0800 perf_counter tools: support symbolic event names in kerneltop - kerneltop: --event_id => --event - kerneltop: can accept SW event types now - perfstat: it used to implicitly add event -2(task-clock), the new code no longer does this. Shall we? Signed-off-by: Wu Fengguang Acked-by: Peter Zijlstra Cc: Paul Mackerras Signed-off-by: Ingo Molnar commit f49012fad4ed2231c7380c0b1901122242b3eab0 Author: Wu Fengguang Date: Fri Mar 20 10:08:03 2009 +0800 perf_counter tools: Move perfstat supporting code into perfcounters.h Signed-off-by: Wu Fengguang Acked-by: Peter Zijlstra Cc: Paul Mackerras Signed-off-by: Ingo Molnar commit cea92ce5b07078cd62c4712d51390b09a43dba2e Author: Wu Fengguang Date: Fri Mar 20 10:08:02 2009 +0800 perf_counter tools: Merge common code into perfcounters.h kerneltop's MAX_COUNTERS is increased from 8 to 64(the value used by perfstat). Signed-off-by: Wu Fengguang Acked-by: Peter Zijlstra Cc: Paul Mackerras Signed-off-by: Ingo Molnar commit e0143bad9dbf2a8fad4c5430562bceba196b66ea Author: Ingo Molnar Date: Mon Mar 23 21:29:59 2009 +0100 perf_counter: add sample user-space to Documentation/perf_counter/ Initial version of kerneltop.c and perfstat.c. Acked-by: Peter Zijlstra Cc: Paul Mackerras Signed-off-by: Ingo Molnar commit 6f9f791eb53b56097cd311a1a5517a8e89bdaf35 Author: Ingo Molnar Date: Mon Mar 23 21:26:52 2009 +0100 perf_counter: create Documentation/perf_counter/ and move perfcounters.txt there We'll have more files in that directory, prepare for that. Acked-by: Peter Zijlstra Cc: Paul Mackerras Signed-off-by: Ingo Molnar commit 9aaa131a279834dff75c290c91f0058f62d72d46 Author: Paul Mackerras Date: Sat Mar 21 15:31:47 2009 +1100 perf_counter: fix type/event_id layout on big-endian systems Impact: build fix for powerpc Commit db3a944aca35ae61 ("perf_counter: revamp syscall input ABI") expanded the hw_event.type field into a union of structs containing bitfields. In particular it introduced a type field and a raw_type field, with the intention that the 1-bit raw_type field should overlay the most-significant bit of the 8-bit type field, and in fact perf_counter_alloc() now assumes that (or at least, assumes that raw_type doesn't overlay any of the bits that are 1 in the values of PERF_TYPE_{HARDWARE,SOFTWARE,TRACEPOINT}). Unfortunately this is not true on big-endian systems such as PowerPC, where bitfields are laid out from left to right, i.e. from most significant bit to least significant. This means that setting hw_event.type = PERF_TYPE_SOFTWARE will set hw_event.raw_type to 1. This fixes it by making the layout depend on whether or not __BIG_ENDIAN_BITFIELD is defined. It's a bit ugly, but that's what we get for using bitfields in a user/kernel ABI. Also, that commit didn't fix up some places in arch/powerpc/kernel/ perf_counter.c where hw_event.raw and hw_event.event_id were used. This fixes them too. Signed-off-by: Paul Mackerras commit db4fb5acf20295063d1d5105e67724eb51440207 Author: Paul Mackerras Date: Thu Mar 19 20:26:20 2009 +0100 perf_counter: powerpc: clean up perc_counter_interrupt Impact: cleanup This updates the powerpc perf_counter_interrupt following on from the "perf_counter: unify irq output code" patch. Since we now use the generic perf_counter_output code, which sets the perf_counter_pending flag directly, we no longer need the need_wakeup variable. This removes need_wakeup and makes perf_counter_interrupt use get_perf_counter_pending() instead. Signed-off-by: Paul Mackerras Signed-off-by: Peter Zijlstra Cc: Steven Rostedt Orig-LKML-Reference: <20090319194234.024464535@chello.nl> Signed-off-by: Ingo Molnar commit 0322cd6ec504b0bf08ca7b2c3d7f43bda37d79c9 Author: Peter Zijlstra Date: Thu Mar 19 20:26:19 2009 +0100 perf_counter: unify irq output code Impact: cleanup Having 3 slightly different copies of the same code around does nobody any good. First step in revamping the output format. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Steven Rostedt Orig-LKML-Reference: <20090319194233.929962222@chello.nl> Signed-off-by: Ingo Molnar commit b8e83514b64577b48bfb794fe85fcde40a9343ca Author: Peter Zijlstra Date: Thu Mar 19 20:26:18 2009 +0100 perf_counter: revamp syscall input ABI Impact: modify ABI The hardware/software classification in hw_event->type became a little strained due to the addition of tracepoint tracing. Instead split up the field and provide a type field to explicitly specify the counter type, while using the event_id field to specify which event to use. Raw counters still work as before, only the raw config now goes into raw_event. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Steven Rostedt Orig-LKML-Reference: <20090319194233.836807573@chello.nl> Signed-off-by: Ingo Molnar commit e077df4f439681e43f0db8255b2d215b342ebdc6 Author: Peter Zijlstra Date: Thu Mar 19 20:26:17 2009 +0100 perf_counter: hook up the tracepoint events Impact: new perfcounters feature Enable usage of tracepoints as perf counter events. tracepoint event ids can be found in /debug/tracing/event/*/*/id and (for now) are represented as -65536+id in the type field. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Steven Rostedt Orig-LKML-Reference: <20090319194233.744044174@chello.nl> Signed-off-by: Ingo Molnar commit f16009527595ee562308653bc3d0039166d2ab15 Author: Peter Zijlstra Date: Thu Mar 19 20:26:16 2009 +0100 perf_counter: fix up counter free paths Impact: fix crash during perfcounters use I found another counter free path, create a free_counter() call to accomodate generic tear-down. Fixes an RCU bug. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Steven Rostedt Orig-LKML-Reference: <20090319194233.652078652@chello.nl> Signed-off-by: Ingo Molnar commit 4a0deca657f3dbb8a707b5dc8f173beec01e7ed2 Author: Peter Zijlstra Date: Thu Mar 19 20:26:12 2009 +0100 perf_counter: generic context switch event Impact: cleanup Use the generic software events for context switches. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Steven Rostedt Orig-LKML-Reference: <20090319194233.283522645@chello.nl> Signed-off-by: Ingo Molnar commit 01ef09d9ffb5ce9f8d62d1e5206da3d5ca612acc Author: Peter Zijlstra Date: Thu Mar 19 20:26:11 2009 +0100 perf_counter: fix uninitialized usage of event_list Impact: fix boot crash When doing the generic context switch event I ran into some early boot hangs, which were caused by inf func recursion (event, fault, event, fault). I eventually tracked it down to event_list not being initialized at the time of the first event. Fix this. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras Cc: Steven Rostedt Orig-LKML-Reference: <20090319194233.195392657@chello.nl> Signed-off-by: Ingo Molnar commit b6c5a71da1477d261bc36254fe1f20d32b57598d Author: Paul Mackerras Date: Mon Mar 16 21:00:00 2009 +1100 perf_counter: abstract wakeup flag setting in core to fix powerpc build Impact: build fix for powerpc Commit bd753921015e7905 ("perf_counter: software counter event infrastructure") introduced a use of TIF_PERF_COUNTERS into the core perfcounter code. This breaks the build on powerpc because we use a flag in a per-cpu area to signal wakeups on powerpc rather than a thread_info flag, because the thread_info flags have to be manipulated with atomic operations and are thus slower than per-cpu flags. This fixes the by changing the core to use an abstracted set_perf_counter_pending() function, which is defined on x86 to set the TIF_PERF_COUNTERS flag and on powerpc to set the per-cpu flag (paca->perf_counter_pending). It changes the previous powerpc definition of set_perf_counter_pending to not take an argument and adds a clear_perf_counter_pending, so as to simplify the definition on x86. On x86, set_perf_counter_pending() is defined as a macro. Defining it as a static inline in arch/x86/include/asm/perf_counters.h causes compile failures because gets included early in , and the definitions of set_tsk_thread_flag etc. are therefore not available in . (On powerpc this problem is avoided by defining set_perf_counter_pending etc. in .) Signed-off-by: Paul Mackerras commit 7bb497bd885eedd0f56dfe3cc1b5ff20710d33b9 Author: Ingo Molnar Date: Wed Mar 18 08:59:21 2009 +0100 perf_counter: fix crash on perfmon v1 systems Impact: fix boot crash on Intel Perfmon Version 1 systems Intel Perfmon v1 does not support the global MSRs, nor does it offer the generalized MSR ranges. So support v2 and later CPUs only. Also mark pmc_ops as read-mostly - to avoid false cacheline sharing. Cc: Paul Mackerras Cc: Peter Zijlstra Signed-off-by: Ingo Molnar commit 4e193bd4dfdc983d12969b51439b4a1fbaf2daad Author: Tim Blechmann Date: Sat Mar 14 14:29:25 2009 +0100 perf_counter: include missing header Impact: build fix In order to compile a kernel with performance counter patches, has to be included to provide the declaration of struct pt_regs *get_irq_regs(void); [ This bug was masked by unrelated x86 header file changes in the x86 tree, but occurs in the tip:perfcounters/core standalone tree. ] Signed-off-by: Tim Blechmann Orig-LKML-Reference: <20090314142925.49c29c17@thinkpad> Signed-off-by: Ingo Molnar commit 039fc91e064b81c2820ff16c304be5aba35fd126 Author: Peter Zijlstra Date: Fri Mar 13 16:43:47 2009 +0100 perf_counter: fix hrtimer sampling Impact: fix deadlock with perfstat Fix for the perfstat fubar.. We cannot unconditionally call hrtimer_cancel() without ever having done hrtimer_init() on the thing. Signed-off-by: Peter Zijlstra Orig-LKML-Reference: <1236959027.22447.149.camel@twins> Signed-off-by: Ingo Molnar commit 592903cdcbf606a838056bae6d03fc557806c914 Author: Peter Zijlstra Date: Fri Mar 13 12:21:36 2009 +0100 perf_counter: add an event_list I noticed that the counter_list only includes top-level counters, thus perf_swcounter_event() will miss sw-counters in groups. Since perf_swcounter_event() also wants an RCU safe list, create a new event_list that includes all counters and uses RCU list ops and use call_rcu to free the counter structure. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit d6d020e9957745c61285ef3da9f294c5e6801f0f Author: Peter Zijlstra Date: Fri Mar 13 12:21:35 2009 +0100 perf_counter: hrtimer based sampling for software time events Use hrtimers to profile timer based sampling for the software time counters. This allows platforms without hardware counter support to still perform sample based profiling. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit ac17dc8e58f3069ea895cfff963adf98ff3cf6b2 Author: Peter Zijlstra Date: Fri Mar 13 12:21:34 2009 +0100 perf_counter: provide major/minor page fault software events Provide separate sw counters for major and minor page faults. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 7dd1fcc258b65da718f01e4684a7b9244501a9fb Author: Peter Zijlstra Date: Fri Mar 13 12:21:33 2009 +0100 perf_counter: provide pagefault software events We use the generic software counter infrastructure to provide page fault events. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 15dbf27cc18559a14e99609f78678aa86b9c6ff1 Author: Peter Zijlstra Date: Fri Mar 13 12:21:32 2009 +0100 perf_counter: software counter event infrastructure Provide generic software counter infrastructure that supports software events. This will be used to allow sample based profiling based on software events such as pagefaults. The current infrastructure can only provide a count of such events, no place information. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 82bae4f8c2fd64a2bb1e2e72c508853ed2b4a299 Author: Peter Zijlstra Date: Fri Mar 13 12:21:31 2009 +0100 perf_counter: x86: use ULL postfix for 64bit constants Fix a build warning on 32bit machines by explicitly marking the constants as 64-bit. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 60b3df9c1e24a18aabb412da9905208c5f04ebea Author: Peter Zijlstra Date: Fri Mar 13 12:21:30 2009 +0100 perf_counter: add comment to barrier We need to ensure the enabled=0 write happens before we start disabling the actual counters, so that a pcm_amd_enable() will not enable one underneath us. I think the race is impossible anyway, we always balance the ops within any one context and perform enable() with IRQs disabled. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 755642322aa66fbc5421a35fd3e1733f73e20083 Author: Peter Zijlstra Date: Fri Mar 13 12:21:29 2009 +0100 perf_counter: use list_move_tail() Instead of del/add use a move list-op. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 595258aaeac4cc6e187b98b1bf29bb176febe763 Author: Peter Zijlstra Date: Fri Mar 13 12:21:28 2009 +0100 perf_counter: x86: fix 32-bit irq_period assumption No need to assume the irq_period is 32bit. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit f541ae326fa120fa5c57433e4d9a133df212ce41 Merge: e255357 0221c81 Author: Ingo Molnar Date: Mon Apr 6 09:02:57 2009 +0200 Merge branch 'linus' into perfcounters/core-v2 Merge reason: we have gathered quite a few conflicts, need to merge upstream Conflicts: arch/powerpc/kernel/Makefile arch/x86/ia32/ia32entry.S arch/x86/include/asm/hardirq.h arch/x86/include/asm/unistd_32.h arch/x86/include/asm/unistd_64.h arch/x86/kernel/cpu/common.c arch/x86/kernel/irq.c arch/x86/kernel/syscall_table_32.S arch/x86/mm/iomap_32.c include/linux/sched.h kernel/Makefile Signed-off-by: Ingo Molnar commit 2b7dbbe0c9491e62b50978d1615193bec33a8291 Author: Daniel Glöckner Date: Sat Mar 28 19:47:02 2009 +0100 ASoC: s6105 IP camera machine specific ASoC code This patch adds machine specific code for the audio part of the Stretch s6105 IP camera reference design. The device uses the tlv320aic31(01) codec to generate the clock for both I2S ports of the soc. While the master clock is generated by a configurable PLL chip, the code assumes the factory default settings. An additional kcontrol has been added to handle the special routing of the board, connecting both HPLCOM and HPROUT to the same pin of the audio jack. One of these should always be switched off. Signed-off-by: Daniel Glöckner Signed-off-by: Mark Brown commit 4b166da939012905f4c36fedada62067db31948e Author: Daniel Glöckner Date: Sat Mar 28 19:47:01 2009 +0100 ASoC: Add driver for s6000 I2S interface This patch adds a driver for the I2S interface found on Stretch s6000 family processors. Signed-off-by: Daniel Glöckner Signed-off-by: Mark Brown commit 31c9a24ec82926fcae49483e53566d231e705057 Author: Paul E. McKenney Date: Thu Apr 2 21:06:25 2009 -0700 RCU: make treercu be default Impact: switch default config from CLASSIC_RCU to TREE_RCU Given that I have not gotten any complaints or bug reports on treercu recently, this patch makes it be the default. There are a number of other defconfig files that explicitly call out CLASSIC_RCU, but which have comment headers saying not to edit them. Probably holdovers from one of the flavors of "make config", but... Signed-off-by: Paul E. McKenney Cc: akpm@linux-foundation.org Cc: dipankar@in.ibm.com Cc: niv@us.ibm.com Cc: manfred@colorfullife.com Cc: peterz@infradead.org LKML-Reference: <20090403040625.GA9473@linux.vnet.ibm.com> Signed-off-by: Ingo Molnar commit b5f22a59c0356655a501190959db9f7f5dd07e3f Author: Serge E. Hallyn Date: Thu Apr 2 18:47:14 2009 -0500 don't raise all privs on setuid-root file with fE set (v2) Distributions face a backward compatibility problem with starting to use file capabilities. For instance, removing setuid root from ping and doing setcap cap_net_raw=pe means that booting with an older kernel or one compiled without file capabilities means ping won't work for non-root users. In order to replace the setuid root bit on a capability-unaware program, one has to set the effective, or legacy, file capability, which makes the capability effective immediately. This patch uses the legacy bit as a queue to not automatically add full privilege to a setuid-root program. So, with this patch, an ordinary setuid-root program will run with privilege. But if /bin/ping has both setuid-root and cap_net_raw in fP and fE, then ping (when run by non-root user) will not run with only cap_net_raw. Changelog: Apr 2 2009: Print a message once when such a binary is loaded, as per James Morris' suggestion. Apr 2 2009: Fix the condition to only catch uid!=0 && euid==0. Signed-off-by: Serge E. Hallyn Acked-by: Casey Schaufler Signed-off-by: James Morris commit 3d43321b7015387cfebbe26436d0e9d299162ea1 Author: Kees Cook Date: Thu Apr 2 15:49:29 2009 -0700 modules: sysctl to block module loading Implement a sysctl file that disables module-loading system-wide since there is no longer a viable way to remove CAP_SYS_MODULE after the system bounding capability set was removed in 2.6.25. Value can only be set to "1", and is tested only if standard capability checks allow CAP_SYS_MODULE. Given existing /dev/mem protections, this should allow administrators a one-way method to block module loading after initial boot-time module loading has finished. Signed-off-by: Kees Cook Acked-by: Serge Hallyn Signed-off-by: James Morris commit 53152f957d4a5dfd537d17c823afeb1a2c03753e Author: Ian Campbell Date: Thu Apr 2 13:24:28 2009 +0100 xen: honour VCPU availability on boot If a VM is booted with offline VCPUs then unplug them during boot. Determining the availability of a VCPU requires access to XenStore which is not available at the point smp_prepare_cpus() is called, therefore we bring up all VCPUS initially and unplug the offline ones as soon as XenStore becomes available. Signed-off-by: Ian Campbell commit 8a6f83afd0c5355db6d11394a798e94950306239 Author: KaiGai Kohei Date: Wed Apr 1 10:07:57 2009 +0900 Permissive domain in userspace object manager This patch enables applications to handle permissive domain correctly. Since the v2.6.26 kernel, SELinux has supported an idea of permissive domain which allows certain processes to work as if permissive mode, even if the global setting is enforcing mode. However, we don't have an application program interface to inform what domains are permissive one, and what domains are not. It means applications focuses on SELinux (XACE/SELinux, SE-PostgreSQL and so on) cannot handle permissive domain correctly. This patch add the sixth field (flags) on the reply of the /selinux/access interface which is used to make an access control decision from userspace. If the first bit of the flags field is positive, it means the required access control decision is on permissive domain, so application should allow any required actions, as the kernel doing. This patch also has a side benefit. The av_decision.flags is set at context_struct_compute_av(). It enables to check required permissions without read_lock(&policy_rwlock). Signed-off-by: KaiGai Kohei Acked-by: Stephen Smalley Acked-by: Eric Paris -- security/selinux/avc.c | 2 +- security/selinux/include/security.h | 4 +++- security/selinux/selinuxfs.c | 4 ++-- security/selinux/ss/services.c | 30 +++++------------------------- 4 files changed, 11 insertions(+), 29 deletions(-) Signed-off-by: James Morris commit 1943689c47acaad7fc7f3dae8d35ef82de5d48f4 Merge: 6d02c42 0a4666b c6a960c 818fd20 f078370 Author: Jeremy Fitzhardinge Date: Mon Mar 30 10:00:45 2009 -0700 Merge branches 'for-linus/xen/dev-evtchn', 'for-linus/xen/xenbus', 'for-linus/xen/xenfs' and 'for-linus/xen/sys-hypervisor' into for-linus/xen/master * for-linus/xen/dev-evtchn: xen/dev-evtchn: clean up locking in evtchn xen: export ioctl headers to userspace xen: add /dev/xen/evtchn driver xen: add irq_from_evtchn * for-linus/xen/xenbus: xen/xenbus: export xenbus_dev_changed xen: use device model for suspending xenbus devices xen: remove suspend_cancel hook * for-linus/xen/xenfs: xen: add "capabilities" file * for-linus/xen/sys-hypervisor: xen: drop kexec bits from /sys/hypervisor since kexec isn't implemented yet xen/sys/hypervisor: change writable_pt to features xen: add /sys/hypervisor support Conflicts: drivers/xen/Makefile commit 818fd20673df82031e604bb784d836f1fc2e2451 Author: Jeremy Fitzhardinge Date: Fri Feb 6 18:46:47 2009 -0800 xen: add "capabilities" file The xenfs capabilities file allows usermode to determine what capabilities the domain has. The only one at present is "control_d" in a privileged domain. Signed-off-by: Jeremy Fitzhardinge commit f0783708bf63a2827863cf2be57c08a24843e6bd Author: Ian Campbell Date: Wed Mar 11 10:19:54 2009 +0000 xen: drop kexec bits from /sys/hypervisor since kexec isn't implemented yet I needed this to compile since there is no kexec yet in pvops kernel CC drivers/xen/sys-hypervisor.o drivers/xen/sys-hypervisor.c: In function 'hyper_sysfs_init': drivers/xen/sys-hypervisor.c:405: error: 'vmcoreinfo_size_xen' undeclared (first use in this function) drivers/xen/sys-hypervisor.c:405: error: (Each undeclared identifier is reported only once drivers/xen/sys-hypervisor.c:405: error: for each function it appears in.) drivers/xen/sys-hypervisor.c:406: error: implicit declaration of function 'xen_sysfs_vmcoreinfo_init' drivers/xen/sys-hypervisor.c: In function 'hyper_sysfs_exit': drivers/xen/sys-hypervisor.c:433: error: 'vmcoreinfo_size_xen' undeclared (first use in this function) drivers/xen/sys-hypervisor.c:434: error: implicit declaration of function 'xen_sysfs_vmcoreinfo_destroy' Signed-off-by: Ian Campbell commit a649b720614d5675dc402bef75a92576143fede7 Author: Jeremy Fitzhardinge Date: Tue Mar 10 17:17:41 2009 -0700 xen/sys/hypervisor: change writable_pt to features /sys/hypervisor/properties/writable_pt was misnamed. Rename to features, expressed as a bit array in hex. Signed-off-by: Jeremy Fitzhardinge commit cff7e81b3dd7c25cd2248cd7a04c5764552d5d55 Author: Jeremy Fitzhardinge Date: Tue Mar 10 14:39:59 2009 -0700 xen: add /sys/hypervisor support Adds support for Xen info under /sys/hypervisor. Taken from Novell 2.6.27 backport tree. Signed-off-by: Jeremy Fitzhardinge commit c6a960ce8858f20036cc3afc3b9422670d0d9021 Author: Jeremy Fitzhardinge Date: Mon Feb 9 12:05:53 2009 -0800 xen/xenbus: export xenbus_dev_changed Signed-off-by: Jeremy Fitzhardinge commit de5b31bd47de7e6f41be2e271318dbc8f1af354d Author: Ian Campbell Date: Mon Feb 9 12:05:50 2009 -0800 xen: use device model for suspending xenbus devices Signed-off-by: Ian Campbell Signed-off-by: Jeremy Fitzhardinge commit a1ce1be578365a4da7e7d7db4812539d2d5da763 Author: Ian Campbell Date: Mon Feb 9 12:05:50 2009 -0800 xen: remove suspend_cancel hook Remove suspend_cancel hook from xenbus_driver, in preparation for using the device model for suspending. Signed-off-by: Ian Campbell Signed-off-by: Jeremy Fitzhardinge commit 0a4666b539a0e896ec4e8396a034a479e3573125 Author: Jeremy Fitzhardinge Date: Thu Feb 12 13:03:24 2009 -0800 xen/dev-evtchn: clean up locking in evtchn Define a new per_user_data mutex to serialize bind/unbind operations to prevent them from racing with each other. Fix error returns and don't do a bind while holding a spinlock. Signed-off-by: Jeremy Fitzhardinge commit c5cfef0f79cacc3aa438fc28f4747f0d10c54d0d Author: Ian Campbell Date: Fri Feb 6 19:21:19 2009 -0800 xen: export ioctl headers to userspace Signed-off-by: Ian Campbell Signed-off-by: Jeremy Fitzhardinge commit f7116284c734f3a47180cd9c907944a1837ccb3c Author: Ian Campbell Date: Fri Feb 6 19:21:19 2009 -0800 xen: add /dev/xen/evtchn driver This driver is used by application which wish to receive notifications from the hypervisor or other guests via Xen's event channel mechanism. In particular it is used by the xenstore daemon in domain 0. Signed-off-by: Ian Campbell Signed-off-by: Jeremy Fitzhardinge commit d4c045364d3107603187f21a56ec231e74d26441 Author: Ian Campbell Date: Fri Feb 6 19:20:31 2009 -0800 xen: add irq_from_evtchn Given an evtchn, return the corresponding irq. Signed-off-by: Ian Campbell Signed-off-by: Jeremy Fitzhardinge commit 6d02c42698f99eccb290ac53d4f10ca883b9f90c Author: Jeremy Fitzhardinge Date: Sun Mar 29 22:57:15 2009 -0700 xen: clean up gate trap/interrupt constants Use GATE_INTERRUPT/TRAP rather than 0xe/f. Signed-off-by: Jeremy Fitzhardinge commit 707ebbc81c61eb480d8a51ca61e355e240df1d32 Author: Jeremy Fitzhardinge Date: Fri Mar 27 11:29:02 2009 -0700 xen: set _PAGE_NX in __supported_pte_mask before pagetable construction Some 64-bit machines don't support the NX flag in ptes. Check for NX before constructing the kernel pagetables. Signed-off-by: Jeremy Fitzhardinge commit 1e6fcf840e11ceff8a656a678c6e4b0560a98e08 Author: Ian Campbell Date: Wed Mar 25 17:46:42 2009 +0000 xen: resume interrupts before system devices. Impact: bugfix Xen domain restore Otherwise the first timer interrupt after resume is missed and we never get another. Signed-off-by: Ian Campbell Signed-off-by: Jeremy Fitzhardinge commit 8de07bbdede03598801cf33ab23dcbcd28a918d2 Author: Jeremy Fitzhardinge Date: Wed Mar 4 17:36:57 2009 -0800 xen/mmu: weaken flush_tlb_other test Impact: fixes crashing bug There's no particular problem with getting an empty cpu mask, so just shortcut-return if we get one. Avoids crash reported by Christophe Saout Signed-off-by: Jeremy Fitzhardinge commit 4185f35404dc96f8525298c7c548aee419f3b3f4 Author: Jeremy Fitzhardinge Date: Tue Mar 17 13:30:55 2009 -0700 xen/mmu: some early pagetable cleanups 1. make sure early-allocated ptes are pinned, so they can be later unpinned 2. don't pin pmd+pud, just make them RO 3. scatter some __inits around Signed-off-by: Jeremy Fitzhardinge commit 5f241e65f2be4661a33e1937e1c829252a80b2b8 Author: Jeremy Fitzhardinge Date: Mon Mar 16 17:08:48 2009 -0700 x86-64: non-paravirt systems always has PSE and PGE A paravirtualized system may not have PSE or PGE available to guests, so they are not required features. However, without paravirt we can assume that any x86-64 implementation will have them available. Signed-off-by: Jeremy Fitzhardinge commit 1e7449730853e7c9ae9a2458b2ced7ba12559a0e Author: Alex Nixon Date: Mon Feb 9 12:05:46 2009 -0800 Xen: Add virt_to_pfn helper function Signed-off-by: Alex Nixon commit 68509cdcde6583ee1a9542899d1270449c7d5903 Author: Jeremy Fitzhardinge Date: Sun Mar 8 03:59:04 2009 -0700 x86-64: remove PGE from must-have feature list PGE may not be available when running paravirtualized, so test the cpuid bit before using it. Signed-off-by: Jeremy Fitzhardinge commit e826fe1ba1563a9272345da8e3279a930ac160a7 Author: Jeremy Fitzhardinge Date: Sat Mar 7 17:09:27 2009 -0800 xen: mask XSAVE from cpuid Xen leaves XSAVE set in cpuid, but doesn't allow cr4.OSXSAVE to be set. This confuses the kernel and it ends up crashing on an xsetbv instruction. At boot time, try to set cr4.OSXSAVE, and mask XSAVE out of cpuid it we can't. This will produce a spurious error from Xen, but allows us to support XSAVE if/when Xen does. This also factors out the cpuid mask decisions to boot time. Signed-off-by: Jeremy Fitzhardinge commit e9e2d1ffcfdb38bed11a3064aa74bea9ee38ed80 Author: Hannes Eder Date: Thu Mar 5 20:13:57 2009 +0100 NULL noise: arch/x86/xen/smp.c Fix this sparse warnings: arch/x86/xen/smp.c:316:52: warning: Using plain integer as NULL pointer arch/x86/xen/smp.c:421:60: warning: Using plain integer as NULL pointer Signed-off-by: Hannes Eder Signed-off-by: Jeremy Fitzhardinge commit b4b7e58590d0e94ed78bd6be1aa163caba7b6c74 Author: Jeremy Fitzhardinge Date: Wed Mar 4 16:34:27 2009 -0800 xen: remove xen_load_gdt debug Don't need the noise. Signed-off-by: Jeremy Fitzhardinge commit 3ce5fa7ebff74b6a4dc5fdcdc22e6979f5a4ff85 Author: Jeremy Fitzhardinge Date: Wed Mar 4 15:26:00 2009 -0800 xen: make xen_load_gdt simpler Remove use of multicall machinery which is unused (gdt loading is never performance critical). This removes the implicit use of percpu variables, which simplifies understanding how the percpu code's use of load_gdt interacts with this code. Signed-off-by: Jeremy Fitzhardinge commit 6ed6bf428aff64fe37cdc54b239d598fee6016f1 Author: Jeremy Fitzhardinge Date: Wed Mar 4 13:02:18 2009 -0800 xen: clean up xen_load_gdt Makes the logic a bit clearer. Signed-off-by: Jeremy Fitzhardinge commit 7571a60446030d2576d881438447e86a0755a83b Author: Jeremy Fitzhardinge Date: Fri Feb 27 15:34:59 2009 -0800 xen: split construction of p2m mfn tables from registration Build the p2m_mfn_list_list early with the rest of the p2m table, but register it later when the real shared_info structure is in place. Signed-off-by: Jeremy Fitzhardinge commit a2bcd4731f77cb77ae4b5e4a3d7f5471cf346c33 Author: Ingo Molnar Date: Sun Mar 29 23:47:48 2009 +0200 x86/mm: further cleanups of fault.c's include file section Impact: cleanup Eliminate more than 20 unnecessary #include lines in fault.c Also fix include file dependency bug in asm/traps.h. (this was masked before, by implicit inclusion) Signed-off-by: Ingo Molnar LKML-Reference: Acked-by: H. Peter Anvin commit 59d7187142bbe9b404a403ed0f874d3227305f26 Author: Jeremy Fitzhardinge Date: Thu Feb 26 15:48:33 2009 -0800 xen: separate p2m allocation from setting When doing very early p2m setting, we need to separate setting from allocation, so split things up accordingly. Signed-off-by: Jeremy Fitzhardinge commit 5caecb9432428241d0c641897f07ff4003f1b55f Author: Jeremy Fitzhardinge Date: Fri Feb 20 23:01:26 2009 -0800 xen: disable preempt for leave_lazy_mmu xen_mc_flush() requires preemption to be disabled for its own sanity, so disable it while we're flushing. Signed-off-by: Jeremy Fitzhardinge commit ab2f75f0b760d2b0c9a875b669a1b51dce02c85a Author: Jeremy Fitzhardinge Date: Wed Feb 18 00:18:50 2009 -0800 x86/paravirt: use percpu_ rather than __get_cpu_var Impact: minor optimisation percpu_read/write is a slightly more direct way of getting to percpu data. Signed-off-by: Jeremy Fitzhardinge commit 252a6bf2a3a7e7add56b17d48aecf3f3ef213103 Author: Jeremy Fitzhardinge Date: Wed Feb 18 00:11:28 2009 -0800 mm: allow preemption in apply_to_pte_range Impact: allow preemption in apply_to_pte_range updates to init_mm Preemption is now allowed for lazy mmu mode, so don't disable it for the inner loop of apply_to_pte_range. This only applies when doing updates to init_mm; user pagetables are still modified under the pte lock, so preemption is disabled anyway. Signed-off-by: Jeremy Fitzhardinge Acked-by: Peter Zijlstra commit 2829b449276aed45f3d649efb21e3418e39dd5d1 Author: Jeremy Fitzhardinge Date: Tue Feb 17 23:53:19 2009 -0800 x86/paravirt: allow preemption with lazy mmu mode Impact: remove obsolete checks, simplification Lift restrictions on preemption with lazy mmu mode, as it is now allowed. Signed-off-by: Jeremy Fitzhardinge Acked-by: Peter Zijlstra commit 224101ed69d3fbb486868e0f6e0f9fa37302efb4 Author: Jeremy Fitzhardinge Date: Wed Feb 18 11:18:57 2009 -0800 x86/paravirt: finish change from lazy cpu to context switch start/end Impact: fix lazy context switch API Pass the previous and next tasks into the context switch start end calls, so that the called functions can properly access the task state (esp in end_context_switch, in which the next task is not yet completely current). Signed-off-by: Jeremy Fitzhardinge Acked-by: Peter Zijlstra commit b407fc57b815b2016186220baabc76cc8264206e Author: Jeremy Fitzhardinge Date: Tue Feb 17 23:46:21 2009 -0800 x86/paravirt: flush pending mmu updates on context switch Impact: allow preemption during lazy mmu updates If we're in lazy mmu mode when context switching, leave lazy mmu mode, but remember the task's state in TIF_LAZY_MMU_UPDATES. When we resume the task, check this flag and re-enter lazy mmu mode if its set. This sets things up for allowing lazy mmu mode while preemptible, though that won't actually be active until the next change. Signed-off-by: Jeremy Fitzhardinge Acked-by: Peter Zijlstra commit 7fd7d83d49914f03aefffba6aee09032fcd54cce Author: Jeremy Fitzhardinge Date: Tue Feb 17 23:24:03 2009 -0800 x86/pvops: replace arch_enter_lazy_cpu_mode with arch_start_context_switch Impact: simplification, prepare for later changes Make lazy cpu mode more specific to context switching, so that it makes sense to do more context-switch specific things in the callbacks. Signed-off-by: Jeremy Fitzhardinge Acked-by: Peter Zijlstra commit b8bcfe997e46150fedcc3f5b26b846400122fdd9 Author: Jeremy Fitzhardinge Date: Tue Feb 17 23:05:19 2009 -0800 x86/paravirt: remove lazy mode in interrupts Impact: simplification, robustness Make paravirt_lazy_mode() always return PARAVIRT_LAZY_NONE when in an interrupt. This prevents interrupt code from accidentally inheriting an outer lazy state, and instead does everything synchronously. Outer batched operations are left deferred. Signed-off-by: Jeremy Fitzhardinge Acked-by: Peter Zijlstra Cc: Thomas Gleixner commit a8a93f3f03b7a8008d720e8d91798efe599d416c Author: Jeremy Fitzhardinge Date: Thu Feb 12 13:45:34 2009 -0800 mm: disable preemption in apply_to_pte_range Impact: bugfix Lazy mmu mode needs preemption disabled, so if we're apply to init_mm (which doesn't require any pte locks), then explicitly disable preemption. (Do it unconditionally after checking we've successfully done the allocation to simplify the error handling.) Signed-off-by: Jeremy Fitzhardinge commit 34886c8bc590f078d4c0b88f50d061326639198d Author: Steven Rostedt Date: Wed Mar 25 21:00:47 2009 -0400 tracing: add average time in function to function profiler Show the average time in the function (Time / Hit) Function Hit Time Avg -------- --- ---- --- mwait_idle 51 140326.6 us 2751.503 us smp_apic_timer_interrupt 47 3517.735 us 74.845 us schedule 10 2738.754 us 273.875 us __schedule 10 2732.857 us 273.285 us hrtimer_interrupt 47 1896.104 us 40.342 us irq_exit 56 1711.833 us 30.568 us __run_hrtimer 47 1315.589 us 27.991 us tick_sched_timer 47 1138.690 us 24.227 us do_softirq 56 1116.829 us 19.943 us __do_softirq 56 1066.932 us 19.052 us do_IRQ 9 926.153 us 102.905 us Signed-off-by: Steven Rostedt commit 318e0a73c9e41b9a17241829bcd0605a39b87cb9 Author: Steven Rostedt Date: Wed Mar 25 20:06:34 2009 -0400 tracing: remove on the fly allocator from function profiler Impact: safer code The on the fly allocator for the function profiler was to save memory. But at the expense of stability. Although it survived several tests, allocating from the function tracer is just too risky, just to save space. This patch removes the allocator and simply allocates enough entries at start up. Each function gets a profiling structure of 40 bytes. With an average of 20K functions, and this is for each CPU, we have 800K per online CPU. This is not too bad, at least for non-embedded. Signed-off-by: Steven Rostedt commit fb9fb015e92123fa3a8e0c2e2fff491d4a56b470 Author: Steven Rostedt Date: Wed Mar 25 13:26:41 2009 -0400 tracing: clean up tracing profiler Ingo Molnar suggested clean ups for the profiling code. This patch makes those updates. Reported-by: Ingo Molnar Signed-off-by: Steven Rostedt commit a2a16d6a3156ef7309ca7328a20c35df9418e670 Author: Steven Rostedt Date: Tue Mar 24 23:17:58 2009 -0400 function-graph: add option to calculate graph time or not graph time is the time that a function is executing another function. Thus if function A calls B, if graph-time is set, then the time for A includes B. This is the default behavior. But if graph-time is off, then the time spent executing B is subtracted from A. Signed-off-by: Steven Rostedt commit cafb168a1c92e4c9e1731fe3d666c39611762c49 Author: Steven Rostedt Date: Tue Mar 24 20:50:39 2009 -0400 tracing: make the function profiler per cpu Impact: speed enhancement By making the function profiler record in per cpu data we not only get better readings, avoid races, we also do not have to take any locks. Signed-off-by: Steven Rostedt commit 0706f1c48ca8a7ab478090b4e38f2e578ae2bfe0 Author: Steven Rostedt Date: Mon Mar 23 23:12:58 2009 -0400 tracing: adding function timings to function profiler If the function graph trace is enabled, the function profiler will use it to take the timing of the functions. cat /debug/tracing/trace_stat/functions Function Hit Time -------- --- ---- mwait_idle 127 183028.4 us schedule 26 151997.7 us __schedule 31 151975.1 us sys_wait4 2 74080.53 us do_wait 2 74077.80 us sys_newlstat 138 39929.16 us do_path_lookup 179 39845.79 us vfs_lstat_fd 138 39761.97 us user_path_at 153 39469.58 us path_walk 179 39435.76 us __link_path_walk 189 39143.73 us [...] Note the times are skewed due to the function graph tracer not taking into account schedules. Signed-off-by: Steven Rostedt commit 493762fc534c71d11d489f872c4b4a2c61173668 Author: Steven Rostedt Date: Mon Mar 23 17:12:36 2009 -0400 tracing: move function profiler data out of function struct Impact: reduce size of memory in function profiler The function profiler originally introduces its counters into the function records itself. There is 20 thousand different functions on a normal system, and that is adding 20 thousand counters for profiling event when not needed. A normal run of the profiler yields only a couple of thousand functions executed, depending on what is being profiled. This means we have around 18 thousand useless counters. This patch rectifies this by moving the data out of the function records used by dynamic ftrace. Data is preallocated to hold the functions when the profiling begins. Checks are made during profiling to see if more recorcds should be allocated, and they are allocated if it is safe to do so. This also removes the dependency from using dynamic ftrace, and also removes the overhead by having it enabled. Signed-off-by: Steven Rostedt commit bac429f037f1a51a74d62bad6d1518c3be065df3 Author: Steven Rostedt Date: Fri Mar 20 12:50:56 2009 -0400 tracing: add function profiler Impact: new profiling feature This patch adds a function profiler. In debugfs/tracing/ two new files are created. function_profile_enabled - to enable or disable profiling trace_stat/functions - the profiled functions. For example: echo 1 > /debugfs/tracing/function_profile_enabled ./hackbench 50 echo 0 > /debugfs/tracing/function_profile_enabled yields: cat /debugfs/tracing/trace_stat/functions Function Hit -------- --- _spin_lock 10106442 _spin_unlock 10097492 kfree 6013704 _spin_unlock_irqrestore 4423941 _spin_lock_irqsave 4406825 __phys_addr 4181686 __slab_free 4038222 dput 4030130 path_put 4023387 unroll_tree_refs 4019532 [...] The most hit functions are listed first. Functions that are not hit are not listed. This feature depends on and uses dynamic function tracing. When the function profiling is disabled, no overhead occurs. But it still takes up around 300KB to hold the data, thus it is not recomended to keep it enabled for systems low on memory. When a '1' is echoed into the function_profile_enabled file, the counters for is function is reset back to zero. Thus you can see what functions are hit most by different programs. Signed-off-by: Steven Rostedt commit 425480081e936d8725f0d44b8829d699bf088c6b Author: Steven Rostedt Date: Tue Mar 24 13:38:36 2009 -0400 tracing: add handler to trace_stat Currently, if a trace_stat user wants a handle to some private data, the trace_stat infrastructure does not supply a way to do that. This patch passes the trace_stat structure to the start function of the trace_stat code. Signed-off-by: Steven Rostedt commit c78a3956b982418186e40978a51636a2b43221bc Author: Markus Metzger Date: Wed Mar 18 19:27:00 2009 +0100 x86, bts: use atomic memory allocation Ds_request_bts() needs to allocate memory. It uses GFP_KERNEL. Hw-branch-tracer calls ds_request_bts() within on_each_cpu(). Use atomic memory allocation to allow it to be used in that context. Signed-off-by: Markus Metzger LKML-Reference: <20090318192700.A6038@sedona.ch.intel.com> Signed-off-by: Ingo Molnar commit 79258a354e0c69be94ae2871809a195bf4a647b1 Author: Ingo Molnar Date: Fri Mar 13 12:02:08 2009 +0100 x86, bts: detect size of DS fields, fix Impact: build fix One usage site was missed in the sizeof_field -> sizeof_ptr_field rename. Cc: Markus Metzger LKML-Reference: <20090313104218.A30096@sedona.ch.intel.com> Signed-off-by: Ingo Molnar commit e9a22d1fb94050b7d600019c32e6b672d539054b Author: Ingo Molnar Date: Fri Mar 13 11:54:40 2009 +0100 x86, bts: cleanups Impact: cleanup, no code changed Cc: Markus Metzger LKML-Reference: <20090313104218.A30096@sedona.ch.intel.com> Signed-off-by: Ingo Molnar commit 321bb5e1ac461c04b6a93f795010d6eb01d8c5ca Author: Markus Metzger Date: Fri Mar 13 10:50:27 2009 +0100 x86, hw-branch-tracer: add selftest Add a selftest for the hw-branch-tracer. Signed-off-by: Markus Metzger LKML-Reference: <20090313105027.A30183@sedona.ch.intel.com> Signed-off-by: Ingo Molnar commit ba9372a8f306c4e53a5f61dcbcd6c1e4a8c2e9ac Author: Markus Metzger Date: Fri Mar 13 10:48:52 2009 +0100 x86, hw-branch-tracer: keep resources on stop Distinguish init/reset and start/stop: init/reset will allocate and release bts tracing resources stop/start will suspend and resume bts tracing Return an error on init() if no cpu can be traced. Signed-off-by: Markus Metzger LKML-Reference: <20090313104852.A30168@sedona.ch.intel.com> Signed-off-by: Ingo Molnar commit b8e47195451c5d3f62620b2b1b5928669afd56eb Author: Markus Metzger Date: Fri Mar 13 10:46:42 2009 +0100 x86, bts: correct comment style in ds.c Correct the comment style in ds.c. Signed-off-by: Markus Metzger LKML-Reference: <20090313104642.A30149@sedona.ch.intel.com> Signed-off-by: Ingo Molnar commit 8a327f6d1b05f5ce16572b4413a5df1d0e872283 Author: Markus Metzger Date: Fri Mar 13 10:45:07 2009 +0100 x86, bts: add selftest for BTS Perform a selftest of branch trace store when a cpu is initialized. WARN and disable branch trace store support if the selftest fails. Signed-off-by: Markus Metzger LKML-Reference: <20090313104507.A30125@sedona.ch.intel.com> Signed-off-by: Ingo Molnar commit bc44fb5f7d3e764ed7698c835a1a0f35aba2eb3d Author: Markus Metzger Date: Fri Mar 13 10:42:18 2009 +0100 x86, bts: detect size of DS fields Impact: more robust DS feature enumeration Detect the size of the pointer-type fields in the DS area configuration via the DTES64 features rather than based on the cpuid. Rename a variable to denote that size to reflect that it only covers the pointer-type fields. Add more boot-time diagnostics giving the detected size and the sizes of BTS and PEBS records. Use the size of the BTS/PEBS record to indicate that the respective feature is not available (if the record size is zero). Signed-off-by: Markus Metzger LKML-Reference: <20090313104218.A30096@sedona.ch.intel.com> Signed-off-by: Ingo Molnar commit e255357764f92afcafafbd4879b222b8c752065a Author: Jaswinder Singh Rajput Date: Sun Mar 8 17:09:49 2009 +0530 x86: perf_counter cleanup Remove unused variables and duplicate header file. Signed-off-by: Jaswinder Singh Rajput Signed-off-by: Ingo Molnar commit 184fe4ab1f2e4dfa45584889bb3820031648386b Author: Peter Zijlstra Date: Sun Mar 8 11:34:19 2009 +0100 x86: perf_counter cleanup Use and actual unsigned long bitmap instead of casting our way around. Signed-off-by: Peter Zijlstra Cc: Jaswinder Singh Rajput LKML-Reference: <1236508459.22914.3645.camel@twins> Signed-off-by: Ingo Molnar commit 880860e392d92c457e8116cdee39ec4d109174ee Author: Paul Mackerras Date: Fri Mar 6 16:30:52 2009 +1100 perfcounters/powerpc: add support for POWER4 processors Impact: more hardware support This adds the back-end for the PMU on the POWER4 and POWER4+ processors (GP and GQ). This is quite similar to the PPC970, with 8 PMCs, but has fewer events than the PPC970. Signed-off-by: Paul Mackerras commit aabbaa6036fd847c583f585c6bae82b5a033e6c7 Author: Paul Mackerras Date: Fri Mar 6 16:27:10 2009 +1100 perfcounters/powerpc: add support for POWER5+ processors Impact: more hardware support This adds the back-end for the PMU on the POWER5+ processors (i.e. GS, including GS DD3 aka POWER5++). This doesn't use the fixed-function PMC5 and PMC6 since they don't respect the freeze conditions and don't generate interrupts, as on POWER6. Signed-off-by: Paul Mackerras commit 86028598de16538f02519141756ccf4accfc29a6 Author: Paul Mackerras Date: Thu Mar 5 14:05:57 2009 +1100 perfcounters/powerpc: fix oops with multiple counters in a group Impact: fix oops-causing bug This fixes a bug in the powerpc hw_perf_counter_init where the code didn't initialize ctrs[n] before passing the ctrs array to check_excludes, leading to possible oopses and other incorrect behaviour. This fixes it by initializing ctrs[n] correctly. Signed-off-by: Paul Mackerras commit b5e8acf66ff5db707c7e08df49fdf6b415878442 Author: Peter Zijlstra Date: Thu Mar 5 20:34:21 2009 +0100 perfcounters: IRQ and NMI support on AMD CPUs, fix The BKGD suggests that counter width on AMD CPUs is 48 for all existing models (it certainly is for mine). Signed-off-by: Ingo Molnar commit b0f3f28e0f14eb335f67bfaae33ce8b8d74fd58b Author: Peter Zijlstra Date: Thu Mar 5 18:08:27 2009 +0100 perfcounters: IRQ and NMI support on AMD CPUs The below completes the K7+ performance counter support: - IRQ support - NMI support KernelTop output works now as well. Signed-off-by: Peter Zijlstra Cc: Jaswinder Singh Rajput Cc: Paul Mackerras LKML-Reference: <1236273633.5187.286.camel@laptop> Signed-off-by: Ingo Molnar commit 2485e5184452ccbda34ff83883883d9107800dff Author: Ingo Molnar Date: Thu Mar 5 12:33:16 2009 +0100 perfcounters: fix reserved bits sizing The sum of bits is 65 currently not 64 - so reduce the # of reserved bits from 55 to 54. Cc: Paul Mackerras Signed-off-by: Ingo Molnar commit 2b578459c3274941156093eba149745e43f93067 Merge: 8163d88 2743a5b Author: Ingo Molnar Date: Wed Mar 4 11:43:53 2009 +0100 Merge branch 'rfc' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/perfcounters into perfcounters/core commit 8163d88c79dca35478a2405c837733ac50ea4c39 Merge: a1ef58f fec6c6f Author: Ingo Molnar Date: Wed Mar 4 11:42:31 2009 +0100 Merge commit 'v2.6.29-rc7' into perfcounters/core Conflicts: arch/x86/mm/iomap_32.c commit 2743a5b0fa6f309da904f2190a9cc25deee34dbd Author: Paul Mackerras Date: Wed Mar 4 20:36:51 2009 +1100 perfcounters: provide expansion room in the ABI Impact: ABI change This expands several fields in the perf_counter_hw_event struct and adds a "flags" argument to the perf_counter_open system call, in order that features can be added in future without ABI changes. In particular the record_type field is expanded to 64 bits, and the space for flag bits has been expanded from 32 to 64 bits. This also adds some new fields: * read_format (64 bits) is intended to provide a way to specify what userspace wants to get back when it does a read() on a simple (non-interrupting) counter; * exclude_idle (1 bit) provides a way for userspace to ask that events that occur when the cpu is idle be excluded; * extra_config_len will provide a way for userspace to supply an arbitrary amount of extra machine-specific PMU configuration data immediately following the perf_counter_hw_event struct, to allow sophisticated users to program things such as instruction matching CAMs and address range registers; * __reserved_3 and __reserved_4 provide space for future expansion. Signed-off-by: Paul Mackerras commit a1ef58f442542d8b3e3b963339fbc522c36e827c Author: Jaswinder Singh Rajput Date: Sat Feb 28 18:45:39 2009 +0530 x86: use pr_info in perf_counter.c Impact: cleanup using pr_info in perf_counter.c fixes various 80 characters warnings and also indenting for conditional statement Signed-off-by: Jaswinder Singh Rajput Signed-off-by: Ingo Molnar commit 169e41eb7f5464c077a7e0e129f025759d04cc54 Author: Jaswinder Singh Rajput Date: Sat Feb 28 18:37:49 2009 +0530 x86: decent declarations in perf_counter.c Impact: cleanup making decent declrations for struct pmc_x86_ops and fix checkpatch error: ERROR: Macros with complex values should be enclosed in parenthesis Signed-off-by: Jaswinder Singh Rajput Signed-off-by: Ingo Molnar commit f87ad35d37fa543925210550f7db20a54c83ed70 Author: Jaswinder Singh Rajput Date: Fri Feb 27 20:15:14 2009 +0530 x86: AMD Support for perf_counter Supported basic performance counter for AMD K7 and later: $ perfstat -e 0,1,2,3,4,5,-1,-2,-3,-4,-5 ls > /dev/null Performance counter stats for 'ls': 12.298610 task clock ticks (msecs) 3298477 CPU cycles (events) 1406354 instructions (events) 749035 cache references (events) 16939 cache misses (events) 100589 branches (events) 11159 branch misses (events) 7.627540 cpu clock ticks (msecs) 12.298610 task clock ticks (msecs) 500 pagefaults (events) 6 context switches (events) 3 CPU migrations (events) Wall-clock time elapsed: 8.672290 msecs Signed-off-by: Jaswinder Singh Rajput Signed-off-by: Ingo Molnar commit b56a3802dc6df29aa27d2c12edf420258091ad66 Author: Jaswinder Singh Rajput Date: Fri Feb 27 18:09:09 2009 +0530 x86: prepare perf_counter to add more cpus Introduced struct pmc_x86_ops to add more cpus. Signed-off-by: Jaswinder Singh Rajput Signed-off-by: Ingo Molnar commit 0c489c47d45ecac21059567c163f92138b2fbaa2 Merge: 8e81817 f3dfd26 Author: Ingo Molnar Date: Thu Feb 26 13:03:29 2009 +0100 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/perfcounters into perfcounters/core commit 8e818179eb9e8f9e44d8410dd2a25077d026a08e Merge: 742bd95 ecc25fb Author: Ingo Molnar Date: Thu Feb 26 13:02:23 2009 +0100 Merge branch 'x86/core' into perfcounters/core Conflicts: arch/x86/kernel/apic/apic.c arch/x86/kernel/irqinit_32.c Signed-off-by: Ingo Molnar commit f3dfd2656deb81a0addee4f4ceff66b50a387388 Author: Paul Mackerras Date: Thu Feb 26 22:43:46 2009 +1100 perfcounters: fix a few minor cleanliness issues This fixes three issues noticed by Arnd Bergmann: - Add #ifdef __KERNEL__ and move some things around in perf_counter.h to make sure only the bits that userspace needs are exported to userspace. - Use __u64, __s64, __u32 types in the structs exported to userspace rather than u64, s64, u32. - Make the sys_perf_counter_open syscall available to the SPUs on Cell platforms. And one issue that I noticed in looking at the code again: - Wrap the perf_counter_open syscall with SYSCALL_DEFINE4 so we get the proper handling of int arguments on ppc64 (and some other 64-bit architectures). Reported-by: Arnd Bergmann Signed-off-by: Paul Mackerras commit 742bd95ba96e19b3f7196c3a0834ebc17c8ba006 Author: Paul Mackerras Date: Tue Feb 24 11:33:56 2009 +1100 perfcounters/powerpc: Add support for POWER5 processors This adds the back-end for the PMU on the POWER5 processor. This knows how to use the fixed-function PMC5 and PMC6 (instructions completed and run cycles). Unlike POWER6, PMC5/6 obey the freeze conditions and can generate interrupts, so their use doesn't impose any extra restrictions. POWER5+ is different and is not supported by this patch. Signed-off-by: Paul Mackerras commit d095cd46dac104e4d2a4967c7c19b55a12f78240 Author: Paul Mackerras Date: Mon Feb 23 23:01:28 2009 +1100 perfcounters/powerpc: Make exclude_kernel bit work on Apple G5 processors Currently, setting hw_event.exclude_kernel does nothing on the PPC970 variants used in Apple G5 machines, because they have the HV (hypervisor) bit in the MSR forced to 1, so as far as the PMU is concerned, the kernel runs in hypervisor mode. Thus we have to use the MMCR0_FCHV (freeze counters in hypervisor mode) bit rather than the MMCR0_FCS (freeze counters in supervisor mode) bit. This checks the MSR.HV bit at startup, and if it is set, we set the freeze_counters_kernel variable to MMCR0_FCHV (it was initialized to MMCR0_FCS). We then use that whenever we need to exclude kernel events. Signed-off-by: Paul Mackerras commit cebb469ba242f7ce476e378c8cd3b0c6c63a4c54 Merge: 0b6de00 9be1b56 Author: Ingo Molnar Date: Tue Feb 17 22:53:12 2009 +0100 Merge branch 'x86/apic' into perfcounters/core commit 0b6de0092244c98b5ba1abda34c92470a20e0d0c Merge: 37a2542 f62bae5 Author: Ingo Molnar Date: Tue Feb 17 17:20:11 2009 +0100 Merge branch 'x86/apic' into perfcounters/core Conflicts: arch/x86/kernel/cpu/perfctr-watchdog.c commit 37a25424252b6cff4dd4b1937ab6a1dbfcadabcc Author: Ingo Molnar Date: Mon Feb 16 15:32:23 2009 +0100 perfcounters: fix acpi_idle_do_entry() workaround Fix merge error in drivers/acpi/processor_idle.c. This resulted in non-working perfcounters on certain Nehalem systems. Signed-off-by: Ingo Molnar commit 73ca2f8380311115723c7afe811f3ed1f0ba945e Author: Ingo Molnar Date: Mon Feb 16 01:08:17 2009 +0100 perfcounters: remove duplicate definition of LOCAL_PERF_VECTOR Signed-off-by: Ingo Molnar commit c07c99b67233ccaad38a961c17405dc1e1542aa4 Author: Paul Mackerras Date: Fri Feb 13 22:10:34 2009 +1100 perfcounters: make context switch and migration software counters work again Jaswinder Singh Rajput reported that commit 23a185ca8abbeef caused the context switch and migration software counters to report zero always. With that commit, the software counters only count events that occur between sched-in and sched-out for a task. This is necessary for the counter enable/disable prctls and ioctls to work. However, the context switch and migration counts are incremented after sched-out for one task and before sched-in for the next. Since the increment doesn't occur while a task is scheduled in (as far as the software counters are concerned) it doesn't count towards any counter. Thus the context switch and migration counters need to count events that occur at any time, provided the counter is enabled, not just those that occur while the task is scheduled in (from the perf_counter subsystem's point of view). The problem though is that the software counter code can't tell the difference between being enabled and being scheduled in, and between being disabled and being scheduled out, since we use the one pair of enable/disable entry points for both. That is, the high-level disable operation simply arranges for the counter to not be scheduled in any more, and the high-level enable operation arranges for it to be scheduled in again. One way to solve this would be to have sched_in/out operations in the hw_perf_counter_ops struct as well as enable/disable. However, this takes a simpler approach: it adds a 'prev_state' field to the perf_counter struct that allows a counter's enable method to know whether the counter was previously disabled or just inactive (scheduled out), and therefore whether the enable method is being called as a result of a high-level enable or a schedule-in operation. This then allows the context switch, migration and page fault counters to reset their hw.prev_count value in their enable functions only if they are called as a result of a high-level enable operation. Although page faults would normally only occur while the counter is scheduled in, this changes the page fault counter code too in case there are ever circumstances where page faults get counted against a task while its counters are not scheduled in. Reported-by: Jaswinder Singh Rajput Signed-off-by: Paul Mackerras Signed-off-by: Ingo Molnar commit b1864e9a1afef41709886072c6e6248def0386f4 Merge: e9c4ffb 7032e86 Author: Ingo Molnar Date: Fri Feb 13 09:49:38 2009 +0100 Merge branch 'x86/core' into perfcounters/core Conflicts: arch/x86/Kconfig arch/x86/kernel/apic.c arch/x86/kernel/setup_percpu.c commit e9c4ffb11f0b19005b5b9dc8481687a3637e5887 Merge: 4bcf349 071a0bc Author: Ingo Molnar Date: Fri Feb 13 09:34:07 2009 +0100 Merge branch 'linus' into perfcounters/core Conflicts: arch/x86/kernel/acpi/boot.c commit 4bcf349a0f90d1e69eb35c6df0fa285c886c1cd6 Author: Paul Mackerras Date: Wed Feb 11 13:53:19 2009 +0100 perfcounters: fix refcounting bug, take 2 Only free child_counter if it has a parent; if it doesn't, then it has a file pointing to it and we'll free it in perf_release. Signed-off-by: Mike Galbraith Signed-off-by: Ingo Molnar commit 5af759176cc767e7426f89764bde4996ebaaf419 Author: Mike Galbraith Date: Wed Feb 11 10:53:37 2009 +0100 perfcounters: fix use after free in perf_release() running... while true; do foo -d 1 -f 1 -c 100000 & sleep 1 kerneltop -d 1 -f 1 -e 1 -c 25000 -p `pidof foo` done while true; do killall foo; killall kerneltop; sleep 2 done ...in two shells with SLUB_DEBUG enabled produces flood of: BUG task_struct: Poison overwritten. Fix the use-after-free bug in perf_release(). Signed-off-by: Mike Galbraith Signed-off-by: Ingo Molnar commit ffc046729381ec039a87dc2c00d2899fcc8785e3 Merge: 95fd484 0475f9e Author: Ingo Molnar Date: Wed Feb 11 09:22:14 2009 +0100 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/perfcounters into perfcounters/core commit 95fd4845ed0ffcab305b4f30ce1c12dc34f1b56c Merge: d278c48 8e49215 Author: Ingo Molnar Date: Wed Feb 11 09:22:04 2009 +0100 Merge commit 'v2.6.29-rc4' into perfcounters/core Conflicts: arch/x86/kernel/setup_percpu.c arch/x86/mm/fault.c drivers/acpi/processor_idle.c kernel/irq/handle.c commit 0475f9ea8e2cc030298908949e0d5da9f2fc2cfe Author: Paul Mackerras Date: Wed Feb 11 14:35:35 2009 +1100 perf_counters: allow users to count user, kernel and/or hypervisor events Impact: new perf_counter feature This extends the perf_counter_hw_event struct with bits that specify that events in user, kernel and/or hypervisor mode should not be counted (i.e. should be excluded), and adds code to program the PMU mode selection bits accordingly on x86 and powerpc. For software counters, we don't currently have the infrastructure to distinguish which mode an event occurs in, so we currently fail the counter initialization if the setting of the hw_event.exclude_* bits would require us to distinguish. Context switches and CPU migrations are currently considered to occur in kernel mode. On x86, this changes the previous policy that only root can count kernel events. Now non-root users can count kernel events or exclude them. Non-root users still can't use NMI events, though. On x86 we don't appear to have any way to control whether hypervisor events are counted or not, so hw_event.exclude_hv is ignored. On powerpc, the selection of whether to count events in user, kernel and/or hypervisor mode is PMU-wide, not per-counter, so this adds a check that the hw_event.exclude_* settings are the same as other events on the PMU. Counters being added to a group have to have the same settings as the other hardware counters in the group. Counters and groups can only be enabled in hw_perf_group_sched_in or power_perf_enable if they have the same settings as any other counters already on the PMU. If we are not running on a hypervisor, the exclude_hv setting is ignored (by forcing it to 0) since we can't ever get any hypervisor events. Signed-off-by: Paul Mackerras commit d278c48435625cb6b7edcf6a547620768b175709 Author: Mike Galbraith Date: Mon Feb 9 07:38:50 2009 +0100 perf_counters: account NMI interrupts I noticed that kerneltop interrupts were accounted as NMI, but not their perf counter origin. Account NMI performance counter interrupts. Signed-off-by: Mike Galbraith Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_counter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23a185ca8abbeef64b6ffc33059b1d630e43ec10 Author: Paul Mackerras Date: Mon Feb 9 22:42:47 2009 +1100 perf_counters: make software counters work as per-cpu counters Impact: kernel crash fix Yanmin Zhang reported that using a PERF_COUNT_TASK_CLOCK software counter as a per-cpu counter would reliably crash the system, because it calls __task_delta_exec with a null pointer. The page fault, context switch and cpu migration counters also won't function correctly as per-cpu counters since they reference the current task. This fixes the problem by redirecting the task_clock counter to the cpu_clock counter when used as a per-cpu counter, and by implementing per-cpu page fault, context switch and cpu migration counters. Along the way, this: - Initializes counter->ctx earlier, in perf_counter_alloc, so that sw_perf_counter_init can use it - Adds code to kernel/sched.c to count task migrations into each cpu, in rq->nr_migrations_in - Exports the per-cpu context switch and task migration counts via new functions added to kernel/sched.c - Makes sure that if sw_perf_counter_init fails, we don't try to initialize the counter as a hardware counter. Since the user has passed a negative, non-raw event type, they clearly don't intend for it to be interpreted as a hardware event. Reported-by: "Zhang Yanmin" Signed-off-by: Paul Mackerras Signed-off-by: Ingo Molnar commit 82aa9a1829199233f9bdaf26e2ee271114f4701e Author: Ingo Molnar Date: Thu Feb 5 15:23:08 2009 +0100 perfcounters: fix "perf counters kills oprofile" bug, v2 Impact: fix kernel crash Both oprofile and perfcounters register an NMI die handler, but only one can handle the NMI. Conveniently, oprofile unregisters it's notifier when not actively in use, so setting it's notifier priority higher than perfcounter's allows oprofile to borrow the NMI for the duration of it's run. Tested/works both as module and built-in. While testing, I found that if kerneltop was generating NMIs at very high frequency, the kernel may panic when oprofile registered it's handler. This turned out to be because oprofile registers it's handler before reset_value has been allocated, so if an NMI comes in while it's still setting up, kabOom. Rather than try more invasive changes, I followed the lead of other places in op_model_ppro.c, and simply returned in that highly unlikely event. (debug warnings attached) Signed-off-by: Mike Galbraith Signed-off-by: Ingo Molnar commit 5b75af0a02fcf3b8899f38ff6f22164c5d8e2fdd Author: Mike Galbraith Date: Wed Feb 4 17:11:34 2009 +0100 perfcounters: fix "perf counters kill oprofile" bug With oprofile as a module, and unloaded by profiling script, both oprofile and kerneltop work fine.. unless you leave kerneltop running when you start profiling, then you may see badness. Signed-off-by: Mike Galbraith Signed-off-by: Ingo Molnar commit 15081c61362618a0c81cc8d04e45e7427bc1ed71 Author: Jaswinder Singh Rajput Date: Sun Feb 1 22:07:39 2009 +0530 x86: irqinit_32.c fix compilation warning Fix: arch/x86/kernel/irqinit_32.c:124: warning: 'smp_intr_init' defined but not used Signed-off-by: Jaswinder Singh Rajput Signed-off-by: Ingo Molnar commit 65d370862f64973611a271ced61864b5f9bb6fc0 Author: Mike Galbraith Date: Thu Jan 29 14:06:52 2009 +0100 perfcounters: fix refcounting bug don't kfree in use counters. Running... while true; do perfstat -e 1 -c true; done ...on all cores for a while doesn't seem to be eating ram, and my oops is gone. Signed-off-by: Mike Galbraith Signed-off-by: Ingo Molnar commit bb3f0b59ad005d2d2ecbbe9bd048eab6d1ecbd31 Author: Yinghai Lu Date: Sun Jan 25 02:38:09 2009 -0800 x86: make irqinit_32.c more like irqinit_64.c, v2 Impact: cleanup 1. add smp_intr_init and apic_intr_init for 32bit, the same as 64bit 2. move the apic_intr_init() call before set gate with interrupt[i] 3. for 64bit, if ia32_emulation is not used, will make per_cpu to use 0x80 vector. [ v2: should use !test_bit() instead of test_bit() with 32bit ] Signed-off-by: Yinghai Lu Signed-off-by: Ingo Molnar commit 3415dd9146c574bffe8f012c096bfc2bc62b9508 Author: Mike Galbraith Date: Fri Jan 23 14:16:53 2009 +0100 perfcounters fix section mismatch warning in perf_counter.c::perf_counters_lapic_init() Fix: WARNING: arch/x86/kernel/built-in.o(.text+0xdd0f): Section mismatch in reference from the function pmc_generic_enable() to the function .cpuinit.text:perf_counters_lapic_init() The function pmc_generic_enable() references the function __cpuinit perf_counters_lapic_init(). This is often because pmc_generic_enable lacks a __cpuinit annotation or the annotation of perf_counters_lapic_init is wrong. Signed-off-by: Mike Galbraith Signed-off-by: Ingo Molnar commit 4b39fd96855254a244f71245b41a91cdecb87d63 Author: Mike Galbraith Date: Fri Jan 23 14:36:16 2009 +0100 perfcounters: ratelimit performance counter interrupts Ratelimit performance counter interrupts to 100KHz per CPU. This replaces the irq-delta-time based method. Signed-off-by: Mike Galbraith Signed-off-by: Ingo Molnar commit 1b023a96d9b44f50f4d8ff28c15f5b80e354760f Author: Mike Galbraith Date: Fri Jan 23 10:13:01 2009 +0100 perfcounters: throttle on too high IRQ rates Starting kerneltop with only -c 100 seems to be a bad idea, it can easily lock the system due to perfcounter IRQ overload. So add throttling: if a new IRQ arrives in a shorter than PERFMON_MIN_PERIOD_NS time, turn off perfcounters and untrottle them from the next timer tick. Signed-off-by: Mike Galbraith Signed-off-by: Ingo Molnar commit 05e3423c8577126800841bc55de8a509f2433dca Merge: bfe2a3c 99d0000 Author: Ingo Molnar Date: Fri Jan 23 11:00:43 2009 +0100 Merge branch 'core/percpu' into perfcounters/core commit bfe2a3c3b5bf479788d5d5c5561346be6b169043 Merge: 7783549 35d266a Author: Ingo Molnar Date: Fri Jan 23 10:20:15 2009 +0100 Merge branch 'core/percpu' into perfcounters/core Conflicts: arch/x86/include/asm/hardirq_32.h arch/x86/include/asm/hardirq_64.h Semantic merge: arch/x86/include/asm/hardirq.h [ added apic_perf_irqs field. ] Signed-off-by: Ingo Molnar commit 77835492ed489c0b870f82f4c50687bd267acc0a Merge: af37501 1de9e8e Author: Ingo Molnar Date: Wed Jan 21 16:37:27 2009 +0100 Merge commit 'v2.6.29-rc2' into perfcounters/core Conflicts: include/linux/syscalls.h commit af37501c792107c2bde1524bdae38d9a247b841a Merge: d859e29 99937d6 Author: Ingo Molnar Date: Sun Jan 18 18:15:49 2009 +0100 Merge branch 'core/percpu' into perfcounters/core Conflicts: arch/x86/include/asm/pda.h We merge tip/core/percpu into tip/perfcounters/core because of a semantic and contextual conflict: the former eliminates the PDA, while the latter extends it with apic_perf_irqs field. Resolve the conflict by moving the new field to the irq_cpustat structure on 64-bit too. Signed-off-by: Ingo Molnar commit d859e29fe34cb833071b20aef860ee94fbad9bb2 Author: Paul Mackerras Date: Sat Jan 17 18:10:22 2009 +1100 perf_counter: Add counter enable/disable ioctls Impact: New perf_counter features This primarily adds a way for perf_counter users to enable and disable counters and groups. Enabling or disabling a counter or group also enables or disables all of the child counters that have been cloned from it to monitor children of the task monitored by the top-level counter. The userspace interface to enable/disable counters is via ioctl on the counter file descriptor. Along the way this extends the code that handles child counters to handle child counter groups properly. A group with multiple counters will be cloned to child tasks if and only if the group leader has the hw_event.inherit bit set - if it is set the whole group is cloned as a group in the child task. In order to be able to enable or disable all child counters of a given top-level counter, we need a way to find them all. Hence I have added a child_list field to struct perf_counter, which is the head of the list of children for a top-level counter, or the link in that list for a child counter. That list is protected by the perf_counter.mutex field. This also adds a mutex to the perf_counter_context struct. Previously the list of counters was protected just by the lock field in the context, which meant that perf_counter_init_task had to take that lock and then take whatever lock/mutex protects the top-level counter's child_list. But the counter enable/disable functions need to take that lock in order to traverse the list, then for each counter take the lock in that counter's context in order to change the counter's state safely, which will lead to a deadlock. To solve this, we now have both a mutex and a spinlock in the context, and taking either is sufficient to ensure the list of counters can't change - you have to take both before changing the list. Now perf_counter_init_task takes the mutex instead of the lock (which incidentally means that inherit_counter can use GFP_KERNEL instead of GFP_ATOMIC) and thus avoids the possible deadlock. Similarly the new enable/disable functions can take the mutex while traversing the list of child counters without incurring a possible deadlock when the counter manipulation code locks the context for a child counter. We also had an misfeature that the first counter added to a context would possibly not go on until the next sched-in, because we were using ctx->nr_active to detect if the context was running on a CPU. But nr_active is the number of active counters, and if that was zero (because the context didn't have any counters yet) it would look like the context wasn't running on a cpu and so the retry code in __perf_install_in_context wouldn't retry. So this adds an 'is_active' field that is set when the context is on a CPU, even if it has no counters. The is_active field is only used for task contexts, not for per-cpu contexts. If we enable a subsidiary counter in a group that is active on a CPU, and the arch code can't enable the counter, then we have to pull the whole group off the CPU. We do this with group_sched_out, which gets moved up in the file so it comes before all its callers. This also adds similar logic to __perf_install_in_context so that the "all on, or none" invariant of groups is preserved when adding a new counter to a group. Signed-off-by: Paul Mackerras commit 3b6f9e5cb21964b7ce12bf81076f830885563ec8 Author: Paul Mackerras Date: Wed Jan 14 21:00:30 2009 +1100 perf_counter: Add support for pinned and exclusive counter groups Impact: New perf_counter features A pinned counter group is one that the user wants to have on the CPU whenever possible, i.e. whenever the associated task is running, for a per-task group, or always for a per-cpu group. If the system cannot satisfy that, it puts the group into an error state where it is not scheduled any more and reads from it return EOF (i.e. 0 bytes read). The group can be released from error state and made readable again using prctl(PR_TASK_PERF_COUNTERS_ENABLE). When we have finer-grained enable/disable controls on counters we'll be able to reset the error state on individual groups. An exclusive group is one that the user wants to be the only group using the CPU performance monitor hardware whenever it is on. The counter group scheduler will not schedule an exclusive group if there are already other groups on the CPU and will not schedule other groups onto the CPU if there is an exclusive group scheduled (that statement does not apply to groups containing only software counters, which can always go on and which do not prevent an exclusive group from going on). With an exclusive group, we will be able to let users program PMU registers at a low level without the concern that those settings will perturb other measurements. Along the way this reorganizes things a little: - is_software_counter() is moved to perf_counter.h. - cpuctx->active_oncpu now records the number of hardware counters on the CPU, i.e. it now excludes software counters. Nothing was reading cpuctx->active_oncpu before, so this change is harmless. - A new cpuctx->exclusive field records whether we currently have an exclusive group on the CPU. - counter_sched_out moves higher up in perf_counter.c and gets called from __perf_counter_remove_from_context and __perf_counter_exit_task, where we used to have essentially the same code. - __perf_counter_sched_in now goes through the counter list twice, doing the pinned counters in the first loop and the non-pinned counters in the second loop, in order to give the pinned counters the best chance to be scheduled in. Note that only a group leader can be exclusive or pinned, and that attribute applies to the whole group. This avoids some awkwardness in some corner cases (e.g. where a group leader is closed and the other group members get added to the context list). If we want to relax that restriction later, we can, and it is easier to relax a restriction than to apply a new one. This doesn't yet handle the case where a pinned counter is inherited and goes into error state in the child - the error state is not propagated up to the parent when the child exits, and arguably it should. Signed-off-by: Paul Mackerras commit 01d0287f068de2934109ba9b989d8807526cccc2 Author: Paul Mackerras Date: Wed Jan 14 13:44:19 2009 +1100 powerpc/perf_counter: Make sure PMU gets enabled properly This makes sure that we call the platform-specific ppc_md.enable_pmcs function on each CPU before we try to use the PMU on that CPU. If the CPU goes off-line and then on-line, we need to do the enable_pmcs call again, so we use the hw_perf_counter_setup hook to ensure that. It gets called as each CPU comes online, but it isn't called on the CPU that is coming up, so this adds the CPU number as an argument to it (there were no non-empty instances of hw_perf_counter_setup before). This also arranges to set the pmcregs_in_use field of the lppaca (data structure shared with the hypervisor) on each CPU when we are using the PMU and clear it when we are not. This allows the hypervisor to optimize partition switches by not saving/restoring the PMU registers when we aren't using the PMU. Signed-off-by: Paul Mackerras commit dd0e6ba22ea21bcc2c420b385a170593c58f4c08 Author: Paul Mackerras Date: Mon Jan 12 15:11:00 2009 +1100 perf_counter: Always schedule all software counters in Software counters aren't subject to the limitations imposed by the fixed number of hardware counter registers, so there is no reason not to enable them all in __perf_counter_sched_in. Previously we used to break out of the loop when we got to a group that wouldn't fit on the PMU; with this we continue through the list but only schedule in software counters (or groups containing only software counters) from there on. Signed-off-by: Paul Mackerras commit c0d362a832ee70435fc4555a64f820893b1da0bd Merge: 506c10f f786283 Author: Ingo Molnar Date: Sun Jan 11 02:44:08 2009 +0100 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/perfcounters into perfcounters/core commit 506c10f26c481b7f8ef27c1c79290f68989b2e9e Merge: e1df957 c597650 Author: Ingo Molnar Date: Sun Jan 11 02:42:53 2009 +0100 Merge commit 'v2.6.29-rc1' into perfcounters/core Conflicts: include/linux/kernel_stat.h commit f78628374a13bc150db77c6e02d4f2c0a7f932ef Author: Paul Mackerras Date: Fri Jan 9 21:05:35 2009 +1100 powerpc/perf_counter: Add support for POWER6 This adds the back-end for the PMU on the POWER6 processor. Fortunately, the event selection hardware is somewhat simpler on POWER6 than on other POWER family processors, so the constraints fit into only 32 bits. Signed-off-by: Paul Mackerras commit 16b067993dee3dfde61b20027e0b168dc06201ee Author: Paul Mackerras Date: Sat Jan 10 16:34:07 2009 +1100 powerpc/perf_counter: Add support for PPC970 family This adds the back-end for the PMU on the PPC970 family. The PPC970 allows events from the ISU to be selected in two different ways. Rather than use alternative event codes to express this, we instead use a single encoding for ISU events and express the resulting constraint (that you can't select events from all three of FPU/IFU/VPU, ISU and IDU/STS at the same time, since they all come in through only 2 multiplexers) using a NAND constraint field, and work out which multiplexer is used for ISU events at compute_mmcr time. Signed-off-by: Paul Mackerras commit 4574910e5087085a1f330ff8373cee4503f5c77c Author: Paul Mackerras Date: Fri Jan 9 20:21:55 2009 +1100 powerpc/perf_counter: Add generic support for POWER-family PMU hardware This provides the architecture-specific functions needed to access PMU hardware on the 64-bit PowerPC processors. It has been designed for the IBM POWER family (POWER 4/4+/5/5+/6 and PPC970) but will hopefully also suit other 64-bit PowerPC machines (although probably not Cell given how different it is in this area). This doesn't include back-ends for any specific processors. This implements a system which allows back-ends to express the constraints that their hardware has on what events can be counted simultaneously. The constraints are expressed as a 64-bit mask + 64-bit value for each event, and the encoding is capable of expressing the constraints arising from having a set of multiplexers feeding an event bus, with some events being available through multiple multiplexer settings, such as we get on POWER4 and PPC970. Furthermore, the back-end can supply alternative event codes for each event, and the constraint checking code will try all possible combinations of alternative event codes to try to find a combination that will fit. Signed-off-by: Paul Mackerras commit 93a6d3ce6962044fe9badf528fed46b455d58292 Author: Paul Mackerras Date: Fri Jan 9 16:52:19 2009 +1100 powerpc: Provide a way to defer perf counter work until interrupts are enabled Because 64-bit powerpc uses lazy (soft) interrupt disabling, it is possible for a performance monitor exception to come in when the kernel thinks interrupts are disabled (i.e. when they are soft-disabled but hard-enabled). In such a situation the performance monitor exception handler might have some processing to do (such as process wakeups) which can't be done in what is effectively an NMI handler. This provides a way to defer that work until interrupts get enabled, either in raw_local_irq_restore() or by returning from an interrupt handler to code that had interrupts enabled. We have a per-processor flag that indicates that there is work pending to do when interrupts subsequently get re-enabled. This flag is checked in the interrupt return path and in raw_local_irq_restore(), and if it is set, perf_counter_do_pending() is called to do the pending work. Signed-off-by: Paul Mackerras commit d662ed26734473d4cb5f3d78cebfec8f9126e97c Author: Paul Mackerras Date: Fri Jan 9 17:01:53 2009 +1100 powerpc/perf_counter: Add perf_counter system call on powerpc ... with an empty/dummy asm/perf_counter.h so it builds. Signed-off-by: Paul Mackerras commit 4eb96fcfe07b7f2a05577e57533840f8e26bea53 Author: Paul Mackerras Date: Fri Jan 9 17:24:34 2009 +1100 perf_counter: Add dummy perf_counter_print_debug function Impact: minimize requirements on architectures Currently, an architecture just enabling CONFIG_PERF_COUNTERS but not providing any extra functions will fail to build with perf_counter_print_debug being undefined, since we don't provide an empty dummy definition like we do with the hw_perf_* functions. This provides an empty dummy perf_counter_print_debug() to make it easier for architectures to turn on CONFIG_PERF_COUNTERS. Signed-off-by: Paul Mackerras commit 3cbed429a9ccdb7a243f733b1056fe5c39e9004c Author: Paul Mackerras Date: Fri Jan 9 16:43:42 2009 +1100 perf_counter: Add optional hw_perf_group_sched_in arch function Impact: extend perf_counter infrastructure This adds an optional hw_perf_group_sched_in() arch function that enables a whole group of counters in one go. It returns 1 if it added the group successfully, 0 if it did nothing (and therefore the core needs to add the counters individually), or a negative number if an error occurred. It should add all the counters and enable any software counters in the group, or else add none of them and return an error. There are a couple of related changes/improvements in the group handling here: * As an optimization, group_sched_out() and group_sched_in() now check the state of the group leader, and do nothing if the leader is not active or disabled. * We now call hw_perf_save_disable/hw_perf_restore around the complete set of counter enable/disable calls in __perf_counter_sched_in/out, to give the arch code the opportunity to defer updating the hardware state until the hw_perf_restore call if it wants. * We no longer stop adding groups after we get to a group that has more than one counter. We will ultimately add an option for a group to be exclusive. The current code doesn't really implement exclusive groups anyway, since a group could end up going on with other counters that get added before it. Signed-off-by: Paul Mackerras commit 9abf8a08bc8f18a3b125f834f00e2e71b49c15d2 Author: Paul Mackerras Date: Fri Jan 9 16:26:43 2009 +1100 perf_counter: Fix the cpu_clock software counter Impact: bug fix Currently if you do (e.g.) timec -e -1 ls, it will report 0 for the value of the cpu_clock counter. The reason is that the core assumes that a counter's count field is up-to-date when the counter is inactive, and doesn't call the counter's read function. However, the cpu_clock counter code only updates the count in the read function. This fixes it by making both the read and disable functions update the count. It also makes the counter ignore time passing while the counter is disabled, by making the enable function update the hw.prev_count field. Signed-off-by: Paul Mackerras commit ff6f05416ece2caec1a7a1f8180d6598e0ab9272 Author: Paul Mackerras Date: Fri Jan 9 16:19:25 2009 +1100 perf_counter: Fix return value from dummy hw_perf_counter_init Impact: fix oops-causing bug Currently, if you try to use perf_counters on an architecture that has no hardware support, and you select an event that doesn't map to any of the defined software counters, you get an oops rather than an error. This is because the dummy hw_perf_counter_init returns ERR_PTR(-EINVAL) but the caller (perf_counter_alloc) only tests for NULL. This makes the dummy hw_perf_counter_init return NULL instead. Signed-off-by: Paul Mackerras commit e1df957670aef74ffd9a4ad93e6d2c90bf6b4845 Merge: 2b583d8 3c92ec8 Author: Ingo Molnar Date: Mon Dec 29 09:45:15 2008 +0100 Merge branch 'linus' into perfcounters/core Conflicts: fs/exec.c include/linux/init_task.h Simple context conflicts. commit 2b583d8bc8d7105b58d7481a4a0ceb718dac49c6 Author: Jaswinder Singh Rajput Date: Sat Dec 27 19:15:43 2008 +0530 x86: perf_counter remove unwanted hw_perf_enable_all Impact: clean, reduce kernel size a bit, avoid sparse warnings Fixes sparse warnings: arch/x86/kernel/cpu/perf_counter.c:153:6: warning: symbol 'hw_perf_enable_all' was not declared. Should it be static? arch/x86/kernel/cpu/perf_counter.c:279:3: warning: returning void-valued expression arch/x86/kernel/cpu/perf_counter.c:206:3: warning: returning void-valued expression arch/x86/kernel/cpu/perf_counter.c:206:3: warning: returning void-valued expression Signed-off-by: Jaswinder Singh Rajput Signed-off-by: Ingo Molnar commit 01ea1ccaa24dea3552e103be13b7897211607a8b Author: Yinghai Lu Date: Fri Dec 26 21:05:06 2008 -0800 perf_counter: more barrier in blank weak function Impact: fix panic possible panic Some versions of GCC inline the weak global function if it's empty. Add a barrier() to work it around. Signed-off-by: Yinghai Lu Signed-off-by: Ingo Molnar commit e44aef58ecfbe061eb4c53b939bcc35fb1bee82d Author: Ingo Molnar Date: Thu Dec 25 09:02:11 2008 +0100 perfcounters: include asm/perf_counter.h only if CONFIG_PERF_COUNTERS=y Impact: build fix on ia64 KOSAKI Motohiro reported that -tip doesnt build on ia64 because asm/perf_counter.h only exists on x86 for now. Fix it. Reported-by: KOSAKI Motohiro Tested-by: KOSAKI Motohiro Acked-by: KOSAKI Motohiro Signed-off-by: Ingo Molnar commit 2f18d1e8d07ae67dd0afce875287756d4bd31a46 Author: Ingo Molnar Date: Mon Dec 22 11:10:42 2008 +0100 x86, perfcounters: add support for fixed-function pmcs Impact: extend performance counter support on x86 Intel CPUs Modern Intel CPUs have 3 "fixed-function" performance counters, which count these hardware events: Instr_Retired.Any CPU_CLK_Unhalted.Core CPU_CLK_Unhalted.Ref Add support for them to the performance counters subsystem. Their use is transparent to user-space: the counter scheduler is extended to automatically recognize the cases where a fixed-function PMC can be utilized instead of a generic PMC. In such cases the generic PMC is kept available for more counters. The above fixed-function events map to these generic counter hw events: PERF_COUNT_INSTRUCTIONS PERF_COUNT_CPU_CYCLES PERF_COUNT_BUS_CYCLES (The 'bus' cycles are in reality often CPU-ish cycles, just with a fixed frequency.) Signed-off-by: Ingo Molnar commit f650a672359819454c3d8d4135ecd1558cde0b24 Author: Ingo Molnar Date: Tue Dec 23 12:17:29 2008 +0100 perfcounters: add PERF_COUNT_BUS_CYCLES Generalize "bus cycles" hw events - and map them to CPU_CLK_Unhalted.Ref on x86. (which is a good enough approximation) Signed-off-by: Ingo Molnar commit 235c7fc7c500e4fd1700c4ad01b5612bcdc1b449 Author: Ingo Molnar Date: Sun Dec 21 14:43:25 2008 +0100 perfcounters: generalize the counter scheduler Impact: clean up and refactor code refactor the counter scheduler: separate out in/out functions and introduce a counter-rotation function as well. Signed-off-by: Ingo Molnar commit 8fe91e61cdc407c7556d3cd71cf20141a25bbcea Author: Ingo Molnar Date: Tue Dec 23 12:29:25 2008 +0100 perfcounters: remove ->nr_inherited Impact: remove dead code nr_inherited was not maintained correctly (not decremented) - and also not used - remove it. Signed-off-by: Ingo Molnar commit 0dff86aa7b9ec65a6d07167b7afb050b5fc98ddc Author: Ingo Molnar Date: Tue Dec 23 12:28:12 2008 +0100 x86, perfcounters: print out the ->used bitmask Impact: extend debug printouts Signed-off-by: Ingo Molnar commit 95cdd2e7851cce79ab839cb0b3cbe68d7911d0f1 Author: Ingo Molnar Date: Sun Dec 21 13:50:42 2008 +0100 perfcounters: enable lowlevel pmc code to schedule counters Allow lowlevel ->enable() op to return an error if a counter can not be added. This can be used to handle counter constraints. Signed-off-by: Ingo Molnar commit 78b6084c907cea15bb40a564b974e072f5163781 Author: Ingo Molnar Date: Sun Dec 21 15:07:49 2008 +0100 perfcounters: fix init context lock Signed-off-by: Ingo Molnar commit eef6cbf5844c620d9db9be99e4908cdf92492fb9 Author: Ingo Molnar Date: Fri Dec 19 10:20:42 2008 +0100 perfcounters: pull inherited counters Change counter inheritance from a 'push' to a 'pull' model: instead of child tasks pushing their final counts to the parent, reuse the wait4 infrastructure to pull counters as child tasks are exit-processed, much like how cutime/cstime is collected. Signed-off-by: Ingo Molnar commit aa9c4c0f967fdb482ea95e8473ec3d201e6e0781 Author: Ingo Molnar Date: Wed Dec 17 14:10:57 2008 +0100 perfcounters: fix task clock counter Impact: fix per task clock counter precision Signed-off-by: Ingo Molnar commit 7671581f1666ef4b54a1c1e598c51ac44c060a9b Author: Ingo Molnar Date: Wed Dec 17 14:20:28 2008 +0100 perfcounters: hw ops rename Impact: rename field names Shorten them. Signed-off-by: Ingo Molnar commit 862a1a5f346fe7e9181ea51eaae48cf2cd70f746 Author: Ingo Molnar Date: Wed Dec 17 13:09:20 2008 +0100 x86, perfcounters: refactor code for fixed-function PMCs Impact: clean up Signed-off-by: Ingo Molnar commit 703e937c83bbad79075a7846e062e447c2fee6a4 Author: Ingo Molnar Date: Wed Dec 17 10:51:15 2008 +0100 perfcounters: add fixed-mode PMC enumeration Enumerate fixed-mode PMCs based on CPUID, and feed that into the perfcounter code. Does not use fixed-mode PMCs yet. Signed-off-by: Ingo Molnar commit eb2b861810d4ff72454c83996b891df4e0aaff9a Author: Ingo Molnar Date: Wed Dec 17 09:09:13 2008 +0100 x86, perfcounters: prepare for fixed-mode PMCs Impact: refactor the x86 code for fixed-mode PMCs Extend the data structures and rename the existing facilities to allow for a 'generic' versus 'fixed' counter distinction. Signed-off-by: Ingo Molnar commit 5c167b8585c8d91206b395d57011ead7711e322f Author: Ingo Molnar Date: Wed Dec 17 09:02:19 2008 +0100 x86, perfcounters: rename intel_arch_perfmon.h => perf_counter.h Impact: rename include file We'll be providing an asm/perf_counter.h to the generic perfcounter code, so use the already existing x86 file for this purpose and rename it. Signed-off-by: Ingo Molnar commit 7995888fcb0246543ee8027bf2835a250ba8c925 Author: Ingo Molnar Date: Wed Dec 17 08:54:56 2008 +0100 perfcounters: tweak group scheduling Impact: schedule in groups atomically If there are multiple groups in a task, make sure they are scheduled in and out atomically. Signed-off-by: Ingo Molnar commit 8fb9331391af95ca1f4e5c0a0da8120b13cbae01 Author: Ingo Molnar Date: Tue Dec 23 12:04:16 2008 +0100 perfcounters: remove warnings Impact: remove debug checks Signed-off-by: Ingo Molnar commit 94c46572a6d9bb497eda0a14099d9f1360d57d5d Author: Jaswinder Singh Date: Fri Dec 19 22:37:58 2008 +0530 x86: perf_counter.c intel_perfmon_event_map and max_intel_perfmon_events should be static Impact: cleanup, avoid sparse warnings, reduce kernel size a bit Fixes these sparse warnings: arch/x86/kernel/cpu/perf_counter.c:44:11: warning: symbol 'intel_perfmon_event_map' was not declared. Should it be static? arch/x86/kernel/cpu/perf_counter.c:54:11: warning: symbol 'max_intel_perfmon_events' was not declared. Should it be static? Signed-off-by: Jaswinder Singh Signed-off-by: Ingo Molnar commit a86ed50859d65a08beec9474df97b88438a996df Author: Ingo Molnar Date: Wed Dec 17 00:43:10 2008 +0100 perfcounters: use hw_event.disable flag Impact: implement default-off counters Make sure that counters that are created with counter.hw_event.disabled=1, get created in disabled state. They can be enabled via: prctl(PR_TASK_PERF_COUNTERS_ENABLE); Signed-off-by: Ingo Molnar commit f65cb45cba63f249458b669aa67069eabc37b2f5 Author: Ingo Molnar Date: Tue Dec 16 13:40:44 2008 +0100 perfcounters: flush on setuid exec Pavel Machek pointed out that performance counters should be flushed when crossing protection domains on setuid execution. Reported-by: Pavel Machek Acked-by: Pavel Machek Signed-off-by: Ingo Molnar commit 0cc0c027d4e028632933f1be2dc4cd730358183b Author: Ingo Molnar Date: Sun Dec 14 23:20:36 2008 +0100 perfcounters: release CPU context when exiting task counters If counters are exiting via do_exit() not via filp close, then the CPU context needs to be released - otherwise future percpu counter creations might fail. Signed-off-by: Ingo Molnar commit 029af8c753bb5a7432aa1ed38bf61fe2c2f66d17 Merge: 75f224c 5279585 Author: Ingo Molnar Date: Sun Dec 14 21:58:33 2008 +0100 Merge branch 'linus' into perfcounters/core commit 75f224cf7700ed6006574dc3f2efa29860727570 Author: Ingo Molnar Date: Sun Dec 14 21:58:46 2008 +0100 perfcounters: fix lapic initialization Fix non-working NMI sampling in certain bootup scenarios. Signed-off-by: Ingo Molnar commit 088e2852c858159d47f71ee8da38e0fb1b21f806 Author: Ingo Molnar Date: Sun Dec 14 20:21:00 2008 +0100 perfcounters, x86: fix sw counters on non-PMC CPUs Make perf_max_counters default to at least 1 - this allows the sw counters to be used. Signed-off-by: Ingo Molnar commit 2b9ff0db19b5e2c77000b7201525f9c3d6e8328d Author: Ingo Molnar Date: Sun Dec 14 18:36:30 2008 +0100 perfcounters: fix non-intel-perfmon CPUs Do not write MSR_CORE_PERF_GLOBAL_CTRL on CPUs where it does not exist. Signed-off-by: Ingo Molnar commit e06c61a879910869aa5bf3f8f634abfee1a7bebc Author: Ingo Molnar Date: Sun Dec 14 14:44:31 2008 +0100 perfcounters: add nr-of-faults counter Impact: add new feature, new sw counter Add a counter that counts the number of pagefaults a task is experiencing. Signed-off-by: Ingo Molnar commit 6c594c21fcb02c662f11c97be4d7d2b73060a205 Author: Ingo Molnar Date: Sun Dec 14 12:34:15 2008 +0100 perfcounters: add task migrations counter Impact: add new feature, new sw counter Add a counter that counts the number of cross-CPU migrations a task is suffering. Signed-off-by: Ingo Molnar commit 5d6a27d8a096868ae313f71f563b06074a7e34fe Author: Ingo Molnar Date: Sun Dec 14 12:28:33 2008 +0100 perfcounters: add context switch counter Impact: add new feature, new sw counter Add a counter that counts the number of context-switches a task is doing. Signed-off-by: Ingo Molnar commit 8cb391e8786c8072367f0aeb90551903fef074ba Author: Ingo Molnar Date: Sun Dec 14 12:22:31 2008 +0100 perfcounters: fix task clock counter Impact: bugfix Update the task clock counter to the new math. Signed-off-by: Ingo Molnar commit 9b51f66dcb09ac5eb6bc68fc111d5c7a1e0131d6 Author: Ingo Molnar Date: Fri Dec 12 13:49:45 2008 +0100 perfcounters: implement "counter inheritance" Impact: implement new performance feature Counter inheritance can be used to run performance counters in a workload, transparently - and pipe back the counter results to the parent counter. Inheritance for performance counters works the following way: when creating a counter it can be marked with the .inherit=1 flag. Such counters are then 'inherited' by all child tasks (be they fork()-ed or clone()-ed). These counters get inherited through exec() boundaries as well (except through setuid boundaries). The counter values get added back to the parent counter(s) when the child task(s) exit - much like stime/utime statistics are gathered. So inherited counters are ideal to gather summary statistics about an application's behavior via shell commands, without having to modify that application. The timec.c command utilizes counter inheritance: http://redhat.com/~mingo/perfcounters/timec.c Sample output: $ ./timec -e 1 -e 3 -e 5 ls -lR /usr/include/ >/dev/null Performance counter stats for 'ls': 163516953 instructions 2295 cache-misses 2855182 branch-misses Signed-off-by: Ingo Molnar commit ee06094f8279e1312fc0a31591320cc7b6f0ab1e Author: Ingo Molnar Date: Sat Dec 13 09:00:03 2008 +0100 perfcounters: restructure x86 counter math Impact: restructure code Change counter math from absolute values to clear delta logic. We try to extract elapsed deltas from the raw hw counter - and put that into the generic counter. Signed-off-by: Ingo Molnar commit 9b194e831fb2c322ed81a373e49620f34edc2778 Author: Ingo Molnar Date: Sun Dec 14 20:22:35 2008 +0100 x86: implement atomic64_t on 32-bit Impact: new API Implement the atomic64_t APIs on 32-bit as well. Will be used by the performance counters code. Signed-off-by: Ingo Molnar commit 92bf73e90a35d40ebc1446488218f03833b36f86 Merge: 447557a 915b0d0 Author: Ingo Molnar Date: Fri Dec 12 12:00:02 2008 +0100 Merge branch 'x86/irq' into perfcounters/core ( with manual semantic merge of arch/x86/kernel/cpu/perf_counter.c ) commit 447557ac7ce120306b4a31d6003faef39cb1bf14 Author: Ingo Molnar Date: Thu Dec 11 20:40:18 2008 +0100 perf counters: update docs Impact: update docs Signed-off-by: Ingo Molnar commit 6a930700c8b655a9e25e42fc4adc0b225ebbcefc Author: Ingo Molnar Date: Thu Dec 11 15:17:03 2008 +0100 perf counters: clean up state transitions Impact: cleanup Introduce a proper enum for the 3 states of a counter: PERF_COUNTER_STATE_OFF = -1 PERF_COUNTER_STATE_INACTIVE = 0 PERF_COUNTER_STATE_ACTIVE = 1 and rename counter->active to counter->state and propagate the changes everywhere. Signed-off-by: Ingo Molnar commit 1d1c7ddbfab358445a542715551301b7fc363e28 Author: Ingo Molnar Date: Thu Dec 11 14:59:31 2008 +0100 perf counters: add prctl interface to disable/enable counters Add a way for self-monitoring tasks to disable/enable counters summarily, via a prctl: PR_TASK_PERF_COUNTERS_DISABLE 31 PR_TASK_PERF_COUNTERS_ENABLE 32 Signed-off-by: Ingo Molnar commit bae43c9945ebeef15e7952e317efb02393d3bfc7 Author: Ingo Molnar Date: Thu Dec 11 14:03:20 2008 +0100 perf counters: implement PERF_COUNT_TASK_CLOCK Impact: add new perf-counter type The 'task clock' counter counts the amount of time a task is executing, in nanoseconds. It stops ticking when a task is scheduled out either due to it blocking, sleeping or it being preempted. This counter type is a Linux kernel based abstraction, it is available even if the hardware does not support native hardware performance counters. Signed-off-by: Ingo Molnar commit 01b2838c4298c5e0d30b4993c195ac34dd9df61e Author: Ingo Molnar Date: Thu Dec 11 13:45:51 2008 +0100 perf counters: consolidate hw_perf save/restore APIs Impact: cleanup Rename them to better match up the usual IRQ disable/enable APIs: hw_perf_disable_all() => hw_perf_save_disable() hw_perf_restore_ctrl() => hw_perf_restore() Signed-off-by: Ingo Molnar commit 5c92d12411dfe5f0f3d1b1c1e2f756245e6f7249 Author: Ingo Molnar Date: Thu Dec 11 13:21:10 2008 +0100 perf counters: implement PERF_COUNT_CPU_CLOCK Impact: add new perf-counter type The 'CPU clock' counter counts the amount of CPU clock time that is elapsing, in nanoseconds. (regardless of how much of it the task is spending on a CPU executing) This counter type is a Linux kernel based abstraction, it is available even if the hardware does not support native hardware performance counters. Signed-off-by: Ingo Molnar commit 621a01eac89b5e2f81a4cf576568b31f40a02724 Author: Ingo Molnar Date: Thu Dec 11 12:46:46 2008 +0100 perf counters: hw driver API Impact: restructure code, introduce hw_ops driver abstraction Introduce this abstraction to handle counter details: struct hw_perf_counter_ops { void (*hw_perf_counter_enable) (struct perf_counter *counter); void (*hw_perf_counter_disable) (struct perf_counter *counter); void (*hw_perf_counter_read) (struct perf_counter *counter); }; This will be useful to support assymetric hw details, and it will also be useful to implement "software counters". (Counters that count kernel managed sw events such as pagefaults, context-switches, wall-clock time or task-local time.) Signed-off-by: Ingo Molnar commit ccff286d85098ba5438e22aa2ea807fc1e18cf2f Author: Ingo Molnar Date: Thu Dec 11 11:26:29 2008 +0100 perf counters: group counter, fixes Impact: bugfix Check that a group does not span outside the context of a CPU or a task. Also, do not allow deep recursive hierarchies. Signed-off-by: Ingo Molnar commit 04289bb9891882202d7e961c4c04d2376930e9f9 Author: Ingo Molnar Date: Thu Dec 11 08:38:42 2008 +0100 perf counters: add support for group counters Impact: add group counters This patch adds the "counter groups" abstraction. Groups of counters behave much like normal 'single' counters, with a few semantic and behavioral extensions on top of that. A counter group is created by creating a new counter with the open() syscall's group-leader group_fd file descriptor parameter pointing to another, already existing counter. Groups of counters are scheduled in and out in one atomic group, and they are also roundrobin-scheduled atomically. Counters that are member of a group can also record events with an (atomic) extended timestamp that extends to all members of the group, if the record type is set to PERF_RECORD_GROUP. Signed-off-by: Ingo Molnar commit 9f66a3810fe0d4100972db84290f3ae4a4d77025 Author: Ingo Molnar Date: Wed Dec 10 12:33:23 2008 +0100 perf counters: restructure the API Impact: clean up new API Thorough cleanup of the new perf counters API, we now get clean separation of the various concepts: - introduce perf_counter_hw_event to separate out the event source details - move special type flags into separate attributes: PERF_COUNT_NMI, PERF_COUNT_RAW - extend the type to u64 and reserve it fully to the architecture in the raw type case. And make use of all these changes in the core and x86 perfcounters code. Also change the syscall signature to: asmlinkage int sys_perf_counter_open( struct perf_counter_hw_event *hw_event_uptr __user, pid_t pid, int cpu, int group_fd); ( Note that group_fd is unused for now - it's reserved for the counter groups abstraction. ) Signed-off-by: Ingo Molnar commit dfa7c899b401d7dc5d85aca416aee64ac82812f2 Author: Thomas Gleixner Date: Mon Dec 8 19:35:37 2008 +0100 perf counters: expand use of counter->event Impact: change syscall, cleanup Make use of the new perf_counters event type. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar commit eab656ae04b9d3b83265e3db01c0d2c46b748ef7 Author: Thomas Gleixner Date: Mon Dec 8 19:26:59 2008 +0100 perf counters: clean up 'raw' type API Impact: cleanup Introduce a separate hw_event type. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar commit 4ac13294e44664bb7edf4daf52edb71e7c6bbe84 Author: Thomas Gleixner Date: Tue Dec 9 21:43:39 2008 +0100 perf counters: protect them against CSTATE transitions Impact: fix rare lost events problem There are CPUs whose performance counters misbehave on CSTATE transitions, so provide a way to just disable/enable them around deep idle methods. (hw_perf_enable_all() is cheap on x86.) Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar commit 43874d238d5f208854a73c3225ca2a22833eec8b Author: Ingo Molnar Date: Tue Dec 9 12:23:59 2008 +0100 perfcounters: consolidate global-disable codepaths Impact: cleanup Simplify global disable handling. Signed-off-by: Ingo Molnar commit 1e12567678054bc1d4c944ecfad17624b3e49345 Author: Ingo Molnar Date: Tue Dec 9 12:18:18 2008 +0100 perfcounters, x86: clean up debug code Impact: cleanup Get rid of unused debug code. Signed-off-by: Ingo Molnar commit 7e2ae34749edf19e76e594b9c4b2cdde1066afc5 Author: Ingo Molnar Date: Tue Dec 9 11:40:46 2008 +0100 perfcounters, x86: simplify disable/enable of counters Impact: fix spurious missed counter wakeups In the case of NMI events, close a race window that can occur if an NMI hits counter code that temporarily disables+enables a counter, and the NMI leaks into the disabled section. Signed-off-by: Ingo Molnar commit 4c59e4676dc95f6f58a2cff5390b2699fa5b5549 Author: Ingo Molnar Date: Mon Dec 8 19:38:33 2008 +0100 perfcounters: select ANON_INODES The perfcounters subsystem depends on CONFIG_ANON_INODES facilities, so make sure it's selected. Signed-off-by: Ingo Molnar commit 87b9cf4623ad4e5fc009e48c020593dffd5d3793 Author: Ingo Molnar Date: Mon Dec 8 14:20:16 2008 +0100 x86, perfcounters: read out MSR_CORE_PERF_GLOBAL_STATUS with counters disabled Impact: make perfcounter NMI and IRQ sequence more robust Make __smp_perf_counter_interrupt() a bit more conservative: first disable all counters, then read out the status. Most invocations are because there are real events, so there's no performance impact. Code flow gets a bit simpler as well this way. Signed-off-by: Ingo Molnar commit 241771ef016b5c0c83cd7a4372a74321c973c1e6 Author: Ingo Molnar Date: Wed Dec 3 10:39:53 2008 +0100 performance counters: x86 support Implement performance counters for x86 Intel CPUs. It's simplified right now: the PERFMON CPU feature is assumed, which is available in Core2 and later Intel CPUs. The design is flexible to be extended to more CPU types as well. Signed-off-by: Ingo Molnar commit e7bc62b6b3aeaa8849f8383e0cfb7ca6c003adc6 Author: Ingo Molnar Date: Thu Dec 4 20:13:45 2008 +0100 performance counters: documentation Add more documentation about performance counters. Signed-off-by: Ingo Molnar commit 0793a61d4df8daeac6492dbf8d2f3e5713caae5e Author: Thomas Gleixner Date: Thu Dec 4 20:12:29 2008 +0100 performance counters: core code Implement the core kernel bits of Performance Counters subsystem. The Linux Performance Counter subsystem provides an abstraction of performance counter hardware capabilities. It provides per task and per CPU counters, and it provides event capabilities on top of those. Performance counters are accessed via special file descriptors. There's one file descriptor per virtual counter used. The special file descriptor is opened via the perf_counter_open() system call: int perf_counter_open(u32 hw_event_type, u32 hw_event_period, u32 record_type, pid_t pid, int cpu); The syscall returns the new fd. The fd can be used via the normal VFS system calls: read() can be used to read the counter, fcntl() can be used to set the blocking mode, etc. Multiple counters can be kept open at a time, and the counters can be poll()ed. See more details in Documentation/perf-counters.txt. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar commit b5aa97e83bcc31a96374d18f5452d53909a16c90 Merge: 218d11a 4217458 5b3eec0 Author: Ingo Molnar Date: Mon Dec 8 15:46:30 2008 +0100 Merge branches 'x86/signal' and 'x86/irq' into perfcounters/core Merge these pending x86 tree changes into the perfcounters tree to avoid conflicts.