All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Andy Green <andy.green@linaro.org>
Cc: s-jan@ti.com, patches@linaro.org, tony@atomide.com,
	rostedt@goodmis.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2 2/4] net ethernet introduce mac_la_ap helper
Date: Tue, 3 Jul 2012 08:05:03 +0000	[thread overview]
Message-ID: <201207030805.04160.arnd@arndb.de> (raw)
In-Reply-To: <4FF27751.9050004@linaro.org>

On Tuesday 03 July 2012, Andy Green wrote:
> > I think it would be simpler to register the notifier from an
> > initcall and drop the mac_la_ap_started variable.
> 
> That was my first approach, to structure it as a real driver.  I had 
> tried a few likely-looking initcall levels but the init of the helper 
> was coming after the init of the network code.
> 
> I found this time that core_initcall works, so I used that, dropped the 
> flag.  But isn't it a bit tricky with these to know if the prerequisite 
> you're trying to ensure is already initialized might not actually be at 
> the same initcall level and you're working by accident?

Well, you would only need to ensure that it's called before any of the
network devices are added, which should all happen very late in the
boot cycle compared to the platform init code.

I think core_initcall is fine here.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2 2/4] net ethernet introduce mac_la_ap helper
Date: Tue, 3 Jul 2012 08:05:03 +0000	[thread overview]
Message-ID: <201207030805.04160.arnd@arndb.de> (raw)
In-Reply-To: <4FF27751.9050004@linaro.org>

On Tuesday 03 July 2012, Andy Green wrote:
> > I think it would be simpler to register the notifier from an
> > initcall and drop the mac_la_ap_started variable.
> 
> That was my first approach, to structure it as a real driver.  I had 
> tried a few likely-looking initcall levels but the init of the helper 
> was coming after the init of the network code.
> 
> I found this time that core_initcall works, so I used that, dropped the 
> flag.  But isn't it a bit tricky with these to know if the prerequisite 
> you're trying to ensure is already initialized might not actually be at 
> the same initcall level and you're working by accident?

Well, you would only need to ensure that it's called before any of the
network devices are added, which should all happen very late in the
boot cycle compared to the platform init code.

I think core_initcall is fine here.

	Arnd

  reply	other threads:[~2012-07-03  8:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-02  6:40 [PATCH 2 0/4] Add ability to set defaultless network device MAC addresses to deterministic computed locally administered values Andy Green
2012-07-02  6:40 ` Andy Green
2012-07-02  6:40 ` [PATCH 2 1/4] OMAP2+: add cpu id register to MAC address helper Andy Green
2012-07-02  6:40   ` Andy Green
2012-07-02  6:40 ` [PATCH 2 2/4] net ethernet introduce mac_la_ap helper Andy Green
2012-07-02  6:40   ` Andy Green
2012-07-02 16:12   ` Arnd Bergmann
2012-07-02 16:12     ` Arnd Bergmann
2012-07-02 16:35     ` Steven Rostedt
2012-07-02 16:35       ` Steven Rostedt
2012-07-03 20:02       ` Joe Perches
2012-07-03 20:02         ` Joe Perches
2012-07-03  4:38     ` Andy Green
2012-07-03  4:38       ` Andy Green
2012-07-03  8:05       ` Arnd Bergmann [this message]
2012-07-03  8:05         ` Arnd Bergmann
2012-07-02  6:41 ` [PATCH 2 3/4] OMAP4 PANDA register ethernet and wlan for automatic mac allocation Andy Green
2012-07-02  6:41   ` Andy Green
2012-07-02  6:41 ` [PATCH 2 4/4] config test config extending omap2plus with wl12xx etc Andy Green
2012-07-02  6:41   ` Andy Green

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=201207030805.04160.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=andy.green@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=rostedt@goodmis.org \
    --cc=s-jan@ti.com \
    --cc=tony@atomide.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 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.