+ sgi-xpc-fails-to-load-when-cpu-0-is-out-of-irq-resources-v2.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: SGI XPC fails to load when cpu 0 is out of IRQ resources.  -v2
has been added to the -mm tree.  Its filename is
     sgi-xpc-fails-to-load-when-cpu-0-is-out-of-irq-resources-v2.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Robin Holt <holt@xxxxxxx>
Subject: SGI XPC fails to load when cpu 0 is out of IRQ resources.  -v2

incorporate review comments from Andrew Morton.

Signed-off-by: Robin Holt <holt@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/misc/sgi-xp/xpc_uv.c |   30 +++++++++++++++++++-----------
 1 file changed, 19 insertions(+), 11 deletions(-)

diff -puN drivers/misc/sgi-xp/xpc_uv.c~sgi-xpc-fails-to-load-when-cpu-0-is-out-of-irq-resources-v2 drivers/misc/sgi-xp/xpc_uv.c
--- a/drivers/misc/sgi-xp/xpc_uv.c~sgi-xpc-fails-to-load-when-cpu-0-is-out-of-irq-resources-v2
+++ a/drivers/misc/sgi-xp/xpc_uv.c
@@ -111,9 +111,8 @@ xpc_get_gru_mq_irq_uv(struct xpc_gru_mq_
 #if defined CONFIG_X86_64
 	mq->irq = uv_setup_irq(irq_name, cpu, mq->mmr_blade, mq->mmr_offset,
 			UV_AFFINITY_CPU);
-	if (mq->irq < 0) {
+	if (mq->irq < 0)
 		return mq->irq;
-	}
 
 	mq->mmr_value = uv_read_global_mmr64(mmr_pnode, mq->mmr_offset);
 
@@ -238,8 +237,9 @@ xpc_create_gru_mq_uv(unsigned int mq_siz
 	mq->mmr_blade = uv_cpu_to_blade_id(cpu);
 
 	nid = cpu_to_node(cpu);
-	page = alloc_pages_exact_node(nid, GFP_KERNEL | __GFP_ZERO | GFP_THISNODE,
-				pg_order);
+	page = alloc_pages_exact_node(nid,
+				      GFP_KERNEL | __GFP_ZERO | GFP_THISNODE,
+				      pg_order);
 	if (page == NULL) {
 		dev_err(xpc_part, "xpc_create_gru_mq_uv() failed to alloc %d "
 			"bytes of memory on nid=%d for GRU mq\n", mq_size, nid);
@@ -1736,28 +1736,36 @@ xpc_init_mq_node(int nid)
 {
 	int cpu;
 
+	get_online_cpus();
+
 	for_each_cpu(cpu, cpumask_of_node(nid)) {
-		xpc_activate_mq_uv = xpc_create_gru_mq_uv(XPC_ACTIVATE_MQ_SIZE_UV, nid,
-							  XPC_ACTIVATE_IRQ_NAME,
-							  xpc_handle_activate_IRQ_uv);
+		xpc_activate_mq_uv =
+			xpc_create_gru_mq_uv(XPC_ACTIVATE_MQ_SIZE_UV, nid,
+					     XPC_ACTIVATE_IRQ_NAME,
+					     xpc_handle_activate_IRQ_uv);
 		if (!IS_ERR(xpc_activate_mq_uv))
 			break;
 	}
-	if (IS_ERR(xpc_activate_mq_uv))
+	if (IS_ERR(xpc_activate_mq_uv)) {
+		put_online_cpus();
 		return PTR_ERR(xpc_activate_mq_uv);
+	}
 
 	for_each_cpu(cpu, cpumask_of_node(nid)) {
-		xpc_notify_mq_uv = xpc_create_gru_mq_uv(XPC_NOTIFY_MQ_SIZE_UV, nid,
-							XPC_NOTIFY_IRQ_NAME,
-							xpc_handle_notify_IRQ_uv);
+		xpc_notify_mq_uv =
+			xpc_create_gru_mq_uv(XPC_NOTIFY_MQ_SIZE_UV, nid,
+					     XPC_NOTIFY_IRQ_NAME,
+					     xpc_handle_notify_IRQ_uv);
 		if (!IS_ERR(xpc_notify_mq_uv))
 			break;
 	}
 	if (IS_ERR(xpc_notify_mq_uv)) {
 		xpc_destroy_gru_mq_uv(xpc_activate_mq_uv);
+		put_online_cpus();
 		return PTR_ERR(xpc_notify_mq_uv);
 	}
 
+	put_online_cpus();
 	return 0;
 }
 
_

Patches currently in -mm which might be from holt@xxxxxxx are

sgi-xpc-fails-to-load-when-cpu-0-is-out-of-irq-resources.patch
sgi-xpc-fails-to-load-when-cpu-0-is-out-of-irq-resources-v2.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux