[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201304171115.51509.arnd@arndb.de>
Date: Wed, 17 Apr 2013 11:15:51 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Clemens Ladisch <clemens@...isch.de>,
Takashi Iwai <tiwai@...e.de>,
Mauro Carvalho Chehab <mchehab@...hat.com>
Subject: Re: Device driver memory 'mmap()' function helper cleanup
On Wednesday 17 April 2013, Linus Torvalds wrote:
> Anyway, I'm attaching the untested patch to several drivers. Guys,
> mind taking a look? The point here is to simplify the interface,
> avoiding bugs, but also:
>
> 5 files changed, 21 insertions(+), 87 deletions(-)
>
> it needs current -git for the new helper function.
>
> NOTE! The driver subsystem .mmap functions seem to almost universally do
>
> if (io_remap_pfn_range(..))
> return -EAGAIN;
> return 0;
I took a look at the hpet_mmap function, which still contains this check:
if (((vma->vm_end - vma->vm_start) != PAGE_SIZE) || vma->vm_pgoff)
return -EINVAL;
As far as I can tell, this check is implied by the new code in
vm_iomap_memory as the len argument passed here is PAGE_SIZE, so you
can remove another three lines in hpet_mmap.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists