hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/mips/cavium-octeon/octeon-irq.c
....@@ -127,6 +127,16 @@
127127 static int octeon_irq_force_ciu_mapping(struct irq_domain *domain,
128128 int irq, int line, int bit)
129129 {
130
+ struct device_node *of_node;
131
+ int ret;
132
+
133
+ of_node = irq_domain_get_of_node(domain);
134
+ if (!of_node)
135
+ return -EINVAL;
136
+ ret = irq_alloc_desc_at(irq, of_node_to_nid(of_node));
137
+ if (ret < 0)
138
+ return ret;
139
+
130140 return irq_domain_associate(domain, irq, line << 6 | bit);
131141 }
132142
....@@ -1180,8 +1190,8 @@
11801190 type = IRQ_TYPE_LEVEL_LOW;
11811191 break;
11821192 default:
1183
- pr_err("Error: (%s) Invalid irq trigger specification: %x\n",
1184
- node->name,
1193
+ pr_err("Error: (%pOFn) Invalid irq trigger specification: %x\n",
1194
+ node,
11851195 trigger);
11861196 type = IRQ_TYPE_LEVEL_LOW;
11871197 break;
....@@ -2193,7 +2203,7 @@
21932203 struct octeon_irq_cib_chip_data *cd;
21942204
21952205 if (hw >= host_data->max_bits) {
2196
- pr_err("ERROR: %s mapping %u is to big!\n",
2206
+ pr_err("ERROR: %s mapping %u is too big!\n",
21972207 irq_domain_get_of_node(d)->name, (unsigned)hw);
21982208 return -EINVAL;
21992209 }
....@@ -2274,8 +2284,8 @@
22742284
22752285 parent_irq = irq_of_parse_and_map(ciu_node, 0);
22762286 if (!parent_irq) {
2277
- pr_err("ERROR: Couldn't acquire parent_irq for %s\n",
2278
- ciu_node->name);
2287
+ pr_err("ERROR: Couldn't acquire parent_irq for %pOFn\n",
2288
+ ciu_node);
22792289 return -EINVAL;
22802290 }
22812291
....@@ -2286,7 +2296,7 @@
22862296
22872297 addr = of_get_address(ciu_node, 0, NULL, NULL);
22882298 if (!addr) {
2289
- pr_err("ERROR: Couldn't acquire reg(0) %s\n", ciu_node->name);
2299
+ pr_err("ERROR: Couldn't acquire reg(0) %pOFn\n", ciu_node);
22902300 return -EINVAL;
22912301 }
22922302 host_data->raw_reg = (u64)phys_to_virt(
....@@ -2294,7 +2304,7 @@
22942304
22952305 addr = of_get_address(ciu_node, 1, NULL, NULL);
22962306 if (!addr) {
2297
- pr_err("ERROR: Couldn't acquire reg(1) %s\n", ciu_node->name);
2307
+ pr_err("ERROR: Couldn't acquire reg(1) %pOFn\n", ciu_node);
22982308 return -EINVAL;
22992309 }
23002310 host_data->en_reg = (u64)phys_to_virt(
....@@ -2302,8 +2312,8 @@
23022312
23032313 r = of_property_read_u32(ciu_node, "cavium,max-bits", &val);
23042314 if (r) {
2305
- pr_err("ERROR: Couldn't read cavium,max-bits from %s\n",
2306
- ciu_node->name);
2315
+ pr_err("ERROR: Couldn't read cavium,max-bits from %pOFn\n",
2316
+ ciu_node);
23072317 return r;
23082318 }
23092319 host_data->max_bits = val;
....@@ -2486,8 +2496,8 @@
24862496 }
24872497
24882498 #ifdef CONFIG_SMP
2489
-int octeon_irq_ciu3_set_affinity(struct irq_data *data,
2490
- const struct cpumask *dest, bool force)
2499
+static int octeon_irq_ciu3_set_affinity(struct irq_data *data,
2500
+ const struct cpumask *dest, bool force)
24912501 {
24922502 union cvmx_ciu3_iscx_ctl isc_ctl;
24932503 union cvmx_ciu3_iscx_w1c isc_w1c;