All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: xen_init_cpuid_mask: Zero cx before calling xen_cpuid
@ 2009-08-08 20:15 Josh Triplett
  2009-08-15  7:02   ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 3+ messages in thread
From: Josh Triplett @ 2009-08-08 20:15 UTC (permalink / raw)
  To: linux-kernel, xen-devel; +Cc: Andrew Morton, Jeremy Fitzhardinge

CPUID function 1 doesn't use cx, but xen_cpuid doesn't know that,
resulting in this warning:

arch/x86/xen/enlighten.c: In function ‘xen_start_kernel’:
arch/x86/xen/enlighten.c:192: warning: ‘cx’ may be used uninitialized in this function
arch/x86/xen/enlighten.c:205: note: ‘cx’ was declared here

Set cx = 0 to avoid this warning.  This seems preferable to implementing
a xen_cpuid_nocount without the input constraint for cx, and either of
those seem preferable to just ignoring the warning.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---

Build-tested only.

 arch/x86/xen/enlighten.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 0a1700a..6ee2ef8 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -215,6 +215,7 @@ static __init void xen_init_cpuid_mask(void)
 			  (1 << X86_FEATURE_ACPI));  /* disable ACPI */
 
 	ax = 1;
+	cx = 0;
 	xen_cpuid(&ax, &bx, &cx, &dx);
 
 	/* cpuid claims we support xsave; try enabling it to see what happens */
-- 
1.5.6.5


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

* Re: [PATCH] xen: xen_init_cpuid_mask: Zero cx before calling xen_cpuid
  2009-08-08 20:15 [PATCH] xen: xen_init_cpuid_mask: Zero cx before calling xen_cpuid Josh Triplett
@ 2009-08-15  7:02   ` Jeremy Fitzhardinge
  0 siblings, 0 replies; 3+ messages in thread
From: Jeremy Fitzhardinge @ 2009-08-15  7:02 UTC (permalink / raw)
  To: Josh Triplett; +Cc: linux-kernel, xen-devel, Andrew Morton, Jeremy Fitzhardinge

On 08/08/09 13:15, Josh Triplett wrote:
> CPUID function 1 doesn't use cx, but xen_cpuid doesn't know that,
> resulting in this warning:
>
> arch/x86/xen/enlighten.c: In function ‘xen_start_kernel’:
> arch/x86/xen/enlighten.c:192: warning: ‘cx’ may be used uninitialized in this function
> arch/x86/xen/enlighten.c:205: note: ‘cx’ was declared here
>
> Set cx = 0 to avoid this warning.  This seems preferable to implementing
> a xen_cpuid_nocount without the input constraint for cx, and either of
> those seem preferable to just ignoring the warning.
>   

Thanks, applied.

    J

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

* Re: [PATCH] xen: xen_init_cpuid_mask: Zero cx before calling xen_cpuid
@ 2009-08-15  7:02   ` Jeremy Fitzhardinge
  0 siblings, 0 replies; 3+ messages in thread
From: Jeremy Fitzhardinge @ 2009-08-15  7:02 UTC (permalink / raw)
  To: Josh Triplett; +Cc: Andrew Morton, xen-devel, linux-kernel, Jeremy Fitzhardinge

On 08/08/09 13:15, Josh Triplett wrote:
> CPUID function 1 doesn't use cx, but xen_cpuid doesn't know that,
> resulting in this warning:
>
> arch/x86/xen/enlighten.c: In function ‘xen_start_kernel’:
> arch/x86/xen/enlighten.c:192: warning: ‘cx’ may be used uninitialized in this function
> arch/x86/xen/enlighten.c:205: note: ‘cx’ was declared here
>
> Set cx = 0 to avoid this warning.  This seems preferable to implementing
> a xen_cpuid_nocount without the input constraint for cx, and either of
> those seem preferable to just ignoring the warning.
>   

Thanks, applied.

    J

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

end of thread, other threads:[~2009-08-15  7:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-08 20:15 [PATCH] xen: xen_init_cpuid_mask: Zero cx before calling xen_cpuid Josh Triplett
2009-08-15  7:02 ` Jeremy Fitzhardinge
2009-08-15  7:02   ` 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.