From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Date: Thu, 26 Jan 2006 16:14:27 +0000 Subject: Re: [PATCH 1/6] {set,clear,test}_bit() related cleanup Message-Id: <20060126161426.GA1709@elf.ucw.cz> List-Id: References: <20060125112625.GA18584@miraclelinux.com> <20060125112857.GB18584@miraclelinux.com> In-Reply-To: <20060125112857.GB18584@miraclelinux.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Akinobu Mita Cc: linux-kernel@vger.kernel.org, Richard Henderson , Ivan Kokshaysky , Russell King , Ian Molton , dev-etrax@axis.com, David Howells , Yoshinori Sato , Linus Torvalds , linux-ia64@vger.kernel.org, Hirokazu Takata , linux-m68k@vger.kernel.org, Greg Ungerer , linux-mips@linux-mips.org, parisc-linux@parisc-linux.org, linuxppc-dev@ozlabs.org, linux390@de.ibm.com, linuxsh-dev@lists.sourceforge.net, linuxsh-shmedia-dev@lists.sourceforge.net, sparclinux@vger.kernel.org, ultralinux@vger.kernel.org, Miles Bader , Andi Kleen , Chris Zankel Hi! > While working on these patch set, I found several possible cleanup > on x86-64 and ia64. It is probably not your fault, but... > Index: 2.6-git/include/asm-x86_64/mmu_context.h > =================================> --- 2.6-git.orig/include/asm-x86_64/mmu_context.h 2006-01-25 19:07:15.000000000 +0900 > +++ 2.6-git/include/asm-x86_64/mmu_context.h 2006-01-25 19:13:59.000000000 +0900 > @@ -34,12 +34,12 @@ > unsigned cpu = smp_processor_id(); > if (likely(prev != next)) { > /* stop flush ipis for the previous mm */ > - clear_bit(cpu, &prev->cpu_vm_mask); > + cpu_clear(cpu, prev->cpu_vm_mask); > #ifdef CONFIG_SMP > write_pda(mmu_state, TLBSTATE_OK); > write_pda(active_mm, next); > #endif > - set_bit(cpu, &next->cpu_vm_mask); > + cpu_set(cpu, next->cpu_vm_mask); > load_cr3(next->pgd); > > if (unlikely(next->context.ldt != prev->context.ldt)) cpu_set sounds *very* ambiguous. We have thing called cpusets, for example. I'd not guess that is set_bit in cpu endianity (is it?). Pavel -- Thanks, Sharp! From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 26 Jan 2006 16:10:54 +0000 (GMT) Received: from gprs189-60.eurotel.cz ([160.218.189.60]:16825 "EHLO amd.ucw.cz") by ftp.linux-mips.org with ESMTP id S8133559AbWAZQKg (ORCPT ); Thu, 26 Jan 2006 16:10:36 +0000 Received: by amd.ucw.cz (Postfix, from userid 8) id 182FE8B540; Thu, 26 Jan 2006 17:14:27 +0100 (CET) Date: Thu, 26 Jan 2006 17:14:27 +0100 From: Pavel Machek To: Akinobu Mita Cc: linux-kernel@vger.kernel.org, Richard Henderson , Ivan Kokshaysky , Russell King , Ian Molton , dev-etrax@axis.com, David Howells , Yoshinori Sato , Linus Torvalds , linux-ia64@vger.kernel.org, Hirokazu Takata , linux-m68k@lists.linux-m68k.org, Greg Ungerer , linux-mips@linux-mips.org, parisc-linux@parisc-linux.org, linuxppc-dev@ozlabs.org, linux390@de.ibm.com, linuxsh-dev@lists.sourceforge.net, linuxsh-shmedia-dev@lists.sourceforge.net, sparclinux@vger.kernel.org, ultralinux@vger.kernel.org, Miles Bader , Andi Kleen , Chris Zankel Subject: Re: [PATCH 1/6] {set,clear,test}_bit() related cleanup Message-ID: <20060126161426.GA1709@elf.ucw.cz> References: <20060125112625.GA18584@miraclelinux.com> <20060125112857.GB18584@miraclelinux.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060125112857.GB18584@miraclelinux.com> X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.9i Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 10181 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: pavel@suse.cz Precedence: bulk X-list: linux-mips Hi! > While working on these patch set, I found several possible cleanup > on x86-64 and ia64. It is probably not your fault, but... > Index: 2.6-git/include/asm-x86_64/mmu_context.h > =================================================================== > --- 2.6-git.orig/include/asm-x86_64/mmu_context.h 2006-01-25 19:07:15.000000000 +0900 > +++ 2.6-git/include/asm-x86_64/mmu_context.h 2006-01-25 19:13:59.000000000 +0900 > @@ -34,12 +34,12 @@ > unsigned cpu = smp_processor_id(); > if (likely(prev != next)) { > /* stop flush ipis for the previous mm */ > - clear_bit(cpu, &prev->cpu_vm_mask); > + cpu_clear(cpu, prev->cpu_vm_mask); > #ifdef CONFIG_SMP > write_pda(mmu_state, TLBSTATE_OK); > write_pda(active_mm, next); > #endif > - set_bit(cpu, &next->cpu_vm_mask); > + cpu_set(cpu, next->cpu_vm_mask); > load_cr3(next->pgd); > > if (unlikely(next->context.ldt != prev->context.ldt)) cpu_set sounds *very* ambiguous. We have thing called cpusets, for example. I'd not guess that is set_bit in cpu endianity (is it?). Pavel -- Thanks, Sharp! From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from amd.ucw.cz (gprs189-60.eurotel.cz [160.218.189.60]) by ozlabs.org (Postfix) with ESMTP id AF68768A9A for ; Fri, 27 Jan 2006 03:14:44 +1100 (EST) Date: Thu, 26 Jan 2006 17:14:27 +0100 From: Pavel Machek To: Akinobu Mita Subject: Re: [PATCH 1/6] {set,clear,test}_bit() related cleanup Message-ID: <20060126161426.GA1709@elf.ucw.cz> References: <20060125112625.GA18584@miraclelinux.com> <20060125112857.GB18584@miraclelinux.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20060125112857.GB18584@miraclelinux.com> Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, Ian Molton , Andi Kleen , David Howells , linuxppc-dev@ozlabs.org, Greg Ungerer , sparclinux@vger.kernel.org, Miles Bader , Yoshinori Sato , Hirokazu Takata , linuxsh-dev@lists.sourceforge.net, Linus Torvalds , Ivan Kokshaysky , Richard Henderson , Chris Zankel , dev-etrax@axis.com, ultralinux@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, linuxsh-shmedia-dev@lists.sourceforge.net, linux390@de.ibm.com, Russell King , parisc-linux@parisc-linux.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi! > While working on these patch set, I found several possible cleanup > on x86-64 and ia64. It is probably not your fault, but... > Index: 2.6-git/include/asm-x86_64/mmu_context.h > =================================================================== > --- 2.6-git.orig/include/asm-x86_64/mmu_context.h 2006-01-25 19:07:15.000000000 +0900 > +++ 2.6-git/include/asm-x86_64/mmu_context.h 2006-01-25 19:13:59.000000000 +0900 > @@ -34,12 +34,12 @@ > unsigned cpu = smp_processor_id(); > if (likely(prev != next)) { > /* stop flush ipis for the previous mm */ > - clear_bit(cpu, &prev->cpu_vm_mask); > + cpu_clear(cpu, prev->cpu_vm_mask); > #ifdef CONFIG_SMP > write_pda(mmu_state, TLBSTATE_OK); > write_pda(active_mm, next); > #endif > - set_bit(cpu, &next->cpu_vm_mask); > + cpu_set(cpu, next->cpu_vm_mask); > load_cr3(next->pgd); > > if (unlikely(next->context.ldt != prev->context.ldt)) cpu_set sounds *very* ambiguous. We have thing called cpusets, for example. I'd not guess that is set_bit in cpu endianity (is it?). Pavel -- Thanks, Sharp! From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Date: Thu, 26 Jan 2006 16:14:27 +0000 Subject: Re: [PATCH 1/6] {set,clear,test}_bit() related cleanup Message-Id: <20060126161426.GA1709@elf.ucw.cz> List-Id: References: <20060125112625.GA18584@miraclelinux.com> <20060125112857.GB18584@miraclelinux.com> In-Reply-To: <20060125112857.GB18584@miraclelinux.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Akinobu Mita Cc: linux-kernel@vger.kernel.org, Richard Henderson , Ivan Kokshaysky , Russell King , Ian Molton , dev-etrax@axis.com, David Howells , Yoshinori Sato , Linus Torvalds , linux-ia64@vger.kernel.org, Hirokazu Takata , linux-m68k@lists.linux-m68k.org, Greg Ungerer , linux-mips@linux-mips.org, parisc-linux@parisc-linux.org, linuxppc-dev@ozlabs.org, linux390@de.ibm.com, linuxsh-dev@lists.sourceforge.net, linuxsh-shmedia-dev@lists.sourceforge.net, sparclinux@vger.kernel.org, ultralinux@vger.kernel.org, Miles Bader , Andi Kleen , Chris Zankel Hi! > While working on these patch set, I found several possible cleanup > on x86-64 and ia64. It is probably not your fault, but... > Index: 2.6-git/include/asm-x86_64/mmu_context.h > =================================> --- 2.6-git.orig/include/asm-x86_64/mmu_context.h 2006-01-25 19:07:15.000000000 +0900 > +++ 2.6-git/include/asm-x86_64/mmu_context.h 2006-01-25 19:13:59.000000000 +0900 > @@ -34,12 +34,12 @@ > unsigned cpu = smp_processor_id(); > if (likely(prev != next)) { > /* stop flush ipis for the previous mm */ > - clear_bit(cpu, &prev->cpu_vm_mask); > + cpu_clear(cpu, prev->cpu_vm_mask); > #ifdef CONFIG_SMP > write_pda(mmu_state, TLBSTATE_OK); > write_pda(active_mm, next); > #endif > - set_bit(cpu, &next->cpu_vm_mask); > + cpu_set(cpu, next->cpu_vm_mask); > load_cr3(next->pgd); > > if (unlikely(next->context.ldt != prev->context.ldt)) cpu_set sounds *very* ambiguous. We have thing called cpusets, for example. I'd not guess that is set_bit in cpu endianity (is it?). Pavel -- Thanks, Sharp! From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964787AbWAZQPN (ORCPT ); Thu, 26 Jan 2006 11:15:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964790AbWAZQPM (ORCPT ); Thu, 26 Jan 2006 11:15:12 -0500 Received: from gprs189-60.eurotel.cz ([160.218.189.60]:39330 "EHLO amd.ucw.cz") by vger.kernel.org with ESMTP id S964786AbWAZQPJ (ORCPT ); Thu, 26 Jan 2006 11:15:09 -0500 Date: Thu, 26 Jan 2006 17:14:27 +0100 From: Pavel Machek To: Akinobu Mita Cc: linux-kernel@vger.kernel.org, Richard Henderson , Ivan Kokshaysky , Russell King , Ian Molton , dev-etrax@axis.com, David Howells , Yoshinori Sato , Linus Torvalds , linux-ia64@vger.kernel.org, Hirokazu Takata , linux-m68k@vger.kernel.org, Greg Ungerer , linux-mips@linux-mips.org, parisc-linux@parisc-linux.org, linuxppc-dev@ozlabs.org, linux390@de.ibm.com, linuxsh-dev@lists.sourceforge.net, linuxsh-shmedia-dev@lists.sourceforge.net, sparclinux@vger.kernel.org, ultralinux@vger.kernel.org, Miles Bader , Andi Kleen , Chris Zankel Subject: Re: [PATCH 1/6] {set,clear,test}_bit() related cleanup Message-ID: <20060126161426.GA1709@elf.ucw.cz> References: <20060125112625.GA18584@miraclelinux.com> <20060125112857.GB18584@miraclelinux.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060125112857.GB18584@miraclelinux.com> X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi! > While working on these patch set, I found several possible cleanup > on x86-64 and ia64. It is probably not your fault, but... > Index: 2.6-git/include/asm-x86_64/mmu_context.h > =================================================================== > --- 2.6-git.orig/include/asm-x86_64/mmu_context.h 2006-01-25 19:07:15.000000000 +0900 > +++ 2.6-git/include/asm-x86_64/mmu_context.h 2006-01-25 19:13:59.000000000 +0900 > @@ -34,12 +34,12 @@ > unsigned cpu = smp_processor_id(); > if (likely(prev != next)) { > /* stop flush ipis for the previous mm */ > - clear_bit(cpu, &prev->cpu_vm_mask); > + cpu_clear(cpu, prev->cpu_vm_mask); > #ifdef CONFIG_SMP > write_pda(mmu_state, TLBSTATE_OK); > write_pda(active_mm, next); > #endif > - set_bit(cpu, &next->cpu_vm_mask); > + cpu_set(cpu, next->cpu_vm_mask); > load_cr3(next->pgd); > > if (unlikely(next->context.ldt != prev->context.ldt)) cpu_set sounds *very* ambiguous. We have thing called cpusets, for example. I'd not guess that is set_bit in cpu endianity (is it?). Pavel -- Thanks, Sharp!