linux/drivers
Daniel Lezcano 471ef0b5a8 clocksource/drivers/timer-of: Remove percpu irq related code
GCC's named address space checks errors out with:

drivers/clocksource/timer-of.c: In function ‘timer_of_irq_exit’:
drivers/clocksource/timer-of.c:29:46: error: passing argument 2 of
‘free_percpu_irq’ from pointer to non-enclosed address space
  29 |                 free_percpu_irq(of_irq->irq, clkevt);
     |                                              ^~~~~~
In file included from drivers/clocksource/timer-of.c:8:
./include/linux/interrupt.h:201:43: note: expected ‘__seg_gs void *’
but argument is of type ‘struct clock_event_device *’
 201 | extern void free_percpu_irq(unsigned int, void __percpu *);
     |                                           ^~~~~~~~~~~~~~~
drivers/clocksource/timer-of.c: In function ‘timer_of_irq_init’:
drivers/clocksource/timer-of.c:74:51: error: passing argument 4 of
‘request_percpu_irq’ from pointer to non-enclosed address space
  74 |                                    np->full_name, clkevt) :
     |                                                   ^~~~~~
./include/linux/interrupt.h:190:56: note: expected ‘__seg_gs void *’
but argument is of type ‘struct clock_event_device *’
 190 |                    const char *devname, void __percpu *percpu_dev_id)

Sparse warns about:

timer-of.c:29:46: warning: incorrect type in argument 2 (different address spaces)
timer-of.c:29:46:    expected void [noderef] __percpu *
timer-of.c:29:46:    got struct clock_event_device *clkevt
timer-of.c:74:51: warning: incorrect type in argument 4 (different address spaces)
timer-of.c:74:51:    expected void [noderef] __percpu *percpu_dev_id
timer-of.c:74:51:    got struct clock_event_device *clkevt

It appears the code is incorrect as reported by Uros Bizjak:

"The referred code is questionable as it tries to reuse
the clkevent pointer once as percpu pointer and once as generic
pointer, which should be avoided."

This change removes the percpu related code as no drivers is using it.

[Daniel: Fixed the description]

Fixes: dc11bae785 ("clocksource/drivers: Add timer-of common init routine")
Reported-by: Uros Bizjak <ubizjak@gmail.com>
Tested-by: Uros Bizjak <ubizjak@gmail.com>
Link: https://lore.kernel.org/r/20240819100335.2394751-1-daniel.lezcano@linaro.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2024-09-02 10:04:15 +02:00
..
accel
accessibility
acpi ACPI: video: Add backlight=native quirk for Dell OptiPlex 7760 AIO 2024-08-19 15:58:52 +02:00
amba
android
ata ata: pata_macio: Use WARN instead of BUG 2024-08-21 14:33:23 +09:00
atm
auxdisplay
base
bcma
block
bluetooth Bluetooth: btnxpuart: Fix random crash seen while removing driver 2024-08-23 15:56:04 -04:00
bus
cache
cdrom
cdx
char tpm: ibmvtpm: Call tpm2_sessions_init() to initialize session support 2024-08-27 21:11:44 +03:00
clk
clocksource clocksource/drivers/timer-of: Remove percpu irq related code 2024-09-02 10:04:15 +02:00
comedi
connector
counter
cpufreq cpufreq/amd-pstate-ut: Don't check for highest perf matching on prefcore 2024-08-23 11:07:58 -05:00
cpuidle
crypto
cxl
dax
dca
devfreq
dio
dma dmaengine: dw-edma: Do not enable watermark interrupts for HDMA 2024-08-28 18:40:17 +05:30
dma-buf
dpll
edac
eisa
extcon
firewire
firmware ARM: SoC fixes for 6.11, part 2 2024-09-01 06:42:13 +12:00
fpga
fsi
gnss
gpio
gpu A revert for a previous TTM commit causing stuttering, 3 fixes for 2024-08-30 11:28:11 +10:00
greybus
hid hid-for-linus-2024081901 2024-08-19 11:02:13 -07:00
hsi
hte
hv
hwmon hwmon: (pt5161l) Fix invalid temperature reading 2024-08-26 20:58:05 -07:00
hwspinlock
hwtracing
i2c i2c: tegra: Do not mark ACPI devices as irq safe 2024-08-15 00:22:28 +02:00
i3c
idle
iio
infiniband
input Input updates for v6.11-rc5 2024-08-31 15:32:38 +12:00
interconnect
iommu IOMMU Fixes for Linux v6.11-rc5 2024-08-31 06:11:34 +12:00
ipack
irqchip
isdn
leds
macintosh
mailbox
mcb
md block-6.11-20240824 2024-08-16 14:03:31 -07:00
media media fixes for v6.11-rc4 2024-08-15 10:23:19 -07:00
memory
memstick
message
mfd
misc Char/Misc fixes for 6.11-rc4 2024-08-18 10:16:34 -07:00
mmc mmc: mmc_test: Fix NULL dereference on allocation failure 2024-08-20 13:47:36 +02:00
most
mtd
mux
net Regressions: 2024-08-28 16:54:45 -07:00
nfc nfc: pn533: Add poll mod list filling check 2024-08-29 12:08:44 +02:00
ntb
nubus
nvdimm
nvme nvme: Remove unused field 2024-08-22 13:28:40 -07:00
nvmem
of A revert for a previous TTM commit causing stuttering, 3 fixes for 2024-08-30 11:28:11 +10:00
opp
parisc
parport
pci pci-v6.11-fixes-2 2024-08-31 14:54:11 +12:00
pcmcia
peci
perf
phy
pinctrl pinctrl: rockchip: correct RK3328 iomux width flag for GPIO2-B pins 2024-08-24 16:39:51 +02:00
platform platform-drivers-x86 for v6.11-5 2024-08-29 07:12:02 +12:00
pmdomain pmdomain: imx: wait SSAR when i.MX93 power domain on 2024-08-15 12:47:09 +02:00
pnp
power power sequencing fixes for v6.11-rc6 2024-09-01 09:07:44 +12:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 s390 updates for 6.11-rc5 2024-08-25 12:05:23 +12:00
sbus
scsi SCSI fixes on 20240831 2024-09-01 07:00:38 +12:00
sh
siox
slimbus
soc Qualcomm driver fixes for v6.11 2024-08-28 20:27:39 +00:00
soundwire soundwire: stream: fix programming slave ports for non-continous port maps 2024-08-17 22:55:05 +05:30
spi spi: pxa2xx: Move PM runtime handling to the glue drivers 2024-08-22 13:34:06 +01:00
spmi
ssb
staging Kbuild fixes for v6.11 (2nd) 2024-08-23 07:43:15 +08:00
target
tc
tee
thermal thermal: of: Fix OF node leak in of_thermal_zone_find() error paths 2024-08-22 20:58:49 +02:00
thunderbolt
tty Revert "serial: 8250_omap: Set the console genpd always on if no console suspend" 2024-08-15 07:22:10 +02:00
ufs scsi: ufs: qcom: Add UFSHCD_QUIRK_BROKEN_LSDBS_CAP for SM8550 SoC 2024-08-16 21:09:17 -04:00
uio
usb USB fixes for 6.11-rc6 2024-09-01 07:06:28 +12:00
vdpa
vfio
vhost
video video/aperture: optionally match the device in sysfb_disable() 2024-08-26 19:14:48 -04:00
virt
virtio
w1
watchdog
xen
zorro
Kconfig
Makefile