Commit d20ead9e authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86

* ssh://master.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86: (114 commits)
  x86: delete vsyscall files during make clean
  kbuild: fix typo SRCARCH in find_sources
  x86: fix kernel rebuild due to vsyscall fallout
  .gitignore update for x86 arch
  x86: unify include/asm/debugreg_32/64.h
  x86: unify include/asm/unwind_32/64.h
  x86: unify include/asm/types_32/64.h
  x86: unify include/asm/tlb_32/64.h
  x86: unify include/asm/siginfo_32/64.h
  x86: unify include/asm/bug_32/64.h
  x86: unify include/asm/mman_32/64.h
  x86: unify include/asm/agp_32/64.h
  x86: unify include/asm/kdebug_32/64.h
  x86: unify include/asm/ioctls_32/64.h
  x86: unify include/asm/floppy_32/64.h
  x86: apply missing DMA/OOM prevention to floppy_32.h
  x86: unify include/asm/cache_32/64.h
  x86: unify include/asm/cache_32/64.h
  x86: unify include/asm/dmi_32/64.h
  x86: unify include/asm/delay_32/64.h
  ...
parents c56ec763 88e4d250
...@@ -237,6 +237,7 @@ asmlinkage void mce_threshold_interrupt(void) ...@@ -237,6 +237,7 @@ asmlinkage void mce_threshold_interrupt(void)
} }
} }
out: out:
add_pda(irq_threshold_count, 1);
irq_exit(); irq_exit();
} }
......
...@@ -26,6 +26,7 @@ asmlinkage void smp_thermal_interrupt(void) ...@@ -26,6 +26,7 @@ asmlinkage void smp_thermal_interrupt(void)
if (therm_throt_process(msr_val & 1)) if (therm_throt_process(msr_val & 1))
mce_log_therm_throt_event(smp_processor_id(), msr_val); mce_log_therm_throt_event(smp_processor_id(), msr_val);
add_pda(irq_thermal_count, 1);
irq_exit(); irq_exit();
} }
......
...@@ -133,7 +133,7 @@ static const struct file_operations msr_fops = { ...@@ -133,7 +133,7 @@ static const struct file_operations msr_fops = {
.open = msr_open, .open = msr_open,
}; };
static int msr_device_create(int i) static int __cpuinit msr_device_create(int i)
{ {
int err = 0; int err = 0;
struct device *dev; struct device *dev;
...@@ -144,7 +144,7 @@ static int msr_device_create(int i) ...@@ -144,7 +144,7 @@ static int msr_device_create(int i)
return err; return err;
} }
static int msr_class_cpu_callback(struct notifier_block *nfb, static int __cpuinit msr_class_cpu_callback(struct notifier_block *nfb,
unsigned long action, void *hcpu) unsigned long action, void *hcpu)
{ {
unsigned int cpu = (unsigned long)hcpu; unsigned int cpu = (unsigned long)hcpu;
......
...@@ -222,10 +222,10 @@ static inline unsigned int num_dma_pages(unsigned long dma, unsigned int dmalen) ...@@ -222,10 +222,10 @@ static inline unsigned int num_dma_pages(unsigned long dma, unsigned int dmalen)
return npages; return npages;
} }
static inline int translate_phb(struct pci_dev* dev) static inline int translation_enabled(struct iommu_table *tbl)
{ {
int disabled = bus_info[dev->bus->number].translation_disabled; /* only PHBs with translation enabled have an IOMMU table */
return !disabled; return (tbl != NULL);
} }
static void iommu_range_reserve(struct iommu_table *tbl, static void iommu_range_reserve(struct iommu_table *tbl,
...@@ -388,7 +388,7 @@ static void calgary_unmap_sg(struct device *dev, ...@@ -388,7 +388,7 @@ static void calgary_unmap_sg(struct device *dev,
struct scatterlist *s; struct scatterlist *s;
int i; int i;
if (!translate_phb(to_pci_dev(dev))) if (!translation_enabled(tbl))
return; return;
for_each_sg(sglist, s, nelems, i) { for_each_sg(sglist, s, nelems, i) {
...@@ -428,7 +428,7 @@ static int calgary_map_sg(struct device *dev, struct scatterlist *sg, ...@@ -428,7 +428,7 @@ static int calgary_map_sg(struct device *dev, struct scatterlist *sg,
unsigned long entry; unsigned long entry;
int i; int i;
if (!translate_phb(to_pci_dev(dev))) if (!translation_enabled(tbl))
return calgary_nontranslate_map_sg(dev, sg, nelems, direction); return calgary_nontranslate_map_sg(dev, sg, nelems, direction);
for_each_sg(sg, s, nelems, i) { for_each_sg(sg, s, nelems, i) {
...@@ -474,7 +474,7 @@ static dma_addr_t calgary_map_single(struct device *dev, void *vaddr, ...@@ -474,7 +474,7 @@ static dma_addr_t calgary_map_single(struct device *dev, void *vaddr,
uaddr = (unsigned long)vaddr; uaddr = (unsigned long)vaddr;
npages = num_dma_pages(uaddr, size); npages = num_dma_pages(uaddr, size);
if (translate_phb(to_pci_dev(dev))) if (translation_enabled(tbl))
dma_handle = iommu_alloc(tbl, vaddr, npages, direction); dma_handle = iommu_alloc(tbl, vaddr, npages, direction);
else else
dma_handle = virt_to_bus(vaddr); dma_handle = virt_to_bus(vaddr);
...@@ -488,7 +488,7 @@ static void calgary_unmap_single(struct device *dev, dma_addr_t dma_handle, ...@@ -488,7 +488,7 @@ static void calgary_unmap_single(struct device *dev, dma_addr_t dma_handle,
struct iommu_table *tbl = find_iommu_table(dev); struct iommu_table *tbl = find_iommu_table(dev);
unsigned int npages; unsigned int npages;
if (!translate_phb(to_pci_dev(dev))) if (!translation_enabled(tbl))
return; return;
npages = num_dma_pages(dma_handle, size); npages = num_dma_pages(dma_handle, size);
...@@ -513,7 +513,7 @@ static void* calgary_alloc_coherent(struct device *dev, size_t size, ...@@ -513,7 +513,7 @@ static void* calgary_alloc_coherent(struct device *dev, size_t size,
goto error; goto error;
memset(ret, 0, size); memset(ret, 0, size);
if (translate_phb(to_pci_dev(dev))) { if (translation_enabled(tbl)) {
/* set up tces to cover the allocated range */ /* set up tces to cover the allocated range */
mapping = iommu_alloc(tbl, ret, npages, DMA_BIDIRECTIONAL); mapping = iommu_alloc(tbl, ret, npages, DMA_BIDIRECTIONAL);
if (mapping == bad_dma_address) if (mapping == bad_dma_address)
...@@ -1194,7 +1194,7 @@ static int __init calgary_init(void) ...@@ -1194,7 +1194,7 @@ static int __init calgary_init(void)
{ {
int ret; int ret;
struct pci_dev *dev = NULL; struct pci_dev *dev = NULL;
void *tce_space; struct calgary_bus_info *info;
ret = calgary_locate_bbars(); ret = calgary_locate_bbars();
if (ret) if (ret)
...@@ -1206,12 +1206,14 @@ static int __init calgary_init(void) ...@@ -1206,12 +1206,14 @@ static int __init calgary_init(void)
break; break;
if (!is_cal_pci_dev(dev->device)) if (!is_cal_pci_dev(dev->device))
continue; continue;
if (!translate_phb(dev)) {
info = &bus_info[dev->bus->number];
if (info->translation_disabled) {
calgary_init_one_nontraslated(dev); calgary_init_one_nontraslated(dev);
continue; continue;
} }
tce_space = bus_info[dev->bus->number].tce_space;
if (!tce_space && !translate_empty_slots) if (!info->tce_space && !translate_empty_slots)
continue; continue;
ret = calgary_init_one(dev); ret = calgary_init_one(dev);
...@@ -1229,11 +1231,13 @@ static int __init calgary_init(void) ...@@ -1229,11 +1231,13 @@ static int __init calgary_init(void)
break; break;
if (!is_cal_pci_dev(dev->device)) if (!is_cal_pci_dev(dev->device))
continue; continue;
if (!translate_phb(dev)) {
info = &bus_info[dev->bus->number];
if (info->translation_disabled) {
pci_dev_put(dev); pci_dev_put(dev);
continue; continue;
} }
if (!bus_info[dev->bus->number].tce_space && !translate_empty_slots) if (!info->tce_space && !translate_empty_slots)
continue; continue;
calgary_disable_translation(dev); calgary_disable_translation(dev);
...@@ -1546,7 +1550,7 @@ static void __init calgary_fixup_one_tce_space(struct pci_dev *dev) ...@@ -1546,7 +1550,7 @@ static void __init calgary_fixup_one_tce_space(struct pci_dev *dev)
static int __init calgary_fixup_tce_spaces(void) static int __init calgary_fixup_tce_spaces(void)
{ {
struct pci_dev *dev = NULL; struct pci_dev *dev = NULL;
void *tce_space; struct calgary_bus_info *info;
if (no_iommu || swiotlb || !calgary_detected) if (no_iommu || swiotlb || !calgary_detected)
return -ENODEV; return -ENODEV;
...@@ -1559,11 +1563,12 @@ static int __init calgary_fixup_tce_spaces(void) ...@@ -1559,11 +1563,12 @@ static int __init calgary_fixup_tce_spaces(void)
break; break;
if (!is_cal_pci_dev(dev->device)) if (!is_cal_pci_dev(dev->device))
continue; continue;
if (!translate_phb(dev))
info = &bus_info[dev->bus->number];
if (info->translation_disabled)
continue; continue;
tce_space = bus_info[dev->bus->number].tce_space; if (!info->tce_space)
if (!tce_space)
continue; continue;
calgary_fixup_one_tce_space(dev); calgary_fixup_one_tce_space(dev);
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <linux/string.h> #include <linux/string.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/pci.h>
#include <asm/io.h> #include <asm/io.h>
struct dma_coherent_mem { struct dma_coherent_mem {
......
...@@ -51,11 +51,9 @@ dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order) ...@@ -51,11 +51,9 @@ dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order)
{ {
struct page *page; struct page *page;
int node; int node;
#ifdef CONFIG_PCI
if (dev->bus == &pci_bus_type) node = dev_to_node(dev);
node = pcibus_to_node(to_pci_dev(dev)->bus); if (node == -1)
else
#endif
node = numa_node_id(); node = numa_node_id();
if (node < first_node(node_online_map)) if (node < first_node(node_online_map))
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
* See Documentation/DMA-mapping.txt for the interface specification. * See Documentation/DMA-mapping.txt for the interface specification.
* *
* Copyright 2002 Andi Kleen, SuSE Labs. * Copyright 2002 Andi Kleen, SuSE Labs.
* Subject to the GNU General Public License v2 only.
*/ */
#include <linux/types.h> #include <linux/types.h>
...@@ -375,7 +376,8 @@ static inline int dma_map_cont(struct scatterlist *start, int nelems, ...@@ -375,7 +376,8 @@ static inline int dma_map_cont(struct scatterlist *start, int nelems,
* DMA map all entries in a scatterlist. * DMA map all entries in a scatterlist.
* Merge chunks that have page aligned sizes into a continuous mapping. * Merge chunks that have page aligned sizes into a continuous mapping.
*/ */
int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents, int dir) static int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents,
int dir)
{ {
int i; int i;
int out; int out;
......
...@@ -165,7 +165,7 @@ static unsigned long convert_eip_to_linear(struct task_struct *child, struct pt_ ...@@ -165,7 +165,7 @@ static unsigned long convert_eip_to_linear(struct task_struct *child, struct pt_
seg &= ~7UL; seg &= ~7UL;
down(&child->mm->context.sem); mutex_lock(&child->mm->context.lock);
if (unlikely((seg >> 3) >= child->mm->context.size)) if (unlikely((seg >> 3) >= child->mm->context.size))
addr = -1L; /* bogus selector, access would fault */ addr = -1L; /* bogus selector, access would fault */
else { else {
...@@ -179,7 +179,7 @@ static unsigned long convert_eip_to_linear(struct task_struct *child, struct pt_ ...@@ -179,7 +179,7 @@ static unsigned long convert_eip_to_linear(struct task_struct *child, struct pt_
addr &= 0xffff; addr &= 0xffff;
addr += base; addr += base;
} }
up(&child->mm->context.sem); mutex_unlock(&child->mm->context.lock);
} }
return addr; return addr;
} }
......
...@@ -103,7 +103,7 @@ unsigned long convert_rip_to_linear(struct task_struct *child, struct pt_regs *r ...@@ -103,7 +103,7 @@ unsigned long convert_rip_to_linear(struct task_struct *child, struct pt_regs *r
seg &= ~7UL; seg &= ~7UL;
down(&child->mm->context.sem); mutex_lock(&child->mm->context.lock);
if (unlikely((seg >> 3) >= child->mm->context.size)) if (unlikely((seg >> 3) >= child->mm->context.size))
addr = -1L; /* bogus selector, access would fault */ addr = -1L; /* bogus selector, access would fault */
else { else {
...@@ -117,7 +117,7 @@ unsigned long convert_rip_to_linear(struct task_struct *child, struct pt_regs *r ...@@ -117,7 +117,7 @@ unsigned long convert_rip_to_linear(struct task_struct *child, struct pt_regs *r
addr &= 0xffff; addr &= 0xffff;
addr += base; addr += base;
} }
up(&child->mm->context.sem); mutex_unlock(&child->mm->context.lock);
} }
return addr; return addr;
......
...@@ -604,7 +604,7 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) ...@@ -604,7 +604,7 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
level = cpuid_eax(1); level = cpuid_eax(1);
if (c->x86 == 15 && ((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58)) if (c->x86 == 15 && ((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58))
set_bit(X86_FEATURE_REP_GOOD, &c->x86_capability); set_bit(X86_FEATURE_REP_GOOD, &c->x86_capability);
if (c->x86 == 0x10) if (c->x86 == 0x10 || c->x86 == 0x11)
set_bit(X86_FEATURE_REP_GOOD, &c->x86_capability); set_bit(X86_FEATURE_REP_GOOD, &c->x86_capability);
/* Enable workaround for FXSAVE leak */ /* Enable workaround for FXSAVE leak */
...@@ -968,7 +968,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -968,7 +968,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
* applications want to get the raw CPUID data, they should access * applications want to get the raw CPUID data, they should access
* /dev/cpu/<cpu_nr>/cpuid instead. * /dev/cpu/<cpu_nr>/cpuid instead.
*/ */
static char *x86_cap_flags[] = { static const char *const x86_cap_flags[] = {
/* Intel-defined */ /* Intel-defined */
"fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce",
"cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov", "cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov",
...@@ -1022,7 +1022,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -1022,7 +1022,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
}; };
static char *x86_power_flags[] = { static const char *const x86_power_flags[] = {
"ts", /* temperature sensor */ "ts", /* temperature sensor */
"fid", /* frequency id control */ "fid", /* frequency id control */
"vid", /* voltage id control */ "vid", /* voltage id control */
......
...@@ -385,7 +385,6 @@ static int setup_frame(int sig, struct k_sigaction *ka, ...@@ -385,7 +385,6 @@ static int setup_frame(int sig, struct k_sigaction *ka,
regs->edx = (unsigned long) 0; regs->edx = (unsigned long) 0;
regs->ecx = (unsigned long) 0; regs->ecx = (unsigned long) 0;
set_fs(USER_DS);
regs->xds = __USER_DS; regs->xds = __USER_DS;
regs->xes = __USER_DS; regs->xes = __USER_DS;
regs->xss = __USER_DS; regs->xss = __USER_DS;
...@@ -479,7 +478,6 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, ...@@ -479,7 +478,6 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
regs->edx = (unsigned long) &frame->info; regs->edx = (unsigned long) &frame->info;
regs->ecx = (unsigned long) &frame->uc; regs->ecx = (unsigned long) &frame->uc;
set_fs(USER_DS);
regs->xds = __USER_DS; regs->xds = __USER_DS;
regs->xes = __USER_DS; regs->xes = __USER_DS;
regs->xss = __USER_DS; regs->xss = __USER_DS;
......
...@@ -342,6 +342,7 @@ fastcall void smp_invalidate_interrupt(struct pt_regs *regs) ...@@ -342,6 +342,7 @@ fastcall void smp_invalidate_interrupt(struct pt_regs *regs)
smp_mb__after_clear_bit(); smp_mb__after_clear_bit();
out: out:
put_cpu_no_resched(); put_cpu_no_resched();
__get_cpu_var(irq_stat).irq_tlb_count++;
} }
void native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm, void native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm,
...@@ -640,6 +641,7 @@ static void native_smp_send_stop(void) ...@@ -640,6 +641,7 @@ static void native_smp_send_stop(void)
fastcall void smp_reschedule_interrupt(struct pt_regs *regs) fastcall void smp_reschedule_interrupt(struct pt_regs *regs)
{ {
ack_APIC_irq(); ack_APIC_irq();
__get_cpu_var(irq_stat).irq_resched_count++;
} }
fastcall void smp_call_function_interrupt(struct pt_regs *regs) fastcall void smp_call_function_interrupt(struct pt_regs *regs)
...@@ -660,6 +662,7 @@ fastcall void smp_call_function_interrupt(struct pt_regs *regs) ...@@ -660,6 +662,7 @@ fastcall void smp_call_function_interrupt(struct pt_regs *regs)
*/ */
irq_enter(); irq_enter();
(*func)(info); (*func)(info);
__get_cpu_var(irq_stat).irq_call_count++;
irq_exit(); irq_exit();
if (wait) { if (wait) {
...@@ -705,3 +708,10 @@ struct smp_ops smp_ops = { ...@@ -705,3 +708,10 @@ struct smp_ops smp_ops = {
.smp_send_reschedule = native_smp_send_reschedule, .smp_send_reschedule = native_smp_send_reschedule,
.smp_call_function_mask = native_smp_call_function_mask, .smp_call_function_mask = native_smp_call_function_mask,
}; };
int smp_call_function_mask(cpumask_t mask, void (*func) (void *info),
void *info, int wait)
{
return smp_ops.smp_call_function_mask(mask, func, info, wait);
}
EXPORT_SYMBOL(smp_call_function_mask);
...@@ -163,6 +163,7 @@ asmlinkage void smp_invalidate_interrupt(struct pt_regs *regs) ...@@ -163,6 +163,7 @@ asmlinkage void smp_invalidate_interrupt(struct pt_regs *regs)
out: out:
ack_APIC_irq(); ack_APIC_irq();
cpu_clear(cpu, f->flush_cpumask); cpu_clear(cpu, f->flush_cpumask);
add_pda(irq_tlb_count, 1);
} }
static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm, static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm,
...@@ -493,6 +494,7 @@ void smp_send_stop(void) ...@@ -493,6 +494,7 @@ void smp_send_stop(void)
asmlinkage void smp_reschedule_interrupt(void) asmlinkage void smp_reschedule_interrupt(void)
{ {
ack_APIC_irq(); ack_APIC_irq();
add_pda(irq_resched_count, 1);
} }
asmlinkage void smp_call_function_interrupt(void) asmlinkage void smp_call_function_interrupt(void)
...@@ -514,6 +516,7 @@ asmlinkage void smp_call_function_interrupt(void) ...@@ -514,6 +516,7 @@ asmlinkage void smp_call_function_interrupt(void)
exit_idle(); exit_idle();
irq_enter(); irq_enter();
(*func)(info); (*func)(info);
add_pda(irq_call_count, 1);
irq_exit(); irq_exit();
if (wait) { if (wait) {
mb(); mb();
......
...@@ -102,8 +102,8 @@ u8 apicid_2_node[MAX_APICID]; ...@@ -102,8 +102,8 @@ u8 apicid_2_node[MAX_APICID];
* Trampoline 80x86 program as an array. * Trampoline 80x86 program as an array.
*/ */
extern unsigned char trampoline_data []; extern const unsigned char trampoline_data [];
extern unsigned char trampoline_end []; extern const unsigned char trampoline_end [];
static unsigned char *trampoline_base; static unsigned char *trampoline_base;
static int trampoline_exec; static int trampoline_exec;
...@@ -118,7 +118,7 @@ DEFINE_PER_CPU(int, cpu_state) = { 0 }; ...@@ -118,7 +118,7 @@ DEFINE_PER_CPU(int, cpu_state) = { 0 };
* has made sure it's suitably aligned. * has made sure it's suitably aligned.
*/ */
static unsigned long __devinit setup_trampoline(void) static unsigned long __cpuinit setup_trampoline(void)
{ {
memcpy(trampoline_base, trampoline_data, trampoline_end - trampoline_data); memcpy(trampoline_base, trampoline_data, trampoline_end - trampoline_data);
return virt_to_phys(trampoline_base); return virt_to_phys(trampoline_base);
...@@ -1021,6 +1021,12 @@ static void __init smp_boot_cpus(unsigned int max_cpus) ...@@ -1021,6 +1021,12 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
if (!max_cpus) { if (!max_cpus) {
smp_found_config = 0; smp_found_config = 0;
printk(KERN_INFO "SMP mode deactivated, forcing use of dummy APIC emulation.\n"); printk(KERN_INFO "SMP mode deactivated, forcing use of dummy APIC emulation.\n");
if (nmi_watchdog == NMI_LOCAL_APIC) {
printk(KERN_INFO "activating minimal APIC for NMI watchdog use.\n");
connect_bsp_APIC();
setup_local_APIC();
}
smpboot_clear_io_apic_irqs(); smpboot_clear_io_apic_irqs();
phys_cpu_present_map = physid_mask_of_physid(0); phys_cpu_present_map = physid_mask_of_physid(0);
cpu_set(0, per_cpu(cpu_sibling_map, 0)); cpu_set(0, per_cpu(cpu_sibling_map, 0));
......
...@@ -102,8 +102,8 @@ EXPORT_PER_CPU_SYMBOL(cpu_core_map); ...@@ -102,8 +102,8 @@ EXPORT_PER_CPU_SYMBOL(cpu_core_map);
* Trampoline 80x86 program as an array. * Trampoline 80x86 program as an array.
*/ */
extern unsigned char trampoline_data[]; extern const unsigned char trampoline_data[];
extern unsigned char trampoline_end[]; extern const unsigned char trampoline_end[];
/* State of each CPU */ /* State of each CPU */
DEFINE_PER_CPU(int, cpu_state) = { 0 }; DEFINE_PER_CPU(int, cpu_state) = { 0 };
...@@ -695,7 +695,6 @@ static int __cpuinit do_boot_cpu(int cpu, int apicid) ...@@ -695,7 +695,6 @@ static int __cpuinit do_boot_cpu(int cpu, int apicid)
cpu_clear(cpu, cpu_present_map); cpu_clear(cpu, cpu_present_map);
cpu_clear(cpu, cpu_possible_map); cpu_clear(cpu, cpu_possible_map);
x86_cpu_to_apicid[cpu] = BAD_APICID; x86_cpu_to_apicid[cpu] = BAD_APICID;
x86_cpu_to_log_apicid[cpu] = BAD_APICID;
return -EIO; return -EIO;
} }
......
...@@ -33,7 +33,7 @@ static void save_stack_address(void *data, unsigned long addr) ...@@ -33,7 +33,7 @@ static void save_stack_address(void *data, unsigned long addr)
trace->entries[trace->nr_entries++] = addr; trace->entries[trace->nr_entries++] = addr;
} }
static struct stacktrace_ops save_stack_ops = { static const struct stacktrace_ops save_stack_ops = {
.warning = save_stack_warning, .warning = save_stack_warning,
.warning_symbol = save_stack_warning_symbol, .warning_symbol = save_stack_warning_symbol,
.stack = save_stack_stack, .stack = save_stack_stack,
......
...@@ -40,9 +40,9 @@ static inline void flush_tce(void* tceaddr) ...@@ -40,9 +40,9 @@ static inline void flush_tce(void* tceaddr)
{ {
/* a single tce can't cross a cache line */ /* a single tce can't cross a cache line */
if (cpu_has_clflush) if (cpu_has_clflush)
asm volatile("clflush (%0)" :: "r" (tceaddr)); clflush(tceaddr);
else else
asm volatile("wbinvd":::"memory"); wbinvd();
} }
void tce_build(struct iommu_table *tbl, unsigned long index, void tce_build(struct iommu_table *tbl, unsigned long index,
......
...@@ -44,15 +44,15 @@ int arch_register_cpu(int num) ...@@ -44,15 +44,15 @@ int arch_register_cpu(int num)
* Also certain PCI quirks require not to enable hotplug control * Also certain PCI quirks require not to enable hotplug control
* for all CPU's. * for all CPU's.
*/ */
if (num && enable_cpu_hotplug) #ifdef CONFIG_HOTPLUG_CPU
if (num)
cpu_devices[num].cpu.hotpluggable = 1; cpu_devices[num].cpu.hotpluggable = 1;
#endif
return register_cpu(&cpu_devices[num].cpu, num); return register_cpu(&cpu_devices[num].cpu, num);
} }
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
int enable_cpu_hotplug = 1;
void arch_unregister_cpu(int num) { void arch_unregister_cpu(int num) {
return unregister_cpu(&cpu_devices[num].cpu); return unregister_cpu(&cpu_devices[num].cpu);
} }
......
...@@ -36,11 +36,11 @@ ...@@ -36,11 +36,11 @@
#include <asm/segment.h> #include <asm/segment.h>
#include <asm/page.h> #include <asm/page.h>
.data
/* We can free up trampoline after bootup if cpu hotplug is not supported. */ /* We can free up trampoline after bootup if cpu hotplug is not supported. */
#ifndef CONFIG_HOTPLUG_CPU #ifndef CONFIG_HOTPLUG_CPU
.section ".init.data","aw",@progbits .section ".init.data","aw",@progbits
#else
.section .rodata,"a",@progbits
#endif #endif
.code16 .code16
......
...@@ -33,7 +33,12 @@ ...@@ -33,7 +33,12 @@
#include <asm/msr.h> #include <asm/msr.h>
#include <asm/segment.h> #include <asm/segment.h>
.data /* We can free up trampoline after bootup if cpu hotplug is not supported. */
#ifndef CONFIG_HOTPLUG_CPU
.section .init.data, "aw", @progbits
#else
.section .rodata, "a", @progbits
#endif
.code16 .code16
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment