Re: Section mismatches in drivers/video/console/promcon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2007-06-02 at 14:42 +0200, Sam Ravnborg wrote:
> Building a kernel for sparc64 defconfig gave me following warnings:
> WARNING: drivers/built-in.o(.text+0xb788): Section mismatch: reference to .init.data:promfont_unitable (between 'promcon_init_unimap' and 'promcon_init')
> WARNING: drivers/built-in.o(.text+0xb790): Section mismatch: reference to .init.data:promfont_unitable (between 'promcon_init_unimap' and 'promcon_init')
> WARNING: drivers/built-in.o(.text+0xb794): Section mismatch: reference to .init.data:promfont_unicount (between 'promcon_init_unimap' and 'promcon_init')
> WARNING: drivers/built-in.o(.text+0xb798): Section mismatch: reference to .init.data:promfont_unicount (between 'promcon_init_unimap' and 'promcon_init')
> 
> The warnings happens because the function: promcon_init_unimap()
> references promfont_unitable and promfont_unicount which are marked
> __initdata by the conmakehash command in the drivers/video/console/Makefile
> 
> The function promcon_init_unimap() are referenced in two places:
> 1) In prom_con_init() which is marked __init => no problem.
> 2) In promcon_init() which is not marked __init => warning.
> The actual code is here:
> 	if (!promcon_uni_pagedir[0] && p) {
> 		promcon_init_unimap(conp);
> 	}
> 

>  could not from the code judge if promcon_init_unimap is really
> only used during early init or this is a bug.

promcon_init() can be called again from visual_init() during
vc_allocate().  So anything referenced by promcon_init() should not be
marked __init.

Although, if you want to keep promfont_unitable and promfont_unicount
__init, you can probably use con_copy_unimap() using the default vc as
the source instead of doing a promcon_init_unimap() again.

Tony


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux