Skip to content

Commit

Permalink
avr32: remove cpu_data macro to fix compiles
Browse files Browse the repository at this point in the history
Having cpu_data as a parameterless macro can easily cause build failures
because it can be a variable name like in linux/pm_domain.h [1]. So,
remove the macro and convert its only user. Because this architecture
cannot do SMP, remove the whole SMP block, too. Only compile tested due
to no hardware.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>

[1] https://lists.01.org/pipermail/kbuild-all/2014-February/003252.html
  • Loading branch information
Wolfram Sang authored and Hans-Christian Egtvedt committed Mar 31, 2014
1 parent 455c6fd commit 8acc872
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion arch/avr32/include/asm/bugs.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

static void __init check_bugs(void)
{
cpu_data->loops_per_jiffy = loops_per_jiffy;
boot_cpu_data.loops_per_jiffy = loops_per_jiffy;
}

#endif /* __ASM_AVR32_BUGS_H */
7 changes: 1 addition & 6 deletions arch/avr32/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,8 @@ static inline unsigned int avr32_get_chip_revision(struct avr32_cpuinfo *cpu)

extern struct avr32_cpuinfo boot_cpu_data;

#ifdef CONFIG_SMP
extern struct avr32_cpuinfo cpu_data[];
#define current_cpu_data cpu_data[smp_processor_id()]
#else
#define cpu_data (&boot_cpu_data)
/* No SMP support so far */
#define current_cpu_data boot_cpu_data
#endif

/* This decides where the kernel will search for a free chunk of vm
* space during mmap's
Expand Down

0 comments on commit 8acc872

Please sign in to comment.