Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752151AbbKZNn6 (ORCPT ); Thu, 26 Nov 2015 08:43:58 -0500 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:59888 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751224AbbKZNnz (ORCPT ); Thu, 26 Nov 2015 08:43:55 -0500 Date: Thu, 26 Nov 2015 13:43:40 +0000 From: Russell King - ARM Linux To: Maarten Lankhorst , Daniel Vetter , Greg Kroah-Hartman , "Paul E. McKenney" , Sumit Semwal Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: reservation.h: build error with lockdep disabled Message-ID: <20151126134340.GB8644@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1200 Lines: 31 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/