summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-04-27misc: modem_if: fix section mismatch from tizen_modem.csubmit/tizen/20140429.051321accepted/tizen/mobile/20140702.072257accepted/tizen/common/20140429.090721MyungJoo Ham1-1/+1
A function, modem_probe, had __init while it was used by a struct that is not __init. Change-Id: Ib1571c89b4bfcebc58b2669b669bd4606d1922fa Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2014-04-27arm: exynos4: Support machine specific reboot/poweroff for TRATSJonghwa Lee4-0/+282
Change-Id: I086cf498da1f1fd38410e99cd250b0c4aeda1a09 Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-04-27extcon: Move OF helper function to extcon core and change function nameChanwoo Choi8-97/+56
This patch move simply OF helper function to extcon core and change function name as following: - of_extcon_get_extcon_dev() -> extcon_get_edev_by_phandle() Change-Id: I37fd827f945e3d713cfe15607689eab6792007b1 Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Felipe Balbi <balbi@ti.com>
2014-04-27extcon: of: Remove unnecessary function call by using the name of device_nodeChanwoo Choi1-11/+3
This patch remove unnecessary function call in of_extcon_get_extcon_dev() by using the name of device_node structure. Change-Id: Ifae59614f355d1ad1beef9aab1c497840f22a727 Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2014-04-25tizen: update tizen_defconfigChanho Park1-2/+8
Enable SEC_COMP and misc updates Change-Id: I80e8011ded0007f88f7bea367c32d414abd47d52 Signed-off-by: Chanho Park <chanho61.park@samsung.com>
2014-04-25misc: modem_if: regress to old tizen modem driverChanho Park38-15222/+861
Tizen modem utility and xmm626x modem uses old style modem I/F. I brought the driver from linux-3.0 kernel[1] because the driver should be matched with telephony and modem-util package. Kamil brought the driver from linux-3.4-exynos, but the driver didn't match the current telephony daemon and modem util. Data communication didn't work with the driver. So, I decided to regress to old driver. Tizen Modem Team doesn't have any plan to update latest version of modem package. To maintain consistency of the interface, I picked the driver from linux-3.0 tree. [1] : https://review.tizen.org/gerrit/gitweb?p=kernel%2Flinux-3.0.git;a=summary Change-Id: I6123f4dc149dcc38e1ae339f950f94fdc0c033f9 Signed-off-by: Chanho Park <chanho61.park@samsung.com>
2014-04-24phy: exynos4212-usb: Use refcount to power device PHY for HSIC0Tomasz Figa1-0/+10
HSIC0 requires device PHY to be powered up and the driver handles that already, but there is no reference counting of device PHY power state, so unplugging USB cable powers it down, breaking modem IF operation. This patch fixes the issue by adding handling of reference counting of device PHY to HSIC0 power-down/-up. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Change-Id: I14b1825fec3cd9c1b2652b89f275a50c73359ad6
2014-04-24misc: modem_if: Use pinctrl to properly configure pinsTomasz Figa2-7/+24
Configuring an interrupt pin as output/input manually using gpio_direction_*() breaks interrupt settings and must not be done. This patch adds necessary code to enable pull-down for interrupt pin using pinctrl API instead of setting the pin to low output to fix issues with missing modem interrupts. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Change-Id: Ie56d84ace1941cef3199fea99d7eb907bb9b5c03
2014-04-24mfd: max77686: Add suspend/resume callback function for alarm wake-up.Jonghwa Lee1-0/+38
While system is resuming, Max77686's Alarm IRQ should be handled after resuming of i2c controller. It disables IRQ in suspend callback funtion and enables it in resume callback to postpone handling. Change-Id: I69f5af2f8b63748853d0ba8a67f0cbb661e1ffcd Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-04-23media: vb2-dma-contig: add a hack to speed up cache managementMarek Szyprowski1-2/+27
In most cases video processing is done with coherent (non-cachable) userspace mappings. In such case for USERPTR mode cache management can be skipped. This patch introduces code for such optimisation. It is called a hack, because it is not possible in generic way to detect if the given userspace mapping is coherent on not. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Change-id: I86aa292455371f1b18eb3f6b765234dc04ff937b
2014-04-23arm: dts: trats2: Remove max77686's LDO22 regulator's 'always-on' flag.Jonghwa Lee1-1/+0
In trats2, LDO22 is used to eMMC's source voltage. And it can be controlled by EN22 gpio pin. If LDO22 regulator is set to 'Always On' mode at software reset, device will hang some seconds. Leave it controlled by EN22, then no delay on reboot. Change-Id: I012bb20bffa42e5ba7887863ef29cb2c473430cb Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-04-22ASoC: samsung: Remove obsolete GPIO based DT pinmuxingMark Brown1-62/+4
Since the Samsung platforms have moved to pinctrl for pin muxing and that is handled in the core the old GPIO based muxing code can just be removed. Something similar had been submitted by Thomas Abraham back in March but a resubmission following review never happened. Change-Id: I5a5813d51eeaefbb7e5c54fda05c1361a0798db2 Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-22Revert "ASoC: samsung: Add pinctrl support to I2S driver"Sylwester Nawrocki1-5/+1
This reverts commit 2b0c7de1eaf0e25c69ed1e4b21675ab97c6a4bdf, which is not needed since pinctrl is handled by the driver core. Change-Id: I0f204f15a39e07083375067fc828cf46bdb78360 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2014-04-22s5p-mfc: Remove unused variableSylwester Nawrocki1-1/+0
This fixes following compilation warning: drivers/media/platform/s5p-mfc/s5p_mfc_dec.c: In function ‘s5p_mfc_buf_prepare’: drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:1045:15: warning: unused variable ‘index’ [-Wunused-variable] Change-Id: Id6c0c264c7169871df116ba6496b2e08e2638844 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2014-04-21misc: modem_if: initialize gpio_link_enable if invalid gpioChanho Park1-1/+2
This patch fixes invalid gpio value caused by 47c53475 commit. The gpio_link_enable should be initialized to 0 if not provided Change-Id: Ie22a2a60a2b713a3be9f141a5dc5c71d4adeb667 Signed-off-by: Chanho Park <chanho61.park@samsung.com>
2014-04-18modem_if: Change hardcoded link enable gpio valueBeomho Seo1-7/+4
Currently, link enable gpio is hardecoded to zero. Zero equal gpa0-0 value. It is value for uart rxd line. If link enable gpio is unused, it is don't have to call gpio request. This patch change to set line enable gpio value optionally, and remove unused variable 'ret'. Change-Id: I4095d57d76362722abd5c5fd92ef529772680d97 Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
2014-04-18ARM: dts: exynos4412: remove duplicated mshc device nodeBeomho Seo1-8/+0
MSHC device node are exsited both exynos4412 and exynos4x12 device tree. This patch remove duplicated mshc device node on exynos4412 device tree. Change-Id: Ib247d172006e916bac3489f5d0bf4958814364f5 Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
2014-04-18ARM: dts: exynos4412-trats2: remove incorrect device nodesubmit/tizen/20140418.050855Beomho Seo1-32/+0
After the dts cleanup the gpio-keys device nodes were duplicated for trats2. One of them is incorrect. As a result volume up/down key not working. This patch remove duplicated and incorrect gpio-keys device node. Change-Id: I44c9529b25a28d41ea451861727d7aa84211976e Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
2014-04-17ASoC: Samsung: correct code in order to get op_clkChen Zhen1-4/+7
when i2s->op_clk is NULL we should do clk_get() before clk_get_rate() call , rather than calling clk_get_rate() on NULL clk, which will returns 0. Change-Id: Ic82be597d8e4c27dd670d8d56630c3572e8f7d73 Signed-off-by: Chen Zhen <zhen1.chen@samsung.com>
2014-04-16arm: config: tizen: add support for libvirtDariusz Michaluk1-10/+15
libvirt is a toolkit to interact with LXC(Linux kernel containers) current libvirt-lxc driver need some additional kernel features: 1. Control groups (cgroups) CONFIG_CGROUP_DEVICE CONFIG_CPUSETS 2. CFS Scheduler CONFIG_CFS_BANDWIDTH 3. Multiple instances of devpts filesystem CONFIG_DEVPTS_MULTIPLE_INSTANCES 4. Kernel bridging CONFIG_BRIDGE_NETFILTER CONFIG_NETFILTER_XT_TARGET_CHECKSUM CONFIG_STP CONFIG_BRIDGE CONFIG_BRIDGE_IGMP_SNOOPING CONFIG_BRIDGE_VLAN_FILTERING CONFIG_LLC 5. VLAN interface CONFIG_VLAN_8021Q CONFIG_MACVLAN CONFIG_VETH CONFIG_TUN Change-Id: I7c09743d1953b8ddbea99afc8e821c2dd9b826a7 Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
2014-04-15cpuidle:AFTR: Enable STANDBY_WFI0 and STANDBY_WFE0 for cpu0 in AFTR modeLukasz Majewski1-0/+4
Enabling of CORE0 idle state is based on the state of STANDBYWFI/STANDBYWFE internal signal. Change-Id: I43675fa312ce879f3741644057991bdb33f6cd55 Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
2014-04-15cpuidle:clk:Exynos4412: Enable support for clock down when WFI cpuidle state ↵Lukasz Majewski2-5/+22
is entered This patch adds support for setting ARM cores' clock frequency down when entering WFI/WFE based cpuidle state. On the Trats2 device: performance governor, 1.4 GHz frequency, no extra load, 4 cores enabled: Without core clock down feature: 395 mA With core clock down feature: 337 mA Power consumption reduction around 15% Change-Id: I7bae29b0332a97c7b18ffb79f4b0a5ff3d70b7ce Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
2014-04-15cpuidle:exynos:AFTR: Use secure monitor calls to enable entering AFTRLukasz Majewski4-8/+34
Secure monitor calls are necessary to enter the AFTR low power mode on the trats2 device. Without them it is not possible to access certain CP15 registers (e.g. Power Control Register). Change-Id: I8f91acb80acdbd43c86a679d69037be041d76309 Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
2014-04-11drm/exynos: add dmabuf sync support for kms frameworkInki Dae4-21/+218
Change-Id: I5937869e5fa2ec2a41e864494eac0077ccdbdb51 Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-11ARM: dts: Add missing aliases entry for i2c-mhl nodeSylwester Nawrocki1-1/+2
This fixes regression introduced in commit 10d282f12d57a467a83a ARM: exynos: dts: cleanup the dts file for trats2 Without an alias the i2c-mhl get dynamically assigned an I2C bus id 0 which is assigned in DT to the I2C0 hardware controller. As a result I2C0 hardware controller fails to initialize which in turn breaks the camera subsystem driver initialization. Change-Id: I92c254cc1d93899b277761b750b0e657c2daad95 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2014-04-09ARM: odroidx2: update defconfig to enable AudioChen Zhen1-1/+43
This enables the necessary configuration for audio,such as SND_TIMER,SND_PCM,SND_JACK, I2S and so on. Change-Id: I6cb157e28529ba5a3756f5df5ddf19a2d59fe3ca Signed-off-by: Chen Zhen <zhen1.chen@samsung.com>
2014-04-09ARM: dts: odroidx2: add i2s node and sound node for audioChenZhen1-0/+12
In order to config a integrated audio path,it's necessary to define the bus type and codec which we used. Change-Id: I4a65d45b5cec4b81ce1a93deaa614020d6a17ae7 Signed-off-by: Chen Zhen <zhen1.chen@samsung.com>
2014-04-08media: s5p_mfc: fix doublly free issueZhaowei Yuan1-6/+2
When video_register_device() returns failure, vfd will be freed at once and dev->vfl_dec will be freed after label "err_dec_reg", but the two pointers point to the same area, so it was doublly freed here. Since video_device_release() will be called by video_unregister_device() indirectly, we should remove the two other calls after labels err_enc_reg and err_dec_reg. Change-Id: I5ee8f83eeb47443e2f772914127514eab996c347 Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
2014-04-08ASoC: samsung: add machine driver for odroidx2Chen Zhen3-0/+189
This machine driver primary define the audio path,the supported data format and sample frequency. Change-Id: I2cdb5f6f65b67d0039f234930210f75c1be9fe38 Signed-off-by: Chen Zhen <zhen1.chen@samsung.com>
2014-04-08ASoC: Samsung: Do not queue cyclic buffers multiple timesTomasz Figa2-2/+18
The legacy S3C-DMA API required every period of a cyclic buffer to be queued separately. After conversion of Samsung ASoC to Samsung DMA wrappers somebody made an assumption that the same is needed for DMA engine API, which is not true. In effect, Samsung ASoC DMA code was queuing the whole cyclic buffer multiple times with a shift of one period per iteration, leading to: a) severe memory waste - up to 13x times more DMA transfer descriptors are allocated than needed, b) possible memory corruption, because further cyclic buffers were out of the original buffers, due to the offset. This patch fixes this problem by making the legacy S3C-DMA API use the same semantics as DMA engine (the whole cyclic buffer is enqueued at once) and modifying users of Samsung DMA wrappers in cyclic mode to behave appropriately. Change-Id: Ib9e656c40ef71e2e90af3f008959eeae19ce7d7e Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-04Enable seccomp in tizen_defconfig arm configurationZofia Abramowska1-1/+2
Enabling seccomp and seccomp filters due to future seccomp related work on platform for limiting access to system for unprivileged applications. Change-Id: Ib067d5510e06d89e539537485fecd63e9bd92c40 Signed-off-by: Zofia Abramowska <z.abramowska@samsung.com>
2014-04-03Removing s3c-rtc status override for exynos4412-trats2.submit/tizen/20140407.043043accepted/tizen/mobile/20140407.043814accepted/tizen/ivi/20140410.192110Marcin Niesluchowski1-4/+0
s3c-rtc is not functioning - initializing its value on every boot. As registering rtc devices is non-deterministic, s3c-rtc may be registered under rtc0 and rtc0 is default device for setting and getting hardware time (hwclock). Another working rtc driver is enabled. Change-Id: I651da859db6ad9b35d422288845c0bebbcf540f5 Signed-off-by: Marcin Niesluchowski <m.niesluchow@samsung.com>
2014-04-03cpufreq:LAB: Change method of boost state preservingLukasz Majewski1-4/+5
It is not necessary to change the boost state when LAB governor is entered, since LAB will change it according to its own politics. Only enter state is preserved. When leaving the LAB, only when required, work is scheduled to restore boost initial state. Change-Id: I6323f3c0011fe54a33d70c9ad0f9da5360b4a735 Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
2014-04-03cpufreq:governor: Add serialization to the cpufreq_governor_dbs() functionLukasz Majewski1-2/+12
It is necessary to serialize access to cpufreq_governor_dbs() function, since it can be accessed from different, not protected by any mutex paths like sysfs boost attribute or LAB governor internals. Change-Id: Id7b62db6ca0b7c28f5e8c6286aec312d3d0c971e Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
2014-04-03media: s5p_mfc: remove the code checking dev->plat_devZhaowei Yuan1-5/+0
We should remove the code checking dev->plat_dev since we can ensure the pointer pdev can not be NULL. Change-Id: Ibdc44403068ee4462e414d6e84757b8a4c2b512c Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
2014-04-02cpufreq: Fix timer/workqueue corruption due to double queueingStephen Boyd1-0/+3
When a CPU is hot removed we'll cancel all the delayed work items via gov_cancel_work(). Normally this will just cancels a delayed timer on each CPU that the policy is managing and the work won't run, but if the work is already running the workqueue code will wait for the work to finish before continuing to prevent the work items from re-queuing themselves like they normally do. This scheme will work most of the time, except for the case where the work function determines that it should adjust the delay for all other CPUs that the policy is managing. If this scenario occurs, the canceling CPU will cancel its own work but queue up the other CPUs works to run. For example: CPU0 CPU1 ---- ---- cpu_down() ... __cpufreq_remove_dev() cpufreq_governor_dbs() case CPUFREQ_GOV_STOP: gov_cancel_work(dbs_data, policy); cpu0 work is canceled timer is canceled cpu1 work is canceled <work runs> <waits for cpu1> od_dbs_timer() gov_queue_work(*, *, true); cpu0 work queued cpu1 work queued cpu2 work queued ... cpu1 work is canceled cpu2 work is canceled ... At the end of the GOV_STOP case cpu0 still has a work queued to run although the code is expecting all of the works to be canceled. __cpufreq_remove_dev() will then proceed to re-initialize all the other CPUs works except for the CPU that is going down. The CPUFREQ_GOV_START case in cpufreq_governor_dbs() will trample over the queued work and debugobjects will spit out a warning: WARNING: at lib/debugobjects.c:260 debug_print_object+0x94/0xbc() ODEBUG: init active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x10 Modules linked in: CPU: 0 PID: 1491 Comm: sh Tainted: G W 3.10.0 #19 [<c010c178>] (unwind_backtrace+0x0/0x11c) from [<c0109dec>] (show_stack+0x10/0x14) [<c0109dec>] (show_stack+0x10/0x14) from [<c01904cc>] (warn_slowpath_common+0x4c/0x6c) [<c01904cc>] (warn_slowpath_common+0x4c/0x6c) from [<c019056c>] (warn_slowpath_fmt+0x2c/0x3c) [<c019056c>] (warn_slowpath_fmt+0x2c/0x3c) from [<c0388a7c>] (debug_print_object+0x94/0xbc) [<c0388a7c>] (debug_print_object+0x94/0xbc) from [<c0388e34>] (__debug_object_init+0x2d0/0x340) [<c0388e34>] (__debug_object_init+0x2d0/0x340) from [<c019e3b0>] (init_timer_key+0x14/0xb0) [<c019e3b0>] (init_timer_key+0x14/0xb0) from [<c0635f78>] (cpufreq_governor_dbs+0x3e8/0x5f8) [<c0635f78>] (cpufreq_governor_dbs+0x3e8/0x5f8) from [<c06325a0>] (__cpufreq_governor+0xdc/0x1a4) [<c06325a0>] (__cpufreq_governor+0xdc/0x1a4) from [<c0633704>] (__cpufreq_remove_dev.isra.10+0x3b4/0x434) [<c0633704>] (__cpufreq_remove_dev.isra.10+0x3b4/0x434) from [<c08989f4>] (cpufreq_cpu_callback+0x60/0x80) [<c08989f4>] (cpufreq_cpu_callback+0x60/0x80) from [<c08a43c0>] (notifier_call_chain+0x38/0x68) [<c08a43c0>] (notifier_call_chain+0x38/0x68) from [<c01938e0>] (__cpu_notify+0x28/0x40) [<c01938e0>] (__cpu_notify+0x28/0x40) from [<c0892ad4>] (_cpu_down+0x7c/0x2c0) [<c0892ad4>] (_cpu_down+0x7c/0x2c0) from [<c0892d3c>] (cpu_down+0x24/0x40) [<c0892d3c>] (cpu_down+0x24/0x40) from [<c0893ea8>] (store_online+0x2c/0x74) [<c0893ea8>] (store_online+0x2c/0x74) from [<c04519d8>] (dev_attr_store+0x18/0x24) [<c04519d8>] (dev_attr_store+0x18/0x24) from [<c02a69d4>] (sysfs_write_file+0x100/0x148) [<c02a69d4>] (sysfs_write_file+0x100/0x148) from [<c0255c18>] (vfs_write+0xcc/0x174) [<c0255c18>] (vfs_write+0xcc/0x174) from [<c0255f70>] (SyS_write+0x38/0x64) [<c0255f70>] (SyS_write+0x38/0x64) from [<c0106120>] (ret_fast_syscall+0x0/0x30) Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Change-Id: I3c74dd72e468c150c6664c9ea99083c0a5866b06 [k.kozlowski: Backport to 3.10 to fix CPU0 stall after CPU1 hotplug] Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
2014-04-02ARM: dts: set mmc clock-frequency for odroidx2submit/tizen/20140402.053924Donghwa Lee1-0/+1
from: Jaehoon Chung <jh80.chung@samsung.com> set mmc clock-frequency to 400MHZ for odroidx2 Change-Id: I94b9dccbdd8091e333debbe8b06a881bf3ea7ee9 Signed-off-by: Donghwa Lee <dh09.lee@samsung.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2014-04-02media: s5p-mfc: add to set clock rateDonghwa Lee1-0/+13
from: Seung-Woo Kim <sw0312.kim@samsung.com> MFC needs 200MHz for sclk_mfc clock to work properly. The clock rate setting was missed, so this patch adds it. Change-Id: Ica696a5fda2babe81e885945fa5affd0b09ff5ba Signed-off-by: Donghwa Lee <dh09.lee@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2014-04-01clocksource: exynos_mct: Fix too early ISR fire up on wrong CPUKrzysztof Kozlowski1-2/+2
After hotplugging CPU1 the first interrupt handler for CPU1 oneshot timer was called on CPU0 because it fired up before setting IRQ affinity. During setup of the MCT timers the clock event device should be registered after setting the affinity for interrupt. This will prevent starting the timer to early. Additionally, if clock event device has interrupt set up, the clockevents_config_and_register() will also set the affinity for it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Change-Id: I64fee65b57106ad562f0ecc1160748a9548debad
2014-04-01clocksource: exynos_mct: Change exynos4_mct_tick_clear return type to voidKrzysztof Kozlowski1-6/+2
Return value of exynos4_mct_tick_clear() was never checked so it can be safely changed to void. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Change-Id: I14f872e244434002005c532adf8afc97ef77cea5
2014-04-01clocksource: exynos_mct: Fix stall after CPU hotpluggingKrzysztof Kozlowski1-13/+20
Fix stall after hotplugging CPU1. The stall was a result of starting the CPU1 local timer not in L1 timer but in L0 (which is used by CPU0). Stall information: [ 530.045259] INFO: rcu_preempt detected stalls on CPUs/tasks: [ 530.045618] 1: (6 GPs behind) idle=6d0/0/0 softirq=369/369 [ 530.050987] (detected by 0, t=6589 jiffies, g=33, c=32, q=0) [ 530.056721] Task dump for CPU 1: [ 530.059928] swapper/1 R running 0 0 1 0x00001000 [ 530.066377] [<c0524e14>] (__schedule+0x414/0x9b4) from [<c00b6610>] (rcu_idle_enter+0x18/0x38) [ 530.074955] [<c00b6610>] (rcu_idle_enter+0x18/0x38) from [<c0079a18>] (cpu_startup_entry+0x60/0x3bc) [ 530.084069] [<c0079a18>] (cpu_startup_entry+0x60/0x3bc) from [<c0517d34>] (secondary_start_kernel+0x164/0x1a0) [ 530.094029] [<c0517d34>] (secondary_start_kernel+0x164/0x1a0) from [<40517244>] (0x40517244) The timers for CPU1 were missed: [ 591.668436] cpu: 1 [ 591.670430] clock 0: [ 591.672691] .base: c0ab7750 [ 591.676160] .index: 0 [ 591.679025] .resolution: 1 nsecs [ 591.682404] .get_time: ktime_get [ 591.685970] .offset: 0 nsecs [ 591.689349] active timers: [ 591.692045] #0: <dfb51f40>, hrtimer_wakeup, S:01 [ 591.696759] # expires at 454687834257-454687884257 nsecs [in -136770537232 to -136770487232 nsecs] And the event_handler for next event was wrong: [ 591.917120] Tick Device: mode: 1 [ 591.920676] Per CPU device: 0 [ 591.923621] Clock Event Device: mct_tick0 [ 591.927623] max_delta_ns: 178956969027 [ 591.931613] min_delta_ns: 1249 [ 591.934913] mult: 51539608 [ 591.938557] shift: 32 [ 591.941681] mode: 3 [ 591.944724] next_event: 595025000000 nsecs [ 591.949227] set_next_event: exynos4_tick_set_next_event [ 591.954522] set_mode: exynos4_tick_set_mode [ 591.959296] event_handler: hrtimer_interrupt [ 591.963730] retries: 0 [ 591.966761] [ 591.968245] Tick Device: mode: 0 [ 591.971801] Per CPU device: 1 [ 591.974746] Clock Event Device: mct_tick1 [ 591.978750] max_delta_ns: 178956969027 [ 591.982739] min_delta_ns: 1249 [ 591.986037] mult: 51539608 [ 591.989681] shift: 32 [ 591.992806] mode: 3 [ 591.995848] next_event: 453685000000 nsecs [ 592.000353] set_next_event: exynos4_tick_set_next_event [ 592.005648] set_mode: exynos4_tick_set_mode [ 592.010421] event_handler: tick_handle_periodic [ 592.015115] retries: 0 [ 592.018145] After turning off the CPU1, the MCT L1 local timer was disabled but the interrupt was not cleared. Turning on the CPU1 enabled the IRQ with setup_irq() but, before setting affinity to CPU1, the pending L1 timer interrupt was processed by CPU0 in exynos4_mct_tick_isr(). The ISR then called event handler which set up the next timer event for current CPU (CPU0). Therefore the MCT L1 timer wasn't actually started. Fix the stall by: 1. Setting next timer event not on current CPU but on the CPU indicated by cpumask in 'clock_event_device'. 2. Clearing the timer interrupt upon stopping the local timer. The patch also moves around the call to exynos4_mct_tick_stop() but this is done only for the code readability as it is not essential for the fix. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Change-Id: I3a1a23e2b970661b5f7c60fc633a7545aa80ed5e
2014-04-01cpufreq: serialize calls to __cpufreq_governor()Viresh Kumar2-2/+9
We can't take a big lock around __cpufreq_governor() as this causes recursive locking for some cases. But calls to this routine must be serialized for every policy. Otherwise we can see some unpredictable events. For example, consider following scenario: __cpufreq_remove_dev() __cpufreq_governor(policy, CPUFREQ_GOV_STOP); policy->governor->governor(policy, CPUFREQ_GOV_STOP); cpufreq_governor_dbs() case CPUFREQ_GOV_STOP: mutex_destroy(&cpu_cdbs->timer_mutex) cpu_cdbs->cur_policy = NULL; <PREEMPT> store() __cpufreq_set_policy() __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS); policy->governor->governor(policy, CPUFREQ_GOV_LIMITS); case CPUFREQ_GOV_LIMITS: mutex_lock(&cpu_cdbs->timer_mutex); <-- Warning (destroyed mutex) if (policy->max < cpu_cdbs->cur_policy->cur) <- cur_policy == NULL And so store() will eventually result in a crash if cur_policy is NULL at this point. Introduce an additional variable which would guarantee serialization here. Change-Id: Ibae767cbd9c25c7598b39d1405fa3d98d2125101 Reported-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-04-01cpufreq: Fix serialization of frequency transitionsViresh Kumar2-4/+5
Commit 7c30ed ("cpufreq: make sure frequency transitions are serialized") interacts poorly with systems that have a single core freqency for all cores. On such systems we have a single policy for all cores with several CPUs. When we do a frequency transition the governor calls the pre and post change notifiers which causes cpufreq_notify_transition() per CPU. Since the policy is the same for all of them all CPUs after the first and the warnings added are generated by checking a per-policy flag the warnings will be triggered for all cores after the first. Fix this by allowing notifier to be called for n times. Where n is the number of cpus in policy->cpus. Change-Id: I5712dde7f992644f9c3ddc8313151f80bea0d877 Reported-and-tested-by: Mark Brown <broonie@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-04-01cpufreq: make sure frequency transitions are serializedViresh Kumar2-0/+15
Whenever we are changing frequency of a cpu, we are calling PRECHANGE and POSTCHANGE notifiers. They must be serialized. i.e. PRECHANGE or POSTCHANGE shouldn't be called twice contiguously. This can happen due to bugs in users of __cpufreq_driver_target() or actual cpufreq drivers who are sending these notifiers. This patch adds some protection against this. Now, we keep track of the last transaction and see if something went wrong. Change-Id: I0f5465bd515c431ae2d3711d065f70aacec7e978 Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-04-01cpufreq: remove unnecessary cpufreq_cpu_{get|put}() callsViresh Kumar1-17/+2
struct cpufreq_policy is already passed as argument to some routines like: __cpufreq_driver_getavg() and so we don't really need to do cpufreq_cpu_get() before and cpufreq_cpu_put() in them to get a policy structure. Remove them. Change-Id: I6a9ff8ed483a4f4faacc2ea047d93354dccdb0b6 Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-04-01cpufreq: Fix governor start/stop race conditionXiaoguang Chen2-0/+25
Cpufreq governors' stop and start operations should be carried out in sequence. Otherwise, there will be unexpected behavior, like in the example below. Suppose there are 4 CPUs and policy->cpu=CPU0, CPU1/2/3 are linked to CPU0. The normal sequence is: 1) Current governor is userspace. An application tries to set the governor to ondemand. It will call __cpufreq_set_policy() in which it will stop the userspace governor and then start the ondemand governor. 2) Current governor is userspace. The online of CPU3 runs on CPU0. It will call cpufreq_add_policy_cpu() in which it will first stop the userspace governor, and then start it again. If the sequence of the above two cases interleaves, it becomes: 1) Application stops userspace governor 2) Hotplug stops userspace governor which is a problem, because the governor shouldn't be stopped twice in a row. What happens next is: 3) Application starts ondemand governor 4) Hotplug starts a governor In step 4, the hotplug is supposed to start the userspace governor, but now the governor has been changed by the application to ondemand, so the ondemand governor is started once again, which is incorrect. The solution is to prevent policy governors from being stopped multiple times in a row. A governor should only be stopped once for one policy. After it has been stopped, no more governor stop operations should be executed. Also add a mutex to serialize governor operations. Change-Id: Ie380dc7c551f2721b81ceb8e4849efa09345ce4b [rjw: Changelog. And you owe me a beverage of my choice.] Signed-off-by: Xiaoguang Chen <chenxg@marvell.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-03-26ASoC: max98090: Add of_match_tableChenZhen1-0/+7
It's necessary to add of_match_table to match driver. Change-Id: I7c09aef9a3f54180041398009b9141142de54ea4 Signed-off-by: ChenZhen <zhen1.chen@samsung.com>
2014-03-24ARM: dts: odroidx2: add i2c1 node for max98090ChenZhen1-0/+12
Add i2c1 node for the codec driver max98090. Change-Id: Ib6afaf7574827540281959a1f8338d50e221df39 Signed-off-by: ChenZhen <zhen1.chen@samsung.com>
2014-03-25packaging: specify ExclusiveArch to arm/aarch64submit/tizen_boot/20140325.114317Chanho Park1-0/+1
This patch specifies "ExclusiveArch" for building only arm and aarch64. Change-Id: I33a484b478d7848257a4ea8b4375b0ea1994c47e Signed-off-by: Chanho Park <chanho61.park@samsung.com>
2014-03-24packaging: change modules directory to /boot/lib/modulessubmit/tizen_boot/20140324.052346Chanho Park1-10/+10
This patch changes the default modules directory from /lib/modules to /boot/lib/modules. The mobile kernel didn't use /lib/modules for modules because it should be matched with kernel version and can be recoveried with the /boot directory. The old kernel used modules.img which includes kernel modules. And we also loop-mounted it to the /lib/modules directory. Instead of it, we'll use /boot/lib/ modules directory because it will have same functionality if the /boot directory will be read-only. And we will add the recovery partition of the /boot. Change-Id: Ie0f0af47f0f6d3fe25c780fb8685df745b587dd7 Signed-off-by: Chanho Park <chanho61.park@samsung.com>