diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-09-24 06:59:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-24 06:59:18 -0400 |
commit | d2ff6de537c61a0f05731c6679f3e1abc2d95e68 (patch) | |
tree | 821aa38121f57a9d5419388ef10ea6f3aa445d4d /arch/powerpc/include/asm | |
parent | e23a8b6a8f319c0f08b6ccef2dccbb37e7603dc2 (diff) | |
parent | a724eada8c2a7b62463b73ccf73fd0bb6e928aeb (diff) |
Merge branch 'linus' into x86/urgent
Merge reason: Queueing up dependent early-printk fix.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r-- | arch/powerpc/include/asm/cputime.h | 13 | ||||
-rw-r--r-- | arch/powerpc/include/asm/hw_irq.h | 22 | ||||
-rw-r--r-- | arch/powerpc/include/asm/mman.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/paca.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/perf_event.h (renamed from arch/powerpc/include/asm/perf_counter.h) | 22 | ||||
-rw-r--r-- | arch/powerpc/include/asm/systbl.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/unistd.h | 2 |
7 files changed, 40 insertions, 25 deletions
diff --git a/arch/powerpc/include/asm/cputime.h b/arch/powerpc/include/asm/cputime.h index f42e623030ee..fa19f3fe05ff 100644 --- a/arch/powerpc/include/asm/cputime.h +++ b/arch/powerpc/include/asm/cputime.h | |||
@@ -18,6 +18,9 @@ | |||
18 | 18 | ||
19 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING | 19 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING |
20 | #include <asm-generic/cputime.h> | 20 | #include <asm-generic/cputime.h> |
21 | #ifdef __KERNEL__ | ||
22 | static inline void setup_cputime_one_jiffy(void) { } | ||
23 | #endif | ||
21 | #else | 24 | #else |
22 | 25 | ||
23 | #include <linux/types.h> | 26 | #include <linux/types.h> |
@@ -49,6 +52,11 @@ typedef u64 cputime64_t; | |||
49 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
50 | 53 | ||
51 | /* | 54 | /* |
55 | * One jiffy in timebase units computed during initialization | ||
56 | */ | ||
57 | extern cputime_t cputime_one_jiffy; | ||
58 | |||
59 | /* | ||
52 | * Convert cputime <-> jiffies | 60 | * Convert cputime <-> jiffies |
53 | */ | 61 | */ |
54 | extern u64 __cputime_jiffies_factor; | 62 | extern u64 __cputime_jiffies_factor; |
@@ -89,6 +97,11 @@ static inline cputime_t jiffies_to_cputime(const unsigned long jif) | |||
89 | return ct; | 97 | return ct; |
90 | } | 98 | } |
91 | 99 | ||
100 | static inline void setup_cputime_one_jiffy(void) | ||
101 | { | ||
102 | cputime_one_jiffy = jiffies_to_cputime(1); | ||
103 | } | ||
104 | |||
92 | static inline cputime64_t jiffies64_to_cputime64(const u64 jif) | 105 | static inline cputime64_t jiffies64_to_cputime64(const u64 jif) |
93 | { | 106 | { |
94 | cputime_t ct; | 107 | cputime_t ct; |
diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h index e73d554538dd..abbc2aaaced5 100644 --- a/arch/powerpc/include/asm/hw_irq.h +++ b/arch/powerpc/include/asm/hw_irq.h | |||
@@ -135,43 +135,43 @@ static inline int irqs_disabled_flags(unsigned long flags) | |||
135 | */ | 135 | */ |
136 | struct irq_chip; | 136 | struct irq_chip; |
137 | 137 | ||
138 | #ifdef CONFIG_PERF_COUNTERS | 138 | #ifdef CONFIG_PERF_EVENTS |
139 | 139 | ||
140 | #ifdef CONFIG_PPC64 | 140 | #ifdef CONFIG_PPC64 |
141 | static inline unsigned long test_perf_counter_pending(void) | 141 | static inline unsigned long test_perf_event_pending(void) |
142 | { | 142 | { |
143 | unsigned long x; | 143 | unsigned long x; |
144 | 144 | ||
145 | asm volatile("lbz %0,%1(13)" | 145 | asm volatile("lbz %0,%1(13)" |
146 | : "=r" (x) | 146 | : "=r" (x) |
147 | : "i" (offsetof(struct paca_struct, perf_counter_pending))); | 147 | : "i" (offsetof(struct paca_struct, perf_event_pending))); |
148 | return x; | 148 | return x; |
149 | } | 149 | } |
150 | 150 | ||
151 | static inline void set_perf_counter_pending(void) | 151 | static inline void set_perf_event_pending(void) |
152 | { | 152 | { |
153 | asm volatile("stb %0,%1(13)" : : | 153 | asm volatile("stb %0,%1(13)" : : |
154 | "r" (1), | 154 | "r" (1), |
155 | "i" (offsetof(struct paca_struct, perf_counter_pending))); | 155 | "i" (offsetof(struct paca_struct, perf_event_pending))); |
156 | } | 156 | } |
157 | 157 | ||
158 | static inline void clear_perf_counter_pending(void) | 158 | static inline void clear_perf_event_pending(void) |
159 | { | 159 | { |
160 | asm volatile("stb %0,%1(13)" : : | 160 | asm volatile("stb %0,%1(13)" : : |
161 | "r" (0), | 161 | "r" (0), |
162 | "i" (offsetof(struct paca_struct, perf_counter_pending))); | 162 | "i" (offsetof(struct paca_struct, perf_event_pending))); |
163 | } | 163 | } |
164 | #endif /* CONFIG_PPC64 */ | 164 | #endif /* CONFIG_PPC64 */ |
165 | 165 | ||
166 | #else /* CONFIG_PERF_COUNTERS */ | 166 | #else /* CONFIG_PERF_EVENTS */ |
167 | 167 | ||
168 | static inline unsigned long test_perf_counter_pending(void) | 168 | static inline unsigned long test_perf_event_pending(void) |
169 | { | 169 | { |
170 | return 0; | 170 | return 0; |
171 | } | 171 | } |
172 | 172 | ||
173 | static inline void clear_perf_counter_pending(void) {} | 173 | static inline void clear_perf_event_pending(void) {} |
174 | #endif /* CONFIG_PERF_COUNTERS */ | 174 | #endif /* CONFIG_PERF_EVENTS */ |
175 | 175 | ||
176 | #endif /* __KERNEL__ */ | 176 | #endif /* __KERNEL__ */ |
177 | #endif /* _ASM_POWERPC_HW_IRQ_H */ | 177 | #endif /* _ASM_POWERPC_HW_IRQ_H */ |
diff --git a/arch/powerpc/include/asm/mman.h b/arch/powerpc/include/asm/mman.h index 7b1c49811a24..d4a7f645c5db 100644 --- a/arch/powerpc/include/asm/mman.h +++ b/arch/powerpc/include/asm/mman.h | |||
@@ -25,6 +25,8 @@ | |||
25 | 25 | ||
26 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 26 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
27 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 27 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
28 | #define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ | ||
29 | #define MAP_HUGETLB 0x40000 /* create a huge page mapping */ | ||
28 | 30 | ||
29 | #ifdef __KERNEL__ | 31 | #ifdef __KERNEL__ |
30 | #ifdef CONFIG_PPC64 | 32 | #ifdef CONFIG_PPC64 |
diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h index b634456ea893..7d8514ceceae 100644 --- a/arch/powerpc/include/asm/paca.h +++ b/arch/powerpc/include/asm/paca.h | |||
@@ -122,7 +122,7 @@ struct paca_struct { | |||
122 | u8 soft_enabled; /* irq soft-enable flag */ | 122 | u8 soft_enabled; /* irq soft-enable flag */ |
123 | u8 hard_enabled; /* set if irqs are enabled in MSR */ | 123 | u8 hard_enabled; /* set if irqs are enabled in MSR */ |
124 | u8 io_sync; /* writel() needs spin_unlock sync */ | 124 | u8 io_sync; /* writel() needs spin_unlock sync */ |
125 | u8 perf_counter_pending; /* PM interrupt while soft-disabled */ | 125 | u8 perf_event_pending; /* PM interrupt while soft-disabled */ |
126 | 126 | ||
127 | /* Stuff for accurate time accounting */ | 127 | /* Stuff for accurate time accounting */ |
128 | u64 user_time; /* accumulated usermode TB ticks */ | 128 | u64 user_time; /* accumulated usermode TB ticks */ |
diff --git a/arch/powerpc/include/asm/perf_counter.h b/arch/powerpc/include/asm/perf_event.h index 0ea0639fcf75..3288ce3997e0 100644 --- a/arch/powerpc/include/asm/perf_counter.h +++ b/arch/powerpc/include/asm/perf_event.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Performance counter support - PowerPC-specific definitions. | 2 | * Performance event support - PowerPC-specific definitions. |
3 | * | 3 | * |
4 | * Copyright 2008-2009 Paul Mackerras, IBM Corporation. | 4 | * Copyright 2008-2009 Paul Mackerras, IBM Corporation. |
5 | * | 5 | * |
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #include <asm/hw_irq.h> | 13 | #include <asm/hw_irq.h> |
14 | 14 | ||
15 | #define MAX_HWCOUNTERS 8 | 15 | #define MAX_HWEVENTS 8 |
16 | #define MAX_EVENT_ALTERNATIVES 8 | 16 | #define MAX_EVENT_ALTERNATIVES 8 |
17 | #define MAX_LIMITED_HWCOUNTERS 2 | 17 | #define MAX_LIMITED_HWCOUNTERS 2 |
18 | 18 | ||
@@ -28,12 +28,12 @@ struct power_pmu { | |||
28 | unsigned long test_adder; | 28 | unsigned long test_adder; |
29 | int (*compute_mmcr)(u64 events[], int n_ev, | 29 | int (*compute_mmcr)(u64 events[], int n_ev, |
30 | unsigned int hwc[], unsigned long mmcr[]); | 30 | unsigned int hwc[], unsigned long mmcr[]); |
31 | int (*get_constraint)(u64 event, unsigned long *mskp, | 31 | int (*get_constraint)(u64 event_id, unsigned long *mskp, |
32 | unsigned long *valp); | 32 | unsigned long *valp); |
33 | int (*get_alternatives)(u64 event, unsigned int flags, | 33 | int (*get_alternatives)(u64 event_id, unsigned int flags, |
34 | u64 alt[]); | 34 | u64 alt[]); |
35 | void (*disable_pmc)(unsigned int pmc, unsigned long mmcr[]); | 35 | void (*disable_pmc)(unsigned int pmc, unsigned long mmcr[]); |
36 | int (*limited_pmc_event)(u64 event); | 36 | int (*limited_pmc_event)(u64 event_id); |
37 | u32 flags; | 37 | u32 flags; |
38 | int n_generic; | 38 | int n_generic; |
39 | int *generic_events; | 39 | int *generic_events; |
@@ -61,10 +61,10 @@ struct pt_regs; | |||
61 | extern unsigned long perf_misc_flags(struct pt_regs *regs); | 61 | extern unsigned long perf_misc_flags(struct pt_regs *regs); |
62 | extern unsigned long perf_instruction_pointer(struct pt_regs *regs); | 62 | extern unsigned long perf_instruction_pointer(struct pt_regs *regs); |
63 | 63 | ||
64 | #define PERF_COUNTER_INDEX_OFFSET 1 | 64 | #define PERF_EVENT_INDEX_OFFSET 1 |
65 | 65 | ||
66 | /* | 66 | /* |
67 | * Only override the default definitions in include/linux/perf_counter.h | 67 | * Only override the default definitions in include/linux/perf_event.h |
68 | * if we have hardware PMU support. | 68 | * if we have hardware PMU support. |
69 | */ | 69 | */ |
70 | #ifdef CONFIG_PPC_PERF_CTRS | 70 | #ifdef CONFIG_PPC_PERF_CTRS |
@@ -73,14 +73,14 @@ extern unsigned long perf_instruction_pointer(struct pt_regs *regs); | |||
73 | 73 | ||
74 | /* | 74 | /* |
75 | * The power_pmu.get_constraint function returns a 32/64-bit value and | 75 | * The power_pmu.get_constraint function returns a 32/64-bit value and |
76 | * a 32/64-bit mask that express the constraints between this event and | 76 | * a 32/64-bit mask that express the constraints between this event_id and |
77 | * other events. | 77 | * other events. |
78 | * | 78 | * |
79 | * The value and mask are divided up into (non-overlapping) bitfields | 79 | * The value and mask are divided up into (non-overlapping) bitfields |
80 | * of three different types: | 80 | * of three different types: |
81 | * | 81 | * |
82 | * Select field: this expresses the constraint that some set of bits | 82 | * Select field: this expresses the constraint that some set of bits |
83 | * in MMCR* needs to be set to a specific value for this event. For a | 83 | * in MMCR* needs to be set to a specific value for this event_id. For a |
84 | * select field, the mask contains 1s in every bit of the field, and | 84 | * select field, the mask contains 1s in every bit of the field, and |
85 | * the value contains a unique value for each possible setting of the | 85 | * the value contains a unique value for each possible setting of the |
86 | * MMCR* bits. The constraint checking code will ensure that two events | 86 | * MMCR* bits. The constraint checking code will ensure that two events |
@@ -102,9 +102,9 @@ extern unsigned long perf_instruction_pointer(struct pt_regs *regs); | |||
102 | * possible.) For N classes, the field is N+1 bits wide, and each class | 102 | * possible.) For N classes, the field is N+1 bits wide, and each class |
103 | * is assigned one bit from the least-significant N bits. The mask has | 103 | * is assigned one bit from the least-significant N bits. The mask has |
104 | * only the most-significant bit set, and the value has only the bit | 104 | * only the most-significant bit set, and the value has only the bit |
105 | * for the event's class set. The test_adder has the least significant | 105 | * for the event_id's class set. The test_adder has the least significant |
106 | * bit set in the field. | 106 | * bit set in the field. |
107 | * | 107 | * |
108 | * If an event is not subject to the constraint expressed by a particular | 108 | * If an event_id is not subject to the constraint expressed by a particular |
109 | * field, then it will have 0 in both the mask and value for that field. | 109 | * field, then it will have 0 in both the mask and value for that field. |
110 | */ | 110 | */ |
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index ed24bd92fe49..c7d671a7d9a1 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h | |||
@@ -322,7 +322,7 @@ SYSCALL_SPU(epoll_create1) | |||
322 | SYSCALL_SPU(dup3) | 322 | SYSCALL_SPU(dup3) |
323 | SYSCALL_SPU(pipe2) | 323 | SYSCALL_SPU(pipe2) |
324 | SYSCALL(inotify_init1) | 324 | SYSCALL(inotify_init1) |
325 | SYSCALL_SPU(perf_counter_open) | 325 | SYSCALL_SPU(perf_event_open) |
326 | COMPAT_SYS_SPU(preadv) | 326 | COMPAT_SYS_SPU(preadv) |
327 | COMPAT_SYS_SPU(pwritev) | 327 | COMPAT_SYS_SPU(pwritev) |
328 | COMPAT_SYS(rt_tgsigqueueinfo) | 328 | COMPAT_SYS(rt_tgsigqueueinfo) |
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h index cef080bfc607..f6ca76176766 100644 --- a/arch/powerpc/include/asm/unistd.h +++ b/arch/powerpc/include/asm/unistd.h | |||
@@ -341,7 +341,7 @@ | |||
341 | #define __NR_dup3 316 | 341 | #define __NR_dup3 316 |
342 | #define __NR_pipe2 317 | 342 | #define __NR_pipe2 317 |
343 | #define __NR_inotify_init1 318 | 343 | #define __NR_inotify_init1 318 |
344 | #define __NR_perf_counter_open 319 | 344 | #define __NR_perf_event_open 319 |
345 | #define __NR_preadv 320 | 345 | #define __NR_preadv 320 |
346 | #define __NR_pwritev 321 | 346 | #define __NR_pwritev 321 |
347 | #define __NR_rt_tgsigqueueinfo 322 | 347 | #define __NR_rt_tgsigqueueinfo 322 |