2005-04-16 16:20:36 -06:00
|
|
|
/*
|
2008-08-02 03:55:55 -06:00
|
|
|
* arch/arm/include/asm/glue.h
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* Copyright (C) 1997-1999 Russell King
|
|
|
|
* Copyright (C) 2000-2002 Deep Blue Solutions Ltd.
|
|
|
|
*
|
|
|
|
* 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 provides the glue to stick the processor-specific bits
|
|
|
|
* into the kernel in an efficient manner. The idea is to use branches
|
|
|
|
* when we're only targetting one class of TLB, or indirect calls
|
|
|
|
* when we're targetting multiple classes of TLBs.
|
|
|
|
*/
|
|
|
|
#ifdef __KERNEL__
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __STDC__
|
|
|
|
#define ____glue(name,fn) name##fn
|
|
|
|
#else
|
|
|
|
#define ____glue(name,fn) name/**/fn
|
|
|
|
#endif
|
|
|
|
#define __glue(name,fn) ____glue(name,fn)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Data Abort Model
|
|
|
|
* ================
|
|
|
|
*
|
|
|
|
* We have the following to choose from:
|
|
|
|
* arm6 - ARM6 style
|
|
|
|
* arm7 - ARM7 style
|
|
|
|
* v4_early - ARMv4 without Thumb early abort handler
|
|
|
|
* v4t_late - ARMv4 with Thumb late abort handler
|
|
|
|
* v4t_early - ARMv4 with Thumb early abort handler
|
|
|
|
* v5tej_early - ARMv5 with Thumb and Java early abort handler
|
|
|
|
* xscale - ARMv5 with Thumb with Xscale extensions
|
|
|
|
* v6_early - ARMv6 generic early abort handler
|
2007-05-08 15:27:46 -06:00
|
|
|
* v7_early - ARMv7 generic early abort handler
|
2005-04-16 16:20:36 -06:00
|
|
|
*/
|
2008-04-18 15:43:07 -06:00
|
|
|
#undef CPU_DABORT_HANDLER
|
|
|
|
#undef MULTI_DABORT
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
#if defined(CONFIG_CPU_ARM610)
|
2008-04-18 15:43:07 -06:00
|
|
|
# ifdef CPU_DABORT_HANDLER
|
|
|
|
# define MULTI_DABORT 1
|
2005-04-16 16:20:36 -06:00
|
|
|
# else
|
2008-04-18 15:43:07 -06:00
|
|
|
# define CPU_DABORT_HANDLER cpu_arm6_data_abort
|
2005-04-16 16:20:36 -06:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(CONFIG_CPU_ARM710)
|
2008-04-18 15:43:07 -06:00
|
|
|
# ifdef CPU_DABORT_HANDLER
|
|
|
|
# define MULTI_DABORT 1
|
2005-04-16 16:20:36 -06:00
|
|
|
# else
|
2008-04-18 15:43:07 -06:00
|
|
|
# define CPU_DABORT_HANDLER cpu_arm7_data_abort
|
2005-04-16 16:20:36 -06:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_CPU_ABRT_LV4T
|
2008-04-18 15:43:07 -06:00
|
|
|
# ifdef CPU_DABORT_HANDLER
|
|
|
|
# define MULTI_DABORT 1
|
2005-04-16 16:20:36 -06:00
|
|
|
# else
|
2008-04-18 15:43:07 -06:00
|
|
|
# define CPU_DABORT_HANDLER v4t_late_abort
|
2005-04-16 16:20:36 -06:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_CPU_ABRT_EV4
|
2008-04-18 15:43:07 -06:00
|
|
|
# ifdef CPU_DABORT_HANDLER
|
|
|
|
# define MULTI_DABORT 1
|
2005-04-16 16:20:36 -06:00
|
|
|
# else
|
2008-04-18 15:43:07 -06:00
|
|
|
# define CPU_DABORT_HANDLER v4_early_abort
|
2005-04-16 16:20:36 -06:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_CPU_ABRT_EV4T
|
2008-04-18 15:43:07 -06:00
|
|
|
# ifdef CPU_DABORT_HANDLER
|
|
|
|
# define MULTI_DABORT 1
|
2005-04-16 16:20:36 -06:00
|
|
|
# else
|
2008-04-18 15:43:07 -06:00
|
|
|
# define CPU_DABORT_HANDLER v4t_early_abort
|
2005-04-16 16:20:36 -06:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_CPU_ABRT_EV5TJ
|
2008-04-18 15:43:07 -06:00
|
|
|
# ifdef CPU_DABORT_HANDLER
|
|
|
|
# define MULTI_DABORT 1
|
2005-04-16 16:20:36 -06:00
|
|
|
# else
|
2008-04-18 15:43:07 -06:00
|
|
|
# define CPU_DABORT_HANDLER v5tj_early_abort
|
2005-04-16 16:20:36 -06:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_CPU_ABRT_EV5T
|
2008-04-18 15:43:07 -06:00
|
|
|
# ifdef CPU_DABORT_HANDLER
|
|
|
|
# define MULTI_DABORT 1
|
2005-04-16 16:20:36 -06:00
|
|
|
# else
|
2008-04-18 15:43:07 -06:00
|
|
|
# define CPU_DABORT_HANDLER v5t_early_abort
|
2005-04-16 16:20:36 -06:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_CPU_ABRT_EV6
|
2008-04-18 15:43:07 -06:00
|
|
|
# ifdef CPU_DABORT_HANDLER
|
|
|
|
# define MULTI_DABORT 1
|
2005-04-16 16:20:36 -06:00
|
|
|
# else
|
2008-04-18 15:43:07 -06:00
|
|
|
# define CPU_DABORT_HANDLER v6_early_abort
|
2005-04-16 16:20:36 -06:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2007-05-08 15:27:46 -06:00
|
|
|
#ifdef CONFIG_CPU_ABRT_EV7
|
2008-04-18 15:43:07 -06:00
|
|
|
# ifdef CPU_DABORT_HANDLER
|
|
|
|
# define MULTI_DABORT 1
|
2007-05-08 15:27:46 -06:00
|
|
|
# else
|
2008-04-18 15:43:07 -06:00
|
|
|
# define CPU_DABORT_HANDLER v7_early_abort
|
2007-05-08 15:27:46 -06:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2008-04-18 15:43:07 -06:00
|
|
|
#ifndef CPU_DABORT_HANDLER
|
2005-04-16 16:20:36 -06:00
|
|
|
#error Unknown data abort handler type
|
|
|
|
#endif
|
|
|
|
|
2008-04-18 15:43:07 -06:00
|
|
|
/*
|
2009-09-25 06:39:47 -06:00
|
|
|
* Prefetch Abort Model
|
|
|
|
* ================
|
|
|
|
*
|
|
|
|
* We have the following to choose from:
|
|
|
|
* legacy - no IFSR, no IFAR
|
|
|
|
* v6 - ARMv6: IFSR, no IFAR
|
|
|
|
* v7 - ARMv7: IFSR and IFAR
|
2008-04-18 15:43:07 -06:00
|
|
|
*/
|
2009-09-25 06:39:47 -06:00
|
|
|
|
2008-04-18 15:43:07 -06:00
|
|
|
#undef CPU_PABORT_HANDLER
|
|
|
|
#undef MULTI_PABORT
|
|
|
|
|
2009-09-25 06:39:47 -06:00
|
|
|
#ifdef CONFIG_CPU_PABRT_LEGACY
|
|
|
|
# ifdef CPU_PABORT_HANDLER
|
|
|
|
# define MULTI_PABORT 1
|
|
|
|
# else
|
|
|
|
# define CPU_PABORT_HANDLER legacy_pabort
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_CPU_PABRT_V6
|
2008-04-18 15:43:07 -06:00
|
|
|
# ifdef CPU_PABORT_HANDLER
|
|
|
|
# define MULTI_PABORT 1
|
|
|
|
# else
|
2009-09-25 06:39:47 -06:00
|
|
|
# define CPU_PABORT_HANDLER v6_pabort
|
2008-04-18 15:43:07 -06:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2009-09-25 06:39:47 -06:00
|
|
|
#ifdef CONFIG_CPU_PABRT_V7
|
2008-04-18 15:43:07 -06:00
|
|
|
# ifdef CPU_PABORT_HANDLER
|
|
|
|
# define MULTI_PABORT 1
|
|
|
|
# else
|
2009-09-25 06:39:47 -06:00
|
|
|
# define CPU_PABORT_HANDLER v7_pabort
|
2008-04-18 15:43:07 -06:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CPU_PABORT_HANDLER
|
|
|
|
#error Unknown prefetch abort handler type
|
|
|
|
#endif
|
|
|
|
|
2005-04-16 16:20:36 -06:00
|
|
|
#endif
|