~ubuntu-branches/ubuntu/raring/fglrx-installer/raring-proposed

« back to all changes in this revision

Viewing changes to debian/dkms/patches/replace-for_each_cpu_mask-with-for_each_possible_cpu.patch

  • Committer: Package Import Robot
  • Author(s): Alberto Milone
  • Date: 2012-06-17 17:20:49 UTC
  • Revision ID: package-import@ubuntu.com-20120617172049-3pma09tyvodacnc6
Tags: 2:8.960-0ubuntu2
* replace-do_mmap-and-do_munmap-with-vm_mmap-and-vm_mu.patch,
  replace-for_each_cpu_mask-with-for_each_possible_cpu.patch:
  - Add support for Linux 3.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From a0548e00677143d06b009027c4f1af41a91be684 Mon Sep 17 00:00:00 2001
 
2
From: Alberto Milone <alberto.milone@canonical.com>
 
3
Date: Fri, 15 Jun 2012 19:07:29 +0200
 
4
Subject: [PATCH 2/2] Replace for_each_cpu_mask() with
 
5
 for_each_possible_cpu(p)
 
6
 
 
7
---
 
8
 firegl_public.c |    4 ++++
 
9
 kcl_ioctl.c     |    4 ++++
 
10
 2 files changed, 8 insertions(+)
 
11
 
 
12
diff --git a/firegl_public.c b/firegl_public.c
 
13
index eb32037..5c61a09 100755
 
14
--- a/firegl_public.c
 
15
+++ b/firegl_public.c
 
16
@@ -4199,7 +4199,11 @@ static int kasInitExecutionLevels(unsigned long level_init)
 
17
 {
 
18
     unsigned int p;
 
19
     KCL_DEBUG5(FN_FIREGL_KAS, "%d\n", level_init);
 
20
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
 
21
+    for_each_possible_cpu(p)
 
22
+#else
 
23
     for_each_cpu_mask(p, cpu_possible_map)
 
24
+#endif
 
25
     {
 
26
         KCL_DEBUG1(FN_FIREGL_KAS,"Setting initial execution level for CPU # %d\n", p);
 
27
         preempt_disable();
 
28
diff --git a/kcl_ioctl.c b/kcl_ioctl.c
 
29
index 4bf409f..f5b190a 100755
 
30
--- a/kcl_ioctl.c
 
31
+++ b/kcl_ioctl.c
 
32
@@ -213,6 +213,10 @@ void ATI_API_CALL KCL_IOCTL_UnregisterConversion32(unsigned int cmd)
 
33
 #endif
 
34
 }
 
35
 
 
36
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
 
37
+DEFINE_PER_CPU(unsigned long, old_rsp);
 
38
+#endif
 
39
+
 
40
 /** \brief Allocate user space for 32-bit app making 64-bit IOCTL
 
41
  *  \param size [in] Number of bytes to allocate
 
42
  *  \return Pointer to allocated memory
 
43
-- 
 
44
1.7.9.5
 
45