Commit b69d3987f4360a5e7e9e55465b3cdd0cc204b79e
Exists in
master
and in
7 other branches
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes: "make namespacecheck" fixes x86: fix compilation error in VisWS x86: voyager fix x86: Drop duplicate from setup.c intel-iommu.c: dma ops fix
Showing 18 changed files Side-by-side Diff
- arch/x86/Kconfig
- arch/x86/kernel/apic_32.c
- arch/x86/kernel/apic_64.c
- arch/x86/kernel/process_32.c
- arch/x86/kernel/process_64.c
- arch/x86/kernel/setup.c
- arch/x86/kernel/setup_32.c
- arch/x86/kernel/smpboot.c
- arch/x86/kernel/tlb_64.c
- arch/x86/kernel/vsyscall_64.c
- arch/x86/mach-visws/mpparse.c
- arch/x86/mach-voyager/voyager_smp.c
- arch/x86/mm/dump_pagetables.c
- arch/x86/mm/pageattr.c
- arch/x86/mm/srat_64.c
- drivers/pci/intel-iommu.c
- include/asm-x86/smp.h
- include/asm-x86/tsc.h
arch/x86/Kconfig
arch/x86/kernel/apic_32.c
arch/x86/kernel/apic_64.c
... | ... | @@ -429,7 +429,7 @@ |
429 | 429 | * set the DUMMY flag again and force the broadcast mode in the |
430 | 430 | * clockevents layer. |
431 | 431 | */ |
432 | -void __cpuinit check_boot_apic_timer_broadcast(void) | |
432 | +static void __cpuinit check_boot_apic_timer_broadcast(void) | |
433 | 433 | { |
434 | 434 | if (!disable_apic_timer || |
435 | 435 | (lapic_clockevent.features & CLOCK_EVT_FEAT_DUMMY)) |
... | ... | @@ -834,7 +834,7 @@ |
834 | 834 | preempt_enable(); |
835 | 835 | } |
836 | 836 | |
837 | -void __cpuinit lapic_setup_esr(void) | |
837 | +static void __cpuinit lapic_setup_esr(void) | |
838 | 838 | { |
839 | 839 | unsigned maxlvt = lapic_get_maxlvt(); |
840 | 840 |
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c
arch/x86/kernel/setup.c
arch/x86/kernel/setup_32.c
... | ... | @@ -442,7 +442,7 @@ |
442 | 442 | } |
443 | 443 | |
444 | 444 | #ifndef CONFIG_NEED_MULTIPLE_NODES |
445 | -void __init setup_bootmem_allocator(void); | |
445 | +static void __init setup_bootmem_allocator(void); | |
446 | 446 | static unsigned long __init setup_memory(void) |
447 | 447 | { |
448 | 448 | /* |
... | ... | @@ -477,7 +477,7 @@ |
477 | 477 | return max_low_pfn; |
478 | 478 | } |
479 | 479 | |
480 | -void __init zone_sizes_init(void) | |
480 | +static void __init zone_sizes_init(void) | |
481 | 481 | { |
482 | 482 | unsigned long max_zone_pfns[MAX_NR_ZONES]; |
483 | 483 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); |
arch/x86/kernel/smpboot.c
... | ... | @@ -184,7 +184,7 @@ |
184 | 184 | u8 cpu_2_logical_apicid[NR_CPUS] __read_mostly = |
185 | 185 | { [0 ... NR_CPUS-1] = BAD_APICID }; |
186 | 186 | |
187 | -void map_cpu_to_logical_apicid(void) | |
187 | +static void map_cpu_to_logical_apicid(void) | |
188 | 188 | { |
189 | 189 | int cpu = smp_processor_id(); |
190 | 190 | int apicid = logical_smp_processor_id(); |
... | ... | @@ -197,7 +197,7 @@ |
197 | 197 | map_cpu_to_node(cpu, node); |
198 | 198 | } |
199 | 199 | |
200 | -void unmap_cpu_to_logical_apicid(int cpu) | |
200 | +static void unmap_cpu_to_logical_apicid(int cpu) | |
201 | 201 | { |
202 | 202 | cpu_2_logical_apicid[cpu] = BAD_APICID; |
203 | 203 | unmap_cpu_to_node(cpu); |
... | ... | @@ -211,7 +211,7 @@ |
211 | 211 | * Report back to the Boot Processor. |
212 | 212 | * Running on AP. |
213 | 213 | */ |
214 | -void __cpuinit smp_callin(void) | |
214 | +static void __cpuinit smp_callin(void) | |
215 | 215 | { |
216 | 216 | int cpuid, phys_id; |
217 | 217 | unsigned long timeout; |
... | ... | @@ -436,7 +436,7 @@ |
436 | 436 | #endif |
437 | 437 | } |
438 | 438 | |
439 | -void __cpuinit smp_checks(void) | |
439 | +static void __cpuinit smp_checks(void) | |
440 | 440 | { |
441 | 441 | if (smp_b_stepping) |
442 | 442 | printk(KERN_WARNING "WARNING: SMP operation may be unreliable" |
... | ... | @@ -565,7 +565,7 @@ |
565 | 565 | } |
566 | 566 | #endif |
567 | 567 | |
568 | -void impress_friends(void) | |
568 | +static void impress_friends(void) | |
569 | 569 | { |
570 | 570 | int cpu; |
571 | 571 | unsigned long bogosum = 0; |
... | ... | @@ -1287,7 +1287,7 @@ |
1287 | 1287 | } |
1288 | 1288 | # endif /* CONFIG_X86_32 */ |
1289 | 1289 | |
1290 | -void remove_siblinginfo(int cpu) | |
1290 | +static void remove_siblinginfo(int cpu) | |
1291 | 1291 | { |
1292 | 1292 | int sibling; |
1293 | 1293 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
arch/x86/kernel/tlb_64.c
arch/x86/kernel/vsyscall_64.c
arch/x86/mach-visws/mpparse.c
... | ... | @@ -11,22 +11,9 @@ |
11 | 11 | /* Have we found an MP table */ |
12 | 12 | int smp_found_config; |
13 | 13 | |
14 | -/* | |
15 | - * Various Linux-internal data structures created from the | |
16 | - * MP-table. | |
17 | - */ | |
18 | -int apic_version [MAX_APICS]; | |
19 | - | |
20 | 14 | int pic_mode; |
21 | -unsigned long mp_lapic_addr; | |
22 | 15 | |
23 | -/* Processor that is doing the boot up */ | |
24 | -unsigned int boot_cpu_physical_apicid = -1U; | |
25 | - | |
26 | -/* Bitmask of physically existing CPUs */ | |
27 | -physid_mask_t phys_cpu_present_map; | |
28 | - | |
29 | -unsigned int __initdata maxcpus = NR_CPUS; | |
16 | +extern unsigned int __cpuinitdata maxcpus; | |
30 | 17 | |
31 | 18 | /* |
32 | 19 | * The Visual Workstation is Intel MP compliant in the hardware |
arch/x86/mach-voyager/voyager_smp.c
... | ... | @@ -206,11 +206,6 @@ |
206 | 206 | /* used to count up as CPUs are brought on line (starts at 0) */ |
207 | 207 | static int cpucount = 0; |
208 | 208 | |
209 | -/* steal a page from the bottom of memory for the trampoline and | |
210 | - * squirrel its address away here. This will be in kernel virtual | |
211 | - * space */ | |
212 | -unsigned char *trampoline_base; | |
213 | - | |
214 | 209 | /* The per cpu profile stuff - used in smp_local_timer_interrupt */ |
215 | 210 | static DEFINE_PER_CPU(int, prof_multiplier) = 1; |
216 | 211 | static DEFINE_PER_CPU(int, prof_old_multiplier) = 1; |
... | ... | @@ -425,18 +420,6 @@ |
425 | 420 | *c = boot_cpu_data; |
426 | 421 | |
427 | 422 | identify_secondary_cpu(c); |
428 | -} | |
429 | - | |
430 | -/* set up the trampoline and return the physical address of the code */ | |
431 | -unsigned long __init setup_trampoline(void) | |
432 | -{ | |
433 | - /* these two are global symbols in trampoline.S */ | |
434 | - extern const __u8 trampoline_end[]; | |
435 | - extern const __u8 trampoline_data[]; | |
436 | - | |
437 | - memcpy(trampoline_base, trampoline_data, | |
438 | - trampoline_end - trampoline_data); | |
439 | - return virt_to_phys(trampoline_base); | |
440 | 423 | } |
441 | 424 | |
442 | 425 | /* Routine initially called when a non-boot CPU is brought online */ |
arch/x86/mm/dump_pagetables.c
arch/x86/mm/pageattr.c
arch/x86/mm/srat_64.c
... | ... | @@ -163,7 +163,7 @@ |
163 | 163 | pxm, apic_id, node); |
164 | 164 | } |
165 | 165 | |
166 | -int update_end_of_memory(unsigned long end) {return -1;} | |
166 | +static int update_end_of_memory(unsigned long end) {return -1;} | |
167 | 167 | static int hotadd_enough_memory(struct bootnode *nd) {return 1;} |
168 | 168 | #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE |
169 | 169 | static inline int save_add_info(void) {return 1;} |
drivers/pci/intel-iommu.c
... | ... | @@ -1905,32 +1905,31 @@ |
1905 | 1905 | return domain; |
1906 | 1906 | } |
1907 | 1907 | |
1908 | -static dma_addr_t intel_map_single(struct device *hwdev, void *addr, | |
1909 | - size_t size, int dir) | |
1908 | +static dma_addr_t | |
1909 | +intel_map_single(struct device *hwdev, phys_addr_t paddr, size_t size, int dir) | |
1910 | 1910 | { |
1911 | 1911 | struct pci_dev *pdev = to_pci_dev(hwdev); |
1912 | - int ret; | |
1913 | 1912 | struct dmar_domain *domain; |
1914 | - unsigned long start_addr; | |
1913 | + unsigned long start_paddr; | |
1915 | 1914 | struct iova *iova; |
1916 | 1915 | int prot = 0; |
1916 | + int ret; | |
1917 | 1917 | |
1918 | 1918 | BUG_ON(dir == DMA_NONE); |
1919 | 1919 | if (pdev->dev.archdata.iommu == DUMMY_DEVICE_DOMAIN_INFO) |
1920 | - return virt_to_bus(addr); | |
1920 | + return paddr; | |
1921 | 1921 | |
1922 | 1922 | domain = get_valid_domain_for_dev(pdev); |
1923 | 1923 | if (!domain) |
1924 | 1924 | return 0; |
1925 | 1925 | |
1926 | - addr = (void *)virt_to_phys(addr); | |
1927 | - size = aligned_size((u64)addr, size); | |
1926 | + size = aligned_size((u64)paddr, size); | |
1928 | 1927 | |
1929 | 1928 | iova = __intel_alloc_iova(hwdev, domain, size); |
1930 | 1929 | if (!iova) |
1931 | 1930 | goto error; |
1932 | 1931 | |
1933 | - start_addr = iova->pfn_lo << PAGE_SHIFT_4K; | |
1932 | + start_paddr = iova->pfn_lo << PAGE_SHIFT_4K; | |
1934 | 1933 | |
1935 | 1934 | /* |
1936 | 1935 | * Check if DMAR supports zero-length reads on write only |
1937 | 1936 | |
1938 | 1937 | |
1939 | 1938 | |
1940 | 1939 | |
1941 | 1940 | |
1942 | 1941 | |
... | ... | @@ -1942,33 +1941,33 @@ |
1942 | 1941 | if (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL) |
1943 | 1942 | prot |= DMA_PTE_WRITE; |
1944 | 1943 | /* |
1945 | - * addr - (addr + size) might be partial page, we should map the whole | |
1944 | + * paddr - (paddr + size) might be partial page, we should map the whole | |
1946 | 1945 | * page. Note: if two part of one page are separately mapped, we |
1947 | - * might have two guest_addr mapping to the same host addr, but this | |
1946 | + * might have two guest_addr mapping to the same host paddr, but this | |
1948 | 1947 | * is not a big problem |
1949 | 1948 | */ |
1950 | - ret = domain_page_mapping(domain, start_addr, | |
1951 | - ((u64)addr) & PAGE_MASK_4K, size, prot); | |
1949 | + ret = domain_page_mapping(domain, start_paddr, | |
1950 | + ((u64)paddr) & PAGE_MASK_4K, size, prot); | |
1952 | 1951 | if (ret) |
1953 | 1952 | goto error; |
1954 | 1953 | |
1955 | 1954 | pr_debug("Device %s request: %lx@%llx mapping: %lx@%llx, dir %d\n", |
1956 | - pci_name(pdev), size, (u64)addr, | |
1957 | - size, (u64)start_addr, dir); | |
1955 | + pci_name(pdev), size, (u64)paddr, | |
1956 | + size, (u64)start_paddr, dir); | |
1958 | 1957 | |
1959 | 1958 | /* it's a non-present to present mapping */ |
1960 | 1959 | ret = iommu_flush_iotlb_psi(domain->iommu, domain->id, |
1961 | - start_addr, size >> PAGE_SHIFT_4K, 1); | |
1960 | + start_paddr, size >> PAGE_SHIFT_4K, 1); | |
1962 | 1961 | if (ret) |
1963 | 1962 | iommu_flush_write_buffer(domain->iommu); |
1964 | 1963 | |
1965 | - return (start_addr + ((u64)addr & (~PAGE_MASK_4K))); | |
1964 | + return (start_paddr + ((u64)paddr & (~PAGE_MASK_4K))); | |
1966 | 1965 | |
1967 | 1966 | error: |
1968 | 1967 | if (iova) |
1969 | 1968 | __free_iova(&domain->iovad, iova); |
1970 | 1969 | printk(KERN_ERR"Device %s request: %lx@%llx dir %d --- failed\n", |
1971 | - pci_name(pdev), size, (u64)addr, dir); | |
1970 | + pci_name(pdev), size, (u64)paddr, dir); | |
1972 | 1971 | return 0; |
1973 | 1972 | } |
1974 | 1973 | |
... | ... | @@ -2082,7 +2081,7 @@ |
2082 | 2081 | return NULL; |
2083 | 2082 | memset(vaddr, 0, size); |
2084 | 2083 | |
2085 | - *dma_handle = intel_map_single(hwdev, vaddr, size, DMA_BIDIRECTIONAL); | |
2084 | + *dma_handle = intel_map_single(hwdev, virt_to_bus(vaddr), size, DMA_BIDIRECTIONAL); | |
2086 | 2085 | if (*dma_handle) |
2087 | 2086 | return vaddr; |
2088 | 2087 | free_pages((unsigned long)vaddr, order); |
include/asm-x86/smp.h