All of lore.kernel.org
 help / color / mirror / Atom feed
From: Holger Schurig <holgerschurig@gmail.com>
To: Tom Evans <tom_usenet@optusnet.com.au>
Cc: linux-can@vger.kernel.org
Subject: Re: CAN question: how to trace frame errors?
Date: Sat, 13 Jun 2015 22:28:28 +0200	[thread overview]
Message-ID: <CAOpc7mHYiX3SAJSEHM32PA1gRFA+BQ0DxCC3U6Aux15Swy06sQ@mail.gmail.com> (raw)
In-Reply-To: <557C4C83.3020501@optusnet.com.au>

> and while the CPU supports different interrupt priorities, the 3.4 TZIC code
> simply doesn't provide the functions to change it.

I don't know the i.MX5x and it's TZIC, only the i.MX6 ... and only a
bit. But I think there it's not a limitation in the silicon, but in
the software (Linux in our case, e.g. drivers/irqchips/gic*). The
i.MX6 uses the GIC (described in the ARM MPCORE reference manual). And
there it says:

------------------------
The interrupt distributor centralizes all interrupt sources before
dispatching them to each individual Cortex-A9 processor. The Interrupt
Distributor arbitrates in the following priority order:
1. Highest priority interrupts. These have the lowest value in the
Interrupt Priority Register (ICDIPTR)
2. For interrupts with the same priority value, the Interrupt
Distributor arbitrates on the interrupt ID number. It dispatches the
smaller ID number first
3. For aliased SGI with the same priority value and the same ID
number, the Interrupt Distributor arbitrates on the source CPU number.
It dispatches the smaller CPU number first.
------------------------

This register ICDIPTR is called GIC_DIST_PRI in Linux and they all get
set to a fixed value. So it's the IRQ number that set's the IRQ
priority in current Linux.


And btw, thanks for your patch. I'll probably rewrite it to use kfifo,
which is a ringbuffer already contained in Linux (see
include/linux/kfifo.h), I think that will increase it's chance of
inclusion.

  reply	other threads:[~2015-06-13 20:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12  9:29 CAN question: how to trace frame errors? Holger Schurig
2015-06-12  9:34 ` Marc Kleine-Budde
2015-06-12 10:01   ` Holger Schurig
2015-06-12 12:33     ` Tom Evans
2015-06-12 14:24       ` Holger Schurig
2015-06-13 15:30         ` Tom Evans
2015-06-13 20:28           ` Holger Schurig [this message]
2015-06-14  2:42             ` Tom Evans
2015-06-22 12:17               ` Holger Schurig
2015-06-22 13:15                 ` Marc Kleine-Budde
2015-06-24 14:29                   ` Holger Schurig
2015-06-25  8:37                     ` Tom Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOpc7mHYiX3SAJSEHM32PA1gRFA+BQ0DxCC3U6Aux15Swy06sQ@mail.gmail.com \
    --to=holgerschurig@gmail.com \
    --cc=linux-can@vger.kernel.org \
    --cc=tom_usenet@optusnet.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.