From patchwork Mon Feb 24 14:52:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 25202 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9619E2066C for ; Mon, 24 Feb 2014 14:54:19 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id x13sf2499516qcv.9 for ; Mon, 24 Feb 2014 06:54:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :list-archive:content-type:content-transfer-encoding; bh=wdmTjEBDOagZ/IGHFhitxRTG6z6ePYtCziiXnZXaCOE=; b=ZjPRpROrdGPtM1vjO3Xvu0Fc3ekTB1KO9qkIH33cu9C7mAy+v4iAXB4DYmawLsxebR f1NfYHLX0rcsY1I2Yv4Od9pGHulpetsldi1B5ZxO7nDXGaBU+uu5NIVVo+rJ6BEHoFj9 eRZWACBCdZWVSsEWuK5pwJgBXKOLkkbaEbjB+B4SP1/qpPAjeEkEoQ0Mz97parsadg3M ZlgJakZND3rTNnhp1bEqxowtLxA5ZMvmVbA4U9Fpm7rGZLfvcpTZC3ybBtDx9JfBIIBX PpA2a6neopre8fu5j+dxWXxLiAq77H3nPgfgHsqkTJ7VBc6JrCswLqQyH6j8XujY26c+ NZng== X-Gm-Message-State: ALoCoQlNGQmVBxqvO7ZIzJxWXs7Gh4OgGeL+sYhu2yMStkmY5l1IKRpfz/gENMELGeAYXHL3jinA X-Received: by 10.52.236.231 with SMTP id ux7mr9517544vdc.7.1393253659377; Mon, 24 Feb 2014 06:54:19 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.24.226 with SMTP id 89ls821080qgr.14.gmail; Mon, 24 Feb 2014 06:54:19 -0800 (PST) X-Received: by 10.52.27.9 with SMTP id p9mr10810616vdg.28.1393253659237; Mon, 24 Feb 2014 06:54:19 -0800 (PST) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id l2si5894538vcf.43.2014.02.24.06.54.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Feb 2014 06:54:19 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id ks9so5715830vcb.25 for ; Mon, 24 Feb 2014 06:54:19 -0800 (PST) X-Received: by 10.52.117.115 with SMTP id kd19mr10747241vdb.15.1393253658282; Mon, 24 Feb 2014 06:54:18 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp66776vcz; Mon, 24 Feb 2014 06:54:17 -0800 (PST) X-Received: by 10.140.102.69 with SMTP id v63mr28733204qge.5.1393253657760; Mon, 24 Feb 2014 06:54:17 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id g48si10055055qge.133.2014.02.24.06.54.17 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 24 Feb 2014 06:54:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WHwuG-0006FC-Uk; Mon, 24 Feb 2014 14:53:20 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WHwuF-0006De-2C for xen-devel@lists.xenproject.org; Mon, 24 Feb 2014 14:53:19 +0000 Received: from [85.158.137.68:28776] by server-5.bemta-3.messagelabs.com id 1E/CE-04712-EDC5B035; Mon, 24 Feb 2014 14:53:18 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-5.tower-31.messagelabs.com!1393253596!2599436!1 X-Originating-IP: [74.125.83.50] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 17717 invoked from network); 24 Feb 2014 14:53:16 -0000 Received: from mail-ee0-f50.google.com (HELO mail-ee0-f50.google.com) (74.125.83.50) by server-5.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 24 Feb 2014 14:53:16 -0000 Received: by mail-ee0-f50.google.com with SMTP id d17so3143959eek.37 for ; Mon, 24 Feb 2014 06:53:16 -0800 (PST) X-Received: by 10.14.216.193 with SMTP id g41mr25263766eep.13.1393253595761; Mon, 24 Feb 2014 06:53:15 -0800 (PST) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id x6sm64689130eew.20.2014.02.24.06.53.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Feb 2014 06:53:14 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 24 Feb 2014 14:52:52 +0000 Message-Id: <1393253572-7157-7-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1393253572-7157-1-git-send-email-julien.grall@linaro.org> References: <1393253572-7157-1-git-send-email-julien.grall@linaro.org> Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH v2 6/6] xen/arm: Replace early_{printk, panic} call to {printk, panic} call X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: Now that the console supports earlyprintk, we can get a rid of early_printk and early_panic calls. Signed-off-by: Julien Grall Acked-by: Ian Campbell --- Changes in v2: - Update commit title to reflect I also removed early_panic - Remove orphan early_panic in arm64 code - Remove asm/early_printk.h include where it's unecessary --- xen/arch/arm/early_printk.c | 33 --------------------------------- xen/arch/arm/mm.c | 5 ++--- xen/arch/arm/setup.c | 28 +++++++++++++--------------- xen/common/device_tree.c | 36 +++++++++++++----------------------- xen/drivers/char/dt-uart.c | 9 ++++----- xen/drivers/char/exynos4210-uart.c | 13 +++++-------- xen/drivers/char/omap-uart.c | 13 ++++++------- xen/drivers/char/pl011.c | 13 ++++++------- xen/drivers/video/arm_hdlcd.c | 29 ++++++++++++++--------------- xen/include/asm-arm/early_printk.h | 23 ----------------------- 10 files changed, 63 insertions(+), 139 deletions(-) diff --git a/xen/arch/arm/early_printk.c b/xen/arch/arm/early_printk.c index 8f5a94f..c85db69 100644 --- a/xen/arch/arm/early_printk.c +++ b/xen/arch/arm/early_printk.c @@ -14,14 +14,10 @@ #include #include #include -#include void early_putch(char c); void early_flush(void); -/* Early printk buffer */ -static char __initdata buf[512]; - void early_puts(const char *s) { while (*s != '\0') { @@ -37,32 +33,3 @@ void early_puts(const char *s) */ early_flush(); } - -static void __init early_vprintk(const char *fmt, va_list args) -{ - vsnprintf(buf, sizeof(buf), fmt, args); - early_puts(buf); -} - -void __init early_printk(const char *fmt, ...) -{ - va_list args; - - va_start(args, fmt); - early_vprintk(fmt, args); - va_end(args); -} - -void __attribute__((noreturn)) __init -early_panic(const char *fmt, ...) -{ - va_list args; - - va_start(args, fmt); - early_vprintk(fmt, args); - va_end(args); - - early_printk("\n\nEarly Panic: Stopping\n"); - - while(1); -} diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index 308a798..fba3856 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include @@ -649,8 +648,8 @@ void __init setup_xenheap_mappings(unsigned long base_mfn, xenheap_mfn_start = base_mfn; if ( base_mfn < xenheap_mfn_start ) - early_panic("cannot add xenheap mapping at %lx below heap start %lx", - base_mfn, xenheap_mfn_start); + panic("cannot add xenheap mapping at %lx below heap start %lx", + base_mfn, xenheap_mfn_start); end_mfn = base_mfn + nr_mfns; diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 9480f42..5434784 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -346,10 +345,10 @@ static paddr_t __init get_xen_paddr(void) } if ( !paddr ) - early_panic("Not enough memory to relocate Xen"); + panic("Not enough memory to relocate Xen"); - early_printk("Placing Xen at 0x%"PRIpaddr"-0x%"PRIpaddr"\n", - paddr, paddr + min_size); + printk("Placing Xen at 0x%"PRIpaddr"-0x%"PRIpaddr"\n", + paddr, paddr + min_size); early_info.modules.module[MOD_XEN].start = paddr; early_info.modules.module[MOD_XEN].size = min_size; @@ -371,7 +370,7 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size) void *fdt; if ( !early_info.mem.nr_banks ) - early_panic("No memory bank"); + panic("No memory bank"); /* * We are going to accumulate two regions here. @@ -430,8 +429,8 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size) if ( i != early_info.mem.nr_banks ) { - early_printk("WARNING: only using %d out of %d memory banks\n", - i, early_info.mem.nr_banks); + printk("WARNING: only using %d out of %d memory banks\n", + i, early_info.mem.nr_banks); early_info.mem.nr_banks = i; } @@ -465,14 +464,13 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size) } while ( xenheap_pages > 128<<(20-PAGE_SHIFT) ); if ( ! e ) - early_panic("Not not enough space for xenheap"); + panic("Not not enough space for xenheap"); domheap_pages = heap_pages - xenheap_pages; - early_printk("Xen heap: %"PRIpaddr"-%"PRIpaddr" (%lu pages)\n", - e - (pfn_to_paddr(xenheap_pages)), e, - xenheap_pages); - early_printk("Dom heap: %lu pages\n", domheap_pages); + printk("Xen heap: %"PRIpaddr"-%"PRIpaddr" (%lu pages)\n", + e - (pfn_to_paddr(xenheap_pages)), e, xenheap_pages); + printk("Dom heap: %lu pages\n", domheap_pages); setup_xenheap_mappings((e >> PAGE_SHIFT) - xenheap_pages, xenheap_pages); @@ -606,8 +604,8 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size) if ( bank != early_info.mem.nr_banks ) { - early_printk("WARNING: only using %d out of %d memory banks\n", - bank, early_info.mem.nr_banks); + printk("WARNING: only using %d out of %d memory banks\n", + bank, early_info.mem.nr_banks); early_info.mem.nr_banks = bank; } @@ -672,7 +670,7 @@ void __init start_xen(unsigned long boot_phys_offset, fdt_size = device_tree_early_init(device_tree_flattened, fdt_paddr); cmdline = device_tree_bootargs(device_tree_flattened); - early_printk("Command line: %s\n", cmdline); + printk("Command line: %s\n", cmdline); cmdline_parse(cmdline); setup_pagetables(boot_phys_offset, get_xen_paddr()); diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index 55716a8..c66d1d5 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -23,7 +23,6 @@ #include #include #include -#include struct dt_early_info __initdata early_info; const void *device_tree_flattened; @@ -54,16 +53,7 @@ struct dt_alias_prop { static LIST_HEAD(aliases_lookup); -/* Some device tree functions may be called both before and after the - console is initialized. */ -#define dt_printk(fmt, ...) \ - do \ - { \ - if ( system_state == SYS_STATE_early_boot ) \ - early_printk(fmt, ## __VA_ARGS__); \ - else \ - printk(fmt, ## __VA_ARGS__); \ - } while (0) +#define dt_printk(fmt, ...) printk(fmt, ## __VA_ARGS__); // #define DEBUG_DT @@ -316,7 +306,7 @@ static void __init process_memory_node(const void *fdt, int node, if ( address_cells < 1 || size_cells < 1 ) { - early_printk("fdt: node `%s': invalid #address-cells or #size-cells", + dt_printk("fdt: node `%s': invalid #address-cells or #size-cells", name); return; } @@ -324,7 +314,7 @@ static void __init process_memory_node(const void *fdt, int node, prop = fdt_get_property(fdt, node, "reg", NULL); if ( !prop ) { - early_printk("fdt: node `%s': missing `reg' property\n", name); + dt_printk("fdt: node `%s': missing `reg' property\n", name); return; } @@ -355,16 +345,16 @@ static void __init process_multiboot_node(const void *fdt, int node, else if ( fdt_node_check_compatible(fdt, node, "xen,linux-initrd") == 0) nr = MOD_INITRD; else - early_panic("%s not a known xen multiboot type\n", name); + panic("%s not a known xen multiboot type\n", name); mod = &early_info.modules.module[nr]; prop = fdt_get_property(fdt, node, "reg", &len); if ( !prop ) - early_panic("node %s missing `reg' property\n", name); + panic("node %s missing `reg' property\n", name); if ( len < dt_cells_to_size(address_cells + size_cells) ) - early_panic("fdt: node `%s': `reg` property length is too short\n", + panic("fdt: node `%s': `reg` property length is too short\n", name); cell = (const __be32 *)prop->data; @@ -375,7 +365,7 @@ static void __init process_multiboot_node(const void *fdt, int node, if ( prop ) { if ( len > sizeof(mod->cmdline) ) - early_panic("module %d command line too long\n", nr); + panic("module %d command line too long\n", nr); safe_strcpy(mod->cmdline, prop->data); } @@ -458,12 +448,12 @@ static void __init early_print_info(void) int i, nr_rsvd; for ( i = 0; i < mi->nr_banks; i++ ) - early_printk("RAM: %"PRIpaddr" - %"PRIpaddr"\n", + dt_printk("RAM: %"PRIpaddr" - %"PRIpaddr"\n", mi->bank[i].start, mi->bank[i].start + mi->bank[i].size - 1); - early_printk("\n"); + dt_printk("\n"); for ( i = 1 ; i < mods->nr_mods + 1; i++ ) - early_printk("MODULE[%d]: %"PRIpaddr" - %"PRIpaddr" %s\n", + dt_printk("MODULE[%d]: %"PRIpaddr" - %"PRIpaddr" %s\n", i, mods->module[i].start, mods->module[i].start + mods->module[i].size, @@ -476,10 +466,10 @@ static void __init early_print_info(void) continue; /* fdt_get_mem_rsv returns length */ e += s; - early_printk(" RESVD[%d]: %"PRIpaddr" - %"PRIpaddr"\n", + dt_printk(" RESVD[%d]: %"PRIpaddr" - %"PRIpaddr"\n", i, s, e); } - early_printk("\n"); + dt_printk("\n"); } /** @@ -495,7 +485,7 @@ size_t __init device_tree_early_init(const void *fdt, paddr_t paddr) ret = fdt_check_header(fdt); if ( ret < 0 ) - early_panic("No valid device tree\n"); + panic("No valid device tree\n"); mod = &early_info.modules.module[MOD_FDT]; mod->start = paddr; diff --git a/xen/drivers/char/dt-uart.c b/xen/drivers/char/dt-uart.c index d7204fb..fa92b5c 100644 --- a/xen/drivers/char/dt-uart.c +++ b/xen/drivers/char/dt-uart.c @@ -18,7 +18,6 @@ */ #include -#include #include #include #include @@ -44,7 +43,7 @@ void __init dt_uart_init(void) if ( !console_has("dtuart") || !strcmp(opt_dtuart, "") ) { - early_printk("No console\n"); + printk("No console\n"); return; } @@ -54,7 +53,7 @@ void __init dt_uart_init(void) else options = ""; - early_printk("Looking for UART console %s\n", devpath); + printk("Looking for UART console %s\n", devpath); if ( *devpath == '/' ) dev = dt_find_node_by_path(devpath); else @@ -62,12 +61,12 @@ void __init dt_uart_init(void) if ( !dev ) { - early_printk("Unable to find device \"%s\"\n", devpath); + printk("Unable to find device \"%s\"\n", devpath); return; } ret = device_init(dev, DEVICE_SERIAL, options); if ( ret ) - early_printk("Unable to initialize serial: %d\n", ret); + printk("Unable to initialize serial: %d\n", ret); } diff --git a/xen/drivers/char/exynos4210-uart.c b/xen/drivers/char/exynos4210-uart.c index 150d49b..d49e1fe 100644 --- a/xen/drivers/char/exynos4210-uart.c +++ b/xen/drivers/char/exynos4210-uart.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -314,9 +313,7 @@ static int __init exynos4210_uart_init(struct dt_device_node *dev, u64 addr, size; if ( strcmp(config, "") ) - { - early_printk("WARNING: UART configuration is not supported\n"); - } + printk("WARNING: UART configuration is not supported\n"); uart = &exynos4210_com; @@ -329,22 +326,22 @@ static int __init exynos4210_uart_init(struct dt_device_node *dev, res = dt_device_get_address(dev, 0, &addr, &size); if ( res ) { - early_printk("exynos4210: Unable to retrieve the base" - " address of the UART\n"); + printk("exynos4210: Unable to retrieve the base" + " address of the UART\n"); return res; } res = dt_device_get_irq(dev, 0, &uart->irq); if ( res ) { - early_printk("exynos4210: Unable to retrieve the IRQ\n"); + printk("exynos4210: Unable to retrieve the IRQ\n"); return res; } uart->regs = ioremap_nocache(addr, size); if ( !uart->regs ) { - early_printk("exynos4210: Unable to map the UART memory\n"); + printk("exynos4210: Unable to map the UART memory\n"); return -ENOMEM; } diff --git a/xen/drivers/char/omap-uart.c b/xen/drivers/char/omap-uart.c index b29f610..49ae1a4 100644 --- a/xen/drivers/char/omap-uart.c +++ b/xen/drivers/char/omap-uart.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -301,14 +300,14 @@ static int __init omap_uart_init(struct dt_device_node *dev, u64 addr, size; if ( strcmp(config, "") ) - early_printk("WARNING: UART configuration is not supported\n"); + printk("WARNING: UART configuration is not supported\n"); uart = &omap_com; res = dt_property_read_u32(dev, "clock-frequency", &clkspec); if ( !res ) { - early_printk("omap-uart: Unable to retrieve the clock frequency\n"); + printk("omap-uart: Unable to retrieve the clock frequency\n"); return -EINVAL; } @@ -321,22 +320,22 @@ static int __init omap_uart_init(struct dt_device_node *dev, res = dt_device_get_address(dev, 0, &addr, &size); if ( res ) { - early_printk("omap-uart: Unable to retrieve the base" - " address of the UART\n"); + printk("omap-uart: Unable to retrieve the base" + " address of the UART\n"); return res; } res = dt_device_get_irq(dev, 0, &uart->irq); if ( res ) { - early_printk("omap-uart: Unable to retrieve the IRQ\n"); + printk("omap-uart: Unable to retrieve the IRQ\n"); return res; } uart->regs = ioremap_nocache(addr, size); if ( !uart->regs ) { - early_printk("omap-uart: Unable to map the UART memory\n"); + printk("omap-uart: Unable to map the UART memory\n"); return -ENOMEM; } diff --git a/xen/drivers/char/pl011.c b/xen/drivers/char/pl011.c index fe99af6..90bf0c6 100644 --- a/xen/drivers/char/pl011.c +++ b/xen/drivers/char/pl011.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -107,7 +106,7 @@ static void __init pl011_init_preirq(struct serial_port *port) /* Baud rate already set: read it out from the divisor latch. */ divisor = (pl011_read(uart, IBRD) << 6) | (pl011_read(uart, FBRD)); if (!divisor) - early_panic("pl011: No Baud rate configured\n"); + panic("pl011: No Baud rate configured\n"); uart->baud = (uart->clock_hz << 2) / divisor; } /* This write must follow FBRD and IBRD writes. */ @@ -229,7 +228,7 @@ static int __init pl011_uart_init(struct dt_device_node *dev, if ( strcmp(config, "") ) { - early_printk("WARNING: UART configuration is not supported\n"); + printk("WARNING: UART configuration is not supported\n"); } uart = &pl011_com; @@ -243,22 +242,22 @@ static int __init pl011_uart_init(struct dt_device_node *dev, res = dt_device_get_address(dev, 0, &addr, &size); if ( res ) { - early_printk("pl011: Unable to retrieve the base" - " address of the UART\n"); + printk("pl011: Unable to retrieve the base" + " address of the UART\n"); return res; } res = dt_device_get_irq(dev, 0, &uart->irq); if ( res ) { - early_printk("pl011: Unable to retrieve the IRQ\n"); + printk("pl011: Unable to retrieve the IRQ\n"); return res; } uart->regs = ioremap_nocache(addr, size); if ( !uart->regs ) { - early_printk("pl011: Unable to map the UART memory\n"); + printk("pl011: Unable to map the UART memory\n"); return -ENOMEM; } diff --git a/xen/drivers/video/arm_hdlcd.c b/xen/drivers/video/arm_hdlcd.c index 647f22c..2a5f72e 100644 --- a/xen/drivers/video/arm_hdlcd.c +++ b/xen/drivers/video/arm_hdlcd.c @@ -25,7 +25,6 @@ #include #include #include -#include #include "font.h" #include "lfb.h" #include "modelines.h" @@ -123,21 +122,21 @@ void __init video_init(void) if ( !dev ) { - early_printk("HDLCD: Cannot find node compatible with \"arm,hdcld\"\n"); + printk("HDLCD: Cannot find node compatible with \"arm,hdcld\"\n"); return; } res = dt_device_get_address(dev, 0, &hdlcd_start, &hdlcd_size); if ( !res ) { - early_printk("HDLCD: Unable to retrieve MMIO base address\n"); + printk("HDLCD: Unable to retrieve MMIO base address\n"); return; } cells = dt_get_property(dev, "framebuffer", &lenp); if ( !cells ) { - early_printk("HDLCD: Unable to retrieve framebuffer property\n"); + printk("HDLCD: Unable to retrieve framebuffer property\n"); return; } @@ -146,13 +145,13 @@ void __init video_init(void) if ( !hdlcd_start ) { - early_printk(KERN_ERR "HDLCD: address missing from device tree, disabling driver\n"); + printk(KERN_ERR "HDLCD: address missing from device tree, disabling driver\n"); return; } if ( !framebuffer_start ) { - early_printk(KERN_ERR "HDLCD: framebuffer address missing from device tree, disabling driver\n"); + printk(KERN_ERR "HDLCD: framebuffer address missing from device tree, disabling driver\n"); return; } @@ -166,13 +165,13 @@ void __init video_init(void) else if ( strlen(mode_string) < strlen("800x600@60") || strlen(mode_string) > sizeof(_mode_string) - 1 ) { - early_printk(KERN_ERR "HDLCD: invalid modeline=%s\n", mode_string); + printk(KERN_ERR "HDLCD: invalid modeline=%s\n", mode_string); return; } else { char *s = strchr(mode_string, '-'); if ( !s ) { - early_printk(KERN_INFO "HDLCD: bpp not found in modeline %s, assume 32 bpp\n", + printk(KERN_INFO "HDLCD: bpp not found in modeline %s, assume 32 bpp\n", mode_string); get_color_masks("32", &c); memcpy(_mode_string, mode_string, strlen(mode_string) + 1); @@ -180,13 +179,13 @@ void __init video_init(void) } else { if ( strlen(s) < 6 ) { - early_printk(KERN_ERR "HDLCD: invalid mode %s\n", mode_string); + printk(KERN_ERR "HDLCD: invalid mode %s\n", mode_string); return; } s++; if ( get_color_masks(s, &c) < 0 ) { - early_printk(KERN_WARNING "HDLCD: unsupported bpp %s\n", s); + printk(KERN_WARNING "HDLCD: unsupported bpp %s\n", s); return; } bytes_per_pixel = simple_strtoll(s, NULL, 10) / 8; @@ -205,23 +204,23 @@ void __init video_init(void) } if ( !videomode ) { - early_printk(KERN_WARNING "HDLCD: unsupported videomode %s\n", - _mode_string); + printk(KERN_WARNING "HDLCD: unsupported videomode %s\n", + _mode_string); return; } if ( framebuffer_size < bytes_per_pixel * videomode->xres * videomode->yres ) { - early_printk(KERN_ERR "HDLCD: the framebuffer is too small, disabling the HDLCD driver\n"); + printk(KERN_ERR "HDLCD: the framebuffer is too small, disabling the HDLCD driver\n"); return; } - early_printk(KERN_INFO "Initializing HDLCD driver\n"); + printk(KERN_INFO "Initializing HDLCD driver\n"); lfb = ioremap_wc(framebuffer_start, framebuffer_size); if ( !lfb ) { - early_printk(KERN_ERR "Couldn't map the framebuffer\n"); + printk(KERN_ERR "Couldn't map the framebuffer\n"); return; } memset(lfb, 0x00, bytes_per_pixel * videomode->xres * videomode->yres); diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h index 2e8c18a..8c3d6a8 100644 --- a/xen/include/asm-arm/early_printk.h +++ b/xen/include/asm-arm/early_printk.h @@ -18,29 +18,6 @@ #define EARLY_UART_VIRTUAL_ADDRESS \ (FIXMAP_ADDR(FIXMAP_CONSOLE) +(EARLY_UART_BASE_ADDRESS & ~PAGE_MASK)) -#endif - -#ifndef __ASSEMBLY__ - -#ifdef CONFIG_EARLY_PRINTK - -void early_printk(const char *fmt, ...) - __attribute__((format (printf, 1, 2))); -void early_panic(const char *fmt, ...) __attribute__((noreturn)) - __attribute__((format (printf, 1, 2))); - -#else - -static inline __attribute__((format (printf, 1, 2))) void -early_printk(const char *fmt, ...) -{} - -static inline void __attribute__((noreturn)) -__attribute__((format (printf, 1, 2))) early_panic(const char *fmt, ...) -{while(1);} - #endif /* !CONFIG_EARLY_PRINTK */ -#endif /* __ASSEMBLY__ */ - #endif