mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
	Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	linux-usb@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -v3 1/4] pci, usb:  Make usb handoff func all take base remapping
Date: Mon, 10 Jan 2011 19:37:17 -0800	[thread overview]
Message-ID: <20110111033717.GD9709@kroah.com> (raw)
In-Reply-To: <4D2BB048.2050509@kernel.org>

On Mon, Jan 10, 2011 at 05:20:08PM -0800, Yinghai Lu wrote:
> On 01/10/2011 05:07 PM, Greg KH wrote:
> > On Mon, Jan 10, 2011 at 04:55:17PM -0800, Yinghai Lu wrote:
> >>
> >> So later could reuse them to do usb handoff much early for x86.
> >>
> >> will make arch early code get MMIO BAR and do remapping itself.
> >>
> >> -v2: still keep pci_device *pdev as parameter according to BenH.
> >> -v3: expose three functions that take *base instead of including .c file.
> >>
> >> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> >>
> >> ---
> >>  drivers/usb/host/pci-quirks.c |  195 ++++++++++++++++++++++++------------------
> >>  drivers/usb/host/pci-quirks.h |    6 +
> >>  2 files changed, 120 insertions(+), 81 deletions(-)
> >>
> >> Index: linux-2.6/drivers/usb/host/pci-quirks.c
> >> ===================================================================
> >> --- linux-2.6.orig/drivers/usb/host/pci-quirks.c
> >> +++ linux-2.6/drivers/usb/host/pci-quirks.c
> >> @@ -17,6 +17,19 @@
> >>  #include "pci-quirks.h"
> >>  #include "xhci-ext-caps.h"
> >>  
> >> +static void default_usb_handoff_udelay(unsigned long usecs)
> >> +{
> >> +	udelay(usecs);
> >> +}
> >> +
> >> +static void __devinit default_usb_handoff_msleep(unsigned long msecs)
> >> +{
> >> +	msleep(msecs);
> >> +}
> > 
> > What?
> > 
> > Why in the world would you not just call the real functions here?
> > That's not acceptable, sorry.
> 
> for early access, can not use udelay yet, it will take some one.

Then don't use it.

> Also msleep will cause crash, because it needs scheduler there.

Also, don't use it.

> >> +
> >> +void (*usb_handoff_udelay)(unsigned long) = default_usb_handoff_udelay;
> >> +void (*usb_handoff_msleep)(unsigned long) __devinitdata =
> >> +			default_usb_handoff_msleep;
> 
> or do you mean use ..
> +void (*usb_handoff_udelay)(unsigned long) = udelay;
> +void (*usb_handoff_msleep)(unsigned long) __devinitdata =
> +			msleep;

Yes, only if I could understand _why_ you are doing such a thing, when
you do have access to these function pointers anyway, right?

confused,

greg k-h

  reply	other threads:[~2011-01-11  3:40 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-09 19:58 [PATCH 0/3] x86, usb, pci: Disable usb legacy support early Yinghai Lu
2011-01-10  8:43 ` [PATCH -v2 0/4] " Yinghai Lu
2011-01-11  0:49   ` [PATCH -v3 " Yinghai Lu
2011-01-11  0:55     ` [PATCH -v3 1/4] pci, usb: Make usb handoff func all take base remapping Yinghai Lu
2011-01-11  1:07       ` Greg KH
2011-01-11  1:20         ` Yinghai Lu
2011-01-11  3:37           ` Greg KH [this message]
2011-01-11  5:21           ` Benjamin Herrenschmidt
2011-01-11  6:34             ` Yinghai Lu
2011-01-11  7:37               ` Benjamin Herrenschmidt
2011-01-11  9:21                 ` Yinghai Lu
2011-01-11 13:56                   ` Greg KH
2011-01-11 17:39                     ` Konrad Rzeszutek Wilk
2011-01-12  1:06                     ` [RFC PATCH] x86: Add safe_udelay() and safe_msleep() Yinghai Lu
2011-01-12  2:32                       ` Benjamin Herrenschmidt
2011-01-12  5:07                         ` Greg KH
2011-01-13 22:21                         ` Yinghai Lu
2011-01-13 22:44                           ` Greg KH
2011-01-13 22:52                             ` Thomas Gleixner
2011-01-13 23:02                               ` Greg KH
2011-01-13 23:04                               ` Yinghai Lu
2011-01-13 23:31                                 ` Thomas Gleixner
2011-01-14 22:42                                   ` Yinghai Lu
2011-01-13 23:48                                 ` Greg KH
2011-01-14  0:31                                   ` Yinghai Lu
2011-01-14  0:40                                     ` Benjamin Herrenschmidt
2011-01-14  1:00                                       ` Yinghai Lu
2011-01-14 14:46                                         ` Christoph Lameter
2011-01-14  0:44                                     ` Greg KH
2011-01-14  1:12                                       ` Yinghai Lu
2011-01-14 14:50                                         ` Christoph Lameter
2011-01-14 21:22                                           ` [PATCH] x86: set percpu cpu0 lpj to default Yinghai Lu
2011-01-14 21:28                                             ` Christoph Lameter
2011-01-15 13:09                                               ` Tejun Heo
2011-01-16  2:32                                                 ` Yinghai Lu
2011-01-14 22:16                                             ` Greg KH
2011-01-14 22:29                                               ` Yinghai Lu
2011-01-11  5:18       ` [PATCH -v3 1/4] pci, usb: Make usb handoff func all take base remapping Benjamin Herrenschmidt
2011-01-11  0:55     ` [PATCH 2/4] x86: early_quirk check all dev/func in domain 0 Yinghai Lu
2011-01-11  1:09       ` Greg KH
2011-01-11  1:46         ` Yinghai Lu
2011-01-11  3:38           ` Greg KH
2011-01-11  3:39           ` Greg KH
2011-01-11  0:55     ` [PATCH 3/4] x86, pci: add dummy pci device for early stage Yinghai Lu
2011-01-11  0:55     ` [PATCH -v3 4/4] x86: usb handoff in early_quirk Yinghai Lu
2011-01-11  1:08       ` Greg KH
2011-01-11  1:41         ` Yinghai Lu
2011-01-11  1:07     ` [PATCH -v3 0/4] x86, usb, pci: Disable usb legacy support early Greg KH
2011-01-11  1:25       ` Yinghai Lu
2011-01-11  3:35         ` Greg KH
     [not found] ` <4D2AC584.6010004@kernel.org>
2011-01-10  8:43   ` [PATCH -v2 1/4] pci, usb: Seperate usb handoff func to another file Yinghai Lu
2011-01-10  8:44   ` [PATCH 2/4] x86: early_quirk check all dev/func in domain 0 Yinghai Lu
2011-01-10  8:44   ` [PATCH 3/4] x86, pci: add dummy pci device for early stage Yinghai Lu
2011-01-10  8:44   ` [PATCH v2 4/4] x86: usb handoff in early_quirk Yinghai Lu
2011-01-10 15:57 ` [PATCH 0/3] x86, usb, pci: Disable usb legacy support early Greg KH
2011-01-10 18:27   ` Jesse Barnes
2011-01-10 20:10     ` Yinghai Lu

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=20110111033717.GD9709@kroah.com \
    --to=greg@kroah.com \
    --cc=benh@kernel.crashing.org \
    --cc=hpa@zytor.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=yinghai@kernel.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

all inboxes | Powered by JetHome®