Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217847
b: refs/heads/master
c: c379806
h: refs/heads/master
i:
  217845: d4d5f1b
  217843: 4a5162d
  217839: 5217f24
v: v3
  • Loading branch information
Jeremy Fitzhardinge committed Oct 22, 2010
1 parent b0ec92f commit d319bb8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 58e05027b530ff081ecea68e38de8d59db8f87e0
refs/heads/master: c3798062f100c3e1d4ae1241bc536f3b1f28a6ca
2 changes: 1 addition & 1 deletion trunk/arch/x86/include/asm/xen/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ typedef struct xpaddr {


extern unsigned long get_phys_to_machine(unsigned long pfn);
extern void set_phys_to_machine(unsigned long pfn, unsigned long mfn);
extern bool set_phys_to_machine(unsigned long pfn, unsigned long mfn);

static inline unsigned long pfn_to_mfn(unsigned long pfn)
{
Expand Down
13 changes: 8 additions & 5 deletions trunk/arch/x86/xen/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ static void p2m_init(unsigned long *p2m)
*/
void xen_build_mfn_list_list(void)
{
unsigned pfn, i;
unsigned pfn;

/* Pre-initialize p2m_top_mfn to be completely missing */
if (p2m_top_mfn == NULL) {
Expand Down Expand Up @@ -496,19 +496,22 @@ bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn)
return true;
}

void set_phys_to_machine(unsigned long pfn, unsigned long mfn)
bool set_phys_to_machine(unsigned long pfn, unsigned long mfn)
{
if (unlikely(xen_feature(XENFEAT_auto_translated_physmap))) {
BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY);
return;
return true;
}

if (unlikely(!__set_phys_to_machine(pfn, mfn))) {
WARN(!alloc_p2m(pfn), "Can't allocate p2m for %lx, %lx", pfn, mfn);
if (!alloc_p2m(pfn))
return false;

if (!__set_phys_to_machine(pfn, mfn))
BUG();
return false;
}

return true;
}

unsigned long arbitrary_virt_to_mfn(void *vaddr)
Expand Down

0 comments on commit d319bb8

Please sign in to comment.