[PATCH] Use EXPORT_SYMBOL for pv_lock_ops

From: drago01
Date: Wed Aug 20 2008 - 15:25:28 EST


On Wed, Aug 20, 2008 at 7:06 AM, Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
> drago01 wrote:
>> Hi,
>>
>> It seems that in 2.6.27 pv_lock_ops is now GPL only which breaks
>> binary drivers because they pick it up implicitly when CONFIG_PARAVIRT
>> is enabled.
>> (see http://www.nvnews.net/vbulletin/showpost.php?p=1750090&postcount=2)
>> Is there a reason for doing this?
>> As some other pv_* are exported to all modules can this be done for
>> this too? (there should be no difference between CONFIG_PARAVIRT on or
>> of for GPL'd symbols).
>
> Yeah, they're just GPL by default, but the lock code is not exported GPL
> so there's no reason why lock_ops should be.
>
> J
>
>

Use EXPORT_SYMBOL for pv_lock_ops to preserve the behavior between
CONFIG_PARAVIRT set and unset.
Currently we only used _GPL when the non paravirt symbols are GPL only too.

Signed-off-by: Adel Gadllah <adel.gadllah@xxxxxxxxx>

diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
index 94da4d5..300da17 100644
--- a/arch/x86/kernel/paravirt.c
+++ b/arch/x86/kernel/paravirt.c
@@ -471,7 +471,7 @@ struct pv_lock_ops pv_lock_ops = {
.spin_unlock = __ticket_spin_unlock,
#endif
};
-EXPORT_SYMBOL_GPL(pv_lock_ops);
+EXPORT_SYMBOL(pv_lock_ops);

EXPORT_SYMBOL_GPL(pv_time_ops);
EXPORT_SYMBOL (pv_cpu_ops);
--
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/