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] [day] [month] [year] [list]
Date:	Tue, 15 Jan 2013 20:36:38 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Seiji Aguchi <seiji.aguchi@....com>
Cc:	"x86@...nel.org" <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"H. Peter Anvin (hpa@...or.com)" <hpa@...or.com>,
	"Thomas Gleixner (tglx@...utronix.de)" <tglx@...utronix.de>,
	"'mingo@...e.hu' (mingo@...e.hu)" <mingo@...e.hu>,
	"Borislav Petkov (bp@...en8.de)" <bp@...en8.de>,
	Satoru Moriya <satoru.moriya@....com>,
	"dle-develop@...ts.sourceforge.net" 
	<dle-develop@...ts.sourceforge.net>,
	"linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
	"Luck, Tony (tony.luck@...el.com)" <tony.luck@...el.com>
Subject: Re: [RFC][PATCH v7 2/2]trace,x86: code-sharing between non-trace
 and trace irq handlers

On Thu, 2013-01-10 at 17:33 +0000, Seiji Aguchi wrote:
> diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
> index 624ef3f..580aa93 100644
> --- a/include/linux/hardirq.h
> +++ b/include/linux/hardirq.h
> @@ -6,6 +6,7 @@
>  #include <linux/ftrace_irq.h>
>  #include <linux/vtime.h>
>  #include <asm/hardirq.h>
> +#include <asm/idle.h>
>  
>  /*
>   * We put the hardirq and softirq counter into the preemption
> @@ -198,4 +199,28 @@ extern void irq_exit(void);
>  		ftrace_nmi_exit();				\
>  	} while (0)
>  
> +static inline void entering_irq(void)
> +{
> +	irq_enter();
> +	exit_idle();
> +}
> +
> +static inline void entering_ack_irq(void)
> +{
> +	ack_APIC_irq();
> +	entering_irq();
> +}
> +
> +static inline void exiting_irq(void)
> +{
> +	irq_exit();
> +}
> +
> +static inline void exiting_ack_irq(void)
> +{
> +        irq_exit();
> +	/* Ack only at the end to avoid potential reentry */
> +        ack_APIC_irq();
> +}

Shouldn't these be in a x86 specific header? Not a generic header like
hardirq.h. I don't think other archs will be doing an ack_APIC_irq(), as
it's only defined in x86. Why not add these to
arch/x86/include/asm/apic.h ?

-- Steve

> +
>  #endif /* LINUX_HARDIRQ_H */
> -- 1.7.1


--
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