Commit Graph

643325 Commits

Author SHA1 Message Date
liwei213 c021aabeff drivers/scsi:ufs:add hikey970 ufs driver
Modify ufs driver to support both hikey960 and hikey970.

Signed-off-by: liwei213 <liwei213@huawei.com>
2018-02-13 15:09:43 +08:00
mwx533604 b20a70bf85 Drivers/CAN: support can bus function for hikey970.
Add CAN code in kernel to support can bus for hikey970.

Signed-off-by: mwx533604 <mwx533604@notesmail.huawei.com>
2018-02-12 22:07:35 +08:00
c00354815 698e0b3159 Drivers/PCIe: support pcie function for hikey970
Add PCIe code in kernel to support PCIe for hikey970

Signed-off-by: Yao Chen <chenyao11@huawei.com>
2018-02-12 21:54:31 +08:00
Roger Quadros e04a0e9faa usb: udc: allow adding and removing the same gadget device
allow usb_del_gadget_udc() and usb add_gadget_udc() to be called
repeatedly on the same gadget->dev structure.

We need to clear the gadget->dev structure so that kobject_init()
doesn't complain about already initialized object.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2018-02-12 21:54:07 +08:00
Yu Chen 980f4daeea dts: hisilicon: hikey970: enable i2c1 in kirin970.dtsi
Signed-off-by: chenyu <chenyu56@huawei.com>
2018-02-12 21:54:06 +08:00
Yu Chen 31f1e4fabf hikey970_defconfig: turn on some configs to support usb of hikey970
Signed-off-by: chenyu <chenyu56@huawei.com>
2018-02-12 21:54:06 +08:00
Yu Chen 63d9726572 usb: pd: optimize hisi pd code
Signed-off-by: chenyu <chenyu56@huawei.com>
2018-02-12 21:47:40 +08:00
Yu Chen cc157f58ba misc: hisi_hikey_usb: add support for hikey970
Signed-off-by: chenyu <chenyu56@huawei.com>
2018-02-12 21:47:40 +08:00
Yu Chen 4d2515a2ba usb: dwc3: dwc3 controller of kirin970 need more delay for ep command
Signed-off-by: chenyu <chenyu56@huawei.com>
2018-02-12 21:47:39 +08:00
Yu Chen 077a5b3771 usb: dwc3: dwc3-hisi add support for PM_SLEEP on hikey970
Signed-off-by: chenyu <chenyu56@huawei.com>
2018-02-12 21:47:39 +08:00
Yu Chen 0c19ed5549 phy: phy-kirin970-usb3: fix some error of usb phy init for hikey970
Signed-off-by: chenyu <chenyu56@huawei.com>
2018-02-12 21:47:38 +08:00
Kevin Wangtao 5c26bd0d3d dts: arm64: add thermal zone for kirin970
This patch adds thermal zone to bind thermal sensor with CPU cooling
device

Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:41 +08:00
Kevin Wangtao 22400906fd dts: arm64: add gpu support for kirin970
This patch enable gpu on kirin970

Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:41 +08:00
Kevin Wangtao 4248d89046 PM / devfreq: hisi: add ddr devfreq support for kirin970
This patch adds the support for ddr devfreq on the kirin970 SoC,
make it possible to control the ddr frequency through devfreq
interface or PMQOS.

Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:40 +08:00
Kevin Wangtao 9e266823ff thermal/drivers/hisi: Add support for kirin970
This patch adds the support for thermal sensor on the kirin970 SoC.

Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:40 +08:00
Kevin Wangtao 0f9cb51ad7 cpufreq: hisi-acpu: add support for kirin970
Enable cpufreq-dt driver for krin970.

Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:40 +08:00
Kevin Wangtao aa571f7872 BACKPORT: thermal/drivers/hisi: Add support for hi3660 SoC
This patch adds the support for thermal sensor on the Hi3660 SoC.
Hi3660 tsensor support alarm in alarm threshold, it also has a configurable
hysteresis interval, interrupt will be triggered when temperature rise above
the alarm threshold or fall below the hysteresis threshold.

Change-Id: Ia745bd0777e40bd46eb206031aae52bad714a801
Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org>
Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit 2bb60a8ea721900c13b580689d647a6423e88104)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:39 +08:00
Kevin Wangtao 2fbea1d6ed BACKPORT: thermal/drivers/hisi: Prepare to add support for other hisi platforms
For platform compatibility, add the tsensor ops to a thermal data
structure. Each platform has its own probe function to register proper
tsensor ops function to the pointer, platform related resource request
are also implemented in the platform probe function.

