From: Stevie Trujillo <stevie.trujillo@gmail.com>
To: Kyungmin Park <kmpark@infradead.org>
Cc: "Américo Wang" <xiyou.wangcong@gmail.com>,
marco.stornelli@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: ramoops: is using platform_drivers correct?
Date: Tue, 24 May 2011 16:28:08 +0200 [thread overview]
Message-ID: <201105241628.08819.stevie.trujillo@gmail.com> (raw)
In-Reply-To: <BANLkTikeUMFyLuWcHbW4TrF1wqM8_F_Vnw@mail.gmail.com>
On Tuesday 24 May 2011 16:16:13 Kyungmin Park wrote:
> On Tue, May 24, 2011 at 11:12 PM, Américo Wang <xiyou.wangcong@gmail.com>
wrote:
> > On Tue, May 24, 2011 at 2:14 PM, Kyungmin Park <kmpark@infradead.org>
wrote:
> >> On Tue, May 24, 2011 at 2:49 PM, Américo Wang <xiyou.wangcong@gmail.com>
wrote:
> >>> Huh? Is this for x86 too? Why so unfriendly for end-users?
> >>
> >> I don't know which address is acceptable for x86, in case of ARM, each
> >> SoCs has different SRAM address. so it's not good to define for all
> >> SoCs and ARM.
> >>
> >>> I think we need some kernel parameter like 'crashkernel=' (or memmap=)
> >>> to reserve memory for ramoops, right?
> >>
> >> The first implementation is just module parameters.
> >> ramoops.address=0x??????? ramoops.size=0x????. So I patched it as
> >> using platform devices.
> >> and the reason use the platform is it's dependent on each SoCs and board
> >> usage.
> >
> > But the result is that this makes end-users harder to use it.
> >
> > Using platform API still relies on a hard-code address, at least in
> > your example,
> > so, why not leave it as a module parameter to let user to find the
> > correct address?
>
> It's possible. I just make it possible to use the platform driver. you
> can specify the original method.
I don't think it's possible without also having a platform_device.
ramoops_probe is never called here, I think platform_driver_probe returns -
ENODEV.
static int __init ramoops_init(void)
{
return platform_driver_probe(&ramoops_driver, ramoops_probe);
}
Maybe one could run platform_driver_probe() only if (!mem_address &&
!mem_size)?
Unrelated question: should the printk()s end with "\n"? I see they do that
other places in the kernel.
next prev parent reply other threads:[~2011-05-24 14:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-23 13:27 ramoops: is using platform_drivers correct? Stevie Trujillo
2011-05-23 14:10 ` Américo Wang
2011-05-23 14:36 ` Kyungmin Park
2011-05-24 5:32 ` Kyungmin Park
2011-05-24 5:49 ` Américo Wang
2011-05-24 6:14 ` Kyungmin Park
2011-05-24 14:12 ` Américo Wang
2011-05-24 14:16 ` Kyungmin Park
2011-05-24 14:28 ` Stevie Trujillo [this message]
2011-05-24 17:03 ` Marco Stornelli
2011-05-25 13:24 ` Américo Wang
2011-05-25 14:07 ` Marco Stornelli
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=201105241628.08819.stevie.trujillo@gmail.com \
--to=stevie.trujillo@gmail.com \
--cc=kmpark@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marco.stornelli@gmail.com \
--cc=xiyou.wangcong@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox