Age | Commit message (Collapse) | Author | Files | Lines |
|
So that there's no need to get into the submenu to disable all related config
entries.
Signed-off-by: Vincent Legoll <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
|
|
of_parse_phandle
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
|
|
radix_tree_is_indirect_ptr() is an internal API. The correct call to
use is radix_tree_deref_retry() which has the appropriate unlikely()
annotation.
Fixes: c6400ba7e13a ("drivers/hwspinlock: fix race between radix tree insertion and lookup")
Signed-off-by: Matthew Wilcox <[email protected]>
Cc: Konstantin Khlebnikov <[email protected]>
Cc: Kirill Shutemov <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Neil Brown <[email protected]>
Cc: Ross Zwisler <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
of_hwspin_lock_get_id() is protected by the RCU lock, which means that
insertions can occur simultaneously with the lookup. If the radix tree
transitions from a height of 0, we can see a slot with the indirect_ptr
bit set, which will cause us to at least read random memory, and could
cause other havoc.
Fix this by using the newly introduced radix_tree_iter_retry().
Signed-off-by: Matthew Wilcox <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Ohad Ben-Cohen <[email protected]>
Cc: Konstantin Khlebnikov <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
msb of the regmap_field was mistakenly given the value 32, to set all bits
in the regmap update mask; although incorrect this worked until 921cc294,
where the mask calculation was corrected.
Signed-off-by: Bjorn Andersson <[email protected]>
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
Add hwspinlock support for the CSR atlas7 SoC.
The Hardware Spinlock device on atlas7 provides hardware assistance
for synchronization between the multiple processors in the system
(dual Cortex-A7, CAN bus Cortex-M3 and audio DSP).
Reviewed-by: Suman Anna <[email protected]>
Reviewed-by: Bjorn Andersson <[email protected]>
Signed-off-by: Wei Chen <[email protected]>
Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
Add driver for Qualcomm Hardware Mutex block found in many Qualcomm
SoCs.
Based on initial effort by Kumar Gala <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
Reviewed-by: Andy Gross <[email protected]>
Reviewed-by: Jeffrey Hugo <[email protected]>
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
HwSpinlock IP is present only on OMAP4 and other newer SoCs,
which are all device-tree boot only. This patch adds the
base support for parsing the DT nodes, and removes the code
dealing with the traditional platform device instantiation.
Signed-off-by: Suman Anna <[email protected]>
[[email protected]: ack for legacy file removal]
Acked-by: Tony Lindgren <[email protected]>
[comment on the imperfect always-zero base_id]
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
This patch adds a new OF-friendly API of_hwspin_lock_get_id()
for hwspinlock clients to use/request locks from a hwspinlock
device instantiated through a device-tree blob. This new API
can be used by hwspinlock clients to get the id for a specific
lock using the phandle + args specifier, so that it can be
requested using the available hwspin_lock_request_specific()
API.
Signed-off-by: Suman Anna <[email protected]>
Reviewed-by: Bjorn Andersson <[email protected]>
[small comment clarification]
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
A platform_driver does not need to set an owner, it will be populated by the
driver core.
Signed-off-by: Wolfram Sang <[email protected]>
|
|
HwSpinlocks are supported on TI's AM33xx, AM43xx and DRA7xx SoC
device families as well. The IPs are identical to that of
OMAP4/OMAP5, except for the number of locks.
Add a depends on to the above family of SoCs to enable the
build support for OMAP hwspinlock driver for any of the above
SoC configs.
Signed-off-by: Suman Anna <[email protected]>
[small commit log changes]
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
The number of hwspinlocks are determined based on the value read
from the IP block's SYSSTATUS register. However, the module may
not be enabled and clocked, and the read may result in a bus error.
This particular issue is seen rather easily on AM33XX, since the
module wakeup is software controlled, and it is disabled out of
reset. Make sure the module is enabled and clocked before reading
the SYSSTATUS register.
Signed-off-by: Suman Anna <[email protected]>
[replace pm_runtime_put_sync with lenient pm_runtime_put]
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock
Pullhwspinlock update from Ohad Ben-Cohen:
"A single patch from Vincent extending OMAP's hwspinlock support to
OMAP5"
* tag 'hwspinlock-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock:
hwspinlock/omap: support OMAP5 as well
|
|
Even in failed case of pm_runtime_get_sync, the usage_count
is incremented. In order to keep the usage_count with correct
value and runtime power management to behave correctly, call
pm_runtime_put_noidle in such case.
In __hwspin_lock_request, module_put is also called before
return in pm_runtime_get_sync failed case.
Cc: [email protected]
Signed-off-by Liu Chuansheng <[email protected]>
Signed-off-by: Li Fei <[email protected]>
[edit commit log]
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
OMAP5 has spinlocks, too.
Signed-off-by: Vincent Stehlé <[email protected]>
Cc: Tony Lindgren <[email protected]>
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.
Signed-off-by: Bill Pemberton <[email protected]>
Cc: Ohad Ben-Cohen <[email protected]>
Cc: Srinidhi Kasagar <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.
Signed-off-by: Bill Pemberton <[email protected]>
Cc: Ohad Ben-Cohen <[email protected]>
Cc: Srinidhi Kasagar <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.
Signed-off-by: Bill Pemberton <[email protected]>
Cc: Ohad Ben-Cohen <[email protected]>
Cc: Srinidhi Kasagar <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The dereference should be moved below the NULL test.
spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
Commit 300bab9770 (hwspinlock/core: register a bank of hwspinlocks in a
single API call, 2011-09-06) introduced 'hwspin_lock_register_single()'
to register numerous (a bank of) hwspinlock instances in a single API,
'hwspin_lock_register()'.
At which time, 'hwspin_lock_register()' accidentally passes 'local IDs'
to 'hwspin_lock_register_single()', despite that ..._single() requires
'global IDs' to register hwspinlocks.
We have to convert into global IDs by supplying the missing 'base_id'.
Cc: stable <[email protected]>
Signed-off-by: Shinya Kuribayashi <[email protected]>
[ohad: fix error path of hwspin_lock_register, too]
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
drivers/media: video/a5k6aa is a module and so needs module.h
mfd: fix build failures in recently added ab5500 code
hwspinlock/u8500: include linux/module.h
MTD: MAPS: bcm963xx-flash.c: explicitly include module.h
|
|
Fix below build error:
CC drivers/hwspinlock/u8500_hsem.o
drivers/hwspinlock/u8500_hsem.c: In function 'u8500_hsem_probe':
drivers/hwspinlock/u8500_hsem.c:113: error: label 'free_state' used but not defined
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
Include module.h to fix below build error:
CC drivers/hwspinlock/u8500_hsem.o
drivers/hwspinlock/u8500_hsem.c:177: error: 'THIS_MODULE' undeclared here (not in a function)
[...]
drivers/hwspinlock/u8500_hsem.c:196: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/hwspinlock/u8500_hsem.c:196: warning: function declaration isn't a prototype
make[2]: *** [drivers/hwspinlock/u8500_hsem.o] Error 1
make[1]: *** [drivers/hwspinlock] Error 2
make: *** [drivers] Error 2
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Paul Gortmaker <[email protected]>
|
|
Mark omap_hwspinlock_remove with __devexit (and use __devexit_p
appropriately) so the function can be discarded when the conditions are met.
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
Add hwspinlock driver for U8500's Hsem hardware.
At this point only HSem's protocol 1 is used (i.e. no interrupts).
Signed-off-by: Mathieu Poirier <[email protected]>
Acked-by: Linus Walleij <[email protected]>
[[email protected]: adopt recent hwspin_lock_{un}register API changes]
[[email protected]: set the owner member of the driver]
[[email protected]: mark ->remove() function as __devexit]
[[email protected]: write commit log]
[[email protected]: small cleanups]
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
Hardware Spinlock devices usually contain numerous locks (known
devices today support between 32 to 256 locks).
Originally hwspinlock core required drivers to register (and later,
when needed, unregister) each lock separately.
That worked, but required hwspinlocks drivers to do a bit extra work
when they were probed/removed.
This patch changes hwspin_lock_{un}register() to allow a bank of
hwspinlocks to be {un}registered in a single invocation.
A new 'struct hwspinlock_device', which contains an array of 'struct
hwspinlock's is now being passed to the core upon registration (so
instead of wrapping each struct hwspinlock, a priv member has been added
to allow drivers to piggyback their private data with each hwspinlock).
While at it, several per-lock members were moved to be per-device:
1. struct device *dev
2. struct hwspinlock_ops *ops
In addition, now that the array of locks is handled by the core,
there's no reason to maintain a per-lock 'int id' member: the id of the
lock anyway equals to its index in the bank's array plus the bank's
base_id.
Remove this per-lock id member too, and instead use a simple pointers
arithmetic to derive it.
As a result of this change, hwspinlocks drivers are now simpler and smaller
(about %20 code reduction) and the memory footprint of the hwspinlock
framework is reduced.
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
Since we're using non-atomic radix tree allocations, we
should be protecting the tree using a mutex and not a
spinlock.
Non-atomic allocations and process context locking is good enough,
as the tree is manipulated only when locks are registered/
unregistered/requested/freed.
The locks themselves are still protected by spinlocks of course,
and mutexes are not involved in the locking/unlocking paths.
Cc: <[email protected]>
Signed-off-by: Juan Gutierrez <[email protected]>
[[email protected]: rewrite the commit log, #include mutex.h, add minor
commentary]
[[email protected]: update register/unregister parts in hwspinlock.txt]
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
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: Arnd Bergmann <[email protected]>
Signed-off-by: Ohad Ben-Cohen <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
|
|
Instead of allocating every hwspinlock separately, allocate
them all in one shot.
This both simplifies the driver and helps achieving better
slab utilization.
Reported-by: Arnd Bergmann <[email protected]>
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
Use struct device_driver's owner member instead of asking drivers to
explicitly pass the owner again.
This simplifies drivers and also save some memory, since there's no
point now in maintaining a separate owner pointer per hwspinlock.
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
Simplify hwspinlock's Kconfig by making the global CONFIG_HWSPINLOCK
entry invisible; users will just select it when needed.
This also prepares the ground for adding hwspinlock support for other
platforms (the 'depends on ARCH_OMAP4' was rather hideous, and while
we're at it, a dedicated menu is added).
Signed-off-by: Ohad Ben-Cohen <[email protected]>
|
|
Currently only OMAP4 supports hwspinlocks, so don't bother asking
anyone else.
Signed-off-by: Ohad Ben-Cohen <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
|
|
Add hwspinlock support for the OMAP4 Hardware Spinlock device.
The Hardware Spinlock device on OMAP4 provides hardware assistance
for synchronization between the multiple processors in the system
(dual Cortex-A9, dual Cortex-M3 and a C64x+ DSP).
[[email protected]: adapt to hwspinlock framework, tidy up]
Signed-off-by: Simon Que <[email protected]>
Signed-off-by: Hari Kanigeri <[email protected]>
Signed-off-by: Krishnamoorthy, Balaji T <[email protected]>
Signed-off-by: Ohad Ben-Cohen <[email protected]>
Cc: Benoit Cousson <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Paul Walmsley <[email protected]>
Cc: Russell King <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
|
|
Add a platform-independent hwspinlock framework.
Hardware spinlock devices are needed, e.g., in order to access data
that is shared between remote processors, that otherwise have no
alternative mechanism to accomplish synchronization and mutual exclusion
operations.
Signed-off-by: Ohad Ben-Cohen <[email protected]>
Cc: Hari Kanigeri <[email protected]>
Cc: Benoit Cousson <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Paul Walmsley <[email protected]>
Cc: Russell King <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
|