Mike Lockwood [Fri, 11 May 2012 16:00:40 +0000 (09:00 -0700)]
USB: gadget: Add ACCESSORY_SET_AUDIO_MODE control request and ioctl
The control request will be used by the host to enable/disable USB audio
and the ioctl will be used by userspace to read the audio mode
Change-Id: I81c38611b588451e80eacdccc417ca6e11c60cab
Signed-off-by: Mike Lockwood <lockwood@google.com>
Rebecca Schultz Zavin [Mon, 10 Sep 2012 23:12:01 +0000 (16:12 -0700)]
gpu: ion: Fix memory leak of dirty bits
Change-Id: Ia65ebac1f094bbea4090a5ddfa91bf8f5497bc16
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Todd Poynor [Fri, 31 Aug 2012 06:09:14 +0000 (23:09 -0700)]
w1: ds2482: Manage SLPZ pin sleep state
Place SLPZ pin in sleep state at system suspend time if a GPIO is
provided by board platform data.
Change-Id: I93c61fa0ae474e968e0f909209c9bfcaafe3dd2c
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Rebecca Schultz Zavin [Wed, 29 Aug 2012 00:27:22 +0000 (17:27 -0700)]
gpu: ion: Add debug information for orphaned handles
It is possible for a buffer to exist only as a dma_buf file
descriptor without it being held in any handles. When this
occurs it is impossible to track where the buffer is in the
system (without traversing every process in the system and
inspecting its file table). When buffers are orphaned like
this, copy the task comm and pid of the last client to hold
them into the buffer so we have a debugging hint as to where
this buffer came from. In practice this will probalby be
the process that allocated the buffer.
Change-Id: I49d179f9ccdee36982f365af15d0f0b577c6347e
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Rebecca Schultz Zavin [Wed, 29 Aug 2012 17:30:08 +0000 (10:30 -0700)]
gpu: ion: Fix bug in ion_free
Change-Id: I9e92ed750c5cd5d0329ce1747e419c908e0f37ef
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Rebecca Schultz Zavin [Mon, 20 Aug 2012 22:41:11 +0000 (15:41 -0700)]
gpu: ion: Fix race between ion_import and ion_free
If preemted during ion_free after the refcount is updated but
before the handle can be removed from the rb_tree, import
might find that handle in the tree and try to reuse it
when execution returns to free, the handle will be cleaned
up leaving the caller of import with a corrupt handle.
This patch modifies the locking to protect agains this race.
Change-Id: I31d18cc6398f0ca18e05cd919e2bcf86fa18d568
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
JP Abgrall [Tue, 28 Aug 2012 23:53:32 +0000 (16:53 -0700)]
netfilter: xt_qtaguid: report only uid tags to non-privileged processes
In the past, a process could only see its own stats (uid-based summary,
and details).
Now we allow any process to see other UIDs uid-based stats, but still
hide the detailed stats.
Change-Id: I7666961ed244ac1d9359c339b048799e5db9facc
Signed-off-by: JP Abgrall <jpa@google.com>
Todd Poynor [Thu, 23 Aug 2012 20:41:54 +0000 (13:41 -0700)]
power: android-battery: use 1/10th deg C units for temperature
Same units as power_supply, don't need 1/10000 deg C and conversion
is error-prone.
Change-Id: I8cf146d2a7725df2dacc415daa66b2986b69f2a7
Signed-off-by: Todd Poynor <toddpoynor@google.com>
hongmin.son [Thu, 23 Aug 2012 20:11:30 +0000 (13:11 -0700)]
power: android-battery: Add USB and AC battery power supplies
For reflecting board-level decisions on whether USB or AC charger
is connected, which may differ from charger power supply notion
of USB input path (which may be connected to an AC charger) vs.
AC input path.
Change-Id: I9d2eb446db8b4d9496ba7ce1472d0e7a4d4e24ef
[toddpoynor@google.com: refactoring]
Signed-off-by: hongmin.son <hongmin.son@samsung.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Greg Hackmann [Thu, 23 Aug 2012 00:38:04 +0000 (17:38 -0700)]
gpu: ion: fix page offset in dma_buf_kmap()
Change-Id: I1c975f0ffde5c75d6166ae20d379991d3f770a26
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Todd Poynor [Thu, 23 Aug 2012 02:02:26 +0000 (19:02 -0700)]
power: android-battery: Provide fake values when fuel gauge missing
Avoid shutdown due to battery capacity or temperature out of range.
Change-Id: I54abe4dc54bf2fb8a9b972a3940e6fd93cc60473
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Rebecca Schultz Zavin [Wed, 22 Aug 2012 04:35:20 +0000 (21:35 -0700)]
gpu: ion: Switch to using kmalloc rather than kmap during allocation
Previously, metadata was stored in the allocated pages themselves
during allocation. However the system can only have a limited
number of kmapped pages. A very large allocation might exceed
this limit.
Change-Id: Ibe972096e83924bf5e621d8282c4cd133ca75b0a
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Mike J. Chen [Thu, 24 May 2012 22:12:36 +0000 (15:12 -0700)]
ARM: disable preemption in machine_shutdown
Since the smp call to stop the other cpus are handled in those
cpus in interrupt context, there's a potential for those smp
handlers to interrupt threads holding spin locks (such as the
one a mutex holds). This prevents those threads from ever
releasing their spin lock, so if the cpu doing the shutdown
is allowed to switch to another thread that tries to grab the
same lock/mutex, we could get into a deadlock (the spin lock
call is called with preemption disabled in the mutex lock code).
To avoid that possibility, disable preemption before doing the
smp_send_stop().
Change-Id: I7976c5382d7173fcb3cd14da8cc5083d442b2544
Signed-off-by: Mike J. Chen <mjchen@google.com>
Ashish Sharma [Mon, 13 Aug 2012 20:19:57 +0000 (13:19 -0700)]
netfilter: xt_IDLETIMER: Rename INTERFACE to LABEL in netlink notification.
Change-Id: Iaeca5dd2d7878c0733923ae03309a2a7b86979ca
Signed-off-by: Ashish Sharma <ashishsharma@google.com>
Rebecca Schultz Zavin [Fri, 10 Aug 2012 04:29:52 +0000 (21:29 -0700)]
gpu: ion: Only map as much of the vma as the user requested
Change-Id: If0e368e192941c118683ab74aed48e4e0cb5731d
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Todd Poynor [Tue, 7 Aug 2012 01:18:31 +0000 (18:18 -0700)]
power: android_battery: nn.n temperature format for /d/android-power
Change-Id: I0c20effcadd3c0673d04be190133883b3c2bf599
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Mon, 6 Aug 2012 19:01:51 +0000 (12:01 -0700)]
power: android_battery: fix negative temperature display
Change-Id: Ic9798bc5194b6192fec726a8f136867f111e4765
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Benoit Goby [Tue, 15 Feb 2011 05:32:43 +0000 (21:32 -0800)]
PM: Add watchdog to catch lockup during device resume
Refactor the dpm suspend watchdog code and add watchdogs
on resume too. The dpm wachdog prints the stack trace and
reboots the system if a device takes more than 12 seconds
to suspend or resume.
Change-Id: If00c047a17b80bdc13a8426393c698bc450a7347
Signed-off-by: Benoit Goby <benoit@android.com>
Todd Poynor [Sat, 4 Aug 2012 01:58:46 +0000 (18:58 -0700)]
power: android: switch to nn.n format for temperature readings
Change-Id: I67b44e5c706c94f5e2031da9dab3dddb1a4b6b3f
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Thu, 2 Aug 2012 01:22:22 +0000 (18:22 -0700)]
power: android: battery monitor polling with wakeup alarms
Based on Tuna code from 3.0 ported to 3.4 alarm API.
Change-Id: I9b13209963d5a5043237e9e29f3cb07c40583af2
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Laura Abbott [Thu, 2 Aug 2012 01:06:18 +0000 (18:06 -0700)]
gpu: ion: Don't call ion_buffer_put on error path
If dma_buf_fd fails, the dma_buf needs to be cleaned up by
calling dma_buf_put. dma_buf_put will call ion_dma_buf_release
which in turn calls ion_buffer_put to clean up the buffer
reference. Calling ion_buffer_put after dma_buf_put drops the
reference count by one more which is incorrect. Fix this by
getting rid of the extra ion_buffer_put call.
Change-Id: Ieb3a7b781bf2dc299c45384dbf0a12d186adeb22
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Todd Poynor [Wed, 1 Aug 2012 03:14:05 +0000 (20:14 -0700)]
power: android: add /d/android-power
Change-Id: I306ae5928bb5c32dc986811cfa3a6dd98519a2d7
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Fri, 27 Jul 2012 18:27:33 +0000 (11:27 -0700)]
power: android battery: add generic android battery driver
Add a generic battery power supply and glue logic for talking to the
board battery driver. This driver handles common chores such as:
* periodic battery level and health monitoring
* kernel log reporting and other debugging features for key
properties provided by different charger, fuel gauge, etc.
components
* ensure properties such as battery health are made available to
userspace
* common processing for board-level battery/case temperature sensors
and policy for charging status based on battery health
Based on work by himihee.seo@samsung.com, ms925.kim@samsung.com, and
joshua.chang@samsung.com.
Change-Id: I5fa8e8d68811d84820b7a130b0245ad2b5b6d36b
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Olav Haugan [Tue, 15 May 2012 21:40:11 +0000 (14:40 -0700)]
gpu: ion: IOCTL return success when error occurs
ION_IOC_MAP, ION_IOC_SHARE, and ION_IOC_IMPORT may return
success when an error occurs.
Add correct error handling to ION_IOC_MAP, ION_IOC_SHARE, and
ION_IOC_IMPORT.
Change-Id: I61c6b0c574da425604235b2d39e13e4a27f7b6f3
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Olav Haugan [Wed, 25 Jan 2012 17:28:55 +0000 (09:28 -0800)]
gpu: ion: Add EXPORT_SYMBOL to functions
Several functions in the ion interface is missing
EXPORT_SYMBOL. This is needed to allow clients to
use these functions from kernel modules.
Add EXPORT_SYMBOL to functions that are supposed
to be exposed.
Change-Id: I25611f7c367fd131daf5fb652abbea77e89a3d06
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Olav Haugan [Thu, 19 Apr 2012 17:20:22 +0000 (10:20 -0700)]
gpu: ion: Add missing argument to WARN call
The condition argument to the WARN call in ion_free and
ion_share_dma_buf are missing. Add the argument to
allow correct printing of warning message.
Change-Id: I9b233992d5034f8780296cae6b42d77699f14cce
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Dima Zavin [Fri, 27 Jul 2012 22:29:55 +0000 (15:29 -0700)]
gpu: ion: do not ask for compound pages in system heap
Change-Id: If84b246ec984ee2ae7b0174c714c8ce7726a6ab1
Signed-off-by: Dima Zavin <dima@android.com>
Hosung Kim [Mon, 23 Jul 2012 08:33:17 +0000 (17:33 +0900)]
mmc: sdio: Fix sdio_reset_comm for sync
mmc_sdio_init_card function is doing necessary initialization
Change-Id: I7d2e432b2af8a76267378acba07e3e4e8fd1e6bc
Signed-off-by: Hosung Kim <hosung0.kim@samsung.com>
Colin Cross [Fri, 20 Jul 2012 01:40:04 +0000 (18:40 -0700)]
ARM: fiq_debugger: add process context reboot command
kernel_restart cannot be called from interrupt context. Add support for
commands called from a work function, and implement the "reboot" command
there. Also rename the existing irq-mode command to "reset" and change
it to use machine_restart instead of kernel_restart.
Change-Id: I3c423147c01db03d89e95a5b99096ca89462079f
Signed-off-by: Colin Cross <ccross@android.com>
Todd Poynor [Wed, 18 Jul 2012 23:28:50 +0000 (16:28 -0700)]
power: power_supply: add POWER_SUPPLY_PROP_CHARGE_ENABLED
Change-Id: I3e93b502452811cbfc4d904202b4f1d94edc143d
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Tue, 17 Jul 2012 00:32:44 +0000 (17:32 -0700)]
cpufreq: interactive: remove input_boost handling
Now handled in userspace Power HAL instead.
Change-Id: I78a4a2fd471308bfcd785bbefcc65fede27314cf
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Tue, 17 Jul 2012 00:07:15 +0000 (17:07 -0700)]
cpufreq: interactive: handle speed up and down in the realtime task
Not useful to have a separate, non-realtime workqueue for speed down
events, avoid priority inversion for speed up events.
Change-Id: Iddcd05545245c847aa1bbe0b8790092914c813d2
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Sam Leffler [Wed, 27 Jun 2012 19:55:56 +0000 (12:55 -0700)]
cpufreq: interactive: keep freezer happy when not current governor
Fix a problem where the hung task mechanism was deeming the interactive
clock boost thread as hung. This was because the thread is created at
module init but never run/woken up until needed. If the governor is not
being used this can be forever. To workaround this explicitly wake up
the thread once all the necessary data structures are initialized. The
latter required some minor code shuffle.
Signed-off-by: Sam Leffler <sleffler@chromium.org>
Change-Id: Ie2c058dd75dcb6460ea10e7ac997e46baf66b1fe
Sam Leffler [Wed, 27 Jun 2012 17:12:04 +0000 (10:12 -0700)]
cpufreq: interactive: take idle notifications only when active
Register an idle notifier only when the governor is active. Also
short-circuit work of idle end if the governor is not enabled.
Signed-off-by: Sam Leffler <sleffler@chromium.org>
Change-Id: I4cae36dd2e7389540d337d74745ffbaa0131870f
Todd Poynor [Fri, 13 Jul 2012 20:30:04 +0000 (13:30 -0700)]
power: power_supply: add POWER_SUPPLY_PROP_USB_OTG
Change-Id: Idfc6ef2e37d62aad6f26cc8eafa53db642cd352b
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Fri, 13 Jul 2012 03:27:16 +0000 (20:27 -0700)]
power: power_supply: move POWER_SUPPLY_PROP_USB_HC to type 'int' order
Change-Id: I001af30ab5fe06dde5f368241f21b9e0864777a1
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Benoit Goby [Fri, 20 Jan 2012 22:42:41 +0000 (14:42 -0800)]
usb: gadget: Fix usb string id allocation
Don't reset next_string_id every time the gadget is enabled, this makes
the next strings allocated overwrite strings allocated at probe time.
Instead, fix rndis not to allocate new string ids on every config bind.
Change-Id: Ied28ee416bb6f00c434c34176fe5b7f0dcb2b2d4
Signed-off-by: Benoit Goby <benoit@android.com>
Todd Poynor [Tue, 3 Jul 2012 22:41:20 +0000 (15:41 -0700)]
power_supply: Add custom property for USB High Current mode
For smb347.
Change-Id: I3323469072e1ee5085d61af8a89612b06b91f94a
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Rebecca Schultz Zavin [Tue, 26 Jun 2012 20:17:34 +0000 (13:17 -0700)]
gpu: ion: Add explicit sync ioctl
This is deprecated in favor of using the dma_buf api which will
automatically sync a buffer to memory when it is mapped to a device.
However, that functionality is not ready, so this patch adds the
ability to sync a buffer explicitly.
Change-Id: Ia15810a13cd5c4b939f4afa5c8e721c89fac76d4
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Rebecca Schultz Zavin [Thu, 14 Jun 2012 20:30:01 +0000 (13:30 -0700)]
gpu: ion: Modify the system heap to try to allocate large/huge pages
On some systems there is a performance benefit to reducing tlb pressure
by minimizing the number of chunks in an allocation.
Change-Id: Ie6ff215a5f32a837bf3103f79a09748e38759f0e
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Rebecca Schultz Zavin [Thu, 14 Jun 2012 22:08:53 +0000 (15:08 -0700)]
gpu: ion: Add cache maintenance to ion.
This patch adds cache maintenance operations to ion. As per mailing
list discussions regarding dma_buf, cache operations are done implicitly.
At buffer allocaiton time the user can select whether he'd like mappings
(both kernel and user) to be cached. When cached mappings are selected,
no mappings will be created for a buffer at mmap time. Instead pages will
be faulted in one at a time so we can track which pages require flushing
before dma. When the buffers are mapped for dma (via the dma_buf apis)
any pages which were touched will be synced for device.
Change-Id: Id5d6894e8bb52af038c91dd895143bf3b4203b0b
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Rebecca Schultz Zavin [Mon, 25 Jun 2012 21:02:25 +0000 (14:02 -0700)]
gpu: ion: Switch max num_heaps to 16 to work around an issue elsewere
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Change-Id: I3bcbc9c424086f5921a1641afeb16040deffcece
Benoit Goby [Sat, 23 Jun 2012 01:17:10 +0000 (18:17 -0700)]
usb: gadget: accessory: Fix section mismatch
create_bulk_endpoints should not be __init since it is called when
accessory is enabled
Change-Id: If827a4531f0f6c15af938345163923186368e2a5
Signed-off-by: Benoit Goby <benoit@android.com>
Todd Poynor [Wed, 20 Jun 2012 01:04:30 +0000 (18:04 -0700)]
power_supply: convert wakelock to wakeup source
And supply name will be used as wakeup source name.
Change-Id: I53075491c6e1a4c66755afe8a40b7166cd8d6cb2
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Wed, 20 Jun 2012 04:06:47 +0000 (21:06 -0700)]
gpio_input: convert from wakelocks to wakeup sources
And add device names to wakeup source names
Change-Id: Ia5f2723319a2e749f00d6ec7d846edff6af6d5c2
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Rebecca Schultz Zavin [Thu, 14 Jun 2012 21:52:17 +0000 (14:52 -0700)]
gpu: ion: Fix bug in heap type enum
Change-Id: I8bf1345896774f02bd25c8d25a05d2c1eae262ef
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Laura Abbott [Fri, 16 Mar 2012 22:33:39 +0000 (15:33 -0700)]
gpu: ion: Map only the vma size given
When mapping carveout buffers into userspace, only map
the size of the vma given, not the full size of the buffer
since clients may map less than the buffer size.
Change-Id: I1b391b23219455e879a900d947c728db3c8c4a76
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Laura Abbott [Thu, 7 Jun 2012 23:41:30 +0000 (16:41 -0700)]
gpu: ion: Loop on the handle count when destroying
When destroying a handle, all kernel mappings to that handle
should be destroyed. Other handles may still have references
and valid mappings to the buffer underneath which should not
be destroyed. Loop on the handle reference count, not the buffer
reference count to get rid of all kernel mappings for the handle.
Change-Id: I7dc5d6a86513fc5fa4e21110ceab434714ea2493
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Rebecca Schultz Zavin [Thu, 7 Jun 2012 23:59:59 +0000 (16:59 -0700)]
gpu: ion: ion_system_heap: Change allocations to GFP_HIGHUSER
Previously the ion_system_heap was using GFP_KERNEL, forcing all allocations
to be in lowmem. This quickly causes us to run out of lowmem.
Change-Id: I6d502a5f1c20c8a8e44fb5903fcb228f8435a564
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Rebecca Schultz Zavin [Thu, 7 Jun 2012 21:51:21 +0000 (14:51 -0700)]
gpu: ion: Set the dma_address of the sg list at alloc time
This patch sets the dma_address field of the sglist representing
an allocation at allocation time. This technically breaks the dma api
which states that these addresses should be set when a particular device
takes ownership of a buffer via the dma_map apis. In the case of our
systems the only dma address space is physical addresses. Additionally,
we can not afford the overhead of calling dma_map_sg from this location
as it implies a cache invalidate that is not necessary if the memory
was previously mapped cached. Instead, the expectation is that memory
being returned from the heaps is ready for dma in that if any cached
mappings of that memory exist they have been invalidated.
Change-Id: Ib3025e80cee52ac0e9d809291e0196a084ea97bd
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Benoit Goby [Fri, 30 Mar 2012 02:25:23 +0000 (19:25 -0700)]
usb: gadget: android: Add FunctionFS
Add support for FunctionFS (ffs) to implement usb functions in userspace.
The aliases property stores the list of functions that are implemented
using functionfs.
For example:
echo "adb,mtp" > /sys/class/android_usb/android0/f_ffs/aliases
Then when the function are enabled:
echo "adb,acm" > /sys/class/android_usb/android0/functions
Internally, ffs and acm will be used.
Change-Id: I44117b183d48a5a99ddbee3ef2cf8998be74598e
Signed-off-by: Benoit Goby <benoit@android.com>
Greg Hackmann [Tue, 5 Jun 2012 20:23:42 +0000 (13:23 -0700)]
gpu: ion: fill in buffer->{dev,size} before mapping new buffers
At least one map_dma() implementation (EXYNOS_CONTIG) assumes the fields
are filled in
Change-Id: I88c84dc5663df41f9aa9401b5f80fc2570f9dd95
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Todd Poynor [Wed, 30 May 2012 00:33:56 +0000 (17:33 -0700)]
PM / Suspend: Print wall time at suspend entry and exit
Change-Id: I92f252414c013b018b9a392eae1ee039aa0e89dc
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Benoit Goby [Tue, 29 May 2012 20:57:27 +0000 (13:57 -0700)]
usb: gadget: android: Fix product name
Product names may contain spaces and scanf %s only matches the 1st word.
Use strlcpy instead.
Change-Id: Ie8703fea9775f7fc17fe615a42597ca3816d36b0
Signed-off-by: Benoit Goby <benoit@android.com>
Rebecca Schultz Zavin [Wed, 23 May 2012 19:55:55 +0000 (12:55 -0700)]
gpu: ion: Get an sg_table from an ion handle
This patch adds an interface to return and sg_table given a
valid ion handle.
Change-Id: Icd948c60c1af0a4279f337bcd591cd39b46325e8
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Todd Poynor [Fri, 11 May 2012 18:06:09 +0000 (11:06 -0700)]
cpufreq: interactive: fixup trace of string params
Change-Id: Iac47f62437e61b13724afbbf9df1a0729f58f236
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Fri, 11 May 2012 06:28:06 +0000 (23:28 -0700)]
cpufreq: interactive: restart above_hispeed_delay at each hispeed load
Change-Id: I2e5b91d45e8806b0ab94ca2301ed671c9af9ab13
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Rebecca Schultz Zavin [Mon, 7 May 2012 23:06:32 +0000 (16:06 -0700)]
gpu: ion: Allocate the sg_table at creation time rather than dynamically
Rather than calling map_dma on the allocations dynamically, this patch
switches to creating the sg_table at the time the buffer is created.
This is necessary because in future updates the sg_table will be used
for cache maintenance.
Change-Id: I49aac7c6d3a5afc440d18b917ae0e73be5d3f56d
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Rebecca Schultz Zavin [Fri, 27 Apr 2012 03:44:10 +0000 (20:44 -0700)]
gpu: ion: support begin/end and kmap/kunmap dma_buf ops
These ops were added in the 3.4 kernel. This patch adds support
for them to ion. Previous ion_map/unmap_kernel api is also
retained in addition to this new api.
Change-Id: I6d2db284dce12c2d8cc4e540865beee2da43bd0c
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Rebecca Schultz Zavin [Mon, 30 Apr 2012 23:45:38 +0000 (16:45 -0700)]
gpu: ion: Use alloc_pages instead of vmalloc from the system heap
With this change the ion_system_heap will only use kernel address
space when the memory is mapped into the kernel (rare case).
Change-Id: I8702cf89ffec0bd5c337bd88d7444013d4d94bc8
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Rebecca Schultz Zavin [Wed, 1 Feb 2012 19:09:46 +0000 (11:09 -0800)]
ion: Switch ion to use dma-buf
Ion now uses dma-buf file descriptors to share
buffers with userspace. Ion becomes a dma-buf
exporter and any driver that can import dma-bufs
can now import ion file descriptors.
Change-Id: Ia04d6d72fb301dc088eb8db6576822e9260ff332
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
KyongHo Cho [Wed, 7 Sep 2011 02:27:07 +0000 (11:27 +0900)]
gpu: ion: several bugfixes and enhancements of ION
1. Verifying if the size of memory allocation in ion_alloc() is aligned
by PAGE_SIZE at least. If it is not, this change makes the size to be
aligned by PAGE_SIZE.
2. Unmaps all mappings to the kernel and DMA address spaces when
destroying ion_buffer in ion_buffer_destroy(). This prevents leaks in
those virtual address spaces.
3. Makes the return value of ion_alloc() to be explicit Linux error code
when it fails to allocate a buffer.
4. Makes ion_alloc() implementation simpler. Removes 'goto' statement and
relavant call to ion_buffer_put().
5. Checks if the task is valid before calling put_task_struct() due
to failure on creating a ion client in ion_client_create().
6. Returns error when buffer allocation requested by userspace is failed.
Change-Id: I4fa9859f4a0b665fcb44e5c0da43c569732e93ae
Signed-off-by: KyongHo Cho <pullip.cho@samsung.com>
Rebecca Schultz Zavin [Tue, 31 Jan 2012 17:40:30 +0000 (09:40 -0800)]
ion: Add reserve function to ion
Rather than requiring each platform call memblock_remove or reserve
from the board file, add this to ion
Change-Id: Ie418a692c13e9e0cfe93ecc83d253d3ce860fc83
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Rebecca Schultz Zavin [Mon, 30 Jan 2012 22:18:08 +0000 (14:18 -0800)]
ion: Switch map/unmap dma api to sg_tables
Switch these api's from scatterlists to sg_tables
Change-Id: I8b99e39633df009d472ce24704fa26af7bb50fa2
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Benoit Goby [Wed, 16 May 2012 03:44:33 +0000 (20:44 -0700)]
usb: gadget: composite: Fix corruption when changing configuration
Remove the config from the configs list before releasing the spinlock.
Otherwise the other cpu might be processing a SET_CONFIGURATION that
will switch to the configuration that is being released.
Change-Id: Id4da0d0e18ead63e20cb236cd1d3e8e6d116acce
Signed-off-by: Benoit Goby <benoit@android.com>
Colin Cross [Thu, 17 May 2012 22:24:16 +0000 (15:24 -0700)]
debug: add parameters to prevent entering debug mode on errors
On non-developer devices kgdb prevents CONFIG_PANIC_TIMEOUT from
rebooting the device after a panic. Add module parameters
debug_core.break_on_exception and debug_core.break_on_panic to
allow skipping debug on panics and exceptions respectively. Both
default to true to preserve existing behavior.
Change-Id: I75dce7263e96cee069a9750920cce83dc6f98e8c
Signed-off-by: Colin Cross <ccross@android.com>
Benoit Goby [Thu, 10 May 2012 23:41:40 +0000 (16:41 -0700)]
usb: otg: otg-wakelock: Fix build for 3.4
Change-Id: I97e21e9e6645bf18522675039e512f85fe836794
Signed-off-by: Benoit Goby <benoit@android.com>
Colin Cross [Wed, 9 May 2012 23:09:50 +0000 (16:09 -0700)]
trace: power: add trace_clock_set_parent
Adds a new trace event to be called from clk_set_parent. Some
cpufreq drivers, including Tegra, reparent the cpu clock to a
slower clock while the main pll is relocking, tracing
clk_set_parent allows traces to show how for long the cpu is
running slower.
Uses a separate TRACE_EVENT instead of the clock event class to
allow the event to contain string names for the child and the
parent.
Signed-off-by: Colin Cross <ccross@android.com>
JP Abgrall [Fri, 27 Apr 2012 19:57:39 +0000 (12:57 -0700)]
netfilter: xt_qtaguid: start tracking iface rx/tx at low level
qtaguid tracks the device stats by monitoring when it goes up and down,
then it gets the dev_stats().
But devs don't correctly report stats (either they don't count headers
symmetrically between rx/tx, or they count internal control messages).
Now qtaguid counts the rx/tx bytes/packets during raw:prerouting and
mangle:postrouting (nat is not available in ipv6).
The results are in
/proc/net/xt_qtaguid/iface_stat_fmt
which outputs a format line (bash expansion):
ifname total_skb_{rx,tx}_{bytes,packets}
Added event counters for pre/post handling.
Added extra ctrl_*() pid/uid debugging.
Change-Id: Id84345d544ad1dd5f63e3842cab229e71d339297
Signed-off-by: JP Abgrall <jpa@google.com>
JP Abgrall [Fri, 27 Apr 2012 06:28:35 +0000 (23:28 -0700)]
netfilter: xt_IDLETIMER: Add new netlink msg type
Send notifications when the label becomes active after an idle period.
Send netlink message notifications in addition to sysfs notifications.
Using a uevent with
subsystem=xt_idletimer
INTERFACE=...
STATE={active,inactive}
This is backport from common android-3.0
commit:
beb914e987cbbd368988d2b94a6661cb907c4d5a
with uevent support instead of a new netlink message type.
Change-Id: I31677ef00c94b5f82c8457e5bf9e5e584c23c523
Signed-off-by: Ashish Sharma <ashishsharma@google.com>
Signed-off-by: JP Abgrall <jpa@google.com>
Andrey Konovalov [Fri, 23 Mar 2012 17:48:02 +0000 (21:48 +0400)]
Include if_pppolac.h and if_pppopns.h into header-y target
This is required to pass the headers_check
Change-Id: Ic4c773973278cbdf1cb4eb66473826cb96ccbfb3
Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
Tushar Behera [Mon, 26 Mar 2012 11:24:15 +0000 (16:54 +0530)]
security: Add proper checks for Android specific capability checks
Commit
b641072 ("security: Add AID_NET_RAW and AID_NET_ADMIN capability
check in cap_capable().") introduces additional checks for AID_NET_xxx
macros. Since the header file including those macros are conditionally
included, the checks should also be conditionally executed.
Change-Id: Iaec5208d5b95a46b1ac3f2db8449c661e803fa5b
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
John Stultz [Tue, 1 May 2012 21:10:31 +0000 (14:10 -0700)]
cpufreq-interactive: Compile fixup
Looks like AOSP has a compile bug. Fix it up.
Signed-off-by: John Stultz <john.stultz@linaro.org>
Todd Poynor [Thu, 3 May 2012 07:16:55 +0000 (00:16 -0700)]
cpufreq: interactive: add boost pulse interface
Change-Id: Icf1e86d2065cc8f0816ba9c6b065eb056d4e8249
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Fri, 27 Apr 2012 04:41:40 +0000 (21:41 -0700)]
cpufreq: interactive: set floor for boosted speed
Allow speed to drop to flooor frequency but not below, don't pin
to speed at last boost.
Change-Id: I0147c2b7a2e61ba16820605af6baaf09570be787
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Tue, 24 Apr 2012 03:42:41 +0000 (20:42 -0700)]
cpufreq: interactive: Add sysfs boost interface for hints from userspace
The explicit hint on/off version.
Change-Id: Ibf62b6d45bf6fb8c9c055b9bdaf074ce9374c04f
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Tue, 24 Apr 2012 04:22:45 +0000 (21:22 -0700)]
cpufreq: interactive: remove unused target_validate_time_in_idle
Change-Id: I37c5085b91318242612440dfd775ad762996612f
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Tue, 3 Apr 2012 00:17:14 +0000 (17:17 -0700)]
cpufreq: interactive: Boost frequency on touchscreen input
Based on previous patches by Tero Kristo <tero.kristo@nokia.com>,
Brian Steuer <bsteuer@codeaurora.org>,
David Ng <dave@codeaurora.org>,
Antti P Miettinen <amiettinen@nvidia.com>, and
Thomas Renninger <trenn@suse.de>
Change-Id: Ic55fedcf6f9310f43a7022fb88e23b0392122769
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Fri, 20 Apr 2012 20:18:32 +0000 (13:18 -0700)]
cpufreq: interactive: Separate speed target revalidate time and initial set time
Allow speed drop after min_sample_time elapses from last time
the current speed was last re-validated as appropriate for
current load / input boost.
Allow speed bump after min_sample_time (or above_hispeed_delay)
elapses from the time the current speed was originally set.
Change-Id: Ic25687a7a53d25e6544c30c47d7ab6f27a47bee8
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Thu, 19 Apr 2012 19:52:48 +0000 (12:52 -0700)]
cpufreq: interactive: base hispeed bump on target freq, not actual
For systems that set a common speed for all CPUs, checking current
speed here could bypass the intermediate hispeed bump decision for
this CPU when another CPU was already at hispeed. This could
result in an overly high setting (for all CPUs) in situations
where all CPUs were about to drop to load levels that map to
hispeed or below.
Change-Id: I186f23dcfc5e2b6336cab8b0327f0c8a9a4482bc
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Wed, 18 Apr 2012 00:39:34 +0000 (17:39 -0700)]
cpufreq: interactive: adjust code and documentation to match
Change-Id: If59c668d514a29febe5c35404fd9d01df8548eb1
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Sat, 14 Apr 2012 03:18:02 +0000 (20:18 -0700)]
cpufreq: interactive: configurable delay before raising above hispeed
Change-Id: I4d6ac40b23a3790d48e30c37408284e9f955e8fa
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Sat, 7 Apr 2012 02:59:36 +0000 (19:59 -0700)]
cpufreq: interactive: don't drop speed if recently at higher load
Apply min_sample_time to the last time the current target speed
was originally requested or re-validated as appropriate for the
current load, not to the time since the current speed was
originally set. Avoids periodic dips in speed during bursty
loads.
Change-Id: I250bda657985de60373f9897cc41f480664d51a1
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Sat, 7 Apr 2012 02:50:12 +0000 (19:50 -0700)]
cpufreq: interactive: set at least hispeed when above hispeed load
If load is above go_hispeed_load, always go to at least hispeed_freq,
even when reducing speed from a higher speed, not just when jumping
up from minimum speed. Avoids running at a lower than intended
speed after a burst of even higher load.
Change-Id: I5b9d2a15ba25ce609b21bac7c724265cf6838dee
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Fri, 6 Apr 2012 08:13:09 +0000 (01:13 -0700)]
cpufreq: interactive: apply intermediate load to max speed not current
Evaluate spikes in load (below go_hispeed_load) against the maximum
speed supported by the device, not the current speed (which tends to
make it too difficult to raise speed to intermediate levels until
very busy).
Change-Id: Ib937006abf8bedb60891a739acd733e89b732ae0
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Fri, 17 Feb 2012 00:27:59 +0000 (16:27 -0800)]
cpufreq interactive governor: event tracing
Change-Id: Ic13614a3da2faa2d4bd215ca3eb7191614f0cf66
Signed-off-by: Todd Poynor <toddpoynor@google.com>
JP Abgrall [Tue, 17 Apr 2012 23:00:07 +0000 (16:00 -0700)]
netfilter: xt_qtaguid: fix ipv6 protocol lookup
When updating the stats for a given uid it would incorrectly assume
IPV4 and pick up the wrong protocol when IPV6.
Change-Id: Iea4a635012b4123bf7aa93809011b7b2040bb3d5
Signed-off-by: JP Abgrall <jpa@google.com>
JP Abgrall [Sat, 14 Apr 2012 02:22:35 +0000 (19:22 -0700)]
netfilter: qtaguid: initialize a local var to keep compiler happy.
There was a case that might have seemed like new_tag_stat was not
initialized and actually used.
Added comment explaining why it was impossible, and a BUG()
in case the logic gets changed.
Change-Id: I1eddd1b6f754c08a3bf89f7e9427e5dce1dfb081
Signed-off-by: JP Abgrall <jpa@google.com>
Arve Hjønnevåg [Wed, 4 Apr 2012 01:01:03 +0000 (18:01 -0700)]
ARM: etm: Add sysfs entry to enable return stack if supported
Change-Id: Icb73d60324ad0ddfc3e8a450a28bb3d90c702788
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Tue, 3 Apr 2012 23:15:36 +0000 (16:15 -0700)]
ARM: etm: Add sysfs entry to disable branch_output flag
Change-Id: Ib91208a2c33621aa2d7bd9aa72bfbc670d9d5f1d
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Tue, 3 Apr 2012 00:20:32 +0000 (17:20 -0700)]
ARM: etm: Add sysfs entry to set context-id-size
Change-Id: I520dfb6e593dac131de8b9b1db77f1c734f18c24
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Tue, 3 Apr 2012 00:20:32 +0000 (17:20 -0700)]
ARM: etm: Add sysfs entry to enable timestamps if supported
Change-Id: Iff964ba2f6236ed81863e02ec7b3ec9fbc48044a
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Tue, 3 Apr 2012 03:18:56 +0000 (20:18 -0700)]
ARM: etm: Check arch version and disable data tracing for ptm
Change-Id: If2cb7928d0711f48348443d882a12416be9c5910
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Thu, 29 Mar 2012 04:03:13 +0000 (21:03 -0700)]
ARM: etm: Wait for etm/ptm(s) to stop before requesting PowerDown
When PowerDown was requested at the same time as ProgBit, the
formatter flush command that follows could get stuck.
Change-Id: Iafb665f61f055819e64ca1dcb60398c656f593e4
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Colin Cross [Wed, 4 Apr 2012 20:50:43 +0000 (13:50 -0700)]
gpu: ion: ion_carveout_heap: fix for 3.4
__arch_ioremap is no longer available, use __arm_ioremap instead.
Change-Id: Ied98208a3c1be6bc5ac195c3ade496fbb5003f37
Signed-off-by: Colin Cross <ccross@android.com>
Benoit Goby [Tue, 20 Mar 2012 01:56:52 +0000 (18:56 -0700)]
usb: gadget: adb: Only enable the gadget when adbd is ready
When adb is enabled, only connect the gadget when adbd is ready. If adbd
dies or is restarted (e.g. "adb root"), the gadget is disconnected when
the adb device is close, and it is re-connected once adb re-open the
device.
- Add callbacks to adb, similar to FunctionFs callbacks, to notify the
gadget when the daemon is ready or closed.
- Refcount calls to android_enable/android_disable to enable the gadget
only once all the function daemons are ready.
- Add enable/disble to android_usb_function to notify the function when
it is added/removed from the list of enabled functions.
Change-Id: Id54ff85aec9cf8715c94b4f9bd6137a79ad58bfc
Signed-off-by: Benoit Goby <benoit@android.com>
Colin Cross [Sun, 18 Mar 2012 22:25:55 +0000 (15:25 -0700)]
ARM: fiq_debugger: fix multiple consoles and make it a preferred console
Fix setting up consoles on multiple fiq debugger devices by
splitting the tty driver init into the initcall, and initializing
the single tty device during probe. Has the side effect of moving
the tty device node to /dev/ttyFIQx, where x is the platform device
id, which should normally match the serial port.
To avoid having to pass a different console=/dev/ttyFIQx for every
device, make the fiq debugger a preferred console that will be used
by default if no console was passed on the command line.
Change-Id: I6cc2670628a41e84615859bc96adba189966d647
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Thu, 15 Mar 2012 02:26:53 +0000 (19:26 -0700)]
kdb: support new lines without carriage returns
kdb expects carriage returns through the serial port to terminate
commands. Modify it to accept the first seen carriage return or
new line as a terminator, but not treat \r\n as two terminators.
Change-Id: I06166017e7703d24310eefcb71c3a7d427088db7
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Thu, 15 Mar 2012 02:23:29 +0000 (19:23 -0700)]
ARM: fiq_debugger: add support for kgdb
Adds polling tty ops to the fiq debugger console tty, which allows
kgdb to run against an fiq debugger console.
Add a check in do_sysrq to prevent enabling kgdb from the fiq
debugger unless a flag (writable only by root) has been set. This
should make it safe to enable KGDB on a production device.
Also add a shortcut to enable the console and kgdb together, to
allow kgdb to be enabled when the shell on the console is not
responding.
Change-Id: Ifc65239ca96c9887431a6a36b9b44a539002f544
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Thu, 15 Mar 2012 19:57:20 +0000 (12:57 -0700)]
ARM: fiq_debugger: add debug_putc
Convert all the calls to state->pdata->uart_putc to a debug_putc
helper.
Change-Id: Idc007bd170ff1b51d0325e238105ae0c86d23777
Signed-off-by: Colin Cross <ccross@android.com>