Jiamin Ma [Tue, 12 Sep 2017 01:32:39 +0000 (09:32 +0800)]
cpufreq: change interactive default parameters
PD#138714: change interactive default parameters
Change-Id: I1813cda0f52755486a72efd85f79b0a4cc108514
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
Pengcheng Chen [Fri, 8 Sep 2017 06:56:05 +0000 (14:56 +0800)]
osd: move alloc buffer to osd_mmap for save memory in android
PD#148907: osd: move alloc buffer to osd_mmap for save memory in android
Change-Id: Id8f42a08dbca33468bd8cea016aa88fa71e282c8
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
Shuai Li [Wed, 6 Sep 2017 11:37:57 +0000 (19:37 +0800)]
audio: optimize DDR fifo management
PD#150616: optimize audio DDR FIFO management driver.
Previously, we need to set DDR num and DDR IRQ number
in each audio devices.
This commit add one DDR manager which manipulate all
the ddr num and irq stuffs.
Make other audio driver easy to use it by simple interface.
Change-Id: Ie9688e651a4eff6fd4135811c50aa343e89580fe
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
Peipeng Zhao [Mon, 11 Sep 2017 02:10:42 +0000 (10:10 +0800)]
codec: fixed audio codec tlv320adc3101 input mode error
PD#150798: codec: fixed audio codec tlv320adc3101 input mode
add single end and differential input for S400&S420
Change-Id: I83086663b38e322425f6719247c89877504f22f5
Signed-off-by: Peipeng Zhao <peipeng.zhao@amlogic.com>
Yao.Liu [Thu, 7 Sep 2017 13:23:48 +0000 (21:23 +0800)]
vfm: fixed vfm bug on provider init
PD#149448: vfm: fixed vfm bug on provider init
if provider use_cnt init later,
some one may have on peek/get
use_cnt may become error.
Change-Id: Ic4e416ab4ec6e0590ee095cbd1a8b40990537980
Signed-off-by: Yao.Liu <yao.liu@amlogic.com>
Zhi Zhou [Fri, 21 Jul 2017 06:45:41 +0000 (14:45 +0800)]
media: merge some bugfix from 3.14
PD#146178: codec_mm: fixed scatter inc check bug
PD#148029: fixed codec_mm tvp aligned bug.
PD#148029 codec_mm: fixed 2 bugs [1/1]
fixed scatter memory check bug.
fixed codec_mm tvp alloc aligned bug.
PD#147242: amports: add protect for video keepr.
if not memory may free on keeping.
Change-Id: I7ebe0d3fb3caac3849dea558d91129123f8147ad
Signed-off-by: Zhi Zhou <zhi.zhou@amlogic.com>
Long Yu [Fri, 8 Sep 2017 02:26:34 +0000 (10:26 +0800)]
emmc: refixed RPMB operation process
PD149212: emmc: refixed RPMB operation process
Change-Id: Ifc845dc1009d2c28ee57a51fd45e43f12c28b7f6
Signed-off-by: Long Yu <long.yu@amlogic.com>
Nan Li [Wed, 6 Sep 2017 02:25:10 +0000 (10:25 +0800)]
emmc: pre-alloc cali blk_test memory to fix suspend/resume failed
PD#150194: modify suspend & resume fail.
1. fixed alloc blk_test memory on probe,
pre-allocated memory allows suspend/resume
without dynamic allocation.
2. do not flush cache while resume.
Change-Id: If4a310da82f053359f89599fd187ad51a24f16ba
Signed-off-by: Nan Li <nan.li@amlogic.com>
Yao.Liu [Thu, 7 Sep 2017 09:08:53 +0000 (17:08 +0800)]
dts: enlarge buffer size for omx & framebuffer
PD#150660: dts: enlarge buffer size for omx & framebuffer
Change-Id: Ib57e9ceef98df0c2f1b1f4785e5bcb916a8a35c0
Signed-off-by: Yao.Liu <yao.liu@amlogic.com>
Qi Duan [Thu, 7 Sep 2017 09:10:07 +0000 (17:10 +0800)]
USB: disable usb device interrupt when host mode
PD#150668: USB: disable usb device interrupt when host mode. [1/1]
Change-Id: I4888617a442e0271f238a52d3998301264d4af4a
Signed-off-by: Qi Duan <qi.duan@amlogic.com>
Evoke Zhang [Thu, 24 Aug 2017 08:38:22 +0000 (16:38 +0800)]
tvin: add bt656in and hdmirx_ext support
PD#149610: tvin: add bt656in & hdmirx_ext support
Change-Id: Ic4bde4b8d9c5a945f59023dd6cb961b736c83eb2
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
Tao Zeng [Wed, 6 Sep 2017 08:38:09 +0000 (16:38 +0800)]
mm: update cma policy and debug sysfs
PD#150194: mm: update cma policy and debug sysfs
1. For movable memory, using CMA first, this can help to avoid
low memory issue and driver can't allocate pages issue;
2. change /proc/slabinfo sysfs with total size print of each slab;
3. change /proc/pagetypeinfo with toatal pages of each migrate type;
4. add statistics for free pages of each migrate type, and show in
echo m > /proc/sysrq-trigger.
Change-Id: I2fdab73c2d1278cd025185362a1159e4f683166b
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
Weiguang Ruan [Thu, 31 Aug 2017 08:16:54 +0000 (16:16 +0800)]
wifi: add pci reinit and remove_reinit function [4/7]
PD#148564: add pci reinit and remove_reinit function
pci_reinit: power on/off then rescan pci device.
pci_remove_reinit: remove pci device first,
then power on/off, rescan pci device.
Change-Id: I03f3ceb7b526ce686b835eaacddbbd7f2ed2c384
Signed-off-by: Weiguang Ruan <Weiguang.ruan@amlogic.com>
Peifu Jiang [Tue, 4 Jul 2017 06:38:16 +0000 (14:38 +0800)]
reboot: add rpmbp reboot mode
PD#145456: Support RPMB shared secret provisioning [2/2]
[Problem]
RPMB requires a shared secret between host (AP) and device (eMMC flash)
in order to perform HMAC authentication.
[Solution]
This commit provides a special reboot mode, reboot rpmbp, to securely
provision the shared secret into eMMC flash device.
[Test]
Tested on GXL reference board P212. Passed.
Change-Id: I81dd482215d0f0232fe10efbc60b6af4ba2d9641
Signed-off-by: Peifu Jiang <peifu.jiang@amlogic.com>
Matthew Shyu [Wed, 21 Jun 2017 10:06:28 +0000 (18:06 +0800)]
crypto: crypto update for axg
PD#146628: crypto update for axg
1. KEY_IV now can only read 16 bytes a time
2. DES is completely disabled and TDES with three identical keys are
also disabled. This creates a potential hole in TDES driver, and
thus TDES support is removed from dts in axg
Change-Id: Iface9c52d494b8b5232e4f5915e0f85a959863a4
Signed-off-by: Matthew Shyu <matthew.shyu@amlogic.com>
Xindong Xu [Fri, 1 Sep 2017 06:24:07 +0000 (14:24 +0800)]
md: use dm-anroid-verity [3/4]
PD#150024: md: use dm-android-verity.c for android dm-verity
Change-Id: I44ee22afb38aeb8f7c5958a6974f6bc48c721dbc
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
Xindong Xu [Mon, 28 Aug 2017 07:29:26 +0000 (15:29 +0800)]
dts: change a/b update partition table [3/3]
PD#150024 dts: change a/b update partition table
1. a/b update do not need recovery/cache
2. boot/system/vendor/odm need two slots: _a & _b
Change-Id: If74667eb4f7ebbd96a9ded3618d3d6b4c1fb8ae4
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
Xindong Xu [Wed, 6 Sep 2017 01:38:04 +0000 (09:38 +0800)]
dts: p230: enlarge buffer size for omx & framebuffer [1/1]
PD#148907: enlarge buffer size for omx & framebuffer
Change-Id: I0c9725b1ce35ba1e330ca1b603e09d99a26e0a86
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
Yao.Liu [Tue, 5 Sep 2017 09:05:37 +0000 (17:05 +0800)]
amlvideo: set omx output buffer size to compWidth*compHeight
PD#150218: amlvideo: set omx output buffer size to compWidth*compHeight
Change-Id: I69ff2e5defb8344cd4aec05582f4696faa0abe7f
Signed-off-by: Yao.Liu <yao.liu@amlogic.com>
Yueguie He [Mon, 4 Sep 2017 09:07:33 +0000 (17:07 +0800)]
mtd: nand : add slc ids
PD#150442: mtd: nand: add 128m FS33ND01GS108TFI0 nand
Change-Id: Ibda5d793825cef1a3c522cf42f277f74db3172f7
Signed-off-by: Yueguie He <yuegui.he@amlogic.com>
Nanxin Qin [Wed, 6 Sep 2017 03:10:03 +0000 (11:10 +0800)]
frame_sync: replace the magic number with msecs_to_jiffies.
PD#150542: replace the magic number with msecs_to_jiffies.
Change-Id: I071da655a9ea3edf496fca65dc67167145ccc167
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
Nanxin Qin [Mon, 4 Sep 2017 12:32:41 +0000 (20:32 +0800)]
video_sink: modify modules dir in the sysfs to compatible with kernel 3.14 [1/3]
PD#150498: modify modules dir in the sysfs to compatible with kernel 3.14
Change-Id: If34cb6a153a4e5b97537faad1da04a1afec3fe4b
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
Jiamin Ma [Wed, 6 Sep 2017 02:28:42 +0000 (10:28 +0800)]
scheduler: remove log info for cpu capacity updating
PD#138714: too much log info for cpu capacity updating
Change-Id: I14164903950afc2f29d7446d743ba0b0062edc19
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
Yueguie He [Tue, 5 Sep 2017 12:49:38 +0000 (20:49 +0800)]
nand: change boot partition size
PD#150531: nand: change boot partition size to 15M
Change-Id: I64e376b89908b882b6b70bfd370871bc540020f1
Signed-off-by: Yueguie He <yuegui.he@amlogic.com>
Nan Li [Tue, 5 Sep 2017 02:39:24 +0000 (10:39 +0800)]
sd: add sd_uart support
PD#149976: add sd to uart support
modify emmc init min clk freq to 400k.
Change-Id: I204d68668497a1a6a1f37f5e06d944a2687412ff
Signed-off-by: Nan Li <nan.li@amlogic.com>
Tao Zeng [Mon, 4 Sep 2017 03:07:03 +0000 (11:07 +0800)]
gcc: add options to limit large object and stack usage
PD#150373: gcc: add options to limit large object and stack usage
We should restrict limit large size of global object allocated in
driver code to reduce size of .data/.bss/.rodata sections. Also,
large array/many variables declared in a function is not allowed,
this behavior may cause kernel stack overflow especially in IRQ
context or recursion calls.
Right now we just set a very high limit in order to pass comiple.
Final target is to limit:
1. large global object size should not over 4096 bytes, a page size;
2. stack usage of each function should not over 256 bytes.
If your global object is larger than a page size, we advise allocate
it as a static pointer, and allocate it's memory during probe stage.
Change-Id: Ic14995f642bc1e0b47d3a07143468e6e1dac7bfc
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
sky zhou [Mon, 4 Sep 2017 14:54:14 +0000 (22:54 +0800)]
osd: init osd output pt value to 1, and fix osd buf hnd leak. [1/3]
PD#148907: fix osd output fence error and framebuffer hnd leak.
Change-Id: Ic5a412d41b808766d6d0e05edeb770b2b20bb4a6
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
Weiguang Ruan [Wed, 30 Aug 2017 02:45:15 +0000 (10:45 +0800)]
wifi: add wext and wext_priv [5/8]
PD#150114: add wext and wext_priv
select WIRELESS_EXT WEXT_PRIV in
driver/amlogic/wifi/Kconfig
qualcomm wifi drivers need wext support
Change-Id: I1f85481013ba6c35b304eeb45d0c4917a67c67eb
Signed-off-by: Weiguang Ruan <Weiguang.ruan@amlogic.com>
Jiyu Yang [Fri, 1 Sep 2017 12:59:13 +0000 (20:59 +0800)]
osd: use new fence api. [3/7]
PD#149525: osd use new fence api
Change-Id: I3c7f0acf63012a12cdc9a3b4512db0d3bd4f8927
Signed-off-by: Jiyu Yang <Jiyu.Yang@amlogic.com>
Jiyu Yang [Fri, 1 Sep 2017 12:45:37 +0000 (20:45 +0800)]
sync: new fence api [2/7]
PD#149525: sync: new fence api
Change-Id: I3c957758a67fb6c0a0b3aa5031637b00d3d510e8
Signed-off-by: Jiyu Yang <Jiyu.Yang@amlogic.com>
Jiyu Yang [Tue, 22 Aug 2017 11:41:10 +0000 (19:41 +0800)]
Revert "android: port fence driver from kernel-4.4 "[1/7]
PD#149525: Revert "android: port fence driver from kernel-4.4
This reverts commit
22f718c442a2c91e6c92eb000f795dfe781721e9.
Change-Id: I0ad1ad31fe6624b11bb840bc13d64c9c5af5d651
Signed-off-by: Jiyu Yang <Jiyu.Yang@amlogic.com>
jintao xu [Thu, 31 Aug 2017 08:21:23 +0000 (16:21 +0800)]
ionvideo: omx support osd display
PD#150258: omx support osd display
Change-Id: I566e530e0ec2dc5e7eb73e33b90345552f6ae7fc
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
Qi Duan [Fri, 1 Sep 2017 06:52:16 +0000 (14:52 +0800)]
USB: don't set softdisconnect when suspend
PD#148350: USB: don't set softdisconnect when suspend. [1/1]
Change-Id: I037d951f23c6d5c606af64f8c1b5550246256d79
Signed-off-by: Qi Duan <qi.duan@amlogic.com>
KeLe Bai [Fri, 1 Sep 2017 02:24:39 +0000 (10:24 +0800)]
di: support muti decode
PD#150173: di: merge muti decode from bug143269
Change-Id: I821171c93aa3a6a77a1309429a9c8a37e704b17b
Signed-off-by: KeLe Bai <kele.bai@amlogic.com>
Ao Xu [Fri, 1 Sep 2017 08:44:29 +0000 (16:44 +0800)]
defconfig: add config to solve AndroidO CTS&VTS fail
PD#149771: add config to solve AndroidO CTS&VTS fail
add the following configs:
1. CONFIG_ARMV8_DEPRECATED=y
CONFIG_SWP_EMULATION=y
CONFIG_CP15_BARRIER_EMULATION=y
CONFIG_SETEND_EMULATION=y
2. CONFIG_RANDOMIZE_BASE=y
3. CONFIG_PM_AUTOSLEEP=y
4. CONFIG_INET_DIAG_DESTROY=y
CONFIG_NF_CONNTRACK_SECMARK=y
CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y
CONFIG_NETFILTER_XT_TARGET_SECMARK=y
CONFIG_IP_NF_SECURITY=y
5. CONFIG_PPPOLAC=y
CONFIG_PPPOPNS=y
6. CONFIG_USB_CONFIGFS_F_PTP=y
CONFIG_USB_CONFIGFS_F_ACC=y
CONFIG_USB_CONFIGFS_F_AUDIO_SRC=y
CONFIG_USB_CONFIGFS_F_MIDI=y
7. CONFIG_QUOTA_NETLINK_INTERFACE=y
8. CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y
CONFIG_HARDENED_USERCOPY=y
Change-Id: If0a9667682ed42790ed76addc9383dfdb62ff0c4
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
Yueguie He [Thu, 31 Aug 2017 07:15:10 +0000 (15:15 +0800)]
dts: axg: sync dts config
PD#150185: dts: sync dts config
Change-Id: I3edcba36aefc1c487fcb8e31b4bdb23108b226cb
Signed-off-by: Yueguie He <yuegui.he@amlogic.com>
Zhi Zhou [Thu, 31 Aug 2017 03:03:59 +0000 (11:03 +0800)]
media: codec_mm: fixed scatter cache bug
PD#150197: codec_mm: fixed tvp first wait long time bug
Change-Id: Ide5532c0e331948a70bdc809fe232b06b4a7076d
Signed-off-by: Zhi Zhou <zhi.zhou@amlogic.com>
Xing Wang [Wed, 30 Aug 2017 16:00:35 +0000 (00:00 +0800)]
audio: fix loopback channel map
PD#149869: audio: fix tdmin_lb channel mask and swap for loopback
Change-Id: I1bf2dd42a2869ca2404b72e1f0e57a267f365e23
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
Victor Wan [Thu, 31 Aug 2017 06:01:28 +0000 (14:01 +0800)]
Merge branch 'android-4.9' into amlogic-4.9-dev
Conflicts:
arch/arm/configs/s3c2410_defconfig
drivers/mmc/core/mmc.c
Signed-off-by: Victor Wan <victor.wan@amlogic.com>
Peipeng Zhao [Wed, 30 Aug 2017 09:32:43 +0000 (17:32 +0800)]
codec: fixed codec tlv320adc3101 driver clk error on 48K and 16K
PD#150168: fixed codec tlv320adc3101 record error on 48K and 16K
Change-Id: Ia672427de4c1a0e730eecdb00133d84640720785
Signed-off-by: Peipeng Zhao <peipeng.zhao@amlogic.com>
Kaifu Hu [Wed, 30 Aug 2017 09:19:54 +0000 (17:19 +0800)]
hdmitx: fix 4k smpte no signal
PD#149239: hdmitx: fix 4k smpte no signal
when 4k smpte 444,10bit, div40 and scramble need be setted
Change-Id: Iadfc337519e1444c244b36086c3929d231bd80c4
Signed-off-by: Kaifu Hu <kaifu.hu@amlogic.com>
Evoke Zhang [Fri, 25 Aug 2017 16:12:38 +0000 (00:12 +0800)]
vout: optimize tvout monitor function
PD#149868: vout: optimize tvout monitor function as below:
1.add vout_mutex lock to prevent tvout_monitor and vout_mode_store
running at the same time;
2.vout_mode_store operation will stop tvout_monitor running.
Change-Id: Ic2578357edb17cf471b90bec50ba11eb9178a8e9
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
Yueguie He [Tue, 29 Aug 2017 06:31:37 +0000 (14:31 +0800)]
mtd: add slc ids
PD#150009: mtd: nand: add slc ids
1. spansion 1024MB S34ML08G1
Change-Id: I5844574a21b0e59b10ab133db98b4f32f4547f1f
Signed-off-by: Yueguie He <yuegui.he@amlogic.com>
Ao Xu [Tue, 29 Aug 2017 09:12:26 +0000 (17:12 +0800)]
defconfig: remove CONFIG_SYSVIPC to fix AndroidO CTS fail
PD#149771: remove CONFIG_SYSVIPC to fix AndroidO CTS fail
Change-Id: I16eca775b80480ca5ea1f8b5187b29ca1a5a8ed2
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
Qiufang Dai [Tue, 29 Aug 2017 07:14:01 +0000 (15:14 +0800)]
pcie: move mipi gate control to pcie driver.
PD#147022: pcie: mipi share gate control.
Change-Id: I85d9676e39db548b39c4c9d3ece0ca1572bffe26
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
yi.zeng [Thu, 17 Aug 2017 02:25:35 +0000 (10:25 +0800)]
nand: fix nand key read issue
PD#146835: nand: fix the nand key read issue caused by overload memory
Change-Id: I53ce06da8ddf5f691898a7546b1b96bb9af486cd
Signed-off-by: yi.zeng <yi.zeng@amlogic.com>
Shuai Li [Mon, 28 Aug 2017 03:16:16 +0000 (11:16 +0800)]
audio: add channel constrains for TDM
PD#149888: constrains max channels number by DTS lanes
and tx_mask configs. If not, FIFO will fetch the wrong
data and cause abnormal behavior for I2S data.
Change-Id: Ic10bb773f6360ad0dfee74c227adb279dcc47cec
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
Shuai Li [Fri, 25 Aug 2017 11:05:08 +0000 (19:05 +0800)]
audio: fix codecs kcontrol bugs
PD#145715: kernel 4.9 use components to wrapper the codec instance.
When poring form early versions, we have no idea about
this change. And this commit fixes this issue.
Change-Id: I56357b45c1bf93844f77fe89a828911fa9779406
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
Ao Xu [Thu, 24 Aug 2017 11:31:22 +0000 (19:31 +0800)]
pstore: change pstore address to 0x7400000
PD#149300: pstore: change pstore address to 0x7400000
Change-Id: Ic8f4240a2c5c4c2137ad4c050a9af8692be15dba
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
Nanxin Qin [Wed, 23 Aug 2017 06:42:54 +0000 (14:42 +0800)]
frame_sync: fixed the issure of the player that starts slowly [2/2]
PD#148146: modify checkin_firstvpts to 0xffffffff
Change-Id: I16d75f8cd0f7ed7582f731db42bc247c49580974
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
Ao Xu [Thu, 24 Aug 2017 06:54:27 +0000 (14:54 +0800)]
defconfig: enable configs to fix AndroidO CTS and VTS fail
PD#149771: enable configs to fix AndroidO CTS and VTS fail
CONFIG_IKCONFIG_PROC=y
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_IKCONFIG=y
CONFIG_CPU_FREQ_STAT=y
In order to know how the kernel was configured via /proc,
select the CONFIG_IKCONFIG_PROC is a good choice.
Change-Id: Ief65788029157adfbd3351f6a1d589670e440d76
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
Xindong Xu [Fri, 11 Aug 2017 06:38:48 +0000 (14:38 +0800)]
dts: adjust partition table for Android 8.0 [1/2]
PD#149137: dts: adjust partition table for Android 8.0
1. delete crypt
2. change tee to 32M
3. add param 16M
4. add cri_data 8M
5. add dto 8M
6. change logo to 8M
7. change misc to 8M
8. change boot to 16M
9. change recovery to 24M
10. change system to 1856M
11. change cache to 1120M
Change-Id: Ice80dee7736a127c555cac641bc3a8874aeb519e
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
Yue Wang [Wed, 23 Aug 2017 09:59:56 +0000 (17:59 +0800)]
pcie: enable pcie pm.
PD#147022: pcie: enable pcie pm.
Change-Id: Ide75af5cbe2bb840887e36a174cbfec33691534c
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
Haibing.An [Wed, 23 Aug 2017 02:01:44 +0000 (10:01 +0800)]
dts: axg: fix error when unistall wifi that call trace
PD#148250: S400 and S420
Change-Id: I690f3ab850e01d3ad8a48fc01d74625a89a8db11
Signed-off-by: Haibing.An <haibing.an@amlogic.com>
Yonghui Yu [Mon, 14 Aug 2017 08:24:16 +0000 (16:24 +0800)]
nand: add toshiba 512M(TC58NVG2S0HTA00)
PD#149262: mtd:nand : add toshiba 512M(TC58NVG2S0HTA00)
Change-Id: Ib4e5abca5b1b99542df1e9a6dc3ed347474ecfa2
Signed-off-by: Yonghui Yu <yonghui.yu@amlogic.com>
Weiming Liu [Fri, 18 Aug 2017 07:47:39 +0000 (15:47 +0800)]
lcd_extern: fix i2c address mistake for dts config
PD#149233: lcd: add lcd_extern driver za7783
1.add lcd_extern driver za7783
2.modify the axg pll parameters
3.read under the dts lcd_extern i2c address errors
Change-Id: Ib059805a6a82d7896b2394d451d5aedb3f10ecb9
Signed-off-by: Weiming Liu <weiming.liu@amlogic.com>
binqi.zhang [Fri, 11 Aug 2017 07:18:50 +0000 (15:18 +0800)]
mm: export symbol for show_mem
PD#149671: mm: export symbol for show_mem.
export symbol for show_mem() and other modules can use the function
Change-Id: Ia4b0c595ada1db2326e07d67b136ad92c9d3cb67
Signed-off-by: binqi.zhang <binqi.zhang@amlogic.com>
(cherry picked from commit
53577ac0164bcd9e933ec43c18139f2f1c55ea56)
Nanxin Qin [Tue, 22 Aug 2017 05:45:03 +0000 (13:45 +0800)]
rdma: fixed issure of crash on boot.
PD#149681: removed the operation of registers in the rdma_init
Change-Id: Iecf12be123952d0a5eb91b77e433d3fb67378d4e
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
Peipeng Zhao [Tue, 22 Aug 2017 07:06:29 +0000 (15:06 +0800)]
dts: axg: fix bluetooth pinmux problems
PD#149672:
modified dts tdma data pinmux, tdma output data pin
need be set tdma_out1. otherwise soc can not send data
to Bluetooth.
Change-Id: I62a0ea89de092c6b9c3504223822e8c7fd58ecad
Signed-off-by: Peipeng Zhao <peipeng.zhao@amlogic.com>
Nanxin Qin [Mon, 19 Jun 2017 07:34:01 +0000 (15:34 +0800)]
media: merged code from
43177e6a on the amlogic-3.14-dev
PD#146152: merged code from
43177e6a on the amlogic-3.14-dev
1. support for multi-instance features
2. fixed in multi-instance codec_mm memory bugs and added some
debugging information
3. optimization of vfm problems
Change-Id: I43ba9d4894ae71d53c158df667490030735b9e1e
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
Signed-off-by: KeLe Bai <kele.bai@amlogic.com>
Ao Xu [Fri, 18 Aug 2017 06:51:47 +0000 (14:51 +0800)]
defconfig: add uid_sys_stats and cpu_freq_stat support
PD#149464: defconfig: add uid_sys_stats and cpu_freq_stat support
1. add CONFIG_CPU_FREQ_STAT
2. add CONFIG_UID_SYS_STATS
3. remove CONFIG_FHANDLE
Change-Id: I2b165676619a46e95ed2f75354e6e0a440cac43f
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
Yueguie He [Mon, 21 Aug 2017 04:34:16 +0000 (12:34 +0800)]
dts: axg: support 128m ddr
PD#148955: dts: support 128m ddr
Change-Id: I7694bb10659b748c4e43e665945dcd7e8082a68e
Signed-off-by: Yueguie He <yuegui.he@amlogic.com>
Dezhi Kong [Fri, 18 Aug 2017 02:23:18 +0000 (10:23 +0800)]
vpp: fix interlace out issue
PD#145318: vpp: fix interlace out issue
Change-Id: I623bbaf0b0795029ca689a81cf10c274afaa1fc3
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>
jianxin.pan [Thu, 17 Aug 2017 12:31:47 +0000 (20:31 +0800)]
security: fix security issues about memory and registers
PD#138714: fix security issuses
1.Kernel Memory Corruption in efuse_read_usr()
Kernel Memory Corruption in efuse_read_usr()
2.Audio SoC DebugFS Entry Allows Kernel Memory Corruption
3.Kernel Stack Buffer Overwrite in clk_test debugfs
4.Register DebugFS Entry Allows Kernel Memory Read
Change-Id: I49373967732dde10e589f07aaab313340ba726e7
Signed-off-by: jianxin.pan <jianxin.pan@amlogic.com>
Qiufang Dai [Fri, 18 Aug 2017 02:35:39 +0000 (10:35 +0800)]
dts: axg: enable vrtc for axg
PD#149457: rtc: enable vrtc for axg
Change-Id: Ibb724cdbc767173e84a1238ffd5d33190f09efe0
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
Xing Wang [Wed, 16 Aug 2017 07:40:13 +0000 (15:40 +0800)]
audio: snd mixer controls for tdm/spdif
PD#147540: audio: add snd mixer controls for tdm/spdif
1. add gain/mute/swap/mask for tdm/spdif
2. channel status for spdif in/out
3. add loopback for s420, and fix datain channel number
Change-Id: I81d4432dc2b73c7cb0275087fc3d4e23ec83e400
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
Yueguie He [Thu, 17 Aug 2017 06:10:32 +0000 (14:10 +0800)]
dts: change system partition size
PD#149409: dts: change system partition size
Change-Id: I163b8f09705e3cd81211cfe790e7ef9997ae21dc
Signed-off-by: Yueguie He <yuegui.he@amlogic.com>
Tellen Yu [Wed, 16 Aug 2017 07:46:04 +0000 (15:46 +0800)]
dts: add dhd_static_buf for p230 [1/1]
PD#146107: dts: add dhd_static_buf for gxl p230.
Change-Id: Ic54abfc97bdae8cdce184aa6562bcbc577f05f74
Signed-off-by: Tellen Yu <tellen.yu@amlogic.com>
Ao Xu [Tue, 15 Aug 2017 06:03:53 +0000 (14:03 +0800)]
pstore: add CONFIG_PSTORE_PMSG, add dts node in gxl_p212_2g.dts
PD#149300: pstore: add CONFIG_PSTORE_PMSG, add dts node in gxl_p212_2g.dts
Change-Id: I4407180bcde350fe4204380dacc9c8450ce254e0
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
Yueguie He [Wed, 16 Aug 2017 06:55:42 +0000 (14:55 +0800)]
ddr: fix ddr window drvir error
PD#149154: ddr: fix ddr window error
Change-Id: Icf3f63e96950a28f0ae30ce7fa470c397bef6495
Signed-off-by: Yueguie He <yuegui.he@amlogic.com>
Xindong Xu [Tue, 15 Aug 2017 10:39:20 +0000 (18:39 +0800)]
dts: p230: add cma heap for ion [1/1]
PD#146107: dts: p230: add cma heap for ion on Android 8.0
Change-Id: I37614c6d7417da9bf686295147739ad1d7ed1ef4
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
Tao Zeng [Wed, 16 Aug 2017 02:55:34 +0000 (10:55 +0800)]
cec: fix rcu stall by bad usage of spinlock
PD#149212: cec: fix rcu stall by spinlock
Using irqsave/irqrestore API to prevent rcu stall by spinlock
Change-Id: Ia960864e1f9b21f11c1f9656da2c0efbf221a8ac
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
Yi Zhou [Tue, 15 Aug 2017 05:51:28 +0000 (13:51 +0800)]
hdmitx: using BL31 cmd to access hdmi reg
PD#149289: using BL31 cmd to access hdmi reg
1.hdmitx register may be accessed by kernel, bl30, bl31, etc...
To avoid concurrence issue, all should be only one port to access
hdmitx registers.Uniform kernel access to bl31.
2.optimize hdmitx driver style.
Change-Id: Ie5ae4b8bb8a641ccd39375b9addf9a8b01dcf464
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
Yi Zeng [Mon, 14 Aug 2017 03:25:01 +0000 (11:25 +0800)]
nand: add a new nand flash "TC58NVG2S0HBAI6" for SU customer
PD#149218: nand: add a new nand flash "TC58NVG2S0HBAI6" for SU customer
Change-Id: I06b832365db629bd4c46fa6b6fa6ab4656267602
Signed-off-by: Yi Zeng <“yi.zeng@amlogic.com”>
Shuai Li [Fri, 11 Aug 2017 11:09:44 +0000 (19:09 +0800)]
audio: modify lanemask for tdmout
PD#149114: S420 V03 speaker no sound when playing 2-ch wav
S400 & S420 modify the lineout and speaker out on TDMC dataIO2.
This commit make the speaker output available
by the output lanemask setting:
"dai-tdm-lane-slot-mask-out = <0 0 1 0>;"
It masks the third lane as data output when playing two channel
PCM waves.
Change-Id: Id1627c06f24f3fb57cc645247ca8183f197656db
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
Victor Wan [Mon, 14 Aug 2017 07:24:11 +0000 (15:24 +0800)]
Merge branch 'android-4.9' into amlogic-4.9-dev
Jianxin Pan [Mon, 14 Aug 2017 06:37:53 +0000 (23:37 -0700)]
Merge "audio: modified tlv320adc3101 to support multi config through amixer" into amlogic-4.9-dev
Peipeng Zhao [Fri, 11 Aug 2017 09:43:18 +0000 (17:43 +0800)]
audio: modified tlv320adc3101 to support multi config through amixer
PD#149164: modified codec tlv320adc3101 to support multi config through
amixer
Change-Id: I8c679a2ef6b977efd84d3951fa6d0012a5c8af50
Signed-off-by: Peipeng Zhao <peipeng.zhao@amlogic.com>
Yueguie He [Mon, 14 Aug 2017 02:09:56 +0000 (10:09 +0800)]
dts: add s420 128m dts
PD#148955: dts: support 128m ddr, when enable SecurOs:setenv initrd_high
0x04000000
Change-Id: If59c049a3cd5af9ba9d15f2fca63a5e3df672e1d
Signed-off-by: Yueguie He <yuegui.he@amlogic.com>
Nan Li [Tue, 1 Aug 2017 05:28:57 +0000 (13:28 +0800)]
emmc: clear line_dly on calibration
PD#148637: clear line_delay on every line calibration,
so any line's line_delay will not interfere with each other.
Change-Id: I784f66ab9df111b886ab0e45fa007f3bb2dc111e
Signed-off-by: Nan Li <nan.li@amlogic.com>
Long Yu [Fri, 11 Aug 2017 09:09:13 +0000 (17:09 +0800)]
emmc: optimizing emmc hs400 timing process
PD#148082: emmc: optimizing emmc hs400 timing process
Change-Id: I0318dec3e0c89eef3a396b157ada97b2ef768f7f
Signed-off-by: Long Yu <long.yu@amlogic.com>
Jiamin Ma [Sat, 12 Aug 2017 09:26:05 +0000 (17:26 +0800)]
secure_monitor: use reserve mem from secure os
PD#148390: add nandkey and secure storage
the reserve mem used by secure monitor comes form secure os.
we should not redefine it in DTS
Change-Id: If42f2410474e090ed5b2bca143d5a9d16260f49c
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
Greg Kroah-Hartman [Fri, 11 Aug 2017 20:55:02 +0000 (13:55 -0700)]
Merge 4.9.42 into android-4.9
Changes in 4.9.42
parisc: Handle vma's whose context is not current in flush_cache_range
cgroup: create dfl_root files on subsys registration
cgroup: fix error return value from cgroup_subtree_control()
libata: array underflow in ata_find_dev()
workqueue: restore WQ_UNBOUND/max_active==1 to be ordered
iwlwifi: dvm: prevent an out of bounds access
brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice
NFSv4: Fix EXCHANGE_ID corrupt verifier issue
mmc: sdhci-of-at91: force card detect value for non removable devices
device property: Make dev_fwnode() public
mmc: core: Fix access to HS400-ES devices
mm, mprotect: flush TLB if potentially racing with a parallel reclaim leaving stale TLB entries
cpuset: fix a deadlock due to incomplete patching of cpusets_enabled()
ALSA: hda - Fix speaker output from VAIO VPCL14M1R
drm/amdgpu: Fix undue fallthroughs in golden registers initialization
ASoC: do not close shared backend dailink
KVM: async_pf: make rcu irq exit if not triggered from idle task
mm/page_alloc: Remove kernel address exposure in free_reserved_area()
timers: Fix overflow in get_next_timer_interrupt
powerpc/tm: Fix saving of TM SPRs in core dump
powerpc/64: Fix __check_irq_replay missing decrementer interrupt
iommu/amd: Enable ga_log_intr when enabling guest_mode
gpiolib: skip unwanted events, don't convert them to opposite edge
ext4: fix SEEK_HOLE/SEEK_DATA for blocksize < pagesize
ext4: fix overflow caused by missing cast in ext4_resize_fs()
ARM: dts: armada-38x: Fix irq type for pca955
ARM: dts: tango4: Request RGMII RX and TX clock delays
media: platform: davinci: return -EINVAL for VPFE_CMD_S_CCDC_RAW_PARAMS ioctl
iscsi-target: Fix initial login PDU asynchronous socket close OOPs
mmc: dw_mmc: Use device_property_read instead of of_property_read
mmc: core: Use device_property_read instead of of_property_read
media: lirc: LIRC_GET_REC_RESOLUTION should return microseconds
f2fs: sanity check checkpoint segno and blkoff
Btrfs: fix early ENOSPC due to delalloc
saa7164: fix double fetch PCIe access condition
tcp_bbr: cut pacing rate only if filled pipe
tcp_bbr: introduce bbr_bw_to_pacing_rate() helper
tcp_bbr: introduce bbr_init_pacing_rate_from_rtt() helper
tcp_bbr: remove sk_pacing_rate=0 transient during init
tcp_bbr: init pacing rate on first RTT sample
ipv4: ipv6: initialize treq->txhash in cookie_v[46]_check()
net: Zero terminate ifr_name in dev_ifname().
ipv6: avoid overflow of offset in ip6_find_1stfragopt
net: dsa: b53: Add missing ARL entries for BCM53125
ipv4: initialize fib_trie prior to register_netdev_notifier call.
rtnetlink: allocate more memory for dev_set_mac_address()
mcs7780: Fix initialization when CONFIG_VMAP_STACK is enabled
openvswitch: fix potential out of bound access in parse_ct
packet: fix use-after-free in prb_retire_rx_blk_timer_expired()
ipv6: Don't increase IPSTATS_MIB_FRAGFAILS twice in ip6_fragment()
net: ethernet: nb8800: Handle all 4 RGMII modes identically
dccp: fix a memleak that dccp_ipv6 doesn't put reqsk properly
dccp: fix a memleak that dccp_ipv4 doesn't put reqsk properly
dccp: fix a memleak for dccp_feat_init err process
sctp: don't dereference ptr before leaving _sctp_walk_{params, errors}()
sctp: fix the check for _sctp_walk_params and _sctp_walk_errors
net/mlx5: Consider tx_enabled in all modes on remap
net/mlx5: Fix command bad flow on command entry allocation failure
net/mlx5e: Fix outer_header_zero() check size
net/mlx5e: Fix wrong delay calculation for overflow check scheduling
net/mlx5e: Schedule overflow check work to mlx5e workqueue
net: phy: Correctly process PHY_HALTED in phy_stop_machine()
xen-netback: correctly schedule rate-limited queues
sparc64: Measure receiver forward progress to avoid send mondo timeout
sparc64: Fix exception handling in UltraSPARC-III memcpy.
wext: handle NULL extra data in iwe_stream_add_point better
sh_eth: fix EESIPR values for SH77{34|63}
sh_eth: R8A7740 supports packet shecksumming
net: phy: dp83867: fix irq generation
tg3: Fix race condition in tg3_get_stats64().
x86/boot: Add missing declaration of string functions
spi: spi-axi: Free resources on error path
ASoC: rt5645: set sel_i2s_pre_div1 to 2
netfilter: use fwmark_reflect in nf_send_reset
phy state machine: failsafe leave invalid RUNNING state
ipv4: make tcp_notsent_lowat sysctl knob behave as true unsigned int
clk/samsung: exynos542x: mark some clocks as critical
scsi: qla2xxx: Get mutex lock before checking optrom_state
drm/virtio: fix framebuffer sparse warning
ARM: dts: sun8i: Support DTB build for NanoPi M1
ARM: dts: sunxi: Change node name for pwrseq pin on Olinuxino-lime2-emmc
iw_cxgb4: do not send RX_DATA_ACK CPLs after close/abort
nbd: blk_mq_init_queue returns an error code on failure, not NULL
virtio_blk: fix panic in initialization error path
ARM: 8632/1: ftrace: fix syscall name matching
mm, slab: make sure that KMALLOC_MAX_SIZE will fit into MAX_ORDER
lib/Kconfig.debug: fix frv build failure
signal: protect SIGNAL_UNKILLABLE from unintentional clearing.
mm: don't dereference struct page fields of invalid pages
net/mlx5: E-Switch, Re-enable RoCE on mode change only after FDB destroy
ipv4: Should use consistent conditional judgement for ip fragment in __ip_append_data and ip_finish_output
net: account for current skb length when deciding about UFO
net: phy: Fix PHY unbind crash
workqueue: implicit ordered attribute should be overridable
Linux 4.9.42
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Greg Kroah-Hartman [Fri, 11 Aug 2017 15:49:50 +0000 (08:49 -0700)]
Linux 4.9.42
Tejun Heo [Sun, 23 Jul 2017 12:36:15 +0000 (08:36 -0400)]
workqueue: implicit ordered attribute should be overridable
commit
0a94efb5acbb6980d7c9ab604372d93cd507e4d8 upstream.
5c0338c68706 ("workqueue: restore WQ_UNBOUND/max_active==1 to be
ordered") automatically enabled ordered attribute for unbound
workqueues w/ max_active == 1. Because ordered workqueues reject
max_active and some attribute changes, this implicit ordered mode
broke cases where the user creates an unbound workqueue w/ max_active
== 1 and later explicitly changes the related attributes.
This patch distinguishes explicit and implicit ordered setting and
overrides from attribute changes if implict.
Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes:
5c0338c68706 ("workqueue: restore WQ_UNBOUND/max_active==1 to be ordered")
Cc: Holger Hoffstätte <holger@applied-asynchrony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Florian Fainelli [Sat, 18 Feb 2017 00:07:33 +0000 (16:07 -0800)]
net: phy: Fix PHY unbind crash
commit
7b9a88a390dacb37b051a7b09b9a08f546edf5eb upstream.
The PHY library does not deal very well with bind and unbind events. The first
thing we would see is that we were not properly canceling the PHY state machine
workqueue, so we would be crashing while dereferencing phydev->drv since there
is no driver attached anymore.
Suggested-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michal Kubeček [Mon, 19 Jun 2017 11:03:43 +0000 (13:03 +0200)]
net: account for current skb length when deciding about UFO
[ Upstream commit
a5cb659bbc1c8644efa0c3138a757a1e432a4880 ]
Our customer encountered stuck NFS writes for blocks starting at specific
offsets w.r.t. page boundary caused by networking stack sending packets via
UFO enabled device with wrong checksum. The problem can be reproduced by
composing a long UDP datagram from multiple parts using MSG_MORE flag:
sendto(sd, buff, 1000, MSG_MORE, ...);
sendto(sd, buff, 1000, MSG_MORE, ...);
sendto(sd, buff, 3000, 0, ...);
Assume this packet is to be routed via a device with MTU 1500 and
NETIF_F_UFO enabled. When second sendto() gets into __ip_append_data(),
this condition is tested (among others) to decide whether to call
ip_ufo_append_data():
((length + fragheaderlen) > mtu) || (skb && skb_is_gso(skb))
At the moment, we already have skb with 1028 bytes of data which is not
marked for GSO so that the test is false (fragheaderlen is usually 20).
Thus we append second 1000 bytes to this skb without invoking UFO. Third
sendto(), however, has sufficient length to trigger the UFO path so that we
end up with non-UFO skb followed by a UFO one. Later on, udp_send_skb()
uses udp_csum() to calculate the checksum but that assumes all fragments
have correct checksum in skb->csum which is not true for UFO fragments.
When checking against MTU, we need to add skb->len to length of new segment
if we already have a partially filled skb and fragheaderlen only if there
isn't one.
In the IPv6 case, skb can only be null if this is the first segment so that
we have to use headersize (length of the first IPv6 header) rather than
fragheaderlen (length of IPv6 header of further fragments) for skb == NULL.
Fixes:
e89e9cf539a2 ("[IPv4/IPv6]: UFO Scatter-gather approach")
Fixes:
e4c5e13aa45c ("ipv6: Should use consistent conditional judgement for
ip6 fragment between __ip6_append_data and ip6_finish_output")
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Acked-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
zheng li [Mon, 12 Dec 2016 01:56:05 +0000 (09:56 +0800)]
ipv4: Should use consistent conditional judgement for ip fragment in __ip_append_data and ip_finish_output
[ Upstream commit
0a28cfd51e17f4f0a056bcf66bfbe492c3b99f38 ]
There is an inconsistent conditional judgement in __ip_append_data and
ip_finish_output functions, the variable length in __ip_append_data just
include the length of application's payload and udp header, don't include
the length of ip header, but in ip_finish_output use
(skb->len > ip_skb_dst_mtu(skb)) as judgement, and skb->len include the
length of ip header.
That causes some particular application's udp payload whose length is
between (MTU - IP Header) and MTU were fragmented by ip_fragment even
though the rst->dev support UFO feature.
Add the length of ip header to length in __ip_append_data to keep
consistent conditional judgement as ip_finish_output for ip fragment.
Signed-off-by: Zheng Li <james.z.li@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Or Gerlitz [Sun, 15 Jan 2017 17:05:38 +0000 (19:05 +0200)]
net/mlx5: E-Switch, Re-enable RoCE on mode change only after FDB destroy
[ Upstream commit
5bae8c031053c69b4aa74b7f1ba15d4ec8426208 ]
We must re-enable RoCE on the e-switch management port (PF) only after destroying
the FDB in its switchdev/offloaded mode. Otherwise, when encapsulation is supported,
this re-enablement will fail.
Also, it's more natural and symmetric to disable RoCE on the PF before we create
the FDB under switchdev mode, so do that as well and revert if getting into error
during the mode change later.
Fixes:
9da34cd34e85 ('net/mlx5: Disable RoCE on the e-switch management [..]')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ard Biesheuvel [Wed, 11 Jan 2017 00:58:00 +0000 (16:58 -0800)]
mm: don't dereference struct page fields of invalid pages
[ Upstream commit
f073bdc51771f5a5c7a8d1191bfc3ae371d44de7 ]
The VM_BUG_ON() check in move_freepages() checks whether the node id of
a page matches the node id of its zone. However, it does this before
having checked whether the struct page pointer refers to a valid struct
page to begin with. This is guaranteed in most cases, but may not be
the case if CONFIG_HOLES_IN_ZONE=y.
So reorder the VM_BUG_ON() with the pfn_valid_within() check.
Link: http://lkml.kernel.org/r/1481706707-6211-2-git-send-email-ard.biesheuvel@linaro.org
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Hanjun Guo <hanjun.guo@linaro.org>
Cc: Yisheng Xie <xieyisheng1@huawei.com>
Cc: Robert Richter <rrichter@cavium.com>
Cc: James Morse <james.morse@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jamie Iles [Wed, 11 Jan 2017 00:57:54 +0000 (16:57 -0800)]
signal: protect SIGNAL_UNKILLABLE from unintentional clearing.
[ Upstream commit
2d39b3cd34e6d323720d4c61bd714f5ae202c022 ]
Since commit
00cd5c37afd5 ("ptrace: permit ptracing of /sbin/init") we
can now trace init processes. init is initially protected with
SIGNAL_UNKILLABLE which will prevent fatal signals such as SIGSTOP, but
there are a number of paths during tracing where SIGNAL_UNKILLABLE can
be implicitly cleared.
This can result in init becoming stoppable/killable after tracing. For
example, running:
while true; do kill -STOP 1; done &
strace -p 1
and then stopping strace and the kill loop will result in init being
left in state TASK_STOPPED. Sending SIGCONT to init will resume it, but
init will now respond to future SIGSTOP signals rather than ignoring
them.
Make sure that when setting SIGNAL_STOP_CONTINUED/SIGNAL_STOP_STOPPED
that we don't clear SIGNAL_UNKILLABLE.
Link: http://lkml.kernel.org/r/20170104122017.25047-1-jamie.iles@oracle.com
Signed-off-by: Jamie Iles <jamie.iles@oracle.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Wed, 11 Jan 2017 00:57:45 +0000 (16:57 -0800)]
lib/Kconfig.debug: fix frv build failure
[ Upstream commit
da0510c47519fe0999cffe316e1d370e29f952be ]
The build of frv allmodconfig was failing with the errors like:
/tmp/cc0JSPc3.s: Assembler messages:
/tmp/cc0JSPc3.s:1839: Error: symbol `.LSLT0' is already defined
/tmp/cc0JSPc3.s:1842: Error: symbol `.LASLTP0' is already defined
/tmp/cc0JSPc3.s:1969: Error: symbol `.LELTP0' is already defined
/tmp/cc0JSPc3.s:1970: Error: symbol `.LELT0' is already defined
Commit
866ced950bcd ("kbuild: Support split debug info v4") introduced
splitting the debug info and keeping that in a separate file. Somehow,
the frv-linux gcc did not like that and I am guessing that instead of
splitting it started copying. The first report about this is at:
https://lists.01.org/pipermail/kbuild-all/2015-July/010527.html.
I will try and see if this can work with frv and if still fails I will
open a bug report with gcc. But meanwhile this is the easiest option to
solve build failure of frv.
Fixes:
866ced950bcd ("kbuild: Support split debug info v4")
Link: http://lkml.kernel.org/r/1482062348-5352-1-git-send-email-sudipm.mukherjee@gmail.com
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michal Hocko [Wed, 11 Jan 2017 00:57:27 +0000 (16:57 -0800)]
mm, slab: make sure that KMALLOC_MAX_SIZE will fit into MAX_ORDER
[ Upstream commit
bb1107f7c6052c863692a41f78c000db792334bf ]
Andrey Konovalov has reported the following warning triggered by the
syzkaller fuzzer.
WARNING: CPU: 1 PID: 9935 at mm/page_alloc.c:3511 __alloc_pages_nodemask+0x159c/0x1e20
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 9935 Comm: syz-executor0 Not tainted 4.9.0-rc7+ #34
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
Call Trace:
__alloc_pages_slowpath mm/page_alloc.c:3511
__alloc_pages_nodemask+0x159c/0x1e20 mm/page_alloc.c:3781
alloc_pages_current+0x1c7/0x6b0 mm/mempolicy.c:2072
alloc_pages include/linux/gfp.h:469
kmalloc_order+0x1f/0x70 mm/slab_common.c:1015
kmalloc_order_trace+0x1f/0x160 mm/slab_common.c:1026
kmalloc_large include/linux/slab.h:422
__kmalloc+0x210/0x2d0 mm/slub.c:3723
kmalloc include/linux/slab.h:495
ep_write_iter+0x167/0xb50 drivers/usb/gadget/legacy/inode.c:664
new_sync_write fs/read_write.c:499
__vfs_write+0x483/0x760 fs/read_write.c:512
vfs_write+0x170/0x4e0 fs/read_write.c:560
SYSC_write fs/read_write.c:607
SyS_write+0xfb/0x230 fs/read_write.c:599
entry_SYSCALL_64_fastpath+0x1f/0xc2
The issue is caused by a lack of size check for the request size in
ep_write_iter which should be fixed. It, however, points to another
problem, that SLUB defines KMALLOC_MAX_SIZE too large because the its
KMALLOC_SHIFT_MAX is (MAX_ORDER + PAGE_SHIFT) which means that the
resulting page allocator request might be MAX_ORDER which is too large
(see __alloc_pages_slowpath).
The same applies to the SLOB allocator which allows even larger sizes.
Make sure that they are capped properly and never request more than
MAX_ORDER order.
Link: http://lkml.kernel.org/r/20161220130659.16461-2-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rabin Vincent [Wed, 23 Nov 2016 12:02:32 +0000 (13:02 +0100)]
ARM: 8632/1: ftrace: fix syscall name matching
[ Upstream commit
270c8cf1cacc69cb8d99dea812f06067a45e4609 ]
ARM has a few system calls (most notably mmap) for which the names of
the functions which are referenced in the syscall table do not match the
names of the syscall tracepoints. As a consequence of this, these
tracepoints are not made available. Implement
arch_syscall_match_sym_name to fix this and allow tracing even these
system calls.
Signed-off-by: Rabin Vincent <rabinv@axis.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Omar Sandoval [Mon, 9 Jan 2017 19:44:12 +0000 (11:44 -0800)]
virtio_blk: fix panic in initialization error path
[ Upstream commit
6bf6b0aa3da84a3d9126919a94c49c0fb7ee2fb3 ]
If blk_mq_init_queue() returns an error, it gets assigned to
vblk->disk->queue. Then, when we call put_disk(), we end up calling
blk_put_queue() with the ERR_PTR, causing a bad dereference. Fix it by
only assigning to vblk->disk->queue on success.
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jeff Moyer [Mon, 9 Jan 2017 20:20:31 +0000 (15:20 -0500)]
nbd: blk_mq_init_queue returns an error code on failure, not NULL
[ Upstream commit
25b4acfc7de0fc4da3bfea3a316f7282c6fbde81 ]
Additionally, don't assign directly to disk->queue, otherwise
blk_put_queue (called via put_disk) will choke (panic) on the errno
stored there.
Bug found by code inspection after Omar found a similar issue in
virtio_blk. Compile-tested only.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Steve Wise [Thu, 22 Dec 2016 15:40:37 +0000 (07:40 -0800)]
iw_cxgb4: do not send RX_DATA_ACK CPLs after close/abort
[ Upstream commit
3bcf96e0183f5c863657cb6ae9adad307a0f6071 ]
Function rx_data(), which handles ingress CPL_RX_DATA messages, was
always sending an RX_DATA_ACK with the goal of updating the credits.
However, if the RDMA connection is moved out of FPDU mode abruptly,
then it is possible for iw_cxgb4 to process queued RX_DATA CPLs after HW
has aborted the connection. These CPLs should not trigger RX_DATA_ACKS.
If they do, HW can see a READ after DELETE of the DB_LE hash entry for
the tid and post a LE_DB HashTblMemCrcError.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Emmanuel Vadot [Wed, 14 Dec 2016 14:57:24 +0000 (15:57 +0100)]
ARM: dts: sunxi: Change node name for pwrseq pin on Olinuxino-lime2-emmc
[ Upstream commit
3116d37651d77125bf50f81f859b1278e02ccce6 ]
The node name for the power seq pin is mmc2@0 like the mmc2_pins_a one.
This makes the original node (mmc2_pins_a) scrapped out of the dtb and
result in a unusable eMMC if U-Boot didn't configured the pins to the
correct functions.
Signed-off-by: Emmanuel Vadot <manu@bidouilliste.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Milo Kim [Mon, 12 Dec 2016 23:18:15 +0000 (08:18 +0900)]
ARM: dts: sun8i: Support DTB build for NanoPi M1
[ Upstream commit
661ccdc1a95f18ab6c1373322fde09afd5b90a1f ]
The commit
10efbf5f1633 ("ARM: dts: sun8i: Add dts file for NanoPi M1 SBC")
introduced NanoPi M1 board but it's missing in Allwinner H3 DTB build.
Signed-off-by: Milo Kim <woogyom.kim@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gerd Hoffmann [Mon, 28 Nov 2016 07:52:20 +0000 (08:52 +0100)]
drm/virtio: fix framebuffer sparse warning
[ Upstream commit
71d3f6ef7f5af38dea2975ec5715c88bae92e92d ]
virtio uses normal ram as backing storage for the framebuffer, so we
should assign the address to new screen_buffer (added by commit
17a7b0b4d9749f80d365d7baff5dec2f54b0e992) instead of screen_base.
Reported-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>