Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1444455

Re: [PATCH v3 08/12] irqchip: add J-Core AIC driver

From Rich Felker <dalias@libc.org>
Newsgroups linux.kernel
Subject Re: [PATCH v3 08/12] irqchip: add J-Core AIC driver
Date 2016-07-15 19:10 +0200
Message-ID <rVeMF-19a-3@gated-at.bofh.it> (permalink)
References <rCzRD-5z7-3@gated-at.bofh.it> <rCzRE-5z7-27@gated-at.bofh.it> <rVe0h-D2-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jul 15, 2016 at 04:19:17PM +0000, Jason Cooper wrote:
> > +	u32 cpu_offset;
> > +	struct irq_chip chip;
> > +	struct irq_domain *domain;
> > +	struct notifier_block nb;
> > +} aic_data;
> > +
> > +static int aic_irqdomain_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hwirq)
> > +{
> > +	struct aic_data *aic = d->host_data;
> > +
> > +	irq_set_chip_data(irq, aic);
> > +	irq_set_chip_and_handler(irq, &aic->chip, handle_simple_irq);
> > +	irq_set_probe(irq);
> > +
> > +	return 0;
> > +}
> > +
> > +static const struct irq_domain_ops aic_irqdomain_ops = {
> > +	.map = aic_irqdomain_map,
> > +	.xlate = irq_domain_xlate_onecell,
> > +};
> > +
> > +static void noop(struct irq_data *data)
> > +{
> > +}
> > +
> > +static void aic1_localenable(struct aic_data *aic)
> > +{
> > +	unsigned cpu = smp_processor_id();
> > +	pr_info("Local AIC enable on cpu %u\n", cpu);
> > +	writel(0xffffffff, aic->base + cpu * aic->cpu_offset + AIC1_INTPRI);
> > +}
> > +
> > +static int aic1_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu)
> > +{
> > +	switch (action & ~CPU_TASKS_FROZEN) {
> > +	case CPU_STARTING:
> > +		aic1_localenable(container_of(self, struct aic_data, nb));
> > +		break;
> > +	}
> > +	return NOTIFY_OK;
> > +}
> 
> Please take a look at the series posted by Anna-Maria Gleixner for
> recent changes to the cpu hp state machine.
> 
>   https://lkml.kernel.org/r/20160713153333.416260485@linutronix.de

I saw this but was utterly confused about what's going on. Is the
general notifier system that doesn't need to be aware of specific
devices actually being replaced by a huge enum table of all possible
devices that need special treatment as cpu starting/dying?? Or do I
misunderstand what's going on?

Rich

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v3 08/12] irqchip: add J-Core AIC driver Jason Cooper <jason@lakedaemon.net> - 2016-07-15 18:20 +0200
  Re: [PATCH v3 08/12] irqchip: add J-Core AIC driver Rich Felker <dalias@libc.org> - 2016-07-15 19:10 +0200

csiph-web