commit 2f99f5c8f05e02f3df1bb4d93b6704e6f5972872 Author: Linus Torvalds Date: Wed Dec 23 15:04:53 2009 -0800 Revert "x86, ucode-amd: Ensure ucode update on suspend/resume after CPU off/online cycle" This reverts commit 9f15226e75583547aaf542c6be4bdac1060dd425. It's just wrong, and broke resume for Rafael even on a non-AMD CPU. As Rafael says: "... it causes microcode_init_cpu() to be called during resume even for CPUs for which there's no microcode to apply. That, in turn, results in executing request_firmware() (on Intel CPUs at least) which doesn't work at this stage of resume (we have device interrupts disabled, I/O devices are still suspended and so on). If I'm not mistaken, the "if (uci->valid)" logic means "if that CPU is known to us" , so before commit 9f15226e755 microcode_resume_cpu() was called for all CPUs already in the system during suspend, which was the right thing to do. The commit changed it so that the CPUs without microcode to apply are now treated as "unknown", which is not quite right. The problem this commit attempted to solve has to be handled differently." Bisected-and -requested-by: Rafael J. Wysocki Signed-off-by: Linus Torvalds commit 17a3be341e55b49e4579634281b86f1eb0bad8e8 Merge: f793067 37e9066 Author: Linus Torvalds Date: Wed Dec 23 13:35:19 2009 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (30 commits) USB: Fix a bug on appledisplay.c regarding signedness USB: option: support hi speed for modem Haier CE100 USB: audio gadget: free alsa devices when unloading USB: audio gadget: fix wTotalLength calculation usb: otg: isp1301_omap: fix compile error USB: musb: workaround Blackfin FIFO anomalies USB: musb: Fix array index out of bounds issue USB: musb: Fix null pointer dereference issue USB: musb: correct DMA address for tx USB: musb: gadget_ep0: avoid SetupEnd interrupt USB: musb: fix for crash in DM646x USB when (CPPI)DMA is enabled USB: musb: do not work if no gadget driver is loaded USB: musb: gadget: set otg tranceiver to idle when registering gadget USB: musb: Populate the VBUS GPIO with the correct GPIO number USB: musb: MAINTAINERS: Fix my tree's address USB: musb: fix compiling warning with min() macro USB: musb: move musb_remove to __exit USB: musb_gadget: fix kernel oops in txstate() USB: ftdi_sio: sort PID/VID entries in new ftdi_sio_ids.h header USB: ftdi_sio: isolate all device IDs to new ftdi_sio_ids.h header ... commit f793067eb91afa37904d33075bd44fd8b2774b8a Merge: f988dac 8042273 Author: Linus Torvalds Date: Wed Dec 23 13:35:03 2009 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: devtmpfs: unlock mutex in case of string allocation error Driver core: export platform_device_register_data as a GPL symbol driver core: Prevent reference to freed memory on error path Driver-core: Fix bogus 0 error return in device_add() Driver core: driver_attribute parameters can often be const* Driver core: bin_attribute parameters can often be const* Driver core: device_attribute parameters can often be const* Doc/stable rules: add new cherry-pick logic vfs: get_sb_single() - do not pass options twice devtmpfs: Convert dirlock to a mutex commit f988dac7fe4eb1ab0c7b1c5dc6d847f6aad5a1cd Merge: 849254e b2cd414 Author: Linus Torvalds Date: Wed Dec 23 13:34:26 2009 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: Staging/vt66*: kconfig, depends on WLAN Staging: batman-adv: introduce missing kfree Staging: batman-adv: Add Kconfig dependancies on PROC_FS and PACKET. Staging: panel: Adjust range for PANEL_KEYPAD in Kconfig Staging: panel: Fix compilation error with custom lcd charset Staging: ramzswap: remove ARM specific d-cache hack Staging: rtl8192x: fix printk formats Staging: wlan-ng: fix Correct size given to memset staging: rtl8192su: add USB VID/PID for HWNUm-300 staging: fix rtl8192su compilation errors with mac80211 staging: fix rtl8192e compilation errors with mac80211 Staging: fix rtl8187se compilation errors with mac80211 Staging: rtl8192su: fix test for negative error in rtl8192_rx_isr() Staging: comedi: jr3_pci: Don't ioremap too much space. Check result. Staging: comedi: removed "depricated" from COMEDI_CB_BLOCK Staging: comedi: usbdux.c: fix locking up of the driver when the comedi ringbuffer runs empty Staging: dst: remove from the tree Staging: sm7xx: add a new framebuffer driver Staging: batman: fix debug Kconfig option commit 849254e9bba985e281526b57c02562c7a49a2fcf Merge: 6f40334 10cf1a0 Author: Linus Torvalds Date: Wed Dec 23 13:33:07 2009 -0800 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2 * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2: ocfs2: Set i_nlink properly during reflink. ocfs2: Add reflinked file's inode to inode hash eariler. ocfs2: refcounttree.c cleanup. ocfs2: Find proper end cpos for a leaf refcount block. commit 37e9066b2f85480d99d3795373f5ef0b00ac1189 Author: pancho horrillo Date: Wed Dec 23 11:09:13 2009 +0100 USB: Fix a bug on appledisplay.c regarding signedness brightness status is reported by the Apple Cinema Displays as an 'unsigned char' (u8) value, but the code used 'char' instead. Note that he driver was developed on the PowerPC architecture, where the two types are synonymous, which is not always the case. Fixed that. Otherwise the driver will interpret brightness levels > 127 as negative, and fail to load. Signed-off-by: pancho horrillo Cc: stable Signed-off-by: Greg Kroah-Hartman commit c983202bd03eb82394ef1dce5906702fcbc7bb80 Author: Donny Kurnia Date: Wed Dec 23 19:03:12 2009 +0700 USB: option: support hi speed for modem Haier CE100 I made this patch for usbserial driver to add the support for EVDO modem Haier CE100. The bugs report for this is here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/490068 This patch based on these post: http://blankblondtank.wordpress.com/2009/09/04/mengoptimalkan-koneksi-modem-haier-ce-100-cdma-di-linux/ http://tantos.web.id/blogs/how-to-internet-connection-using-cdma-evdo-modem-and-karmic-koala-ubuntu-9-10 I hope this patch can help other that have the Haier C100 modem, mostly in my country, Indonesia. Signed-off-by: Donny Kurnia Cc: stable Signed-off-by: Greg Kroah-Hartman commit feef1d952ee1e9ac074640d7029dbbe8501725c2 Author: Cliff Cai Date: Wed Dec 9 22:28:39 2009 -0500 USB: audio gadget: free alsa devices when unloading Signed-off-by: Cliff Cai Signed-off-by: Mike Frysinger Signed-off-by: Greg Kroah-Hartman commit d16f172622a7941c4fca09724ce16df5348af5fb Author: Cliff Cai Date: Wed Dec 9 22:21:12 2009 -0500 USB: audio gadget: fix wTotalLength calculation The wTotalLength should contain the sum of the interface and unit descriptor sizes per the Audio Device Class specification 1.0. Reported-by: Sergey Lapin Signed-off-by: Cliff Cai Signed-off-by: Mike Frysinger Signed-off-by: Greg Kroah-Hartman commit 465f8294eea1ea206e3a008e7bfe0e8fd53991fc Author: Felipe Balbi Date: Tue Dec 15 23:19:52 2009 +0200 usb: otg: isp1301_omap: fix compile error commit 91c8a5a9985d5bf9c55f6f82f183f57b050b2a3a broke compilation of this driver after it introduced otg_init() as a static inline in Reported-by: Tony Lindgren Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 1c4bdc01b8a5cf6c54e5eb8bf9a727e38f0176cc Author: Bryan Wu Date: Mon Dec 21 09:49:52 2009 -0500 USB: musb: workaround Blackfin FIFO anomalies Some of these workarounds are already in place, but labeled as affecting all BF52x parts. Since we have official anomaly numbers now, use those defines. And since writing to the FIFO has a similar hang issue as reading from the FIFO, implement the workaround there too when necessary. Signed-off-by: Bryan Wu Signed-off-by: Cliff Cai Signed-off-by: Mike Frysinger Cc: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 0ea52ff44f7a30781881ca2debf35e47b2676171 Author: Maulik Mankad Date: Tue Dec 22 16:19:53 2009 +0530 USB: musb: Fix array index out of bounds issue This patch fixes the below array index out of bounds issue. Buffer overflow, array index of 'aInfo' may be out of bounds. Array 'aInfo' of size 78 may use index value(s) 6..84 The data stored in 'aInfo' array exceeds the array size of 78. This patch increases the size of this array to hold the string correctly without any memory corruption. This issue was reported by Klockwork tool. Signed-off-by: Maulik Mankad Cc: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 0abdc36f066ae20521b8c8d306725dd59a0d50aa Author: Maulik Mankad Date: Tue Dec 22 16:18:19 2009 +0530 USB: musb: Fix null pointer dereference issue This patch fixes the following NULL pointer dereference issue. Pointer 'request' returned from call to function 'next_request' at line 748 may be NULL and may be dereferenced at line 792. ============ Code Snippet ============ 748: request = next_request(musb_ep); 785: if (dma && (csr & MUSB_RXCSR_DMAENAB)) { csr &= ~(MUSB_RXCSR_AUTOCLEAR | MUSB_RXCSR_DMAENAB | MUSB_RXCSR_DMAMODE); musb_writew(epio, MUSB_RXCSR, MUSB_RXCSR_P_WZC_BITS | csr); 792: request->actual += musb_ep->dma->actual_len; Signed-off-by: Maulik Mankad Cc: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 796a83fa039de50133171221ac102a2310e81ffd Author: Cliff Cai Date: Mon Dec 21 21:18:02 2009 -0500 USB: musb: correct DMA address for tx Since a DMA transfer may need to be kicked off several times to complete, the DMA start must include the length that has already been transferred. Signed-off-by: Cliff Cai Signed-off-by: Mike Frysinger Cc: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 17be5c5f5ef99c94374e07f71effa78e93a20eda Author: Sergei Shtylyov Date: Tue Dec 15 13:30:01 2009 +0200 USB: musb: gadget_ep0: avoid SetupEnd interrupt Gadget stalling a zero-length SETUP request results in this error message: SetupEnd came in a wrong ep0stage idle In order to avoid it, always set the CSR0.DataEnd bit after detecting a zero- length request. Add the missing '\n' to the error message itself as well... Signed-off-by: Sergei Shtylyov Acked-by: Anand Gadiyar Cc: stable Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 93aa3dab008421789aa0f8865a62a52ae13269a3 Author: Swaminathan S Date: Tue Dec 15 13:30:00 2009 +0200 USB: musb: fix for crash in DM646x USB when (CPPI)DMA is enabled Race condition exists between the cppi_interrupt handler and davinci_interrupt handler w.r.t completing a TX IO. Since DM646x has seperate DMA and USB endpoint interrupts cppi_interrupt handler needs to hold the lock while operating on the endpoint. Update over previous patch to avoid taking the lock if already taken. Tested on DM644x, DM355 and DM646x platforms. Signed-off-by: Swaminathan S Acked-by: Sergei Shtylyov Acked-by: Anand Gadiyar Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit cd42fef0a0b061817904fd6feb0de66830794857 Author: Felipe Balbi Date: Tue Dec 15 13:47:30 2009 +0200 USB: musb: do not work if no gadget driver is loaded On OTG and gadget-only configurations, we need a gadget driver in order to work properly, so avoid changing operation modes when there's no gadget driver loaded. Signed-off-by: Felipe Balbi Cc: David Brownell Acked-by: Anand Gadiyar Signed-off-by: Greg Kroah-Hartman commit d4c433fe6f04195a1a0d2146d9f11ad45eecef86 Author: Arnaud Mandy Date: Tue Dec 15 13:29:58 2009 +0200 USB: musb: gadget: set otg tranceiver to idle when registering gadget When registering gadget driver, the state of the transceiver must be set from undefined (no gadget) to b_idle. Module unload sets the transceiver state to undefined state. After the first load/unload pair, the reset irq will be lost. Signed-off-by: Arnaud Mandy Signed-off-by: Felipe Balbi Cc: David Brownell Acked-by: Anand Gadiyar Signed-off-by: Greg Kroah-Hartman commit a2396a32b848a9864f933ced860192c72c769aca Author: Swaminathan S Date: Tue Dec 15 13:29:57 2009 +0200 USB: musb: Populate the VBUS GPIO with the correct GPIO number This fixes a null-pointer dereference bug. Signed-off-by: Swaminathan S Cc: David Brownell Acked-by: Sergei Shtylyov Acked-by: Anand Gadiyar Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 8a700f3d0d34a79c9cb25f2c66552c181f9c5737 Author: Felipe Balbi Date: Tue Dec 15 11:08:45 2009 +0200 USB: musb: MAINTAINERS: Fix my tree's address The tree is now on a new address. Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit f95c4c0186aa94ad41681d8f0ecd79cc45f92bda Author: Cliff Cai Date: Tue Dec 15 11:08:44 2009 +0200 USB: musb: fix compiling warning with min() macro Current musb gadget dma code produces the warning: drivers/usb/musb/musb_gadget.c: In function 'txstate': drivers/usb/musb/musb_gadget.c:312: warning: comparison of distinct pointer types lacks a cast So switch to min_t(size_t, ...). Signed-off-by: Cliff Cai Signed-off-by: Mike Frysinger Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit e3060b175c1bd60586f51482464530dd1b37f3cf Author: Felipe Balbi Date: Tue Dec 15 11:08:41 2009 +0200 USB: musb: move musb_remove to __exit probe() already was on __init, so moving remove() to __exit. Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 95962a773ca5c1e52305fd1003d3bda59abbf371 Author: Sergei Shtylyov Date: Wed Dec 16 20:38:31 2009 +0300 USB: musb_gadget: fix kernel oops in txstate() Commit 7723de7e19b744144975a09c81777ec0f14ac5b3 (USB: musb_gadget: remove pointless loop) included uncalled for (and incorrect) optimization that might cause a kernel oops in txstate() -- undo it. Signed-off-by: Sergei Shtylyov Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 4e092d110fe931db3878865db185be1c9df3e182 Author: Andreas Mohr Date: Thu Dec 17 11:56:09 2009 +0100 USB: ftdi_sio: sort PID/VID entries in new ftdi_sio_ids.h header This is a (almost) sort-only patch to sort FTDI device product ID definitions in new ftdi_sio_ids.h header. Advantage is that new device ID submissions will now have a specific (sorted) position - less future merge conflicts. Compile-tested, based on _current_ mainline git. Minor checkpatch.pl warnings were eliminated whereever it made sense, very minor text changes. Signed-off-by: Andreas Mohr Signed-off-by: Greg Kroah-Hartman commit 31844d55800e1b93fe75c4d6188a4a44db2e1bbe Author: Andreas Mohr Date: Wed Dec 16 21:45:10 2009 +0100 USB: ftdi_sio: isolate all device IDs to new ftdi_sio_ids.h header This is a strictly move-only patch to relocate all FTDI device product ID definitions to their own ftdi_sio_ids.h header (following the usual *_ids.h kernel tree convention, too), thus correcting the slightly too messy appearance (crucial driver defines were stuck somewhere in the decaying middle swamp of the huge existing header). Compile-tested, based on latest mainline git. Signed-off-by: Andreas Mohr Signed-off-by: Greg Kroah-Hartman commit 70445ae6c669865e464307a155e881096e4a0ae7 Author: Randy Dunlap Date: Sun Dec 13 10:17:16 2009 -0800 USB core: fix recent kernel-doc warnings Fix new kernel-doc warnings in usb core: Warning(drivers/usb/core/usb.c:79): No description found for parameter 'config' Warning(drivers/usb/core/usb.c:79): No description found for parameter 'iface_num' Warning(drivers/usb/core/usb.c:79): No description found for parameter 'alt_num' Warning(drivers/usb/core/hcd.c:1622): No description found for parameter 'udev' Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman commit 4b372072b554723b508e53249dd1b594ad93fbc2 Author: pancho horrillo Date: Wed Dec 2 20:19:42 2009 +0100 USB: add device ID for Apple Cinema Display 23in 2007 Hi! $ lsusb -v Bus 001 Device 008: ID 05ac:921c Apple, Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x05ac Apple, Inc. idProduct 0x921c bcdDevice 1.15 iManufacturer 1 iProduct 2 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 34 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 2mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.11 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 92 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 16 Signed-off-by: pancho horrillo Signed-off-by: Greg Kroah-Hartman commit 40b52371be92cf9990de162e4c7b4fd9160150a7 Author: Jan Beulich Date: Fri Nov 20 13:50:53 2009 +0000 USB: fix section mismatch in early ehci dbgp Commit 917778267fbe67703ab7d5c6f0b7a05d4c3df485 removed __init from ehci_wait_for_port(), but left it in place on ehci_reset_port(), which is being called from the former function. Signed-off-by: Jan Beulich Acked-by: Jason Wessel Signed-off-by: Greg Kroah-Hartman commit ac06c06770bb8761b1f1f9bdf2f5420fa6d3e9fa Author: Clemens Ladisch Date: Mon Dec 21 15:36:44 2009 -0800 USB: emi62: fix crash when trying to load EMI 6|2 firmware While converting emi62 to use request_firmware(), the driver was also changed to use the ihex helper functions. However, this broke the loading of the FPGA firmware because the code tries to access the addr field of the EOF record which works with a plain array that has an empty last record but not with the ihex helper functions where the end of the data is signaled with a NULL record pointer, resulting in: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] emi62_load_firmware+0x33c/0x740 [emi62] This can be fixed by changing the loop condition to test the return value of ihex_next_binrec() directly (like in emi26.c). Signed-off-by: Clemens Ladisch Reported-and-tested-by: Der Mickster Acked-by: David Woodhouse Cc: stable Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 27f1281d5f72e4f161e215ccad3d7d86b9e624a9 Author: Blaise Gassend Date: Fri Dec 18 15:23:38 2009 -0800 USB: serial: Extra device/vendor ID for mos7840 driver Signed-off-by: Blaise Gassend Signed-off-by: Greg Kroah-Hartman commit 179192d38e8906f00479ec944c15b685400232b0 Author: Bill Gatliff Date: Fri Dec 18 09:57:22 2009 -0600 USB: Fix double-linking of drivers/usb/otg when ULPI is selected This patch corrects a problem where drivers/usb/otg is linked twice if CONFIG_USB_ULPI is selected, resulting in a build error (symbol conflict). The files in that directory are properly linked already as part of CONFIG_USB, and need not be indicated specifically for CONFIG_USB_ULPI. Signed-off-by: Bill Gatliff Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit ff3b968ceeb73c037cf4759d21923943970f9a7a Author: Julia Lawall Date: Wed Dec 9 14:23:32 2009 +0100 USB: gadget: Use ERR_PTR/IS_ERR Use ERR_PTR and IS_ERR rather than mixing integers and pointers. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression *E; @@ * E < 0 // Signed-off-by: Julia Lawall Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit da307123c621b01cce147a4be313d8a754674f63 Author: Alan Stern Date: Tue Dec 8 15:54:44 2009 -0500 USB: fix bugs in usb_(de)authorize_device This patch (as1315) fixes some bugs in the USB core authorization code: usb_deauthorize_device() should deallocate the device strings instead of leaking them, and it should invoke usb_destroy_configuration() (which does proper reference counting) instead of freeing the config information directly. usb_authorize_device() shouldn't change the device strings until it knows that the authorization will succeed, and it should autosuspend the device at the end (having autoresumed the device at the start). Because the device strings can be changed, the sysfs routines to display the strings must protect the string pointers by locking the device. Signed-off-by: Alan Stern CC: Inaky Perez-Gonzalez Acked-by: David Vrabel Cc: stable Signed-off-by: Greg Kroah-Hartman commit 8d8558d10806b7e805cb80df867ebb0a453d4765 Author: Alan Stern Date: Tue Dec 8 15:50:41 2009 -0500 USB: rename usb_configure_device This patch (as1314) renames usb_configure_device() and usb_configure_device_otg() in the hub driver. Neither name is appropriate because these routines enumerate devices, they don't configure them. That's handled by usb_choose_configuration() and usb_set_configuration(). Signed-off-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman commit baf67741bf52b985e318bed3c4acadcda5351e08 Author: Alan Stern Date: Tue Dec 8 15:49:48 2009 -0500 USB: power management documentation update This patch (as1313) updates the documentation concerning USB power management. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit b2cd41496c70a1653f28c6d07b61cbdd25167679 Author: Randy Dunlap Date: Mon Dec 14 08:44:46 2009 -0800 Staging/vt66*: kconfig, depends on WLAN The vt665[56] drivers can be built when CONFIG_NET=n & CONFIG_NETDEVICES=n or just when CONFIG_WLAN=n. This leads to build failures. Prevent this by making them depend on WLAN. [This patch was lost in a dualing trees merge; still needs to be re-applied.] Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman commit e281cf8966fa723d067343364ba576fb736bfa13 Author: Julia Lawall Date: Sun Dec 13 14:11:39 2009 +0100 Staging: batman-adv: introduce missing kfree Error handling code following a kzalloc should free the allocated data. Similarly for usb-alloc urb. The semantic match that finds the first problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // Signed-off-by: Julia Lawall Cc: Andrew Lunn Signed-off-by: Greg Kroah-Hartman commit ae67491ea085529759ab7475f73e7f3f1e825704 Author: Andrew Lunn Date: Sat Dec 12 23:39:47 2009 +0100 Staging: batman-adv: Add Kconfig dependancies on PROC_FS and PACKET. Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman commit ae08961a99853c5b930845b00e3e609ad13dd61a Author: Peter Huewe Date: Tue Dec 15 06:37:36 2009 +0100 Staging: panel: Adjust range for PANEL_KEYPAD in Kconfig In panel.c there are only the values 0-3 defined. So 4 is invalid: Signed-off-by: Peter Huewe Cc: Willy Tarreau Signed-off-by: Greg Kroah-Hartman commit a6a6c90804f657a91fb080c7a525a8f90bc38867 Author: Peter Huewe Date: Tue Dec 15 06:21:45 2009 +0100 Staging: panel: Fix compilation error with custom lcd charset When compiling panel.c with a DEFAULT_LCD_CHARSET it fails to compile with the following error message: drivers/staging/panel/panel.c: In function >>lcd_init<<: drivers/staging/panel/panel.c:1396: error: expected expression before >>;<< token drivers/staging/panel/panel.c:1475: error: expected expression before >>;<< token make[3]: *** [drivers/staging/panel/panel.o] error 1 make[2]: *** [drivers/staging/panel] error 2 make[1]: *** [drivers/staging] error 2 The config used was: CONFIG_PANEL=m CONFIG_PANEL_PARPORT=0 CONFIG_PANEL_PROFILE=0 CONFIG_PANEL_KEYPAD=0 CONFIG_PANEL_LCD=1 CONFIG_PANEL_LCD_HEIGHT=2 CONFIG_PANEL_LCD_WIDTH=20 CONFIG_PANEL_LCD_BWIDTH=40 CONFIG_PANEL_LCD_HWIDTH=64 CONFIG_PANEL_LCD_CHARSET=0 CONFIG_PANEL_LCD_PROTO=0 CONFIG_PANEL_LCD_PIN_E=14 CONFIG_PANEL_LCD_PIN_RS=17 CONFIG_PANEL_LCD_PIN_RW=16 CONFIG_PANEL_LCD_PIN_BL=0 This patch fixes both errors, as it fixes the define Patch against current linux-next tree at Tue Dec 15 06:07:01 2009 +0100 Signed-off-by: Peter Huewe Acked-by: Willy Tarreau Signed-off-by: Greg Kroah-Hartman commit 30fb8a7141e906116bb536dd54be99480b8fd238 Author: Nitin Gupta Date: Sat Dec 12 11:44:46 2009 +0530 Staging: ramzswap: remove ARM specific d-cache hack Remove d-cache hack in ramzswap driver that was needed to workaround a bug in ARM version of update_mmu_cache() which caused stale data in d-cache to be transferred to userspace. This bug was fixed by git commit: 787b2faadc4356b6c2c71feb42fb944fece9a12f This also brings down one entry in TODO file. Signed-off-by: Nitin Gupta Acked-by: Pekka Enberg Signed-off-by: Greg Kroah-Hartman commit 3d8affc001a37664b2f5cb29aa12cf8f6c582d52 Author: Randy Dunlap Date: Tue Nov 24 12:13:55 2009 -0800 Staging: rtl8192x: fix printk formats Fix printk format warnings in rtl8192[eu]: drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c:979: warning: format '%d' expects type 'int', but argument 2 has type 'size_t' drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c:385: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int' drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c:484: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int' drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c:614: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int' drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c:848: warning: format '%d' expects type 'int', but argument 2 has type 'size_t' drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:343: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int' drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:442: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int' drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:572: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int' Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman commit 4068fe8b2aa3e12643db0ad5dd4bcf6755a7320f Author: Julia Lawall Date: Wed Dec 9 20:25:04 2009 +0100 Staging: wlan-ng: fix Correct size given to memset Memset should be given the size of the structure, not the size of the pointer. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ type T; T *x; expression E; @@ memset(x, E, sizeof( + * x)) // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman commit 488d3749620779ab2668c0dba2962836e51e3cd6 Author: Stephane Glondu Date: Thu Dec 17 15:41:23 2009 +0100 staging: rtl8192su: add USB VID/PID for HWNUm-300 The Hercules Wireless N USB mini (HWNUm-300) uses the RTL8191S chipset and seems to work with this driver. Signed-off-by: Stephane Glondu Signed-off-by: Greg Kroah-Hartman commit 55c7d5fc185e592c317e7cb175f91ee6b9d6c637 Author: George Kadianakis Date: Thu Dec 17 01:19:13 2009 +0200 staging: fix rtl8192su compilation errors with mac80211 This patch series fixes compilation problems that were caused by function naming conflicts between the rtl8192su driver and the mac80211 stack. Signed-off-by: George Kadianakis Signed-off-by: Greg Kroah-Hartman commit fb5fe2776d1e2a0645d8aa3286a1d5ddd95b0723 Author: George Kadianakis Date: Thu Dec 17 01:18:08 2009 +0200 staging: fix rtl8192e compilation errors with mac80211 This patch series fixes compilation problems that were caused by function naming conflicts between the rtl8192e driver and the mac80211 stack. Signed-off-by: George Kadianakis Signed-off-by: Greg Kroah-Hartman commit df574b8ecfb3a84af96229f336a6be88ca4a7055 Author: George Kadianakis Date: Thu Dec 17 01:16:00 2009 +0200 Staging: fix rtl8187se compilation errors with mac80211 This patch fixes compilation problems that were caused by function naming conflicts between the rtl8187se driver and the mac80211 stack. Signed-off-by: George Kadianakis Signed-off-by: Greg Kroah-Hartman commit aad445f8ccd554cd3013af7bd0a6cfae599a2505 Author: Roel Kluin Date: Fri Nov 20 20:12:33 2009 +0100 Staging: rtl8192su: fix test for negative error in rtl8192_rx_isr() The error tested for is negative Signed-off-by: Roel Kluin Signed-off-by: Greg Kroah-Hartman commit fa5c5f4ce0c9ba03a670c640cad17e14cb35678b Author: Ian Abbott Date: Mon Nov 30 10:59:27 2009 +0000 Staging: comedi: jr3_pci: Don't ioremap too much space. Check result. For the JR3/PCI cards, the size of the PCIBAR0 region depends on the number of channels. Don't try and ioremap space for 4 channels if the card has fewer channels. Also check for ioremap failure. Thanks to Anders Blomdell for input and Sami Hussein for testing. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit d103bef45180892515345e761f42db5601de9846 Author: Bernd Porr Date: Fri Nov 27 12:07:48 2009 +0000 Staging: comedi: removed "depricated" from COMEDI_CB_BLOCK The flag COMEDI_CB_BLOCK was marked as "depricated in the header file". However, this flag is important to wake up the data-reader (and writer) after new data has arrived from(for) the DAQ card. Signed-off-by: Bernd Porr Signed-off-by: Greg Kroah-Hartman commit d4c3a56587af3edbe5f618b20e800e9f9fde13cb Author: Bernd Porr Date: Fri Nov 27 12:00:53 2009 +0000 Staging: comedi: usbdux.c: fix locking up of the driver when the comedi ringbuffer runs empty Jan-Matthias Braun spotted a bug which locks up the driver when the comedi ring buffer runs empty and provided a patch. The driver would still send the data to comedi but the reader won't wake up any more. What's required is setting the flag COMEDI_CB_BLOCK after new data has arrived which wakes up the reader and therefore the read() command. Signed-off-by: Bernd Porr Signed-off-by: Greg Kroah-Hartman commit 29d249ed80c80b479df78e456e6809223c648505 Author: Greg Kroah-Hartman Date: Fri Dec 18 09:59:48 2009 -0800 Staging: dst: remove from the tree DST is dead, no one is using it and upstream has abandoned it, so remove it from the tree because it is not going anywhere. Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman commit d7edf47947f9d921be6ca5fc8e83049124466f98 Author: Wu Zhangjin Date: Mon Nov 23 10:28:24 2009 +0800 Staging: sm7xx: add a new framebuffer driver Yeeloong netbook has a sm712 video card, need this driver, but it is not ready to upstream yet, so, go to drivers/staing at first. This source code is originally from Silicon Motion Technology Corp, and maintained at http://dev.lemote.com/code/linux_loongson for YeeLoong netbook. I have done a lot of cleanups for it and merged it into my git repository at http://dev.lemote.com/code/rt4ls. Thanks to Simon for testing it on a little-endian x86 platform. Thanks to Olivier Croset for reporting the problem about __BIG_ENDIAN compiling problem and send a relative patch. The suspend/resume and blank support are contributed by Jason from Silicon Motion Technology. Tested-by: Simon Braunschmidt Signed-off-by: Wu Zhangjin Signed-off-by: Greg Kroah-Hartman commit 8042273801059884da2d53bbca34575d090b6f4e Author: Kay Sievers Date: Tue Dec 22 22:25:16 2009 +0100 devtmpfs: unlock mutex in case of string allocation error Reported-by: Kirill A. Shutemov Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 0787fdf70ba4c41a3350096ebaa347a17e900385 Author: Michael Hennerich Date: Mon Dec 21 11:41:08 2009 -0500 Driver core: export platform_device_register_data as a GPL symbol This allows MFD's to register/bind drivers for their sub devices while still being compiled as a module. Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger Signed-off-by: Greg Kroah-Hartman commit 99b28f1b4126582f87ce454d4affb823bddf2cd8 Author: Phil Carmody Date: Mon Dec 14 20:28:12 2009 +0200 driver core: Prevent reference to freed memory on error path priv is drv->p. So only free drv->p after we've finished using priv. Found using a static code analysis tool Signed-off-by: Phil Carmody Signed-off-by: Greg Kroah-Hartman commit e6309e7568d4b9d62298a887b10de42df11cb8c1 Author: Thomas Gleixner Date: Thu Dec 10 19:32:49 2009 +0000 Driver-core: Fix bogus 0 error return in device_add() If device_add() is called with a device which does not have dev->p set up, then device_private_init() is called. If that succeeds, then the error variable is set to 0. Now if the dev_name(dev) check further down fails, then device_add() correctly terminates, but returns 0. That of course lets the driver progress. If later another driver uses this half set up device as parent then device_add() of the child device explodes and renders sysfs completely unusable. Set the error to -EINVAL if dev_name() check fails. Signed-off-by: Thomas Gleixner Cc: Kay Sievers Cc: "Hans J. Koch" Signed-off-by: Greg Kroah-Hartman commit 099c2f21d8cf0724b85abb2c589d6276953781b7 Author: Phil Carmody Date: Fri Dec 18 15:34:21 2009 +0200 Driver core: driver_attribute parameters can often be const* Many struct driver_attribute descriptors are purely read-only structures, and there's no need to change them. Therefore make the promise not to, which will let those descriptors be put in a ro section. Signed-off-by: Phil Carmody Signed-off-by: Greg Kroah-Hartman commit 66ecb92be9eb579df93add22d19843e7869f168e Author: Phil Carmody Date: Fri Dec 18 15:34:20 2009 +0200 Driver core: bin_attribute parameters can often be const* Many struct bin_attribute descriptors are purely read-only structures, and there's no need to change them. Therefore make the promise not to, which will let those descriptors be put in a ro section. Signed-off-by: Phil Carmody Signed-off-by: Greg Kroah-Hartman commit 26579ab70aa0e0ea434e6e100279d2f67c094431 Author: Phil Carmody Date: Fri Dec 18 15:34:19 2009 +0200 Driver core: device_attribute parameters can often be const* Most device_attributes are const, and are begging to be put in a ro section. However, the create and remove file interfaces were failing to propagate the const promise which the only functions they call offer. Signed-off-by: Phil Carmody Signed-off-by: Greg Kroah-Hartman commit 8e9b9362266dd16255473c080d846b13e27247bf Author: Sebastian Andrzej Siewior Date: Sun Dec 6 12:24:31 2009 +0100 Doc/stable rules: add new cherry-pick logic - it is possible to submit patches for the stable queue without sending them directly stable@kernel.org. If the tag (Cc: stable@kernel.org) is available in the sign-off area than hpa's script will filter them into the stable mailbox once it hits Linus' tree. - Patches which require others to be applied first can be also specified. This was discussued in http://lkml.org/lkml/2009/11/9/474 Signed-off-by: Sebastian Andrzej Siewior Cc: Brandon Philips Signed-off-by: Greg Kroah-Hartman commit 9329d1beaeed1a94f030c784dcec5ff973f402c4 Author: Kay Sievers Date: Fri Dec 18 21:18:15 2009 +0100 vfs: get_sb_single() - do not pass options twice Filesystem code usually destroys the option buffer while parsing it. This leads to errors when the same buffer is passed twice. In case we fill a new superblock do not call remount. This is needed to quite a warning that the debugfs code causes every boot. Cc: Miklos Szeredi Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit f1f76f865b5f66db5b5c7f2d19874f2bb9b43b8d Author: Thomas Gleixner Date: Wed Dec 16 21:31:33 2009 +0000 devtmpfs: Convert dirlock to a mutex devtmpfs has a rw_lock dirlock which serializes delete_path and create_path. This code was obviously never tested with the usual set of debugging facilities enabled. In the dirlock held sections the code calls: - vfs functions which take mutexes - kmalloc(, GFP_KERNEL) In both code pathes the might sleep warning triggers and spams dmesg. Convert the rw_lock to a mutex. There is no reason why this needs to be a rwlock. Signed-off-by: Thomas Gleixner Cc: Kay Sievers Cc: stable Signed-off-by: Greg Kroah-Hartman commit 6f40334694dce047d43c6f2cce255b596da6de50 Merge: 9c717de 54a2608 Author: Linus Torvalds Date: Wed Dec 23 10:01:20 2009 -0800 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: ALSA: hda - Add STAC9205 PCI_QUIRK for Dell Vostro 1700 ASoC: Do not write to invalid registers on the wm9712. ALSA: hda - Set mixer name after codec patch ASoC: add missing parameter to mx27vis_hifi_hw_free() ASoC: sh: FSI:: don't check platform_get_irq's return value against zero ALSA: sound/core/pcm_timer.c: use lib/gcd.c ALSA: hda - Add MSI blacklist ALSA: hda - Add support for the new 27 inch IMacs ALSA: hda - Fix NULL dereference with enable_beep=0 option commit 193cb93e5a5f32c0520eed17e87135d20594d1e1 Merge: 23e707d f42ecb2 Author: Greg Kroah-Hartman Date: Wed Dec 23 10:00:05 2009 -0800 Merge branch 'master' of /home/gregkh/linux/git/torvalds-2.6 commit 54a26089a2733df2765342acaaf71466d37ff5a5 Merge: 3095b16 95e70e8 Author: Takashi Iwai Date: Wed Dec 23 18:50:17 2009 +0100 Merge branch 'fix/hda' into for-linus commit 3095b165a14b1a95eb500bcaf13ad725a27fe825 Merge: 4dc2ec0 48e3cbb Author: Takashi Iwai Date: Wed Dec 23 18:50:13 2009 +0100 Merge branch 'fix/asoc' into for-linus commit 4dc2ec09b80b32b54821f1776959740283efa5a2 Merge: 1f26cb9 a960539 Author: Takashi Iwai Date: Wed Dec 23 18:49:55 2009 +0100 Merge branch 'fix/misc' into for-linus commit 95e70e87533f9d117d369495ee633cb7d18dc802 Author: Anisse Astier Date: Wed Dec 23 17:28:45 2009 +0100 ALSA: hda - Add STAC9205 PCI_QUIRK for Dell Vostro 1700 Signed-off-by: Anisse Astier Signed-off-by: Takashi Iwai commit 9c717de946ed7f5782e6dffacf2d05859073058c Author: Randy Dunlap Date: Wed Dec 23 09:23:33 2009 -0800 kfifo: fix Error/broken kernel-doc notation Fix kernel-doc errors and warnings in new header file kfifo.h. Don't use kernel-doc "/**" for internal functions whose comments are not in kernel-doc format. kernel-doc section header names (like "Note:") must be unique per function. Looks like I need to document that. Error(include/linux/kfifo.h:76): duplicate section name 'Note' Warning(include/linux/kfifo.h:88): Excess function parameter 'size' description in 'INIT_KFIFO' Error(include/linux/kfifo.h:101): duplicate section name 'Note' Warning(include/linux/kfifo.h:257): No description found for parameter 'fifo' (many of this last type, from internal functions) Signed-off-by: Randy Dunlap Cc: Stefani Seibold Signed-off-by: Linus Torvalds commit 6432ed648a204d01d160990630178a1569b36852 Merge: 94e5165 0c69774 Author: Linus Torvalds Date: Wed Dec 23 09:12:57 2009 -0800 Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: Revert 738d2be, simplify set_task_cpu() commit 94e5165aa72826b05ffd492f334a1465187e255a Merge: f42ecb2 869835d Author: Linus Torvalds Date: Wed Dec 23 09:12:20 2009 -0800 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6: quota: Improve checking of quota file header jbd: jbd-debug and jbd2-debug should be writable ext4: fix sleep inside spinlock issue with quota and dealloc (#14739) ext4: Fix potential quota deadlock quota: Fix 64-bit limits setting on 32-bit archs ext3: Replace lock/unlock_super() with an explicit lock for resizing ext3: Replace lock/unlock_super() with an explicit lock for the orphan list ext3: ext3_mark_recovery_complete() doesn't need to use lock_super ext3: Remove outdated comment about lock_super() quota: Move duplicated code to separate functions ext4: Convert to generic reserved quota's space management. quota: decouple fs reserved space from quota reservation Add unlocked version of inode_add_bytes() function ext3: quota macros cleanup [V2] commit f42ecb2808db5386f983d593a7c08d3ea3b94a27 Merge: 119eecc d94a510 Author: Linus Torvalds Date: Wed Dec 23 08:59:32 2009 -0800 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: (35 commits) drm/radeon/kms: add definitions for v4 power tables drm/radeon/kms: never combine LVDS with another encoder drm/radeon/kms: Check module arguments to be valid V2 drm/radeon/kms: Avoid crash when trying to cleanup uninitialized structure drm/radeon/kms: add cvt mode if we only have lvds w/h and no edid (v4) drm/radeon/kms: add 3DC compression support drm/radeon/kms: allow rendering while no colorbuffer is set on r300 drm/radeon/kms: enable memory clock reading on legacy (V2) drm/radeon/kms: prevent parallel AtomBIOS calls drm/radeon/kms: set proper default tv standard drm/radeon/kms: fix legacy rmx drm/radeon/kms/atom: fill in proper defines for digital setup drm/kms: silencing a false positive warning. drm/mm: fix logic for selection of best fit block drm/vmwgfx: Use TTM handles instead of SIDs as user-space surface handles. drm/vmwgfx: Return -ERESTARTSYS when interrupted by a signal. drm/vmwgfx: Fix unlocked ioctl and add proper access control drm/radeon: fix build on 64-bit with some compilers. drivers/gpu: Use kzalloc for allocating only one thing DRM: Rename clamp variable ... commit 119eecc831a42bd090543568932e440c6831f1bb Author: Stefani Seibold Date: Wed Dec 23 09:10:48 2009 +0100 Fix usb_serial_probe() problem introduced by the recent kfifo changes The USB serial code was a new user of the kfifo API, and it was missed when porting things to the new kfifo API. Please make the write_fifo in place. Here is my patch to fix the regression and full ported version. Signed-off-by: Stefani Seibold Reported-and-tested-by: Rafael J. Wysocki Cc: Greg KH Cc: Andrew Morton Cc: Alan Stern Signed-off-by: Linus Torvalds commit 48e3cbb3f67a27d9c2db075f3d0f700246c40caa Author: Eric Millbrandt Date: Tue Dec 22 10:13:24 2009 -0500 ASoC: Do not write to invalid registers on the wm9712. This patch fixes a bug where "virtual" registers were being written to the ac97 bus. This was causing unrelated registers to become corrupted (headphone 0x04, touchscreen 0x78, etc). This patch duplicates protection that was included in the wm9713 driver. Signed-off-by: Eric Millbrandt Acked-by: Liam Girdwood Signed-off-by: Mark Brown Cc: stable@kernel.org commit 869835dfad3eb6f7d90c3255a24b084fea82f30d Author: Jan Kara Date: Mon Dec 21 21:57:04 2009 +0100 quota: Improve checking of quota file header When we are asked for vfsv0 quota format and the file is in vfsv1 format (or vice versa), refuse to use the quota file. Also return with error when we don't like the header of quota file. Signed-off-by: Jan Kara commit 765f8361902d015c864d5e62019b2f139452d7ef Author: Yin Kangkai Date: Tue Dec 15 14:48:25 2009 -0800 jbd: jbd-debug and jbd2-debug should be writable jbd-debug and jbd2-debug is currently read-only (S_IRUGO), which is not correct. Make it writable so that we can start debuging. Signed-off-by: Yin Kangkai Reviewed-by: Aneesh Kumar K.V Signed-off-by: Andrew Morton Signed-off-by: Jan Kara commit 39bc680a8160bb9d6743f7873b535d553ff61058 Author: Dmitry Monakhov Date: Thu Dec 10 16:36:27 2009 +0000 ext4: fix sleep inside spinlock issue with quota and dealloc (#14739) Unlock i_block_reservation_lock before vfs_dq_reserve_block(). This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=14739 CC: Theodore Ts'o Signed-off-by: Dmitry Monakhov Signed-off-by: Jan Kara commit d21cd8f163ac44b15c465aab7306db931c606908 Author: Dmitry Monakhov Date: Thu Dec 10 03:31:45 2009 +0000 ext4: Fix potential quota deadlock We have to delay vfs_dq_claim_space() until allocation context destruction. Currently we have following call-trace: ext4_mb_new_blocks() /* task is already holding ac->alloc_semp */ ->ext4_mb_mark_diskspace_used ->vfs_dq_claim_space() /* acquire dqptr_sem here. Possible deadlock */ ->ext4_mb_release_context() /* drop ac->alloc_semp here */ Let's move quota claiming to ext4_da_update_reserve_space() ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.32-rc7 #18 ------------------------------------------------------- write-truncate-/3465 is trying to acquire lock: (&s->s_dquot.dqptr_sem){++++..}, at: [] dquot_claim_space+0x3b/0x1b0 but task is already holding lock: (&meta_group_info[i]->alloc_sem){++++..}, at: [] ext4_mb_load_buddy+0xb2/0x370 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&meta_group_info[i]->alloc_sem){++++..}: [] __lock_acquire+0xd7b/0x1260 [] lock_acquire+0xba/0xd0 [] down_read+0x51/0x90 [] ext4_mb_load_buddy+0xb2/0x370 [] ext4_mb_free_blocks+0x46c/0x870 [] ext4_free_blocks+0x73/0x130 [] ext4_ext_truncate+0x76c/0x8d0 [] ext4_truncate+0x187/0x5e0 [] vmtruncate+0x6b/0x70 [] inode_setattr+0x62/0x190 [] ext4_setattr+0x25a/0x370 [] notify_change+0x151/0x340 [] do_truncate+0x6d/0xa0 [] may_open+0x1d4/0x200 [] do_filp_open+0x1eb/0x910 [] do_sys_open+0x6d/0x140 [] sys_open+0x2e/0x40 [] sysenter_do_call+0x12/0x32 -> #2 (&ei->i_data_sem){++++..}: [] __lock_acquire+0xd7b/0x1260 [] lock_acquire+0xba/0xd0 [] down_read+0x51/0x90 [] ext4_get_blocks+0x47/0x450 [] ext4_getblk+0x61/0x1d0 [] ext4_bread+0x1f/0xa0 [] ext4_quota_write+0x12c/0x310 [] qtree_write_dquot+0x93/0x120 [] v2_write_dquot+0x28/0x30 [] dquot_commit+0xab/0xf0 [] ext4_write_dquot+0x77/0x90 [] ext4_mark_dquot_dirty+0x2f/0x50 [] dquot_alloc_inode+0x101/0x180 [] ext4_new_inode+0x602/0xf00 [] ext4_create+0x89/0x150 [] vfs_create+0xa2/0xc0 [] do_filp_open+0x7a7/0x910 [] do_sys_open+0x6d/0x140 [] sys_open+0x2e/0x40 [] sysenter_do_call+0x12/0x32 -> #1 (&sb->s_type->i_mutex_key#7/4){+.+...}: [] __lock_acquire+0xd7b/0x1260 [] lock_acquire+0xba/0xd0 [] mutex_lock_nested+0x65/0x2d0 [] vfs_load_quota_inode+0x4bd/0x5a0 [] vfs_quota_on_path+0x5f/0x70 [] ext4_quota_on+0x112/0x190 [] sys_quotactl+0x44a/0x8a0 [] sysenter_do_call+0x12/0x32 -> #0 (&s->s_dquot.dqptr_sem){++++..}: [] __lock_acquire+0x1091/0x1260 [] lock_acquire+0xba/0xd0 [] down_read+0x51/0x90 [] dquot_claim_space+0x3b/0x1b0 [] ext4_mb_mark_diskspace_used+0x36f/0x380 [] ext4_mb_new_blocks+0x34a/0x530 [] ext4_ext_get_blocks+0x122b/0x13c0 [] ext4_get_blocks+0x226/0x450 [] mpage_da_map_blocks+0xc3/0xaa0 [] ext4_da_writepages+0x506/0x790 [] do_writepages+0x22/0x50 [] __filemap_fdatawrite_range+0x6d/0x80 [] filemap_flush+0x2b/0x30 [] ext4_alloc_da_blocks+0x5c/0x60 [] ext4_release_file+0x75/0xb0 [] __fput+0xf9/0x210 [] fput+0x27/0x30 [] filp_close+0x4c/0x80 [] put_files_struct+0x6e/0xd0 [] exit_files+0x47/0x60 [] do_exit+0x144/0x710 [] do_group_exit+0x38/0xa0 [] get_signal_to_deliver+0x2ac/0x410 [] do_notify_resume+0xb9/0x890 [] work_notifysig+0x13/0x21 other info that might help us debug this: 3 locks held by write-truncate-/3465: #0: (jbd2_handle){+.+...}, at: [] start_this_handle+0x38f/0x5c0 #1: (&ei->i_data_sem){++++..}, at: [] ext4_get_blocks+0xb6/0x450 #2: (&meta_group_info[i]->alloc_sem){++++..}, at: [] ext4_mb_load_buddy+0xb2/0x370 stack backtrace: Pid: 3465, comm: write-truncate- Not tainted 2.6.32-rc7 #18 Call Trace: [] ? printk+0x1d/0x22 [] print_circular_bug+0xca/0xd0 [] __lock_acquire+0x1091/0x1260 [] ? sched_clock_local+0xd2/0x170 [] ? trace_hardirqs_off_caller+0x20/0xd0 [] lock_acquire+0xba/0xd0 [] ? dquot_claim_space+0x3b/0x1b0 [] down_read+0x51/0x90 [] ? dquot_claim_space+0x3b/0x1b0 [] dquot_claim_space+0x3b/0x1b0 [] ext4_mb_mark_diskspace_used+0x36f/0x380 [] ext4_mb_new_blocks+0x34a/0x530 [] ? ext4_ext_find_extent+0x25d/0x280 [] ext4_ext_get_blocks+0x122b/0x13c0 [] ? sched_clock_local+0xd2/0x170 [] ? sched_clock_cpu+0x120/0x160 [] ? cpu_clock+0x4f/0x60 [] ? trace_hardirqs_off_caller+0x20/0xd0 [] ? down_write+0x8c/0xa0 [] ext4_get_blocks+0x226/0x450 [] ? sched_clock_cpu+0x120/0x160 [] ? cpu_clock+0x4f/0x60 [] ? trace_hardirqs_off+0xb/0x10 [] mpage_da_map_blocks+0xc3/0xaa0 [] ? find_get_pages_tag+0x16c/0x180 [] ? find_get_pages_tag+0x0/0x180 [] ? __mpage_da_writepage+0x16d/0x1a0 [] ? pagevec_lookup_tag+0x2e/0x40 [] ? write_cache_pages+0xdb/0x3d0 [] ? __mpage_da_writepage+0x0/0x1a0 [] ext4_da_writepages+0x506/0x790 [] ? cpu_clock+0x4f/0x60 [] ? sched_clock_local+0xd2/0x170 [] ? sched_clock_cpu+0x120/0x160 [] ? sched_clock_cpu+0x120/0x160 [] ? ext4_da_writepages+0x0/0x790 [] do_writepages+0x22/0x50 [] __filemap_fdatawrite_range+0x6d/0x80 [] filemap_flush+0x2b/0x30 [] ext4_alloc_da_blocks+0x5c/0x60 [] ext4_release_file+0x75/0xb0 [] __fput+0xf9/0x210 [] fput+0x27/0x30 [] filp_close+0x4c/0x80 [] put_files_struct+0x6e/0xd0 [] exit_files+0x47/0x60 [] do_exit+0x144/0x710 [] ? lock_release_holdtime+0x33/0x210 [] ? _spin_unlock_irq+0x27/0x30 [] do_group_exit+0x38/0xa0 [] ? trace_hardirqs_on+0xb/0x10 [] get_signal_to_deliver+0x2ac/0x410 [] do_notify_resume+0xb9/0x890 [] ? trace_hardirqs_off_caller+0x20/0xd0 [] ? lock_release_holdtime+0x33/0x210 [] ? autoremove_wake_function+0x0/0x50 [] ? trace_hardirqs_on_caller+0x134/0x190 [] ? trace_hardirqs_on+0xb/0x10 [] ? security_file_permission+0x14/0x20 [] ? vfs_write+0x131/0x190 [] ? do_sync_write+0x0/0x120 [] ? sysenter_do_call+0x27/0x32 [] work_notifysig+0x13/0x21 CC: Theodore Ts'o Signed-off-by: Dmitry Monakhov Signed-off-by: Jan Kara commit 82fdfa928cfa19d9627526b2ce164a27f8e9d34b Author: Jan Kara Date: Tue Dec 15 22:24:36 2009 +0100 quota: Fix 64-bit limits setting on 32-bit archs Fix warnings: fs/quota/quota_v2.c: In function ‘v2_read_file_info’: fs/quota/quota_v2.c:123: warning: integer constant is too large for ‘long’ type fs/quota/quota_v2.c:124: warning: integer constant is too large for ‘long’ type Reported-by: Jerry Leo Signed-off-by: Jan Kara commit 96d2a495c25d525873529b736cdb63ad502b101c Author: Eric Sandeen Date: Mon Dec 14 13:01:05 2009 -0600 ext3: 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(). Port of ext4 commit 32ed5058ce90024efcd811254b4b1de0468099df by Theodore Ts'o . CC: Theodore Ts'o Signed-off-by: Eric Sandeen Signed-off-by: Jan Kara commit b8a052d01669977f224255b0f9f2737018171ddb Author: Eric Sandeen Date: Mon Dec 14 13:00:30 2009 -0600 ext3: 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(). Port of ext4 commit 3b9d4ed26680771295d904a6b83e88e620780893 by Theodore Ts'o . CC: Theodore Ts'o Signed-off-by: Eric Sandeen Signed-off-by: Jan Kara commit 4854a5f0cbb1967fc7db3ea861d97afeea78b88b Author: Eric Sandeen Date: Mon Dec 14 12:59:59 2009 -0600 ext3: ext3_mark_recovery_complete() doesn't need to use lock_super The function ext3_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 ext3_remount(). Port of ext4 commit a63c9eb2ce6f5028da90f282798232c4f398ceb8 by Theodore Ts'o . CC: Theodore Ts'o Signed-off-by: Eric Sandeen Signed-off-by: Jan Kara commit ed505ee454dbf133b1a4067d3ac0325d4261eda1 Author: Eric Sandeen Date: Mon Dec 14 12:59:18 2009 -0600 ext3: Remove outdated comment about lock_super() ext3_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. Port of ext4 commit 32ed5058ce90024efcd811254b4b1de0468099df by Theodore Ts'o . CC: Theodore Ts'o Signed-off-by: Eric Sandeen Signed-off-by: Jan Kara commit dc52dd3a3a800e70b3440ea4424f8c87ab043e42 Author: Dmitry Monakhov Date: Mon Dec 14 15:21:15 2009 +0300 quota: Move duplicated code to separate functions - for(..) { mark_dquot_dirty(); } -> mark_all_dquot_dirty() - for(..) { dput(); } -> dqput_all() Signed-off-by: Dmitry Monakhov Signed-off-by: Jan Kara commit a9e7f4472075fb6937c545af3f6329e9946bbe66 Author: Dmitry Monakhov Date: Mon Dec 14 15:21:14 2009 +0300 ext4: Convert to generic reserved quota's space management. This patch also fixes write vs chown race condition. Acked-by: "Theodore Ts'o" Signed-off-by: Dmitry Monakhov Signed-off-by: Jan Kara commit fd8fbfc1709822bd94247c5b2ab15a5f5041e103 Author: Dmitry Monakhov Date: Mon Dec 14 15:21:13 2009 +0300 quota: decouple fs reserved space from quota reservation Currently inode_reservation is managed by fs itself and this reservation is transfered on dquot_transfer(). This means what inode_reservation must always be in sync with dquot->dq_dqb.dqb_rsvspace. Otherwise dquot_transfer() will result in incorrect quota(WARN_ON in dquot_claim_reserved_space() will be triggered) This is not easy because of complex locking order issues for example http://bugzilla.kernel.org/show_bug.cgi?id=14739 The patch introduce quota reservation field for each fs-inode (fs specific inode is used in order to prevent bloating generic vfs inode). This reservation is managed by quota code internally similar to i_blocks/i_bytes and may not be always in sync with internal fs reservation. Also perform some code rearrangement: - Unify dquot_reserve_space() and dquot_reserve_space() - Unify dquot_release_reserved_space() and dquot_free_space() - Also this patch add missing warning update to release_rsv() dquot_release_reserved_space() must call flush_warnings() as dquot_free_space() does. Signed-off-by: Dmitry Monakhov Signed-off-by: Jan Kara commit b462707e7ccad058ae151e5c5b06eb5cadcb737f Author: Dmitry Monakhov Date: Mon Dec 14 15:21:12 2009 +0300 Add unlocked version of inode_add_bytes() function Quota code requires unlocked version of this function. Off course we can just copy-paste the code, but copy-pasting is always an evil. Signed-off-by: Dmitry Monakhov Signed-off-by: Jan Kara commit c459001fa4f71deafb62e00fa70d35f695498965 Author: Dmitry Monakhov Date: Wed Dec 9 03:05:30 2009 +0300 ext3: quota macros cleanup [V2] Currently all quota block reservation macros contains hardcoded "2" aka MAXQUOTAS value. This is no good because in some places it is not obvious to understand what does this digit represent. Let's introduce new macro with self descriptive name. Signed-off-by: Dmitry Monakhov Signed-off-by: Jan Kara commit 0c69774e6ce94364cfaa8bdeb18061edc414bc5a Author: Peter Zijlstra Date: Tue Dec 22 15:43:19 2009 +0100 sched: Revert 738d2be, simplify set_task_cpu() Effectively reverts 738d2be4301007f054541c5c4bf7fb6a361c9b3a. As demonstrated by Eric, we really need to call __set_task_cpu() early in the fork() path to properly initialize the various task state -- specifically the cgroup state through set_task_rq(). [ we could probably fix this by explicitly calling __set_task_cpu() from sched_fork(), but lets try that for the next cycle and simply revert to the old behaviour for now. ] Reported-by: Eric Paris Tested-by: Eric Paris , Signed-off-by: Peter Zijlstra Cc: efault@gmx.de LKML-Reference: <1261492999.4937.36.camel@laptop> Signed-off-by: Ingo Molnar commit f62faedbed546f4e0c1ba204999e7c206059f305 Author: Takashi Iwai Date: Wed Dec 23 09:27:51 2009 +0100 ALSA: hda - Set mixer name after codec patch Postpone the mixer name setup after the codec patch since the codec patch may change the codec name string in itself. Signed-off-by: Takashi Iwai commit d94a5108f716bbd524358eb5a440d63991744a62 Merge: 44f9e6c 0786201 Author: Dave Airlie Date: Wed Dec 23 11:18:33 2009 +1000 Merge remote branch 'korg/drm-radeon-next' into drm-linus * korg/drm-radeon-next: drm/radeon/kms: add definitions for v4 power tables drm/radeon/kms: never combine LVDS with another encoder drm/radeon/kms: Check module arguments to be valid V2 drm/radeon/kms: Avoid crash when trying to cleanup uninitialized structure drm/radeon/kms: add cvt mode if we only have lvds w/h and no edid (v4) drm/radeon/kms: add 3DC compression support drm/radeon/kms: allow rendering while no colorbuffer is set on r300 drm/radeon/kms: enable memory clock reading on legacy (V2) drm/radeon/kms: prevent parallel AtomBIOS calls drm/radeon/kms: set proper default tv standard drm/radeon/kms: fix legacy rmx drm/radeon/kms/atom: fill in proper defines for digital setup commit 0786201d8cd0730e72b0e087484dd47cc5f58409 Author: Alex Deucher Date: Sat Dec 19 12:45:12 2009 -0500 drm/radeon/kms: add definitions for v4 power tables [airlied: just adding this for completeness to avoid drift between public atombios.h files] Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie commit f56cd64f5f713a3013c4d980a5695c198d839671 Author: Alex Deucher Date: Fri Dec 18 11:28:22 2009 -0500 drm/radeon/kms: never combine LVDS with another encoder When linking multiple encoders to a connector, make sure to not link LVDS with another connector. Some bioses have the same i2c line for LVDS and VGA. Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie commit 3642133816f9f25065e3ca310f0720574bcdcc52 Author: Jerome Glisse Date: Fri Dec 11 21:18:34 2009 +0100 drm/radeon/kms: Check module arguments to be valid V2 This patch add a function which check module argument to be valid. On invalid argument it prints a warning and setback the default value. V2: Allow 0 for vram limit & agp mode which are the default value Signed-off-by: Jerome Glisse Signed-off-by: Dave Airlie commit 0a0c7596c643239e8d4c3eaaba43b74a96f2411e Author: Jerome Glisse Date: Fri Dec 11 20:36:19 2009 +0100 drm/radeon/kms: Avoid crash when trying to cleanup uninitialized structure Add boolean to record if some part of the driver are initialized or not this allow to avoid a crash when trying to cleanup uninitialized structure members. Signed-off-by: Jerome Glisse Signed-off-by: Dave Airlie commit d2efdf6d6f425950a61fa5cc3aa22e6718e7f3c8 Author: Alex Deucher Date: Tue Dec 22 10:06:49 2009 -0500 drm/radeon/kms: add cvt mode if we only have lvds w/h and no edid (v4) This fixes LVDS on some mac laptops without a panel edid. v2 - Set proper mode type flags v3 - Note that this is not neceesarily the exact panel mode, but an approximation based on the cvt formula. For these systems we should ideally read the mode info out of the registers or add a mode table, but this works and is much simpler. v4 - Update comments and debug message. Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie commit 512889f450c1851d9e3628f1894b9b64b0701eac Author: Marek Olšák Date: Sat Dec 19 00:23:00 2009 +0100 drm/radeon/kms: add 3DC compression support There are 2 formats: ATI1N: 64 bits per 4x4 block, one-channel format ATI2N: 128 bits per 4x4 block, two-channel format Signed-off-by: Dave Airlie commit 46c64d4bfa01cda7d58c514164f8b127ab6741b7 Author: Marek Olšák Date: Thu Dec 17 06:02:28 2009 +0100 drm/radeon/kms: allow rendering while no colorbuffer is set on r300 Because hardware cannot disable all colorbuffers directly to do depth-only rendering, a user should: - disable reading from a colorbuffer in blending - disable fastfill - set the color channel mask to 0 to prevent writing to a colorbuffer Signed-off-by: Dave Airlie commit 5ea597f3764880ab3a67fe2246218634a8c12778 Author: Rafał Miłecki Date: Thu Dec 17 13:50:09 2009 +0100 drm/radeon/kms: enable memory clock reading on legacy (V2) V2: detect IGP cards (which don't have own memory) Signed-off-by: Rafał Miłecki Acked-by: Alex Deucher Signed-off-by: Dave Airlie commit c31ad97f1886a2ff0f3356dc31d50c57944365da Author: Rafał Miłecki Date: Thu Dec 17 00:00:46 2009 +0100 drm/radeon/kms: prevent parallel AtomBIOS calls This just adds a mutex around the atombios table execution so we don't call it from two contexts at once. Signed-off-by: Rafał Miłecki Signed-off-by: Dave Airlie commit d79766fab9975c6414ebab7d2abf017834a48c35 Author: Alex Deucher Date: Thu Dec 17 19:00:29 2009 -0500 drm/radeon/kms: set proper default tv standard we were just using 1 before. reported on irc by soreau Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie commit 310a82c8c5fc431913fe34a17251118e71c2c876 Author: Alex Deucher Date: Thu Dec 17 01:24:59 2009 -0500 drm/radeon/kms: fix legacy rmx This makes 640x480 on my R100 work again, both in aspect and centered mode. Signed-off-by: Alex Deucher Tested-by: Dave Airlie Signed-off-by: Dave Airlie commit edc664e314d5dadc326cfc15a536fe906d652204 Author: Alex Deucher Date: Thu Dec 17 11:22:01 2009 -0500 drm/radeon/kms/atom: fill in proper defines for digital setup Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie commit 44f9e6c6bc508b202755d9e9e48a8ba96a5f0fa4 Merge: 29ebdf9 37cb3e0 Author: Dave Airlie Date: Wed Dec 23 10:28:24 2009 +1000 Merge remote branch 'nouveau/for-airlied' into drm-linus * nouveau/for-airlied: drm/nouveau: fix bug causing pinned buffers to lose their NO_EVICT flag drm/nv50: fix suspend/resume delays without firmware present drm/nouveau: prevent all channel creation if accel not available drm/nv50: fix two potential suspend/resume oopses drm/nv40: implement ctxprog/state generation drm/nv10: Add the initial graph context and soft methods needed for LMA. drm/nouveau: Fix up buffer eviction, and evict them to GART, if possible. drm/nouveau: Add proper error handling to nouveau_card_init drm/nv04: Fix NV04 set_operation software method. drm/nouveau: Kill global state in BIOS script interpreter drm/nouveau: Kill global state in NvShadowBIOS drm/nouveau: use drm debug levels drm/i2c/ch7006: Fix load detection false positives right after system init. drm/nv04-nv40: Fix "conflicting memory types" when saving/restoring VGA fonts. commit 29ebdf925c2c45f6531a953c6c5c8e4d3b4ac2dc Author: Marin Mitov Date: Sun Dec 20 09:03:27 2009 +0200 drm/kms: silencing a false positive warning. warning: 'width' may be used uninitialized in this function drivers/gpu/drm/drm_edid.c Signed-off-by: Marin Mitov Signed-off-by: Dave Airlie commit e2108eb1f66d77b4af77caf282cab1d47e3f4831 Author: Bob Gleitsmann Date: Mon Dec 21 13:52:09 2009 +1000 drm/mm: fix logic for selection of best fit block This is from bug 25728. [airlied: I'm just forwarding the patch for review, Thomas, ickle?] Acked-by: Jerome Glisse Acked-by: Thomas Hellstrom Signed-off-by: Dave Airlie commit 7a73ba7469cbea631050094fd14f73acebb97cf9 Author: Thomas Hellstrom Date: Tue Dec 22 16:53:41 2009 +0100 drm/vmwgfx: Use TTM handles instead of SIDs as user-space surface handles. Improve the command verifier to catch all occurences of surface handles, and translate to SIDs. This way DMA buffers and 3D surfaces share a common handle space, which makes it possible for the kms code to differentiate. Signed-off-by: Thomas Hellstrom Signed-off-by: Dave Airlie commit 3d3a5b3290043618e8409f3fb68a63de6156fdd4 Author: Thomas Hellstrom Date: Tue Dec 8 12:59:34 2009 +0100 drm/vmwgfx: Return -ERESTARTSYS when interrupted by a signal. Fixes for TTM API change. Signed-off-by: Thomas Hellstrom Signed-off-by: Jakob Bornecrantz Signed-off-by: Dave Airlie commit e1f7800315d78686481b27b113a3317ac687b6bf Author: Thomas Hellstrom Date: Tue Dec 8 12:57:51 2009 +0100 drm/vmwgfx: Fix unlocked ioctl and add proper access control This fixes up vmwgfx for the unlocked ioctl code to avoid doing it in the driver. Also adds ioctl flags. Signed-off-by: Thomas Hellstrom Signed-off-by: Jakob Bornecrantz Signed-off-by: Dave Airlie commit 794f3141a194a4f4c28c1d417b071a901f78d9bb Author: Dave Airlie Date: Sun Dec 20 16:08:40 2009 +1000 drm/radeon: fix build on 64-bit with some compilers. drivers/gpu/drm/radeon/radeon_test.c:45: undefined reference to `__udivdi3' Reported-by: Mr. James W. Laferriere Cc: stable@kernel.org Signed-off-by: Dave Airlie commit e265f39e1ff026dcc787f1953c048f3de5aefd16 Author: Julia Lawall Date: Sat Dec 19 08:16:33 2009 +0100 drivers/gpu: Use kzalloc for allocating only one thing Use kzalloc rather than kcalloc(1,...) The use of the allocated memory that looks like an array is &p->relocs[0], but this should be the same as p->relocs. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ @@ - kcalloc(1, + kzalloc( ...) // Signed-off-by: Julia Lawall Signed-off-by: Dave Airlie commit 01136acff8cc8251822fbae77f11e8029049c6f1 Author: Andi Kleen Date: Mon Dec 21 02:24:47 2009 +0100 DRM: Rename clamp variable linux/kernel.h has a "clamp" macro, but r300_cmdbuf also uses a variable with the same name. Right now it doesn't seem to include the header, but sooner or later someone will. So better rename the variable now. Signed-off-by: Andi Kleen Signed-off-by: Dave Airlie commit c9f937e4a3f4ebf9924ec21d80632e5eb61d949c Merge: 2218a4f 3439d65 Author: Linus Torvalds Date: Tue Dec 22 14:22:36 2009 -0800 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: pata_bf54x: handle portmuxing of pins through GPIO PORTs commit 2218a4fcf3cddd076aaf8855f675ce77f74a500b Merge: fe35d4a f1212ae Author: Linus Torvalds Date: Tue Dec 22 14:22:05 2009 -0800 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: Runtime PM documentation update PM / Runtime: Use device type and device class callbacks PM: Use pm_runtime_put_sync in system resume PM: Measure device suspend and resume times PM: Make the initcall_debug style timing for suspend/resume complete commit fe35d4a0289a8d6efcacb57e9a377b845686df10 Merge: 9917f7b 28ba0ec Author: Linus Torvalds Date: Tue Dec 22 14:20:48 2009 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: jfs: Fix 32bit build warning Remove obsolete comment in fs.h Sanitize f_flags helpers Fix f_flags/f_mode in case of lookup_instantiate_filp() from open(pathname, 3) anonfd: Allow making anon files read-only fs/compat_ioctl.c: fix build error when !BLOCK pohmelfs needs I_LOCK alloc_file(): simplify handling of mnt_clone_write() errors commit 9917f7bbe96432012d3ad8075e9fd99390255d0c Merge: dd508ae 355ffe6 Author: Linus Torvalds Date: Tue Dec 22 14:18:56 2009 -0800 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb * 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb: MAINTAINERS: update entries for WUSB, UWB and WLP subsystems commit dd508ae2dbff0cfc7401eb6e278339fc56bc5033 Merge: 7801edb 95cd34b Author: Linus Torvalds Date: Tue Dec 22 14:18:13 2009 -0800 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (36 commits) powerpc/gc/wii: Remove get_irq_desc() powerpc/gc/wii: hlwd-pic: convert irq_desc.lock to raw_spinlock powerpc/gamecube/wii: Fix off-by-one error in ugecon/usbgecko_udbg powerpc/mpic: Fix problem that affinity is not updated powerpc/mm: Fix stupid bug in subpge protection handling powerpc/iseries: use DECLARE_COMPLETION_ONSTACK for non-constant completion powerpc: Fix MSI support on U4 bridge PCIe slot powerpc: Handle VSX alignment faults correctly in little-endian mode powerpc/mm: Fix typo of cpumask_clear_cpu() powerpc/mm: Fix hash_utils_64.c compile errors with DEBUG enabled. powerpc: Convert BUG() to use unreachable() powerpc/pseries: Make declarations of cpu_hotplug_driver_lock() ANSI compatible. powerpc/pseries: Don't panic when H_PROD fails during cpu-online. powerpc/mm: Fix a WARN_ON() with CONFIG_DEBUG_PAGEALLOC and CONFIG_DEBUG_VM powerpc/defconfigs: Set HZ=100 on pseries and ppc64 defconfigs powerpc/defconfigs: Disable token ring in powerpc defconfigs powerpc/defconfigs: Reduce 64bit vmlinux by making acenic and cramfs modules powerpc/pseries: Select XICS and PCI_MSI PSERIES powerpc/85xx: Wrong variable returned on error powerpc/iseries: Convert to proc_fops ... commit 7801edb0b8b66e83c13623b483bc2e846c007c9d Author: Stefani Seibold Date: Mon Dec 21 14:37:33 2009 -0800 media video cx23888 driver: ported to new kfifo API Fix the cx23888 driver to use the new kfifo API. Using kfifo_reset() may result in a possible race conditions. This patch fixes it by using a spinlock around the kfifo_reset() function. Signed-off-by: Stefani Seibold Cc: Mauro Carvalho Chehab Reviewed-by: Andy Walls Acked-by: Andy Walls Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 86d4880313603810901f639ccb5c88ff13d4ad3c Author: Stefani Seibold Date: Mon Dec 21 14:37:32 2009 -0800 kfifo: add record handling functions Add kfifo_in_rec() - puts some record data into the FIFO Add kfifo_out_rec() - gets some record data from the FIFO Add kfifo_from_user_rec() - puts some data from user space into the FIFO Add kfifo_to_user_rec() - gets data from the FIFO and write it to user space Add kfifo_peek_rec() - gets the size of the next FIFO record field Add kfifo_skip_rec() - skip the next fifo out record Add kfifo_avail_rec() - determinate the number of bytes available in a record FIFO Signed-off-by: Stefani Seibold Acked-by: Greg Kroah-Hartman Acked-by: Mauro Carvalho Chehab Acked-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a121f24accac1600bf5b6fb1e12eeabdfed7cb1a Author: Stefani Seibold Date: Mon Dec 21 14:37:31 2009 -0800 kfifo: add kfifo_skip, kfifo_from_user and kfifo_to_user Add kfifo_reset_out() for save lockless discard the fifo output Add kfifo_skip() to skip a number of output bytes Add kfifo_from_user() to copy user space data into the fifo Add kfifo_to_user() to copy fifo data to user space Signed-off-by: Stefani Seibold Acked-by: Greg Kroah-Hartman Acked-by: Mauro Carvalho Chehab Acked-by: Andi Kleen Acked-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 37bdfbbfaab47811fcec84dff23c4e8da1a09f9e Author: Stefani Seibold Date: Mon Dec 21 14:37:30 2009 -0800 kfifo: add DEFINE_KFIFO and friends, add very tiny functions Add DECLARE_KFIFO - macro to declare a kfifo and the associated buffer inside a struct Add INIT_KFIFO - Initialize a kfifo declared by DECLARED_KFIFO Add DEFINE_KFIFO - macro to define and initialize a kfifo as a global or local object Add kfifo_size() - returns the size of the fifo in bytes Add kfifo_is_empty() - returns true if the fifo is empty Add kfifo_is_full() - returns true if the fifo is full Add kfifo_avail() - returns the number of bytes available in the FIFO Do some code cleanup Signed-off-by: Stefani Seibold Acked-by: Greg Kroah-Hartman Acked-by: Mauro Carvalho Chehab Acked-by: Andi Kleen Acked-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9842c38e917636fa7dc6b88aff17a8f1fd7f0cc0 Author: Stefani Seibold Date: Mon Dec 21 14:37:29 2009 -0800 kfifo: fix warn_unused_result Fix the "ignoring return value of '...', declared with attribute warn_unused_result" compiler warning in several users of the new kfifo API. It removes the __must_check attribute from kfifo_in() and kfifo_in_locked() which must not necessary performed. Fix the allocation bug in the nozomi driver file, by moving out the kfifo_alloc from the interrupt handler into the probe function. Fix the kfifo_out() and kfifo_out_locked() users to handle a unexpected end of fifo. Signed-off-by: Stefani Seibold Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7acd72eb85f1c7a15e8b5eb554994949241737f1 Author: Stefani Seibold Date: Mon Dec 21 14:37:28 2009 -0800 kfifo: rename kfifo_put... into kfifo_in... and kfifo_get... into kfifo_out... rename kfifo_put... into kfifo_in... to prevent miss use of old non in kernel-tree drivers ditto for kfifo_get... -> kfifo_out... Improve the prototypes of kfifo_in and kfifo_out to make the kerneldoc annotations more readable. Add mini "howto porting to the new API" in kfifo.h Signed-off-by: Stefani Seibold Acked-by: Greg Kroah-Hartman Acked-by: Mauro Carvalho Chehab Acked-by: Andi Kleen Acked-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e64c026dd09b73faf20707711402fc5ed55a8e70 Author: Stefani Seibold Date: Mon Dec 21 14:37:28 2009 -0800 kfifo: cleanup namespace change name of __kfifo_* functions to kfifo_*, because the prefix __kfifo should be reserved for internal functions only. Signed-off-by: Stefani Seibold Acked-by: Greg Kroah-Hartman Acked-by: Mauro Carvalho Chehab Acked-by: Andi Kleen Acked-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c1e13f25674ed564948ecb7dfe5f83e578892896 Author: Stefani Seibold Date: Mon Dec 21 14:37:27 2009 -0800 kfifo: move out spinlock Move the pointer to the spinlock out of struct kfifo. Most users in tree do not actually use a spinlock, so the few exceptions now have to call kfifo_{get,put}_locked, which takes an extra argument to a spinlock. Signed-off-by: Stefani Seibold Acked-by: Greg Kroah-Hartman Acked-by: Mauro Carvalho Chehab Acked-by: Andi Kleen Acked-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 45465487897a1c6d508b14b904dc5777f7ec7e04 Author: Stefani Seibold Date: Mon Dec 21 14:37:26 2009 -0800 kfifo: move struct kfifo in place This is a new generic kernel FIFO implementation. The current kernel fifo API is not very widely used, because it has to many constrains. Only 17 files in the current 2.6.31-rc5 used it. FIFO's are like list's a very basic thing and a kfifo API which handles the most use case would save a lot of development time and memory resources. I think this are the reasons why kfifo is not in use: - The API is to simple, important functions are missing - A fifo can be only allocated dynamically - There is a requirement of a spinlock whether you need it or not - There is no support for data records inside a fifo So I decided to extend the kfifo in a more generic way without blowing up the API to much. The new API has the following benefits: - Generic usage: For kernel internal use and/or device driver. - Provide an API for the most use case. - Slim API: The whole API provides 25 functions. - Linux style habit. - DECLARE_KFIFO, DEFINE_KFIFO and INIT_KFIFO Macros - Direct copy_to_user from the fifo and copy_from_user into the fifo. - The kfifo itself is an in place member of the using data structure, this save an indirection access and does not waste the kernel allocator. - Lockless access: if only one reader and one writer is active on the fifo, which is the common use case, no additional locking is necessary. - Remove spinlock - give the user the freedom of choice what kind of locking to use if one is required. - Ability to handle records. Three type of records are supported: - Variable length records between 0-255 bytes, with a record size field of 1 bytes. - Variable length records between 0-65535 bytes, with a record size field of 2 bytes. - Fixed size records, which no record size field. - Preserve memory resource. - Performance! - Easy to use! This patch: Since most users want to have the kfifo as part of another object, reorganize the code to allow including struct kfifo in another data structure. This requires changing the kfifo_alloc and kfifo_init prototypes so that we pass an existing kfifo pointer into them. This patch changes the implementation and all existing users. [akpm@linux-foundation.org: fix warning] Signed-off-by: Stefani Seibold Acked-by: Greg Kroah-Hartman Acked-by: Mauro Carvalho Chehab Acked-by: Andi Kleen Acked-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2ec91eec47f713e3d158ba5b28a24a85a2cf3650 Author: Randy Dunlap Date: Mon Dec 21 14:37:23 2009 -0800 mm tracing: cleanup Documentation/trace/events-kmem.txt Clean up typos/grammos/spellos in events-kmem.txt. Signed-off-by: Randy Dunlap Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a6cd13f3c98d1d16213e3b61054b9c209d93f877 Author: Randy Dunlap Date: Mon Dec 21 14:37:22 2009 -0800 lib/string.c: fix kernel-doc warnings Fix kernel-doc warnings (@arg name) in string.c::skip_spaces(). Warning(lib/string.c:347): No description found for parameter 'str' Warning(lib/string.c:347): Excess function parameter 's' description in 'skip_spaces' Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 83f57a11d84460dfe2afdb5a8bc759953428e38b Author: Linus Torvalds Date: Tue Dec 22 14:10:37 2009 -0800 Revert "time: Remove xtime_cache" This reverts commit 7bc7d637452383d56ba4368d4336b0dde1bb476d, as requested by John Stultz. Quoting John: "Petr Titěra reported an issue where he saw odd atime regressions with 2.6.33 where there were a full second worth of nanoseconds in the nanoseconds field. He also reviewed the time code and narrowed down the problem: unhandled overflow of the nanosecond field caused by rounding up the sub-nanosecond accumulated time. Details: * At the end of update_wall_time(), we currently round up the sub-nanosecond portion of accumulated time when storing it into xtime. This was added to avoid time inconsistencies caused when the sub-nanosecond portion was truncated when storing into xtime. Unfortunately we don't handle the possible second overflow caused by that rounding. * Previously the xtime_cache code hid this overflow by normalizing the xtime value when storing into the xtime_cache. * We could try to handle the second overflow after the rounding up, but since this affects the timekeeping's internal state, this would further complicate the next accumulation cycle, causing small errors in ntp steering. As much as I'd like to get rid of it, the xtime_cache code is known to work. * The correct fix is really to include the sub-nanosecond portion in the timekeeping accessor function, so we don't need to round up at during accumulation. This would greatly simplify the accumulation code. Unfortunately, we can't do this safely until the last three non-GENERIC_TIME arches (sparc32, arm, cris) are converted (those patches are in -mm) and we kill off the spots where arches set xtime directly. This is all 2.6.34 material, so I think reverting the xtime_cache change is the best approach for now. Many thanks to Petr for both reporting and finding the issue!" Reported-by: Petr Titěra Requested-by: john stultz Cc: Ingo Molnar Signed-off-by: Linus Torvalds commit f1212ae1332b95fe3bafa7b5c063dd8e473247cf Author: Alan Stern Date: Tue Dec 22 20:43:40 2009 +0100 PM: Runtime PM documentation update This patch (as1318) updates the runtime PM documentation, adding a section discussing the interaction between runtime PM and system sleep. [rjw: Rebased and made it agree with the other updates better.] Signed-off-by: Alan Stern Signed-off-by: Rafael J. Wysocki commit a6ab7aa9f432f722808c6fea5a8b7f5f229de031 Author: Rafael J. Wysocki Date: Tue Dec 22 20:43:17 2009 +0100 PM / Runtime: Use device type and device class callbacks The power management of some devices is handled through device types and device classes rather than through bus types. Since these devices may also benefit from using the run-time power management core, extend it so that the device type and device class run-time PM callbacks can be taken into consideration by it if the bus type callback is not defined. Update the run-time PM core documentation to reflect this change. Signed-off-by: Rafael J. Wysocki commit 28ba0ec64ca0f6ad2b0338ccec0b00a4e64e7a69 Author: Alan Cox Date: Fri Nov 6 11:31:06 2009 +0000 jfs: Fix 32bit build warning loff_t is a type that isn't entirely dependant upon 32 v 64bit choice Signed-off-by: Alan Cox Signed-off-by: Al Viro commit 95ebc3a7930d5965b00bbedbf36bfd3eb9124d65 Author: Andreas Gruenbacher Date: Wed Oct 28 01:46:33 2009 +0100 Remove obsolete comment in fs.h This question was determined to be a bug which was fixed in commit 4a3b0a49. Signed-off-by: Andreas Gruenbacher Cc: Jan Blunck Signed-off-by: Al Viro commit 5300990c0370e804e49d9a59d928c5d53fb73487 Author: Al Viro Date: Sat Dec 19 10:15:07 2009 -0500 Sanitize f_flags helpers * pull ACC_MODE to fs.h; we have several copies all over the place * nightmarish expression calculating f_mode by f_flags deserves a helper too (OPEN_FMODE(flags)) Signed-off-by: Al Viro commit 482928d59db668b8d82a48717f78986d8cea72e9 Author: Al Viro Date: Sat Dec 19 10:10:39 2009 -0500 Fix f_flags/f_mode in case of lookup_instantiate_filp() from open(pathname, 3) Just set f_flags when shoving struct file into nameidata; don't postpone that until __dentry_open(). do_filp_open() has correct value; lookup_instantiate_filp() doesn't - we lose the difference between O_RDWR and 3 by that point. We still set .intent.open.flags, so no fs code needs to be changed. Signed-off-by: Al Viro commit 628ff7c1d8d8466a5ad8078bd0206a130f8b8a51 Author: Roland Dreier Date: Fri Dec 18 09:41:24 2009 -0800 anonfd: Allow making anon files read-only It seems a couple places such as arch/ia64/kernel/perfmon.c and drivers/infiniband/core/uverbs_main.c could use anon_inode_getfile() instead of a private pseudo-fs + alloc_file(), if only there were a way to get a read-only file. So provide this by having anon_inode_getfile() create a read-only file if we pass O_RDONLY in flags. Signed-off-by: Roland Dreier Signed-off-by: Al Viro commit ed2617585f39dd12fae38c657bba68b9779ea10d Author: Arnd Bergmann Date: Mon Dec 21 17:53:53 2009 +0100 fs/compat_ioctl.c: fix build error when !BLOCK No driver uses SG_SET_TRANSFORM any more in Linux, since the ide-scsi driver was removed in 2.6.29. The compat-ioctl cleanup series moved the handling for this around, which broke building without CONFIG_BLOCK. Just remove the code handling it for compat mode. Signed-off-by: Al Viro commit 05f94c9b74b0bed5469d97edffae350ec9c1f205 Author: Evgeniy Polyakov Date: Fri Dec 18 15:40:44 2009 +0300 pohmelfs needs I_LOCK Kill debugging printk in question Signed-off-by: Evgeniy Polyakov Signed-off-by: Al Viro commit 385e3ed4f0b81dd0b0b214050a30d352a71b95f7 Author: Roland Dreier Date: Wed Dec 16 12:48:44 2009 -0800 alloc_file(): simplify handling of mnt_clone_write() errors When alloc_file() and init_file() were combined, the error handling of mnt_clone_write() was taken into alloc_file() in a somewhat obfuscated way. Since we don't use the error code for anything except warning, we might as well warn directly without an extra variable. Signed-off-by: Roland Dreier Signed-off-by: Al Viro commit 355ffe69cb329bb9ab9eca3ebef369268162220d Author: David Vrabel Date: Tue Dec 22 13:13:28 2009 +0000 MAINTAINERS: update entries for WUSB, UWB and WLP subsystems Update the file patterns for the WUSB, UWB and WLP subsystems and add netdev@vger as the list for the WLP subsystem. Signed-off-by: David Vrabel commit 1628af5adf64cc2960bce81009f119de822f876e Author: Guennadi Liakhovetski Date: Tue Dec 22 09:26:10 2009 +0100 ASoC: add missing parameter to mx27vis_hifi_hw_free() Commit 2ccafed4 added an extra parameter to the DAI .set_pll() method, but it missed this call in sound/soc/imx/mx27vis_wm8974.c. Signed-off-by: Guennadi Liakhovetski Acked-by: Liam Girdwood Signed-off-by: Mark Brown commit b6aa179334743c6152bd63f1fa368d6db3720db9 Author: Uwe Kleine-König Date: Wed Dec 16 17:10:09 2009 +0100 ASoC: sh: FSI:: don't check platform_get_irq's return value against zero platform_get_irq returns -ENXIO on failure, so !irq was probably always true. Better use (int)irq <= 0. Note that a return value of zero is still handled as error even though this could mean irq0. This is a followup to 305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0 that changed the return value of platform_get_irq from 0 to -ENXIO on error. Signed-off-by: Uwe Kleine-König Acked-by: Liam Girdwood Signed-off-by: Mark Brown commit a9605391cfab2bf9a73e51faac5147622f73c6d5 Author: Florian Fainelli Date: Mon Dec 21 16:36:10 2009 -0800 ALSA: sound/core/pcm_timer.c: use lib/gcd.c Make sound/core/pcm_timer.c use lib/gcd.c Signed-off-by: Florian Fainelli Signed-off-by: Andrew Morton Signed-off-by: Takashi Iwai commit 9dc8398bab52931435fce403ce2eaf5822f28e58 Author: Takashi Iwai Date: Tue Dec 22 08:15:01 2009 +0100 ALSA: hda - Add MSI blacklist A machine with AMD CPU with Nvidia board doesn't work with MSI. Reported-by: Robert J. King Signed-off-by: Takashi Iwai commit 1a5ba2e9fc7999b8de2a71c7e7b9f58d752c05e4 Author: Rafael Avila de Espindola Date: Tue Dec 22 07:59:37 2009 +0100 ALSA: hda - Add support for the new 27 inch IMacs With the attached patch I am able to use the sound on a new IMac 27. What works: *) Internal speakers *) Internal microphone *) Headphone I don't have an external mic or a SPDIF device to test the rest. Signed-off-by: Rafael Avila de Espindola Signed-off-by: Takashi Iwai commit d8d881dd2c814e1500558889d800cf78d11cf898 Author: Takashi Iwai Date: Tue Dec 22 07:52:49 2009 +0100 ALSA: hda - Fix NULL dereference with enable_beep=0 option Signed-off-by: Takashi Iwai commit 3439d65062a4af6af0433c8816fd54697d782ff4 Author: Sonic Zhang Date: Tue Jul 14 13:39:47 2009 -0400 pata_bf54x: handle portmuxing of pins through GPIO PORTs By default, the PATA pins are routed to the async address lines in which case, no peripheral muxing needs to be done. However, if the pins get routed through the GPIO PORTs pins, we need to make sure to request them so that the muxing is properly set up. Signed-off-by: Sonic Zhang Signed-off-by: Bryan Wu Signed-off-by: Mike Frysinger Signed-off-by: Jeff Garzik commit 0e2c8b8f55072a98b99e7bdad55c912084d6a526 Author: Dominik Brodowski Date: Sun Dec 20 10:50:02 2009 +0100 resources: fix call to alignf() in allocate_resource() The second parameter to alignf() in allocate_resource() must reflect what new resource is attempted to be allocated, else functions like pcibios_align_resource() (at least on x86) or pcmcia_align() can't work correctly. Commit 1e5ad9679016275d422e36b12a98b0927d76f556 broke this by setting the "new" resource until we're about to return success. To keep the resource untouched when allocate_resource() fails, a "tmp" resource is introduced. Signed-off-by: Dominik Brodowski Acked-by: Bjorn Helgaas Cc: Yinghai Lu Cc: Jesse Barnes Signed-off-by: Linus Torvalds commit f7b84a6ba7eaeba4e1df8feddca1473a7db369a5 Merge: 292be57 509426b Author: Linus Torvalds Date: Mon Dec 21 10:13:37 2009 -0800 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: pata_cmd64x: fix overclocking of UDMA0-2 modes Revert "pata_cmd64x: implement serialization as per notes" commit 292be57e152ef6881089a62298c6ec885ed46f0e Merge: 1814f2d b746656 Author: Linus Torvalds Date: Mon Dec 21 10:12:25 2009 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: bnx2: Fix bnx2_netif_stop() merge error. gianfar: Fix bit definitions of IMASK_GRSC and IMASK_GTSC gianfar: Fix stats support gianfar: Fix a filer bug bnx2: fixing a timout error due not refreshing TX timers correctly can/at91: don't check platform_get_irq's return value against zero mISDN: use DECLARE_COMPLETION_ONSTACK for non-constant completion bnx2: reset_task is crashing the kernel. Fixing it. ipv6: fix an oops when force unload ipv6 module TI DaVinci EMAC: Fix MDIO bus frequency configuration e100: Fix broken cbs accounting due to missing memset. broadcom: bcm54xx_shadow_read() errors ignored in bcm54xx_adjust_rxrefclk() e1000e: LED settings in EEPROM ignored on 82571 and 82572 netxen: use module parameter correctly netns: fix net.ipv6.route.gc_min_interval_ms in netns Bluetooth: Prevent ill-timed autosuspend in USB driver Bluetooth: Fix L2CAP locking scheme regression Bluetooth: Ack L2CAP I-frames before retransmit missing packet Bluetooth: Fix unset of RemoteBusy flag for L2CAP Bluetooth: Fix PTR_ERR return of wrong pointer in hidp_setup_hid() commit 1814f2da5ebd7a516805e0a62047cb45eee10bdc Merge: 9d5eb67 70f1120 Author: Linus Torvalds Date: Mon Dec 21 10:12:00 2009 -0800 Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: Fix hotplug hang sched: Restore printk sanity commit 9d5eb6787aeb1dd0a0c71c5c41ca1b4cac3e6be4 Merge: 3d354cb 1f26cb9 Author: Linus Torvalds Date: Mon Dec 21 10:10:23 2009 -0800 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: (24 commits) ALSA: sbawe: fix memory detection ALSA: fix incorrect rounding direction in snd_interval_ratnum() ALSA: HDA: add powersaving hook for Realtek ALSA: HDA: remove useless mixers on Aspire 8930G ALSA: HDA: simplify Aspire 8930G verb array ALSA: hda: Set Front Mic to input vref 50% for Lenovo 3000 Y410 ALSA: hda/realtek: Remove extra .capsrc_nids initialization for ALC889_INTEL ALSA: Use kzalloc for allocating only one thing ALSA: AACI: switch to per-pcm locking ALSA: AACI: add double-rate support ALSA: AACI: factor common hw_params logic into aaci_pcm_hw_params ALSA: AACI: cleanup aaci_pcm_hw_params ALSA: AACI: simplify codec rate information ALSA: aaci - Fix a typo ASoC: wm8974: fix a wrong bit definition sound: sgio2audio/pdaudiocf/usb-audio: initialize PCM buffer ALSA: hda - Fix quirk for Maxdata obook4-1 ALSA: hda - Fix missing capsrc_nids for ALC88x ALSA: hda - Make use of beep device found in Dell Vostro 1015n ALSA: hda - Fixed internal mic initialization for Dell Vostro 1015 ... commit 1f26cb92a28541da1c9b27571e40b08333595773 Merge: 2c3b9b5 db8cf33 Author: Takashi Iwai Date: Mon Dec 21 12:05:40 2009 +0100 Merge branch 'fix/misc' into for-linus commit 2c3b9b50db5fe8d6039dfdfc44202fcd49eb9d00 Merge: a6c56f6 48c03ce Author: Takashi Iwai Date: Mon Dec 21 12:05:37 2009 +0100 Merge branch 'fix/asoc' into for-linus commit a6c56f611ab72a3a44dff3f26ccf7f798f2c4233 Merge: 5563935 de8853b Author: Takashi Iwai Date: Mon Dec 21 12:05:31 2009 +0100 Merge branch 'fix/hda' into for-linus commit db8cf334f66bdf1ba2b3d2f7128095fc9b7a6e2b Author: Krzysztof Helt Date: Sun Dec 20 20:15:19 2009 +0100 ALSA: sbawe: fix memory detection Memory amount is increased before a successful write-read sequence is done. Thus, 512 kB of onboard memory is detected on memoryless cards like SB32. Move the increasing of memory counter after successful read is done. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai commit 40962d7c741de1c21b6ce8516c1d9f8836fb383e Author: Krzysztof Helt Date: Sat Dec 19 18:31:04 2009 +0100 ALSA: fix incorrect rounding direction in snd_interval_ratnum() The direction of rounding is incorrect in the snd_interval_ratnum() It was detected with following parameters (sb8 driver playing 8kHz stereo file): - num is always 1000000 - requested frequency rate is from 7999 to 7999 (single frequency) The first loop calculates div_down(num, freq->min) which is 125. Thus, a frequency range's minimum value is 1000000 / 125 = 8000 Hz. The second loop calculates div_up(num, freq->max) which is 126 The frequency range's maximum value is 1000000 / 126 = 7936 Hz. The range maximum is lower than the range minimum so the function fails due to empty result range. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai commit de8853bc38ceab1fa7e7f723b21430d4aad60fea Merge: f5de24b 440b004 Author: Takashi Iwai Date: Mon Dec 21 11:21:15 2009 +0100 Merge remote branch 'alsa/fixes' into fix/hda commit f5de24b06aa46427500d0fdbe8616b73a71d8c28 Author: Hector Martin Date: Sun Dec 20 22:51:31 2009 +0100 ALSA: HDA: add powersaving hook for Realtek The current Realtek code makes no specific provision for turning stuff off. The codec chip is placed into low-power mode generically, but this doesn't turn off any external hardware connected to it, in particular external amplifiers. This patch creates a hook function that is called by the codec suspend/resume functions. It ought to disable any external hardware in a device-specific way. I've implemented a generic ALC889 function that sets the EAPD pin properly, and used it for the Acer Aspire 8930G which can benefit from this feature. On my laptop, this results in ~0.5W extra savings. Signed-off-by: Hector Martin Signed-off-by: Takashi Iwai commit 556eea9a926bff8f014b4f80522b4de97ae84213 Author: Hector Martin Date: Sun Dec 20 22:51:23 2009 +0100 ALSA: HDA: remove useless mixers on Aspire 8930G This patch removes some extra mixers that do nothing on the Acer Aspire 8930G. The CD mixer is useless because the SATA DVD/Blu-Ray drive has no analog audio output, and the Side mixer is useless because we max out at 6ch anyway. Signed-off-by: Hector Martin Signed-off-by: Takashi Iwai commit 0f86a228f4a4639b3142ce0dad208433b2db377a Author: Hector Martin Date: Sun Dec 20 22:51:18 2009 +0100 ALSA: HDA: simplify Aspire 8930G verb array This patch just simplifies the 8930G verb array a bit. Just use the common ALC889 EAPD verb array to make things more consistent. The file is already huge enough already. Signed-off-by: Hector Martin Signed-off-by: Takashi Iwai commit e2595322a3a353a59cecd7f57e7aa421ecb02d12 Author: Daniel T Chen Date: Sat Dec 19 18:19:02 2009 -0500 ALSA: hda: Set Front Mic to input vref 50% for Lenovo 3000 Y410 BugLink: https://bugs.launchpad.net/bugs/479373 The OR has verified with hda-verb that the internal microphone needs VREF50 set for audible capture. Signed-off-by: Daniel T Chen Signed-off-by: Takashi Iwai commit 3d354cbc43db36e7e8b27ed78901064b87864ffc Author: J. Bruce Fields Date: Sun Dec 20 10:43:35 2009 -0500 nfsd: fix "insecure" export option A typo in 12045a6ee9908b "nfsd: let "insecure" flag vary by pseudoflavor" reversed the sense of the "insecure" flag. Reported-by: Michael Guntsche Signed-off-by: J. Bruce Fields Signed-off-by: Linus Torvalds commit b74665606962456af7f92b1e448cee30ce70967b Author: Michael Chan Date: Sun Dec 20 18:40:18 2009 -0800 bnx2: Fix bnx2_netif_stop() merge error. The error was introduced while merging: commit 4529819c45161e4a119134f56ef504e69420bc98 bnx2: reset_task is crashing the kernel. Fixing it. Signed-off-by: Michael Chan k Signed-off-by: David S. Miller commit aa0baaef97c89de2ef216fcc017215ee01662a10 Author: Alan Stern Date: Mon Dec 21 02:46:11 2009 +0100 PM: Use pm_runtime_put_sync in system resume This patch (as1317) fixes a bug in the PM core. When a device is resumed following a system sleep, the core decrements the device's runtime PM usage counter but doesn't issue an idle notification if the counter reaches 0. This could prevent an otherwise unused device from being runtime-suspended again after the system sleep. The fix is to call pm_runtime_put_sync() instead of pm_runtime_put_noidle(). Signed-off-by: Alan Stern Signed-off-by: Rafael J. Wysocki commit 95cd34b42b43c0ed5a89a764e023189bfe7b1530 Author: Albert Herranz Date: Fri Dec 18 10:04:05 2009 +0000 powerpc/gc/wii: Remove get_irq_desc() Fix the following build failures: arch/powerpc/platforms/embedded6xx/flipper-pic.c: In function 'flipper_pic_map': arch/powerpc/platforms/embedded6xx/flipper-pic.c:105: error: implicit declaration of function 'get_irq_desc' arch/powerpc/platforms/embedded6xx/hlwd-pic.c: In function 'hlwd_pic_map': arch/powerpc/platforms/embedded6xx/hlwd-pic.c:98: error: implicit declaration of function 'get_irq_desc' These failures are caused by the changes introduced in commit "powerpc: Remove get_irq_desc()". The reason these drivers were not updated is that they weren't merged yet. Signed-off-by: Albert Herranz Signed-off-by: Benjamin Herrenschmidt commit 7ccec3e72693f48957f37949039bf2dfd1c80f22 Author: Albert Herranz Date: Fri Dec 18 10:04:42 2009 +0000 powerpc/gc/wii: hlwd-pic: convert irq_desc.lock to raw_spinlock Fix the following build failures: arch/powerpc/platforms/embedded6xx/hlwd-pic.c: In function 'hlwd_pic_irq_cascade': arch/powerpc/platforms/embedded6xx/hlwd-pic.c:135: error: passing argument 1 of 'spin_lock' from incompatible pointer type arch/powerpc/platforms/embedded6xx/hlwd-pic.c:137: error: passing argument 1 of 'spin_unlock' from incompatible pointer type arch/powerpc/platforms/embedded6xx/hlwd-pic.c:145: error: passing argument 1 of 'spin_lock' from incompatible pointer type arch/powerpc/platforms/embedded6xx/hlwd-pic.c:149: error: passing argument 1 of 'spin_unlock' from incompatible pointer type These failures are caused by the changes introduced in commit "genirq: Convert irq_desc.lock to raw_spinlock". The reason this driver was not updated is that it wasn't merged yet. Signed-off-by: Albert Herranz Signed-off-by: Benjamin Herrenschmidt commit 70f1120527797adb31c68bdc6f1b45e182c342c7 Author: Peter Zijlstra Date: Sun Dec 20 17:36:27 2009 +0100 sched: Fix hotplug hang The hot-unplug kstopmachine usage does a wakeup after deactivating the cpu, hence we cannot use cpu_active() here but must rely on the good olde online. Reported-by: Sachin Sant Reported-by: Jens Axboe Signed-off-by: Peter Zijlstra Tested-by: Jens Axboe Cc: Heiko Carstens Cc: Benjamin Herrenschmidt LKML-Reference: <1261326987.4314.24.camel@laptop> Signed-off-by: Ingo Molnar commit 8beac08ee906870b27160fab262975577d3e4338 Merge: 2593f93 a18cb38 Author: Benjamin Herrenschmidt Date: Mon Dec 21 09:30:45 2009 +1100 Merge commit 'jwb/next' into merge commit 2593f939a5fa7564ba5be0fd5aec4bb1162bd4b2 Merge: 698cd33 c1a676d Author: Benjamin Herrenschmidt Date: Mon Dec 21 09:30:42 2009 +1100 Merge commit 'kumar/next' into merge commit 509426bd46ad0903dca409803e0ee3d30f99f1e8 Author: Bartlomiej Zolnierkiewicz Date: Sun Dec 20 19:22:33 2009 +0100 pata_cmd64x: fix overclocking of UDMA0-2 modes adev->dma_mode stores the transfer mode value not UDMA mode number so the condition in cmd64x_set_dmamode() is always true and the higher UDMA clock is always selected. This can potentially result in data corruption when UDMA33 device is used, when 40-wire cable is used or when the error recovery code decides to lower the device speed down. The issue was introduced in the commit 6a40da0 ("libata cmd64x: whack into a shape that looks like the documentation") which goes back to kernel 2.6.20. Cc: stable@kernel.org Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Jeff Garzik commit 06393afde321b0fd7626b2d0966ebcaf6077de93 Author: Jeff Garzik Date: Sun Dec 20 15:39:55 2009 -0500 Revert "pata_cmd64x: implement serialization as per notes" This reverts commit d43744390e460dce6626fb8de2c02a24ff650005, because it breaks the boot on several machines (mostly sparc64, at present). Signed-off-by: Jeff Garzik commit 3df0fc5b2e9d8092dcaeb5ae0b6753d85c851d66 Author: Peter Zijlstra Date: Sun Dec 20 14:23:57 2009 +0100 sched: Restore printk sanity Revert the braindead pr_* crap. (Commit 663997d "sched: Use pr_fmt() and pr_()") It's dumb and causes stupid "sched: " strings all over the place. Signed-off-by: Peter Zijlstra Acked-by: Mike Galbraith Cc: Joe Perches Cc: Linus Torvalds Cc: Andrew Morton LKML-Reference: <1261315437.4314.6.camel@laptop> [ i dont mind the pr_*() patterns that much - but Peter dislikes them with a vengence. ] [ - v2: remove spurious diffstat from changelog :-/ ] Signed-off-by: Ingo Molnar commit 440b004cf953bec2bc8cd91c64ae707fd7e25327 Author: Jaroslav Kysela Date: Sun Dec 20 12:04:08 2009 +0100 ALSA: hda/realtek: Remove extra .capsrc_nids initialization for ALC889_INTEL Signed-off-by: Jaroslav Kysela commit 77623f62a919e729a5884c53c27a53b8a53ecb14 Merge: f748902 2fef62c Author: Jaroslav Kysela Date: Sun Dec 20 12:00:30 2009 +0100 Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into fixes commit dd59f6c76b265ed2ff18b497d6105a9511b1feb1 Merge: 70e66a5 acadbfb Author: Linus Torvalds Date: Sat Dec 19 12:38:55 2009 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6: alpha: Convert BUG() to use unreachable() alpha: Add minimal support for software performance events alpha: Wire up missing/new syscalls commit 70e66a5079b2b33f142303d31581cf03f7af98fe Merge: eca9dfc 0535f2b Author: Linus Torvalds Date: Sat Dec 19 11:04:29 2009 -0800 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: sata_mv: remove pointless NULL test pata_hpt3x2n: fix clock turnaround libata: fix reporting of drained bytes when clearing DRQ sata_mv: add power management support for the PCI controllers. sata_mv: store the board_idx into the host private data pata_octeon_cf: use resource_size(), to fix resource sizing bug libata: use the WRITE_SAME_16 define sata_mv: move the PCI bar description initialization code sata_mv: add power management support for the platform driver sata_mv: support clkdev framework sata_mv: increase PIO IORDY timeout Fixed crazy mode-change in merge. commit eca9dfcd0029c8a84b1094bb84a2fb53e4addf6c Merge: 3981e15 b5b60fd Author: Linus Torvalds Date: Sat Dec 19 09:48:42 2009 -0800 Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf session: Make events_stats u64 to avoid overflow on 32-bit arches hw-breakpoints: Fix hardware breakpoints -> perf events dependency perf events: Dont report side-band events on each cpu for per-task-per-cpu events perf events, x86/stacktrace: Fix performance/softlockup by providing a special frame pointer-only stack walker perf events, x86/stacktrace: Make stack walking optional perf events: Remove unused perf_counter.h header file perf probe: Check new event name kprobe-tracer: Check new event/group name perf probe: Check whether debugfs path is correct perf probe: Fix libdwarf include path for Debian commit 3981e152864fcc1dbbb564e1f4c0ae11a09639d2 Merge: aac3d39 18374d8 Author: Linus Torvalds Date: Sat Dec 19 09:48:14 2009 -0800 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, irq: Allow 0xff for /proc/irq/[n]/smp_affinity on an 8-cpu system Makefile: Unexport LC_ALL instead of clearing it x86: Fix objdump version check in arch/x86/tools/chkobjdump.awk x86: Reenable TSC sync check at boot, even with NONSTOP_TSC x86: Don't use POSIX character classes in gen-insn-attr-x86.awk Makefile: set LC_CTYPE, LC_COLLATE, LC_NUMERIC to C x86: Increase MAX_EARLY_RES; insufficient on 32-bit NUMA x86: Fix checking of SRAT when node 0 ram is not from 0 x86, cpuid: Add "volatile" to asm in native_cpuid() x86, msr: msrs_alloc/free for CONFIG_SMP=n x86, amd: Get multi-node CPU info from NodeId MSR instead of PCI config space x86: Add IA32_TSC_AUX MSR and use it x86, msr/cpuid: Register enough minors for the MSR and CPUID drivers initramfs: add missing decompressor error check bzip2: Add missing checks for malloc returning NULL bzip2/lzma/gzip: pre-boot malloc doesn't return NULL on failure commit aac3d39693529ca538e37ebdb6ed5d6432a697c7 Merge: 10e5453 077614e Author: Linus Torvalds Date: Sat Dec 19 09:47:49 2009 -0800 Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (25 commits) sched: Fix broken assertion sched: Assert task state bits at build time sched: Update task_state_arraypwith new states sched: Add missing state chars to TASK_STATE_TO_CHAR_STR sched: Move TASK_STATE_TO_CHAR_STR near the TASK_state bits sched: Teach might_sleep() about preemptible RCU sched: Make warning less noisy sched: Simplify set_task_cpu() sched: Remove the cfs_rq dependency from set_task_cpu() sched: Add pre and post wakeup hooks sched: Move kthread_bind() back to kthread.c sched: Fix select_task_rq() vs hotplug issues sched: Fix sched_exec() balancing sched: Ensure set_task_cpu() is never called on blocked tasks sched: Use TASK_WAKING for fork wakups sched: Select_task_rq_fair() must honour SD_LOAD_BALANCE sched: Fix task_hot() test order sched: Fix set_cpu_active() in cpu_down() sched: Mark boot-cpu active before smp_init() sched: Fix cpu_clock() in NMIs, on !CONFIG_HAVE_UNSTABLE_SCHED_CLOCK ... commit 10e5453ffa0d04a2eda3cda3f55b88cb9c04595f Merge: 3cd312c d4581a2 Author: Linus Torvalds Date: Sat Dec 19 09:47:34 2009 -0800 Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sys: Fix missing rcu protection for __task_cred() access signals: Fix more rcu assumptions signal: Fix racy access to __task_cred in kill_pid_info_as_uid() commit 3cd312c3e887b4bee2d94668a481b3d19c07732c Merge: ecd5907 cf1e367 Author: Linus Torvalds Date: Sat Dec 19 09:47:18 2009 -0800 Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: timers: Remove duplicate setting of new_base in __mod_timer() clockevents: Prevent clockevent_devices list corruption on cpu hotplug commit ecd5907a200b18aeddac68b8c734b8ad4c931205 Merge: b4c30aa 1d802e2 Author: Linus Torvalds Date: Sat Dec 19 09:46:46 2009 -0800 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: [S390] Use strim instead of strstrip to avoid false warnings. [S390] qdio: add counter for input queue full condition [S390] qdio: remove superfluous log entries and WARN_ONs. [S390] ptrace: dont abuse PT_PTRACED [S390] cio: fix channel path vary [S390] drivers: Correct size given to memset [S390] tape: Add pr_fmt() macro to all tape source files [S390] rename NT_PRXSTATUS to NT_S390_HIGHREGS [S390] tty: PTR_ERR return of wrong pointer in fs3270_open() [S390] s390: PTR_ERR return of wrong pointer in fallback_init_cip() [S390] dasd: PTR_ERR return of wrong pointer in [S390] dasd: move dasd-diag kmsg to dasd [S390] cio: fix drvdata usage for the console subchannel [S390] wire up sys_recvmmsg commit b4c30aad39805902cf5b855aa8a8b22d728ad057 Author: Al Viro Date: Sat Dec 19 16:03:30 2009 +0000 fix more leaks in audit_tree.c tag_chunk() Several leaks in audit_tree didn't get caught by commit 318b6d3d7ddbcad3d6867e630711b8a705d873d7, including the leak on normal exit in case of multiple rules refering to the same chunk. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 6f5d51148921c242680a7a1d9913384a30ab3cbe Author: Al Viro Date: Sat Dec 19 15:59:45 2009 +0000 fix braindamage in audit_tree.c untag_chunk() ... aka "Al had badly fscked up when writing that thing and nobody noticed until Eric had fixed leaks that used to mask the breakage". The function essentially creates a copy of old array sans one element and replaces the references to elements of original (they are on cyclic lists) with those to corresponding elements of new one. After that the old one is fair game for freeing. First of all, there's a dumb braino: when we get to list_replace_init we use indices for wrong arrays - position in new one with the old array and vice versa. Another bug is more subtle - termination condition is wrong if the element to be excluded happens to be the last one. We shouldn't go until we fill the new array, we should go until we'd finished the old one. Otherwise the element we are trying to kill will remain on the cyclic lists... That crap used to be masked by several leaks, so it was not quite trivial to hit. Eric had fixed some of those leaks a while ago and the shit had hit the fan... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit ef86f581f7e8b29cb58d7f4e892e1a91b3805124 Author: Julia Lawall Date: Sat Dec 19 08:18:03 2009 +0100 ALSA: Use kzalloc for allocating only one thing Use kzalloc rather than kcalloc(1,...) The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ @@ - kcalloc(1, + kzalloc( ...) // Signed-off-by: Julia Lawall Signed-off-by: Takashi Iwai commit 7c65ec7958f4f301d5d2ff50476a21e7735c73e8 Author: Sandeep Gopalpet Date: Wed Dec 16 01:15:17 2009 +0000 gianfar: Fix bit definitions of IMASK_GRSC and IMASK_GTSC Signed-off-by: Sandeep Gopalpet Signed-off-by: David S. Miller commit a7f38041b8c38d0721b042c123bd5d6bd2d21feb Author: Sandeep Gopalpet Date: Wed Dec 16 01:15:07 2009 +0000 gianfar: Fix stats support This patch updates the per rx/tx queue stats. To update the per rx queue stats a new structure has been introduced rx_q_stats. The per tx queue stats are updated via the netdev_queue structure itself. Note that we update only the tx_packtes, tx_bytes, rx_packets, rx_bytes and rx_dropped stats on a per queue basis. Signed-off-by: Sandeep Gopalpet Signed-off-by: David S. Miller commit 1ccb8389f26f2d513b06abe45d8e0b8f32458302 Author: Sandeep Gopalpet Date: Wed Dec 16 01:14:58 2009 +0000 gianfar: Fix a filer bug We need to enable filer whenever we need to use multiple RX queues. Also, need to program RIR0 register with the required distribution we require, if using RX filer hashing support for packet distribution to multiple queues. Signed-off-by: Sandeep Gopalpet Signed-off-by: David S. Miller commit e6bf95ffa8d6f8f4b7ee33ea01490d95b0bbeb6e Author: Breno Leitao Date: Fri Dec 18 20:35:34 2009 -0800 bnx2: fixing a timout error due not refreshing TX timers correctly When running the following script on an active bnx2 interface: while(true); do ifconfig ethX mtu 9000; ifconfig ethX mtu 1500; done A timeout error appears and dumps the following stack: NETDEV WATCHDOG: eth4 (bnx2): transmit queue 0 timed out ------------[ cut here ]------------ Badness at net/sched/sch_generic.c:261 This patch just fixes the way that ->trans_start is refreshed. Signed-off-by: Breno Leitao Acked-by: Michael Chan Signed-off-by: David S. Miller commit 4773a47d8a564633cd80b94df397e91e946893e2 Author: Uwe Kleine-König Date: Fri Dec 18 20:31:56 2009 -0800 can/at91: don't check platform_get_irq's return value against zero platform_get_irq returns -ENXIO on failure, so !irq was probably always true. Better use (int)irq <= 0. Note that a return value of zero is still handled as error even though this could mean irq0. This is a followup to 305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0 that changed the return value of platform_get_irq from 0 to -ENXIO on error. Signed-off-by: Uwe Kleine-König Signed-off-by: Wolfgang Grandegger Signed-off-by: David S. Miller commit 01a1e7ec6c3769dc7c5fde23ebc253c6be5f68eb Author: Yong Zhang Date: Fri Dec 18 20:30:11 2009 -0800 mISDN: use DECLARE_COMPLETION_ONSTACK for non-constant completion The _ONSTACK variant should be used for on-stack completion, otherwise it will break lockdep. Signed-off-by: Yong Zhang Acked-by: Karsten Keil Signed-off-by: David S. Miller commit 4529819c45161e4a119134f56ef504e69420bc98 Author: Breno Leitao Date: Fri Dec 18 20:29:04 2009 -0800 bnx2: reset_task is crashing the kernel. Fixing it. If bnx2 schedules a reset via the reset_task, e.g., due to a TX timeout, it's possible for the NIC to be disabled with packets pending for transmit. In this case, napi_disable will loop forever, eventually crashing the kernel. This patch moves the disable of the device to after the napi_disable call. Signed-off-by: Breno Leitao Acked-by: Michael Chan Signed-off-by: David S. Miller commit 3705e11a21bcdffe7422ee7870e1b23fe4ac70f4 Author: Yang Hongyang Date: Fri Dec 18 20:25:13 2009 -0800 ipv6: fix an oops when force unload ipv6 module When I do an ipv6 module force unload,I got the following oops: #rmmod -f ipv6 ------------[ cut here ]------------ kernel BUG at mm/slub.c:2969! invalid opcode: 0000 [#1] SMP last sysfs file: /sys/devices/pci0000:00/0000:00:11.0/0000:02:03.0/net/eth2/ifindex Modules linked in: ipv6(-) dm_multipath uinput ppdev tpm_tis tpm tpm_bios pcspkr pcnet32 mii parport_pc i2c_piix4 parport i2c_core floppy mptspi mptscsih mptbase scsi_transport_spi Pid: 2530, comm: rmmod Tainted: G R 2.6.32 #2 440BX Desktop Reference Platform/VMware Virtual Platform EIP: 0060:[] EFLAGS: 00010246 CPU: 0 EIP is at kfree+0x6a/0xdd EAX: 00000000 EBX: c09e86bc ECX: c043e4dd EDX: c14293e0 ESI: e141f1d8 EDI: e140fc31 EBP: dec58ef0 ESP: dec58ed0 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 Process rmmod (pid: 2530, ti=dec58000 task=decb1940 task.ti=dec58000) Stack: c14293e0 00000282 df624240 c0897d08 c09e86bc c09e86bc e141f1d8 dec58f1c <0> dec58f00 e140fc31 c09e84c4 e141f1bc dec58f14 c0689d21 dec58f1c e141f1bc <0> 00000000 dec58f2c c0689eff c09e84d8 c09e84d8 e141f1bc bff33a90 dec58f38 Call Trace: [] ? ipv6_frags_exit_net+0x22/0x32 [ipv6] [] ? ops_exit_list+0x19/0x3d [] ? unregister_pernet_operations+0x2a/0x51 [] ? unregister_pernet_subsys+0x17/0x24 [] ? ipv6_frag_exit+0x21/0x32 [ipv6] [] ? inet6_exit+0x47/0x122 [ipv6] [] ? sys_delete_module+0x198/0x1f6 [] ? remove_vma+0x57/0x5d [] ? do_page_fault+0x2e7/0x315 [] ? sysenter_do_call+0x12/0x28 Code: 86 00 00 00 40 c1 e8 0c c1 e0 05 01 d0 89 45 e0 66 83 38 00 79 06 8b 40 0c 89 45 e0 8b 55 e0 8b 02 84 c0 78 14 66 a9 00 c0 75 04 <0f> 0b eb fe 8b 45 e0 e8 35 15 fe ff eb 5d 8b 45 04 8b 55 e0 89 EIP: [] kfree+0x6a/0xdd SS:ESP 0068:dec58ed0 ---[ end trace 4475d1a5b0afa7e5 ]--- It's because in ip6_frags_ns_sysctl_register, "table" only alloced when "net" is not equals to "init_net".So when we free "table" in ip6_frags_ns_sysctl_unregister,we should check this first. This patch fix the problem. Signed-off-by: Yang Hongyang Signed-off-by: David S. Miller commit f9c4171e01f6befdf5d15346070b819d341c9c73 Author: Nageswari Srinivasan Date: Fri Dec 18 20:21:21 2009 -0800 TI DaVinci EMAC: Fix MDIO bus frequency configuration There was a typo in "if condition" checking for validity of MDIO bus frequency passed as part of platform data. Bitwise AND was being used instead of a Logical AND. Tested on: DM6467 EVM Signed-off-by: Nageswari Srinivasan Acked-by: Anant Gole Signed-off-by: David S. Miller commit 70abc8cb90e679d8519721e2761d8366a18212a6 Author: Roger Oksanen Date: Fri Dec 18 20:18:21 2009 -0800 e100: Fix broken cbs accounting due to missing memset. Alan Stern noticed that e100 caused slab corruption. commit 98468efddb101f8a29af974101c17ba513b07be1 changed the allocation of cbs to use dma pools that don't return zeroed memory, especially the cb->status field used to track which cb to clean, causing (the visible) double freeing of skbs and a wrong free cbs count. Now the cbs are explicitly zeroed at allocation time. Reported-by: Alan Stern Tested-by: Alan Stern Signed-off-by: Roger Oksanen Acked-by: Jesse Brandeburg Signed-off-by: David S. Miller commit 5ee6f6a17cfde9c3141e4d57cf88b5cdf638b463 Author: Roel Kluin Date: Fri Dec 18 20:16:10 2009 -0800 broadcom: bcm54xx_shadow_read() errors ignored in bcm54xx_adjust_rxrefclk() If not signed read errors are ignored. Signed-off-by: Roel Kluin Acked-by: Matt Carlson Signed-off-by: David S. Miller commit db94ce90d3d571c11637a912cc39cfb80df3879c Author: Bruce Allan Date: Fri Dec 18 20:14:59 2009 -0800 e1000e: LED settings in EEPROM ignored on 82571 and 82572 Do not override the customizable LED configuration set in the EEPROM. Signed-off-by: Bruce Allan Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller commit afdafff130142ef4d6478dcff6d9e879394fd348 Author: Stephen Hemminger Date: Fri Dec 18 20:13:35 2009 -0800 netxen: use module parameter correctly Netxen driver is doing this bogus thing to create a control file. This fails if device doesn't exist, and overall is a bad way to do the module parameter. Rather than fix borked code, just rewrite. Just using a writeable module parameter of 0/1 is the correct way Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 9c69fabe789b0eb468a0c7031ae7bb850760aea8 Author: Alexey Dobriyan Date: Fri Dec 18 20:11:03 2009 -0800 netns: fix net.ipv6.route.gc_min_interval_ms in netns sysctl table was copied, all right, but ->data for net.ipv6.route.gc_min_interval_ms was not reinitialized for "!= &init_net" case. In init_net everthing works by accident due to correct ->data initialization in source table. Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller commit 10cf1a02f444fdcd50be47cce3fa8bf08251dd9c Author: Tao Ma Date: Fri Dec 18 10:24:55 2009 +0800 ocfs2: Set i_nlink properly during reflink. We create a file in orphan dir for reflink so that if there is any error, we don't create any wrong dentry in the dir. But actually the file in orphan dir should be i_nlink = 0 so that it can be replayed and freed successfully. This patch first set i_nlink to 0 when creating the file in orphan dir and then set it to 1(reflink now only works for regular file) when we move it to the dest dir. Signed-off-by: Tao Ma Signed-off-by: Joel Becker commit c7d260afcbc0f9f4074e74796d4e3646875c08e1 Author: Tao Ma Date: Fri Dec 18 10:24:54 2009 +0800 ocfs2: Add reflinked file's inode to inode hash eariler. We used to add reflinked file's inode to inode hash when we add it to the dest dir. But actually there is a race. Consider the following sequence. 1. reflink happens and create the inode in orphan dir. 2. reflink thread is scheduled out because of some io. 3. recovery begins to work and calls ocfs2_recover_orphans. It calls ocfs2_iget and get a new inode and i_count = 1. It calls iput then and delete inode. the buffer's uptodate state is cleared. This patch move insert_inode_hash to the create function so that it can be found by step 3 and prevented from deleting because i_count > 1. This resolves the bug http://oss.oracle.com/bugzilla/show_bug.cgi?id=1183. Signed-off-by: Tao Ma Signed-off-by: Joel Becker commit d6a89fefa50feda5516cd5210ad0008a44632b52 Author: Russell King Date: Fri Dec 18 17:48:50 2009 +0000 ALSA: AACI: switch to per-pcm locking We can use finer-grained locking, which makes things easier when we gain DMA support. Signed-off-by: Russell King Signed-off-by: Takashi Iwai commit a08d56583f6b87e2981d1b6e9ee891bdc741cc44 Author: Russell King Date: Fri Dec 18 17:48:45 2009 +0000 ALSA: AACI: add double-rate support Signed-off-by: Russell King Signed-off-by: Takashi Iwai commit d3aee7996c30f928bbbbfd0994148e35d2e83084 Author: Russell King Date: Fri Dec 18 17:48:40 2009 +0000 ALSA: AACI: factor common hw_params logic into aaci_pcm_hw_params Signed-off-by: Russell King Signed-off-by: Takashi Iwai commit 4e30b69108b20eca80f1a323f969bf7629c7795f Author: Russell King Date: Fri Dec 18 17:48:37 2009 +0000 ALSA: AACI: cleanup aaci_pcm_hw_params Since the recording and playback paths are now the same, eliminate the needless conditionals. Signed-off-by: Russell King Signed-off-by: Takashi Iwai commit 6ca867c827c84d21316e9dc4035abe9480f8347c Author: Russell King Date: Fri Dec 18 17:48:35 2009 +0000 ALSA: AACI: simplify codec rate information There's no need for a specific rule; ALSA's generic AC'97 support calculates the necessary rate constraint information itself, and we can use this directly. Signed-off-by: Russell King Signed-off-by: Takashi Iwai commit d49464318a7c51676c44cbd1e2480f651cc43807 Author: Takashi Iwai Date: Fri Dec 18 20:25:30 2009 +0100 ALSA: aaci - Fix a typo Fixed a typo of the max buffer size specified for buffer allocation changed in the commit d6797322231af98b9bb4afb175dd614cf511e5f7. Signed-off-by: Takashi Iwai commit 9b0fd1149747b117e7c3e9917fdea03b774ae3d0 Author: Andres Salomon Date: Fri Dec 18 13:02:38 2009 -0500 watchdog: update geodewdt for new MFGPT API Update to the new cs5535_mfgpt* API. The geode-specific wording should eventually be dropped from this driver... Signed-off-by: Andres Salomon Signed-off-by: Linus Torvalds commit 1d802e24774c94ec7bdb12b6515226f3341533c1 Author: Heiko Carstens Date: Fri Dec 18 17:43:27 2009 +0100 [S390] Use strim instead of strstrip to avoid false warnings. Cc: Michael Holzheu Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 8bcd9b04fdbab9cee4948501f8862af2a288f1b5 Author: Jan Glauber Date: Fri Dec 18 17:43:26 2009 +0100 [S390] qdio: add counter for input queue full condition Add a counter to the qdio performance statistics that indicates that no free buffers were left in the input queue. If the counter gets increased it means that the qdio adapter filled all available buffers and possibly had more buffers ready but could not transmit them. Signed-off-by: Jan Glauber Signed-off-by: Martin Schwidefsky commit 7883097f1602c8cbb1da764a6ac43e0b8a7f56d9 Author: Jan Glauber Date: Fri Dec 18 17:43:25 2009 +0100 [S390] qdio: remove superfluous log entries and WARN_ONs. * Don't write debug feature log entries for sl, slsb and sbal since these elements can be located from the qdio_q pointer which is also logged. * Convert WARN_ON for wrong alignment of sbal to BUG_ON. * Remove WARN_ON's for wrong alignment of q / qib / slib since these alignments should be guaranteed by kmem_cache_alloc alignment / struct aligned attribute / __get_free_page. Signed-off-by: Jan Glauber Signed-off-by: Martin Schwidefsky commit ca633fd006486ed2c2d3b542283067aab61e6dc8 Author: Oleg Nesterov Date: Fri Dec 18 17:43:24 2009 +0100 [S390] ptrace: dont abuse PT_PTRACED Nobody except ptrace itself should use task->ptrace or PT_PTRACED directly, change arch/s390/kernel/traps.c to use the helper. Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit d302e1a5dbe1677a495033a2d310656a55139cdf Author: Peter Oberparleiter Date: Fri Dec 18 17:43:23 2009 +0100 [S390] cio: fix channel path vary Channel path vary is currently broken: channel paths which are varied offline are still used by Linux. The reason for this is that: * the path mask indicating which paths of an I/O device can be used is reset by each internal I/O request * the logic that checks if a path group is already in its designated target state incorrectly interprets the result "is correctly set" as "is correctly set and available" Fix this by resetting the path mask only for internal I/O requests which affect the path mask and by correcting the pgid check logic. Signed-off-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky commit 83e56d0b23f91b70a7e708ce0979a57b6c6a1507 Author: Julia Lawall Date: Fri Dec 18 17:43:22 2009 +0100 [S390] drivers: Correct size given to memset Memset should be given the size of the structure, not the size of the pointer. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ type T; T *x; expression E; @@ memset(x, E, sizeof( + * x)) // Signed-off-by: Julia Lawall Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit bb509912481214cf6ad1181c968295c62ff1ad9e Author: Michael Holzheu Date: Fri Dec 18 17:43:21 2009 +0100 [S390] tape: Add pr_fmt() macro to all tape source files Without defining the pr_fmt() macro, the "tape: " prefix will not be printed when using the pr_xxx printk macros. This patch adds the missing definitions. Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky commit 622e99bf0d54c4517cb0524540cd77257db8621a Author: Martin Schwidefsky Date: Fri Dec 18 17:43:20 2009 +0100 [S390] rename NT_PRXSTATUS to NT_S390_HIGHREGS The elf notes number for the upper register halves is s390 specific. Change the name of the elf notes to include S390. Signed-off-by: Martin Schwidefsky Signed-off-by: Martin Schwidefsky commit 2b31001d306a2b5fd690eee878d2ee61a0a0674c Author: Roel Kluin Date: Fri Dec 18 17:43:19 2009 +0100 [S390] tty: PTR_ERR return of wrong pointer in fs3270_open() Return the PTR_ERR of the correct pointer. Signed-off-by: Roel Kluin Signed-off-by: Martin Schwidefsky commit b59cdcb339fc7286161b80403f6af63acf26876f Author: Roel Kluin Date: Fri Dec 18 17:43:18 2009 +0100 [S390] s390: PTR_ERR return of wrong pointer in fallback_init_cip() Return the PTR_ERR of the correct pointer. Signed-off-by: Roel Kluin Signed-off-by: Martin Schwidefsky commit 6d53cfe590c17c28ebae2c869bb7a5ab9554b4da Author: Roel Kluin Date: Fri Dec 18 17:43:17 2009 +0100 [S390] dasd: PTR_ERR return of wrong pointer in Return the PTR_ERR of the correct pointer. Signed-off-by: Roel Kluin Signed-off-by: Martin Schwidefsky commit ea058544542a60e92fd023d93aa901709be18daa Author: Stefan Haberland Date: Fri Dec 18 17:43:16 2009 +0100 [S390] dasd: move dasd-diag kmsg to dasd The DIAG discipline does not have a own driver name. It shows up as dasd-eckd or dasd-fba. So messages for dasd-diag are moved to the generic dasd part. Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky commit ffa8d2a3e80a3f0dee9886947dbd506d2bb226d2 Author: Sebastian Ott Date: Fri Dec 18 17:43:15 2009 +0100 [S390] cio: fix drvdata usage for the console subchannel Using dev_set_drvdata prior to device_register will force the driver core to kmalloc its private data. Since we use this for the console subchannel lets set the drvdata before taking the subchannels spinlock. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky commit 70ee9518cfc8baec618e69e4ef22566dcb2f29d3 Author: Heiko Carstens Date: Fri Dec 18 17:43:14 2009 +0100 [S390] wire up sys_recvmmsg Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit b5b60fda1e462a849bc37dfbace2888191be82cc Author: Arnaldo Carvalho de Melo Date: Fri Dec 18 13:03:03 2009 -0200 perf session: Make events_stats u64 to avoid overflow on 32-bit arches Pekka Enberg reported weird percentages in perf report. It turns out we are overflowing a 32-bit variables in struct events_stats on 32-bit architectures. Before: [acme@ana linux-2.6-tip]$ perf report -i pekka.perf.data 2> /dev/null | head -10 281.96% Xorg b710a561 [.] 0x000000b710a561 140.15% Xorg [kernel] [k] __initramfs_end 51.56% metacity libgobject-2.0.so.0.2000.1 [.] 0x00000000026e46 35.12% evolution libcairo.so.2.10800.6 [.] 0x000000000203bd 33.84% metacity libpthread-2.9.so [.] 0x00000000007a3d After: [acme@ana linux-2.6-tip]$ perf report -i pekka.perf.data 2> /dev/null | head -10 30.04% Xorg b710a561 [.] 0x000000b710a561 14.93% Xorg [kernel] [k] __initramfs_end 5.49% metacity libgobject-2.0.so.0.2000.1 [.] 0x00000000026e46 3.74% evolution libcairo.so.2.10800.6 [.] 0x000000000203bd 3.61% metacity libpthread-2.9.so [.] 0x00000000007a3d Reported-by: Pekka Enberg Tested-by: Pekka Enberg Signed-off-by: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <1261148583-20395-1-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar commit 48c03ce72f2665f79a3fe54fc6d71b8cc3d30803 Author: Guennadi Liakhovetski Date: Thu Dec 17 14:51:35 2009 +0100 ASoC: wm8974: fix a wrong bit definition The wm8974 datasheet defines BUFIOEN as bit 2. Signed-off-by: Guennadi Liakhovetski Acked-by: Liam Girdwood Signed-off-by: Mark Brown Cc: stable@kernel.org commit 99e8c5a3b875a34d894a711c9a3669858d6adf45 Author: Frederic Weisbecker Date: Thu Dec 17 01:33:54 2009 +0100 hw-breakpoints: Fix hardware breakpoints -> perf events dependency The kbuild's select command doesn't propagate through the config dependencies. Hence the current rules of hardware breakpoint's config can't ensure perf can never be disabled under us. We have: config X86 selects HAVE_HW_BREAKPOINTS config HAVE_HW_BREAKPOINTS select PERF_EVENTS config PERF_EVENTS [...] x86 will select the breakpoints but that won't propagate to perf events. The user can still disable the latter, but it is necessary for the breakpoints. What we need is: - x86 selects HAVE_HW_BREAKPOINTS and PERF_EVENTS - HAVE_HW_BREAKPOINTS depends on PERF_EVENTS so that we ensure PERF_EVENTS is enabled and frozen for x86. This fixes the following kind of build errors: In file included from arch/x86/kernel/hw_breakpoint.c:31: include/linux/hw_breakpoint.h: In function 'hw_breakpoint_addr': include/linux/hw_breakpoint.h:39: error: 'struct perf_event' has no member named 'attr' v2: Select also ANON_INODES from x86, required for perf Reported-by: Cyrill Gorcunov Reported-by: Michal Marek Reported-by: Andrew Randrianasulu Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Paul Mackerras Cc: Randy Dunlap Cc: K.Prasad LKML-Reference: <1261010034-7786-1-git-send-regression-fweisbec@gmail.com> Signed-off-by: Ingo Molnar commit 3e85fd614c7b6bb7f33bb04a0dcb5a3bfca4c0fe Author: Clemens Ladisch Date: Fri Dec 18 09:27:24 2009 +0100 sound: sgio2audio/pdaudiocf/usb-audio: initialize PCM buffer When allocating the PCM buffer, use vmalloc_user() instead of vmalloc(). Otherwise, it would be possible for applications to play the previous contents of the kernel memory to the speakers, or to read it directly if the buffer is exported to userspace. Signed-off-by: Clemens Ladisch Cc: Signed-off-by: Takashi Iwai commit 2fef62c825f09e29d2f52dc187ddf6f99e28c7f1 Author: Takashi Iwai Date: Fri Dec 18 08:48:42 2009 +0100 ALSA: hda - Fix quirk for Maxdata obook4-1 Works fine with the auto-parser. Reference: Novell bnc#564940 https://bugzilla.novell.com/show_bug.cgi?id=564940 Signed-off-by: Takashi Iwai commit acadbfb90a54673d6c8b05aa4e93218433890411 Author: David Daney Date: Thu Dec 10 18:07:24 2009 -0500 alpha: Convert BUG() to use unreachable() Use the new unreachable() macro instead of for(;;); Signed-off-by: David Daney CC: Richard Henderson CC: Ivan Kokshaysky CC: linux-alpha@vger.kernel.org Signed-off-by: Matt Turner commit a582e6f01b90211933e70edcec9bc0bbb1157402 Author: Michael Cree Date: Tue Dec 8 14:27:01 2009 -0500 alpha: Add minimal support for software performance events In the kernel the patch enables configuration of the perf event option, adds the perf_event_open syscall, and includes a minimal architecture specific asm/perf_event.h header file. Signed-off-by: Michael Cree Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Signed-off-by: Matt Turner commit 21797c599c710d3851d241c4b50690f2482bf618 Author: Daniele Calore Date: Tue Dec 8 13:59:47 2009 -0500 alpha: Wire up missing/new syscalls This wire up the: fallocate, timerfd_create, timerfd_settime, timerfd_gettime, signalfd4, eventfd2, epoll_create1, dup3, pipe2, inotify_init1, preadv, pwritev and rt_tgsigqueueinfo syscalls for the alpha port. For umount2, alpha have an "old" and "new" version called: oldumount and umount; so ignore umount2. Rebased on top of 6e17e8b9fb74b9fb9f6ea331f7f4a049c5b4c4b8 by Matt Turner. Signed-off-by: Daniele Calore Cc: Richard Henderson Cc: Ivan Kokshaysky Signed-off-by: Matt Turner commit 18374d89e5fe96772102f44f535efb1198d9be08 Author: Suresh Siddha Date: Thu Dec 17 18:29:46 2009 -0800 x86, irq: Allow 0xff for /proc/irq/[n]/smp_affinity on an 8-cpu system John Blackwood reported: > on an older Dell PowerEdge 6650 system with 8 cpus (4 are hyper-threaded), > and 32 bit (x86) kernel, once you change the irq smp_affinity of an irq > to be less than all cpus in the system, you can never change really the > irq smp_affinity back to be all cpus in the system (0xff) again, > even though no error status is returned on the "/bin/echo ff > > /proc/irq/[n]/smp_affinity" operation. > > This is due to that fact that BAD_APICID has the same value as > all cpus (0xff) on 32bit kernels, and thus the value returned from > set_desc_affinity() via the cpu_mask_to_apicid_and() function is treated > as a failure in set_ioapic_affinity_irq_desc(), and no affinity changes > are made. set_desc_affinity() is already checking if the incoming cpu mask intersects with the cpu online mask or not. So there is no need for the apic op cpu_mask_to_apicid_and() to check again and return BAD_APICID. Remove the BAD_APICID return value from cpu_mask_to_apicid_and() and also fix set_desc_affinity() to return -1 instead of using BAD_APICID to represent error conditions (as cpu_mask_to_apicid_and() can return logical or physical apicid values and BAD_APICID is really to represent bad physical apic id). Reported-by: John Blackwood Root-caused-by: John Blackwood Signed-off-by: Suresh Siddha LKML-Reference: <1261103386.2535.409.camel@sbs-t61> Signed-off-by: H. Peter Anvin commit 698cd335a782561b79504d4e98c7df62b08e7abd Author: Albert Herranz Date: Thu Dec 17 08:33:41 2009 +0000 powerpc/gamecube/wii: Fix off-by-one error in ugecon/usbgecko_udbg The retry logic in ug_putc() is broken. If the TX fifo is not ready and the counter runs out it will have a value of -1 and no transfer should be attempted. Also, a counter with a value of 0 means that the TX fifo got ready in the last try and the transfer should be attempted. Reported-by: "Juha Leppanen" Signed-off-by: "Juha Leppanen" Signed-off-by: Albert Herranz Signed-off-by: Benjamin Herrenschmidt commit 38e1313fc753482b93aa6c6f11cfbd43a5bcd963 Author: Yang Li Date: Wed Dec 16 20:18:11 2009 +0000 powerpc/mpic: Fix problem that affinity is not updated Since commit 57b150cce8e004ddd36330490a68bfb59b7271e9, desc->affinity of an irq is changed after calling desc->chip->set_affinity. Therefore we need to fix the irq_choose_cpu() not to depend on the desc->affinity for new mask. Signed-off-by: Jiajun Wu Signed-off-by: Li Yang Signed-off-by: Benjamin Herrenschmidt commit a1128f8f0ff06ccbea5d6b4a69446b506c57bfbc Author: David Gibson Date: Wed Dec 16 14:29:56 2009 +0000 powerpc/mm: Fix stupid bug in subpge protection handling Commit d28513bc7f675d28b479db666d572e078ecf182d ("Fix bug in pagetable cache cleanup with CONFIG_PPC_SUBPAGE_PROT"), itself a fix for breakage caused by an earlier clean up patch of mine, contains a stupid bug. I changed the parameters of the subpage_protection() function, but failed to update one of the callers. This patch fixes it, and replaces a void * with a typed pointer so that the compiler will warn on such an error in future. Signed-off-by: David Gibson Signed-off-by: Benjamin Herrenschmidt commit c3a66359398028cd8e5f32611950dc7dc32ea2f2 Author: Yong Zhang Date: Wed Dec 16 04:35:57 2009 +0000 powerpc/iseries: use DECLARE_COMPLETION_ONSTACK for non-constant completion The _ONSTACK variant should be used for on-stack completion, otherwise it will break lockdep. Signed-off-by: Yong Zhang Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@ozlabs.org Signed-off-by: Benjamin Herrenschmidt commit 7a96c6b22efbd84e195836e192a3ce478cd6e14c Author: Benjamin Herrenschmidt Date: Mon Dec 14 15:31:13 2009 +0000 powerpc: Fix MSI support on U4 bridge PCIe slot On machines using the Apple U4 bridge (AKA IBM CPC945) PCIe interface such as the latest generation G5 machines x16 slot or the x16 slot of the PowerStation, MSIs are currently broken (and will oops when enabling). This fixes the oops and implements proper support for those. Instead of using the PCIe <-> HT bridge conversion, on such slots we need to use a bunch of magic registers in the bridge as the MSI target, encoding the interrupt number in the low bits of the address itself Signed-off-by: Benjamin Herrenschmidt commit bb7f20b1c639606def3b91f4e4aca6daeee5d80a Author: Neil Campbell Date: Mon Dec 14 04:08:57 2009 +0000 powerpc: Handle VSX alignment faults correctly in little-endian mode This patch fixes the handling of VSX alignment faults in little-endian mode (the current code assumes the processor is in big-endian mode). The patch also makes the handlers clear the top 8 bytes of the register when handling an 8 byte VSX load. This is based on 2.6.32. Signed-off-by: Neil Campbell Cc: Acked-by: Michael Neuling Signed-off-by: Benjamin Herrenschmidt commit f04b10cddb0fbceadbad7af38c31543298948d8f Author: Yang Li Date: Mon Dec 14 03:01:49 2009 +0000 powerpc/mm: Fix typo of cpumask_clear_cpu() The function name of cpumask_clear_cpu was not correct. Fortunately nobody uses that code with hotplug yet :-) Reported-by: Jin Qing Signed-off-by: Li Yang Signed-off-by: Benjamin Herrenschmidt commit 5c3399198791f7f828eb9fd504dbb46eef3cb472 Author: Sachin P. Sant Date: Sun Dec 13 21:15:12 2009 +0000 powerpc/mm: Fix hash_utils_64.c compile errors with DEBUG enabled. This time without the funny characters. Fix following build errors generated with DEBUG=1 cc1: warnings being treated as errors arch/powerpc/mm/hash_utils_64.c: In function 'htab_dt_scan_page_sizes': arch/powerpc/mm/hash_utils_64.c:343: error: format '%04x' expects type 'unsigned int', but argument 4 has type 'long unsigned int' arch/powerpc/mm/hash_utils_64.c:343: error: format '%08x' expects type 'unsigned int', but argument 5 has type 'long unsigned int' arch/powerpc/mm/hash_utils_64.c: In function 'htab_initialize': arch/powerpc/mm/hash_utils_64.c:666: error: format '%x' expects type 'unsigned int', but argument 4 has type 'long unsigned int' ... SNIP ... Signed-off-by: Sachin Sant Signed-off-by: Benjamin Herrenschmidt commit 01ae45bcd48527e90923d4a247259770eb836d2b Author: David Daney Date: Thu Dec 10 07:28:19 2009 +0000 powerpc: Convert BUG() to use unreachable() Use the new unreachable() macro instead of for(;;); Signed-off-by: David Daney CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: linuxppc-dev@ozlabs.org Signed-off-by: Benjamin Herrenschmidt commit 3d9b740b2d8d73795d745a46eabd55479ee68dcc Author: Gautham R Shenoy Date: Thu Dec 10 01:19:42 2009 +0000 powerpc/pseries: Make declarations of cpu_hotplug_driver_lock() ANSI compatible. And add the __acquires() and __releases() annotations, while at it. Signed-off-by: Gautham R Shenoy Signed-off-by: Benjamin Herrenschmidt commit e9edb232d3b0848457a83a5b697f55264542892f Author: Gautham R Shenoy Date: Thu Dec 10 01:19:37 2009 +0000 powerpc/pseries: Don't panic when H_PROD fails during cpu-online. If an online-attempt on a CPU which has been offlined using H_CEDE with an appropriate cede latency hint fails, don't panic. Instead print the error message and let the __cpu_up() code notify the CPU Hotplug framework of the failure, which in turn can notify the other subsystem through CPU_UP_CANCELED. Signed-off-by: Gautham R Shenoy Signed-off-by: Benjamin Herrenschmidt commit 50891457f1001450be61be0861b2b49abdcb5fb9 Author: Benjamin Herrenschmidt Date: Tue Dec 8 21:08:44 2009 +0000 powerpc/mm: Fix a WARN_ON() with CONFIG_DEBUG_PAGEALLOC and CONFIG_DEBUG_VM Set need to call __set_pte_at() and not set_pte_at() from __change_page_attr() since the later will perform checks with CONFIG_DEBUG_VM that aren't suitable to the way we override an existing PTE. (More specifically, it doesn't let you write over a present PTE). Signed-off-by: Benjamin Herrenschmidt commit 030bdc3fd0807b6097a937468859f4b4baf1b950 Author: Anton Blanchard Date: Sun Dec 6 17:48:33 2009 +0000 powerpc/defconfigs: Set HZ=100 on pseries and ppc64 defconfigs Now we have high res timers there is less of a reason for a high HZ value. Furthermore I think there a few reasons we should reduce HZ to 100: - Timer interrupt overhead. While this overhead is small, there are applications that are very sensitive to jitter (eg some HPC apps). - Issues with the timer wheel code. When coming out of NO_HZ idle we work our way through the timer code one tick at a time. If we have been idle a long time, this adds up - I sometimes see milliseconds of time spent in that loop. Long term we should fix the timer wheel algorithm, but for now if we reduce HZ then we reduce the amount of work the timer code has to do when coming out of idle. Signed-off-by: Anton Blanchard Signed-off-by: Benjamin Herrenschmidt commit 55f2fa147392ffd23cec56cbb3d85ab5b3ebc125 Author: Anton Blanchard Date: Sun Dec 6 17:45:55 2009 +0000 powerpc/defconfigs: Disable token ring in powerpc defconfigs Token what? Lets save some space in our powerpc kernels and remove token ring support. Signed-off-by: Anton Blanchard Signed-off-by: Benjamin Herrenschmidt commit c2613c7f80eca4d334b3da18a2059d82b750b628 Author: Anton Blanchard Date: Sun Dec 6 17:45:09 2009 +0000 powerpc/defconfigs: Reduce 64bit vmlinux by making acenic and cramfs modules Machines with acenic adapters are rare these days, so we may as well make it a module. Cramfs is also very rarely used so we can make it a module. Together this saves 143kB on a 64bit compile: text data bss dec hex filename 8247176 1729404 1221988 11198568 aae068 vmlinux~ 8134997 1727588 1188836 11051421 a8a19d vmlinux Signed-off-by: Anton Blanchard Signed-off-by: Benjamin Herrenschmidt commit 8a55c4ba3ed95f3f73f5ee371e863a1deadaec5f Author: Mel Gorman Date: Fri Nov 27 06:33:58 2009 +0000 powerpc/pseries: Select XICS and PCI_MSI PSERIES It's possible to set CONFIG_XICS without CONFIG_PCI_MSI. When that happens, the kernel fails to build with arch/powerpc/platforms/built-in.o: In function `.xics_startup': xics.c:(.text+0x12f60): undefined reference to `.unmask_msi_irq' make: *** [.tmp_vmlinux1] Error 1 Furthermore, as noted by Benjamin Herrenschmidt, "CONFIG_XICS should be made invisible and selected by PSERIES." This patch fixes PSERIES to select both options Signed-off-by: Mel Gorman Signed-off-by: Benjamin Herrenschmidt commit 29827b02dc5d1eed8a1ff8b34cd1926966a87e89 Author: Roel Kluin Date: Thu Dec 17 14:45:15 2009 +0000 powerpc/85xx: Wrong variable returned on error The wrong variable was returned in the case of an error. Signed-off-by: Roel Kluin Cc: Kumar Gala Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Benjamin Herrenschmidt commit 5c916a295f27dbc0df4769a53b109666506bd061 Author: Alexey Dobriyan Date: Thu Dec 17 14:45:05 2009 +0000 powerpc/iseries: Convert to proc_fops Signed-off-by: Alexey Dobriyan Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Benjamin Herrenschmidt commit 14b8a76b9d53346f2871bf419da2aaf219940c50 Author: Robert Jennings Date: Thu Dec 17 14:44:52 2009 +0000 powerpc: Make the CMM memory hotplug aware The Collaborative Memory Manager (CMM) module allocates individual pages over time that are not migratable. On a long running system this can severely impact the ability to find enough pages to support a hotplug memory remove operation. This patch adds a memory isolation notifier and a memory hotplug notifier. The memory isolation notifier will return the number of pages found in the range specified. This is used to determine if all of the used pages in a pageblock are owned by the balloon (or other entities in the notifier chain). The hotplug notifier will free pages in the range which is to be removed. The priority of this hotplug notifier is low so that it will be called near last, this helps avoids removing loaned pages in operations that fail due to other handlers. CMM activity will be halted when hotplug remove operations are active and resume activity after a delay period to allow the hypervisor time to adjust. Signed-off-by: Robert Jennings Cc: Mel Gorman Cc: Ingo Molnar Cc: Brian King Cc: Paul Mackerras Cc: Martin Schwidefsky Cc: Gerald Schaefer Cc: KAMEZAWA Hiroyuki Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Benjamin Herrenschmidt commit 925cc71e512a29e2594bcc17dc58d0a0e9c4d524 Author: Robert Jennings Date: Thu Dec 17 14:44:38 2009 +0000 mm: Add notifier in pageblock isolation for balloon drivers Memory balloon drivers can allocate a large amount of memory which is not movable but could be freed to accomodate memory hotplug remove. Prior to calling the memory hotplug notifier chain the memory in the pageblock is isolated. Currently, if the migrate type is not MIGRATE_MOVABLE the isolation will not proceed, causing the memory removal for that page range to fail. Rather than failing pageblock isolation if the migrateteype is not MIGRATE_MOVABLE, this patch checks if all of the pages in the pageblock, and not on the LRU, are owned by a registered balloon driver (or other entity) using a notifier chain. If all of the non-movable pages are owned by a balloon, they can be freed later through the memory notifier chain and the range can still be isolated in set_migratetype_isolate(). Signed-off-by: Robert Jennings Cc: Mel Gorman Cc: Ingo Molnar Cc: Brian King Cc: Paul Mackerras Cc: Martin Schwidefsky Cc: Gerald Schaefer Cc: KAMEZAWA Hiroyuki Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Benjamin Herrenschmidt commit ed8b67040965e4fe695db333d5914e18ea5f146f Author: Arnd Bergmann Date: Wed Dec 16 22:17:09 2009 +0000 drm: convert drm_ioctl to unlocked_ioctl drm_ioctl is called with the Big Kernel Lock held, which shows up very high in statistics on vfs_ioctl. Moving the lock into the drm_ioctl function itself makes sure we blame the right subsystem and it gets us one step closer to eliminating the locked version of fops->ioctl. Since drm_ioctl does not require the lock itself, we only need to hold it while calling the specific handler. The 32 bit conversion handlers do not interact with any other code, so they don't need the BKL here either and can just call drm_ioctl. As a bonus, this cleans up all the other users of drm_ioctl which now no longer have to find the inode or call lock_kernel. [airlied: squashed the non-driver bits of the second patch in here, this provides the flag for drivers to use to select unlocked ioctls - but doesn't modify any drivers]. Signed-off-by: Arnd Bergmann Cc: David Airlie Cc: dri-devel@lists.sourceforge.net Cc: Frederic Weisbecker Cc: Thomas Gleixner Signed-off-by: Dave Airlie commit ecf762b2581e12ac761d12a6e4e297c2224aa899 Author: Rafael J. Wysocki Date: Fri Dec 18 01:57:47 2009 +0100 PM: Measure device suspend and resume times Measure and print the time of suspending and resuming all devices. Signed-off-by: Rafael J. Wysocki commit 875ab0b74e85d6801a49392447d26e0b28688d86 Author: Rafael J. Wysocki Date: Fri Dec 18 01:57:31 2009 +0100 PM: Make the initcall_debug style timing for suspend/resume complete Commit f2511774863487e61b56a97da07ebf8dd61d7836 (PM: Add initcall_debug style timing for suspend/resume) introduced basic timing instrumentation, needed for a scritps/bootgraph.pl equivalent or humans, but it missed the fact that bus types and device classes which haven't been switched to using struct dev_pm_ops objects yet need special handling. As a result, the suspend/resume timing information is only available for devices whose bus types or device classes use struct dev_pm_ops objects, so the majority of devices is not covered. Fix this by adding basic suspend/resume timing instrumentation for devices whose bus types and device classes still don't use struct dev_pm_ops objects for power management. To reduce code duplication move the timing code to helper functions. Signed-off-by: Rafael J. Wysocki commit dcd6dfcfe959bade75fbf49499775985d2cac5d5 Merge: cbc8cc0 d785d78 Author: Dave Airlie Date: Fri Dec 18 09:56:49 2009 +1000 Merge branch 'drm-linus' into drm-core-next commit cbc8cc049aefd571ebc3c255dc3e265f736751c0 Merge: 5012f50 fb1d973 Author: Dave Airlie Date: Fri Dec 18 09:53:50 2009 +1000 Merge remote branch 'korg/drm-vmware-staging' into drm-core-next commit 06b5dc646b9479b786d77749936f25910cd82a37 Author: H. Peter Anvin Date: Thu Dec 17 15:51:37 2009 -0800 Makefile: Unexport LC_ALL instead of clearing it Apparently not all versions of glibc and utilities treat an empty LC_ALL as nonexistent, causing error messages to be garbled. Instead, explicitly unexport it from the environment. Reported-and-tested-by: Masami Hiramatsu Signed-off-by: H. Peter Anvin LKML-Reference: <4B2AC394.4030108@redhat.com> Cc: Michal Marek Cc: Roland Dreier Cc: Sam Ravnborg commit 8c63450718ea62ee3a70bffde170b4d15fc72d3c Author: akpm@linux-foundation.org Date: Thu Dec 17 15:26:36 2009 -0800 x86: Fix objdump version check in arch/x86/tools/chkobjdump.awk It says Warning: objdump version is older than 2.19 Warning: Skipping posttest. because it used the wrong field from `objdump -v': akpm:/usr/src/25> /opt/crosstool/gcc-4.0.2-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-objdump -v GNU objdump 2.16.1 Copyright 2005 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty. Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Andrew Morton LKML-Reference: <200912172326.nBHNQaQl024796@imap1.linux-foundation.org> Signed-off-by: H. Peter Anvin Cc: Masami Hiramatsu commit 6c56ccecf05fafe100ab4ea94f6fccbf5ff00db7 Author: Pallipadi, Venkatesh Date: Thu Dec 17 12:27:02 2009 -0800 x86: Reenable TSC sync check at boot, even with NONSTOP_TSC Commit 83ce4009 did the following change If the TSC is constant and non-stop, also set it reliable. But, there seems to be few systems that will end up with TSC warp across sockets, depending on how the cpus come out of reset. Skipping TSC sync test on such systems may result in time inconsistency later. So, reenable TSC sync test even on constant and non-stop TSC systems. Set, sched_clock_stable to 1 by default and reset it in mark_tsc_unstable, if TSC sync fails. This change still gives perf benefit mentioned in 83ce4009 for systems where TSC is reliable. Signed-off-by: Venkatesh Pallipadi Acked-by: Suresh Siddha LKML-Reference: <20091217202702.GA18015@linux-os.sc.intel.com> Signed-off-by: H. Peter Anvin commit 652fd781a52ad6e24b908cd8b83d12699754f253 Author: Oliver Neukum Date: Wed Dec 16 19:23:43 2009 +0100 Bluetooth: Prevent ill-timed autosuspend in USB driver The device must be marked busy as it receives data. Signed-off-by: Oliver Neukum Tested-by: Matthew Garrett Signed-off-by: Marcel Holtmann commit b13f5860447a98daf0358a51fbff66154ac0663a Author: Andrei Emeltchenko Date: Tue Dec 15 11:38:04 2009 +0200 Bluetooth: Fix L2CAP locking scheme regression When locking was introduced the error path branch was not taken into account. Error was found in sparse code checking. Kudos to Jani Nikula. Signed-off-by: Andrei Emeltchenko Acked-by: Gustavo F. Padovan Signed-off-by: Marcel Holtmann commit 186ee8cf0130993dea8ab8867ff1af8a148f9ae6 Author: Gustavo F. Padovan Date: Tue Dec 15 20:13:27 2009 -0200 Bluetooth: Ack L2CAP I-frames before retransmit missing packet Moving the Ack to before l2cap_retransmit_frame() we can avoid the case where txWindow is full and the packet can't be retransmited. Signed-off-by: Gustavo F. Padovan Signed-off-by: Marcel Holtmann commit 186de9a33803c7ee20d9af75c9049b50e68a3a08 Author: Gustavo F. Padovan Date: Tue Dec 15 15:56:34 2009 -0200 Bluetooth: Fix unset of RemoteBusy flag for L2CAP RemoteBusy flag need to be unset before l2cap_ertm_send(), otherwise l2cap_ertm_send() will return without sending packets because it checks that flag before start sending. Signed-off-by: Gustavo F. Padovan Signed-off-by: Marcel Holtmann commit 971beb83aeb2a309175682cf5683d64fd4591841 Author: Roel Kluin Date: Mon Dec 7 14:23:21 2009 +0100 Bluetooth: Fix PTR_ERR return of wrong pointer in hidp_setup_hid() Return the PTR_ERR of the correct pointer. Signed-off-by: Roel Kluin Signed-off-by: Marcel Holtmann commit 4beb3d6d144c41525541cce2b611858b2645c725 Author: Roland Dreier Date: Wed Dec 16 17:39:48 2009 -0800 x86: Don't use POSIX character classes in gen-insn-attr-x86.awk Not all awk implementations (including the default awk in Ubuntu 9.10) support POSIX character classes. Since x86-opcode-map.txt is plain ASCII, we can just use explicit ranges for lower case, alphabetic, and alphanumeric characters instead. Signed-off-by: Roland Dreier Acked-by: Masami Hiramatsu LKML-Reference: Signed-off-by: H. Peter Anvin commit c051346b7db27aaf674b8f3b4955240580b2a58a Author: H. Peter Anvin Date: Thu Dec 17 06:56:11 2009 -0800 Makefile: set LC_CTYPE, LC_COLLATE, LC_NUMERIC to C There are a number of common Unix constructs like character ranges in grep/sed/awk which don't work as expected with LC_COLLATE set to other than C. Similarly, set LC_CTYPE and LC_NUMERIC to C to avoid other nasty surprises. In order to make sure these actually take effect we also have to clear LC_ALL. Signed-off-by: H. Peter Anvin Acked-by: Michal Marek Acked-by: Masami Hiramatsu Acked-by: Roland Dreier Cc: Sam Ravnborg LKML-Reference: <4B2A1761.4070904@suse.cz> commit 035eb0cff0671ada49ba9f3e5c9e7b0cb950efea Author: Takashi Iwai Date: Thu Dec 17 15:00:26 2009 +0100 ALSA: hda - Fix missing capsrc_nids for ALC88x Some model quirks missed the corresponding capsrc_nids. This resulted in non-working capture source selection. Signed-off-by: Takashi Iwai Cc: commit 077614ee1e93245a3b9a4e1213659405dbeb0ba6 Author: Peter Zijlstra Date: Thu Dec 17 13:16:31 2009 +0100 sched: Fix broken assertion There's a preemption race in the set_task_cpu() debug check in that when we get preempted after setting task->state we'd still be on the rq proper, but fail the test. Check for preempted tasks, since those are always on the RQ. Signed-off-by: Peter Zijlstra LKML-Reference: <20091217121830.137155561@chello.nl> Signed-off-by: Ingo Molnar commit e1781538cf5c870ab696e9b8f0a5c498d3900f2f Author: Peter Zijlstra Date: Thu Dec 17 13:16:30 2009 +0100 sched: Assert task state bits at build time Since everybody is lazy and prone to forgetting things, make the compiler help us a bit. Signed-off-by: Peter Zijlstra LKML-Reference: <20091217121830.060186433@chello.nl> Signed-off-by: Ingo Molnar commit 464763cf1c6df632dccc8f2f4c7e50163154a2c0 Author: Peter Zijlstra Date: Thu Dec 17 13:16:29 2009 +0100 sched: Update task_state_arraypwith new states Neglected because its hidden... (who reads comments anyway) Signed-off-by: Peter Zijlstra LKML-Reference: <20091217121829.970166036@chello.nl> Signed-off-by: Ingo Molnar commit 44d90df6b757c59651ddd55f1a84f28132b50d29 Author: Peter Zijlstra Date: Thu Dec 17 13:16:28 2009 +0100 sched: Add missing state chars to TASK_STATE_TO_CHAR_STR We grew 3 new task states since the last time someone touched it. Signed-off-by: Peter Zijlstra LKML-Reference: <20091217121829.892737686@chello.nl> Signed-off-by: Ingo Molnar commit 733421516b42c44b9e21f1793c430cc801ef8324 Author: Peter Zijlstra Date: Thu Dec 17 13:16:27 2009 +0100 sched: Move TASK_STATE_TO_CHAR_STR near the TASK_state bits So that we don't keep forgetting about it. Signed-off-by: Peter Zijlstra LKML-Reference: <20091217121829.815779372@chello.nl> Signed-off-by: Ingo Molnar commit 5d27c23df09b702868d9a3bff86ec6abd22963ac Author: Peter Zijlstra Date: Thu Dec 17 13:16:32 2009 +0100 perf events: Dont report side-band events on each cpu for per-task-per-cpu events Acme noticed that his FORK/MMAP numbers were inflated by about the same factor as his cpu-count. This led to the discovery of a few more sites that need to respect the event->cpu filter. Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <20091217121830.215333434@chello.nl> Signed-off-by: Ingo Molnar commit c0f8faf0c7cd497ec7c1d61e1e9424f4384c1f68 Author: Einar Rünkaru Date: Wed Dec 16 22:41:36 2009 +0200 ALSA: hda - Make use of beep device found in Dell Vostro 1015n Conexant CX20583-10Z has digital beep device with volume control. Making use of them. Signed-off-by: Einar Rünkaru Signed-off-by: Takashi Iwai commit 254bba6a7e28c77d8b32d9eaeba02d4943ee844e Author: Einar Rünkaru Date: Wed Dec 16 22:16:13 2009 +0200 ALSA: hda - Fixed internal mic initialization for Dell Vostro 1015 Fixed initialization of internal mic and added internal mic boost control Renamed analog mic boost control to ext mic boost contol. Name pair analog/digital seems too confusing for a normal user. Signed-off-by: Einar Rünkaru Signed-off-by: Takashi Iwai commit ebb83eeb6469bedda83b4dc6f23ddf93eb32b347 Author: Kailang Yang Date: Thu Dec 17 12:23:00 2009 +0100 ALSA: hda - More ALC663 fixes and support of compatible chips 1. Add more ASUS NB model. 2. Fixed alc663_m51va_setup M51VA has Digital Mic that NID is 0x12. The record source index is 0x9 for ALC663. So, to modify the alc663_m51va_setup function to index 0x9 and add analog Mic aupport function alc663_mode1_setup. 3. Add ASUS mode7 and mode8 modules for ALC663 Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai commit 2fbe74b90bafebce615466b4c20f96b0465df1ae Author: Roel Kluin Date: Wed Dec 16 16:54:43 2009 +0100 sound/oss/pss: Fix test of unsigned in pss_reset_dsp() and pss_download_boot() limit and jiffies are unsigned so the test did not work. Signed-off-by: Roel Kluin Signed-off-by: Takashi Iwai commit 06d65bda75341485d32f33da474b0664819ad497 Author: Frederic Weisbecker Date: Thu Dec 17 05:40:34 2009 +0100 perf events, x86/stacktrace: Fix performance/softlockup by providing a special frame pointer-only stack walker It's just wasteful for stacktrace users like perf to walk through every entries on the stack whereas these only accept reliable ones, ie: that the frame pointer validates. Since perf requires pure reliable stacktraces, it needs a stack walker based on frame pointers-only to optimize the stacktrace processing. This might solve some near-lockup scenarios that can be triggered by call-graph tracing timer events. Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Paul Mackerras LKML-Reference: <1261024834-5336-2-git-send-regression-fweisbec@gmail.com> [ v2: fix for modular builds and small detail tidyup ] Signed-off-by: Ingo Molnar commit 61c1917f47f73c968e92d04d15370b1dc3ec4592 Author: Frederic Weisbecker Date: Thu Dec 17 05:40:33 2009 +0100 perf events, x86/stacktrace: Make stack walking optional The current print_context_stack helper that does the stack walking job is good for usual stacktraces as it walks through all the stack and reports even addresses that look unreliable, which is nice when we don't have frame pointers for example. But we have users like perf that only require reliable stacktraces, and those may want a more adapted stack walker, so lets make this function a callback in stacktrace_ops that users can tune for their needs. Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Paul Mackerras LKML-Reference: <1261024834-5336-1-git-send-regression-fweisbec@gmail.com> Signed-off-by: Ingo Molnar commit 5b74ed4729ad2b2017453add68104a83206caefb Author: Robert P. J. Day Date: Wed Dec 16 10:09:45 2009 -0500 perf events: Remove unused perf_counter.h header file Since nothing includes the file and it's also not exported to user space, remove it. Signed-off-by: Robert P. J. Day Cc: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: Signed-off-by: Ingo Molnar commit 234da7bcdc7aaa935846534c3b726dbc79a9cdd5 Author: Frederic Weisbecker Date: Wed Dec 16 20:21:05 2009 +0100 sched: Teach might_sleep() about preemptible RCU In practice, it is harmless to voluntarily sleep in a rcu_read_lock() section if we are running under preempt rcu, but it is illegal if we build a kernel running non-preemptable rcu. Currently, might_sleep() doesn't notice sleepable operations under rcu_read_lock() sections if we are running under preemptable rcu because preempt_count() is left untouched after rcu_read_lock() in this case. But we want developers who test their changes under such config to notice the "sleeping while atomic" issues. So we add rcu_read_lock_nesting to prempt_count() in might_sleep() checks. [ v2: Handle rcu-tiny ] Signed-off-by: Frederic Weisbecker Reviewed-by: Paul E. McKenney Cc: Peter Zijlstra LKML-Reference: <1260991265-8451-1-git-send-regression-fweisbec@gmail.com> Signed-off-by: Ingo Molnar commit b7702a2136b5f8e0e186e22cae91aaecf98b418c Author: Masami Hiramatsu Date: Wed Dec 16 17:24:15 2009 -0500 perf probe: Check new event name Check new event name is same syntax as a C symbol in perf command. In other words, checking the name is as like as other tracepoint events. This can prevent user to create an event with useless name (e.g. foo|bar, foo*bar). Signed-off-by: Masami Hiramatsu Cc: Frederic Weisbecker Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo Cc: Steven Rostedt Cc: Jim Keniston Cc: Ananth N Mavinakayanahalli Cc: Christoph Hellwig Cc: Jason Baron Cc: K.Prasad Cc: Peter Zijlstra Cc: Srikar Dronamraju Cc: Frederic Weisbecker Cc: systemtap Cc: DLE LKML-Reference: <20091216222415.14459.71383.stgit@dhcp-100-2-132.bos.redhat.com> [ v2: minor cleanups ] Signed-off-by: Ingo Molnar commit 6f3cf440470650b3841d325acacd0c5ea9504c68 Author: Masami Hiramatsu Date: Wed Dec 16 17:24:08 2009 -0500 kprobe-tracer: Check new event/group name Check new event/group name is same syntax as a C symbol. In other words, checking the name is as like as other tracepoint events. This can prevent user to create an event with useless name (e.g. foo|bar, foo*bar). Signed-off-by: Masami Hiramatsu Cc: Frederic Weisbecker Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo Cc: Steven Rostedt Cc: Jim Keniston Cc: Ananth N Mavinakayanahalli Cc: Christoph Hellwig Cc: Jason Baron Cc: K.Prasad Cc: Peter Zijlstra Cc: Srikar Dronamraju Cc: systemtap Cc: DLE LKML-Reference: <20091216222408.14459.68790.stgit@dhcp-100-2-132.bos.redhat.com> [ v2: minor cleanups ] Signed-off-by: Ingo Molnar commit 96c96612e952f63cc0055db9df7d8b5b1ada02be Author: Masami Hiramatsu Date: Wed Dec 16 17:24:00 2009 -0500 perf probe: Check whether debugfs path is correct Check whether the debugfs path is correct before executing a command, because perf-probe depends on debugfs. Signed-off-by: Masami Hiramatsu Cc: Frederic Weisbecker Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo Cc: Steven Rostedt Cc: Jim Keniston Cc: Ananth N Mavinakayanahalli Cc: Christoph Hellwig Cc: Jason Baron Cc: K.Prasad Cc: Peter Zijlstra Cc: Srikar Dronamraju Cc: systemtap Cc: DLE LKML-Reference: <20091216222400.14459.48162.stgit@dhcp-100-2-132.bos.redhat.com> Signed-off-by: Ingo Molnar commit 27f3b24de03fc7cec6f2406f8525ad18086c2121 Author: Masami Hiramatsu Date: Wed Dec 16 17:16:19 2009 -0500 perf probe: Fix libdwarf include path for Debian Fix libdwarf include path to fit debian-like systems too. Borislav Petkov reported: > even after installing libdwarf-dev on my debian box here, > make in tools/perf/ still complains that it cannot find libdwarf: > > Makefile:491: No libdwarf.h found or old libdwarf.h found, disables dwarf > support. Please install libdwarf-dev/libdwarf-devel >= 20081231 > > The problem is that the include path on debian is not > /usr/include/libdwarf/ but simply /usr/include because the debian > package libdwarf-dev puts the headers straight into > /usr/include. This patch adds -I/usr/include/libdwarf to BASIC_CFLAGS and fix probe-finder.h to include just libdwarf.h/dwarf.h. This patch also adds a workaround for the undefined _MIPS_SZLONG bug in libdwarf.h. Reported-by: Borislav Petkov Signed-off-by: Masami Hiramatsu Cc: Frederic Weisbecker Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Srikar Dronamraju Cc: Gabor Gombas Cc: systemtap Cc: DLE LKML-Reference: <20091216221618.13816.83296.stgit@dhcp-100-2-132.bos.redhat.com> [ v2: small stylistic fixlets to probe-finder.h ] Signed-off-by: Ingo Molnar commit 0535f2bc170bc0779ac471faff39f633ca19ab59 Author: Jeff Garzik Date: Thu Dec 17 01:23:16 2009 -0500 sata_mv: remove pointless NULL test Remove !ap test, where ap is guaranteed not-NULL. Found by way of automated bug report from Alexander Strakh via "Linux Device Drivers Verification Project (Svace Detector)" Signed-off-by: Jeff Garzik commit 256ace9bbd4cdb6d48d5f55d55d42fa20527fad1 Author: Sergei Shtylyov Date: Thu Dec 17 01:11:27 2009 -0500 pata_hpt3x2n: fix clock turnaround The clock turnaround code still doesn't work for several reasons: - 'USE_DPLL' flag in 'ap->host->private_data' is never initialized or updated, so the driver can only set the chip to the DPLL clock mode, not the PCI mode; - the driver doesn't serialize access to the channels depending on the current clock mode like the vendor drivers, so the clock turnaround is only executed "optionally", not always as it should be; - the wrong ports are written to when hpt3x2n_set_clock() is called for the secondary channel; - hpt3x2n_set_clock() can inadvertently enable the disabled channels when resetting the channel state machines. Signed-off-by: Sergei Shtylyov Cc: stable@kernel.org Signed-off-by: Jeff Garzik commit 9a8fd68b15e7b047678a651b7f7e2f3dcd19d20d Author: Robert Hancock Date: Tue Dec 8 20:48:10 2009 -0600 libata: fix reporting of drained bytes when clearing DRQ When we drain data from a device to clear DRQ during error recovery, the number of bytes reported as drained is too low by a factor of 2 because the count is actually reporting the number of words drained, not bytes. Fix this. Signed-off-by: Robert Hancock Signed-off-by: Jeff Garzik commit b2dec48ccaad004fc706352f82725d43369d9bd7 Author: Saeed Bishara Date: Sun Dec 6 18:26:22 2009 +0200 sata_mv: add power management support for the PCI controllers. Signed-off-by: Saeed Bishara Signed-off-by: Jeff Garzik commit 1bfeff03f8a52eb896e5aad33d52e2451437bb0b Author: Saeed Bishara Date: Thu Dec 17 01:05:00 2009 -0500 sata_mv: store the board_idx into the host private data This information will be used in the resume function. Signed-off-by: Saeed Bishara Signed-off-by: Jeff Garzik commit 4716eaf20f37d10fd01b0fcacb3e41c1abd362c3 Author: H Hartley Sweeten Date: Thu Dec 10 20:03:10 2009 -0500 pata_octeon_cf: use resource_size(), to fix resource sizing bug It appears the size for cs1 is calculated using the wrong resource. Use the function resource_size to get the correct value. Signed-off-by: H Hartley Sweeten Signed-off-by: Jeff Garzik commit 0cdd6eb7e08fc39e9c906cc46b6ee9095c3077a9 Author: Christoph Hellwig Date: Thu Dec 10 10:36:01 2009 +0100 libata: use the WRITE_SAME_16 define Now that the scsi tree has hit mainline we can use the newly added WRITE_SAME_16 define. Signed-off-by: Christoph Hellwig Signed-off-by: Jeff Garzik commit c4bc7d7310a40c8c0b917e88983dc4a8e6b59e38 Author: Saeed Bishara Date: Sun Dec 6 18:26:20 2009 +0200 sata_mv: move the PCI bar description initialization code The mv_init_host will be used to initialize the host hw on resume. The PCI bar description need to be initialized only once when the device probed. Signed-off-by: Saeed Bishara Signed-off-by: Jeff Garzik commit 6481f2b52cd5411ea6342b749daf0e4f3b390d7b Author: Saeed Bishara Date: Sun Dec 6 18:26:19 2009 +0200 sata_mv: add power management support for the platform driver Signed-off-by: Saeed Bishara Signed-off-by: Jeff Garzik commit c77a2f4e6b76c9094182dfa653ece4243f6df80c Author: Saeed Bishara Date: Sun Dec 6 18:26:18 2009 +0200 sata_mv: support clkdev framework Signed-off-by: Saeed Bishara Signed-off-by: Jeff Garzik commit d7b0c143693bcbf391d2be235e150b97bfd8f9ba Author: Saeed Bishara Date: Sun Dec 6 18:26:17 2009 +0200 sata_mv: increase PIO IORDY timeout The old value (0xbc) in cycles of the IORDY timeout is suitable for devices with core clock of 166 MHz, but some SoC controllers have faster core clocks. The new value will make the IORDY timeout large enough also for all SoC devices. Signed-off-by: Saeed Bishara Signed-off-by: Jeff Garzik commit 416eb39556a03d1c7e52b0791e9052ccd71db241 Author: Ingo Molnar Date: Thu Dec 17 06:05:49 2009 +0100 sched: Make warning less noisy Cc: Peter Zijlstra Cc: Mike Galbraith LKML-Reference: <20091216170517.807938893@chello.nl> Signed-off-by: Ingo Molnar commit 6a1e008a0915f502eb026fb995ea3e49d5b017f7 Author: Yinghai Lu Date: Tue Dec 15 17:59:03 2009 -0800 x86: Increase MAX_EARLY_RES; insufficient on 32-bit NUMA Due to recent changes wakeup and mptable, we run out of early reservations on 32-bit NUMA. Thus, adjust the available number. Signed-off-by: Yinghai Lu LKML-Reference: <4B22D754.2020706@kernel.org> Signed-off-by: H. Peter Anvin commit 329962503692b42d8088f31584e42d52db179d52 Author: Yinghai Lu Date: Tue Dec 15 17:59:02 2009 -0800 x86: Fix checking of SRAT when node 0 ram is not from 0 Found one system that boot from socket1 instead of socket0, SRAT get rejected... [ 0.000000] SRAT: Node 1 PXM 0 0-a0000 [ 0.000000] SRAT: Node 1 PXM 0 100000-80000000 [ 0.000000] SRAT: Node 1 PXM 0 100000000-2080000000 [ 0.000000] SRAT: Node 0 PXM 1 2080000000-4080000000 [ 0.000000] SRAT: Node 2 PXM 2 4080000000-6080000000 [ 0.000000] SRAT: Node 3 PXM 3 6080000000-8080000000 [ 0.000000] SRAT: Node 4 PXM 4 8080000000-a080000000 [ 0.000000] SRAT: Node 5 PXM 5 a080000000-c080000000 [ 0.000000] SRAT: Node 6 PXM 6 c080000000-e080000000 [ 0.000000] SRAT: Node 7 PXM 7 e080000000-10080000000 ... [ 0.000000] NUMA: Allocated memnodemap from 500000 - 701040 [ 0.000000] NUMA: Using 20 for the hash shift. [ 0.000000] Adding active range (0, 0x2080000, 0x4080000) 0 entries of 3200 used [ 0.000000] Adding active range (1, 0x0, 0x96) 1 entries of 3200 used [ 0.000000] Adding active range (1, 0x100, 0x7f750) 2 entries of 3200 used [ 0.000000] Adding active range (1, 0x100000, 0x2080000) 3 entries of 3200 used [ 0.000000] Adding active range (2, 0x4080000, 0x6080000) 4 entries of 3200 used [ 0.000000] Adding active range (3, 0x6080000, 0x8080000) 5 entries of 3200 used [ 0.000000] Adding active range (4, 0x8080000, 0xa080000) 6 entries of 3200 used [ 0.000000] Adding active range (5, 0xa080000, 0xc080000) 7 entries of 3200 used [ 0.000000] Adding active range (6, 0xc080000, 0xe080000) 8 entries of 3200 used [ 0.000000] Adding active range (7, 0xe080000, 0x10080000) 9 entries of 3200 used [ 0.000000] SRAT: PXMs only cover 917504MB of your 1048566MB e820 RAM. Not used. [ 0.000000] SRAT: SRAT not used. the early_node_map is not sorted because node0 with non zero start come first. so try to sort it right away after all regions are registered. also fixs refression by 8716273c (x86: Export srat physical topology) -v2: make it more solid to handle cross node case like node0 [0,4g), [8,12g) and node1 [4g, 8g), [12g, 16g) -v3: update comments. Reported-and-tested-by: Jens Axboe Signed-off-by: Yinghai Lu LKML-Reference: <4B2579D2.3010201@kernel.org> Signed-off-by: H. Peter Anvin commit 45a94d7cd45ed991914011919e7d40eb6d2546d1 Author: Suresh Siddha Date: Wed Dec 16 16:25:42 2009 -0800 x86, cpuid: Add "volatile" to asm in native_cpuid() xsave_cntxt_init() does something like: cpuid(0xd, ..); // find out what features FP/SSE/.. etc are supported xsetbv(); // enable the features known to OS cpuid(0xd, ..); // find out the size of the context for features enabled Depending on what features get enabled in xsetbv(), value of the cpuid.eax=0xd.ecx=0.ebx changes correspondingly (representing the size of the context that is enabled). As we don't have volatile keyword for native_cpuid(), gcc 4.1.2 optimizes away the second cpuid and the kernel continues to use the cpuid information obtained before xsetbv(), ultimately leading to kernel crash on processors supporting more state than the legacy FP/SSE. Add "volatile" for native_cpuid(). Signed-off-by: Suresh Siddha LKML-Reference: <1261009542.2745.55.camel@sbs-t61.sc.intel.com> Cc: stable@kernel.org Signed-off-by: H. Peter Anvin commit cf1e367ee84e02ac349ad0858eb65e8a6a511c8b Author: Simon Horman Date: Thu Dec 17 11:15:42 2009 +1100 timers: Remove duplicate setting of new_base in __mod_timer() new_base is set using per_cpu(tvec_bases, cpu) after selecting the desired value of cpu immediately below so this line is a unnecessary. Signed-off-by: Simon Horman LKML-Reference: <20091217001542.GD25317@verge.net.au> Signed-off-by: Thomas Gleixner commit 6ede31e03084ee084bcee073ef3d1136f68d0906 Author: Borislav Petkov Date: Thu Dec 17 00:16:25 2009 +0100 x86, msr: msrs_alloc/free for CONFIG_SMP=n Randy Dunlap reported the following build error: "When CONFIG_SMP=n, CONFIG_X86_MSR=m: ERROR: "msrs_free" [drivers/edac/amd64_edac_mod.ko] undefined! ERROR: "msrs_alloc" [drivers/edac/amd64_edac_mod.ko] undefined!" This is due to the fact that is conditioned on CONFIG_SMP and in the UP case we have only the stubs in the header. Fork off SMP functionality into a new file (msr-smp.c) and build msrs_{alloc,free} unconditionally. Reported-by: Randy Dunlap Cc: H. Peter Anvin Signed-off-by: Borislav Petkov LKML-Reference: <20091216231625.GD27228@liondog.tnic> Signed-off-by: H. Peter Anvin commit 9d260ebc09a0ad6b5c73e17676df42c7bc75ff64 Author: Andreas Herrmann Date: Wed Dec 16 15:43:55 2009 +0100 x86, amd: Get multi-node CPU info from NodeId MSR instead of PCI config space Use NodeId MSR to get NodeId and number of nodes per processor. Signed-off-by: Andreas Herrmann LKML-Reference: <20091216144355.GB28798@alberich.amd.com> Signed-off-by: H. Peter Anvin commit 738d2be4301007f054541c5c4bf7fb6a361c9b3a Author: Peter Zijlstra Date: Wed Dec 16 18:04:42 2009 +0100 sched: Simplify set_task_cpu() Rearrange code a bit now that its a simpler function. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith LKML-Reference: <20091216170518.269101883@chello.nl> Signed-off-by: Ingo Molnar commit 88ec22d3edb72b261f8628226cd543589a6d5e1b Author: Peter Zijlstra Date: Wed Dec 16 18:04:41 2009 +0100 sched: Remove the cfs_rq dependency from set_task_cpu() In order to remove the cfs_rq dependency from set_task_cpu() we need to ensure the task is cfs_rq invariant for all callsites. The simple approach is to substract cfs_rq->min_vruntime from se->vruntime on dequeue, and add cfs_rq->min_vruntime on enqueue. However, this has the downside of breaking FAIR_SLEEPERS since we loose the old vruntime as we only maintain the relative position. To solve this, we observe that we only migrate runnable tasks, we do this using deactivate_task(.sleep=0) and activate_task(.wakeup=0), therefore we can restrain the min_vruntime invariance to that state. The only other case is wakeup balancing, since we want to maintain the old vruntime we cannot make it relative on dequeue, but since we don't migrate inactive tasks, we can do so right before we activate it again. This is where we need the new pre-wakeup hook, we need to call this while still holding the old rq->lock. We could fold it into ->select_task_rq(), but since that has multiple callsites and would obfuscate the locking requirements, that seems like a fudge. This leaves the fork() case, simply make sure that ->task_fork() leaves the ->vruntime in a relative state. This covers all cases where set_task_cpu() gets called, and ensures it sees a relative vruntime. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith LKML-Reference: <20091216170518.191697025@chello.nl> Signed-off-by: Ingo Molnar commit efbbd05a595343a413964ad85a2ad359b7b7efbd Author: Peter Zijlstra Date: Wed Dec 16 18:04:40 2009 +0100 sched: Add pre and post wakeup hooks As will be apparent in the next patch, we need a pre wakeup hook for sched_fair task migration, hence rename the post wakeup hook and one pre wakeup. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith LKML-Reference: <20091216170518.114746117@chello.nl> Signed-off-by: Ingo Molnar commit 881232b70b195768a71cd74ff4b4e8ab9502997b Author: Peter Zijlstra Date: Wed Dec 16 18:04:39 2009 +0100 sched: Move kthread_bind() back to kthread.c Since kthread_bind() lost its dependencies on sched.c, move it back where it came from. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith LKML-Reference: <20091216170518.039524041@chello.nl> Signed-off-by: Ingo Molnar commit 5da9a0fb673a0ea0a093862f95f6b89b3390c31e Author: Peter Zijlstra Date: Wed Dec 16 18:04:38 2009 +0100 sched: Fix select_task_rq() vs hotplug issues Since select_task_rq() is now responsible for guaranteeing ->cpus_allowed and cpu_active_mask, we need to verify this. select_task_rq_rt() can blindly return smp_processor_id()/task_cpu() without checking the valid masks, select_task_rq_fair() can do the same in the rare case that all SD_flags are disabled. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith LKML-Reference: <20091216170517.961475466@chello.nl> Signed-off-by: Ingo Molnar commit 3802290628348674985d14914f9bfee7b9084548 Author: Peter Zijlstra Date: Wed Dec 16 18:04:37 2009 +0100 sched: Fix sched_exec() balancing Since we access ->cpus_allowed without holding rq->lock we need a retry loop to validate the result, this comes for near free when we merge sched_migrate_task() into sched_exec() since that already does the needed check. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith LKML-Reference: <20091216170517.884743662@chello.nl> Signed-off-by: Ingo Molnar commit e2912009fb7b715728311b0d8fe327a1432b3f79 Author: Peter Zijlstra Date: Wed Dec 16 18:04:36 2009 +0100 sched: Ensure set_task_cpu() is never called on blocked tasks In order to clean up the set_task_cpu() rq dependencies we need to ensure it is never called on blocked tasks because such usage does not pair with consistent rq->lock usage. This puts the migration burden on ttwu(). Furthermore we need to close a race against changing ->cpus_allowed, since select_task_rq() runs with only preemption disabled. For sched_fork() this is safe because the child isn't in the tasklist yet, for wakeup we fix this by synchronizing set_cpus_allowed_ptr() against TASK_WAKING, which leaves sched_exec to be a problem This also closes a hole in (6ad4c1888 sched: Fix balance vs hotplug race) where ->select_task_rq() doesn't validate the result against the sched_domain/root_domain. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith LKML-Reference: <20091216170517.807938893@chello.nl> Signed-off-by: Ingo Molnar commit 06b83b5fbea273672822b6ee93e16781046553ec Author: Peter Zijlstra Date: Wed Dec 16 18:04:35 2009 +0100 sched: Use TASK_WAKING for fork wakups For later convenience use TASK_WAKING for fresh tasks. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith LKML-Reference: <20091216170517.732561278@chello.nl> Signed-off-by: Ingo Molnar commit e4f4288842ee12747e10c354d72be7d424c0b627 Author: Peter Zijlstra Date: Wed Dec 16 18:04:34 2009 +0100 sched: Select_task_rq_fair() must honour SD_LOAD_BALANCE We should skip !SD_LOAD_BALANCE domains. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith LKML-Reference: <20091216170517.653578430@chello.nl> CC: stable@kernel.org Signed-off-by: Ingo Molnar commit e6c8fba7771563b2f3dfb96a78f36ec17e15bdf0 Author: Peter Zijlstra Date: Wed Dec 16 18:04:33 2009 +0100 sched: Fix task_hot() test order Make sure not to access sched_fair fields before verifying it is indeed a sched_fair task. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith CC: stable@kernel.org LKML-Reference: <20091216170517.577998058@chello.nl> Signed-off-by: Ingo Molnar commit 9ee349ad6d326df3633d43f54202427295999c47 Author: Xiaotian Feng Date: Wed Dec 16 18:04:32 2009 +0100 sched: Fix set_cpu_active() in cpu_down() Sachin found cpu hotplug test failures on powerpc, which made the kernel hang on his POWER box. The problem is that we fail to re-activate a cpu when a hot-unplug fails. Fix this by moving the de-activation into _cpu_down after doing the initial checks. Remove the synchronize_sched() calls and rely on those implied by rebuilding the sched domains using the new mask. Reported-by: Sachin Sant Signed-off-by: Xiaotian Feng Tested-by: Sachin Sant Signed-off-by: Peter Zijlstra Cc: Mike Galbraith LKML-Reference: <20091216170517.500272612@chello.nl> Signed-off-by: Ingo Molnar commit 933b0618d8b2a59c7a0742e43836544e02f1e9bd Author: Peter Zijlstra Date: Wed Dec 16 18:04:31 2009 +0100 sched: Mark boot-cpu active before smp_init() A UP machine has 1 active cpu, not having the boot-cpu in the active map when starting the scheduler confuses things. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith LKML-Reference: <20091216170517.423469527@chello.nl> Signed-off-by: Ingo Molnar commit ee1156c11a1121e118b0a7f2dec240f0d421b1fd Merge: b9f8fcd 8bea867 Author: Ingo Molnar Date: Wed Dec 16 18:33:49 2009 +0100 Merge branch 'linus' into sched/urgent Conflicts: kernel/sched_idletask.c Merge reason: resolve the conflicts, pick up latest changes. Signed-off-by: Ingo Molnar commit 75b46c1321785c29cfbc4f839b6dc031428734ad Author: Jon Smirl Date: Tue Dec 15 20:53:44 2009 -0500 ASoC: Fix disable of SPDIF on STAC9766 codec Change code so that switching to playing music through the analog output disables SPDIF out instead of disabling it when stream ends. Signed-off-by: Jon Smirl Acked-by: Mark Brown commit 5df974009fe513c664303de24725ea0f8b47f12e Author: Sheng Yang Date: Wed Dec 16 13:48:04 2009 +0800 x86: Add IA32_TSC_AUX MSR and use it Clean up write_tsc() and write_tscp_aux() by replacing hardcoded values. No change in functionality. Signed-off-by: Sheng Yang Cc: Avi Kivity Cc: Marcelo Tosatti LKML-Reference: <1260942485-19156-4-git-send-email-sheng@linux.intel.com> Signed-off-by: Ingo Molnar commit 37cb3e08852be92d94e6a65c489bd8afa2e8a15f Author: Ben Skeggs Date: Wed Dec 16 16:22:42 2009 +1000 drm/nouveau: fix bug causing pinned buffers to lose their NO_EVICT flag Signed-off-by: Ben Skeggs commit 65ec01a9406327f22b1c740f8a42cb93eb676eb5 Author: Ben Skeggs Date: Wed Dec 16 15:07:45 2009 +1000 drm/nv50: fix suspend/resume delays without firmware present Signed-off-by: Ben Skeggs commit 0735f62e116fae1e4f36237a97de28e8a56b4c2c Author: Ben Skeggs Date: Wed Dec 16 14:28:55 2009 +1000 drm/nouveau: prevent all channel creation if accel not available Previously, if there was no firmware available, the DRM would just disable channel creation from userspace, but still use a single channel for its own purposes. With a bit of care it should actually be possible to do this, due to the DRM's very limited use of the engine. It currently doesn't work correctly however, resulting in corrupted fbcon and hangs on a number of cards. Signed-off-by: Ben Skeggs commit 3c8868d3dbba5110bd43b49879f12d1a6b2a28ca Author: Ben Skeggs Date: Wed Dec 16 14:51:13 2009 +1000 drm/nv50: fix two potential suspend/resume oopses This avoids touching the dummy channel 0/127 we have on nv50. Signed-off-by: Ben Skeggs commit 054b93e444550a72aef17115363cdef253b9ee7c Author: Ben Skeggs Date: Tue Dec 15 22:02:47 2009 +1000 drm/nv40: implement ctxprog/state generation The context programs are *very* simple compared to the ones used by the binary driver. There's notes in nv40_grctx.c explaining most of the things we don't implement. If we discover if/why any of it is required further down the track, we'll handle it then. The PGRAPH state generated for each chipset should match what NVIDIA do almost exactly (there's a couple of exceptions). If someone has a lot of time on their hands, they could figure out the mapping of object/method to PGRAPH register and demagic the initial state a little, it's not terribly important however. At time of commit, confirmed to be working at least well enough for accelerated X (and where tested, for 3D apps) on NV40, NV43, NV44, NV46, NV49, NV4A, NV4B and NV4E. A module option has been added to force the use of external firmware blobs if it becomes required. Signed-off-by: Ben Skeggs commit 15bee69ee1532a29e13124b298027ee6ef54bac8 Author: Francisco Jerez Date: Mon Dec 14 15:00:30 2009 +0100 drm/nv10: Add the initial graph context and soft methods needed for LMA. Signed-off-by: Francisco Jerez Signed-off-by: Ben Skeggs commit 22fbd53809eb7a1b00fe09159fe0a565fb6c725c Author: Francisco Jerez Date: Fri Dec 11 18:40:17 2009 +0100 drm/nouveau: Fix up buffer eviction, and evict them to GART, if possible. Signed-off-by: Francisco Jerez Signed-off-by: Ben Skeggs commit c5804be0627508487bd9eacebf9de7f807e5d4e7 Author: Marcin Kościelnicki Date: Mon Dec 14 20:58:39 2009 +0000 drm/nouveau: Add proper error handling to nouveau_card_init Signed-off-by: Marcin Kościelnicki Signed-off-by: Maarten Maathuis Signed-off-by: Ben Skeggs commit 13c5443b515109f175bb9917c578a7ae973f6851 Author: Marcin Kościelnicki Date: Mon Dec 14 20:38:17 2009 +0000 drm/nv04: Fix NV04 set_operation software method. Signed-off-by: Marcin Kościelnicki Signed-off-by: Maarten Maathuis Signed-off-by: Ben Skeggs commit 37383650e4f47aef633055e3f62e87a44d83312d Author: Marcin Kościelnicki Date: Tue Dec 15 00:37:31 2009 +0000 drm/nouveau: Kill global state in BIOS script interpreter Signed-off-by: Marcin Kościelnicki Signed-off-by: Maarten Maathuis Signed-off-by: Ben Skeggs commit 657b6245ba23d32c7a4fd273549c8c0beebec770 Author: Marcin Kościelnicki Date: Tue Dec 15 00:37:30 2009 +0000 drm/nouveau: Kill global state in NvShadowBIOS Signed-off-by: Marcin Kościelnicki Signed-off-by: Maarten Maathuis Signed-off-by: Ben Skeggs commit ef2bb506687a5f1cc8ef2fef370bb168b2808106 Author: Maarten Maathuis Date: Sun Dec 13 16:53:12 2009 +0100 drm/nouveau: use drm debug levels - Use driver level (0x2) for NV_DEBUG instead of all levels - Create a NV_DEBUG_KMS for KMS level (0x4) and use them in modesetting code - Remove a few odd NV_TRACE calls and replace some of them with NV_DEBUG_KMS or NV_INFO Signed-off-by: Maarten Maathuis Signed-off-by: Ben Skeggs commit dc4a684ae80d914b2b7fe75b2733a3296a8b92d2 Author: Francisco Jerez Date: Tue Dec 15 01:34:42 2009 +0100 drm/i2c/ch7006: Fix load detection false positives right after system init. Signed-off-by: Francisco Jerez Signed-off-by: Ben Skeggs commit 95f158eab42f971c2a6f82cc886ce657d92a25f4 Author: Francisco Jerez Date: Fri Dec 11 23:44:49 2009 +0100 drm/nv04-nv40: Fix "conflicting memory types" when saving/restoring VGA fonts. Signed-off-by: Francisco Jerez Signed-off-by: Ben Skeggs commit 0b962d473af32ec334df271b54ff4973cb2b4c73 Author: H. Peter Anvin Date: Tue Dec 15 15:13:07 2009 -0800 x86, msr/cpuid: Register enough minors for the MSR and CPUID drivers register_chrdev() hardcodes registering 256 minors, presumably to avoid breaking old drivers. However, we need to register enough minors so that we have all possible CPUs. checkpatch warns on this patch, but the patch is correct: NR_CPUS here is a static *upper bound* on the *maximum CPU index* (not *number of CPUs!*) and that is what we want. Reported-and-tested-by: Russ Anderson Cc: Tejun Heo Cc: Alan Cox Cc: Takashi Iwai Cc: Alexander Viro Signed-off-by: H. Peter Anvin LKML-Reference: commit 54291362d2a5738e1b0495df2abcb9e6b0563a3f Author: Phillip Lougher Date: Mon Dec 14 21:45:19 2009 +0000 initramfs: add missing decompressor error check The decompressors return error by calling a supplied error function, and/or by returning an error return value. The initramfs code, however, fails to check the exit code returned by the decompressor, and only checks the error status set by calling the error function. This patch adds a return code check and calls the error function. Signed-off-by: Phillip Lougher LKML-Reference: <4b26b1ef.0+ZWxT6886olqcSc%phillip@lougher.demon.co.uk> Signed-off-by: H. Peter Anvin commit d4529862cae4de19fda8d4bbcbddc60f3e48a4cf Author: Phillip Lougher Date: Mon Dec 14 21:45:19 2009 +0000 bzip2: Add missing checks for malloc returning NULL Signed-off-by: Phillip Lougher LKML-Reference: <4b26b1ef.ln20bM9Mn4gzB21L%phillip@lougher.demon.co.uk> Signed-off-by: H. Peter Anvin commit c1e7c3ae59b065bf7ff24a05cb609b2f9e314db6 Author: Phillip Lougher Date: Mon Dec 14 21:45:19 2009 +0000 bzip2/lzma/gzip: pre-boot malloc doesn't return NULL on failure The trivial malloc implementation used in the pre-boot environment by the decompressors returns a bad pointer on failure (falling through after calling error). This is doubly wrong - the callers expect malloc to return NULL on failure, second the error function is intended to be used by the decompressors to propagate errors to *their* callers. The decompressors have no access to any state set by the error function. Signed-off-by: Phillip Lougher LKML-Reference: <4b26b1ef.hIInb2AYPMtImAJO%phillip@lougher.demon.co.uk> Signed-off-by: H. Peter Anvin commit 1cf86f6f9b000e98c1b7f866f99633ae67464e2f Author: Kuninori Morimoto Date: Tue Dec 15 15:54:21 2009 +0900 ASoC: ak4642: Add default return value in ak4642_modinit If ak4642 driver was compiled without I2C configs, ak4642_modinit return value will become un-stable. This patch modify this bug Reported-by: Magnus Damm Signed-off-by: Kuninori Morimoto Acked-by: Liam Girdwood Signed-off-by: Mark Brown commit b9f8fcd55bbdb037e5332dbdb7b494f0b70861ac Author: David Miller Date: Sun Dec 13 18:25:02 2009 -0800 sched: Fix cpu_clock() in NMIs, on !CONFIG_HAVE_UNSTABLE_SCHED_CLOCK Relax stable-sched-clock architectures to not save/disable/restore hardirqs in cpu_clock(). The background is that I was trying to resolve a sparc64 perf issue when I discovered this problem. On sparc64 I implement pseudo NMIs by simply running the kernel at IRQ level 14 when local_irq_disable() is called, this allows performance counter events to still come in at IRQ level 15. This doesn't work if any code in an NMI handler does local_irq_save() or local_irq_disable() since the "disable" will kick us back to cpu IRQ level 14 thus letting NMIs back in and we recurse. The only path which that does that in the perf event IRQ handling path is the code supporting frequency based events. It uses cpu_clock(). cpu_clock() simply invokes sched_clock() with IRQs disabled. And that's a fundamental bug all on it's own, particularly for the HAVE_UNSTABLE_SCHED_CLOCK case. NMIs can thus get into the sched_clock() code interrupting the local IRQ disable code sections of it. Furthermore, for the not-HAVE_UNSTABLE_SCHED_CLOCK case, the IRQ disabling done by cpu_clock() is just pure overhead and completely unnecessary. So the core problem is that sched_clock() is not NMI safe, but we are invoking it from NMI contexts in the perf events code (via cpu_clock()). A less important issue is the overhead of IRQ disabling when it isn't necessary in cpu_clock(). CONFIG_HAVE_UNSTABLE_SCHED_CLOCK architectures are not affected by this patch. Signed-off-by: David S. Miller Acked-by: Peter Zijlstra Cc: Mike Galbraith LKML-Reference: <20091213.182502.215092085.davem@davemloft.net> Signed-off-by: Ingo Molnar commit 1a551ae715825bb2a2107a2dd68de024a1fa4e32 Author: Thomas Gleixner Date: Wed Dec 9 10:15:11 2009 +0000 sched: Use rcu in sched_get_rr_param() read_lock(&tasklist_lock) does not protect sys_sched_get_rr_param() against a concurrent update of the policy or scheduler parameters as do_sched_scheduler() does not take the tasklist_lock. The access to task->sched_class->get_rr_interval is protected by task_rq_lock(task). Use rcu_read_lock() to protect find_task_by_vpid() and prevent the task struct from going away. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra LKML-Reference: <20091209100706.862897167@linutronix.de> Signed-off-by: Ingo Molnar commit 23f5d142519621b16cf2b378cf8adf4dcf01a616 Author: Thomas Gleixner Date: Wed Dec 9 10:15:01 2009 +0000 sched: Use rcu in sched_get/set_affinity() tasklist_lock is held read locked to protect the find_task_by_vpid() call and to prevent the task going away. sched_setaffinity acquires a task struct ref and drops tasklist lock right away. The access to the cpus_allowed mask is protected by rq->lock. rcu_read_lock() provides the same protection here. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra LKML-Reference: <20091209100706.789059966@linutronix.de> Signed-off-by: Ingo Molnar commit 5fe85be081edf0ac92d83f9c39e0ab5c1371eb82 Author: Thomas Gleixner Date: Wed Dec 9 10:14:58 2009 +0000 sched: Use rcu in sys_sched_getscheduler/sys_sched_getparam() read_lock(&tasklist_lock) does not protect sys_sched_getscheduler and sys_sched_getparam() against a concurrent update of the policy or scheduler parameters as do_sched_setscheduler() does not take the tasklist_lock. The accessed integers can be retrieved w/o locking and are snapshots anyway. Using rcu_read_lock() to protect find_task_by_vpid() and prevent the task struct from going away is not changing the above situation. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra LKML-Reference: <20091209100706.753790977@linutronix.de> Signed-off-by: Ingo Molnar commit 663997d417330a59a566452f52cfa04c8ffd190b Author: Joe Perches Date: Sat Dec 12 13:57:27 2009 -0800 sched: Use pr_fmt() and pr_() - Convert printk(KERN_ to pr_ (not KERN_DEBUG) - Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - Coalesce long format strings - Add missing \n to "ERROR: !SD_LOAD_BALANCE domain has parent" Signed-off-by: Joe Perches Cc: Peter Zijlstra LKML-Reference: <1260655047.2637.7.camel@Joe-Laptop.home> Signed-off-by: Ingo Molnar commit 7539a3b3d1f892dd97eaf094134d7de55c13befe Author: Rafael J. Wysocki Date: Sun Dec 13 00:07:30 2009 +0100 sched: Make wakeup side and atomic variants of completion API irq safe Alan Stern noticed that all the wakeup side (and atomic) variants of the completion APIs should be irq safe, but the newly introduced completion_done() and try_wait_for_completion() aren't. The use of the irq unsafe variants in IRQ contexts can cause crashes/hangs. Fix the problem by making them use spin_lock_irqsave() and spin_lock_irqrestore(). Reported-by: Alan Stern Signed-off-by: Rafael J. Wysocki Cc: Linus Torvalds Cc: Zhang Rui Cc: pm list Cc: Peter Zijlstra Cc: David Chinner Cc: Lachlan McIlroy LKML-Reference: <200912130007.30541.rjw@sisk.pl> Signed-off-by: Ingo Molnar commit 23e707dd9b0b26215d801c59e87feed1c218a0f9 Author: Greg Kroah-Hartman Date: Fri Dec 11 15:38:46 2009 -0800 Staging: batman: fix debug Kconfig option The debug batman option needs to depend on the correct config option. Signed-off-by: Greg Kroah-Hartman commit a18cb387e5c29be5c95cded5b5a55110bb930f5c Author: Sean MacLennan Date: Tue Dec 8 19:04:37 2009 +0000 powerpc/44x: Increase warp SD buffer Newer revs of the FPGA have a larger SD buffer. Signed-off-by: Sean MacLennan Signed-off-by: Josh Boyer commit 070bae1fb03bbf6a19a18722464a984eb3ddf55e Author: Anatolij Gustschin Date: Fri Dec 11 03:39:53 2009 +0000 powerpc/44x: Extend Katmai dts for ADMA and RAID56 support Add nodes for PPC440SPe DMA, I2O, XOR engines and Memory Queue module which are used in the updated PPC440SPe ADMA driver. Also extend plb ranges property to specify address ranges for DMA0/1 and I2O engines. Signed-off-by: Yuri Tikhonov Signed-off-by: Anatolij Gustschin Signed-off-by: Josh Boyer commit bb6eddf7676e1c1f3e637aa93c5224488d99036f Author: Thomas Gleixner Date: Thu Dec 10 15:35:10 2009 +0100 clockevents: Prevent clockevent_devices list corruption on cpu hotplug Xiaotian Feng triggered a list corruption in the clock events list on CPU hotplug and debugged the root cause. If a CPU registers more than one per cpu clock event device, then only the active clock event device is removed on CPU_DEAD. The unused devices are kept in the clock events device list. On CPU up the clock event devices are registered again, which means that we list_add an already enqueued list_head. That results in list corruption. Resolve this by removing all devices which are associated to the dead CPU on CPU_DEAD. Reported-by: Xiaotian Feng Signed-off-by: Thomas Gleixner Tested-by: Xiaotian Feng Cc: stable@kernel.org commit c1a676dfa2fa25fb9ec77c92ebe3ff580648b6ac Author: Felix Radensky Date: Wed Aug 12 08:57:39 2009 +0300 powerpc/85xx: Workaround MPC8572/MPC8536 GPIO 1 errata. On MPC8572 and MPC8536 the status of GPIO pins configured as output cannot be determined by reading GPDAT register. Workaround by reading the status of input pins from GPDAT and the status of output pins from a shadow register. Signed-off-by: Felix Radensky Signed-off-by: Kumar Gala commit 78331aded913d76c7ff996a1a0747d54b057460b Author: Peter Korsgaard Date: Tue Dec 1 21:48:13 2009 +0100 powerpc/gpio: support gpio_to_irq() gpiolib returns -ENXIO if struct gpio_chip::to_irq isn't set, so it's safe to always call. Signed-off-by: Peter Korsgaard Signed-off-by: Kumar Gala commit 1cad2c874162d84bf7b2d31344a08b9cb724d138 Author: Anton Vorontsov Date: Thu Dec 10 21:01:03 2009 +0300 powerpc/83xx: Add power management support for MPC8315E-RDB boards - Add nodes for PMC and GTM controllers. GTM4 can be used as a wakeup source; - Add fsl,magic-packet properties to eTSEC nodes, i.e. wake-on-lan support. Unlike MPC8313 processors, MPC8315 can resume from deep sleep upon magic packet reception. Signed-off-by: Anton Vorontsov Acked-by: Scott Wood Signed-off-by: Kumar Gala commit 87faaabb09d0802d54ff863a16ca821d7c669cb6 Author: Anton Vorontsov Date: Thu Dec 10 21:00:56 2009 +0300 powerpc/83xx/suspend: Save and restore SICRL, SICRH and SCCR We need to save SICRL, SICRH and SCCR registers on suspend, and restore them on resume. Otherwise, we lose IO and clocks setup on MPC8315E-RDB boards when ULPI USB PHY is used (non-POR setup). Signed-off-by: Anton Vorontsov Acked-by: Scott Wood Signed-off-by: Kumar Gala commit f25c525c1412675d2b23d5d88660fb5c9f3a5341 Author: Anton Vorontsov Date: Thu Dec 10 21:00:53 2009 +0300 powerpc/83xx/suspend: Clear deep_sleeping after devices resume Currently 83xx PMC driver clears deep_sleeping variable very early, before devices are resumed. This makes fsl_deep_sleep() unusable in drivers' resume() callback. Sure, drivers can store fsl_deep_sleep() value on suspend and use the stored value on resume. But a better solution is to postpone clearing the deep_sleeping variable, i.e. move it into finish() callback. Signed-off-by: Anton Vorontsov Acked-by: Scott Wood Signed-off-by: Kumar Gala commit d4581a239a40319205762b76c01eb6363f277efa Author: Thomas Gleixner Date: Thu Dec 10 00:52:51 2009 +0000 sys: Fix missing rcu protection for __task_cred() access commit c69e8d9 (CRED: Use RCU to access another task's creds and to release a task's own creds) added non rcu_read_lock() protected access to task creds of the target task in set_prio_one(). The comment above the function says: * - the caller must hold the RCU read lock The calling code in sys_setpriority does read_lock(&tasklist_lock) but not rcu_read_lock(). This works only when CONFIG_TREE_PREEMPT_RCU=n. With CONFIG_TREE_PREEMPT_RCU=y the rcu_callbacks can run in the tick interrupt when they see no read side critical section. There is another instance of __task_cred() in sys_setpriority() itself which is equally unprotected. Wrap the whole code section into a rcu read side critical section to fix this quick and dirty. Will be revisited in course of the read_lock(&tasklist_lock) -> rcu crusade. Oleg noted further: This also fixes another bug here. find_task_by_vpid() is not safe without rcu_read_lock(). I do not mean it is not safe to use the result, just find_pid_ns() by itself is not safe. Usually tasklist gives enough protection, but if copy_process() fails it calls free_pid() lockless and does call_rcu(delayed_put_pid(). This means, without rcu lock find_pid_ns() can't scan the hash table safely. Signed-off-by: Thomas Gleixner LKML-Reference: <20091210004703.029784964@linutronix.de> Acked-by: Paul E. McKenney commit 7cf7db8df0b78076eafa4ead47559344ca7b7a43 Author: Thomas Gleixner Date: Thu Dec 10 00:53:21 2009 +0000 signals: Fix more rcu assumptions 1) Remove the misleading comment in __sigqueue_alloc() which claims that holding a spinlock is equivalent to rcu_read_lock(). 2) Add a rcu_read_lock/unlock around the __task_cred() access in __sigqueue_alloc() This needs to be revisited to remove the remaining users of read_lock(&tasklist_lock) but that's outside the scope of this patch. Signed-off-by: Thomas Gleixner LKML-Reference: <20091210004703.269843657@linutronix.de> commit 14d8c9f3c09e7fd7b9af80904289fe204f5b93c6 Author: Thomas Gleixner Date: Thu Dec 10 00:53:17 2009 +0000 signal: Fix racy access to __task_cred in kill_pid_info_as_uid() kill_pid_info_as_uid() accesses __task_cred() without being in a RCU read side critical section. tasklist_lock is not protecting that when CONFIG_TREE_PREEMPT_RCU=y. Convert the whole tasklist_lock section to rcu and use lock_task_sighand to prevent the exit race. Signed-off-by: Thomas Gleixner LKML-Reference: <20091210004703.232302055@linutronix.de> Acked-by: Oleg Nesterov commit b22b97c15eed893a6768aad2f596706c56bf194e Author: Mark Ware Date: Thu Dec 10 22:14:34 2009 +1100 powerpc/cpm2_pic: Allow correct flow_types for port C interrupts Port C interrupts can be either falling edge, or either edge. Other external interrupts are either falling edge or active low. Tested on a custom 8280 based board. Signed-off-by: Mark Ware Acked-by: Anton Vorontsov Acked-by: Scott Wood Signed-off-by: Kumar Gala commit b387dfe902c352d5be4690a135412ece4868b531 Author: Dmitry Eremin-Solenikov Date: Mon Nov 16 16:58:54 2009 +0300 powerpc/83xx: mpc8349emitx - add leds-gpio binding Signed-off-by: Dmitry Eremin-Solenikov Signed-off-by: Kumar Gala commit 1d88fd11a2484b1bc0a36010781dc410446bef29 Author: Dmitry Eremin-Solenikov Date: Mon Nov 16 23:51:20 2009 +0300 powerpc/83xx: mpc8349emitx - add OF descriptions of LocalBus devices Describe all LocalBus chipselects on MPC8349E-MITX board. Also add flash bindings. Signed-off-by: Dmitry Eremin-Solenikov Signed-off-by: Kumar Gala commit 3320cf844f3183870e66059174ce73f9662e523b Author: Dmitry Eremin-Solenikov Date: Mon Nov 16 16:58:52 2009 +0300 powerpc/83xx: mpc8349emitx - populate I2C busses in device tree Add OF descriptions of EEPROM, two GPIO extenders and SPD hanging on I2C on this board. Signed-off-by: Dmitry Eremin-Solenikov Signed-off-by: Kumar Gala commit 9174e4989ecf53eca69767229deb9ad85efd55fe Author: Dmitry Eremin-Solenikov Date: Mon Nov 16 16:58:51 2009 +0300 powerpc/83xx: mpc8349emitx - add gpio controller declarations mpc8349 bears two GPIO controllers. Enable support for them. Signed-off-by: Dmitry Eremin-Solenikov Signed-off-by: Kumar Gala commit 196f0082d8e77f647edd21ea27b5a9bba8116396 Author: Sebastian Andrzej Siewior Date: Sun Dec 6 12:32:47 2009 +0100 powerpc/fsl: try to explain why the interrupt numbers are off by 16 Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Kumar Gala commit f93611fac7eed3aa175795fb8e452aa30af33b6a Author: Anton Vorontsov Date: Tue Dec 8 01:54:35 2009 +0300 powerpc/fsl_pci: Fix P2P bridge handling for MPC83xx PCIe controllers It appears that we wrongly calculate dev_base for type1 config cycles. The thing is: we shouldn't subtract hose->first_busno because PCI core sets PCI primary, secondary and subordinate bus numbers, and PCIe controller actually takes the registers into account. So we should use just bus->number. Also, according to MPC8315 reference manual, primary bus number should always remain 0. We have PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS quirk in indirect_pci.c, but since 83xx is somewhat special, it doesn't use indirect_pci.c routines, so we have to implement the quirk specifically for 83xx PCIe controllers. Signed-off-by: Anton Vorontsov Signed-off-by: Kumar Gala commit 12d4cec988a8a20927a9795dbf2c6d9ef2f85baa Author: Tao Ma Date: Mon Nov 30 15:08:40 2009 +0800 ocfs2: refcounttree.c cleanup. sparse check finds some endian problem and some other minor issues. There is an obsolete function which should be removed. So this patch resolve all these. Signed-off-by: Tao Ma Signed-off-by: Joel Becker commit 38a04e432768ec0b016f3c687b4de31ac111ae59 Author: Tao Ma Date: Mon Nov 30 14:32:19 2009 +0800 ocfs2: Find proper end cpos for a leaf refcount block. ocfs2 refcount tree is stored as an extent tree while the leaf ocfs2_refcount_rec points to a refcount block. The following step can trip a kernel panic. mkfs.ocfs2 -b 512 -C 1M --fs-features=refcount $DEVICE mount -t ocfs2 $DEVICE $MNT_DIR FILE_NAME=$RANDOM FILE_NAME_1=$RANDOM FILE_REF="${FILE_NAME}_ref" FILE_REF_1="${FILE_NAME}_ref_1" for((i=0;i<305;i++)) do # /mnt/1048576 is a file with 1048576 sizes. cat /mnt/1048576 >> $MNT_DIR/$FILE_NAME cat /mnt/1048576 >> $MNT_DIR/$FILE_NAME_1 done for((i=0;i<3;i++)) do cat /mnt/1048576 >> $MNT_DIR/$FILE_NAME done for((i=0;i<2;i++)) do cat /mnt/1048576 >> $MNT_DIR/$FILE_NAME cat /mnt/1048576 >> $MNT_DIR/$FILE_NAME_1 done cat /mnt/1048576 >> $MNT_DIR/$FILE_NAME for((i=0;i<11;i++)) do cat /mnt/1048576 >> $MNT_DIR/$FILE_NAME cat /mnt/1048576 >> $MNT_DIR/$FILE_NAME_1 done reflink $MNT_DIR/$FILE_NAME $MNT_DIR/$FILE_REF # write_f is a program which will write some bytes to a file at offset. # write_f -f file_name -l offset -w write_bytes. ./write_f -f $MNT_DIR/$FILE_REF -l $[310*1048576] -w 4096 ./write_f -f $MNT_DIR/$FILE_REF -l $[306*1048576] -w 4096 ./write_f -f $MNT_DIR/$FILE_REF -l $[311*1048576] -w 4096 ./write_f -f $MNT_DIR/$FILE_NAME -l $[310*1048576] -w 4096 ./write_f -f $MNT_DIR/$FILE_NAME -l $[311*1048576] -w 4096 reflink $MNT_DIR/$FILE_NAME $MNT_DIR/$FILE_REF_1 ./write_f -f $MNT_DIR/$FILE_NAME -l $[311*1048576] -w 4096 #kernel panic here. The reason is that if the ocfs2_extent_rec is the last record in a leaf extent block, the old solution fails to find the suitable end cpos. So this patch try to walk through the b-tree, find the next sub root and get the c_pos the next sub-tree starts from. btw, I have runned tristan's test case against the patched kernel for several days and this type of kernel panic never happens again. Signed-off-by: Tao Ma Signed-off-by: Joel Becker