diff options
author | Graf Yang <graf.yang@analog.com> | 2008-11-18 04:48:22 -0500 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-11-18 04:48:22 -0500 |
commit | 8f65873e47784a390949f0d61e5692dbf2a8253e (patch) | |
tree | 4d9509bf5e52ebac190d79de04b783829d44f49e /arch/blackfin/kernel/reboot.c | |
parent | b8a989893cbdeb6c97a7b5af5f38fb0e480235f9 (diff) |
Blackfin arch: SMP supporting patchset: Blackfin kernel and memory management code
Blackfin dual core BF561 processor can support SMP like features.
https://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:smp-like
In this patch, we provide SMP extend to Blackfin kernel and memory management code
Singed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/kernel/reboot.c')
-rw-r--r-- | arch/blackfin/kernel/reboot.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/arch/blackfin/kernel/reboot.c b/arch/blackfin/kernel/reboot.c index ae97ca407b0d..eeee8cb43360 100644 --- a/arch/blackfin/kernel/reboot.c +++ b/arch/blackfin/kernel/reboot.c | |||
@@ -21,7 +21,7 @@ | |||
21 | * the core reset. | 21 | * the core reset. |
22 | */ | 22 | */ |
23 | __attribute__((l1_text)) | 23 | __attribute__((l1_text)) |
24 | static void bfin_reset(void) | 24 | static void _bfin_reset(void) |
25 | { | 25 | { |
26 | /* Wait for completion of "system" events such as cache line | 26 | /* Wait for completion of "system" events such as cache line |
27 | * line fills so that we avoid infinite stalls later on as | 27 | * line fills so that we avoid infinite stalls later on as |
@@ -66,6 +66,18 @@ static void bfin_reset(void) | |||
66 | } | 66 | } |
67 | } | 67 | } |
68 | 68 | ||
69 | static void bfin_reset(void) | ||
70 | { | ||
71 | if (ANOMALY_05000353 || ANOMALY_05000386) | ||
72 | _bfin_reset(); | ||
73 | else | ||
74 | /* the bootrom checks to see how it was reset and will | ||
75 | * automatically perform a software reset for us when | ||
76 | * it starts executing boot | ||
77 | */ | ||
78 | asm("raise 1;"); | ||
79 | } | ||
80 | |||
69 | __attribute__((weak)) | 81 | __attribute__((weak)) |
70 | void native_machine_restart(char *cmd) | 82 | void native_machine_restart(char *cmd) |
71 | { | 83 | { |
@@ -75,14 +87,10 @@ void machine_restart(char *cmd) | |||
75 | { | 87 | { |
76 | native_machine_restart(cmd); | 88 | native_machine_restart(cmd); |
77 | local_irq_disable(); | 89 | local_irq_disable(); |
78 | if (ANOMALY_05000353 || ANOMALY_05000386) | 90 | if (smp_processor_id()) |
79 | bfin_reset(); | 91 | smp_call_function((void *)bfin_reset, 0, 1); |
80 | else | 92 | else |
81 | /* the bootrom checks to see how it was reset and will | 93 | bfin_reset(); |
82 | * automatically perform a software reset for us when | ||
83 | * it starts executing boot | ||
84 | */ | ||
85 | asm("raise 1;"); | ||
86 | } | 94 | } |
87 | 95 | ||
88 | __attribute__((weak)) | 96 | __attribute__((weak)) |