From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABE49C433DB for ; Thu, 4 Mar 2021 12:48:30 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 10E9564F23 for ; Thu, 4 Mar 2021 12:48:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 10E9564F23 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2mOUCHbbAycyw2M1hrHOyYQNfiY5bSq4Knr75f/v9Xs=; b=I7lKkR+PEhz+k65MHyChK4nU2 IvJNuLRdXetHdAgkMbrdrWLviU4I3Hvt7TjIn1j7cDVJAvp3rKHy6KpCPJvJR2Nh6i+GNF0+sMvv5 7Hjo0jXsk7EDv0lmtINnBaNbb55TFKaM1X3hkJ1JAwepy+pyZiNC2ZarxraTXTdAWlimp4wTIO0ad 6ktJKzC0Y8cCSaArX4Vzfo9jMu8bdDdHn3ch3+Q7yQpBuMx+g6gLzKDt/bnrShVFkIwB57Lmjs7fl zu8S1iehl6pfv/cutpdC13Nys+oEY1u/Pa3l+BC4wQcYIFZb0IRCYbWWHm4syOxPu8EboSZ1g9woe fcWffY21Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lHnMG-008eck-Nk; Thu, 04 Mar 2021 12:45:37 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHnLx-008eb2-Ln for linux-arm-kernel@lists.infradead.org; Thu, 04 Mar 2021 12:45:24 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4FD5464F23; Thu, 4 Mar 2021 12:45:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614861915; bh=rRkq4AgwaM5sAU/O/FCFWW8XCQ0GPmqh4HUrIxNpIAE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ew9CLrW8PlZ1ViGsPnEODtf3Rm+oxklR9VIDFRKs5+PByg8oseDKrj902zkZXOOK8 XCfXw324rmKUYg90BoKZarTR9WMZNnCQPWw3+5i+FgT07YqggSE619PrdkNkpLpcJE h3BkUA7frGAdaqjjBKzd1Ags3N6vBTByAlwoKeYohRas2FJ+t2O3jqj+dPH26MK7Il IPLtL17BnrG5wAt4jKoOtKOiV+Rk3ul4wiHjD4TWyukjzxTzlcfnN1VboDpyJJ2pIQ Bx+A3xGT4rgcToIpJMVie/VIBIC5xzXlGEgwprcJqI+eFehq4V8MAuPJUPsuiDOT8v oMDnIooA+f4hA== Date: Thu, 4 Mar 2021 12:45:11 +0000 From: Will Deacon To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, cai@redhat.com, catalin.marinas@arm.com, elver@google.com, james.morse@arm.com Subject: Re: [PATCHv3] arm64: initialize per-cpu offsets earlier Message-ID: <20210304124510.GA20956@willie-the-truck> References: <20210302115335.42135-1-mark.rutland@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210302115335.42135-1-mark.rutland@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 02, 2021 at 11:53:35AM +0000, Mark Rutland wrote: > The current initialization of the per-cpu offset register is difficult > to follow and this initialization is not always early enough for > upcoming instrumentation with KCSAN, where the instrumentation callbacks > use the per-cpu offset. > > To make it possible to support KCSAN, and to simplify reasoning about > early bringup code, let's initialize the per-cpu offset earlier, before > we run any C code that may consume it. To do so, this patch adds a new > init_this_cpu_offset() helper that's called before the usual > primary/secondary start functions. For consistency, this is also used to > re-initialize the per-cpu offset after the runtime per-cpu areas have > been allocated (which can change CPU0's offset). Is this still early enough now that we have the idreg overrides on the command-line, which are parsed from C code? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel