hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/mips/kernel/cevt-sb1250.c
....@@ -1,19 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (C) 2000, 2001 Broadcom Corporation
3
- *
4
- * This program is free software; you can redistribute it and/or
5
- * modify it under the terms of the GNU General Public License
6
- * as published by the Free Software Foundation; either version 2
7
- * of the License, or (at your option) any later version.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License
15
- * along with this program; if not, write to the Free Software
16
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
174 */
185 #include <linux/clockchips.h>
196 #include <linux/interrupt.h>
....@@ -103,16 +90,15 @@
10390 }
10491
10592 static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent);
106
-static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction);
10793 static DEFINE_PER_CPU(char [18], sibyte_hpt_name);
10894
10995 void sb1250_clockevent_init(void)
11096 {
11197 unsigned int cpu = smp_processor_id();
11298 unsigned int irq = K_INT_TIMER_0 + cpu;
113
- struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu);
11499 struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu);
115100 unsigned char *name = per_cpu(sibyte_hpt_name, cpu);
101
+ unsigned long flags = IRQF_PERCPU | IRQF_TIMER;
116102
117103 /* Only have 4 general purpose timers, and we use last one as hpt */
118104 BUG_ON(cpu > 2);
....@@ -146,11 +132,7 @@
146132
147133 sb1250_unmask_irq(cpu, irq);
148134
149
- action->handler = sibyte_counter_handler;
150
- action->flags = IRQF_PERCPU | IRQF_TIMER;
151
- action->name = name;
152
- action->dev_id = cd;
153
-
154135 irq_set_affinity(irq, cpumask_of(cpu));
155
- setup_irq(irq, action);
136
+ if (request_irq(irq, sibyte_counter_handler, flags, name, cd))
137
+ pr_err("Failed to request irq %d (%s)\n", irq, name);
156138 }