ia64/xen-unstable

view xen/include/xen/keyhandler.h @ 19800:78962f85c562

IOMMU: Add two generic functions to vendor neutral interface

Add 2 generic functions into the vendor neutral iommu interface, The
reason is that from changeset 19732, there is only one global flag
"iommu_enabled" that controls iommu enablement for both vtd and amd
systems, so we need different code paths for vtd and amd iommu systems
if this flag has been turned on. Also, the early checking of
"iommu_enabled" in iommu_setup() is removed to prevent iommu
functionalities from been disabled on amd systems.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 19 08:41:50 2009 +0100 (2009-06-19)
parents 828c0c89d830
children
line source
1 /******************************************************************************
2 * keyhandler.h
3 *
4 * We keep an array of 'handlers' for each key code between 0 and 255;
5 * this is intended to allow very simple debugging routines (toggle
6 * debug flag, dump registers, reboot, etc) to be hooked in in a slightly
7 * nicer fashion than just editing the serial/keyboard drivers.
8 */
10 #ifndef __XEN_KEYHANDLER_H__
11 #define __XEN_KEYHANDLER_H__
13 /* Initialize keytable with default handlers */
14 extern void initialize_keytable(void);
16 /*
17 * Register a callback function for key @key. The callback occurs in
18 * softirq context with no locks held and interrupts enabled.
19 */
20 typedef void keyhandler_t(unsigned char key);
21 extern void register_keyhandler(
22 unsigned char key, keyhandler_t *handler, char *desc);
24 /*
25 * Register an IRQ callback function for key @key. The callback occurs
26 * synchronously in hard-IRQ context with interrupts disabled. The @regs
27 * callback parameter points at the interrupted register context.
28 */
29 typedef void irq_keyhandler_t(unsigned char key, struct cpu_user_regs *regs);
30 extern void register_irq_keyhandler(
31 unsigned char key, irq_keyhandler_t *handler, char *desc);
33 /* Inject a keypress into the key-handling subsystem. */
34 extern void handle_keypress(unsigned char key, struct cpu_user_regs *regs);
36 #endif /* __XEN_KEYHANDLER_H__ */