]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h
Merge branches 'irq-core-for-linus' and 'core-locking-for-linus' of git://git.kernel...
[karo-tx-linux.git] / arch / mips / include / asm / mach-cavium-octeon / cpu-feature-overrides.h
index bbf05404239565927c2f4bea282863cf4766b132..0d5a42b5f47abb4091d3257270b72f80ed1fe3ce 100644 (file)
 #define cpu_has_veic           0
 #define cpu_hwrena_impl_bits   0xc0000000
 
-#define kernel_uses_smartmips_rixi (cpu_data[0].cputype == CPU_CAVIUM_OCTEON_PLUS)
+#define kernel_uses_smartmips_rixi (cpu_data[0].cputype != CPU_CAVIUM_OCTEON)
 
-#define ARCH_HAS_READ_CURRENT_TIMER 1
 #define ARCH_HAS_IRQ_PER_CPU   1
 #define ARCH_HAS_SPINLOCK_PREFETCH 1
 #define spin_lock_prefetch(x) prefetch(x)
 #define PREFETCH_STRIDE 128
 
-static inline int read_current_timer(unsigned long *result)
-{
-       asm volatile ("rdhwr %0,$31\n"
-#ifndef CONFIG_64BIT
-                     "\tsll %0, 0"
+#ifdef __OCTEON__
+/*
+ * All gcc versions that have OCTEON support define __OCTEON__ and have the
+ *  __builtin_popcount support.
+ */
+#define ARCH_HAS_USABLE_BUILTIN_POPCOUNT 1
 #endif
-                     : "=r" (*result));
-       return 0;
-}
 
 static inline int octeon_has_saa(void)
 {
@@ -84,4 +81,10 @@ static inline int octeon_has_saa(void)
        return id >= 0x000d0300;
 }
 
+/*
+ * The last 256MB are reserved for device to device mappings and the
+ * BAR1 hole.
+ */
+#define MAX_DMA32_PFN (((1ULL << 32) - (1ULL << 28)) >> PAGE_SHIFT)
+
 #endif