From patchwork Tue Sep 10 14:48:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 19912 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5219B25EA3 for ; Tue, 10 Sep 2013 14:49:36 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id z20sf8792628yhz.7 for ; Tue, 10 Sep 2013 07:49:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=0QSIFAE4KfKuqiUluYSrQSZ2QFcoqpD8iRcocHLn8+M=; b=h/CbCJsftgc4M0XkGdB08uxH3+opXiOA5S7FSJ44udGupCxukA+jRfvqiL5tzmOzGZ Fmu2HQrkrJ7RAh9QEQc771L3Thu37IKMHpKiD1BEvUMM6UdPsxvAW6OST/9k4mX/sA7U NY6DXk2Jf2vUMnVfKoO06CBXSL2IvgpU1GHLOg+klKZIslCRrdY+fQVycxuxU3G/ytKb DjKLpco15qQ7OtarwcrTmRn1Rq4mZIeYepnAfphD4NTHwSNXUt/tZTZ/nK3CozVbMzqD Nf3LZ4GkT2G8CPBdKcMjBQzIihVrz00N8ZKBck9TZ3sXwqVAvMQbwbAQ1UyU3o+Kf+pH rkJw== X-Received: by 10.236.189.37 with SMTP id b25mr3168987yhn.48.1378824575916; Tue, 10 Sep 2013 07:49:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.109.226 with SMTP id hv2ls2360644qeb.22.gmail; Tue, 10 Sep 2013 07:49:35 -0700 (PDT) X-Received: by 10.220.105.199 with SMTP id u7mr22793814vco.1.1378824575684; Tue, 10 Sep 2013 07:49:35 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id mu5si4530630vec.65.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 07:49:35 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.171 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.171; Received: by mail-vc0-f171.google.com with SMTP id ij15so5273807vcb.30 for ; Tue, 10 Sep 2013 07:49:35 -0700 (PDT) X-Gm-Message-State: ALoCoQm+DJNxlBQfZ9NsZpwiEBjLzfmmClGyRnSDzCxmSrQk6wVFrgm7BFLnI+WU4jEF0XZxvj/b X-Received: by 10.52.165.237 with SMTP id zb13mr1489319vdb.28.1378824575593; Tue, 10 Sep 2013 07:49:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp4659vcz; Tue, 10 Sep 2013 07:49:34 -0700 (PDT) X-Received: by 10.14.109.201 with SMTP id s49mr4636416eeg.54.1378824574509; Tue, 10 Sep 2013 07:49:34 -0700 (PDT) Received: from mail-ee0-f42.google.com (mail-ee0-f42.google.com [74.125.83.42]) by mx.google.com with ESMTPS id h5si15330448eeg.80.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 07:49:34 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.42 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=74.125.83.42; Received: by mail-ee0-f42.google.com with SMTP id b45so3950634eek.15 for ; Tue, 10 Sep 2013 07:49:33 -0700 (PDT) X-Received: by 10.14.211.4 with SMTP id v4mr2822540eeo.81.1378824573806; Tue, 10 Sep 2013 07:49:33 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id i1sm31911644eeg.0.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 07:49:33 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com, patches@linaro.org, andre.przywara@linaro.org, Julien Grall Subject: [PATCH v3 10/27] xen/video: hdlcd: Use early_printk instead of printk Date: Tue, 10 Sep 2013 15:48:58 +0100 Message-Id: <1378824555-16564-11-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1378824555-16564-1-git-send-email-julien.grall@linaro.org> References: <1378824555-16564-1-git-send-email-julien.grall@linaro.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.171 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 Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The video driver is initialized before the console is correctly set up. Therefore, printk will never output if there is no serial configured. Signed-off-by: Julien Grall --- xen/drivers/video/arm_hdlcd.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/xen/drivers/video/arm_hdlcd.c b/xen/drivers/video/arm_hdlcd.c index ab464c6..dffda9a 100644 --- a/xen/drivers/video/arm_hdlcd.c +++ b/xen/drivers/video/arm_hdlcd.c @@ -146,13 +146,13 @@ void __init video_init(void) if ( !hdlcd_start ) { - printk(KERN_ERR "HDLCD address missing from device tree, disabling driver\n"); + early_printk(KERN_ERR "HDLCD: address missing from device tree, disabling driver\n"); return; } if ( !hdlcd_start || !framebuffer_start ) { - printk(KERN_ERR "HDLCD: framebuffer address missing from device tree, disabling driver\n"); + early_printk(KERN_ERR "HDLCD: framebuffer address missing from device tree, disabling driver\n"); return; } @@ -166,27 +166,27 @@ void __init video_init(void) else if ( strlen(mode_string) < strlen("800x600@60") || strlen(mode_string) > sizeof(_mode_string) - 1 ) { - printk(KERN_ERR "HDLCD: invalid modeline=%s\n", mode_string); + early_printk(KERN_ERR "HDLCD: invalid modeline=%s\n", mode_string); return; } else { char *s = strchr(mode_string, '-'); if ( !s ) { - printk(KERN_INFO "HDLCD: bpp not found in modeline %s, assume 32 bpp\n", - mode_string); + early_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); bytes_per_pixel = 4; } else { if ( strlen(s) < 6 ) { - printk(KERN_ERR "HDLCD: invalid mode %s\n", mode_string); + early_printk(KERN_ERR "HDLCD: invalid mode %s\n", mode_string); return; } s++; if ( get_color_masks(s, &c) < 0 ) { - printk(KERN_WARNING "HDLCD: unsupported bpp %s\n", s); + early_printk(KERN_WARNING "HDLCD: unsupported bpp %s\n", s); return; } bytes_per_pixel = simple_strtoll(s, NULL, 10) / 8; @@ -205,22 +205,23 @@ void __init video_init(void) } if ( !videomode ) { - printk(KERN_WARNING "HDLCD: unsupported videomode %s\n", _mode_string); + early_printk(KERN_WARNING "HDLCD: unsupported videomode %s\n", + _mode_string); return; } if ( framebuffer_size < bytes_per_pixel * videomode->xres * videomode->yres ) { - printk(KERN_ERR "HDLCD: the framebuffer is too small, disabling the HDLCD driver\n"); + early_printk(KERN_ERR "HDLCD: the framebuffer is too small, disabling the HDLCD driver\n"); return; } - printk(KERN_INFO "Initializing HDLCD driver\n"); + early_printk(KERN_INFO "Initializing HDLCD driver\n"); lfb = ioremap_wc(framebuffer_start, framebuffer_size); if ( !lfb ) { - printk(KERN_ERR "Couldn't map the framebuffer\n"); + early_printk(KERN_ERR "Couldn't map the framebuffer\n"); return; } memset(lfb, 0x00, bytes_per_pixel * videomode->xres * videomode->yres);