Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1278218 > unrolled thread
| Started by | Russell King - ARM Linux <linux@arm.linux.org.uk> |
|---|---|
| First post | 2015-11-26 14:50 +0100 |
| Last post | 2015-11-26 16:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
reservation.h: build error with lockdep disabled Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-11-26 14:50 +0100
Re: reservation.h: build error with lockdep disabled "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-11-26 16:30 +0100
| From | Russell King - ARM Linux <linux@arm.linux.org.uk> |
|---|---|
| Date | 2015-11-26 14:50 +0100 |
| Subject | reservation.h: build error with lockdep disabled |
| Message-ID | <qz55T-5QV-1@gated-at.bofh.it> |
As of 3c3b177a9369 ("reservation: add suppport for read-only access
using rcu") linux/reservation.h uses lockdep macros:
+#define reservation_object_held(obj) lockdep_is_held(&(obj)->lock.base)
This results in build errors when lockdep is disabled as lockdep_is_held()
is only available when lockdep is enabled. This has been reported today
to break the etnaviv kernel driver, which we're hoping to submit for 4.5.
As this gets used with rcu_dereference_protected(), eg:
static inline struct reservation_object_list *
reservation_object_get_list(struct reservation_object *obj)
{
return rcu_dereference_protected(obj->fence,
reservation_object_held(obj));
}
I'm guessing that it's not going to be a simple case of making it always
return true or always return false.
Any ideas how to solve this?
--
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2015-11-26 16:30 +0100 |
| Message-ID | <qz6EH-6XT-27@gated-at.bofh.it> |
| In reply to | #1278218 |
On Thu, Nov 26, 2015 at 01:43:40PM +0000, Russell King - ARM Linux wrote:
> As of 3c3b177a9369 ("reservation: add suppport for read-only access
> using rcu") linux/reservation.h uses lockdep macros:
>
> +#define reservation_object_held(obj) lockdep_is_held(&(obj)->lock.base)
>
> This results in build errors when lockdep is disabled as lockdep_is_held()
> is only available when lockdep is enabled. This has been reported today
> to break the etnaviv kernel driver, which we're hoping to submit for 4.5.
>
> As this gets used with rcu_dereference_protected(), eg:
>
> static inline struct reservation_object_list *
> reservation_object_get_list(struct reservation_object *obj)
> {
> return rcu_dereference_protected(obj->fence,
> reservation_object_held(obj));
> }
>
> I'm guessing that it's not going to be a simple case of making it always
> return true or always return false.
>
> Any ideas how to solve this?
The usual approach is something like this:
#ifdef CONFIG_PROVE_LOCKING
#define reservation_object_held(obj) lockdep_is_held(&(obj)->lock.base)
#else
#define reservation_object_held(obj) true
#endif
Thanx, Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web