Details
- Reviewers
jhb royger - Commits
- rS313898: Merge i386 and amd64 mtrr drivers.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/x86/x86/x86_mem.c | ||
---|---|---|
733 ↗ | (On Diff #25307) | I think that this comment could be safely removed. I am not sure what is meant by 'locking gate', but it seems that it describes an algorithm implemented by smp_rendezvous(). |
Thanks for doing this (I was planning to do it this weekend), LGTM. Just a minor comment regarding a repeated code chunk. In any case feel free to commit with or without that fixed, it's a general improvement after all.
sys/x86/x86/x86_mem.c | ||
---|---|---|
705 ↗ | (On Diff #25307) | This seems to be duplicated above, maybe place it in a function? |
733 ↗ | (On Diff #25307) | That's basically what _rendezvous does AFAIK, so I agree that the comment can be removed. |
751 ↗ | (On Diff #25307) | Do you know why this check is needed? AFAIK the MTRR cpuid flag should be enough. |
sys/x86/x86/x86_mem.c | ||
---|---|---|
751 ↗ | (On Diff #25307) | I can only guess. It seems that code precautiosly checks that it only handles known hardware. Also see the cpu_vendor_id check below. Since mtrrs are architectural, I agree that the check looks excessive. |
Move dmap split code into function and call it instead of duplicating. Remove stale comment.
sys/modules/mem/Makefile | ||
---|---|---|
6 ↗ | (On Diff #25311) | Yet another place that will be simplified if we change MACHINE_CPUARCH on i386 and amd64 to x86. |
sys/x86/x86/x86_mem.c | ||
312 ↗ | (On Diff #25311) | Do we even need this #ifdef now? smp_rendezvous() works in !SMP kernels. |
719 ↗ | (On Diff #25311) | This #ifdef can go away as well. |