Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2545173imu; Mon, 17 Dec 2018 03:57:51 -0800 (PST) X-Google-Smtp-Source: AFSGD/WX+cVzvCjGbgqhSGZFxEWOTHdsOU2q+YfaTOF8BtfixuAtP3pZm8nIpOeANEgaxuxNACZl X-Received: by 2002:a65:590b:: with SMTP id f11mr11991284pgu.60.1545047871615; Mon, 17 Dec 2018 03:57:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545047871; cv=none; d=google.com; s=arc-20160816; b=irDs+vxTL4eML3MprEQUkK7BK8YloBgm37lr6Av/HkxOJSeGklIV3HXfWT8X5/4wP+ z+QzJcnHzoiO5WaFwVe30ayU9J2hBinm88SsafNMHECaOUNnXNWZTr5L7a7FmnJ/iqlv Lx/jpqy9F8mSAztQE9YxP8nMPJJDVBK7amOh1neJylLKGtjLIdJ5qmMNwz7IA+uHpIQs jmBMzltWvWaUUrCL6CHQCAf73mSncfwCqpyFtLNYFLieQsDuZFVSvRKg5XSxJMGq9arz XUiqcbNQzQdQPeYEvMRLFAEp4J3M4RuBCNa9EKoGEpOQIkSSPc/gvY4kDZy9SQ7+s/US EV5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=CZUPd0efOHyRyydpCuC3wS6rP3xOk/qH27h7FN5Fy/A=; b=yZOEoPdrrWu+YSTSNk0MLza7fCf3Pko7exJnYdrzqUOiA/lz5J/oSopkAuufJOuozp owaVlidQj21fDu7jy8dIkAEiIcZqj4uymma4peOF6HQhtWu9OhiwprkOL7AWIrqiMLOd fTYsJwS5EwzyNRoUfQtcDkqD/9+mJo7FgYz4H1nqd6MIxD3xUIBU/y6OLsYsdsDiVJOs XI7F+pMOGyMQDEthR3fFp8Vbva9kYFhfjaxPms96W9cU/B3hQ42aqikxEu1lk8FfaF24 TtRKyoaKnFsBfwoG+w8lRRC0tuC8yT5lPwGNgPxVPEZn/IF6Jfkps0y9X5gZWSfpK9cS 0i7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c31si10924783pgc.465.2018.12.17.03.57.36; Mon, 17 Dec 2018 03:57:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732591AbeLQL4h (ORCPT + 99 others); Mon, 17 Dec 2018 06:56:37 -0500 Received: from mga11.intel.com ([192.55.52.93]:19239 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726831AbeLQL4h (ORCPT ); Mon, 17 Dec 2018 06:56:37 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Dec 2018 03:56:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,365,1539673200"; d="asc'?scan'208";a="99332985" Received: from pipin.fi.intel.com (HELO localhost) ([10.237.72.175]) by orsmga007.jf.intel.com with ESMTP; 17 Dec 2018 03:56:31 -0800 From: Felipe Balbi To: Pawel Laszczak , "devicetree\@vger.kernel.org" , Kishon Vijay Abraham I Cc: "gregkh\@linuxfoundation.org" , "linux-usb\@vger.kernel.org" , "rogerq\@ti.com" , "linux-kernel\@vger.kernel.org" , Alan Douglas , "jbergsagel\@ti.com" , "nsekhar\@ti.com" , "nm\@ti.com" , Suresh Punnoose , "peter.chen\@nxp.com" , Pawel Jez , Rahul Kumar Subject: RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver In-Reply-To: References: <1544445555-17325-1-git-send-email-pawell@cadence.com> <1544445555-17325-3-git-send-email-pawell@cadence.com> <87h8fkmfar.fsf@linux.intel.com> <87a7lbme3m.fsf@linux.intel.com> Date: Mon, 17 Dec 2018 13:56:27 +0200 Message-ID: <87pnu0gydw.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Pawel Laszczak writes: >>>>> +static irqreturn_t cdns3_device_irq_handler(int irq, void *data) >>>>> +{ >>>>> + struct cdns3_device *priv_dev; >>>>> + struct cdns3 *cdns =3D data; >>>>> + irqreturn_t ret =3D IRQ_NONE; >>>>> + unsigned long flags; >>>>> + u32 reg; >>>>> + >>>>> + priv_dev =3D cdns->gadget_dev; >>>>> + spin_lock_irqsave(&priv_dev->lock, flags); >>>> >>>>you're already running in hardirq context. Why do you need this lock at >>>>all? I would be better to use the hardirq handler to mask your >>>>interrupts, so they don't fire again, then used the top-half (softirq) >>>>handler to actually handle the interrupts. >>> >>> Yes, spin_lock_irqsave is not necessary here. >>> >>> Do you mean replacing devm_request_irq with a request_threaded_irq ? >>> I have single interrupt line shared between Host, Driver, DRD/OTG. >>> I'm not sure if it will work more efficiently. >> >>The whole idea for running very little in hardirq context is to give the >>scheduler a chance to decide what should run. This is important to >>reduce latency when running with RT patchset applied, for >>example. However, I'll give you that, it's a minor requirement. It's >>just that, to me, it's a small detail that's easy to implement. > > I will do it in PATCH v2 or PATCH v3.=20=20 > I need to post next version before 24 of December, so if I can do it > before this date then it will be in PATCH v2.=20 Take your time :-) Nothing will happen until next year. I already sent my pull request for v4.21 and a large chunk of the community takes a few days off during the holiday season. There's really no rush from a community stand point. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAlwXjusACgkQzL64meEa mQYKpg//Wimwk9sUeFUERdJB++wwrH2WgY8w5bzYfWtS0vT8j7iwEByZOmtCID6q BwmBw/L1XcaohJFcQWLhxEMDmOEs3QS5E2EwEI1UsVVj8UW07gazDvsZWwpOAdvB DToqjwM9RVl4Xa79tfW+tTbz51Z0YrKgpBPUXSZSqLKkHqrgnfcKnS4R5dJ9I8NU fCYuIMdQJoo5CzSHYsoGYHithyMdKP/txZRHvrmItn9CHBJDmHVoy+p77QFdlryd zqU7p3FOOIcFSXdy+NIvcTPOiBZkI39Uuu4AgqY078qhN+ZjcmZGiDsxiKhPLcYA sLptN62jEXEA99pXCNJU5CzCjz0h0VC/qfoCKKFw5ELj2TGT+rvTaWArHJK3ecwn DWBGmzHOWfS/AOnfLU2HaeO2a2aUs3xbH905rt7zh/Cz4DGkAKg7k5l+HJ0TEk/T k8GM3rArCkeGQhJcehMGqyWTDg56W0HiMp6htRZelZ084Jd+mzPI358glzrh+cWE RQJSqJiCG/wx+oOVrIglyZoGmpiztexjQ/RKY9GCqSrM7extVMt3NQAXI5DFLvhX ohb9e1ar7c3zrstRFY8M12aWFZ86bdl09u5dRauAAe3RUmart/Gn9TBYGYOlaWxn 1exLyL4Pb/cuaziDygtf0sHGeFnBi1k76Nfyq7e3s7my9/p7rI4= =ijdd -----END PGP SIGNATURE----- --=-=-=--