linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* next: x86/msr.h: build fails
@ 2009-05-20  9:41 Alexander Beregalov
  2009-05-20 10:14 ` Alexander Beregalov
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Beregalov @ 2009-05-20  9:41 UTC (permalink / raw)
  To: Borislav Petkov, linux-next, Mauro Carvalho Chehab,
	H. Peter Anvin

Hi Borislav,

What do you think about this fix?
I have no idea what value should be for the cpu variable.


>From 0a72854156436549ccb540fa90f59511470cd188 Mon Sep 17 00:00:00 2001
From: Alexander Beregalov <a.beregalov@gmail.com>
Date: Wed, 20 May 2009 13:33:43 +0400
Subject: [PATCH] x86: msr.h: fix build error

Fix this build error:
.../asm/msr.h: In function 'rdmsr_on_cpus':
.../asm/msr.h:248: error: request for member 'l' in something not a structure or union
.../asm/msr.h:248: error: request for member 'h' in something not a structure or union
.../asm/msr.h:248: error: too few arguments to function 'rdmsr_on_cpu'
.../asm/msr.h: In function 'wrmsr_on_cpus':
.../asm/msr.h:253: error: request for member 'l' in something not a structure or union
.../asm/msr.h:253: error: request for member 'h' in something not a structure or union
.../asm/msr.h:253: error: too few arguments to function 'wrmsr_on_cpu'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
 arch/x86/include/asm/msr.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h
index e49c14e..0b73f73 100644
--- a/arch/x86/include/asm/msr.h
+++ b/arch/x86/include/asm/msr.h
@@ -227,8 +227,8 @@ do {                                                            \
 #ifdef CONFIG_SMP
 int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
 int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
-int rdmsr_on_cpus(const cpumask_t *mask, u32 msr_no, struct msr *msrs);
-int wrmsr_on_cpus(const cpumask_t *mask, u32 msr_no, struct msr *msrs);
+int rdmsr_on_cpus(const cpumask_t *mask, u32 msr_no, struct msr **msrs);
+int wrmsr_on_cpus(const cpumask_t *mask, u32 msr_no, struct msr **msrs);
 int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
 int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
 #else  /*  CONFIG_SMP  */
@@ -245,12 +245,12 @@ static inline int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
 static inline int rdmsr_on_cpus(const cpumask_t *m, u32 msr_no,
 				struct msr **msrs)
 {
-	return rdmsr_on_cpu(msr_no, &(msrs[0].l), &(msrs[0].h));
+	return rdmsr_on_cpu(0, msr_no, &(msrs[0]->l), &(msrs[0]->h));
 }
 static inline int wrmsr_on_cpus(const cpumask_t *m, u32 msr_no,
 				struct msr **msrs)
 {
-	return wrmsr_on_cpu(msr_no, msrs[0].l, msrs[0].h);
+	return wrmsr_on_cpu(0, msr_no, msrs[0]->l, msrs[0]->h);
 }
 static inline int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no,
 				    u32 *l, u32 *h)
-- 
1.6.3.1

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

* Re: next: x86/msr.h: build fails
  2009-05-20  9:41 next: x86/msr.h: build fails Alexander Beregalov
@ 2009-05-20 10:14 ` Alexander Beregalov
  2009-05-20 16:06   ` Borislav Petkov
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Beregalov @ 2009-05-20 10:14 UTC (permalink / raw)
  To: Borislav Petkov, linux-next, Mauro Carvalho Chehab,
	H. Peter Anvin

On Wed, May 20, 2009 at 01:41:41PM +0400, Alexander Beregalov wrote:
> Hi Borislav,
> 
> What do you think about this fix?
> I have no idea what value should be for the cpu variable.

This patch should be better.
This is !SMP code, then cpu=0 is ok.


From: Alexander Beregalov <a.beregalov@gmail.com>
Subject: [PATCH] x86: msr.h: fix build error

Fix this build error:
.../asm/msr.h: In function 'rdmsr_on_cpus':
.../asm/msr.h:248: error: request for member 'l' in something not a structure or union
.../asm/msr.h:248: error: request for member 'h' in something not a structure or union
.../asm/msr.h:248: error: too few arguments to function 'rdmsr_on_cpu'
.../asm/msr.h: In function 'wrmsr_on_cpus':
.../asm/msr.h:253: error: request for member 'l' in something not a structure or union
.../asm/msr.h:253: error: request for member 'h' in something not a structure or union
.../asm/msr.h:253: error: too few arguments to function 'wrmsr_on_cpu'

This is !SMP code so `cpu` should be 0.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---

 arch/x86/include/asm/msr.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h
index e49c14e..fa082ba 100644
--- a/arch/x86/include/asm/msr.h
+++ b/arch/x86/include/asm/msr.h
@@ -243,14 +243,14 @@ static inline int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
 	return 0;
 }
 static inline int rdmsr_on_cpus(const cpumask_t *m, u32 msr_no,
-				struct msr **msrs)
+				struct msr *msrs)
 {
-	return rdmsr_on_cpu(msr_no, &(msrs[0].l), &(msrs[0].h));
+	return rdmsr_on_cpu(0, msr_no, &(msrs[0].l), &(msrs[0].h));
 }
 static inline int wrmsr_on_cpus(const cpumask_t *m, u32 msr_no,
-				struct msr **msrs)
+				struct msr *msrs)
 {
-	return wrmsr_on_cpu(msr_no, msrs[0].l, msrs[0].h);
+	return wrmsr_on_cpu(0, msr_no, msrs[0].l, msrs[0].h);
 }
 static inline int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no,
 				    u32 *l, u32 *h)

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

* Re: next: x86/msr.h: build fails
  2009-05-20 10:14 ` Alexander Beregalov
