022-bugfix-pxa-cpufreq.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. /* Define the refresh period in mSec for the SDRAM and the number of rows */
  7. #define SDRAM_TREF 64 /* standard 64ms SDRAM */
  8. -#define SDRAM_ROWS 4096 /* 64MB=8192 32MB=4096 */
  9. +#define SDRAM_ROWS 8192 /* 64MB=8192 32MB=4096 */
  10. #define MDREFR_DRI(x) ((x*SDRAM_TREF)/(SDRAM_ROWS*32))
  11. #define CCLKCFG_TURBO 0x1
  12. @@ -136,7 +136,7 @@ static int pxa_set_target(struct cpufreq
  13. unsigned int relation)
  14. {
  15. int idx;
  16. - unsigned long cpus_allowed;
  17. + cpumask_t cpus_allowed;
  18. int cpu = policy->cpu;
  19. struct cpufreq_freqs freqs;
  20. pxa_freqs_t *pxa_freq_settings;
  21. @@ -144,6 +144,7 @@ static int pxa_set_target(struct cpufreq
  22. unsigned long flags;
  23. unsigned int unused;
  24. unsigned int preset_mdrefr, postset_mdrefr;
  25. + void *ramstart;
  26. /*
  27. * Save this threads cpus_allowed mask.
  28. @@ -154,7 +155,7 @@ static int pxa_set_target(struct cpufreq
  29. * Bind to the specified CPU. When this call returns,
  30. * we should be running on the right CPU.
  31. */
  32. - set_cpus_allowed(current, 1 << cpu);
  33. + set_cpus_allowed(current, cpumask_of_cpu(cpu));
  34. BUG_ON(cpu != smp_processor_id());
  35. /* Get the current policy */
  36. @@ -187,7 +188,7 @@ static int pxa_set_target(struct cpufreq
  37. (pxa_freq_settings[idx].membus/1000));
  38. }
  39. - void *ramstart = phys_to_virt(0xa0000000);
  40. + ramstart = phys_to_virt(0xa0000000);
  41. /*
  42. * Tell everyone what we're about to do...
  43. @@ -260,13 +261,13 @@ static int pxa_set_target(struct cpufreq
  44. static int pxa_cpufreq_init(struct cpufreq_policy *policy)
  45. {
  46. - unsigned long cpus_allowed;
  47. + cpumask_t cpus_allowed;
  48. unsigned int cpu = policy->cpu;
  49. int i;
  50. cpus_allowed = current->cpus_allowed;
  51. - set_cpus_allowed(current, 1 << cpu);
  52. + set_cpus_allowed(current, cpumask_of_cpu(cpu));
  53. BUG_ON(cpu != smp_processor_id());
  54. /* set default policy and cpuinfo */