lua: Fixed some cross-platform issues for PPC (and probably other architectures)
[openwrt.git] / target / linux / pxa / patches-2.6.21 / 022-bugfix-pxa-cpufreq.patch
1 Index: linux-2.6.21.7/arch/arm/mach-pxa/cpu-pxa.c
2 ===================================================================
3 --- linux-2.6.21.7.orig/arch/arm/mach-pxa/cpu-pxa.c
4 +++ linux-2.6.21.7/arch/arm/mach-pxa/cpu-pxa.c
5 @@ -60,7 +60,7 @@ typedef struct
6
7 /* Define the refresh period in mSec for the SDRAM and the number of rows */
8 #define SDRAM_TREF 64 /* standard 64ms SDRAM */
9 -#define SDRAM_ROWS 4096 /* 64MB=8192 32MB=4096 */
10 +#define SDRAM_ROWS 8192 /* 64MB=8192 32MB=4096 */
11 #define MDREFR_DRI(x) ((x*SDRAM_TREF)/(SDRAM_ROWS*32))
12
13 #define CCLKCFG_TURBO 0x1
14 @@ -136,7 +136,7 @@ static int pxa_set_target(struct cpufreq
15 unsigned int relation)
16 {
17 int idx;
18 - unsigned long cpus_allowed;
19 + cpumask_t cpus_allowed;
20 int cpu = policy->cpu;
21 struct cpufreq_freqs freqs;
22 pxa_freqs_t *pxa_freq_settings;
23 @@ -144,6 +144,7 @@ static int pxa_set_target(struct cpufreq
24 unsigned long flags;
25 unsigned int unused;
26 unsigned int preset_mdrefr, postset_mdrefr;
27 + void *ramstart;
28
29 /*
30 * Save this threads cpus_allowed mask.
31 @@ -154,7 +155,7 @@ static int pxa_set_target(struct cpufreq
32 * Bind to the specified CPU. When this call returns,
33 * we should be running on the right CPU.
34 */
35 - set_cpus_allowed(current, 1 << cpu);
36 + set_cpus_allowed(current, cpumask_of_cpu(cpu));
37 BUG_ON(cpu != smp_processor_id());
38
39 /* Get the current policy */
40 @@ -187,7 +188,7 @@ static int pxa_set_target(struct cpufreq
41 (pxa_freq_settings[idx].membus/1000));
42 }
43
44 - void *ramstart = phys_to_virt(0xa0000000);
45 + ramstart = phys_to_virt(0xa0000000);
46
47 /*
48 * Tell everyone what we're about to do...
49 @@ -260,13 +261,13 @@ static int pxa_set_target(struct cpufreq
50
51 static int pxa_cpufreq_init(struct cpufreq_policy *policy)
52 {
53 - unsigned long cpus_allowed;
54 + cpumask_t cpus_allowed;
55 unsigned int cpu = policy->cpu;
56 int i;
57
58 cpus_allowed = current->cpus_allowed;
59
60 - set_cpus_allowed(current, 1 << cpu);
61 + set_cpus_allowed(current, cpumask_of_cpu(cpu));
62 BUG_ON(cpu != smp_processor_id());
63
64 /* set default policy and cpuinfo */
This page took 0.043079 seconds and 5 git commands to generate.