• Ohad Ben-Cohen's avatar
    hwspinlock/core/omap: fix id issues on multiple hwspinlock devices · c3c1250e
    Ohad Ben-Cohen authored
    hwspinlock devices provide system-wide hardware locks that are used
    by remote processors that have no other way to achieve synchronization.
    
    To achieve that, each physical lock must have a system-wide id number
    that is agreed upon, otherwise remote processors can't possibly assume
    they're using the same hardware lock.
    
    Usually boards have a single hwspinlock device, which provides several
    hwspinlocks, and in this case, they can be trivially numbered 0 to
    (num-of-locks - 1).
    
    In case boards have several hwspinlocks devices, a different base id
    should be used for each hwspinlock device (they can't all use 0 as
    a starting id!).
    
    While this is certainly not common, it's just plain wrong to just
    silently use 0 as a base id whenever the hwspinlock driver is probed.
    
    This patch provides a hwspinlock_pdata structure, that boards can use
    to set a different base id for each of the hwspinlock devices they may
    have, and demonstrates how to use it with the omap hwspinlock driver.
    
    While we're at it, make sure the hwspinlock core prints an explicit
    error message in case an hwspinlock is registered with an id number
    that already exists; this will help users catch such base id issues.
    Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
    Acked-by: default avatarTony Lindgren <tony@atomide.com>
    c3c1250e
Name
Last commit
Last update
..
accessibility Loading commit data...
acpi Loading commit data...
amba Loading commit data...
ata Loading commit data...
atm Loading commit data...
auxdisplay Loading commit data...
base Loading commit data...
bcma Loading commit data...
block Loading commit data...
bluetooth Loading commit data...
cdrom Loading commit data...
char Loading commit data...
clk Loading commit data...
clocksource Loading commit data...
connector Loading commit data...
cpufreq Loading commit data...
cpuidle Loading commit data...
crypto Loading commit data...
dca Loading commit data...
dio Loading commit data...
dma Loading commit data...
edac Loading commit data...
eisa Loading commit data...
firewire Loading commit data...
firmware Loading commit data...
gpio Loading commit data...
gpu Loading commit data...
hid Loading commit data...
hwmon Loading commit data...
hwspinlock Loading commit data...
i2c Loading commit data...
ide Loading commit data...
idle Loading commit data...
ieee802154 Loading commit data...
infiniband Loading commit data...
input Loading commit data...
iommu Loading commit data...
isdn Loading commit data...
leds Loading commit data...
lguest Loading commit data...
macintosh Loading commit data...
mca Loading commit data...
md Loading commit data...
media Loading commit data...
memstick Loading commit data...
message Loading commit data...
mfd Loading commit data...
misc Loading commit data...
mmc Loading commit data...
mtd Loading commit data...
net Loading commit data...
nfc Loading commit data...
nubus Loading commit data...
of Loading commit data...
oprofile Loading commit data...
parisc Loading commit data...
parport Loading commit data...
pci Loading commit data...
pcmcia Loading commit data...
platform Loading commit data...
pnp Loading commit data...
power Loading commit data...
pps Loading commit data...
ps3 Loading commit data...
ptp Loading commit data...
rapidio Loading commit data...
regulator Loading commit data...
rtc Loading commit data...
s390 Loading commit data...
sbus Loading commit data...
scsi Loading commit data...
sfi Loading commit data...
sh Loading commit data...
sn Loading commit data...
spi Loading commit data...
ssb Loading commit data...
staging Loading commit data...
target Loading commit data...
tc Loading commit data...
telephony Loading commit data...
thermal Loading commit data...
tty Loading commit data...
uio Loading commit data...
usb Loading commit data...
uwb Loading commit data...
vhost Loading commit data...
video Loading commit data...
virt Loading commit data...
virtio Loading commit data...
vlynq Loading commit data...
w1 Loading commit data...
watchdog Loading commit data...
xen Loading commit data...
zorro Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...