Re: [PATCH V5 1/3] irqchip: add C-SKY irqchip drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 16, 2018 at 08:07:55PM +0100, Marc Zyngier wrote:
> On Sun, 16 Sep 2018 09:50:02 +0100,
> Guo Ren <ren_guo@xxxxxxxxx> wrote:
> > +static void csky_mpintc_handler(struct pt_regs *regs)
> > +{
> > +	void __iomem *reg_base = this_cpu_read(intcl_reg);
> > +
> > +	do {
> > +		handle_domain_irq(NULL,
> 
> It is definitely odd to call into handle_domain_irq without a
> domain. A new architecture (which C-SKY apparently is) shouldn't
> depend on this, and should always provide a domain.
Ok, I'll change it to handle_domain_irq(root_domain and prepare the
root_domain definition.

> > +	ret = of_property_read_u32(node, "csky,num-irqs", &nr_irq);
> > +	if (ret < 0) {
> > +		nr_irq = INTC_IRQS;
> > +	}
> 
> Drop the extra braces.
Ok, and change it to: 
	if (ret < 0)
		nr_irq = INTC_IRQS

> > +
> > +	irq_set_default_host(root_domain);
> 
> Please drop this. There is no reason to use this on any modern, DT
> based architecture.
Please let me keep this and in my arch/csky/kernel/smp.c:

void __init setup_smp_ipi(void)
{
	...
	irq_create_mapping(NULL, IPI_IRQ);

I need irq_set_default_host to pass the domain and this api is used by
a lot of drivers:

$ grep irq_set_default_host drivers/irqchip -r | wc -l
16

In future we could find a better solution.

> > diff --git a/irq-csky-apb-intc.c b/irq-csky-apb-intc.c
> > new file mode 100644
> > index 0000000..d56e6b5
> > --- /dev/null
> > +++ b/irq-csky-apb-intc.c
> 
> This is a separate driver, right? Please make it a separate patch.
Ok, no problem.

> > +static inline int handle_irq_perbit(struct pt_regs *regs, u32 hwirq, u32 irq_base)
> 
> Consider using bool as the return type, and use true/false as return
> values.
Ok, no problem.


> > +	int ret;
> 
> bool.
Ok, no problem.


> > +	int ret;
> 
> bool.
Ok, no problem.



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux