From: "Mark Mason" <mason@broadcom.com>
To: linux-mips@linux-mips.org
Subject: Patch to arch/mips/sibyte/sb1250/irq.c
Date: Wed, 24 Aug 2005 10:45:13 -0700 [thread overview]
Message-ID: <430CB229.1000405@broadcom.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 236 bytes --]
Hello all,
Attached is a patch to the sb1250 version of irq.c to fix compilation
warnings (and make the code more correct).
Change sb1250_set_affinity() to use the proper datatype and access
macros for the cpu mask.
Thanks,
Mark
[-- Attachment #2: irq-patch --]
[-- Type: text/plain, Size: 1466 bytes --]
Index: arch/mips/sibyte/sb1250/irq.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/sibyte/sb1250/irq.c,v
retrieving revision 1.34
diff -u -p -r1.34 irq.c
--- arch/mips/sibyte/sb1250/irq.c 11 Jul 2005 10:03:30 -0000 1.34
+++ arch/mips/sibyte/sb1250/irq.c 24 Aug 2005 17:33:33 -0000
@@ -53,7 +53,7 @@ static void disable_sb1250_irq(unsigned
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,26 +117,19 @@ void sb1250_unmask_irq(int cpu, 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)
{
- int i = 0, old_cpu, cpu, int_on;
+ int i = 0, old_cpu, cpu, int_on, weight;
u64 cur_ints;
irq_desc_t *desc = irq_desc + irq;
unsigned long flags;
- while (mask) {
- if (mask & 1) {
- mask >>= 1;
- break;
- }
- mask >>= 1;
- i++;
- }
-
- if (mask) {
+ weight = cpus_weight(mask);
+ if (weight > 1) {
printk("attempted to set irq affinity for irq %d to multiple CPUs\n", irq);
return;
- }
+ } else if (weight != 0)
+ i = first_cpu(mask);
/* Convert logical CPU to physical CPU */
cpu = cpu_logical_map(i);
reply other threads:[~2005-08-24 17:41 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=430CB229.1000405@broadcom.com \
--to=mason@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.