It is currently Fri, 23 Oct 2020 18:34:22 GMT



 
Author Message
 Convert APIC to driver model
Hi!

...and do it in the way such that oprofile survives it. Please apply,

                                                        Pavel

%patch
Index: linux/arch/i386/kernel/apic.c
--- .pc/apic32/arch/i386/kernel/apic.c  2003-03-18 18:33:57.000000000 +0100
+++ linux/arch/i386/kernel/apic.c       2003-03-16 18:51:05.000000000 +0100
@@ -10,6 +10,8 @@
  *                                     for testing these extensively.
  *     Maciej W. Rozycki       :       Various updates and fixes.
  *     Mikael Pettersson       :       Power Management for UP-APIC.
+ *     Pavel Machek and
+ *     Mikael Pettersson       :       Converted to driver model.
  */

 #include <linux/config.h>
@@ -23,6 +25,10 @@
 #include <linux/interrupt.h>
 #include <linux/mc146818rtc.h>
 #include <linux/kernel_stat.h>
+#include <linux/delay.h>
+#include <linux/slab.h>
+#include <linux/device.h>
+#include <linux/pm.h>

 #include <asm/atomic.h>
 #include <asm/smp.h>
@@ -77,7 +83,7 @@
        return maxlvt;
 }

-void clear_local_APIC(void)
+void clear_lapic(void)
 {
        int maxlvt;
        unsigned long v;
@@ -143,7 +149,7 @@
                /*
                 * Do not trust the local APIC being empty at bootup.
                 */
-               clear_local_APIC();
+               clear_lapic();
                /*
                 * PIC mode, enable APIC mode in the IMCR, i.e.
                 * connect BSP's local APIC to INT and NMI lines.
@@ -169,11 +175,11 @@
        }
 }

-void disable_local_APIC(void)
+void disable_lapic(void)
 {
        unsigned long value;

-       clear_local_APIC();
+       clear_lapic();

        /*
         * Disable APIC (implies clearing of registers
@@ -189,7 +195,7 @@
  * Check these against your board if the CPUs aren't getting
  * started for no apparent reason.
  */
-int __init verify_local_APIC(void)
+int __init verify_lapic(void)
 {
        unsigned int reg0, reg1;

@@ -279,7 +285,7 @@
        /*
         * Do not trust the local APIC being empty at bootup.
         */
-       clear_local_APIC();
+       clear_lapic();

        /*
         * Enable APIC.
@@ -304,7 +310,28 @@
        apic_write_around(APIC_LVT1, value);
 }

-void __init setup_local_APIC (void)
+static struct {
+       /* 'active' is true if the local APIC was enabled by us and
+          not the BIOS; this signifies that we are also responsible
+          for disabling it before entering apm/acpi suspend */
+       int active;
+       /* r/w apic fields */
+       unsigned int apic_id;
+       unsigned int apic_taskpri;
+       unsigned int apic_ldr;
+       unsigned int apic_dfr;
+       unsigned int apic_spiv;
+       unsigned int apic_lvtt;
+       unsigned int apic_lvtpc;
+       unsigned int apic_lvt0;
+       unsigned int apic_lvt1;
+       unsigned int apic_lvterr;
+       unsigned int apic_tmict;
+       unsigned int apic_tdcr;
+       unsigned int apic_thmr;
+} apic_pm_state;
+
+void __init setup_lapic (void)
 {
        unsigned long value, ver, maxlvt;

@@ -445,46 +472,24 @@
                        printk("No ESR for 82489DX.\n");
        }

-       if (nmi_watchdog == NMI_LOCAL_APIC)
-               setup_apic_nmi_watchdog();
+       if (nmi_watchdog == NMI_LOCAL_APIC) {
+               enable_lapic_nmi_watchdog();
+       }
+
+       apic_pm_state.active = 1;
 }

 #ifdef CONFIG_PM
