firefly-linux-kernel-4.4.55.git
12 years agomodify touchscreen config in arch/arm/configs/rk30_phone_defconfig
zwp [Tue, 12 Jun 2012 13:16:28 +0000 (21:16 +0800)]
modify touchscreen config in arch/arm/configs/rk30_phone_defconfig

12 years agouse umeox wpx2 board files as phone sdk board files.
zwp [Tue, 12 Jun 2012 13:09:19 +0000 (21:09 +0800)]
use umeox wpx2 board files as phone sdk board files.

12 years agork30:phone loquat:config ddr voltage
张晴 [Tue, 12 Jun 2012 10:46:56 +0000 (18:46 +0800)]
rk30:phone loquat:config ddr voltage

12 years agork30 hdmi:
Zheng Yang [Tue, 12 Jun 2012 10:10:13 +0000 (18:10 +0800)]
rk30 hdmi:
1. io mux ddc channel to GPIO mode when suspend, and mux again when resume.
2. fix ddc clock frequency error when hdcp is enabled.

12 years agocamera rk30 : not call pmu_set_idle_request when cif reset;fix null point in rk_cif_p...
root [Tue, 12 Jun 2012 09:34:13 +0000 (17:34 +0800)]
camera rk30 : not call pmu_set_idle_request when cif reset;fix null point in rk_cif_power function

12 years agoBT: remove bt reset gpio at board-rk30-phone-sdmmc.c
wdc [Tue, 12 Jun 2012 04:31:14 +0000 (12:31 +0800)]
BT: remove bt reset gpio at board-rk30-phone-sdmmc.c

12 years agoMerge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop
wdc [Tue, 12 Jun 2012 04:27:12 +0000 (12:27 +0800)]
Merge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop

12 years agoBT: change board_rfkill to net/rfkill
wdc [Tue, 12 Jun 2012 04:25:44 +0000 (12:25 +0800)]
BT: change board_rfkill to net/rfkill

12 years agork30:phone loquat:Modify ADC calibration algorithm
张晴 [Mon, 11 Jun 2012 04:49:38 +0000 (12:49 +0800)]
rk30:phone loquat:Modify ADC calibration algorithm

12 years agork3066_board: set lcd_en high in early suspend
kfx [Fri, 8 Jun 2012 09:39:05 +0000 (17:39 +0800)]
rk3066_board: set lcd_en high in early suspend

12 years agork30sdk:fix ddr_set_auto_self_refresh() parameter error in ddr_freq.c
cym [Fri, 8 Jun 2012 09:11:52 +0000 (17:11 +0800)]
rk30sdk:fix ddr_set_auto_self_refresh() parameter error in ddr_freq.c

12 years agork3066: sdk: defconfig: enable RFKILL_RK
黄涛 [Fri, 8 Jun 2012 08:59:30 +0000 (16:59 +0800)]
rk3066: sdk: defconfig: enable RFKILL_RK

12 years agoRK-RFKILL fix bug: build failure if use other board config
CMY [Fri, 8 Jun 2012 08:46:16 +0000 (16:46 +0800)]
RK-RFKILL fix bug: build failure if use other board config

12 years ago add ddr_reg_resume function
hecanyang [Fri, 8 Jun 2012 08:44:09 +0000 (16:44 +0800)]
  add ddr_reg_resume function

12 years agork: RK_SRAM_DMA only available on ARCH_RK30
黄涛 [Fri, 8 Jun 2012 08:10:30 +0000 (16:10 +0800)]
rk: RK_SRAM_DMA only available on ARCH_RK30

12 years agoMTP: solve one cancel problem
hwg [Fri, 8 Jun 2012 07:16:45 +0000 (15:16 +0800)]
MTP: solve one cancel problem

12 years agork30sdk:reduce DDR frequency and enable auto self refresh when earlysuspend.
cym [Fri, 8 Jun 2012 07:12:59 +0000 (15:12 +0800)]
rk30sdk:reduce DDR frequency and enable auto self refresh when earlysuspend.

select "Enable DDR frequency scaling" to enable this function,and when select
"Enable DDR frequency scaling" auto select "Sound DMA buffer in internal SRAM"

12 years agofix bug when disable disable bt auto sleep, and use gpio.enable replace is_falling
CMY [Fri, 8 Jun 2012 03:11:10 +0000 (11:11 +0800)]
fix bug when disable disable bt auto sleep, and use gpio.enable replace is_falling

12 years agork30 phone: modify codec as master when connect to BT and BP
宋秀杰 [Thu, 7 Jun 2012 12:12:01 +0000 (20:12 +0800)]
rk30 phone: modify codec as master when connect to BT and BP

12 years agork30: support sound capture DMA buffer in internal SRAM
邱建斌 [Thu, 7 Jun 2012 08:53:04 +0000 (16:53 +0800)]
rk30: support sound capture DMA buffer in internal SRAM

12 years agork3066_board: rk3066_sdk_defconfig: CONFIG_RKWIFI_26M=y
kfx [Thu, 7 Jun 2012 07:23:21 +0000 (15:23 +0800)]
rk3066_board: rk3066_sdk_defconfig: CONFIG_RKWIFI_26M=y

12 years agork29: sdk: refactor rfkill code
CMY [Thu, 7 Jun 2012 06:25:54 +0000 (14:25 +0800)]
rk29: sdk: refactor rfkill code

12 years agorfkill-rk: use pm prepare/complete to fix lost wakeup irq
黄涛 [Thu, 7 Jun 2012 04:23:13 +0000 (12:23 +0800)]
rfkill-rk: use pm prepare/complete to fix lost wakeup irq

12 years agork3066_board: rk3066_sdk_defconfig: CONFIG_CLK_SWITCH_TO_32K=y
kfx [Thu, 7 Jun 2012 02:43:22 +0000 (10:43 +0800)]
rk3066_board: rk3066_sdk_defconfig: CONFIG_CLK_SWITCH_TO_32K=y

12 years agorga: rga_drv add power off support
黄涛 [Thu, 7 Jun 2012 02:23:31 +0000 (10:23 +0800)]
rga: rga_drv add power off support

lock use mutex instead of spinlock
use wakelock instead of suspend callback
use request_threaded_irq instead of request_irq

12 years agork3066_board: ldo10 do not switch mode
kfx [Thu, 7 Jun 2012 02:06:46 +0000 (10:06 +0800)]
rk3066_board: ldo10 do not switch mode

12 years agork30: sdk: refactor rfkill code
黄涛 [Thu, 7 Jun 2012 01:53:03 +0000 (09:53 +0800)]
rk30: sdk: refactor rfkill code

12 years agork3066_board: ldo3(vdd11_hdmi): 1.2v --> 1.1v
kfx [Thu, 7 Jun 2012 01:58:05 +0000 (09:58 +0800)]
rk3066_board: ldo3(vdd11_hdmi): 1.2v --> 1.1v

12 years agomove BT driver (rfkill) to net/rfkill/rfkill-rk.c
CMY [Wed, 6 Jun 2012 13:37:38 +0000 (21:37 +0800)]
move BT driver (rfkill) to net/rfkill/rfkill-rk.c

12 years agork30: i2c: fix warning about clk_disable
kfx [Wed, 6 Jun 2012 10:59:15 +0000 (18:59 +0800)]
rk30: i2c: fix warning about clk_disable

12 years agork3066_board: adc key: modify adc value again
kfx [Wed, 6 Jun 2012 09:54:43 +0000 (17:54 +0800)]
rk3066_board: adc key: modify adc value again

12 years agork3066_board: adc key: modify adc value
kfx [Wed, 6 Jun 2012 08:39:25 +0000 (16:39 +0800)]
rk3066_board: adc key: modify adc value

12 years agoadd board config(rk3066_sdk_defconfig) for new rk3066_sdk_board
kfx [Wed, 6 Jun 2012 07:42:17 +0000 (15:42 +0800)]
add board config(rk3066_sdk_defconfig) for new rk3066_sdk_board

