lkml.org 
[lkml]   [2004]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] Fix the cpumask rewrite
From
Date
This patch:

ChangeSet 1.1828.1.25 2004/06/24 08:51:00 akpm@osdl.org
[PATCH] cpumask: rewrite cpumask.h - single bitmap based implementation

From: Paul Jackson <pj@sgi.com>

Major rewrite of cpumask to use a single implementation, as a struct-wrapped
bitmap.

Altered the cpumask iterators to add a volatile to the bitmap type.
This might be correct for x86 and itanium, but it isn't for parisc where
our bitmap operators don't take volatile pointers. This makes our
compile incredibly noisy in just about every file:

CC mm/rmap.o
In file included from include/linux/sched.h:15,
from include/linux/mm.h:4,
from mm/rmap.c:29:
include/linux/cpumask.h: In function `__cpu_set':
include/linux/cpumask.h:86: warning: passing arg 2 of `set_bit' discards
qualifiers from pointer target type
include/linux/cpumask.h: In function `__cpu_clear':
include/linux/cpumask.h:92: warning: passing arg 2 of `clear_bit'
discards qualifiers from pointer target type

Since whether the bitmap operators are volatile or not is within the
province of the architecture to decide, I think the correct fix is just
to drop the spurious volatiles from cpumask.h

James

===== include/linux/cpumask.h 1.15 vs edited =====
--- 1.15/include/linux/cpumask.h 2004-06-24 13:57:31 -05:00
+++ edited/include/linux/cpumask.h 2004-06-26 11:00:14 -05:00
@@ -81,13 +81,13 @@
extern cpumask_t _unused_cpumask_arg_;

#define cpu_set(cpu, dst) __cpu_set((cpu), &(dst))
-static inline void __cpu_set(int cpu, volatile cpumask_t *dstp)
+static inline void __cpu_set(int cpu, cpumask_t *dstp)
{
set_bit(cpu, dstp->bits);
}

#define cpu_clear(cpu, dst) __cpu_clear((cpu), &(dst))
-static inline void __cpu_clear(int cpu, volatile cpumask_t *dstp)
+static inline void __cpu_clear(int cpu, cpumask_t *dstp)
{
clear_bit(cpu, dstp->bits);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.075 / U:9.400 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site