Re: [PATCH 1/4] pci: Update pci_set_vga_state to call archfunctions

From: Andrew Morton
Date: Mon Jan 25 2010 - 19:18:49 EST


On Mon, 25 Jan 2010 16:09:52 -0800
Mike Travis <travis@xxxxxxx> wrote:

> >
> > Still, a neater solution might be
> >
> > int arch_pci_set_vga_state(...) __weak
> > {
> > return 0;
> > }
> >
> > and then resolve it at linkage time?
> >
> >
>
> Wouldn't the linked in stronger function then need to surround
> the UV register updating with "if (uv_system)"?

If the file which implements arch_pci_set_vga_state() is present in
vmlinux on non-uv systems then yes.

Presumably that file is arch/x86/kernel/apic/x2apic_uv_x.c, although
that might later become a problem if other sub-architectures a) want to
get at this hook and b) can be linked into vmlinux along with
arch/x86/kernel/apic/x2apic_uv_x.o. But such a kernel wouldn't
actually link, so we'll need to address it at that stage.


If this is a UV-specific hack which other architectures and
sub-architectures are unlikely to need (seems that way?) then I'd be
going for something whcih is simple and minimal.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/