From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Travis Date: Wed, 30 Jan 2008 21:57:31 +0000 Subject: Re: [PATCH 2/6] percpu: Change Kconfig to HAVE_SETUP_PER_CPU_AREA Message-Id: <47A0F2CB.3070204@sgi.com> List-Id: References: <20080130180940.022172000@sgi.com> <20080130180940.369732000@sgi.com> <20080130215015.GA28242@elte.hu> In-Reply-To: <20080130215015.GA28242@elte.hu> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Ingo Molnar Cc: Geert Uytterhoeven , Linus Torvalds , Thomas Gleixner , Christoph Lameter , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andi Kleen , Tony Luck , David Miller , Sam Ravnborg , Rusty Russell , linuxppc-dev@ozlabs.org, linux-ia64@vger.kernel.org Ingo Molnar wrote: > * travis@sgi.com wrote: > >> Change: >> config ARCH_SETS_UP_PER_CPU_AREA >> to: >> config HAVE_SETUP_PER_CPU_AREA > > undocumented change: > >> config ARCH_NO_VIRT_TO_BUS >> --- a/init/main.c >> +++ b/init/main.c >> @@ -380,6 +380,8 @@ static void __init setup_per_cpu_areas(v >> >> /* Copy section for each CPU (we discard the original) */ >> size = ALIGN(PERCPU_ENOUGH_ROOM, PAGE_SIZE); >> + printk(KERN_INFO >> + "PERCPU: Allocating %lu bytes of per cpu data (main)\n", size); >> ptr = alloc_bootmem_pages(size * nr_possible_cpus); > > but looks fine to me. > > Ingo Sorry, I should have noted this. The primary reason I put this in, is that if the HAVE_SETUP_PER_CPU_AREA is not set when it should be, then the incorrect (generic) setup_per_cpu_areas() is used and weird things happen later on. The above line documents that PERCPU has been allocated by init/main.c version of this function in the startup messages. (Since it's a static function, there is no "duplicate label" error in the linker.) Thanks, Mike From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay1.sgi.com [192.48.171.29]) by ozlabs.org (Postfix) with ESMTP id 4CA89DDF36 for ; Thu, 31 Jan 2008 08:57:37 +1100 (EST) Message-ID: <47A0F2CB.3070204@sgi.com> Date: Wed, 30 Jan 2008 13:57:31 -0800 From: Mike Travis MIME-Version: 1.0 To: Ingo Molnar Subject: Re: [PATCH 2/6] percpu: Change Kconfig to HAVE_SETUP_PER_CPU_AREA linux-2.6.git References: <20080130180940.022172000@sgi.com> <20080130180940.369732000@sgi.com> <20080130215015.GA28242@elte.hu> In-Reply-To: <20080130215015.GA28242@elte.hu> Content-Type: text/plain; charset=ISO-8859-1 Cc: Tony Luck , linux-ia64@vger.kernel.org, linuxppc-dev@ozlabs.org, Sam Ravnborg , Rusty Russell , linux-kernel@vger.kernel.org, Andi Kleen , linux-mm@kvack.org, Geert Uytterhoeven , Thomas Gleixner , Linus Torvalds , David Miller , Christoph Lameter List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Ingo Molnar wrote: > * travis@sgi.com wrote: > >> Change: >> config ARCH_SETS_UP_PER_CPU_AREA >> to: >> config HAVE_SETUP_PER_CPU_AREA > > undocumented change: > >> config ARCH_NO_VIRT_TO_BUS >> --- a/init/main.c >> +++ b/init/main.c >> @@ -380,6 +380,8 @@ static void __init setup_per_cpu_areas(v >> >> /* Copy section for each CPU (we discard the original) */ >> size = ALIGN(PERCPU_ENOUGH_ROOM, PAGE_SIZE); >> + printk(KERN_INFO >> + "PERCPU: Allocating %lu bytes of per cpu data (main)\n", size); >> ptr = alloc_bootmem_pages(size * nr_possible_cpus); > > but looks fine to me. > > Ingo Sorry, I should have noted this. The primary reason I put this in, is that if the HAVE_SETUP_PER_CPU_AREA is not set when it should be, then the incorrect (generic) setup_per_cpu_areas() is used and weird things happen later on. The above line documents that PERCPU has been allocated by init/main.c version of this function in the startup messages. (Since it's a static function, there is no "duplicate label" error in the linker.) Thanks, Mike From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756695AbYA3V5s (ORCPT ); Wed, 30 Jan 2008 16:57:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752821AbYA3V5j (ORCPT ); Wed, 30 Jan 2008 16:57:39 -0500 Received: from relay1.sgi.com ([192.48.171.29]:60517 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752770AbYA3V5h (ORCPT ); Wed, 30 Jan 2008 16:57:37 -0500 Message-ID: <47A0F2CB.3070204@sgi.com> Date: Wed, 30 Jan 2008 13:57:31 -0800 From: Mike Travis User-Agent: Thunderbird 2.0.0.6 (X11/20070801) MIME-Version: 1.0 To: Ingo Molnar CC: Geert Uytterhoeven , Linus Torvalds , Thomas Gleixner , Christoph Lameter , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andi Kleen , Tony Luck , David Miller , Sam Ravnborg , Rusty Russell , linuxppc-dev@ozlabs.org, linux-ia64@vger.kernel.org Subject: Re: [PATCH 2/6] percpu: Change Kconfig to HAVE_SETUP_PER_CPU_AREA linux-2.6.git References: <20080130180940.022172000@sgi.com> <20080130180940.369732000@sgi.com> <20080130215015.GA28242@elte.hu> In-Reply-To: <20080130215015.GA28242@elte.hu> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ingo Molnar wrote: > * travis@sgi.com wrote: > >> Change: >> config ARCH_SETS_UP_PER_CPU_AREA >> to: >> config HAVE_SETUP_PER_CPU_AREA > > undocumented change: > >> config ARCH_NO_VIRT_TO_BUS >> --- a/init/main.c >> +++ b/init/main.c >> @@ -380,6 +380,8 @@ static void __init setup_per_cpu_areas(v >> >> /* Copy section for each CPU (we discard the original) */ >> size = ALIGN(PERCPU_ENOUGH_ROOM, PAGE_SIZE); >> + printk(KERN_INFO >> + "PERCPU: Allocating %lu bytes of per cpu data (main)\n", size); >> ptr = alloc_bootmem_pages(size * nr_possible_cpus); > > but looks fine to me. > > Ingo Sorry, I should have noted this. The primary reason I put this in, is that if the HAVE_SETUP_PER_CPU_AREA is not set when it should be, then the incorrect (generic) setup_per_cpu_areas() is used and weird things happen later on. The above line documents that PERCPU has been allocated by init/main.c version of this function in the startup messages. (Since it's a static function, there is no "duplicate label" error in the linker.) Thanks, Mike From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <47A0F2CB.3070204@sgi.com> Date: Wed, 30 Jan 2008 13:57:31 -0800 From: Mike Travis MIME-Version: 1.0 Subject: Re: [PATCH 2/6] percpu: Change Kconfig to HAVE_SETUP_PER_CPU_AREA linux-2.6.git References: <20080130180940.022172000@sgi.com> <20080130180940.369732000@sgi.com> <20080130215015.GA28242@elte.hu> In-Reply-To: <20080130215015.GA28242@elte.hu> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Ingo Molnar Cc: Geert Uytterhoeven , Linus Torvalds , Thomas Gleixner , Christoph Lameter , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andi Kleen , Tony Luck , David Miller , Sam Ravnborg , Rusty Russell , linuxppc-dev@ozlabs.org, linux-ia64@vger.kernel.org List-ID: Ingo Molnar wrote: > * travis@sgi.com wrote: > >> Change: >> config ARCH_SETS_UP_PER_CPU_AREA >> to: >> config HAVE_SETUP_PER_CPU_AREA > > undocumented change: > >> config ARCH_NO_VIRT_TO_BUS >> --- a/init/main.c >> +++ b/init/main.c >> @@ -380,6 +380,8 @@ static void __init setup_per_cpu_areas(v >> >> /* Copy section for each CPU (we discard the original) */ >> size = ALIGN(PERCPU_ENOUGH_ROOM, PAGE_SIZE); >> + printk(KERN_INFO >> + "PERCPU: Allocating %lu bytes of per cpu data (main)\n", size); >> ptr = alloc_bootmem_pages(size * nr_possible_cpus); > > but looks fine to me. > > Ingo Sorry, I should have noted this. The primary reason I put this in, is that if the HAVE_SETUP_PER_CPU_AREA is not set when it should be, then the incorrect (generic) setup_per_cpu_areas() is used and weird things happen later on. The above line documents that PERCPU has been allocated by init/main.c version of this function in the startup messages. (Since it's a static function, there is no "duplicate label" error in the linker.) Thanks, Mike -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org