aboutsummaryrefslogtreecommitdiff
path: root/include/linux
AgeCommit message (Collapse)AuthorFilesLines
2023-01-27kobject: kset_uevent_ops: make uevent() callback take a const *Greg Kroah-Hartman1-1/+1
The uevent() callback in struct kset_uevent_ops does not modify the kobject passed into it, so make the pointer const to enforce this restriction. When doing so, fix up all existing uevent() callbacks to have the correct signature to preserve the build. Cc: Christine Caulfield <[email protected]> Cc: David Teigland <[email protected]> Cc: Bob Peterson <[email protected]> Cc: Andreas Gruenbacher <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Acked-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-01-27driver core: make struct bus_type.uevent() take a const *Greg Kroah-Hartman3-3/+3
The uevent() callback in struct bus_type should not be modifying the device that is passed into it, so mark it as a const * and propagate the function signature changes out into all relevant subsystems that use this callback. Acked-by: Rafael J. Wysocki <[email protected]> Acked-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-01-27mcb: move to_mcb_device() to use container_of_const()Greg Kroah-Hartman1-4/+1
The driver core is changing to pass some pointers as const, so move to_mcb_device() to use container_of_const() to handle this change. to_mcb_device() now properly keeps the const-ness of the pointer passed into it, while as before it could be lost. Cc: Johannes Thumshirn <[email protected]> Acked-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-01-27virtio: move dev_to_virtio() to use container_of_const()Greg Kroah-Hartman1-4/+1
The driver core is changing to pass some pointers as const, so move dev_to_virtio() to use container_of_const() to handle this change. dev_to_virtio() now properly keeps the const-ness of the pointer passed into it, while as before it could be lost. Cc: "Michael S. Tsirkin" <[email protected]> Cc: Jason Wang <[email protected]> Acked-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-01-27drivers: hv: move device_to_hv_device to use container_of_const()Greg Kroah-Hartman1-4/+1
The driver core is changing to pass some pointers as const, so move device_to_hv_device() to use container_of_const() to handle this change. device_to_hv_device() now properly keeps the const-ness of the pointer passed into it, while as before it could be lost. Cc: "K. Y. Srinivasan" <[email protected]> Cc: Haiyang Zhang <[email protected]> Cc: Dexuan Cui <[email protected]> Acked-by: Wei Liu <[email protected]> Acked-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-01-27driver core: device_get_devnode() should take a const *Greg Kroah-Hartman1-2/+0
device_get_devnode() should take a constant * to struct device as it does not modify it in any way, so modify the function definition to do this and move it out of device.h as it does not need to be exposed to the whole kernel tree. Cc: Thomas Gleixner <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: Ira Weiny <[email protected]> Cc: Dan Williams <[email protected]> Cc: Won Chung <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-01-27driver core: make struct device_type.devnode() take a const *Greg Kroah-Hartman1-1/+1
The devnode() callback in struct device_type should not be modifying the device that is passed into it, so mark it as a const * and propagate the function signature changes out into all relevant subsystems that use this callback. Cc: Jens Axboe <[email protected]> Cc: Alison Schofield <[email protected]> Cc: Vishal Verma <[email protected]> Cc: Ira Weiny <[email protected]> Cc: Ben Widawsky <[email protected]> Cc: Jeremy Kerr <[email protected]> Cc: Joel Stanley <[email protected]> Cc: Alistar Popple <[email protected]> Cc: Eddie James <[email protected]> Cc: Jonathan Cameron <[email protected]> Cc: Jilin Yuan <[email protected]> Cc: Heikki Krogerus <[email protected]> Cc: Alan Stern <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Won Chung <[email protected]> Acked-by: Dan Williams <[email protected]> Acked-by: Alexander Shishkin <[email protected]> Acked-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-01-27driver core: make struct device_type.uevent() take a const *Greg Kroah-Hartman4-5/+5
The uevent() callback in struct device_type should not be modifying the device that is passed into it, so mark it as a const * and propagate the function signature changes out into all relevant subsystems that use this callback. Cc: Alan Stern <[email protected]> Cc: Andreas Noever <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Bard Liao <[email protected]> Cc: Chaitanya Kulkarni <[email protected]> Cc: Dan Williams <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: Frank Rowand <[email protected]> Cc: Ira Weiny <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Jilin Yuan <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Len Brown <[email protected]> Cc: Mark Gross <[email protected]> Cc: "Martin K. Petersen" <[email protected]> Cc: "Matthew Wilcox (Oracle)" <[email protected]> Cc: Maximilian Luz <[email protected]> Cc: Michael Jamet <[email protected]> Cc: Ming Lei <[email protected]> Cc: Pierre-Louis Bossart <[email protected]> Cc: Rob Herring <[email protected]> Cc: Sakari Ailus <[email protected]> Cc: Sanyog Kale <[email protected]> Cc: Sean Young <[email protected]> Cc: Stefan Richter <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Won Chung <[email protected]> Cc: Yehezkel Bernat <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Acked-by: Mika Westerberg <[email protected]> # for Thunderbolt Acked-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Acked-by: Heikki Krogerus <[email protected]> Acked-by: Wolfram Sang <[email protected]> Acked-by: Vinod Koul <[email protected]> Acked-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-01-27firewire: move fw_device() and fw_unit() to use container_of_const()Greg Kroah-Hartman1-12/+3
The driver core is changing to pass some pointers as const, so move fw_device() and fw_unit() functions to use container_of_const() to handle this change. fw_device() and fw_unit() now properly keeps the const-ness of the pointer passed into it, while as before it could be lost. This also required turning fw_parent_device() into a macro to preserve the const-ness of the pointer passed into it if necessary. Cc: Stefan Richter <[email protected]> Acked-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-01-27platform/surface: aggregator: move to_ssam_device() to use container_of_const()Greg Kroah-Hartman1-4/+1
The driver core is changing to pass some pointers as const, so move to_ssam_device() to use container_of_const() to handle this change. to_ssam_device() now properly keeps the const-ness of the pointer passed into it, while as before it could be lost. Reviewed-by: Maximilian Luz <[email protected]> Acked-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-01-27i3c: move dev_to_i3cdev() to use container_of_const()Greg Kroah-Hartman1-1/+8
The driver core is changing to pass some pointers as const, so move dev_to_i3cdev() to use container_of_const() to handle this change. dev_to_i3cdev() now properly keeps the const-ness of the pointer passed into it, while as before it could be lost. Acked-by: Alexandre Belloni <[email protected]> Acked-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-01-27of: device: make of_device_uevent_modalias() take a const device *Greg Kroah-Hartman1-2/+2
of_device_uevent_modalias() does not modify the device pointer passed to it, so mark it constant. In order to properly do this, a number of busses need to have a modalias function added as they were attempting to just point to of_device_uevent_modalias instead of their bus-specific modalias function. This is fine except if the prototype for a bus and device type modalias function diverges and then problems could happen. To prevent all of that, just wrap the call to of_device_uevent_modalias() directly for each bus and device type individually. Cc: Michael Ellerman <[email protected]> Cc: Nicholas Piggin <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: Chen-Yu Tsai <[email protected]> Cc: Jernej Skrabec <[email protected]> Cc: Samuel Holland <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Rob Herring <[email protected]> Cc: Frank Rowand <[email protected]> Cc: Liang He <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Christophe JAILLET <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: Dmitry Baryshkov <[email protected]> Cc: Douglas Anderson <[email protected]> Cc: Lyude Paul <[email protected]> Cc: Corentin Labbe <[email protected]> Cc: Zou Wei <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Acked-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-01-27net: skbuff: drop the linux/hrtimer.h includeJakub Kicinski1-1/+0
linux/hrtimer.h include was added because apparently it used to contain ktime related code. This is no longer the case and we include linux/time.h explicitly. Sadly this change is currently a noop because linux/dma-mapping.h and net/page_pool.h pull in half of the universe. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-01-27net: skbuff: drop the linux/splice.h includeJakub Kicinski1-1/+0
splice.h is included since commit a60e3cc7c929 ("net: make skb_splice_bits more configureable") but really even then all we needed is some forward declarations. Most of that code is now gone, and remaining has fwd declarations. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-01-27net: skbuff: drop the linux/sched.h includeJakub Kicinski1-1/+0
linux/sched.h was added for skb_mstamp_* (all the way back before linux/sched.h got split and linux/sched/clock.h created). We don't need it in skbuff.h any more. Sadly this change is currently a noop because linux/dma-mapping.h and net/page_pool.h pull in half of the universe. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-01-27net: skbuff: drop the linux/sched/clock.h includeJakub Kicinski1-1/+0
It used to be necessary for skb_mstamp_* static inlines, but those are gone since we moved to usec timestamps in TCP, in 2017. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-01-27net: add missing includes of linux/sched/clock.hJakub Kicinski1-0/+1
Number of files depend on linux/sched/clock.h getting included by linux/skbuff.h which soon will no longer be the case. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-01-27net: skbuff: drop the linux/textsearch.h includeJakub Kicinski1-1/+1
This include was added for skb_find_text() but all we need there is a forward declaration of struct ts_config. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-01-27net: skbuff: drop the linux/net.h includeJakub Kicinski1-1/+0
It appears nothing needs it. The kernel builds fine with this include removed, building an otherwise empty source file with: #include <linux/skbuff.h> #ifdef _LINUX_NET_H #error linux/net.h is back #endif works too (meaning net.h is not just pulled in indirectly). This gives us a slight 0.5% reduction in the pre-processed size of skbuff.h. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-01-27net: add missing includes of linux/net.hJakub Kicinski1-0/+1
linux/net.h will soon not be included by linux/skbuff.h. Fix the cases where source files were depending on the implicit include. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-01-27leds: led-class: Add generic [devm_]led_get()Hans de Goede1-0/+21
Add a generic [devm_]led_get() method which can be used on both devicetree and non devicetree platforms to get a LED classdev associated with a specific function on a specific device, e.g. the privacy LED associated with a specific camera sensor. Note unlike of_led_get() this takes a string describing the function rather then an index. This is done because e.g. camera sensors might have a privacy LED, or a flash LED, or both and using an index approach leaves it unclear what the function of index 0 is if there is only 1 LED. This uses a lookup-table mechanism for non devicetree platforms. This allows the platform code to map specific LED class_dev-s to a specific device,function combinations this way. For devicetree platforms getting the LED by function-name could be made to work using the standard devicetree pattern of adding a -names string array to map names to the indexes. Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-01-27mfd: intel-m10-bmc: Add PMCI driverIlpo Järvinen1-0/+28
Add the mfd driver for the Platform Management Component Interface (PMCI) based interface of Intel MAX10 BMC controller. PMCI is a software-visible interface, connected to card BMC which provided the basic functionality of read/write BMC register. The access to the register is done indirectly via a hardware controller/bridge that handles read/write/clear commands and acknowledgments for the commands. Previously, intel-m10-bmc provided sysfs under /sys/bus/spi/devices/... which is generalized in this change because not all MAX10 BMC appear under SPI anymore. Co-developed-by: Tianfei zhang <[email protected]> Signed-off-by: Tianfei zhang <[email protected]> Co-developed-by: Russ Weight <[email protected]> Signed-off-by: Russ Weight <[email protected]> Co-developed-by: Matthew Gerlach <[email protected]> Signed-off-by: Matthew Gerlach <[email protected]> Reviewed-by: Xu Yilun <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-01-27fpga: m10bmc-sec: Make rsu status type specificIlpo Järvinen1-1/+0
The rsu status field moves from the doorbell register to the auth result register in the PMCI implementation of the MAX10 BMC. In order to prepare for that, refactor the sec update driver code to have a type specific ops that provides ->rsu_status(). Co-developed-by: Tianfei zhang <[email protected]> Signed-off-by: Tianfei zhang <[email protected]> Co-developed-by: Russ Weight <[email protected]> Signed-off-by: Russ Weight <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]> Acked-by: Xu Yilun <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-01-27mfd: intel-m10-bmc: Prefix register defines with M10BMC_N3000Ilpo Järvinen1-33/+33
Prefix the M10BMC defines register defines with M10BMC_N3000 to make it more obvious these are related to some board type. All current non-N3000 board types have the same layout so they'll be reused. The less generic makes it more obvious they're not meant for the generic/interface agnostic code. Reviewed-by: Russ Weight <[email protected]> Reviewed-by: Xu Yilun <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-01-27mfd: intel-m10-bmc: Support multiple CSR register layoutsIlpo Järvinen1-4/+34
There are different addresses for the MAX10 CSR registers. Introducing a new data structure m10bmc_csr_map for the register definition of MAX10 CSR. Provide the csr_map for SPI. Co-developed-by: Tianfei zhang <[email protected]> Signed-off-by: Tianfei zhang <[email protected]> Reviewed-by: Russ Weight <[email protected]> Reviewed-by: Xu Yilun <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-01-27mfd: intel-m10-bmc: Split into core and spi specific partsIlpo Järvinen1-0/+6
Split the common code from intel-m10-bmc driver into intel-m10-bmc-core and move the SPI bus parts into an interface specific file. intel-m10-bmc-core becomes the core MFD functions which can support multiple bus interface like SPI bus. Co-developed-by: Tianfei zhang <[email protected]> Signed-off-by: Tianfei zhang <[email protected]> Reviewed-by: Russ Weight <[email protected]> Acked-by: Guenter Roeck <[email protected]> # hwmon Reviewed-by: Xu Yilun <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-01-27mfd: intel-m10-bmc: Create m10bmc_platform_info for type specific infoIlpo Järvinen1-0/+12
BMC type specific info is currently set by a switch/case block. The size of this info is expected to grow as more dev types and features are added which would have made the switch block bloaty. Store type specific info into struct and place them into .driver_data instead because it makes things a bit cleaner. The m10bmc_type enum can be dropped as the differentiation is now fully handled by the platform info. The info member of struct intel_m10bmc that is added here is not used yet in this change but its addition logically still belongs to this change. The CSR map change that comes after this change needs to have the info member. Reviewed-by: Russ Weight <[email protected]> Reviewed-by: Xu Yilun <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-01-27mfd: intel-m10-bmc: Add missing includes to headerIlpo Järvinen1-0/+3
linux/mfd/intel-m10-bmc.h is using: - pr_err(), thus include also linux/dev_printk.h - FIELD_GET(), this include also linux/bitfield.h - GENMASK(), thus include also linux/bits.h Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Russ Weight <[email protected]> Reviewed-by: Xu Yilun <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-01-26Merge branch '40GbE' of ↵Jakub Kicinski1-72/+87
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== virtchnl: update and refactor Jesse Brandeburg says: The virtchnl.h file is used by i40e/ice physical function (PF) drivers and irdma when talking to the iavf driver. This series cleans up the header file by removing unused elements, adding/cleaning some comments, fixing the data structures so they are explicitly defined, including padding, and finally does a long overdue rename of the IWARP members in the structures to RDMA, since the ice driver and it's associated Intel Ethernet E800 series adapters support both RDMA and IWARP. The whole series should result in no functional change, but hopefully clearer code. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: virtchnl: i40e/iavf: rename iwarp to rdma virtchnl: do structure hardening virtchnl: update header and increase header clarity virtchnl: remove unused structure declaration ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2023-01-27bus: mhi: ep: Change state_lock to mutexManivannan Sadhasivam1-2/+2
state_lock, the spinlock type is meant to protect race against concurrent MHI state transitions. In mhi_ep_set_m0_state(), while the state_lock is being held, the channels are resumed in mhi_ep_resume_channels() if the previous state was M3. This causes sleeping in atomic bug, since mhi_ep_resume_channels() use mutex internally. Since the state_lock is supposed to be held throughout the state change, it is not ideal to drop the lock before calling mhi_ep_resume_channels(). So to fix this issue, let's change the type of state_lock to mutex. This would also allow holding the lock throughout all state transitions thereby avoiding any potential race. Cc: <[email protected]> # 5.19 Fixes: e4b7b5f0f30a ("bus: mhi: ep: Add support for suspending and resuming channels") Reported-by: Dan Carpenter <[email protected]> Reviewed-by: Jeffrey Hugo <[email protected]> Signed-off-by: Manivannan Sadhasivam <[email protected]>
2023-01-26xfrm: extend add state callback to set failure reasonLeon Romanovsky1-1/+1
Almost all validation logic is in the drivers, but they are missing reliable way to convey failure reason to userspace applications. Let's use extack to return this information to users. Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2023-01-26xfrm: extend add policy callback to set failure reasonLeon Romanovsky1-1/+1
Almost all validation logic is in the drivers, but they are missing reliable way to convey failure reason to userspace applications. Let's use extack to return this information to users. Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2023-01-26gpu: host1x: External timeout/cancellation for fencesMikko Perttunen1-1/+3
Currently all fences have a 30 second timeout to ensure they are cleaned up if the fence never completes otherwise. However, this one size fits all solution doesn't actually fit in every case, such as syncpoint waiting where we want to be able to have timeouts longer than 30 seconds. As such, we want to be able to give control over fence cancellation to the caller (and maybe eventually get rid of the internal timeout altogether). Here we add this cancellation mechanism by essentially adding a function for entering the timeout path by function call, and changing the syncpoint wait function to use it. Signed-off-by: Mikko Perttunen <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2023-01-26gpu: host1x: Implement job tracking using DMA fencesMikko Perttunen1-2/+4
In anticipation of removal of the intr API, implement job tracking using DMA fences instead. The main two things about this are making cdma_update schedule the work since fence completion can now be called from interrupt context, and some complication in ensuring the callback is not running when we free the fence. Signed-off-by: Mikko Perttunen <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2023-01-26net: ethtool: provide shims for stats aggregation helpers when ↵Vladimir Oltean2-11/+42
CONFIG_ETHTOOL_NETLINK=n ethtool_aggregate_*_stats() are implemented in net/ethtool/stats.c, a file which is compiled out when CONFIG_ETHTOOL_NETLINK=n. In order to avoid adding Kbuild dependencies from drivers (which call these helpers) on CONFIG_ETHTOOL_NETLINK, let's add some shim definitions which simply make the helpers dead code. This means the function prototypes should have been located in include/linux/ethtool_netlink.h rather than include/linux/ethtool.h. Fixes: 449c5459641a ("net: ethtool: add helpers for aggregate statistics") Reported-by: kernel test robot <[email protected]> Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
2023-01-26Revert "gpiolib: of: Introduce hook for missing gpio-ranges"Andy Shevchenko1-12/+0
This reverts commit 3550bba25d5587a701e6edf20e20984d2ee72c78. No users for this one, revert it for good. The ->add_pin_ranges() can be used instead. Signed-off-by: Andy Shevchenko <[email protected]> Tested-by: Stefan Wahren <[email protected]> Tested-by: Florian Fainelli <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Acked-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
2023-01-26nfsd: remove fetch_iversion export operationJeff Layton1-1/+0
Now that the i_version counter is reported in struct kstat, there is no need for this export operation. Acked-by: Chuck Lever <[email protected]> Reviewed-by: NeilBrown <[email protected]> Signed-off-by: Jeff Layton <[email protected]>
2023-01-26vfs: plumb i_version handling into struct kstatJeff Layton1-0/+9
The NFS server has a lot of special handling for different types of change attribute access, depending on the underlying filesystem. In most cases, it's doing a getattr anyway and then fetching that value after the fact. Rather that do that, add a new STATX_CHANGE_COOKIE flag that is a kernel-only symbol (for now). If requested and getattr can implement it, it can fill out this field. For IS_I_VERSION inodes, add a generic implementation in vfs_getattr_nosec. Take care to mask STATX_CHANGE_COOKIE off in requests from userland and in the result mask. Since not all filesystems can give the same guarantees of monotonicity, claim a STATX_ATTR_CHANGE_MONOTONIC flag that filesystems can set to indicate that they offer an i_version value that can never go backward. Eventually if we decide to make the i_version available to userland, we can just designate a field for it in struct statx, and move the STATX_CHANGE_COOKIE definition to the uapi header. Reviewed-by: NeilBrown <[email protected]> Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Jeff Layton <[email protected]>
2023-01-26fs: clarify when the i_version counter must be updatedJeff Layton1-2/+20
The i_version field in the kernel has had different semantics over the decades, but NFSv4 has certain expectations. Update the comments in iversion.h to describe when the i_version must change. Cc: Colin Walters <[email protected]> Cc: NeilBrown <[email protected]> Cc: Trond Myklebust <[email protected]> Cc: Dave Chinner <[email protected]> Reviewed-by: Christian Brauner <[email protected]> Signed-off-by: Jeff Layton <[email protected]>
2023-01-26fs: uninline inode_query_iversionJeff Layton1-36/+2
Reviewed-by: NeilBrown <[email protected]> Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Christian Brauner <[email protected]> Signed-off-by: Jeff Layton <[email protected]>
2023-01-25bpf/selftests: Verify struct_ops prog sleepable behaviorDavid Vernet1-0/+1
In a set of prior changes, we added the ability for struct_ops programs to be sleepable. This patch enhances the dummy_st_ops selftest suite to validate this behavior by adding a new sleepable struct_ops entry to dummy_st_ops. Signed-off-by: David Vernet <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-01-25bpf: Pass const struct bpf_prog * to .check_memberDavid Vernet1-1/+2
The .check_member field of struct bpf_struct_ops is currently passed the member's btf_type via const struct btf_type *t, and a const struct btf_member *member. This allows the struct_ops implementation to check whether e.g. an ops is supported, but it would be useful to also enforce that the struct_ops prog being loaded for that member has other qualities, like being sleepable (or not). This patch therefore updates the .check_member() callback to also take a const struct bpf_prog *prog argument. Signed-off-by: David Vernet <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-01-25virtchnl: i40e/iavf: rename iwarp to rdmaJesse Brandeburg1-28/+37
Since the latest Intel hardware does both IWARP and ROCE, rename the term IWARP in the virtchnl header to be RDMA. Do this for both upper and lower case instances. Many of the non-virtchnl.h changes were done with regular expression replacements using perl like: perl -p -i -e 's/_IWARP/_RDMA/' <files> perl -p -i -e 's/_iwarp/_rdma/' <files> and I had to pick up a few instances manually. The virtchnl.h header has some comments and clarity added around when to use certain defines. note: had to fix a checkpatch warning for a long line by wrapping one of the lines I changed. Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Jakub Andrysiak <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
2023-01-25virtchnl: do structure hardeningJesse Brandeburg1-16/+32
The virtchnl interface can have a bunch of "soft" defined structures hardened by using explicit sizes for declarations, and then referring to the enum type that uses them in a comment. None of these changes should change any of the structure sizes. Also, remove a duplicate line in a switch statement and let two cases uses the same code. Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Marek Szlosek <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
2023-01-25virtchnl: update header and increase header clarityJesse Brandeburg1-15/+18
We already have the SPDX header, so just leave a copyright notice with an updated year and get rid of the boilerplate header (so 2002!). In addition, update a couple of comments to clarify how the various parts of the virtchannel header interaction work. No functional changes. Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Marek Szlosek <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
2023-01-25virtchnl: remove unused structure declarationJesse Brandeburg1-13/+0
Nothing uses virtchnl_msg, just remove it. Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Marek Szlosek <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
2023-01-25soc: mediatek: add cmdq support of mtk-mmsys config API for mt8195 vdosys1Nancy.Lin1-4/+11
Add cmdq support for mtk-mmsys config API. The mmsys config register settings need to take effect with the other HW settings(like OVL_ADAPTOR...) at the same vblanking time. If we use CPU to write the mmsys reg, we can't guarantee all the settings can be written in the same vblanking time. Cmdq is used for this purpose. We prepare all the related HW settings in one cmdq packet. The first command in the packet is "wait stream done", and then following with all the HW settings. After the cmdq packet is flush to GCE HW. The GCE waits for the "stream done event" to coming and then starts flushing all the HW settings. This can guarantee all the settings flush in the same vblanking. Signed-off-by: Nancy.Lin <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: CK Hu <[email protected]> Tested-by: AngeloGioacchino Del Regno <[email protected]> Tested-by: Bo-Chen Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
2023-01-25soc: mediatek: add mtk-mmsys config API for mt8195 vdosys1Nancy.Lin1-0/+9
Add four mmsys config APIs. The config APIs are used for config mmsys reg. Some mmsys regs need to be set according to the HW engine binding to the mmsys simultaneously. 1. mtk_mmsys_merge_async_config: config merge async width/height. async is used for cross-clock domain synchronization. 2. mtk_mmsys_hdr_confing: config hdr backend async width/height. 3. mtk_mmsys_mixer_in_config and mtk_mmsys_mixer_in_config: config mixer related settings. Signed-off-by: Nancy.Lin <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: CK Hu <[email protected]> Tested-by: AngeloGioacchino Del Regno <[email protected]> Tested-by: Bo-Chen Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
2023-01-25soc: mediatek: add mtk-mmsys ethdr and mdp_rdma componentsNancy.Lin1-0/+9
Add new mmsys component: ethdr_mixer and mdp_rdma. These components will use in mt8195 vdosys1. Signed-off-by: Nancy.Lin <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: CK Hu <[email protected]> Tested-by: AngeloGioacchino Del Regno <[email protected]> Tested-by: Bo-Chen Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
2023-01-25usb: gadget: Add support for RZ/V2M USB3DRD driverBiju Das1-0/+20
The RZ/V2M USB3.1 Gen1 Interface (USB) composed of a USB3.1 Gen1 Dual Role Device controller (USB3DRD), a USB3.1 Gen1 Host controller (USB3HOST), a USB3.1 Gen1 Peripheral controller (USB3PERI). The reset for both host and peri are located in USB3DRD block. The USB3DRD registers are mapped in the AXI address space of the Peripheral module. Add USB3DRD driver to handle reset for both host and peri modules. Signed-off-by: Biju Das <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>