Skip to content

Commit

Permalink
Merge pull request torvalds#317 from libos-nuse/feature-hrtimer
Browse files Browse the repository at this point in the history
lkl: enable HIGH_RES_TIMERS (hrtimer) for the arch
  • Loading branch information
thehajime committed Feb 9, 2017
2 parents 9294fb3 + 85b1276 commit 615a744
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/lkl/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ config LKL
select IP_PNP
select IP_PNP_DHCP
select TCP_CONG_BBR
select HIGH_RES_TIMERS

config OUTPUTFORMAT
string
Expand Down
4 changes: 4 additions & 0 deletions arch/lkl/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,19 @@ static struct irq_info {

static bool irqs_enabled;

static struct pt_regs dummy;

static void run_irq(int irq)
{
unsigned long flags;
struct pt_regs *old_regs = set_irq_regs((struct pt_regs *)&dummy);

/* interrupt handlers need to run with interrupts disabled */
local_irq_save(flags);
irq_enter();
generic_handle_irq(irq);
irq_exit();
set_irq_regs(old_regs);
local_irq_restore(flags);
}

Expand Down

0 comments on commit 615a744

Please sign in to comment.