12 years agork30: i2c: clk_disable(i2c->clk) when i2c-x is in idle state
kfx [Wed, 6 Jun 2012 07:39:58 +0000 (15:39 +0800)]
rk30: i2c: clk_disable(i2c->clk) when i2c-x is in idle state

12 years agocamera rk30 : version update to 0xc.
root [Wed, 6 Jun 2012 01:47:56 +0000 (09:47 +0800)]
camera rk30 : version update to 0xc.

12 years agofix prescale dst_w bug
zsq [Mon, 4 Jun 2012 10:54:22 +0000 (18:54 +0800)]
fix prescale dst_w bug

12 years agofix bug in rk_fb_ioctl
yxj [Mon, 4 Jun 2012 09:36:11 +0000 (17:36 +0800)]
fix bug in rk_fb_ioctl

12 years agorkfb_sysfs: modify set_fb_state
yxj [Mon, 4 Jun 2012 06:10:46 +0000 (14:10 +0800)]
rkfb_sysfs: modify set_fb_state

12 years agork30 hdmi: support hdcp.
Zheng Yang [Mon, 4 Jun 2012 03:22:49 +0000 (11:22 +0800)]
rk30 hdmi: support hdcp.

12 years agoWIMO : Kconfig default n
zhanghao [Mon, 4 Jun 2012 01:43:52 +0000 (09:43 +0800)]
WIMO : Kconfig default n

12 years agork30 phone: modify headset detect request irq location
宋秀杰 [Sun, 3 Jun 2012 08:38:27 +0000 (16:38 +0800)]
rk30 phone: modify headset detect request irq location

12 years agork30:phone loquat:modify the battery capacity reported
张晴 [Sun, 3 Jun 2012 03:28:35 +0000 (11:28 +0800)]
rk30:phone loquat:modify the battery capacity reported

12 years agoMerge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop-3.0
CMY [Sat, 2 Jun 2012 09:27:06 +0000 (17:27 +0800)]
Merge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop-3.0

12 years agofixed bug: build failed if disable BT_WAKE_HOST_SUPPORT
CMY [Sat, 2 Jun 2012 09:25:20 +0000 (17:25 +0800)]
fixed bug: build failed if disable BT_WAKE_HOST_SUPPORT

12 years ago3g dongle
CMY [Sat, 2 Jun 2012 09:23:59 +0000 (17:23 +0800)]
3g dongle

12 years agoWIMO : compile as default y
zhanghao [Sat, 2 Jun 2012 08:59:21 +0000 (16:59 +0800)]
WIMO : compile as default y

12 years ago add WIMO supported
zhanghao [Sat, 2 Jun 2012 08:52:19 +0000 (16:52 +0800)]
 add WIMO supported

12 years agofix hcd panic when xacterr happen
yangkai [Sat, 2 Jun 2012 08:16:38 +0000 (16:16 +0800)]
fix hcd panic when xacterr happen

12 years agofix one of mtp cancel bug
yangkai [Sat, 2 Jun 2012 08:11:23 +0000 (16:11 +0800)]
fix one of mtp cancel bug

12 years agork30_phone_loquat:enable 1.4GHZ frequency
lw [Sat, 2 Jun 2012 02:22:54 +0000 (10:22 +0800)]
rk30_phone_loquat:enable 1.4GHZ frequency

12 years agofix rga power off flag init error
zsq [Fri, 1 Jun 2012 10:19:10 +0000 (18:19 +0800)]
fix rga power off flag init error

12 years agork30 hdmi: only unregister earlysuspend when shutdown.
Zheng Yang [Thu, 31 May 2012 07:02:14 +0000 (15:02 +0800)]
rk30 hdmi: only unregister earlysuspend when shutdown.

12 years agork30 hdmi: fix hdmi shut down is called twice error.
Zheng Yang [Thu, 31 May 2012 06:44:00 +0000 (14:44 +0800)]
rk30 hdmi: fix hdmi shut down  is called twice error.

