Commit graph

1,215,304 commits

Author SHA1 Message Date
Hans de Goede
6d6849b220 media: ov2680: Add ov2680_fill_format() helper function
Add a ov2680_fill_format() helper function and use this everywhere were
a v4l2_mbus_framefmt struct needs to be filled in so that the driver always
fills it consistently.

This is a preparation patch for fixing ov2680_set_fmt()
which == V4L2_SUBDEV_FORMAT_TRY calls not properly filling in
the passed in v4l2_mbus_framefmt struct.

Note that for ov2680_init_cfg() this now simply always fills
the try_fmt struct of the passed in sd_state. This is correct because
ov2680_init_cfg() is never called with a NULL sd_state so the old
sd_state check is not necessary.

Fixes: 3ee47cad3e ("media: ov2680: Add Omnivision OV2680 sensor driver")
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:27:56 +02:00
Hans de Goede
e521b9cc1a media: ov2680: Don't take the lock for try_fmt calls
On ov2680_set_fmt() calls with format->which == V4L2_SUBDEV_FORMAT_TRY,
ov2680_set_fmt() does not talk to the sensor.

So in this case there is no need to lock the sensor->lock mutex or
to check that the sensor is streaming.

Fixes: 3ee47cad3e ("media: ov2680: Add Omnivision OV2680 sensor driver")
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:27:56 +02:00
Hans de Goede
49c282d5a8 media: ov2680: Remove VIDEO_V4L2_SUBDEV_API ifdef-s
VIDEO_V4L2_SUBDEV_API is now automatically selected in Kconfig
for all sensor drivers. Remove the ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
checks.

This is a preparation patch for fixing ov2680_set_fmt()
which == V4L2_SUBDEV_FORMAT_TRY calls not properly filling in
the passed in v4l2_mbus_framefmt struct.

Fixes: 3ee47cad3e ("media: ov2680: Add Omnivision OV2680 sensor driver")
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:27:56 +02:00
Hans de Goede
d5d08ad330 media: ov2680: Fix vflip / hflip set functions
ov2680_vflip_disable() / ov2680_hflip_disable() pass BIT(0) instead of
0 as value to ov2680_mod_reg().

While fixing this also:

1. Stop having separate enable/disable functions for hflip / vflip
2. Move the is_streaming check, which is unique to hflip / vflip
   into the ov2680_set_?flip() functions.

for a nice code cleanup.

Fixes: 3ee47cad3e ("media: ov2680: Add Omnivision OV2680 sensor driver")
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:27:55 +02:00
Hans de Goede
50a7bad4e0 media: ov2680: Fix ov2680_bayer_order()
The index into ov2680_hv_flip_bayer_order[] should be 0-3, but
ov2680_bayer_order() was using 0 + BIT(2) + (BIT(2) << 1) as
max index, while the intention was to use: 0 + 1 + 2 as max index.

Fix the index calculation in ov2680_bayer_order(), while at it
also just use the ctrl values rather then reading them back using
a slow i2c-read transaction.

This also allows making the function void, since there now are
no more i2c-reads to error check.

Note the check for the ctrls being NULL is there to allow
adding an ov2680_fill_format() helper later, which will call
ov2680_set_bayer_order() during probe() before the ctrls are created.

[Sakari Ailus: Change all users of ov2680_set_bayer_order() here]

Fixes: 3ee47cad3e ("media: ov2680: Add Omnivision OV2680 sensor driver")
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:27:55 +02:00
Hans de Goede
7b5a42e6ae media: ov2680: Remove auto-gain and auto-exposure controls
Quoting the OV2680 datasheet:

"3.2 exposure and gain control

In the OV2680, the exposure time and gain are set manually from an external
controller. The OV2680 supports manual gain and exposure control only for
normal applications, no auto mode."

And indeed testing with the atomisp_ov2680 fork of ov2680.c has shown that
auto-exposure and auto-gain do not work.

Note that the code setting the auto-exposure flag was broken, callers
of ov2680_exposure_set() were directly passing !!ctrls->auto_exp->val as
"bool auto_exp" value, but ctrls->auto_exp is a menu control with:

