platsmp.c (9938b04472d5c59f8bd8152a548533a8599596a2) | platsmp.c (64fc2a947a9873700929ec0ef02b4654a04e0476) |
---|---|
1/* 2 * SMP operations for Alpine platform. 3 * 4 * Copyright (C) 2015 Annapurna Labs Ltd. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 13 unchanged lines hidden (view full) --- 22#include <asm/smp_plat.h> 23 24#include "alpine_cpu_pm.h" 25 26static int alpine_boot_secondary(unsigned int cpu, struct task_struct *idle) 27{ 28 phys_addr_t addr; 29 | 1/* 2 * SMP operations for Alpine platform. 3 * 4 * Copyright (C) 2015 Annapurna Labs Ltd. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 13 unchanged lines hidden (view full) --- 22#include <asm/smp_plat.h> 23 24#include "alpine_cpu_pm.h" 25 26static int alpine_boot_secondary(unsigned int cpu, struct task_struct *idle) 27{ 28 phys_addr_t addr; 29 |
30 addr = virt_to_phys(secondary_startup); | 30 addr = __pa_symbol(secondary_startup); |
31 32 if (addr > (phys_addr_t)(uint32_t)(-1)) { 33 pr_err("FAIL: resume address over 32bit (%pa)", &addr); 34 return -EINVAL; 35 } 36 37 return alpine_cpu_wakeup(cpu_logical_map(cpu), (uint32_t)addr); 38} 39 40static void __init alpine_smp_prepare_cpus(unsigned int max_cpus) 41{ 42 alpine_cpu_pm_init(); 43} 44 45static const struct smp_operations alpine_smp_ops __initconst = { 46 .smp_prepare_cpus = alpine_smp_prepare_cpus, 47 .smp_boot_secondary = alpine_boot_secondary, 48}; 49CPU_METHOD_OF_DECLARE(alpine_smp, "al,alpine-smp", &alpine_smp_ops); | 31 32 if (addr > (phys_addr_t)(uint32_t)(-1)) { 33 pr_err("FAIL: resume address over 32bit (%pa)", &addr); 34 return -EINVAL; 35 } 36 37 return alpine_cpu_wakeup(cpu_logical_map(cpu), (uint32_t)addr); 38} 39 40static void __init alpine_smp_prepare_cpus(unsigned int max_cpus) 41{ 42 alpine_cpu_pm_init(); 43} 44 45static const struct smp_operations alpine_smp_ops __initconst = { 46 .smp_prepare_cpus = alpine_smp_prepare_cpus, 47 .smp_boot_secondary = alpine_boot_secondary, 48}; 49CPU_METHOD_OF_DECLARE(alpine_smp, "al,alpine-smp", &alpine_smp_ops); |