From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756107AbYERJJ6 (ORCPT ); Sun, 18 May 2008 05:09:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751082AbYERJJs (ORCPT ); Sun, 18 May 2008 05:09:48 -0400 Received: from www.tglx.de ([62.245.132.106]:60924 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750880AbYERJJs (ORCPT ); Sun, 18 May 2008 05:09:48 -0400 Date: Sun, 18 May 2008 11:09:22 +0200 (CEST) From: Thomas Gleixner To: Jeremy Fitzhardinge cc: "Maciej W. Rozycki" , Tom Spink , Cyrill Gorcunov , Ingo Molnar , "H. Peter Anvin" , LKML , Jiri Slaby , Sam Ravnborg , Andi Kleen Subject: Re: [RFC] x86: merge nmi_32-64 to nmi.c In-Reply-To: <482FD9F2.8080204@goop.org> Message-ID: References: <20080517192200.GA6914@cvg> <7b9198260805171328u555eec17t3597f3378edbda88@mail.gmail.com> <482FD9F2.8080204@goop.org> User-Agent: Alpine 1.10 (LFD 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 18 May 2008, Jeremy Fitzhardinge wrote: > Thomas Gleixner wrote: > > Definitely, but we should do it at the Kconfig level which allows us > > to have integer defines as well, so we end up with something like: > > > > static inline unsigned int get_nmi_count(int cpu) > > { > > return CONFIG_X86_64 ? cpu_pda(cpu)->__nmi_count : nmi_count(cpu); > > } > > > > Unfortunately that doesn't work because when CONFIG_X86_64 isn't defined it > doesn't expand to 0. It would be nice if CONFIG_* expanded to 0/1, but we'd > need to change all the #ifdef CONFIG_* to #if CONFIG_*... You can have int type CONFIG_ which is always expanded. We have to add one of those though. Thanks, tglx