12 years agots: rk29_i2c_goodix: unregister earlysuspend when shutdown
黄涛 [Thu, 31 May 2012 01:42:53 +0000 (09:42 +0800)]
ts: rk29_i2c_goodix: unregister earlysuspend when shutdown

12 years agolightsensor: cm3217: unregister earlysuspend when shutdown
黄涛 [Thu, 31 May 2012 01:42:00 +0000 (09:42 +0800)]
lightsensor: cm3217: unregister earlysuspend when shutdown

12 years agogsensor: mma8452: remove unused earlysuspend implementation
黄涛 [Thu, 31 May 2012 01:40:56 +0000 (09:40 +0800)]
gsensor: mma8452: remove unused earlysuspend implementation

12 years agork: backlight: unregister earlysuspend when shutdown
黄涛 [Thu, 31 May 2012 01:36:03 +0000 (09:36 +0800)]
rk: backlight: unregister earlysuspend when shutdown

fix this warning:
WARNING: at drivers/gpio/gpiolib.c:101 gpio_ensure_requested+0x48/0x114()
autorequest GPIO-331
[<c043b170>] (unwind_backtrace+0x0/0xf0) from [<c0461800>] (warn_slowpath_common+0x4c/0x64)
[<c0461800>] (warn_slowpath_common+0x4c/0x64) from [<c0461898>] (warn_slowpath_fmt+0x2c/0x3c)
[<c0461898>] (warn_slowpath_fmt+0x2c/0x3c) from [<c05bb514>] (gpio_ensure_requested+0x48/0x114)
[<c05bb514>] (gpio_ensure_requested+0x48/0x114) from [<c05bbbb4>] (gpio_direction_output+0x7c/0xfc)
[<c05bbbb4>] (gpio_direction_output+0x7c/0xfc) from [<c044ccf8>] (rk29_backlight_pwm_suspend+0x54/0x74)
[<c044ccf8>] (rk29_backlight_pwm_suspend+0x54/0x74) from [<c05c3d0c>] (rk29_bl_suspend+0x78/0x90)
[<c05c3d0c>] (rk29_bl_suspend+0x78/0x90) from [<c0494374>] (early_suspend+0xc4/0x12c)
[<c0494374>] (early_suspend+0xc4/0x12c) from [<c04745c4>] (process_one_work+0x250/0x3ac)
[<c04745c4>] (process_one_work+0x250/0x3ac) from [<c0474b08>] (worker_thread+0x22c/0x3ec)
[<c0474b08>] (worker_thread+0x22c/0x3ec) from [<c047a484>] (kthread+0x80/0x88)
[<c047a484>] (kthread+0x80/0x88) from [<c04365f8>] (kernel_thread_exit+0x0/0x8)

12 years agork30: hdmi: unregister earlysuspend when shutdown
黄涛 [Thu, 31 May 2012 01:35:41 +0000 (09:35 +0800)]
rk30: hdmi: unregister earlysuspend when shutdown

12 years agork: fb: fix earlysuspend bug
黄涛 [Thu, 31 May 2012 01:31:35 +0000 (09:31 +0800)]
rk: fb: fix earlysuspend bug

fix this bug:
rk30_pm_power_off start...
Unable to handle kernel NULL pointer dereference at virtual address 00000054
pgd = c0404000
[00000054] *pgd=00000000pre WM831X_POWER_STATE = 0x8800
wm831x_last_deinit

