From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752526AbcJJGjN (ORCPT ); Mon, 10 Oct 2016 02:39:13 -0400 Received: from smtp08.smtpout.orange.fr ([80.12.242.130]:47253 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752509AbcJJGjM (ORCPT ); Mon, 10 Oct 2016 02:39:12 -0400 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Mon, 10 Oct 2016 08:30:38 +0200 X-ME-IP: 90.38.43.100 From: Robert Jarzmik To: Andy Shevchenko Cc: Rob Herring , Mark Rutland , Nicolas Pitre , Russell King - ARM Linux , Arnd Bergmann , netdev , devicetree , "linux-kernel\@vger.kernel.org" Subject: Re: [PATCH v2 1/3] net: smc91x: isolate u16 writes alignment workaround References: <1476045227-2970-1-git-send-email-robert.jarzmik@free.fr> X-URL: http://belgarath.falguerolles.org/ Date: Mon, 10 Oct 2016 08:30:34 +0200 In-Reply-To: (Andy Shevchenko's message of "Mon, 10 Oct 2016 00:55:17 +0300") Message-ID: <87zimc7m2d.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andy Shevchenko writes: >> +#define SMC_outw(lp, v, a, r) \ >> + _SMC_outw_align4((v), (a), (r), \ >> + IS_BUILTIN(CONFIG_ARCH_PXA) && ((r) & 2) && \ >> + lp->half_word_align4) > > Hmm... Isn't enough to have just (r) & 2 && lp->half_word_align4 ? It wouldn't be equivalent to what we had before. The point of the previous code was to compile out as much as possible of this test. Therefore, at compilation time for omap1 boards, the compiler would evaluate the test to 0, and never leave the workaround code compiled. So it would be enough, but worse performance wise and not equivalent for non-pxa boards, hence this test. Cheers. -- Robert From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Jarzmik Subject: Re: [PATCH v2 1/3] net: smc91x: isolate u16 writes alignment workaround Date: Mon, 10 Oct 2016 08:30:34 +0200 Message-ID: <87zimc7m2d.fsf@belgarion.home> References: <1476045227-2970-1-git-send-email-robert.jarzmik@free.fr> Mime-Version: 1.0 Content-Type: text/plain Cc: Rob Herring , Mark Rutland , Nicolas Pitre , Russell King - ARM Linux , Arnd Bergmann , netdev , devicetree , "linux-kernel\@vger.kernel.org" To: Andy Shevchenko Return-path: In-Reply-To: (Andy Shevchenko's message of "Mon, 10 Oct 2016 00:55:17 +0300") Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org Andy Shevchenko writes: >> +#define SMC_outw(lp, v, a, r) \ >> + _SMC_outw_align4((v), (a), (r), \ >> + IS_BUILTIN(CONFIG_ARCH_PXA) && ((r) & 2) && \ >> + lp->half_word_align4) > > Hmm... Isn't enough to have just (r) & 2 && lp->half_word_align4 ? It wouldn't be equivalent to what we had before. The point of the previous code was to compile out as much as possible of this test. Therefore, at compilation time for omap1 boards, the compiler would evaluate the test to 0, and never leave the workaround code compiled. So it would be enough, but worse performance wise and not equivalent for non-pxa boards, hence this test. Cheers. -- Robert -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Jarzmik Subject: Re: [PATCH v2 1/3] net: smc91x: isolate u16 writes alignment workaround Date: Mon, 10 Oct 2016 08:30:34 +0200 Message-ID: <87zimc7m2d.fsf@belgarion.home> References: <1476045227-2970-1-git-send-email-robert.jarzmik@free.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: (Andy Shevchenko's message of "Mon, 10 Oct 2016 00:55:17 +0300") Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Andy Shevchenko Cc: Rob Herring , Mark Rutland , Nicolas Pitre , Russell King - ARM Linux , Arnd Bergmann , netdev , devicetree , "linux-kernel@vger.kernel.org" List-Id: devicetree@vger.kernel.org Andy Shevchenko writes: >> +#define SMC_outw(lp, v, a, r) \ >> + _SMC_outw_align4((v), (a), (r), \ >> + IS_BUILTIN(CONFIG_ARCH_PXA) && ((r) & 2) && \ >> + lp->half_word_align4) > > Hmm... Isn't enough to have just (r) & 2 && lp->half_word_align4 ? It wouldn't be equivalent to what we had before. The point of the previous code was to compile out as much as possible of this test. Therefore, at compilation time for omap1 boards, the compiler would evaluate the test to 0, and never leave the workaround code compiled. So it would be enough, but worse performance wise and not equivalent for non-pxa boards, hence this test. Cheers. -- Robert -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html