This is because set_fmt ops maybe called when PD is off,
and in such case, regmap_ops will lead system hang.
enale PD before doing regmap_ops.
Change-Id: I86c04679c22e4763fd2539f88371ad1d33951723
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
In order to prevent aliasing attacks on the branch predictor,
invalidate the BTB on CPUs that are known to be affected when taking
a prefetch abort on a address that is outside of a user task limit.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git kpti
commit a07373c8c365746583f25f49fee41b1bc0ff94b2)
CVE-2017-5715
Change-Id: I6b0db5fbf1d495b03560b665dca37c2834d6f3a9
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
In order to avoid aliasing attacks against the branch predictor,
some implementations require to invalidate the BTB when switching
from one user context to another.
For this, we reuse the existing implementation for Cortex-A8, and
apply it to A9, A12 and A17.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git kpti
commit efcd0e857a656bbd1c1da15ff984ad6402332c61)
CVE-2017-5715
Change-Id: Ica839802de678a5456abadf09bb6434efd43da2c
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Add constants and callback functions for the dwmac on px30 soc.
The base structure is the same, but registers and the bits in
them moved slightly, and add the clk_mac_speed for the select
of mac speed.
Change-Id: If1aeb2fbafb70a8cb68f9d26a97c5b2a46dcb90f
Signed-off-by: David Wu <david.wu@rock-chips.com>
The default value of the max_transfer_size is only 65535,
but according to the field of PktSizeWidth in GHWCFG3, the
otg controller on rockchip platforms can support max 512KB
transfer size. So we increase the otg max_transfer_size to
128KB, it can help to avoid dividing into two hardware
transmissions if the usb device class driver(e.g. f_mtp.c)
request to transfer more than 65535 Bytes data in a single
usb request.
Change-Id: Ic281965815e48e4a146a13f9d37f88a10ee0d33e
Signed-off-by: William Wu <william.wu@rock-chips.com>
If there is more data in the request than we could fit into
a single hardware request, then check both of the following
conditions:
- ep->dwc_ep.xfer_len < ep->dwc_ep.total_len;
- deptsiz.b.xfersize == 0;
If ep->dwc_ep.xfer_len < ep->dwc_ep.total_len and deptsiz.b.xfersize
isn't zero, it means that we have received a short packet from
host, then we shouldn't setup transfer for next portion of
data.
This patch can fix the following issue:
Use MTP to transfer more than 4GB single file from PC to RK3368
tablet base on the follow conditions:
- Increase the default Tx/Rx buf size to 64K or more in f_mtp.c
- Set the core_params->max_transfer_size to 65535;
Without this patch, it will fail to transfer the file at the end
because the f_mtp driver is waiting for a short packet to signal
EOF for file sizes > 4 gig, but the dwc2 driver doesn't handle
the short packet.
Change-Id: I172d48d727da4b75153705ce6b60728203dd35ca
Signed-off-by: William Wu <william.wu@rock-chips.com>
when power off, no need to lock/unlock reset_lock. and
if set reg failed, need to unlock reset_lock.
Change-Id: If0a50920504bb69f9fa13790e85af1830fda7946
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
The new partition path is compatible with the following two partition names.
GTP partition: rknand0px
Old partition: rknand_X(rknand_system)
Change-Id: I993d42064bf4e093bfe01512db563f635baeff39
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
For the hardware bug of RK3288 OHCI, we use commit cfe6f1dd57
("usb: ehci: add rockchip relinquishing port quirk support") to fix
it previously. However, it have been ineffective after upstream commit
94c43b9897 ("USB: Check for dropped connection before switching to
full speed") was merged due to the condition of relinquishing port was
changed.
This patch adds an additional condition for the previous commit to ensure
no relinquish port quirk can take effect for RK3288 EHCI.
Change-Id: I0630265e101afb349816955e069e1c121745ac08
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
mem_cgroup_move_task() is now called from ->post_attach
instead of ->attach thanks to LTS commit 52526076a5
("memcg: relocate charge moving from ->attach to ->post_attach").
Hence remove ->attach callback which sneaked back into
lsk-v4.4-android tree in the LSK merge commit 334ca3ed18
("Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android").
Otherwise we run into following build warning reported on KernelCI
https://kernelci.org/build/lsk/branch/linux-linaro-lsk-v4.4-android/kernel/lsk-v4.4-17.11-android-844-g6a7d9fbcf946/
mm/memcontrol.c:5337:12: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
Fixes: LSK commit 334ca3ed18
("Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android")
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Fix AOSP backport of "FROMLIST: arm64: mm: Map entry trampoline
into trampoline and kernel page tables", which is tweaked to
match __create_pgd_mapping() API on android-4.4, but the related
upstream patch is already pushed in LSK commit 3bbd245ee8
("arm64: mm: add param to force create_pgd_mapping() to use page mappings").
Otherwise we run into following build error reported on KernelCI
https://kernelci.org/build/lsk/branch/linux-linaro-lsk-v4.4-android/kernel/lsk-v4.4-17.11-android-844-g6a7d9fbcf946/
arch/arm64/mm/mmu.c:501:2: error: too few arguments to function '__create_pgd_mapping'
Fixes: AOSP Change-Id: I31b2dcdf4db36c3e31181fe43ccb984f9efb6ac6
("FROMLIST: arm64: mm: Map entry trampoline into trampoline and kernel page tables")
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
if the sdmmc detect with iomux sdmmc_detn will false trigger
once the system into deepsleep
Change-Id: I5928b94327175ee2b39bd0740ea2eafa9d28604d
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
This reverts commit 49d083bd72.
The patch is part of PIE, we do not need it anymore.
Change-Id: Iedc231105fa18c3cadd2cfd023c451c40570be96
Signed-off-by: Tao Huang <huangtao@rock-chips.com>