public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* reservation.h: build error with lockdep disabled
@ 2015-11-26 13:43 Russell King - ARM Linux
  2015-11-26 15:23 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Russell King - ARM Linux @ 2015-11-26 13:43 UTC (permalink / raw)
  To: Maarten Lankhorst, Daniel Vetter, Greg Kroah-Hartman,
	Paul E. McKenney, Sumit Semwal
  Cc: linux-kernel, linux-media, dri-devel

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-26 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-26 13:43 reservation.h: build error with lockdep disabled Russell King - ARM Linux
2015-11-26 15:23 ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox