#include <linux/pm.h>
#include <linux/of.h>
#include <linux/of_platform.h>
++#ifdef CONFIG_X86
++#include <asm/i8259.h>
++#endif
/* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */
#include <linux/mc146818rtc.h>
}
spin_unlock_irqrestore(&rtc_lock, flags);
- - pm_wakeup_event(dev, 0);
+ + pm_wakeup_hard_event(dev);
acpi_clear_event(ACPI_EVENT_RTC);
acpi_disable_event(ACPI_EVENT_RTC, 0);
return ACPI_INTERRUPT_HANDLED;
{
cmos_wake_setup(&pnp->dev);
-- if (pnp_port_start(pnp, 0) == 0x70 && !pnp_irq_valid(pnp, 0))
++ if (pnp_port_start(pnp, 0) == 0x70 && !pnp_irq_valid(pnp, 0)) {
++ unsigned int irq = 0;
++#ifdef CONFIG_X86
/* Some machines contain a PNP entry for the RTC, but
* don't define the IRQ. It should always be safe to
-- * hardcode it in these cases
++ * hardcode it on systems with a legacy PIC.
*/
++ if (nr_legacy_irqs())
++ irq = 8;
++#endif
return cmos_do_probe(&pnp->dev,
-- pnp_get_resource(pnp, IORESOURCE_IO, 0), 8);
-- else
++ pnp_get_resource(pnp, IORESOURCE_IO, 0), irq);
++ } else {
return cmos_do_probe(&pnp->dev,
pnp_get_resource(pnp, IORESOURCE_IO, 0),
pnp_irq(pnp, 0));
++ }
}
static void cmos_pnp_remove(struct pnp_dev *pnp)
#include <asm/pgtable.h>
#include <asm/tlbflush.h>
#include <asm/io.h>
++#ifdef CONFIG_STRICT_KERNEL_RWX
++#include <asm/set_memory.h>
++#endif
#include "power.h"
* Numbers of normal and highmem page frames allocated for hibernation image
* before suspending devices.
*/
- -unsigned int alloc_normal, alloc_highmem;
+ +static unsigned int alloc_normal, alloc_highmem;
/*
* Memory bitmap used for marking saveable pages (during hibernation) or
* hibernation image pages (during restore)