summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2012-01-13regulator: TPS65090: Add regulator supportvenu byravarasu
Add regulator changes needed to support TPS65090. bug 909648 Change-Id: Ia88e6706051f7a7e920b01c656f64385b98fc33a Signed-off-by: venu byravarasu <vbyravarasu@nvidia.com> Reviewed-on: http://git-master/r/73144 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/74895 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2012-01-13mfd: TPS65090: Add PMIC supportvenu byravarasu
This PMIC MFD driver provides- PMIC register read/write access support for interrupt handling. bug 909648 Change-Id: I7f1a22e055b08b9cd31e987c94589c2a8c857d73 Signed-off-by: venu byravarasu <vbyravarasu@nvidia.com> Reviewed-on: http://git-master/r/73135 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/74894 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2012-01-13Tegra: DTV: Added dtv driverAdam Jiang
Tegra2/3 has a dedicated Digital TV interface for receiving serial TS stream. This is the initial version for the DTV interface. The driver provided a device node as /dev/tegra_dtv and enabled several ioctls to configure hardware. User land applications could get serial TS data via system call read() on the device node. The read() operation is blocked io. Fixed Bug 904626 Fixed Bug 881303 Change-Id: Iad4629bed3c4c959b9178b387b084cdeaf7c3f69 Signed-off-by: Adam Jiang <chaoj@nvidia.com> Reviewed-on: http://git-master/r/66625 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com> Reviewed-on: http://git-master/r/74891 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2012-01-13mmc: sd: Define MMC_STATE_ULTRAHIGHSPEED card statePavan Kunapuli
MMC_STATE_ULTRAHIGHSPEED is used to report the speed mode of the UHS cards. Bug 920089 Reviewed-on: http://git-master/r/73987 Change-Id: I521e4d52ee63d6a83cb801d6fb45ec7e2b627d65 Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/74582 Reviewed-by: Automatic_Commit_Validation_User
2012-01-13mmc: recognise SDIO cards with SDIO_CCCR_REV 3.00Bing Zhao
Table 6-2: CCCR bit Definitions, address 00h. Part E1 SDIO Simplified Specification Version 3.00, Feb. 25, 2011. This patch has been tested with Marvell WLAN device SD8797. Reviewed-on: http://git-master/r/72877 Change-Id: I1ea3b63bde2bbe8532459205f61feffae3e30f0a Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/74581 Reviewed-by: Automatic_Commit_Validation_User
2012-01-13mmc: sdio: support SDIO UHS cardsPavan Kunapuli
This patch adds support for sdio UHS cards per the version 3.0 spec. UHS mode is only enabled for version 3.0 cards when both the host and the controller support UHS modes. 1.8v signaling support is removed if both the card and the host do not support UHS. This is done to maintain compatibility and some system/card combinations break when 1.8v signaling is enabled when the host does not support UHS. Reviewed-on: http://git-master/r/72876 Change-Id: I8d7dbaf1d1cbff8e9f13526d39e69b2a00eca2fa Signed-off-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Aaron Lu <Aaron.lu@amd.com> Reviewed-by: Arindam Nath <arindam.nath@amd.com> Tested-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/74580 Reviewed-by: Automatic_Commit_Validation_User
2012-01-12video: tegra: host: Move device data to nvhost_deviceTerje Bergstrom
Move all device data from nvhost_channeldesc, nvhost_moduledesc and nvhost_module to nvhost_device. nvhost_devices are also assigned into a hierarchy to prepare for implementation of runtime power management. Change-Id: I1e18daae8fe538086cd1f453d316e0f73e9d7d92 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/72844 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Reviewed-on: http://git-master/r/74560 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Tested-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-12gpu: ion: tegra: Remove unused tegra specific IOMMU definitionsHiroshi DOYU
IOMMU related definitions should not be specific to any SoCs. Change-Id: Ifa47b99d3f66762d75bba92247786ca4cef14c28 Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com> Reviewed-on: http://git-master/r/73608 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-12gpu: ion: Add IOMMU heap allocator with IOMMU APIHiroshi DOYU
Implemented IOMMU heap allocator("ion_iommu_heap_ops") with IOMMU API. This implementation is independenf of SoC because the standard IOMMU API is used in the backend implementation of this heap_ops. [Krishna Reddy: Refactored the original version heavily, especially making "allocation" and "mapping" features independent with "struct page" based mapping functions.] Change-Id: Ia692d9a0dc00424fa3e95a830f557808351b1ad7 Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com> Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/72217 Reviewed-by: Automatic_Commit_Validation_User
2012-01-11mfd: Turn on the twl4030-madc MADC clockKyle Manna
commit 3d6271f92e98094584fd1e609a9969cd33e61122 upstream. Without turning the MADC clock on, no MADC conversions occur. $ cat /sys/class/hwmon/hwmon0/device/in8_input [ 53.428436] twl4030_madc twl4030_madc: conversion timeout! cat: read error: Resource temporarily unavailable Signed-off-by: Kyle Manna <kyle@kylemanna.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: Ib7ef0c519dd78c3bbd2e9903675c2ec16e38831e Reviewed-on: http://git-master/r/74228 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Tested-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-11net: introduce DST_NOPEER dst flagEric Dumazet
[ Upstream commit e688a604807647c9450f9c12a7cb6d027150a895 ] Chris Boot reported crashes occurring in ipv6_select_ident(). [ 461.457562] RIP: 0010:[<ffffffff812dde61>] [<ffffffff812dde61>] ipv6_select_ident+0x31/0xa7 [ 461.578229] Call Trace: [ 461.580742] <IRQ> [ 461.582870] [<ffffffff812efa7f>] ? udp6_ufo_fragment+0x124/0x1a2 [ 461.589054] [<ffffffff812dbfe0>] ? ipv6_gso_segment+0xc0/0x155 [ 461.595140] [<ffffffff812700c6>] ? skb_gso_segment+0x208/0x28b [ 461.601198] [<ffffffffa03f236b>] ? ipv6_confirm+0x146/0x15e [nf_conntrack_ipv6] [ 461.608786] [<ffffffff81291c4d>] ? nf_iterate+0x41/0x77 [ 461.614227] [<ffffffff81271d64>] ? dev_hard_start_xmit+0x357/0x543 [ 461.620659] [<ffffffff81291cf6>] ? nf_hook_slow+0x73/0x111 [ 461.626440] [<ffffffffa0379745>] ? br_parse_ip_options+0x19a/0x19a [bridge] [ 461.633581] [<ffffffff812722ff>] ? dev_queue_xmit+0x3af/0x459 [ 461.639577] [<ffffffffa03747d2>] ? br_dev_queue_push_xmit+0x72/0x76 [bridge] [ 461.646887] [<ffffffffa03791e3>] ? br_nf_post_routing+0x17d/0x18f [bridge] [ 461.653997] [<ffffffff81291c4d>] ? nf_iterate+0x41/0x77 [ 461.659473] [<ffffffffa0374760>] ? br_flood+0xfa/0xfa [bridge] [ 461.665485] [<ffffffff81291cf6>] ? nf_hook_slow+0x73/0x111 [ 461.671234] [<ffffffffa0374760>] ? br_flood+0xfa/0xfa [bridge] [ 461.677299] [<ffffffffa0379215>] ? nf_bridge_update_protocol+0x20/0x20 [bridge] [ 461.684891] [<ffffffffa03bb0e5>] ? nf_ct_zone+0xa/0x17 [nf_conntrack] [ 461.691520] [<ffffffffa0374760>] ? br_flood+0xfa/0xfa [bridge] [ 461.697572] [<ffffffffa0374812>] ? NF_HOOK.constprop.8+0x3c/0x56 [bridge] [ 461.704616] [<ffffffffa0379031>] ? nf_bridge_push_encap_header+0x1c/0x26 [bridge] [ 461.712329] [<ffffffffa037929f>] ? br_nf_forward_finish+0x8a/0x95 [bridge] [ 461.719490] [<ffffffffa037900a>] ? nf_bridge_pull_encap_header+0x1c/0x27 [bridge] [ 461.727223] [<ffffffffa0379974>] ? br_nf_forward_ip+0x1c0/0x1d4 [bridge] [ 461.734292] [<ffffffff81291c4d>] ? nf_iterate+0x41/0x77 [ 461.739758] [<ffffffffa03748cc>] ? __br_deliver+0xa0/0xa0 [bridge] [ 461.746203] [<ffffffff81291cf6>] ? nf_hook_slow+0x73/0x111 [ 461.751950] [<ffffffffa03748cc>] ? __br_deliver+0xa0/0xa0 [bridge] [ 461.758378] [<ffffffffa037533a>] ? NF_HOOK.constprop.4+0x56/0x56 [bridge] This is caused by bridge netfilter special dst_entry (fake_rtable), a special shared entry, where attaching an inetpeer makes no sense. Problem is present since commit 87c48fa3b46 (ipv6: make fragment identifications less predictable) Introduce DST_NOPEER dst flag and make sure ipv6_select_ident() and __ip_select_ident() fallback to the 'no peer attached' handling. Reported-by: Chris Boot <bootc@bootc.net> Tested-by: Chris Boot <bootc@bootc.net> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: Id23270aae3214c26691f95922a63c70549232c22 Reviewed-on: http://git-master/r/74224 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Tested-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-11net: Add a flow_cache_flush_deferred functionSteffen Klassert
[ Upstream commit c0ed1c14a72ca9ebacd51fb94a8aca488b0d361e ] flow_cach_flush() might sleep but can be called from atomic context via the xfrm garbage collector. So add a flow_cache_flush_deferred() function and use this if the xfrm garbage colector is invoked from within the packet path. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Acked-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: I6561c4fa576a9e83f4e2faf7b62dbd1d9b598c39 Reviewed-on: http://git-master/r/74221 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Tested-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-11sctp: fix incorrect overflow check on autocloseXi Wang
[ Upstream commit 2692ba61a82203404abd7dd2a027bda962861f74 ] Commit 8ffd3208 voids the previous patches f6778aab and 810c0719 for limiting the autoclose value. If userspace passes in -1 on 32-bit platform, the overflow check didn't work and autoclose would be set to 0xffffffff. This patch defines a max_autoclose (in seconds) for limiting the value and exposes it through sysctl, with the following intentions. 1) Avoid overflowing autoclose * HZ. 2) Keep the default autoclose bound consistent across 32- and 64-bit platforms (INT_MAX / HZ in this patch). 3) Keep the autoclose value consistent between setsockopt() and getsockopt() calls. Suggested-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: I74631fca684d7a475f1eed5f6823c11b62bbd2bc Reviewed-on: http://git-master/r/74219 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Tested-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-11VFS: Fix race between CPU hotplug and lglocksSrivatsa S. Bhat
commit e30e2fdfe56288576ee9e04dbb06b4bd5f282203 upstream. Currently, the *_global_[un]lock_online() routines are not at all synchronized with CPU hotplug. Soft-lockups detected as a consequence of this race was reported earlier at https://lkml.org/lkml/2011/8/24/185. (Thanks to Cong Meng for finding out that the root-cause of this issue is the race condition between br_write_[un]lock() and CPU hotplug, which results in the lock states getting messed up). Fixing this race by just adding {get,put}_online_cpus() at appropriate places in *_global_[un]lock_online() is not a good option, because, then suddenly br_write_[un]lock() would become blocking, whereas they have been kept as non-blocking all this time, and we would want to keep them that way. So, overall, we want to ensure 3 things: 1. br_write_lock() and br_write_unlock() must remain as non-blocking. 2. The corresponding lock and unlock of the per-cpu spinlocks must not happen for different sets of CPUs. 3. Either prevent any new CPU online operation in between this lock-unlock, or ensure that the newly onlined CPU does not proceed with its corresponding per-cpu spinlock unlocked. To achieve all this: (a) We introduce a new spinlock that is taken by the *_global_lock_online() routine and released by the *_global_unlock_online() routine. (b) We register a callback for CPU hotplug notifications, and this callback takes the same spinlock as above. (c) We maintain a bitmap which is close to the cpu_online_mask, and once it is initialized in the lock_init() code, all future updates to it are done in the callback, under the above spinlock. (d) The above bitmap is used (instead of cpu_online_mask) while locking and unlocking the per-cpu locks. The callback takes the spinlock upon the CPU_UP_PREPARE event. So, if the br_write_lock-unlock sequence is in progress, the callback keeps spinning, thus preventing the CPU online operation till the lock-unlock sequence is complete. This takes care of requirement (3). The bitmap that we maintain remains unmodified throughout the lock-unlock sequence, since all updates to it are managed by the callback, which takes the same spinlock as the one taken by the lock code and released only by the unlock routine. Combining this with (d) above, satisfies requirement (2). Overall, since we use a spinlock (mentioned in (a)) to prevent CPU hotplug operations from racing with br_write_lock-unlock, requirement (1) is also taken care of. By the way, it is to be noted that a CPU offline operation can actually run in parallel with our lock-unlock sequence, because our callback doesn't react to notifications earlier than CPU_DEAD (in order to maintain our bitmap properly). And this means, since we use our own bitmap (which is stale, on purpose) during the lock-unlock sequence, we could end up unlocking the per-cpu lock of an offline CPU (because we had locked it earlier, when the CPU was online), in order to satisfy requirement (2). But this is harmless, though it looks a bit awkward. Debugged-by: Cong Meng <mc@linux.vnet.ibm.com> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: I27c57858531c4829a1446ebb5fd606d07846b2e5 Reviewed-on: http://git-master/r/74193 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Tested-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-11block: initialize request_queue's numa node duringMike Snitzer
commit 5151412dd4338b273afdb107c3772528e9e67d92 upstream. struct request_queue is allocated with __GFP_ZERO so its "node" field is zero before initialization. This causes an oops if node 0 is offline in the page allocator because its zonelists are not initialized. From Dave Young's dmesg: SRAT: Node 1 PXM 2 0-d0000000 SRAT: Node 1 PXM 2 100000000-330000000 SRAT: Node 0 PXM 1 330000000-630000000 Initmem setup node 1 0000000000000000-000000000affb000 ... Built 1 zonelists in Node order, mobility grouping on. ... BUG: unable to handle kernel paging request at 0000000000001c08 IP: [<ffffffff8111c355>] __alloc_pages_nodemask+0xb5/0x870 and __alloc_pages_nodemask+0xb5 translates to a NULL pointer on zonelist->_zonerefs. The fix is to initialize q->node at the time of allocation so the correct node is passed to the slab allocator later. Since blk_init_allocated_queue_node() is no longer needed, merge it with blk_init_allocated_queue(). [rientjes@google.com: changelog, initializing q->node] Reported-by: Dave Young <dyoung@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: David Rientjes <rientjes@google.com> Tested-by: Dave Young <dyoung@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: I24b14588aef6226f3bcdf37e78af61cbe9a31fd2 Reviewed-on: http://git-master/r/74168 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Tested-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-06tty: serial: tegra: Add HW loopback supportPradeep Goudagunta
Add HW loopback support for testing purpose. Bug 845036 Bug 921090 Signed-off-by: Pradeep Goudagunta <pgoudagunta@nvidia.com> Change-Id: I202781ed0b42c1bed2b9aad9576cf74cb938f9e6 Reviewed-on: http://git-master/r/73149 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-01-05Linux 3.1.7Varun Wadekar
Change-Id: I99507d7cfdcee064f808856dc2ce99d806fd864f
2012-01-04mmc: sdhci: changing sdhci quirks data type to u64naveenk
Kernel 3.1 has more than 32 quirks changing quirks type to u64 Bug 921653 Change-Id: Id6607347e6e48cfa1534f1260e277f6e2f7a42ee Signed-off-by: naveenk <naveenk@nvidia.com> Reviewed-on: http://git-master/r/73167 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
2011-12-29gpu: ion: tegra: add tegra custom ioctl handling.Krishna Reddy
Add tegra specific custom ioctl handling. Change-Id: If87b47f969fe0b3fdbb3bee965c370f6610fd4be Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/71113 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com> Tested-by: Hiroshi Doyu <hdoyu@nvidia.com>
2011-12-22PM QoS: Add max online cpus as PM QoS parameterAlex Frid
Bug 894200 Change-Id: Ieb009a13c6ef9bca2388e234eb973d65a4e3a58b Signed-off-by: Alex Frid <afrid@nvidia.com> Reviewed-on: http://git-master/r/71034 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2011-12-22PM QoS: Simplify PM QoS expansion/mergeAlex Frid
- Replace class ID #define with enumeration - Loop through PM QoS objects during initialization (rather than initializing them one-by-one) Change-Id: I185b700b52c752c62e7550fe739adc498fc989ef Signed-off-by: Alex Frid <afrid@nvidia.com> Reviewed-on: http://git-master/r/70603 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Antti Miettinen <amiettinen@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
2011-12-22media: video: tegra: sh532u focuser driverErik Lilliebjerg
Fix focus position HW abstraction algorithm. The new algorithm uses a best-fit loop that allows for extra focus positions at each end of the focus range. Bug 909087 Change-Id: Ib25913e6ad5a6644a550f76cba94800bd664143e Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com> Reviewed-on: http://git-master/r/70466 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-12-22drivers: nct: Added low temp func to header fileJoshua Primero
Exposed the low temp function in header file. Change-Id: I67983e05d2f366981c4cff20d3a84cadc38806a8 Signed-off-by: Joshua Primero <jprimero@nvidia.com> Reviewed-on: http://git-master/r/70933 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2011-12-22tracedump: Dump ftrace ring buffer dataAlon Farchy
Add a new module that will dump the contents of the ftrace ring buffer. Data is compressed and can be in ascii or binary form. Data will automatically dump on kernel panic to console. Data can be dumped by reading /proc/tracedump. See tracedump.h for details. Change-Id: I7b7afc3def0b88629dd120d17e43858306a8f357 Signed-off-by: Liang Cheng <licheng@nvidia.com> Reviewed-on: http://git-master/r/69494 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
2011-12-21drm/radeon/kms: add some new pci idsAlex Deucher
commit cd5cfce856684e13b9b57d46b78bb827e9c4da3c upstream. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=43739 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-21linux/log2.h: Fix rounddown_pow_of_two(1)Linus Torvalds
commit 13c07b0286d340275f2d97adf085cecda37ede37 upstream. Exactly like roundup_pow_of_two(1), the rounddown version was buggy for the case of a compile-time constant '1' argument. Probably because it originated from the same code, sharing history with the roundup version from before the bugfix (for that one, see commit 1a06a52ee1b0: "Fix roundup_pow_of_two(1)"). However, unlike the roundup version, the fix for rounddown is to just remove the broken special case entirely. It's simply not needed - the generic code 1UL << ilog2(n) does the right thing for the constant '1' argment too. The only reason roundup needed that special case was because rounding up does so by subtracting one from the argument (and then adding one to the result) causing the obvious problems with "ilog2(0)". But rounddown doesn't do any of that, since ilog2() naturally truncates (ie "rounds down") to the right rounded down value. And without the ilog2(0) case, there's no reason for the special case that had the wrong value. tl;dr: rounddown_pow_of_two(1) should be 1, not 0. Acked-by: Dmitry Torokhov <dtor@vmware.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-21fix apparmor dereferencing potentially freed dentry, sanitize __d_path() APIAl Viro
commit 02125a826459a6ad142f8d91c5b6357562f96615 upstream. __d_path() API is asking for trouble and in case of apparmor d_namespace_path() getting just that. The root cause is that when __d_path() misses the root it had been told to look for, it stores the location of the most remote ancestor in *root. Without grabbing references. Sure, at the moment of call it had been pinned down by what we have in *path. And if we raced with umount -l, we could have very well stopped at vfsmount/dentry that got freed as soon as prepend_path() dropped vfsmount_lock. It is safe to compare these pointers with pre-existing (and known to be still alive) vfsmount and dentry, as long as all we are asking is "is it the same address?". Dereferencing is not safe and apparmor ended up stepping into that. d_namespace_path() really wants to examine the place where we stopped, even if it's not connected to our namespace. As the result, it looked at ->d_sb->s_magic of a dentry that might've been already freed by that point. All other callers had been careful enough to avoid that, but it's really a bad interface - it invites that kind of trouble. The fix is fairly straightforward, even though it's bigger than I'd like: * prepend_path() root argument becomes const. * __d_path() is never called with NULL/NULL root. It was a kludge to start with. Instead, we have an explicit function - d_absolute_root(). Same as __d_path(), except that it doesn't get root passed and stops where it stops. apparmor and tomoyo are using it. * __d_path() returns NULL on path outside of root. The main caller is show_mountinfo() and that's precisely what we pass root for - to skip those outside chroot jail. Those who don't want that can (and do) use d_path(). * __d_path() root argument becomes const. Everyone agrees, I hope. * apparmor does *NOT* try to use __d_path() or any of its variants when it sees that path->mnt is an internal vfsmount. In that case it's definitely not mounted anywhere and dentry_path() is exactly what we want there. Handling of sysctl()-triggered weirdness is moved to that place. * if apparmor is asked to do pathname relative to chroot jail and __d_path() tells it we it's not in that jail, the sucker just calls d_absolute_path() instead. That's the other remaining caller of __d_path(), BTW. * seq_path_root() does _NOT_ return -ENAMETOOLONG (it's stupid anyway - the normal seq_file logics will take care of growing the buffer and redoing the call of ->show() just fine). However, if it gets path not reachable from root, it returns SEQ_SKIP. The only caller adjusted (i.e. stopped ignoring the return value as it used to do). Reviewed-by: John Johansen <john.johansen@canonical.com> ACKed-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-21mfd: ricoh583: update API prototypevenu byravarasu
With this commit below changes to ricoh583 MFD are done: 1. Updating cache copy of int enable register. 2. Changing the prototypes for bulk read & write APIs. 3. Updating rtc platform data structure. bug 902137 Change-Id: I616d86628addaaa04f3faec035120bd6f9569603 Signed-off-by: venu byravarasu <vbyravarasu@nvidia.com> Reviewed-on: http://git-master/r/70010 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2011-12-21hwmon: ina230: Add driver for INA230 (/ INA226)Peter Boonstoppel
Adds support for current monitoring for battery EDP capping Change-Id: I85fc1770013ab80b986b3b6d77ffd96e1dc4068f Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-on: http://git-master/r/60560 Reviewed-on: http://git-master/r/69111 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Anshul Jain (SW) <anshulj@nvidia.com> Tested-by: Anshul Jain (SW) <anshulj@nvidia.com> Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
2011-12-21power: bpcm: Battery Peak Power Management driverAnshul Jain
This driver reduces CPU frequency in half by setting the CCLK_DIVIDER on GPIO level triggered event by current monitoring device. It then calls dvfs apis to reduce cpu frequency/voltage. Change-Id: I703e2277243df5328ee6a46478ec8b7a3dab93aa Signed-off-by: Anshul Jain <anshulj@nvidia.com> Reviewed-on: http://git-master/r/68794 Reviewed-on: http://git-master/r/69103 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
2011-12-15tegra: nor: Add NOR mapping driver.Manoj Chourasia
This patch adds NOR mapping driver for tegra2 and tegra3. Signed-off-by: Manoj Chourasia<mchourasia@nvidia.com> Change-Id: Ie773d024a49977e356d4a9d605910ca30f22a3f3 Reviewed-on: http://git-master/r/43566 Reviewed-on: http://git-master/r/62149 Tested-by: Manoj Chourasia <mchourasia@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
2011-12-15regulator: fan53555: Adding driverJake Park
Adding regulator driver for the device FAN53555. Bug 892117 Change-Id: I895094d3e0aaeb85cfd33f1bc16008c66961b403 Reviewed-on: http://git-master/r/67862 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Jake Park <jakep@nvidia.com>
2011-12-14Merge branch 'linux-3.1.5' into android-tegra-nv-3.1Varun Wadekar
Conflicts: arch/arm/Kconfig Change-Id: If8aaaf3efcbbf6c9017b38efb6d76ef933f147fa Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-12-09sch_red: fix red_calc_qavg_from_idle_timeEric Dumazet
[ Upstream commit ea6a5d3b97b768561db6358f15e4c84ced0f4f7e ] Since commit a4a710c4a7490587 (pkt_sched: Change PSCHED_SHIFT from 10 to 6) it seems RED/GRED are broken. red_calc_qavg_from_idle_time() computes a delay in us units, but this delay is now 16 times bigger than real delay, so the final qavg result smaller than expected. Use standard kernel time services since there is no need to obfuscate them. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09inet: add a redirect generation id in inetpeerEric Dumazet
[ Upstream commit de68dca1816660b0d3ac89fa59ffb410007a143f ] Now inetpeer is the place where we cache redirect information for ipv4 destinations, we must be able to invalidate informations when a route is added/removed on host. As inetpeer is not yet namespace aware, this patch adds a shared redirect_genid, and a per inetpeer redirect_genid. This might be changed later if inetpeer becomes ns aware. Cache information for one inerpeer is valid as long as its redirect_genid has the same value than global redirect_genid. Reported-by: Arkadiusz Miśkiewicz <a.miskiewicz@gmail.com> Tested-by: Arkadiusz Miśkiewicz <a.miskiewicz@gmail.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09firmware: Sigma: Fix endianess issuesLars-Peter Clausen
commit bda63586bc5929e97288cdb371bb6456504867ed upstream. Currently the SigmaDSP firmware loader only works correctly on little-endian systems. Fix this by using the proper endianess conversion functions. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09firmware: Sigma: Prevent out of bounds memory accessLars-Peter Clausen
commit 4f718a29fe4908c2cea782f751e9805319684e2b upstream. The SigmaDSP firmware loader currently does not perform enough boundary size checks when processing the firmware. As a result it is possible that a malformed firmware can cause an out of bounds memory access. This patch adds checks which ensure that both the action header and the payload are completely inside the firmware data boundaries before processing them. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09drm/radeon/kms: add some new pci idsAlex Deucher
commit 2ed4d9d648cbd4fb1c232a646dbdbdfdd373ca94 upstream. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09clocksource: Avoid selecting mult values that might overflow when adjustedJohn Stultz
commit d65670a78cdbfae94f20a9e05ec705871d7cdf2b upstream. For some frequencies, the clocks_calc_mult_shift() function will unfortunately select mult values very close to 0xffffffff. This has the potential to overflow when NTP adjusts the clock, adding to the mult value. This patch adds a clocksource.maxadj value, which provides an approximation of an 11% adjustment(NTP limits adjustments to 500ppm and the tick adjustment is limited to 10%), which could be made to the clocksource.mult value. This is then used to both check that the current mult value won't overflow/underflow, as well as warning us if the timekeeping_adjust() code pushes over that 11% boundary. v2: Fix max_adjustment calculation, and improve WARN_ONCE messages. v3: Don't warn before maxadj has actually been set CC: Yong Zhang <yong.zhang0@gmail.com> CC: David Daney <ddaney.cavm@gmail.com> CC: Thomas Gleixner <tglx@linutronix.de> CC: Chen Jie <chenj@lemote.com> CC: zhangfx <zhangfx@lemote.com> Reported-by: Chen Jie <chenj@lemote.com> Reported-by: zhangfx <zhangfx@lemote.com> Tested-by: Yong Zhang <yong.zhang0@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09drm: integer overflow in drm_mode_dirtyfb_ioctl()Xi Wang
commit a5cd335165e31db9dbab636fd29895d41da55dd2 upstream. There is a potential integer overflow in drm_mode_dirtyfb_ioctl() if userspace passes in a large num_clips. The call to kmalloc would allocate a small buffer, and the call to fb->funcs->dirty may result in a memory corruption. Reported-by: Haogang Chen <haogangchen@gmail.com> Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08include: tty: increase buffer size to 32768bFrederic Bossy
Icera modem traces are corrupted on AP traces cannot be read on time by AP on ttyACM Increasing 4096->32768 bytes improves things Bug:909204 Signed-off-by: Frederic Bossy <fbossy@nvidia.com> Change-Id: I593fa0274929fb83c912d472b134a2e293a3a724 Reviewed-on: http://git-master/r/67701 Reviewed-by: Greg Heinrich <gheinrich@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-12-08media: video: tegra: TPS61050 torch driverErik Lilliebjerg
- Added multi-instance support with sync capability - Added GLOS power scheme - Standardized the IOCTL API Bug 860351 Bug 850614 Bug 852480 Bug 872156 Bug 824459 Change-Id: I858edfb4437ca1f7121790a5580b8825a8d925ae Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com> Reviewed-on: http://git-master/r/66164 Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2011-12-08mpu3050: Motion Libraries: Update Kernel files for MPL v4.1.1.Robert Collins
Bug 825602 Bug 834422 Bug 843573 Change-Id: I13cd5d5faac6a33b36ae1129180f13f255192064 Reviewed-on: http://git-master/r/66083 Reviewed-by: Alex Courbot <acourbot@nvidia.com> Tested-by: Alex Courbot <acourbot@nvidia.com> Reviewed-by: Robert Collins <rcollins@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-12-08video: tegra: host: Support for right shift on reloc patchesTerje Bergstrom
Some hardware architectures require that only select MSB bits be supplied to them for addresses. They do the reverse transformation while accessing the actual memory. Bug 857531 Change-Id: I215f099ff0ee86daff1c1eb1e5b70edf8ae856d9 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/66654 Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Reviewed-by: Shashank Garg <sgarg@nvidia.com>
2011-12-08kernel: sound: Adding TI codec supportVinod G
Adding the code for supporting TI AIC3262 codec. bug 816608 Change-Id: I19c3e03e8fd442c0c19a72a7efeddcd0ca05a7e1 Reviewed-on: http://git-master/r/67279 Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Tested-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com>
2011-12-08misc: nct1008: Refactored nct1008 driverJoshua Primero
Refactored nct1008 driver so that it can be controlled by the Tegra Thermal framework. Reviewed-on: http://git-master/r/58044 Reviewed-on: http://git-master/r/63339 Cherry-picked as e420f67c427173403a9669a67cfe98ad3c8482e1. Change-Id: Id47205bb2d8f148dc919de7f1a53f1c562899d5e Signed-off-by: Joshua Primero <jprimero@nvidia.com> Reviewed-on: http://git-master/r/66552 Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2011-12-08drivers: misc: nct: added stubs for nct1008Joshua Primero
Added default stubs for nct1008 so if CONFIG_SENSORS_NCT1008 is disabled build still compiles. Bug 901092 Reviewed-on: http://git-master/r/63923 (cherry picked from commit 6ee9996fa68011604164cf890160ec12e7bd7684) Change-Id: Ic859c37f63b943591887bc107aa5f5c677bbb01d Reviewed-on: http://git-master/r/64562 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> (cherry picked from commit e3b95b2b4864d12d52156f54be549cdbef6a6071) Signed-off-by: Joshua Primero <jprimero@nvidia.com> Reviewed-on: http://git-master/r/66550 Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2011-12-08drivers: nct1008: Generic therm funcs to nct1008Joshua Primero
Preparing nct1008 for refactoring overhaul. Added generic functions which will be used by Tegra thermal module. Reviewed-on: http://git-master/r/57952 Reviewed-on: http://git-master/r/63337 cherry-picked from 2d5e2369511fb49f1895938fea935b12d72c4827 Change-Id: Ia850db408f533318db4b634e6f29b68c1ad8a1de Signed-off-by: Joshua Primero <jprimero@nvidia.com> Reviewed-on: http://git-master/r/66549 Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2011-12-08mfd: tps80031: Support sleep configuration through platform dataLaxman Dewangan
Supporting the sleep configuration through platform data. Rearranging clock initialization to take external power control. Reviewed-on: http://git-master/r/67076 (cherry picked from commit 9da9d369bdbe988b98eec9b63085dfdb26de8237) Change-Id: I40c5a8608522dbc322e148b5d569e8f5a00faa21 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/67331
2011-12-08mmc: Add support for non-standard voltage switchingPavan Kunapuli
Adding quirk SDHCI_QUIRK_NON_STD_VOLTAGE_SWITCHING and callback switch_signal_voltage in sdhci_ops to support non standard signal voltage switching. Bug 906650 Change-Id: If5538fb3177770ccb103305a7b3f0f7a6a8b92e6 Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-on: http://git-master/r/67137 Reviewed-by: Sachin Nikam <snikam@nvidia.com>