All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andi Kleen <andi@firstfloor.org>,
	Arjan van de Ven <arjan@infradead.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: usb debug port early console v2
Date: Wed, 23 Jul 2008 15:45:33 -0700	[thread overview]
Message-ID: <20080723224533.GA29234@kroah.com> (raw)
In-Reply-To: <200807231400.53957.yhlu.kernel@gmail.com>

On Wed, Jul 23, 2008 at 02:00:53PM -0700, Yinghai Lu wrote:
> --- linux-2.6.orig/drivers/usb/host/ehci.h
> +++ linux-2.6/drivers/usb/host/ehci.h
> @@ -62,6 +62,7 @@ struct ehci_stats {
>  
>  #define	EHCI_MAX_ROOT_PORTS	15		/* see HCS_N_PORTS */
>  
> +#ifndef EARLY_PRINTK
>  struct ehci_hcd {			/* one per controller */
>  	/* glue to PCI and HCD framework */
>  	struct ehci_caps __iomem *caps;
> @@ -207,6 +208,7 @@ timer_action (struct ehci_hcd *ehci, enu
>  		mod_timer(&ehci->watchdog, t + jiffies);
>  	}
>  }
> +#endif /* EARLY_PRINTK */
>  
>  /*-------------------------------------------------------------------------*/
>  
> @@ -352,6 +354,8 @@ struct ehci_dbg_port {
>  
>  #define	QTD_NEXT(ehci, dma)	cpu_to_hc32(ehci, (u32)dma)
>  
> +#ifndef EARLY_PRINTK
> +
>  /*
>   * EHCI Specification 0.95 Section 3.5
>   * QTD: describe data transfer components (buffer, direction, ...)
> @@ -392,7 +396,7 @@ struct ehci_qtd {
>  	struct urb		*urb;			/* qtd's urb */
>  	size_t			length;			/* length of buffer */
>  } __attribute__ ((aligned (32)));
> -
> +#endif
>  /* mask NakCnt+T in qh->hw_alt_next */
>  #define QTD_MASK(ehci)	cpu_to_hc32 (ehci, ~0x1f)
>  
> @@ -449,6 +453,7 @@ union ehci_shadow {
>   * These appear in both the async and (for interrupt) periodic schedules.
>   */
>  
> +#ifndef EARLY_PRINTK
>  struct ehci_qh {
>  	/* first part defined by EHCI spec */
>  	__hc32			hw_next;	/* see EHCI 3.6.1 */
> @@ -504,6 +509,7 @@ struct ehci_qh {
>  #define NO_FRAME ((unsigned short)~0)			/* pick new start */
>  	struct usb_device	*dev;		/* access to TT */
>  } __attribute__ ((aligned (32)));
> +#endif /* EARLY_PRITNK */
>  
>  /*-------------------------------------------------------------------------*/
>  
> @@ -517,6 +523,7 @@ struct ehci_iso_packet {
>  	u32			buf1;
>  };
>  
> +#ifndef EARLY_PRINTK
>  /* temporary schedule data for packets from iso urbs (both speeds)
>   * each packet is one logical usb transaction to the device (not TT),
>   * beginning at stream->next_uframe
> @@ -651,6 +658,7 @@ struct ehci_sitd {
>  	unsigned		frame;
>  	unsigned		index;
>  } __attribute__ ((aligned (32)));
> +#endif
>  
>  /*-------------------------------------------------------------------------*/
>  
> @@ -672,6 +680,8 @@ struct ehci_fstn {
>  	union ehci_shadow	fstn_next;	/* ptr to periodic q entry */
>  } __attribute__ ((aligned (32)));
>  
> +#ifndef EARLY_PRINTK
> +
>  /*-------------------------------------------------------------------------*/
>  
>  #ifdef CONFIG_USB_EHCI_ROOT_HUB_TT
> @@ -843,4 +853,6 @@ static inline u32 hc32_to_cpup (const st
>  
>  /*-------------------------------------------------------------------------*/
>  
> +#endif /* EARLY_PRINTK */
> +
>  #endif /* __LINUX_EHCI_HCD_H */

I don't understand the issue of any of these #ifdefs here.  Why are they
needed?

And shouldn't there be a separate config option for early printk through
the ehci debug port?

thanks,

greg k-h

  reply	other threads:[~2008-07-23 22:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-23 19:52 [PATCH] x86: usb debug port early console Yinghai Lu
2008-07-23 20:12 ` Andrew Morton
2008-07-23 20:18   ` Yinghai Lu
2008-07-23 20:36     ` Andrew Morton
2008-07-24  2:56   ` Eric W. Biederman
2008-07-24  3:13     ` H. Peter Anvin
2008-07-23 21:00 ` [PATCH] x86: usb debug port early console v2 Yinghai Lu
2008-07-23 22:45   ` Greg KH [this message]
2008-07-23 22:54     ` Yinghai Lu
2008-07-23 23:21       ` Greg KH
2008-07-23 23:46         ` Yinghai Lu
2008-07-24  0:06           ` Greg KH
2008-07-24  0:39   ` [PATCH] x86: usb debug port early console v3 Yinghai Lu
2008-07-24 11:14     ` Ingo Molnar
2008-07-25  0:27     ` [PATCH] usb: move ehci reg def Yinghai Lu
2008-07-25  0:57       ` David Brownell
2008-07-25  2:14         ` Yinghai Lu
2008-07-26 14:18           ` Ingo Molnar
2008-07-28 15:40             ` Greg KH
2008-07-28 16:11               ` Ingo Molnar
2008-07-28 16:47                 ` Greg KH
2008-07-28 18:47                   ` David Brownell
2008-07-25  0:29     ` [PATCH] x86: usb debug port early console v4 Yinghai Lu
2008-07-26 13:48       ` Ingo Molnar
2008-07-26 15:38         ` Ingo Molnar

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=20080723224533.GA29234@kroah.com \
    --to=greg@kroah.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=arjan@infradead.org \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=yhlu.kernel@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 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.