Huang, Tao [Fri, 13 Feb 2015 06:40:39 +0000 (14:40 +0800)]
Merge branch develop-3.10
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
Conflicts:
drivers/video/rockchip/rk_fb.c
huangzhibao [Fri, 13 Feb 2015 02:56:26 +0000 (10:56 +0800)]
dts: rk3368.dtsi:add remotectl; add rk3368-box.dts
Huang, Tao [Thu, 12 Feb 2015 08:38:12 +0000 (16:38 +0800)]
power: reset: rockchip-reboot: rk3368 support reboot with argument
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
hwg [Thu, 12 Feb 2015 07:23:03 +0000 (15:23 +0800)]
rk3368-tb_8846.dts support wifi
hwg [Thu, 12 Feb 2015 07:22:38 +0000 (15:22 +0800)]
rfkill-wlan.c: support rk3368
hwg [Thu, 12 Feb 2015 07:21:52 +0000 (15:21 +0800)]
update rkwifi bcmdhd to version 1.201.34.1
hwg [Thu, 12 Feb 2015 07:02:51 +0000 (15:02 +0800)]
update rtl8188eu wifi driver to RTL8188EUS_linux_v4.3.0.7_12758.
20141114
lyz [Thu, 12 Feb 2015 02:16:32 +0000 (10:16 +0800)]
usb: dwc_otg: show warning on actual buffer length larger than
transfer buffer length
In this case DWC_OTG controller will over-write memory space that
not belongs to this urb, it may cause kernel crash.
Signed-off-by: lyz <lyz@rock-chips.com>
lyz [Wed, 11 Feb 2015 02:59:23 +0000 (10:59 +0800)]
usb: ehci: fix test packet mode
When enter usb test packet mode the device no longer connect
normally, so stop the connect detect timer
Signed-off-by: lyz <lyz@rock-chips.com>
lyz [Tue, 27 Jan 2015 07:53:53 +0000 (15:53 +0800)]
usb: dwc_otg: add condition judgement to filter invalid
disconnect interrupt
In some case, we disconnect a usb device, then usb controller
will trigger more the one disconnect interrupt, so check port
enable change bit in hprt0 to make sure just one disconnect
interrupt be handled.
here to
Signed-off-by: lyz <lyz@rock-chips.com>
lyz [Tue, 27 Jan 2015 03:46:38 +0000 (11:46 +0800)]
usb: ehci-rockchip: fix typo
'work around' should be 'walk around'
Signed-off-by: lyz <lyz@rock-chips.com>
lyz [Wed, 11 Feb 2015 10:38:50 +0000 (18:38 +0800)]
usb: rk3368: support wake up by usb plug
Signed-off-by: lyz <lyz@rock-chips.com>
lyz [Wed, 11 Feb 2015 10:15:42 +0000 (18:15 +0800)]
usb: rk3368: support usb battery charger detect
Signed-off-by: lyz <lyz@rock-chips.com>
lyz [Wed, 11 Feb 2015 10:03:28 +0000 (18:03 +0800)]
rockchip_defconfig: add generic EHIC and OHCI platform driver
hjc [Wed, 11 Feb 2015 09:30:59 +0000 (17:30 +0800)]
rk31xx lvds: update config for VOCM and VDIFF
Signed-off-by: hjc <hjc@rock-chips.com>
hjc [Wed, 11 Feb 2015 08:28:47 +0000 (16:28 +0800)]
rk fb: fix screen info error when in no dual mode and pull out hdmi
Signed-off-by: hjc <hjc@rock-chips.com>
hjc [Wed, 11 Feb 2015 08:24:34 +0000 (16:24 +0800)]
rk31xx lvds: fix lvds grf config error when disable lvds
chenyifu [Wed, 14 Jan 2015 08:12:07 +0000 (16:12 +0800)]
rk3368 mipi: modified the bug of dts file
The address of rk3368 is 64-bits.
Change the order of "pclk_mipi_dsi" and "pclk_mipi_dsi_host"
in order compatible with earlier code.
Signed-off-by: chenyifu <chenyf@rock-chips.com>
chenyifu [Wed, 14 Jan 2015 08:43:55 +0000 (16:43 +0800)]
rk3368 mipi: add mipi driver of rk3368
Signed-off-by: chenyifu <chenyf@rock-chips.com>
guoyi [Wed, 11 Feb 2015 07:26:36 +0000 (15:26 +0800)]
rk3368: dts: fix rk3368-p9_818 err
guoyi [Wed, 11 Feb 2015 06:00:41 +0000 (14:00 +0800)]
Drivers:
input: add gt9xx/ for goodix touchscreen.
guoyi [Wed, 11 Feb 2015 03:13:28 +0000 (11:13 +0800)]
rk3368:
dts: add rk3368-p9_818.dts
hjc [Wed, 11 Feb 2015 06:02:37 +0000 (14:02 +0800)]
rk fb: enable mmu when uboot-logo is 0
hjc [Wed, 11 Feb 2015 03:54:29 +0000 (11:54 +0800)]
rk fb: fix fence time out for dual display mode
Signed-off-by: hjc <hjc@rock-chips.com>
Huang, Tao [Tue, 10 Feb 2015 12:18:09 +0000 (20:18 +0800)]
rk: last_log: version 3.1, support arm64
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
Huang, Tao [Tue, 10 Feb 2015 11:12:57 +0000 (19:12 +0800)]
arm64: rockchip: rockchip_defconfig enable TEST_POWER
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
Huang, Tao [Tue, 10 Feb 2015 08:48:02 +0000 (16:48 +0800)]
rk: ion: fix compilation error without CONFIG_COMPAT
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
Huang, Tao [Tue, 10 Feb 2015 08:43:50 +0000 (16:43 +0800)]
Merge branch develop-3.10 into develop-3.10-next
Conflicts:
drivers/clk/rockchip/clk-ops.h
drivers/video/rockchip/hdmi/chips/rk3288/rk3288_hdmi.c
drivers/video/rockchip/rk_fb.c
Huang, Tao [Tue, 10 Feb 2015 08:24:25 +0000 (16:24 +0800)]
Merge tag 'lsk-v3.10-android-15.01'
LSK Android 15.01 v3.10
Conflicts:
arch/arm/Kconfig.debug
arch/arm64/mm/init.c
drivers/Makefile
drivers/cpufreq/cpufreq_interactive.c
dkl [Tue, 10 Feb 2015 03:01:25 +0000 (11:01 +0800)]
dts: rk3126\rk3126b: modify VIO clocks to slove VIO idle fail problem
In rk3126, when aclk_vio0\aclk_vio1\hclk_vio were reparented from the
default parent gpll_div2 to gpll in clk_init, the temporary rates
are too high and may lead to failture in VIO idle_request later.
To slove this problem, VIO clocks are modified to auto select parent
and consider the order of reparent and set_div when set_rate.
Signed-off-by: dkl <dkl@rock-chips.com>
ywj [Tue, 10 Feb 2015 01:23:33 +0000 (09:23 +0800)]
add usb charge config
Zheng Yang [Mon, 9 Feb 2015 02:42:19 +0000 (10:42 +0800)]
rk3288 hdmi: If audio source if spdif, sclk/fs should be 128x.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
Zheng Yang [Mon, 9 Feb 2015 02:40:40 +0000 (10:40 +0800)]
HDMI: fix filter feature SUPPORT_TMDS_600M error:
If soc is not support feature SUPPORT_TMDS_600M,
or current EDID information is not support the
feature, we should not show the corresponding
option, such as 3840x2160p-60.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
David Wu [Sun, 8 Feb 2015 13:38:22 +0000 (21:38 +0800)]
i2c: fix retry_count to return error when i2c bus checkidle was low
Signed-off-by: David Wu <wdc@rock-chips.com>
Huang, Tao [Fri, 6 Feb 2015 13:43:58 +0000 (21:43 +0800)]
rk3368: rename pmu_grf or pmu to pmugrf
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
Huang, Tao [Fri, 6 Feb 2015 13:37:06 +0000 (21:37 +0800)]
power: reset: rockchip-reboot: add rk3368 reboot driver
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
Xiao Feng [Fri, 6 Feb 2015 07:48:17 +0000 (15:48 +0800)]
rk3368: cpufreq: fix compile warning
Signed-off-by: Xiao Feng <xf@rock-chips.com>
hwg [Thu, 5 Feb 2015 02:51:07 +0000 (10:51 +0800)]
rfkill-wlan.c: solve null point panic when wifi_chip_type is not define in dts
li bing [Tue, 3 Feb 2015 07:31:46 +0000 (15:31 +0800)]
wifi->esp8089:
ESP8089 driver update to V1.9.1(30/01/2015);
Update the V2.4 esp_prealloc program.
Zheng Yang [Tue, 3 Feb 2015 07:51:18 +0000 (15:51 +0800)]
hdmi:
1. fix 3288 hdmi audio source select error.
2. For mid, it need to call rk_fb_get_display_policy
to reset overscan after swichting vop timing.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
dkl [Tue, 3 Feb 2015 06:15:27 +0000 (14:15 +0800)]
rk3288: modify to ensure pairwise call of clk_enable\disable
in rk3288_pll_early_suspend_notifier_call
Signed-off-by: dkl <dkl@rock-chips.com>
Zheng Yang [Mon, 2 Feb 2015 07:04:21 +0000 (15:04 +0800)]
hdmi: depends on DRM_ROCKCHIP and fix document error.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
lintao [Mon, 2 Feb 2015 03:26:48 +0000 (11:26 +0800)]
dts: fix compile err
Signed-off-by: lintao <lintao@rock-chips.com>
Zheng Yang [Mon, 2 Feb 2015 03:06:04 +0000 (11:06 +0800)]
hdmi: update driver to v2.0:
1. Rename rk3036 hdmi to rockchip_hdmiv1, support hdmi v1.4;
2. Rename rk3288 hdmi to rockchip_hdmiv2, support hdmi v2.0;
3. Support transmmit 3D picture.
4. 3288 hdmi support HDCP, CEC and TMDSCLK 600M.
5. HDMI video source default is LCDC0, it can be modified in dts by
follow:
rockchip,hdmi_video_source = <DISPLAY_SOURCE_LCDC1>;
HDCP and CEC function default is disabled , it can be enabled in
dts file by follow:
rockchip,hdcp_enable = <1>;
rockchip,cec_enable = <1>;
More information please see
Documentation/devicetree/bindings/video/rockchip_hdmi.txt
lintao [Mon, 2 Feb 2015 02:21:25 +0000 (10:21 +0800)]
dts: rk312x: default enable emmc
Signed-off-by: lintao <lintao@rock-chips.com>
lintao [Mon, 26 Jan 2015 01:57:11 +0000 (09:57 +0800)]
mmc: add more waiting for erase and status op
Zheng Yang [Sun, 1 Feb 2015 08:28:03 +0000 (16:28 +0800)]
rk3288 hdmi: add cec clk and pinctrl.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
Zheng Yang [Sun, 1 Feb 2015 08:24:58 +0000 (16:24 +0800)]
rk3288 hdmi:
To improve stability of reading EDID, we need to
disable HDMI ddc GPIO internal pull up.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
zyc [Fri, 30 Jan 2015 01:42:23 +0000 (09:42 +0800)]
camera: oneframe v0.1.e
hwg [Thu, 29 Jan 2015 09:29:03 +0000 (17:29 +0800)]
solve rfkill-wlan driver kernel panic when rfkill-bt driver probe fail
li bing [Thu, 29 Jan 2015 07:01:37 +0000 (15:01 +0800)]
Wifi->rtl8812au: add chip name /sys/class/rkwifi/chip for RTL8812BU
li bing [Thu, 29 Jan 2015 06:09:41 +0000 (14:09 +0800)]
Wifi->rtl8723au: update dirver to version 4.00(4.1.11_12622.
20141215).
smj [Thu, 29 Jan 2015 00:51:26 +0000 (08:51 +0800)]
rk312x codec: fix rk312x codec switch state error
Signed-off-by: lxt <lxt@rock-chips.com>
Zheng Yang [Wed, 28 Jan 2015 10:13:37 +0000 (18:13 +0800)]
modify display-sys.c and display-sys.h code style.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
zwl [Wed, 28 Jan 2015 07:50:05 +0000 (15:50 +0800)]
rk3128: hdmi: add disable clock when system shutdown
disable clock will call disable power domain.
hdmi and lcdc share the power domain, so they must disable
the power domain when system shutdown.
Signed-off-by: zwl <zwl@rockchips.com>
Simon [Wed, 28 Jan 2015 07:30:26 +0000 (15:30 +0800)]
rockchip: iommu: skip rk312x vop mmu stall operation,mask rk312x vop mmu interrupt
Video stress test failed, may have something relationship to vop mmu stall operation
skip it as a workaround
Reboot stress test failed, error showed a large number of vop/vop mmu interrupt,mask
vop mmu interrupt to avoid reboot stress test failed in rk312x
Signed-off-by: Simon <xxm@rock-chips.com>
zyc [Wed, 28 Jan 2015 03:24:21 +0000 (11:24 +0800)]
camera: camsys_drv:v0.0x1b.0 oneframe:v0.1.0xd
dalon.zhang [Wed, 28 Jan 2015 02:12:32 +0000 (10:12 +0800)]
rk312x: fix usb otg camera issues
chenzhen [Mon, 26 Jan 2015 08:10:22 +0000 (16:10 +0800)]
mali_400_driver :
use mod_timer in mali_control_timer_callback_chain.
upgrade rk_ko_ver to 3.
chenzhen [Wed, 7 Jan 2015 06:30:56 +0000 (14:30 +0800)]
rk312x, mali_400_driver : ammend rk_ko_ver.txt.
hcy [Mon, 26 Jan 2015 01:13:52 +0000 (09:13 +0800)]
Support 1.5GB and 3GB with 2CS on the DDR1 channel
Mark Brown [Sat, 24 Jan 2015 11:54:15 +0000 (11:54 +0000)]
Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android
Mark Brown [Fri, 23 Jan 2015 20:36:05 +0000 (20:36 +0000)]
Merge remote-tracking branch 'lsk/v3.10/topic/arm64-misc' into linux-linaro-lsk
Conflicts:
arch/arm64/include/asm/proc-fns.h
arch/arm64/kernel/debug-monitors.c
arch/arm64/kernel/psci.c
Laura Abbott [Thu, 9 Oct 2014 22:26:44 +0000 (15:26 -0700)]
arm64: add atomic pool for non-coherent and CMA allocations
Neither CMA nor noncoherent allocations support atomic allocations.
Add a dedicated atomic pool to support this.
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Riley <davidriley@chromium.org>
Cc: Olof Johansson <olof@lixom.net>
Cc: Ritesh Harjain <ritesh.harjani@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit
d4932f9e81ae7a7bf3c3967e48373909b9c98ee5)
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Fri, 23 Jan 2015 20:27:25 +0000 (20:27 +0000)]
Merge remote-tracking branch 'lsk/v3.10/topic/dma-mapping' into lsk-v3.10-arm64-misc
Mark Brown [Fri, 23 Jan 2015 20:15:32 +0000 (20:15 +0000)]
Revert "arm64: vdso: move to _install_special_mapping and remove arch_vma_name"
This reverts commit
95c91bdd8eafdc74337049c45d74c903b7dac49c.
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Fri, 23 Jan 2015 20:15:15 +0000 (20:15 +0000)]
Revert "arm64: vdso: move data page before code pages"
This reverts commit
82a95d0521cb6258559d18dca736da8272ba05a7.
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Fri, 23 Jan 2015 12:09:02 +0000 (12:09 +0000)]
Merge remote-tracking branch 'lsk/v3.10/topic/coresight' into linux-linaro-lsk
Mark Brown [Fri, 23 Jan 2015 12:04:03 +0000 (12:04 +0000)]
ARM: Revert "coresight: adding basic support for Vexpress TC2"
This reverts commit
63041eff2297676a345478c2b1cc6f76c63102db. For some
reason this is causing failures before the serial console comes up on
TC2 when booted using UEFI, revert pending investigation.
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Fri, 23 Jan 2015 11:59:22 +0000 (11:59 +0000)]
Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android
Mark Brown [Fri, 23 Jan 2015 11:59:17 +0000 (11:59 +0000)]
Merge remote-tracking branch 'lsk/linux-linaro-lsk' into linux-linaro-lsk
Mark Brown [Fri, 23 Jan 2015 11:33:35 +0000 (11:33 +0000)]
Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android
Alex Shi [Fri, 23 Jan 2015 11:14:19 +0000 (19:14 +0800)]
configs: add kernel internel boot testing configuration
The usage likes following:
$scripts/kconfig/merge_config.sh linaro/configs/linaro-base.conf
linaro/configs/booting-test.conf ...
It was tested on lsk-3.10 pandaboard ES.
Signed-off-by: Alex Shi <alex.shi@linaro.org>
lyz [Fri, 23 Jan 2015 09:05:14 +0000 (17:05 +0800)]
usb: dwc_otg: handle data toggle error in right way
data toggle error without a ChannelHalt status is not a real data
toggle err, it is a transfer error state so just clear the
interrupt bit rather than resubmit this request
Signed-off-by: lyz <lyz@rock-chips.com>
lyz [Mon, 19 Jan 2015 10:55:56 +0000 (18:55 +0800)]
usb: dwc_otg: fix issue with race condition of competition
between hcd_reinit() and cil_interrupt handler.
hcd_reinit() should get core_if->lock before modify this
lock, so that can prevent competition between cil_interrupt
handler and hcd_reinit(), hcd_reinit() be scheduled while
cil_interrupt handler holding core_if->lock, hcd_reinit() modify
the lock then previous core_if->lock will never be unlocked.
Signed-off-by: lyz <lyz@rock-chips.com>
lyz [Mon, 19 Jan 2015 11:17:37 +0000 (19:17 +0800)]
usb: dwc_otg: double check disconnect state when otg state
changed
When otg stop host mode and before change to device mode hcd_stop
function should do something to double check all usb device is
disconnect because the disconnect interrupt might be lost.
1.kill all active urbs attached to this hcd
2.set hcd->flags to notify usb core to disconnect all usb devices
Signed-off-by: lyz <lyz@rock-chips.com>
Mark Brown [Fri, 23 Jan 2015 01:32:22 +0000 (01:32 +0000)]
Merge remote-tracking branch 'lsk/v3.10/topic/dma-mapping' into linux-linaro-lsk
Mark Brown [Fri, 23 Jan 2015 01:31:57 +0000 (01:31 +0000)]
Merge remote-tracking branch 'lsk/v3.10/topic/arm64-perf' into linux-linaro-lsk
Catalin Marinas [Fri, 29 Aug 2014 15:08:02 +0000 (16:08 +0100)]
arm64: Add brackets around user_stack_pointer()
Commit
5f888a1d33 (ARM64: perf: support dwarf unwinding in compat mode)
changes user_stack_pointer() to return the compat SP for 32-bit tasks
but without brackets around the whole definition, with possible issues
on the call sites (noticed with a subsequent fix for KSTK_ESP).
Fixes: 5f888a1d33c4 (ARM64: perf: support dwarf unwinding in compat mode)
Reported-by: Sudeep Holla <sudeep.holla@arm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit
2520d039728b2a3c5ae7f79fe2a0e9d182855b12)
Signed-off-by: Mark Brown <broonie@kernel.org>
Laura Abbott [Thu, 9 Oct 2014 22:26:40 +0000 (15:26 -0700)]
common: dma-mapping: introduce common remapping functions
For architectures without coherent DMA, memory for DMA may need to be
remapped with coherent attributes. Factor out the the remapping code from
arm and put it in a common location to reduce code duplication.
As part of this, the arm APIs are now migrated away from
ioremap_page_range to the common APIs which use map_vm_area for remapping.
This should be an equivalent change and using map_vm_area is more correct
as ioremap_page_range is intended to bring in io addresses into the cpu
space and not regular kernel managed memory.
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Riley <davidriley@chromium.org>
Cc: Olof Johansson <olof@lixom.net>
Cc: Ritesh Harjain <ritesh.harjani@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Laura Abbott <lauraa@codeaurora.org>
Cc: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit
513510ddba9650fc7da456eefeb0ead7632324f6)
Signed-off-by: Mark Brown <broonie@kernel.org>
Laura Abbott [Thu, 9 Oct 2014 22:26:38 +0000 (15:26 -0700)]
lib/genalloc.c: add genpool range check function
After allocating an address from a particular genpool, there is no good
way to verify if that address actually belongs to a genpool. Introduce
addr_in_gen_pool which will return if an address plus size falls
completely within the genpool range.
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Olof Johansson <olof@lixom.net>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Riley <davidriley@chromium.org>
Cc: Ritesh Harjain <ritesh.harjani@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit
9efb3a421d55d30b65fb0dbee05108d15c6c55f7)
Signed-off-by: Mark Brown <broonie@kernel.org>
Laura Abbott [Thu, 9 Oct 2014 22:26:35 +0000 (15:26 -0700)]
lib/genalloc.c: add power aligned algorithm
One of the more common algorithms used for allocation is to align the
start address of the allocation to the order of size requested. Add this
as an algorithm option for genalloc.
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Olof Johansson <olof@lixom.net>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Riley <davidriley@chromium.org>
Cc: Ritesh Harjain <ritesh.harjani@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit
505e3be6c082489a32a88e042f930d047b6415bc)
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Charlebois [Wed, 27 Aug 2014 04:29:33 +0000 (05:29 +0100)]
arm64: LLVMLinux: Use global stack register variable for aarch64
To support both Clang and GCC, use the global stack register variable vs
a local register variable.
Author: Mark Charlebois <charlebm@gmail.com>
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Signed-off-by: Behan Webster <behanw@converseincode.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit
34ccf8f455f1ae7761810a74308f82daca67ced1)
Signed-off-by: Mark Brown <broonie@kernel.org>
Behan Webster [Wed, 27 Aug 2014 04:29:32 +0000 (05:29 +0100)]
arm64: LLVMLinux: Use current_stack_pointer in kernel/traps.c
Use the global current_stack_pointer to get the value of the stack pointer.
This change supports being able to compile the kernel with both gcc and clang.
Signed-off-by: Behan Webster <behanw@converseincode.com>
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Reviewed-by: Olof Johansson <olof@lixom.net>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit
2128df143d840a20e12818290eb6e40b95cc4ac0)
Signed-off-by: Mark Brown <broonie@kernel.org>
Behan Webster [Wed, 27 Aug 2014 04:29:31 +0000 (05:29 +0100)]
arm64: LLVMLinux: Calculate current_thread_info from current_stack_pointer
Use the global current_stack_pointer to get the value of the stack pointer.
This change supports being able to compile the kernel with both gcc and clang.
Signed-off-by: Behan Webster <behanw@converseincode.com>
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Reviewed-by: Jan-Simon Möller <dl9pf@gmx.de>
Reviewed-by: Olof Johansson <olof@lixom.net>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit
786248705ecf5290f26534e8eef62ba6dd63b806)
Signed-off-by: Mark Brown <broonie@kernel.org>
Behan Webster [Wed, 27 Aug 2014 04:29:30 +0000 (05:29 +0100)]
arm64: LLVMLinux: Use current_stack_pointer in save_stack_trace_tsk
Use the global current_stack_pointer to get the value of the stack pointer.
This change supports being able to compile the kernel with both gcc and clang.
Signed-off-by: Behan Webster <behanw@converseincode.com>
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Reviewed-by: Jan-Simon Möller <dl9pf@gmx.de>
Reviewed-by: Olof Johansson <olof@lixom.net>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit
bb28cec4ea2f5151c08e061c6de825a8c853bbd6)
Signed-off-by: Mark Brown <broonie@kernel.org>
Behan Webster [Wed, 27 Aug 2014 04:29:29 +0000 (05:29 +0100)]
arm64: LLVMLinux: Add current_stack_pointer() for arm64
Define a global named register for current_stack_pointer. The use of this new
variable guarantees that both gcc and clang can access this register in C code.
Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Jan-Simon Möller <dl9pf@gmx.de>
Reviewed-by: Mark Charlebois <charlebm@gmail.com>
Reviewed-by: Olof Johansson <olof@lixom.net>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit
3337a10e0d0cbc9225cefc23aa7a604b698367ed)
Signed-off-by: Mark Brown <broonie@kernel.org>
Laura Abbott [Tue, 19 Aug 2014 19:41:43 +0000 (20:41 +0100)]
arm64: Add CONFIG_DEBUG_SET_MODULE_RONX support
In a similar fashion to other architecture, add the infrastructure
and Kconfig to enable DEBUG_SET_MODULE_RONX support. When
enabled, module ranges will be marked read-only/no-execute as
appropriate.
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
[will: fixed off-by-one in module end check]
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit
11d91a770f1fff44dafdf88d6089a3451f99c9b6)
Signed-off-by: Mark Brown <broonie@kernel.org>
Conflicts:
arch/arm64/Kconfig.debug
Laura Abbott [Tue, 19 Aug 2014 19:41:42 +0000 (20:41 +0100)]
arm64: Introduce {set,clear}_pte_bit
It's useful to be able to change individual bits in ptes at times.
Introduce functions for this and update existing pte_mk* functions
to use these primatives.
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
[will: added missing inline keyword for new header functions]
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit
b6d4f2800b7bad654caf00654f4bff21594ef838)
Signed-off-by: Mark Brown <broonie@kernel.org>
Arun Chandran [Mon, 18 Aug 2014 09:06:58 +0000 (10:06 +0100)]
arm64: convert part of soft_restart() to assembly
The current soft_restart() and setup_restart implementations incorrectly
assume that compiler will not spill/fill values to/from stack. However
this assumption seems to be wrong, revealed by the disassembly of the
currently existing code (v3.16) built with Linaro GCC 4.9-2014.05.
ffffffc000085224 <soft_restart>:
ffffffc000085224:
a9be7bfd stp x29, x30, [sp,#-32]!
ffffffc000085228:
910003fd mov x29, sp
ffffffc00008522c:
f9000fa0 str x0, [x29,#24]
ffffffc000085230:
94003d21 bl
ffffffc0000946b4 <setup_mm_for_reboot>
ffffffc000085234:
94003b33 bl
ffffffc000093f00 <flush_cache_all>
ffffffc000085238:
94003dfa bl
ffffffc000094a20 <cpu_cache_off>
ffffffc00008523c:
94003b31 bl
ffffffc000093f00 <flush_cache_all>
ffffffc000085240:
b0003321 adrp x1,
ffffffc0006ea000 <reset_devices>
ffffffc000085244:
f9400fa0 ldr x0, [x29,#24] ----> spilled addr
ffffffc000085248:
f942fc22 ldr x2, [x1,#1528] ----> global memstart_addr
ffffffc00008524c:
f0000061 adrp x1,
ffffffc000094000 <__inval_cache_range+0x40>
ffffffc000085250:
91290021 add x1, x1, #0xa40
ffffffc000085254:
8b010041 add x1, x2, x1
ffffffc000085258:
d2c00802 mov x2, #0x4000000000 // #
274877906944
ffffffc00008525c:
8b020021 add x1, x1, x2
ffffffc000085260:
d63f0020 blr x1
...
Here the compiler generates memory accesses after the cache is disabled,
loading stale values for the spilled value and global variable. As we cannot
control when the compiler will access memory we must rewrite the
functions in assembly to stash values we need in registers prior to
disabling the cache, avoiding the use of memory.
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Arun Chandran <achandran@mvista.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit
5e051531447259e5df95c44bccb69979537c19e4)
Signed-off-by: Mark Brown <broonie@kernel.org>
Conflicts:
arch/arm64/include/asm/proc-fns.h
Mark Brown [Thu, 22 Jan 2015 21:29:45 +0000 (21:29 +0000)]
Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android
Sudeep Holla [Tue, 2 Sep 2014 10:35:24 +0000 (11:35 +0100)]
arm64: use irq_set_affinity with force=false when migrating irqs
The arm64 interrupt migration code on cpu offline calls
irqchip.irq_set_affinity() with the argument force=true. Originally
this argument had no effect because it was not used by any interrupt
chip driver and there was no semantics defined.
This changed with commit
01f8fa4f01d8 ("genirq: Allow forcing cpu
affinity of interrupts") which made the force argument useful to route
interrupts to not yet online cpus without checking the target cpu
against the cpu online mask. The following commit
ffde1de64012
("irqchip: gic: Support forced affinity setting") implemented this for
the GIC interrupt controller.
As a consequence the cpu offline irq migration fails if CPU0 is
offlined, because CPU0 is still set in the affinity mask and the
validation against cpu online mask is skipped to the force argument
being true. The following first_cpu(mask) selection always selects
CPU0 as the target.
Commit
601c942176d8("arm64: use cpu_online_mask when using forced
irq_set_affinity") intended to fix the above mentioned issue but
introduced another issue where affinity can be migrated to a wrong
CPU due to unconditional copy of cpu_online_mask.
As with for arm, solve the issue by calling irq_set_affinity() with
force=false from the CPU offline irq migration code so the GIC driver
validates the affinity mask against CPU online mask and therefore
removes CPU0 from the possible target candidates. Also revert the
changes done in the commit
601c942176d8 as it's no longer needed.
Tested on Juno platform.
Fixes: 601c942176d8("arm64: use cpu_online_mask when using forced
irq_set_affinity")
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: <stable@vger.kernel.org> # 3.10.x
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit
3d8afe3099ebc602848aa7f09235cce3a9a023ce)
Signed-off-by: Mark Brown <broonie@kernel.org>
Will Deacon [Fri, 29 Aug 2014 15:11:10 +0000 (16:11 +0100)]
arm64: report correct stack pointer in KSTK_ESP for compat tasks
The KSTK_ESP macro is used to determine the user stack pointer for a
given task. In particular, this is used to to report the '[stack]' VMA
in /proc/self/maps, which is used by Android to determine the stack
location for children of the main thread.
This patch fixes the macro to use user_stack_pointer instead of directly
returning sp. This means that we report w13 instead of sp, since the
former is used as the stack pointer when executing in AArch32 state.
Cc: <stable@vger.kernel.org>
Reported-by: Serban Constantinescu <Serban.Constantinescu@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit
3168a743461ecf86adf3e7dcfcd79271828fb263)
Signed-off-by: Mark Brown <broonie@kernel.org>
Will Deacon [Fri, 22 Aug 2014 13:20:24 +0000 (14:20 +0100)]
arm64: ptrace: fix compat reg getter/setter return values
copy_{to,from}_user return the number of bytes remaining on failure, not
an error code.
This patch returns -EFAULT when the copy operation didn't complete,
rather than expose the number of bytes not copied directly to userspace.
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit
85487edd252fa04718dcd735bc0f41213bbb9546)
Signed-off-by: Mark Brown <broonie@kernel.org>
Will Deacon [Fri, 22 Aug 2014 13:13:24 +0000 (14:13 +0100)]
arm64: ptrace: fix compat hardware watchpoint reporting
I'm not sure what I was on when I wrote this, but when iterating over
the hardware watchpoint array (hbp_watch_array), our index is off by
ARM_MAX_BRP, so we walk off the end of our thread_struct...
... except, a dodgy condition in the loop means that it never executes
at all (bp cannot be NULL).
This patch fixes the code so that we remove the bp check and use the
correct index for accessing the watchpoint structures.
Cc: <stable@vger.kernel.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit
27d7ff273c2aad37b28f6ff0cab2cfa35b51e648)
Signed-off-by: Mark Brown <broonie@kernel.org>
Geoff Levand [Fri, 22 Aug 2014 19:49:16 +0000 (20:49 +0100)]
arm64: Remove unused variable in head.S
Remove an unused local variable from head.S. It seems this was never
used even from the initial commit
9703d9d7f77ce129621f7d80a844822e2daa7008 (arm64: Kernel booting and
initialisation), and is a left over from a previous implementation
of __calc_phys_offset.
Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit
5843be2279d7a91ef48c20ac31715d1eb9607a84)
Signed-off-by: Mark Brown <broonie@kernel.org>
Ganapatrao Kulkarni [Thu, 14 Aug 2014 15:19:46 +0000 (20:49 +0530)]
arm64: mm: update max pa bits to 48
Now that we support 48-bit physical addressing, update MAX_PHYSMEM_BITS
accordingly.
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@caviumnetworks.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit
07a15dd55a3d65f81b4b09eab293f4afc720b082)
Signed-off-by: Mark Brown <broonie@kernel.org>
Ard Biesheuvel [Wed, 13 Aug 2014 17:53:03 +0000 (18:53 +0100)]
arm64: align randomized TEXT_OFFSET on 4 kB boundary
When booting via UEFI, the kernel Image is loaded at a 4 kB boundary and
the embedded EFI stub is executed in place. The EFI stub relocates the
Image to reside TEXT_OFFSET bytes above a 2 MB boundary, and jumps into
the kernel proper.
In AArch64, PC relative symbol references are emitted using adrp/add or
adrp/ldr pairs, where the offset into a 4 kB page is resolved using a
separate :lo12: relocation. This implicitly assumes that the code will
always be executed at the same relative offset with respect to a 4 kB
boundary, or the references will point to the wrong address.
This means we should link the kernel at a 4 kB aligned base address in
order to remain compatible with the base address the UEFI loader uses
when doing the initial load of Image. So update the code that generates
TEXT_OFFSET to choose a multiple of 4 kB.
At the same time, update the code so it chooses from the interval [0..2MB)
as the author originally intended.
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit
4190312beb2acfb7bfb1bb971e24a759aa96b0e8)
Signed-off-by: Mark Brown <broonie@kernel.org>
Conflicts:
arch/arm64/Makefile
arch/arm64/kernel/head.S
Catalin Marinas [Fri, 13 Jun 2014 12:41:20 +0000 (13:41 +0100)]
arm64: Limit the CMA buffer to 32-bit if ZONE_DMA
When the CMA buffer is allocated, it is too early to know whether
devices will require ZONE_DMA memory. This patch limits the CMA buffer
to (DMA_BIT_MASK(32) + 1) if CONFIG_ZONE_DMA is enabled.
In addition, it computes the dma_to_phys(DMA_BIT_MASK(32)) before the
increment (no current functional change).
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit
2d5a5612bceda8edd25b29f363c4e2c6cda28bab)
Signed-off-by: Mark Brown <broonie@kernel.org>
Conflicts:
arch/arm64/mm/init.c
Lorenzo Pieralisi [Thu, 29 May 2014 17:16:54 +0000 (18:16 +0100)]
arm64: kernel: initialize broadcast hrtimer based clock event device
On platforms implementing CPU power management, the CPUidle subsystem
can allow CPUs to enter idle states where local timers logic is lost on power
down. To keep the software timers functional the kernel relies on an
always-on broadcast timer to be present in the platform to relay the
interrupt signalling the timer expiries.
For platforms implementing CPU core gating that do not implement an always-on
HW timer or implement it in a broken way, this patch adds code to initialize
the kernel hrtimer based clock event device upon boot (which can be chosen as
tick broadcast device by the kernel).
It relies on a dynamically chosen CPU to be always powered-up. This CPU then
relays the timer interrupt to CPUs in deep-idle states through its HW local
timer device.
Having a CPU always-on has implications on power management platform
capabilities and makes CPUidle suboptimal, since at least a CPU is kept
always in a shallow idle state by the kernel to relay timer interrupts,
but at least leaves the kernel with a functional system with some working
power management capabilities.
The hrtimer based clock event device is unconditionally registered, but
has the lowest possible rating such that any broadcast-capable HW clock
event device present will be chosen in preference as the tick broadcast
device.
Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit
9358d755bd5cba8965ea79f2a446e689323409f9,
again after temporary revert)
Signed-off-by: Mark Brown <broonie@kernel.org>