lkml.org 
[lkml]   [2009]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] sparc: replace uses of CPU_MASK_ALL_PTR
CPU_MASK_ALL is the (deprecated) "all bits set" cpumask, defined as so:

#define CPU_MASK_ALL (cpumask_t) { { ... } }

Taking the address of such a temporary is questionable at best,
unfortunately 321a8e9d (cpumask: add CPU_MASK_ALL_PTR macro) added
CPU_MASK_ALL_PTR:

#define CPU_MASK_ALL_PTR (&CPU_MASK_ALL)

Which formalizes this practice. One day gcc could bite us over this
usage (though we seem to have gotten away with it so far).

[Description by Rusty Russell]
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/sparc/kernel/smp_64.c | 2 +-
arch/sparc/mm/init_64.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index 1de47d2..f3a83b0 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -1538,5 +1538,5 @@ void __init setup_per_cpu_areas(void)

of_fill_in_cpu_data();
if (tlb_type == hypervisor)
- mdesc_fill_in_cpu_data(CPU_MASK_ALL_PTR);
+ mdesc_fill_in_cpu_data(cpu_all_mask);
}
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index b5a5932..ca92e2f 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -1799,7 +1799,7 @@ void __init paging_init(void)

if (tlb_type == hypervisor) {
sun4v_mdesc_init();
- mdesc_populate_present_mask(CPU_MASK_ALL_PTR);
+ mdesc_populate_present_mask(cpu_all_mask);
}

/* Once the OF device tree and MDESC have been setup, we know
--
1.6.3.1
On Mon, 15 Jun 2009 01:52:01 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>
> Sorry, slipped through the cracks. Could you please send me
> a fresh copy of that patch?

See above.

--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/


\
 
 \ /
  Last update: 2009-06-15 11:47    [W:0.205 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site