All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Matt Fleming <matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
Cc: matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
	x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] ignore ,keep for efi earlyprintk
Date: Sat, 26 Apr 2014 15:28:21 +0800	[thread overview]
Message-ID: <20140426072821.GA2286@darkstar.redhat.com> (raw)
In-Reply-To: <20140425115345.GC26088-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>

On 04/25/14 at 12:53pm, Matt Fleming wrote:
> On Thu, 24 Apr, at 05:36:58PM, Dave Young wrote:
> > earlyprint=efi,keep results a kernel hang after "Freeing unused kernel memory"
>  
> Are you sure it hangs and it's not just that nothing is output to the
> console after that point?

There's other kernel messages without appending ,keep.

Also console=ttyS0 does not work with earlyprintk=efi,keep, removing ,keep it works well.

> 
> > Actually efi earlyprintk is using __init functions such as early_ioremap etc.
> > Thus efi earlyconsole can not be kept.
>  
> Urgh, good point, that's a bug. However I'm sure I've had this working
> in the past and have in fact used it to debug stuff.
> 
> Could you try and fix this up so it works with 'keep'?

Will do. I want use ioremap when it is available but it's hard to decide
where to add the code.

I'm thinking to do below:
1. ioremap the whole framebuffer like: efi_fb = ioremap(lfb_base, lfb_size) in the
   function efi_enter_virtual_mode because ioremap should be usable then.

2. add two functions for earlyprintk use (scrollup, write, etc.) 
__init_refok void * get_vaddr(unsigned long start, unsigned long len)
{
	unsigned long base;

	base = boot_params.screen_info.lfb_base;
	if (efi_fb)
		return (efi_fb + start - base);
	else
		return early_ioremap(start, len);
}

__init_refok void put_vaddr(void *addr, unsigned long len)
{
	if (!efi_fb)
		early_iounmap(addr, len);
}

But it does not sound good to add the ioremap in enter virtual mode funtion.   

Please help if you have any other better idea.

Thanks
Dave

WARNING: multiple messages have this Message-ID (diff)
From: Dave Young <dyoung@redhat.com>
To: Matt Fleming <matt@console-pimps.org>
Cc: matt.fleming@intel.com, hpa@zytor.com, akpm@linux-foundation.org,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	linux-efi@vger.kernel.org
Subject: Re: [PATCH] ignore ,keep for efi earlyprintk
Date: Sat, 26 Apr 2014 15:28:21 +0800	[thread overview]
Message-ID: <20140426072821.GA2286@darkstar.redhat.com> (raw)
In-Reply-To: <20140425115345.GC26088@console-pimps.org>

On 04/25/14 at 12:53pm, Matt Fleming wrote:
> On Thu, 24 Apr, at 05:36:58PM, Dave Young wrote:
> > earlyprint=efi,keep results a kernel hang after "Freeing unused kernel memory"
>  
> Are you sure it hangs and it's not just that nothing is output to the
> console after that point?

There's other kernel messages without appending ,keep.

Also console=ttyS0 does not work with earlyprintk=efi,keep, removing ,keep it works well.

> 
> > Actually efi earlyprintk is using __init functions such as early_ioremap etc.
> > Thus efi earlyconsole can not be kept.
>  
> Urgh, good point, that's a bug. However I'm sure I've had this working
> in the past and have in fact used it to debug stuff.
> 
> Could you try and fix this up so it works with 'keep'?

Will do. I want use ioremap when it is available but it's hard to decide
where to add the code.

I'm thinking to do below:
1. ioremap the whole framebuffer like: efi_fb = ioremap(lfb_base, lfb_size) in the
   function efi_enter_virtual_mode because ioremap should be usable then.

2. add two functions for earlyprintk use (scrollup, write, etc.) 
__init_refok void * get_vaddr(unsigned long start, unsigned long len)
{
	unsigned long base;

	base = boot_params.screen_info.lfb_base;
	if (efi_fb)
		return (efi_fb + start - base);
	else
		return early_ioremap(start, len);
}

__init_refok void put_vaddr(void *addr, unsigned long len)
{
	if (!efi_fb)
		early_iounmap(addr, len);
}

But it does not sound good to add the ioremap in enter virtual mode funtion.   

Please help if you have any other better idea.

Thanks
Dave

  parent reply	other threads:[~2014-04-26  7:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-24  9:36 [PATCH] ignore ,keep for efi earlyprintk Dave Young
2014-04-24 10:45 ` Ingo Molnar
2014-04-25  1:53   ` Dave Young
     [not found] ` <20140424093658.GA7158-je1gSBvt1Tc/CGXRbJeUwh/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2014-04-25 11:53   ` Matt Fleming
2014-04-25 11:53     ` Matt Fleming
     [not found]     ` <20140425115345.GC26088-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-04-26  7:28       ` Dave Young [this message]
2014-04-26  7:28         ` Dave Young
     [not found]         ` <20140426072821.GA2286-4/PLUo9XfK/1wF9wiOj0lkEOCMrvLtNR@public.gmane.org>
2014-04-29  9:45           ` Matt Fleming
2014-04-29  9:45             ` Matt Fleming
     [not found]             ` <20140429094539.GD26088-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-04-29 10:03               ` Dave Young
2014-04-29 10:03                 ` Dave Young
2014-04-29 10:21               ` Thomas Gleixner
2014-04-29 10:21                 ` Thomas Gleixner
     [not found]                 ` <alpine.DEB.2.02.1404291217380.6261-3cz04HxQygjZikZi3RtOZ1XZhhPuCNm+@public.gmane.org>
2014-04-30  1:12                   ` Dave Young
2014-04-30  1:12                     ` Dave Young

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140426072821.GA2286@darkstar.redhat.com \
    --to=dyoung-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org \
    --cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.