mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 06:02:05 +00:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32
Pull AVR32 updates from Hans-Christian Egtvedt. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32: avr32: replace simple_strtoul() with kstrtoul() arch/avr32/mm/cache.c: export symbol flush_icache_range() for module using avr32: remove cpu_data macro to fix compiles
This commit is contained in:
commit
f27a15d246
@ -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 */
|
||||
|
@ -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
|
||||
|
@ -39,10 +39,12 @@ static ssize_t store_pc0event(struct device *dev,
|
||||
size_t count)
|
||||
{
|
||||
unsigned long val;
|
||||
char *endp;
|
||||
int ret;
|
||||
|
||||
val = simple_strtoul(buf, &endp, 0);
|
||||
if (endp == buf || val > 0x3f)
|
||||
ret = kstrtoul(buf, 0, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (val > 0x3f)
|
||||
return -EINVAL;
|
||||
val = (val << 12) | (sysreg_read(PCCR) & 0xfffc0fff);
|
||||
sysreg_write(PCCR, val);
|
||||
@ -61,11 +63,11 @@ static ssize_t store_pc0count(struct device *dev,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
unsigned long val;
|
||||
char *endp;
|
||||
int ret;
|
||||
|
||||
val = simple_strtoul(buf, &endp, 0);
|
||||
if (endp == buf)
|
||||
return -EINVAL;
|
||||
ret = kstrtoul(buf, 0, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
sysreg_write(PCNT0, val);
|
||||
|
||||
return count;
|
||||
@ -84,10 +86,12 @@ static ssize_t store_pc1event(struct device *dev,
|
||||
size_t count)
|
||||
{
|
||||
unsigned long val;
|
||||
char *endp;
|
||||
int ret;
|
||||
|
||||
val = simple_strtoul(buf, &endp, 0);
|
||||
if (endp == buf || val > 0x3f)
|
||||
ret = kstrtoul(buf, 0, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (val > 0x3f)
|
||||
return -EINVAL;
|
||||
val = (val << 18) | (sysreg_read(PCCR) & 0xff03ffff);
|
||||
sysreg_write(PCCR, val);
|
||||
@ -106,11 +110,11 @@ static ssize_t store_pc1count(struct device *dev,
|
||||
size_t count)
|
||||
{
|
||||
unsigned long val;
|
||||
char *endp;
|
||||
int ret;
|
||||
|
||||
val = simple_strtoul(buf, &endp, 0);
|
||||
if (endp == buf)
|
||||
return -EINVAL;
|
||||
ret = kstrtoul(buf, 0, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
sysreg_write(PCNT1, val);
|
||||
|
||||
return count;
|
||||
@ -129,11 +133,11 @@ static ssize_t store_pccycles(struct device *dev,
|
||||
size_t count)
|
||||
{
|
||||
unsigned long val;
|
||||
char *endp;
|
||||
int ret;
|
||||
|
||||
val = simple_strtoul(buf, &endp, 0);
|
||||
if (endp == buf)
|
||||
return -EINVAL;
|
||||
ret = kstrtoul(buf, 0, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
sysreg_write(PCCNT, val);
|
||||
|
||||
return count;
|
||||
@ -152,11 +156,11 @@ static ssize_t store_pcenable(struct device *dev,
|
||||
size_t count)
|
||||
{
|
||||
unsigned long pccr, val;
|
||||
char *endp;
|
||||
int ret;
|
||||
|
||||
val = simple_strtoul(buf, &endp, 0);
|
||||
if (endp == buf)
|
||||
return -EINVAL;
|
||||
ret = kstrtoul(buf, 0, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (val)
|
||||
val = 1;
|
||||
|
||||
|
@ -111,6 +111,7 @@ void flush_icache_range(unsigned long start, unsigned long end)
|
||||
__flush_icache_range(start & ~(linesz - 1),
|
||||
(end + linesz - 1) & ~(linesz - 1));
|
||||
}
|
||||
EXPORT_SYMBOL(flush_icache_range);
|
||||
|
||||
/*
|
||||
* This one is called from __do_fault() and do_swap_page().
|
||||
|
Loading…
Reference in New Issue
Block a user