Change-Id: I5c9f006884aa3ebe5df7a07cde41980a62168e84
Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org>
Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit a160a465297362c515db28848b79eb876ceab9c0)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:39 +08:00
Kevin Wangtao 76d2eef2e4 BACKPORT: thermal/drivers/hisi: Add platform prefix to function name
As the next patches will provide support for the hikey3660's sensor,
several functions with the same purpose but for different platforms will
be introduced.

In order to make a clear distinction between them, let's prefix the
function names with the platform name.

This patch has no functional changes, only name changes.

Change-Id: I3364f730a80944441dc34094493146ee1990548b
Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org>
Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit 5ed82b79e526f755bf0630a7c47a31ca2f4a7ad5)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:39 +08:00
Kevin Wangtao 7c2a04f072 BACKPORT: thermal/drivers/hisi: Put platform code together
Reorganize the code for next patches by moving the functions upper in
the file which will prevent a forward declaration. There is no functional
change here.

Change-Id: I3eb1665e91bf768a2536653a29699db1460b4643
Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org>
Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit a0678da82ca01771db57f53bfb7f0a5a7494900e)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:38 +08:00
Kevin Wangtao cde9c481e6 BACKPORT: thermal/drivers/hisi: Use round up step value
Use round up division to ensure the programmed value of threshold and the lag
are not less than what we set, and in order to keep the accuracy while using
round up division, the step value should be a rounded up value.  There is
no need to use hisi_thermal_round_temp.

Change-Id: I1b064d0a000fde3e64f42ac152b54ffdacb45d5e
Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org>
Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit e42bbe1160c3b5fcab8d5afcc49d8647adff6c9c)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:38 +08:00
Kevin Wangtao 20c97c1865 BACKPORT: thermal/drivers/hisi: Move the clk setup in the corresponding functions
The sensor's clock is enabled and disabled outside of the probe and
disable function. Moving the corresponding action in the
hisi_thermal_setup() and hisi_thermal_disable_sensor(), factors out
some lines of code and makes the code more symmetric.

Change-Id: If40b040a6b54187065b1d99c40b203f96fd5840e
Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org>
Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit 943c0f6abfb6010065b80943356975885a33233c)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:37 +08:00
Daniel Lezcano a08e18f4cd BACKPORT: thermal/drivers/hisi: Remove mutex_lock in the code
The mutex is used to protect against writes in the configuration register.

That happens at probe time, with no possible race yet.

Then when the module is unloaded and at suspend/resume.

When the module is unloaded, it is an userspace operation, thus via a process.
Suspending the system goes through the freezer to suspend all the tasks
synchronously before continuing. So it is not possible to hit the suspend ops
in this driver while we are unloading it.

The resume is the same situation than the probe.

In other words, even if there are several places where we write the
configuration register, there is no situation where we can write it at the same
time, so far as I can judge

Change-Id: Ie71c809f485240dbf463b142fe0f3ab1d2fae2ae
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Tested-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit cc1ab38d2b2ad3290426c2234cf83e7a323554c7)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:37 +08:00
Daniel Lezcano d5c2e73ce6 BACKPORT: thermal/drivers/hisi: Remove thermal data back pointer
The presence of the thermal data pointer in the sensor structure has the unique
purpose of accessing the thermal data in the interrupt handler.

The sensor pointer is passed when registering the interrupt handler, replace the
cookie by the thermal data pointer, so the back pointer is no longer needed.

Change-Id: I7b107fcbef723cc74b24aa45420ce12454d5800a
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit 81d7cb7946f03d339244e1a822b7da246d8c79ff)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:37 +08:00
Daniel Lezcano 0b7229d810 BACKPORT: thermal/drivers/hisi: Convert long to int
There is no point to specify the temperature as long variable, the int is
enough.

Replace all long variables to int, so making the code consistent.

Change-Id: Iabed1d48fa61963bb2ef7ec13b018970fe96cff6
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit bc02ef6d98a601a39f735cbbb67807fb752b5138)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:36 +08:00
Daniel Lezcano fc5ab567af BACKPORT: thermal/drivers/hisi: Rename and remove unused field
Rename the 'sensors' field to 'sensor' as we describe only one sensor.
Remove the 'sensor_temp' as it is no longer used.

