Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • F firmware
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
  • Issues 74
    • Issues 74
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 29
    • Merge requests 29
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • External wiki
    • External wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • card10card10
  • firmware
  • Merge requests
  • !377

Dispatch interrupts asynchroneously

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Rahix requested to merge rahix/interrupts into master Apr 03, 2020
  • Overview 25
  • Commits 6
  • Pipelines 5
  • Changes 16

This patch-set changes interrupt dispatching to happen asynchronously. This is a first step towards making API-calls interrupt safe. It also makes Epicardium more robust against a buggy payload as such a payload can no longer deadlock tasks which try to send interrupts (in such an instance, now they will be scheduled but never leave the IRQ queue).

Patch-List:

chore(interrupts): Make api_interrupt_trigger() return void

api_interrupt_trigger() cannot fail except by a programmer error (passing an invalid ID) in which case we should raise an assertion. Thus, make it return void instead of int.

fix(lifecycle): Don't trigger a reset during startup

This is a silent issue which I noticed during work in this patchset; we are sending a superfluous interrupt during boot. This patch changes this although it reduces readability of the code. I'd be ok with dropping it again if readability here is more important.

chore(interrupts): Move api into an epicardium module

Our buildsystem prevents implementing the task in epicardium/api so I moved the interrupts API into an Epicardium module.

chore(interrupts): Fix all modules to use new api

Update code-base to use new API.

feat(interrupts): Dispatch interrupts asynchroneously

Instead of blocking the triggering task when core 1 is still busy handling the previous interrupt, offload interrupt dispatching into a separate task. This is the first step towards making API-calls interrupt safe.

Next to the async triggering, the synchroneous mechanism is retained for special cases where async does not work (e.g. because of spin-locks). Currently, there is only one such case when resetting core 1 (triggering EPIC_INT_RESET).

docs(interrupts): Document new interrupt dispatcher task

Docs ...

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: rahix/interrupts