mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Noam Camus <noamc@ezchip.com>
Cc: linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org,
	daniel.lezcano@linaro.org, marc.zyngier@arm.com,
	cmetcalf@ezchip.com, talz@ezchip.com, giladb@ezchip.com,
	Jason Cooper <jason@lakedaemon.net>
Subject: Re: [PATCH v2 3/3] irqchip: add nps Internal and external irqchips
Date: Tue, 2 Feb 2016 14:35:12 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.11.1602021425430.25254@nanos> (raw)
In-Reply-To: <1454418899-25500-4-git-send-email-noamc@ezchip.com>

On Tue, 2 Feb 2016, Noam Camus wrote:
> +#include <linux/interrupt.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/irqdomain.h>
> +#include <linux/irqchip.h>
> +#include <soc/nps/common.h>
> +
> +#undef NR_CPU_IRQS

What's that #undef for?

> +#define NR_CPU_IRQS	8  /* number of interrupt lines of NPS400 CPU */
> +#define TIMER0_IRQ	3

> +static void nps400_irq_eoi_global(struct irq_data *irqd)
> +{
> +	unsigned int __maybe_unused irq = irqd_to_hwirq(irqd);
> +
> +	write_aux_reg(CTOP_AUX_IACK, 1 << irq);
> +
> +	/* Don't ack before all device access attempts are done */
> +	mb();

And what is that memory barrier for if this is not on ARC?

> +
> +#ifdef __arc__
> +	__asm__ __volatile__ (
> +	"       .word %0\n"

First of all this wants to be .inst not .word.

> +	:
> +	: "i"(CTOP_INST_RSPI_GIC_0_R12)
> +	: "memory");

And this needs be defined as an inline somewhere in arch/arc and not in the
driver. In the driver you do:

#ifdef CONFIG_ARCH_ARC
# include <arch/....>
#else
static inline void arc_ack_gic(void) { }
#endif

static void nps400_irq_eoi_global
{
	....
	arc_ack_gic();
}

Hmm?

> +static int nps400_irq_map(struct irq_domain *d, unsigned int virq,
> +			  irq_hw_number_t hw)
> +{
> +	switch (hw) {
> +	case TIMER0_IRQ:
> +#ifdef CONFIG_SMP
> +	case IPI_IRQ:
> +#endif
> +		irq_set_percpu_devid(virq);
> +		irq_set_chip_and_handler(virq, &nps400_irq_chip_percpu,
> +					 handle_percpu_devid_irq);
> +	break;

		break;
Please

> +	default:
> +		irq_set_chip_and_handler(virq, &nps400_irq_chip_fasteoi,
> +					 handle_fasteoi_irq);
> +	break;

Ditto.

Thanks,

	tglx

  reply	other threads:[~2016-02-02 13:36 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 13:14 [PATCH v2 0/3] Adding NPS400 drivers Noam Camus
2016-02-02 13:14 ` [PATCH v2 1/3] soc: Support for EZchip SoC Noam Camus
2016-02-02 13:14 ` [PATCH v2 2/3] clocksource: Add NPS400 timers driver Noam Camus
2016-02-02 14:36   ` kbuild test robot
2016-02-02 13:14 ` [PATCH v2 3/3] irqchip: add nps Internal and external irqchips Noam Camus
2016-02-02 13:35   ` Thomas Gleixner [this message]
2016-02-02 20:40   ` kbuild test robot
2016-02-06 16:16 ` [PATCH v3 0/3] Adding NPS400 drivers Noam Camus
2016-02-11  3:02   ` [PATCH v4 " Noam Camus
2016-02-11 18:40     ` [PATCH v5 " Noam Camus
2016-02-17  7:05       ` Noam Camus
2016-02-11 18:40     ` [PATCH v5 1/3] soc: Support for EZchip SoC Noam Camus
2016-02-11 18:40     ` [PATCH v5 2/3] clocksource: Add NPS400 timers driver Noam Camus
2016-02-11 20:29       ` Daniel Lezcano
2016-02-11 18:40     ` [PATCH v5 3/3] irqchip: add nps Internal and external irqchips Noam Camus
2016-02-19 14:03       ` Jason Cooper
2016-02-19 14:42         ` Noam Camus
2016-02-11  3:02   ` [PATCH v4 1/3] soc: Support for EZchip SoC Noam Camus
2016-02-11  3:02   ` [PATCH v4 2/3] clocksource: Add NPS400 timers driver Noam Camus
2016-02-11  8:18     ` Daniel Lezcano
2016-02-11  3:02   ` [PATCH v4 3/3] irqchip: add nps Internal and external irqchips Noam Camus
2016-02-06 16:16 ` [PATCH v3 1/3] soc: Support for EZchip SoC Noam Camus
2016-02-06 16:16 ` [PATCH v3 2/3] clocksource: Add NPS400 timers driver Noam Camus
2016-02-08 14:21   ` Daniel Lezcano
2016-02-09 12:36     ` Noam Camus
2016-02-09 13:38       ` Daniel Lezcano
2016-02-09 21:47         ` Noam Camus
2016-02-09 22:55           ` Daniel Lezcano
2016-02-10  8:01             ` Noam Camus
2016-02-06 16:16 ` [PATCH v3 3/3] irqchip: add nps Internal and external irqchips Noam Camus

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=alpine.DEB.2.11.1602021425430.25254@nanos \
    --to=tglx@linutronix.de \
    --cc=cmetcalf@ezchip.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=giladb@ezchip.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=marc.zyngier@arm.com \
    --cc=noamc@ezchip.com \
    --cc=talz@ezchip.com \
    /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

all inboxes | Powered by JetHome®