static void __init do_initcalls(void) { initcall_t *call; int count = preempt_count(); for (call = __initcall_start; call < __initcall_end; call++) { ktime_t t0, t1, delta; char *msg = NULL; char msgbuf[40]; int result; wbd222_wdt_touch(); if (initcall_debug) { printk("Calling initcall 0x%p", *call); print_fn_descriptor_symbol(": %s()", (unsigned long) *call); printk("\n"); t0 = ktime_get(); } result = (*call)(); if (initcall_debug) { t1 = ktime_get(); delta = ktime_sub(t1, t0); printk("initcall 0x%p", *call); print_fn_descriptor_symbol(": %s()", (unsigned long) *call); printk(" returned %d.\n", result); printk("initcall 0x%p ran for %Ld msecs: ", *call, (unsigned long long)delta.tv64 >> 20); print_fn_descriptor_symbol("%s()\n", (unsigned long) *call); } if (result && result != -ENODEV && initcall_debug) { sprintf(msgbuf, "error code %d", result); msg = msgbuf; } if (preempt_count() != count) { msg = "preemption imbalance"; preempt_count() = count; } if (irqs_disabled()) { msg = "disabled interrupts"; local_irq_enable(); } if (msg) { printk(KERN_WARNING "initcall at 0x%p", *call); print_fn_descriptor_symbol(": %s()", (unsigned long) *call); printk(": returned with %s\n", msg); } } /* Make sure there is no pending stuff from the initcall sequence */ flush_scheduled_work(); }
static void __init do_initcalls(void) { initcall_t *call; int count = preempt_count(); for (call = __initcall_start; call < __initcall_end; call++) { char *msg = NULL; char msgbuf[40]; int result; if (initcall_debug) { printk("Calling initcall 0x%p", *call); print_fn_descriptor_symbol(": %s()", (unsigned long) *call); printk("\n"); } result = (*call)(); if (result && result != -ENODEV && initcall_debug) { sprintf(msgbuf, "error code %d", result); msg = msgbuf; } if (preempt_count() != count) { msg = "preemption imbalance"; preempt_count() = count; } if (irqs_disabled()) { msg = "disabled interrupts"; local_irq_enable(); } #ifdef CONFIG_PREEMPT_RT if (irqs_disabled()) { msg = "disabled hard interrupts"; local_irq_enable(); } #endif if (msg) { printk(KERN_WARNING "initcall at 0x%p", *call); print_fn_descriptor_symbol(": %s()", (unsigned long) *call); printk(": returned with %s\n", msg); } } /* Make sure there is no pending stuff from the initcall sequence */ flush_scheduled_work(); }
static void __init do_one_initcall(initcall_t fn) { int count = preempt_count(); int result; if (initcall_debug) result = do_one_initcall_debug(fn); else result = fn(); msgbuf[0] = 0; if (result && result != -ENODEV && initcall_debug) sprintf(msgbuf, "error code %d ", result); if (preempt_count() != count) { strncat(msgbuf, "preemption imbalance ", sizeof(msgbuf)); preempt_count() = count; } if (irqs_disabled()) { strncat(msgbuf, "disabled interrupts ", sizeof(msgbuf)); local_irq_enable(); } if (msgbuf[0]) { print_fn_descriptor_symbol(KERN_WARNING "initcall %s", fn); printk(" returned with %s\n", msgbuf); } }
static int do_one_initcall_debug(initcall_t fn) { ktime_t t0, t1, delta; int ret; print_fn_descriptor_symbol("calling %s\n", fn); t0 = ktime_get(); ret = fn(); t1 = ktime_get(); delta = ktime_sub(t1, t0); print_fn_descriptor_symbol("initcall %s", fn); printk(" returned %d after %Ld msecs\n", ret, (unsigned long long) delta.tv64 >> 20); return ret; }
static void __init do_initcalls(void) { initcall_t *call; int count = preempt_count(); for (call = __initcall_start; call < __initcall_end; call++) { char *msg; if (initcall_debug) { printk(KERN_DEBUG "Calling initcall 0x%p", *call); print_fn_descriptor_symbol(": %s()", (unsigned long) *call); printk("\n"); } (*call)(); msg = NULL; if (preempt_count() != count) { msg = "preemption imbalance"; preempt_count() = count; } if (irqs_disabled()) { msg = "disabled interrupts"; local_irq_enable(); } if (msg) { printk(KERN_WARNING "error in initcall at 0x%p: " "returned with %s\n", *call, msg); } } /* Make sure there is no pending stuff from the initcall sequence */ flush_scheduled_work(); }
void pnp_fixup_device(struct pnp_dev *dev) { struct pnp_fixup *f; for (f = pnp_fixups; *f->id; f++) { if (!compare_pnp_id(dev->id, f->id)) continue; #ifdef DEBUG dev_dbg(&dev->dev, "%s: calling ", f->id); print_fn_descriptor_symbol("%s\n", f->quirk_function); #endif f->quirk_function(dev); } }
static void __init call_initcall_list(struct initcall_info* initcall_list) { struct initcall_info* cur=NULL; initcall_t call=NULL; int count=preempt_count(); for(cur=initcall_list; cur!=NULL; cur=cur->next){ char* msg; call=cur->fn; if (initcall_debug) { printk(KERN_DEBUG "Calling initcall %p", call); print_fn_descriptor_symbol(": %s()", (unsigned long) call); printk("\n"); } #ifdef INITCALL_DEBUG printk("%s\n",cur->name); #endif call(); msg = NULL; if (preempt_count() != count) { msg = "preemption imbalance"; preempt_count() = count; } if (irqs_disabled()) { msg = "disabled interrupts"; local_irq_enable(); } if (msg) { printk(KERN_WARNING "error in initcall at 0x%p: " "returned with %s\n", *call, msg); } } }