[parisc-linux] iotree thoughts

Matthew Wilcox willy@debian.org
Tue, 21 Aug 2001 08:09:53 +0100


On Mon, Aug 20, 2001 at 11:44:20PM -0600, Grant Grundler wrote:
> That sounds too much like work. ;^)
> Raven PDC ERS is available from HP's firmware team website. (internal only).

Thanks, I'll look at that.

> I disagree. I want the kernel to NOT link if CONFIG_PCI and
> CONFIG_ISA are not enabled when inx/outx functions are used.

I discussed this with Ted Ts'o at OLS.  The difficulty is that there's
a fair bit of arch-independent code which does (example taken from serial.c):

static _INLINE_ unsigned int serial_in(struct async_struct *info, int offset)
{
        switch (info->io_type) {
        case SERIAL_IO_MEM:
                return readb((unsigned long) info->iomem_base +
                             (offset<<info->iomem_reg_shift));
        default:
                return inb(info->port + offset);
        }
}

so either we add the nasty:

        default:
#if defined(CONFIG_PCI) || defined(CONFIG_ISA)
                return inb(info->port + offset);
#else
                BUG();
#endif

or we just make inb() BUG().

> This will allow the kernel to link and then fail after rebooting.
> That seems like a step backwards to me.

Only if they're called.  The majority of places where these functions
exist can provably never be called.  The others probably won't be :-)

-- 
Revolutions do not require corporate support.