From: Tao Ren <rentao.bupt@gmail.com> To: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Felipe Balbi <balbi@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>, Chunfeng Yun <chunfeng.yun@mediatek.com>, Colin Ian King <colin.king@canonical.com>, Stephen Boyd <swboyd@chromium.org>, Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, taoren@fb.com Subject: Re: [PATCH v4 2/7] usb: gadget: aspeed: read vhub properties from device tree Date: Thu, 27 Feb 2020 14:29:32 -0800 [thread overview] Message-ID: <20200227222931.GA29420@taoren-ubuntu-R90MNF91> (raw) In-Reply-To: <b9b8977ae185ca944e703721d93b8d8464d1475f.camel@kernel.crashing.org> Hi Ben, On Thu, Feb 27, 2020 at 03:09:01PM +1100, Benjamin Herrenschmidt wrote: > On Wed, 2020-02-26 at 15:03 -0800, rentao.bupt@gmail.com wrote: > > From: Tao Ren <rentao.bupt@gmail.com> > > > > The patch introduces 2 DT properties ("aspeed,vhub-downstream-ports" and > > "aspeed,vhub-generic-endpoints") which replaces hardcoded port/endpoint > > number. It is to make it more convenient to add support for newer vhub > > revisions with different number of ports and endpoints. > > > > Signed-off-by: Tao Ren <rentao.bupt@gmail.com> > > Reviewed-by: Joel Stanley <joel@jms.id.au> > > With one minor nit that can be addressed in a subsequent patch (see > below) > > Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Thanks for the help on the patch series. > > - if (istat & VHUB_IRQ_DEVICE3) > > - ast_vhub_dev_irq(&vhub->ports[2].dev); > > - if (istat & VHUB_IRQ_DEVICE4) > > - ast_vhub_dev_irq(&vhub->ports[3].dev); > > - if (istat & VHUB_IRQ_DEVICE5) > > - ast_vhub_dev_irq(&vhub->ports[4].dev); > > + for (i = 0; i < vhub->max_ports; i++) { > > + u32 dev_mask = VHUB_IRQ_DEVICE1 << i; > > + > > + if (istat & dev_mask) > > + ast_vhub_dev_irq(&vhub->ports[i].dev); > > } > > The 2400 and 2500 have very slow cores and every cycle counts in that > interrupt handler from my experience. I would sugggest you generate a > "mask" of all the device interrupts for enabled ports in struct vhub > and AND istat with that mask before going through the loop. Either that > or use find_next_zero_bit... > > I wouldn't gate merging this patch on this, it can be a subsequent > refinement. Got it. I will take care of the improvement in a follow-up patch. Cheers, Tao
WARNING: multiple messages have this Message-ID (diff)
From: Tao Ren <rentao.bupt@gmail.com> To: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Mark Rutland <mark.rutland@arm.com>, Felipe Balbi <balbi@kernel.org>, linux-aspeed@lists.ozlabs.org, devicetree@vger.kernel.org, Andrew Jeffery <andrew@aj.id.au>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, openbmc@lists.ozlabs.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Boyd <swboyd@chromium.org>, Rob Herring <robh+dt@kernel.org>, Joel Stanley <joel@jms.id.au>, taoren@fb.com, Chunfeng Yun <chunfeng.yun@mediatek.com>, Colin Ian King <colin.king@canonical.com>, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 2/7] usb: gadget: aspeed: read vhub properties from device tree Date: Thu, 27 Feb 2020 14:29:32 -0800 [thread overview] Message-ID: <20200227222931.GA29420@taoren-ubuntu-R90MNF91> (raw) In-Reply-To: <b9b8977ae185ca944e703721d93b8d8464d1475f.camel@kernel.crashing.org> Hi Ben, On Thu, Feb 27, 2020 at 03:09:01PM +1100, Benjamin Herrenschmidt wrote: > On Wed, 2020-02-26 at 15:03 -0800, rentao.bupt@gmail.com wrote: > > From: Tao Ren <rentao.bupt@gmail.com> > > > > The patch introduces 2 DT properties ("aspeed,vhub-downstream-ports" and > > "aspeed,vhub-generic-endpoints") which replaces hardcoded port/endpoint > > number. It is to make it more convenient to add support for newer vhub > > revisions with different number of ports and endpoints. > > > > Signed-off-by: Tao Ren <rentao.bupt@gmail.com> > > Reviewed-by: Joel Stanley <joel@jms.id.au> > > With one minor nit that can be addressed in a subsequent patch (see > below) > > Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Thanks for the help on the patch series. > > - if (istat & VHUB_IRQ_DEVICE3) > > - ast_vhub_dev_irq(&vhub->ports[2].dev); > > - if (istat & VHUB_IRQ_DEVICE4) > > - ast_vhub_dev_irq(&vhub->ports[3].dev); > > - if (istat & VHUB_IRQ_DEVICE5) > > - ast_vhub_dev_irq(&vhub->ports[4].dev); > > + for (i = 0; i < vhub->max_ports; i++) { > > + u32 dev_mask = VHUB_IRQ_DEVICE1 << i; > > + > > + if (istat & dev_mask) > > + ast_vhub_dev_irq(&vhub->ports[i].dev); > > } > > The 2400 and 2500 have very slow cores and every cycle counts in that > interrupt handler from my experience. I would sugggest you generate a > "mask" of all the device interrupts for enabled ports in struct vhub > and AND istat with that mask before going through the loop. Either that > or use find_next_zero_bit... > > I wouldn't gate merging this patch on this, it can be a subsequent > refinement. Got it. I will take care of the improvement in a follow-up patch. Cheers, Tao _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-02-27 22:29 UTC|newest] Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-26 23:03 [PATCH v4 0/7] aspeed-g6: enable usb support rentao.bupt 2020-02-26 23:03 ` rentao.bupt 2020-02-26 23:03 ` [PATCH v4 1/7] usb: gadget: aspeed: support per-vhub usb descriptors rentao.bupt 2020-02-26 23:03 ` rentao.bupt 2020-02-27 4:01 ` Benjamin Herrenschmidt 2020-02-27 4:01 ` Benjamin Herrenschmidt 2020-02-26 23:03 ` [PATCH v4 2/7] usb: gadget: aspeed: read vhub properties from device tree rentao.bupt 2020-02-26 23:03 ` rentao.bupt 2020-02-27 4:09 ` Benjamin Herrenschmidt 2020-02-27 4:09 ` Benjamin Herrenschmidt 2020-02-27 22:29 ` Tao Ren [this message] 2020-02-27 22:29 ` Tao Ren 2020-02-26 23:03 ` [PATCH v4 3/7] usb: gadget: aspeed: add ast2600 vhub support rentao.bupt 2020-02-26 23:03 ` rentao.bupt 2020-02-27 4:09 ` Benjamin Herrenschmidt 2020-02-27 4:09 ` Benjamin Herrenschmidt 2020-02-26 23:03 ` [PATCH v4 4/7] ARM: dts: aspeed-g6: add usb functions rentao.bupt 2020-02-26 23:03 ` rentao.bupt 2020-02-27 4:10 ` Benjamin Herrenschmidt 2020-02-27 4:10 ` Benjamin Herrenschmidt 2020-02-27 5:54 ` Joel Stanley 2020-02-27 5:54 ` Joel Stanley 2020-02-27 5:54 ` Joel Stanley 2020-02-26 23:03 ` [PATCH v4 5/7] ARM: dts: aspeed-g5: add vhub port and endpoint properties rentao.bupt 2020-02-26 23:03 ` rentao.bupt 2020-02-27 4:10 ` Benjamin Herrenschmidt 2020-02-27 4:10 ` Benjamin Herrenschmidt 2020-02-27 5:54 ` Joel Stanley 2020-02-27 5:54 ` Joel Stanley 2020-02-27 5:54 ` Joel Stanley 2020-02-26 23:03 ` [PATCH v4 6/7] ARM: dts: aspeed-g4: " rentao.bupt 2020-02-26 23:03 ` rentao.bupt 2020-02-27 4:10 ` Benjamin Herrenschmidt 2020-02-27 4:10 ` Benjamin Herrenschmidt 2020-02-27 5:54 ` Joel Stanley 2020-02-27 5:54 ` Joel Stanley 2020-02-27 5:54 ` Joel Stanley 2020-02-27 22:34 ` Tao Ren 2020-02-27 22:34 ` Tao Ren 2020-02-26 23:03 ` [PATCH v4 7/7] dt-bindings: usb: add documentation for aspeed usb-vhub rentao.bupt 2020-02-26 23:03 ` rentao.bupt 2020-02-27 4:04 ` Benjamin Herrenschmidt 2020-02-27 4:04 ` Benjamin Herrenschmidt 2020-02-27 5:52 ` Joel Stanley 2020-02-27 5:52 ` Joel Stanley 2020-02-27 5:52 ` Joel Stanley 2020-02-27 16:55 ` Rob Herring 2020-02-27 16:55 ` Rob Herring 2020-02-27 22:42 ` Tao Ren 2020-02-27 22:42 ` Tao Ren 2020-02-27 23:10 ` Tao Ren 2020-02-27 23:10 ` Tao Ren 2020-02-28 2:17 ` Tao Ren 2020-02-28 2:17 ` Tao Ren
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200227222931.GA29420@taoren-ubuntu-R90MNF91 \ --to=rentao.bupt@gmail.com \ --cc=andrew@aj.id.au \ --cc=balbi@kernel.org \ --cc=benh@kernel.crashing.org \ --cc=chunfeng.yun@mediatek.com \ --cc=colin.king@canonical.com \ --cc=devicetree@vger.kernel.org \ --cc=gregkh@linuxfoundation.org \ --cc=joel@jms.id.au \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-aspeed@lists.ozlabs.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-usb@vger.kernel.org \ --cc=mark.rutland@arm.com \ --cc=openbmc@lists.ozlabs.org \ --cc=robh+dt@kernel.org \ --cc=swboyd@chromium.org \ --cc=taoren@fb.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.