Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754269AbbHFDQz (ORCPT ); Wed, 5 Aug 2015 23:16:55 -0400 Received: from mail-bn1bon0119.outbound.protection.outlook.com ([157.56.111.119]:35232 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752637AbbHFDQx (ORCPT ); Wed, 5 Aug 2015 23:16:53 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=scottwood@freescale.com; Message-ID: <1438831004.2097.146.camel@freescale.com> Subject: Re: [PATCH 3/3] PowerPC/mpc85xx: Add hotplug support on E6500 cores From: Scott Wood To: Chenhui Zhao CC: , , , Tang Yuantian , Tang Yuantian Date: Wed, 5 Aug 2015 22:16:44 -0500 In-Reply-To: <1438772906.21522.2@remotesmtp.freescale.net> References: <1438334444-31919-1-git-send-email-b29983@freescale.com> <1438334444-31919-3-git-send-email-b29983@freescale.com> <1438388531.19345.88.camel@freescale.com> <1438772906.21522.2@remotesmtp.freescale.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.0-fta1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Originating-IP: [2601:448:8100:f9f:12bf:48ff:fe84:c9a0] X-ClientProxiedBy: BY2PR04CA0006.namprd04.prod.outlook.com (10.255.247.16) To BN3PR03MB1479.namprd03.prod.outlook.com (25.163.35.142) X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB1479;2:J5s0xT+NxJMr4HCuCONVbo8r8vgFmKSqIExZ7RJB9/iGn5ERgr6EE9KLCZnkvNbjD8eJWUEdCbvn1KU3PJlJPWOP53eZAMc3+8IUn5n6mD4m2zp2Utm035SAloJNZqRUeH3M8y8tYfAXXhGu1yyAkFzNJd+Bvz5N2OtpohfgGyc=;3:BUITJJsfAOLsSecvASGvMDU2HpyjSO+jG5oLP687WqL5UqAyRWU7TZbof+sAnJo/x+JuTgQBk/pAFcMsxv02F6Q9RQ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KfcF5CHz3zVLlAAMNBA8I7cJgkYIOeNwFTQ1Y/supqFrHvQVAmpm8gh7IFdLGLe35ReLYmiNSo5rROO5C2mcK8RcQ/UK3lYUbSqtZyhPSnFjVzOox/bRQvuwda2d0lknu4y8ygZAefiNH5qpmTenpDWbHsNSP/ptDCNV4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BN3PR03MB1479;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1479; X-Forefront-PRVS: 06607E485E X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6009001)(189002)(24454002)(377454003)(377424004)(199003)(77096005)(103116003)(122386002)(23676002)(46102003)(42186005)(33646002)(40100003)(77156002)(62966003)(87976001)(15975445007)(86362001)(68736005)(2950100001)(93886004)(101416001)(50986999)(106356001)(19580395003)(50466002)(4001450100002)(105586002)(76176999)(47776003)(50226001)(189998001)(81156007)(92566002)(64706001)(5820100001)(4001540100001)(5001860100001)(5001920100001)(5001830100001)(97736004)(5001960100002)(36756003)(19580405001)(110136002)(99106002)(3826002)(5001840100002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR03MB1479;H:[IPv6:2601:448:8100:f9f:12bf:48ff:fe84:c9a0];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjNQUjAzTUIxNDc5OzIzOk1lUWxianROTHlYWGYvUVdLb3JUdmFKa1F2?= =?utf-8?B?R3Roa1d3eW9Kc09zelBlajVxNXdkY1R0NllvVFYxZC9ibE05L2xvUXNOUzN6?= =?utf-8?B?OTJrZUM3TjZuc1VnUCtVWFZVN0xkNE1WMFRLQXV0WkNzZEg2S3VIcmV2R2pV?= =?utf-8?B?UVZjTEtJbkd5Si85NjVRbXRyVHlMRG1qbVI3S08vVk01UEorYUN6a1NvR3hw?=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yUPVqgSz4=;20:oEX8PFMzbcf2/h8+0wlGG71nOlNL2r4r8dGhtax1x5SsGBEqSmXhKy01K3/USukY+nzfrMsmckY18k37nFCoug== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2015 03:16:49.1955 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1479 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2093 Lines: 49 On Wed, 2015-08-05 at 19:08 +0800, Chenhui Zhao wrote: > On Sat, Aug 1, 2015 at 8:22 AM, Scott Wood > wrote: > > On Fri, 2015-07-31 at 17:20 +0800, b29983@freescale.comwrote: > > > + /* > > > + * If both threads are offline, reset core to start. > > > + * When core is up, Thread 0 always gets up first, > > > + * so bind the current logical cpu with Thread 0. > > > + */ > > > + if (hw_cpu != cpu_first_thread_sibling(hw_cpu)) { > > > + int hw_cpu1, hw_cpu2; > > > + > > > + hw_cpu1 = get_hard_smp_processor_id(primary); > > > + hw_cpu2 = get_hard_smp_processor_id(primary + > > > 1); > > > + set_hard_smp_processor_id(primary, hw_cpu2); > > > + set_hard_smp_processor_id(primary + 1, > > > hw_cpu1); > > > + /* get new physical cpu id */ > > > + hw_cpu = get_hard_smp_processor_id(nr); > > > > NACK as discussed in http://patchwork.ozlabs.org/patch/454944/ > > > > -Scott > > You said, > > There's no need for this. I have booting from a thread1, and having > it > kick its thread0, working locally without messing with the hwid/cpu > mapping. > > I still have questions here. After a core reset, how can you boot > Thread1 > of the core first. As I know, Thread0 boots up first by default. So the issue isn't that thread1 comes up first, but that you *want* thread1 to come up first and it won't. I don't think this remapping is an acceptable answer, though. Instead, if you need only thread1 to come up, start the core, have thread0 start thread1, and then send thread0 into whatever waiting state it would be in if thread1 had never been offlined. -Scott -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/