[PATCH] PPC64: fix to Re: should cpus_in_xmon be volatile?

Linas Vepstas linas at austin.ibm.com
Sat Nov 20 07:41:50 EST 2004


Hi,

Here's a patch that fixes a compiler warning.  It casts away volatile
as per previous email.


On Thu, Nov 18, 2004 at 02:52:33PM -0800, Dave Hansen was heard to remark:
> I'm getting a warning (one of many) during a build of 2.6.10-rc2-mm2:
> 
> memhotplug/arch/ppc64/xmon/xmon.c: In function `xmon_core':
> memhotplug/arch/ppc64/xmon/xmon.c:401: warning: passing arg 1 of
> `__cpus_weight' discards qualifiers from pointer target type
 

Signed-off-by: Linas Vepstas <linas at linas.org>

-------------- next part --------------
--- arch/ppc64/xmon/xmon.c.orig	2004-11-19 14:34:11.000000000 -0600
+++ arch/ppc64/xmon/xmon.c	2004-11-19 14:34:36.000000000 -0600
@@ -402,7 +407,7 @@ int xmon_core(struct pt_regs *regs, int 
 			smp_send_debugger_break(MSG_ALL_BUT_SELF);
 			/* wait for other cpus to come in */
 			for (timeout = 100000000; timeout != 0; --timeout)
-				if (cpus_weight(cpus_in_xmon) >= ncpus)
+				if (cpus_weight(*((cpumask_t *) &cpus_in_xmon)) >= ncpus)
 					break;
 		}
 		remove_bpts();


More information about the Linuxppc64-dev mailing list