Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2010-02-08 10:43:41 +0100
committerJan Beulich <jbeulich@novell.com>2010-02-08 10:43:41 +0100
commit2fd95bfda3a7b58c5ae3f12904856ee1bdd334e1 (patch)
tree0d6861d230b3ddef9e22081f4462bac459748984
parentfdd46833a08aa198bfc40ef4307cd97baccc232a (diff)
- Update Xen patches (bnc#575199).
-rw-r--r--arch/x86/kernel/setup-xen.c2
-rw-r--r--arch/x86/kernel/time-xen.c3
-rw-r--r--arch/x86/mm/pat-xen.c18
3 files changed, 13 insertions, 10 deletions
diff --git a/arch/x86/kernel/setup-xen.c b/arch/x86/kernel/setup-xen.c
index 654efaa373de..cf73f409dbad 100644
--- a/arch/x86/kernel/setup-xen.c
+++ b/arch/x86/kernel/setup-xen.c
@@ -1147,7 +1147,7 @@ void __init setup_arch(char **cmdline_p)
phys_to_machine_mapping = alloc_bootmem_pages(
max_pfn * sizeof(unsigned long));
memcpy(phys_to_machine_mapping,
- __va(__pa(xen_start_info->mfn_list)),
+ (unsigned long *)xen_start_info->mfn_list,
p2m_pages * sizeof(unsigned long));
memset(phys_to_machine_mapping + p2m_pages, ~0,
(max_pfn - p2m_pages) * sizeof(unsigned long));
diff --git a/arch/x86/kernel/time-xen.c b/arch/x86/kernel/time-xen.c
index 3e9b37b141c5..2f4bfae0cb7c 100644
--- a/arch/x86/kernel/time-xen.c
+++ b/arch/x86/kernel/time-xen.c
@@ -12,7 +12,6 @@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/time.h>
-#include <linux/mca.h>
#include <linux/sysctl.h>
#include <linux/percpu.h>
#include <linux/kernel_stat.h>
@@ -411,7 +410,7 @@ EXPORT_SYMBOL(profile_pc);
/*
* Default timer interrupt handler
*/
-irqreturn_t timer_interrupt(int irq, void *dev_id)
+static irqreturn_t timer_interrupt(int irq, void *dev_id)
{
s64 delta, delta_cpu, stolen, blocked;
unsigned int i, cpu = smp_processor_id();
diff --git a/arch/x86/mm/pat-xen.c b/arch/x86/mm/pat-xen.c
index fe7e25207096..9b5ae2250591 100644
--- a/arch/x86/mm/pat-xen.c
+++ b/arch/x86/mm/pat-xen.c
@@ -325,7 +325,7 @@ static int reserve_ram_pages_type(u64 start, u64 end, unsigned long req_type,
unsigned long *new_type)
{
struct page *page;
- u64 pfn;
+ unsigned long mfn;
if (req_type == _PAGE_CACHE_UC) {
/* We do not support strong UC */
@@ -333,9 +333,10 @@ static int reserve_ram_pages_type(u64 start, u64 end, unsigned long req_type,
req_type = _PAGE_CACHE_UC_MINUS;
}
- for (pfn = (start >> PAGE_SHIFT); pfn < (end >> PAGE_SHIFT); ++pfn) {
- unsigned long type;
+ for (mfn = (start >> PAGE_SHIFT); mfn < (end >> PAGE_SHIFT); ++mfn) {
+ unsigned long type, pfn = mfn_to_local_pfn(mfn);
+ BUG_ON(!pfn_valid(pfn));
page = pfn_to_page(pfn);
type = get_page_memtype(page);
if (type != -1) {
@@ -352,8 +353,8 @@ static int reserve_ram_pages_type(u64 start, u64 end, unsigned long req_type,
if (new_type)
*new_type = req_type;
- for (pfn = (start >> PAGE_SHIFT); pfn < (end >> PAGE_SHIFT); ++pfn) {
- page = pfn_to_page(pfn);
+ for (mfn = (start >> PAGE_SHIFT); mfn < (end >> PAGE_SHIFT); ++mfn) {
+ page = pfn_to_page(mfn_to_local_pfn(mfn));
set_page_memtype(page, req_type);
}
return 0;
@@ -362,9 +363,12 @@ static int reserve_ram_pages_type(u64 start, u64 end, unsigned long req_type,
static int free_ram_pages_type(u64 start, u64 end)
{
struct page *page;
- u64 pfn;
+ unsigned long mfn;
+
+ for (mfn = (start >> PAGE_SHIFT); mfn < (end >> PAGE_SHIFT); ++mfn) {
+ unsigned long pfn = mfn_to_local_pfn(mfn);
- for (pfn = (start >> PAGE_SHIFT); pfn < (end >> PAGE_SHIFT); ++pfn) {
+ BUG_ON(!pfn_valid(pfn));
page = pfn_to_page(pfn);
set_page_memtype(page, -1);
}