Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 400d2212 authored by Kumar Gala's avatar Kumar Gala Committed by Paul Mackerras
Browse files

[PATCH] ppc32: make cur_cpu_spec a single pointer instead of an array



Changed ppc32 so that cur_cpu_spec is just a single pointer for all CPUs.
Additionally, made call_setup_cpu check to see if the cpu_setup pointer
is NULL or not before calling the function.  This lets remove the dummy
cpu_setup calls that just return.

Signed-off-by: default avatarKumar Gala <kumar.gala@freescale.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 10b35d99
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -1059,7 +1059,6 @@ __secondary_start:

	lis	r3,-KERNELBASE@h
	mr	r4,r24
	bl	identify_cpu
	bl	call_setup_cpu		/* Call setup_cpu for this CPU */
#ifdef CONFIG_6xx
	lis	r3,-KERNELBASE@h
@@ -1109,11 +1108,6 @@ __secondary_start:
 * Those generic dummy functions are kept for CPUs not
 * included in CONFIG_6xx
 */
_GLOBAL(__setup_cpu_power3)
	blr
_GLOBAL(__setup_cpu_generic)
	blr

#if !defined(CONFIG_6xx) && !defined(CONFIG_POWER4)
_GLOBAL(__save_cpu_setup)
	blr
+2 −4
Original line number Diff line number Diff line
@@ -155,8 +155,6 @@ static int op_powerpc_create_files(struct super_block *sb, struct dentry *root)
int __init oprofile_arch_init(struct oprofile_operations *ops)
{
#ifndef __powerpc64__
	int cpu_id = smp_processor_id();

#ifdef CONFIG_FSL_BOOKE
	model = &op_model_fsl_booke;
#else
@@ -167,9 +165,9 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
	if (NULL == cpu_type)
		return -ENOMEM;

	sprintf(cpu_type, "ppc/%s", cur_cpu_spec[cpu_id]->cpu_name);
	sprintf(cpu_type, "ppc/%s", cur_cpu_spec->cpu_name);

	model->num_counters = cur_cpu_spec[cpu_id]->num_pmcs;
	model->num_counters = cur_cpu_spec->num_pmcs;

	ops->cpu_type = cpu_type;
#else /* __powerpc64__ */
+1 −1
Original line number Diff line number Diff line
@@ -445,7 +445,7 @@ static int pmac_pm_enter(suspend_state_t state)
	enable_kernel_fp();

#ifdef CONFIG_ALTIVEC
	if (cur_cpu_spec[0]->cpu_features & CPU_FTR_ALTIVEC)
	if (cur_cpu_spec->cpu_features & CPU_FTR_ALTIVEC)
		enable_kernel_altivec();
#endif /* CONFIG_ALTIVEC */

+0 −2
Original line number Diff line number Diff line
@@ -17,8 +17,6 @@
#include <asm/asm-offsets.h>
#include <asm/cache.h>

_GLOBAL(__setup_cpu_601)
	blr
_GLOBAL(__setup_cpu_603)
	b	setup_common_caches
_GLOBAL(__setup_cpu_604)
+0 −2
Original line number Diff line number Diff line
@@ -63,8 +63,6 @@ _GLOBAL(__970_cpu_preinit)
	isync
	blr

_GLOBAL(__setup_cpu_power4)
	blr
_GLOBAL(__setup_cpu_ppc970)
	mfspr	r0,SPRN_HID0
	li	r11,5			/* clear DOZE and SLEEP */
Loading