Skip to contentSkip to conversation

FIXME of file toploogy.h for alpha cpus

PATCH In review Nicholas Krause 2 participants 5 messages Jun 28, 2014 – Jun 30, 2014 Alpha port

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 FIXME of file toploogy.h for alpha cpus

This patch fixs the FIXME message in the function *cpumask_of_node for using this function multiple times and the issue with recaluting the cpu node mask when reusing this function.

---
 arch/alpha/include/asm/topology.h | 3 +++
 1 file changed, 3 insertions(+)
arch/alpha/include/asm/topology.h +3 -0
index 9251e13..d301f66 100644
@@ -31,6 +31,9 @@ static const struct cpumask *cpumask_of_node(int node)
 	if (node == -1)
 		return cpu_all_mask;
 
+	else if (node == &node_to_cpumask_map[node])
+		return &node_to_cpumask_map[node];
+
 	cpumask_clear(&node_to_cpumask_map[node]);
 
 	for_each_online_cpu(cpu) {
Signature · 1 line
1.9.1
#1 lore raw
Quoted 15 lines · Nicholas Krause

This patch fixs the FIXME message in the function *cpumask_of_node for using this function multiple times and the issue with recaluting the cpu node mask when reusing this function.

---
 arch/alpha/include/asm/topology.h | 3 +++
 1 file changed, 3 insertions(+)
arch/alpha/include/asm/topology.h +0 -0
index 9251e13..d301f66 100644

arch/alpha/include/asm/topology.h static const struct cpumask *cpumask_of_node(int node) · line 39

Quoted 9 lines
arch/alpha/include/asm/topology.h +3 -0
@@ -31,6 +31,9 @@ static const struct cpumask *cpumask_of_node(int node)
 	if (node == -1)
 		return cpu_all_mask;
 
+	else if (node == &node_to_cpumask_map[node])
+		return &node_to_cpumask_map[node];
+
 	cpumask_clear(&node_to_cpumask_map[node]);
 
 	for_each_online_cpu(cpu) {

Since this patch doesn't even compile, care to tell us how you tested it?

Thanks,
Sasha

#2 lore raw

I thought I compiled tested it maybe not. I thought M= would work for alpha directory but maybe I have to enable in on x86.
I don't known if there is a way to do this.
Cheers Nick

Quoted 31 lines · Sasha Levin
Quoted 15 lines · Nicholas Krause

This patch fixs the FIXME message in the function *cpumask_of_node for using this function multiple times and the issue with recaluting the cpu node mask when reusing this function.

---
 arch/alpha/include/asm/topology.h | 3 +++
 1 file changed, 3 insertions(+)
arch/alpha/include/asm/topology.h +0 -0
index 9251e13..d301f66 100644

arch/alpha/include/asm/topology.h static const struct cpumask *cpumask_of_node(int node) · line 39

Quoted 9 lines
arch/alpha/include/asm/topology.h +3 -0
@@ -31,6 +31,9 @@ static const struct cpumask *cpumask_of_node(int node)
      if (node == -1)
              return cpu_all_mask;
 
+     else if (node == &node_to_cpumask_map[node])
+             return &node_to_cpumask_map[node];
+
      cpumask_clear(&node_to_cpumask_map[node]);
 
      for_each_online_cpu(cpu) {

Since this patch doesn't even compile, care to tell us how you tested it?

Thanks,
Sasha

#3 lore raw
Quoted 5 lines · Nick Krause

I thought I compiled tested it maybe not. I thought M= would work for alpha directory but maybe I have to enable in on x86.
I don't known if there is a way to do this.
Cheers Nick

Quoted 32 lines
Quoted 31 lines · Sasha Levin
Quoted 15 lines · Nicholas Krause

This patch fixs the FIXME message in the function *cpumask_of_node for using this function multiple times and the issue with recaluting the cpu node mask when reusing this function.

---
 arch/alpha/include/asm/topology.h | 3 +++
 1 file changed, 3 insertions(+)
arch/alpha/include/asm/topology.h +0 -0
index 9251e13..d301f66 100644

arch/alpha/include/asm/topology.h static const struct cpumask *cpumask_of_node(int node) · line 39

Quoted 9 lines
arch/alpha/include/asm/topology.h +3 -0
@@ -31,6 +31,9 @@ static const struct cpumask *cpumask_of_node(int node)
      if (node == -1)
              return cpu_all_mask;
 
+     else if (node == &node_to_cpumask_map[node])
+             return &node_to_cpumask_map[node];
+
      cpumask_clear(&node_to_cpumask_map[node]);
 
      for_each_online_cpu(cpu) {

Since this patch doesn't even compile, care to tell us how you tested it?

Thanks,
Sasha

Please stop top posting.

Your explanation is missing the part about actually making sure that your patch works is missing, how did you intend to make sure that your patch doesn't break things?

Thanks,
Sasha

#4 lore raw

Sorry Sasha ,
I will rewrite and test this patch before I send it in. Cheers Nick

Quoted 48 lines · Sasha Levin
Quoted 5 lines · Nick Krause

I thought I compiled tested it maybe not. I thought M= would work for alpha directory but maybe I have to enable in on x86.
I don't known if there is a way to do this.
Cheers Nick

Quoted 32 lines
Quoted 31 lines · Sasha Levin
Quoted 15 lines · Nicholas Krause

This patch fixs the FIXME message in the function *cpumask_of_node for using this function multiple times and the issue with recaluting the cpu node mask when reusing this function.

---
 arch/alpha/include/asm/topology.h | 3 +++
 1 file changed, 3 insertions(+)
arch/alpha/include/asm/topology.h +0 -0
index 9251e13..d301f66 100644

arch/alpha/include/asm/topology.h static const struct cpumask *cpumask_of_node(int node) · line 39

Quoted 9 lines
arch/alpha/include/asm/topology.h +3 -0
@@ -31,6 +31,9 @@ static const struct cpumask *cpumask_of_node(int node)
      if (node == -1)
              return cpu_all_mask;
 
+     else if (node == &node_to_cpumask_map[node])
+             return &node_to_cpumask_map[node];
+
      cpumask_clear(&node_to_cpumask_map[node]);
 
      for_each_online_cpu(cpu) {

Since this patch doesn't even compile, care to tell us how you tested it?

Thanks,
Sasha

Please stop top posting.

Your explanation is missing the part about actually making sure that your patch works is missing, how did you intend to make sure that your patch doesn't break things?

Thanks,
Sasha