linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] parisc:Remove unnecessary FIXMES in init.c
@ 2014-09-24  1:49 Nicholas Krause
  2014-09-24  5:30 ` Guenter Roeck
  0 siblings, 1 reply; 5+ messages in thread
From: Nicholas Krause @ 2014-09-24  1:49 UTC (permalink / raw)
  To: jejb
  Cc: deller, akpm, mgorman, julia.lawall, himangi774, linux-parisc,
	linux-kernel

This removes the two fixmes in the file, init.c for compiler hints
for comments related to compiler hints in linux_gateway_page_addr
and map_hpux_gateway_page to change from FIXME to HINT in order
for people reading this code to understand that these are compiler
hints.

Signed-off-by: Nicholas Krause <yocto6@gmail.com>
---
 arch/parisc/mm/init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 0bef864..668102e 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -733,7 +733,7 @@ static void __init pagetable_init(void)
 static void __init gateway_init(void)
 {
 	unsigned long linux_gateway_page_addr;
-	/* FIXME: This is 'const' in order to trick the compiler
+	/* HINT: This is 'const' in order to trick the compiler
 	   into not treating it as DP-relative data. */
 	extern void * const linux_gateway_page;
 
@@ -761,7 +761,7 @@ map_hpux_gateway_page(struct task_struct *tsk, struct mm_struct *mm)
 	unsigned long start_pte;
 	unsigned long address;
 	unsigned long hpux_gw_page_addr;
-	/* FIXME: This is 'const' in order to trick the compiler
+	/* HINT: This is 'const' in order to trick the compiler
 	   into not treating it as DP-relative data. */
 	extern void * const hpux_gateway_page;
 
-- 
1.9.1


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

* Re: [PATCH] parisc:Remove unnecessary FIXMES in init.c
  2014-09-24  1:49 [PATCH] parisc:Remove unnecessary FIXMES in init.c Nicholas Krause
@ 2014-09-24  5:30 ` Guenter Roeck
  2014-09-24 11:42   ` nick
  0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2014-09-24  5:30 UTC (permalink / raw)
  To: Nicholas Krause
  Cc: jejb, deller, akpm, mgorman, julia.lawall, himangi774,
	linux-parisc, linux-kernel

On Tue, Sep 23, 2014 at 09:49:43PM -0400, Nicholas Krause wrote:
> This removes the two fixmes in the file, init.c for compiler hints
> for comments related to compiler hints in linux_gateway_page_addr
> and map_hpux_gateway_page to change from FIXME to HINT in order
> for people reading this code to understand that these are compiler
> hints.
> 

"* const" tells the compiler that a pointer is a constant.
It doesn't tell the compiler that the data shall not be treated
as DP-relative.

FIXME as in: We should find a better way to tell the compiler to
not treat this data as DP-relative.

Can you please stop this ?

Guenter

> Signed-off-by: Nicholas Krause <yocto6@gmail.com>
> ---
>  arch/parisc/mm/init.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
> index 0bef864..668102e 100644
> --- a/arch/parisc/mm/init.c
> +++ b/arch/parisc/mm/init.c
> @@ -733,7 +733,7 @@ static void __init pagetable_init(void)
>  static void __init gateway_init(void)
>  {
>  	unsigned long linux_gateway_page_addr;
> -	/* FIXME: This is 'const' in order to trick the compiler
> +	/* HINT: This is 'const' in order to trick the compiler
>  	   into not treating it as DP-relative data. */
>  	extern void * const linux_gateway_page;
>  
> @@ -761,7 +761,7 @@ map_hpux_gateway_page(struct task_struct *tsk, struct mm_struct *mm)
>  	unsigned long start_pte;
>  	unsigned long address;
>  	unsigned long hpux_gw_page_addr;
> -	/* FIXME: This is 'const' in order to trick the compiler
> +	/* HINT: This is 'const' in order to trick the compiler
>  	   into not treating it as DP-relative data. */
>  	extern void * const hpux_gateway_page;
>  
> -- 
> 1.9.1
> 
> --
> 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] parisc:Remove unnecessary FIXMES in init.c
  2014-09-24  5:30 ` Guenter Roeck
@ 2014-09-24 11:42   ` nick
  2014-09-24 12:42     ` John David Anglin
  0 siblings, 1 reply; 5+ messages in thread
From: nick @ 2014-09-24 11:42 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: jejb, deller, akpm, mgorman, julia.lawall, himangi774,
	linux-parisc, linux-kernel