-
-#include <linux/slab.h>
-#include <linux/pm.h>
-
-static struct {
-       /* 'active' is true if the local APIC was enabled by us and
-          not the BIOS; this signifies that we are also responsible
-          for disabling it before entering apm/acpi suspend */
-       int active;
-       /* 'perfctr_pmdev' is here because the current (2.4.1) PM
-          callback system doesn't handle hierarchical dependencies */
-       struct pm_dev *perfctr_pmdev;
-       /* r/w apic fields */
-       unsigned int apic_id;
-       unsigned int apic_taskpri;
-       unsigned int apic_ldr;
-       unsigned int apic_dfr;
-       unsigned int apic_spiv;
-       unsigned int apic_lvtt;
-       unsigned int apic_lvtpc;
-       unsigned int apic_lvt0;
-       unsigned int apic_lvt1;
-       unsigned int apic_lvterr;
-       unsigned int apic_tmict;
-       unsigned int apic_tdcr;
-       unsigned int apic_thmr;
-} apic_pm_state;
-
-static void apic_pm_suspend(void *data)
+static int lapic_suspend(struct device *dev, u32 state, u32 level)
 {
        unsigned int l, h;
        unsigned long flags;

-       if (apic_pm_state.perfctr_pmdev)
-               pm_send(apic_pm_state.perfctr_pmdev, PM_SUSPEND, data);
+       if (level != SUSPEND_POWER_DOWN)
+               return 0;
+       if (!apic_pm_state.active)
+               return 0;
+
        apic_pm_state.apic_id = apic_read(APIC_ID);
        apic_pm_state.apic_taskpri = apic_read(APIC_TASKPRI);
        apic_pm_state.apic_ldr = apic_read(APIC_LDR);
@@ -500,18 +505,26 @@
        apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR);

        local_irq_save(flags);
-       disable_local_APIC();
+       disable_lapic();
        rdmsr(MSR_IA32_APICBASE, l, h);
        l &= ~MSR_IA32_APICBASE_ENABLE;
        wrmsr(MSR_IA32_APICBASE, l, h);
        local_irq_restore(flags);
+       return 0;
 }

-static void apic_pm_resume(void *data)
+static int lapic_resume(struct device *dev, u32 level)
 {
        unsigned int l, h;
        unsigned long flags;

+       if (level != RESUME_POWER_ON)
+               return 0;
+       if (!apic_pm_state.active)
+               return 0;
+
+       set_fixmap_nocache(FIX_APIC_BASE, APIC_DEFAULT_PHYS_BASE);      /* FIXME: this is needed for S3 resume, but why? */
+
        local_irq_save(flags);
        rdmsr(MSR_IA32_APICBASE, l, h);
        l &= ~MSR_IA32_APICBASE_BASE;
@@ -536,74 +549,35 @@
        apic_write(APIC_ESR, 0);
        apic_read(APIC_ESR);
        local_irq_restore(flags);
-       if (apic_pm_state.perfctr_pmdev)
-               pm_send(apic_pm_state.perfctr_pmdev, PM_RESUME, data);
-}
-
-static int apic_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
-{
-       switch (rqst) {
-       case PM_SUSPEND:
-               apic_pm_suspend(data);
-               break;
-       case PM_RESUME:
-               apic_pm_resume(data);
-               break;
-       }
        return 0;
 }