Internal error: Oops: 17 [#1] PREEMPT SMP
CPU: 0    Tainted: G         C   (3.0.8+ #2)
PC is at rkfb_early_suspend+0x18/0x70
LR is at early_suspend+0xc4/0x12c

12 years agork: earlysuspend: only works on system is running
黄涛 [Thu, 31 May 2012 01:28:26 +0000 (09:28 +0800)]
rk: earlysuspend: only works on system is running

12 years agork30 hdmi: set phy register to ip vendor recommended value.
Zheng Yang [Wed, 30 May 2012 10:27:54 +0000 (18:27 +0800)]
rk30 hdmi: set phy register to ip vendor recommended value.

12 years agosc8800: tmp_buf: Cross-border access
kfx [Wed, 30 May 2012 07:31:23 +0000 (15:31 +0800)]
sc8800: tmp_buf: Cross-border access

12 years agofix compiler warnings and add calling adjust volume code
邱建斌 [Tue, 29 May 2012 11:58:22 +0000 (19:58 +0800)]
fix compiler warnings and add calling adjust volume code

12 years agork30: sdk: temporary increase voltage for SDK release
黄涛 [Tue, 29 May 2012 11:49:08 +0000 (19:49 +0800)]
rk30: sdk: temporary increase voltage for SDK release

12 years agoRevert "vpu_service: replace spin_lock by mutex and use irq_thread to handle irq"
陈恒明 [Tue, 29 May 2012 08:27:08 +0000 (16:27 +0800)]
Revert "vpu_service: replace spin_lock by mutex and use irq_thread to handle irq"

This reverts commit d21aa293426f5dfdb1fd9173d3b4a8c64078bb1c.

12 years ago rename some simple function's name
hecanyang [Tue, 29 May 2012 06:58:01 +0000 (14:58 +0800)]
  rename some simple function's name

12 years agovpu_service: replace spin_lock by mutex and use irq_thread to handle irq
陈恒明 [Tue, 29 May 2012 06:47:20 +0000 (14:47 +0800)]
vpu_service: replace spin_lock by mutex and use irq_thread to handle irq

12 years ago fix data training bug, add ODT disable frequency macro,
hecanyang [Tue, 29 May 2012 06:18:18 +0000 (14:18 +0800)]
  fix data training bug, add ODT disable frequency macro,
  and reduce change frequency period

12 years agoARM: prevent VM_GROWSDOWN mmaps extending below FIRST_USER_ADDRESS
Russell King [Wed, 16 May 2012 14:19:20 +0000 (15:19 +0100)]
ARM: prevent VM_GROWSDOWN mmaps extending below FIRST_USER_ADDRESS

commit 9b61a4d1b2064dbd0c9e61754305ac852170509f upstream.

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoARM: 7410/1: Add extra clobber registers for assembly in kernel_execve
Tim Bird [Wed, 2 May 2012 21:55:39 +0000 (22:55 +0100)]
ARM: 7410/1: Add extra clobber registers for assembly in kernel_execve

commit e787ec1376e862fcea1bfd523feb7c5fb43ecdb9 upstream.

The inline assembly in kernel_execve() uses r8 and r9.  Since this
code sequence does not return, it usually doesn't matter if the
register clobber list is accurate.  However, I saw a case where a
particular version of gcc used r8 as an intermediate for the value
eventually passed to r9.  Because r8 is used in the inline
assembly, and not mentioned in the clobber list, r9 was set
to an incorrect value.

This resulted in a kernel panic on execution of the first user-space
program in the system.  r9 is used in ret_to_user as the thread_info
pointer, and if it's wrong, bad things happen.

Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoARM: 7403/1: tls: remove covert channel via TPIDRURW
Will Deacon [Fri, 27 Apr 2012 11:45:07 +0000 (12:45 +0100)]
ARM: 7403/1: tls: remove covert channel via TPIDRURW

commit 6a1c53124aa161eb624ce7b1e40ade728186d34c upstream.

TPIDRURW is a user read/write register forming part of the group of
thread registers in more recent versions of the ARM architecture (~v6+).

Currently, the kernel does not touch this register, which allows tasks
to communicate covertly by reading and writing to the register without
context-switching affecting its contents.

This patch clears TPIDRURW when TPIDRURO is updated via the set_tls
macro, which is called directly from __switch_to. Since the current
behaviour makes the register useless to userspace as far as thread
pointers are concerned, simply clearing the register (rather than saving
and restoring it) will not cause any problems to userspace.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoARM: 7384/1: ThumbEE: Disable userspace TEEHBR access for !CONFIG_ARM_THUMBEE
Jonathan Austin [Thu, 12 Apr 2012 16:45:25 +0000 (17:45 +0100)]
ARM: 7384/1: ThumbEE: Disable userspace TEEHBR access for !CONFIG_ARM_THUMBEE

commit 078c04545ba56da21567728a909a496df5ff730d upstream.

Currently when ThumbEE is not enabled (!CONFIG_ARM_THUMBEE) the ThumbEE
register states are not saved/restored at context switch. The default state
of the ThumbEE Ctrl register (TEECR) allows userspace accesses to the
ThumbEE Base Handler register (TEEHBR). This can cause unexpected behaviour
when people use ThumbEE on !CONFIG_ARM_THUMBEE kernels, as well as allowing
covert communication - eg between userspace tasks running inside chroot
jails.

This patch sets up TEECR in order to prevent user-space access to TEEHBR
when !CONFIG_ARM_THUMBEE. In this case, tasks are sent SIGILL if they try to
access TEEHBR.

Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoARM: 7325/1: fix v7 boot with lockdep enabled
Rabin Vincent [Wed, 15 Feb 2012 15:01:42 +0000 (16:01 +0100)]
ARM: 7325/1: fix v7 boot with lockdep enabled

commit 8e43a905dd574f54c5715d978318290ceafbe275 upstream.

Bootup with lockdep enabled has been broken on v7 since b46c0f74657d
("ARM: 7321/1: cache-v7: Disable preemption when reading CCSIDR").

This is because v7_setup (which is called very early during boot) calls
v7_flush_dcache_all, and the save_and_disable_irqs added by that patch
ends up attempting to call into lockdep C code (trace_hardirqs_off())
when we are in no position to execute it (no stack, MMU off).

Fix this by using a notrace variant of save_and_disable_irqs.  The code
already uses the notrace variant of restore_irqs.

Reviewed-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoARM: 7321/1: cache-v7: Disable preemption when reading CCSIDR
Stephen Boyd [Tue, 7 Feb 2012 18:42:07 +0000 (19:42 +0100)]
ARM: 7321/1: cache-v7: Disable preemption when reading CCSIDR

commit b46c0f74657d1fe1c1b0c1452631cc38a9e6987f upstream.

armv7's flush_cache_all() flushes caches via set/way. To
determine the cache attributes (line size, number of sets,
etc.) the assembly first writes the CSSELR register to select a
cache level and then reads the CCSIDR register. The CSSELR register
is banked per-cpu and is used to determine which cache level CCSIDR
reads. If the task is migrated between when the CSSELR is written and
the CCSIDR is read the CCSIDR value may be for an unexpected cache
level (for example L1 instead of L2) and incorrect cache flushing
could occur.

Disable interrupts across the write and read so that the correct
cache attributes are read and used for the cache flushing
routine. We disable interrupts instead of disabling preemption
because the critical section is only 3 instructions and we want
to call v7_dcache_flush_all from __v7_setup which doesn't have a
full kernel stack with a struct thread_info.

This fixes a problem we see in scm_call() when flush_cache_all()
is called from preemptible context and sometimes the L2 cache is
not properly flushed out.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoARM: 7308/1: vfp: flush thread hwstate before copying ptrace registers
Will Deacon [Mon, 30 Jan 2012 19:23:29 +0000 (20:23 +0100)]
ARM: 7308/1: vfp: flush thread hwstate before copying ptrace registers

commit 8130b9d7b9d858aa04ce67805e8951e3cb6e9b2f upstream.

If we are context switched whilst copying into a thread's
vfp_hard_struct then the partial copy may be corrupted by the VFP
context switching code (see "ARM: vfp: flush thread hwstate before
restoring context from sigframe").

This patch updates the ptrace VFP set code so that the thread state is
flushed before the copy, therefore disabling VFP and preventing
corruption from occurring.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoARM: 7307/1: vfp: fix ptrace regset modification race
Dave Martin [Mon, 30 Jan 2012 19:22:28 +0000 (20:22 +0100)]
ARM: 7307/1: vfp: fix ptrace regset modification race

commit 247f4993a5974e6759606c4d380748eecfd273ff upstream.

In a preemptible kernel, vfp_set() can be preempted, causing the
hardware VFP context to be switched while the thread vfp state is
being read and modified.  This leads to a race condition which can
cause the thread vfp state to become corrupted if lazy VFP context
save occurs due to preemption in between the time thread->vfpstate
is read and the time the modified state is written back.

This may occur if preemption occurs during the execution of a
ptrace() call which modifies the VFP register state of a thread.
Such instances should be very rare in most realistic scenarios --
none has been reported, so far as I am aware.  Only uniprocessor
systems should be affected, since VFP context save is not currently
lazy in SMP kernels.

The problem was introduced by my earlier patch migrating to use
regsets to implement ptrace.

This patch does a vfp_sync_hwstate() before reading
thread->vfpstate, to make sure that the thread's VFP state is not
live in the hardware registers while the registers are modified.

Thanks to Will Deacon for spotting this.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoARM: 7306/1: vfp: flush thread hwstate before restoring context from sigframe
Will Deacon [Mon, 30 Jan 2012 19:21:42 +0000 (20:21 +0100)]
ARM: 7306/1: vfp: flush thread hwstate before restoring context from sigframe

commit 2af276dfb1722e97b190bd2e646b079a2aa674db upstream.

Following execution of a signal handler, we currently restore the VFP
context from the ucontext in the signal frame. This involves copying
from the user stack into the current thread's vfp_hard_struct and then
flushing the new data out to the hardware registers.

This is problematic when using a preemptible kernel because we could be
context switched whilst updating the vfp_hard_struct. If the current
thread has made use of VFP since the last context switch, the VFP
notifier will copy from the hardware registers into the vfp_hard_struct,
overwriting any data that had been partially copied by the signal code.

Disabling preemption across copy_from_user calls is a terrible idea, so
instead we move the VFP thread flush *before* we update the
vfp_hard_struct. Since the flushing is performed lazily, this has the
effect of disabling VFP and clearing the CPU's VFP state pointer,
therefore preventing the thread from being updated with stale data on
the next context switch.

Tested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoARM: 7150/1: Allow kernel unaligned accesses on ARMv6+ processors
Catalin Marinas [Mon, 7 Nov 2011 17:05:53 +0000 (18:05 +0100)]
ARM: 7150/1: Allow kernel unaligned accesses on ARMv6+ processors

commit 8428e84d42179c2a00f5f6450866e70d802d1d05 upstream.

Recent gcc versions generate unaligned accesses by default on ARMv6 and
later processors. This patch ensures that the SCTLR.A bit is always
cleared on such processors to avoid kernel traping before
alignment_init() is called.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: John Linn <John.Linn@xilinx.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agork30 phone: modify headset detect irq level for actul device
宋秀杰 [Mon, 28 May 2012 15:16:16 +0000 (23:16 +0800)]
rk30 phone: modify headset detect irq level for actul device

12 years agork30 phone loquat: modify lcd driver
hhb [Mon, 28 May 2012 14:33:51 +0000 (22:33 +0800)]
rk30 phone loquat: modify lcd driver

12 years agoRevert "rk30 phone loquat: modify lcd driver"
hhb [Mon, 28 May 2012 14:27:17 +0000 (22:27 +0800)]
Revert "rk30 phone loquat: modify lcd driver"

This reverts commit 0355a52ff6b48bc565dec18ca45bca233e819117.

12 years agork30 phone loquat: modify lcd driver
hhb [Mon, 28 May 2012 14:25:57 +0000 (22:25 +0800)]
rk30 phone loquat: modify lcd driver

12 years agork30 phone loquat: optimize touch screen report points
hhb [Mon, 28 May 2012 14:25:22 +0000 (22:25 +0800)]
rk30 phone loquat: optimize touch screen report points

12 years agork30 phone loquat: fix bug touch screen don't work when resume from suspend
hhb [Mon, 28 May 2012 14:23:30 +0000 (22:23 +0800)]
rk30 phone loquat: fix bug touch screen don't work when resume from suspend

12 years agork30:phone loquat:reduce arm and logic voltage when pmu enter sleep,set spi gpio...
张晴 [Mon, 28 May 2012 14:19:05 +0000 (22:19 +0800)]
rk30:phone loquat:reduce arm and logic voltage when pmu enter sleep,set spi gpio pullup and down disable when in sleep

12 years agork30:sdk:Solve the RTC alarm automatic startup
张晴 [Mon, 28 May 2012 12:22:36 +0000 (20:22 +0800)]
rk30:sdk:Solve the RTC alarm automatic startup

12 years agork30:sdk: clock_data add cpu 1.1G and 1.3G support
chenxing [Mon, 28 May 2012 11:57:55 +0000 (19:57 +0800)]
rk30:sdk: clock_data add cpu 1.1G and 1.3G support

12 years agork30:phone loquat:modify the pmu battery charger work quenes
张晴 [Mon, 28 May 2012 11:46:44 +0000 (19:46 +0800)]
rk30:phone loquat:modify the pmu battery charger work quenes

12 years agocamera rk30 : add fps detection code.
root [Mon, 28 May 2012 10:47:59 +0000 (18:47 +0800)]
camera rk30 : add fps detection code.

12 years agork30:phone loquat:add clk switch from 24M to 32K when in sleep
张晴 [Mon, 28 May 2012 10:35:21 +0000 (18:35 +0800)]
rk30:phone loquat:add clk switch from 24M to 32K when in sleep

12 years agocamera : ov2655 svga series has wrong(added soft sleep),fix it .
root [Mon, 28 May 2012 07:35:34 +0000 (15:35 +0800)]
camera : ov2655 svga series has wrong(added soft sleep),fix it .

12 years agork30: reset: pll enter slow mode when reset
黄涛 [Sun, 27 May 2012 11:11:44 +0000 (19:11 +0800)]
rk30: reset: pll enter slow mode when reset

slow down core periph. fix unable to boot sometime.

12 years agork: fiq_debugger: support reboot with command
黄涛 [Sun, 27 May 2012 10:44:46 +0000 (18:44 +0800)]
rk: fiq_debugger: support reboot with command

12 years agork30 phone loauqt: add touch screen synaptics s3202 standar drivers
hhb [Sun, 27 May 2012 07:52:01 +0000 (15:52 +0800)]
rk30 phone loauqt: add touch screen synaptics s3202 standar drivers

12 years agork30 phone loauqt: add touch screen synaptics s3202 drivers
hhb [Sun, 27 May 2012 07:50:06 +0000 (15:50 +0800)]
rk30 phone loauqt: add touch screen synaptics s3202 drivers

12 years agork30 phone loquat: modify lcd init registers
hhb [Sun, 27 May 2012 07:47:03 +0000 (15:47 +0800)]
rk30 phone loquat: modify lcd init registers

12 years agork30:sdk: fix compiled error when disable dvfs in menuconfig
chenxing [Fri, 25 May 2012 14:23:35 +0000 (22:23 +0800)]
rk30:sdk: fix compiled error when disable dvfs in menuconfig

12 years agoLoquate: Add bt sleep and wakeup host function
wdc [Fri, 25 May 2012 10:13:16 +0000 (18:13 +0800)]
Loquate: Add bt sleep and wakeup host function

12 years agocamera rk30 : expire time of reinit timer is not accurate,fix it
root [Fri, 25 May 2012 02:10:19 +0000 (10:10 +0800)]
camera rk30 : expire time of reinit timer is not accurate,fix it

12 years agork30_phone_loquat:modify sensors orientation
lw [Thu, 24 May 2012 10:05:18 +0000 (18:05 +0800)]
rk30_phone_loquat:modify sensors orientation