All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>, linux-mm@kvack.org
Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/4] mm: Move ioremap page table mapping function to mm/
Date: Mon, 10 Jun 2019 16:21:16 +1000	[thread overview]
Message-ID: <1560147293.7fxg58sp20.astroid@bobo.none> (raw)
In-Reply-To: <03de53e9-f1f9-1632-567e-b88aabc56764@arm.com>

Anshuman Khandual's on June 10, 2019 3:42 pm:
> 
> 
> On 06/10/2019 10:08 AM, Nicholas Piggin wrote:
>> ioremap_page_range is a generic function to create a kernel virtual
>> mapping, move it to mm/vmalloc.c and rename it vmap_range.
> 
> Absolutely. It belongs in mm/vmalloc.c as its a kernel virtual range.
> But what is the rationale of changing the name to vmap_range ?

Well it doesn't just map IO. It's for arbitrary kernel virtual mapping
(including ioremap). Last patch uses it to map regular cacheable
memory.

>> For clarity with this move, also:
>> - Rename vunmap_page_range (vmap_range's inverse) to vunmap_range.
> 
> Will be inverse for both vmap_range() and vmap_page[s]_range() ?

Yes.

> 
>> - Rename vmap_page_range (which takes a page array) to vmap_pages.
> 
> s/vmap_pages/vmap_pages_range instead here ................^^^^^^

Yes.

> This deviates from the subject of this patch that it is related to
> ioremap only. I believe what this patch intends is to create
> 
> - vunmap_range() takes [VA range]
> 
> 	This will be the common kernel virtual range tear down
> 	function for ranges created either with vmap_range() or
> 	vmap_pages_range(). Is that correct ?
> - vmap_range() takes [VA range, PA range, prot]
> - vmap_pages_range() takes [VA range, struct pages, prot] 

That's right although we already have all those functions, so I don't
create anything, only move and re-name. I'm happy to change the
subject if you have a preference.

> Can we re-order the arguments (pages <--> prot) for vmap_pages_range()
> just to make it sync with vmap_range() ?
> 
> static int vmap_pages_range(unsigned long start, unsigned long end,
>  			   pgprot_t prot, struct page **pages)
> 

Sure, makes sense.

Thanks,
Nick


WARNING: multiple messages have this Message-ID (diff)
From: Nicholas Piggin <npiggin@gmail.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>, linux-mm@kvack.org
Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/4] mm: Move ioremap page table mapping function to mm/
Date: Mon, 10 Jun 2019 16:21:16 +1000	[thread overview]
Message-ID: <1560147293.7fxg58sp20.astroid@bobo.none> (raw)
In-Reply-To: <03de53e9-f1f9-1632-567e-b88aabc56764@arm.com>

Anshuman Khandual's on June 10, 2019 3:42 pm:
> 
> 
> On 06/10/2019 10:08 AM, Nicholas Piggin wrote:
>> ioremap_page_range is a generic function to create a kernel virtual
>> mapping, move it to mm/vmalloc.c and rename it vmap_range.
> 
> Absolutely. It belongs in mm/vmalloc.c as its a kernel virtual range.
> But what is the rationale of changing the name to vmap_range ?

Well it doesn't just map IO. It's for arbitrary kernel virtual mapping
(including ioremap). Last patch uses it to map regular cacheable
memory.

>> For clarity with this move, also:
>> - Rename vunmap_page_range (vmap_range's inverse) to vunmap_range.
> 
> Will be inverse for both vmap_range() and vmap_page[s]_range() ?

Yes.

> 
>> - Rename vmap_page_range (which takes a page array) to vmap_pages.
> 
> s/vmap_pages/vmap_pages_range instead here ................^^^^^^

Yes.

> This deviates from the subject of this patch that it is related to
> ioremap only. I believe what this patch intends is to create
> 
> - vunmap_range() takes [VA range]
> 
> 	This will be the common kernel virtual range tear down
> 	function for ranges created either with vmap_range() or
> 	vmap_pages_range(). Is that correct ?
> - vmap_range() takes [VA range, PA range, prot]
> - vmap_pages_range() takes [VA range, struct pages, prot] 

That's right although we already have all those functions, so I don't
create anything, only move and re-name. I'm happy to change the
subject if you have a preference.

> Can we re-order the arguments (pages <--> prot) for vmap_pages_range()
> just to make it sync with vmap_range() ?
> 
> static int vmap_pages_range(unsigned long start, unsigned long end,
>  			   pgprot_t prot, struct page **pages)
> 

Sure, makes sense.

Thanks,
Nick


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Nicholas Piggin <npiggin@gmail.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>, linux-mm@kvack.org
Cc: linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/4] mm: Move ioremap page table mapping function to mm/
Date: Mon, 10 Jun 2019 16:21:16 +1000	[thread overview]
Message-ID: <1560147293.7fxg58sp20.astroid@bobo.none> (raw)
In-Reply-To: <03de53e9-f1f9-1632-567e-b88aabc56764@arm.com>

Anshuman Khandual's on June 10, 2019 3:42 pm:
> 
> 
> On 06/10/2019 10:08 AM, Nicholas Piggin wrote:
>> ioremap_page_range is a generic function to create a kernel virtual
>> mapping, move it to mm/vmalloc.c and rename it vmap_range.
> 
> Absolutely. It belongs in mm/vmalloc.c as its a kernel virtual range.
> But what is the rationale of changing the name to vmap_range ?

Well it doesn't just map IO. It's for arbitrary kernel virtual mapping
(including ioremap). Last patch uses it to map regular cacheable
memory.

