From: Nick Piggin <npiggin@suse.de>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Hugh Dickins <hugh@veritas.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-ia64@vger.kernel.org, rth@twiddle.net,
Jaya Kumar <jayakumar.lkml@gmail.com>,
krh@redhat.com, stefanr@s5r6.in-berlin.de, rolandd@cisco.com,
mshefty@ichips.intel.com, hal.rosenstock@gmail.com,
avi@qumranet.com, mchehab@infradead.org, dgilbert@interlog.com,
Greg Kroah-Hartman <greg@kroah.com>, Takashi Iwai <tiwai@suse.de>,
perex@perex.cz, Karsten Wiese <annabellesgarden@yahoo.de>
Subject: Re: [rfc][patch] remove nopage
Date: Mon, 12 Nov 2007 05:36:44 +0100 [thread overview]
Message-ID: <20071112043644.GA20602@wotan.suse.de> (raw)
In-Reply-To: <4737B4AD.9070809@pobox.com>
On Sun, Nov 11, 2007 at 09:04:29PM -0500, Jeff Garzik wrote:
> Nick Piggin wrote:
> >Index: linux-2.6/sound/oss/via82cxxx_audio.c
> >===================================================================
> >--- linux-2.6.orig/sound/oss/via82cxxx_audio.c
> >+++ linux-2.6/sound/oss/via82cxxx_audio.c
> >@@ -2099,8 +2099,7 @@ static void via_dsp_cleanup (struct via_
> > }
> >
> >
> >-static struct page * via_mm_nopage (struct vm_area_struct * vma,
> >- unsigned long address, int *type)
> >+static int via_mm_fault (struct vm_area_struct *vma, struct vm_fault *vmf)
> > {
> > struct via_info *card = vma->vm_private_data;
> > struct via_channel *chan = &card->ch_out;
> >@@ -2108,22 +2107,14 @@ static struct page * via_mm_nopage (stru
> > unsigned long pgoff;
> > int rd, wr;
> >
> >- DPRINTK ("ENTER, start %lXh, ofs %lXh, pgoff %ld, addr %lXh\n",
> >- vma->vm_start,
> >- address - vma->vm_start,
> >- (address - vma->vm_start) >> PAGE_SHIFT,
> >- address);
> >-
> >- if (address > vma->vm_end) {
> >- DPRINTK ("EXIT, returning NOPAGE_SIGBUS\n");
> >- return NOPAGE_SIGBUS; /* Disallow mremap */
> >- }
> >+ DPRINTK ("ENTER, pgoff %ld\n", vmf->pgoff);
> >+
> > if (!card) {
> >- DPRINTK ("EXIT, returning NOPAGE_SIGBUS\n");
> >- return NOPAGE_SIGBUS; /* Nothing allocated */
> >+ DPRINTK ("EXIT, returning VM_FAULT_SIGBUS\n");
> >+ return VM_FAULT_SIGBUS; /* Nothing allocated */
> > }
> >
> >- pgoff = vma->vm_pgoff + ((address - vma->vm_start) >> PAGE_SHIFT);
> >+ pgoff = vmf->pgoff;
> > rd = card->ch_in.is_mapped;
> > wr = card->ch_out.is_mapped;
> >
> >@@ -2150,9 +2141,8 @@ static struct page * via_mm_nopage (stru
> > DPRINTK ("EXIT, returning page %p for cpuaddr %lXh\n",
> > dmapage, (unsigned long) chan->pgtbl[pgoff].cpuaddr);
> > get_page (dmapage);
> >- if (type)
> >- *type = VM_FAULT_MINOR;
> >- return dmapage;
> >+ vmf->page = dmapage;
> >+ return 0;
> > }
>
>
> Although the overall concept looks nice (ACK, good work), the above
> change does not build. The code continues to reference via_mm_nopage(),
> which has been renamed to via_mm_fault() in your patch.
Ah dang, it was just the .nopage in the same file that I missed.
Fixed. Thanks.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-11-12 4:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-12 1:56 Nick Piggin
2007-11-12 2:04 ` Jeff Garzik
2007-11-12 4:36 ` Nick Piggin [this message]
2007-11-14 13:26 ` Takashi Iwai
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=20071112043644.GA20602@wotan.suse.de \
--to=npiggin@suse.de \
--cc=akpm@linux-foundation.org \
--cc=annabellesgarden@yahoo.de \
--cc=avi@qumranet.com \
--cc=dgilbert@interlog.com \
--cc=greg@kroah.com \
--cc=hal.rosenstock@gmail.com \
--cc=hugh@veritas.com \
--cc=jayakumar.lkml@gmail.com \
--cc=jgarzik@pobox.com \
--cc=krh@redhat.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mchehab@infradead.org \
--cc=mshefty@ichips.intel.com \
--cc=perex@perex.cz \
--cc=rolandd@cisco.com \
--cc=rth@twiddle.net \
--cc=stefanr@s5r6.in-berlin.de \
--cc=tiwai@suse.de \
--cc=torvalds@linux-foundation.org \
/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