mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-19 15:39:07 +00:00
ARM: SMP: get rid of get_core_count()
We don't need this small function as well as scu_get_core_count() Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
8975b6c0fd
commit
fd778f0ad7
@ -29,16 +29,6 @@
|
|||||||
/* SCU base address */
|
/* SCU base address */
|
||||||
static void __iomem *scu_base;
|
static void __iomem *scu_base;
|
||||||
|
|
||||||
/*
|
|
||||||
* Use SCU config register to count number of cores
|
|
||||||
*/
|
|
||||||
static inline unsigned int get_core_count(void)
|
|
||||||
{
|
|
||||||
if (scu_base)
|
|
||||||
return scu_get_core_count(scu_base);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static DEFINE_SPINLOCK(boot_lock);
|
static DEFINE_SPINLOCK(boot_lock);
|
||||||
|
|
||||||
void __cpuinit platform_secondary_init(unsigned int cpu)
|
void __cpuinit platform_secondary_init(unsigned int cpu)
|
||||||
@ -118,7 +108,7 @@ void __init smp_init_cpus(void)
|
|||||||
scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256);
|
scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256);
|
||||||
BUG_ON(!scu_base);
|
BUG_ON(!scu_base);
|
||||||
|
|
||||||
ncores = get_core_count();
|
ncores = scu_get_core_count(scu_base);
|
||||||
|
|
||||||
/* sanity check */
|
/* sanity check */
|
||||||
if (ncores > NR_CPUS) {
|
if (ncores > NR_CPUS) {
|
||||||
|
@ -50,14 +50,6 @@ static void __iomem *scu_base_addr(void)
|
|||||||
return (void __iomem *)0;
|
return (void __iomem *)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned int get_core_count(void)
|
|
||||||
{
|
|
||||||
void __iomem *scu_base = scu_base_addr();
|
|
||||||
if (scu_base)
|
|
||||||
return scu_get_core_count(scu_base);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static DEFINE_SPINLOCK(boot_lock);
|
static DEFINE_SPINLOCK(boot_lock);
|
||||||
|
|
||||||
void __cpuinit platform_secondary_init(unsigned int cpu)
|
void __cpuinit platform_secondary_init(unsigned int cpu)
|
||||||
@ -158,7 +150,10 @@ static void __init poke_milo(void)
|
|||||||
*/
|
*/
|
||||||
void __init smp_init_cpus(void)
|
void __init smp_init_cpus(void)
|
||||||
{
|
{
|
||||||
unsigned int i, ncores = get_core_count();
|
void __iomem *scu_base = scu_base_addr();
|
||||||
|
unsigned int i, ncores;
|
||||||
|
|
||||||
|
ncores = scu_base ? scu_get_core_count(scu_base) : 1;
|
||||||
|
|
||||||
/* sanity check */
|
/* sanity check */
|
||||||
if (ncores > NR_CPUS) {
|
if (ncores > NR_CPUS) {
|
||||||
|
@ -28,11 +28,6 @@
|
|||||||
*/
|
*/
|
||||||
volatile int __cpuinitdata pen_release = -1;
|
volatile int __cpuinitdata pen_release = -1;
|
||||||
|
|
||||||
static unsigned int __init get_core_count(void)
|
|
||||||
{
|
|
||||||
return scu_get_core_count(__io_address(UX500_SCU_BASE));
|
|
||||||
}
|
|
||||||
|
|
||||||
static DEFINE_SPINLOCK(boot_lock);
|
static DEFINE_SPINLOCK(boot_lock);
|
||||||
|
|
||||||
void __cpuinit platform_secondary_init(unsigned int cpu)
|
void __cpuinit platform_secondary_init(unsigned int cpu)
|
||||||
@ -126,7 +121,9 @@ static void __init wakeup_secondary(void)
|
|||||||
*/
|
*/
|
||||||
void __init smp_init_cpus(void)
|
void __init smp_init_cpus(void)
|
||||||
{
|
{
|
||||||
unsigned int i, ncores = get_core_count();
|
unsigned int i, ncores;
|
||||||
|
|
||||||
|
ncores = scu_get_core_count(__io_address(UX500_SCU_BASE));
|
||||||
|
|
||||||
/* sanity check */
|
/* sanity check */
|
||||||
if (ncores > NR_CPUS) {
|
if (ncores > NR_CPUS) {
|
||||||
|
Loading…
Reference in New Issue
Block a user