All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 5/8] clk: don't mark clkdev_add_table as init
Date: Fri, 12 Oct 2012 11:05:09 +0000	[thread overview]
Message-ID: <201210121105.09517.arnd@arndb.de> (raw)
In-Reply-To: <20121012091535.GD21164@n2100.arm.linux.org.uk>

On Friday 12 October 2012, Russell King - ARM Linux wrote:
> On Tue, Oct 09, 2012 at 10:13:55PM +0200, Arnd Bergmann wrote:
> > s3c2440_clk_add is a subsys_interface method and calls clkdev_add_table,
> > which means we might be calling it after the __init section is
> > discarded.
> > 
> > Without this patch, building mini2440_defconfig results in:
> > 
> > WARNING: vmlinux.o(.text+0x9848): Section mismatch in reference from the function s3c2440_clk_add() to the function .init.text:clkdev_add_table()
> > The function s3c2440_clk_add() references
> > the function __init clkdev_add_table().
> > This is often because s3c2440_clk_add lacks a __init
> > annotation or the annotation of clkdev_add_table is wrong.
> 
> I'm not sure this is the right thing to do.  I suspect this comes from the
> stupidly complex samsung code, and that this is actually safe - I suspect
> that s3c2440_clk_add() needs to be appropriately marked, but then you end
> up having to trace its call path through various structures etc.

Yes, you are right. I have verified now that the only code path into
s3c2440_clk_add() is from "int __init s3c2440_init(void)", so 
s3c2440_clk_add can be marked __init_refok.

I'll follow up with a new patch to replace this one.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: "Russell King - ARM Linux" <linux@arm.linux.org.uk>
Cc: arm@kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Mike Turquette <mturquette@linaro.org>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Ben Dooks <ben-linux@fluff.org>
Subject: Re: [PATCH v2 5/8] clk: don't mark clkdev_add_table as init
Date: Fri, 12 Oct 2012 11:05:09 +0000	[thread overview]
Message-ID: <201210121105.09517.arnd@arndb.de> (raw)
In-Reply-To: <20121012091535.GD21164@n2100.arm.linux.org.uk>

On Friday 12 October 2012, Russell King - ARM Linux wrote:
> On Tue, Oct 09, 2012 at 10:13:55PM +0200, Arnd Bergmann wrote:
> > s3c2440_clk_add is a subsys_interface method and calls clkdev_add_table,
> > which means we might be calling it after the __init section is
> > discarded.
> > 
> > Without this patch, building mini2440_defconfig results in:
> > 
> > WARNING: vmlinux.o(.text+0x9848): Section mismatch in reference from the function s3c2440_clk_add() to the function .init.text:clkdev_add_table()
> > The function s3c2440_clk_add() references
> > the function __init clkdev_add_table().
> > This is often because s3c2440_clk_add lacks a __init
> > annotation or the annotation of clkdev_add_table is wrong.
> 
> I'm not sure this is the right thing to do.  I suspect this comes from the
> stupidly complex samsung code, and that this is actually safe - I suspect
> that s3c2440_clk_add() needs to be appropriately marked, but then you end
> up having to trace its call path through various structures etc.

Yes, you are right. I have verified now that the only code path into
s3c2440_clk_add() is from "int __init s3c2440_init(void)", so 
s3c2440_clk_add can be marked __init_refok.

I'll follow up with a new patch to replace this one.

	Arnd

  reply	other threads:[~2012-10-12 11:05 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-09 20:13 [PATCH v2 0/8] ARM: mostly harmless gcc warnings Arnd Bergmann
2012-10-09 20:13 ` Arnd Bergmann
2012-10-09 20:13 ` Arnd Bergmann
2012-10-09 20:13 ` Arnd Bergmann
2012-10-09 20:13 ` [PATCH v2 1/8] SCSI: ARM: ncr5380/oak uses no interrupts Arnd Bergmann
2012-10-09 20:13   ` Arnd Bergmann
2012-10-09 20:13 ` [PATCH v2 2/8] SCSI: ARM: make fas216_dumpinfo function conditional Arnd Bergmann
2012-10-09 20:13   ` Arnd Bergmann
2012-10-09 20:13 ` [PATCH v2 3/8] mm/slob: use min_t() to compare ARCH_SLAB_MINALIGN Arnd Bergmann
2012-10-09 20:13   ` Arnd Bergmann
2012-10-09 20:13 ` [PATCH v2 4/8] USB: EHCI: mark ehci_orion_conf_mbus_windows __devinit Arnd Bergmann
2012-10-09 20:13   ` Arnd Bergmann
2012-10-09 20:13 ` [PATCH v2 5/8] clk: don't mark clkdev_add_table as init Arnd Bergmann
2012-10-09 20:13   ` Arnd Bergmann
2012-10-12  9:15   ` Russell King - ARM Linux
2012-10-12  9:15     ` Russell King - ARM Linux
2012-10-12 11:05     ` Arnd Bergmann [this message]
2012-10-12 11:05       ` Arnd Bergmann
2012-10-09 20:13 ` [PATCH v2 6/8] pcmcia: sharpsl: don't discard sharpsl_pcmcia_ops Arnd Bergmann
2012-10-09 20:13   ` Arnd Bergmann
2012-10-09 20:13 ` [PATCH v2 7/8] video: mark nuc900fb_map_video_memory as __devinit Arnd Bergmann
2012-10-09 20:13   ` Arnd Bergmann
2012-10-09 20:13   ` Arnd Bergmann
2012-10-10  1:41   ` Wan ZongShun
2012-10-10  1:41     ` Wan ZongShun
2012-10-10  1:41     ` Wan ZongShun
2012-10-10 12:36   ` Florian Tobias Schandinat
2012-10-10 12:36     ` Florian Tobias Schandinat
2012-10-10 12:36     ` Florian Tobias Schandinat
     [not found] ` <1349813638-4617-1-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
2012-10-09 20:13   ` [PATCH v2 v2 v2 8/8] spi/s3c64xx: use correct dma_transfer_direction type Arnd Bergmann
2012-10-09 20:13     ` Arnd Bergmann
2012-10-09 20:13     ` Arnd Bergmann
2012-10-17  8:11     ` Kukjin Kim
2012-10-17  8:11       ` Kukjin Kim
2012-10-17 13:27       ` Arnd Bergmann
2012-10-17 13:27         ` Arnd Bergmann

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=201210121105.09517.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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.