04 Jan, 2021
1 commit
-
This is the 5.10.4 stable release
* tag 'v5.10.4': (717 commits)
Linux 5.10.4
x86/CPU/AMD: Save AMD NodeId as cpu_die_id
drm/edid: fix objtool warning in drm_cvt_modes()
...Signed-off-by: Jason Liu
Conflicts:
drivers/gpu/drm/imx/dcss/dcss-plane.c
drivers/media/i2c/ov5640.c
30 Dec, 2020
5 commits
-
[ Upstream commit 3d70fb03711c37bc64e8e9aea5830f498835f6bf ]
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.Fixes: 197f4d6a4a00 ("staging: fsl-mc: fsl-mc object allocator driver")
Reported-by: Hulk Robot
Acked-by: Laurentiu Tudor
Signed-off-by: Zhang Changzhong
Link: https://lore.kernel.org/r/1607068967-31991-1-git-send-email-zhangchangzhong@huawei.com
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Sasha Levin -
[ Upstream commit 61243c03dde238170001093a29716c2369e8358f ]
A previous patch accidentally dropped an error check, so add it back.
Fixes: aef85b56c3c1 ("bus: fsl-mc: MC control registers are not always available")
Signed-off-by: Laurentiu Tudor
Link: https://lore.kernel.org/r/20201105153050.19662-1-laurentiu.tudor@nxp.com
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Sasha Levin -
[ Upstream commit f0e82242b16826077a2775eacfe201d803bb7a22 ]
kfree(dev) has been called inside put_device so anther
kfree would cause a use-after-free bug/Fixes: 8286ae03308c ("MIPS: Add CDMM bus support")
Reported-by: Hulk Robot
Signed-off-by: Qinglang Miao
Acked-by: Serge Semin
Signed-off-by: Thomas Bogendoerfer
Signed-off-by: Sasha Levin -
[ Upstream commit f4d0b39c842585c74bce8f8a80553369181b72df ]
Functions parse_ev_cfg() and parse_ch_cfg() access mhi_cntrl->mhi_dev
before it is set in function mhi_register_controller(),
use cntrl_dev instead of mhi_dev.Fixes: 0cbf260820fa ("bus: mhi: core: Add support for registering MHI controllers")
Signed-off-by: Carl Yin
Reviewed-by: Bhaumik Bhatt
Reviewed-by: Hemant Kumar
Reviewed-by: Manivannan Sadhasivam
Signed-off-by: Manivannan Sadhasivam
Signed-off-by: Sasha Levin -
[ Upstream commit 9b627c25e70816a5e1dca940444b5029065b4d60 ]
There is double acquisition of the pm_lock from mhi_driver_remove()
function. Remove the read_lock_bh/read_unlock_bh calls for pm_lock
taken during a call to mhi_device_put() as the lock is acquired
within the function already. This will help avoid a potential
kernel panic.Fixes: 189ff97cca53 ("bus: mhi: core: Add support for data transfer")
Reported-by: Shuah Khan
Signed-off-by: Bhaumik Bhatt
Reviewed-by: Manivannan Sadhasivam
Signed-off-by: Manivannan Sadhasivam
Signed-off-by: Sasha Levin
14 Dec, 2020
8 commits
-
'type' and 'flags' fields were missing from dprc_rsp_get_obj_region
structure therefore the MC Bus driver was not receiving proper flags
from MC like DPRC_REGION_CACHEABLE.Signed-off-by: Cristian Sovaiala
Signed-off-by: Laurentiu Tudor
Signed-off-by: Diana Craciun -
Because the minimum supported DPRC version is 6.0, there is no need to
check for incompatible 6.x versions lower to the minimum one. Just
remove the second half of the check to simplify the logic.Signed-off-by: Ioana Ciornei
-
A new object type was recently added in MC. This has to be added in the
fsl-mc bus device type list so that it can be properly listed.Signed-off-by: Ioana Ciornei
-
With recent MC release, a timeout of 500ms is not enough in most
circumstances. If MC firmware will respond faster, we should
decrease this value.Signed-off-by: Ioana Ciornei
Signed-off-by: Laurentiu Tudor -
Add the autorescan sysfs in order to enable/disable the DPRC IRQs on
which automatic rescan of the bus is performed. This is important when
dynamic creation of objects is needed to happen in a timely manner because
object creation can be bundled together.Signed-off-by: Ioana Ciornei
-
Introduce the rescan attribute as a bus attribute to
synchronize the fsl-mc bus objects and the MC firmware.To rescan the fsl-mc bus, e.g.,
echo 1 > /sys/bus/fsl-mc/rescanSigned-off-by: Ioana Ciornei
-
TODO: move a line to prev commit
Introduce the rescan attribute as a device attribute to
synchronize the fsl-mc bus objects and the MC firmware.To rescan the root dprc only, e.g.
echo 1 > /sys/bus/fsl-mc/devices/dprc.1/rescanSigned-off-by: Ioana Ciornei
-
Adding userspace support for the MC (Management Complex) means exporting
an ioctl capable device file representing the root resource container.This new functionality in the fsl-mc bus driver intends to provide
userspace applications an interface to interact with the MC firmware.Commands that are composed in userspace are sent to the MC firmware
through the FSL_MC_SEND_MC_COMMAND ioctl. By default the implicit MC
I/O portal is used for this operation, but if the implicit one is busy,
a dynamic portal is allocated and then freed upon execution.Signed-off-by: Ioana Ciornei
19 Nov, 2020
1 commit
-
GP Timers used as clockevent/source are not available for ti-sysc bus and
handled by Kernel timekeeping core. Now ti-sysc produces error message
every time such timer is detected:"ti-sysc: probe of 48040000.target-module failed with error -16"
Such messages are not necessary, so suppress them by returning -ENXIO
instead of -EBUSY.Fixes: 6cfcd5563b4f ("clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4")
Signed-off-by: Grygorii Strashko
Signed-off-by: Tony Lindgren
26 Oct, 2020
2 commits
-
Bail out early from sysc_wait_softreset() just like we do in sysc_reset()
if there's no sysstatus srst_shift to fix a bogus resetdone warning on
enable as suggested by Grygorii Strashko .We do not currently handle resets for modules that need writing to the
sysstatus register. If we at some point add that, we also need to add
SYSS_QUIRK_RESETDONE_INVERTED flag for cpsw as the sysstatus bit is low
when reset is done as described in the am335x TRM "Table 14-202
SOFT_RESET Register Field Descriptions"Fixes: d46f9fbec719 ("bus: ti-sysc: Use optional clocks on for enable and wait for softreset bit")
Suggested-by: Grygorii Strashko
Acked-by: Grygorii Strashko
Signed-off-by: Tony Lindgren -
Commit d46f9fbec719 ("bus: ti-sysc: Use optional clocks on for enable and
wait for softreset bit") started showing a "OCP softreset timed out"
warning on enable if the interconnect target module is not out of reset.
This caused the warning to be often triggered for i2c and hdq while the
devices are working properly.Turns out that some interconnect target modules seem to have an unusable
reset status bits unless the module specific reset quirks are activated.Let's just skip the reset status check for those modules as we only want
to activate the reset quirks when doing a reset, and not on enable. This
way we don't see the bogus "OCP softreset timed out" warnings during boot.Fixes: d46f9fbec719 ("bus: ti-sysc: Use optional clocks on for enable and wait for softreset bit")
Signed-off-by: Tony Lindgren
25 Oct, 2020
1 commit
-
Pull ARM SoC-related driver updates from Olof Johansson:
"Various driver updates for platforms. A bulk of this is smaller fixes
or cleanups, but some of the new material this time around is:- Support for Nvidia Tegra234 SoC
- Ring accelerator support for TI AM65x
- PRUSS driver for TI platforms
- Renesas support for R-Car V3U SoC
- Reset support for Cortex-M4 processor on i.MX8MQ
There are also new socinfo entries for a handful of different SoCs and
platforms"* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (131 commits)
drm/mediatek: reduce clear event
soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api
soc: mediatek: cmdq: add jump function
soc: mediatek: cmdq: add write_s_mask value function
soc: mediatek: cmdq: add write_s value function
soc: mediatek: cmdq: add read_s function
soc: mediatek: cmdq: add write_s_mask function
soc: mediatek: cmdq: add write_s function
soc: mediatek: cmdq: add address shift in jump
soc: mediatek: mtk-infracfg: Fix kerneldoc
soc: amlogic: pm-domains: use always-on flag
reset: sti: reset-syscfg: fix struct description warnings
reset: imx7: add the cm4 reset for i.MX8MQ
dt-bindings: reset: imx8mq: add m4 reset
reset: Fix and extend kerneldoc
reset: reset-zynqmp: Added support for Versal platform
dt-bindings: reset: Updated binding for Versal reset driver
reset: imx7: Support module build
soc: fsl: qe: Remove unnessesary check in ucc_set_tdm_rxtx_clk
soc: fsl: qman: convert to use be32_add_cpu()
...
16 Oct, 2020
1 commit
-
Pull char/misc driver updates from Greg KH:
"Here is the big set of char, misc, and other assorted driver subsystem
patches for 5.10-rc1.There's a lot of different things in here, all over the drivers/
directory. Some summaries:- soundwire driver updates
- habanalabs driver updates
- extcon driver updates
- nitro_enclaves new driver
- fsl-mc driver and core updates
- mhi core and bus updates
- nvmem driver updates
- eeprom driver updates
- binder driver updates and fixes
- vbox minor bugfixes
- fsi driver updates
- w1 driver updates
- coresight driver updates
- interconnect driver updates
- misc driver updates
- other minor driver updates
All of these have been in linux-next for a while with no reported
issues"* tag 'char-misc-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (396 commits)
binder: fix UAF when releasing todo list
docs: w1: w1_therm: Fix broken xref, mistakes, clarify text
misc: Kconfig: fix a HISI_HIKEY_USB dependency
LSM: Fix type of id parameter in kernel_post_load_data prototype
misc: Kconfig: add a new dependency for HISI_HIKEY_USB
firmware_loader: fix a kernel-doc markup
w1: w1_therm: make w1_poll_completion static
binder: simplify the return expression of binder_mmap
test_firmware: Test partial read support
firmware: Add request_partial_firmware_into_buf()
firmware: Store opt_flags in fw_priv
fs/kernel_file_read: Add "offset" arg for partial reads
IMA: Add support for file reads without contents
LSM: Add "contents" flag to kernel_read_file hook
module: Call security_kernel_post_load_data()
firmware_loader: Use security_post_load_data()
LSM: Introduce kernel_post_load_data() hook
fs/kernel_read_file: Add file_size output argument
fs/kernel_read_file: Switch buffer size arg to size_t
fs/kernel_read_file: Remove redundant size argument
...
14 Oct, 2020
1 commit
-
There are several occurrences of the following pattern:
for_each_memblock(memory, reg) {
start = __pfn_to_phys(memblock_region_memory_base_pfn(reg);
end = __pfn_to_phys(memblock_region_memory_end_pfn(reg));/* do something with start and end */
}Using for_each_mem_range() iterator is more appropriate in such cases and
allows simpler and cleaner code.[akpm@linux-foundation.org: fix arch/arm/mm/pmsa-v7.c build]
[rppt@linux.ibm.com: mips: fix cavium-octeon build caused by memblock refactoring]
Link: http://lkml.kernel.org/r/20200827124549.GD167163@linux.ibm.comSigned-off-by: Mike Rapoport
Signed-off-by: Andrew Morton
Cc: Andy Lutomirski
Cc: Baoquan He
Cc: Benjamin Herrenschmidt
Cc: Borislav Petkov
Cc: Catalin Marinas
Cc: Christoph Hellwig
Cc: Daniel Axtens
Cc: Dave Hansen
Cc: Emil Renner Berthing
Cc: Hari Bathini
Cc: Ingo Molnar
Cc: Ingo Molnar
Cc: Jonathan Cameron
Cc: Marek Szyprowski
Cc: Max Filippov
Cc: Michael Ellerman
Cc: Michal Simek
Cc: Miguel Ojeda
Cc: Palmer Dabbelt
Cc: Paul Mackerras
Cc: Paul Walmsley
Cc: Peter Zijlstra
Cc: Russell King
Cc: Stafford Horne
Cc: Thomas Bogendoerfer
Cc: Thomas Gleixner
Cc: Will Deacon
Cc: Yoshinori Sato
Link: https://lkml.kernel.org/r/20200818151634.14343-13-rppt@kernel.org
Signed-off-by: Linus Torvalds
02 Oct, 2020
20 commits
-
The region size reported by the firmware for mc and software
portals was less than allocated by the hardware. This may be
problematic when mmapping the region in user space because the
region size is less than page size. However the size as reserved
by the hardware is 64K.Reviewed-by: Laurentiu Tudor
Acked-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
Link: https://lore.kernel.org/r/20200929085441.17448-14-diana.craciun@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman -
In virtual machines the device-id range is defined
between 0x10000-0x20000. The reason for using such a
large range is to avoid overlapping with the PCI range.Reviewed-by: Laurentiu Tudor
Acked-by: Laurentiu Tudor
Signed-off-by: Bharat Bhushan
Signed-off-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
Link: https://lore.kernel.org/r/20200929085441.17448-13-diana.craciun@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman -
The IRQ pool handling functions can be used by both DPRC
driver and VFIO. Adapt and export those functions.Reviewed-by: Laurentiu Tudor
Acked-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
Link: https://lore.kernel.org/r/20200929085441.17448-12-diana.craciun@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman -
Before destroying the mc_io, check first that it was
allocated.Reviewed-by: Laurentiu Tudor
Acked-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
Link: https://lore.kernel.org/r/20200929085441.17448-11-diana.craciun@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman -
Both DPRC driver and VFIO driver use the same initialization code
for the DPRC. Introduced a new function which groups this
initialization code. The function is exported and may be
used by VFIO as well.Reviewed-by: Laurentiu Tudor
Acked-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
Link: https://lore.kernel.org/r/20200929085441.17448-10-diana.craciun@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman -
Create and export a cleanup function for DPRC. The function
is used by the DPRC driver, but it will be used by the VFIO
driver as well.Reviewed-by: Laurentiu Tudor
Acked-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
Link: https://lore.kernel.org/r/20200929085441.17448-9-diana.craciun@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman -
Currently the DPRC scan function is used only by the bus driver.
But the same functionality will be needed by the VFIO driver.
To support this, the dprc scan function was exported and a little
bit adjusted to fit both scenarios. Also the scan mutex initialization
is done when the bus object is created, not in dprc_probe in order
to be used by both VFIO and bus driver.
Similarily dprc_remove_devices is exported to be used by VFIO.Reviewed-by: Laurentiu Tudor
Acked-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
Link: https://lore.kernel.org/r/20200929085441.17448-8-diana.craciun@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman -
DPRC reset is required by VFIO-mc in order to stop a device
to further generate DMA transactions.Reviewed-by: Laurentiu Tudor
Acked-by: Laurentiu Tudor
Signed-off-by: Bharat Bhushan
Signed-off-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
Link: https://lore.kernel.org/r/20200929085441.17448-7-diana.craciun@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman -
There are already firmware API commands that have multiple
versions. For each multiple version command, another command
to retrieve the API version is issued. This may introduce an important
overhead. The version does not change while the system is running,
so the DPRC API version can be safely cached.Reviewed-by: Laurentiu Tudor
Acked-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
Link: https://lore.kernel.org/r/20200929085441.17448-6-diana.craciun@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman -
The QMAN region is memory mapped, so it should be of type
IORESOURCE_MEM. The region flags bits were wrongly used to
pass additional information. Use the bus specific bits for
this purpose.Reviewed-by: Laurentiu Tudor
Acked-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
Link: https://lore.kernel.org/r/20200929085441.17448-5-diana.craciun@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman -
This patch is required for vfio-fsl-mc meta driver to successfully bind
layerscape container devices for device passthrough. This patch adds
a mechanism to allow a layerscape device to specify a driver rather than
a layerscape driver provide a device match.Example to allow a device (dprc.1) to specifically bind
with driver (vfio-fsl-mc):-
- echo vfio-fsl-mc > /sys/bus/fsl-mc/devices/dprc.1/driver_override
- echo dprc.1 > /sys/bus/fsl-mc/drivers/fsl_mc_dprc/unbind
- echo dprc.1 > /sys/bus/fsl-mc/drivers/vfio-fsl-mc/bindReviewed-by: Laurentiu Tudor
Acked-by: Laurentiu Tudor
Signed-off-by: Bharat Bhushan
Signed-off-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
Link: https://lore.kernel.org/r/20200929085441.17448-4-diana.craciun@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman -
Prepare the dprc_scan_objects function to be used by
the VFIO mc driver code. The function is used to scan the mc
objects by the bus driver. The same functionality is
needed by the VFIO mc driver, but in this case the
interrupt configuration is delayed until the userspace
configures the interrupts. In order to use the same function
in both drivers add a new parameter.Reviewed-by: Laurentiu Tudor
Acked-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
Link: https://lore.kernel.org/r/20200929085441.17448-3-diana.craciun@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman -
The total number of interrupts is only used for some checks
outside the dprc_scan_objects function. Furthermore, in some
situations the check is made twice. Move the bounds check inside
the function for all situations.Reviewed-by: Laurentiu Tudor
Acked-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
Link: https://lore.kernel.org/r/20200929085441.17448-2-diana.craciun@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman -
As per the device tree binding, in certain scenarios such as
virtualization scenarios, the MC control registers are not
available so don't error out if they are not present.Signed-off-by: Laurentiu Tudor
Link: https://lore.kernel.org/r/20200914105459.27448-2-laurentiu.tudor@nxp.com
Signed-off-by: Greg Kroah-Hartman -
There are certain scenarios where an iommu is not present, e.g.
booting in a VM. Let's support these scenarios by dropping the
check.Signed-off-by: Laurentiu Tudor
Link: https://lore.kernel.org/r/20200914105459.27448-1-laurentiu.tudor@nxp.com
Signed-off-by: Greg Kroah-Hartman -
This value was missing in the channel debugfs output.
Reviewed-by: Manivannan Sadhasivam
Signed-off-by: Loic Poulain
Signed-off-by: Manivannan Sadhasivam
Link: https://lore.kernel.org/r/20200929175218.8178-20-manivannan.sadhasivam@linaro.org
Signed-off-by: Greg Kroah-Hartman -
The Kbuild rule to build MHI should use the append operator. This fixes
the below warning reported by Kbuild test bot.WARNING: modpost: missing MODULE_LICENSE() in
drivers/bus/mhi/core/main.o
WARNING: modpost: missing MODULE_LICENSE() in drivers/bus/mhi/core/pm.o
WARNING: modpost: missing MODULE_LICENSE() in
drivers/bus/mhi/core/boot.oFixes: 0cbf260820fa ("bus: mhi: core: Add support for registering MHI controllers")
Reported-by: kernel test robot
Signed-off-by: Manivannan Sadhasivam
Link: https://lore.kernel.org/r/20200929175218.8178-19-manivannan.sadhasivam@linaro.org
Signed-off-by: Greg Kroah-Hartman -
nr_irqs_req is unused in MHI stack.
Reviewed-by: Manivannan Sadhasivam
Signed-off-by: Loic Poulain
Signed-off-by: Manivannan Sadhasivam
Link: https://lore.kernel.org/r/20200929175218.8178-18-manivannan.sadhasivam@linaro.org
Signed-off-by: Greg Kroah-Hartman -
There is no requirement for using a dedicated IRQ per event ring.
Some systems does not support multiple MSI vectors (e.g. intel
without CONFIG_IRQ_REMAP), In that case the MHI controller can
configure all the event rings to use the same interrupt (as fallback).Allow this by removing the nr_irqs = ev_ring test and add extra check
in the irq_setup function.Reviewed-by: Manivannan Sadhasivam
Signed-off-by: Loic Poulain
Signed-off-by: Manivannan Sadhasivam
Link: https://lore.kernel.org/r/20200929175218.8178-17-manivannan.sadhasivam@linaro.org
Signed-off-by: Greg Kroah-Hartman -
Introduce sysfs entries to enable userspace clients the ability to read
the serial number and the OEM PK Hash values obtained from BHI. OEMs
need to read these device-specific hardware information values through
userspace for factory testing purposes and cannot be exposed via degbufs
as it may remain disabled for performance reasons. Also, update the
documentation for ABI to include these entries.Reviewed-by: Manivannan Sadhasivam
[mani: used dev_groups to manage sysfs attributes]
Signed-off-by: Bhaumik Bhatt
Signed-off-by: Manivannan Sadhasivam
Link: https://lore.kernel.org/r/20200929175218.8178-16-manivannan.sadhasivam@linaro.org
Signed-off-by: Greg Kroah-Hartman