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

Re: SMP support



Hello,

Brent W. Baccala, le ven. 16 janv. 2026 00:04:53 -0500, a ecrit:
> I'll let Claude report on the progress.  Remember, my idea is to get Claude to
> be able to describe how to get x64 smp support running so that somebody can
> easily do it, but without using any code authored by Claude.

I doubt Claude will manage to get SMP working completely. There is not
much source code on the internet that supports SMP in similar ways, so
it will most probably be quite erratic.

> ## Key Bugs Fixed
> 
> **Array indexing scale factor mismatch**: The CX() macro used scale factor 8
> for all per-CPU arrays, but some arrays (curr_ipl, need_ast) contain 4-byte
> integers, not 8-byte pointers. Split into CX() for 4-byte arrays and CX8() for
> 8-byte pointer arrays.

need_ast is 8-byte... curr_ipl is indeed 4-byte.

> **Segment register inconsistency**: Assembly code was using %gs: addressing
> while C code used direct array access, causing segment faults. Made both use
> the same mechanism.

That's just temporary. We have to fix %gs anyway.

> **Type mismatches**: Fixed several int/long type mismatches (cpu_set,
> in_interrupt) and corrected stack alignment from -4 to -16 bytes.

I'd have to see the result to be able to say if these are actually correct.
in_interrupt should indeed be int, not long, as we access 4 bytes.
Actually it should be a per_cpu data but that can be for later.

Samuel


Reply to: