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.
next prev parent reply other threads:[~2008-07-09 9:24 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-18 14:06 AZFS file system proposal Maxim Shchetynin
2008-06-18 14:06 ` Maxim Shchetynin
2008-07-01 14:59 ` Arnd Bergmann
2008-07-01 14:59 ` Arnd Bergmann
2008-07-07 15:39 ` Maxim Shchetynin
2008-07-07 15:39 ` Maxim Shchetynin
2008-07-07 15:39 ` Maxim Shchetynin
2008-07-08 14:42 ` Arnd Bergmann
2008-07-08 14:42 ` Arnd Bergmann
2008-07-08 14:42 ` Arnd Bergmann
2008-07-09 6:48 ` Benjamin Herrenschmidt
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 15:42 ` Maxim Shchetynin
2008-07-07 15:42 ` Maxim Shchetynin
2008-07-07 19:37 ` Uli Luckas
2008-07-07 19:37 ` Uli Luckas
2008-07-08 9:10 ` Maxim Shchetynin
2008-07-08 9:10 ` Maxim Shchetynin
2008-07-08 9:10 ` Maxim Shchetynin
2008-07-09 8:58 ` AZFS file system proposal Benjamin Herrenschmidt
2008-07-09 8:58 ` Benjamin Herrenschmidt
2008-07-09 9:14 ` Maxim Shchetynin
2008-07-09 9:14 ` Maxim Shchetynin
2008-07-09 9:14 ` Maxim Shchetynin
2008-07-09 9:23 ` Benjamin Herrenschmidt [this message]
2008-07-09 10:58 ` Maxim Shchetynin
2008-07-09 10:58 ` Maxim Shchetynin
2008-07-09 10:58 ` Maxim Shchetynin
-- strict thread matches above, loose matches on Subject: below --
2008-06-09 8:46 Maxim Shchetynin
2008-06-09 8:46 ` Maxim Shchetynin
2008-06-09 12:55 ` Matthew Wilcox
2008-06-10 8:49 ` Maxim Shchetynin
2008-06-10 8:49 ` Maxim Shchetynin
2008-06-10 22:02 ` Jan Engelhardt
2008-06-17 9:06 ` Maxim Shchetynin
2008-06-17 9:06 ` Maxim Shchetynin
2008-06-17 9:35 ` Jan Engelhardt
2008-06-17 10:53 ` Jörn Engel
2008-06-17 10:53 ` Jörn Engel
2008-06-17 14:06 ` Maxim Shchetynin
2008-06-17 14:06 ` Maxim Shchetynin
2008-06-17 14:45 ` Jörn Engel
2008-06-17 14:45 ` Jörn Engel
2008-06-17 11:57 ` Maxim Shchetynin
2008-06-17 11:57 ` Maxim Shchetynin
2008-06-17 14:36 ` Jan Engelhardt
2008-06-17 15:51 ` Jörn Engel
2008-06-17 15:51 ` Jörn Engel
2008-06-18 11:15 ` Maxim Shchetynin
2008-06-18 11:15 ` Maxim Shchetynin
2008-06-18 20:56 ` Jörn Engel
2008-06-18 11:21 ` Maxim Shchetynin
2008-06-18 11:21 ` Maxim Shchetynin
2008-06-17 15:02 ` Dmitri Vorobiev
2008-06-18 14:01 ` Maxim Shchetynin
2008-06-18 14:01 ` Maxim Shchetynin
2008-06-18 11:27 ` Christoph Hellwig
2008-06-18 14:03 ` 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.