linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Maxim Shchetynin <maxim@linux.vnet.ibm.com>
Cc: linux-fsdevel@vger.kernel.org, linuxppc-dev@ozlabs.org,
	linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: Re: AZFS file system proposal
Date: Wed, 09 Jul 2008 19:23:34 +1000	[thread overview]
Message-ID: <1215595414.8970.366.camel@pasglop> (raw)
In-Reply-To: <20080709111402.5af92580@mercedes-benz.boeblingen.de.ibm.com>

On Wed, 2008-07-09 at 11:14 +0200, Maxim Shchetynin wrote:
> Am Wed, 09 Jul 2008 18:58:38 +1000
> schrieb Benjamin Herrenschmidt <benh@kernel.crashing.org>:
> 
> > On Tue, 2008-07-01 at 16:59 +0200, Arnd Bergmann wrote:
> > > I wouldn't hold up merging the file system for this problem, but
> > > until it is solved, the Kconfig entry should probably have
> > > a "depends on PPC".
> > 
> > Better, use an ifdef for powerpc flags, and #else to pgprot_noncached.
> 
> Thank you Ben. Then, how about this?
> 
> azfs_mmap(struct file *file, struct vm_area_struct *vma)
> {
> ...
> ...
> ...
> #ifdef CONFIG_PPC
> 	pgprot_t page_prot;
> #endif
> ...
> ...
> ...
> #ifdef CONFIG_PPC
> 	page_prot = pgprot_val(vma->vm_page_prot);
> 	page_prot |= (_PAGE_NO_CACHE | _PAGE_RW);
> 	page_prot &= ~_PAGE_GUARDED;
> 	vma->vm_page_prot = __pgprot(page_prot);
> #else
> 	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> #endif
> ...

I'd rather do

	pgprot_t  prot;

#ifdef CONFIG_PPC
	prot = <whatever>
#else
	prot = pgprot_noncached(...)
#endif
	vma->vm_page_prot = prot;

To limit the number of ifdef's

Cheers,
Ben.

  reply	other threads:[~2008-07-09  9:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080618160629.6cd749a8@mercedes-benz.boeblingen.de.ibm.com>
2008-07-01 14:59 ` AZFS file system proposal Arnd Bergmann
2008-07-07 15:39   ` Maxim Shchetynin
2008-07-08 14:42     ` Arnd Bergmann
2008-07-09  6:48       ` Benjamin Herrenschmidt
2008-07-07 15:42   ` azfs: initial submit of azfs, a non-buffered filesystem Maxim Shchetynin
2008-07-07 19:37     ` Uli Luckas
2008-07-08  9:10       ` Maxim Shchetynin
2008-07-09  8:58   ` AZFS file system proposal Benjamin Herrenschmidt
2008-07-09  9:14     ` Maxim Shchetynin
2008-07-09  9:23       ` Benjamin Herrenschmidt [this message]
2008-07-09 10:58         ` Maxim Shchetynin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1215595414.8970.366.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=arnd@arndb.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=maxim@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).