aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-01-30 07:30:55 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:30:55 -0500
commit5548fecdff5617ba3a2f09f0e585e1ac6e1bd25c (patch)
tree9761144d3140a554c062a289a40c1e0a5e206ef8 /arch/x86
parent1c54d77078056cde0f195b1a982cb681850efc08 (diff)
x86: clean up bitops-related warnings
Add casts to appropriate places to silence spurious bitops warnings. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/setup_64.c31
-rw-r--r--arch/x86/kernel/smpboot_64.c4
-rw-r--r--arch/x86/mm/numa_64.c2
3 files changed, 19 insertions, 18 deletions
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
index 84f66b7b4d2e..63dd39b843b5 100644
--- a/arch/x86/kernel/setup_64.c
+++ b/arch/x86/kernel/setup_64.c
@@ -661,19 +661,19 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
661 661
662 /* Bit 31 in normal CPUID used for nonstandard 3DNow ID; 662 /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
663 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */ 663 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
664 clear_bit(0*32+31, &c->x86_capability); 664 clear_bit(0*32+31, (unsigned long *)&c->x86_capability);
665 665
666 /* On C+ stepping K8 rep microcode works well for copy/memset */ 666 /* On C+ stepping K8 rep microcode works well for copy/memset */
667 level = cpuid_eax(1); 667 level = cpuid_eax(1);
668 if (c->x86 == 15 && ((level >= 0x0f48 && level < 0x0f50) || 668 if (c->x86 == 15 && ((level >= 0x0f48 && level < 0x0f50) ||
669 level >= 0x0f58)) 669 level >= 0x0f58))
670 set_bit(X86_FEATURE_REP_GOOD, &c->x86_capability); 670 set_bit(X86_FEATURE_REP_GOOD, (unsigned long *)&c->x86_capability);
671 if (c->x86 == 0x10 || c->x86 == 0x11) 671 if (c->x86 == 0x10 || c->x86 == 0x11)
672 set_bit(X86_FEATURE_REP_GOOD, &c->x86_capability); 672 set_bit(X86_FEATURE_REP_GOOD, (unsigned long *)&c->x86_capability);
673 673
674 /* Enable workaround for FXSAVE leak */ 674 /* Enable workaround for FXSAVE leak */
675 if (c->x86 >= 6) 675 if (c->x86 >= 6)
676 set_bit(X86_FEATURE_FXSAVE_LEAK, &c->x86_capability); 676 set_bit(X86_FEATURE_FXSAVE_LEAK, (unsigned long *)&c->x86_capability);
677 677
678 level = get_model_name(c); 678 level = get_model_name(c);
679 if (!level) { 679 if (!level) {
@@ -689,7 +689,7 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
689 689
690 /* c->x86_power is 8000_0007 edx. Bit 8 is constant TSC */ 690 /* c->x86_power is 8000_0007 edx. Bit 8 is constant TSC */
691 if (c->x86_power & (1<<8)) 691 if (c->x86_power & (1<<8))
692 set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability); 692 set_bit(X86_FEATURE_CONSTANT_TSC, (unsigned long *)&c->x86_capability);
693 693
694 /* Multi core CPU? */ 694 /* Multi core CPU? */
695 if (c->extended_cpuid_level >= 0x80000008) 695 if (c->extended_cpuid_level >= 0x80000008)
@@ -702,14 +702,14 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
702 num_cache_leaves = 3; 702 num_cache_leaves = 3;
703 703
704 if (c->x86 == 0xf || c->x86 == 0x10 || c->x86 == 0x11) 704 if (c->x86 == 0xf || c->x86 == 0x10 || c->x86 == 0x11)
705 set_bit(X86_FEATURE_K8, &c->x86_capability); 705 set_bit(X86_FEATURE_K8, (unsigned long *)&c->x86_capability);
706 706
707 /* RDTSC can be speculated around */ 707 /* RDTSC can be speculated around */
708 clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability); 708 clear_bit(X86_FEATURE_SYNC_RDTSC, (unsigned long *)&c->x86_capability);
709 709
710 /* Family 10 doesn't support C states in MWAIT so don't use it */ 710 /* Family 10 doesn't support C states in MWAIT so don't use it */
711 if (c->x86 == 0x10 && !force_mwait) 711 if (c->x86 == 0x10 && !force_mwait)
712 clear_bit(X86_FEATURE_MWAIT, &c->x86_capability); 712 clear_bit(X86_FEATURE_MWAIT, (unsigned long *)&c->x86_capability);
713 713
714 if (amd_apic_timer_broken()) 714 if (amd_apic_timer_broken())
715 disable_apic_timer = 1; 715 disable_apic_timer = 1;
@@ -811,16 +811,17 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
811 unsigned eax = cpuid_eax(10); 811 unsigned eax = cpuid_eax(10);
812 /* Check for version and the number of counters */ 812 /* Check for version and the number of counters */
813 if ((eax & 0xff) && (((eax>>8) & 0xff) > 1)) 813 if ((eax & 0xff) && (((eax>>8) & 0xff) > 1))
814 set_bit(X86_FEATURE_ARCH_PERFMON, &c->x86_capability); 814 set_bit(X86_FEATURE_ARCH_PERFMON,
815 (unsigned long *)&c->x86_capability);
815 } 816 }
816 817
817 if (cpu_has_ds) { 818 if (cpu_has_ds) {
818 unsigned int l1, l2; 819 unsigned int l1, l2;
819 rdmsr(MSR_IA32_MISC_ENABLE, l1, l2); 820 rdmsr(MSR_IA32_MISC_ENABLE, l1, l2);
820 if (!(l1 & (1<<11))) 821 if (!(l1 & (1<<11)))
821 set_bit(X86_FEATURE_BTS, c->x86_capability); 822 set_bit(X86_FEATURE_BTS, (unsigned long *)c->x86_capability);
822 if (!(l1 & (1<<12))) 823 if (!(l1 & (1<<12)))
823 set_bit(X86_FEATURE_PEBS, c->x86_capability); 824 set_bit(X86_FEATURE_PEBS, (unsigned long *)c->x86_capability);
824 } 825 }
825 826
826 n = c->extended_cpuid_level; 827 n = c->extended_cpuid_level;
@@ -839,13 +840,13 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
839 c->x86_cache_alignment = c->x86_clflush_size * 2; 840 c->x86_cache_alignment = c->x86_clflush_size * 2;
840 if ((c->x86 == 0xf && c->x86_model >= 0x03) || 841 if ((c->x86 == 0xf && c->x86_model >= 0x03) ||
841 (c->x86 == 0x6 && c->x86_model >= 0x0e)) 842 (c->x86 == 0x6 && c->x86_model >= 0x0e))
842 set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability); 843 set_bit(X86_FEATURE_CONSTANT_TSC, (unsigned long *)&c->x86_capability);
843 if (c->x86 == 6) 844 if (c->x86 == 6)
844 set_bit(X86_FEATURE_REP_GOOD, &c->x86_capability); 845 set_bit(X86_FEATURE_REP_GOOD, (unsigned long *)&c->x86_capability);
845 if (c->x86 == 15) 846 if (c->x86 == 15)
846 set_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability); 847 set_bit(X86_FEATURE_SYNC_RDTSC, (unsigned long *)&c->x86_capability);
847 else 848 else
848 clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability); 849 clear_bit(X86_FEATURE_SYNC_RDTSC, (unsigned long *)&c->x86_capability);
849 c->x86_max_cores = intel_num_cpu_cores(c); 850 c->x86_max_cores = intel_num_cpu_cores(c);
850 851
851 srat_detect_node(); 852 srat_detect_node();
diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c
index 8ac8eb620428..ac1089f2b917 100644
--- a/arch/x86/kernel/smpboot_64.c
+++ b/arch/x86/kernel/smpboot_64.c
@@ -691,7 +691,7 @@ do_rest:
691 } 691 }
692 if (boot_error) { 692 if (boot_error) {
693 cpu_clear(cpu, cpu_callout_map); /* was set here (do_boot_cpu()) */ 693 cpu_clear(cpu, cpu_callout_map); /* was set here (do_boot_cpu()) */
694 clear_bit(cpu, &cpu_initialized); /* was set by cpu_init() */ 694 clear_bit(cpu, (unsigned long *)&cpu_initialized); /* was set by cpu_init() */
695 clear_node_cpumask(cpu); /* was set by numa_add_cpu */ 695 clear_node_cpumask(cpu); /* was set by numa_add_cpu */
696 cpu_clear(cpu, cpu_present_map); 696 cpu_clear(cpu, cpu_present_map);
697 cpu_clear(cpu, cpu_possible_map); 697 cpu_clear(cpu, cpu_possible_map);
@@ -1036,7 +1036,7 @@ void remove_cpu_from_maps(void)
1036 1036
1037 cpu_clear(cpu, cpu_callout_map); 1037 cpu_clear(cpu, cpu_callout_map);
1038 cpu_clear(cpu, cpu_callin_map); 1038 cpu_clear(cpu, cpu_callin_map);
1039 clear_bit(cpu, &cpu_initialized); /* was set by cpu_init() */ 1039 clear_bit(cpu, (unsigned long *)&cpu_initialized); /* was set by cpu_init() */
1040 clear_node_cpumask(cpu); 1040 clear_node_cpumask(cpu);
1041} 1041}
1042 1042
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index 46b4b5e1a02a..848231481619 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -547,7 +547,7 @@ void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn)
547 547
548__cpuinit void numa_add_cpu(int cpu) 548__cpuinit void numa_add_cpu(int cpu)
549{ 549{
550 set_bit(cpu, &node_to_cpumask_map[cpu_to_node(cpu)]); 550 set_bit(cpu, (unsigned long *)&node_to_cpumask_map[cpu_to_node(cpu)]);
551} 551}
552 552
553void __cpuinit numa_set_node(int cpu, int node) 553void __cpuinit numa_set_node(int cpu, int node)