aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2024-04-09iommu/arm-smmu-v3: Retire disable_bypass parameterRobin Murphy1-33/+13
The disable_bypass parameter has been mostly meaningless for a long time since the introduction of default domains. Its original intent is now fulfilled by the controls users have over the default domain type, and its remaining effect in the brief window between Stream Table initialisation and default domain creation hardly seems worth the complication. Furthermore, thanks to 2-level Stream Tables, disabling disable_bypass (there's another reason not to like it right there) has never guaranteed that any particular StreamID *will* bypass anyway - any device which might actually care about that wants RMRs - so there's not really much lost by taking away that option (which has already been non-default for nearing 6 years now). As part of this, also remove the weird behaviour where we "successfully" probe and register a non-functional SMMU if the DT "#iommu-cells" property is wrong. I have no memory of what possessed me to think that was a good idea at the time, and by now I suspect it's likely to break things worse than simply failing probe would. Signed-off-by: Robin Murphy <[email protected]> Reviewed-by: Mostafa Saleh <[email protected]> Link: https://lore.kernel.org/r/ea3ac4cd595a81b5511729601b2f7d4668178438.1712335927.git.robin.murphy@arm.com Signed-off-by: Will Deacon <[email protected]>
2024-04-09octeontx2-af: Fix NIX SQ mode and BP configGeetha sowjanya1-10/+10
NIX SQ mode and link backpressure configuration is required for all platforms. But in current driver this code is wrongly placed under specific platform check. This patch fixes the issue by moving the code out of platform check. Fixes: 5d9b976d4480 ("octeontx2-af: Support fixed transmit scheduler topology") Signed-off-by: Geetha sowjanya <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
2024-04-09irqchip/gic-v3-its: Fix VSYNC referencing an unmapped VPE on GIC v4.1Nianyao Tang1-1/+7
As per the GICv4.1 spec (Arm IHI 0069H, 5.3.19): "A VMAPP with {V, Alloc}=={0, x} is self-synchronizing, This means the ITS command queue does not show the command as consumed until all of its effects are completed." Furthermore, VSYNC is allowed to deliver an SError when referencing a non existent VPE. By these definitions, a VMAPP followed by a VSYNC is a bug, as the later references a VPE that has been unmapped by the former. Fix it by eliding the VSYNC in this scenario. Fixes: 64edfaa9a234 ("irqchip/gic-v4.1: Implement the v4.1 flavour of VMAPP") Signed-off-by: Nianyao Tang <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Reviewed-by: Zenghui Yu <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2024-04-09irqchip/loongson: Select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP for ↵Tiezhu Yang1-1/+1
IRQ_LOONGARCH_CPU An interrupt's effective affinity can only be different from its configured affinity if there are multiple CPUs. Make it clear that this option is only meaningful when SMP is enabled. Otherwise, there exists "WARNING: unmet direct dependencies detected for GENERIC_IRQ_EFFECTIVE_AFF_MASK" when make menuconfig if CONFIG_SMP is not set on LoongArch. Signed-off-by: Tiezhu Yang <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2024-04-09irqchip/loongson-eiointc: Set CPU affinity only on SMP machines for LoongArchTiezhu Yang1-0/+4
According to the code comment of "struct irq_chip", the member "irq_set_affinity" is to set the CPU affinity on SMP machines, so define and call eiointc_set_irq_affinity() only under CONFIG_SMP. Signed-off-by: Tiezhu Yang <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2024-04-09irqchip/loongson-pch-msi: Fix off-by-one on allocation error pathZenghui Yu1-1/+1
When pch_msi_parent_domain_alloc() returns an error, there is an off-by-one in the number of interrupts to be freed. Fix it by passing the number of successfully allocated interrupts, instead of the relative index of the last allocated one. Fixes: 632dcc2c75ef ("irqchip: Add Loongson PCH MSI controller") Signed-off-by: Zenghui Yu <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Jiaxun Yang <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2024-04-09irqchip/alpine-msi: Fix off-by-one in allocation error pathZenghui Yu1-1/+1
When alpine_msix_gic_domain_alloc() fails, there is an off-by-one in the number of interrupts to be freed. Fix it by passing the number of successfully allocated interrupts, instead of the relative index of the last allocated one. Fixes: 3841245e8498 ("irqchip/alpine-msi: Fix freeing of interrupts on allocation error path") Signed-off-by: Zenghui Yu <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2024-04-09irqchip/riscv-aplic: Fix spelling mistake "forwared" -> "forwarded"Colin Ian King1-1/+1
There is a spelling mistake in a dev_info message. Fix it. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2024-04-09drm/i915: use check_add_overflow() and drop local variantsJani Nikula2-17/+3
Prefer common check_add_overflow() from overflow.h over the locally rolled versions of it. While check_add_overflow() does require a variable to assign to, unlike add_overflows_t(), it's still better than having multiple versions around. Cc: Kees Cook <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Jani Nikula <[email protected]>
2024-04-09net: sparx5: add support for tc flower redirect actionDaniel Machon1-0/+29
Add support for the flower redirect action. Two VCAP actions are encoded in the rule - one for the port mask, and one for the port mask mode. When the rule is hit, the port mask is used as the final destination set, replacing all other port masks. Signed-off-by: Daniel Machon <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
2024-04-09net: sparx5: add support for tc flower mirred action.Daniel Machon3-0/+53
Add support for tc flower mirred action. Two VCAP actions are encoded in the rule - one for the port mask, and one for the port mask mode. When the rule is hit, the destination mask is OR'ed with the port mask. Also add new VCAP function for supporting 72-bit wide actions, and a tc helper for setting the port forwarding mask. Signed-off-by: Daniel Machon <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
2024-04-09drm/i915: move pipestat_irq_mask to display substructJani Nikula4-9/+8
The info is related to display, and should be placed under i915->display. Reviewed-by: Ville Syrjälä <[email protected]> Acked-by: Lucas De Marchi <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/2e2f1c9576126927ea63a54639077c01d44ad5b6.1712599670.git.jani.nikula@intel.com
2024-04-09drm/i915: move de_irq_mask to display substructJani Nikula4-17/+14
The info is related to display, and should be placed under i915->display. Reviewed-by: Ville Syrjälä <[email protected]> Acked-by: Lucas De Marchi <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/733fc96df9153c6af8979d9b23d3aa3734937b56.1712599670.git.jani.nikula@intel.com
2024-04-09drm/i915: move display_irqs_enabled to display substructJani Nikula6-15/+14
The info is related to display, and should be placed under i915->display. Reviewed-by: Ville Syrjälä <[email protected]> Acked-by: Lucas De Marchi <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/f6ac8e4c6ec8621bacf3db58a2bf156bd636f1d1.1712599670.git.jani.nikula@intel.com
2024-04-09drm/i915: move vblank_enabled to display substructJani Nikula4-10/+11
The info is related to display, and should be placed under i915->display. Start a new irq sub-substruct. Reviewed-by: Ville Syrjälä <[email protected]> Acked-by: Lucas De Marchi <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/eb89ed70020ea78396e1fec6f1a97693f2bdb96b.1712599670.git.jani.nikula@intel.com
2024-04-09drm/i915: move max_dotclk_freq to display substructJani Nikula14-20/+17
The info is related to display, and should be placed under i915->display. Reviewed-by: Ville Syrjälä <[email protected]> Acked-by: Lucas De Marchi <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/ea012aa72c93f3d436ccacf8f75683757d144b82.1712599670.git.jani.nikula@intel.com
2024-04-09drm/i915: move skl_preferred_vco_freq to display substructJani Nikula4-14/+10
The info is related to display, and should be placed under i915->display. Reviewed-by: Ville Syrjälä <[email protected]> Acked-by: Lucas De Marchi <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/4e9877d1641bce905cc9dd5eabe40df51ddbe9b5.1712599670.git.jani.nikula@intel.com
2024-04-09drm/i915/gt: drop display clock info from gt debugfsJani Nikula1-4/+0
The same info is available in i915_cdclk_info. Reviewed-by: Ville Syrjälä <[email protected]> Acked-by: Lucas De Marchi <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/50461f13ab09b162de25d3f3587890548f4db499.1712599670.git.jani.nikula@intel.com
2024-04-09net: ti: icssg-prueth: Add ICSSG Ethernet driver for AM65x SR1.0 platformsDiogo Ivo3-0/+1204
Add the PRUeth driver for the ICSSG subsystem found in AM65x SR1.0 devices. The main differences that set SR1.0 and SR2.0 apart are the missing TXPRU core in SR1.0, two extra DMA channels for management purposes and different firmware that needs to be configured accordingly. Based on the work of Roger Quadros, Vignesh Raghavendra and Grygorii Strashko in TI's 5.10 SDK [1]. [1]: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/?h=ti-linux-5.10.y Co-developed-by: Jan Kiszka <[email protected]> Signed-off-by: Jan Kiszka <[email protected]> Signed-off-by: Diogo Ivo <[email protected]> Reviewed-by: MD Danish Anwar <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
2024-04-09net: ti: icssg-prueth: Modify common functions for SR1.0Diogo Ivo3-14/+37
Some parts of the logic differ only slightly between Silicon Revisions. In these cases add the bits that differ to a common function that executes those bits conditionally based on the Silicon Revision. Based on the work of Roger Quadros, Vignesh Raghavendra and Grygorii Strashko in TI's 5.10 SDK [1]. [1]: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/?h=ti-linux-5.10.y Co-developed-by: Jan Kiszka <[email protected]> Signed-off-by: Jan Kiszka <[email protected]> Signed-off-by: Diogo Ivo <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Reviewed-by: MD Danish Anwar <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
2024-04-09net: ti: icssg-prueth: Add functions to configure SR1.0 packet classifierDiogo Ivo3-11/+110
Add the functions to configure the SR1.0 packet classifier. Based on the work of Roger Quadros in TI's 5.10 SDK [1]. [1]: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/?h=ti-linux-5.10.y Co-developed-by: Jan Kiszka <[email protected]> Signed-off-by: Jan Kiszka <[email protected]> Signed-off-by: Diogo Ivo <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Reviewed-by: MD Danish Anwar <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
2024-04-09net: ti: icssg-prueth: Adjust the number of TX channels for SR1.0Diogo Ivo1-0/+12
As SR1.0 uses the current higher priority channel to send commands to the firmware, take this into account when setting/getting the number of channels to/from the user. Based on the work of Roger Quadros in TI's 5.10 SDK [1]. [1]: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/?h=ti-linux-5.10.y Co-developed-by: Jan Kiszka <[email protected]> Signed-off-by: Jan Kiszka <[email protected]> Signed-off-by: Diogo Ivo <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Reviewed-by: MD Danish Anwar <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
2024-04-09net: ti: icssg-prueth: Adjust IPG configuration for SR1.0Diogo Ivo1-3/+11
Correctly adjust the IPG based on the Silicon Revision. Based on the work of Roger Quadros, Vignesh Raghavendra and Grygorii Strashko in TI's 5.10 SDK [1]. [1]: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/?h=ti-linux-5.10.y Co-developed-by: Jan Kiszka <[email protected]> Signed-off-by: Jan Kiszka <[email protected]> Signed-off-by: Diogo Ivo <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Reviewed-by: MD Danish Anwar <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
2024-04-09net: ti: icssg-prueth: Add SR1.0-specific description bitsDiogo Ivo1-1/+13
Add a field to distinguish between SR1.0 and SR2.0 in the driver as well as the necessary structures to program SR1.0. Based on the work of Roger Quadros in TI's 5.10 SDK [1]. [1]: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/?h=ti-linux-5.10.y Co-developed-by: Jan Kiszka <[email protected]> Signed-off-by: Jan Kiszka <[email protected]> Signed-off-by: Diogo Ivo <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Reviewed-by: MD Danish Anwar <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
2024-04-09net: ti: icssg-prueth: Add SR1.0-specific configuration bitsDiogo Ivo1-0/+56
Define the firmware configuration structure and commands needed to communicate with SR1.0 firmware, as well as SR1.0 buffer information where it differs from SR2.0. Based on the work of Roger Quadros, Murali Karicheri and Grygorii Strashko in TI's 5.10 SDK [1]. [1]: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/?h=ti-linux-5.10.y Co-developed-by: Jan Kiszka <[email protected]> Signed-off-by: Jan Kiszka <[email protected]> Signed-off-by: Diogo Ivo <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Reviewed-by: MD Danish Anwar <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
2024-04-09net: ti: icssg-prueth: Move common functions into a separate fileDiogo Ivo4-1183/+1258
In order to allow code sharing between Silicon Revisions 1.0 and 2.0 move all functions that can be shared into a common file. This commit introduces no functional changes. Signed-off-by: Diogo Ivo <[email protected]> Reviewed-by: MD Danish Anwar <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
2024-04-09RDMA/hns: Support DSCPJunxian Huang4-29/+108
Add support for DSCP configuration. For DSCP, get dscp-prio mapping via hns3 nic driver api .get_dscp_prio() and fill the SL (in WQE for UD or in QPC for RC) with the priority value. The prio-tc mapping is configured to HW by hns3 nic driver. HW will select a corresponding TC according to SL and the prio-tc mapping. Signed-off-by: Junxian Huang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
2024-04-09mtd: diskonchip: work around ubsan link failureArnd Bergmann1-2/+2
I ran into a randconfig build failure with UBSAN using gcc-13.2: arm-linux-gnueabi-ld: error: unplaced orphan section `.bss..Lubsan_data31' from `drivers/mtd/nand/raw/diskonchip.o' I'm not entirely sure what is going on here, but I suspect this has something to do with the check for the end of the doc_locations[] array that contains an (unsigned long)0xffffffff element, which is compared against the signed (int)0xffffffff. If this is the case, we should get a runtime check for undefined behavior, but we instead get an unexpected build-time error. I would have expected this to work fine on 32-bit architectures despite the signed integer overflow, though on 64-bit architectures this likely won't ever work. Changing the contition to instead check for the size of the array makes the code safe everywhere and avoids the ubsan check that leads to the link error. The loop code goes back to before 2.6.12. Cc: [email protected] Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
2024-04-09mtd: rawnand: qcom: Fix broken OP_RESET_DEVICE command in ↵Christian Marangi1-4/+3
qcom_misc_cmd_type_exec() While migrating to exec_ops in commit a82990c8a409 ("mtd: rawnand: qcom: Add read/read_start ops in exec_op path"), OP_RESET_DEVICE command handling got broken unintentionally. Right now for the OP_RESET_DEVICE command, qcom_misc_cmd_type_exec() will simply return 0 without handling it. Even, if that gets fixed, an unnecessary FLASH_STATUS read descriptor command is being added in the middle and that seems to be causing the command to fail on IPQ806x devices. So let's fix the above two issues to make OP_RESET_DEVICE command working again. Fixes: a82990c8a409 ("mtd: rawnand: qcom: Add read/read_start ops in exec_op path") Cc: [email protected] Reviewed-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Christian Marangi <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
2024-04-09mtd: maps: sa1100-flash: Prefer struct_size over open coded arithmeticErick Archer1-4/+2
This is an effort to get rid of all multiplications from allocation functions in order to prevent integer overflows [1][2]. As the "info" variable is a pointer to "struct sa_info" and this structure ends in a flexible array: struct sa_info { [...] struct sa_subdev_info subdev[]; }; the preferred way in the kernel is to use the struct_size() helper to do the arithmetic instead of the calculation "size + size * count" in the kzalloc() function. This way, the code is more readable and safer. This code was detected with the help of Coccinelle, and audited and modified manually. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments [1] Link: https://github.com/KSPP/linux/issues/160 [2] Signed-off-by: Erick Archer <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/AS8PR02MB7237AC633B0D1D2EBD3C40E98B392@AS8PR02MB7237.eurprd02.prod.outlook.com
2024-04-09mtd: core: Align comment with an action in mtd_otp_nvmem_add()Andy Shevchenko1-4/+3
The comment is related to the non-error case, make it more clear by inverting the condition. It also makes code neater at the end. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Pratyush Yadav <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
2024-04-09media: v4l2-subdev: Remove non-pad dv timing callbacksPaweł Anikiel1-3/+3
After the conversion of dv timing calls to use a pad argument is done, remove the old callbacks. Update the subdev ioctl handlers to use the new callbacks. Signed-off-by: Paweł Anikiel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-04-09media: tegra-video: Use pad variant of dv timing subdev callsPaweł Anikiel1-6/+6
Use the pad variant for all (s|g|query)_dv_timings subdev calls, which includes a pad argument. Signed-off-by: Paweł Anikiel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-04-09media: vpif_display: Use pad variant of dv timing subdev callsPaweł Anikiel1-1/+1
Use the pad variant for all (s|g|query)_dv_timings subdev calls, which includes a pad argument. Signed-off-by: Paweł Anikiel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-04-09media: vpif_capture: Use pad variant of dv timing subdev callsPaweł Anikiel1-2/+2
Use the pad variant for all (s|g|query)_dv_timings subdev calls, which includes a pad argument. Signed-off-by: Paweł Anikiel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-04-09media: rcar-vin: Use pad variant of dv timing subdev callsPaweł Anikiel1-3/+6
Use the pad variant for all (s|g|query)_dv_timings subdev calls, which includes a pad argument. Signed-off-by: Paweł Anikiel <[email protected]> Tested-by: Niklas Söderlund <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-04-09media: cobalt: Use pad variant of dv timing subdev callsPaweł Anikiel1-6/+6
Use the pad variant for all (s|g|query)_dv_timings subdev calls, which includes a pad argument. Signed-off-by: Paweł Anikiel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-04-09media: spi: gs1662: Switch dv timing callbacks to pad opsPaweł Anikiel1-9/+18
Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [hverkuil: align to open parenthesis]
2024-04-09media: i2c: tvp7002: Switch dv timing callbacks to pad opsPaweł Anikiel1-11/+21
Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [hverkuil: align to open parenthesis]
2024-04-09media: i2c: ths8200: Switch dv timing callbacks to pad opsPaweł Anikiel1-4/+10
Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-04-09media: i2c: ths7303: Switch dv timing callbacks to pad opsPaweł Anikiel1-3/+7
Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [hverkuil: align to open parenthesis]
2024-04-09media: i2c: tda1997x: Switch dv timing callbacks to pad opsPaweł Anikiel1-7/+7
Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [hverkuil: align to open parenthesis]
2024-04-09media: i2c: tc358743: Switch dv timing callbacks to pad opsPaweł Anikiel1-8/+17
Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [hverkuil: align to open parenthesis]
2024-04-09media: i2c: adv7842: Switch dv timing callbacks to pad opsPaweł Anikiel1-8/+17
Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-04-09media: i2c: adv7604: Switch dv timing callbacks to pad opsPaweł Anikiel1-10/+10
Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [hverkuil: align to open parenthesis]
2024-04-09media: i2c: adv7511: Switch dv timing callbacks to pad opsPaweł Anikiel1-5/+11
Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [hverkuil: align to open parenthesis]
2024-04-09media: i2c: adv748x: Switch dv timing callbacks to pad opsPaweł Anikiel1-8/+8
Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel <[email protected]> Tested-by: Niklas Söderlund <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-04-09media: v4l2-subdev: Add pad versions of dv timing subdev callsPaweł Anikiel1-0/+33
Currently, subdev dv timing calls (i.e. g/s/query_dv_timings) are video ops without a pad argument. This is a problem if the subdevice can have different dv timings for each pad (e.g. a DisplayPort receiver with multiple virtual channels). To solve this, change these calls to include a pad argument, and put them into pad ops. Keep the old ones temporarily to make the switch easier. Signed-off-by: Paweł Anikiel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-04-08md: don't account sync_io if iostats of the disk is disabledLi Nan2-1/+6
If iostats is disabled, disk_stats will not be updated and part_stat_read_accum() only returns a constant value. In this case, continuing to count sync_io and to check is_mddev_idle() is no longer meaningful. Signed-off-by: Li Nan <[email protected]> Reviewed-by: Yu Kuai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Song Liu <[email protected]>
2024-04-08md: Fix overflow in is_mddev_idleLi Nan2-5/+6
UBSAN reports this problem: UBSAN: Undefined behaviour in drivers/md/md.c:8175:15 signed integer overflow: -2147483291 - 2072033152 cannot be represented in type 'int' Call trace: dump_backtrace+0x0/0x310 show_stack+0x28/0x38 dump_stack+0xec/0x15c ubsan_epilogue+0x18/0x84 handle_overflow+0x14c/0x19c __ubsan_handle_sub_overflow+0x34/0x44 is_mddev_idle+0x338/0x3d8 md_do_sync+0x1bb8/0x1cf8 md_thread+0x220/0x288 kthread+0x1d8/0x1e0 ret_from_fork+0x10/0x18 'curr_events' will overflow when stat accum or 'sync_io' is greater than INT_MAX. Fix it by changing sync_io, last_events and curr_events to 64bit. Signed-off-by: Li Nan <[email protected]> Reviewed-by: Yu Kuai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Song Liu <[email protected]>