Skip to content

Commit 5bd6cf0

Browse files
committed
Merge tag 'mips-fixes_6.11_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS fixes from Thomas Bogendoerfer: - Set correct timer mode on Loongson64 - Only request r4k clockevent interrupt on one CPU * tag 'mips-fixes_6.11_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: cevt-r4k: Don't call get_c0_compare_int if timer irq is installed MIPS: Loongson64: Set timer mode in cpu-probe
2 parents a8a8dcb + 50f2b98 commit 5bd6cf0

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

arch/mips/kernel/cevt-r4k.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -303,13 +303,6 @@ int r4k_clockevent_init(void)
303303
if (!c0_compare_int_usable())
304304
return -ENXIO;
305305

306-
/*
307-
* With vectored interrupts things are getting platform specific.
308-
* get_c0_compare_int is a hook to allow a platform to return the
309-
* interrupt number of its liking.
310-
*/
311-
irq = get_c0_compare_int();
312-
313306
cd = &per_cpu(mips_clockevent_device, cpu);
314307

315308
cd->name = "MIPS";
@@ -320,7 +313,6 @@ int r4k_clockevent_init(void)
320313
min_delta = calculate_min_delta();
321314

322315
cd->rating = 300;
323-
cd->irq = irq;
324316
cd->cpumask = cpumask_of(cpu);
325317
cd->set_next_event = mips_next_event;
326318
cd->event_handler = mips_event_handler;
@@ -332,6 +324,13 @@ int r4k_clockevent_init(void)
332324

333325
cp0_timer_irq_installed = 1;
334326

327+
/*
328+
* With vectored interrupts things are getting platform specific.
329+
* get_c0_compare_int is a hook to allow a platform to return the
330+
* interrupt number of its liking.
331+
*/
332+
irq = get_c0_compare_int();
333+
335334
if (request_irq(irq, c0_compare_interrupt, flags, "timer",
336335
c0_compare_interrupt))
337336
pr_err("Failed to request irq %d (timer)\n", irq);

arch/mips/kernel/cpu-probe.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,12 +1724,16 @@ static inline void cpu_probe_loongson(struct cpuinfo_mips *c, unsigned int cpu)
17241724
c->ases |= (MIPS_ASE_LOONGSON_MMI | MIPS_ASE_LOONGSON_CAM |
17251725
MIPS_ASE_LOONGSON_EXT | MIPS_ASE_LOONGSON_EXT2);
17261726
c->ases &= ~MIPS_ASE_VZ; /* VZ of Loongson-3A2000/3000 is incomplete */
1727+
change_c0_config6(LOONGSON_CONF6_EXTIMER | LOONGSON_CONF6_INTIMER,
1728+
LOONGSON_CONF6_INTIMER);
17271729
break;
17281730
case PRID_IMP_LOONGSON_64G:
17291731
__cpu_name[cpu] = "ICT Loongson-3";
17301732
set_elf_platform(cpu, "loongson3a");
17311733
set_isa(c, MIPS_CPU_ISA_M64R2);
17321734
decode_cpucfg(c);
1735+
change_c0_config6(LOONGSON_CONF6_EXTIMER | LOONGSON_CONF6_INTIMER,
1736+
LOONGSON_CONF6_INTIMER);
17331737
break;
17341738
default:
17351739
panic("Unknown Loongson Processor ID!");

0 commit comments

Comments
 (0)