From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Subject: Re: [PATCH 1/2] can: xilinx: use readl/writel instead of ioread/iowrite Date: Thu, 22 Oct 2015 11:49:53 +0200 Message-ID: <5628B141.1010307@xilinx.com> References: <1445489163-11045-1-git-send-email-appanad@xilinx.com> <4061693.oBld7AKBIp@wuerfel> <3847286.pUBWjpC1TL@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <3847286.pUBWjpC1TL@wuerfel> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Arnd Bergmann , linux-arm-kernel@lists.infradead.org Cc: Appana Durga Kedareswara Rao , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-can@vger.kernel.org" , "mkl@pengutronix.de" , Soren Brinkmann , Anirudha Sarangi , "wg@grandegger.com" List-Id: linux-can.vger.kernel.org On 10/22/2015 11:02 AM, Arnd Bergmann wrote: > On Thursday 22 October 2015 08:34:53 Appana Durga Kedareswara Rao wrote: >>> On Thursday 22 October 2015 10:16:02 Kedareswara rao Appana wrote: >>>> The driver only supports memory-mapped I/O [by ioremap()], so >>>> readl/writel is actually the right thing to do, IMO. >>>> During the validation of this driver or IP on ARM 64-bit processor >>>> while sending lot of packets observed that the tx packet drop with >>>> iowrite Putting the barriers for each tx fifo register write fixes >>>> this issue Instead of barriers using writel also fixed this issue. >>>> >>>> Signed-off-by: Kedareswara rao Appana >>> >>> The two should really do the same thing: iowrite32() is just a static inline calling >>> writel() on both ARM32 and ARM64. On which kernel version did you observe the >>> difference? It's possible that an older version used CONFIG_GENERIC_IOMAP, >>> which made this slightly more expensive. >> >> I observed this issue with the 4.0.0 kernel version > > Is it possible that you have nonstandard patches on your kernel? If so, can > you send a diff against the mainline version? Kedar: Can you please retest this on mainline kernel? We shouldn't have any patches which should influence this. Thanks, Michal From mboxrd@z Thu Jan 1 00:00:00 1970 From: michal.simek@xilinx.com (Michal Simek) Date: Thu, 22 Oct 2015 11:49:53 +0200 Subject: [PATCH 1/2] can: xilinx: use readl/writel instead of ioread/iowrite In-Reply-To: <3847286.pUBWjpC1TL@wuerfel> References: <1445489163-11045-1-git-send-email-appanad@xilinx.com> <4061693.oBld7AKBIp@wuerfel> <3847286.pUBWjpC1TL@wuerfel> Message-ID: <5628B141.1010307@xilinx.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 10/22/2015 11:02 AM, Arnd Bergmann wrote: > On Thursday 22 October 2015 08:34:53 Appana Durga Kedareswara Rao wrote: >>> On Thursday 22 October 2015 10:16:02 Kedareswara rao Appana wrote: >>>> The driver only supports memory-mapped I/O [by ioremap()], so >>>> readl/writel is actually the right thing to do, IMO. >>>> During the validation of this driver or IP on ARM 64-bit processor >>>> while sending lot of packets observed that the tx packet drop with >>>> iowrite Putting the barriers for each tx fifo register write fixes >>>> this issue Instead of barriers using writel also fixed this issue. >>>> >>>> Signed-off-by: Kedareswara rao Appana >>> >>> The two should really do the same thing: iowrite32() is just a static inline calling >>> writel() on both ARM32 and ARM64. On which kernel version did you observe the >>> difference? It's possible that an older version used CONFIG_GENERIC_IOMAP, >>> which made this slightly more expensive. >> >> I observed this issue with the 4.0.0 kernel version > > Is it possible that you have nonstandard patches on your kernel? If so, can > you send a diff against the mainline version? Kedar: Can you please retest this on mainline kernel? We shouldn't have any patches which should influence this. Thanks, Michal From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757053AbbJVKFH (ORCPT ); Thu, 22 Oct 2015 06:05:07 -0400 Received: from mail-bn1on0059.outbound.protection.outlook.com ([157.56.110.59]:16093 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751162AbbJVKFA (ORCPT ); Thu, 22 Oct 2015 06:05:00 -0400 X-Greylist: delayed 890 seconds by postgrey-1.27 at vger.kernel.org; Thu, 22 Oct 2015 06:05:00 EDT Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; grandegger.com; dkim=none (message not signed) header.d=none;grandegger.com; dmarc=bestguesspass action=none header.from=xilinx.com; Subject: Re: [PATCH 1/2] can: xilinx: use readl/writel instead of ioread/iowrite To: Arnd Bergmann , References: <1445489163-11045-1-git-send-email-appanad@xilinx.com> <4061693.oBld7AKBIp@wuerfel> <3847286.pUBWjpC1TL@wuerfel> CC: Appana Durga Kedareswara Rao , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-can@vger.kernel.org" , Soren Brinkmann , Anirudha Sarangi , "mkl@pengutronix.de" , "wg@grandegger.com" From: Michal Simek Message-ID: <5628B141.1010307@xilinx.com> Date: Thu, 22 Oct 2015 11:49:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <3847286.pUBWjpC1TL@wuerfel> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-21894.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD024;1:24B3vR0fq3qI09BhEliN6w8xNZeilezRGsIB0JzjBTbAUFU6kokiLoLgPQJTXMsK4czsvmmksS6pHin0unyav1S7n+enwbpiurDVlr2iiiy8VeXHxmZqPHn8BjSg7enBG9UqOaJJhNLnlAK8bbJYz/vzg2CAWU21lRnSPREvwMkJphJNBGJSsRT0fP5IsVxprD4FVqaVjToPeZRbqQTDaWUWy7+DoQ+OlaYL86G+CpXnWfPNcQIizdAWxqtU0Ylix/H7nj/T8Q4pm7Xiw/3HF+lK/hCqkGlXjOyXJB+fZrST2s018Fm7vHH+GizHXDnDfaqUdR4oXQ6L027240Uew1C8giVxiZ1MAudMoOaNYrPHAWOYmPa2KOz1DAXp0rYRIFiti0A8S/OMYj4iLyQe9A== X-Forefront-Antispam-Report: CIP:149.199.60.83;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(189002)(377454003)(164054003)(199003)(479174004)(24454002)(16796002)(36386004)(83506001)(80316001)(64706001)(65806001)(50466002)(47776003)(86362001)(4001350100001)(5001770100001)(23746002)(93886004)(65956001)(87936001)(81156007)(77096005)(63266004)(6806005)(2950100001)(5001960100002)(5007970100001)(19580395003)(54356999)(50986999)(65816999)(19580405001)(76176999)(46102003)(92566002)(64126003)(87266999)(59896002)(106466001)(33656002)(5008740100001)(36756003)(189998001)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN1AFFO11HUB014;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;PTR:unknown-60-83.xilinx.com;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11HUB014;2:pyccDbSLEjxeGeQfHR0Bey7O6cmWwe6je1alUtl2rIYvtwfHXwCGPFpabO17Usnmxj0wiwCe20Kfdh4//E2Z64yqwQRiNx7eJfHHUkSUYChb6cZPVUrOJCWgbUbt8JL2u2RT8UXj3c87OAyAb7MUK+rwwaoSpmoGLCminHD0kj8=;3:8QUkhiLrFBRnzuDpTsuFUqaQsw0zKplbiAa8/s7w+vduZakX11B71wbImPPnbrgGzK4k7EiNrHB3ZgOrsSHjmv323U+cx9lKyZAIsxyQ+b0XilmuThYpDfmEkIe0ml1xcCTBBPn/kOBOqqDpjo+o9I51iWIj43kZMZs2bpN5bUzRvqnhwioUlIm9GCqbLdsHHaO2Ga2Ou2jLblS7qcvkEeKr6t+vhSA+q4ck57wWknYlN6IGZ516sU+5T9lO91rywg+V2Yu+CsaRv82hufXzHA==;25:mSRUELqNXcoeoBCPwtYnbKAn/MVrpXJT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QOSQvRI8L1sYDnx8yITvZ1gkKwMsX0CPhyAcrTb/Ny6YikQ7Ztie3OQIznyi0tW6iYB+R3VKVnzbVWyALm7RfWcDPAuOB59nnZ2leNmnvJOgXxsTJ1Q7fWrYzNRHl5g3SGy0xtCSQ5CzpFaJvdl9GBW1uIpiFgG7AD4JtZE7/BjhyVSfE8DQNwG1UDOw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(3002001)(102215026)(10115024);SRVR:BN1AFFO11HUB014;BCL:0;PCL:0;RULEID:;SRVR:BN1AFFO11HUB014; X-Forefront-PRVS: 0737B96801 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;BN1AFFO11HUB014;23:C4AqpHn+cds/orLH4IOVwu755gmjJi9tRBL?= =?Windows-1252?Q?VcRlcQ2K271+vbKzRtwH4cC1oPOg8LDrfoyDeZg8nmBbDvk94Bbz7c8r?= =?Windows-1252?Q?tFNKXN11JqsxVJTNWqQlQan/99LERImwz/dI6iVdzTyxGUvRDPIOAAxk?= =?Windows-1252?Q?CqE7fvkEL4UZ6O5CagzHrgkHCoekqCRVBeq/v95t1EfUm2d5wp10iYqd?= =?Windows-1252?Q?OdbV+o28XubLj6CZvzfu/DKDvlLYSQVT1p7Ry38JFPT2YxsnEJrzoQgn?= =?Windows-1252?Q?FOxdifJ4i6oubiwaOAcuNF4FZDkBvTqP/Ids3jlgJCfL5LHoojZcOuKO?= =?Windows-1252?Q?RbjqqMJCuPLqCA30fc2aiqGzyKGTVfPZnXDRVMrYGtRW6wG89sHzb9AM?= =?Windows-1252?Q?EP2S92oplUYly9WEGQ3/0WlojV+RoNo1jzH2EFCnHIOIxe0oRNTAGv5Q?= =?Windows-1252?Q?O+2gtZY+s2KPG4MdPdSjz91W9lOc1YZDXPokVfbQSi9pkA6QmqLnottl?= =?Windows-1252?Q?1DeTx4XcEnzHhs0wcEJNRNf+mX0V1LkG8/RIb1wO06acmCBb8+pj1am1?= =?Windows-1252?Q?7eAQ4XPf83f7k0yjT4YXGEulKTjMVtqrD8fiIsN18gTp+7E0wHQn7pdU?= =?Windows-1252?Q?K3ElfLEbfhOlPi0h8r/5Sp5seHZjIGtLqTJfHJa4DqPALctK9vLG+/8B?= =?Windows-1252?Q?NqD+evAWTJ71jIhXbFmObUd825MQhLfRENImR4M3+V4NKOhIDi/laEPK?= =?Windows-1252?Q?vmf5TKbBgHACl51Ykt7GY3hMH2eXJqbGn5OByBjW2yBBFklS+7QWiUk0?= =?Windows-1252?Q?l2MGNJKGgTioQTggHUGX5tOn0aUEutZdOLokgWIApN0ssk9gAFd6tiUW?= =?Windows-1252?Q?r/sidcaiZB6d/hvYn+plEngLI8iQ9F3wUPlnwctUT7Of5A/M3mWQU2CP?= =?Windows-1252?Q?uoYCaMo/gDSqfT2KEXtTCY8nmZiaakSUCAkjGXd8Xhfh6tXNC5Nq2gsQ?= =?Windows-1252?Q?CpV5bZaYtjgApr29b1h+SrWT34BBybb29f58Jfj7DxtyLPuS+eQf0PId?= =?Windows-1252?Q?WyL0suZnGU2bjBRYp4nLM8ryEqHMmIUZb9HRI4+UxhQr+bcuZSTcDf9B?= =?Windows-1252?Q?w0R8uM//KSsO5BB6Q2J5Dapr03xdNJdRaLUtZ8Jj+QPBPRUY68YjUXuV?= =?Windows-1252?Q?M9vsU2SA5og41aIzWRuajZLUFTl20EsEcgE7/xzZbGxaAvs7hN1NkT8H?= =?Windows-1252?Q?2JEdx8GtyBEV0KBwWGWQOQ5u9VXsZbQCkfypUzupAzqcOoYoKlMp9XTm?= =?Windows-1252?Q?ACjMW5tjyhWI1eCvEOQWeAvxi6Sa37sBLy4XrYeqP53AGV5VsuargBaY?= =?Windows-1252?Q?w8TsvP9joUhiW?= X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11HUB014;5:4S/OdBRsfoaUHKeVcQrNxKO/iWWWv7g1+kZmGCUPI/FHJ1Kdwkasf7Tcu1qIWYT1+j7GlD0c7lIO43/giE1FpifBGahAWSbsD6h5rPncQqEC2QoJNBowy5HDKSksSWbyxweVeHyTw7125jYOvuOTHw==;24:/xXwrvQNZvjCB83C9NYvIq6HIZhfTbSSA8eNv36Qhj1ZpIYJH90PR57U5QMFcPcQhalL8IIs3rgozDWR4Vht9nhPax7EZVnhJxPITLVrNc0= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2015 09:50:07.7709 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1AFFO11HUB014 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/22/2015 11:02 AM, Arnd Bergmann wrote: > On Thursday 22 October 2015 08:34:53 Appana Durga Kedareswara Rao wrote: >>> On Thursday 22 October 2015 10:16:02 Kedareswara rao Appana wrote: >>>> The driver only supports memory-mapped I/O [by ioremap()], so >>>> readl/writel is actually the right thing to do, IMO. >>>> During the validation of this driver or IP on ARM 64-bit processor >>>> while sending lot of packets observed that the tx packet drop with >>>> iowrite Putting the barriers for each tx fifo register write fixes >>>> this issue Instead of barriers using writel also fixed this issue. >>>> >>>> Signed-off-by: Kedareswara rao Appana >>> >>> The two should really do the same thing: iowrite32() is just a static inline calling >>> writel() on both ARM32 and ARM64. On which kernel version did you observe the >>> difference? It's possible that an older version used CONFIG_GENERIC_IOMAP, >>> which made this slightly more expensive. >> >> I observed this issue with the 4.0.0 kernel version > > Is it possible that you have nonstandard patches on your kernel? If so, can > you send a diff against the mainline version? Kedar: Can you please retest this on mainline kernel? We shouldn't have any patches which should influence this. Thanks, Michal From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Subject: Re: [PATCH 1/2] can: xilinx: use readl/writel instead of ioread/iowrite Date: Thu, 22 Oct 2015 11:49:53 +0200 Message-ID: <5628B141.1010307@xilinx.com> References: <1445489163-11045-1-git-send-email-appanad@xilinx.com> <4061693.oBld7AKBIp@wuerfel> <3847286.pUBWjpC1TL@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Appana Durga Kedareswara Rao , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-can@vger.kernel.org" , "mkl@pengutronix.de" , Soren Brinkmann , Anirudha Sarangi , "wg@grandegger.com" To: Arnd Bergmann , Return-path: In-Reply-To: <3847286.pUBWjpC1TL@wuerfel> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org List-Id: netdev.vger.kernel.org On 10/22/2015 11:02 AM, Arnd Bergmann wrote: > On Thursday 22 October 2015 08:34:53 Appana Durga Kedareswara Rao wrote: >>> On Thursday 22 October 2015 10:16:02 Kedareswara rao Appana wrote: >>>> The driver only supports memory-mapped I/O [by ioremap()], so >>>> readl/writel is actually the right thing to do, IMO. >>>> During the validation of this driver or IP on ARM 64-bit processor >>>> while sending lot of packets observed that the tx packet drop with >>>> iowrite Putting the barriers for each tx fifo register write fixes >>>> this issue Instead of barriers using writel also fixed this issue. >>>> >>>> Signed-off-by: Kedareswara rao Appana >>> >>> The two should really do the same thing: iowrite32() is just a static inline calling >>> writel() on both ARM32 and ARM64. On which kernel version did you observe the >>> difference? It's possible that an older version used CONFIG_GENERIC_IOMAP, >>> which made this slightly more expensive. >> >> I observed this issue with the 4.0.0 kernel version > > Is it possible that you have nonstandard patches on your kernel? If so, can > you send a diff against the mainline version? Kedar: Can you please retest this on mainline kernel? We shouldn't have any patches which should influence this. Thanks, Michal