From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH 1/6] kernel/locking: Fix compile error with qrwlock.c Date: Thu, 18 May 2017 22:27:53 -0400 (EDT) Message-ID: <20170518.222753.1822313785663789393.davem@davemloft.net> References: <1495154170-854693-1-git-send-email-babu.moger@oracle.com> <1495154170-854693-2-git-send-email-babu.moger@oracle.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Return-path: In-Reply-To: <1495154170-854693-2-git-send-email-babu.moger@oracle.com> Sender: sparclinux-owner@vger.kernel.org To: babu.moger@oracle.com Cc: peterz@infradead.org, mingo@redhat.com, arnd@arndb.de, shannon.nelson@oracle.com, haakon.bugge@oracle.com, steven.sistare@oracle.com, vijay.ac.kumar@oracle.com, jane.chu@oracle.com, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org List-Id: linux-arch.vger.kernel.org From: Babu Moger Date: Thu, 18 May 2017 18:36:05 -0600 > Seeing this error on SPARC while compiling qrwlock.c. > > CC kernel/locking/qrwlock.o > In file included from ./include/asm-generic/qrwlock_types.h:5, > from ./arch/sparc/include/asm/qrwlock.h:4, > from kernel/locking/qrwlock.c:24: > ./arch/sparc/include/asm/spinlock_types.h:5:3: error: > #error "please don't include this file directly" > > Re-arrange the includes in qrwlock_types.h and also include spinlock.h > in qrwlock.c to fix it. This should also help other architectures when > queued rwlock is enabled. > > Signed-off-by: Babu Moger > Reviewed-by: Håkon Bugge > Reviewed-by: Jane Chu > Reviewed-by: Shannon Nelson > Reviewed-by: Vijay Kumar I think you can simply remove the: #ifndef __LINUX_SPINLOCK_TYPES_H # error "please don't include this file directly" #endif stanza from the sparc header file instead. Other architectures don't use this guard. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net ([184.105.139.130]:49640 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753266AbdESC1z (ORCPT ); Thu, 18 May 2017 22:27:55 -0400 Date: Thu, 18 May 2017 22:27:53 -0400 (EDT) Message-ID: <20170518.222753.1822313785663789393.davem@davemloft.net> Subject: Re: [PATCH 1/6] kernel/locking: Fix compile error with qrwlock.c From: David Miller In-Reply-To: <1495154170-854693-2-git-send-email-babu.moger@oracle.com> References: <1495154170-854693-1-git-send-email-babu.moger@oracle.com> <1495154170-854693-2-git-send-email-babu.moger@oracle.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-arch-owner@vger.kernel.org List-ID: To: babu.moger@oracle.com Cc: peterz@infradead.org, mingo@redhat.com, arnd@arndb.de, shannon.nelson@oracle.com, haakon.bugge@oracle.com, steven.sistare@oracle.com, vijay.ac.kumar@oracle.com, jane.chu@oracle.com, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Message-ID: <20170519022753.JHqgFxur6HupJHe3h6U4WkB77i3CF5lNrIG-ehILA9A@z> From: Babu Moger Date: Thu, 18 May 2017 18:36:05 -0600 > Seeing this error on SPARC while compiling qrwlock.c. > > CC kernel/locking/qrwlock.o > In file included from ./include/asm-generic/qrwlock_types.h:5, > from ./arch/sparc/include/asm/qrwlock.h:4, > from kernel/locking/qrwlock.c:24: > ./arch/sparc/include/asm/spinlock_types.h:5:3: error: > #error "please don't include this file directly" > > Re-arrange the includes in qrwlock_types.h and also include spinlock.h > in qrwlock.c to fix it. This should also help other architectures when > queued rwlock is enabled. > > Signed-off-by: Babu Moger > Reviewed-by: Håkon Bugge > Reviewed-by: Jane Chu > Reviewed-by: Shannon Nelson > Reviewed-by: Vijay Kumar I think you can simply remove the: #ifndef __LINUX_SPINLOCK_TYPES_H # error "please don't include this file directly" #endif stanza from the sparc header file instead. Other architectures don't use this guard.