Skip to content

Commit

Permalink
sparc: replace uses of CPU_MASK_ALL_PTR
Browse files Browse the repository at this point in the history
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 321a8e9 (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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stephen Rothwell authored and David S. Miller committed Jun 16, 2009
1 parent 9be12f9 commit 6ac5c61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/sparc/kernel/smp_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1542,5 +1542,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);
}
2 changes: 1 addition & 1 deletion arch/sparc/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6ac5c61

Please sign in to comment.