[haiku-gsoc] Re: New timer patch (again) (Was: Re: First timer.diff (from private e-mails))

  • From: "Michael Lotz" <mmlr@xxxxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Fri, 11 Jul 2008 21:16:39 +0200

> I agree that it'd be a good idea to use APIC on uniprocessor systems;
> the ACPI table won't contain en entry for it if it's not present- 
> that
> seemingly automatically gets handled with apic_ptr being NULL, i
> believe.. but as far as I know, only the timer checks that (or needs
> to? What else besides interrupt routing do we use the APIC for?)

If ACPI is not there at all, then there simply won't be a pointer the 
the ACPI data structure, and if there are no (local)APIC infos in the 
ACPI tables, then there just isn't any info. Both should probably just 
return an error or NULL in an eventual acpi_find_table(uint32 tableID) 
function (I made that name up, but feel free to use it ;-). This 
condition would then just cause a fallback to the usual non-APIC based 
setup.
We use local APICs for timers and for inter processor interrupts. 
Therefore we need them in a multiprocessor environment, as they are 
used in the messaging between processors. On uniprocessor systems they 
aren't strictly required, as that communication is not necessary and 
timers can be done through more traditional means. But if they are 
there, there's certainly nothing speaking against using them.

> What devices are in question? :)

Anything that requires a "-no-lapic" swich in Linux, which I vaguely 
remember to have seen quite a few times. That's just a subjective thing 
though not based on any real facts. I guess it would be best to try it 
and see if there are more problems generated than solved, as otherwise 
we cannot really know.

Regards
Michael

Other related posts: