base/arch/arm/hal/hal.c File Reference

Include dependency graph for hal.c:

Go to the source code of this file.

Defines

#define __RTAI_HAL__
#define rtai_irq_desc(irq)   (&hal_std_irq_dtype[irq])
#define BEGIN_PIC()
#define END_PIC()
#define CHECK_KERCTX()
#define RTAI_SCHED_ISR_LOCK()
#define RTAI_SCHED_ISR_UNLOCK()
#define HAL_TICK_REGS   hal_tick_regs[cpuid]
#define HAL_LOCK_LINUX()   do { sflags = rt_save_switch_to_real_time(cpuid); } while (0)
#define HAL_UNLOCK_LINUX()   do { rtai_cli(); rt_restore_switch_to_linux(sflags, cpuid); } while (0)
#define RT_PRINTK_SRQ   1

Functions

 MODULE_LICENSE ("GPL")
 RTAI_MODULE_PARM (rtai_cpufreq_arg, ulong)
 RTAI_MODULE_PARM (IsolCpusMask, ulong)
unsigned long rtai_critical_enter (void(*synch)(void))
void rtai_critical_exit (unsigned long flags)
int rt_request_irq (unsigned irq, int(*handler)(unsigned irq, void *cookie), void *cookie, int retmode)
int rt_release_irq (unsigned irq)
int rt_set_irq_ack (unsigned irq, int(*irq_ack)(unsigned int))
void rt_set_irq_cookie (unsigned irq, void *cookie)
void rt_request_apic_timers (void(*handler)(void), struct apic_timer_setup_data *tmdata)
void rt_free_apic_timers (void)
int rt_assign_irq_to_cpu (int irq, unsigned long cpus_mask)
int rt_reset_irq_to_sym_mode (int irq)
void rt_request_rtc (long rtc_freq, void *handler)
void rt_release_rtc (void)
unsigned rt_startup_irq (unsigned irq)
void rt_shutdown_irq (unsigned irq)
void rt_enable_irq (unsigned irq)
void rt_disable_irq (unsigned irq)
void rt_mask_and_ack_irq (unsigned irq)
static void _rt_end_irq (unsigned irq)
void rt_unmask_irq (unsigned irq)
void rt_ack_irq (unsigned irq)
void rt_end_irq (unsigned irq)
int rt_request_linux_irq (unsigned irq, void *handler, char *name, void *dev_id)
 Install shared Linux interrupt handler.
int rt_free_linux_irq (unsigned irq, void *dev_id)
 Uninstall shared Linux interrupt handler.
void rt_pend_linux_irq (unsigned irq)
 Pend an IRQ to Linux.
RTAI_SYSCALL_MODE void usr_rt_pend_linux_irq (unsigned irq)
int rt_request_srq (unsigned label, void(*k_handler)(void), long long(*u_handler)(unsigned long))
 Install a system request handler.
int rt_free_srq (unsigned srq)
 Uninstall a system request handler.
void rt_pend_linux_srq (unsigned srq)
 Append a Linux IRQ.
int rtai_timer_handler (struct pt_regs *regs)
static void rtai_hirq_dispatcher (int irq, struct pt_regs *regs)
RT_TRAP_HANDLER rt_set_trap_handler (RT_TRAP_HANDLER handler)
static int rtai_trap_fault (unsigned event, void *evdata)
static void rtai_lsrq_dispatcher (unsigned virq)
static long long rtai_usrq_dispatcher (unsigned long srq, unsigned long label)
static int intercept_syscall_prologue (unsigned long event, struct pt_regs *regs)
int rtai_syscall_dispatcher (struct pt_regs *regs)
static void rtai_domain_entry (int iflag)
long rtai_catch_event (struct hal_domain_struct *from, unsigned long event, int(*handler)(unsigned long, void *))
static void * hal_set_irq_handler (void *hirq_dispatcher)
void(*)(int) rt_set_ihook (void(*hookfn)(int))
void rtai_set_linux_task_priority (struct task_struct *task, int policy, int prio)
static void rtai_install_archdep (void)
static void rtai_uninstall_archdep (void)
int __rtai_hal_init (void)
void __rtai_hal_exit (void)
 module_init (__rtai_hal_init)
 module_exit (__rtai_hal_exit)
asmlinkage int rt_printk (const char *fmt,...)
asmlinkage int rt_sync_printk (const char *fmt,...)
 EXPORT_SYMBOL (rtai_realtime_irq)
 EXPORT_SYMBOL (rt_request_irq)
 EXPORT_SYMBOL (rt_release_irq)
 EXPORT_SYMBOL (rt_set_irq_cookie)
 EXPORT_SYMBOL (rt_startup_irq)
 EXPORT_SYMBOL (rt_shutdown_irq)
 EXPORT_SYMBOL (rt_enable_irq)
 EXPORT_SYMBOL (rt_disable_irq)
 EXPORT_SYMBOL (rt_mask_and_ack_irq)
 EXPORT_SYMBOL (rt_unmask_irq)
 EXPORT_SYMBOL (rt_ack_irq)
 EXPORT_SYMBOL (rt_request_linux_irq)
 EXPORT_SYMBOL (rt_free_linux_irq)
 EXPORT_SYMBOL (rt_pend_linux_irq)
 EXPORT_SYMBOL (usr_rt_pend_linux_irq)
 EXPORT_SYMBOL (rt_set_irq_ack)
 EXPORT_SYMBOL (rt_request_srq)
 EXPORT_SYMBOL (rt_free_srq)
 EXPORT_SYMBOL (rt_pend_linux_srq)
 EXPORT_SYMBOL (rt_assign_irq_to_cpu)
 EXPORT_SYMBOL (rt_reset_irq_to_sym_mode)
 EXPORT_SYMBOL (rt_request_timer)
 EXPORT_SYMBOL (rt_free_timer)
 EXPORT_SYMBOL (rt_request_rtc)
 EXPORT_SYMBOL (rt_release_rtc)