Change-Id: I1cbef35e4c0958b4882ae189e9c67d42f2cb627d
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Tested-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit 609f26dcbb340d7d6b30b1951c8b525611a97c20)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:35 +08:00
Daniel Lezcano 726b312ede BACKPORT: thermal/drivers/hisi: Remove costly sensor inspection
The sensor is all setup, bind, resetted, acked, etc... every single second.

That was the way to workaround a problem with the interrupt bouncing again and
again.

With the following changes, we fix all in one:

 - Do the setup, one time, at probe time

 - Add the IRQF_ONESHOT, ack the interrupt in the threaded handler

 - Remove the interrupt handler

 - Set the correct value for the LAG register

 - Remove all the irq_enabled stuff in the code as the interruption
   handling is fixed

 - Remove the 3ms delay

 - Reorder the initialization routine to be in the right order

It ends up to a nicer code and more efficient, the 3-5ms delay is removed from
the get_temp() path.

Change-Id: I73a357caed3a34cd1f4de594c724577b4146683c
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Tested-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit 10d7e9a9181f4637640f388d334c6740c1b5d0e8)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:35 +08:00
Daniel Lezcano 6976e5f1eb BACKPORT: thermal/drivers/hisi: Fix configuration register setting
The TEMP0_CFG configuration register contains different field to set up the
temperature controller. However in the code, nothing prevents a setup to
overwrite the previous one: eg. writing the hdak value overwrites the sensor
selection, the sensor selection overwrites the hdak value.

In order to prevent such thing, use a regmap-like mechanism by reading the
value before, set the corresponding bits and write the result.

Change-Id: Iecb3eb216337430842c1eb7eb5ff4cc35e8fcc43
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit b424315a287c70eeb5f920f84c92492bd2f5658e)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:34 +08:00
Daniel Lezcano 8cc767777c BACKPORT: thermal/drivers/hisi: Encapsulate register writes into helpers
Hopefully, the function name can help to clarify the semantic of the operations
when writing in the register.

Change-Id: I2f5c5f20c1f52763b94e4998f1c45d118b35c53e
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit 1e11b014271ceccb5ea04ae58f4829ac8209a86d)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:34 +08:00
Daniel Lezcano f0610d7d49 BACKPORT: thermal/drivers/hisi: Remove pointless lock
The threaded interrupt inspect the sensors structure to look in the temp
threshold field, but this field is read-only in all the code, except in the
probe function before the threaded interrupt is set. In other words there
is not race window in the threaded interrupt when reading the field value.

Change-Id: I457c3b546a43bcf72a3f3d8b5cb1a27172f6a834
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit 2d4fa7b4c6f8080ced2e8237c9f46fb1fc110d64)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:34 +08:00
Daniel Lezcano f7f8a4374c BACKPORT: thermal/drivers/hisi: Remove the multiple sensors support
By essence, the tsensor does not really support multiple sensor at the same
time. It allows to set a sensor and use it to get the temperature, another
sensor could be switched but with a delay of 3-5ms. It is difficult to read
simultaneously several sensors without a big delay.

Today, just one sensor is used, it is not necessary to deal with multiple
sensors in the code. Remove them and if it is needed in the future add them
on top of a code which will be clean up in the meantime.

Change-Id: Ia1eaa1c3291f28871f1e22b9467d4d48f55eb4fe
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Acked-by: Wangtao (Kevin, Kirin) <kevin.wangtao@hisilicon.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit ff4ec2997df8fe7cc40513dbe5f86d9f88fb6be7)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:33 +08:00
Julia Lawall a888ebd9e7 BACKPORT: thermal: hisilicon: constify thermal_zone_of_device_ops structures
The thermal_zone_of_device_ops structure is only passed as the fourth
argument to devm_thermal_zone_of_sensor_register, which is declared
as const.  Thus the thermal_zone_of_device_ops structure itself can
be const.

Done with the help of Coccinelle.

Change-Id: Ib8f3bddb34ce231375c18ed907f0dc77548b6737
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
(cherry picked from commit 3fe156f1dd9909fc63d200b4d432884161ad8385)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:33 +08:00
Kevin Wangtao fd192967ad clk: hisilicon: add stub clock driver for kirin970
Add stub clock driver for kirin970, this patch registers clock node for
big and LITTLE clusters and GPU and DDR clock.

Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:01 +08:00
Guodong Xu d4069f2091 Merge branch 'hikey970-v4.9' of https://github.com/fengbaopeng/linux into fengbaopeng-hikey970-v4.9
* 'hikey970-v4.9' of https://github.com/fengbaopeng/linux:
  arm64: dts: kirin970: add ION dts entries and enable ION and IOMMU feature.
  mmc: dw_mmc-k3: add sd support for Hikey970
