linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: adharmap@codeaurora.org (Abhijeet Dharmapurikar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] gic: implement set_type
Date: Fri, 14 May 2010 09:32:00 -0700	[thread overview]
Message-ID: <4BED7B00.5080405@codeaurora.org> (raw)
In-Reply-To: <1273574921-25714-1-git-send-email-rabin.vincent@stericsson.com>

> +static int gic_set_type(unsigned int irq, unsigned int type)
> +{
> +	void __iomem *base = gic_dist_base(irq);
> +	unsigned int gicirq = gic_irq(irq);
> +	u32 enablemask = 1 << (gicirq % 32);
> +	u32 enableoff = (gicirq / 32) * 4;
> +	u32 confmask = 0x2 << ((gicirq % 16) * 2);
> +	u32 confoff = (gicirq / 16) * 4;
> +	bool enabled = false;
> +	u32 val;
> +
> +	/* Only SPIs' interrupt configuration can be changed */
> +	if (gicirq < 32)
> +		return -EINVAL;


This causes drivers who are requesting PPI's with IRQF_TRIGGER_* flags 
to fail.


Note that it is "Implementation Defined" whether PPI's are programmable 
.http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0048a/index.html

I would request to change gicirq < 32 to gicirq < 16 , the writes will 
be ignored if PPI's are not programmable.

Abhijeet

  reply	other threads:[~2010-05-14 16:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-11 10:48 [PATCH] gic: implement set_type Rabin Vincent
2010-05-14 16:32 ` Abhijeet Dharmapurikar [this message]
2010-05-17  5:20   ` Rabin VINCENT
  -- strict thread matches above, loose matches on Subject: below --
2010-01-05  4:26 Rabin Vincent

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=4BED7B00.5080405@codeaurora.org \
    --to=adharmap@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).