cpuid: new module

This module parses data provided by the cpuid instruction.
It still needs more work, however, it works for most important
stuff.

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
cpuid: add proper documentation

Forgot to add this to the main commit, sorry.

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
cpuid: add 2 new functions + some more tests

The new functions are:
- get_cpu_type
- get_cpu_type_string

Also add more tests on how one would parse the low-level stuff.

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
cpuid: prefix every function with cpuid_

Also merge extended features and non-extended in 1 function.

Suggested-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
cpuid: only compile source file if x86 cpu

Suggested-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
net: Fix potential uninitialized use of variables in net_bind()

If the list of addrinfos give to net_bind() contains only IPv4 or only
IPv6 addresses, then the ipv4 and ipv6 variables may be used uninitialized.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
cpuid: Minor improvements

Remove the assembly file that checks if the CPUID instruction is
supported and have it in inline assembly as suggested by Rusty.

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
cpuid: small fix

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
cpuid: use uint32_t instead of int/unsigned

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
cpuid: parse CPU L1 cache and TLB identifications

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
Merge branch 'cpuid' of https://github.com/decltype/ccan
cpuid: ccanlint fixes.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
opt: add allocator setting.

Good for tal usage.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
net: fix leak in test.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
net: add async operation helpers.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/io: new module.

Designed for async I/O.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/io: benchmarks.

More stress test than benchmarks, but provides a beginning.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/io: io_duplex.

Cleaner model for I/O, with cost of complexity if you really want bidir.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/io: check for all idle.

It's probably a bug if we're waiting for nothing.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/io: timer support.

Upgrade license, since timer is LGPL.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>