diff options
author | Joe Perches <joe@perches.com> | 2008-03-23 04:03:00 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:26 -0400 |
commit | 49cd740bb0b5796f34699a0f945b977f6ff34c64 (patch) | |
tree | 1fa590b7caa0fa284120e6ed846adb4093f875ba /include/asm-x86/paravirt.h | |
parent | fad599854e3997a3e93559e19759a26b18c906c6 (diff) |
include/asm-x86/paravirt.h: checkpatch cleanups - formatting only
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/paravirt.h')
-rw-r--r-- | include/asm-x86/paravirt.h | 47 |
1 files changed, 28 insertions, 19 deletions
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h index d6236eb46466..0c23f7940bc4 100644 --- a/include/asm-x86/paravirt.h +++ b/include/asm-x86/paravirt.h | |||
@@ -231,7 +231,8 @@ struct pv_mmu_ops { | |||
231 | void (*set_pte_at)(struct mm_struct *mm, unsigned long addr, | 231 | void (*set_pte_at)(struct mm_struct *mm, unsigned long addr, |
232 | pte_t *ptep, pte_t pteval); | 232 | pte_t *ptep, pte_t pteval); |
233 | void (*set_pmd)(pmd_t *pmdp, pmd_t pmdval); | 233 | void (*set_pmd)(pmd_t *pmdp, pmd_t pmdval); |
234 | void (*pte_update)(struct mm_struct *mm, unsigned long addr, pte_t *ptep); | 234 | void (*pte_update)(struct mm_struct *mm, unsigned long addr, |
235 | pte_t *ptep); | ||
235 | void (*pte_update_defer)(struct mm_struct *mm, | 236 | void (*pte_update_defer)(struct mm_struct *mm, |
236 | unsigned long addr, pte_t *ptep); | 237 | unsigned long addr, pte_t *ptep); |
237 | 238 | ||
@@ -246,7 +247,8 @@ struct pv_mmu_ops { | |||
246 | void (*set_pte_atomic)(pte_t *ptep, pte_t pteval); | 247 | void (*set_pte_atomic)(pte_t *ptep, pte_t pteval); |
247 | void (*set_pte_present)(struct mm_struct *mm, unsigned long addr, | 248 | void (*set_pte_present)(struct mm_struct *mm, unsigned long addr, |
248 | pte_t *ptep, pte_t pte); | 249 | pte_t *ptep, pte_t pte); |
249 | void (*pte_clear)(struct mm_struct *mm, unsigned long addr, pte_t *ptep); | 250 | void (*pte_clear)(struct mm_struct *mm, unsigned long addr, |
251 | pte_t *ptep); | ||
250 | void (*pmd_clear)(pmd_t *pmdp); | 252 | void (*pmd_clear)(pmd_t *pmdp); |
251 | 253 | ||
252 | #endif /* CONFIG_X86_PAE */ | 254 | #endif /* CONFIG_X86_PAE */ |
@@ -274,8 +276,7 @@ struct pv_mmu_ops { | |||
274 | /* This contains all the paravirt structures: we get a convenient | 276 | /* This contains all the paravirt structures: we get a convenient |
275 | * number for each function using the offset which we use to indicate | 277 | * number for each function using the offset which we use to indicate |
276 | * what to patch. */ | 278 | * what to patch. */ |
277 | struct paravirt_patch_template | 279 | struct paravirt_patch_template { |
278 | { | ||
279 | struct pv_init_ops pv_init_ops; | 280 | struct pv_init_ops pv_init_ops; |
280 | struct pv_time_ops pv_time_ops; | 281 | struct pv_time_ops pv_time_ops; |
281 | struct pv_cpu_ops pv_cpu_ops; | 282 | struct pv_cpu_ops pv_cpu_ops; |
@@ -660,32 +661,37 @@ static inline int paravirt_write_msr(unsigned msr, unsigned low, unsigned high) | |||
660 | } | 661 | } |
661 | 662 | ||
662 | /* These should all do BUG_ON(_err), but our headers are too tangled. */ | 663 | /* These should all do BUG_ON(_err), but our headers are too tangled. */ |
663 | #define rdmsr(msr,val1,val2) do { \ | 664 | #define rdmsr(msr, val1, val2) \ |
665 | do { \ | ||
664 | int _err; \ | 666 | int _err; \ |
665 | u64 _l = paravirt_read_msr(msr, &_err); \ | 667 | u64 _l = paravirt_read_msr(msr, &_err); \ |
666 | val1 = (u32)_l; \ | 668 | val1 = (u32)_l; \ |
667 | val2 = _l >> 32; \ | 669 | val2 = _l >> 32; \ |
668 | } while(0) | 670 | } while (0) |
669 | 671 | ||
670 | #define wrmsr(msr,val1,val2) do { \ | 672 | #define wrmsr(msr, val1, val2) \ |
673 | do { \ | ||
671 | paravirt_write_msr(msr, val1, val2); \ | 674 | paravirt_write_msr(msr, val1, val2); \ |
672 | } while(0) | 675 | } while (0) |
673 | 676 | ||
674 | #define rdmsrl(msr,val) do { \ | 677 | #define rdmsrl(msr, val) \ |
678 | do { \ | ||
675 | int _err; \ | 679 | int _err; \ |
676 | val = paravirt_read_msr(msr, &_err); \ | 680 | val = paravirt_read_msr(msr, &_err); \ |
677 | } while(0) | 681 | } while (0) |
678 | 682 | ||
679 | #define wrmsrl(msr,val) wrmsr(msr, (u32)((u64)(val)), ((u64)(val))>>32) | 683 | #define wrmsrl(msr, val) wrmsr(msr, (u32)((u64)(val)), ((u64)(val))>>32) |
680 | #define wrmsr_safe(msr,a,b) paravirt_write_msr(msr, a, b) | 684 | #define wrmsr_safe(msr, a, b) paravirt_write_msr(msr, a, b) |
681 | 685 | ||
682 | /* rdmsr with exception handling */ | 686 | /* rdmsr with exception handling */ |
683 | #define rdmsr_safe(msr,a,b) ({ \ | 687 | #define rdmsr_safe(msr, a, b) \ |
688 | ({ \ | ||
684 | int _err; \ | 689 | int _err; \ |
685 | u64 _l = paravirt_read_msr(msr, &_err); \ | 690 | u64 _l = paravirt_read_msr(msr, &_err); \ |
686 | (*a) = (u32)_l; \ | 691 | (*a) = (u32)_l; \ |
687 | (*b) = _l >> 32; \ | 692 | (*b) = _l >> 32; \ |
688 | _err; }) | 693 | _err; \ |
694 | }) | ||
689 | 695 | ||
690 | 696 | ||
691 | static inline u64 paravirt_read_tsc(void) | 697 | static inline u64 paravirt_read_tsc(void) |
@@ -693,10 +699,11 @@ static inline u64 paravirt_read_tsc(void) | |||
693 | return PVOP_CALL0(u64, pv_cpu_ops.read_tsc); | 699 | return PVOP_CALL0(u64, pv_cpu_ops.read_tsc); |
694 | } | 700 | } |
695 | 701 | ||
696 | #define rdtscl(low) do { \ | 702 | #define rdtscl(low) \ |
703 | do { \ | ||
697 | u64 _l = paravirt_read_tsc(); \ | 704 | u64 _l = paravirt_read_tsc(); \ |
698 | low = (int)_l; \ | 705 | low = (int)_l; \ |
699 | } while(0) | 706 | } while (0) |
700 | 707 | ||
701 | #define rdtscll(val) (val = paravirt_read_tsc()) | 708 | #define rdtscll(val) (val = paravirt_read_tsc()) |
702 | 709 | ||
@@ -711,11 +718,12 @@ static inline unsigned long long paravirt_read_pmc(int counter) | |||
711 | return PVOP_CALL1(u64, pv_cpu_ops.read_pmc, counter); | 718 | return PVOP_CALL1(u64, pv_cpu_ops.read_pmc, counter); |
712 | } | 719 | } |
713 | 720 | ||
714 | #define rdpmc(counter,low,high) do { \ | 721 | #define rdpmc(counter, low, high) \ |
722 | do { \ | ||
715 | u64 _l = paravirt_read_pmc(counter); \ | 723 | u64 _l = paravirt_read_pmc(counter); \ |
716 | low = (u32)_l; \ | 724 | low = (u32)_l; \ |
717 | high = _l >> 32; \ | 725 | high = _l >> 32; \ |
718 | } while(0) | 726 | } while (0) |
719 | 727 | ||
720 | static inline unsigned long long paravirt_rdtscp(unsigned int *aux) | 728 | static inline unsigned long long paravirt_rdtscp(unsigned int *aux) |
721 | { | 729 | { |
@@ -794,7 +802,8 @@ static inline void set_iopl_mask(unsigned mask) | |||
794 | } | 802 | } |
795 | 803 | ||
796 | /* The paravirtualized I/O functions */ | 804 | /* The paravirtualized I/O functions */ |
797 | static inline void slow_down_io(void) { | 805 | static inline void slow_down_io(void) |
806 | { | ||
798 | pv_cpu_ops.io_delay(); | 807 | pv_cpu_ops.io_delay(); |
799 | #ifdef REALLY_SLOW_IO | 808 | #ifdef REALLY_SLOW_IO |
800 | pv_cpu_ops.io_delay(); | 809 | pv_cpu_ops.io_delay(); |