Modular ata chipsets data

Oleksandr Tymoshenko gonzo at bluezbox.com
Sat Oct 4 02:41:23 UTC 2008


Hello -arch,

I was playing with p4 mips2 branch catching up with recent developments
and trying to reduce kernel size for MALTA configuration. At some point
I ran into ata-chipset.c. This file contains all ATA chipsets supported
by FreeBSD so it was a natural candidate for axing. I hacked small
proof-of-concept framework for pluggable ATA chipsets. The idea is to
move all vendor-related code to separated modules (.c, not .ko),
register each during compile/link-time using ATA_CHIPSET macros
(utilizes DATA_SET for this purpose) and provide each chipset with
kernel config option.  Something like this Warner did to miibus/*phy
about two years ago.

So far I got only Intel vendor working (tested with Gxemul) and would
like to know if it's worth to keep moving in this direction and what
possible pitfalls may appear.

90Kb is not that dramatical improvement :), but it's better then nothing
and code readability should be better after splitting 180K file into
several, IMHO.

Patch: http://people.freebsd.org/~gonzo/embedded/modular-ata.diff
don't mind copyrights, they're automatically inserted by vim.

-- 
gonzo


More information about the freebsd-arch mailing list