enum  v4l2_exposure_auto_type {
        V4L2_EXPOSURE_AUTO = 0,
        V4L2_EXPOSURE_MANUAL = 1,
	...

So instead of passing !!ctrls->auto_exp->val they should have been passing
ctrls->auto_exp->val == V4L2_EXPOSURE_AUTO, iow the passed value was
inverted of what it should have been.

Also remove ov2680_g_volatile_ctrl() since without auto support the gain
and exposure controls are not volatile.

This also fixes the control values not being properly applied in
ov2680_mode_set(). The 800x600 mode register-list also sets gain,
exposure and vflip overriding the last set ctrl values.

ov2680_mode_set() does call ov2680_gain_set() and ov2680_exposure_set()
but did this before writing the mode register-list, so these values
would still be overridden by the mode register-list.

Add a v4l2_ctrl_handler_setup() call after writing the mode register-list
to restore all ctrl values. Also remove the ctrls->gain->is_new check from
ov2680_gain_set() so that the gain always gets restored properly.

Last since ov2680_mode_set() now calls v4l2_ctrl_handler_setup(), remove
the v4l2_ctrl_handler_setup() call after ov2680_mode_restore() since
ov2680_mode_restore() calls ov2680_mode_set().

Fixes: 3ee47cad3e ("media: ov2680: Add Omnivision OV2680 sensor driver")
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:27:55 +02:00
Tomi Valkeinen
997a6b01cd media: Documentation: Fix [GS]_ROUTING documentation
Add mention that successful VIDIOC_SUBDEV_G_ROUTING call will update
'num_routes' and remove mention about non-existing streams, which is
incorrect.

Fixes: ea73eda508 ("media: Documentation: Add GS_ROUTING documentation")
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:27:55 +02:00
Marek Vasut
a210df337c media: ov5640: Fix initial RESETB state and annotate timings
The initial state of RESETB input signal of OV5640 should be
asserted, i.e. the sensor should be in reset. This is not the
case, make it so.

Since the subsequent assertion of RESETB signal is no longer
necessary and the timing of the power sequencing could be
slightly adjusted, add annotations to the delays which match
OV5640 datasheet rev. 2.03, both:
  figure 2-3 power up timing with internal DVDD
  figure 2-4 power up timing with external DVDD source

The 5..10ms delay between PWDN assertion and RESETB assertion
is not even documented in the power sequencing diagram, and
with this reset fix, it is no longer even necessary.

Fixes: 19a81c1426 ("[media] add Omnivision OV5640 sensor driver")
Reported-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Tested-by: Jai Luthra <j-luthra@ti.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:27:55 +02:00
Ruan Jinjie
90fbb259b4 media: platform: ti: fix the return value handle for platform_get_irq()
There is no possible for platform_get_irq() to return 0,
and the return value of platform_get_irq() is more sensible
to show the error reason.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:27:55 +02:00
Ruan Jinjie
f312dc7cf1 media: verisilicon: Do not check for 0 return after calling platform_get_irq()
It is not possible for platform_get_irq() or platform_get_irq_byname()
to return 0. Use the return value from platform_get_irq()
or platform_get_irq_byname().

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Reviewed-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:27:55 +02:00
Ruan Jinjie
384e83db20 media: camif-core: Do not check for 0 return after calling platform_get_irq()
It is not possible for platform_get_irq() to return 0. Use the
return value from platform_get_irq().

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Reviewed-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:27:55 +02:00
Yang Yingliang
92d7487037 media: davinci: vpif_capture: fix error return code in vpif_probe()
Set error return code, when get platform data failed.

Fixes: b4a4547371b9 ("media: davinci: Init async notifier after registering V4L2 device")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Lad Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:27:55 +02:00
Marek Vasut
98cb72d3b9 media: ov5640: Enable MIPI interface in ov5640_set_power_mipi()
Set OV5640_REG_IO_MIPI_CTRL00 bit 2 to 1 instead of 0, since 1 means
MIPI CSI2 interface, while 0 means CPI parallel interface.

In the ov5640_set_power_mipi() the interface should obviously be set
to MIPI CSI2 since this functions is used to power up the sensor when
operated in MIPI CSI2 mode. The sensor should not be in CPI mode in
that case.

This fixes a corner case where capturing the first frame on i.MX8MN
with CSI/ISI resulted in corrupted frame.

Fixes: aa4bb8b883 ("media: ov5640: Re-work MIPI startup sequence")
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Tested-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> # [Test on imx6q]
Signed-off-by: Marek Vasut <marex@denx.de>
Tested-by: Jai Luthra <j-luthra@ti.com> # [Test on bplay, sk-am62]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:27:55 +02:00
Wentong Wu
c66821f381 media: pci: intel: Add IVSC support for IPU bridge driver
Previously on ACPI platforms, sensors that are intended to be connected
to an IPU device for use with the ipu3-cio2 driver lacking the necessary
connection information in firmware. IPU bridge driver is to connect
sensors to IPU device via software nodes.

Currently IVSC located between IPU device and sensors is available in
existing commercial platforms from multiple OEMs. But the connection
information between them in firmware is also not enough to build V4L2
connection graph. This patch parses the connection properties from the
SSDB buffer in DSDT and build the connection using software nodes.

IVSC driver is based on MEI framework (previously known as HECI), it
has two MEI clients, MEI CSI and MEI ACE. Both clients are used to
communicate messages with IVSC firmware. Linux abstracts MEI client
as a device, whose bus type is MEI. And the device is addressed by a
GUID/UUID which is part of the device name of MEI client. After figured
out MEI CSI via the UUID composed device name, this patch setup the
connection between MEI CSI and IPU, and the connection between MEI CSI
and sensor via software nodes.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:27:55 +02:00
Wentong Wu
78876f71b3 media: pci: intel: ivsc: Add ACE submodule
ACE is a submodule of IVSC which controls camera sensor's
ownership, belonging to host or IVSC. When IVSC owns camera
sensor, it is for algorithm computing. When host wants to
control camera sensor, ACE module needs to be informed of
ownership with defined interface.

The interface is via MEI. There is a separate MEI UUID, which
this driver uses to enumerate.

To switch ownership of camera sensor between IVSC and host,
the caller specifies the defined ownership information which
will be sent to firmware by sending MEI command.

Device link(device_link_add) is used to set the right camera
sensor ownership before accessing the sensor via I2C. With
DL_FLAG_PM_RUNTIME and DL_FLAG_RPM_ACTIVE, the supplier device
will be PM runtime resumed before the consumer(camera sensor).
So use runtime PM callbacks to transfer the ownership between
host and IVSC.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:27:55 +02:00
Wentong Wu
29006e196a media: pci: intel: ivsc: Add CSI submodule
CSI is a submodule of IVSC which can route camera sensor data
to the outbound MIPI CSI-2 interface.

The interface communicating with firmware is via MEI. There is
a separate MEI UUID, which this driver uses to enumerate.

To route camera sensor data to host, the information of link
frequency and number of data lanes is sent to firmware by
sending MEI command when starting stream.

CSI also provides a privacy mode. When privacy mode is turned
on, camera sensor can't be used. This means that both IVSC and
host Image Processing Unit(IPU) can't get image data. And when
this mode is turned on, user is notified via v4l2 control
callback.

Link: https://lore.kernel.org/linux-media/20230803115550.1601965-2-sakari.ailus@linux.intel.com
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:26:06 +02:00
Arnd Bergmann
eeb751c410 mvebu dt for 6.6 (part 1)
Fix style issue and incorrect syntax
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCZNek6gAKCRALBhiOFHI7
 1UqnAKCQifHuE4qcgZPXvjLL+Y+skZ5ROwCcCYPui+H/sjdA10J7+lSNTPIn5JM=
 =eHV2
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmTaX3UACgkQYKtH/8kJ
 Uicc2BAAlV3f/rJR4ozyvpB7JJZpsVde6i6fQA3sq/WJDuOZlahD9aEWdgPNLSvm
 KfJzKGk0AMVoW+hWiz8srw9BFvrYD5sZznS1OwigrYkh6m8g9eD4FmVMiB8/Xydg
 jMm5X667wYoDKdbEW9WfkXZAz1y8A+IzptgTv3hjUUI0wy2V+N9gJzc7dDZg0bwd
 PFKKC7OxmxFlFHMjNpjsJU2STYfgYdGFIkKzOi9VUDyn/rRW+lrlyWPRKXwXAZcL
 edGuE+cLr/tm7QUQuUeqpAPz0I2BAl8dr1T+vhSvNkhwgBV4m4IWD/Jm0wulurlH
 aNXF1NznQwMOO+Dxq4XBYNU/RpZD9GlU3SKmsApTVCjuJy8GpzfYgBGA68UtybcZ
 1zXFseF2xk8rhORldWCYQfjUJ6saKr9U0NxW++UekOPzy08v6Q0FORtJtNnnSoGq
 knFT7+QutjtUw48OVnhm4nQ7wjVt0253Rym+70yAo4gnCMuaIxPF78xkZcejrVf6
 +MfDzwgOeRYp00SK4w0a9LKKJfHevWwGSarHSYIWyOp91ifkVWj9EacdRgCZL2b8
 e/sF5K8ffPcbOBT9/akD3E/qPsvdwG+YOeUaI8zZ91fXd9BVT1mJIgRwFJh5VOsA
 x1pfq+pQFK5bmRWxjkty1Wc4A+bSWH+Ws7fpDi8xKQjeikewuyY=
 =jAQC
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-dt-6.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into soc/dt

mvebu dt for 6.6 (part 1)

Fix style issue and incorrect syntax

* tag 'mvebu-dt-6.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu:
  ARM: dts: marvell: dove: drop incorrect reg in fixed regulators
  ARM: dts: marvell: armada: drop incorrect reg in fixed regulators
  ARM: dts: marvell: add missing space before {

Link: https://lore.kernel.org/r/87h6p4t0lv.fsf@BL-laptop
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-08-14 19:08:05 +02:00
Arnd Bergmann
7cb74e0c66 mvebu dt64 for 6.6 (part 1)
Add the NAND Flash Controller on the AC5/AC5X SOC device tree
 Fix style issue
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCZNekOAAKCRALBhiOFHI7
 1R8/AKCD9XFuQvGMfQwOXwXZPid3XfTQdgCgpN4VE28m8CJLuqww7rjdM1xZaRI=
 =cCrk
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmTaX2EACgkQYKtH/8kJ
 UieETBAAqkZ6cuolx4vFbmHaejPJ9cKwg51Lk2AOqiuxvJTjf8oRhOdnaDCFNL0B
 KncUoimtJYXMhoq+lUZeHdNntTmPzaz6OJg/3Q0P4tm/+8VzLjFwdF54n+E7U/YU
 tXIbKLNavfeSbq8R4vvIl4rWbLDCZ1+NZ3sVT2gf6EYZxpA1MFlJ8gKgCXVgAjTk
 8uRGRr6zr8DW+1HC3tpePZXZ8qXedMDQb5JlBMzArQkhDsbgPWjMWSoNcBCXOIn6
 nm3KOD9W/HtluZWxC7zgqN1X0B1rTbtgSiSL1+6+KAq5j1qpgDdyfdrnNsdPMt5o
 d15u78RN9JZmWHnDGfX1ZD9JOtgASIfgWYIJSFMq1AP54HL2fSD5PSOcY6+0xa75
 F+g28rVprCi6HuqJ1WHl2qmB2CVKlE56glVvW/K4/fXyfwyTJJmtB6bow3vN7pZ9
 pW54xBsReiNeDHnBnRBT57ygtyekD35SJszocbz73Z441CMwRbLKY+OYWFWr9+Wr
 532MODDC5IxirZl/VCO62pg5Aso87eWIdnZ+p1hIds5fcnbTXKbsYt5R0GqJ+dMT
 5EfsVfi60swmb30ub/5Vyi8+40IRtHaXIGsCOm+nqnbZwsxMtcPXgJ9kA3o8Cmb5
 gdhHvyzbBpZ1oM6MF8CIlYsWDfpJkv+I+6NLefFoizWyBrOhxlM=
 =h8gM
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-dt64-6.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into soc/dt

mvebu dt64 for 6.6 (part 1)

Add the NAND Flash Controller on the AC5/AC5X SOC device tree
Fix style issue

* tag 'mvebu-dt64-6.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu:
  arm64: dts: marvell: Add NAND flash controller to AC5
  arm64: dts: marvell: add missing space before {

Link: https://lore.kernel.org/r/87edk8t0kl.fsf@BL-laptop
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-08-14 19:07:45 +02:00
Arnd Bergmann
87382eadde PCI/sysfs: Move declarations to linux/pci.h
A couple of architectures build the __weak versions of
pci_create_resource_files() and pci_remove_resource_files() but don't
have prototypes for these, which causes warnings:

  drivers/pci/pci-sysfs.c:1253:12: error: no previous prototype for 'pci_create_resource_files' [-Werror=missing-prototypes]
   1253 | int __weak pci_create_resource_files(struct pci_dev *dev) { return 0; }
  drivers/pci/pci-sysfs.c:1254:13: error: no previous prototype for 'pci_remove_resource_files' [-Werror=missing-prototypes]
   1254 | void __weak pci_remove_resource_files(struct pci_dev *dev) { return; }

Move the prototypes from alpha architecture into the global header to avoid
these warnings for all of them.

Link: https://lore.kernel.org/r/20230810141947.1236730-5-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2023-08-14 12:05:18 -05:00
Zheng Zengkai
0e8207f54c PCI/P2PDMA: Use pci_dev_id() to simplify the code
When we have a struct pci_dev *, use pci_dev_id() instead of manually
composing the ID from dev->bus->number and dev->devfn.

[bhelgaas: commit log]
Link: https://lore.kernel.org/r/20230811111057.31900-1-zhengzengkai@huawei.com
Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
2023-08-14 12:05:05 -05:00
Christian Brauner
22ed7ecdae
fs: add FSCONFIG_CMD_CREATE_EXCL
Summary
=======

This introduces FSCONFIG_CMD_CREATE_EXCL which will allows userspace to
implement something like mount -t ext4 --exclusive /dev/sda /B which
fails if a superblock for the requested filesystem does already exist:

Before this patch
-----------------

$ sudo ./move-mount -f xfs -o source=/dev/sda4 /A
Requesting filesystem type xfs
Mount options requested: source=/dev/sda4
Attaching mount at /A
Moving single attached mount
Setting key(source) with val(/dev/sda4)

$ sudo ./move-mount -f xfs -o source=/dev/sda4 /B
Requesting filesystem type xfs
Mount options requested: source=/dev/sda4
Attaching mount at /B
Moving single attached mount
Setting key(source) with val(/dev/sda4)

After this patch with --exclusive as a switch for FSCONFIG_CMD_CREATE_EXCL
--------------------------------------------------------------------------

$ sudo ./move-mount -f xfs --exclusive -o source=/dev/sda4 /A
Requesting filesystem type xfs
Request exclusive superblock creation
Mount options requested: source=/dev/sda4
Attaching mount at /A
Moving single attached mount
Setting key(source) with val(/dev/sda4)

$ sudo ./move-mount -f xfs --exclusive -o source=/dev/sda4 /B
Requesting filesystem type xfs
Request exclusive superblock creation
Mount options requested: source=/dev/sda4
Attaching mount at /B
Moving single attached mount
Setting key(source) with val(/dev/sda4)
Device or resource busy | move-mount.c: 300: do_fsconfig: i xfs: reusing existing filesystem not allowed

Details
=======

As mentioned on the list (cf. [1]-[3]) mount requests like
mount -t ext4 /dev/sda /A are ambigous for userspace. Either a new
superblock has been created and mounted or an existing superblock has
been reused and a bind-mount has been created.

This becomes clear in the following example where two processes create
the same mount for the same block device:

P1                                                              P2
fd_fs = fsopen("ext4");                                         fd_fs = fsopen("ext4");
fsconfig(fd_fs, FSCONFIG_SET_STRING, "source", "/dev/sda");     fsconfig(fd_fs, FSCONFIG_SET_STRING, "source", "/dev/sda");
fsconfig(fd_fs, FSCONFIG_SET_STRING, "dax", "always");          fsconfig(fd_fs, FSCONFIG_SET_STRING, "resuid", "1000");

// wins and creates superblock
fsconfig(fd_fs, FSCONFIG_CMD_CREATE, ...)
                                                                // finds compatible superblock of P1
                                                                // spins until P1 sets SB_BORN and grabs a reference
                                                                fsconfig(fd_fs, FSCONFIG_CMD_CREATE, ...)

fd_mnt1 = fsmount(fd_fs);                                       fd_mnt2 = fsmount(fd_fs);
move_mount(fd_mnt1, "/A")                                       move_mount(fd_mnt2, "/B")

Not just does P2 get a bind-mount but the mount options that P2
requestes are silently ignored. The VFS itself doesn't, can't and
shouldn't enforce filesystem specific mount option compatibility. It
only enforces incompatibility for read-only <-> read-write transitions:

mount -t ext4       /dev/sda /A
mount -t ext4 -o ro /dev/sda /B

The read-only request will fail with EBUSY as the VFS can't just
silently transition a superblock from read-write to read-only or vica
versa without risking security issues.

To userspace this silent superblock reuse can become a security issue in
because there is currently no straightforward way for userspace to know
that they did indeed manage to create a new superblock and didn't just
reuse an existing one.

This adds a new FSCONFIG_CMD_CREATE_EXCL command to fsconfig() that
returns EBUSY if an existing superblock would be reused. Userspace that
needs to be sure that it did create a new superblock with the requested
mount options can request superblock creation using this command. If the
command succeeds they can be sure that they did create a new superblock
with the requested mount options.

This requires the new mount api. With the old mount api it would be
necessary to plumb this through every legacy filesystem's
file_system_type->mount() method. If they want this feature they are
most welcome to switch to the new mount api.

Following is an analysis of the effect of FSCONFIG_CMD_CREATE_EXCL on
each high-level superblock creation helper:

(1) get_tree_nodev()

    Always allocate new superblock. Hence, FSCONFIG_CMD_CREATE and
    FSCONFIG_CMD_CREATE_EXCL are equivalent.

    The binderfs or overlayfs filesystems are examples.

(4) get_tree_keyed()

    Finds an existing superblock based on sb->s_fs_info. Hence,
    FSCONFIG_CMD_CREATE would reuse an existing superblock whereas
    FSCONFIG_CMD_CREATE_EXCL would reject it with EBUSY.

    The mqueue or nfsd filesystems are examples.

(2) get_tree_bdev()

    This effectively works like get_tree_keyed().

    The ext4 or xfs filesystems are examples.

(3) get_tree_single()

    Only one superblock of this filesystem type can ever exist.
    Hence, FSCONFIG_CMD_CREATE would reuse an existing superblock
    whereas FSCONFIG_CMD_CREATE_EXCL would reject it with EBUSY.

    The securityfs or configfs filesystems are examples.

    Note that some single-instance filesystems never destroy the
    superblock once it has been created during the first mount. For
    example, if securityfs has been mounted at least onces then the
    created superblock will never be destroyed again as long as there is
    still an LSM making use it. Consequently, even if securityfs is
    unmounted and the superblock seemingly destroyed it really isn't
    which means that FSCONFIG_CMD_CREATE_EXCL will continue rejecting
    reusing an existing superblock.

    This is acceptable thugh since special purpose filesystems such as
    this shouldn't have a need to use FSCONFIG_CMD_CREATE_EXCL anyway
    and if they do it's probably to make sure that mount options aren't
    ignored.

Following is an analysis of the effect of FSCONFIG_CMD_CREATE_EXCL on
filesystems that make use of the low-level sget_fc() helper directly.
They're all effectively variants on get_tree_keyed(), get_tree_bdev(),
or get_tree_nodev():

(5) mtd_get_sb()

    Similar logic to get_tree_keyed().

(6) afs_get_tree()

    Similar logic to get_tree_keyed().

(7) ceph_get_tree()

    Similar logic to get_tree_keyed().

    Already explicitly allows forcing the allocation of a new superblock
    via CEPH_OPT_NOSHARE. This turns it into get_tree_nodev().

(8) fuse_get_tree_submount()

    Similar logic to get_tree_nodev().

(9) fuse_get_tree()

    Forces reuse of existing FUSE superblock.

    Forces reuse of existing superblock if passed in file refers to an
    existing FUSE connection.
    If FSCONFIG_CMD_CREATE_EXCL is specified together with an fd
    referring to an existing FUSE connections this would cause the
    superblock reusal to fail. If reusing is the intent then
    FSCONFIG_CMD_CREATE_EXCL shouldn't be specified.

(10) fuse_get_tree()
     -> get_tree_nodev()

    Same logic as in get_tree_nodev().

(11) fuse_get_tree()
     -> get_tree_bdev()

    Same logic as in get_tree_bdev().

(12) virtio_fs_get_tree()

     Same logic as get_tree_keyed().

(13) gfs2_meta_get_tree()

     Forces reuse of existing gfs2 superblock.

     Mounting gfs2meta enforces that a gf2s superblock must already
     exist. If not, it will error out. Consequently, mounting gfs2meta
     with FSCONFIG_CMD_CREATE_EXCL would always fail. If reusing is the
     intent then FSCONFIG_CMD_CREATE_EXCL shouldn't be specified.

(14) kernfs_get_tree()

     Similar logic to get_tree_keyed().

(15) nfs_get_tree_common()

    Similar logic to get_tree_keyed().

    Already explicitly allows forcing the allocation of a new superblock
    via NFS_MOUNT_UNSHARED. This effectively turns it into
    get_tree_nodev().

Link: [1] https://lore.kernel.org/linux-block/20230704-fasching-wertarbeit-7c6ffb01c83d@brauner
Link: [2] https://lore.kernel.org/linux-block/20230705-pumpwerk-vielversprechend-a4b1fd947b65@brauner
Link: [3] https://lore.kernel.org/linux-fsdevel/20230725-einnahmen-warnschilder-17779aec0a97@brauner
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Aleksa Sarai <cyphar@cyphar.com>
Message-Id: <20230802-vfs-super-exclusive-v2-4-95dc4e41b870@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2023-08-14 18:48:02 +02:00
Christian Brauner
11a51d8c13
fs: add vfs_cmd_reconfigure()
Split the steps to reconfigure a superblock into a tiny helper instead
of open-coding it in the switch.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Aleksa Sarai <cyphar@cyphar.com>
Message-Id: <20230802-vfs-super-exclusive-v2-3-95dc4e41b870@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2023-08-14 18:48:02 +02:00
Christian Brauner
dae8b08d5d
fs: add vfs_cmd_create()
Split the steps to create a superblock into a tiny helper. This will
make the next patch easier to follow.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Aleksa Sarai <cyphar@cyphar.com>
Message-Id: <20230802-vfs-super-exclusive-v2-2-95dc4e41b870@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2023-08-14 18:48:02 +02:00
Christian Brauner
e062abaec6
super: remove get_tree_single_reconf()
The get_tree_single_reconf() helper isn't used anywhere. Remove it.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Aleksa Sarai <cyphar@cyphar.com>
Message-Id: <20230802-vfs-super-exclusive-v2-1-95dc4e41b870@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2023-08-14 18:48:02 +02:00
Arnd Bergmann
0aea47fa0e TI K3 defconfig updates for v6.6
- Various configs for K3 boards including ECAP, Thermal,
   RTI watchdog, mailbox, sound, MCAN, UFS.
 - Enable PRUSS for am64/am65x boards such as IOT2050.
 - Enable IT66121 for BeaglePlay HDMI.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmTaSFkACgkQ3bWEnRc2
 JJ16EA/8DYLPqbYVvsr4U1S4cGqQHc4fZf5J41kKIshGIi+mmjFv+yQQzIToVP6w
 ttEOitSXay86CNI/SHAHPghXxJ66BvlAD0/1WDBYg9mTfHyVfsss97KqTivuAq3L
 1RNOGedXjbyJK2+/1VwutdfiTF2Eyogc0L2ODofLBoKHIXrAvU3tq6hCaWmGgNrr
 FkH98j+FDvGsBX1g+cVuwmJmUg5+B0nhJT5u3tylw2taZM/ReU+xUy/5kH+ijfyN
 WIQp9ThUoZo8iMC59FCYs8yUYjFGxkOSdFlx9aefzzLX3IKowqqaYjwZRmzOj8xm
 pJkg57gPpUOBhtweeAMpEyfjxUeG4U4AivzXtsE3NeBWWH7IuWxYc6Tr0mKkRrhp
 TX33dCs32o/ufKoHpRgFaNx9ffDJ3xaJIaKID/lIIuGEIyce/dd11VXxsz+/deum
 tGFEt/mi7cZsYMnzwyg4Jlzkxh97nZAV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E-----

Merge tag 'ti-k3-config-for-v6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/defconfig

TI K3 defconfig updates for v6.6

- Various configs for K3 boards including ECAP, Thermal,
  RTI watchdog, mailbox, sound, MCAN, UFS.
- Enable PRUSS for am64/am65x boards such as IOT2050.
- Enable IT66121 for BeaglePlay HDMI.

* tag 'ti-k3-config-for-v6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  arm64: defconfig: Enable ITE_IT66121 HDMI transmitter
  arm64: defconfig: Enable TI PRUSS
  arm64: defconfig: Enable various configs for TI K3 platforms

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-08-14 18:46:07 +02:00
Arnd Bergmann
20cf932af8 i.MX defconfig change for 6.6:
- Enable i.MX93 device drivers in arm64 defconfig.
 - Enable Redpine 91X WLAN and NXP UART Bluetooth driver.
 - Enable DRM_IMX_LCDIF, IMX_REMOTEPROC and RPMSG_VIRTIO drivers.
 - Enable SL28VPD NVMEM layout support.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmTYmwEUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM7uJAf9GpMUE7NNIFUp/zfJwVy9AOlwqH7k
 rWayxRGAIE3UgRwJHMuS5kBGE3qWn0HKCmY5n8qzGcHyC8FjVD7EVMXLSzC2amOw
 r2X11EOYxCYyYOLh6CUufVv30bsJkpowm1zAfsrMEEzvcTKPVKpZPjFV2tEJ/aKF
 uQuDz1PYBSR2SVwu3hzSpuiKq3bO8ATV8qSTq76bxZjZnBrV47i/Y4k7wDWYj7Nc
 /Sx648wA8JlMMW3YgfovkL4ckYEMhMWaI5LTvEzAERPkg0437M0+WS4g2MOOSQUv
 TVtowPLC5OfysUqQdSgeNNo12WRrI4NF6RUEnF8JDVg2Uq9YL1J1GMJivA==
 =j4c2
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmTaWgAACgkQYKtH/8kJ
 UifpNxAAlBJaJOiZOcn6ZEmKEXnYtqtH03HFUC7ja6hNxKoUmRJxt5FKvtzIogeE
 U4J0D/0C2PuPepkcGaspeM+h2QLEmNo33aJYF42O5y3WxD9w00CRdkQTedaSPY4i
 VeNw3PBRp4ig3QEAmmdNkivyiT4NTNB53CsZgjQH8ZL9kbCeb4e5bLrlyfKlnBcG
 sVZy5+BFAeTAfmUKp8GmPSNENwqz8lebqiIXDxCQEWFDIGUxoQapGVYwBvr+xBGg
 c8W1n9OPAubW01F5SOyPX/TGN1A+gZIVXYP1U+CYC+caQ862TROf8VuwAwgBDnC7
 AFQtX4vQ0d4Ij0kibgcTNkn/0qclwhEPTPxveUP0uz1O2fraDOndG7AHX25ZzcD8
 rlzgcUGMXlbFGV6YeCKrBafv2VDeGyPDjZYJlpMLB4g3ZuyriQsTHiU0pQtb0oQF
 qtJBrZawGxpgtKidtRyJzT4bnPJlPcM5e5JUGH3HdkUZwEyfH5wzzywGO6d+8tTc
 foETY8u5WTH1GKjaxRBRArKOZarg/ckm5UkBLAhpsXIcM1NIKEA06Wzm6eR3fVV1
 16VKy5U6NQ3G3mvRaFpW3oPIsQnv8kelkoIuKQdGPqrb52Ny8qC+ZhVufmhWf+Jz
 MFX+pfsNI+SYnd2pVC0IiP3OF5tJmfFFmHGVGXjToIqMsbMo2Ew=
 =PYgU
 -----END PGP SIGNATURE-----

Merge tag 'imx-defconfig-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/defconfig

i.MX defconfig change for 6.6:

- Enable i.MX93 device drivers in arm64 defconfig.
- Enable Redpine 91X WLAN and NXP UART Bluetooth driver.
- Enable DRM_IMX_LCDIF, IMX_REMOTEPROC and RPMSG_VIRTIO drivers.
- Enable SL28VPD NVMEM layout support.

* tag 'imx-defconfig-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: defconfig: Enable Redpine 91X wlan driver
  arm64: defconfig: Enable CONFIG_DRM_IMX_LCDIF
  arm64: defconfig: enable driver for bluetooth nxp uart
  arm64: defconfig: Enable i.MX93 devices
  arm64: defconfig: select IMX_REMOTEPROC and RPMSG_VIRTIO
  arm64: defconfig: enable SL28VPD NVMEM layout

Link: https://lore.kernel.org/r/20230813133354.847010-6-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-08-14 18:44:48 +02:00
Yipeng Zou
83a89c4b6a selftests/bpf: Clean up fmod_ret in bench_rename test script
Running the bench_rename test script, the following error occurs:

  # ./benchs/run_bench_rename.sh
  base      :    0.819 ± 0.012M/s
  kprobe    :    0.538 ± 0.009M/s
  kretprobe :    0.503 ± 0.004M/s
  rawtp     :    0.779 ± 0.020M/s
  fentry    :    0.726 ± 0.007M/s
  fexit     :    0.691 ± 0.007M/s
  benchmark 'rename-fmodret' not found

The bench_rename_fmodret has been removed in commit b000def2e0
("selftests: Remove fmod_ret from test_overhead"), thus remove it
from the runners in the test script.

Fixes: b000def2e0 ("selftests: Remove fmod_ret from test_overhead")
Signed-off-by: Yipeng Zou <zouyipeng@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230814030727.3010390-1-zouyipeng@huawei.com
2023-08-14 18:43:04 +02:00
Arnd Bergmann
3cb5b035d8 Memory controller drivers for v6.6
1. Tegra:
  - Extend support for Tegra234 SoC Memory Controllers with DRM and GPU
    clients.
  - Tegra186: Skip MRQ DVFS where it is not supported and do not fail
    probe.
 2. Wide cleanup of DT includes.
 3. Devicetree bindings:
  - Reference common peripheral (client) properties in Ingenic NEMC and
    TI GPMC.
  - Convert Davicom DM9000 to DT schema.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmTaFZAQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2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KmjCWRnccgQJEjKLaIcYNQKUYN
 gUHX8bUjRPu2/KJq/Z0unMi57vSra0hVA+G7izmGznSOllIEfa3p+AbBVQ4Zpj1P
 d3Npvfub2iDTI/liHUEmjRRCGOS/mL9BrWs+YymlMmr40Hgqf0VjsJiABLkZuemB
 RbIBMwuLJsEo5VLLMk+DSHV20tm800zSoF7aX1CER2pzNTGiJ+fIMqp6igbasE3k
 bpHElXh3AnrqUsKnazJGsZI1zw6Sk/9JhCh+oECZo48Mfa7YXhj0kJF+R1NtQn0/
 yPEElcaKLuo1fJgQi4aLdvUKu2fPmfOj9w7Ivbxt6FmsOfzzlhSasSoMSROFtApa
 5LpS8DiNUyFVEqvMYrBqb9oI2bI02XBt8nqPl5tnu2JkZ5zjDmYp1oBiIMOJg6r1
 22edeNdbnaaCDxxcQtgaB3reYxurmhRe/gPOlFupHdH9dt5a51I=
 =19if
 -----END PGP SIGNATURE-----

Merge tag 'memory-controller-drv-6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers

Memory controller drivers for v6.6

1. Tegra:
 - Extend support for Tegra234 SoC Memory Controllers with DRM and GPU
   clients.
 - Tegra186: Skip MRQ DVFS where it is not supported and do not fail
   probe.
2. Wide cleanup of DT includes.
3. Devicetree bindings:
 - Reference common peripheral (client) properties in Ingenic NEMC and
   TI GPMC.
 - Convert Davicom DM9000 to DT schema.

* tag 'memory-controller-drv-6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  memory: tegra: add MC client for Tegra234 GPU
  dt-bindings: net: davicom,dm9000: convert to DT schema
  dt-bindings: memory-controllers: reference TI GPMC peripheral properties
  dt-bindings: memory-controllers: ingenic,nemc: reference peripheral properties
  memory: Explicitly include correct DT includes
  memory: tegra: Prefer octal over symbolic permissions
  memory: tegra: add check if MRQ_EMC_DVFS_LATENCY is supported
  memory: tegra: Add clients used by DRM in Tegra234
  memory: tegra: sort tegra234_mc_clients table as per register offsets
  memory: tegra: make icc_set_bw return zero if BWMGR not supported
  memory: tegra: Add dummy implementation on Tegra194

Link: https://lore.kernel.org/r/20230814120052.27485-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-08-14 18:28:15 +02:00
Arnd Bergmann
93e0acaec3 TI SoC driver updates for v6.6
- Generic fixups: Explicitly include correct DT include.
 - omap_prm: Cosmetic fixups for using devm_ api for ioremap_resource
 - ti_sci: Documentation fixups, Using system_state to determine if
   polling is needed.
 - k3-ringcc: Documentation fixups, cleanup of log messages, using
   devm_ to handle ioremap_resource.
 - k3-socinfo: Add AM62PX detection.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmTaSAgACgkQ3bWEnRc2
 JJ2bHhAArQBIlE2hSKOhQp2voNiSywrs94YOrrFKX+rb4DZFPUt3PtqMut8N86oS
 Hq8HeztxyCL5Lsi5p4eqi4DICAT6cdLqLQu4o1Nk8G+/1xC9bUSMxxDAvp9WqcKe
 VRjSnDrO5USU/FSQh2OVtBzYYqeNtrXtHIhih/XurH2C0RMev27RIMg2IeMq1ZBg
 OqerwxoV9FdjnUB74RrLhWPehSMGO3P7x2rwS8EndZ7CbQekHyhWDNW7SrIyvfre
 X5GpdRjOT4eCEKpEVvDoHPZZkwvGSYtXEuRKq0W3faCv+uHL3CAvWVuYWwZvYUUK
 SbJfJb/j94U24B75MynOSLYYyzDVwz1vvrfKeA+ZS+v/T1HqOPVHyCR8rff+fvBa
 jbk950oMwqJdRJ0wyrtlhQXCzXJ+8kVG5VOYW8eef0bMUsqVt/r+40V3imyVmn3E
 SqYisWOXUSZBgMdUiQwCw6+ZNeZEeBwT7328y+tpLBbNtp5psDLH9NWii79f0JiL
 Gy8hbYAzVnozLYd0Z0IHueQ7zTHJ/GLR1NphArwlj9nL9ZOlxWibADMdyc0rsp8h
 RSxTmbxY8/wwh+8wqgAoafzxeigL4Aer6KOb3xpbVqxUTx8aq9Bh0Jg6izhZCSrj
 cd2TQuamXE8lIKpmQfsHIlaTpP/YelSOSZgMpIHwnUJzEaGYHvA=
 =vMl/
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmTaVbMACgkQYKtH/8kJ
 Uid/Sw//ar4Qf8XWgGThf08hP2Xv6fQEHwNiCOxP6+Jozfr8cKW3nX/ZXLSoGfC3
 fSThkm8Nny2b45cZax03JSaBOkFZMxBshISVkl9mUSelEGPMIfQejx+P1xQVW+V4
 50NbxE62Ezs6NPpF6yIOE8OYURZyMNUNioiKy6j3mlIPCVHuLixPdh1192SfHg8N
 GyIE6SEPA29j0rr8OwyXTIIct2ol0UStvrK8zx4Qmp14P+XbxMZI6YMNHXDJPy3i
 l/0HqSS0hFWCiLq8pa/Fl03QWfqDTYBSiBn2onYuMSg6msQgIkH6IPEA2NfY5itJ
 AFutvTH4YtUdfyGGac+zchtcVQHUDm2oJQxMHBpluU8695DWNWmqw7/ttP9gCwtk
 x2qtnwgu+k0C+fLWjMhv/hCg1tfB4j4aVZxAL9WKKpV4S4E7oWf8KCOJ8bn1DWUI
 slLKTVPSYSs4D9+66imjBYRF7tNqk+LDVYuRMQPW3bUFMRRIsK0ZVLBdYxC9w9Yj
 jFHeKvDmeMhCHjIB8pDC7626J7lTndHF0uRVLA591IYaRd3z8Oh4MCv0BsIVExPH
 31FPoEKIrhv6sQyShF6fYcO4V4I46rLaXszq+uRPOcucRrNQpQwIEa5DUJtr23ha
 n05PtlaOniNS7O2a2J9/kgyBupQCoO1IMS089IvLB/9wEaqV7j8=
 =wz6q
 -----END PGP SIGNATURE-----

Merge tag 'ti-driver-soc-for-v6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/drivers

TI SoC driver updates for v6.6

- Generic fixups: Explicitly include correct DT include.
- omap_prm: Cosmetic fixups for using devm_ api for ioremap_resource
- ti_sci: Documentation fixups, Using system_state to determine if
  polling is needed.
- k3-ringcc: Documentation fixups, cleanup of log messages, using
  devm_ to handle ioremap_resource.
- k3-socinfo: Add AM62PX detection.

* tag 'ti-driver-soc-for-v6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  soc: ti: k3-socinfo.c: Add JTAG ID for AM62PX
  soc: ti: Use devm_platform_ioremap_resource_byname simplify logic
  soc: ti: k3-ringacc: remove non-fatal probe deferral log
  soc: ti: Explicitly include correct DT includes
  soc: ti: omap-prm: Use devm_platform_get_and_ioremap_resource()
  soc: ti: k3-ringacc: Fixup documentation errors
  firmware: ti_sci: Fixup documentation errors
  firmware: ti_sci: Use system_state to determine polling

Link: https://lore.kernel.org/r/20230814160633.my3xbk5k2pxkvjyi@degrease
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-08-14 18:26:27 +02:00
Chengfeng Ye
4caf4cb1ea i2c: bcm-iproc: Fix bcm_iproc_i2c_isr deadlock issue
iproc_i2c_rd_reg() and iproc_i2c_wr_reg() are called from both
interrupt context (e.g. bcm_iproc_i2c_isr) and process context
(e.g. bcm_iproc_i2c_suspend). Therefore, interrupts should be
disabled to avoid potential deadlock. To prevent this scenario,
use spin_lock_irqsave().

Fixes: 9a10387280 ("i2c: iproc: add NIC I2C support")
Signed-off-by: Chengfeng Ye <dg573847474@gmail.com>
Acked-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2023-08-14 18:17:13 +02:00
Arnd Bergmann
446f0a4b33 TI keystone SoC updates for v6.6
Updates:
  - Consolidation of files and drop pm_domain.c and keystone.h
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmTaSXkACgkQ3bWEnRc2
 JJ3xwQ//aXbS2nrgWMUgK8JkcoPKSnRYL8DVp9ng3gsJb3VrVxKsYjqCvKVfeJ37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j/YKmAg8sZPSyQfI
 ETEHFmsnCMJhIW094OrdaY29TfE6E+6hPyBW5QNiOq2pLlD3kn1o6adnSG1gAc4A
 frSsPbQ4jxZWSKkpkUWl9e47pHsp/2sN9+5Ga/YLtcorbX8xzs4hZmSLSrMA8Spm
 H7MfPZZ7aJH8K4aYcoiHNpki+aUolIRqxTjssu86lrRnHs16qcFtjNHH5OnMYxu9
 8w20/rW9ahqrpkf9kvwhvB1OOW3b1JATGGCejoL4DoZ4W2CISqo6rJjIxCDUcMSN
 uykFDFvQV3o53ybAJkpQk7+JjOBkmKG3NVlk0vWevGoPyBiT/rmH/ziwLmpG3Bah
 qklejmjPUzkcDAn8TwWCj2Zq5mudOXlscevVeVC7PvUjyWts4lI=
 =kFIn
 -----END PGP SIGNATURE-----

Merge tag 'ti-keystone-soc-for-v6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/arm

TI keystone SoC updates for v6.6

Updates:
 - Consolidation of files and drop pm_domain.c and keystone.h

* tag 'ti-keystone-soc-for-v6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  ARM: keystone: Merge PM function into main support file
  ARM: keystone: Merge memory.h into the only file that uses it
  ARM: keystone: Drop unused includes

Link: https://lore.kernel.org/r/20230814160702.6l2fcujbx33eogap@junction
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-08-14 18:16:20 +02:00
Rob Herring
8787bc51a7
ARM: s5pv210: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it was merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230720172751.2918776-1-robh@kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230814114051.25840-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-08-14 18:15:48 +02:00
Uwe Kleine-König
7d711966f9 i2c: Update documentation to use .probe() again
Since commit 03c835f498 ("i2c: Switch .probe() to not take an id
parameter") .probe() is the recommended callback to implement (again).
Reflect this in the documentation and don't mention .probe_new() any
more.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2023-08-14 18:14:04 +02:00
Arnd Bergmann
f15897c25f Final OXNAS removal PR for v6.6:
- Remove irq-versatile-fpga compatible entry
 - Mark irq-versatile-fpga oxnas compatible as deprecated
 - Remove OXNAS maintainers entry
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmTZ5ecACgkQd9zb2sjI
 SdGOKxAAjXW4Biv9iZkhWJjeGaYiCh/O7WUuwChw9GAFDO5cnOt0C3ztgV8nR+Zu
 +Tm58QG6RE5tBIDcfZSa+CITXUol3s0VF5xHRF4kk2aBc7PS1fBt0vIvSMlxgHvv
 IGAbkHVZ10XLViByrQvQn9U3sRPdZkZaJECANSxDSrPD3toV7DdMz+lHdBr42Lz7
 jiAc1YYhBrqRSWenuukmuBOVNNDSY9jze6cBrRb88evNMIWqPemRTgIDlkVzpDQJ
 W8jDvZpQltZXYkJV3diVmynsjOnMS15l5MgAY3jxb+nRuGZzv+GWxwuVBjnMDm5B
 Nkk5vESCsH6+5EYv0KMDQT8Rf1/HO23kgNTGKWwqdrdHoOl57W9lNqgBa1xsgIGj
 R/FcnunJhYNoVl4xUkD/5CAJ8L0k4aD6L5MKjJOA2vtnvB5xkG6d+ko50Wiub+C/
 QurDZEji7zD+Wa3aAEmNP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 -----END PGP SIGNATURE-----

Merge tag 'oxnas-final-for-6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/narmstrong/linux-oxnas into soc/drivers

Final OXNAS removal PR for v6.6:
- Remove irq-versatile-fpga compatible entry
- Mark irq-versatile-fpga oxnas compatible as deprecated
- Remove OXNAS maintainers entry

* tag 'oxnas-final-for-6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/narmstrong/linux-oxnas:
  MAINTAINERS: remove OXNAS entry
  dt-bindings: interrupt-controller: arm,versatile-fpga-irq: mark oxnas compatible as deprecated
  irqchip: irq-versatile-fpga: remove obsolete oxnas compatible

Link: https://lore.kernel.org/r/3f91bb89-bf7b-d967-a302-2a8e1b0c3b01@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-08-14 18:13:56 +02:00
Yangtao Li
08e3351b4b i2c: pnx: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2023-08-14 18:10:14 +02:00
Yangtao Li
733f41f702 i2c: pxa: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2023-08-14 18:10:10 +02:00
Yangtao Li
b15eb80322 i2c: s3c2410: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2023-08-14 18:10:05 +02:00
Yangtao Li
3735e4318f i2c: sh_mobile: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2023-08-14 18:10:01 +02:00
Yangtao Li
8f2056ff20 i2c: st: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2023-08-14 18:09:57 +02:00
Yangtao Li
02ebc01dde i2c: qcom-geni: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2023-08-14 18:09:53 +02:00
Yangtao Li
8086ea443d i2c: stm32f4: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2023-08-14 18:09:48 +02:00
Yangtao Li
8f4bc41800 i2c: mlxbf: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2023-08-14 18:09:44 +02:00
Yangtao Li
f9dce8d649 i2c: brcmstb: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by:  Kamal Dasu <kamal.dasu@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2023-08-14 18:09:39 +02:00
Yangtao Li
c71d80d384 i2c: iproc: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2023-08-14 18:09:35 +02:00
Yangtao Li
0a310eef70 i2c: at91: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2023-08-14 18:09:30 +02:00
Yipeng Zou
811915db67 selftests/bpf: Fix repeat option when kfunc_call verification fails
There is no way where topts.repeat can be set to 1 when tc_test fails.
Fix the typo where the break statement slipped by one line.

Fixes: fb66223a24 ("selftests/bpf: add test for accessing ctx from syscall program type")
Signed-off-by: Yipeng Zou <zouyipeng@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Li Zetao <lizetao1@huawei.com>
Link: https://lore.kernel.org/bpf/20230814031434.3077944-1-zouyipeng@huawei.com
2023-08-14 18:03:00 +02:00
Sven Eckelmann
6f96d46f9a batman-adv: Drop per algo GW section class code
This code was  only used in the past for the sysfs interface. But since
this was replace with netlink, it was never executed. The function pointer
was only checked to figure out whether the limit 255 (B.A.T.M.A.N. IV) or
2**32-1 (B.A.T.M.A.N. V) should be used as limit.

So instead of keeping the function pointer, just store the limits directly
in struct batadv_algo_gw_ops.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
2023-08-14 18:01:21 +02:00
Sven Eckelmann
02e61f06a9 batman-adv: Keep batadv_netlink_notify_* static
The batadv_netlink_notify_*() functions are not used by any other source
file. Just keep them local to netlink.c to get informed by the compiler
when they are not used anymore.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
2023-08-14 18:01:21 +02:00
Sven Eckelmann
950c92bbaa batman-adv: Drop unused function batadv_gw_bandwidth_set
This function is no longer used since the sysfs support was removed from
batman-adv.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
2023-08-14 18:01:21 +02:00
Arnd Bergmann
9fb9ae8061 i.MX drivers update for 6.6:
- A series from NXP i.MX developers (Peng Fan, etc.) to update imx-scu
   and imx-scu-irq firmware drivers.
 - Add dedicated lockdep class for nested genpd locks to fix a lockdep
   warning in imx93-blk-ctrl driver.
 - A change from Rob to explicitly include correct DT headers for i.MX
   SoC drivers.
 - Use devm_platform_ioremap_resource() in imx-weim bus driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmTYNCAUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM7x+wgAsB65MMhY74a8pjuO0q1nJierjc46
 of2ayxR8I1jXQK/3IUijBZpg+8bnQkhXiVK1uyzvLmUc28iw1y6B2dWec/hXRld8
 mc516IWjGa0Re+dOeliKPFNWzj6TZRi3TmqKIfg5XIb0poBtxBiXm7tvjm1oYRQl
 ijkCqauOXJmK3yMMTQqxknGQG+B8wQDTPnbssk0A46ShD4RrYXmC3wjTEb27WoGk
 nw18XT5XpS+LomctRcqza3Bcdry6YPmI0hOt9Oy9db2sBtXbz+bf9tLGKztvfxGz
 44R0+Rz/XncJHwRXGgUNR71ps0+WP55qKsqoTw/zHhkS2BPl8gMxhBtQbQ==
 =T2Uo
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmTaT8sACgkQYKtH/8kJ
 UieFHQ//YrvUhNJjVtQeUcZ4s43MKKJsq7HNnki02ZRlIOdcG+vM7JzWe6PsRDbK
 8jeV1tM3ZE67VBeIZU1+ELshebiU01VQY4ZobmGOPMajDFXZmu1Znzr8O6RASrmd
 u+aFhpTGleg4SQQ2avdaQIQ4gpw19ciellxCTx37Y/hae06nANXzFFTlnPO4qseW
 rzJzgh2h3Z1Gv/LdqtlfMAeI2aEQy/+hfKmZs4f20/Rs8wwH7lzrNLSUideY6cqt
 RM1nX3F97b+glRJ4siqRoUISVSW6naWkb5qZ+VZXN4e7xrczuV/1Sp2dqINWXxKp
 dR3WpOfb2V9sIGQOiAb8XSFBkxvDVG6ze6l2RkXA0szqpVBRMOTGshykMqt2I2tN
 8Eeek9+XXZHZxNR6omFX4cvTjRW7hvhB0W35UdoZr1qteC8jV/H1DBYV3v8ri1d8
 z17Y0JGBFrtQFBF/jq1yK0WND4RIb2aHYxrojDQ3/mtqsMailIuogwGpMQyhsCll
 nX2NeKpaKe3MwEtKPOSTkUD5k8TLBfDOn/fcoLRQ6Ys6fsBAcplJ+6Sp3Hv/mgWQ
 W9eWaeBAh0BllI66twAxeTKdy/1IsGpsLyNVDJliAExW3Z1ISPUMw6pI4M+H/QZY
 W+joqcvJYAAiOfIvRqQWvyt40I/2JYx6otsJKN4JB9Qlh3QRvxg=
 =2iHc
 -----END PGP SIGNATURE-----

Merge tag 'imx-drivers-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/drivers

i.MX drivers update for 6.6:

- A series from NXP i.MX developers (Peng Fan, etc.) to update imx-scu
  and imx-scu-irq firmware drivers.
- Add dedicated lockdep class for nested genpd locks to fix a lockdep
  warning in imx93-blk-ctrl driver.
- A change from Rob to explicitly include correct DT headers for i.MX
  SoC drivers.
- Use devm_platform_ioremap_resource() in imx-weim bus driver.

* tag 'imx-drivers-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  firmware: imx: scu-irq: support identifying SCU wakeup source from sysfs
  firmware: imx: scu-irq: enlarge the IMX_SC_IRQ_NUM_GROUP
  firmware: imx: scu-irq: add imx_scu_irq_get_status
  firmware: imx: scu-irq: fix RCU complaint after M4 partition reset
  firmware: imx: scu: use EOPNOTSUPP
  firmware: imx: scu: use soc name for soc_id
  firmware: imx: scu: increase RPC timeout
  firmware: imx: scu: change init level to subsys_initcall_sync
  soc: imx: Explicitly include correct DT includes
  bus: imx-weim: use devm_platform_ioremap_resource
  soc: imx: imx93-blk-ctrl: Add dedicated lockdep class for nested genpd locks

Link: https://lore.kernel.org/r/20230813133354.847010-1-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-08-14 18:01:15 +02:00