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]
Message-ID: <20181009145955.GA17681@guoren-Inspiron-7460>
Date:   Tue, 9 Oct 2018 22:59:56 +0800
From:   Guo Ren <ren_guo@...ky.com>
To:     Marc Zyngier <marc.zyngier@....com>
Cc:     tglx@...utronix.de, jason@...edaemon.net, robh+dt@...nel.org,
        mark.rutland@....com, daniel.lezcano@...aro.org,
        anurup.m@...wei.com, Jonathan.Cameron@...wei.com,
        will.deacon@....com, zhangshaokun@...ilicon.com, jhogan@...nel.org,
        paul.burton@...s.com, peterz@...radead.org, arnd@...db.de,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH V10 1/8] irqchip: add C-SKY SMP interrupt controller

Hi, Marc,

On Tue, Oct 09, 2018 at 09:15:17AM +0100, Marc Zyngier wrote:

> >>>+#ifdef CONFIG_SMP
> >>>+	set_send_ipi(&csky_mpintc_send_ipi);
> >>>+
> >>>+	set_ipi_irq_mapping(&csky_mpintc_ipi_irq_mapping);
> >>
> >>Since you seem to be inventing a new set_send_ipi callback, why don't you
> >>define it as:
> >>
> >>void set_send_ipi(void (*func)(const struct cpumask *),
> >>		  unsigned int ipi_irq);
> >>after having created the mapping for the IPI interrupt? It would avoid this
> >>rather pointless mapping callback.
> >
> >I'll define it to:
> >
> >void set_send_ipi(void (*func)(const struct cpumask *));
> >
> >IPI_IRQ only use software-irq-15 in mpintc driver, so arch needn't care
> >about irq-num.
> 
> Except that your SMP code does a request_irq on the result of
> create_mapping. Who is going to do that if you don't pass the Linux irq
> around?
 
Yes, My SMP code does a request_irq on the result of create_mapping.
Here is my smp.c code and it use a result of create_mapping by arch_ipi_irq_mapping()
callback in irq-csky-mpintc.c

void __init setup_smp_ipi(void)
{
	int rc;

	ipi_irq = arch_ipi_irq_mapping();
	if (ipi_irq == 0)
		panic("%s IRQ mapping failed\n", __func__);

	rc = request_percpu_irq(ipi_irq, handle_ipi, "IPI Interrupt",
				&ipi_dummy_dev);
	if (rc)
		panic("%s IRQ request failed\n", __func__);

	enable_smp_ipi();
}

Best Regards
 Guo Ren

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