linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/3] driver core: Add ability for arch code to setup pdev_archdata
Date: Thu, 7 Jul 2011 07:11:25 -0700	[thread overview]
Message-ID: <20110707141125.GE27648@kroah.com> (raw)
In-Reply-To: <597354F4-D1D4-4BC0-9251-FDDC31B1E2A1@kernel.crashing.org>

On Thu, Jul 07, 2011 at 08:55:44AM -0500, Kumar Gala wrote:
> 
> On Jul 1, 2011, at 5:09 PM, Greg KH wrote:
> 
> > On Thu, Jun 23, 2011 at 06:33:57AM -0500, Kumar Gala wrote:
> >> On some architectures we need to setup pdev_archdata before we add the
> >> device.  Waiting til a bus_notifier is too late since we might need the
> >> pdev_archdata in the bus notifier.  One example is setting up of dma_mask
> >> pointers such that it can be used in a bus_notifier.
> >> 
> >> We add noop version of arch_setup_pdev_archdata() in
> >> <asm-generic/platform_device.h> and allow the arch code to override with
> >> access the full definitions of struct device, struct platform_device, and
> >> struct pdev_archdata.
> > 
> > Isn't there some way to use "weak" symbols to keep us from having to
> > create this .h file in every single arch and then if the arch wants to
> > define it, it does so?
> > 
> > That should make this patch simpler, right?
> > 
> > thanks,
> > 
> > greg k-h
> 
> Changing to weak should be doable if we are ok with the additional
> function call always happening.

Given that this is not a fast path, and the function call for the
"normal" case would do nothing, it should be fine, right?

greg k-h

  reply	other threads:[~2011-07-07 14:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22 12:02 [PATCH 1/3] driver core: Add ability for arch code to setup pdev_archdata Kumar Gala
2011-06-22 12:02 ` [PATCH 2/3] powerpc: implement arch_setup_pdev_archdata Kumar Gala
2011-06-22 12:02   ` [PATCH 3/3] powerpc: Dont require a dma_ops struct to set dma mask Kumar Gala
2011-06-22 17:53     ` Scott Wood
2011-06-22 14:37 ` [PATCH 1/3] driver core: Add ability for arch code to setup pdev_archdata Mike Frysinger
2011-06-22 15:09 ` [PATCH v2 " Kumar Gala
2011-06-22 17:52   ` Scott Wood
2011-06-23 11:33 ` [PATCH v3 " Kumar Gala
2011-06-23 11:33   ` [PATCH v3 2/3] powerpc: implement arch_setup_pdev_archdata Kumar Gala
2011-06-23 11:33     ` [PATCH v3 3/3] powerpc: Dont require a dma_ops struct to set dma mask Kumar Gala
2011-07-01 22:09   ` [PATCH v3 1/3] driver core: Add ability for arch code to setup pdev_archdata Greg KH
2011-07-07 13:55     ` Kumar Gala
2011-07-07 14:11       ` Greg KH [this message]
2011-07-08  4:03         ` Kumar Gala

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=20110707141125.GE27648@kroah.com \
    --to=greg@kroah.com \
    --cc=galak@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).