From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB02EC3F2C2 for ; Thu, 27 Feb 2020 22:29:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9B8FA24697 for ; Thu, 27 Feb 2020 22:29:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GaAsaW/a"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="a0nmU5d8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B8FA24697 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QuyPNIvlUXxjOvDZi7u9olWauIcy7nsqum7ws2AZ52A=; b=GaAsaW/a0lxtzK CBWtms9WbSLHxIhkl+EVAs28KyF3PdHNkt581aYRMDxaOg1WG0i84hCDUhMCaD/XE+eXaCuekh1d3 V11yOb67Kwal2aQrAmVSDlNI2xAJ2hKNcfIB5ESAedUTdvJLsQ8Rmj4WkfOoi2MA2g2h1yl79+YPh S1J3UuMXD2p1io9Z7k0jSvO2DpeeQlrn5PvCHaVPi29VlNtIiGbJVdHCnXVZQ93SRQh1Wibyy7AFH mqViJan7566Yo/UZolHIOdbfyBsy38qEh1aYGvOuvdqoWCIDtHkcZ5+wtwiCB2rE5WW4hRJBNWyDR qrNwyU6tO5gRgBz2aQ1g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j7Rf6-00016I-WC; Thu, 27 Feb 2020 22:29:45 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j7Rf4-00015f-Jt for linux-arm-kernel@lists.infradead.org; Thu, 27 Feb 2020 22:29:44 +0000 Received: by mail-pf1-x441.google.com with SMTP id j9so581201pfa.8 for ; Thu, 27 Feb 2020 14:29:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dAKQtQFMwvA4in1IKX12aA2LxpzkOZ3DeV5aYoLW1Dk=; b=a0nmU5d8Fqui67x7EDMrxyRLgET/G0iEKZQ3fHRK/3Dou0wE6XBiu9qf3bM08cfP6D /qzbSszn/RqpuBqcbVC38AaKcMIxx2t+aRQ9BuilhnT+bm4NDiyniMAVGrW5xNkH2lQ3 v376HxpgeUt0aQI5qpIQU80drCyrzsf4PKMVY7JtmLHX2PfuOOkuzUbT0ODcIbO4ACFK r1D65ggKF/4q/Y77n5lN02m+1wW3RwkBkcjmYy7sSKjgDTWZMOQh41RY7Qt+eRoa1MPv f2ZBhfq6NThumXvbKk2/QKyT/YlxdBpgGA5Ms52RO1xNhHrbwdBMFxEuYjO6ZAkHkV/k 35jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=dAKQtQFMwvA4in1IKX12aA2LxpzkOZ3DeV5aYoLW1Dk=; b=Sy5t1xrVkNjyepknwAklDH4r+tJov9csElUXPk7Y7YlC9QNccVR36hKpboWzKC8EIK QpybWrZO35lloDa7wDW2F7GkKE6/qZG5l4cDm5KAuUedBL3yep1f8T1aVaI5TC+jgPE8 YqahNrB1Uc0O81sV5jKv099bhcgZHMsBWeQ+Jiw9JZlT31XsTQuVoeREUC+NVP31woaZ Fa+u/Zmli0sDpqD1XQ+eEAD8fDwmQ5610JzpvwqRiLCjcnUXRkPfIG0EIXk9yaz5f03v bFU7lRQMm1/83K169RRpLgozLgOlWgnIwzmckcUyPAC/0/W43wJfIWf70SZPbpHQn5P5 fZLQ== X-Gm-Message-State: APjAAAWJPlMuHmtevPm6F3tFIY3i4ypHj/8RTqcz/oqcvAE17u89UEuT kSvRgbUUiNFmvL2QVcyw+Vw= X-Google-Smtp-Source: APXvYqwCjo4NWg/n1zmJDAcIKJ2UE6VbP7KCZK4B2tzXfKC/iHPldab23u/RzAE40bqfKpBKWNJKFQ== X-Received: by 2002:a63:2c85:: with SMTP id s127mr1480287pgs.138.1582842580284; Thu, 27 Feb 2020 14:29:40 -0800 (PST) Received: from taoren-ubuntu-R90MNF91 ([2620:10d:c090:500::4:d8f5]) by smtp.gmail.com with ESMTPSA id 136sm7794224pgh.26.2020.02.27.14.29.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Feb 2020 14:29:39 -0800 (PST) Date: Thu, 27 Feb 2020 14:29:32 -0800 From: Tao Ren To: Benjamin Herrenschmidt Subject: Re: [PATCH v4 2/7] usb: gadget: aspeed: read vhub properties from device tree Message-ID: <20200227222931.GA29420@taoren-ubuntu-R90MNF91> References: <20200226230346.672-1-rentao.bupt@gmail.com> <20200226230346.672-3-rentao.bupt@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200227_142942_662113_89988810 X-CRM114-Status: GOOD ( 18.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Felipe Balbi , linux-aspeed@lists.ozlabs.org, devicetree@vger.kernel.org, Andrew Jeffery , Greg Kroah-Hartman , openbmc@lists.ozlabs.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Boyd , Rob Herring , Joel Stanley , taoren@fb.com, Chunfeng Yun , Colin Ian King , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > > > > 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 > > Reviewed-by: Joel Stanley > > With one minor nit that can be addressed in a subsequent patch (see > below) > > Acked-by: Benjamin Herrenschmidt 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