From: jbeulich@novell.com
Patch-mainline: obsolete
----
- drivers/acpi/hardware/hwsleep.c | 2 ++
- drivers/ide/ide-lib.c | 11 +++++++++++
- drivers/oprofile/buffer_sync.c | 35 ++++++++++++++++++++++++-----------
- drivers/oprofile/cpu_buffer.c | 6 ++++++
- drivers/oprofile/oprof.c | 2 ++
- drivers/oprofile/oprofile_files.c | 6 ++++++
- include/linux/mm.h | 2 ++
- include/linux/oprofile.h | 6 ++++--
- mm/memory.c | 2 ++
- 9 files changed, 59 insertions(+), 13 deletions(-)
-
---- a/drivers/acpi/hardware/hwsleep.c
-+++ b/drivers/acpi/hardware/hwsleep.c
+--- sle11-2009-02-16.orig/drivers/acpi/hardware/hwsleep.c 2009-02-17 11:19:46.000000000 +0100
++++ sle11-2009-02-16/drivers/acpi/hardware/hwsleep.c 2009-02-16 16:01:39.000000000 +0100
@@ -430,6 +430,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_stat
* THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
*
/*******************************************************************************
*
---- a/drivers/ide/ide-lib.c
-+++ b/drivers/ide/ide-lib.c
+--- sle11-2009-02-16.orig/drivers/base/cpu.c 2008-10-10 00:13:53.000000000 +0200
++++ sle11-2009-02-16/drivers/base/cpu.c 2009-02-17 11:26:03.000000000 +0100
+@@ -78,7 +78,7 @@ static inline void register_cpu_control(
+ }
+ #endif /* CONFIG_HOTPLUG_CPU */
+
+-#ifdef CONFIG_KEXEC
++#if defined(CONFIG_KEXEC) && !defined(CONFIG_XEN)
+ #include <linux/kexec.h>
+
+ static ssize_t show_crash_notes(struct sys_device *dev, struct sysdev_attribute *attr,
+@@ -173,7 +173,7 @@ int __cpuinit register_cpu(struct cpu *c
+ if (!error)
+ register_cpu_under_node(num, cpu_to_node(num));
+
+-#ifdef CONFIG_KEXEC
++#if defined(CONFIG_KEXEC) && !defined(CONFIG_XEN)
+ if (!error)
+ error = sysdev_create_file(&cpu->sysdev, &attr_crash_notes);
+ #endif
+--- sle11-2009-02-16.orig/drivers/ide/ide-lib.c 2009-02-17 11:19:46.000000000 +0100
++++ sle11-2009-02-16/drivers/ide/ide-lib.c 2009-02-16 16:01:39.000000000 +0100
@@ -177,6 +177,16 @@ void ide_toggle_bounce(ide_drive_t *driv
{
u64 addr = BLK_BOUNCE_HIGH; /* dma64_addr_t */
if (drive->queue)
blk_queue_bounce_limit(drive->queue, addr);
---- a/drivers/oprofile/buffer_sync.c
-+++ b/drivers/oprofile/buffer_sync.c
+--- sle11-2009-02-16.orig/drivers/oprofile/buffer_sync.c 2009-02-17 11:19:46.000000000 +0100
++++ sle11-2009-02-16/drivers/oprofile/buffer_sync.c 2009-02-16 16:01:39.000000000 +0100
@@ -44,7 +44,9 @@ static cpumask_t marked_cpus = CPU_MASK_
static DEFINE_SPINLOCK(task_mortuary);
static void process_task_mortuary(void);
add_trace_begin();
+#ifdef CONFIG_XEN
} else if (s->event == CPU_DOMAIN_SWITCH) {
-- domain_switch = 1;
+- domain_switch = 1;
+ domain_switch = 1;
+#endif
} else {
mark_done(cpu);
---- a/drivers/oprofile/cpu_buffer.c
-+++ b/drivers/oprofile/cpu_buffer.c
+--- sle11-2009-02-16.orig/drivers/oprofile/cpu_buffer.c 2009-02-17 11:19:46.000000000 +0100
++++ sle11-2009-02-16/drivers/oprofile/cpu_buffer.c 2009-02-16 16:01:39.000000000 +0100
@@ -38,7 +38,11 @@ static void wq_sync_buffer(struct work_s
#define DEFAULT_TIMER_EXPIRE (HZ / 10)
static int work_enabled;
/*
* This serves to avoid cpu buffer overflow, and makes sure
---- a/drivers/oprofile/oprof.c
-+++ b/drivers/oprofile/oprof.c
+--- sle11-2009-02-16.orig/drivers/oprofile/oprof.c 2009-02-17 11:19:46.000000000 +0100
++++ sle11-2009-02-16/drivers/oprofile/oprof.c 2009-02-16 16:01:39.000000000 +0100
@@ -37,6 +37,7 @@ static DEFINE_MUTEX(start_mutex);
*/
static int timer = 0;
int oprofile_setup(void)
{
---- a/drivers/oprofile/oprofile_files.c
-+++ b/drivers/oprofile/oprofile_files.c
+--- sle11-2009-02-16.orig/drivers/oprofile/oprofile_files.c 2009-02-17 11:19:46.000000000 +0100
++++ sle11-2009-02-16/drivers/oprofile/oprofile_files.c 2009-02-16 16:01:39.000000000 +0100
@@ -124,6 +124,8 @@ static const struct file_operations dump
.write = dump_write,
};
oprofilefs_create_file(sb, root, "buffer", &event_buffer_fops);
oprofilefs_create_ulong(sb, root, "buffer_size", &fs_buffer_size);
oprofilefs_create_ulong(sb, root, "buffer_watershed", &fs_buffer_watershed);
---- a/include/linux/mm.h
-+++ b/include/linux/mm.h
+--- sle11-2009-02-16.orig/include/linux/mm.h 2009-02-17 11:19:46.000000000 +0100
++++ sle11-2009-02-16/include/linux/mm.h 2009-02-16 16:01:39.000000000 +0100
@@ -187,10 +187,12 @@ struct vm_operations_struct {
int (*access)(struct vm_area_struct *vma, unsigned long addr,
void *buf, int len, int write);
+#ifdef CONFIG_XEN
/* Area-specific function for clearing the PTE at @ptep. Returns the
* original value of @ptep. */
- pte_t (*zap_pte)(struct vm_area_struct *vma,
+ pte_t (*zap_pte)(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep, int is_fullmm);
+#endif
#ifdef CONFIG_NUMA
/*
* set_policy() op must add a reference to any non-NULL @new mempolicy
---- a/include/linux/oprofile.h
-+++ b/include/linux/oprofile.h
+--- sle11-2009-02-16.orig/include/linux/oprofile.h 2009-02-17 11:19:46.000000000 +0100
++++ sle11-2009-02-16/include/linux/oprofile.h 2009-02-16 16:01:39.000000000 +0100
@@ -16,8 +16,9 @@
#include <linux/types.h>
#include <linux/spinlock.h>
int (*set_active)(int *active_domains, unsigned int adomains);
/* setup passive domains with Xen */
int (*set_passive)(int *passive_domains, unsigned int pdomains);
--
+-
+#endif
/* Do any necessary interrupt setup. Optional. */
int (*setup)(void);
/* Do any necessary interrupt shutdown. Optional. */
---- a/mm/memory.c
-+++ b/mm/memory.c
+--- sle11-2009-02-16.orig/kernel/kexec.c 2008-11-25 13:31:12.000000000 +0100
++++ sle11-2009-02-16/kernel/kexec.c 2009-02-17 11:27:16.000000000 +0100
+@@ -44,8 +44,10 @@
+ #include <linux/kdb.h>
+ #endif
+
++#ifndef CONFIG_XEN
+ /* Per cpu memory for storing cpu states in case of system crash. */
+ note_buf_t* crash_notes;
++#endif
+ int dump_after_notifier;
+
+ /* vmcoreinfo stuff */
+@@ -1167,6 +1169,7 @@ static void final_note(u32 *buf)
+ memcpy(buf, ¬e, sizeof(note));
+ }
+
++#ifndef CONFIG_XEN
+ void crash_save_cpu(struct pt_regs *regs, int cpu)
+ {
+ struct elf_prstatus prstatus;
+@@ -1192,6 +1195,7 @@ void crash_save_cpu(struct pt_regs *regs
+ &prstatus, sizeof(prstatus));
+ final_note(buf);
+ }
++#endif
+
+ #ifdef CONFIG_SYSCTL
+ static ctl_table dump_after_notifier_table[] = {
+@@ -1219,6 +1223,7 @@ static ctl_table kexec_sys_table[] = {
+
+ static int __init crash_notes_memory_init(void)
+ {
++#ifndef CONFIG_XEN
+ /* Allocate memory for saving cpu registers. */
+ crash_notes = alloc_percpu(note_buf_t);
+ if (!crash_notes) {
+@@ -1226,6 +1231,7 @@ static int __init crash_notes_memory_ini
+ " states failed\n");
+ return -ENOMEM;
+ }
++#endif
+ #ifdef CONFIG_SYSCTL
+ register_sysctl_table(kexec_sys_table);
+ #endif
+--- sle11-2009-02-16.orig/mm/memory.c 2009-02-17 11:19:46.000000000 +0100
++++ sle11-2009-02-16/mm/memory.c 2009-02-16 16:01:39.000000000 +0100
@@ -758,10 +758,12 @@ static unsigned long zap_pte_range(struc
page->index > details->last_index))
continue;