aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-07-19Merge branch 'lsk-interactive-gov-updates' of ↵v3.10/topic/interactiveMark Brown
git://git.linaro.org/arm/big.LITTLE/mp into lsk-v3.10-interactive
2013-07-17cpufreq: interactive governor drops bits in time calculationChris Redpath
Keep time calculation in 64-bit throughout. If we have long times between idle calculations this can result in deltas > 32 bits which causes incorrect load percentage calculations and selecting the wrong frequencies if we truncate here. Signed-off-by: Chris Redpath <chris.redpath@arm.com>
2013-07-17cpufreq: Interactive: Implement per policy instances of governorViresh Kumar
If we have a multi-package system, where we have multiple instances of struct policy (per package), currently we can't have multiple instances of same governor. i.e. We can't have multiple instances of Interactive governor for multiple packages. This is a bottleneck for multicluster system, where we want different packages to use Interactive governor, but with different tunables. This patch uses the infrastructure provided by earlier patches pushed in Mainline in v3.10-rc1/rc2 and implements per policy instances of Interactive governor. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-17cpufreq: interactive: Move definition of cpufreq_gov_interactive downwardsViresh Kumar
This moves definition of cpufreq_gov_interactive towards the bottom of file, so that we don't have to add prototype of cpufreq_governor_interactive() in the beginning of file. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-17cpufreq: interactive: Remove unnecessary cpu_online() checkViresh Kumar
Cpufreq no longer calls governor callback for offlined cpus. i.e. All policy->cpus are guaranteed to be online. Hence we don't need explicit check to see if cpu is online or not. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-17cpufreq: interactive: Use generic get_cpu_idle_time() from cpufreq.cViresh Kumar
Generic version of get_cpu_idle_time() is present in cpufreq.c file. We must not replicate that for Interactive governor, rather use the same one. Lets do it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-17cpufreq: Move get_cpu_idle_time() to cpufreq.cViresh Kumar
Governors other than ondemand and conservative can also use get_cpu_idle_time() and they aren't required to compile cpufreq_governor.c. So, move these independent routines to cpufreq.c instead. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-17cpufreq: governors: Move get_governor_parent_kobj() to cpufreq.cViresh Kumar
get_governor_parent_kobj() can be used by any governor, generic cpufreq governors or platform specific ones and so must be present in cpufreq.c instead of cpufreq_governor.c. This patch moves it to cpufreq.c. This also adds EXPORT_SYMBOL_GPL(get_governor_parent_kobj) so that modules can use this function too. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-17cpufreq: Add EXPORT_SYMBOL_GPL for have_governor_per_policyViresh Kumar
This patch adds: EXPORT_SYMBOL_GPL(have_governor_per_policy), so that this routine can be used by modules too. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-01kconfig: Fix defconfig when one choice menu selects options that another ↵Arve Hjønnevåg
choice menu depends on The defconfig and Kconfig combination below, which is based on 3.10-rc4 Kconfigs, resulted in several options getting set to "m" instead of "y". defconfig: --- CONFIG_MODULES=y CONFIG_USB_GADGET=y CONFIG_USB_ZERO=y --- Kconfig: --- menuconfig MODULES bool "Enable loadable module support" config CONFIGFS_FS tristate "Userspace-driven configuration filesystem" config OCFS2_FS tristate "OCFS2 file system support" depends on CONFIGFS_FS select CRC32 config USB_LIBCOMPOSITE tristate select CONFIGFS_FS choice tristate "USB Gadget Drivers" default USB_ETH config USB_ZERO tristate "Gadget Zero (DEVELOPMENT)" select USB_LIBCOMPOSITE config USB_ETH tristate "Ethernet Gadget (with CDC Ethernet support)" select USB_LIBCOMPOSITE endchoice config CRC32 tristate "CRC32/CRC32c functions" default y choice prompt "CRC32 implementation" depends on CRC32 default CRC32_SLICEBY8 config CRC32_SLICEBY8 bool "Slice by 8 bytes" endchoice --- Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01netfilter: xt_qtaguid: 3.10 fixesArve Hjønnevåg
Stop using obsolete procfs api. Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01misc: uidstat: Remove use of obsolete create_proc_read_entry apiArve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01netfilter: xt_quota2: 3.10 fixes.Arve Hjønnevåg
- Stop using obsolete create_proc_entry api. - Use proc_set_user instead of directly accessing the private structure. Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01net: activity_stats: Stop using obsolete create_proc_read_entry apiArve Hjønnevåg
Convert to use seq_read Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01pstore: Update Documentation/android.txtJohn Stultz
Update Documentation/android.txt to reference PSTORE_CONSOLE and PSTORE_RAM instead of ANDROID_RAM_CONSOLE Change-Id: I2c56e73f8c65c3ddbe6ddbf1faadfacb42a09575 Reported-by: Jon Medhurst (Tixy) <tixy@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-07-01ARM: mm: Allow an empty PMD in alloc_init_pte()Jon Medhurst (Tixy)
The Android patch titled "ARM: allow the kernel text section to be made read-only" modifies alloc_init_pte() and adds a BUG_ON to detect the case where a section mapping is being overwritten. However the test doesn't allow for the legitimate case where the PMD is empty, as can happen for kernels built with CONFIG_ARM_LPAE. So extend the test to allow this. Change-Id: I28eeaefd856bae63a5532980e41e0fd4d8922e79 Signed-off-by: Jon Medhurst <tixy@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-07-01mmc: core: Remove stray CONFIG_EXPERIMENTAL dependenciesJohn Stultz
CONFIG_EXPERIMENTAL has been removed from the kernel, so clean up its use in MMC_EMBEDDED_SDIO and MMC_PARANOID_SD_INIT options. Change-Id: If414c265134b36740a84564274a631803c8e81b4 Cc: Arve Hjønnevåg <arve@android.com> Cc: San Mehat <san@google.com> Cc: Android Kernel Team <kernel-team@android.com> Reported-by: Jon Medhurst (Tixy) <tixy@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-07-01ion: Add Kconfig dependency to ARMJohn Stultz
The ion code has some very specific arm-isms which keeps it from building on other architectures. These should probably be resolved, but in the mean time, add a dependency on CONFIG_ARM to avoid build failures. v2: Fix earlier flub, sending out an early untested version of the patch. Change-Id: I5979af1ad59d1eeddd9e08763b1cbc946cf82339 Cc: Arve Hjønnevåg <arve@android.com> Cc: Rebecca Schultz Zavin <rebecca@android.com> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-07-01selinux: binder: Fix COMMON_AUDIT_DATA_INIT compile issueJohn Stultz
The COMMON_AUDIT_DATA_INIT macros have been removed, and are now replaced with open coded ad.type initialization. Thus, this patch updates the selinux_binder_transfer_file function so it builds. Change-Id: Ide41069a87638e294899768d09302f4013794e4c Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: Arve Hjønnevåg <arve@android.com> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-07-01netfilter: xt_qtaguid: fix bad tcp_time_wait sock handlingJP Abgrall
Since (41063e9 ipv4: Early TCP socket demux), skb's can have an sk which is not a struct sock but the smaller struct inet_timewait_sock without an sk->sk_socket. Now we bypass sk_state == TCP_TIME_WAIT Signed-off-by: JP Abgrall <jpa@google.com>
2013-07-01usb: gadget: android: 3.10 fixesArve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01usb: gadget: android: move init to late_initcall for nowArve Hjønnevåg
gserial_alloc_line crashes when called from module_init Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01usb: gadget: android: Fixes and hacks to make android usb gadget compile on 3.9Arve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01usb: gadget: Fix android gadget driver buildBenoit Goby
Removed obsolete f_adb function Change-Id: Idfb4110429bc0ea63f493c68ad667f49ca471987 Signed-off-by: Benoit Goby <benoit@android.com>
2013-07-01HACK: usb: gadget: Fix enumeration on bootBenoit Goby
The Android gadget driver disconnects the gadget on bind and expects the gadget to stay disconnected until it calls usb_gadget_connect when userspace is ready. Removed the call to usb_gadget_connect in usb_gadget_probe_driver to avoid enabling the pullup before userspace is ready. Change-Id: I63707ac6e16a44eca52351a4bf80407d25fbd35e Signed-off-by: Benoit Goby <benoit@android.com>
2013-07-01usb: gadget: android: Fixes and hacks to make android usb gadget compile on 3.8Arve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01ARM: decompressor: Flush tlb before swiching domain 0 to client modeArve Hjønnevåg
If the bootloader used a page table that is incompatible with domain 0 in client mode, and boots with the mmu on, then swithing domain 0 to client mode causes a fault if we don't flush the tlb after updating the page table pointer. v2: Add ISB before loading dacr. Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01ARM: mm: Split memory banks that span multiple sections when sparsemem is ↵Arve Hjønnevåg
enabled This fixes a crash in mem_init which assumes all pages in a memory bank are part of the same page array. Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01mmc: block: Remove call to mmc_blk_set_blksizeArve Hjønnevåg
It no longer exists. Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01gpu: ion: Remove __GFP_NO_KSWAPDArve Hjønnevåg
It no longer exists. Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01gpu: ion: __dma_page_cpu_to_dev -> arm_dma_ops.sync_single_for_device hackArve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01ARM: fiq_debugger: Update tty code for 3.9Arve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01ARM: fiq_debugger: Use kmsg_dumper to dump kernel logsArve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01ARM: fiq_debugger: Fix to compile on 3.7Arve Hjønnevåg
Use for_each_irq_desc in arch/arm/common/fiq_debugger.c Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01usb: otg: otg-wakelock: Fix build for 3.7Arve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01cpufreq: interactive: resched timer if max freq raisedLianwei Wang
When the policy max freq is raised, and before the timer is rescheduled in idle callback, the cpu freq may stuck at a lower freq. The target_freq shall be updated too, else on a high load situation, the new_freq is always equal to target_freq and which will cause freq stuck at a lower freq too. Reschedule the timer on gov limits callback. Change-Id: I6c187001ab43e859731429b64f75a74eebc37a24 Signed-off-by: Lianwei Wang <a22439@motorola.com>
2013-07-01cpufreq: interactive: fix race on cpufreq TRANSITION notifierLianwei Wang
The cpufreq TRANSTION notifier callback does not check the governor_enabled state on affected CPUS, which will case kernel panic in update_load because the policy object maybe NULL or invalid when governor_enabled is false. Change-Id: Ie0f1718124f61e2f9b5da57abc6981ada5b83908 Signed-off-by: Lianwei Wang <a22439@motorola.com>
2013-07-01af_unix: use freezable blocking calls in readColin Cross
Avoid waking up every thread sleeping in read call on an AF_UNIX socket during suspend and resume by calling a freezable blocking call. Previous patches modified the freezer to avoid sending wakeups to threads that are blocked in freezable blocking calls. This call was selected to be converted to a freezable call because it doesn't hold any locks or release any resources when interrupted that might be needed by another freezing task or a kernel driver during suspend, and is a common site where idle userspace tasks are blocked. Change-Id: I788246a76780ea892659526e70be018b18f646c4 Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-07-01sigtimedwait: use freezable blocking callColin Cross
Avoid waking up every thread sleeping in a sigtimedwait call during suspend and resume by calling a freezable blocking call. Previous patches modified the freezer to avoid sending wakeups to threads that are blocked in freezable blocking calls. This call was selected to be converted to a freezable call because it doesn't hold any locks or release any resources when interrupted that might be needed by another freezing task or a kernel driver during suspend, and is a common site where idle userspace tasks are blocked. Change-Id: Ic27469b60a67d50cdc0d0c78975951a99c25adcd Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-07-01nanosleep: use freezable blocking callColin Cross
Avoid waking up every thread sleeping in a nanosleep call during suspend and resume by calling a freezable blocking call. Previous patches modified the freezer to avoid sending wakeups to threads that are blocked in freezable blocking calls. This call was selected to be converted to a freezable call because it doesn't hold any locks or release any resources when interrupted that might be needed by another freezing task or a kernel driver during suspend, and is a common site where idle userspace tasks are blocked. Change-Id: I93383201d4dd62130cd9a9153842d303fc2e2986 Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-07-01futex: use freezable blocking callColin Cross
Avoid waking up every thread sleeping in a futex_wait call during suspend and resume by calling a freezable blocking call. Previous patches modified the freezer to avoid sending wakeups to threads that are blocked in freezable blocking calls. This call was selected to be converted to a freezable call because it doesn't hold any locks or release any resources when interrupted that might be needed by another freezing task or a kernel driver during suspend, and is a common site where idle userspace tasks are blocked. Change-Id: I9ccab9c2d201adb66c85432801cdcf43fc91e94f Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-07-01select: use freezable blocking callColin Cross
Avoid waking up every thread sleeping in a select call during suspend and resume by calling a freezable blocking call. Previous patches modified the freezer to avoid sending wakeups to threads that are blocked in freezable blocking calls. This call was selected to be converted to a freezable call because it doesn't hold any locks or release any resources when interrupted that might be needed by another freezing task or a kernel driver during suspend, and is a common site where idle userspace tasks are blocked. Change-Id: I0d7565ec0b6bc5d44cb55f958589c56e6bd16348 Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-07-01epoll: use freezable blocking callColin Cross
Avoid waking up every thread sleeping in an epoll_wait call during suspend and resume by calling a freezable blocking call. Previous patches modified the freezer to avoid sending wakeups to threads that are blocked in freezable blocking calls. This call was selected to be converted to a freezable call because it doesn't hold any locks or release any resources when interrupted that might be needed by another freezing task or a kernel driver during suspend, and is a common site where idle userspace tasks are blocked. Change-Id: I848d08d28c89302fd42bbbdfa76489a474ab27bf Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-07-01binder: use freezable blocking callsColin Cross
Avoid waking up every thread sleeping in a binder call during suspend and resume by calling a freezable blocking call. Previous patches modified the freezer to avoid sending wakeups to threads that are blocked in freezable blocking calls. This call was selected to be converted to a freezable call because it doesn't hold any locks or release any resources when interrupted that might be needed by another freezing task or a kernel driver during suspend, and is a common site where idle userspace tasks are blocked. Change-Id: Ic4458ae90447f6caa895cc62f08e515caa7790ba Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-07-01freezer: add new freezable helpers using freezer_do_not_count()Colin Cross
Freezing tasks will wake up almost every userspace task from where it is blocking and force it to run until it hits a call to try_to_sleep(), generally on the exit path from the syscall it is blocking in. On resume each task will run again, usually restarting the syscall and running until it hits the same blocking call as it was originally blocked in. To allow tasks to avoid running on every suspend/resume cycle, this patch adds additional freezable wrappers around blocking calls that call freezer_do_not_count(). Combined with the previous patch, these tasks will not run during suspend or resume unless they wake up for another reason, in which case they will run until they hit the try_to_freeze() in freezer_count(), and then continue processing the wakeup after tasks are thawed. Additional patches will convert the most common locations that userspace blocks in to use freezable helpers. Change-Id: Id909760ce460f2532801a4b00d344f0816bfefc9 Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-07-01freezer: convert freezable helpers to static inline where possibleColin Cross
Some of the freezable helpers have to be macros because their condition argument needs to get evaluated every time through the wait loop. Convert the others to static inline to make future changes easier. Change-Id: I69d3fc10d26522cb9bf3a616ff4f21245f9c071a Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-07-01freezer: convert freezable helpers to freezer_do_not_count()Colin Cross
Freezing tasks will wake up almost every userspace task from where it is blocking and force it to run until it hits a call to try_to_sleep(), generally on the exit path from the syscall it is blocking in. On resume each task will run again, usually restarting the syscall and running until it hits the same blocking call as it was originally blocked in. Convert the existing wait_event_freezable* wrappers to use freezer_do_not_count(). Combined with a previous patch, these tasks will not run during suspend or resume unless they wake up for another reason, in which case they will run until they hit the try_to_freeze() in freezer_count(), and then continue processing the wakeup after tasks are thawed. This results in a small change in behavior, previously a race between freezing and a normal wakeup would be won by the wakeup, now the task will freeze and then handle the wakeup after thawing. Change-Id: I532e62251f58c1a9ca488b3fb6220c53acf7d33d Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-07-01freezer: skip waking up tasks with PF_FREEZER_SKIP setColin Cross
Android goes through suspend/resume very often (every few seconds when on a busy wifi network with the screen off), and a significant portion of the energy used to go in and out of suspend is spent in the freezer. If a task has called freezer_do_not_count(), don't bother waking it up. If it happens to wake up later it will call freezer_count() and immediately enter the refrigerator. Combined with patches to convert freezable helpers to use freezer_do_not_count() and convert common sites where idle userspace tasks are blocked to use the freezable helpers, this reduces the time and energy required to suspend and resume. Change-Id: I6ba019d24273619849af757a413271da3261d7db Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-07-01freezer: shorten freezer sleep time using exponential backoffColin Cross
All tasks can easily be frozen in under 10 ms, switch to using an initial 1 ms sleep followed by exponential backoff until 8 ms. Also convert the printed time to ms instead of centiseconds. Change-Id: I7b198b16eefb623c2b0fc45dce50d9bca320afdc Acked-by: Pavel Machek <pavel@ucw.cz> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-07-01lockdep: check that no locks held at freeze timeMandeep Singh Baines
We shouldn't try_to_freeze if locks are held. Holding a lock can cause a deadlock if the lock is later acquired in the suspend or hibernate path (e.g. by dpm). Holding a lock can also cause a deadlock in the case of cgroup_freezer if a lock is held inside a frozen cgroup that is later acquired by a process outside that group. History: This patch was originally applied as 6aa9707099c and reverted in dbf520a9d7d4 because NFS was freezing with locks held. It was deemed better to keep the bad freeze point in NFS to allow laptops to suspend consistently. The previous patch in this series converts NFS to call _unsafe versions of the freezable helpers so that lockdep doesn't complain about them until a more correct fix can be applied. Change-Id: Ib9d4299fb75a39e611b868be42e413909a994baa [akpm@linux-foundation.org: export debug_check_no_locks_held] Signed-off-by: Mandeep Singh Baines <msb@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Acked-by: Pavel Machek <pavel@ucw.cz> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>