Re: WARNING: arch/x86/built-in.o: Section mismatch in reference fromthe variable test_nmi_ipi_callback_na to function .ini.text:test_nmi_ipi_callback

From: H. Peter Anvin
Date: Mon Jun 04 2012 - 11:00:01 EST


On 06/04/2012 07:36 AM, Don Zickus wrote:
>
> Basically the test registers two nmi_handlers, run some tests, and
> then unregisters them. Those handlers are what the compiler seems to be
> complaining about. I do not know what magic to pass the compiler to let
> it know that both of the handlers will be unregistered before the init
> section is destroyed.
>
> Perhaps I should tag those callbacks with __ref? I am not sure the right
> thing to do here.
>

Using __ref is the right thing, although __ref is hard to use right...

-hpa


--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

--
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/