Date: Sun, 9 Mar 2014 18:08:27 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r262952 - in head/sys/arm: arm at91 econa s3c2xx0 sa11x0 xscale/i80321 xscale/i8134x xscale/ixp425 xscale/pxa Message-ID: <201403091808.s29I8RIa080617@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Sun Mar 9 18:08:27 2014 New Revision: 262952 URL: http://svnweb.freebsd.org/changeset/base/262952 Log: The arm exception entry points currently vector through a function pointer to the actual handler routine. All the pointers are static-intialized to the only handlers available, and yet various platform-specific inits still set those pointers (to the values they're already initialized to). Begin to drain the swamp by removing all the redundant external declarations and runtime setting of the pointers that's scattered around various places. Modified: head/sys/arm/arm/machdep.c head/sys/arm/arm/trap.c head/sys/arm/at91/at91_machdep.c head/sys/arm/econa/econa_machdep.c head/sys/arm/s3c2xx0/s3c24x0_machdep.c head/sys/arm/sa11x0/assabet_machdep.c head/sys/arm/xscale/i80321/ep80219_machdep.c head/sys/arm/xscale/i80321/iq31244_machdep.c head/sys/arm/xscale/i8134x/crb_machdep.c head/sys/arm/xscale/ixp425/avila_machdep.c head/sys/arm/xscale/pxa/pxa_machdep.c Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sun Mar 9 17:04:31 2014 (r262951) +++ head/sys/arm/arm/machdep.c Sun Mar 9 18:08:27 2014 (r262952) @@ -143,10 +143,6 @@ extern vm_offset_t ksym_start, ksym_end; static struct pv_addr kernel_pt_table[KERNEL_PT_MAX]; -extern u_int data_abort_handler_address; -extern u_int prefetch_abort_handler_address; -extern u_int undefined_handler_address; - vm_paddr_t pmap_pa; struct pv_addr systempage; @@ -1279,10 +1275,6 @@ initarm(struct arm_boot_params *abp) */ cpu_idcache_wbinv_all(); - /* Set stack for exception handlers */ - data_abort_handler_address = (u_int)data_abort_handler; - prefetch_abort_handler_address = (u_int)prefetch_abort_handler; - undefined_handler_address = (u_int)undefinedinstruction_bounce; undefined_init(); init_proc0(kernelstack.pv_va); Modified: head/sys/arm/arm/trap.c ============================================================================== --- head/sys/arm/arm/trap.c Sun Mar 9 17:04:31 2014 (r262951) +++ head/sys/arm/arm/trap.c Sun Mar 9 18:08:27 2014 (r262952) @@ -126,7 +126,6 @@ __FBSDID("$FreeBSD$"); void swi_handler(struct trapframe *); -void undefinedinstruction(struct trapframe *); #include <machine/disassem.h> #include <machine/machdep.h> Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Sun Mar 9 17:04:31 2014 (r262951) +++ head/sys/arm/at91/at91_machdep.c Sun Mar 9 18:08:27 2014 (r262952) @@ -111,10 +111,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) -extern u_int data_abort_handler_address; -extern u_int prefetch_abort_handler_address; -extern u_int undefined_handler_address; - struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; /* Static device mappings. */ @@ -621,11 +617,6 @@ initarm(struct arm_boot_params *abp) */ cpu_idcache_wbinv_all(); - /* Set stack for exception handlers */ - - data_abort_handler_address = (u_int)data_abort_handler; - prefetch_abort_handler_address = (u_int)prefetch_abort_handler; - undefined_handler_address = (u_int)undefinedinstruction_bounce; undefined_init(); init_proc0(kernelstack.pv_va); Modified: head/sys/arm/econa/econa_machdep.c ============================================================================== --- head/sys/arm/econa/econa_machdep.c Sun Mar 9 17:04:31 2014 (r262951) +++ head/sys/arm/econa/econa_machdep.c Sun Mar 9 18:08:27 2014 (r262952) @@ -91,10 +91,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) -extern u_int data_abort_handler_address; -extern u_int prefetch_abort_handler_address; -extern u_int undefined_handler_address; - struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; /* Physical and virtual addresses for some global pages */ @@ -309,10 +305,6 @@ initarm(struct arm_boot_params *abp) cpu_idcache_wbinv_all(); cpu_setup(""); - /* Set stack for exception handlers */ - data_abort_handler_address = (u_int)data_abort_handler; - prefetch_abort_handler_address = (u_int)prefetch_abort_handler; - undefined_handler_address = (u_int)undefinedinstruction_bounce; undefined_init(); init_proc0(kernelstack.pv_va); Modified: head/sys/arm/s3c2xx0/s3c24x0_machdep.c ============================================================================== --- head/sys/arm/s3c2xx0/s3c24x0_machdep.c Sun Mar 9 17:04:31 2014 (r262951) +++ head/sys/arm/s3c2xx0/s3c24x0_machdep.c Sun Mar 9 18:08:27 2014 (r262952) @@ -106,10 +106,6 @@ __FBSDID("$FreeBSD$"); extern int s3c2410_pclk; -extern u_int data_abort_handler_address; -extern u_int prefetch_abort_handler_address; -extern u_int undefined_handler_address; - struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; /* Physical and virtual addresses for some global pages */ @@ -372,10 +368,6 @@ initarm(struct arm_boot_params *abp) } cninit(); - /* Set stack for exception handlers */ - data_abort_handler_address = (u_int)data_abort_handler; - prefetch_abort_handler_address = (u_int)prefetch_abort_handler; - undefined_handler_address = (u_int)undefinedinstruction_bounce; undefined_init(); init_proc0(kernelstack.pv_va); Modified: head/sys/arm/sa11x0/assabet_machdep.c ============================================================================== --- head/sys/arm/sa11x0/assabet_machdep.c Sun Mar 9 17:04:31 2014 (r262951) +++ head/sys/arm/sa11x0/assabet_machdep.c Sun Mar 9 18:08:27 2014 (r262952) @@ -109,10 +109,6 @@ __FBSDID("$FreeBSD$"); #define KERNEL_VM_BASE (KERNBASE + 0x00100000) #define KERNEL_VM_SIZE 0x05000000 -extern u_int data_abort_handler_address; -extern u_int prefetch_abort_handler_address; -extern u_int undefined_handler_address; - struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; extern vm_offset_t sa1110_uart_vaddr; @@ -329,9 +325,6 @@ initarm(struct arm_boot_params *abp) pmap_map_chunk(l1pagetable, sa1_cache_clean_addr, 0xf0000000, CPU_SA110_CACHE_CLEAN_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); - data_abort_handler_address = (u_int)data_abort_handler; - prefetch_abort_handler_address = (u_int)prefetch_abort_handler; - undefined_handler_address = (u_int)undefinedinstruction_bounce; undefined_init(); cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT); setttb(kernel_l1pt.pv_pa); Modified: head/sys/arm/xscale/i80321/ep80219_machdep.c ============================================================================== --- head/sys/arm/xscale/i80321/ep80219_machdep.c Sun Mar 9 17:04:31 2014 (r262951) +++ head/sys/arm/xscale/i80321/ep80219_machdep.c Sun Mar 9 18:08:27 2014 (r262952) @@ -103,10 +103,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) -extern u_int data_abort_handler_address; -extern u_int prefetch_abort_handler_address; -extern u_int undefined_handler_address; - struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; /* Physical and virtual addresses for some global pages */ @@ -321,11 +317,6 @@ initarm(struct arm_boot_params *abp) physmem = memsize / PAGE_SIZE; cninit(); - /* Set stack for exception handlers */ - - data_abort_handler_address = (u_int)data_abort_handler; - prefetch_abort_handler_address = (u_int)prefetch_abort_handler; - undefined_handler_address = (u_int)undefinedinstruction_bounce; undefined_init(); init_proc0(kernelstack.pv_va); Modified: head/sys/arm/xscale/i80321/iq31244_machdep.c ============================================================================== --- head/sys/arm/xscale/i80321/iq31244_machdep.c Sun Mar 9 17:04:31 2014 (r262951) +++ head/sys/arm/xscale/i80321/iq31244_machdep.c Sun Mar 9 18:08:27 2014 (r262952) @@ -103,10 +103,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) -extern u_int data_abort_handler_address; -extern u_int prefetch_abort_handler_address; -extern u_int undefined_handler_address; - struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; /* Physical and virtual addresses for some global pages */ @@ -322,11 +318,6 @@ initarm(struct arm_boot_params *abp) physmem = memsize / PAGE_SIZE; cninit(); - /* Set stack for exception handlers */ - - data_abort_handler_address = (u_int)data_abort_handler; - prefetch_abort_handler_address = (u_int)prefetch_abort_handler; - undefined_handler_address = (u_int)undefinedinstruction_bounce; undefined_init(); init_proc0(kernelstack.pv_va); Modified: head/sys/arm/xscale/i8134x/crb_machdep.c ============================================================================== --- head/sys/arm/xscale/i8134x/crb_machdep.c Sun Mar 9 17:04:31 2014 (r262951) +++ head/sys/arm/xscale/i8134x/crb_machdep.c Sun Mar 9 18:08:27 2014 (r262952) @@ -106,10 +106,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) -extern u_int data_abort_handler_address; -extern u_int prefetch_abort_handler_address; -extern u_int undefined_handler_address; - struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; /* Physical and virtual addresses for some global pages */ @@ -302,9 +298,6 @@ initarm(struct arm_boot_params *abp) cninit(); /* Set stack for exception handlers */ - data_abort_handler_address = (u_int)data_abort_handler; - prefetch_abort_handler_address = (u_int)prefetch_abort_handler; - undefined_handler_address = (u_int)undefinedinstruction_bounce; undefined_init(); init_proc0(kernelstack.pv_va); Modified: head/sys/arm/xscale/ixp425/avila_machdep.c ============================================================================== --- head/sys/arm/xscale/ixp425/avila_machdep.c Sun Mar 9 17:04:31 2014 (r262951) +++ head/sys/arm/xscale/ixp425/avila_machdep.c Sun Mar 9 18:08:27 2014 (r262952) @@ -102,10 +102,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) -extern u_int data_abort_handler_address; -extern u_int prefetch_abort_handler_address; -extern u_int undefined_handler_address; - struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; /* Physical and virtual addresses for some global pages */ @@ -393,11 +389,6 @@ initarm(struct arm_boot_params *abp) else memsize = ixp425_sdram_size(); - /* Set stack for exception handlers */ - - data_abort_handler_address = (u_int)data_abort_handler; - prefetch_abort_handler_address = (u_int)prefetch_abort_handler; - undefined_handler_address = (u_int)undefinedinstruction_bounce; undefined_init(); init_proc0(kernelstack.pv_va); Modified: head/sys/arm/xscale/pxa/pxa_machdep.c ============================================================================== --- head/sys/arm/xscale/pxa/pxa_machdep.c Sun Mar 9 17:04:31 2014 (r262951) +++ head/sys/arm/xscale/pxa/pxa_machdep.c Sun Mar 9 18:08:27 2014 (r262952) @@ -103,10 +103,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) -extern u_int data_abort_handler_address; -extern u_int prefetch_abort_handler_address; -extern u_int undefined_handler_address; - struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; /* Physical and virtual addresses for some global pages */ @@ -311,10 +307,6 @@ initarm(struct arm_boot_params *abp) /* Fire up consoles. */ cninit(); - /* Set stack for exception handlers */ - data_abort_handler_address = (u_int)data_abort_handler; - prefetch_abort_handler_address = (u_int)prefetch_abort_handler; - undefined_handler_address = (u_int)undefinedinstruction_bounce; undefined_init(); init_proc0(kernelstack.pv_va);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403091808.s29I8RIa080617>