From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH-RFC 1/2] tile: don't panic on iomap Date: Tue, 29 Nov 2011 22:05:11 +0000 Message-ID: <201111292205.11544.arnd@arndb.de> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-pci-owner@vger.kernel.org To: "Michael S. Tsirkin" , Chris Metcalf Cc: Lucas De Marchi , Paul Mundt , Jesse Barnes , "David S. Miller" , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arch@vger.kernel.org, Andrew Morton List-Id: linux-arch.vger.kernel.org On Tuesday 29 November 2011, Michael S. Tsirkin wrote: > diff --git a/arch/tile/include/asm/io.h b/arch/tile/include/asm/io.h > index c9ea165..be6090d 100644 > --- a/arch/tile/include/asm/io.h > +++ b/arch/tile/include/asm/io.h > @@ -204,7 +204,8 @@ static inline long ioport_panic(void) > > static inline void __iomem *ioport_map(unsigned long port, unsigned int len) > { > - return (void __iomem *) ioport_panic(); > + pr_info("Trying to map an IO resource - it does not exit on tile.\n"); > + return NULL; > } Why not just set CONFIG_NO_IOPORT and make this unavailable at compile time? Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from moutng.kundenserver.de ([212.227.17.9]:51776 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755099Ab1K2WFb (ORCPT ); Tue, 29 Nov 2011 17:05:31 -0500 From: Arnd Bergmann Subject: Re: [PATCH-RFC 1/2] tile: don't panic on iomap Date: Tue, 29 Nov 2011 22:05:11 +0000 References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-ID: <201111292205.11544.arnd@arndb.de> Sender: linux-arch-owner@vger.kernel.org List-ID: To: "Michael S. Tsirkin" , Chris Metcalf Cc: Lucas De Marchi , Paul Mundt , Jesse Barnes , "David S. Miller" , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arch@vger.kernel.org, Andrew Morton Message-ID: <20111129220511.kCBHTK3KWhbulQ6bo79HejWsSs8vCapcSTweRxSzODo@z> On Tuesday 29 November 2011, Michael S. Tsirkin wrote: > diff --git a/arch/tile/include/asm/io.h b/arch/tile/include/asm/io.h > index c9ea165..be6090d 100644 > --- a/arch/tile/include/asm/io.h > +++ b/arch/tile/include/asm/io.h > @@ -204,7 +204,8 @@ static inline long ioport_panic(void) > > static inline void __iomem *ioport_map(unsigned long port, unsigned int len) > { > - return (void __iomem *) ioport_panic(); > + pr_info("Trying to map an IO resource - it does not exit on tile.\n"); > + return NULL; > } Why not just set CONFIG_NO_IOPORT and make this unavailable at compile time? Arnd