summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2011-03-18video: pwm_backlight: Add check_fb hookRobert Morell
In systems with multiple framebuffer devices, one of the devices might be blanked while another is unblanked. In order for the backlight blanking logic to know whether to turn off the backlight for a particular framebuffer's blanking notification, it needs to be able to check if a given framebuffer device corresponds to the backlight. This plumbs the check_fb hook from core backlight through the pwm_backlight helper to allow platform code to plug in a check_fb hook. Originally reviewed on http://git-master/r/21716 Change-Id: I2b2530e515227eaba246750b3cee7e61e882d14e Reviewed-on: http://git-master/r/23100 Tested-by: Gaurav Sarode <gsarode@nvidia.com> Reviewed-by: Robert Morell <rmorell@nvidia.com> Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com>
2011-03-18backlight: add low threshold to pwm backlightArun Murthy
The intensity of the backlight can be varied from a range of max_brightness to zero. Though most, if not all the pwm based backlight devices start flickering at lower brightness value. And also for each device there exists a brightness value below which the backlight appears to be turned off though the value is not equal to zero. If the range of brightness for a device is from zero to max_brightness. A graph is plotted for brightness Vs intensity for the pwm based backlight device has to be a linear graph. intensity | / | / | / |/ --------- 0 max_brightness But pratically on measuring the above we note that the intensity of backlight goes to zero(OFF) when the value in not zero almost nearing to zero(some x%). so the graph looks like intensity | / | / | / | | ------------ 0 x max_brightness In order to overcome this drawback knowing this x% i.e nothing but the low threshold beyond which the backlight is off and will have no effect, the brightness value is being offset by the low threshold value(retaining the linearity of the graph). Now the graph becomes intensity | / | / | / | / ------------- 0 max_brightness With this for each and every digit increment in the brightness from zero there is a change in the intensity of backlight. Devices having this behaviour can set the low threshold brightness(lth_brightness) and pass the same as platform data else can have it as zero. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Arun Murthy <arun.murthy@stericsson.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Richard Purdie <rpurdie@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Change-Id: I1ee4d6a4d3cbce951a628539e740040f50ee6785 Reviewed-on: http://git-master/r/23099 Tested-by: Gaurav Sarode <gsarode@nvidia.com> Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com>
2011-03-10[ARM/tegra] : Invensense MPU code update to v3.3.3.Robert Collins
Update Invensense Motion Library (MPL) to production version v3.3.3. Previous version was engineering release and is not suitable for mass production. This version of the MPL most notably fixes problems with suspend/resume where touch screen would quit working during a suspend/resume cycle. Cherry-pick from http://git-master/r/#change,22109 Change-Id: Ic2e138ee665453da4c3eaa386a1bec9abf81b7cd Reviewed-on: http://git-master/r/22190 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Robert R Collins <rcollins@nvidia.com>
2011-02-22video: tegra: Add PWM backlight driverJoseph Lehrer
bug 773671 Change-Id: Ib93f0dcb7e22220fe297c81d403c401548f3c649 Reviewed-on: http://git-master/r/18280 Tested-by: Joseph Lehrer <jlehrer@nvidia.com> Reviewed-by: Thomas Cherry <tcherry@nvidia.com> Reviewed-by: Jonathan Mayo <jmayo@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com>
2011-02-22tegra bluesleep: Bluetooth active power management driverAnantha Idapalapati
A new driver is implemented to actively manage the bluetooth module power. bluesleep also tries to manage the power of the transport used. Two signals (GPIOs) are used to manage the power events. BT_WAKE : signal from HOST to BT chip to intimate BT chip can sleep. HOST_WAKE: signal from BT chip to HOST to intimate HOST should wakeup/ activate the transport modules required for BT communication. Bug 791669, 773186 (cherry picked from commit 111f4ccd3c4cfde2fa52ae4c0c56a2288c3af3a8) Change-Id: Iff1e81bb22d9bd43113f7cdd01329da3ae852a15 Reviewed-on: http://git-master/r/19858 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-02-22arm: tegra: hsuart: Support for Bluetooth wakeupPradeep Goudagunta
Added support to tegra_hsuart driver for bluetooth wakeup. Bug 773186 Change-Id: Id8f1face1b99942fd13949d0815a1dedd1a5a5d0 Reviewed-on: http://git-master/r/19586 Reviewed-by: Anantha Idapalapati <aidapalapati@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Anantha Idapalapati <aidapalapati@nvidia.com>
2011-02-21merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Conflicts: drivers/net/wireless/bcm4329/Makefile Change-Id: I5e6994d4db216062b9cd1673f45bd9fdcf1f96ae
2011-02-18usb: Adding USB CDC NCM class driver.Steve Lin
This driver supports devices conforming to the Communication Device Class (CDC) Network Control Model. The CDC specifications are available from <http://www.usb.org/>. This driver is implemented as a minidriver for usbnet driver framework. Bug 776360 Change-Id: If5e900f80edebc742536a59716aad546b714ba4c Reviewed-on: http://git-master/r/14921 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-02-16media: video: tegra: add ov5650 test pattern modeNathan Lord
Change-Id: Ie894d71f45cc08709daff3f258e0c4676b7778b0 Reviewed-on: http://git-master/r/19687 Reviewed-by: Nathan Lord <nlord@nvidia.com> Tested-by: Nathan Lord <nlord@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-02-16merge: USB: remove duplicated usb_hcd_map_urb_for_dmaDan Willemsen
The original commit went upstream, this is to fix a merge issue from a slightly different version coming back. Change-Id: I69a58a483e58a0ee1a13521a466709f5cad6505f Reviewed-on: http://git-master/r/19663 Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com> Tested-by: Daniel Willemsen <dwillemsen@nvidia.com> Reviewed-by: Robert Morell <rmorell@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>
2011-02-16Merge remote branch 'common/android-2.6.36' into android-tegra-2.6.36Rebecca Schultz Zavin
2011-02-14net: wireless: Add get_country_code functionality to platformDmitry Shmidt
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-02-14Revert "Revert "mmc: subtract boot sectors from disk size for eMMC 4.3+ ↵Nitin Kumbhar
devices"" This reverts commit 6b53bad8ac54b3d748c4b0dbe6b0a4ed6e2e60f4.
2011-02-14merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Conflicts: drivers/usb/host/ehci-tegra.c include/linux/usb.h include/linux/usb/hcd.h Change-Id: I2499459b717e36a2a994af9d7a5ae1ecb5e7ca9c
2011-02-12Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36Colin Cross
2011-02-12Merge branch 'android-2.6.36' into android-tegra-2.6.36Colin Cross
2011-02-12Revert "mmc: subtract boot sectors from disk size for eMMC 4.3+ devices"Colin Cross
This reverts commit f0b0e4bec1e89014f3dcef4da8bcf95428cc771c. The reverted commit incorrectly calculates the size of eMMC devices in some (all?) cases. This revert may cause problems in cases where the bootloader was bug-compatible and puts a GPT partition at the incorrect end of the eMMC device. Change-Id: Ib006acf9e517b3b8f7570220c28e19c91e7b5f25 Signed-off-by: Colin Cross <ccross@android.com>
2011-02-11Revert "mmc: subtract boot sectors from disk size for eMMC 4.3+ devices"Colin Cross
This reverts commit 2cdc235bbeb09b2b78cd02a94ab79c265861aea9. The reverted commit incorrectly calculates the size of eMMC devices in some (all?) cases. This revert may cause problems in cases where the bootloader was bug-compatible and puts a GPT partition at the incorrect end of the eMMC device. Change-Id: Icc9ddb3d294aa2a1caeddfe8fedd2e12aa7691e1
2011-02-09USB: gadget: android: Support switching vendor ID when configuration changesMike Lockwood
Based on the list of enabled USB functions, we can now switch the vendor ID as well as the product ID. Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-09merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Conflicts: drivers/video/tegra/dc/hdmi.c Change-Id: Ia65c693bf49160e3906df68403129ba1e5545912
2011-02-08media: video: tegra: add driver for ov2710Nathan Lord
Change-Id: I9d9a9a301f23398a13fa7d865058f384288f6c92 Reviewed-on: http://git-master/r/18537 Reviewed-by: Nathan Lord <nlord@nvidia.com> Tested-by: Nathan Lord <nlord@nvidia.com> Reviewed-by: Jonathan Mayo <jmayo@nvidia.com> Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-02-08USB: HCD: Add driver hooks for (un)?map_urb_for_dmaRobert Morell
Provide optional hooks for the host controller driver to override the default DMA mapping and unmapping routines. In general, these shouldn't be necessary unless the host controller has special DMA requirements, such as alignment contraints. If these are not specified, the general usb_hcd_(un)?map_urb_for_dma functions will be used instead. Also, pass the status to unmap_urb_for_dma so it can know whether the DMA buffer has been overwritten. Finally, add a flag to be used by these implementations if they allocated a temporary buffer so it can be freed properly when unmapping. Signed-off-by: Robert Morell <rmorell@nvidia.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-08USB: HCD: Add usb_hcd prefix to exported functionsRobert Morell
The convention is to prefix symbols exported from the USB HCD core with "usb_hcd". This change makes unmap_urb_setup_for_dma() and unmap_urb_for_dma() consistent with that. Signed-off-by: Robert Morell <rmorell@nvidia.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-07Merge branch linux-tegra-2.6.36 into android-tegra-2.6.36Erik Gilling
Change-Id: I6fcdbcd0eb7103ac580deb94faf79959a5818ba1
2011-02-07video: fbmon: add HDMI dectetion to fbmod edid parsingErik Gilling
Looks for ieee registration numver 0x000c03 as per HDMI spec. Change-Id: I6875b24c66e8754510edabcb4f9ba682a50d6ac1 Signed-off-by: Erik Gilling <konkers@android.com>
2011-02-04Driver: Misc: Sensors: MPU: enable kxtf9 and ak8975Wen Yi
BUG 771526 Corrected the mismatched CONFIG_SENSOR_KXTF9 and CONFIG_SENSOR_AK8975 to CONFIG_SENSOR_KXTF9_MPU and CONFIG_SENSOR_AK8975_MPU Change-Id: I760bfdd5cbdd91acdf9ce10ee5be5fcfa0a9c5ab Reviewed-on: http://git-master/r/18377 Reviewed-by: Wen Yi <wyi@nvidia.com> Tested-by: Wen Yi <wyi@nvidia.com> Reviewed-by: Robert R Collins <rcollins@nvidia.com> Tested-by: Robert R Collins <rcollins@nvidia.com> Reviewed-by: Jeremy Wyman <jwyman@nvidia.com> Tested-by: Jeremy Wyman <jwyman@nvidia.com> Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com>
2011-02-04max8907c Charger DriverTom Cherry
max8907c Charger Driver from maxim plus nvidia modifications Integration from http://git-master/r/#change,15043 Change-Id: I8143fee9c99b43ad1089613236410dc8ad5bbca0 Reviewed-on: http://git-master/r/16134 Tested-by: Thomas Cherry <tcherry@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-02-03Port Invensense MPU3050 drivers into tegra-2.6.36Wen Yi
Change-Id: Iceb3ef8b11d4ce18fd3cb0947268744775b81758 Reviewed-on: http://git-master/r/17525 Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com> Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2011-02-03arm: serial: tegra: add PORT_TEGRA port typePradeep Goudagunta
added new entry for PORT_TEGRA in serial8250 driver and updated flags and type of debug uart. Bug : 782543 Change-Id: I3e6c59f7a24731e92bd48197c6b1b22acdba8a8f Reviewed-on: http://git-master/r/17995 Tested-by: Pradeep Goudagunta <pgoudagunta@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Shail Dave <sdave@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com>
2011-02-02arm: tegra_hsuart: Add wake_peer operationNitin Kumbhar
Recently wake_peer op was added to uart_ops. Add this op for tegra_hsuart allowing a platform to implement peer specific wakeup. BUG 781303 Change-Id: Icfbac324815d7737c0e0820e57a2e8d844855ba0 Reviewed-on: http://git-master/r/17993 Tested-by: Nitin Kumbhar <nkumbhar@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-02-02mfd: tps6586x: fix alarm1 supportVarun Wadekar
instead of clearing the irq for alarm enable/disable, the proper bit in RTC_CONFIG has to be set/cleared. tps6586 does not support 1/sec update counter so remove support for update_irq_enable. replace it with alarm_irq_enable. Change-Id: Iee66a6625e810169253a750faf3f12d20d65d7d9 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/17990 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-02-02max8907c MFD driver: add second i2c bus and irq handlingTom Cherry
Clean up portions of max8907c.c driver Add capability for bulk i2c read and write Add capability for second i2c bus for rtc Add capability for irq handling for rtc and battery charger Change-Id: I6c2c2c42591aee766635a2e32a7404bb2591f4a7 Reviewed-on: http://git-master/r/16613 Tested-by: Thomas Cherry <tcherry@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-01-28input: gpio-keys: report wakeup key on resumeNitin Kumbhar
During resume, gpio-keys does not get updated state of gpios which fails to report wakeup key event. Update resume routine to report key event based on wakeup source. BUG 745149 Change-Id: Iff7a9b431f9da8d226c8d3cd522725c3049fef07 Reviewed-on: http://git-master/r/17455 Tested-by: Nitin Kumbhar <nkumbhar@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-01-28i2c-tegra: Retry transfer when unexpected status is detectedJin Park
Sometimes unexpected status like I2C busy status, Tx FIFO interrupted and wait on Rx data etc is seen. Add a code to detect such conditions and return -EAGAIN from driver. This will cause the i2c-core to retry the transmission as per the retry count and time-out specified by the platform data of the adapter. Bug ID: 777455 Change-Id: Iac5971bca4d760d93cd2ed147f78fc2807315b4e Signed-off-by: Jin Park <jinyoungp@nvidia.com> Reviewed-on: http://git-master/r/16212 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-01-27video: tegra: Multi client overlay managementDan Willemsen
This creates a new device node per head - /dev/tegra_dc%u. There are a number of ioctls in linux/tegra_overlay.h to open, close, and flip overlays. This is a replacement for the extensions in the tegra fb interface, but does not remove that functionality for compatibility reasons. Once everyone has moved, we can remove the tegra fb extensions. Change-Id: Id78a94482637a7ce229ec64eb5feaf2dec2b7804 Reviewed-on: http://git-master/r/16700 Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com> Tested-by: Daniel Willemsen <dwillemsen@nvidia.com>
2011-01-11hwmon: nct1008: delete driver codeVarun Wadekar
nct1008 driver will now reside in drivers/misc Bug 742230 Change-Id: I774c920cf96ded96ae440a99935f6cb9f1f63323 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/15496 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-01-10[tegra alsa] Add routing supportSumit Bhattacharya
Add three alsa controls to expose selection of playback device, capture device and call mode.Alsa kernel will route pcm data to the selected output/input port. bug 771510 Change-Id: Ibdeebbd799b2ae36046a77327ec8b6a3b01553a9 Reviewed-on: http://git-master/r/14729 Tested-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-01-10merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Conflicts: arch/arm/mach-tegra/fuse.c drivers/misc/Makefile Change-Id: I300b925d78b31efe00c342190d8dbd50e2e81230
2011-01-08Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36Colin Cross
Conflicts: drivers/misc/Kconfig drivers/misc/Makefile Change-Id: I826244513f799fdd2fb0269abad3271c96661293
2011-01-07NCT1008 temperature sensor driverTodd Poynor
Replace the PM-only driver for NCT1008 with a new version written by Varun Wadekar and Dmitriy Gruzman. Add a callback to an alarm function specified in the board platform data. Change-Id: Ib429533930ee75af3402d24b0bc286da9f6ee67b Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-01-07misc: Initial NCT1008 driverGreg Meiste
Initial version of the NCT1008 driver to turn off the sensor when the device is suspended. This improves standby current drain. Change-Id: Ia64613c33c0052434d5e304c434605611e5ef789 Signed-off-by: Greg Meiste <w30289@motorola.com>
2011-01-07Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36Colin Cross
Conflicts: arch/arm/mm/cache-v6.S Change-Id: I1a2063218dd705a762a40f4a9dfe504ce1a1d491
2011-01-07Merge branch 'android-2.6.36' into android-tegra-2.6.36Colin Cross
2011-01-07Merge commit 'v2.6.36.3' into linux-tegra-2.6.36Colin Cross
2011-01-07input: keyreset: Allow reset function to be overridenColin Cross
Change-Id: Ibb3dda05772b2e89d7b2646689944d309cb1f74e Signed-off-by: Colin Cross <ccross@android.com>
2011-01-07Don't export format_by_forcc on two different driversMauro Carvalho Chehab
commit a757ee2216211278680dd8ac869aabe7b4a9970d upstream. Drivers should append their name on exported symbols, to avoid conflicts with allyesconfig: drivers/staging/built-in.o: In function `format_by_fourcc': /home/v4l/work_trees/linus/drivers/staging/cx25821/cx25821-video.c:96: multiple definition of `format_by_fourcc' drivers/media/built-in.o:/home/v4l/work_trees/linus/drivers/media/common/saa7146_video.c:88: first defined here Let's rename both occurences with a small shellscript: for i in drivers/staging/cx25821/*.[ch]; do sed s,format_by_fourcc,cx25821_format_by_fourcc,g <$i >a && mv a $i; done for i in drivers/media/common/saa7146*.[ch]; do sed s,format_by_fourcc,saa7146_format_by_fourcc,g <$i >a && mv a $i; done for i in include/media/saa7146*.[ch]; do sed s,format_by_fourcc,saa7146_format_by_fourcc,g <$i >a && mv a $i; done Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07block: Deprecate QUEUE_FLAG_CLUSTER and use queue_limits insteadMartin K. Petersen
commit e692cb668fdd5a712c6ed2a2d6f2a36ee83997b4 upstream. When stacking devices, a request_queue is not always available. This forced us to have a no_cluster flag in the queue_limits that could be used as a carrier until the request_queue had been set up for a metadevice. There were several problems with that approach. First of all it was up to the stacking device to remember to set queue flag after stacking had completed. Also, the queue flag and the queue limits had to be kept in sync at all times. We got that wrong, which could lead to us issuing commands that went beyond the max scatterlist limit set by the driver. The proper fix is to avoid having two flags for tracking the same thing. We deprecate QUEUE_FLAG_CLUSTER and use the queue limit directly in the block layer merging functions. The queue_limit 'no_cluster' is turned into 'cluster' to avoid double negatives and to ease stacking. Clustering defaults to being enabled as before. The queue flag logic is removed from the stacking function, and explicitly setting the cluster flag is no longer necessary in DM and MD. Reported-by: Ed Lin <ed.lin@promise.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Acked-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07PM / Runtime: Fix pm_runtime_suspended()Rafael J. Wysocki
commit f08f5a0add20834d3f3d876dfe08005a5df656db upstream. There are some situations (e.g. in __pm_generic_call()), where pm_runtime_suspended() is used to decide whether or not to execute a device's (system) ->suspend() callback. The callback is not executed if pm_runtime_suspended() returns true, but it does so for devices that don't even support runtime PM, because the power.disable_depth device field is ignored by it. This leads to problems (i.e. devices are not suspened when they should), so rework pm_runtime_suspended() so that it returns false if the device's power.disable_depth field is different from zero. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07sched: Cure more NO_HZ load average woesPeter Zijlstra
commit 0f004f5a696a9434b7214d0d3cbd0525ee77d428 upstream. There's a long-running regression that proved difficult to fix and which is hitting certain people and is rather annoying in its effects. Damien reported that after 74f5187ac8 (sched: Cure load average vs NO_HZ woes) his load average is unnaturally high, he also noted that even with that patch reverted the load avgerage numbers are not correct. The problem is that the previous patch only solved half the NO_HZ problem, it addressed the part of going into NO_HZ mode, not of comming out of NO_HZ mode. This patch implements that missing half. When comming out of NO_HZ mode there are two important things to take care of: - Folding the pending idle delta into the global active count. - Correctly aging the averages for the idle-duration. So with this patch the NO_HZ interaction should be complete and behaviour between CONFIG_NO_HZ=[yn] should be equivalent. Furthermore, this patch slightly changes the load average computation by adding a rounding term to the fixed point multiplication. Reported-by: Damien Wyart <damien.wyart@free.fr> Reported-by: Tim McGrath <tmhikaru@gmail.com> Tested-by: Damien Wyart <damien.wyart@free.fr> Tested-by: Orion Poplawski <orion@cora.nwra.com> Tested-by: Kyle McMartin <kyle@mcmartin.ca> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Chase Douglas <chase.douglas@canonical.com> LKML-Reference: <1291129145.32004.874.camel@laptop> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07xen: Provide a variant of __RING_SIZE() that is an integer constant expressionJeremy Fitzhardinge
commit 667c78afaec0ac500908e191e8f236e9578d7b1f upstream. Without this, gcc 4.5 won't compile xen-netfront and xen-blkfront, where this is being used to specify array sizes. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: David Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>