All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@gmail.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: jakub@redhat.com, Jan Engelhardt <jengelh@linux01.gwdg.de>,
	daplas@gmail.com, LKML <linux-kernel@vger.kernel.org>
Subject: Re: Section mismatches in drivers/video/console/promcon
Date: Sat, 02 Jun 2007 21:24:43 +0800	[thread overview]
Message-ID: <1180790683.4524.13.camel@daplas> (raw)
In-Reply-To: <20070602124255.GA10119@uranus.ravnborg.org>

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



  parent reply	other threads:[~2007-06-02 13:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-02 12:42 Section mismatches in drivers/video/console/promcon Sam Ravnborg
2007-06-02 12:58 ` Jan Engelhardt
2007-06-02 13:24 ` Antonino A. Daplas [this message]
2007-06-02 19:16   ` Sam Ravnborg
2007-06-05  6:53     ` David Miller
2007-06-05  8:05       ` Sam Ravnborg
2007-06-05 10:52       ` Antonino A. Daplas

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=1180790683.4524.13.camel@daplas \
    --to=adaplas@gmail.com \
    --cc=daplas@gmail.com \
    --cc=jakub@redhat.com \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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.