Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753918AbbHFEc2 (ORCPT ); Thu, 6 Aug 2015 00:32:28 -0400 Received: from mail-bn1bn0109.outbound.protection.outlook.com ([157.56.110.109]:29342 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753167AbbHFEc0 (ORCPT ); Thu, 6 Aug 2015 00:32:26 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; lists.ozlabs.org; dkim=none (message not signed) header.d=none; Date: Thu, 6 Aug 2015 12:32:21 +0800 From: Chenhui Zhao Subject: Re: [PATCH 3/3] PowerPC/mpc85xx: Add hotplug support on E6500 cores To: Scott Wood CC: , , , Tang Yuantian , "linuxppc-dev@lists.ozlabs.org" Message-ID: <1438835541.23384.1@remotesmtp.freescale.net> In-Reply-To: <1438831004.2097.146.camel@freescale.com> 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> <1438831004.2097.146.camel@freescale.com> X-Mailer: geary/0.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD039;1:Yv4mEBwdM20XpCQzwj59WpsVv2ZghB68fNOQBaokgi8nnUSIn3P+grHjMXuJU/jwL7gcWBJfFnzGw/7BsTjk94HpSR5rEGZN5WIT7PhRqjcoR/iTTLN7RR7Bby7fCITAtJzgF27xFOaUFVvYPTP8NotZnqXL78ZmHNrqmwcwYW+CSmfl+nQ4oVQseWDLEgg04EhmD4Bbm3fJRQsGS2vPNe947hT7szzf22a6su/zHop6dSqibFlV8DptIBaI7DCyfR6cow8xs0jvxzDf7a1NLge044lwMdRgRChMjJUedopFdHbuiQbbuvleO/HxEAwLzo+r5S3Ig5av0ebAhGTgNw== X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(377424004)(377454003)(24454002)(189002)(199003)(110136002)(5001960100002)(69596002)(68736005)(77096005)(92566002)(2950100001)(189998001)(15975445007)(62966003)(77156002)(106466001)(105606002)(50466002)(85426001)(104016003)(4001450100002)(46102003)(88526003)(19580395003)(87936001)(19580405001)(93886004)(6806004)(50986999)(76176999)(64706001)(47776003)(50226001)(5001860100001)(86362001)(5001830100001)(4001540100001)(23676002)(97736004)(81156007);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR03MB563;H:az84smr01.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB563;2:N+EpGJFwpDwgB6WJTdDFn31t+vDG8aNzMeJkEm74Y5DzzIwbYOtsdUevSLFrTd+voe9dQ7PUfuwWKIIfz955J9xoLkCNgRiZRUOphVDAPHjayPZroJZUGignDH6jqce5k/5GemzdrdUqOnpvMbP0VcYBdIDT+V56O84bHVerqHU=;3:Hg3x3Oo4cn2oUXE76KC6P48/xUhs4NmiRs+eCYk0xd2pt4W6mpXbQTKcd2NTizB7K+QPk7li3UpxkPRiytIjzRI7hMBginBxD+uzzknb7ys4DpOVWt9FfxVc69EkwISs1/3izJRpbUrFd0AkAUfrL4xo8swNINQubF/Wtt+F21qGziXIPuLWtutkzDIUxqaHZAjJO3Xg57/JdAWG7geWWn3ad1kOmXUMEfymJOkCTG4=;25:8hHzrotlw/UJGQRxBeo5AByl+ZPqNuQDBbc57Quz0SgZaZwF8+Usx/yHWCFD/kgGgK72xz09uDl5aCXS9uY3xSKEpmYlX0KBdZoV5ky39vMcFVqK4bxSauLTQ9x8nX3pGdkT+Ok0J+zEMiqqJ1Bx9C9HA3NEt6Wz7XYSMkRTPwreW1G1halNO1Rlbx8WGbELZv7a5jiBX31KDhFFSK+wZmZpEmbFMBZUZTJ1EN533ctse0SsXa3wtuZpn3Zz+4q7p2Bu5BpdWtoagOze+Shbww== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB563;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB145; X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB563;20:c2uG856HgirrCzo8pay/F36I02HgIL//Z971BLk+RypZmtzikbs3zWv4lEQ9TRkwAd/4MXKezK0/ormxjHrjDWz9bT7D8W8HVXLrpmcVLO2Ds8yHmFr2ZqnapdKn2LuGawO887ZOh13MoW0PNO7z4q1qzNzxWCbRfw6Q+MmUai3JaLsK7p6oi45Awq1OyI+zPJpIV8qHdme7KPiiZZgR/SB66aaF/NlhykmtmonVuvi/Ub6CGZ+q9QmOnTyZKA2SbSqPlNU40fEbtTEiUQ/MsAeBki2Bv33/RMEYEp+Ip/GnwZ0/MXFlibs9CZMZZEMF8pe6annTve6TCD5Bf1rJcfJrVdXtY0cDrsqVWRCuxPY=;4:WwJFkay34b3IAArXZQ2vEZtBGZBT5Qo3MGUynCYbyh2ruc/jdjFFDR9C49GcfQ44uYTevUG5jrboa6CmQ0lB7PA4eZcSOgjC6fiqaL2NFkvfVwatRRUKpk0Gjn/3FHDwg8YnugEi1YgDb9WvfsILWEKDZtLrdOLQv+oSnEEl31a7FwxDUggnqUh3EGVNb1i3HR5lLTnNY9j5ea2XPFoN0ySHGANutIp/i/N+z5xnLwfkqt8nQux3TQkBxC/WBHehItAVF/JSDIRNUdfy3lgbTaBvsLi2skHnuUuxQ/VLuNk= 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:BL2PR03MB563;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB563; X-Forefront-PRVS: 06607E485E X-Microsoft-Exchange-Diagnostics: =?utf-8?B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XBKNvl17FesXz+t5NdwJTBZJm3pJQWva3QlLvOSvmWQCRib9MwVAs6tT2ihEm8N1bGpxuGMgLsHVzOelaJkCHMAoIc=;20:KuVLlSikCRASIn8VYo3auAS/W1tKUTpr8MTfIThOZ/8CyS5UAJTKvMYgUhrcQKxdi4D1xKkFWwn+h0nRRYKmww== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2015 04:32:23.6661 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB563 X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB145;2:PV52jr+NF29zQUSw77ZAZlk044ZgQfqOa1IfQ9Aso/lNAld7YQJK1bnTtzLbVVwfcldd5XljDdEGkyCstDB1Q3xpNDFpOrKX1gl0Xy8A4qNWSKJ57qYQrqZ5IFGH77o925z1txXTfhiVNb0Sx3zQFB6Nl+1792iYexEGdaIUhMI=;3:ohcF9t4VdFQMeL9Oy8dL4/FTcckS030CHlEvx6aXacHESuGpW1K5PI09PULzG5bpT/2Wo04bIcEWdDU83zu7xlYKiOZDR/FZLT2L+HcuRi989C826UDjsMNYI9y6XyXtiysIIvJPZp1EAJ56xJw6acvtOFgFqf187UhvkcRzpfyNjbAeAXqQNCSZ4O/xnd6/EUh3BdBSr4RU1n4hiFNvZi24oJAYyqNKdjAj1xRJP9Q=;25:854eJnSzk6frloT/s7x+Rm6hQEIrduGtTCEtEyI+rbvfSjbOTs6eQjF6drH2mcYFztcohNgWJmGFOXifKqD7alVG3WjxR99HPjW1pxIgT3Hon5qwUI8xoPBt+RD1jIZeXJMBE7tRj/Lcg3mAD5SDqLoMs/prEBI8vFbwPNDSYCjv0U1h2NdthzNavSieMrdjR/ZP6cfJXbUCMue16lbf5Z7APfkHZmHkZZqcxGtz5WJNiqodhayFNxG9BGC3QDkEb+ZKHHSEu4l28AKlzV50zA==;23:Qez2eX6jBk2gewClZje8An1yrrPboItIgPDjwp1Et6ykABZhacZS42l5+R3Ygg3o8axdEy9NWnZpPOZzg4VvsAKN8ifqJRFXKhSpAVWixlXN+UkLmhi5LhaiA4LxKL2rYPODdSfLqNCufciKH91dYrIOVSkHlfA5MP4/LVdxJeCWwXW0JaK1fpw1Dvd7qFW0EBwrokjO1n8R59KCflAum/peWyN/a2a7D0ZB7adudWuEa/7Mz4RWVOGabc6WqxSl X-OriginatorOrg: freescale.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2399 Lines: 71 On Thu, Aug 6, 2015 at 11:16 AM, Scott Wood wrote: > 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 Remapping is a concise solution. what's the harm of it? Keeping things simple is good in my opinion. -Chenhui -- 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/