>> For clarity with this move, also:
>> - Rename vunmap_page_range (vmap_range's inverse) to vunmap_range.
> 
> Will be inverse for both vmap_range() and vmap_page[s]_range() ?

Yes.

> 
>> - Rename vmap_page_range (which takes a page array) to vmap_pages.
> 
> s/vmap_pages/vmap_pages_range instead here ................^^^^^^

Yes.

> This deviates from the subject of this patch that it is related to
> ioremap only. I believe what this patch intends is to create
> 
> - vunmap_range() takes [VA range]
> 
> 	This will be the common kernel virtual range tear down
> 	function for ranges created either with vmap_range() or
> 	vmap_pages_range(). Is that correct ?
> - vmap_range() takes [VA range, PA range, prot]
> - vmap_pages_range() takes [VA range, struct pages, prot] 

That's right although we already have all those functions, so I don't
create anything, only move and re-name. I'm happy to change the
subject if you have a preference.

> Can we re-order the arguments (pages <--> prot) for vmap_pages_range()
> just to make it sync with vmap_range() ?
> 
> static int vmap_pages_range(unsigned long start, unsigned long end,
>  			   pgprot_t prot, struct page **pages)
> 

Sure, makes sense.

Thanks,
Nick



  reply	other threads:[~2019-06-10  6:25 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-10  4:38 [PATCH 1/4] mm: Move ioremap page table mapping function to mm/ Nicholas Piggin
2019-06-10  4:38 ` Nicholas Piggin
2019-06-10  4:38 ` Nicholas Piggin
2019-06-10  4:38 ` [PATCH 2/4] arm64: support huge vmap vmalloc Nicholas Piggin
2019-06-10  4:38   ` Nicholas Piggin
2019-06-10  4:38   ` Nicholas Piggin
2019-06-10  5:47   ` Anshuman Khandual
2019-06-10  5:47     ` Anshuman Khandual
2019-06-10  6:14     ` Nicholas Piggin
2019-06-10  6:14       ` Nicholas Piggin
2019-06-10  6:14       ` Nicholas Piggin
2019-06-10  4:38 ` [PATCH 3/4] powerpc/64s/radix: " Nicholas Piggin
2019-06-10  4:38   ` Nicholas Piggin
2019-06-10  4:38   ` Nicholas Piggin
2019-06-10  4:38 ` [PATCH 4/4] mm/vmalloc: Hugepage vmalloc mappings Nicholas Piggin
2019-06-10  4:38   ` Nicholas Piggin
2019-06-10  4:38   ` Nicholas Piggin
2019-06-10  5:49   ` Nicholas Piggin
2019-06-10  5:49     ` Nicholas Piggin
2019-06-10  5:49     ` Nicholas Piggin
2019-06-10  8:08     ` Satheesh Rajendran
2019-06-10  8:08       ` Satheesh Rajendran
2019-06-10  8:53   ` Anshuman Khandual
2019-06-10  8:53     ` Anshuman Khandual
2019-06-11  0:16     ` Nicholas Piggin
2019-06-11  0:16       ` Nicholas Piggin
2019-06-11  0:16       ` Nicholas Piggin
2019-06-11  6:59       ` Anshuman Khandual
2019-06-11  6:59         ` Anshuman Khandual
2019-06-11  6:59         ` Anshuman Khandual
2019-06-19  3:29         ` Nicholas Piggin
2019-06-19  3:29           ` Nicholas Piggin
2019-06-19  3:29           ` Nicholas Piggin
2019-06-10 14:10   ` Mark Rutland
2019-06-10 14:10     ` Mark Rutland
2019-06-10 14:44     ` Nicholas Piggin
2019-06-10 14:44       ` Nicholas Piggin
2019-06-10 14:44       ` Nicholas Piggin
2019-06-11  6:17       ` Anshuman Khandual
2019-06-11  6:17         ` Anshuman Khandual
2019-06-11  6:17         ` Anshuman Khandual
2019-06-19  3:33         ` Nicholas Piggin
2019-06-19  3:33           ` Nicholas Piggin
2019-06-19  3:33           ` Nicholas Piggin
2019-06-11  5:39   ` Christophe Leroy
2019-06-11  5:39     ` Christophe Leroy
2019-06-19  3:39     ` Nicholas Piggin
2019-06-19  3:39       ` Nicholas Piggin
2019-06-19  3:39       ` Nicholas Piggin
2019-06-10  5:42 ` [PATCH 1/4] mm: Move ioremap page table mapping function to mm/ Anshuman Khandual
2019-06-10  5:42   ` Anshuman Khandual
2019-06-10  6:21   ` Nicholas Piggin [this message]
2019-06-10  6:21     ` Nicholas Piggin
2019-06-10  6:21     ` Nicholas Piggin
2019-06-11  5:24 ` Christophe Leroy
2019-06-11  5:24   ` Christophe Leroy
2019-06-19  3:43   ` Nicholas Piggin
2019-06-19  3:43     ` Nicholas Piggin
2019-06-19  3:43     ` Nicholas Piggin
2019-06-19 13:18     ` Christophe Leroy
2019-06-19 13:18       ` Christophe Leroy
2019-06-19 13:18       ` Christophe Leroy
2019-06-22  9:42       ` Nicholas Piggin
2019-06-22  9:42         ` Nicholas Piggin
2019-06-22  9:42         ` Nicholas Piggin

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=1560147293.7fxg58sp20.astroid@bobo.none \
    --to=npiggin@gmail.com \
    --cc=anshuman.khandual@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.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 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.