2018-02-12 16:03:01 +08:00
mwx533604 2ce39228ed Drivers/CLK: support clkspmi function for hikey970.
Fix CLKspmi code in kernel to support clkspmi for hikey970.

Signed-off-by: mwx533604 <mwx533604@notesmail.huawei.com>
2018-02-12 15:29:32 +08:00
wanghaoxiang1 fb9f6bece7 eth: hisilicon: add r8168 Ethernet driver for Hikey970 2018-02-12 14:25:48 +08:00
Yu Chen 9d168f580c usb: dwc3: add support for USB functionality of Hikey970 platform 2018-02-12 11:09:41 +08:00
Yu Chen 53f73d7e3b usb: dwc3: add support for USB functionality of Hikey960 2018-02-12 11:09:33 +08:00
Yu Chen f12bcf7a71 USB:dwc3:revert dwc3 code of Hikey960 2018-02-12 11:09:07 +08:00
liwei213 87e2e2ac79 arm64: dts: kirin970: add ION dts entries and enable ION and IOMMU feature.
ION dts bits needed and enable ION and IOMMU feature.

Signed-off-by: liwei213 <liwei213@huawei.com>
2018-02-11 14:55:56 +08:00
liwei213 8fb66a6981 mmc: dw_mmc-k3: add sd support for Hikey970
Add sd card support for hikey970 soc.

Signed-off-by: liwei213 <liwei213@huawei.com>
2018-02-09 16:26:37 +08:00
qwx495460 625c810c31 Drivers/SYS: support linux little system start for hikey970. add code linux little system start for hikey970.
Signed-off-by: qwx495460 <qwx495460@notesmail.huawei.com>
2018-02-09 11:57:24 +08:00
mwx533604 db59a43981 Drivers/DMA: support DMA function for hikey970.
Add DMA code in kernel to support hisi dma for hikey970.

Signed-off-by: mwx533604 <mwx533604@notesmail.huawei.com>
2018-02-09 11:57:07 +08:00
mwx533604 08464419fb Drivers/PMIC: support pmic regulator function for hikey970.
Add PMIC code in kernel to support pmic regulator for hikey970.

Signed-off-by: mwx533604 <mwx533604@notesmail.huawei.com>
2018-02-09 11:27:51 +08:00
mwx533604 72395c6263 Drivers/Clk: support clk function for hikey970.
Add Clk code in kernel to support all clk for hikey970.

