Skip to content

Commit 5f20be4

Browse files
haokexinozbenh
authored andcommitted
powerpc: Remove the empty giveup_fpu() function on 32bit kernel
Instead of implementing an empty giveup_fpu() function for each 32bit processor type, replace them with an unique empty inline function. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
1 parent 037f0ee commit 5f20be4

6 files changed

Lines changed: 4 additions & 33 deletions

File tree

‎arch/powerpc/include/asm/switch_to.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ struct thread_struct;
1616
extern struct task_struct *_switch(struct thread_struct *prev,
1717
struct thread_struct *next);
1818

19-
extern void giveup_fpu(struct task_struct *);
2019
extern void load_up_fpu(void);
2120
extern void enable_kernel_fp(void);
2221
extern void enable_kernel_altivec(void);
@@ -38,8 +37,10 @@ static inline void discard_lazy_cpu_state(void)
3837

3938
#ifdef CONFIG_PPC_FPU
4039
extern void flush_fp_to_thread(struct task_struct *);
40+
extern void giveup_fpu(struct task_struct *);
4141
#else
4242
static inline void flush_fp_to_thread(struct task_struct *t) { }
43+
static inline void giveup_fpu(struct task_struct *t) { }
4344
#endif
4445

4546
#ifdef CONFIG_ALTIVEC

‎arch/powerpc/kernel/head_40x.S‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -822,14 +822,6 @@ finish_tlb_load:
822822
rfi /* Should sync shadow TLBs */
823823
b . /* prevent prefetch past rfi */
824824

825-
/* extern void giveup_fpu(struct task_struct *prev)
826-
*
827-
* The PowerPC 4xx family of processors do not have an FPU, so this just
828-
* returns.
829-
*/
830-
_ENTRY(giveup_fpu)
831-
blr
832-
833825
/* This is where the main kernel code starts.
834826
*/
835827
start_here:

‎arch/powerpc/kernel/head_44x.S‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -784,16 +784,6 @@ _GLOBAL(__fixup_440A_mcheck)
784784
sync
785785
blr
786786

787-
/*
788-
* extern void giveup_fpu(struct task_struct *prev)
789-
*
790-
* The 44x core does not have an FPU.
791-
*/
792-
#ifndef CONFIG_PPC_FPU
793-
_GLOBAL(giveup_fpu)
794-
blr
795-
#endif
796-
797787
_GLOBAL(set_context)
798788

799789
#ifdef CONFIG_BDI_SWITCH

‎arch/powerpc/kernel/head_8xx.S‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -691,10 +691,6 @@ modified_instr:
691691
b 151b
692692
#endif
693693

694-
.globl giveup_fpu
695-
giveup_fpu:
696-
blr
697-
698694
/*
699695
* This is where the main kernel code starts.
700696
*/

‎arch/powerpc/kernel/head_fsl_booke.S‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -947,16 +947,6 @@ _GLOBAL(giveup_spe)
947947
blr
948948
#endif /* CONFIG_SPE */
949949

950-
/*
951-
* extern void giveup_fpu(struct task_struct *prev)
952-
*
953-
* Not all FSL Book-E cores have an FPU
954-
*/
955-
#ifndef CONFIG_PPC_FPU
956-
_GLOBAL(giveup_fpu)
957-
blr
958-
#endif
959-
960950
/*
961951
* extern void abort(void)
962952
*

‎arch/powerpc/kernel/ppc_ksyms.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ EXPORT_SYMBOL(pci_dram_offset);
9696

9797
EXPORT_SYMBOL(start_thread);
9898

99+
#ifdef CONFIG_PPC_FPU
99100
EXPORT_SYMBOL(giveup_fpu);
101+
#endif
100102
#ifdef CONFIG_ALTIVEC
101103
EXPORT_SYMBOL(giveup_altivec);
102104
#endif /* CONFIG_ALTIVEC */

0 commit comments

Comments
 (0)