#include <linux/version.h>
#include <linux/config.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/stddef.h>
#include <linux/timer.h>
#include <linux/interrupt.h>
#include <asm/mach/irq.h>
#include <asm/proc/ptrace.h>
#include <asm/rtai_hal.h>
#include <asm/rtai_lxrt.h>
#include <asm/rtai_usi.h>
#include <rtai_version.h>
Include dependency graph for hal.c:
Go to the source code of this file.
Defines | |
#define | __RTAI_HAL__ |
Typedefs | |
typedef void(* | isr_hook_t )(int) |
Functions | |
MODULE_LICENSE ("GPL") | |
unsigned long | rtai_critical_enter (void(*synch)(void)) |
void | rtai_critical_exit (unsigned long flags) |
int | rt_request_irq (unsigned irq, rt_irq_handler_t handler, void *cookie, int retmode) |
int | rt_release_irq (unsigned irq) |
void | rt_set_irq_cookie (unsigned irq, void *cookie) |
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) |
void | rt_unmask_irq (unsigned irq) |
void | rt_ack_irq (unsigned irq) |
int | rt_request_linux_irq (unsigned irq, irqreturn_t(*handler)(int irq, void *dev_id, struct pt_regs *regs), 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. | |
int | rt_request_srq (unsigned label, void(*k_handler)(void), long long(*u_handler)(unsigned)) |
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. | |
RT_TRAP_HANDLER | rt_set_trap_handler (RT_TRAP_HANDLER handler) |
void | rtai_irq_trampoline (unsigned irq) |
void | rtai_trap_fault (adevinfo_t *evinfo) |
void | rtai_ssrq_trampoline (unsigned virq) |
long long | rtai_usrq_trampoline (unsigned long srq, unsigned long label) |
int | rtai_syscall_trampoline (struct pt_regs *regs) |
isr_hook_t | rt_set_ihook (isr_hook_t hookfn) |
void | rtai_domain_entry (int iflag) |
int | __rtai_hal_init (void) |
void | __rtai_hal_exit (void) |
module_init (__rtai_hal_init) | |
module_exit (__rtai_hal_exit) | |
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 (rt_request_srq) | |
EXPORT_SYMBOL (rt_free_srq) | |
EXPORT_SYMBOL (rt_pend_linux_srq) | |
EXPORT_SYMBOL (rt_request_timer) | |
EXPORT_SYMBOL (rt_free_timer) | |
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 (rtai_lxrt_invoke_entry) | |
EXPORT_SYMBOL (rtai_realtime_irq) | |
EXPORT_SYMBOL (rt_scheduling) | |
Variables | |
struct { | |
rt_irq_handler_t handler | |
void * cookie | |
int retmode | |
} | L1_CACHE_BYTES [NR_IRQS] |
adomain_t | rtai_domain |
rt_times | rt_times |
rt_times | rt_smp_times [RTAI_NR_CPUS] = { { 0 } } |
rtai_switch_data | rtai_linux_context [RTAI_NR_CPUS] |
calibration_data | rtai_tunables |
volatile unsigned long | rtai_cpu_realtime |
volatile unsigned long | rtai_cpu_lock |
int | rtai_adeos_ptdbase = -1 |
long long(* | rtai_lxrt_invoke_entry )(unsigned long, void *) |
struct { | |
volatile int locked | |
volatile int rqsted | |
} | rt_scheduling [RTAI_NR_CPUS] |
struct { | |
unsigned long flags | |
int count | |
} | rtai_linux_irq [NR_IRQS] |
struct { | |
void(* k_handler )(void) | |
long long(* u_handler )(unsigned) | |
unsigned label | |
} | rtai_sysreq_table [RTAI_NR_SRQS] |
unsigned | rtai_sysreq_virq |
unsigned long | rtai_sysreq_map = 3 |
unsigned long | rtai_sysreq_pending |
unsigned long | rtai_sysreq_running |
spinlock_t | rtai_ssrq_lock = SPIN_LOCK_UNLOCKED |
volatile int | rtai_sync_level |
atomic_t | rtai_sync_count = ATOMIC_INIT(1) |
RT_TRAP_HANDLER | rtai_trap_handler |
int(* | saved_adeos_syscall_handler )(struct pt_regs *regs) |
isr_hook_t | rtai_isr_hook |
|
|
Definition at line 62 of file hal.c. Referenced by rt_set_ihook(). |
|
Definition at line 791 of file hal.c. References flags, printk(), rtai_adeos_ptdbase, rtai_archdep_exit(), rtai_critical_enter(), rtai_critical_exit(), rtai_domain, rtai_lxrt_invoke_entry, rtai_sysreq_virq, and saved_adeos_syscall_handler. Here is the call graph for this function: ![]() |
|
Definition at line 731 of file hal.c. References flags, printk(), rtai_adeos_ptdbase, rtai_archdep_init(), rtai_critical_enter(), rtai_critical_exit(), rtai_domain, rtai_domain_entry(), rtai_lxrt_invoke_entry, rtai_ssrq_trampoline(), rtai_syscall_trampoline(), rtai_sysreq_virq, RTAI_TSC_FREQ, rtai_tunables, and saved_adeos_syscall_handler. Here is the call graph for this function: ![]() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 222 of file hal.c. References printk(). Here is the call graph for this function: ![]() |
|
Uninstall shared Linux interrupt handler.
References flags, rtai_linux_irq, rtai_restore_flags, and rtai_save_flags_and_cli. |
|
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().
References rtai_sysreq_map, and srq. |
|
|
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.
|
|
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.
References cpuid, rtai_domain, rtai_sysreq_pending, rtai_sysreq_virq, and srq. |
|
Definition at line 151 of file hal.c. References flags, rtai_critical_enter(), rtai_critical_exit(), and rtai_realtime_irq. Here is the call graph for this function: ![]() |
|
Definition at line 132 of file hal.c. References cookie, flags, handler, rtai_critical_enter(), rtai_critical_exit(), and rtai_realtime_irq. Here is the call graph for this function: ![]() |
|
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.
References flags, handler, rtai_linux_irq, rtai_restore_flags, and rtai_save_flags_and_cli. |
|
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.
References flags, k_handler, label, rtai_restore_flags, rtai_save_flags_and_cli, rtai_sysreq_map, rtai_sysreq_table, srq, and u_handler. |
|
Definition at line 587 of file hal.c. References isr_hook_t, and rtai_isr_hook. |
|
Definition at line 166 of file hal.c. References cookie, and rtai_realtime_irq. |
|
Definition at line 453 of file hal.c. References handler, RT_TRAP_HANDLER, and rtai_trap_handler. |
|
|
|
|
Definition at line 112 of file hal.c. References atomic_dec_and_test, flags, printk(), rtai_sync_count, and rtai_sync_level. Here is the call graph for this function: ![]() |
|
Definition at line 125 of file hal.c. References atomic_inc(), flags, and rtai_sync_count. Here is the call graph for this function: ![]() |
|
Definition at line 706 of file hal.c. References CONFIG_RTAI_COMPILER, printk(), rtai_irq_trampoline(), and rtai_trap_fault(). Referenced by __rtai_hal_init(). Here is the call graph for this function: ![]() |
|
Definition at line 459 of file hal.c. References cookie, cpuid, rt_scheduling, rtai_isr_hook, rtai_realtime_irq, TRACE_RTAI_GLOBAL_IRQ_ENTRY, and TRACE_RTAI_GLOBAL_IRQ_EXIT. Referenced by rtai_domain_entry(). |
|
Definition at line 516 of file hal.c. References ffnz(), rtai_ssrq_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: ![]() |
|
Definition at line 563 of file hal.c. References rtai_lxrt_invoke_entry, rtai_usrq_trampoline(), and srq. Referenced by __rtai_hal_init(). Here is the call graph for this function: ![]() |
|
Definition at line 485 of file hal.c. References cpuid, rtai_trap_handler, TRACE_RTAI_TRAP_ENTRY, and TRACE_RTAI_TRAP_EXIT. Referenced by rtai_domain_entry(). |
|
Definition at line 539 of file hal.c. References label, rtai_sysreq_map, rtai_sysreq_table, srq, TRACE_RTAI_SRQ_ENTRY, and TRACE_RTAI_SRQ_EXIT. |
|
Definition at line 68 of file hal.c. Referenced by rt_irq_signal(), rt_request_irq(), rt_set_irq_cookie(), and rtai_irq_trampoline(). |
|
Definition at line 90 of file hal.c. Referenced by calibrate(), count2nano(), count2nano_cpuid(), lxrt_typed_sem_init(), rt_sem_wait(), rt_sem_wait_if(), rt_sem_wait_until(), rtai_rdtsc(), rtf_evdrp(), rtf_get(), rtf_get_if(), rtf_ioctl(), rtf_overwrite(), rtf_ovrwr_put(), rtf_put(), rtf_put_if(), rtf_read(), rtf_read_all_at_once(), rtf_read_if(), rtf_read_timed(), rtf_write(), rtf_write_if(), rtf_write_timed(), and user_srq(). |
|
|
|
Referenced by rt_request_srq(). |
|
|
|
Definition at line 95 of file hal.c. Referenced by ConfigList::addColumn(), on_window1_delete_event(), print_button(), rt_request_srq(), rtai_open_srq(), and rtai_usrq_trampoline(). |
|
Definition at line 81 of file hal.c. Referenced by rt_spl_lock_timed(). |
|
Definition at line 69 of file hal.c. Referenced by rt_request_irq(), and rt_set_irq_retmode(). |
|
|
Referenced by rt_sched_lock(), rt_sched_unlock(), rt_schedule(), rt_timer_handler(), and rtai_irq_trampoline(). |
|
Definition at line 74 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(). |
|
|
Definition at line 79 of file hal.c. Referenced by __rtai_hal_exit(), and __rtai_hal_init(). |
|
|
|
Definition at line 72 of file hal.c. Referenced by __rtai_hal_exit(), __rtai_hal_init(), and rt_pend_linux_srq(). |
|
Definition at line 108 of file hal.c. Referenced by rt_set_ihook(), and rtai_irq_trampoline(). |
|
|
Referenced by rt_free_linux_irq(), and rt_request_linux_irq(). |
|
Definition at line 80 of file hal.c. Referenced by __rtai_hal_exit(), __rtai_hal_init(), and rtai_syscall_trampoline(). |
|
Definition at line 101 of file hal.c. Referenced by rtai_ssrq_trampoline(). |
|
Definition at line 103 of file hal.c. Referenced by rtai_critical_enter(), and rtai_critical_exit(). |
|
Definition at line 102 of file hal.c. Referenced by rtai_critical_enter(). |
|
Definition at line 98 of file hal.c. Referenced by rt_free_srq(), rt_request_srq(), rtai_ssrq_trampoline(), and rtai_usrq_trampoline(). |
|
Definition at line 99 of file hal.c. Referenced by rt_pend_linux_srq(), and rtai_ssrq_trampoline(). |
|
Definition at line 100 of file hal.c. Referenced by rtai_ssrq_trampoline(). |
|
Referenced by rt_request_srq(), rtai_ssrq_trampoline(), and rtai_usrq_trampoline(). |
|
Definition at line 97 of file hal.c. Referenced by __rtai_hal_exit(), __rtai_hal_init(), and rt_pend_linux_srq(). |
|
Definition at line 104 of file hal.c. Referenced by rt_set_trap_handler(), and rtai_trap_fault(). |
|
Definition at line 76 of file hal.c. Referenced by __rtai_hal_init(), and rtai_install_archdep(). |
|
Definition at line 105 of file hal.c. Referenced by __rtai_hal_exit(), and __rtai_hal_init(). |
|
Referenced by rt_request_srq(). |