ia64/xen-unstable

view xen/arch/ia64/xen/sn_console.c @ 9405:29dfadcc5029

[IA64] Followup to xen time cleanup

Clean up to xen time handler. Tristan #if 0 some code because it seems
redundant, which however is actually problematic logic as a reason for
an intermittent timer oops issue of dom0. So delete it now.

Also remove vcpu_wake, since wakeup current has nothing meaningful and
simply waste cpu cycle.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
author awilliam@xenbuild.aw
date Mon Mar 27 15:32:08 2006 -0700 (2006-03-27)
parents 0b0be946cf9c
children 40542d29da2b
line source
1 /*
2 * C-Brick Serial Port (and console) driver for SGI Altix machines.
3 *
4 * Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved.
5 */
7 #include <xen/lib.h>
8 #include <asm/acpi.h>
9 #include <asm/sn/sn_sal.h>
10 #include <xen/serial.h>
12 /*
13 * sn_putc - Send a character to the console, polled or interrupt mode
14 */
15 static void sn_putc(struct serial_port *port, char c)
16 {
17 ia64_sn_console_putc(c);
18 }
20 static struct uart_driver sn_sal_console = {
21 .putc = sn_putc,
22 };
24 /**
25 * early_sn_setup - early setup routine for SN platforms
26 *
27 * pulled from arch/ia64/sn/kernel/setup.c
28 */
29 static void __init early_sn_setup(void)
30 {
31 efi_system_table_t *efi_systab;
32 efi_config_table_t *config_tables;
33 struct ia64_sal_systab *sal_systab;
34 struct ia64_sal_desc_entry_point *ep;
35 char *p;
36 int i, j;
38 /*
39 * Parse enough of the SAL tables to locate the SAL entry point. Since, console
40 * IO on SN2 is done via SAL calls, early_printk won't work without this.
41 *
42 * This code duplicates some of the ACPI table parsing that is in efi.c & sal.c.
43 * Any changes to those file may have to be made hereas well.
44 */
45 efi_systab = (efi_system_table_t *) __va(ia64_boot_param->efi_systab);
46 config_tables = __va(efi_systab->tables);
47 for (i = 0; i < efi_systab->nr_tables; i++) {
48 if (efi_guidcmp(config_tables[i].guid, SAL_SYSTEM_TABLE_GUID) ==
49 0) {
50 sal_systab = __va(config_tables[i].table);
51 p = (char *)(sal_systab + 1);
52 for (j = 0; j < sal_systab->entry_count; j++) {
53 if (*p == SAL_DESC_ENTRY_POINT) {
54 ep = (struct ia64_sal_desc_entry_point
55 *)p;
56 ia64_sal_handler_init(__va
57 (ep->sal_proc),
58 __va(ep->gp));
59 return;
60 }
61 p += SAL_DESC_SIZE(*p);
62 }
63 }
64 }
65 /* Uh-oh, SAL not available?? */
66 printk(KERN_ERR "failed to find SAL entry point\n");
67 }
69 /**
70 * sn_serial_console_early_setup - Sets up early console output support
71 *
72 * pulled from drivers/serial/sn_console.c
73 */
74 int __init sn_serial_console_early_setup(void)
75 {
76 if (strcmp("sn2",acpi_get_sysname()))
77 return -1;
79 early_sn_setup(); /* Find SAL entry points */
80 serial_register_uart(0, &sn_sal_console, NULL);
82 return 0;
83 }