Skip to content

Commit 42484d2

Browse files
hramrachmpe
authored andcommitted
powerpc/perf: remove current_is_64bit()
Since commit ed1cd6d ("powerpc: Activate CONFIG_THREAD_INFO_IN_TASK") current_is_64bit() is quivalent to !is_32bit_task(). Remove the redundant function. Suggested-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michal Suchanek <msuchanek@suse.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20190912194633.12045-1-msuchanek@suse.de
1 parent de84ffc commit 42484d2

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

arch/powerpc/perf/callchain.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -284,16 +284,6 @@ static void perf_callchain_user_64(struct perf_callchain_entry_ctx *entry,
284284
}
285285
}
286286

287-
static inline int current_is_64bit(void)
288-
{
289-
/*
290-
* We can't use test_thread_flag() here because we may be on an
291-
* interrupt stack, and the thread flags don't get copied over
292-
* from the thread_info on the main stack to the interrupt stack.
293-
*/
294-
return !test_ti_thread_flag(task_thread_info(current), TIF_32BIT);
295-
}
296-
297287
#else /* CONFIG_PPC64 */
298288
/*
299289
* On 32-bit we just access the address and let hash_page create a
@@ -321,11 +311,6 @@ static inline void perf_callchain_user_64(struct perf_callchain_entry_ctx *entry
321311
{
322312
}
323313

324-
static inline int current_is_64bit(void)
325-
{
326-
return 0;
327-
}
328-
329314
static inline int valid_user_sp(unsigned long sp, int is_64)
330315
{
331316
if (!sp || (sp & 7) || sp > TASK_SIZE - 32)
@@ -486,7 +471,7 @@ static void perf_callchain_user_32(struct perf_callchain_entry_ctx *entry,
486471
void
487472
perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs)
488473
{
489-
if (current_is_64bit())
474+
if (!is_32bit_task())
490475
perf_callchain_user_64(entry, regs);
491476
else
492477
perf_callchain_user_32(entry, regs);

0 commit comments

Comments
 (0)