Changeset 4f66cc7b in mainline for uspace/srv/hw/irc/apic/apic.c
- Timestamp:
- 2011-03-17T12:45:23Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4fec9ee, 6e3b9a58
- Parents:
- 45dd8bf (diff), 039c66c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/irc/apic/apic.c
r45dd8bf r4f66cc7b 54 54 #define NAME "apic" 55 55 56 static bool apic_found = false; 57 56 58 static int apic_enable_irq(sysarg_t irq) 57 59 { … … 79 81 callid = async_get_call(&call); 80 82 81 switch (IPC_GET_IMETHOD(call)) { 83 sysarg_t method = IPC_GET_IMETHOD(call); 84 if (method == IPC_M_PHONE_HUNGUP) { 85 return; 86 } 87 88 if (!apic_found) { 89 async_answer_0(callid, ENOTSUP); 90 break; 91 } 92 93 switch (method) { 82 94 case IRC_ENABLE_INTERRUPT: 83 95 async_answer_0(callid, apic_enable_irq(IPC_GET_ARG1(call))); … … 97 109 * 98 110 */ 99 static boolapic_init(void)111 static void apic_init(void) 100 112 { 101 113 sysarg_t apic; 102 114 103 if ((sysinfo_get_value("apic", &apic) != EOK) || (!apic)) {104 printf(NAME ": No APIC found\n");105 return false;115 apic_found = sysinfo_get_value("apic", &apic) && apic; 116 if (!apic_found) { 117 printf(NAME ": Warning: no APIC found\n"); 106 118 } 107 119 108 120 async_set_client_connection(apic_connection); 109 121 service_register(SERVICE_APIC); 110 111 return true;112 122 } 113 123 … … 116 126 printf(NAME ": HelenOS APIC driver\n"); 117 127 118 if (!apic_init()) 119 return -1; 120 128 apic_init(); 129 121 130 printf(NAME ": Accepting connections\n"); 122 131 async_manager();
Note:
See TracChangeset
for help on using the changeset viewer.