linux-2.6-block.git
4 months agostaging: vc04_services: Delete unnecessary NULL check
Dan Carpenter [Wed, 24 Apr 2024 11:43:28 +0000 (14:43 +0300)]
staging: vc04_services: Delete unnecessary NULL check

The "state" pointer points to an offset in the middle of the "mgmt"
struct so it can't possibly be NULL.  And also we dereferenced it on the
line before.  So this NULL check is pointless.  Delete it.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/526ec2ff-6277-4d5d-b2d9-63b087a97c7c@moroto.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agostaging: vc04_services: vchiq_arm: Fix NULL ptr dereferences
Stefan Wahren [Sat, 20 Apr 2024 09:12:40 +0000 (11:12 +0200)]
staging: vc04_services: vchiq_arm: Fix NULL ptr dereferences

The commit 8c9753f63905 ("staging: vc04_services: vchiq_arm: Drop
g_cache_line_size") introduced NULL pointer dereferences by
using the wrong device.

Fixes: 8c9753f63905 ("staging: vc04_services: vchiq_arm: Drop g_cache_line_size")
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20240420091240.9552-1-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable DssCCk
Tree Davies [Sun, 28 Apr 2024 23:01:06 +0000 (16:01 -0700)]
Staging: rtl8192e: Rename variable DssCCk

Rename variable DssCCk to dss_cck
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-19-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable ExtHTCapInfo
Tree Davies [Sun, 28 Apr 2024 23:01:05 +0000 (16:01 -0700)]
Staging: rtl8192e: Rename variable ExtHTCapInfo

Rename variable ExtHTCapInfo to ext_ht_cap_info
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-18-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable MPDUDensity
Tree Davies [Sun, 28 Apr 2024 23:01:04 +0000 (16:01 -0700)]
Staging: rtl8192e: Rename variable MPDUDensity

Rename variable MPDUDensity to mpdu_density
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-17-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable MaxRxAMPDUFactor
Tree Davies [Sun, 28 Apr 2024 23:01:03 +0000 (16:01 -0700)]
Staging: rtl8192e: Rename variable MaxRxAMPDUFactor

Rename variable MaxRxAMPDUFactor to max_rx_ampdu_factor
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-16-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable MaxAMSDUSize
Tree Davies [Sun, 28 Apr 2024 23:01:02 +0000 (16:01 -0700)]
Staging: rtl8192e: Rename variable MaxAMSDUSize

Rename variable MaxAMSDUSize to max_amsdu_size
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-15-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable DelayBA
Tree Davies [Sun, 28 Apr 2024 23:01:01 +0000 (16:01 -0700)]
Staging: rtl8192e: Rename variable DelayBA

Rename variable DelayBA to delay_ba
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-14-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable RxSTBC
Tree Davies [Sun, 28 Apr 2024 23:01:00 +0000 (16:01 -0700)]
Staging: rtl8192e: Rename variable RxSTBC

Rename variable RxSTBC to rx_stbc
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-13-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable TxSTBC
Tree Davies [Sun, 28 Apr 2024 23:00:59 +0000 (16:00 -0700)]
Staging: rtl8192e: Rename variable TxSTBC

Rename variable TxSTBC to tx_stbc
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-12-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable GreenField
Tree Davies [Sun, 28 Apr 2024 23:00:58 +0000 (16:00 -0700)]
Staging: rtl8192e: Rename variable GreenField

Rename variable GreenField to green_field
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-11-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable ShortGI20Mhz
Tree Davies [Sun, 28 Apr 2024 23:00:57 +0000 (16:00 -0700)]
Staging: rtl8192e: Rename variable ShortGI20Mhz

Rename variable ShortGI20Mhz to short_gi_20mhz
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-10-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable ShortGI40Mhz
Tree Davies [Sun, 28 Apr 2024 23:00:56 +0000 (16:00 -0700)]
Staging: rtl8192e: Rename variable ShortGI40Mhz

Rename variable ShortGI40Mhz to short_gi_40mhz
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-9-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable MimoPwrSave
Tree Davies [Sun, 28 Apr 2024 23:00:55 +0000 (16:00 -0700)]
Staging: rtl8192e: Rename variable MimoPwrSave

Rename variable MimoPwrSave to mimo_pwr_save
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-8-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable AdvCoding
Tree Davies [Sun, 28 Apr 2024 23:00:54 +0000 (16:00 -0700)]
Staging: rtl8192e: Rename variable AdvCoding

Rename variable AdvCoding to adv_coding
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-7-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable ChlWidth
Tree Davies [Sun, 28 Apr 2024 23:00:53 +0000 (16:00 -0700)]
Staging: rtl8192e: Rename variable ChlWidth

Rename variable ChlWidth to chl_width
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-6-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable LSigTxopProtect
Tree Davies [Sun, 28 Apr 2024 23:00:52 +0000 (16:00 -0700)]
Staging: rtl8192e: Rename variable LSigTxopProtect

Rename variable LSigTxopProtect to lsig_txop_protect
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-5-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable OptMode
Tree Davies [Sun, 28 Apr 2024 23:00:51 +0000 (16:00 -0700)]
Staging: rtl8192e: Rename variable OptMode

Rename variable OptMode to opt_mode
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-4-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable CurrentAMPDUFactor
Tree Davies [Sun, 28 Apr 2024 23:00:50 +0000 (16:00 -0700)]
Staging: rtl8192e: Rename variable CurrentAMPDUFactor

Rename variable CurrentAMPDUFactor to current_ampdu_factor
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-3-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agoStaging: rtl8192e: Rename variable CurSTAExtChnlOffset
Tree Davies [Sun, 28 Apr 2024 23:00:49 +0000 (16:00 -0700)]
Staging: rtl8192e: Rename variable CurSTAExtChnlOffset

Rename variable CurSTAExtChnlOffset to cur_sta_ext_chnl_offset
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-2-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 months agofbtft: seps525: Don't use "proxy" headers
Andy Shevchenko [Tue, 23 Apr 2024 17:36:23 +0000 (20:36 +0300)]
fbtft: seps525: Don't use "proxy" headers

Update header inclusions to follow IWYU (Include What You Use)
principle.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Link: https://lore.kernel.org/r/20240423173623.2748621-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: vc04_services: Drop completed TODO item
Umang Jain [Fri, 12 Apr 2024 07:57:43 +0000 (13:27 +0530)]
staging: vc04_services: Drop completed TODO item

The memory barrier comments are added in
commit f6c99d86246a ("staging: vchiq_arm: Add missing memory barrier comments")

Drop the respective item from the TODO list.

Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20240412075743.60712-12-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: vc04_services: Move global g_state to vchiq_state
Umang Jain [Fri, 12 Apr 2024 07:57:42 +0000 (13:27 +0530)]
staging: vc04_services: Move global g_state to vchiq_state

The patch intended to drop the g_state pointer.
g_state is supposed to be a central place to track the state
via vchiq_state. This is now moved to be contained in the
struct vchiq_drv_mgmt. As a result vchiq_get_state() is also removed.

In order to have access to vchiq_drv_mgmt, vchiq_initialise()
and vchiq_mmal_init() are modified to receive a struct device pointer
as one of their function parameter

The vchiq_state pointer is now passed directly to
vchiq_dump_platform_instances() to get access to the state instead
getting it via vchiq_get_state().

For the char device, struct miscdevice is retrieved by struct file's
private data in vchiq_open and struct vchiq_drv_mgmt is retrieved
thereafter.

Removal of global variable members is now addressed hence, drop
the corresponding item from the TODO list.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20240412075743.60712-11-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: vc04_services: vchiq_mmal: Rename service_callback()
Umang Jain [Fri, 12 Apr 2024 07:57:41 +0000 (13:27 +0530)]
staging: vc04_services: vchiq_mmal: Rename service_callback()

Rename the service_callback static function to mmal_service_callback()
since the function signature conflicts with:

extern int
service_callback(struct vchiq_instance *vchiq_instance, enum vchiq_reason reason,
                 struct vchiq_header *header, unsigned int handle, void *bulk_userdata);

in vc04_services/interface/vchiq_arm/vchiq_arm.h

In a subsequent patch, we will include vchiq_arm.h header to
mmal-vchiq.c, which will then complain of this conflict. Hence,
this patch is meant to handle the conflict beforehand.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20240412075743.60712-10-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: vc04_services: Move spinlocks to vchiq_state
Umang Jain [Fri, 12 Apr 2024 07:57:40 +0000 (13:27 +0530)]
staging: vc04_services: Move spinlocks to vchiq_state

The msg_queue_spinlock, quota_spinlock and bulk_waiter_spinlock
are allocated globally. Instead move them to struct vchiq_state
and initialise them in vchiq_init_state().

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20240412075743.60712-9-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: vc04_services: Move global memory mapped pointer
Umang Jain [Fri, 12 Apr 2024 07:57:39 +0000 (13:27 +0530)]
staging: vc04_services: Move global memory mapped pointer

g_regs stores the remapped memory pointer for the vchiq platform.
It can be moved to struct vchiq_drv_mgmt instead of being global.

Adjust the affected functions accordingly. Pass vchiq_state pointer
wherever necessary to access struct vchiq_drv_mgmt.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20240412075743.60712-8-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: vc04_services: Move global variables tracking allocated pages
Umang Jain [Fri, 12 Apr 2024 07:57:38 +0000 (13:27 +0530)]
staging: vc04_services: Move global variables tracking allocated pages

The variables tracking allocated pages fragments in vchiq_arm.c
can be easily moved to struct vchiq_drv_mgmt instead of being global.
This helps us to drop the non-essential global variables in the vchiq
interface.

No functional changes intended in this patch.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20240412075743.60712-7-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: vc04_services: Drop vchiq_connected.[ch] files
Umang Jain [Fri, 12 Apr 2024 07:57:37 +0000 (13:27 +0530)]
staging: vc04_services: Drop vchiq_connected.[ch] files

The vchiq_connected.[ch] just implements two function:

- vchiq_add_connected_callback()
- vchiq_call_connected_callbacks()

for the deferred vchiq callbacks. Those can easily live in
vchiq_arm.[ch], hence move them. This allows making the
vchiq_call_connected_callbacks() function static.

The move doesn't copy over MAX_CALLBACKS because it is the same as
VCHIQ_DRV_MAX_CALLBACKS. Hence, it now being used in
vchiq_add_connected_callback().

No functional changes intended in this patch.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20240412075743.60712-6-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: vc04_services: Move variables for tracking connections
Umang Jain [Fri, 12 Apr 2024 07:57:36 +0000 (13:27 +0530)]
staging: vc04_services: Move variables for tracking connections

Connections to the vchiq driver are tracked using global variables.
Drop those and introduce them as members of struct vchiq_drv_mgmt.
Hence, struct vchiq_drv_mgmt will be used to track the connections.

Also, store a vchiq_drv_mgmt pointer to struct vchiq_device to
have easy access to struct vchiq_drv_mgmt across vchiq devices.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20240412075743.60712-5-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: vc04_services: vchiq_arm: Drop g_cache_line_size
Umang Jain [Fri, 12 Apr 2024 07:57:35 +0000 (13:27 +0530)]
staging: vc04_services: vchiq_arm: Drop g_cache_line_size

The cache-line-size is cached in struct vchiq_platform_info.
There is no need to cache this again via g_cache_line_size
and use it. Instead use the value from vchiq_platform_info directly.

While at it, move the comment about L2 cache line size in the kerneldoc
block of struct vchiq_platform_info.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20240412075743.60712-4-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: vc04_services: vchiq_arm: Split driver static and runtime data
Umang Jain [Fri, 12 Apr 2024 07:57:34 +0000 (13:27 +0530)]
staging: vc04_services: vchiq_arm: Split driver static and runtime data

vchiq_drvdata combines two types of book-keeping data. There is
platform-specific static data (for e.g. cache lines size) and then
data needed for book-keeping at runtime.

Split the data into two structures: struct vchiq_platform_info and
struct vchiq_drv_mgmt. The vchiq_drv_mgmt is allocated at runtime
during probe and will be extended in subsequent patches to remove
all global variables allocated.

No functional changes intended in this patch.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20240412075743.60712-3-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: vc04_services: Drop g_once_init global variable
Umang Jain [Fri, 12 Apr 2024 07:57:33 +0000 (13:27 +0530)]
staging: vc04_services: Drop g_once_init global variable

g_once_init is not used in a meaningful way anywhere. Drop it
along with connected_init() which sets it.

Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20240412075743.60712-2-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: vc04_services: Re-align function parameters
Sumadhura Kalyan [Mon, 15 Apr 2024 17:11:38 +0000 (22:41 +0530)]
staging: vc04_services: Re-align function parameters

Checkpatch complains that:

CHECK: Lines should not end with a '('
+typedef void (*vchiq_mmal_buffer_cb)(

Re-align the function parameters to make checkpatch happy.

Signed-off-by: Sumadhura Kalyan <opensourcecond@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240415171138.5849-1-opensourcecond@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: vchiq: Reformat Kconfig help texts
Stefan Wahren [Sun, 14 Apr 2024 19:22:57 +0000 (21:22 +0200)]
staging: vchiq: Reformat Kconfig help texts

The lines in the VCHIQ Kconfig help texts are too long, which makes
it hard to read the menuconfig. So reformat them to restore the
readability.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20240414192257.6011-1-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: nvec: update TODO
Marc Dietrich [Sat, 6 Apr 2024 12:31:23 +0000 (14:31 +0200)]
staging: nvec: update TODO

Remove isr delay from the bill.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Link: https://lore.kernel.org/r/20240406123123.37148-6-marvin24@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: nvec: make touchpad init synchronous
Marc Dietrich [Sat, 6 Apr 2024 12:31:21 +0000 (14:31 +0200)]
staging: nvec: make touchpad init synchronous

Currently, we are constantly sending commands to the EC without waiting for them to be
executed. For the touchpad initialization this only worked because we were waiting 200 Âµs
between each submitted command byte, so the EC had enough time to execute. In the furture
we like to avoid this delay, so we need to wait for each command to be executed first.
Do this by switching from asynchronous to synchronous command transmission.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Link: https://lore.kernel.org/r/20240406123123.37148-4-marvin24@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: nvec: make keyboard init synchronous
Marc Dietrich [Sat, 6 Apr 2024 12:31:20 +0000 (14:31 +0200)]
staging: nvec: make keyboard init synchronous

Currently, we are constantly sending commands to the EC without waiting for them to be
executed. This can lead to confusion, especially if we initialize several different devices
one after the other.
To avoid this, we are switching from asynchronous to synchronous command transmission.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Link: https://lore.kernel.org/r/20240406123123.37148-3-marvin24@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: nvec: add ability to ignore EC responses in sync writes
Marc Dietrich [Sat, 6 Apr 2024 12:31:19 +0000 (14:31 +0200)]
staging: nvec: add ability to ignore EC responses in sync writes

In case we just want to submit a message to the EC but are not
interested in its response, we can free the response buffer early.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Link: https://lore.kernel.org/r/20240406123123.37148-2-marvin24@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: greybus: change strncpy() to strscpy_pad()
Arnd Bergmann [Mon, 8 Apr 2024 19:48:11 +0000 (21:48 +0200)]
staging: greybus: change strncpy() to strscpy_pad()

gcc-10 warns about a strncpy() that does not enforce zero-termination:

In file included from include/linux/string.h:369,
                 from drivers/staging/greybus/fw-management.c:9:
In function 'strncpy',
    inlined from 'fw_mgmt_backend_fw_update_operation' at drivers/staging/greybus/fw-management.c:306:2:
include/linux/fortify-string.h:108:30: error: '__builtin_strncpy' specified bound 10 equals destination size [-Werror=stringop-truncation]
  108 | #define __underlying_strncpy __builtin_strncpy
      |                              ^
include/linux/fortify-string.h:187:9: note: in expansion of macro '__underlying_strncpy'
  187 |  return __underlying_strncpy(p, q, size);
      |         ^~~~~~~~~~~~~~~~~~~~

For some reason, I cannot reproduce this with gcc-9 or gcc-11, and I only
get a warning for one of the four related strncpy()s, so I'm not
sure what's going on.

Change all four to strscpy_pad(), which is the safest replacement here,
as it avoids ending up with uninitialized stack data in the tag name.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Justin Stitt <justinstitt@google.com>
Link: https://github.com/KSPP/linux/issues/90
Link: https://lore.kernel.org/r/20240408194821.3183462-3-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: rtl8723bs: convert strncpy to strscpy
Arnd Bergmann [Mon, 8 Apr 2024 19:48:10 +0000 (21:48 +0200)]
staging: rtl8723bs: convert strncpy to strscpy

gcc-9 complains about a possibly unterminated string in the strncpy() destination:

In function 'rtw_cfg80211_add_monitor_if',
    inlined from 'cfg80211_rtw_add_virtual_intf' at drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2209:9:
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2146:2: error: 'strncpy' specified bound 16 equals destination size [-Werror=stringop-truncation]
 2146 |  strncpy(mon_ndev->name, name, IFNAMSIZ);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This one is a false-positive because of the explicit termination in the following
line, and recent versions of clang and gcc no longer warn about this.

Interestingly, the other strncpy() in this file is missing a termination but
does not produce a warning, possibly because of the type confusion and the
cast between u8 and char.

Change both strncpy() instances to strscpy(), which avoids the warning as well
as the possibly missing termination. No additional padding is needed here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://github.com/KSPP/linux/issues/90
Reviewed-by: Justin Stitt <justinstitt@google.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240408194821.3183462-2-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: rts5208: replace weird strncpy() with memcpy()
Arnd Bergmann [Mon, 8 Apr 2024 19:48:09 +0000 (21:48 +0200)]
staging: rts5208: replace weird strncpy() with memcpy()

When -Wstringop-truncation is enabled, gcc finds a function that
always does a short copy:

In function 'inquiry',
    inlined from 'rtsx_scsi_handler' at drivers/staging/rts5208/rtsx_scsi.c:3210:12:
drivers/staging/rts5208/rtsx_scsi.c:526:17: error: 'strncpy' output truncated copying between 1 and 28 bytes from a string of length 28 [-Werror=stringop-truncation]
  526 |                 strncpy(buf + 8, inquiry_string, sendbytes - 8);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The code originally had a memcpy() that would overread the source string,
and commit 88a5b39b69ab ("staging/rts5208: Fix read overflow in memcpy")
fixed this but introduced the warning about truncation in the process.

As Dan points out, the final space in the inquiry_string always gets
cut off, so remove it here for clarity, leaving exactly the 28 non-NUL
characters that can get copied into the output. In the 'pro_formatter_flag'
this is followed by another 20 bytes from the 'formatter_inquiry_str'
array, but there the output never contains a NUL-termination, and the
length is known, so memcpy() is the more logical choice.

Cc: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/lkml/695be581-548f-4e5e-a211-5f3b95568e77@moroto.mountain/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Justin Stitt <justinstitt@google.com>
Link: https://lore.kernel.org/r/20240408194821.3183462-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: greybus: Replace gcam macros with direct dev log calls
Jackson Chui [Mon, 8 Apr 2024 22:44:40 +0000 (15:44 -0700)]
staging: greybus: Replace gcam macros with direct dev log calls

Reported by checkpatch:

CHECK: Macro argument 'gcam' may be better as '(gcam)' to avoid
precedence issues

Inline standard calls to 'dev_*' kernel logging functions, in favor
of 'gcam_*' macros, to clear up gcam-related logging.

Signed-off-by: Jackson Chui <jacksonchui.qwerty@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/ZhRzWNiak1qOdJLL@jc-ubuntu-dev-korn-1
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agoStaging: rtl8723bs: Delete dead code from update_current_network()
Meir Elisha [Sun, 7 Apr 2024 12:38:36 +0000 (15:38 +0300)]
Staging: rtl8723bs: Delete dead code from update_current_network()

Remove dead code from rtw_mlme.c in order to improve code readability.

Signed-off-by: Meir Elisha <meir6264@gmail.com>
Link: https://lore.kernel.org/r/20240407123836.115055-1-meir6264@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: pi433: Reorder pi433_exit cleanup calls.
Shahar Avidar [Fri, 5 Apr 2024 07:40:00 +0000 (10:40 +0300)]
staging: pi433: Reorder pi433_exit cleanup calls.

debugfs_remove was called out of order.
Ensure pi433 init & exit have reverse function calls order.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240405074000.3481217-8-ikobh7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: pi433: Add debugfs_remove in case of driver register fails.
Shahar Avidar [Fri, 5 Apr 2024 07:39:59 +0000 (10:39 +0300)]
staging: pi433: Add debugfs_remove in case of driver register fails.

debugfs resources were never cleaned in case of failure to register driver.

Reported-by Dan Carpenter <dan.carpenter@linaro.org>

Fixes: 4ef027d5a367 ("staging: pi433: add debugfs interface")
Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240405074000.3481217-7-ikobh7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: pi433: Remove duplicated code using the "goto" error recovery scheme.
Shahar Avidar [Fri, 5 Apr 2024 07:39:58 +0000 (10:39 +0300)]
staging: pi433: Remove duplicated code using the "goto" error recovery scheme.

pi433_init had "unregister_chrdev" called twice.
Remove it using goto statements.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240405074000.3481217-6-ikobh7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: pi433: Rename "pi433_dev" of type "dev_t" to "pi433_devt"
Shahar Avidar [Fri, 5 Apr 2024 07:39:57 +0000 (10:39 +0300)]
staging: pi433: Rename "pi433_dev" of type "dev_t" to "pi433_devt"

Distinguish struct device type instances from dev_t instances
to enhance readability.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240405074000.3481217-5-ikobh7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: pi433: Replace pi433_receive param void type to struct pi433_device.
Shahar Avidar [Fri, 5 Apr 2024 07:39:56 +0000 (10:39 +0300)]
staging: pi433: Replace pi433_receive param void type to struct pi433_device.

pi433_receive is only called once.
It immediately assigns the data param to a struct pi433_device.
Rename param name to pi433.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240405074000.3481217-4-ikobh7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: pi433: Rename struct pi433_device instances to pi433.
Shahar Avidar [Fri, 5 Apr 2024 07:39:55 +0000 (10:39 +0300)]
staging: pi433: Rename struct pi433_device instances to pi433.

Just as other devices use specific names for instantiation,
struct_pi433 should also have a distinct name.
Moreover, some other structs use the "dev" or "device" in their naming
conventions for members, which can be confusing.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240405074000.3481217-3-ikobh7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: pi433: Rename struct pi433_device buffer field to tx_buffer.
Shahar Avidar [Fri, 5 Apr 2024 07:39:54 +0000 (10:39 +0300)]
staging: pi433: Rename struct pi433_device buffer field to tx_buffer.

Driver holds buffers in different structs, as does the HW.
Using explicit names for buffers increases readability.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240405074000.3481217-2-ikobh7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agoMAINTAINERS: vt665?: Replace Forest with Philipp as maintainer
Philipp Hortmann [Thu, 4 Apr 2024 20:24:50 +0000 (22:24 +0200)]
MAINTAINERS: vt665?: Replace Forest with Philipp as maintainer

Remove Forest Bond <forest@alittletooquiet.net> as maintainer as this
email address is not reachable anymore. Add me as I want to take care
of the driver and I do have vt6655 and vt6656 hardware to test.

Link: https://lore.kernel.org/linux-staging/d599cd7b-a5d6-4f2d-8744-10254b75f7e5@moroto.mountain/
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Acked-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240404202450.GA23408@matrix-ESPRIMO-P710
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: bcm2835-audio: add terminating new line to Kconfig
Prasad Pandit [Sat, 30 Mar 2024 04:04:11 +0000 (09:34 +0530)]
staging: bcm2835-audio: add terminating new line to Kconfig

Add terminating new line to the Kconfig file. It helps while
displaying file with cat(1) command.

Signed-off-by: Prasad Pandit <pjp@fedoraproject.org>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Acked-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240330040411.3273337-1-ppandit@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agogreybus: arche-ctrl: move device table to its right location
Arnd Bergmann [Wed, 3 Apr 2024 08:06:35 +0000 (10:06 +0200)]
greybus: arche-ctrl: move device table to its right location

The arche-ctrl has two platform drivers and three of_device_id tables,
but one table is only used for the the module loader, while the other
two seem to be associated with their drivers.

This leads to a W=1 warning when the driver is built-in:

drivers/staging/greybus/arche-platform.c:623:34: error: 'arche_combined_id' defined but not used [-Werror=unused-const-variable=]
  623 | static const struct of_device_id arche_combined_id[] = {

Drop the extra table and register both tables that are actually
used as the ones for the module loader instead.

Fixes: 7b62b61c752a ("greybus: arche-ctrl: Don't expose driver internals to arche-platform driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240403080702.3509288-18-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: nvec: Fix documentation typo in nvec.c
Dorine Tipo [Sun, 31 Mar 2024 17:05:48 +0000 (17:05 +0000)]
staging: nvec: Fix documentation typo in nvec.c

This commit corrects the spelling of "initialisation" which was
misspelled as "intialisation" in the irqreturn_t nvec_interrupt()
documentation.
The issue was found using checkpatch.

Signed-off-by: Dorine Tipo <dorine.a.tipo@gmail.com>
Link: https://lore.kernel.org/r/20240331170548.81409-1-dorine.a.tipo@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: vt6655: remove redundant assignment to variable byData
Colin Ian King [Thu, 28 Mar 2024 11:15:57 +0000 (11:15 +0000)]
staging: vt6655: remove redundant assignment to variable byData

Variable byData is being assigned a value that is never read, it is
being re-assigned later on. The assignment is redundant and can be
removed.

Cleans up clang scan build warning:
drivers/staging/vt6655/srom.c:67:2: warning: Value stored to 'byData'
is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240328111557.761380-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agoRevert "staging: vc04_services: vchiq_core: Stop kthreads on shutdown"
Umang Jain [Wed, 3 Apr 2024 05:21:00 +0000 (10:51 +0530)]
Revert "staging: vc04_services: vchiq_core: Stop kthreads on shutdown"

This reverts commit d9c60badccc183eb971e0941bb86f9475d4b9551.

It has been reported that stopping kthreads corrupts the VC04 firmware
and creates issues at boot time [1].

A fix-up version of this patch
bac670144384 ("staging: vc04_services: Stop kthreads on .remove") [2]
was also attempted but it also doesn't properly fix the TODO
(i.e. clean module unload) and similar errors were observed when
stopping these khthreads on RaspberryPi 3.

Hence, revert the entire patch for now since it is not very clear why
stopping the kthreads breaks the firmware.

[1]: https://lore.kernel.org/linux-staging/CAPY8ntBaz_RGr2sboQqbuUv+xZNfRct6-sckDLYPTig_HWyXEw@mail.gmail.com/t/#me90b9a9bc91599f18cd65ceb7eedd40e5fee0cdd

[2]: https://lore.kernel.org/linux-staging/171161507013.3072637.12125782507523919379@ping.linuxembedded.co.uk/T/#m1d3de7d2fa73b2447274858353bbd4a0c3a8ba14

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20240403052100.2794-1-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: ks7010: replace open-coded module_sdio_driver()
Krzysztof Kozlowski [Fri, 29 Mar 2024 17:10:57 +0000 (18:10 +0100)]
staging: ks7010: replace open-coded module_sdio_driver()

Use module_sdio_driver() instead of open-coding it.  No functional
difference.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240329171057.63941-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: rtl8192e: remove unnecessary wrapper
Michael Straube [Fri, 29 Mar 2024 11:14:58 +0000 (12:14 +0100)]
staging: rtl8192e: remove unnecessary wrapper

_rtl92e_dm_ctrl_initgain_byrssi() is just a wrapper around
_rtl92e_dm_ctrl_initgain_byrssi_driver(). Using a wrapper here adds
no value, remove it. Keep the name _rtl92e_dm_ctrl_initgain_byrssi().

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240329111458.14961-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: pi433: drop driver owner assignment
Krzysztof Kozlowski [Wed, 27 Mar 2024 17:47:24 +0000 (18:47 +0100)]
staging: pi433: drop driver owner assignment

Core in spi_register_driver() already sets the .owner, so driver
does not need to.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240327174724.519607-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agostaging: axis-fifo: Fix indentation
Uri Arev [Tue, 5 Mar 2024 21:14:01 +0000 (23:14 +0200)]
staging: axis-fifo: Fix indentation

Warning reported by checkpatch.pl script:

CHECK: Alignment should match open parenthesis

Signed-off-by: Uri Arev <me@wantyapps.xyz>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Link: https://lore.kernel.org/r/20240305211416.755911-1-me@wantyapps.xyz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agoMerge 6.9-rc2 into staging-next
Greg Kroah-Hartman [Mon, 1 Apr 2024 15:05:28 +0000 (17:05 +0200)]
Merge 6.9-rc2 into staging-next

We need the staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 months agoLinux 6.9-rc2 v6.9-rc2
Linus Torvalds [Sun, 31 Mar 2024 21:32:39 +0000 (14:32 -0700)]
Linux 6.9-rc2

5 months agoMerge tag 'kbuild-fixes-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahi...
Linus Torvalds [Sun, 31 Mar 2024 18:23:51 +0000 (11:23 -0700)]
Merge tag 'kbuild-fixes-v6.9' of git://git./linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - Deduplicate Kconfig entries for CONFIG_CXL_PMU

 - Fix unselectable choice entry in MIPS Kconfig, and forbid this
   structure

 - Remove unused include/asm-generic/export.h

 - Fix a NULL pointer dereference bug in modpost

 - Enable -Woverride-init warning consistently with W=1

 - Drop KCSAN flags from *.mod.c files

* tag 'kbuild-fixes-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kconfig: Fix typo HEIGTH to HEIGHT
  Documentation/llvm: Note s390 LLVM=1 support with LLVM 18.1.0 and newer
  kbuild: Disable KCSAN for autogenerated *.mod.c intermediaries
  kbuild: make -Woverride-init warnings more consistent
  modpost: do not make find_tosym() return NULL
  export.h: remove include/asm-generic/export.h
  kconfig: do not reparent the menu inside a choice block
  MIPS: move unselectable FIT_IMAGE_FDT_EPM5 out of the "System type" choice
  cxl: remove CONFIG_CXL_PMU entry in drivers/cxl/Kconfig

5 months agoMerge tag 'edac_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 31 Mar 2024 18:15:32 +0000 (11:15 -0700)]
Merge tag 'edac_urgent_for_v6.9_rc2' of git://git./linux/kernel/git/ras/ras

Pull EDAC fixes from Borislav Petkov:

 - Fix more issues in the AMD FMPM driver

* tag 'edac_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
  RAS: Avoid build errors when CONFIG_DEBUG_FS=n
  RAS/AMD/FMPM: Safely handle saved records of various sizes
  RAS/AMD/FMPM: Avoid NULL ptr deref in get_saved_records()

5 months agoMerge tag 'irq_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 31 Mar 2024 18:04:51 +0000 (11:04 -0700)]
Merge tag 'irq_urgent_for_v6.9_rc2' of git://git./linux/kernel/git/tip/tip

Pull irq fixes from Borislav Petkov:

 - Fix an unused function warning on irqchip/irq-armada-370-xp

 - Fix the IRQ sharing with pinctrl-amd and ACPI OSL

* tag 'irq_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/armada-370-xp: Suppress unused-function warning
  genirq: Introduce IRQF_COND_ONESHOT and use it in pinctrl-amd

5 months agoMerge tag 'perf_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 31 Mar 2024 17:43:11 +0000 (10:43 -0700)]
Merge tag 'perf_urgent_for_v6.9_rc2' of git://git./linux/kernel/git/tip/tip

Pull x86 perf fixes from Borislav Petkov:

 - Define the correct set of default hw events on AMD Zen4

 - Use the correct stalled cycles PMCs on AMD Zen2 and newer

 - Fix detection of the LBR freeze feature on AMD

* tag 'perf_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/amd/core: Define a proper ref-cycles event for Zen 4 and later
  perf/x86/amd/core: Update and fix stalled-cycles-* events for Zen 2 and later
  perf/x86/amd/lbr: Use freeze based on availability
  x86/cpufeatures: Add new word for scattered features

5 months agoMerge tag 'timers_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 31 Mar 2024 17:34:49 +0000 (10:34 -0700)]
Merge tag 'timers_urgent_for_v6.9_rc2' of git://git./linux/kernel/git/tip/tip

Pull timers update from Borislav Petkov:

 - Volunteer in Anna-Maria and Frederic as timers co-maintainers so that
   tglx can relax more :-P

* tag 'timers_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  MAINTAINERS: Add co-maintainers for time[rs]

5 months agoMerge tag 'objtool_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 31 Mar 2024 17:30:06 +0000 (10:30 -0700)]
Merge tag 'objtool_urgent_for_v6.9_rc2' of git://git./linux/kernel/git/tip/tip

Pull objtool fix from Borislav Petkov:

 - Fix a format specifier build error in objtool during an x32 build

* tag 'objtool_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  objtool: Fix compile failure when using the x32 compiler

5 months agoMerge tag 'x86_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 31 Mar 2024 17:16:34 +0000 (10:16 -0700)]
Merge tag 'x86_urgent_for_v6.9_rc2' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Borislav Petkov:

 - Make sure single object builds in arch/x86/virt/ ala
      make ... arch/x86/virt/vmx/tdx/seamcall.o
   work again

 - Do not do ROM range scans and memory validation when the kernel is
   running as a SEV-SNP guest as those can get problematic and, before
   that, are not really needed in such a guest

 - Exclude the build-time generated vdso-image-x32.o object from objtool
   validation and in particular the return sites in there due to a
   warning which fires when an unpatched return thunk is being used

 - Improve the NMI CPUs stall message to show additional information
   about the state of each CPU wrt the NMI handler

 - Enable gcc named address spaces support only on !KCSAN configs due to
   compiler options incompatibility

 - Revert a change which was trying to use GB pages for mapping regions
   only when the regions would be large enough but that change lead to
   kexec failing

 - A documentation fixlet

* tag 'x86_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/build: Use obj-y to descend into arch/x86/virt/
  x86/sev: Skip ROM range scans and validation for SEV-SNP guests
  x86/vdso: Fix rethunk patching for vdso-image-x32.o too
  x86/nmi: Upgrade NMI backtrace stall checks & messages
  x86/percpu: Disable named address spaces for KCSAN
  Revert "x86/mm/ident_map: Use gbpages only where full GB page should be mapped."
  Documentation/x86: Fix title underline length

5 months agokconfig: Fix typo HEIGTH to HEIGHT
Isak Ellmer [Sat, 30 Mar 2024 15:19:45 +0000 (16:19 +0100)]
kconfig: Fix typo HEIGTH to HEIGHT

Fixed a typo in some variables where height was misspelled as heigth.

Signed-off-by: Isak Ellmer <isak01@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 months agoDocumentation/llvm: Note s390 LLVM=1 support with LLVM 18.1.0 and newer
Nathan Chancellor [Wed, 27 Mar 2024 17:20:36 +0000 (10:20 -0700)]
Documentation/llvm: Note s390 LLVM=1 support with LLVM 18.1.0 and newer

As of the first s390 pull request during the 6.9 merge window,
commit 691632f0e869 ("Merge tag 's390-6.9-1' of
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux"), s390 can be
built with LLVM=1 when using LLVM 18.1.0, which is the first version
that has SystemZ support implemented in ld.lld and llvm-objcopy.

Update the supported architectures table in the Kbuild LLVM
documentation to note this explicitly to make it more discoverable by
users and other developers. Additionally, this brings s390 in line with
the rest of the architectures in the table, which all support LLVM=1.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 months agokbuild: Disable KCSAN for autogenerated *.mod.c intermediaries
Borislav Petkov (AMD) [Tue, 26 Mar 2024 20:25:48 +0000 (21:25 +0100)]
kbuild: Disable KCSAN for autogenerated *.mod.c intermediaries

When KCSAN and CONSTRUCTORS are enabled, one can trigger the

  "Unpatched return thunk in use. This should not happen!"

catch-all warning.

Usually, when objtool runs on the .o objects, it does generate a section
.return_sites which contains all offsets in the objects to the return
thunks of the functions present there. Those return thunks then get
patched at runtime by the alternatives.

KCSAN and CONSTRUCTORS add this to the object file's .text.startup
section:

  -------------------
  Disassembly of section .text.startup:

  ...

  0000000000000010 <_sub_I_00099_0>:
    10:   f3 0f 1e fa             endbr64
    14:   e8 00 00 00 00          call   19 <_sub_I_00099_0+0x9>
                          15: R_X86_64_PLT32      __tsan_init-0x4
    19:   e9 00 00 00 00          jmp    1e <__UNIQUE_ID___addressable_cryptd_alloc_aead349+0x6>
                          1a: R_X86_64_PLT32      __x86_return_thunk-0x4
  -------------------

which, if it is built as a module goes through the intermediary stage of
creating a <module>.mod.c file which, when translated, receives a second
constructor:

  -------------------
  Disassembly of section .text.startup:

  0000000000000010 <_sub_I_00099_0>:
    10:   f3 0f 1e fa             endbr64
    14:   e8 00 00 00 00          call   19 <_sub_I_00099_0+0x9>
                          15: R_X86_64_PLT32      __tsan_init-0x4
    19:   e9 00 00 00 00          jmp    1e <_sub_I_00099_0+0xe>
                          1a: R_X86_64_PLT32      __x86_return_thunk-0x4

  ...

  0000000000000030 <_sub_I_00099_0>:
    30:   f3 0f 1e fa             endbr64
    34:   e8 00 00 00 00          call   39 <_sub_I_00099_0+0x9>
                          35: R_X86_64_PLT32      __tsan_init-0x4
    39:   e9 00 00 00 00          jmp    3e <__ksymtab_cryptd_alloc_ahash+0x2>
                          3a: R_X86_64_PLT32      __x86_return_thunk-0x4
  -------------------

in the .ko file.

Objtool has run already so that second constructor's return thunk cannot
be added to the .return_sites section and thus the return thunk remains
unpatched and the warning rightfully fires.

Drop KCSAN flags from the mod.c generation stage as those constructors
do not contain data races one would be interested about.

Debugged together with David Kaplan <David.Kaplan@amd.com> and Nikolay
Borisov <nik.borisov@suse.com>.

Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Closes: https://lore.kernel.org/r/0851a207-7143-417e-be31-8bf2b3afb57d@molgen.mpg.de
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: Paul Menzel <pmenzel@molgen.mpg.de> # Dell XPS 13
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
Reviewed-by: Marco Elver <elver@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 months agokbuild: make -Woverride-init warnings more consistent
Arnd Bergmann [Tue, 26 Mar 2024 14:47:16 +0000 (15:47 +0100)]
kbuild: make -Woverride-init warnings more consistent

The -Woverride-init warn about code that may be intentional or not,
but the inintentional ones tend to be real bugs, so there is a bit of
disagreement on whether this warning option should be enabled by default
and we have multiple settings in scripts/Makefile.extrawarn as well as
individual subsystems.

Older versions of clang only supported -Wno-initializer-overrides with
the same meaning as gcc's -Woverride-init, though all supported versions
now work with both. Because of this difference, an earlier cleanup of
mine accidentally turned the clang warning off for W=1 builds and only
left it on for W=2, while it's still enabled for gcc with W=1.

There is also one driver that only turns the warning off for newer
versions of gcc but not other compilers, and some but not all the
Makefiles still use a cc-disable-warning conditional that is no
longer needed with supported compilers here.

Address all of the above by removing the special cases for clang
and always turning the warning off unconditionally where it got
in the way, using the syntax that is supported by both compilers.

Fixes: 2cd3271b7a31 ("kbuild: avoid duplicate warning options")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 months agoobjtool: Fix compile failure when using the x32 compiler
Mikulas Patocka [Sat, 30 Mar 2024 19:23:08 +0000 (20:23 +0100)]
objtool: Fix compile failure when using the x32 compiler

When compiling the v6.9-rc1 kernel with the x32 compiler, the following
errors are reported. The reason is that we take an "unsigned long"
variable and print it using "PRIx64" format string.

In file included from check.c:16:
check.c: In function â€˜add_dead_ends’:
/usr/src/git/linux-2.6/tools/objtool/include/objtool/warn.h:46:17: error: format â€˜%llx’ expects argument of type â€˜long long unsigned int’, but argument 5 has type â€˜long unsigned int’ [-Werror=format=]
   46 |                 "%s: warning: objtool: " format "\n",   \
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
check.c:613:33: note: in expansion of macro â€˜WARN’
  613 |                                 WARN("can't find unreachable insn at %s+0x%" PRIx64,
      |                                 ^~~~
...

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: linux-kernel@vger.kernel.org
5 months agoMerge tag 'xfs-6.9-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Linus Torvalds [Sat, 30 Mar 2024 20:51:58 +0000 (13:51 -0700)]
Merge tag 'xfs-6.9-fixes-1' of git://git./fs/xfs/xfs-linux

Pull xfs fixes from Chandan Babu:

 - Allow stripe unit/width value passed via mount option to be written
   over existing values in the super block

 - Do not set current->journal_info to avoid its value from being miused
   by another filesystem context

* tag 'xfs-6.9-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: don't use current->journal_info
  xfs: allow sunit mount option to repair bad primary sb stripe values

5 months agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sat, 30 Mar 2024 20:44:52 +0000 (13:44 -0700)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI fixes and updates from James Bottomley:
 "Fully half this pull is updates to lpfc and qla2xxx which got
  committed just as the merge window opened. A sizeable fraction of the
  driver updates are simple bug fixes (and lock reworks for bug fixes in
  the case of lpfc), so rather than splitting the few actual
  enhancements out, we're just adding the drivers to the -rc1 pull.

  The enhancements for lpfc are log message removals, copyright updates
  and three patches redefining types. For qla2xxx it's just removing a
  debug message on module removal and the manufacturer detail update.

  The two major fixes are the sg teardown race and a core error leg
  problem with the procfs directory not being removed if we destroy a
  created host that never got to the running state. The rest are minor
  fixes and constifications"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (41 commits)
  scsi: bnx2fc: Remove spin_lock_bh while releasing resources after upload
  scsi: core: Fix unremoved procfs host directory regression
  scsi: mpi3mr: Avoid memcpy field-spanning write WARNING
  scsi: sd: Fix TCG OPAL unlock on system resume
  scsi: sg: Avoid sg device teardown race
  scsi: lpfc: Copyright updates for 14.4.0.1 patches
  scsi: lpfc: Update lpfc version to 14.4.0.1
  scsi: lpfc: Define types in a union for generic void *context3 ptr
  scsi: lpfc: Define lpfc_dmabuf type for ctx_buf ptr
  scsi: lpfc: Define lpfc_nodelist type for ctx_ndlp ptr
  scsi: lpfc: Use a dedicated lock for ras_fwlog state
  scsi: lpfc: Release hbalock before calling lpfc_worker_wake_up()
  scsi: lpfc: Replace hbalock with ndlp lock in lpfc_nvme_unregister_port()
  scsi: lpfc: Update lpfc_ramp_down_queue_handler() logic
  scsi: lpfc: Remove IRQF_ONESHOT flag from threaded IRQ handling
  scsi: lpfc: Move NPIV's transport unregistration to after resource clean up
  scsi: lpfc: Remove unnecessary log message in queuecommand path
  scsi: qla2xxx: Update version to 10.02.09.200-k
  scsi: qla2xxx: Delay I/O Abort on PCI error
  scsi: qla2xxx: Change debug message during driver unload
  ...

5 months agoMerge tag 'i2c-for-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Sat, 30 Mar 2024 20:16:21 +0000 (13:16 -0700)]
Merge tag 'i2c-for-6.9-rc2' of git://git./linux/kernel/git/wsa/linux

Pull i2c fix from Wolfram Sang:
 "A fix from Andi for I2C host drivers"

* tag 'i2c-for-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: i801: Fix a refactoring that broke a touchpad on Lenovo P1

5 months agoMerge tag 'usb-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sat, 30 Mar 2024 20:11:42 +0000 (13:11 -0700)]
Merge tag 'usb-6.9-rc2' of git://git./linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are a bunch of small USB fixes for reported problems and
  regressions for 6.9-rc2. Included in here are:

   - deadlock fixes for long-suffering issues

   - USB phy driver revert for reported problem

   - typec fixes for reported problems

   - duplicate id in dwc3 dropped

   - dwc2 driver fixes

   - udc driver warning fix

   - cdc-wdm race bugfix

   - other tiny USB bugfixes

  All of these have been in linux-next this past week with no reported
  issues"

* tag 'usb-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (26 commits)
  USB: core: Fix deadlock in port "disable" sysfs attribute
  USB: core: Add hub_get() and hub_put() routines
  usb: typec: ucsi: Check capabilities before cable and identity discovery
  usb: typec: ucsi: Clear UCSI_CCI_RESET_COMPLETE before reset
  usb: typec: ucsi_acpi: Refactor and fix DELL quirk
  usb: typec: ucsi: Ack unsupported commands
  usb: typec: ucsi: Check for notifications after init
  usb: typec: ucsi: Clear EVENT_PENDING under PPM lock
  usb: typec: Return size of buffer if pd_set operation succeeds
  usb: udc: remove warning when queue disabled ep
  usb: dwc3: pci: Drop duplicate ID
  usb: dwc3: Properly set system wakeup
  Revert "usb: phy: generic: Get the vbus supply"
  usb: cdc-wdm: close race between read and workqueue
  usb: dwc2: gadget: LPM flow fix
  usb: dwc2: gadget: Fix exiting from clock gating
  usb: dwc2: host: Fix ISOC flow in DDMA mode
  usb: dwc2: host: Fix remote wakeup from hibernation
  usb: dwc2: host: Fix hibernation flow
  USB: core: Fix deadlock in usb_deauthorize_interface()
  ...

5 months agoMerge tag 'staging-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 30 Mar 2024 19:59:00 +0000 (12:59 -0700)]
Merge tag 'staging-6.9-rc2' of git://git./linux/kernel/git/gregkh/staging

Pull staging driver fixes from Greg KH:
 "Here are two small staging driver fixes for the vc04_services driver
  that resolve reported problems:

   - strncpy fix for information leak

   - another information leak discovered by the previous strncpy fix

  Both of these have been in linux-next all this past week with no
  reported issues"

* tag 'staging-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: vc04_services: fix information leak in create_component()
  staging: vc04_services: changen strncpy() to strscpy_pad()

5 months agoMerge tag 'i2c-host-fixes-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Wolfram Sang [Sat, 30 Mar 2024 14:37:54 +0000 (15:37 +0100)]
Merge tag 'i2c-host-fixes-6.9-rc2' of git://git./linux/kernel/git/andi.shyti/linux into i2c/for-current

One fix in the i801 driver where a bug caused touchpad
malfunctions on some Lenovo P1 models by incorrectly overwriting
a status variable during successful SMBUS transactions.

5 months agox86/build: Use obj-y to descend into arch/x86/virt/
Masahiro Yamada [Sat, 30 Mar 2024 06:05:54 +0000 (15:05 +0900)]
x86/build: Use obj-y to descend into arch/x86/virt/

Commit c33621b4c5ad ("x86/virt/tdx: Wire up basic SEAMCALL functions")
introduced a new instance of core-y instead of the standardized obj-y
syntax.

X86 Makefiles descend into subdirectories of arch/x86/virt inconsistently;
into arch/x86/virt/ via core-y defined in arch/x86/Makefile, but into
arch/x86/virt/svm/ via obj-y defined in arch/x86/Kbuild.

This is problematic when you build a single object in parallel because
multiple threads attempt to build the same file.

  $ make -j$(nproc) arch/x86/virt/vmx/tdx/seamcall.o
    [ snip ]
    AS      arch/x86/virt/vmx/tdx/seamcall.o
    AS      arch/x86/virt/vmx/tdx/seamcall.o
  fixdep: error opening file: arch/x86/virt/vmx/tdx/.seamcall.o.d: No such file or directory
  make[4]: *** [scripts/Makefile.build:362: arch/x86/virt/vmx/tdx/seamcall.o] Error 2

Use the obj-y syntax, as it works correctly.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20240330060554.18524-1-masahiroy@kernel.org
5 months agoMerge tag 'drm-fixes-2024-03-30' of https://gitlab.freedesktop.org/drm/kernel
Linus Torvalds [Fri, 29 Mar 2024 22:51:15 +0000 (15:51 -0700)]
Merge tag 'drm-fixes-2024-03-30' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "Regular fixes for rc2, quite a few i915/amdgpu as usual, some xe, and
  then mostly scattered around. rc3 might be quieter with the holidays
  but we shall see.

  bridge:
   - select DRM_KMS_HELPER

  dma-buf:
   - fix NULL-pointer deref

  dp:
   - fix div-by-zero in DP MST unplug code

  fbdev:
   - select FB_IOMEM_FOPS for SBus

  sched:
   - fix NULL-pointer deref

  xe:
   - Fix build on mips
   - Fix wrong bound checks
   - Fix use of msec rather than jiffies
   - Remove dead code

  amdgpu:
   - SMU 14.0.1 updates
   - DCN 3.5.x updates
   - VPE fix
   - eDP panel flickering fix
   - Suspend fix
   - PSR fix
   - DCN 3.0+ fix
   - VCN 4.0.6 updates
   - debugfs fix

  amdkfd:
   - DMA-Buf fix
   - GFX 9.4.2 TLB flush fix
   - CP interrupt fix

  i915:
   - Fix for BUG_ON/BUILD_BUG_ON IN I915_memcpy.c
   - Update a MTL workaround
   - Fix locking inversion in hwmon's sysfs
   - Remove a bogus error message around PXP
   - Fix UAF on VMA
   - Reset queue_priority_hint on parking
   - Display Fixes:
   - Remove duplicated audio enable/disable on SDVO and DP
   - Disable AuxCCS for Xe driver
   - Revert init order of MIPI DSI
   - DRRS debugfs fix with an extra refactor patch
   - VRR related fixes
   - Fix a JSL eDP corruption
   - Fix the cursor physical dma address
   - BIOS VBT related fix

  nouveau:
   - dmem: handle kcalloc() allocation failures

  qxl:
   - remove unused variables

  rockchip:
   - vop2: remove support for AR30 and AB30 formats

  vmwgfx:
   - debugfs: create ttm_resource_manager entry only if needed"

* tag 'drm-fixes-2024-03-30' of https://gitlab.freedesktop.org/drm/kernel: (55 commits)
  drm/i915/bios: Tolerate devdata==NULL in intel_bios_encoder_supports_dp_dual_mode()
  drm/i915: Pre-populate the cursor physical dma address
  drm/i915/gt: Reset queue_priority_hint on parking
  drm/i915/vma: Fix UAF on destroy against retire race
  drm/i915: Do not print 'pxp init failed with 0' when it succeed
  drm/i915: Do not match JSL in ehl_combo_pll_div_frac_wa_needed()
  drm/i915/hwmon: Fix locking inversion in sysfs getter
  drm/i915/dsb: Fix DSB vblank waits when using VRR
  drm/i915/vrr: Generate VRR "safe window" for DSB
  drm/i915/display/debugfs: Fix duplicate checks in i915_drrs_status
  drm/i915/drrs: Refactor CPU transcoder DRRS check
  drm/i915/mtl: Update workaround 14018575942
  drm/i915/dsi: Go back to the previous INIT_OTP/DISPLAY_ON order, mostly
  drm/i915/display: Disable AuxCCS framebuffers if built for Xe
  drm/i915: Stop doing double audio enable/disable on SDVO and g4x+ DP
  drm/i915: Add includes for BUG_ON/BUILD_BUG_ON in i915_memcpy.c
  drm/qxl: remove unused variable from `qxl_process_single_command()`
  drm/qxl: remove unused `count` variable from `qxl_surface_id_alloc()`
  drm/i915: add bug.h include to i915_memcpy.c
  drm/vmwgfx: Create debugfs ttm_resource_manager entry only if needed
  ...

5 months agoMerge tag 'linux_kselftest-fixes-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kerne...
Linus Torvalds [Fri, 29 Mar 2024 22:38:29 +0000 (15:38 -0700)]
Merge tag 'linux_kselftest-fixes-6.9-rc2' of git://git./linux/kernel/git/shuah/linux-kselftest

Pull kselftest fixes from Shuah Khan:
 "Fixes to seccomp and ftrace tests and a change to add config file for
  dmabuf-heap test to increase coverage"

* tag 'linux_kselftest-fixes-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  selftests: dmabuf-heap: add config file for the test
  selftests/seccomp: Try to fit runtime of benchmark into timeout
  selftests/ftrace: Fix event filter target_func selection

5 months agoMerge tag 'linux_kselftest-kunit-fixes-6.9-rc2' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Fri, 29 Mar 2024 22:35:12 +0000 (15:35 -0700)]
Merge tag 'linux_kselftest-kunit-fixes-6.9-rc2' of git://git./linux/kernel/git/shuah/linux-kselftest

Pull KUnit fixes from Shuah Khan:
 "One urgent fix for --alltests build failure related to renaming of
  CONFIG_DAMON_DBGFS to DAMON_DBGFS_DEPRECATED to the missing config
  option"

* tag 'linux_kselftest-kunit-fixes-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  kunit: configs: Enable CONFIG_DAMON_DBGFS_DEPRECATED for --alltests

5 months agoselftests: dmabuf-heap: add config file for the test
Muhammad Usama Anjum [Tue, 5 Mar 2024 06:08:47 +0000 (11:08 +0500)]
selftests: dmabuf-heap: add config file for the test

The config fragment enlists all the config options needed for the test.
This config is merged into the kernel's config on which this test is
run.

Fixed whitespace errors during commit:
Shuah Khan <skhan@linuxfoundation.org>

Reviewed-by: T.J. Mercier <tjmercier@google.com>
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
5 months agoselftests/seccomp: Try to fit runtime of benchmark into timeout
Mark Brown [Mon, 25 Mar 2024 16:57:59 +0000 (16:57 +0000)]
selftests/seccomp: Try to fit runtime of benchmark into timeout

The seccomp benchmark runs five scenarios, one calibration run with no
seccomp filters enabled then four further runs each adding a filter. The
calibration run times itself for 15s and then each additional run executes
for the same number of times.

Currently the seccomp tests, including the benchmark, run with an extended
120s timeout but this is not sufficient to robustly run the tests on a lot
of platforms. Sample timings from some recent runs:

   Platform          Run 1  Run 2  Run 3  Run 4
   ---------         -----  -----  -----  -----
   PowerEdge R200    16.6s  16.6s  31.6s  37.4s
   BBB (arm)         20.4s  20.4s  54.5s
   Synquacer (arm64) 20.7s  23.7s  40.3s

The x86 runs from the PowerEdge are quite marginal and routinely fail, for
the successful run reported here the timed portions of the run are at
117.2s leaving less than 3s of margin which is frequently breached. The
added overhead of adding filters on the other platforms is such that there
is no prospect of their runs fitting into the 120s timeout, especially
on 32 bit arm where there is no BPF JIT.

While we could lower the time we calibrate for I'm also already seeing the
currently completing runs reporting issues with the per filter overheads
not matching expectations:

Let's instead raise the timeout to 180s which is only a 50% increase on the
current timeout which is itself not *too* large given that there's only two
tests in this suite.

Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
5 months agoselftests/ftrace: Fix event filter target_func selection
Mark Rutland [Wed, 20 Mar 2024 14:18:44 +0000 (14:18 +0000)]
selftests/ftrace: Fix event filter target_func selection

The event filter function test has been failing in our internal test
farm:

| # not ok 33 event filter function - test event filtering on functions

Running the test in verbose mode indicates that this is because the test
erroneously determines that kmem_cache_free() is the most common caller
of kmem_cache_free():

  # # + cut -d: -f3 trace
  # # + sed s/call_site=([^+]*)+0x.*/1/
  # # + sort
  # # + uniq -c
  # # + sort
  # # + tail -n 1
  # # + sed s/^[ 0-9]*//
  # # + target_func=kmem_cache_free

... and as kmem_cache_free() doesn't call itself, setting this as the
filter function for kmem_cache_free() results in no hits, and
consequently the test fails:

  # # + grep kmem_cache_free trace
  # # + grep kmem_cache_free
  # # + wc -l
  # # + hitcnt=0
  # # + grep kmem_cache_free trace
  # # + grep -v kmem_cache_free
  # # + wc -l
  # # + misscnt=0
  # # + [ 0 -eq 0 ]
  # # + exit_fail

This seems to be because the system in question has tasks with ':' in
their name (which a number of kernel worker threads have). These show up
in the trace, e.g.

  test:.sh-1299    [004] .....  2886.040608: kmem_cache_free: call_site=putname+0xa4/0xc8 ptr=000000000f4d22f4 name=names_cache

... and so when we try to extact the call_site with:

  cut -d: -f3 trace | sed 's/call_site=\([^+]*\)+0x.*/\1/'

... the 'cut' command will extrace the column containing
'kmem_cache_free' rather than the column containing 'call_site=...', and
the 'sed' command will leave this unchanged. Consequently, the test will
decide to use 'kmem_cache_free' as the filter function, resulting in the
failure seen above.

Fix this by matching the 'call_site=<func>' part specifically to extract
the function name.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reported-by: Aishwarya TCV <aishwarya.tcv@arm.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org
Cc: linux-trace-kernel@vger.kernel.org
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
5 months agoMerge tag 'drm-intel-fixes-2024-03-28' of https://anongit.freedesktop.org/git/drm...
Dave Airlie [Fri, 29 Mar 2024 19:33:22 +0000 (05:33 +1000)]
Merge tag 'drm-intel-fixes-2024-03-28' of https://anongit.freedesktop.org/git/drm/drm-intel into drm-fixes

Core/GT Fixes:
- Fix for BUG_ON/BUILD_BUG_ON IN I915_memcpy.c (Joonas)
- Update a MTL workaround (Tejas)
- Fix locking inversion in hwmon's sysfs (Janusz)
- Remove a bogus error message around PXP (Jose)
- Fix UAF on VMA (Janusz)
- Reset queue_priority_hint on parking (Chris)

Display Fixes:
- Remove duplicated audio enable/disable on SDVO and DP (Ville)
- Disable AuxCCS for Xe driver (Juha-Pekka)
- Revert init order of MIPI DSI (Ville)
- DRRS debugfs fix with an extra refactor patch (Bhanuprakash)
- VRR related fixes (Ville)
- Fix a JSL eDP corruption (Jonathon)
- Fix the cursor physical dma address (Ville)
- BIOS VBT related fix (Ville)

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ZgYaIVgjIs30mIvS@intel.com
5 months agox86/bugs: Fix the SRSO mitigation on Zen3/4
Borislav Petkov (AMD) [Thu, 28 Mar 2024 12:59:05 +0000 (13:59 +0100)]
x86/bugs: Fix the SRSO mitigation on Zen3/4

The original version of the mitigation would patch in the calls to the
untraining routines directly.  That is, the alternative() in UNTRAIN_RET
will patch in the CALL to srso_alias_untrain_ret() directly.

However, even if commit e7c25c441e9e ("x86/cpu: Cleanup the untrain
mess") meant well in trying to clean up the situation, due to micro-
architectural reasons, the untraining routine srso_alias_untrain_ret()
must be the target of a CALL instruction and not of a JMP instruction as
it is done now.

Reshuffle the alternative macros to accomplish that.

Fixes: e7c25c441e9e ("x86/cpu: Cleanup the untrain mess")
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
5 months agoMerge tag '6.9-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Fri, 29 Mar 2024 19:06:09 +0000 (12:06 -0700)]
Merge tag '6.9-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - Add missing trace point (noticed when debugging the recent mknod LSM
   regression)

 - fscache fix

* tag '6.9-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: Fix duplicate fscache cookie warnings
  smb3: add trace event for mknod

5 months agoMerge tag 'thermal-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Fri, 29 Mar 2024 18:50:38 +0000 (11:50 -0700)]
Merge tag 'thermal-6.9-rc2' of git://git./linux/kernel/git/rafael/linux-pm

Pull thermal control fixes from Rafael Wysocki:
 "These revert a problematic optimization commit and address a devfreq
  cooling device issue.

  Specifics:

   - Revert thermal core optimization that introduced a functional issue
     causing a critical trip point to be crossed in some cases (Daniel
     Lezcano)

   - Add missing conversion between different state ranges to the
     devfreq cooling device driver (Ye Zhang)"

* tag 'thermal-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  thermal: devfreq_cooling: Fix perf state when calculate dfc res_util
  Revert "thermal: core: Don't update trip points inside the hysteresis range"

5 months agoMerge tag 'acpi-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Fri, 29 Mar 2024 18:37:12 +0000 (11:37 -0700)]
Merge tag 'acpi-6.9-rc2' of git://git./linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
 "These fix two issues that may lead to attempts to use memory that has
  been freed already.

  Specifics:

   - Drop __exit annotation from einj_remove() in the ACPI APEI code
     because this function can be called during runtime (Arnd Bergmann)

   - Make acpi_db_walk_for_fields() check acpi_evaluate_object() return
     value to avoid accessing memory that has been freed (Nikita
     Kiryushin)"

* tag 'acpi-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPICA: debugger: check status of acpi_evaluate_object() in acpi_db_walk_for_fields()
  ACPI: APEI: EINJ: mark remove callback as non-__exit

5 months agomm: clean up populate_vma_page_range() FOLL_* flag handling
Linus Torvalds [Fri, 29 Mar 2024 18:06:13 +0000 (11:06 -0700)]
mm: clean up populate_vma_page_range() FOLL_* flag handling

The code wasn't exactly wrong, but it was very odd, and it used
FOLL_FORCE together with FOLL_WRITE when it really didn't need to (it
only set FOLL_WRITE for writable mappings, so then the FOLL_FORCE was
pointless).

It also pointlessly called __get_user_pages() even when it knew it
wouldn't populate anything because the vma wasn't accessible and it
explicitly tested for and did *not* set FOLL_FORCE for inaccessible
vma's.

This code does need to use FOLL_FORCE, because we want to do fault in
writable shared mappings, but then the mapping may not actually be
readable.  And we don't want to use FOLL_WRITE (which would match the
permission of the vma), because that would also dirty the pages, which
we don't want to do.

For very similar reasons, FOLL_FORCE populates a executable-only mapping
with no read permissions. We don't have a FOLL_EXEC flag.

Yes, it would probably be cleaner to split FOLL_WRITE into two bits (for
separate permission and dirty bit handling), and add a FOLL_EXEC flag
for the "GUP executable page" case.  That would allow us to avoid
FOLL_FORCE entirely here.

But that's not how our FOLL_xyz bits have traditionally worked, and that
would be a much bigger patch.

So this at least avoids the FOLL_FORCE | FOLL_WRITE combination that
made one of my experimental validation patches trigger a warning.  That
warning was a false positive (and my experimental patch was incomplete
anyway), but it all made me look at this and decide to clean at least
this small case up.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
5 months agoMerge branch 'acpica'
Rafael J. Wysocki [Fri, 29 Mar 2024 18:00:09 +0000 (19:00 +0100)]
Merge branch 'acpica'

* acpica:
  ACPICA: debugger: check status of acpi_evaluate_object() in acpi_db_walk_for_fields()

5 months agoMerge tag 'efi-fixes-for-v6.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 29 Mar 2024 16:51:04 +0000 (09:51 -0700)]
Merge tag 'efi-fixes-for-v6.9-3' of git://git./linux/kernel/git/efi/efi

Pull EFI fixes from Ard Biesheuvel:
 "These address all the outstanding EFI/x86 boot related regressions:

   - Revert to the old initrd memory allocation soft limit of INT_MAX,
     which was dropped inadvertently

   - Ensure that startup_32() is entered with a valid boot_params
     pointer when using the new EFI mixed mode protocol

   - Fix a compiler warning introduced by a fix from the previous pull"

* tag 'efi-fixes-for-v6.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
  x86/efistub: Reinstate soft limit for initrd loading
  efi/libstub: Cast away type warning in use of max()
  x86/efistub: Add missing boot_params for mixed mode compat entry

5 months agoMerge tag 'block-6.9-20240329' of git://git.kernel.dk/linux
Linus Torvalds [Fri, 29 Mar 2024 16:40:22 +0000 (09:40 -0700)]
Merge tag 'block-6.9-20240329' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:
 "Small round of minor fixes or cleanups for the 6.9-rc2 kernel, one
  fixing an issue introduced in 6.8"

* tag 'block-6.9-20240329' of git://git.kernel.dk/linux:
  block: Do not force full zone append completion in req_bio_endio()
  block: don't reject too large max_user_sectors in blk_validate_limits
  block: Make blk_rq_set_mixed_merge() static

5 months agoMerge tag 'for-6.9/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/devic...
Linus Torvalds [Fri, 29 Mar 2024 16:33:05 +0000 (09:33 -0700)]
Merge tag 'for-6.9/dm-fixes-2' of git://git./linux/kernel/git/device-mapper/linux-dm

Pull device mapper fixes from Mike Snitzer:

 - Fix MAINTAINERS to not include M: dm-devel for DM entries.

 - Fix DM vdo's murmurhash to use proper byteswapping methods.

 - Fix DM integrity clang warning about comparison out-of-range.

* tag 'for-6.9/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
  dm integrity: fix out-of-range warning
  dm vdo murmurhash3: use kernel byteswapping routines instead of GCC ones
  MAINTAINERS: Remove incorrect M: tag for dm-devel@lists.linux.dev

5 months agoMerge tag 'gpio-fixes-for-v6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 29 Mar 2024 16:26:34 +0000 (09:26 -0700)]
Merge tag 'gpio-fixes-for-v6.9-rc2' of git://git./linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - fix a procfs failure when requesting an interrupt with a label
   containing the '/' character

 - add missing stubs for GPIO lookup functions for !GPIOLIB

 - fix debug messages that would print "(null)" for NULL strings

* tag 'gpio-fixes-for-v6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpiolib: Fix debug messaging in gpiod_find_and_request()
  gpiolib: Add stubs for GPIO lookup functions
  gpio: cdev: sanitize the label before requesting the interrupt

5 months agodm integrity: fix out-of-range warning
Arnd Bergmann [Thu, 28 Mar 2024 14:30:39 +0000 (15:30 +0100)]
dm integrity: fix out-of-range warning

Depending on the value of CONFIG_HZ, clang complains about a pointless
comparison:

drivers/md/dm-integrity.c:4085:12: error: result of comparison of
                        constant 42949672950 with expression of type
                        'unsigned int' is always false
                        [-Werror,-Wtautological-constant-out-of-range-compare]
                        if (val >= (uint64_t)UINT_MAX * 1000 / HZ) {

As the check remains useful for other configurations, shut up the
warning by adding a second type cast to uint64_t.

Fixes: 468dfca38b1a ("dm integrity: add a bitmap mode")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Justin Stitt <justinstitt@google.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
5 months agodm vdo murmurhash3: use kernel byteswapping routines instead of GCC ones
Ken Raeburn [Mon, 25 Mar 2024 19:22:45 +0000 (15:22 -0400)]
dm vdo murmurhash3: use kernel byteswapping routines instead of GCC ones

Also open-code the calls.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Ken Raeburn <raeburn@redhat.com>
Signed-off-by: Matthew Sakai <msakai@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>