]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86_64/kernel/setup.c
[PATCH] x86_64: make PC Speaker driver work
[linux-2.6-omap-h63xx.git] / arch / x86_64 / kernel / setup.c
index 0856ad444f90d8baf232af5903b3f7fb46143474..ebc3c33b1c6c9a940fe47feb78f7b425255393ec 100644 (file)
@@ -353,8 +353,10 @@ static __init void parse_cmdline_early (char ** cmdline_p)
                if (fullarg(from, "enable_timer_pin_1"))
                        disable_timer_pin_1 = -1;
 
-               if (fullarg(from, "nolapic") || fullarg(from, "disableapic"))
+               if (fullarg(from, "nolapic") || fullarg(from, "disableapic")) {
+                       clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability);
                        disable_apic = 1;
+               }
 
                if (fullarg(from, "noapic"))
                        skip_ioapic_setup = 1;
@@ -928,6 +930,10 @@ static int __init init_amd(struct cpuinfo_x86 *c)
        if (c->x86 == 15 && ((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58))
                set_bit(X86_FEATURE_REP_GOOD, &c->x86_capability);
 
+       /* Enable workaround for FXSAVE leak */
+       if (c->x86 >= 6)
+               set_bit(X86_FEATURE_FXSAVE_LEAK, &c->x86_capability);
+
        r = get_model_name(c);
        if (!r) { 
                switch (c->x86) { 
@@ -1420,3 +1426,22 @@ struct seq_operations cpuinfo_op = {
        .show = show_cpuinfo,
 };
 
+#ifdef CONFIG_INPUT_PCSPKR
+#include <linux/platform_device.h>
+static __init int add_pcspkr(void)
+{
+       struct platform_device *pd;
+       int ret;
+
+       pd = platform_device_alloc("pcspkr", -1);
+       if (!pd)
+               return -ENOMEM;
+
+       ret = platform_device_add(pd);
+       if (ret)
+               platform_device_put(pd);
+
+       return ret;
+}
+device_initcall(add_pcspkr);
+#endif