From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751292AbcGNJqf (ORCPT ); Thu, 14 Jul 2016 05:46:35 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:36468 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750963AbcGNJqc (ORCPT ); Thu, 14 Jul 2016 05:46:32 -0400 Date: Thu, 14 Jul 2016 11:46:26 +0200 From: Peter Zijlstra To: xinhui Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, mingo@redhat.com, arnd@arndb.de, Waiman.Long@hpe.com Subject: Re: [PATCH v3] locking/qrwlock: Let qrwlock has same layout regardless of the endian Message-ID: <20160714094626.GN30927@twins.programming.kicks-ass.net> References: <1466403652-2931-1-git-send-email-xinhui.pan@linux.vnet.ibm.com> <20160713195423.GD30921@twins.programming.kicks-ass.net> <578742EA.7060108@linux.vnet.ibm.com> <20160714093733.GF30909@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160714093733.GF30909@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 14, 2016 at 11:37:33AM +0200, Peter Zijlstra wrote: > static inline u8 *__qspinlock_lock_byte(struct qspinlock *lock) > { > return (u8 *)lock + 3 * IS_BUILTIN(__BIG_ENDIAN); > } Bugger, that doesn't actually work. IS_BUILTIN expects the symbol to be defined to "1" and __BIG_ENDIAN is not (its "4321").