Skip to content

Commit

Permalink
sparc: properly conditionalize use of TIF_32BIT
Browse files Browse the repository at this point in the history
After merging the audit tree, today's linux-next build (sparc defconfig)
failed like this:

In file included from include/linux/audit.h:29:0,
                 from mm/mmap.c:33:
arch/sparc/include/asm/syscall.h: In function 'syscall_get_arch':
arch/sparc/include/asm/syscall.h:131:9: error: 'TIF_32BIT' undeclared (first use in this function)
arch/sparc/include/asm/syscall.h:131:9: note: each undeclared identifier is reported only once for each function it appears in

And many more ...

Caused by commit 374c0c054122 ("ARCH: AUDIT: implement syscall_get_arch
for all arches").

This patch wraps the usage of TIF_32BIT in:
   if defined(__sparc__) && defined(__arch64__)
Which solves the build problem.

Signed-off-by: Stephen Rothwell <[email protected]>
Acked-by: Richard Guy Briggs <[email protected]>
Signed-off-by: Eric Paris <[email protected]>
  • Loading branch information
sfrothwell authored and eparis committed Sep 23, 2014
1 parent 75dddcb commit 01ed102
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/sparc/include/asm/syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,12 @@ static inline void syscall_set_arguments(struct task_struct *task,

static inline int syscall_get_arch(void)
{
#if defined(__sparc__) && defined(__arch64__)
return test_thread_flag(TIF_32BIT) ? AUDIT_ARCH_SPARC
: AUDIT_ARCH_SPARC64;
#else
return AUDIT_ARCH_SPARC;
#endif
}

#endif /* __ASM_SPARC_SYSCALL_H */

0 comments on commit 01ed102

Please sign in to comment.