Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1498131

Re: [PATCH v2 1/3] net: smc91x: isolate u16 writes alignment workaround

From Robert Jarzmik <robert.jarzmik@free.fr>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/3] net: smc91x: isolate u16 writes alignment workaround
Date 2016-10-10 08:40 +0200
Message-ID <sqCpH-6ic-5@gated-at.bofh.it> (permalink)
References <sqt33-q2-1@gated-at.bofh.it> <squiu-14c-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Andy Shevchenko <andy.shevchenko@gmail.com> 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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/3] net: smc91x: isolate u16 writes alignment workaround Robert Jarzmik <robert.jarzmik@free.fr> - 2016-10-09 22:40 +0200
  [PATCH v2 3/3] net: smsc91x: add u16 workaround for pxa platforms Robert Jarzmik <robert.jarzmik@free.fr> - 2016-10-09 22:40 +0200
  [PATCH v2 2/3] net: smc91x: take into account half-word workaround Robert Jarzmik <robert.jarzmik@free.fr> - 2016-10-09 22:40 +0200
  Re: [PATCH v2 1/3] net: smc91x: isolate u16 writes alignment workaround Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-10-10 00:00 +0200
    Re: [PATCH v2 1/3] net: smc91x: isolate u16 writes alignment workaround Robert Jarzmik <robert.jarzmik@free.fr> - 2016-10-10 08:40 +0200

csiph-web