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=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED 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 E412CC43381 for ; Fri, 29 Mar 2019 09:14:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B37C32173C for ; Fri, 29 Mar 2019 09:14:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="GdiqpVu9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729303AbfC2JOA (ORCPT ); Fri, 29 Mar 2019 05:14:00 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:35992 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728886AbfC2JOA (ORCPT ); Fri, 29 Mar 2019 05:14:00 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x2T9DoWk061661; Fri, 29 Mar 2019 04:13:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1553850830; bh=x5xDuW4+Jb4uWtHPtPQgbfXYnrde9PnslThD8VlRyPU=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=GdiqpVu9Obm9z6z32DqsUTJqPP1ueZTA/rgHs+UHHvx83KcIDAcozl3+kDlnnxwiC 2ZFFes0cRjVaLgC8Cmj9juwnLYrCcDTAGQfzlHnXwYmAG3gDcvdWbJQOAsSB/aLm+m vRrAd3rW44+APqT6O3y93IvYHMCmSSOKbj2QWpss= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x2T9Dot5074695 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 29 Mar 2019 04:13:50 -0500 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 29 Mar 2019 04:13:50 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 29 Mar 2019 04:13:50 -0500 Received: from [172.22.188.74] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x2T9Dkuv062515; Fri, 29 Mar 2019 04:13:47 -0500 Subject: Re: [PATCH net-next] net: ethernet: ti: davinci_mdio: switch to readl/writel_relaxed() To: Arnd Bergmann CC: "David S. Miller" , Networking , Sekhar Nori , Linux Kernel Mailing List , linux-omap , Linux ARM References: <1553792993-7722-1-git-send-email-grygorii.strashko@ti.com> From: Grygorii Strashko Message-ID: <5e37fb17-ccf8-540e-0cdc-bc3b71ccf259@ti.com> Date: Fri, 29 Mar 2019 11:11:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, On 29.03.19 03:00, Arnd Bergmann wrote: > On Fri, Mar 29, 2019 at 1:10 AM Grygorii Strashko > wrote: >> >> Switch to readl/writel_relaxed() APIs, because this is recommended >> API and the MDIO block is reused on Keystone 2 SoCs >> where LE/BE modes are supported. >> >> Signed-off-by: Grygorii Strashko > > In general, my recommendation would be to use readl/writel instead of > readl_relaxed/writel_relaxed everywhere, because they have much > more predictible behavior. If you want to use the _relaxed version > in the fast-path for data traffic, that is usually fine, but then I would > add a comment next to it to explain why it is safe there without extra > barriers to serialize with spinlocks and DMA. > it's not fast path, so readl/writel should be ok. I'll resend. -- Best regards, grygorii 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=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED 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 87F7BC43381 for ; Fri, 29 Mar 2019 09:14:04 +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 55CE121773 for ; Fri, 29 Mar 2019 09:14:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CFzwM3Ea"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ti.com header.i=@ti.com header.b="GdiqpVu9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 55CE121773 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.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:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BTRQm/BNsE6cHOM/CB6CD5chnOvbss7msX7Sj2rDcbA=; b=CFzwM3EawTPstP Y7xrLP+bLjYYF1rTalm8KBt0+ijKN5pIDC06wo0IKthWEMNEHvYZtYzXjwl1ermpdYH6rMVdPwgeT uBvYYMfRKMT9bbmLj7QD/7uHHgk0hFqLCc8o2MwRHd9HxrKopzR8ja3njK7TzHPA9YMarSL9TuNSk T7OkJ+ZSUE2TkGcRIepgRsBFZbvz2qXTMvoNw4WS+v1QwdVcwcd5LByYHpqwc7W7tEXu7gXLo2+RF MfS0dBKElK2P+JlGbsDYrzXlpnYun3rZ33kxseu/7OyqlDGtOOvV/Oer0nkN4Egj1aLeNfycjFIHb +5POd5T7VeEOwcodJAVA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9naK-0002uE-GE; Fri, 29 Mar 2019 09:14:00 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9naI-0002tu-1c for linux-arm-kernel@lists.infradead.org; Fri, 29 Mar 2019 09:13:59 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x2T9DoWk061661; Fri, 29 Mar 2019 04:13:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1553850830; bh=x5xDuW4+Jb4uWtHPtPQgbfXYnrde9PnslThD8VlRyPU=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=GdiqpVu9Obm9z6z32DqsUTJqPP1ueZTA/rgHs+UHHvx83KcIDAcozl3+kDlnnxwiC 2ZFFes0cRjVaLgC8Cmj9juwnLYrCcDTAGQfzlHnXwYmAG3gDcvdWbJQOAsSB/aLm+m vRrAd3rW44+APqT6O3y93IvYHMCmSSOKbj2QWpss= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x2T9Dot5074695 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 29 Mar 2019 04:13:50 -0500 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 29 Mar 2019 04:13:50 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 29 Mar 2019 04:13:50 -0500 Received: from [172.22.188.74] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x2T9Dkuv062515; Fri, 29 Mar 2019 04:13:47 -0500 Subject: Re: [PATCH net-next] net: ethernet: ti: davinci_mdio: switch to readl/writel_relaxed() To: Arnd Bergmann References: <1553792993-7722-1-git-send-email-grygorii.strashko@ti.com> From: Grygorii Strashko Message-ID: <5e37fb17-ccf8-540e-0cdc-bc3b71ccf259@ti.com> Date: Fri, 29 Mar 2019 11:11:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190329_021358_150867_02DB15E2 X-CRM114-Status: GOOD ( 13.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Networking , Sekhar Nori , Linux Kernel Mailing List , linux-omap , "David S. Miller" , Linux ARM 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 Arnd, On 29.03.19 03:00, Arnd Bergmann wrote: > On Fri, Mar 29, 2019 at 1:10 AM Grygorii Strashko > wrote: >> >> Switch to readl/writel_relaxed() APIs, because this is recommended >> API and the MDIO block is reused on Keystone 2 SoCs >> where LE/BE modes are supported. >> >> Signed-off-by: Grygorii Strashko > > In general, my recommendation would be to use readl/writel instead of > readl_relaxed/writel_relaxed everywhere, because they have much > more predictible behavior. If you want to use the _relaxed version > in the fast-path for data traffic, that is usually fine, but then I would > add a comment next to it to explain why it is safe there without extra > barriers to serialize with spinlocks and DMA. > it's not fast path, so readl/writel should be ok. I'll resend. -- Best regards, grygorii _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel