lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 24 Nov 2014 14:13:31 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	"Yun Wu (Abel)" <wuyun.wu@...wei.com>
cc:	LKML <linux-kernel@...r.kernel.org>,
	Jiang Liu <jiang.liu@...ux.intel.com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Grant Likely <grant.likely@...aro.org>,
	Marc Zyngier <marc.zyngier@....com>,
	Yingjoe Chen <yingjoe.chen@...iatek.com>,
	Yijing Wang <wangyijing@...wei.com>
Subject: Re: [patch 01/16] irqdomain: Introduce new interfaces to support
 hierarchy irqdomains

On Mon, 24 Nov 2014, Yun Wu (Abel) wrote:
> Hi Thomas, Jiang,
> On 2014/11/12 21:42, Thomas Gleixner wrote:
> 
> > From: Jiang Liu <jiang.liu@...ux.intel.com>
> > 
> [...]
> >  /* Number of irqs reserved for a legacy isa controller */
> >  #define NUM_ISA_INTERRUPTS	16
> > @@ -64,6 +66,16 @@ struct irq_domain_ops {
> >  	int (*xlate)(struct irq_domain *d, struct device_node *node,
> >  		     const u32 *intspec, unsigned int intsize,
> >  		     unsigned long *out_hwirq, unsigned int *out_type);
> > +
> > +#ifdef	CONFIG_IRQ_DOMAIN_HIERARCHY
> > +	/* extended V2 interfaces to support hierarchy irq_domains */
> > +	int (*alloc)(struct irq_domain *d, unsigned int virq,
> > +		     unsigned int nr_irqs, void *arg);
> > +	void (*free)(struct irq_domain *d, unsigned int virq,
> > +		     unsigned int nr_irqs);
> > +	void (*activate)(struct irq_domain *d, struct irq_data *irq_data);
> > +	void (*deactivate)(struct irq_domain *d, struct irq_data *irq_data);
> 
> What's the usage of the parameter domain reference in activate/deactivate?
> I think the purpose of the two callbacks is to activate/deactivate the
> irq_data->hwirq in irq_data->domain. If so, the first parameter @domain is
> required to be equal to irq_data->domain (which makes @domain useless).
> Besides, the main responsibility of interrupt domains is to manage mappings
> between hardware and linux interrupt numbers, so would it be better if move
> the two callbacks into struct irq_chip?

No. It's not a function of the irq_chip to activate/deactivate a
hierarchy. As I explained you before:

The existing irqdomain code maps between hardware and virtual
interrupts and thereby activates the interrupt in hardware.

In the hierarchical case we do not touch the hardware in the
allocation step, so we need to activate the allocated interrupt in the
hardware before we can use it. And that's clearly a domain interface
not a irq chip issue.

Thanks,

	tglx

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