This patch addresses some feedback sent by Laszlo[1] on the
non-contiguous APIC ID patches I have sent recently.
- (1 << 31) is undefined for 32-bit signed ints
- Use !! on the returned value, so the function return value
can be an int without a unsigned -> signed conversion
[] http://article.gmane.org/gmane.comp.emulators.qemu/162163
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
int apic_id_is_present(u8 apic_id)
{
- return FoundAPICIDs[apic_id/32] & (1 << (apic_id % 32));
+ return !!(FoundAPICIDs[apic_id/32] & (1ul << (apic_id % 32)));
}
// find and initialize the CPUs by launching a SIPI to them