summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/proc-armo
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
commit012bb3e61e5eced6c610f9e036372bf0c8def2d1 (patch)
tree87efc733f9b164e8c85c0336f92c8fb7eff6d183 /include/asm-arm/proc-armo
parent625a1589d3d6464b5d90b8a0918789e3afffd220 (diff)
Merge with Linux 2.4.0-test9. Please check DECstation, I had a number
of rejects to fixup while integrating Linus patches. I also found that this kernel will only boot SMP on Origin; the UP kernel freeze soon after bootup with SCSI timeout messages. I commit this anyway since I found that the last CVS versions had the same problem.
Diffstat (limited to 'include/asm-arm/proc-armo')
-rw-r--r--include/asm-arm/proc-armo/assembler.h34
-rw-r--r--include/asm-arm/proc-armo/cache.h22
-rw-r--r--include/asm-arm/proc-armo/io.h8
-rw-r--r--include/asm-arm/proc-armo/locks.h99
-rw-r--r--include/asm-arm/proc-armo/page.h8
-rw-r--r--include/asm-arm/proc-armo/pgtable.h10
-rw-r--r--include/asm-arm/proc-armo/processor.h24
-rw-r--r--include/asm-arm/proc-armo/ptrace.h10
-rw-r--r--include/asm-arm/proc-armo/shmparam.h11
-rw-r--r--include/asm-arm/proc-armo/system.h9
-rw-r--r--include/asm-arm/proc-armo/uaccess.h8
-rw-r--r--include/asm-arm/proc-armo/uncompress.h8
12 files changed, 158 insertions, 93 deletions
diff --git a/include/asm-arm/proc-armo/assembler.h b/include/asm-arm/proc-armo/assembler.h
index 42b23aa89..7f6bd57cb 100644
--- a/include/asm-arm/proc-armo/assembler.h
+++ b/include/asm-arm/proc-armo/assembler.h
@@ -1,10 +1,14 @@
/*
- * linux/asm-arm/proc-armo/assembler.h
+ * linux/asm-arm/proc-armo/assembler.h
*
- * Copyright (C) 1996 Russell King
+ * Copyright (C) 1996 Russell King
*
- * This file contains arm architecture specific defines
- * for the different processors
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This file contains arm architecture specific defines
+ * for the different processors
*/
#define MODE_USR USR26_MODE
#define MODE_FIQ FIQ26_MODE
@@ -78,3 +82,25 @@
.macro restore_irqs, oldcpsr
@ This be restore_irqs
.endm
+
+/*
+ * These two are used to save LR/restore PC over a user-based access.
+ * The old 26-bit architecture requires that we do. On 32-bit
+ * architecture, we can safely ignore this requirement.
+ */
+ .macro save_lr
+ str lr, [sp, #-4]!
+ .endm
+
+ .macro restore_pc
+ ldmfd sp!, {pc}^
+ .endm
+
+#define USER(x...) \
+9999: x; \
+ .section __ex_table,"a"; \
+ .align 3; \
+ .long 9999b,9001f; \
+ .previous
+
+
diff --git a/include/asm-arm/proc-armo/cache.h b/include/asm-arm/proc-armo/cache.h
index ca99bcf82..5331a13ce 100644
--- a/include/asm-arm/proc-armo/cache.h
+++ b/include/asm-arm/proc-armo/cache.h
@@ -1,14 +1,29 @@
/*
- * Cache flushing...
+ * linux/include/asm-arm/proc-armo/cache.h
+ *
+ * Copyright (C) 1999-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Cache handling for 26-bit ARM processors.
*/
#define flush_cache_all() do { } while (0)
#define flush_cache_mm(mm) do { } while (0)
#define flush_cache_range(mm,start,end) do { } while (0)
#define flush_cache_page(vma,vmaddr) do { } while (0)
#define flush_page_to_ram(page) do { } while (0)
+
+#define invalidate_dcache_range(start,end) do { } while (0)
+#define clean_dcache_range(start,end) do { } while (0)
+#define flush_dcache_range(start,end) do { } while (0)
#define flush_dcache_page(page) do { } while (0)
-#define flush_icache_page(vma,page) do { } while (0)
+#define clean_dcache_entry(_s) do { } while (0)
+#define clean_cache_entry(_start) do { } while (0)
+
#define flush_icache_range(start,end) do { } while (0)
+#define flush_icache_page(vma,page) do { } while (0)
/* DAG: ARM3 will flush cache on MEMC updates anyway? so don't bother */
#define clean_cache_area(_start,_size) do { } while (0)
@@ -67,6 +82,3 @@ memc_clear(struct mm_struct *mm, struct page *page)
if (mm == current->active_mm)
processor._set_pgd(mm->pgd);
}
-
-#define __flush_entry_to_ram(entry)
-
diff --git a/include/asm-arm/proc-armo/io.h b/include/asm-arm/proc-armo/io.h
deleted file mode 100644
index 84143003e..000000000
--- a/include/asm-arm/proc-armo/io.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * linux/include/asm-arm/proc-armo/io.h
- */
-
-/* Nothing to do */
-#define dma_cache_inv(_start,_size) do { } while (0)
-#define dma_cache_wback(_start,_size) do { } while (0)
-#define dma_cache_wback_inv(_start,_size) do { } while (0)
diff --git a/include/asm-arm/proc-armo/locks.h b/include/asm-arm/proc-armo/locks.h
index fcf0cab01..cbbb5f54e 100644
--- a/include/asm-arm/proc-armo/locks.h
+++ b/include/asm-arm/proc-armo/locks.h
@@ -1,11 +1,14 @@
/*
- * linux/include/asm-arm/proc-armo/locks.h
+ * linux/include/asm-arm/proc-armo/locks.h
*
- * Copyright (C) 2000 Russell King
- * Fixes for 26 bit machines, (C) 2000 Dave Gilbert
+ * Copyright (C) 2000 Russell King
+ * Fixes for 26 bit machines, (C) 2000 Dave Gilbert
*
- * Interrupt safe locking assembler.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*
+ * Interrupt safe locking assembler.
*/
#ifndef __ASM_PROC_LOCKS_H
#define __ASM_PROC_LOCKS_H
@@ -15,20 +18,20 @@
({ \
__asm__ __volatile__ ( \
"@ atomic down operation\n" \
-" mov r0, pc\n" \
-" orr lr, r0, #0x08000000\n" \
+" mov ip, pc\n" \
+" orr lr, ip, #0x08000000\n" \
" teqp lr, #0\n" \
" ldr lr, [%0]\n" \
-" and r0, r0, #0x0c000003\n" \
+" and ip, ip, #0x0c000003\n" \
" subs lr, lr, #1\n" \
" str lr, [%0]\n" \
-" orrmi r0, r0, #0x80000000 @ set N\n" \
-" teqp r0, #0\n" \
-" movmi r0, %0\n" \
+" orrmi ip, ip, #0x80000000 @ set N\n" \
+" teqp ip, #0\n" \
+" movmi ip, %0\n" \
" blmi " SYMBOL_NAME_STR(fail) \
: \
: "r" (ptr) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
})
#define __down_op_ret(ptr,fail) \
@@ -36,22 +39,22 @@
unsigned int result; \
__asm__ __volatile__ ( \
" @ down_op_ret\n" \
-" mov r0, pc\n" \
-" orr lr, r0, #0x08000000\n" \
+" mov ip, pc\n" \
+" orr lr, ip, #0x08000000\n" \
" teqp lr, #0\n" \
" ldr lr, [%1]\n" \
-" and r0, r0, #0x0c000003\n" \
+" and ip, ip, #0x0c000003\n" \
" subs lr, lr, #1\n" \
" str lr, [%1]\n" \
-" orrmi r0, r0, #0x80000000 @ set N\n" \
-" teqp r0, #0\n" \
-" movmi r0, %1\n" \
-" movpl r0, #0\n" \
+" orrmi ip, ip, #0x80000000 @ set N\n" \
+" teqp ip, #0\n" \
+" movmi ip, %1\n" \
+" movpl ip, #0\n" \
" blmi " SYMBOL_NAME_STR(fail) "\n" \
-" mov %0, r0" \
+" mov %0, ip" \
: "=&r" (result) \
: "r" (ptr) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
result; \
})
@@ -59,20 +62,20 @@
({ \
__asm__ __volatile__ ( \
"@ up_op\n" \
-" mov r0, pc\n" \
-" orr lr, r0, #0x08000000\n" \
+" mov ip, pc\n" \
+" orr lr, ip, #0x08000000\n" \
" teqp lr, #0\n" \
" ldr lr, [%0]\n" \
-" and r0, r0, #0x0c000003\n" \
+" and ip, ip, #0x0c000003\n" \
" adds lr, lr, #1\n" \
" str lr, [%0]\n" \
-" orrle r0, r0, #0x80000000 @ set N - should this be mi ??? DAG ! \n" \
-" teqp r0, #0\n" \
-" movmi r0, %0\n" \
+" orrle ip, ip, #0x80000000 @ set N - should this be mi ??? DAG ! \n" \
+" teqp ip, #0\n" \
+" movmi ip, %0\n" \
" blmi " SYMBOL_NAME_STR(wake) \
: \
: "r" (ptr) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
})
/*
@@ -89,22 +92,22 @@
({ \
__asm__ __volatile__( \
"@ down_op_write\n" \
-" mov r0, pc\n" \
-" orr lr, r0, #0x08000000\n" \
+" mov ip, pc\n" \
+" orr lr, ip, #0x08000000\n" \
" teqp lr, #0\n" \
-" and r0, r0, #0x0c000003\n" \
+" and ip, ip, #0x0c000003\n" \
\
" ldr lr, [%0]\n" \
" subs lr, lr, %1\n" \
" str lr, [%0]\n" \
\
-" orreq r0, r0, #0x40000000 @ set Z \n"\
-" teqp r0, #0\n" \
-" movne r0, %0\n" \
+" orreq ip, ip, #0x40000000 @ set Z \n"\
+" teqp ip, #0\n" \
+" movne ip, %0\n" \
" blne " SYMBOL_NAME_STR(fail) \
: \
: "r" (ptr), "I" (RW_LOCK_BIAS) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
})
/* Increments by RW_LOCK_BIAS, wakes if value >= 0 */
@@ -112,22 +115,22 @@
({ \
__asm__ __volatile__( \
"@ up_op_read\n" \
-" mov r0, pc\n" \
-" orr lr, r0, #0x08000000\n" \
+" mov ip, pc\n" \
+" orr lr, ip, #0x08000000\n" \
" teqp lr, #0\n" \
\
" ldr lr, [%0]\n" \
-" and r0, r0, #0x0c000003\n" \
+" and ip, ip, #0x0c000003\n" \
" adds lr, lr, %1\n" \
" str lr, [%0]\n" \
\
-" orrcs r0, r0, #0x20000000 @ set C\n" \
-" teqp r0, #0\n" \
-" movcs r0, %0\n" \
+" orrcs ip, ip, #0x20000000 @ set C\n" \
+" teqp ip, #0\n" \
+" movcs ip, %0\n" \
" blcs " SYMBOL_NAME_STR(wake) \
: \
: "r" (ptr), "I" (RW_LOCK_BIAS) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
})
#define __down_op_read(ptr,fail) \
@@ -137,22 +140,22 @@
({ \
__asm__ __volatile__( \
"@ up_op_read\n" \
-" mov r0, pc\n" \
-" orr lr, r0, #0x08000000\n" \
+" mov ip, pc\n" \
+" orr lr, ip, #0x08000000\n" \
" teqp lr, #0\n" \
\
" ldr lr, [%0]\n" \
-" and r0, r0, #0x0c000003\n" \
+" and ip, ip, #0x0c000003\n" \
" adds lr, lr, %1\n" \
" str lr, [%0]\n" \
\
-" orreq r0, r0, #0x40000000 @ Set Z \n" \
-" teqp r0, #0\n" \
-" moveq r0, %0\n" \
+" orreq ip, ip, #0x40000000 @ Set Z \n" \
+" teqp ip, #0\n" \
+" moveq ip, %0\n" \
" bleq " SYMBOL_NAME_STR(wake) \
: \
: "r" (ptr), "I" (1) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
})
#endif
diff --git a/include/asm-arm/proc-armo/page.h b/include/asm-arm/proc-armo/page.h
index dd3331994..b1abf388e 100644
--- a/include/asm-arm/proc-armo/page.h
+++ b/include/asm-arm/proc-armo/page.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/proc-armo/page.h
+ * linux/include/asm-arm/proc-armo/page.h
*
- * Copyright (C) 1995, 1996 Russell King
+ * Copyright (C) 1995, 1996 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#ifndef __ASM_PROC_PAGE_H
#define __ASM_PROC_PAGE_H
diff --git a/include/asm-arm/proc-armo/pgtable.h b/include/asm-arm/proc-armo/pgtable.h
index 56456e0e1..12dc2cee0 100644
--- a/include/asm-arm/proc-armo/pgtable.h
+++ b/include/asm-arm/proc-armo/pgtable.h
@@ -1,9 +1,13 @@
/*
- * linux/include/asm-arm/proc-armo/pgtable.h
+ * linux/include/asm-arm/proc-armo/pgtable.h
*
- * Copyright (C) 1995-1999 Russell King
+ * Copyright (C) 1995-1999 Russell King
*
- * 18-Oct-1997 RMK Now two-level (32x32)
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 18-Oct-1997 RMK Now two-level (32x32)
*/
#ifndef __ASM_PROC_PGTABLE_H
#define __ASM_PROC_PGTABLE_H
diff --git a/include/asm-arm/proc-armo/processor.h b/include/asm-arm/proc-armo/processor.h
index 6562ee712..581236378 100644
--- a/include/asm-arm/proc-armo/processor.h
+++ b/include/asm-arm/proc-armo/processor.h
@@ -1,16 +1,20 @@
/*
- * linux/include/asm-arm/proc-armo/processor.h
+ * linux/include/asm-arm/proc-armo/processor.h
*
- * Copyright (c) 1996 Russell King.
+ * Copyright (C) 1996 Russell King.
*
- * Changelog:
- * 27-06-1996 RMK Created
- * 10-10-1996 RMK Brought up to date with SA110
- * 26-09-1996 RMK Added 'EXTRA_THREAD_STRUCT*'
- * 28-09-1996 RMK Moved start_thread into the processor dependencies
- * 11-01-1998 RMK Added new uaccess_t
- * 09-09-1998 PJB Delete redundant `wp_works_ok'
- * 30-05-1999 PJB Save sl across context switches
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 27-06-1996 RMK Created
+ * 10-10-1996 RMK Brought up to date with SA110
+ * 26-09-1996 RMK Added 'EXTRA_THREAD_STRUCT*'
+ * 28-09-1996 RMK Moved start_thread into the processor dependencies
+ * 11-01-1998 RMK Added new uaccess_t
+ * 09-09-1998 PJB Delete redundant `wp_works_ok'
+ * 30-05-1999 PJB Save sl across context switches
*/
#ifndef __ASM_PROC_PROCESSOR_H
#define __ASM_PROC_PROCESSOR_H
diff --git a/include/asm-arm/proc-armo/ptrace.h b/include/asm-arm/proc-armo/ptrace.h
index 9bf506501..287f258c1 100644
--- a/include/asm-arm/proc-armo/ptrace.h
+++ b/include/asm-arm/proc-armo/ptrace.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/proc-armo/ptrace.h
+ * linux/include/asm-arm/proc-armo/ptrace.h
*
- * Copyright (C) 1996-1999 Russell King
+ * Copyright (C) 1996-1999 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#ifndef __ASM_PROC_PTRACE_H
#define __ASM_PROC_PTRACE_H
@@ -54,6 +58,8 @@ struct pt_regs {
#define user_mode(regs) \
(processor_mode(regs) == USR26_MODE)
+#define thumb_mode(regs) (0)
+
#define interrupts_enabled(regs) \
(!((regs)->ARM_pc & I_BIT))
diff --git a/include/asm-arm/proc-armo/shmparam.h b/include/asm-arm/proc-armo/shmparam.h
index e85eadb3f..6b106f141 100644
--- a/include/asm-arm/proc-armo/shmparam.h
+++ b/include/asm-arm/proc-armo/shmparam.h
@@ -1,11 +1,14 @@
/*
- * linux/include/asm-arm/proc-armo/shmparam.h
+ * linux/include/asm-arm/proc-armo/shmparam.h
*
- * Copyright (C) 1996 Russell King
+ * Copyright (C) 1996 Russell King
*
- * definitions for the shared process memory on the ARM3
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * definitions for the shared process memory on the ARM3
*/
-
#ifndef __ASM_PROC_SHMPARAM_H
#define __ASM_PROC_SHMPARAM_H
diff --git a/include/asm-arm/proc-armo/system.h b/include/asm-arm/proc-armo/system.h
index 42a6bc70a..1ba35108c 100644
--- a/include/asm-arm/proc-armo/system.h
+++ b/include/asm-arm/proc-armo/system.h
@@ -1,9 +1,12 @@
/*
- * linux/include/asm-arm/proc-armo/system.h
+ * linux/include/asm-arm/proc-armo/system.h
*
- * Copyright (C) 1995, 1996 Russell King
+ * Copyright (C) 1995, 1996 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
#ifndef __ASM_PROC_SYSTEM_H
#define __ASM_PROC_SYSTEM_H
diff --git a/include/asm-arm/proc-armo/uaccess.h b/include/asm-arm/proc-armo/uaccess.h
index 7e1a62c5e..d3e733d87 100644
--- a/include/asm-arm/proc-armo/uaccess.h
+++ b/include/asm-arm/proc-armo/uaccess.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/proc-armo/segment.h
+ * linux/include/asm-arm/proc-armo/segment.h
*
- * Copyright (C) 1996 Russell King
+ * Copyright (C) 1996 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
/*
diff --git a/include/asm-arm/proc-armo/uncompress.h b/include/asm-arm/proc-armo/uncompress.h
index b4edb06f7..26a8747d2 100644
--- a/include/asm-arm/proc-armo/uncompress.h
+++ b/include/asm-arm/proc-armo/uncompress.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/proc-armo/uncompress.h
+ * linux/include/asm-arm/proc-armo/uncompress.h
*
- * (c) 1997 Russell King
+ * Copyright (C) 1997 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#define proc_decomp_setup()