-/* perfctr driver should call this instead of pm_register() */
-struct pm_dev *apic_pm_register(pm_dev_t type,
-                               unsigned long id,
-                               pm_callback callback)
-{
-       struct pm_dev *dev;
-
-       if (!apic_pm_state.active)
-               return pm_register(type, id, callback);
-       if (apic_pm_state.perfctr_pmdev)
-               return NULL;    /* we're busy */
-       dev = kmalloc(sizeof(struct pm_dev), GFP_KERNEL);
-       if (dev) {
-               memset(dev, 0, sizeof(*dev));
-               dev->type = type;
-               dev->id = id;
-               dev->callback = callback;
-               apic_pm_state.perfctr_pmdev = dev;
-       }
-       return dev;
-}
-
-/* perfctr driver should call this instead of pm_unregister() */
-void apic_pm_unregister(struct pm_dev *dev)
-{
-       if (!apic_pm_state.active) {
-               pm_unregister(dev);
-       } else if (dev == apic_pm_state.perfctr_pmdev) {
-               apic_pm_state.perfctr_pmdev = NULL;
-               kfree(dev);
-       }
-}
-
-static void __init apic_pm_init1(void)
-{
-       /* can't pm_register() at this early stage in the boot process
-          (causes an immediate reboot), so just set the flag */
-       apic_pm_state.active = 1;
-}
+static struct device_driver lapic_driver = {
+       .name           = "apic",
+       .bus            = &system_bus_type,
+       .resume         = lapic_resume,
+       .suspend        = lapic_suspend,
+};
+
+/* not static, needed by child devices */
+struct sys_device device_lapic = {
+       .name           = "apic",
+       .id             = 0,
+       .dev            = {
+               .name   = "lapic",
+               .driver = &lapic_driver,
+       },
+};

-static void __init apic_pm_init2(void)
+static int __init init_apic_devicefs(void)
 {
+       driver_register(&lapic_driver);
        if (apic_pm_state.active)
-               pm_register(PM_SYS_DEV, 0, apic_pm_callback);
+               return sys_device_register(&device_lapic);
+       return 0;
 }

-#else  /* CONFIG_PM */
-
-static inline void apic_pm_init1(void) { }
-static inline void apic_pm_init2(void) { }
-
+device_initcall(init_apic_devicefs);
 #endif /* CONFIG_PM */

 /*
@@ -669,9 +643,6 @@
                nmi_watchdog = NMI_LOCAL_APIC;

        printk("Found and enabled local APIC!\n");
-
-       apic_pm_init1();
-
        return 0;

 no_apic:
@@ -682,7 +653,6 @@
 void __init init_apic_mappings(void)
 {
        unsigned long apic_phys;
-
        /*
         * If no local APIC can be found then set up a fake all
         * zeroes page to simulate the local APIC and another
@@ -1149,15 +1119,12 @@
                return -1;
        }

-       verify_local_APIC();
-
+       verify_lapic();
        connect_bsp_APIC();

        phys_cpu_present_map = 1 << boot_cpu_physical_apicid;

-       apic_pm_init2();
-
-       setup_local_APIC();
+       setup_lapic();

        if (nmi_watchdog == NMI_LOCAL_APIC)
                check_nmi_watchdog();
Index: linux/arch/i386/kernel/apm.c
--- .pc/apic32/arch/i386/kernel/apm.c   2003-03-18 18:33:58.000000000 +0100
+++ linux/arch/i386/kernel/apm.c        2003-03-19 13:36:43.000000000 +0100
@@ -221,6 +221,7 @@
 #include <linux/kernel.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
+#include <linux/device.h>

 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -1237,6 +1238,10 @@
                }
                printk(KERN_CRIT "apm: suspend was vetoed, but suspending anyway.\n");
        }
+
+      
+       device_suspend(3, SUSPEND_POWER_DOWN);
+
        /* serialize with the timer interrupt */
        write_seqlock_irq(&xtime_lock);

@@ -1257,6 +1262,7 @@
        if (err != APM_SUCCESS)
                apm_error("suspend", err);
        err = (err == APM_SUCCESS) ? 0 : -EIO;
+       device_resume(RESUME_POWER_ON);
        pm_send_all(PM_RESUME, (void *)0);
        queue_event(APM_NORMAL_RESUME, NULL);
  out:
@@ -1370,6 +1376,7 @@
                                write_seqlock_irq(&xtime_lock);
                                set_time();
                                write_sequnlock_irq(&xtime_lock);
