All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jack Steiner <steiner@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH 6/7] - New SN hardware support - cpu_relax
Date: Thu, 11 Aug 2005 17:27:36 +0000	[thread overview]
Message-ID: <20050811172736.GA18809@sgi.com> (raw)


Add a few missing calls to "hint @pause".


	Signed-off-by: Jack Steiner <steiner@sgi.com>


 arch/ia64/sn/kernel/bte.c          |    1 +
 arch/ia64/sn/kernel/huberror.c     |    2 +-
 arch/ia64/sn/pci/pcibr/pcibr_dma.c |    3 ++-
 include/asm-ia64/sn/sn_sal.h       |    3 ++-
 4 files changed, 6 insertions(+), 3 deletions(-)




Index: linux/arch/ia64/sn/kernel/bte.c
=================================--- linux.orig/arch/ia64/sn/kernel/bte.c	2005-08-10 15:25:01.132347903 -0500
+++ linux/arch/ia64/sn/kernel/bte.c	2005-08-10 15:25:06.130870140 -0500
@@ -215,6 +215,7 @@ retry_bteop:
 	}
 
 	while ((transfer_stat = *bte->most_rcnt_na) = BTE_WORD_BUSY) {
+		cpu_relax();
 		if (ia64_get_itc() > itc_end) {
 			BTE_PRINTK(("BTE timeout nasid 0x%x bte%d IBLS = 0x%lx na 0x%lx\n",
 				NASID_GET(bte->bte_base_addr), bte->bte_num,
Index: linux/arch/ia64/sn/kernel/huberror.c
=================================--- linux.orig/arch/ia64/sn/kernel/huberror.c	2005-08-10 15:25:01.132347903 -0500
+++ linux/arch/ia64/sn/kernel/huberror.c	2005-08-10 15:25:06.131846604 -0500
@@ -76,7 +76,7 @@ void hubiio_crb_free(struct hubdev_info 
 	 */
 	REMOTE_HUB_S(hubdev_info->hdi_nasid, IIO_ICDR, (IIO_ICDR_PND | crbnum));
 	while (REMOTE_HUB_L(hubdev_info->hdi_nasid, IIO_ICDR) & IIO_ICDR_PND)
-		udelay(1);
+		cpu_relax();
 
 }
 
Index: linux/arch/ia64/sn/pci/pcibr/pcibr_dma.c
=================================--- linux.orig/arch/ia64/sn/pci/pcibr/pcibr_dma.c	2005-08-10 15:25:01.133324368 -0500
+++ linux/arch/ia64/sn/pci/pcibr/pcibr_dma.c	2005-08-10 15:25:06.136728927 -0500
@@ -306,7 +306,8 @@ void sn_dma_flush(uint64_t addr)
 		*(volatile uint32_t *)(p->sfdl_force_int_addr) = 1;
 
 		/* wait for the interrupt to come back. */
-		while (*(p->sfdl_flush_addr) != 0x10f) ;
+		while (*(p->sfdl_flush_addr) != 0x10f)
+			cpu_relax();
 
 		/* okay, everything is synched up. */
 		spin_unlock_irqrestore((spinlock_t *)&p->sfdl_flush_lock, flags);
Index: linux/include/asm-ia64/sn/sn_sal.h
=================================--- linux.orig/include/asm-ia64/sn/sn_sal.h	2005-08-10 15:25:01.133324368 -0500
+++ linux/include/asm-ia64/sn/sn_sal.h	2005-08-10 15:25:06.147470038 -0500
@@ -749,7 +749,8 @@ ia64_sn_power_down(void)
 {
 	struct ia64_sal_retval ret_stuff;
 	SAL_CALL(ret_stuff, SN_SAL_SYSTEM_POWER_DOWN, 0, 0, 0, 0, 0, 0, 0);
-	while(1);
+	while(1)
+		cpu_relax();
 	/* never returns */
 }
 
-- 
Thanks

Jack Steiner (steiner@sgi.com)          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.



                 reply	other threads:[~2005-08-11 17:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20050811172736.GA18809@sgi.com \
    --to=steiner@sgi.com \
    --cc=linux-ia64@vger.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 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.