Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212075
b: refs/heads/master
c: 5a47c7d
h: refs/heads/master
i:
  212073: 90711fe
  212071: 85b8c02
v: v3
  • Loading branch information
Feng Tang authored and Ingo Molnar committed Oct 8, 2010
1 parent 00aa973 commit 87625f5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 55572b293b3a5929e8c54bc91d14ae6264186bf6
refs/heads/master: 5a47c7dae861c3ca3edf178546641909851bf715
15 changes: 15 additions & 0 deletions trunk/arch/x86/include/asm/fixmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,5 +214,20 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr)
BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START);
return __virt_to_fix(vaddr);
}

/* Return an pointer with offset calculated */
static inline unsigned long __set_fixmap_offset(enum fixed_addresses idx,
phys_addr_t phys, pgprot_t flags)
{
__set_fixmap(idx, phys, flags);
return fix_to_virt(idx) + (phys & (PAGE_SIZE - 1));
}

#define set_fixmap_offset(idx, phys) \
__set_fixmap_offset(idx, phys, PAGE_KERNEL)

#define set_fixmap_offset_nocache(idx, phys) \
__set_fixmap_offset(idx, phys, PAGE_KERNEL_NOCACHE)

#endif /* !__ASSEMBLY__ */
#endif /* _ASM_X86_FIXMAP_H */

0 comments on commit 87625f5

Please sign in to comment.