jbd2: correctly unescape journal data blocks
[sfrench/cifs-2.6.git] / include / asm-avr32 / processor.h
index 6a64833756a6df85474886835c15ac5b5580a2b1..49a88f5a9d2feda1c7b033cfd19c71453c6dd6bf 100644 (file)
 
 #define TASK_SIZE      0x80000000
 
+#ifdef __KERNEL__
+#define STACK_TOP      TASK_SIZE
+#define STACK_TOP_MAX  STACK_TOP
+#endif
+
 #ifndef __ASSEMBLY__
 
 static inline void *current_text_addr(void)
@@ -57,11 +62,25 @@ struct avr32_cpuinfo {
        unsigned short cpu_revision;
        enum tlb_config tlb_config;
        unsigned long features;
+       u32 device_id;
 
        struct cache_info icache;
        struct cache_info dcache;
 };
 
+static inline unsigned int avr32_get_manufacturer_id(struct avr32_cpuinfo *cpu)
+{
+       return (cpu->device_id >> 1) & 0x7f;
+}
+static inline unsigned int avr32_get_product_number(struct avr32_cpuinfo *cpu)
+{
+       return (cpu->device_id >> 12) & 0xffff;
+}
+static inline unsigned int avr32_get_chip_revision(struct avr32_cpuinfo *cpu)
+{
+       return (cpu->device_id >> 28) & 0x0f;
+}
+
 extern struct avr32_cpuinfo boot_cpu_data;
 
 #ifdef CONFIG_SMP
@@ -139,6 +158,9 @@ extern void show_regs_log_lvl(struct pt_regs *regs, const char *log_lvl);
 extern void show_stack_log_lvl(struct task_struct *tsk, unsigned long sp,
                               struct pt_regs *regs, const char *log_lvl);
 
+#define task_pt_regs(p) \
+       ((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1)
+
 #define KSTK_EIP(tsk)  ((tsk)->thread.cpu_context.pc)
 #define KSTK_ESP(tsk)  ((tsk)->thread.cpu_context.ksp)