lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 10 Jan 2011 19:37:17 -0800
From:	Greg KH <greg@...ah.com>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	linux-usb@...r.kernel.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -v3 1/4] pci, usb:  Make usb handoff func all take base
 remapping

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@...nel.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