All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Li Yang-r58472 <LeoLi@freescale.com>
Cc: Phillips Kim-R1AAHA <Kim.Phillips@freescale.com>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	linuxppc-dev@ozlabs.org, 'Paul Mackerras' <paulus@samba.org>,
	Gridish Shlomi-RM96313 <gridish@freescale.com>,
	Chu hanjin-r52514 <Hanjin.Chu@freescale.com>
Subject: Re: [PATCH 4/7] powerpc: Add QE library qe_lib--ucc support
Date: Wed, 28 Jun 2006 18:10:27 +0100	[thread overview]
Message-ID: <20060628171027.GC7162@infradead.org> (raw)
In-Reply-To: <9FCDBA58F226D911B202000BDBAD467306E04FD5@zch01exm40.ap.freescale.net>

> +int ucc_set_qe_mux_mii_mng(int ucc_num)
> +{
> +	unsigned long flags;
> +
> +	local_irq_save(flags);
> +	out_be32(&qe_immr->qmx.cmxgcr,
> +		 ((in_be32(&qe_immr->qmx.cmxgcr) &
> +		   ~QE_CMXGCR_MII_ENET_MNG) |
> +		  (ucc_num << QE_CMXGCR_MII_ENET_MNG_SHIFT)));
> +	local_irq_restore(flags);

Using local_irq_save to protect hardware access is wrong.  Please use
spinlocks.

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@infradead.org>
To: Li Yang-r58472 <LeoLi@freescale.com>
Cc: "'Paul Mackerras'" <paulus@samba.org>,
	linuxppc-dev@ozlabs.org,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	Chu hanjin-r52514 <Hanjin.Chu@freescale.com>,
	Gridish Shlomi-RM96313 <gridish@freescale.com>,
	Phillips Kim-R1AAHA <Kim.Phillips@freescale.com>
Subject: Re: [PATCH 4/7] powerpc: Add QE library qe_lib--ucc support
Date: Wed, 28 Jun 2006 18:10:27 +0100	[thread overview]
Message-ID: <20060628171027.GC7162@infradead.org> (raw)
In-Reply-To: <9FCDBA58F226D911B202000BDBAD467306E04FD5@zch01exm40.ap.freescale.net>

> +int ucc_set_qe_mux_mii_mng(int ucc_num)
> +{
> +	unsigned long flags;
> +
> +	local_irq_save(flags);
> +	out_be32(&qe_immr->qmx.cmxgcr,
> +		 ((in_be32(&qe_immr->qmx.cmxgcr) &
> +		   ~QE_CMXGCR_MII_ENET_MNG) |
> +		  (ucc_num << QE_CMXGCR_MII_ENET_MNG_SHIFT)));
> +	local_irq_restore(flags);

Using local_irq_save to protect hardware access is wrong.  Please use
spinlocks.


  reply	other threads:[~2006-06-28 17:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-28 14:23 [PATCH 4/7] powerpc: Add QE library qe_lib--ucc support Li Yang-r58472
2006-06-28 14:23 ` Li Yang-r58472
2006-06-28 17:10 ` Christoph Hellwig [this message]
2006-06-28 17:10   ` Christoph Hellwig

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=20060628171027.GC7162@infradead.org \
    --to=hch@infradead.org \
    --cc=Hanjin.Chu@freescale.com \
    --cc=Kim.Phillips@freescale.com \
    --cc=LeoLi@freescale.com \
    --cc=gridish@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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 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.