From 7e9f599994b1cc7a83709653468843d8a4a1ca81 Mon Sep 17 00:00:00 2001 From: malc Date: Sat, 1 Aug 2009 00:13:30 +0400 Subject: [PATCH] Support PPC64 and kernel 2.6.26 on_each_cpu was changed by 15c8b6c1aaaf1c4edd67e2f02e4d8e1bd1a51c0d --- mod/itc-mod.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/mod/itc-mod.c b/mod/itc-mod.c index 87319a4..4803613 100644 --- a/mod/itc-mod.c +++ b/mod/itc-mod.c @@ -26,14 +26,14 @@ #include #include -#ifdef CONFIG_6xx +#if defined CONFIG_6xx || defined CONFIG_PPC64 #include #define pm_idle ppc_md.power_save #define ACCOUNT_IRQ #endif -#if !(defined CONFIG_X86 || defined CONFIG_6xx) -#error Support for this architecture is not written yet +#if !(defined CONFIG_X86 || defined CONFIG_6xx || defined CONFIG_PPC64) +#error Support for this architecture is nto written yet #endif #if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 0) @@ -295,8 +295,13 @@ itc_release (struct inode * inode, struct file * filp) itc_leave_bkl (); #if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 0) /* XXX: 2.4 */ +#if LINUX_VERSION_CODE > KERNEL_VERSION (2, 6, 26) + /* 15c8b6c1aaaf1c4edd67e2f02e4d8e1bd1a51c0d */ + on_each_cpu (dummy_wakeup, NULL, 1); +#else on_each_cpu (dummy_wakeup, NULL, 0, 1); #endif +#endif return 0; } @@ -350,7 +355,7 @@ itc_read (struct file *file, char * buf, size_t count, loff_t * ppos) if (count < itemsize * num_present_cpus ()) { printk (KERN_ERR - "attempt to read something funny %d expected %d(%d,%d)\n", + "attempt to read something funny %zu expected %zu(%zu,%u)\n", count, itemsize * num_present_cpus (), itemsize, num_present_cpus ()); return -EINVAL; -- 2.11.4.GIT