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:	Thu, 13 Nov 2008 12:06:49 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Ingo Molnar <mingo@...e.hu>
CC:	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sparse_irq aka dyn_irq v13

Ingo Molnar wrote:

> it still looks ugly to me: couldnt we make it completely #ifdef-free, 
> by just adding the new API variants?
> 
> i.e. leave these present unconditionally:
> 
>>  extern void hpet_msi_unmask(unsigned int irq);
>>  extern void hpet_msi_mask(unsigned int irq);
> 
> and just _add_ these (unconditionally):
> 
>> +extern void hpet_msi_unmask_desc(unsigned int irq, struct irq_desc **descp);
>> +extern void hpet_msi_mask_desc(unsigned int irq, struct irq_desc **descp);
> 
> that gives us zero #ifdefs and much nicer to read patches. Am i 
> missing something why this isnt possible?

in io_apic.c

struct irq_chip hpet_msi_type = {
        .name = "HPET_MSI",
        .unmask = hpet_msi_unmask,
        .mask = hpet_msi_mask,
        .ack = ack_apic_edge,
#ifdef CONFIG_SMP
        .set_affinity = hpet_msi_set_affinity,
#endif
        .retrigger = ioapic_retrigger_irq,
};

so those ack, mask, unmak, eoi field will have different function prototype..when sparseirq is enabled or not.

if you want to remove those #ifdef, we need to go over all irq_chip definition to make all those field to take struct irq_desc *desc (or **descp) instead of unsigned int irq.

actually we only need to pass desc struct instead of irq, because we can get desc->irq in case.

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