+                               device_resume(RESUME_POWER_ON);
                                pm_send_all(PM_RESUME, (void *)0);
                                queue_event(event, NULL);
                        }
Index: linux/arch/i386/kernel/i386_ksyms.c
--- .pc/apic32/arch/i386/kernel/i386_ksyms.c    2003-03-18 18:33:58.000000000 +0100
+++ linux/arch/i386/kernel/i386_ksyms.c 2003-03-18 17:22:21.000000000 +0100
@@ -163,10 +163,6 @@
 EXPORT_SYMBOL(flush_tlb_page);
 #endif

-#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PM)
-EXPORT_SYMBOL_GPL(set_nmi_pm_callback);
-EXPORT_SYMBOL_GPL(unset_nmi_pm_callback);
-#endif
 #ifdef CONFIG_X86_IO_APIC
 EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
 #endif
Index: linux/arch/i386/kernel/io_apic.c
--- .pc/apic32/arch/i386/kernel/io_apic.c       2003-03-18 18:33:58.000000000 +0100
+++ linux/arch/i386/kernel/io_apic.c    2003-03-18 17:25:19.000000000 +0100
@@ -1167,8 +1167,11 @@
        enable_8259A_irq(0);
 }

-static inline void UNEXPECTED_IO_APIC(void)
+static void __init unexpected_IO_APIC(void)
 {
+       printk(KERN_WARNING "INFO: unexpected IO-APIC, please file a report at\n");
+       printk(KERN_WARNING "       http://www.**-**.com/ \n");
+       printk(KERN_WARNING "      if your kernel is less than 3 months old.\n");
 }

 void __init print_IO_APIC(void)
@@ -1206,7 +1209,7 @@
        printk(KERN_DEBUG ".......    : Delivery Type: %X\n", reg_00.delivery_type);
        printk(KERN_DEBUG ".......    :
...

read more »



 Tue, 06 Sep 2005 23:30:14 GMT   
 Convert APIC to driver model
Hi!

This cleans mess in APICs (creative use of pm_send), and converts it
to driver model. Please apply,

                                                        Pavel
%patch
Index: linux/arch/i386/kernel/apic.c
===================================================================
--- linux.orig/arch/i386/kernel/apic.c  2003-03-27 11:09:18.000000000 +0100
+++ linux/arch/i386/kernel/apic.c       2003-03-16 18:51:05.000000000 +0100
@@ -10,6 +10,8 @@
  *                                     for testing these extensively.
  *     Maciej W. Rozycki       :       Various updates and fixes.
  *     Mikael Pettersson       :       Power Management for UP-APIC.
+ *     Pavel Machek and
+ *     Mikael Pettersson       :       Converted to driver model.
  */

 #include <linux/config.h>
@@ -23,6 +25,10 @@
 #include <linux/interrupt.h>
 #include <linux/mc146818rtc.h>
 #include <linux/kernel_stat.h>
+#include <linux/delay.h>
+#include <linux/slab.h>
+#include <linux/device.h>
+#include <linux/pm.h>

 #include <asm/atomic.h>
 #include <asm/smp.h>
@@ -77,7 +83,7 @@
        return maxlvt;
 }