int rtai_calibrate_TC (void)
 EXPORT_SYMBOL (rtai_calibrate_TC)
 EXPORT_SYMBOL (rt_set_trap_handler)
 EXPORT_SYMBOL (rt_set_ihook)
 EXPORT_SYMBOL (rtai_critical_enter)
 EXPORT_SYMBOL (rtai_critical_exit)
 EXPORT_SYMBOL (rtai_set_linux_task_priority)
 EXPORT_SYMBOL (rtai_linux_context)
 EXPORT_SYMBOL (rtai_domain)
 EXPORT_SYMBOL (rtai_proc_root)
 EXPORT_SYMBOL (rtai_tunables)
 EXPORT_SYMBOL (rtai_cpu_lock)
 EXPORT_SYMBOL (rtai_cpu_realtime)
 EXPORT_SYMBOL (rt_times)
 EXPORT_SYMBOL (rt_smp_times)
 EXPORT_SYMBOL (rt_printk)
 EXPORT_SYMBOL (rt_sync_printk)
 EXPORT_SYMBOL (rtai_catch_event)
 EXPORT_SYMBOL (rtai_lxrt_dispatcher)
 EXPORT_SYMBOL (rt_scheduling)
 EXPORT_SYMBOL (hal_pended)
 EXPORT_SYMBOL (ipipe_root_status)

Variables

