All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Hogan <james.hogan@mips.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: <linux-mips@linux-mips.org>, <ralf@linux-mips.org>,
	<paul.burton@mips.com>, <macro@linux-mips.org>
Subject: Re: [PATCH] MIPS: page.h: define virt_to_pfn()
Date: Wed, 8 Nov 2017 23:15:27 +0000	[thread overview]
Message-ID: <20171108231527.GQ15260@jhogan-linux> (raw)
In-Reply-To: <20170309211149.8339-1-f.fainelli@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

Hi Florian,

On Thu, Mar 09, 2017 at 01:11:49PM -0800, Florian Fainelli wrote:
> Based on the existing definition of virt_to_page() which already does a
> PFN_DOWN(vir_to_phys(kaddr)).

I was just wondering if there was a particular motivation for this
change?

Cheers
James

> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>  arch/mips/include/asm/page.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
> index 5f987598054f..ad461216b5a1 100644
> --- a/arch/mips/include/asm/page.h
> +++ b/arch/mips/include/asm/page.h
> @@ -240,8 +240,8 @@ static inline int pfn_valid(unsigned long pfn)
>  
>  #endif
>  
> -#define virt_to_page(kaddr)	pfn_to_page(PFN_DOWN(virt_to_phys((void *)     \
> -								  (kaddr))))
> +#define virt_to_pfn(kaddr)   	PFN_DOWN(virt_to_phys((void *)(kaddr)))
> +#define virt_to_page(kaddr)	pfn_to_page(virt_to_pfn(kaddr))
>  
>  extern int __virt_addr_valid(const volatile void *kaddr);
>  #define virt_addr_valid(kaddr)						\
> -- 
> 2.9.3
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: James Hogan <james.hogan@mips.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org,
	paul.burton@mips.com, macro@linux-mips.org
Subject: Re: [PATCH] MIPS: page.h: define virt_to_pfn()
Date: Wed, 8 Nov 2017 23:15:27 +0000	[thread overview]
Message-ID: <20171108231527.GQ15260@jhogan-linux> (raw)
Message-ID: <20171108231527.hiyIidbV1Unl0AGUNcXcTfDencMH4JPfk4KX-ShPkqE@z> (raw)
In-Reply-To: <20170309211149.8339-1-f.fainelli@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

Hi Florian,

On Thu, Mar 09, 2017 at 01:11:49PM -0800, Florian Fainelli wrote:
> Based on the existing definition of virt_to_page() which already does a
> PFN_DOWN(vir_to_phys(kaddr)).

I was just wondering if there was a particular motivation for this
change?

Cheers
James

> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>  arch/mips/include/asm/page.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
> index 5f987598054f..ad461216b5a1 100644
> --- a/arch/mips/include/asm/page.h
> +++ b/arch/mips/include/asm/page.h
> @@ -240,8 +240,8 @@ static inline int pfn_valid(unsigned long pfn)
>  
>  #endif
>  
> -#define virt_to_page(kaddr)	pfn_to_page(PFN_DOWN(virt_to_phys((void *)     \
> -								  (kaddr))))
> +#define virt_to_pfn(kaddr)   	PFN_DOWN(virt_to_phys((void *)(kaddr)))
> +#define virt_to_page(kaddr)	pfn_to_page(virt_to_pfn(kaddr))
>  
>  extern int __virt_addr_valid(const volatile void *kaddr);
>  #define virt_addr_valid(kaddr)						\
> -- 
> 2.9.3
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-11-08 23:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-09 21:11 [PATCH] MIPS: page.h: define virt_to_pfn() Florian Fainelli
2017-11-08 23:15 ` James Hogan [this message]
2017-11-08 23:15   ` James Hogan
2017-11-09  0:05   ` Florian Fainelli
2017-11-09 15:43     ` James Hogan
2017-11-09 15:43       ` James Hogan

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=20171108231527.GQ15260@jhogan-linux \
    --to=james.hogan@mips.com \
    --cc=f.fainelli@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@linux-mips.org \
    --cc=paul.burton@mips.com \
    --cc=ralf@linux-mips.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.