All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andrew Isaacson" <adi@broadcom.com>
To: linux-mips@linux-mips.org
Subject: [patch 2/5] SiByte fixes for 2.6.12
Date: Wed, 22 Jun 2005 16:01:09 -0700	[thread overview]
Message-ID: <20050622230109.GA17938@broadcom.com> (raw)
In-Reply-To: <20050622230003.GA17725@broadcom.com>

Update sb1250_set_affinity to use cpumask_t rather than hand-rolled
bitmask code.

Signed-Off-By: Andrew Isaacson <adi@broadcom.com>

Index: linux-2.6-work/arch/mips/sibyte/sb1250/irq.c
===================================================================
--- linux-2.6-work.orig/arch/mips/sibyte/sb1250/irq.c	2005-06-22 11:17:21.000000000 -0700
+++ linux-2.6-work/arch/mips/sibyte/sb1250/irq.c	2005-06-22 11:17:30.000000000 -0700
@@ -53,7 +53,7 @@
 static unsigned int startup_sb1250_irq(unsigned int irq);
 static void ack_sb1250_irq(unsigned int irq);
 #ifdef CONFIG_SMP
-static void sb1250_set_affinity(unsigned int irq, unsigned long mask);
+static void sb1250_set_affinity(unsigned int irq, cpumask_t mask);
 #endif
 
 #ifdef CONFIG_SIBYTE_HAS_LDT
@@ -117,23 +117,16 @@
 }
 
 #ifdef CONFIG_SMP
-static void sb1250_set_affinity(unsigned int irq, unsigned long mask)
+static void sb1250_set_affinity(unsigned int irq, cpumask_t mask)
 {
 	int i = 0, old_cpu, cpu, int_on;
 	u64 cur_ints;
 	irq_desc_t *desc = irq_desc + irq;
 	unsigned long flags;
 
-	while (mask) {
-		if (mask & 1) {
-			mask >>= 1;
-			break;
-		}
-		mask >>= 1;
-		i++;
-	}
+	i = first_cpu(mask);
 
-	if (mask) {
+	if (cpus_weight(mask) > 1) {
 		printk("attempted to set irq affinity for irq %d to multiple CPUs\n", irq);
 		return;
 	}

--

  parent reply	other threads:[~2005-06-22 23:03 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-22 23:00 [patch 0/5] SiByte fixes for 2.6.12 Andrew Isaacson
2005-06-22 23:00 ` [patch 1/5] " Andrew Isaacson
2005-06-23 11:01   ` Maciej W. Rozycki
2005-06-23 23:26     ` Andy Isaacson
2005-10-01  9:28     ` Ralf Baechle
2005-10-03 11:56       ` Maciej W. Rozycki
2005-10-03 12:50         ` Ralf Baechle
2005-10-03 13:15       ` Daniel Jacobowitz
2005-10-03 13:24         ` Ralf Baechle
2005-10-03 13:35         ` Maciej W. Rozycki
2005-10-01 10:15   ` Ralf Baechle
2006-01-16 15:48   ` Martin Michlmayr
2006-01-23 12:55     ` Martin Michlmayr
2005-06-22 23:01 ` Andrew Isaacson [this message]
2005-06-22 23:01 ` [patch 3/5] " Andrew Isaacson
2005-06-23 11:07   ` Maciej W. Rozycki
2005-06-23 19:48     ` Andy Isaacson
2005-06-30 16:43       ` Maciej W. Rozycki
2005-07-18 17:19         ` Maciej W. Rozycki
2005-06-22 23:01 ` [patch 4/5] " Andrew Isaacson
2005-06-23 11:08   ` Maciej W. Rozycki
2005-06-23 14:49     ` Andy Isaacson
2005-06-23 15:11       ` Maciej W. Rozycki
2005-06-23 22:27         ` Andy Isaacson
2005-10-01 11:57           ` Ralf Baechle
2005-06-22 23:02 ` [patch 5/5] " Andrew Isaacson
2005-10-01 12:07   ` Ralf Baechle

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=20050622230109.GA17938@broadcom.com \
    --to=adi@broadcom.com \
    --cc=linux-mips@linux-mips.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.