static unsigned long rtai_cpufreq_arg = RTAI_CALIBRATED_CPU_FREQ
static unsigned long IsolCpusMask = 0
hw_interrupt_type hal_std_irq_dtype []
rtai_realtime_irq_s rtai_realtime_irq [RTAI_NR_IRQS]
hal_domain_struct rtai_domain
rt_times rt_times
rt_times rt_smp_times [RTAI_NR_CPUS] = { { 0 } }
rtai_switch_data rtai_linux_context [RTAI_NR_CPUS]
volatile unsigned long * ipipe_root_status [RTAI_NR_CPUS]
calibration_data rtai_tunables
volatile unsigned long rtai_cpu_realtime
volatile unsigned long rtai_cpu_lock
long long(*) rtai_lxrt_invoke_entry (unsigned long, void *)
struct {
   volatile int   locked
   volatile int   rqsted
rt_scheduling [RTAI_NR_CPUS]
static void(*) rtai_isr_hook (int cpuid)
struct {
   unsigned long   flags
   int   count
rtai_linux_irq [NR_IRQS]
struct {
   void(*   k_handler )(void)
   long long(*   u_handler )(unsigned long)
   unsigned long   label
rtai_sysreq_table [RTAI_NR_SRQS]
static unsigned rtai_sysreq_virq
static unsigned long rtai_sysreq_map = 3
static unsigned long rtai_sysreq_pending
static unsigned long rtai_sysreq_running
static spinlock_t rtai_lsrq_lock = SPIN_LOCK_UNLOCKED
static volatile int rtai_sync_level
static atomic_t rtai_sync_count = ATOMIC_INIT(1)
static RT_TRAP_HANDLER rtai_trap_handler
volatile unsigned long hal_pended
static void(*) rtai_isr_hook (int cpuid)
long long(*) rtai_lxrt_dispatcher (unsigned long, unsigned long, void *)
static int(*) sched_intercept_syscall_prologue (struct pt_regs *)
static void * saved_hal_irq_handler
void * hal_irq_handler
static void * saved_hal_irq_handler
void * hal_irq_handler


Define Documentation

#define __RTAI_HAL__

Definition at line 64 of file hal.c.

 
#define BEGIN_PIC (  ) 

Value:

do { \
        unsigned long flags, pflags, cpuid; \
    rtai_save_flags_and_cli(flags); \
    cpuid = rtai_cpuid(); \
    pflags = xchg(ipipe_root_status[cpuid], 1 << IPIPE_STALL_FLAG); \
    rtai_save_and_lock_preempt_count()

Definition at line 105 of file hal.c.

Referenced by _rt_enable_irq(), _rt_end_irq(), rt_ack_irq(), rt_disable_irq(), rt_enable_irq(), rt_eoi_irq(), rt_mask_and_ack_irq(), rt_shutdown_irq(), rt_startup_irq(), and rt_unmask_irq().

 
#define CHECK_KERCTX (  ) 

Definition at line 142 of file hal.c.

Referenced by rtai_hirq_dispatcher().

 
#define END_PIC (  ) 

Value:

rtai_restore_preempt_count(); \
    *ipipe_root_status[cpuid] = pflags; \
    rtai_restore_flags(flags); \
} while (0)

Definition at line 113 of file hal.c.

Referenced by _rt_enable_irq(), _rt_end_irq(), rt_ack_irq(), rt_disable_irq(), rt_enable_irq(), rt_eoi_irq(), rt_mask_and_ack_irq(), rt_shutdown_irq(), rt_startup_irq(), and rt_unmask_irq().

 
#define HAL_LOCK_LINUX (  )     do { sflags = rt_save_switch_to_real_time(cpuid); } while (0)

Definition at line 582 of file hal.c.

Referenced by rtai_decr_timer_handler(), rtai_hirq_dispatcher(), and rtai_timer_handler().

#define HAL_TICK_REGS   hal_tick_regs[cpuid]

Definition at line 576 of file hal.c.

Referenced by rtai_hirq_dispatcher().

 
#define HAL_UNLOCK_LINUX (  )     do { rtai_cli(); rt_restore_switch_to_linux(sflags, cpuid); } while (0)

Definition at line 583 of file hal.c.

Referenced by rtai_decr_timer_handler(), rtai_hirq_dispatcher(), and rtai_timer_handler().

#define RT_PRINTK_SRQ   1

Definition at line 974 of file hal.c.

#define rtai_irq_desc ( irq   )     (&hal_std_irq_dtype[irq])

Definition at line 103 of file hal.c.

Referenced by _rt_enable_irq(), _rt_end_irq(), rt_ack_irq(), rt_disable_irq(), rt_enable_irq(), rt_eoi_irq(), rt_mask_and_ack_irq(), rt_shutdown_irq(), rt_startup_irq(), and rt_unmask_irq().

 
#define RTAI_SCHED_ISR_LOCK (  ) 

Value:

do { \
        if (!rt_scheduling[cpuid = rtai_cpuid()].locked++) { \
            rt_scheduling[cpuid].rqsted = 0; \
    } \
    } while (0)

Definition at line 554 of file hal.c.

Referenced by rtai_decr_timer_handler(), rtai_hirq_dispatcher(), and rtai_timer_handler().

 
#define RTAI_SCHED_ISR_UNLOCK (  ) 

Value:

do { \
    if (rt_scheduling[cpuid].locked && !(--rt_scheduling[cpuid].locked)) { \
        if (rt_scheduling[cpuid].rqsted > 0 && rtai_isr_hook) { \
                rtai_isr_hook(cpuid); \
        } \
    } \
    } while (0)

Definition at line 560 of file hal.c.

Referenced by rtai_decr_timer_handler(), rtai_hirq_dispatcher(), and rtai_timer_handler().


Function Documentation

void __rtai_hal_exit ( void   ) 

Definition at line 1056 of file hal.c.

References hal_catch_event, hal_free_irq, HAL_NR_FAULTS, hal_root_domain, hal_unregister_domain, hal_virtualize_irq, printk(), rtai_domain, rtai_sysreq_virq, and rtai_uninstall_archdep().

Here is the call graph for this function:

int __rtai_hal_init ( void   ) 

Definition at line 980 of file hal.c.

References hal_alloc_irq, hal_attr_struct, hal_catch_event, hal_domain_struct, hal_init_attr, HAL_NR_EVENTS, HAL_NR_FAULTS, hal_register_domain, hal_root_domain, HAL_TYPE, hal_virtualize_irq, ipipe_root_status, printk(), rtai_domain, rtai_domain_entry(), rtai_hirq_dispatcher(), rtai_install_archdep(), rtai_lsrq_dispatcher(), RTAI_NR_CPUS, RTAI_NR_IRQS, rtai_realtime_irq, rtai_sysreq_virq, and rtai_trap_fault().

Here is the call graph for this function:

static void _rt_end_irq ( unsigned  irq  )  [inline, static]

Definition at line 330 of file hal.c.

References BEGIN_PIC, END_PIC, hal_root_domain, hal_unlock_irq, and rtai_irq_desc.

Referenced by rt_end_irq(), and rt_unmask_irq().

EXPORT_SYMBOL ( ipipe_root_status   ) 

EXPORT_SYMBOL ( hal_pended   ) 

EXPORT_SYMBOL ( rt_scheduling   ) 

EXPORT_SYMBOL ( rtai_lxrt_dispatcher   ) 

EXPORT_SYMBOL ( rtai_catch_event   ) 

EXPORT_SYMBOL ( rt_sync_printk   ) 

EXPORT_SYMBOL ( rt_printk   ) 

EXPORT_SYMBOL ( rt_smp_times   ) 

EXPORT_SYMBOL ( rt_times   ) 

EXPORT_SYMBOL ( rtai_cpu_realtime   ) 

EXPORT_SYMBOL ( rtai_cpu_lock   ) 

EXPORT_SYMBOL ( rtai_tunables   ) 

EXPORT_SYMBOL ( rtai_proc_root   ) 

EXPORT_SYMBOL ( rtai_domain   ) 

EXPORT_SYMBOL ( rtai_linux_context   ) 

EXPORT_SYMBOL ( rtai_set_linux_task_priority   ) 

EXPORT_SYMBOL ( rtai_critical_exit   ) 

EXPORT_SYMBOL ( rtai_critical_enter   ) 

EXPORT_SYMBOL ( rt_set_ihook   ) 

EXPORT_SYMBOL ( rt_set_trap_handler   ) 

EXPORT_SYMBOL ( rtai_calibrate_TC   ) 

EXPORT_SYMBOL ( rt_release_rtc   ) 

EXPORT_SYMBOL ( rt_request_rtc   ) 

EXPORT_SYMBOL ( rt_free_timer   ) 

EXPORT_SYMBOL ( rt_request_timer   ) 

EXPORT_SYMBOL ( rt_reset_irq_to_sym_mode   ) 

EXPORT_SYMBOL ( rt_assign_irq_to_cpu   ) 

EXPORT_SYMBOL ( rt_pend_linux_srq   ) 

EXPORT_SYMBOL ( rt_free_srq   ) 

EXPORT_SYMBOL ( rt_request_srq   ) 

EXPORT_SYMBOL ( rt_set_irq_ack   ) 

EXPORT_SYMBOL ( usr_rt_pend_linux_irq   ) 

EXPORT_SYMBOL ( rt_pend_linux_irq   ) 

EXPORT_SYMBOL ( rt_free_linux_irq   ) 

EXPORT_SYMBOL ( rt_request_linux_irq   ) 

EXPORT_SYMBOL ( rt_ack_irq   ) 

EXPORT_SYMBOL ( rt_unmask_irq   ) 

EXPORT_SYMBOL ( rt_mask_and_ack_irq   ) 

EXPORT_SYMBOL ( rt_disable_irq   ) 

EXPORT_SYMBOL ( rt_enable_irq   ) 

EXPORT_SYMBOL ( rt_shutdown_irq   ) 

EXPORT_SYMBOL ( rt_startup_irq   ) 

EXPORT_SYMBOL ( rt_set_irq_cookie   ) 

EXPORT_SYMBOL ( rt_release_irq   ) 

EXPORT_SYMBOL ( rt_request_irq   ) 

EXPORT_SYMBOL ( rtai_realtime_irq   ) 

static void* hal_set_irq_handler ( void *  hirq_dispatcher  )  [inline, static]

Definition at line 913 of file hal.c.

References rtai_hirq_dispatcher().

Here is the call graph for this function:

static int intercept_syscall_prologue ( unsigned long  event,
struct pt_regs *  regs 
) [static]

Definition at line 762 of file hal.c.

References likely, rtai_lxrt_dispatcher, RTAI_SYSCALL_NR, rtai_usrq_dispatcher(), sched_intercept_syscall_prologue, and srq.

Referenced by rtai_install_archdep().

Here is the call graph for this function:

module_exit ( __rtai_hal_exit   ) 

module_init ( __rtai_hal_init   ) 

MODULE_LICENSE ( "GPL"   ) 

void rt_ack_irq ( unsigned  irq  ) 

Definition at line 350 of file hal.c.

References BEGIN_PIC, END_PIC, hal_root_domain, hal_unlock_irq, and rtai_irq_desc.

int rt_assign_irq_to_cpu ( int  irq,
unsigned long  cpus_mask 
)

Definition at line 240 of file hal.c.

Referenced by rt_release_irq(), rt_request_irq(), and user_srq().

void rt_disable_irq ( unsigned  irq  ) 

Definition at line 314 of file hal.c.

References BEGIN_PIC, cpuid, END_PIC, hal_lock_irq, hal_root_domain, and rtai_irq_desc.

void rt_enable_irq ( unsigned  irq  ) 

Definition at line 305 of file hal.c.

References BEGIN_PIC, END_PIC, hal_root_domain, hal_unlock_irq, and rtai_irq_desc.

void rt_end_irq ( unsigned  irq  ) 

Definition at line 358 of file hal.c.

References _rt_end_irq().

Here is the call graph for this function:

void rt_free_apic_timers ( void   ) 

Definition at line 239 of file hal.c.

References rt_free_timer().

Here is the call graph for this function:

int rt_free_linux_irq ( unsigned  irq,
void *  dev_id 
)

Uninstall shared Linux interrupt handler.

Parameters:
dev_id is to pass to the interrupt handler, in the same way as the standard Linux irq request call.
irq is the IRQ level of the interrupt handler to be freed.
Return values:
0 on success.
EINVAL if irq is not a valid IRQ number.

Definition at line 423 of file hal.c.

References count, flags, rtai_linux_irq, RTAI_NR_IRQS, rtai_restore_flags, and rtai_save_flags_and_cli.

int rt_free_srq ( unsigned  srq  ) 

Uninstall a system request handler.

rt_free_srq uninstalls the specified system call srq, returned by installing the related handler with a previous call to rt_request_srq().

Return values:
EINVAL if srq is invalid.

Definition at line 523 of file hal.c.

References rtai_sysreq_map.

Referenced by __rtai_lxrt_exit(), __rtai_lxrt_init(), __rtai_netrpc_exit(), __rtai_netrpc_init(), cleanup_module(), cleanup_softrtnet(), and init_softrtnet().

void rt_mask_and_ack_irq ( unsigned  irq  ) 

Definition at line 323 of file hal.c.

References BEGIN_PIC, END_PIC, and rtai_irq_desc.

void rt_pend_linux_irq ( unsigned  irq  ) 

Pend an IRQ to Linux.

rt_pend_linux_irq appends a Linux interrupt irq for processing in Linux IRQ mode, i.e. with hardware interrupts fully enabled.

Note:
rt_pend_linux_irq does not perform any check on irq.

Definition at line 454 of file hal.c.

References flags, rtai_restore_flags, and rtai_save_flags_and_cli.

Referenced by calibrate(), rt_request_timer(), and rt_timer_tick_ext().

void rt_pend_linux_srq ( unsigned  srq  ) 

Append a Linux IRQ.

rt_pend_linux_srq appends a system call request srq to be used as a service request to the Linux kernel.

Parameters:
srq is the value returned by rt_request_srq.
Note:
rt_pend_linux_srq does not perform any check on irq.

Definition at line 541 of file hal.c.

References flags, rtai_restore_flags, rtai_save_flags_and_cli, rtai_sysreq_pending, and rtai_sysreq_virq.

Referenced by clr_rtext(), rt_send_req_rel_port(), and soft_rt_sendto().

asmlinkage int rt_printk ( const char *  fmt,
  ... 
)

Definition at line 1087 of file hal.c.

References args.

Referenced by __rtai_shm_exit(), __rtai_wd_init(), check_to_soften_harden(), handle_lxrt_request(), krtai_objects_release(), linux_process_termination(), lxrt_handle_trap(), lxrt_intercept_syscall_epilogue(), lxrt_intercept_syscall_prologue(), reset_rt_fun_entries(), rt_release_rtc(), rt_request_rtc(), rtai_calibrate_8254(), rtai_domain_entry(), rtai_trap_fault(), set_rt_fun_entries(), and set_rtext().

int rt_release_irq ( unsigned  irq  ) 

Definition at line 205 of file hal.c.

References flags, hal_root_domain, rtai_critical_enter(), rtai_critical_exit(), RTAI_NR_IRQS, and rtai_realtime_irq.

Referenced by rt_free_timer(), and rt_request_timer().

Here is the call graph for this function:

void rt_release_rtc ( void   ) 

Definition at line 248 of file hal.c.

void rt_request_apic_timers ( void(*)(void)  handler,
struct apic_timer_setup_data tmdata 
)

Definition at line 238 of file hal.c.

int rt_request_irq ( unsigned  irq,
int(*)(unsigned irq, void *cookie)  handler,
void *  cookie,
int  retmode 
)

Definition at line 186 of file hal.c.

References flags, hal_root_domain, rtai_critical_enter(), rtai_critical_exit(), RTAI_NR_IRQS, and rtai_realtime_irq.

Referenced by rt_request_timer().

Here is the call graph for this function:

int rt_request_linux_irq ( unsigned  irq,
void *  handler,
char *  name,
void *  dev_id 
)

Install shared Linux interrupt handler.

rt_request_linux_irq installs function handler as a standard Linux interrupt service routine for IRQ level irq forcing Linux to share the IRQ with other interrupt handlers, even if it does not want. The handler is appended to any already existing Linux handler for the same irq and is run by Linux irq as any of its handler. In this way a real time application can monitor Linux interrupts handling at its will. The handler appears in /proc/interrupts.

Parameters:
handler pointer on the interrupt service routine to be installed.
name is a name for /proc/interrupts.
dev_id is to pass to the interrupt handler, in the same way as the standard Linux irq request call.
The interrupt service routine can be uninstalled with rt_free_linux_irq().

Return values:
0 on success.
EINVAL if irq is not a valid IRQ number or handler is NULL.
EBUSY if there is already a handler of interrupt irq.

Definition at line 389 of file hal.c.

References count, flags, rtai_linux_irq, RTAI_NR_IRQS, rtai_restore_flags, and rtai_save_flags_and_cli.

void rt_request_rtc ( long  rtc_freq,
void *  handler 
)

Definition at line 243 of file hal.c.

References rt_printk().

Here is the call graph for this function:

int rt_request_srq ( unsigned  label,
void(*)(void)  k_handler,
long long(*)(unsigned long)  u_handler 
)

Install a system request handler.

rt_request_srq installs a two way RTAI system request (srq) by assigning u_handler, a function to be used when a user calls srq from user space, and k_handler, the function to be called in kernel space following its activation by a call to rt_pend_linux_srq(). k_handler is in practice used to request a service from the kernel. In fact Linux system requests cannot be used safely from RTAI so you can setup a handler that receives real time requests and safely executes them when Linux is running.

Parameters:
u_handler can be used to effectively enter kernel space without the overhead and clumsiness of standard Unix/Linux protocols. This is very flexible service that allows you to personalize your use of RTAI.
Returns:
the number of the assigned system request on success.
Return values:
EINVAL if k_handler is NULL.
EBUSY if no free srq slot is available.

Definition at line 490 of file hal.c.

References flags, rtai_restore_flags, rtai_save_flags_and_cli, rtai_sysreq_map, rtai_sysreq_table, and srq.

Referenced by __rtai_lxrt_init(), __rtai_netrpc_init(), init_module(), and init_softrtnet().

int rt_reset_irq_to_sym_mode ( int  irq  ) 

Definition at line 241 of file hal.c.

Referenced by __rtai_hal_exit(), and user_srq().

void(*)(int) rt_set_ihook (  ) 

Definition at line 925 of file hal.c.

References rtai_isr_hook.

Referenced by __rtai_lxrt_exit(), and __rtai_lxrt_init().

int rt_set_irq_ack ( unsigned  irq,
int(*)(unsigned int)  irq_ack 
)

Definition at line 218 of file hal.c.

References hal_root_domain, RTAI_NR_IRQS, and rtai_realtime_irq.

Referenced by rt_request_timer().

void rt_set_irq_cookie ( unsigned  irq,
void *  cookie 
)

Definition at line 228 of file hal.c.

References rtai_realtime_irq.

RT_TRAP_HANDLER rt_set_trap_handler ( RT_TRAP_HANDLER  handler  ) 

Definition at line 657 of file hal.c.

References rtai_trap_handler.

void rt_shutdown_irq ( unsigned  irq  ) 

Definition at line 296 of file hal.c.

References BEGIN_PIC, END_PIC, hal_clear_irq, hal_root_domain, and rtai_irq_desc.

unsigned rt_startup_irq ( unsigned  irq  ) 

Definition at line 283 of file hal.c.

References BEGIN_PIC, END_PIC, hal_root_domain, hal_unlock_irq, and rtai_irq_desc.

asmlinkage int rt_sync_printk ( const char *  fmt,
  ... 
)

Definition at line 1103 of file hal.c.

References args, hal_set_printk_async, hal_set_printk_sync, and rtai_domain.

void rt_unmask_irq ( unsigned  irq  ) 

Definition at line 342 of file hal.c.

References BEGIN_PIC, END_PIC, and rtai_irq_desc.

int rtai_calibrate_TC ( void   ) 

Definition at line 111 of file at91-timer.c.

References flags, rt_set_timer_delay, RTAI_CPU_FREQ, rtai_critical_enter(), rtai_critical_exit(), rtai_imuldiv, and rtai_rdtsc.

Here is the call graph for this function:

long rtai_catch_event ( struct hal_domain_struct *  from,
unsigned long  event,
int(*)(unsigned long, void *)  handler 
)

Definition at line 802 of file hal.c.

References hal_catch_event, HAL_SYSCALL_PROLOGUE, and sched_intercept_syscall_prologue.

Referenced by lxrt_exit(), and lxrt_init().

unsigned long rtai_critical_enter ( void(*)(void)  synch  ) 

Definition at line 166 of file hal.c.

References atomic_dec_and_test, flags, hal_critical_enter, printk(), rtai_sync_count, and rtai_sync_level.

Referenced by rt_free_timer(), rt_release_irq(), rt_request_irq(), rt_request_timer(), rtai_calibrate_TC(), rtai_install_archdep(), and rtai_uninstall_archdep().

Here is the call graph for this function:

void rtai_critical_exit ( unsigned long  flags  ) 

Definition at line 179 of file hal.c.

References atomic_inc, hal_critical_exit, and rtai_sync_count.

Referenced by rt_free_timer(), rt_release_irq(), rt_request_irq(), rt_request_timer(), rtai_calibrate_TC(), rtai_install_archdep(), and rtai_uninstall_archdep().

static void rtai_domain_entry ( int  iflag  )  [static]

Definition at line 793 of file hal.c.

References hal_suspend_domain, HAL_TYPE, HAL_VERSION_STRING, and rt_printk().

Referenced by __rtai_hal_init().

Here is the call graph for this function:

static void rtai_hirq_dispatcher ( int  irq,
struct pt_regs *  regs 
) [static]

Definition at line 625 of file hal.c.

References cpuid, HAL_LOCK_LINUX, hal_pended, HAL_UNLOCK_LINUX, ipipe_root_status, rtai_realtime_irq, RTAI_SCHED_ISR_LOCK, RTAI_SCHED_ISR_UNLOCK, and rtai_sti.

Referenced by __rtai_hal_init(), and hal_set_irq_handler().

static void rtai_install_archdep ( void   )  [static]

Definition at line 946 of file hal.c.

References hal_catch_event, hal_get_sysinfo, hal_root_domain, HAL_SYSCALL_PROLOGUE, hal_sysinfo_struct, intercept_syscall_prologue(), rtai_cpufreq_arg, and rtai_tunables.

Referenced by __rtai_hal_init().

Here is the call graph for this function:

static void rtai_lsrq_dispatcher ( unsigned  virq  )  [static]

Definition at line 713 of file hal.c.

References ffnz(), rtai_lsrq_lock, rtai_sysreq_map, rtai_sysreq_pending, rtai_sysreq_running, rtai_sysreq_table, and srq.

Referenced by __rtai_hal_init().

Here is the call graph for this function:

RTAI_MODULE_PARM ( IsolCpusMask  ,
ulong   
)

RTAI_MODULE_PARM ( rtai_cpufreq_arg  ,
ulong   
)

void rtai_set_linux_task_priority ( struct task_struct *  task,
int  policy,
int  prio 
)

Definition at line 934 of file hal.c.

References hal_set_linux_task_priority, and printk().

Referenced by _rt_schedule_soft_tail(), give_back_to_linux(), handle_lxrt_request(), kthread_fun(), kthread_m(), recv_thread(), rt_schedule(), send_thread(), soft_stub_fun(), and thread_fun().

Here is the call graph for this function:

int rtai_syscall_dispatcher ( struct pt_regs *  regs  ) 

Definition at line 778 of file hal.c.

References rtai_lxrt_dispatcher, rtai_usrq_dispatcher(), and srq.

Here is the call graph for this function:

int rtai_timer_handler ( struct pt_regs *  regs  ) 

Definition at line 590 of file hal.c.

References cpuid, HAL_LOCK_LINUX, hal_pended, HAL_UNLOCK_LINUX, ipipe_root_status, rtai_realtime_irq, RTAI_SCHED_ISR_LOCK, RTAI_SCHED_ISR_UNLOCK, rtai_sti, and RTAI_TIMER_IRQ.

Referenced by rt_request_timer().

static int rtai_trap_fault ( unsigned  event,
void *  evdata 
) [static]

Definition at line 662 of file hal.c.

References rtai_trap_handler, TRACE_RTAI_TRAP_ENTRY, and TRACE_RTAI_TRAP_EXIT.

Referenced by __rtai_hal_init().

static void rtai_uninstall_archdep ( void   )  [static]

Definition at line 967 of file hal.c.

References hal_catch_event, hal_root_domain, HAL_SYSCALL_PROLOGUE, and rtai_archdep_exit().

Referenced by __rtai_hal_exit().

Here is the call graph for this function:

static long long rtai_usrq_dispatcher ( unsigned long  srq,
unsigned long  label 
) [inline, static]

Definition at line 738 of file hal.c.

References rtai_sysreq_map, rtai_sysreq_table, TRACE_RTAI_SRQ_ENTRY, and TRACE_RTAI_SRQ_EXIT.

Referenced by intercept_syscall_prologue(), and rtai_syscall_dispatcher().

RTAI_SYSCALL_MODE void usr_rt_pend_linux_irq ( unsigned  irq  ) 

Definition at line 462 of file hal.c.

References flags, rtai_restore_flags, and rtai_save_flags_and_cli.


Variable Documentation

int count

Definition at line 148 of file hal.c.

Referenced by calibrate(), ffnz(), hash_rem_adr(), hash_rem_name(), rt_free_linux_irq(), rt_request_linux_irq(), rt_sem_wait(), rt_sem_wait_if(), rt_sem_wait_until(), rtai_rdtsc(), rtf_ioctl(), start_rt_apic_timers(), and user_srq().

unsigned long flags

Definition at line 147 of file hal.c.

Referenced by __rtai_hal_exit(), _broadcast(), _receive(), _rt_bits_wait(), _rt_bits_wait_if(), _rt_bits_wait_until(), _rt_get_boot_epoch(), _rt_mbx_ovrwr_send(), _rt_mbx_receive_if(), _rt_mbx_receive_wp(), _rt_mbx_send_if(), _rt_mbx_send_wp(), _send(), asgn_min_prio(), fill_row(), find_stub(), get_name(), get_portslot(), get_ptimer_indx(), get_stub(), gvb_portslot(), gvb_ptimer_indx(), gvb_stub(), handle_lxrt_request(), hard_stub_fun(), hash_find_adr(), hash_find_name(), hash_ins_adr(), hash_ins_name(), hash_rem_adr(), hash_rem_name(), mbx_get(), mbx_ovrwr_put(), mbx_ovrwr_send(), mbx_put(), mbx_receive_if(), mbx_receive_wp(), mbx_sem_delete(), mbx_sem_signal(), mbx_sem_wait(), mbx_sem_wait_if(), mbx_sem_wait_timed(), mbx_send_if(), mbx_send_wp(), mbx_signal(), mbx_wait(), mbx_wait_timed(), mbx_wait_until(), mbxget(), mbxovrwrput(), mbxput(), net_resume_task(), next_period(), rt_bits_delete(), rt_bits_reset(), rt_bits_signal(), rt_change_prio(), rt_cond_signal(), rt_cond_wait(), rt_cond_wait_until(), rt_disable_signal(), rt_enable_signal(), rt_exec_signal(), rt_free_linux_irq(), rt_free_timer(), rt_get_registry_slot(), rt_insert_tasklet(), rt_insert_timer(), rt_pend_linux_irq(), rt_pend_linux_srq(), rt_receive(), rt_receive_if(), rt_receive_until(), rt_release_irq(), rt_remove_tasklet(), rt_remove_timer(), rt_request_irq(), rt_request_linux_irq(), rt_request_srq(), rt_request_timer(), rt_return(), rt_rpc(), rt_rpc_if(), rt_rpc_until(), rt_rwl_rdlock(), rt_rwl_rdlock_if(), rt_rwl_rdlock_until(), rt_rwl_unlock(), rt_rwl_wrlock(), rt_rwl_wrlock_if(), rt_rwl_wrlock_until(), rt_sem_broadcast(), rt_sem_delete(), rt_sem_signal(), rt_sem_wait(), rt_sem_wait_barrier(), rt_sem_wait_if(), rt_sem_wait_until(), rt_send(), rt_send_if(), rt_send_until(), rt_set_period(), rt_set_resume_time(), rt_set_timer_delay(), rt_set_timer_firing_time(), rt_set_timer_match_reg(), rt_set_timer_period(), rt_sleep(), rt_sleep_until(), rt_spin_lock_irqsave(), rt_spl_lock(), rt_spl_lock_if(), rt_spl_lock_timed(), rt_spl_unlock(), rt_task_make_periodic(), rt_task_make_periodic_relative_ns(), rt_task_masked_unblock(), rt_task_resume(), rt_task_set_resume_end_times(), rt_task_suspend(), rt_task_suspend_if(), rt_task_suspend_until(), rt_task_wait_period(), rt_task_yield(), rt_timers_manager(), rt_trigger_signal(), rt_wait_signal(), rtai_calibrate_TC(), rtai_critical_enter(), rtai_install_archdep(), rtai_rdtsc(), rtai_trap_fault(), rtai_uninstall_archdep(), rtf_named_create(), set_rtext(), set_timer_firing_time(), soft_stub_fun(), soft_timer_interrupt(), sym_calc_value(), touch_all(), and usr_rt_pend_linux_irq().

void* hal_irq_handler

void* hal_irq_handler

volatile unsigned long hal_pended

Definition at line 163 of file hal.c.

Referenced by rtai_hirq_dispatcher(), and rtai_timer_handler().

struct hw_interrupt_type hal_std_irq_dtype[]

volatile unsigned long* ipipe_root_status[RTAI_NR_CPUS]

Definition at line 128 of file hal.c.

Referenced by __rtai_hal_init(), rtai_hirq_dispatcher(), and rtai_timer_handler().

unsigned long IsolCpusMask = 0 [static]

Definition at line 82 of file hal.c.

Referenced by rt_release_irq(), and rt_request_irq().

void(* k_handler)(void)

unsigned long label

Definition at line 153 of file hal.c.

Referenced by on_window1_delete_event().

volatile int locked

Definition at line 133 of file hal.c.

Referenced by rt_sched_lock(), rt_sched_unlock(), rt_schedule(), rt_spl_lock_timed(), and rt_timer_handler().

volatile int rqsted

Definition at line 133 of file hal.c.

Referenced by rt_sched_unlock().

struct { ... } rt_scheduling[RTAI_NR_CPUS]

Referenced by rt_sched_lock(), rt_sched_unlock(), rt_schedule(), and rt_timer_handler().

struct rt_times rt_smp_times[RTAI_NR_CPUS] = { { 0 } }

Definition at line 126 of file hal.c.

Referenced by rt_get_time(), rt_hard_timer_tick_count(), rt_hard_timer_tick_count_cpuid(), rt_set_sched_policy(), rt_task_wait_period(), and start_rt_timer().

struct rt_times rt_times

Definition at line 125 of file hal.c.

volatile unsigned long rtai_cpu_lock

Definition at line 131 of file hal.c.

volatile unsigned long rtai_cpu_realtime

Definition at line 130 of file hal.c.

unsigned long rtai_cpufreq_arg = RTAI_CALIBRATED_CPU_FREQ [static]

Definition at line 79 of file hal.c.

Referenced by rtai_archdep_init(), and rtai_install_archdep().

struct hal_domain_struct rtai_domain

Definition at line 124 of file hal.c.

Referenced by __rtai_hal_exit(), __rtai_hal_init(), __rtai_lxrt_exit(), rt_sync_printk(), and switch_rtai_tasks().

void(*) rtai_isr_hook(int cpuid) [static]

Definition at line 553 of file hal.c.

void(*) rtai_isr_hook(int cpuid) [static]

Definition at line 139 of file hal.c.

Referenced by rt_set_ihook().

struct rtai_switch_data rtai_linux_context[RTAI_NR_CPUS]

Definition at line 127 of file hal.c.

Referenced by rt_schedule(), and rt_timer_handler().

struct { ... } rtai_linux_irq[NR_IRQS] [static]

Referenced by rt_free_linux_irq(), and rt_request_linux_irq().

spinlock_t rtai_lsrq_lock = SPIN_LOCK_UNLOCKED [static]

Definition at line 159 of file hal.c.

Referenced by rtai_lsrq_dispatcher().

long long(*) rtai_lxrt_dispatcher(unsigned long, unsigned long, void *)

Definition at line 758 of file hal.c.

Referenced by intercept_syscall_prologue(), and rtai_syscall_dispatcher().

long long(*) rtai_lxrt_invoke_entry(unsigned long, void *)

Definition at line 132 of file hal.c.

struct rtai_realtime_irq_s rtai_realtime_irq[RTAI_NR_IRQS]

Definition at line 123 of file hal.c.

Referenced by __rtai_hal_init(), rt_release_irq(), rt_request_irq(), rt_set_irq_ack(), rt_set_irq_cookie(), rt_set_irq_retmode(), rtai_hirq_dispatcher(), and rtai_timer_handler().

atomic_t rtai_sync_count = ATOMIC_INIT(1) [static]

Definition at line 161 of file hal.c.

Referenced by rtai_critical_enter(), and rtai_critical_exit().

volatile int rtai_sync_level [static]

Definition at line 160 of file hal.c.

Referenced by rtai_critical_enter().

unsigned long rtai_sysreq_map = 3 [static]

Definition at line 156 of file hal.c.

Referenced by rt_free_srq(), rt_request_srq(), rtai_lsrq_dispatcher(), and rtai_usrq_dispatcher().

unsigned long rtai_sysreq_pending [static]

Definition at line 157 of file hal.c.

Referenced by rt_pend_linux_srq(), and rtai_lsrq_dispatcher().

unsigned long rtai_sysreq_running [static]

Definition at line 158 of file hal.c.

Referenced by rtai_lsrq_dispatcher().

struct { ... } rtai_sysreq_table[RTAI_NR_SRQS] [static]

Referenced by rt_request_srq(), rtai_lsrq_dispatcher(), and rtai_usrq_dispatcher().

unsigned rtai_sysreq_virq [static]

Definition at line 155 of file hal.c.

Referenced by __rtai_hal_exit(), __rtai_hal_init(), and rt_pend_linux_srq().

RT_TRAP_HANDLER rtai_trap_handler [static]

Definition at line 162 of file hal.c.

Referenced by rt_set_trap_handler(), and rtai_trap_fault().

struct calibration_data rtai_tunables

Definition at line 129 of file hal.c.

Referenced by rt_request_timer(), and rtai_install_archdep().

void* saved_hal_irq_handler [static]

Definition at line 976 of file hal.c.

void* saved_hal_irq_handler [static]

Definition at line 811 of file hal.c.

int(*) sched_intercept_syscall_prologue(struct pt_regs *) [static]

Definition at line 760 of file hal.c.

Referenced by intercept_syscall_prologue(), and rtai_catch_event().

long long(* u_handler)(unsigned long)


Generated on Tue Feb 2 17:46:07 2010 for RTAI API by  doxygen 1.4.7