summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2012-09-22 06:41:56 +0000
committerAndrew Turner <andrew@FreeBSD.org>2012-09-22 06:41:56 +0000
commit1161298251115548d6df328b756687701d4c6200 (patch)
tree9557129a8ffe8bf566ba3dcd2eb2275c13e4386e
parent8d8d314d78caf28e5103b42d035779a516153b0c (diff)
downloadsrc-test2-1161298251115548d6df328b756687701d4c6200.tar.gz
src-test2-1161298251115548d6df328b756687701d4c6200.zip
Notes
-rw-r--r--sys/arm/arm/machdep.c13
-rw-r--r--sys/arm/at91/at91_machdep.c13
-rw-r--r--sys/arm/broadcom/bcm2835/bcm2835_machdep.c19
-rw-r--r--sys/arm/econa/econa_machdep.c12
-rw-r--r--sys/arm/include/machdep.h11
-rw-r--r--sys/arm/lpc/lpc_machdep.c13
-rw-r--r--sys/arm/mv/mv_machdep.c19
-rw-r--r--sys/arm/s3c2xx0/s3c24x0_machdep.c12
-rw-r--r--sys/arm/sa11x0/assabet_machdep.c12
-rw-r--r--sys/arm/tegra/tegra2_machdep.c25
-rw-r--r--sys/arm/ti/ti_machdep.c19
-rw-r--r--sys/arm/xscale/i80321/ep80219_machdep.c16
-rw-r--r--sys/arm/xscale/i80321/iq31244_machdep.c16
-rw-r--r--sys/arm/xscale/i8134x/crb_machdep.c15
-rw-r--r--sys/arm/xscale/ixp425/avila_machdep.c9
-rw-r--r--sys/arm/xscale/pxa/pxa_machdep.c12
16 files changed, 39 insertions, 197 deletions
diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c
index 861e7470fec9..e210938abdba 100644
--- a/sys/arm/arm/machdep.c
+++ b/sys/arm/arm/machdep.c
@@ -948,3 +948,16 @@ init_proc0(vm_offset_t kstack)
thread0.td_frame = &proc0_tf;
pcpup->pc_curpcb = thread0.td_pcb;
}
+
+void
+set_stackptrs(int cpu)
+{
+
+ set_stackptr(PSR_IRQ32_MODE,
+ irqstack.pv_va + ((IRQ_STACK_SIZE * PAGE_SIZE) * (cpu + 1)));
+ set_stackptr(PSR_ABT32_MODE,
+ abtstack.pv_va + ((ABT_STACK_SIZE * PAGE_SIZE) * (cpu + 1)));
+ set_stackptr(PSR_UND32_MODE,
+ undstack.pv_va + ((UND_STACK_SIZE * PAGE_SIZE) * (cpu + 1)));
+}
+
diff --git a/sys/arm/at91/at91_machdep.c b/sys/arm/at91/at91_machdep.c
index c6be9e52881b..51e7b81c1ca0 100644
--- a/sys/arm/at91/at91_machdep.c
+++ b/sys/arm/at91/at91_machdep.c
@@ -107,11 +107,6 @@ __FBSDID("$FreeBSD$");
/* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
#define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
-/* Define various stack sizes in pages */
-#define IRQ_STACK_SIZE 1
-#define ABT_STACK_SIZE 1
-#define UND_STACK_SIZE 1
-
extern u_int data_abort_handler_address;
extern u_int prefetch_abort_handler_address;
extern u_int undefined_handler_address;
@@ -597,12 +592,8 @@ initarm(struct arm_boot_params *abp)
* of the stack memory.
*/
cpu_control(CPU_CONTROL_MMU_ENABLE, CPU_CONTROL_MMU_ENABLE);
- set_stackptr(PSR_IRQ32_MODE,
- irqstack.pv_va + IRQ_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_ABT32_MODE,
- abtstack.pv_va + ABT_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_UND32_MODE,
- undstack.pv_va + UND_STACK_SIZE * PAGE_SIZE);
+
+ set_stackptrs(0);
/*
* We must now clean the cache again....
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_machdep.c b/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
index f26480f0c799..9887ff1c6af8 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
@@ -108,11 +108,6 @@ __FBSDID("$FreeBSD$");
*/
#define KERNEL_PT_MAX 78
-/* Define various stack sizes in pages */
-#define IRQ_STACK_SIZE 1
-#define ABT_STACK_SIZE 1
-#define UND_STACK_SIZE 1
-
extern unsigned char kernbase[];
extern unsigned char _etext[];
extern unsigned char _edata[];
@@ -147,8 +142,6 @@ struct pv_addr undstack;
struct pv_addr abtstack;
struct pv_addr kernelstack;
-void set_stackptrs(int cpu);
-
static struct mem_region availmem_regions[FDT_MEM_REGIONS];
static int availmem_regions_sz;
@@ -544,18 +537,6 @@ initarm(struct arm_boot_params *abp)
sizeof(struct pcb)));
}
-void
-set_stackptrs(int cpu)
-{
-
- set_stackptr(PSR_IRQ32_MODE,
- irqstack.pv_va + ((IRQ_STACK_SIZE * PAGE_SIZE) * (cpu + 1)));
- set_stackptr(PSR_ABT32_MODE,
- abtstack.pv_va + ((ABT_STACK_SIZE * PAGE_SIZE) * (cpu + 1)));
- set_stackptr(PSR_UND32_MODE,
- undstack.pv_va + ((UND_STACK_SIZE * PAGE_SIZE) * (cpu + 1)));
-}
-
#define FDT_DEVMAP_MAX (2) // FIXME
static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
{ 0, 0, 0, 0, 0, }
diff --git a/sys/arm/econa/econa_machdep.c b/sys/arm/econa/econa_machdep.c
index 9779b6a09185..e9a98eee6309 100644
--- a/sys/arm/econa/econa_machdep.c
+++ b/sys/arm/econa/econa_machdep.c
@@ -92,11 +92,6 @@ __FBSDID("$FreeBSD$");
/* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
#define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
-/* Define various stack sizes in pages */
-#define IRQ_STACK_SIZE 1
-#define ABT_STACK_SIZE 1
-#define UND_STACK_SIZE 1
-
extern u_int data_abort_handler_address;
extern u_int prefetch_abort_handler_address;
extern u_int undefined_handler_address;
@@ -303,12 +298,7 @@ initarm(struct arm_boot_params *abp)
*/
cpu_control(CPU_CONTROL_MMU_ENABLE, CPU_CONTROL_MMU_ENABLE);
- set_stackptr(PSR_IRQ32_MODE,
- irqstack.pv_va + IRQ_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_ABT32_MODE,
- abtstack.pv_va + ABT_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_UND32_MODE,
- undstack.pv_va + UND_STACK_SIZE * PAGE_SIZE);
+ set_stackptrs(0);
/*
* We must now clean the cache again....
diff --git a/sys/arm/include/machdep.h b/sys/arm/include/machdep.h
index 7c5f56f6acc0..af6b1fcd1428 100644
--- a/sys/arm/include/machdep.h
+++ b/sys/arm/include/machdep.h
@@ -4,12 +4,23 @@
#ifndef _MACHDEP_BOOT_MACHDEP_H_
#define _MACHDEP_BOOT_MACHDEP_H_
+/* Structs that need to be initialised by initarm */
+extern struct pv_addr irqstack;
+extern struct pv_addr undstack;
+extern struct pv_addr abtstack;
+
+/* Define various stack sizes in pages */
+#define IRQ_STACK_SIZE 1
+#define ABT_STACK_SIZE 1
+#define UND_STACK_SIZE 1
+
/* misc prototypes used by the many arm machdeps */
void arm_lock_cache_line(vm_offset_t);
void init_proc0(vm_offset_t kstack);
void halt(void);
void data_abort_handler(trapframe_t *);
void prefetch_abort_handler(trapframe_t *);
+void set_stackptrs(int cpu);
void undefinedinstruction_bounce(trapframe_t *);
/* Early boot related helper functions */
diff --git a/sys/arm/lpc/lpc_machdep.c b/sys/arm/lpc/lpc_machdep.c
index 99f4700eb1d2..869baf8ae348 100644
--- a/sys/arm/lpc/lpc_machdep.c
+++ b/sys/arm/lpc/lpc_machdep.c
@@ -109,11 +109,6 @@ __FBSDID("$FreeBSD$");
*/
#define KERNEL_PT_MAX 78
-/* Define various stack sizes in pages */
-#define IRQ_STACK_SIZE 1
-#define ABT_STACK_SIZE 1
-#define UND_STACK_SIZE 1
-
extern unsigned char kernbase[];
extern unsigned char _etext[];
extern unsigned char _edata[];
@@ -504,12 +499,8 @@ initarm(struct arm_boot_params *abp)
* of the stack memory.
*/
cpu_control(CPU_CONTROL_MMU_ENABLE, CPU_CONTROL_MMU_ENABLE);
- set_stackptr(PSR_IRQ32_MODE,
- irqstack.pv_va + IRQ_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_ABT32_MODE,
- abtstack.pv_va + ABT_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_UND32_MODE,
- undstack.pv_va + UND_STACK_SIZE * PAGE_SIZE);
+
+ set_stackptrs(0);
/*
* We must now clean the cache again....
diff --git a/sys/arm/mv/mv_machdep.c b/sys/arm/mv/mv_machdep.c
index 07ca23d7f73b..737868aeaa50 100644
--- a/sys/arm/mv/mv_machdep.c
+++ b/sys/arm/mv/mv_machdep.c
@@ -104,11 +104,6 @@ __FBSDID("$FreeBSD$");
*/
#define KERNEL_PT_MAX 78
-/* Define various stack sizes in pages */
-#define IRQ_STACK_SIZE 1
-#define ABT_STACK_SIZE 1
-#define UND_STACK_SIZE 1
-
extern unsigned char kernbase[];
extern unsigned char _etext[];
extern unsigned char _edata[];
@@ -137,8 +132,6 @@ struct pv_addr undstack;
struct pv_addr abtstack;
struct pv_addr kernelstack;
-void set_stackptrs(int cpu);
-
static struct mem_region availmem_regions[FDT_MEM_REGIONS];
static int availmem_regions_sz;
@@ -565,18 +558,6 @@ initarm(struct arm_boot_params *abp)
sizeof(struct pcb)));
}
-void
-set_stackptrs(int cpu)
-{
-
- set_stackptr(PSR_IRQ32_MODE,
- irqstack.pv_va + ((IRQ_STACK_SIZE * PAGE_SIZE) * (cpu + 1)));
- set_stackptr(PSR_ABT32_MODE,
- abtstack.pv_va + ((ABT_STACK_SIZE * PAGE_SIZE) * (cpu + 1)));
- set_stackptr(PSR_UND32_MODE,
- undstack.pv_va + ((UND_STACK_SIZE * PAGE_SIZE) * (cpu + 1)));
-}
-
#define MPP_PIN_MAX 68
#define MPP_PIN_CELLS 2
#define MPP_PINS_PER_REG 8
diff --git a/sys/arm/s3c2xx0/s3c24x0_machdep.c b/sys/arm/s3c2xx0/s3c24x0_machdep.c
index f531bd0dc614..8d2538b809bd 100644
--- a/sys/arm/s3c2xx0/s3c24x0_machdep.c
+++ b/sys/arm/s3c2xx0/s3c24x0_machdep.c
@@ -105,11 +105,6 @@ __FBSDID("$FreeBSD$");
/* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
#define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
-/* Define various stack sizes in pages */
-#define IRQ_STACK_SIZE 1
-#define ABT_STACK_SIZE 1
-#define UND_STACK_SIZE 1
-
extern int s3c2410_pclk;
extern u_int data_abort_handler_address;
@@ -349,12 +344,7 @@ initarm(struct arm_boot_params *abp)
*/
cpu_control(CPU_CONTROL_MMU_ENABLE, CPU_CONTROL_MMU_ENABLE);
- set_stackptr(PSR_IRQ32_MODE,
- irqstack.pv_va + IRQ_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_ABT32_MODE,
- abtstack.pv_va + ABT_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_UND32_MODE,
- undstack.pv_va + UND_STACK_SIZE * PAGE_SIZE);
+ set_stackptrs(0);
/*
* We must now clean the cache again....
diff --git a/sys/arm/sa11x0/assabet_machdep.c b/sys/arm/sa11x0/assabet_machdep.c
index 96f988874e1c..9fd1633abfc0 100644
--- a/sys/arm/sa11x0/assabet_machdep.c
+++ b/sys/arm/sa11x0/assabet_machdep.c
@@ -105,11 +105,6 @@ __FBSDID("$FreeBSD$");
#define KERNEL_PT_VMDATA_NUM 7 /* start with 16MB of KVM */
#define NUM_KERNEL_PTS (KERNEL_PT_VMDATA + KERNEL_PT_VMDATA_NUM)
-/* Define various stack sizes in pages */
-#define IRQ_STACK_SIZE 1
-#define ABT_STACK_SIZE 1
-#define UND_STACK_SIZE 1
-
#define KERNEL_VM_BASE (KERNBASE + 0x00100000)
#define KERNEL_VM_SIZE 0x05000000
@@ -352,12 +347,7 @@ initarm(struct arm_boot_params *abp)
* Since the ARM stacks use STMFD etc. we must set r13 to the top end
* of the stack memory.
*/
- set_stackptr(PSR_IRQ32_MODE,
- irqstack.pv_va + IRQ_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_ABT32_MODE,
- abtstack.pv_va + ABT_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_UND32_MODE,
- undstack.pv_va + UND_STACK_SIZE * PAGE_SIZE);
+ set_stackptrs(0);
/*
* We must now clean the cache again....
diff --git a/sys/arm/tegra/tegra2_machdep.c b/sys/arm/tegra/tegra2_machdep.c
index f3a53df85a16..07616f014b40 100644
--- a/sys/arm/tegra/tegra2_machdep.c
+++ b/sys/arm/tegra/tegra2_machdep.c
@@ -92,10 +92,6 @@ __FBSDID("$FreeBSD$");
#define KERNEL_PT_MAX 78
-#define IRQ_STACK_SIZE 1
-#define ABT_STACK_SIZE 1
-#define UND_STACK_SIZE 1
-#define FIQ_STACK_SIZE 1
#define debugf(fmt, args...) printf(fmt, ##args)
@@ -140,13 +136,11 @@ vm_paddr_t pmap_pa;
const struct pmap_devmap *pmap_devmap_bootstrap_table;
struct pv_addr systempage;
struct pv_addr msgbufpv;
-static struct pv_addr irqstack;
-static struct pv_addr undstack;
-static struct pv_addr abtstack;
+struct pv_addr irqstack;
+struct pv_addr undstack;
+struct pv_addr abtstack;
static struct pv_addr kernelstack;
-static void set_stackptrs(int cpu);
-
static int platform_devmap_init(void);
static char *
@@ -580,19 +574,6 @@ initarm(struct arm_boot_params *abp)
sizeof(struct pcb)));
}
-static void
-set_stackptrs(int cpu)
-{
-
- set_stackptr(PSR_IRQ32_MODE,
- irqstack.pv_va + ((IRQ_STACK_SIZE * PAGE_SIZE) * (cpu + 1)));
- set_stackptr(PSR_ABT32_MODE,
- abtstack.pv_va + ((ABT_STACK_SIZE * PAGE_SIZE) * (cpu + 1)));
- set_stackptr(PSR_UND32_MODE,
- undstack.pv_va + ((UND_STACK_SIZE * PAGE_SIZE) * (cpu + 1)));
-}
-
-
#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) /* FIXME */
static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
{ 0, 0, 0, 0, 0, }
diff --git a/sys/arm/ti/ti_machdep.c b/sys/arm/ti/ti_machdep.c
index f299a0ac62f9..a11342a29b25 100644
--- a/sys/arm/ti/ti_machdep.c
+++ b/sys/arm/ti/ti_machdep.c
@@ -107,11 +107,6 @@ __FBSDID("$FreeBSD$");
*/
#define KERNEL_PT_MAX 78
-/* Define various stack sizes in pages */
-#define IRQ_STACK_SIZE 1
-#define ABT_STACK_SIZE 1
-#define UND_STACK_SIZE 1
-
extern unsigned char kernbase[];
extern unsigned char _etext[];
extern unsigned char _edata[];
@@ -146,8 +141,6 @@ struct pv_addr undstack;
struct pv_addr abtstack;
struct pv_addr kernelstack;
-void set_stackptrs(int cpu);
-
static struct mem_region availmem_regions[FDT_MEM_REGIONS];
static int availmem_regions_sz;
@@ -541,18 +534,6 @@ initarm(struct arm_boot_params *abp)
sizeof(struct pcb)));
}
-void
-set_stackptrs(int cpu)
-{
-
- set_stackptr(PSR_IRQ32_MODE,
- irqstack.pv_va + ((IRQ_STACK_SIZE * PAGE_SIZE) * (cpu + 1)));
- set_stackptr(PSR_ABT32_MODE,
- abtstack.pv_va + ((ABT_STACK_SIZE * PAGE_SIZE) * (cpu + 1)));
- set_stackptr(PSR_UND32_MODE,
- undstack.pv_va + ((UND_STACK_SIZE * PAGE_SIZE) * (cpu + 1)));
-}
-
#define FDT_DEVMAP_MAX (2) // FIXME
static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
{ 0, 0, 0, 0, 0, }
diff --git a/sys/arm/xscale/i80321/ep80219_machdep.c b/sys/arm/xscale/i80321/ep80219_machdep.c
index ce1a949b595b..134647bc28e4 100644
--- a/sys/arm/xscale/i80321/ep80219_machdep.c
+++ b/sys/arm/xscale/i80321/ep80219_machdep.c
@@ -104,11 +104,6 @@ __FBSDID("$FreeBSD$");
/* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
#define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
-/* Define various stack sizes in pages */
-#define IRQ_STACK_SIZE 1
-#define ABT_STACK_SIZE 1
-#define UND_STACK_SIZE 1
-
extern u_int data_abort_handler_address;
extern u_int prefetch_abort_handler_address;
extern u_int undefined_handler_address;
@@ -329,16 +324,7 @@ initarm(struct arm_boot_params *abp)
* Since the ARM stacks use STMFD etc. we must set r13 to the top end
* of the stack memory.
*/
-
-
- set_stackptr(PSR_IRQ32_MODE,
- irqstack.pv_va + IRQ_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_ABT32_MODE,
- abtstack.pv_va + ABT_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_UND32_MODE,
- undstack.pv_va + UND_STACK_SIZE * PAGE_SIZE);
-
-
+ set_stackptrs(0);
/*
* We must now clean the cache again....
diff --git a/sys/arm/xscale/i80321/iq31244_machdep.c b/sys/arm/xscale/i80321/iq31244_machdep.c
index bd7965512c9c..ede17c82e264 100644
--- a/sys/arm/xscale/i80321/iq31244_machdep.c
+++ b/sys/arm/xscale/i80321/iq31244_machdep.c
@@ -104,11 +104,6 @@ __FBSDID("$FreeBSD$");
/* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
#define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
-/* Define various stack sizes in pages */
-#define IRQ_STACK_SIZE 1
-#define ABT_STACK_SIZE 1
-#define UND_STACK_SIZE 1
-
extern u_int data_abort_handler_address;
extern u_int prefetch_abort_handler_address;
extern u_int undefined_handler_address;
@@ -328,16 +323,7 @@ initarm(struct arm_boot_params *abp)
* Since the ARM stacks use STMFD etc. we must set r13 to the top end
* of the stack memory.
*/
-
-
- set_stackptr(PSR_IRQ32_MODE,
- irqstack.pv_va + IRQ_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_ABT32_MODE,
- abtstack.pv_va + ABT_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_UND32_MODE,
- undstack.pv_va + UND_STACK_SIZE * PAGE_SIZE);
-
-
+ set_stackptrs(0);
/*
* We must now clean the cache again....
diff --git a/sys/arm/xscale/i8134x/crb_machdep.c b/sys/arm/xscale/i8134x/crb_machdep.c
index 831ed5d34d9d..e0f21db0d8c2 100644
--- a/sys/arm/xscale/i8134x/crb_machdep.c
+++ b/sys/arm/xscale/i8134x/crb_machdep.c
@@ -107,11 +107,6 @@ __FBSDID("$FreeBSD$");
/* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
#define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
-/* Define various stack sizes in pages */
-#define IRQ_STACK_SIZE 1
-#define ABT_STACK_SIZE 1
-#define UND_STACK_SIZE 1
-
extern u_int data_abort_handler_address;
extern u_int prefetch_abort_handler_address;
extern u_int undefined_handler_address;
@@ -314,15 +309,7 @@ initarm(struct arm_boot_params *abp)
* of the stack memory.
*/
-
- set_stackptr(PSR_IRQ32_MODE,
- irqstack.pv_va + IRQ_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_ABT32_MODE,
- abtstack.pv_va + ABT_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_UND32_MODE,
- undstack.pv_va + UND_STACK_SIZE * PAGE_SIZE);
-
-
+ set_stackptrs(0);
/*
* We must now clean the cache again....
diff --git a/sys/arm/xscale/ixp425/avila_machdep.c b/sys/arm/xscale/ixp425/avila_machdep.c
index b99c3fa61757..dde3be7cb3dd 100644
--- a/sys/arm/xscale/ixp425/avila_machdep.c
+++ b/sys/arm/xscale/ixp425/avila_machdep.c
@@ -108,11 +108,6 @@ __FBSDID("$FreeBSD$");
/* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
#define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
-/* Define various stack sizes in pages */
-#define IRQ_STACK_SIZE 1
-#define ABT_STACK_SIZE 1
-#define UND_STACK_SIZE 1
-
extern u_int data_abort_handler_address;
extern u_int prefetch_abort_handler_address;
extern u_int undefined_handler_address;
@@ -399,9 +394,7 @@ initarm(struct arm_boot_params *abp)
* Since the ARM stacks use STMFD etc. we must set r13 to the top end
* of the stack memory.
*/
- set_stackptr(PSR_IRQ32_MODE, irqstack.pv_va + IRQ_STACK_SIZE*PAGE_SIZE);
- set_stackptr(PSR_ABT32_MODE, abtstack.pv_va + ABT_STACK_SIZE*PAGE_SIZE);
- set_stackptr(PSR_UND32_MODE, undstack.pv_va + UND_STACK_SIZE*PAGE_SIZE);
+ set_stackptrs(0);
/*
* We must now clean the cache again....
diff --git a/sys/arm/xscale/pxa/pxa_machdep.c b/sys/arm/xscale/pxa/pxa_machdep.c
index a0bba2f7e92e..71f778578680 100644
--- a/sys/arm/xscale/pxa/pxa_machdep.c
+++ b/sys/arm/xscale/pxa/pxa_machdep.c
@@ -104,11 +104,6 @@ __FBSDID("$FreeBSD$");
/* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
#define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
-/* Define various stack sizes in pages */
-#define IRQ_STACK_SIZE 1
-#define ABT_STACK_SIZE 1
-#define UND_STACK_SIZE 1
-
extern u_int data_abort_handler_address;
extern u_int prefetch_abort_handler_address;
extern u_int undefined_handler_address;
@@ -311,12 +306,7 @@ initarm(struct arm_boot_params *abp)
* Since the ARM stacks use STMFD etc. we must set r13 to the top end
* of the stack memory.
*/
- set_stackptr(PSR_IRQ32_MODE,
- irqstack.pv_va + IRQ_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_ABT32_MODE,
- abtstack.pv_va + ABT_STACK_SIZE * PAGE_SIZE);
- set_stackptr(PSR_UND32_MODE,
- undstack.pv_va + UND_STACK_SIZE * PAGE_SIZE);
+ set_stackptrs(0);
/*
* We must now clean the cache again....