# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID d3a4485a41fc04b52ae03cddb92139bb434b69af
# Parent 991ccc24bf2e437fff0e45c490692f9ca239509e
Cleanups.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
diff -r 991ccc24bf2e -r d3a4485a41fc
linux-2.6-xen-sparse/arch/xen/i386/kernel/io_apic.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/io_apic.c Tue Jan 10
15:05:05 2006
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/io_apic.c Tue Jan 10
16:27:16 2006
@@ -622,9 +622,11 @@
try_to_freeze(PF_FREEZE);
if (time_after(jiffies,
prev_balance_time+balanced_irq_interval)) {
+ preempt_disable();
do_irq_balance();
prev_balance_time = jiffies;
time_remaining = balanced_irq_interval;
+ preempt_enable();
}
}
return 0;
diff -r 991ccc24bf2e -r d3a4485a41fc
linux-2.6-xen-sparse/arch/xen/i386/kernel/traps.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/traps.c Tue Jan 10 15:05:05 2006
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/traps.c Tue Jan 10 16:27:16 2006
@@ -647,12 +647,6 @@
do_trap(3, SIGTRAP, "int3", 1, regs, error_code, NULL);
}
#endif
-
-static inline void conditional_sti(struct pt_regs *regs)
-{
- if (regs->eflags & (X86_EFLAGS_IF|VM_MASK))
- local_irq_enable();
-}
/*
* Our handling of the processor debug registers is non-trivial.
@@ -686,9 +680,9 @@
if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code,
SIGTRAP) == NOTIFY_STOP)
return;
-
/* It's safe to allow irq's after DR6 has been saved */
- conditional_sti(regs);
+ if (regs->eflags & X86_EFLAGS_IF)
+ local_irq_enable();
/* Mask out spurious debug traps due to lazy DR7 setting */
if (condition & (DR_TRAP0|DR_TRAP1|DR_TRAP2|DR_TRAP3)) {
diff -r 991ccc24bf2e -r d3a4485a41fc
linux-2.6-xen-sparse/arch/xen/i386/mm/init.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c Tue Jan 10 15:05:05 2006
+++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c Tue Jan 10 16:27:16 2006
@@ -65,7 +65,7 @@
{
pud_t *pud;
pmd_t *pmd_table;
-
+
#ifdef CONFIG_X86_PAE
pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE);
make_lowmem_page_readonly(pmd_table);
diff -r 991ccc24bf2e -r d3a4485a41fc
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c Tue Jan 10
15:05:05 2006
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c Tue Jan 10
16:27:16 2006
@@ -526,7 +526,7 @@
unsigned long __init e820_end_of_ram(void)
{
- unsigned long max_end_pfn;
+ unsigned long max_end_pfn;
if (xen_override_max_pfn == 0) {
max_end_pfn = xen_start_info->nr_pages;
@@ -612,7 +612,7 @@
{
end_user_pfn = memparse(p, from);
end_user_pfn >>= PAGE_SHIFT;
- xen_override_max_pfn = (unsigned long) end_user_pfn;
+ xen_override_max_pfn = (unsigned long) end_user_pfn;
}
/*
diff -r 991ccc24bf2e -r d3a4485a41fc
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/entry.S
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/entry.S Tue Jan 10
15:05:05 2006
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/entry.S Tue Jan 10
16:27:16 2006
@@ -57,7 +57,7 @@
#ifndef CONFIG_PREEMPT
#define retint_kernel retint_restore_args
#endif
-
+
/*
* C code is not supposed to know about undefined top of stack. Every time
* a C function with an pt_regs argument is called from the SYSCALL based
@@ -65,7 +65,7 @@
* RESTORE_TOP_OF_STACK syncs the syscall state after any possible ptregs
* manipulation.
*/
-
+
/* %rsp:at FRAMEEND */
.macro FIXUP_TOP_OF_STACK tmp
movq $__USER_CS,CS(%rsp)
@@ -417,7 +417,6 @@
RESTORE_REST
jmp int_ret_from_sys_call
CFI_ENDPROC
-
/*
* Interrupt entry/exit.
diff -r 991ccc24bf2e -r d3a4485a41fc
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head64.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head64.c Tue Jan 10
15:05:05 2006
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head64.c Tue Jan 10
16:27:16 2006
@@ -68,13 +68,13 @@
static void __init setup_boot_cpu_data(void)
{
- int dummy, eax;
+ unsigned int dummy, eax;
/* get vendor info */
- cpuid(0, &boot_cpu_data.cpuid_level,
- (int *)&boot_cpu_data.x86_vendor_id[0],
- (int *)&boot_cpu_data.x86_vendor_id[8],
- (int *)&boot_cpu_data.x86_vendor_id[4]);
+ cpuid(0, (unsigned int *)&boot_cpu_data.cpuid_level,
+ (unsigned int *)&boot_cpu_data.x86_vendor_id[0],
+ (unsigned int *)&boot_cpu_data.x86_vendor_id[8],
+ (unsigned int *)&boot_cpu_data.x86_vendor_id[4]);
/* get cpu type */
cpuid(1, &eax, &dummy, &dummy,
@@ -109,7 +109,6 @@
if (s != NULL)
setup_early_printk(s);
#endif
-
#ifdef CONFIG_DISCONTIGMEM
s = strstr(saved_command_line, "numa=");
if (s != NULL)
diff -r 991ccc24bf2e -r d3a4485a41fc
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/io_apic.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/io_apic.c Tue Jan 10
15:05:05 2006
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/io_apic.c Tue Jan 10
16:27:16 2006
@@ -255,10 +255,8 @@
return 1;
}
-
__setup("noapic", disable_ioapic_setup);
__setup("apic", enable_ioapic_setup);
-
#include <asm/pci-direct.h>
#include <linux/pci_ids.h>
@@ -1146,6 +1144,7 @@
v = inb(0x4d1) << 8 | inb(0x4d0);
printk(KERN_DEBUG "... PIC ELCR: %04x\n", v);
}
+
#endif /* 0 */
#else
@@ -1191,6 +1190,7 @@
* Clear the IO-APIC before rebooting:
*/
clear_IO_APIC();
+
#ifndef CONFIG_XEN
disconnect_bsp_APIC();
#endif
@@ -1202,6 +1202,7 @@
*
* by Matt Domsch <Matt_Domsch@xxxxxxxx> Tue Dec 21 12:25:05 CST 1999
*/
+
#ifndef CONFIG_XEN
static void __init setup_ioapic_ids_from_mpc (void)
{
diff -r 991ccc24bf2e -r d3a4485a41fc
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/irq.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/irq.c Tue Jan 10 15:05:05 2006
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/irq.c Tue Jan 10 16:27:16 2006
@@ -9,18 +9,15 @@
* x86_64-specific irq controller code. (e.g. i8259.c and
* io_apic.c.)
*/
+
+#include <linux/kernel_stat.h>
+#include <linux/interrupt.h>
+#include <linux/seq_file.h>
+#include <linux/module.h>
#include <asm/uaccess.h>
-#include <linux/module.h>
-#include <linux/seq_file.h>
-#include <linux/interrupt.h>
-#include <linux/kernel_stat.h>
-
-/*
- * Interrupt statistics:
- */
+#include <asm/io_apic.h>
atomic_t irq_err_count;
-
#ifdef CONFIG_X86_IO_APIC
#ifdef APIC_MISMATCH_DEBUG
atomic_t irq_mis_count;
diff -r 991ccc24bf2e -r d3a4485a41fc
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/ldt.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/ldt.c Tue Jan 10 15:05:05 2006
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/ldt.c Tue Jan 10 16:27:16 2006
@@ -62,6 +62,7 @@
if (reload) {
#ifdef CONFIG_SMP
cpumask_t mask;
+
preempt_disable();
#endif
make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
@@ -201,6 +202,7 @@
struct user_desc ldt_info;
error = -EINVAL;
+
if (bytecount != sizeof(ldt_info))
goto out;
error = -EFAULT;
diff -r 991ccc24bf2e -r d3a4485a41fc
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c Tue Jan 10
15:05:05 2006
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c Tue Jan 10
16:27:16 2006
@@ -304,7 +304,6 @@
}
#endif
-
static __init void parse_cmdline_early (char ** cmdline_p)
{
char c = ' ', *to = command_line, *from = COMMAND_LINE;
@@ -379,6 +378,7 @@
acpi_skip_timer_override = 1;
#endif
#endif
+
#ifndef CONFIG_XEN
if (!memcmp(from, "nolapic", 7) ||
!memcmp(from, "disableapic", 11))
@@ -391,7 +391,8 @@
skip_ioapic_setup = 0;
ioapic_force = 1;
}
-#endif
+#endif
+
if (!memcmp(from, "mem=", 4))
parse_memopt(from+4, &from);
@@ -588,7 +589,7 @@
HYPERVISOR_vm_assist(VMASST_CMD_enable,
VMASST_TYPE_writable_pagetables);
- ARCH_SETUP
+ ARCH_SETUP
#else
ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
drive_info = DRIVE_INFO;
@@ -612,7 +613,7 @@
init_mm.end_code = (unsigned long) &_etext;
init_mm.end_data = (unsigned long) &_edata;
#ifdef CONFIG_XEN
- init_mm.brk = start_pfn << PAGE_SHIFT;
+ init_mm.brk = start_pfn << PAGE_SHIFT;
#else
init_mm.brk = (unsigned long) &_end;
@@ -667,7 +668,6 @@
/* reserve ebda region */
reserve_ebda_region();
#endif
-
#ifdef CONFIG_SMP
/*
@@ -790,8 +790,6 @@
}
-
-
if ( ! (xen_start_info->flags & SIF_INITDOMAIN))
{
acpi_disabled = 1;
@@ -835,7 +833,7 @@
* and also for regions reported as reserved by the e820.
*/
probe_roms();
- e820_reserve_resources();
+ e820_reserve_resources();
#endif
request_resource(&iomem_resource, &video_ram_resource);
diff -r 991ccc24bf2e -r d3a4485a41fc
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c Tue Jan 10
15:05:05 2006
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c Tue Jan 10
16:27:16 2006
@@ -33,6 +33,7 @@
#ifdef CONFIG_XEN
#include <asm/hypervisor.h>
#endif
+
char x86_boot_params[BOOT_PARAM_SIZE] __initdata = {0,};
cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE;
@@ -165,7 +166,6 @@
}
#endif
-
void pda_init(int cpu)
{
struct x8664_pda *pda = &cpu_pda[cpu];
@@ -175,9 +175,10 @@
#ifndef CONFIG_XEN
wrmsrl(MSR_GS_BASE, cpu_pda + cpu);
#else
- HYPERVISOR_set_segment_base(SEGBASE_GS_KERNEL,
- (unsigned long)(cpu_pda + cpu));
-#endif
+ HYPERVISOR_set_segment_base(SEGBASE_GS_KERNEL,
+ (unsigned long)(cpu_pda + cpu));
+#endif
+
pda->me = pda;
pda->cpunumber = cpu;
pda->irqcount = -1;
@@ -201,6 +202,7 @@
}
switch_pt();
+
pda->irqstackptr += IRQSTACKSIZE-64;
}
diff -r 991ccc24bf2e -r d3a4485a41fc
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smp.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smp.c Tue Jan 10 15:05:05 2006
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smp.c Tue Jan 10 16:27:16 2006
@@ -30,8 +30,9 @@
#include <asm/apicdef.h>
#ifdef CONFIG_XEN
#include <asm-xen/evtchn.h>
-
-#else
+#endif
+
+#ifndef CONFIG_XEN
/*
* Smarter SMP flushing macros.
* c/o Linus Torvalds.
diff -r 991ccc24bf2e -r d3a4485a41fc
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/traps.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/traps.c Tue Jan 10
15:05:05 2006
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/traps.c Tue Jan 10
16:27:16 2006
@@ -890,7 +890,6 @@
asmlinkage void math_state_restore(void)
{
struct task_struct *me = current;
-
/* clts(); */ /* 'clts' is done for us by Xen during virtual trap. */
if (!used_math())
diff -r 991ccc24bf2e -r d3a4485a41fc
linux-2.6-xen-sparse/arch/xen/x86_64/mm/fault.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/mm/fault.c Tue Jan 10 15:05:05 2006
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/mm/fault.c Tue Jan 10 16:27:16 2006
@@ -153,7 +153,6 @@
pgd = (pgd_t *)per_cpu(cur_pgd, smp_processor_id());
preempt_enable();
pgd += pgd_index(address);
-
printk("PGD %lx ", pgd_val(*pgd));
if (bad_address(pgd)) goto bad;
if (!pgd_present(*pgd)) goto ret;
@@ -258,7 +257,6 @@
pgd = (pgd_t *)per_cpu(cur_pgd, smp_processor_id());
preempt_enable();
pgd += pgd_index(address);
-
pgd_ref = pgd_offset_k(address);
if (pgd_none(*pgd_ref))
return -1;
diff -r 991ccc24bf2e -r d3a4485a41fc
linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c Tue Jan 10 15:05:05 2006
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c Tue Jan 10 16:27:16 2006
@@ -40,14 +40,14 @@
#include <asm/proto.h>
#include <asm/smp.h>
+#ifndef Dprintk
+#define Dprintk(x...)
+#endif
+
extern unsigned long *contiguous_bitmap;
#if defined(CONFIG_SWIOTLB)
extern void swiotlb_init(void);
-#endif
-
-#ifndef Dprintk
-#define Dprintk(x...)
#endif
extern char _stext[];
@@ -200,9 +200,9 @@
static inline pud_t *pud_offset_u(unsigned long address)
{
- pud_t *pud = level3_user_pgt;
-
- return pud + pud_index(address);
+ pud_t *pud = level3_user_pgt;
+
+ return pud + pud_index(address);
}
static void set_pte_phys(unsigned long vaddr,
@@ -215,34 +215,27 @@
Dprintk("set_pte_phys %lx to %lx\n", vaddr, phys);
- pgd = (user_mode ? pgd_offset_u(vaddr) : pgd_offset_k(vaddr));
-
+ pgd = (user_mode ? pgd_offset_u(vaddr) : pgd_offset_k(vaddr));
if (pgd_none(*pgd)) {
printk("PGD FIXMAP MISSING, it should be setup in head.S!\n");
return;
}
-
- pud = (user_mode ? pud_offset_u(vaddr) : pud_offset(pgd, vaddr));
-
+ pud = (user_mode ? pud_offset_u(vaddr) : pud_offset(pgd, vaddr));
if (pud_none(*pud)) {
pmd = (pmd_t *) spp_getpage();
-
- make_page_readonly(pmd);
- xen_pmd_pin(__pa(pmd));
+ make_page_readonly(pmd);
+ xen_pmd_pin(__pa(pmd));
set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE | _PAGE_USER));
if (pmd != pmd_offset(pud, 0)) {
printk("PAGETABLE BUG #01! %p <-> %p\n", pmd,
pmd_offset(pud,0));
return;
}
}
-
pmd = pmd_offset(pud, vaddr);
-
if (pmd_none(*pmd)) {
pte = (pte_t *) spp_getpage();
- make_page_readonly(pte);
-
- xen_pte_pin(__pa(pte));
+ make_page_readonly(pte);
+ xen_pte_pin(__pa(pte));
set_pmd(pmd, __pmd(__pa(pte) | _KERNPG_TABLE | _PAGE_USER));
if (pte != pte_offset_kernel(pmd, 0)) {
printk("PAGETABLE BUG #02!\n");
@@ -252,11 +245,10 @@
new_pte = pfn_pte(phys >> PAGE_SHIFT, prot);
pte = pte_offset_kernel(pmd, vaddr);
-
if (!pte_none(*pte) &&
pte_val(*pte) != (pte_val(new_pte) & __supported_pte_mask))
pte_ERROR(*pte);
- set_pte(pte, new_pte);
+ set_pte(pte, new_pte);
/*
* It's enough to flush this one mapping.
@@ -284,11 +276,11 @@
if (pud_none(*pud)) {
pmd = (pmd_t *) spp_getpage();
- make_page_readonly(pmd);
- xen_pmd_pin(__pa(pmd));
+ make_page_readonly(pmd);
+ xen_pmd_pin(__pa(pmd));
set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE | _PAGE_USER));
-
+
if (pmd != pmd_offset(pud, 0)) {
printk("PAGETABLE BUG #01! %p <-> %p\n", pmd,
pmd_offset(pud,0));
return;
@@ -298,8 +290,8 @@
if (pmd_none(*pmd)) {
pte = (pte_t *) spp_getpage();
- make_page_readonly(pte);
- xen_pte_pin(__pa(pte));
+ make_page_readonly(pte);
+ xen_pte_pin(__pa(pte));
set_pmd(pmd, __pmd(__pa(pte) | _KERNPG_TABLE | _PAGE_USER));
if (pte != pte_offset_kernel(pmd, 0)) {
@@ -311,12 +303,12 @@
new_pte = pfn_pte_ma(phys >> PAGE_SHIFT, prot);
pte = pte_offset_kernel(pmd, vaddr);
- /*
- * Note that the pte page is already RO, thus we want to use
- * xen_l1_entry_update(), not set_pte().
- */
- xen_l1_entry_update(pte,
- pfn_pte_ma(phys >> PAGE_SHIFT, prot));
+ /*
+ * Note that the pte page is already RO, thus we want to use
+ * xen_l1_entry_update(), not set_pte().
+ */
+ xen_l1_entry_update(pte,
+ pfn_pte_ma(phys >> PAGE_SHIFT, prot));
/*
* It's enough to flush this one mapping.
@@ -347,7 +339,6 @@
}
}
-
/*
* At this point it only supports vsyscall area.
*/
@@ -360,18 +351,18 @@
return;
}
- set_pte_phys(address, phys, prot, SET_FIXMAP_USER);
+ set_pte_phys(address, phys, prot, SET_FIXMAP_USER);
}
unsigned long __initdata table_start, tables_space;
unsigned long get_machine_pfn(unsigned long addr)
{
- pud_t* pud = pud_offset_k(addr);
- pmd_t* pmd = pmd_offset(pud, addr);
- pte_t *pte = pte_offset_kernel(pmd, addr);
-
- return pte_mfn(*pte);
+ pud_t* pud = pud_offset_k(addr);
+ pmd_t* pmd = pmd_offset(pud, addr);
+ pte_t *pte = pte_offset_kernel(pmd, addr);
+
+ return pte_mfn(*pte);
}
static __init void *alloc_static_page(unsigned long *phys)
@@ -411,12 +402,11 @@
static void __init phys_pud_init(pud_t *pud, unsigned long address, unsigned
long end)
{
- long i, j, k;
- unsigned long paddr;
+ long i, j, k;
+ unsigned long paddr;
i = pud_index(address);
pud = pud + i;
-
for (; i < PTRS_PER_PUD; pud++, i++) {
unsigned long pmd_phys;
pmd_t *pmd;
@@ -429,38 +419,37 @@
}
pmd = alloc_static_page(&pmd_phys);
- early_make_page_readonly(pmd);
- xen_pmd_pin(pmd_phys);
+ early_make_page_readonly(pmd);
+ xen_pmd_pin(pmd_phys);
set_pud(pud, __pud(pmd_phys | _KERNPG_TABLE));
-
for (j = 0; j < PTRS_PER_PMD; pmd++, j++) {
- unsigned long pte_phys;
- pte_t *pte, *pte_save;
+ unsigned long pte_phys;
+ pte_t *pte, *pte_save;
if (paddr >= end) {
for (; j < PTRS_PER_PMD; j++, pmd++)
set_pmd(pmd, __pmd(0));
break;
}
- pte = alloc_static_page(&pte_phys);
- pte_save = pte;
- for (k = 0; k < PTRS_PER_PTE; pte++, k++, paddr +=
PTE_SIZE) {
- if ((paddr >= end) ||
- ((paddr >> PAGE_SHIFT) >=
- xen_start_info->nr_pages)) {
- __set_pte(pte, __pte(0));
- continue;
- }
- if (make_readonly(paddr)) {
- __set_pte(pte,
- __pte(paddr | (_KERNPG_TABLE &
~_PAGE_RW)));
- continue;
- }
- __set_pte(pte, __pte(paddr | _KERNPG_TABLE));
- }
- pte = pte_save;
- early_make_page_readonly(pte);
- xen_pte_pin(pte_phys);
+ pte = alloc_static_page(&pte_phys);
+ pte_save = pte;
+ for (k = 0; k < PTRS_PER_PTE; pte++, k++, paddr +=
PTE_SIZE) {
+ if ((paddr >= end) ||
+ ((paddr >> PAGE_SHIFT) >=
+ xen_start_info->nr_pages)) {
+ __set_pte(pte, __pte(0));
+ continue;
+ }
+ if (make_readonly(paddr)) {
+ __set_pte(pte,
+ __pte(paddr | (_KERNPG_TABLE &
~_PAGE_RW)));
+ continue;
+ }
+ __set_pte(pte, __pte(paddr | _KERNPG_TABLE));
+ }
+ pte = pte_save;
+ early_make_page_readonly(pte);
+ xen_pte_pin(pte_phys);
set_pmd(pmd, __pmd(pte_phys | _KERNPG_TABLE));
}
}
@@ -506,7 +495,7 @@
level3_kernel_pgt[pud_index(__START_KERNEL_map)] =
__pud(__pa_symbol(level2_kernel_pgt) |
_KERNPG_TABLE | _PAGE_USER);
- memcpy((void *)level2_kernel_pgt, page, PAGE_SIZE);
+ memcpy((void *)level2_kernel_pgt, page, PAGE_SIZE);
early_make_page_readonly(init_level4_pgt);
early_make_page_readonly(init_level4_user_pgt);
@@ -618,7 +607,7 @@
void zap_low_mappings(void)
{
- /* this is not required for Xen */
+ /* this is not required for Xen */
#if 0
swap_low_mappings();
#endif
@@ -629,11 +618,11 @@
{
{
unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
- /* unsigned int max_dma; */
- /* max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >>
PAGE_SHIFT; */
- /* if (end_pfn < max_dma) */
+ /* unsigned int max_dma; */
+ /* max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >>
PAGE_SHIFT; */
+ /* if (end_pfn < max_dma) */
zones_size[ZONE_DMA] = end_pfn;
-#if 0
+#if 0
else {
zones_size[ZONE_DMA] = max_dma;
zones_size[ZONE_NORMAL] = end_pfn - max_dma;
@@ -642,16 +631,16 @@
free_area_init(zones_size);
}
- set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
- HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
-
- memset(empty_zero_page, 0, sizeof(empty_zero_page));
+ set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
+ HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
+
+ memset(empty_zero_page, 0, sizeof(empty_zero_page));
init_mm.context.pinned = 1;
#ifdef CONFIG_XEN_PHYSDEV_ACCESS
{
int i;
- /* Setup mapping of lower 1st MB */
+ /* Setup mapping of lower 1st MB */
for (i = 0; i < NR_FIX_ISAMAPS; i++)
if (xen_start_info->flags & SIF_PRIVILEGED)
set_fixmap(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
@@ -701,7 +690,7 @@
static inline int page_is_ram (unsigned long pagenr)
{
- return 1;
+ return 1;
}
static struct kcore_list kcore_mem, kcore_vmalloc, kcore_kernel, kcore_modules,
@@ -790,10 +779,10 @@
void free_initmem(void)
{
#ifdef __DO_LATER__
- /*
- * Some pages can be pinned, but some are not. Unpinning such pages
- * triggers BUG().
- */
+ /*
+ * Some pages can be pinned, but some are not. Unpinning such pages
+ * triggers BUG().
+ */
unsigned long addr;
addr = (unsigned long)(&__init_begin);
@@ -801,12 +790,12 @@
ClearPageReserved(virt_to_page(addr));
set_page_count(virt_to_page(addr), 1);
memset((void *)(addr & ~(PAGE_SIZE-1)), 0xcc, PAGE_SIZE);
- xen_pte_unpin(__pa(addr));
- make_page_writable(__va(__pa(addr)));
- /*
- * Make pages from __PAGE_OFFSET address as well
- */
- make_page_writable((void *)addr);
+ xen_pte_unpin(__pa(addr));
+ make_page_writable(__va(__pa(addr)));
+ /*
+ * Make pages from __PAGE_OFFSET address as well
+ */
+ make_page_writable((void *)addr);
free_page(addr);
totalram_pages++;
}
@@ -856,7 +845,7 @@
if (pgd_none(*pgd))
return 0;
- pud = pud_offset_k(addr);
+ pud = pud_offset_k(addr);
if (pud_none(*pud))
return 0;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|