lkml.org 
[lkml]   [2012]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] PCDP: use early_ioremap/early_iounmap to access pcdp table
From
Date
On Wed, 2012-07-18 at 16:19 -0600, Greg Pearson wrote:
> --- a/drivers/firmware/pcdp.c
> +++ b/drivers/firmware/pcdp.c
> @@ -95,7 +95,7 @@ efi_setup_pcdp_console(char *cmdline)
> if (efi.hcdp == EFI_INVALID_TABLE_ADDR)
> return -ENODEV;
>
> - pcdp = ioremap(efi.hcdp, 4096);
> + pcdp = early_ioremap(efi.hcdp, 4096);

While we are fixing this code up, mapping 4K blindly just does not feel
right to me. Trouble here is that the length of PCDP table is buried in
the header for PCDP table and we can not read it unless we map the table
in. We get the address for PCDP table from the EFI system table which
was mapped in earlier and pointers to various tables were extracted at
that point. So this is a chicken and egg problem. Any ideas if we can do
better than blindly mapping 4K?

--
Khalid Aziz <khalid.aziz@hp.com>



\
 
 \ /
  Last update: 2012-07-19 18:21    [W:0.043 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site