From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755684AbXEQJtt (ORCPT ); Thu, 17 May 2007 05:49:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754394AbXEQJtl (ORCPT ); Thu, 17 May 2007 05:49:41 -0400 Received: from pentafluge.infradead.org ([213.146.154.40]:37021 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754540AbXEQJtl (ORCPT ); Thu, 17 May 2007 05:49:41 -0400 Date: Thu, 17 May 2007 10:49:30 +0100 From: Christoph Hellwig To: "Antonino A. Daplas" Cc: Andrew Morton , Linux Fbdev development list , Linux Kernel Development Subject: Re: [PATCH 10/10] [HEADS UP] fbdev: Move arch-specific bits to their respective subdirectories Message-ID: <20070517094930.GA27627@infradead.org> Mail-Followup-To: Christoph Hellwig , "Antonino A. Daplas" , Andrew Morton , Linux Fbdev development list , Linux Kernel Development References: <464B78BC.4080900@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <464B78BC.4080900@gmail.com> User-Agent: Mutt/1.4.2.2i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 17, 2007 at 05:33:48AM +0800, Antonino A. Daplas wrote: > -#if defined(__sparc__) && !defined(__sparc_v9__) > - /* Should never get here, all fb drivers should have their own > - mmap routines */ > - return -EINVAL; > -#else > - /* !sparc32... */ > + if (fb_mmap_required()) > + return -EINVAL; > + I don't like this bit. It's just that all sparc frame buffers happen to have a mmap method but there's nothing fundamentally arch specific here. You should be able to plug a pci video card into any linux supported machine provided the fb driver does the full setup (which only very few do in practice, but..) So I'd just require drivers to have a fb_mmap method and make fb_mmap the default one. The page protection cleanup is still nice of course, but it might make sense to give it a more generic name as it's not really fb specific.