@ 2009-05-20 16:06   ` Borislav Petkov
  0 siblings, 0 replies; 3+ messages in thread
From: Borislav Petkov @ 2009-05-20 16:06 UTC (permalink / raw)
  To: Alexander Beregalov; +Cc: linux-next, Mauro Carvalho Chehab, H. Peter Anvin

On Wed, May 20, 2009 at 02:14:46PM +0400, Alexander Beregalov wrote:
> On Wed, May 20, 2009 at 01:41:41PM +0400, Alexander Beregalov wrote:
> > Hi Borislav,
> > 
> > What do you think about this fix?
> > I have no idea what value should be for the cpu variable.
> 
> This patch should be better.
> This is !SMP code, then cpu=0 is ok.
> 
> 
> From: Alexander Beregalov <a.beregalov@gmail.com>
> Subject: [PATCH] x86: msr.h: fix build error
> 
> Fix this build error:
> .../asm/msr.h: In function 'rdmsr_on_cpus':
> .../asm/msr.h:248: error: request for member 'l' in something not a structure or union
> .../asm/msr.h:248: error: request for member 'h' in something not a structure or union
> .../asm/msr.h:248: error: too few arguments to function 'rdmsr_on_cpu'
> .../asm/msr.h: In function 'wrmsr_on_cpus':
> .../asm/msr.h:253: error: request for member 'l' in something not a structure or union
> .../asm/msr.h:253: error: request for member 'h' in something not a structure or union
> .../asm/msr.h:253: error: too few arguments to function 'wrmsr_on_cpu'
> 
> This is !SMP code so `cpu` should be 0.
> 
> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>

thanks, applied.

-- 
Regards/Gruss,
Boris.

Operating | Advanced Micro Devices GmbH
  System  | Karl-Hammerschmidt-Str. 34, 85609 Dornach b. München, Germany
 Research | Geschäftsführer: Thomas M. McCoy, Giuliano Meroni
  Center  | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
  (OSRC)  | Registergericht München, HRB Nr. 43632

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

end of thread, other threads:[~2009-05-20 16:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-20  9:41 next: x86/msr.h: build fails Alexander Beregalov
2009-05-20 10:14 ` Alexander Beregalov
2009-05-20 16:06   ` Borislav Petkov

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).