Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7bcf7717 authored by Ralf Baechle's avatar Ralf Baechle
Browse files

[MIPS] Implement clockevents for R4000-style cp0 count/compare interrupt

parent 91a2fcc8
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -335,6 +335,7 @@ config QEMU
	select GENERIC_ISA_DMA
	select GENERIC_ISA_DMA
	select HAVE_STD_PC_SERIAL_PORT
	select HAVE_STD_PC_SERIAL_PORT
	select I8259
	select I8259
	select IRQ_CPU
	select ISA
	select ISA
	select PCSPEAKER
	select PCSPEAKER
	select SWAP_IO_SPACE
	select SWAP_IO_SPACE
@@ -667,6 +668,10 @@ config GENERIC_CALIBRATE_DELAY
	bool
	bool
	default y
	default y


config GENERIC_CLOCKEVENTS
	bool
	default y

config GENERIC_TIME
config GENERIC_TIME
	bool
	bool
	default y
	default y
@@ -901,6 +906,8 @@ config BOOT_ELF64


menu "CPU selection"
menu "CPU selection"


source "kernel/time/Kconfig"

choice
choice
	prompt "CPU type"
	prompt "CPU type"
	default CPU_R4X00
	default CPU_R4X00
+1 −1
Original line number Original line Diff line number Diff line
@@ -633,7 +633,7 @@ asmlinkage void plat_irq_dispatch(void)
	unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
	unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;


	if (pending & CAUSEF_IP7)
	if (pending & CAUSEF_IP7)
		ll_timer_interrupt(63);
		do_IRQ(63);
	else if (pending & CAUSEF_IP2)
	else if (pending & CAUSEF_IP2)
		intc0_req0_irqdispatch();
		intc0_req0_irqdispatch();
	else if (pending & CAUSEF_IP3)
	else if (pending & CAUSEF_IP3)
+0 −1
Original line number Original line Diff line number Diff line
@@ -69,7 +69,6 @@ CONFIG_SIBYTE_SB1xxx_SOC=y
CONFIG_SIBYTE_CFE=y
CONFIG_SIBYTE_CFE=y
# CONFIG_SIBYTE_CFE_CONSOLE is not set
# CONFIG_SIBYTE_CFE_CONSOLE is not set
# CONFIG_SIBYTE_BUS_WATCHER is not set
# CONFIG_SIBYTE_BUS_WATCHER is not set
# CONFIG_SIBYTE_SB1250_PROF is not set
# CONFIG_SIBYTE_TBPROF is not set
# CONFIG_SIBYTE_TBPROF is not set
CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+0 −1
Original line number Original line Diff line number Diff line
@@ -70,7 +70,6 @@ CONFIG_SIBYTE_HAS_LDT=y
CONFIG_SIBYTE_CFE=y
CONFIG_SIBYTE_CFE=y
# CONFIG_SIBYTE_CFE_CONSOLE is not set
# CONFIG_SIBYTE_CFE_CONSOLE is not set
# CONFIG_SIBYTE_BUS_WATCHER is not set
# CONFIG_SIBYTE_BUS_WATCHER is not set
# CONFIG_SIBYTE_SB1250_PROF is not set
# CONFIG_SIBYTE_TBPROF is not set
# CONFIG_SIBYTE_TBPROF is not set
CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+3 −0
Original line number Original line Diff line number Diff line
@@ -11,6 +11,7 @@
#include <linux/errno.h>
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/sched.h>
#include <linux/tick.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/mm.h>
#include <linux/stddef.h>
#include <linux/stddef.h>
@@ -52,6 +53,7 @@ void __noreturn cpu_idle(void)
{
{
	/* endless idle loop with no priority at all */
	/* endless idle loop with no priority at all */
	while (1) {
	while (1) {
		tick_nohz_stop_sched_tick();
		while (!need_resched()) {
		while (!need_resched()) {
#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG
#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG
			extern void smtc_idle_loop_hook(void);
			extern void smtc_idle_loop_hook(void);
@@ -61,6 +63,7 @@ void __noreturn cpu_idle(void)
			if (cpu_wait)
			if (cpu_wait)
				(*cpu_wait)();
				(*cpu_wait)();
		}
		}
		tick_nohz_restart_sched_tick();
		preempt_enable_no_resched();
		preempt_enable_no_resched();
		schedule();
		schedule();
		preempt_disable();
		preempt_disable();
Loading