* [PATCH-v1]Copy machine descriptor after probe succeed
@ 2011-12-20 9:08 bill4carson
2011-12-20 9:08 ` [PATCH] Copy " bill4carson
0 siblings, 1 reply; 4+ messages in thread
From: bill4carson @ 2011-12-20 9:08 UTC (permalink / raw)
To: bill4carson; +Cc: linuxppc-dev
This patch fix minor issue with machine probe process,
It's much better to copy machine descriptor after probe
succeed.
arch/powerpc/kernel/setup-common.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Copy machine descriptor after probe succeed
2011-12-20 9:08 [PATCH-v1]Copy machine descriptor after probe succeed bill4carson
@ 2011-12-20 9:08 ` bill4carson
2011-12-20 10:17 ` Stephen Rothwell
0 siblings, 1 reply; 4+ messages in thread
From: bill4carson @ 2011-12-20 9:08 UTC (permalink / raw)
To: bill4carson; +Cc: linuxppc-dev
From: Bill Carson <bill4carson@gmail.com>
It make more sense to copy machine descriptor AFTER machine probe return
succeed.
Signed-off-by: Bill Carson <bill4carson@gmail.com>
---
arch/powerpc/kernel/setup-common.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index d426b1d..3362097 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -574,9 +574,9 @@ void probe_machine(void)
machine_id < &__machine_desc_end;
machine_id++) {
DBG(" %s ...", machine_id->name);
- memcpy(&ppc_md, machine_id, sizeof(struct machdep_calls));
- if (ppc_md.probe()) {
+ if (machine_id->probe()) {
DBG(" match !\n");
+ memcpy(&ppc_md, machine_id, sizeof(struct machdep_calls));
break;
}
DBG("\n");
--
1.6.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Copy machine descriptor after probe succeed
2011-12-20 9:08 ` [PATCH] Copy " bill4carson
@ 2011-12-20 10:17 ` Stephen Rothwell
2011-12-21 2:15 ` bill4carson
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2011-12-20 10:17 UTC (permalink / raw)
To: bill4carson; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 476 bytes --]
Hi Bill,
On Tue, 20 Dec 2011 17:08:47 +0800 bill4carson@gmail.com wrote:
>
> From: Bill Carson <bill4carson@gmail.com>
>
> It make more sense to copy machine descriptor AFTER machine probe return
> succeed.
Some of the platform's probe routines modify the ppc_md structure and so
assume that it is has been popluated before the probe routine is called.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Copy machine descriptor after probe succeed
2011-12-20 10:17 ` Stephen Rothwell
@ 2011-12-21 2:15 ` bill4carson
0 siblings, 0 replies; 4+ messages in thread
From: bill4carson @ 2011-12-21 2:15 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
On 2011年12月20日 18:17, Stephen Rothwell wrote:
> Hi Bill,
>
> On Tue, 20 Dec 2011 17:08:47 +0800 bill4carson@gmail.com wrote:
>> From: Bill Carson<bill4carson@gmail.com>
>>
>> It make more sense to copy machine descriptor AFTER machine probe return
>> succeed.
> Some of the platform's probe routines modify the ppc_md structure and so
> assume that it is has been popluated before the probe routine is called.
>
I didn't see the whole picture before :(
thanks for your point.
--
I am a slow learner
but I will keep trying to fight for my dreams!
--bill
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-21 2:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-20 9:08 [PATCH-v1]Copy machine descriptor after probe succeed bill4carson
2011-12-20 9:08 ` [PATCH] Copy " bill4carson
2011-12-20 10:17 ` Stephen Rothwell
2011-12-21 2:15 ` bill4carson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.