Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Oct 2008 19:17:02 -0700
From:      Oleksandr Tymoshenko <gonzo@bluezbox.com>
To:        freebsd-arch@freebsd.org
Cc:        sos@freebsd.org
Subject:   Modular ata chipsets data
Message-ID:  <48E6D21E.8040808@bluezbox.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48E6D21E.8040808>