From patchwork Tue Sep 15 20:25:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 260845 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=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 33C36C43461 for ; Tue, 15 Sep 2020 22:05:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F28D3206B7 for ; Tue, 15 Sep 2020 22:05:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600207502; bh=rIbuF4LBIDj3nrco7Vxo0vv2OzeqRPw/dqH/gR1Urtk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=2jYw7WNYvw8TuTJwoBdjWZlDKdc3T4ie1T81vs5SvrSHuL/lLnE/fzC5stmZvyHzJ MHVqKgM3tCu1LNjG66b9BkOOeZGMB9SU6Uw/Qpw3XbPP8MZ6LFUl4KYS6QdILfvLdG 1+i9XNCGptTN7wkccUPHzJEUVVr3EiQALo7Y+WEk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728014AbgIOWFA (ORCPT ); Tue, 15 Sep 2020 18:05:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:54380 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727907AbgIOU0w (ORCPT ); Tue, 15 Sep 2020 16:26:52 -0400 Received: from sx1.lan (c-24-6-56-119.hsd1.ca.comcast.net [24.6.56.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2153E21974; Tue, 15 Sep 2020 20:25:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600201556; bh=rIbuF4LBIDj3nrco7Vxo0vv2OzeqRPw/dqH/gR1Urtk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dj9/Ovb2VLirUEWerTggRLTHhNKUiS0uoH3jSNuJhQeH6BTY8dS/2fF4LCwSyelUw Hbn/J3D36w0i5JaTTEVwDZ5Shwol2TnN1oUcn5XqCsZuBGVd3haAQdD5EfNEDA3Vcy c4bNfQQFPcR7pe1zHgrzd9/jilK9SPPe/maTEShQ= From: saeed@kernel.org To: "David S. Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, Eran Ben Elisha , Moshe Shemesh , Saeed Mahameed Subject: [net-next 05/16] net/mlx5: Release clock lock before scheduling a PPS work Date: Tue, 15 Sep 2020 13:25:22 -0700 Message-Id: <20200915202533.64389-6-saeed@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200915202533.64389-1-saeed@kernel.org> References: <20200915202533.64389-1-saeed@kernel.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Eran Ben Elisha Holding the clock lock is not required when scheduling a PPS work. Signed-off-by: Eran Ben Elisha Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c index b62daf7b9a5c..f8465e42b238 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c @@ -581,8 +581,8 @@ static int mlx5_pps_event(struct notifier_block *nb, cycles_delta = div64_u64(nsec_delta << clock->cycles.shift, clock->cycles.mult); clock->pps_info.start[pin] = cycles_now + cycles_delta; - schedule_work(&clock->pps_info.out_work); write_sequnlock_irqrestore(&clock->lock, flags); + schedule_work(&clock->pps_info.out_work); break; default: mlx5_core_err(mdev, " Unhandled clock PPS event, func %d\n",