-void clear_local_APIC(void)
+void clear_lapic(void)
 {
        int maxlvt;
        unsigned long v;
@@ -143,7 +149,7 @@
                /*
                 * Do not trust the local APIC being empty at bootup.
                 */
-               clear_local_APIC();
+               clear_lapic();
                /*
                 * PIC mode, enable APIC mode in the IMCR, i.e.
                 * connect BSP's local APIC to INT and NMI lines.
@@ -169,11 +175,11 @@
        }
 }

-void disable_local_APIC(void)
+void disable_lapic(void)
 {
        unsigned long value;

-       clear_local_APIC();
+       clear_lapic();

        /*
         * Disable APIC (implies clearing of registers
@@ -189,7 +195,7 @@
  * Check these against your board if the CPUs aren't getting
  * started for no apparent reason.
  */
-int __init verify_local_APIC(void)
+int __init verify_lapic(void)
 {
        unsigned int reg0, reg1;

@@ -279,7 +285,7 @@
        /*
         * Do not trust the local APIC being empty at bootup.
         */
-       clear_local_APIC();
+       clear_lapic();

        /*
         * Enable APIC.
@@ -304,7 +310,28 @@
        apic_write_around(APIC_LVT1, value);
 }

-void __init setup_local_APIC (void)
+static struct {
+       /* 'active' is true if the local APIC was enabled by us and
+          not the BIOS; this signifies that we are also responsible
+          for disabling it before entering apm/acpi suspend */
+       int active;
+       /* r/w apic fields */
+       unsigned int apic_id;
+       unsigned int apic_taskpri;
+       unsigned int apic_ldr;
+       unsigned int apic_dfr;
+       unsigned int apic_spiv;
+       unsigned int apic_lvtt;
+       unsigned int apic_lvtpc;
+       unsigned int apic_lvt0;
+       unsigned int apic_lvt1;
+       unsigned int apic_lvterr;
+       unsigned int apic_tmict;
+       unsigned int apic_tdcr;
+       unsigned int apic_thmr;
+} apic_pm_state;
+
+void __init setup_lapic (void)
 {
        unsigned long value, ver, maxlvt;

@@ -445,46 +472,24 @@
                        printk("No ESR for 82489DX.\n");
        }

-       if (nmi_watchdog == NMI_LOCAL_APIC)
-               setup_apic_nmi_watchdog();
+       if (nmi_watchdog == NMI_LOCAL_APIC) {
+               enable_lapic_nmi_watchdog();
+       }
+
+       apic_pm_state.active = 1;
 }

 #ifdef CONFIG_PM
-
-#include <linux/slab.h>
-#include <linux/pm.h>
-
-static struct {
-       /* 'active' is true if the local APIC was enabled by us and
-          not the BIOS; this signifies that we are also responsible
-          for disabling it before entering apm/acpi suspend */
-       int active;
-       /* 'perfctr_pmdev' is here because the current (2.4.1) PM
-          callback system doesn't handle hierarchical dependencies */
-       struct pm_dev *perfctr_pmdev;
-       /* r/w apic fields */
-       unsigned int apic_id;
-       unsigned int apic_taskpri;
-       unsigned int apic_ldr;
-       unsigned int apic_dfr;
-       unsigned int apic_spiv;
-       unsigned int apic_lvtt;
-       unsigned int apic_lvtpc;
-       unsigned int apic_lvt0;
-       unsigned int apic_lvt1;
-       unsigned int apic_lvterr;
-       unsigned int apic_tmict;
-       unsigned int apic_tdcr;
-       unsigned int apic_thmr;
-} apic_pm_state;
-
-static void apic_pm_suspend(void *data)
+static int lapic_suspend(struct device *dev, u32 state, u32 level)
 {
        unsigned int l, h;
        unsigned long flags;

-       if (apic_pm_state.perfctr_pmdev)
-               pm_send(apic_pm_state.perfctr_pmdev, PM_SUSPEND, data);
+       if (level != SUSPEND_POWER_DOWN)
+               return 0;
+       if (!apic_pm_state.active)
+               return 0;
+
        apic_pm_state.apic_id = apic_read(APIC_ID);
        apic_pm_state.apic_taskpri = apic_read(APIC_TASKPRI);
        apic_pm_state.apic_ldr = apic_read(APIC_LDR);
@@ -500,18 +505,26 @@
        apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR);

        local_irq_save(flags);
-       disable_local_APIC();
+       disable_lapic();
        rdmsr(MSR_IA32_APICBASE, l, h);
        l &= ~MSR_IA32_APICBASE_ENABLE;
        wrmsr(MSR_IA32_APICBASE, l, h);
        local_irq_restore(flags);
