Skip to content

Commit

Permalink
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/li…
Browse files Browse the repository at this point in the history
…nux/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:
  xen: fix address truncation in pte mfn<->pfn conversion
  arch/x86/mm/init_64.c: early_memtest(): fix types
  x86: fix Intel Mac booting with EFI
  • Loading branch information
Linus Torvalds committed Jul 4, 2008
2 parents bf5b193 + d8355ac commit b8a0b6c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions arch/x86/kernel/efi_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ void efi_call_phys_prelog(void)
local_irq_save(efi_rt_eflags);

/*
* If I don't have PSE, I should just duplicate two entries in page
* directory. If I have PSE, I just need to duplicate one entry in
* If I don't have PAE, I should just duplicate two entries in page
* directory. If I have PAE, I just need to duplicate one entry in
* page directory.
*/
cr4 = read_cr4();

if (cr4 & X86_CR4_PSE) {
if (cr4 & X86_CR4_PAE) {
efi_bak_pg_dir_pointer[0].pgd =
swapper_pg_dir[pgd_index(0)].pgd;
swapper_pg_dir[0].pgd =
Expand Down Expand Up @@ -93,7 +93,7 @@ void efi_call_phys_epilog(void)

cr4 = read_cr4();

if (cr4 & X86_CR4_PSE) {
if (cr4 & X86_CR4_PAE) {
swapper_pg_dir[pgd_index(0)].pgd =
efi_bak_pg_dir_pointer[0].pgd;
} else {
Expand Down
7 changes: 4 additions & 3 deletions arch/x86/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ early_param("memtest", parse_memtest);

static void __init early_memtest(unsigned long start, unsigned long end)
{
unsigned long t_start, t_size;
u64 t_start, t_size;
unsigned pattern;

if (!memtest_pattern)
Expand All @@ -525,8 +525,9 @@ static void __init early_memtest(unsigned long start, unsigned long end)
if (t_start + t_size > end)
t_size = end - t_start;

printk(KERN_CONT "\n %016lx - %016lx pattern %d",
t_start, t_start + t_size, pattern);
printk(KERN_CONT "\n %016llx - %016llx pattern %d",
(unsigned long long)t_start,
(unsigned long long)t_start + t_size, pattern);

memtest(t_start, t_size, pattern);

Expand Down
4 changes: 2 additions & 2 deletions arch/x86/xen/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static pteval_t pte_mfn_to_pfn(pteval_t val)
if (val & _PAGE_PRESENT) {
unsigned long mfn = (val & PTE_MASK) >> PAGE_SHIFT;
pteval_t flags = val & ~PTE_MASK;
val = (mfn_to_pfn(mfn) << PAGE_SHIFT) | flags;
val = ((pteval_t)mfn_to_pfn(mfn) << PAGE_SHIFT) | flags;
}

return val;
Expand All @@ -196,7 +196,7 @@ static pteval_t pte_pfn_to_mfn(pteval_t val)
if (val & _PAGE_PRESENT) {
unsigned long pfn = (val & PTE_MASK) >> PAGE_SHIFT;
pteval_t flags = val & ~PTE_MASK;
val = (pfn_to_mfn(pfn) << PAGE_SHIFT) | flags;
val = ((pteval_t)pfn_to_mfn(pfn) << PAGE_SHIFT) | flags;
}

return val;
Expand Down

0 comments on commit b8a0b6c

Please sign in to comment.