Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755578AbbGGJz6 (ORCPT ); Tue, 7 Jul 2015 05:55:58 -0400 Received: from mail-bn1bon0081.outbound.protection.outlook.com ([157.56.111.81]:52672 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751635AbbGGJzu (ORCPT ); Tue, 7 Jul 2015 05:55:50 -0400 Authentication-Results: arm.linux.org.uk; dkim=none (message not signed) header.d=none; Date: Tue, 7 Jul 2015 11:55:33 +0200 From: Robert Richter To: Russell King - ARM Linux CC: Robert Richter , Marc Zygnier , Thomas Gleixner , Jason Cooper , Tirumalesh Chalamarla , , Subject: Re: [PATCH 3/4] irqchip, gicv3: Implement Cavium ThunderX erratum 23154 Message-ID: <20150707095533.GM10428@rric.localhost> References: <1435673643-31676-1-git-send-email-rric@kernel.org> <1435673643-31676-4-git-send-email-rric@kernel.org> <20150706104812.GD7557@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20150706104812.GD7557@n2100.arm.linux.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [78.53.82.202] X-ClientProxiedBy: VI1PR05CA0039.eurprd05.prod.outlook.com (25.162.33.177) To BN3PR0701MB1605.namprd07.prod.outlook.com (25.163.38.28) X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1605;2:EAZp+6XGxTFQk/TUHbcbGHuA4WZpMSa/qHOCokB3sfUEBeunXzQj7TgukvexS4gA;3:BaI6nryyk2c1CIQYOt6a0zm+5Jr2YtuQfinYuzD1VUOuDFqtoPco1VYTm4xqh7VCKbftbAZV33GznMgSCOVesWoctswnB6+2dnCTJkfGQ4Y4Q6UyEDt3m3dsa7OWOcqXGDifiiahwrKyHdBLVm03qw==;25:RZvsELRRLnjtwH0K6KewyWCMe+sJb8v325GNmwPGFo8RNo6SI1g1j2KbsQcvF8a1pIDqirwpKhDDuP1T7jotfR6Cc5QatgmbVuSgorEakARvMpD1ptg+kxlToPi5NOeztX4bcZBABeyguflU+XHadEuIGvyP1/0UdmDV1bHLdwTxibFPAo49kx8NfVv4ACR4CUzkTxfZF2qHdkyynRji5t8vnSXkC8azz4fLKuCl+B5gOgKmbg82EHd1x+mfqopb X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1605;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1298; X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1605;20:NGx+Q+cqR2TW7SuMQT0EISHqZOV8DdmdMGxSma3ZRNU+LJmgNZbRvAeZO/+whzZpATSkvTJXMMf2cWQfIiyUhsRZmc9CY8oBeEj5v4wFjcL0VKEDNXpJGkpPwGAsPtgYyfgTlDOu5R2L6OVGYGaSMZCpsw62YTjOIiyptMSbhQs429hKS1eTIQSYAyXoIYAxNt+K/X7nuv1ECx8hvTf3oui3R21wj9CnXoXPkPAk67ktSJ8FQyP5LFP/WpgKP7/cWOHz2esY9loOKGNCWzSoCbisR9zsJWMId7sKPcPtcrSiZObjvk3JkVIttfUgM8MmgL3xV38nkfaqqojDIMMSR+eoqSf2nJ28w0zcH/RGJe10AMA4VUrhdNcxOZ3p9Z11994fyBSIVhx0Hz33mgYPrEzgAcjBJEx+130ud+A8l8uspAORbDYjAUr77aDwysGtgZK6tsK+XMBRW4EGrppKyq1a/ra3k831AJU2qEd5ctWs1HRotWSqd87HDgHXKLPak0N6mlJeT2GbWB1oaWCo02jt18AHG+lkugcXkkCpvOXJV6/J7E5GORjJaGBitFzjD3NyxWC55ozJO2qGfzS7DoHifVOfbSyMXbkNHTBHcAE=;4:4nxrIzUPXfHyJ6RoGviKGXOAjTlQsdpKbHsBCR504cwuICd9nWzOi6P5kvWneprBwstne1yU0oK6Ry8ySCbJZGhCGaP7TNE8qSsa3GondcS5l8tfGi2pMTcK8ETndqWKlmu0BZQetAjmNwhaPlWwT4TpA6PW9RY4/NHqlCkjKGj2hZrz3WsszRcBVJTo6Q63TGj3l+Xysh/GeK700ejwgTI1oRqYINdoag8Sd9JGxfsZqIBM5GzO5fVKxxkHLUOOIX9nmCnSub3juSeP5yQZKrIlOU1rcw7MAfTA+v8YtHc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BN3PR0701MB1605;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1605; X-Forefront-PRVS: 0630013541 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(6009001)(24454002)(51704005)(164054003)(110136002)(5001960100002)(42186005)(2950100001)(122386002)(189998001)(50466002)(92566002)(86362001)(23726002)(77156002)(62966003)(40100003)(77096005)(33656002)(76506005)(46406003)(46102003)(4001350100001)(76176999)(97756001)(47776003)(50986999)(87976001)(83506001)(66066001)(54356999);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR0701MB1605;H:rric.localhost;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1605;23:824QLEyatjiFNgUgv4ocBGOjP7t9EUibVptbn7b0T323WPq2nO2ME49Fr976+l6ocWp9oacbZoUqOCIhCHjPZAqnT28xDpzSFr68PUl84Ohf6BwDZ6YJkc1LJU1ggD4cZFgA4Pq3sdqqQfubisFkVGjw9kbpY8LB7hQue/ESx8/SazkSz2BaiG+NzRmqlvUkWLXkvtjju2h4R6GStSfJzditDHlA0Ecq2tf9Q5HG/UqZRFEZn0Mwvxdol0fM2m/5iiND1mC3tJihJdv8GBh/fERJnWsh6euYg+uAwYsU/nU1s15MUDFeGQvSJPOXIiX8JGAvl+544ky29CQ4+9bvbuXHo4B7VnjR+NNxT2I1Cy9nK0TUQ3LNStXFr3KAVadeJuvb9QGH4/I81Xt8mmBwVotubAC10ggcNX0OYkKEqHTsScDVA6R3bHQCYuc1C7UHjdCKeGWVeCeyJWdDEwaffAsz5f3pB9/Dy9Bd3kLmApCB4MeKu9Iesc05W4j0SBjDhqmPxffBG2ZNFaebR4Hanhq/UumKBRfq/qfTy7lI5q9OQnAtY1XXcWbqtEKorl5teNRBw58T9ObHJ5w+Qp20O8yUxa58f76ObhQqNkVuoS7FZlLtFVEEeUuIw+iBLrayApkO7+BVYwkqDchQp87u+cYKdpV+YcIUVPam3LUYUaSJ3A51pxeQAmvVqRiAMBjeyb4R6Md2eYc8RjOt2LLqsBTYoe1UACGaFq1TE7sxH9wAGCAQPj90YAs8RFZxY/Q7mFJE4DFGqdLsQpvZqtF59XkMzoWzDnU2NALvfd+x/XSGokCZmRxRNSFq2q9lc02NDrWql2NZpL3HANxAD6Xp9DwI/3XLWSRgY6mG/M3RQzk= X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1605;5:3bSmIwzaRNFpXf4orvkdmcPG/eknjH+fol50q9bC/YJhVK8q5ey+T8z+oAjNrWxftpL3bQWyEvX46nt74bowDkBr6XWxkYVVPBx+AzBvbj1cmhTGS0TKUlD2XqZyUWCoVL2nhVbz7SCmCK0iLajiNQ==;24:1KmXzo1CAWGPvG+7BKACxvNx/XASvnq5b6vG3fAjU7QuCWfQs2RynS0kDr+LLoVakelhiXlOYqcTnHTXic8DPzwI4jxn+blnWubQp0QbKvo=;20:J4h6prVtXiDDBzSBv8UGASeyBO+R9cSA4xDWfNQgXZFa8jq3o2kCdyiuFQmhTshzK5Z2Lb/KCQgXcxWRyDOWKg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2015 09:55:46.6876 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1605 X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1298;2:OdTOwYkl4P4RcOOcO5DmY8yR1DlGYSIuHEi+BO7Bv7a1RhVrBODH00+klru1D9ob;3:AakIkyXbz4OFyU2eMq6F4KyOnhid5q14DlFM05V05OmrGQ5NWofvFDe/3v/dLztjOXTxzFjfROq8nMX+/ClJsLbgeGBXgDo/iJutvCDD6ewiv7jNAiepOaMd8jVSvj12Q8p1eXb8pa5eUVjs/aJ28g==;25:sLzJYMODwdQy8p7oY2aG4saeCCf3p5gMZYtHEkKodzN/JGPHLT6d1AiCTA8LypooCKZqc/KHNPhvuGzM2uaFRVBIn/7A+QF+7JKX6Ivet6mGMMQWowZRfXTowjIqRU7dYA4SxUolR2hro/vHmZ58OzsxkastvR6kn7KDeog7kunIsIQOHxIBPpHerxEiBbat1ytUEhELcWOm3WcvOzIkP8IFXDRdfItCDH5cc7a+2Kb7TQKUVFOyLAfUoVxfO2Mr;23:u622JOftbsU5hxElvkGpTDbqRtNMQGNv2dLn8dU3Qx/YmCqWYsyJGlZ/tAdoG17C6EoaqqO13l88jdpY9pQDgX8irP0401IMUBTFoCeIqIH11Gqml3PWyPWg56uz5jg1y0dCf8rF6P+g384IE3Cp9kH33okaU4uf4k54hkNXmDJ6rvCNY4kV1v2/+rp2rwevR44SgiXIilQ35I+qdOqERiEab0Rv9rZA51hsFNH5jhpDDRVrzh/wc9hvQwv8vidA X-OriginatorOrg: caviumnetworks.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1505 Lines: 43 Russell, thanks for your comments. On 06.07.15 11:48:12, Russell King - ARM Linux wrote: > On Tue, Jun 30, 2015 at 04:14:02PM +0200, Robert Richter wrote: > > +static u64 gic_read_iar_cavium_thunderx(void) > > { > > u64 irqstat; > > > > + asm volatile("nop;nop;nop;nop;"); > > + asm volatile("nop;nop;nop;nop;"); > > asm volatile("mrs_s %0, " __stringify(ICC_IAR1_EL1) : "=r" (irqstat)); > > + asm volatile("nop;nop;nop;nop;"); > > + mb(); > > NAK. Please read the GCC manual for proper use of asm(). Even with > "volatile" there, it doesn't stop GCC from inserting instructions > between these. > > If you need an instruction sequence to be consecutive, then it _must_ > be one single asm(). I will update this section. > There should also be a comment explaining why that code is necessary > here. Please think about the future when you've forgotten why those > nops are there. The kernel is a long term project, and it's important > that people understand why things are coded the way they are so that > the kernel can be properly maintained into the future. I will add a comment to the code with a brief description. Would the current text from the patch description including the erratum number be sufficient for that? Thanks, -Robert -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/