+       return 0;
 }

-static void apic_pm_resume(void *data)
+static int lapic_resume(struct device *dev, u32 level)
 {
        unsigned int l, h;
        unsigned long flags;

+       if (level != RESUME_POWER_ON)
+               return 0;
+       if (!apic_pm_state.active)
+               return 0;
+
+       set_fixmap_nocache(FIX_APIC_BASE, APIC_DEFAULT_PHYS_BASE);      /* FIXME: this is needed for S3 resume, but why? */
+
        local_irq_save(flags);
        rdmsr(MSR_IA32_APICBASE, l, h);
        l &= ~MSR_IA32_APICBASE_BASE;
@@ -536,74 +549,35 @@
        apic_write(APIC_ESR, 0);
        apic_read(APIC_ESR);
        local_irq_restore(flags);
-       if (apic_pm_state.perfctr_pmdev)
-               pm_send(apic_pm_state.perfctr_pmdev, PM_RESUME, data);
-}
-
-static int apic_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
-{
-       switch (rqst) {
-       case PM_SUSPEND:
-               apic_pm_suspend(data);
-               break;
-       case PM_RESUME:
-               apic_pm_resume(data);
-               break;
-       }
        return 0;
 }

-/* perfctr driver should call this instead of pm_register() */
-struct pm_dev *apic_pm_register(pm_dev_t type,
-                               unsigned long id,
-                               pm_callback callback)
-{
-       struct pm_dev *dev;
-
-       if (!apic_pm_state.active)
-               return pm_register(type, id, callback);
-       if (apic_pm_state.perfctr_pmdev)
-               return NULL;    /* we're busy */
-       dev = kmalloc(sizeof(struct pm_dev), GFP_KERNEL);
-       if (dev) {
-               memset(dev, 0, sizeof(*dev));
-               dev->type = type;
-               dev->id = id;
-               dev->callback = callback;
-               apic_pm_state.perfctr_pmdev = dev;
-       }
-       return dev;
-}
-
-/* perfctr driver should call this instead of pm_unregister() */
-void apic_pm_unregister(struct pm_dev *dev)
-{
-       if (!apic_pm_state.active) {
-               pm_unregister(dev);
-       } else if (dev == apic_pm_state.perfctr_pmdev) {
-               apic_pm_state.perfctr_pmdev = NULL;
-               kfree(dev);
-       }
-}
-
-static void __init apic_pm_init1(void)
-{
-       /* can't pm_register() at this early stage in the boot process
-          (causes an immediate reboot), so just set the flag */
-       apic_pm_state.active = 1;
-}
+static struct device_driver lapic_driver = {
+       .name           = "apic",
+       .bus            = &system_bus_type,
+       .resume         = lapic_resume,
+       .suspend        = lapic_suspend,
+};
+
+/* not static, needed by child devices */
+struct sys_device device_lapic = {
+       .name           = "apic",
+       .id             = 0,
+       .dev            = {
+               .name   = "lapic",
+               .driver = &lapic_driver,
+       },
+};

-static void __init apic_pm_init2(void)
+static int __init init_apic_devicefs(void)
 {
+       driver_register(&lapic_driver);
        if (apic_pm_state.active)
-               pm_register(PM_SYS_DEV, 0, apic_pm_callback);
+               return sys_device_register(&device_lapic);
+       return 0;
 }

