]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 1 Apr 2014 16:49:16 +0000 (09:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 1 Apr 2014 16:49:16 +0000 (09:49 -0700)
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

arch/avr32/include/asm/bugs.h
arch/avr32/include/asm/processor.h
arch/avr32/kernel/cpu.c
arch/avr32/mm/cache.c

index 7635e770622ee32dafb27f6368a588542791d51f..278661bbd1b0aefb081be0bdb7d15423cd27f3f3 100644 (file)
@@ -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 */
index 48d71c5c898a18d083f8a55da807c103d7515458..972adcc1e8f40179d06a4062d2adf63416f36452 100644 (file)
@@ -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
index 2233be71e2e8cf7e8b62789eb6a5a7ba864d001e..0341ae27c9ec57fd06eaf88776db6ae83444c96e 100644 (file)
@@ -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;
 
index 6a46ecd56cfd538c7fe070b641fad3e68ffc3d1f..85d635cd7b28f84045e5bf29e62e4aab53196f85 100644 (file)
@@ -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().