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:	Wed, 10 Sep 2008 21:44:09 +0400
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	Yinghai Lu <yhlu.kernel@...il.com>
Cc:	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"Maciej W. Rozycki" <macro@...ux-mips.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: io-apic - get rid of __DO_ACTION macro

[Yinghai Lu - Wed, Sep 10, 2008 at 10:30:39AM -0700]
| On Wed, Sep 10, 2008 at 2:31 AM, Ingo Molnar <mingo@...e.hu> wrote:
| >
| > * Yinghai Lu <yhlu.kernel@...il.com> wrote:
| >
| >> On Tue, Sep 9, 2008 at 11:02 PM, Cyrill Gorcunov <gorcunov@...il.com> wrote:
| >> > On Wed, Sep 10, 2008 at 12:13 AM, Yinghai Lu <yhlu.kernel@...il.com> wrote:
| >> > ...
| >> >>
| >> >> hope we can keep using MACRO..
| >> >>
| >> >> YH
| >> >>
| >> >
| >> > Btw, Yinghai, what does it mean? To not touch this macro at all?
| >> > Or you mean about implementation issue (ie the design itself)?
| >>
| >> do not touch this macro... and may revisit after 2.6.28
| >
| > anything you are particularly worried about? Regressions we should be
| > able to find pretty quickly, in a central macro like that - and the
| > macro is quite ugly.
| >
| 
| ok, let remove unneeded "if", and use function pointer...
| 
| void (*extra_action_t)(struct irq_pin_list *entry);
| 
| +static inline void io_apic_modify_irq(unsigned int irq,
| +                               int mask_and, int mask_or,
| +                               int mask_and_not, extra_action_t action)
| +{
| +       int pin;
| +       struct irq_cfg *cfg;
| +       struct irq_pin_list *entry;
| +       cfg = irq_cfg(irq);
| +       for (entry = cfg->irq_2_pin; entry != NULL; entry = entry->next) {
| +               unsigned int reg;
| +               pin = entry->pin;
| +               reg = io_apic_read(entry->apic, 0x10 + pin * 2);
| +               reg &= mask_and;
| +               reg |= mask_or;
| +               reg &= ~mask_and_not;
| +               io_apic_modify(entry->apic, 0x10 + pin * 2, reg);
| +               if (action)
| +                       action(entry);
| +       }
| +}
| 
| +void extra_read(struct irq_pin_list *entry)
| +             {
| +                       /*
| +                        * Synchronize the IO-APIC and the CPU by doing
| +                        * a dummy read from the IO-APIC
| +                        */
| +                       struct io_apic __iomem *io_apic;
| +                       io_apic = io_apic_base(entry->apic);
| +                       readl(&io_apic->data);
| +               }
| 
| 
| YH
| 

Yinghai, I've posted second version before you
proposed this. Let me update it then. (though
I don't think if we would need some extra actions
instead of syncs by additional read except for possible
erranious chips). Anyway - will repost updated version.
Thanks.

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