Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1faa6ec8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'x86-fixes-for-linus' of...

Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, mcheck: Avoid duplicate sysfs links/files for thresholding banks
  io-mapping: Fix the address space annotations
  x86: Fix the address space annotations of iomap_atomic_prot_pfn()
  x86, mm: Fix CONFIG_VMSPLIT_1G and 2G_OPT trampoline
  x86, hwmon: Fix unsafe smp_processor_id() in thermal_throttle_add_dev
parents 79637a41 1389298f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -26,11 +26,11 @@
#include <asm/pgtable.h>
#include <asm/tlbflush.h>

void *
void __iomem *
iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot);

void
iounmap_atomic(void *kvaddr, enum km_type type);
iounmap_atomic(void __iomem *kvaddr, enum km_type type);

int
iomap_create_wc(resource_size_t base, unsigned long size, pgprot_t *prot);
+2 −2
Original line number Diff line number Diff line
@@ -530,7 +530,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
		err = -ENOMEM;
		goto out;
	}
	if (!alloc_cpumask_var(&b->cpus, GFP_KERNEL)) {
	if (!zalloc_cpumask_var(&b->cpus, GFP_KERNEL)) {
		kfree(b);
		err = -ENOMEM;
		goto out;
@@ -543,7 +543,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
#ifndef CONFIG_SMP
	cpumask_setall(b->cpus);
#else
	cpumask_copy(b->cpus, c->llc_shared_map);
	cpumask_set_cpu(cpu, b->cpus);
#endif

	per_cpu(threshold_banks, cpu)[bank] = b;
+5 −4
Original line number Diff line number Diff line
@@ -202,10 +202,11 @@ static int therm_throt_process(bool new_event, int event, int level)

#ifdef CONFIG_SYSFS
/* Add/Remove thermal_throttle interface for CPU device: */
static __cpuinit int thermal_throttle_add_dev(struct sys_device *sys_dev)
static __cpuinit int thermal_throttle_add_dev(struct sys_device *sys_dev,
				unsigned int cpu)
{
	int err;
	struct cpuinfo_x86 *c = &cpu_data(smp_processor_id());
	struct cpuinfo_x86 *c = &cpu_data(cpu);

	err = sysfs_create_group(&sys_dev->kobj, &thermal_attr_group);
	if (err)
@@ -251,7 +252,7 @@ thermal_throttle_cpu_callback(struct notifier_block *nfb,
	case CPU_UP_PREPARE:
	case CPU_UP_PREPARE_FROZEN:
		mutex_lock(&therm_cpu_lock);
		err = thermal_throttle_add_dev(sys_dev);
		err = thermal_throttle_add_dev(sys_dev, cpu);
		mutex_unlock(&therm_cpu_lock);
		WARN_ON(err);
		break;
@@ -287,7 +288,7 @@ static __init int thermal_throttle_init_device(void)
#endif
	/* connect live CPUs to sysfs */
	for_each_online_cpu(cpu) {
		err = thermal_throttle_add_dev(get_cpu_sysdev(cpu));
		err = thermal_throttle_add_dev(get_cpu_sysdev(cpu), cpu);
		WARN_ON(err);
	}
#ifdef CONFIG_HOTPLUG_CPU
+1 −2
Original line number Diff line number Diff line
@@ -45,8 +45,7 @@ void __init setup_trampoline_page_table(void)
	/* Copy kernel address range */
	clone_pgd_range(trampoline_pg_dir + KERNEL_PGD_BOUNDARY,
			swapper_pg_dir + KERNEL_PGD_BOUNDARY,
			min_t(unsigned long, KERNEL_PGD_PTRS,
			      KERNEL_PGD_BOUNDARY));
			KERNEL_PGD_PTRS);

	/* Initialize low mappings */
	clone_pgd_range(trampoline_pg_dir,
+3 −3
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
/*
 * Map 'pfn' using fixed map 'type' and protections 'prot'
 */
void *
void __iomem *
iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
{
	/*
@@ -86,12 +86,12 @@ iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
	if (!pat_enabled && pgprot_val(prot) == pgprot_val(PAGE_KERNEL_WC))
		prot = PAGE_KERNEL_UC_MINUS;

	return kmap_atomic_prot_pfn(pfn, type, prot);
	return (void __force __iomem *) kmap_atomic_prot_pfn(pfn, type, prot);
}
EXPORT_SYMBOL_GPL(iomap_atomic_prot_pfn);

void
iounmap_atomic(void *kvaddr, enum km_type type)
iounmap_atomic(void __iomem *kvaddr, enum km_type type)
{
	unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK;
	enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id();
Loading