Return-Path: Received: from smtp2.linux-foundation.org ([207.189.120.14]:55455 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751988AbXGaHsK (ORCPT ); Tue, 31 Jul 2007 03:48:10 -0400 Message-Id: <200707310738.l6V7c0fs021946@imap1.linux-foundation.org> Subject: [patch 034/109] remove unused TIF_NOTIFY_RESUME flag From: akpm@linux-foundation.org Date: Tue, 31 Jul 2007 00:38:00 -0700 Sender: linux-arch-owner@vger.kernel.org To: torvalds@linux-foundation.org Cc: akpm@linux-foundation.org, eranian@hpl.hp.com, linux-arch@vger.kernel.org, tony.luck@intel.com List-ID: From: Stephane Eranian Remove unused TIF_NOTIFY_RESUME flag for all processor architectures. The flag was not used excecpt on IA-64 where the patch replaces it with TIF_PERFMON_WORK. Signed-off-by: stephane eranian Cc: Cc: "Luck, Tony" Signed-off-by: Andrew Morton --- arch/arm/kernel/entry-common.S | 2 - arch/arm26/kernel/entry.S | 2 - arch/ia64/kernel/perfmon.c | 4 +- arch/powerpc/kernel/entry_64.S | 1 arch/x86_64/kernel/entry.S | 6 ++-- include/asm-alpha/thread_info.h | 24 +++++++---------- include/asm-arm/thread_info.h | 7 +---- include/asm-arm26/thread_info.h | 7 +---- include/asm-avr32/thread_info.h | 18 +++++-------- include/asm-blackfin/thread_info.h | 14 ++++------ include/asm-cris/thread_info.h | 6 +--- include/asm-frv/thread_info.h | 12 +++----- include/asm-h8300/thread_info.h | 12 +++----- include/asm-i386/thread_info.h | 18 +++++-------- include/asm-ia64/thread_info.h | 20 +++++++------- include/asm-m32r/thread_info.h | 10 ++----- include/asm-m68knommu/thread_info.h | 10 ++----- include/asm-mips/thread_info.h | 10 ++----- include/asm-parisc/thread_info.h | 16 +++++------ include/asm-powerpc/thread_info.h | 36 ++++++++++++-------------- include/asm-sh/thread_info.h | 10 ++----- include/asm-v850/thread_info.h | 10 ++----- include/asm-x86_64/thread_info.h | 2 - include/asm-xtensa/thread_info.h | 14 ++++------ 24 files changed, 116 insertions(+), 155 deletions(-) diff -puN arch/arm/kernel/entry-common.S~remove-unused-tif_notify_resume-flag arch/arm/kernel/entry-common.S --- a/arch/arm/kernel/entry-common.S~remove-unused-tif_notify_resume-flag +++ a/arch/arm/kernel/entry-common.S @@ -46,7 +46,7 @@ fast_work_pending: work_pending: tst r1, #_TIF_NEED_RESCHED bne work_resched - tst r1, #_TIF_NOTIFY_RESUME | _TIF_SIGPENDING + tst r1, #_TIF_SIGPENDING beq no_work_pending mov r0, sp @ 'regs' mov r2, why @ 'syscall' diff -puN arch/arm26/kernel/entry.S~remove-unused-tif_notify_resume-flag arch/arm26/kernel/entry.S --- a/arch/arm26/kernel/entry.S~remove-unused-tif_notify_resume-flag +++ a/arch/arm26/kernel/entry.S @@ -194,7 +194,7 @@ fast_work_pending: work_pending: tst r1, #_TIF_NEED_RESCHED bne work_resched - tst r1, #_TIF_NOTIFY_RESUME | _TIF_SIGPENDING + tst r1, #_TIF_SIGPENDING beq no_work_pending mov r0, sp @ 'regs' mov r2, why @ 'syscall' diff -puN arch/ia64/kernel/perfmon.c~remove-unused-tif_notify_resume-flag arch/ia64/kernel/perfmon.c --- a/arch/ia64/kernel/perfmon.c~remove-unused-tif_notify_resume-flag +++ a/arch/ia64/kernel/perfmon.c @@ -591,13 +591,13 @@ pfm_set_task_notify(struct task_struct * struct thread_info *info; info = (struct thread_info *) ((char *) task + IA64_TASK_SIZE); - set_bit(TIF_NOTIFY_RESUME, &info->flags); + set_bit(TIF_PERFMON_WORK, &info->flags); } static inline void pfm_clear_task_notify(void) { - clear_thread_flag(TIF_NOTIFY_RESUME); + clear_thread_flag(TIF_PERFMON_WORK); } static inline void diff -puN arch/powerpc/kernel/entry_64.S~remove-unused-tif_notify_resume-flag arch/powerpc/kernel/entry_64.S --- a/arch/powerpc/kernel/entry_64.S~remove-unused-tif_notify_resume-flag +++ a/arch/powerpc/kernel/entry_64.S @@ -546,7 +546,6 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISER rfid b . /* prevent speculative execution */ -/* Note: this must change if we start using the TIF_NOTIFY_RESUME bit */ do_work: #ifdef CONFIG_PREEMPT andi. r0,r3,MSR_PR /* Returning to user mode? */ diff -puN arch/x86_64/kernel/entry.S~remove-unused-tif_notify_resume-flag arch/x86_64/kernel/entry.S --- a/arch/x86_64/kernel/entry.S~remove-unused-tif_notify_resume-flag +++ a/arch/x86_64/kernel/entry.S @@ -282,7 +282,7 @@ sysret_careful: sysret_signal: TRACE_IRQS_ON sti - testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY),%edx + testl $(_TIF_SIGPENDING|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY),%edx jz 1f /* Really a signal */ @@ -375,7 +375,7 @@ int_very_careful: jmp int_restore_rest int_signal: - testl $(_TIF_NOTIFY_RESUME|_TIF_SIGPENDING|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY),%edx + testl $(_TIF_SIGPENDING|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY),%edx jz 1f movq %rsp,%rdi # &ptregs -> arg1 xorl %esi,%esi # oldset -> arg2 @@ -599,7 +599,7 @@ retint_careful: jmp retint_check retint_signal: - testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY),%edx + testl $(_TIF_SIGPENDING|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY),%edx jz retint_swapgs TRACE_IRQS_ON sti diff -puN include/asm-alpha/thread_info.h~remove-unused-tif_notify_resume-flag include/asm-alpha/thread_info.h --- a/include/asm-alpha/thread_info.h~remove-unused-tif_notify_resume-flag +++ a/include/asm-alpha/thread_info.h @@ -67,28 +67,24 @@ register struct thread_info *__current_t * TIF_SYSCALL_TRACE is known to be 0 via blbs. */ #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ -#define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ -#define TIF_SIGPENDING 2 /* signal pending */ -#define TIF_NEED_RESCHED 3 /* rescheduling necessary */ -#define TIF_POLLING_NRFLAG 4 /* poll_idle is polling NEED_RESCHED */ -#define TIF_DIE_IF_KERNEL 5 /* dik recursion lock */ -#define TIF_UAC_NOPRINT 6 /* see sysinfo.h */ -#define TIF_UAC_NOFIX 7 -#define TIF_UAC_SIGBUS 8 -#define TIF_MEMDIE 9 -#define TIF_RESTORE_SIGMASK 10 /* restore signal mask in do_signal */ +#define TIF_SIGPENDING 1 /* signal pending */ +#define TIF_NEED_RESCHED 2 /* rescheduling necessary */ +#define TIF_POLLING_NRFLAG 3 /* poll_idle is polling NEED_RESCHED */ +#define TIF_DIE_IF_KERNEL 4 /* dik recursion lock */ +#define TIF_UAC_NOPRINT 5 /* see sysinfo.h */ +#define TIF_UAC_NOFIX 6 +#define TIF_UAC_SIGBUS 7 +#define TIF_MEMDIE 8 +#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal */ #define _TIF_SYSCALL_TRACE (1<