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:	Sat, 20 Jun 2015 16:11:44 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Brian Norris <computersforpeace@...il.com>
cc:	Florian Fainelli <f.fainelli@...il.com>,
	Gregory Fong <gregory.0xf0@...il.com>,
	bcm-kernel-feedback-list@...adcom.com,
	linux-kernel@...r.kernel.org, linux-mips@...ux-mips.org,
	Kevin Cernekee <cernekee@...il.com>,
	Jason Cooper <jason@...edaemon.net>
Subject: Re: [PATCH 1/2] genirq: add chip_{suspend,resume} PM support to
 irq_chip

On Fri, 19 Jun 2015, Brian Norris wrote:
> This patch adds a second set of suspend/resume hooks to irq_chip, this
> time to represent *chip* suspend/resume, rather than IRQ suspend/resume.
> These callbacks will always be called for an irqchip and are based on
> the per-chip irq_chip_generic struct, rather than the per-IRQ irq_data
> struct.

There is no per-chip irq_chip_generic struct. It's only there if the
irq chip has been instantiated as a generic chip.
 
>  /**
>   * struct irq_chip - hardware interrupt chip descriptor
>   *
> @@ -317,6 +319,12 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
>   * @irq_suspend:	function called from core code on suspend once per chip
>   * @irq_resume:		function called from core code on resume once per chip
>   * @irq_pm_shutdown:	function called from core code on shutdown once per chip
> + * @chip_suspend:	function called from core code on suspend once per
> + *			chip; for handling chip details even when no interrupts
> + *			are in use
> + * @chip_resume:	function called from core code on resume once per chip;
> + *			for handling chip details even when no interrupts are
> + *			in use
>   * @irq_calc_mask:	Optional function to set irq_data.mask for special cases
>   * @irq_print_chip:	optional to print special chip info in show_interrupts
>   * @irq_request_resources:	optional to request resources before calling
> @@ -357,6 +365,8 @@ struct irq_chip {
>  	void		(*irq_suspend)(struct irq_data *data);
>  	void		(*irq_resume)(struct irq_data *data);
>  	void		(*irq_pm_shutdown)(struct irq_data *data);
> +	void		(*chip_suspend)(struct irq_chip_generic *gc);
> +	void		(*chip_resume)(struct irq_chip_generic *gc);

I really don't want to set a precedent for random (*foo)(*bar)
callbacks.
 
> +
> +		if (ct->chip.chip_suspend)
> +			ct->chip.chip_suspend(gc);

So wouldn't it be the more intuitive solution to make this a callback
in the struct gc itself?

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