Search Linux Wireless

Re: coding style lesson: iwlwifi vs. endianness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> my_data = read_drom_device()
> swap_to_cpu(my_data)
> do_whatever(my_data)
> store the data somewhere else in the device structs for
> later use, maybe.
> do_something_else(my_data)
>
> You see that now you have only _one_ place that you have to care about.
> And if you have to write your data back at some point, simply do it
> just before the write.
>

Correct xxcept that this is not the case.

Our case is

Loop:
 my_big_little_endian_struct.
 set little tiny bit in it
 send to HW
end



> And, little endian intel guys, this will simplify your life a lot by
> removing lots of cpu_to_xxx stuff _and_ result
> in no performance loss, as the swap will be optimized away. :)
> That's a deal, eh?
> And we big endian people, we don't care about one or two swap instructions.
> It won't hurt performance in any way.

I care. I'm running it on big endian, truly. Yes I cannot really say
how the performance be hurt, but I still prefer my way.

> (Johannes also showed that in most cases this approach doesn't even
> add extra instructions).
>
> --
> Greetings Michael.
>
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux