All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] x86 : omit duplicate processing at pte_pgprot()
@ 2009-08-16  2:00 ohyama_sec
  0 siblings, 0 replies; 5+ messages in thread
From: ohyama_sec @ 2009-08-16  2:00 UTC (permalink / raw)
  To: linux-kernel

I'm sorry, I resend the same context message accidentally.
So, please ignore this message.

thank you.

ohyama_sec@ariel-networks.com wrote:
> I suggest following PATCH that omit duplicate processing of mask.
>
> pte_pgprot() macro [arch/x86/include/asm/pgtable.h] call pte_flags() [arch/x86/include/asm/pgtable_types.h] that return value is masked by PTE_FLAGS_MASK in pte_flags() function, and this macro also masks the returned value by PTE_FLAGS_MASK.
>
> I guess that we don't have to do the mask processing at pte_pgprot() macro because it has already been masked at pte_flags().
> So, how about the following PATCH ?
>
>     <Hiroyasu OHYAMA>
>
> diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
> index 3cc06e3..a0b454c 100644
> --- a/arch/x86/include/asm/pgtable.h
> +++ b/arch/x86/include/asm/pgtable.h
> @@ -265,7 +265,7 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
>         return __pgprot(preservebits | addbits);
>          }
>
>          -#define pte_pgprot(x) __pgprot(pte_flags(x) & PTE_FLAGS_MASK)
>          +#define pte_pgprot(x) __pgprot(pte_flags(x))
>
>           #define canon_pgprot(p) __pgprot(massage_pgprot(p))
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
>   

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86 : omit duplicate processing at pte_pgprot()
@ 2009-08-16  2:01 ohyama_sec
  0 siblings, 0 replies; 5+ messages in thread
From: ohyama_sec @ 2009-08-16  2:01 UTC (permalink / raw)
  To: linux-kernel

Thank you for your genial response, and I'm sorry that I neglected to read Documentation/SubmittingPatches carefully.
And I understood DCO.

>> I suggest following PATCH that omit duplicate processing of mask.
>>
>> pte_pgprot() macro [arch/x86/include/asm/pgtable.h] call pte_flags() [arch/x86/include/asm/pgtable_types.h] that return value is masked by PTE_FLAGS_MASK in pte_flags() function, and this macro also masks the returned value by PTE_FLAGS_MASK.
>> 
>
>It probably won't make any difference in practice, because gcc will do a
>common subexpression elimination for the "& PTE_FLAGS_MASK" between the
>inline function and its caller.  But it does tidy things up a bit.
>
>> I guess that we don't have to do the mask processing at pte_pgprot() macro because it has already been masked at pte_flags().
>> So, how about the following PATCH ?
>>
>> 	<Hiroyasu OHYAMA>
>> 
>
>Please add a proper Signed-off-by: line.
>
>Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
>
>J

Signed-off-by : Hiroyasu OHYAMA <hiroyasu.ohyama@gmail.com>

>> diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
>> index 3cc06e3..a0b454c 100644
>> --- a/arch/x86/include/asm/pgtable.h
>> +++ b/arch/x86/include/asm/pgtable.h
>> @@ -265,7 +265,7 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
>>         return __pgprot(preservebits | addbits);
>>          }
>>
>>          -#define pte_pgprot(x) __pgprot(pte_flags(x) & PTE_FLAGS_MASK)
>>          +#define pte_pgprot(x) __pgprot(pte_flags(x))
>>
>>           #define canon_pgprot(p) __pgprot(massage_pgprot(p))
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/
>>
>> 
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] x86 : omit duplicate processing at pte_pgprot()
@ 2009-08-15 18:46 ohyama_sec
  0 siblings, 0 replies; 5+ messages in thread
From: ohyama_sec @ 2009-08-15 18:46 UTC (permalink / raw)
  To: linux-kernel

I suggest following PATCH that omit duplicate processing of mask.

pte_pgprot() macro [arch/x86/include/asm/pgtable.h] call pte_flags() [arch/x86/include/asm/pgtable_types.h] that return value is masked by PTE_FLAGS_MASK in pte_flags() function, and this macro also masks the returned value by PTE_FLAGS_MASK.

