Commit 7946844a authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'stable/for-linus-3.9-rc2-tag' of...

Merge tag 'stable/for-linus-3.9-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

Pull Xen fixes from Konrad Rzeszutek Wilk:
 - Compile warnings and errors (one on x86, two on ARM)
 - WARNING in xen-pciback
 - Use the acpi_processor_get_performance_info instead of the 'register'
   version

* tag 'stable/for-linus-3.9-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/acpi: remove redundant acpi/acpi_drivers.h include
  xen: arm: mandate EABI and use generic atomic operations.
  acpi: Export the acpi_processor_get_performance_info
  xen/pciback: Don't disable a PCI device that is already disabled.
parents 4febd95a d2e0bca3
......@@ -1889,8 +1889,9 @@ config XEN_DOM0
config XEN
bool "Xen guest support on ARM (EXPERIMENTAL)"
depends on ARM && OF
depends on ARM && AEABI && OF
depends on CPU_V7 && !CPU_V6
depends on !GENERIC_ATOMIC64
help
Say Y if you want to run Linux in a Virtual Machine on Xen on ARM.
......
......@@ -2,6 +2,7 @@
#define _ASM_ARM_XEN_EVENTS_H
#include <asm/ptrace.h>
#include <asm/atomic.h>
enum ipi_vector {
XEN_PLACEHOLDER_VECTOR,
......@@ -15,26 +16,8 @@ static inline int xen_irqs_disabled(struct pt_regs *regs)
return raw_irqs_disabled_flags(regs->ARM_cpsr);
}
/*
* We cannot use xchg because it does not support 8-byte
* values. However it is safe to use {ldr,dtd}exd directly because all
* platforms which Xen can run on support those instructions.
*/
static inline xen_ulong_t xchg_xen_ulong(xen_ulong_t *ptr, xen_ulong_t val)
{
xen_ulong_t oldval;
unsigned int tmp;
wmb();
asm volatile("@ xchg_xen_ulong\n"
"1: ldrexd %0, %H0, [%3]\n"
" strexd %1, %2, %H2, [%3]\n"
" teq %1, #0\n"
" bne 1b"
: "=&r" (oldval), "=&r" (tmp)
: "r" (val), "r" (ptr)
: "memory", "cc");
return oldval;
}
#define xchg_xen_ulong(ptr, val) atomic64_xchg(container_of((ptr), \
atomic64_t, \
counter), (val))
#endif /* _ASM_ARM_XEN_EVENTS_H */
......@@ -465,7 +465,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
return result;
}
static int acpi_processor_get_performance_info(struct acpi_processor *pr)
int acpi_processor_get_performance_info(struct acpi_processor *pr)
{
int result = 0;
acpi_status status = AE_OK;
......@@ -509,7 +509,7 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr)
#endif
return result;
}
EXPORT_SYMBOL_GPL(acpi_processor_get_performance_info);
int acpi_processor_notify_smm(struct module *calling_module)
{
acpi_status status;
......
......@@ -500,16 +500,16 @@ static int __init xen_acpi_processor_init(void)
(void)acpi_processor_preregister_performance(acpi_perf_data);
for_each_possible_cpu(i) {
struct acpi_processor *pr;
struct acpi_processor_performance *perf;
pr = per_cpu(processors, i);
perf = per_cpu_ptr(acpi_perf_data, i);
rc = acpi_processor_register_performance(perf, i);
pr->performance = perf;
rc = acpi_processor_get_performance_info(pr);
if (rc)
goto err_out;
}
rc = acpi_processor_notify_smm(THIS_MODULE);
if (rc)
goto err_unregister;
for_each_possible_cpu(i) {
struct acpi_processor *_pr;
......
......@@ -113,6 +113,7 @@ void xen_pcibk_reset_device(struct pci_dev *dev)
if (dev->msi_enabled)
pci_disable_msi(dev);
#endif
if (pci_is_enabled(dev))
pci_disable_device(dev);
pci_write_config_word(dev, PCI_COMMAND, 0);
......
......@@ -25,7 +25,6 @@
#include <linux/export.h>
#include <linux/types.h>
#include <linux/acpi.h>
#include <acpi/acpi_drivers.h>
#include <xen/acpi.h>
#ifdef CONFIG_ACPI
......
......@@ -235,6 +235,9 @@ extern void acpi_processor_unregister_performance(struct
if a _PPC object exists, rmmod is disallowed then */
int acpi_processor_notify_smm(struct module *calling_module);
/* parsing the _P* objects. */
extern int acpi_processor_get_performance_info(struct acpi_processor *pr);
/* for communication between multiple parts of the processor kernel module */
DECLARE_PER_CPU(struct acpi_processor *, processors);
extern struct acpi_processor_errata errata;
......
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