~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to debian/patches/bugfix/all/revert-percpu-stable-changes.patch

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From: Jiri Kosina <jkosina@suse.cz>
2
 
Subject: Revert module.c and module.h changes from -stable update
3
 
References: bnc#600364
4
 
 
5
 
This reverts two patches from 2.6.32.12 -stable update, as it causes
6
 
kernel crash on ia64.
7
 
 
8
 
The following two 2.6.32.12 -stable patches are reverted:
9
 
 
10
 
        [169/197] modules: fix incorrect percpu usage
11
 
        [171/197] module: fix __module_ref_addr()
12
 
 
13
 
They were incorrectly applied to 2.6.32-stable, though they should be applied
14
 
only to 2.6.33+ stable (on 2.6.32 ia64, static and dynamic percpu areas are
15
 
separate).
16
 
 
17
 
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
18
 
 
19
 
Index: linux-2.6.32-SLE11-SP1/include/linux/module.h
20
 
===================================================================
21
 
--- linux-2.6.32-SLE11-SP1.orig/include/linux/module.h
22
 
+++ linux-2.6.32-SLE11-SP1/include/linux/module.h
23
 
@@ -459,7 +459,7 @@ void symbol_put_addr(void *addr);
24
 
 static inline local_t *__module_ref_addr(struct module *mod, int cpu)
25
 
 {
26
 
 #ifdef CONFIG_SMP
27
 
-       return (local_t *) per_cpu_ptr(mod->refptr, cpu);
28
 
+       return (local_t *) (mod->refptr + per_cpu_offset(cpu));
29
 
 #else
30
 
        return &mod->ref;
31
 
 #endif
32
 
Index: linux-2.6.32-SLE11-SP1/kernel/module.c
33
 
===================================================================
34
 
--- linux-2.6.32-SLE11-SP1.orig/kernel/module.c
35
 
+++ linux-2.6.32-SLE11-SP1/kernel/module.c
36
 
@@ -572,7 +572,7 @@ static void percpu_modcopy(void *pcpudes
37
 
        int cpu;
38
 
 
39
 
        for_each_possible_cpu(cpu)
40
 
-               memcpy(per_cpu_ptr(pcpudest, cpu), from, size);
41
 
+               memcpy(pcpudest + per_cpu_offset(cpu), from, size);
42
 
 }
43
 
 
44
 
 #else /* ... !CONFIG_SMP */