All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86, acpi: Remove out-of-date comment of __acpi_map_table
@ 2013-07-10 18:22 Zhang Yanfei
  2013-07-23  9:22 ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang Yanfei @ 2013-07-10 18:22 UTC (permalink / raw)
  To: len.brown, pavel, rjw, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, linux-kernel

From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>

The implementation of function __acpi_map_table() has been changed
long time ago, and now it directly invokes early_ioremap() to setup
the temporarily acpi table mappings. So remove its out-of-date
comment.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
---
 arch/x86/kernel/acpi/boot.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index d81a972..bac8b5b 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -140,18 +140,6 @@ static u32 irq_to_gsi(int irq)
 	return gsi;
 }
 
-/*
- * Temporarily use the virtual area starting from FIX_IO_APIC_BASE_END,
- * to map the target physical address. The problem is that set_fixmap()
- * provides a single page, and it is possible that the page is not
- * sufficient.
- * By using this area, we can map up to MAX_IO_APICS pages temporarily,
- * i.e. until the next __va_range() call.
- *
- * Important Safety Note:  The fixed I/O APIC page numbers are *subtracted*
- * from the fixed base.  That's why we start at FIX_IO_APIC_BASE_END and
- * count idx down while incrementing the phys address.
- */
 char *__init __acpi_map_table(unsigned long phys, unsigned long size)
 {
 
@@ -160,6 +148,7 @@ char *__init __acpi_map_table(unsigned long phys, unsigned long size)
 
 	return early_ioremap(phys, size);
 }
+
 void __init __acpi_unmap_table(char *map, unsigned long size)
 {
 	if (!map || !size)
-- 
1.7.1

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

* Re: [PATCH] x86, acpi: Remove out-of-date comment of __acpi_map_table
  2013-07-10 18:22 [PATCH] x86, acpi: Remove out-of-date comment of __acpi_map_table Zhang Yanfei
@ 2013-07-23  9:22 ` Ingo Molnar
  2013-07-23 12:49   ` Zhang Yanfei
  0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2013-07-23  9:22 UTC (permalink / raw)
  To: Zhang Yanfei
  Cc: len.brown, pavel, rjw, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, linux-kernel


* Zhang Yanfei <zhangyanfei.yes@gmail.com> wrote:

> From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
> 
> The implementation of function __acpi_map_table() has been changed
> long time ago, and now it directly invokes early_ioremap() to setup
> the temporarily acpi table mappings. So remove its out-of-date
> comment.
> 
> Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
> ---
>  arch/x86/kernel/acpi/boot.c |   13 +------------
>  1 files changed, 1 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
> index d81a972..bac8b5b 100644
> --- a/arch/x86/kernel/acpi/boot.c
> +++ b/arch/x86/kernel/acpi/boot.c
> @@ -140,18 +140,6 @@ static u32 irq_to_gsi(int irq)
>  	return gsi;
>  }
>  
> -/*
> - * Temporarily use the virtual area starting from FIX_IO_APIC_BASE_END,
> - * to map the target physical address. The problem is that set_fixmap()
> - * provides a single page, and it is possible that the page is not
> - * sufficient.
> - * By using this area, we can map up to MAX_IO_APICS pages temporarily,
> - * i.e. until the next __va_range() call.
> - *
> - * Important Safety Note:  The fixed I/O APIC page numbers are *subtracted*
> - * from the fixed base.  That's why we start at FIX_IO_APIC_BASE_END and
> - * count idx down while incrementing the phys address.
> - */
>  char *__init __acpi_map_table(unsigned long phys, unsigned long size)

Good catch. Removing documentation makes me sad, so how about replacing it 
with a simple comment:

	/*
	 * This is just a simple wrapper around early_ioremap(),
	 * with sanity checks for phys == 0 and size == 0:
	 */

?

Thanks,

	Ingo

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

* Re: [PATCH] x86, acpi: Remove out-of-date comment of __acpi_map_table
  2013-07-23  9:22 ` Ingo Molnar
@ 2013-07-23 12:49   ` Zhang Yanfei
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang Yanfei @ 2013-07-23 12:49 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: len.brown, pavel, rjw, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, linux-kernel

On 07/23/2013 05:22 PM, Ingo Molnar wrote:
> 
> * Zhang Yanfei <zhangyanfei.yes@gmail.com> wrote:
> 
>> From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
>>
>> The implementation of function __acpi_map_table() has been changed
>> long time ago, and now it directly invokes early_ioremap() to setup
>> the temporarily acpi table mappings. So remove its out-of-date
>> comment.
>>
>> Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
>> ---
>>  arch/x86/kernel/acpi/boot.c |   13 +------------
>>  1 files changed, 1 insertions(+), 12 deletions(-)
>>
>> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
>> index d81a972..bac8b5b 100644
>> --- a/arch/x86/kernel/acpi/boot.c
>> +++ b/arch/x86/kernel/acpi/boot.c
>> @@ -140,18 +140,6 @@ static u32 irq_to_gsi(int irq)
>>  	return gsi;
>>  }
>>  
>> -/*
>> - * Temporarily use the virtual area starting from FIX_IO_APIC_BASE_END,
>> - * to map the target physical address. The problem is that set_fixmap()
>> - * provides a single page, and it is possible that the page is not
>> - * sufficient.
>> - * By using this area, we can map up to MAX_IO_APICS pages temporarily,
>> - * i.e. until the next __va_range() call.
>> - *
>> - * Important Safety Note:  The fixed I/O APIC page numbers are *subtracted*
>> - * from the fixed base.  That's why we start at FIX_IO_APIC_BASE_END and
>> - * count idx down while incrementing the phys address.
>> - */
>>  char *__init __acpi_map_table(unsigned long phys, unsigned long size)
> 
> Good catch. Removing documentation makes me sad, so how about replacing it 
> with a simple comment:
> 
> 	/*
> 	 * This is just a simple wrapper around early_ioremap(),
> 	 * with sanity checks for phys == 0 and size == 0:
> 	 */
> 
> ?

Yeah, agreed. So I will send the v2 patch.

> 
> Thanks,
> 
> 	Ingo


-- 
Thanks.
Zhang Yanfei

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

end of thread, other threads:[~2013-07-23 12:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-10 18:22 [PATCH] x86, acpi: Remove out-of-date comment of __acpi_map_table Zhang Yanfei
2013-07-23  9:22 ` Ingo Molnar
2013-07-23 12:49   ` Zhang Yanfei

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.