From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934583AbXGSHGh (ORCPT ); Thu, 19 Jul 2007 03:06:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756671AbXGSHGa (ORCPT ); Thu, 19 Jul 2007 03:06:30 -0400 Received: from smtp2.linux-foundation.org ([207.189.120.14]:52749 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756066AbXGSHG3 (ORCPT ); Thu, 19 Jul 2007 03:06:29 -0400 Date: Thu, 19 Jul 2007 00:05:49 -0700 From: Andrew Morton To: Dave Airlie Cc: linux-kernel@vger.kernel.org Subject: cmpxchg is not available to generic code Message-Id: <20070719000549.1e57b5b2.akpm@linux-foundation.org> X-Mailer: Sylpheed 2.4.1 (GTK+ 2.8.17; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org arm: drivers/char/drm/drm_lock.c: In function `drm_lock_take': drivers/char/drm/drm_lock.c:221: error: implicit declaration of function `cmpxchg' You might be able to use atomic_cmpxchg, which _is_ present on all architectures. Or use a spinlock. What's that code doing anyway? driver-private locking primitives?