From mboxrd@z Thu Jan 1 00:00:00 1970 From: mita@miraclelinux.com (Akinobu Mita) Date: Thu, 26 Jan 2006 03:50:04 +0000 Subject: Re: [PATCH 5/6] fix warning on test_ti_thread_flag() Message-Id: <20060126035004.GA11543@miraclelinux.com> List-Id: References: <200601252002.k0PK2Mg31276@unix-os.sc.intel.com> In-Reply-To: <200601252002.k0PK2Mg31276@unix-os.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: "Chen, Kenneth W" Cc: 'Geert Uytterhoeven' , Linux Kernel Development , linux-ia64@vger.kernel.org, linux-m68k@vger.kernel.org, parisc-linux@parisc-linux.org, Linux/PPC Development , linux390@de.ibm.com, linuxsh-dev@lists.sourceforge.net, sparclinux@vger.kernel.org, ultralinux@vger.kernel.org, Andi Kleen On Wed, Jan 25, 2006 at 12:02:21PM -0800, Chen, Kenneth W wrote: > Geert Uytterhoeven wrote on Wednesday, January 25, 2006 9:19 AM > > > I don't think you need to change the flags size. > > > > Passing a pointer to a 32-bit entity to a function that takes a > > pointer to a 64-bit entity is a classical endianness bug. So it's > > better to change it, before people copy the code to a big endian > > platform. > > Well, x86-64 and linux-ia64 both use little endian. I don't > understand why you are barking at us with big endian issue. > I can fix this without changing the flags size for those architectures. 1. Introduce *_le_bit() bit operations which takes void *addr (already I have these functions in the scope of HAVE_ARCH_EXT2_NON_ATOMIC_BITOPS in my patch) 2. Change flags to __u8 flags[4] or __u8 flags[8] for each architectures. 3. Use *_le_bit() in include/linux/thread_info.h From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail01.miraclelinux.com (ns.miraclelinux.com [219.118.163.66]) by ozlabs.org (Postfix) with ESMTP id 177CA68A8D for ; Thu, 26 Jan 2006 14:49:58 +1100 (EST) Date: Thu, 26 Jan 2006 12:50:04 +0900 To: "Chen, Kenneth W" Subject: Re: [PATCH 5/6] fix warning on test_ti_thread_flag() Message-ID: <20060126035004.GA11543@miraclelinux.com> References: <200601252002.k0PK2Mg31276@unix-os.sc.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <200601252002.k0PK2Mg31276@unix-os.sc.intel.com> From: mita@miraclelinux.com (Akinobu Mita) Cc: linux-m68k@vger.kernel.org, linux-ia64@vger.kernel.org, ultralinux@vger.kernel.org, Linux Kernel Development , Andi Kleen , Linux/PPC Development , 'Geert Uytterhoeven' , sparclinux@vger.kernel.org, linux390@de.ibm.com, linuxsh-dev@lists.sourceforge.net, parisc-linux@parisc-linux.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, Jan 25, 2006 at 12:02:21PM -0800, Chen, Kenneth W wrote: > Geert Uytterhoeven wrote on Wednesday, January 25, 2006 9:19 AM > > > I don't think you need to change the flags size. > > > > Passing a pointer to a 32-bit entity to a function that takes a > > pointer to a 64-bit entity is a classical endianness bug. So it's > > better to change it, before people copy the code to a big endian > > platform. > > Well, x86-64 and linux-ia64 both use little endian. I don't > understand why you are barking at us with big endian issue. > I can fix this without changing the flags size for those architectures. 1. Introduce *_le_bit() bit operations which takes void *addr (already I have these functions in the scope of HAVE_ARCH_EXT2_NON_ATOMIC_BITOPS in my patch) 2. Change flags to __u8 flags[4] or __u8 flags[8] for each architectures. 3. Use *_le_bit() in include/linux/thread_info.h From mboxrd@z Thu Jan 1 00:00:00 1970 From: mita@miraclelinux.com (Akinobu Mita) Date: Thu, 26 Jan 2006 03:50:04 +0000 Subject: Re: [PATCH 5/6] fix warning on test_ti_thread_flag() Message-Id: <20060126035004.GA11543@miraclelinux.com> List-Id: References: <200601252002.k0PK2Mg31276@unix-os.sc.intel.com> In-Reply-To: <200601252002.k0PK2Mg31276@unix-os.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: "Chen, Kenneth W" Cc: linux-m68k@vger.kernel.org, linux-ia64@vger.kernel.org, ultralinux@vger.kernel.org, Linux Kernel Development , Andi Kleen , Linux/PPC Development , 'Geert Uytterhoeven' , sparclinux@vger.kernel.org, linux390@de.ibm.com, linuxsh-dev@lists.sourceforge.net, parisc-linux@parisc-linux.org On Wed, Jan 25, 2006 at 12:02:21PM -0800, Chen, Kenneth W wrote: > Geert Uytterhoeven wrote on Wednesday, January 25, 2006 9:19 AM > > > I don't think you need to change the flags size. > > > > Passing a pointer to a 32-bit entity to a function that takes a > > pointer to a 64-bit entity is a classical endianness bug. So it's > > better to change it, before people copy the code to a big endian > > platform. > > Well, x86-64 and linux-ia64 both use little endian. I don't > understand why you are barking at us with big endian issue. > I can fix this without changing the flags size for those architectures. 1. Introduce *_le_bit() bit operations which takes void *addr (already I have these functions in the scope of HAVE_ARCH_EXT2_NON_ATOMIC_BITOPS in my patch) 2. Change flags to __u8 flags[4] or __u8 flags[8] for each architectures. 3. Use *_le_bit() in include/linux/thread_info.h From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932251AbWAZDvr (ORCPT ); Wed, 25 Jan 2006 22:51:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932269AbWAZDuM (ORCPT ); Wed, 25 Jan 2006 22:50:12 -0500 Received: from ns.miraclelinux.com ([219.118.163.66]:10471 "EHLO mail01.miraclelinux.com") by vger.kernel.org with ESMTP id S932234AbWAZDt7 (ORCPT ); Wed, 25 Jan 2006 22:49:59 -0500 Date: Thu, 26 Jan 2006 12:50:04 +0900 To: "Chen, Kenneth W" Cc: "'Geert Uytterhoeven'" , Linux Kernel Development , linux-ia64@vger.kernel.org, linux-m68k@vger.kernel.org, parisc-linux@parisc-linux.org, Linux/PPC Development , linux390@de.ibm.com, linuxsh-dev@lists.sourceforge.net, sparclinux@vger.kernel.org, ultralinux@vger.kernel.org, Andi Kleen Subject: Re: [PATCH 5/6] fix warning on test_ti_thread_flag() Message-ID: <20060126035004.GA11543@miraclelinux.com> References: <200601252002.k0PK2Mg31276@unix-os.sc.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200601252002.k0PK2Mg31276@unix-os.sc.intel.com> User-Agent: Mutt/1.5.9i From: mita@miraclelinux.com (Akinobu Mita) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 25, 2006 at 12:02:21PM -0800, Chen, Kenneth W wrote: > Geert Uytterhoeven wrote on Wednesday, January 25, 2006 9:19 AM > > > I don't think you need to change the flags size. > > > > Passing a pointer to a 32-bit entity to a function that takes a > > pointer to a 64-bit entity is a classical endianness bug. So it's > > better to change it, before people copy the code to a big endian > > platform. > > Well, x86-64 and linux-ia64 both use little endian. I don't > understand why you are barking at us with big endian issue. > I can fix this without changing the flags size for those architectures. 1. Introduce *_le_bit() bit operations which takes void *addr (already I have these functions in the scope of HAVE_ARCH_EXT2_NON_ATOMIC_BITOPS in my patch) 2. Change flags to __u8 flags[4] or __u8 flags[8] for each architectures. 3. Use *_le_bit() in include/linux/thread_info.h