Changeset b2fa1204 in mainline for kernel/arch/sparc64/src
- Timestamp:
- 2014-01-05T21:12:26Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ca05e9b
- Parents:
- bd6ff94
- Location:
- kernel/arch/sparc64/src
- Files:
-
- 8 edited
-
drivers/kbd.c (modified) (6 diffs)
-
drivers/pci.c (modified) (2 diffs)
-
drivers/scr.c (modified) (16 diffs)
-
mm/sun4v/tlb.c (modified) (2 diffs)
-
smp/sun4u/smp.c (modified) (2 diffs)
-
sun4v/md.c (modified) (2 diffs)
-
trap/sun4u/interrupt.c (modified) (2 diffs)
-
trap/sun4v/interrupt.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/drivers/kbd.c
rbd6ff94 rb2fa1204 44 44 #include <align.h> 45 45 #include <str.h> 46 #include < print.h>46 #include <log.h> 47 47 #include <sysinfo/sysinfo.h> 48 48 … … 71 71 ofw_tree_property_t *prop = ofw_tree_getprop(node, "interrupts"); 72 72 if ((!prop) || (!prop->value)) { 73 printf("ns16550: Unable to find interrupts property\n"); 73 log(LF_ARCH, LVL_ERROR, 74 "ns16550: Unable to find interrupts property"); 74 75 return false; 75 76 } … … 82 83 prop = ofw_tree_getprop(node, "reg"); 83 84 if ((!prop) || (!prop->value)) { 84 printf("ns16550: Unable to find reg property\n"); 85 log(LF_ARCH, LVL_ERROR, 86 "ns16550: Unable to find reg property"); 85 87 return false; 86 88 } … … 91 93 if (!ofw_ebus_apply_ranges(node->parent, 92 94 ((ofw_ebus_reg_t *) prop->value), &pa)) { 93 printf("ns16550: Failed to determine address\n"); 95 log(LF_ARCH, LVL_ERROR, 96 "ns16550: Failed to determine address"); 94 97 return false; 95 98 } … … 101 104 ((ofw_ebus_reg_t *) prop->value), interrupts, &inr, &cir, 102 105 &cir_arg)) { 103 printf("ns16550: Failed to determine interrupt\n"); 106 log(LF_ARCH, LVL_ERROR, 107 "ns16550: Failed to determine interrupt"); 104 108 return false; 105 109 } … … 117 121 PAGE_WRITE | PAGE_NOT_CACHEABLE) + offset); 118 122 119 ns16550_instance_t *ns16550_instance = ns16550_init(ns16550, inr, cir, cir_arg); 123 ns16550_instance_t *ns16550_instance = ns16550_init(ns16550, inr, cir, 124 cir_arg, NULL); 120 125 if (ns16550_instance) { 121 126 kbrd_instance_t *kbrd_instance = kbrd_init(); -
kernel/arch/sparc64/src/drivers/pci.c
rbd6ff94 rb2fa1204 43 43 #include <typedefs.h> 44 44 #include <debug.h> 45 #include < print.h>45 #include <log.h> 46 46 #include <str.h> 47 47 #include <arch/asm.h> … … 213 213 * Unsupported model. 214 214 */ 215 printf("Unsupported PCI controller model (%s).\n",215 log(LF_ARCH, LVL_WARN, "Unsupported PCI controller model (%s).", 216 216 (char *) prop->value); 217 217 } -
kernel/arch/sparc64/src/drivers/scr.c
rbd6ff94 rb2fa1204 81 81 82 82 if (scr_type == SCR_UNKNOWN) { 83 printf("Unknown screen device.\n");83 log(LF_ARCH, LVL_ERROR, "Unknown screen device."); 84 84 return; 85 85 } … … 117 117 case SCR_ATYFB: 118 118 if (prop->size / sizeof(ofw_pci_reg_t) < 2) { 119 printf("Too few screen registers.\n");119 log(LF_ARCH, LVL_ERROR, "Too few screen registers."); 120 120 return; 121 121 } … … 124 124 125 125 if (!ofw_pci_reg_absolutize(node, pci_reg, &pci_abs_reg)) { 126 printf("Failed to absolutize fb register.\n"); 126 log(LF_ARCH, LVL_ERROR, 127 "Failed to absolutize fb register."); 127 128 return; 128 129 } … … 130 131 if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg, 131 132 &fb_addr)) { 132 printf("Failed to determine screen address.\n"); 133 log(LF_ARCH, LVL_ERROR, 134 "Failed to determine screen address."); 133 135 return; 134 136 } … … 152 154 break; 153 155 default: 154 printf("Unsupported bits per pixel.\n"); 156 log(LF_ARCH, LVL_ERROR, 157 "Unsupported bits per pixel."); 155 158 return; 156 159 } … … 159 162 case SCR_XVR: 160 163 if (prop->size / sizeof(ofw_pci_reg_t) < 2) { 161 printf("Too few screen registers.\n"); 164 log(LF_ARCH, LVL_ERROR, 165 "Too few screen registers."); 162 166 return; 163 167 } … … 166 170 167 171 if (!ofw_pci_reg_absolutize(node, pci_reg, &pci_abs_reg)) { 168 printf("Failed to absolutize fb register.\n"); 172 log(LF_ARCH, LVL_ERROR, 173 "Failed to absolutize fb register."); 169 174 return; 170 175 } … … 172 177 if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg, 173 178 &fb_addr)) { 174 printf("Failed to determine screen address.\n"); 179 log(LF_ARCH, LVL_ERROR, 180 "Failed to determine screen address."); 175 181 return; 176 182 } … … 196 202 break; 197 203 default: 198 printf("Unsupported bits per pixel.\n"); 204 log(LF_ARCH, LVL_ERROR, 205 "Unsupported bits per pixel."); 199 206 return; 200 207 } … … 207 214 upa_reg = &((ofw_upa_reg_t *) prop->value)[FFB_REG_24BPP]; 208 215 if (!ofw_upa_apply_ranges(node->parent, upa_reg, &fb_addr)) { 209 printf("Failed to determine screen address.\n"); 216 log(LF_ARCH, LVL_ERROR, 217 "Failed to determine screen address."); 210 218 return; 211 219 } … … 219 227 break; 220 228 default: 221 printf("Not implemented.\n");229 log(LF_ARCH, LVL_WARN, "Not implemented."); 222 230 return; 223 231 } … … 225 233 sbus_reg = &((ofw_sbus_reg_t *) prop->value)[0]; 226 234 if (!ofw_sbus_apply_ranges(node->parent, sbus_reg, &fb_addr)) { 227 printf("Failed to determine screen address.\n"); 235 log(LF_ARCH, LVL_ERROR, 236 "Failed to determine screen address."); 228 237 return; 229 238 } … … 233 242 case SCR_QEMU_VGA: 234 243 if (prop->size / sizeof(ofw_pci_reg_t) < 2) { 235 printf("Too few screen registers.\n");244 log(LF_ARCH, LVL_ERROR, "Too few screen registers."); 236 245 return; 237 246 } … … 240 249 241 250 if (!ofw_pci_reg_absolutize(node, pci_reg, &pci_abs_reg)) { 242 printf("Failed to absolutize fb register.\n"); 251 log(LF_ARCH, LVL_ERROR, 252 "Failed to absolutize fb register."); 243 253 return; 244 254 } … … 246 256 if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg, 247 257 &fb_addr)) { 248 printf("Failed to determine screen address.\n"); 258 log(LF_ARCH, LVL_ERROR, 259 "Failed to determine screen address."); 249 260 return; 250 261 } … … 268 279 break; 269 280 default: 270 printf("Unsupported bits per pixel.\n");281 log(LF_ARCH, LVL_ERROR, "Unsupported bits per pixel."); 271 282 return; 272 283 } -
kernel/arch/sparc64/src/mm/sun4v/tlb.c
rbd6ff94 rb2fa1204 46 46 #include <arch.h> 47 47 #include <print.h> 48 #include <log.h> 48 49 #include <typedefs.h> 49 50 #include <config.h> … … 335 336 void tlb_print(void) 336 337 { 337 printf("Operation not possible on Niagara.\n");338 log(LF_ARCH, LVL_WARN, "Operation not possible on Niagara."); 338 339 } 339 340 -
kernel/arch/sparc64/src/smp/sun4u/smp.c
rbd6ff94 rb2fa1204 43 43 #include <typedefs.h> 44 44 #include <synch/waitq.h> 45 #include < print.h>45 #include <log.h> 46 46 #include <arch/cpu_node.h> 47 47 … … 108 108 if (waitq_sleep_timeout(&ap_completion_wq, 1000000, SYNCH_FLAGS_NONE) == 109 109 ESYNCH_TIMEOUT) 110 printf("%s: waiting for processor (mid = %" PRIu32111 ") timed out \n", __func__, mid);110 log(LF_ARCH, LVL_NOTE, "%s: waiting for processor (mid = %" PRIu32 111 ") timed out", __func__, mid); 112 112 } 113 113 -
kernel/arch/sparc64/src/sun4v/md.c
rbd6ff94 rb2fa1204 36 36 #include <panic.h> 37 37 #include <func.h> 38 #include < print.h>38 #include <log.h> 39 39 #include <str.h> 40 40 #include <arch/sun4v/md.h> … … 310 310 retval = retval; 311 311 if (retval != HV_EOK) { 312 printf("Could not retrieve machine description,"313 " error=%" PRIu64 ".\n", retval);312 log(LF_ARCH, LVL_ERROR, "Could not retrieve machine " 313 "description, error=%" PRIu64 ".", retval); 314 314 } 315 315 } -
kernel/arch/sparc64/src/trap/sun4u/interrupt.c
rbd6ff94 rb2fa1204 42 42 #include <arch/asm.h> 43 43 #include <arch/barrier.h> 44 #include < print.h>44 #include <log.h> 45 45 #include <arch.h> 46 46 #include <mm/tlb.h> … … 96 96 */ 97 97 #ifdef CONFIG_DEBUG 98 printf("cpu%u: spurious interrupt (intrcv=%#" PRIx64 99 ", data0=%#" PRIx64 ")\n", CPU->id, intrcv, data0); 98 log(LF_ARCH, LVL_DEBUG, 99 "cpu%u: spurious interrupt (intrcv=%#" PRIx64 ", data0=%#" 100 PRIx64 ")", CPU->id, intrcv, data0); 100 101 #else 101 102 (void) intrcv; -
kernel/arch/sparc64/src/trap/sun4v/interrupt.c
rbd6ff94 rb2fa1204 42 42 #include <arch/asm.h> 43 43 #include <arch/barrier.h> 44 #include < print.h>44 #include <log.h> 45 45 #include <arch.h> 46 46 #include <mm/tlb.h> … … 111 111 ((void (*)(void)) data1)(); 112 112 } else { 113 printf("Spurious interrupt on %" PRIu64 ", data = %" PRIx64 ".\n",114 CPU->arch.id, data1);113 log(LF_ARCH, LVL_DEBUG, "Spurious interrupt on %" PRIu64 114 ", data = %" PRIx64 ".", CPU->arch.id, data1); 115 115 } 116 116 }
Note:
See TracChangeset
for help on using the changeset viewer.