-#else  /* CONFIG_PM */
-
-static inline void apic_pm_init1(void) { }
-static inline void apic_pm_init2(void) { }
-
+device_initcall(init_apic_devicefs);
 #endif /* CONFIG_PM */

 /*
@@ -669,9 +643,6 @@
                nmi_watchdog = NMI_LOCAL_APIC;

        printk("Found and enabled local APIC!\n");
-
-       apic_pm_init1();
-
        return 0;

 no_apic:
@@ -682,7 +653,6 @@
 void __init init_apic_mappings(void)
 {
        unsigned long apic_phys;
-
        /*
         * If no local APIC can be found then set up a fake all
         * zeroes page to simulate the local APIC and another
@@ -1149,15 +1119,12 @@
                return -1;
        }

-       verify_local_APIC();
-
+       verify_lapic();
        connect_bsp_APIC();

        phys_cpu_present_map = 1 << boot_cpu_physical_apicid;

-       apic_pm_init2();
-
-       setup_local_APIC();
+       setup_lapic();

        if (nmi_watchdog == NMI_LOCAL_APIC)
                check_nmi_watchdog();
Index: linux/arch/i386/kernel/apm.c
===================================================================
--- linux.orig/arch/i386/kernel/apm.c   2003-03-27 11:09:19.000000000 +0100
+++ linux/arch/i386/kernel/apm.c        2003-03-19 13:36:43.000000000 +0100
@@ -221,6 +221,7 @@
 #include <linux/kernel.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
+#include <linux/device.h>

 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -1237,6 +1238,10 @@
                }
                printk(KERN_CRIT "apm: suspend was vetoed, but suspending anyway.\n");
        }
+
+      
+       device_suspend(3, SUSPEND_POWER_DOWN);
+
        /* serialize with the timer interrupt */
        write_seqlock_irq(&xtime_lock);

@@ -1257,6 +1262,7 @@
        if (err != APM_SUCCESS)
                apm_error("suspend", err);
        err = (err == APM_SUCCESS) ? 0 : -EIO;
+       device_resume(RESUME_POWER_ON);
        pm_send_all(PM_RESUME, (void *)0);
        queue_event(APM_NORMAL_RESUME, NULL);
  out:
@@ -1370,6 +1376,7 @@
                                write_seqlock_irq(&xtime_lock);
                                set_time();
                                write_sequnlock_irq(&xtime_lock);
+                               device_resume(RESUME_POWER_ON);
                                pm_send_all(PM_RESUME, (void *)0);
                                queue_event(event, NULL);
                        }
Index: linux/arch/i386/kernel/i386_ksyms.c
===================================================================
--- linux.orig/arch/i386/kernel/i386_ksyms.c    2003-03-27 11:09:19.000000000 +0100
+++ linux/arch/i386/kernel/i386_ksyms.c 2003-03-18 17:22:21.000000000 +0100
@@ -163,10 +163,6 @@
 EXPORT_SYMBOL(flush_tlb_page);
 #endif

-#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PM)
-EXPORT_SYMBOL_GPL(set_nmi_pm_callback);
-EXPORT_SYMBOL_GPL(unset_nmi_pm_callback);
-#endif
 #ifdef CONFIG_X86_IO_APIC
 EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
 #endif
Index: linux/arch/i386/kernel/io_apic.c
===================================================================
--- linux.orig/arch/i386/kernel/io_apic.c       2003-03-27 11:09:19.000000000 +0100
+++ linux/arch/i386/kernel/io_apic.c    2003-03-27 10:41:20.000000000 +0100
@@ -1245,8 +1245,11 @@
        enable_8259A_irq(0);
 }

-static inline void UNEXPECTED_IO_APIC(void)
+static void __init unexpected_IO_APIC(void)
 {
+       printk(KERN_WARNING "INFO: unexpected IO-APIC, please file a report at\n");
+ ...

read more »



 Tue, 13 Sep 2005 09:50:25 GMT   
 
   [ 2 post ] 

Similar Threads

1. Convert APIC to driver model: now it works with SMP

2. Switch APIC to driver model (and make S3 sleep with APIC on)

3. [2.5.74] x86_64 apic/nmi driver model conversion cleanups

4. Switch APIC to driver model

5. Driver model for APIC

6. Switch APIC (+nmi, +oprofile) to driver model

7. Switch APIC (+nmi, +oprofile) to driver model

8. APIC Model in Linux

9. APIC Cluster Model


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software