From: kgene.kim@samsung•com (Kukjin Kim)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ARM: S3C24XX: Fix Section mismatch
Date: Wed, 07 Mar 2012 03:41:22 -0800 [thread overview]
Message-ID: <4F574962.9020801@samsung.com> (raw)
In-Reply-To: <20120307112219.GR17370@n2100.arm.linux.org.uk>
On 03/07/12 03:22, Russell King - ARM Linux wrote:
> On Wed, Mar 07, 2012 at 02:36:52AM -0800, Kukjin Kim wrote:
>> WARNING: arch/arm/mach-s3c24xx/built-in.o(.data+0xf44): Section mismatch in reference
>> from the variable s3c2416_irq_interface to the function .init.text:s3c2416_irq_add()
>> The variable s3c2416_irq_interface references
>> the function __init s3c2416_irq_add()
>> If the reference is valid then annotate the
>> variable with __init* or __refdata (see linux/init.h) or name the variable:
>> *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
>>
>> WARNING: arch/arm/mach-s3c24xx/built-in.o(.data+0x1b80): Section mismatch in reference
>> from the variable s3c2443_irq_interface to the function .init.text:s3c2443_irq_add()
>> The variable s3c2443_irq_interface references
>> the function __init s3c2443_irq_add()
>> If the reference is valid then annotate the
>> variable with __init* or __refdata (see linux/init.h) or name the variable:
>> *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
>
>> diff --git a/arch/arm/mach-s3c24xx/irq-s3c2416.c b/arch/arm/mach-s3c24xx/irq-s3c2416.c
>> index b8a5836..59b7632 100644
>> --- a/arch/arm/mach-s3c24xx/irq-s3c2416.c
>> +++ b/arch/arm/mach-s3c24xx/irq-s3c2416.c
>> @@ -310,7 +310,7 @@ static int __init s3c2416_irq_add(struct device *dev)
>> return 0;
>> }
>>
>> -static struct subsys_interface s3c2416_irq_interface = {
>> +static struct subsys_interface s3c2416_irq_interface __initdata = {
>> .name = "s3c2416_irq",
>> .subsys =&s3c2416_subsys,
>> .add_dev = s3c2416_irq_add,
>> diff --git a/arch/arm/mach-s3c24xx/irq-s3c2443.c b/arch/arm/mach-s3c24xx/irq-s3c2443.c
>> index 35e4ff2..439f186 100644
>> --- a/arch/arm/mach-s3c24xx/irq-s3c2443.c
>> +++ b/arch/arm/mach-s3c24xx/irq-s3c2443.c
>> @@ -265,7 +265,7 @@ static int __init s3c2443_irq_add(struct device *dev)
>> return 0;
>> }
>>
>> -static struct subsys_interface s3c2443_irq_interface = {
>> +static struct subsys_interface s3c2443_irq_interface __initdata = {
>> .name = "s3c2443_irq",
>> .subsys =&s3c2443_subsys,
>> .add_dev = s3c2443_irq_add,
>
> You register these structures with some other bit of code. That other
> bit of code adds these structures to a list. You then mark them as
> __initdata, which means they get freed and the memory reused. That
> corrupts the list beneath the other code.
>
> So, clearly, both of these are wrong.
Oops, I see. Let me check it again.
Thanks for pointing out.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung•com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
prev parent reply other threads:[~2012-03-07 11:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-07 10:36 [PATCH] ARM: S3C24XX: Fix Section mismatch Kukjin Kim
2012-03-07 11:22 ` Russell King - ARM Linux
2012-03-07 11:41 ` Kukjin Kim [this message]
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=4F574962.9020801@samsung.com \
--to=kgene.kim@samsung$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox