cpuid: remove un-needed bit shifting

eax/ebx/ecx/edx are 32-bit registers, and we need 8 bits from most
significand bits so there is no need to mask out 0xFF.

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
io: handle duplex corner cases.

Especially where we have just done a read and spin off a duplex to do a read
as well.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
io: add io_is_idle().

Turns out to be useful for complex cases.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Merge branch 'master' of ozlabs.org:ccan