Re: [PATCH v2 8/8] x86/lguest: Use __pa_symbol instead of __pa on C visible symbols

2012-10-11 Thread Rusty Russell
Alexander Duyck  writes:

> The function lguest_write_cr3 is using __pa to convert swapper_pg_dir and
> initial_page_table from virtual addresses to physical.  The correct function
> to use for these values is __pa_symbol since they are C visible symbols.
>
> Cc: Rusty Russell 
> Signed-off-by: Alexander Duyck 

Acked-by: Rusty Russell 

Thanks,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 8/8] x86/lguest: Use __pa_symbol instead of __pa on C visible symbols

2012-10-11 Thread Alexander Duyck
The function lguest_write_cr3 is using __pa to convert swapper_pg_dir and
initial_page_table from virtual addresses to physical.  The correct function
to use for these values is __pa_symbol since they are C visible symbols.

Cc: Rusty Russell 
Signed-off-by: Alexander Duyck 
---

 arch/x86/lguest/boot.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index 642d880..139dd35 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -552,7 +552,8 @@ static void lguest_write_cr3(unsigned long cr3)
current_cr3 = cr3;
 
/* These two page tables are simple, linear, and used during boot */
-   if (cr3 != __pa(swapper_pg_dir) && cr3 != __pa(initial_page_table))
+   if (cr3 != __pa_symbol(swapper_pg_dir) &&
+   cr3 != __pa_symbol(initial_page_table))
cr3_changed = true;
 }
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 8/8] x86/lguest: Use __pa_symbol instead of __pa on C visible symbols

2012-10-11 Thread Alexander Duyck
The function lguest_write_cr3 is using __pa to convert swapper_pg_dir and
initial_page_table from virtual addresses to physical.  The correct function
to use for these values is __pa_symbol since they are C visible symbols.

Cc: Rusty Russell ru...@rustcorp.com.au
Signed-off-by: Alexander Duyck alexander.h.du...@intel.com
---

 arch/x86/lguest/boot.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index 642d880..139dd35 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -552,7 +552,8 @@ static void lguest_write_cr3(unsigned long cr3)
current_cr3 = cr3;
 
/* These two page tables are simple, linear, and used during boot */
-   if (cr3 != __pa(swapper_pg_dir)  cr3 != __pa(initial_page_table))
+   if (cr3 != __pa_symbol(swapper_pg_dir) 
+   cr3 != __pa_symbol(initial_page_table))
cr3_changed = true;
 }
 

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 8/8] x86/lguest: Use __pa_symbol instead of __pa on C visible symbols

2012-10-11 Thread Rusty Russell
Alexander Duyck alexander.h.du...@intel.com writes:

 The function lguest_write_cr3 is using __pa to convert swapper_pg_dir and
 initial_page_table from virtual addresses to physical.  The correct function
 to use for these values is __pa_symbol since they are C visible symbols.

 Cc: Rusty Russell ru...@rustcorp.com.au
 Signed-off-by: Alexander Duyck alexander.h.du...@intel.com

Acked-by: Rusty Russell ru...@rustcorp.com.au

Thanks,
Rusty.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/