I guess that we don't have to do the mask processing at pte_pgprot() macro because it has already been masked at pte_flags().
So, how about the following PATCH ?

	<Hiroyasu OHYAMA>

diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 3cc06e3..a0b454c 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -265,7 +265,7 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
        return __pgprot(preservebits | addbits);
         }

         -#define pte_pgprot(x) __pgprot(pte_flags(x) & PTE_FLAGS_MASK)
         +#define pte_pgprot(x) __pgprot(pte_flags(x))

          #define canon_pgprot(p) __pgprot(massage_pgprot(p))

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86 : omit duplicate processing at pte_pgprot()
  2009-08-09 15:43 ohyama_sec
@ 2009-08-15  7:10 ` Jeremy Fitzhardinge
  0 siblings, 0 replies; 5+ messages in thread
From: Jeremy Fitzhardinge @ 2009-08-15  7:10 UTC (permalink / raw)
  To: ohyama_sec; +Cc: linux-kernel, the arch/x86 maintainers

On 08/09/09 08:43, ohyama_sec@ariel-networks.com wrote:
> I suggest following PATCH that omit duplicate processing of mask.
>
> pte_pgprot() macro [arch/x86/include/asm/pgtable.h] call pte_flags() [arch/x86/include/asm/pgtable_types.h] that return value is masked by PTE_FLAGS_MASK in pte_flags() function, and this macro also masks the returned value by PTE_FLAGS_MASK.
>   

It probably won't make any difference in practice, because gcc will do a
common subexpression elimination for the "& PTE_FLAGS_MASK" between the
inline function and its caller.  But it does tidy things up a bit.

> I guess that we don't have to do the mask processing at pte_pgprot() macro because it has already been masked at pte_flags().
> So, how about the following PATCH ?
>
> 	<Hiroyasu OHYAMA>
>   

Please add a proper Signed-off-by: line.

Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>

    J
> diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
> index 3cc06e3..a0b454c 100644
> --- a/arch/x86/include/asm/pgtable.h
> +++ b/arch/x86/include/asm/pgtable.h
> @@ -265,7 +265,7 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
>         return __pgprot(preservebits | addbits);
>          }
>
>          -#define pte_pgprot(x) __pgprot(pte_flags(x) & PTE_FLAGS_MASK)
>          +#define pte_pgprot(x) __pgprot(pte_flags(x))
>
>           #define canon_pgprot(p) __pgprot(massage_pgprot(p))
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
>   


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] x86 : omit duplicate processing at pte_pgprot()
@ 2009-08-09 15:43 ohyama_sec
  2009-08-15  7:10 ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 5+ messages in thread
From: ohyama_sec @ 2009-08-09 15:43 UTC (permalink / raw)
  To: linux-kernel

I suggest following PATCH that omit duplicate processing of mask.

pte_pgprot() macro [arch/x86/include/asm/pgtable.h] call pte_flags() [arch/x86/include/asm/pgtable_types.h] that return value is masked by PTE_FLAGS_MASK in pte_flags() function, and this macro also masks the returned value by PTE_FLAGS_MASK.

I guess that we don't have to do the mask processing at pte_pgprot() macro because it has already been masked at pte_flags().
So, how about the following PATCH ?

	<Hiroyasu OHYAMA>

diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 3cc06e3..a0b454c 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -265,7 +265,7 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
        return __pgprot(preservebits | addbits);
         }

         -#define pte_pgprot(x) __pgprot(pte_flags(x) & PTE_FLAGS_MASK)
         +#define pte_pgprot(x) __pgprot(pte_flags(x))

          #define canon_pgprot(p) __pgprot(massage_pgprot(p))

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-08-16  2:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-16  2:00 [PATCH] x86 : omit duplicate processing at pte_pgprot() ohyama_sec
  -- strict thread matches above, loose matches on Subject: below --
2009-08-16  2:01 ohyama_sec
2009-08-15 18:46 ohyama_sec
2009-08-09 15:43 ohyama_sec
2009-08-15  7:10 ` Jeremy Fitzhardinge

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.