From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752079AbdGAT5E (ORCPT ); Sat, 1 Jul 2017 15:57:04 -0400 Received: from mx2.suse.de ([195.135.220.15]:57869 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751922AbdGAT5C (ORCPT ); Sat, 1 Jul 2017 15:57:02 -0400 Subject: =?UTF-8?Q?Re:_=e7=ad=94=e5=a4=8d:_[PATCH_v4_20/28]_ARM:_owl:_Implem?= =?UTF-8?Q?ent_CPU_enable-method_for_S500?= To: =?UTF-8?B?5YiY54Kc?= Cc: Arnd Bergmann , Thomas Liau , Linux ARM , mp-cs , =?UTF-8?B?5byg5Lic6aOO?= , =?UTF-8?B?5byg5aSp55uK?= , 96boards@ucrobotics.com, support@lemaker.org, Linux Kernel Mailing List , Russell King References: <20170606005426.26446-1-afaerber@suse.de> <20170606005426.26446-21-afaerber@suse.de> <6d9d0d63-113e-b050-a54e-62746ebc6013@suse.de> From: =?UTF-8?Q?Andreas_F=c3=a4rber?= Organization: SUSE Linux GmbH Message-ID: Date: Sat, 1 Jul 2017 21:56:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, Am 01.07.2017 um 06:42 schrieb 刘炜: > OWL_CPUx_ADDR is the physical address of CPUx wakeup function. > OWL_CPUx_FLAG is a valid flag of OWL_CPUx_ADDR. > > After CPUxs are wakeuped by SEV instruction, they will check their own OWL_CPUx_FLAG register. If the register vlaue is 0x55aa, CPUx will jump to OWL_CPUx_ADDR to boot up, otherwize go to sleep by WFE. > > So the pen release staff is not necessary, you can remove these code safely. Thank you for the quick confirmation! I have just tested a patch, and it appears to work. Is owl_v7_invalidate_l1 necessary? mach-sunxi (that Arnd pointed to as example) uses secondary_startup directly, without custom assembler code. https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm/mach-actions/headsmp.S > BTW: CPU2/3 must exit the power gate state before wakeup, and CPU1 is always power on and has no power gate control. Yes, the S500 SPS was luckily documented in the manual. The power-gating for CPU2/3 is already implemented: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm/mach-actions/platsmp.c For S900 however SPS is sadly not documented... If you know who at Actions Semi could help there, please also take a look at: https://github.com/96boards/documentation/issues/59 Best regards, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)