Signed-off-by: mwx533604 <mwx533604@notesmail.huawei.com>
2018-02-09 11:27:32 +08:00
Dmitry Shmidt 36ff9a3c7f Merge remote-tracking branch 'common/android-4.9' into hikey-4.9
Change-Id: I22a121fd9da5923cbeee8954904f19fa715cb79b
2018-01-23 12:40:41 -08:00
Greg Kroah-Hartman e9dabe69de Merge 4.9.78 into android-4.9
Changes in 4.9.78
	libnvdimm, btt: Fix an incompatibility in the log layout
	scsi: sg: disable SET_FORCE_LOW_DMA
	futex: Prevent overflow by strengthen input validation
	ALSA: seq: Make ioctls race-free
	ALSA: pcm: Remove yet superfluous WARN_ON()
	ALSA: hda - Apply headphone noise quirk for another Dell XPS 13 variant
	ALSA: hda - Apply the existing quirk to iMac 14,1
	timers: Unconditionally check deferrable base
	af_key: fix buffer overread in verify_address_len()
	af_key: fix buffer overread in parse_exthdrs()
	iser-target: Fix possible use-after-free in connection establishment error
	scsi: hpsa: fix volume offline state
	sched/deadline: Zero out positive runtime after throttling constrained tasks
	x86/retpoline: Fill RSB on context switch for affected CPUs
	x86/retpoline: Add LFENCE to the retpoline/RSB filling RSB macros
	objtool: Improve error message for bad file argument
	x86/cpufeature: Move processor tracing out of scattered features
	module: Add retpoline tag to VERMAGIC
	x86/mm/pkeys: Fix fill_sig_info_pkey
	x86/tsc: Fix erroneous TSC rate on Skylake Xeon
	pipe: avoid round_pipe_size() nr_pages overflow on 32-bit
	x86/apic/vector: Fix off by one in error path
	perf tools: Fix build with ARCH=x86_64
	Input: ALPS - fix multi-touch decoding on SS4 plus touchpads
	Input: 88pm860x-ts - fix child-node lookup
	Input: twl6040-vibra - fix child-node lookup
	Input: twl4030-vibra - fix sibling-node lookup
	tracing: Fix converting enum's from the map in trace_event_eval_update()
	phy: work around 'phys' references to usb-nop-xceiv devices
	ARM: sunxi_defconfig: Enable CMA
	ARM: dts: kirkwood: fix pin-muxing of MPP7 on OpenBlocks A7
	can: peak: fix potential bug in packet fragmentation
	scripts/gdb/linux/tasks.py: fix get_thread_info
	proc: fix coredump vs read /proc/*/stat race
	libata: apply MAX_SEC_1024 to all LITEON EP1 series devices
	workqueue: avoid hard lockups in show_workqueue_state()
	dm btree: fix serious bug in btree_split_beneath()
	dm thin metadata: THIN_MAX_CONCURRENT_LOCKS should be 6
	arm64: KVM: Fix SMCCC handling of unimplemented SMC/HVC calls
	x86/cpu, x86/pti: Do not enable PTI on AMD processors
	usbip: fix warning in vhci_hcd_probe/lockdep_init_map
	x86/mce: Make machine check speculation protected
	retpoline: Introduce start/end markers of indirect thunk
	kprobes/x86: Blacklist indirect thunk functions for kprobes
	kprobes/x86: Disable optimizing on the function jumps to indirect thunk
	x86/pti: Document fix wrong index
	x86/retpoline: Optimize inline assembler for vmexit_fill_RSB
	MIPS: AR7: ensure the port type's FCR value is used
	Linux 4.9.78

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-01-23 20:18:30 +01:00
Greg Kroah-Hartman 79584a4221 Linux 4.9.78 2018-01-23 19:57:10 +01:00
Jonas Gorski 60249fe905 MIPS: AR7: ensure the port type's FCR value is used
commit 0a5191efe06b5103909206e4fbcff81d30283f8e upstream.

Since commit aef9a7bd9b ("serial/uart/8250: Add tunable RX interrupt
trigger I/F of FIFO buffers"), the port's default FCR value isn't used
in serial8250_do_set_termios anymore, but copied over once in
serial8250_config_port and then modified as needed.

Unfortunately, serial8250_config_port will never be called if the port
is shared between kernel and userspace, and the port's flag doesn't have
UPF_BOOT_AUTOCONF, which would trigger a serial8250_config_port as well.

This causes garbled output from userspace:

[    5.220000] random: procd urandom read with 49 bits of entropy available
ers
   [kee

Fix this by forcing it to be configured on boot, resulting in the
expected output:

[    5.250000] random: procd urandom read with 50 bits of entropy available
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level

Fixes: aef9a7bd9b ("serial/uart/8250: Add tunable RX interrupt trigger I/F of FIFO buffers")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Nicolas Schichan <nschichan@freebox.fr>
Cc: linux-mips@linux-mips.org
Cc: linux-serial@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17544/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-23 19:57:10 +01:00
Andi Kleen 06d7342d84 x86/retpoline: Optimize inline assembler for vmexit_fill_RSB
commit 3f7d875566d8e79c5e0b2c9a413e91b2c29e0854 upstream.

The generated assembler for the C fill RSB inline asm operations has
several issues:

- The C code sets up the loop register, which is then immediately
  overwritten in __FILL_RETURN_BUFFER with the same value again.

- The C code also passes in the iteration count in another register, which
  is not used at all.

Remove these two unnecessary operations. Just rely on the single constant
passed to the macro for the iterations.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: David Woodhouse <dwmw@amazon.co.uk>
Cc: dave.hansen@intel.com
Cc: gregkh@linuxfoundation.org
Cc: torvalds@linux-foundation.org
Cc: arjan@linux.intel.com
Link: https://lkml.kernel.org/r/20180117225328.15414-1-andi@firstfloor.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-23 19:57:10 +01:00