On 14-09-24 01:30 AM, Guenter Roeck wrote:
> On Tue, Sep 23, 2014 at 09:49:43PM -0400, Nicholas Krause wrote:
>> This removes the two fixmes in the file, init.c for compiler hints
>> for comments related to compiler hints in linux_gateway_page_addr
>> and map_hpux_gateway_page to change from FIXME to HINT in order
>> for people reading this code to understand that these are compiler
>> hints.
>>
> 
> "* const" tells the compiler that a pointer is a constant.
> It doesn't tell the compiler that the data shall not be treated
> as DP-relative.
> 
> FIXME as in: We should find a better way to tell the compiler to
> not treat this data as DP-relative.
> 
> Can you please stop this ?
> 
> Guenter
> 
>> Signed-off-by: Nicholas Krause <yocto6@gmail.com>
>> ---
>>  arch/parisc/mm/init.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
>> index 0bef864..668102e 100644
>> --- a/arch/parisc/mm/init.c
>> +++ b/arch/parisc/mm/init.c
>> @@ -733,7 +733,7 @@ static void __init pagetable_init(void)
>>  static void __init gateway_init(void)
>>  {
>>  	unsigned long linux_gateway_page_addr;
>> -	/* FIXME: This is 'const' in order to trick the compiler
>> +	/* HINT: This is 'const' in order to trick the compiler
>>  	   into not treating it as DP-relative data. */
>>  	extern void * const linux_gateway_page;
>>  
>> @@ -761,7 +761,7 @@ map_hpux_gateway_page(struct task_struct *tsk, struct mm_struct *mm)
>>  	unsigned long start_pte;
>>  	unsigned long address;
>>  	unsigned long hpux_gw_page_addr;
>> -	/* FIXME: This is 'const' in order to trick the compiler
>> +	/* HINT: This is 'const' in order to trick the compiler
>>  	   into not treating it as DP-relative data. */
>>  	extern void * const hpux_gateway_page;
>>  
>> -- 
>> 1.9.1
>>
>> --
>> 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/
>>
>>
Guenter,
I asked the maintainers and I got, 
On 9/23/2014 4:48 PM, Helge Deller wrote:
> The FIXME: is misleading. It should maybe better read "HINT:" or something like that.
> Trivially it's basically just casting the symbol so that the compiler
> will produce the correct code later on.
> There is nothing you could try to "fix".
Why not just remove "FIXME: " from these comments?

Dave
As the reply.
Cheers Nick 

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

* Re: [PATCH] parisc:Remove unnecessary FIXMES in init.c
  2014-09-24 11:42   ` nick
@ 2014-09-24 12:42     ` John David Anglin
  2014-09-24 14:29       ` Nicholas Krause
  0 siblings, 1 reply; 5+ messages in thread
From: John David Anglin @ 2014-09-24 12:42 UTC (permalink / raw)
  To: nick
  Cc: Guenter Roeck, jejb, deller, akpm, mgorman, julia.lawall,
	himangi774, linux-parisc, linux-kernel

On 24-Sep-14, at 7:42 AM, nick wrote:

>
>
> On 14-09-24 01:30 AM, Guenter Roeck wrote:
>> On Tue, Sep 23, 2014 at 09:49:43PM -0400, Nicholas Krause wrote:
>>> This removes the two fixmes in the file, init.c for compiler hints
>>> for comments related to compiler hints in linux_gateway_page_addr
>>> and map_hpux_gateway_page to change from FIXME to HINT in order
>>> for people reading this code to understand that these are compiler
>>> hints.
>>>
>>
>> "* const" tells the compiler that a pointer is a constant.
>> It doesn't tell the compiler that the data shall not be treated
>> as DP-relative.
>>
>> FIXME as in: We should find a better way to tell the compiler to
>> not treat this data as DP-relative.
>>
>> Can you please stop this ?
>>
>> Guenter
>>
>>> Signed-off-by: Nicholas Krause <yocto6@gmail.com>
>>> ---
>>> arch/parisc/mm/init.c | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
>>> index 0bef864..668102e 100644
>>> --- a/arch/parisc/mm/init.c
>>> +++ b/arch/parisc/mm/init.c
>>> @@ -733,7 +733,7 @@ static void __init pagetable_init(void)
>>> static void __init gateway_init(void)
>>> {
>>> 	unsigned long linux_gateway_page_addr;
>>> -	/* FIXME: This is 'const' in order to trick the compiler
>>> +	/* HINT: This is 'const' in order to trick the compiler
>>> 	   into not treating it as DP-relative data. */
>>> 	extern void * const linux_gateway_page;
>>>
>>> @@ -761,7 +761,7 @@ map_hpux_gateway_page(struct task_struct *tsk,  
>>> struct mm_struct *mm)
>>> 	unsigned long start_pte;
>>> 	unsigned long address;
>>> 	unsigned long hpux_gw_page_addr;
>>> -	/* FIXME: This is 'const' in order to trick the compiler
>>> +	/* HINT: This is 'const' in order to trick the compiler
>>> 	   into not treating it as DP-relative data. */
>>> 	extern void * const hpux_gateway_page;
>>>
>>> -- 
>>> 1.9.1
>>>
>>> --
>>> 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/
>>>
>>>
> Guenter,
> I asked the maintainers and I got,
> On 9/23/2014 4:48 PM, Helge Deller wrote:
>> The FIXME: is misleading. It should maybe better read "HINT:" or  
>> something like that.
>> Trivially it's basically just casting the symbol so that the compiler
>> will produce the correct code later on.
>> There is nothing you could try to "fix".
> Why not just remove "FIXME: " from these comments?


The wording of the comment is not good.  You can't "trick" the  
compiler into not
treating a constant as DP-relative data.  Whether or not a constant is  
loaded as an
immediate depends on its value.

Dave
--
John David Anglin	dave.anglin@bell.net




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

* Re: [PATCH] parisc:Remove unnecessary FIXMES in init.c
  2014-09-24 12:42     ` John David Anglin
@ 2014-09-24 14:29       ` Nicholas Krause
  0 siblings, 0 replies; 5+ messages in thread
From: Nicholas Krause @ 2014-09-24 14:29 UTC (permalink / raw)
  To: John David Anglin
  Cc: Guenter Roeck, jejb, deller, akpm, Mel Gorman,
	julia.lawall@lip6.fr oneukum@suse.de, Himangi Saraogi,
	linux-parisc, julia.lawall@lip6.fr oneukum@suse.de

On Wed, Sep 24, 2014 at 8:42 AM, John David Anglin <dave.anglin@bell.net> wrote:
> On 24-Sep-14, at 7:42 AM, nick wrote:
>
>>
>>
>> On 14-09-24 01:30 AM, Guenter Roeck wrote:
>>>
>>> On Tue, Sep 23, 2014 at 09:49:43PM -0400, Nicholas Krause wrote:
>>>>
>>>> This removes the two fixmes in the file, init.c for compiler hints
>>>> for comments related to compiler hints in linux_gateway_page_addr
>>>> and map_hpux_gateway_page to change from FIXME to HINT in order
>>>> for people reading this code to understand that these are compiler
>>>> hints.
>>>>
>>>
>>> "* const" tells the compiler that a pointer is a constant.
>>> It doesn't tell the compiler that the data shall not be treated
>>> as DP-relative.
>>>
>>> FIXME as in: We should find a better way to tell the compiler to
>>> not treat this data as DP-relative.
>>>
>>> Can you please stop this ?
>>>
>>> Guenter
>>>
>>>> Signed-off-by: Nicholas Krause <yocto6@gmail.com>
>>>> ---
>>>> arch/parisc/mm/init.c | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
>>>> index 0bef864..668102e 100644
>>>> --- a/arch/parisc/mm/init.c
>>>> +++ b/arch/parisc/mm/init.c
>>>> @@ -733,7 +733,7 @@ static void __init pagetable_init(void)
>>>> static void __init gateway_init(void)
>>>> {
>>>>         unsigned long linux_gateway_page_addr;
>>>> -       /* FIXME: This is 'const' in order to trick the compiler
>>>> +       /* HINT: This is 'const' in order to trick the compiler
>>>>            into not treating it as DP-relative data. */
>>>>         extern void * const linux_gateway_page;
>>>>
>>>> @@ -761,7 +761,7 @@ map_hpux_gateway_page(struct task_struct *tsk,
>>>> struct mm_struct *mm)
>>>>         unsigned long start_pte;
>>>>         unsigned long address;
>>>>         unsigned long hpux_gw_page_addr;
>>>> -       /* FIXME: This is 'const' in order to trick the compiler
>>>> +       /* HINT: This is 'const' in order to trick the compiler
>>>>            into not treating it as DP-relative data. */
>>>>         extern void * const hpux_gateway_page;
>>>>
>>>> --
>>>> 1.9.1
>>>>
>>>> --
>>>> 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/
>>>>
>>>>
>> Guenter,
>> I asked the maintainers and I got,
>> On 9/23/2014 4:48 PM, Helge Deller wrote:
>>>
>>> The FIXME: is misleading. It should maybe better read "HINT:" or
>>> something like that.
>>> Trivially it's basically just casting the symbol so that the compiler
>>> will produce the correct code later on.
>>> There is nothing you could try to "fix".
>>
>> Why not just remove "FIXME: " from these comments?
>
>
>
> The wording of the comment is not good.  You can't "trick" the compiler into
> not
> treating a constant as DP-relative data.  Whether or not a constant is
> loaded as an
> immediate depends on its value.
>
> Dave
> --
> John David Anglin       dave.anglin@bell.net
>
>
>
Are stating I need to change the wording of  my commit or the comment?
Nick

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

end of thread, other threads:[~2014-09-24 14:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-24  1:49 [PATCH] parisc:Remove unnecessary FIXMES in init.c Nicholas Krause
2014-09-24  5:30 ` Guenter Roeck
2014-09-24 11:42   ` nick
2014-09-24 12:42     ` John David Anglin
2014-09-24 14:29       ` Nicholas Krause

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).