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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 4F505C433DB for ; Mon, 1 Mar 2021 16:11:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 CE55E64DE5 for ; Mon, 1 Mar 2021 16:11:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE55E64DE5 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zVLuPU8/eO7R95ice/OytbvL7E8CcxMTU2HihUM8hGg=; b=GKlROEWH/LDPbw2LRKFUH0Vv+ mOaoFSuISiSFf9BvY1nrb36SCXF5hBE963IZjjiJUKRutJgWWXAfDJ0voO2fp4qzzi78HshiCNnWv 324BLvM0IXDlLUewHsFwfCNzqffU4lJKwm1i89DlvrPh29u77xhRzd/z8oU5B+SJLa54nkTmJVYAX X/hAiJlBMooH1NYUFAVaGX3ECJehZX7sHWml8fv4/T+y3vLRsfLPMUnHHMSPrMjECIF4iOzDQ1XDo PJX/tPKGiLC6Xj1ZF8cOI1q301csKhuvG0EUVM2XrmS6a6nrtCAGwOhGNJc2BRZMxFcoBVOJ+uhit fgAx7UPcw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lGl7h-0000G8-No; Mon, 01 Mar 2021 16:10:17 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lGl7f-0000FB-5y for linux-arm-kernel@lists.infradead.org; Mon, 01 Mar 2021 16:10:15 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 406FC64DBD for ; Mon, 1 Mar 2021 16:10:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614615013; bh=sfL1+ys+M7o/rJ8m8vX6gjIS1NY0n6fR1NYu2OMNwCM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=KaHIJdOJ8/0yKjqtvZA7D7DhewkfN5K4v4YzsxsZJ/AqoL9YreS1+sbeJpds98MNy h5hBHg7L7WwJusXANZH9DbaQ3VeB9d4l8BKxXb6BS2fSR40bBUMvb3JGYdeym86b9J TtehAmvwRihJJVlHF3mSloESClyNWtcWnhlMulYXITKSFF4ZI2P9TFQlabGoKbdM2t gwkGLtQXX2LY1u6dCR4t7KShMc9UcV9oGmyF1R8vUVSpjqlbde8MBSprZzDH/k1GLT HZSDDDm4O8WTyXPf5+JlClaaPvFunhoyMFNBN37YKp2YfNZ51h/INE4VnMpFPc7bi8 kZRJFEleXZX1A== Received: by mail-ot1-f52.google.com with SMTP id k13so16930801otn.13 for ; Mon, 01 Mar 2021 08:10:13 -0800 (PST) X-Gm-Message-State: AOAM531cZU51gAGj7Qq2kKhRk7dt2qu7NYKhfQ8YAalD0ieq3WApZX1x YRBPvEqlkA4jeGnueMga7fzwSLWryscvRX4xutg= X-Google-Smtp-Source: ABdhPJzY5OqTs1CDv1dmPFc6dQmUahW52j90T4KmO49MBJEv0nSaFLkhXzNxvh6gEkPQ4fjI7zfy3PNPhAbmhq9mfQ8= X-Received: by 2002:a05:6830:135a:: with SMTP id r26mr13735613otq.77.1614615012501; Mon, 01 Mar 2021 08:10:12 -0800 (PST) MIME-Version: 1.0 References: <20210210185532.8425-1-ardb@kernel.org> <20210210185532.8425-4-ardb@kernel.org> <20210301155339.GW1463@shell.armlinux.org.uk> In-Reply-To: <20210301155339.GW1463@shell.armlinux.org.uk> From: Ard Biesheuvel Date: Mon, 1 Mar 2021 17:10:01 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 3/3] ARM: cache-v7: get rid of mini-stack To: Russell King - ARM Linux admin X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210301_111015_345727_D7E09528 X-CRM114-Status: GOOD ( 19.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Linus Walleij , Android Kernel Team , Linux ARM , Nicolas Pitre 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 Mon, 1 Mar 2021 at 16:53, Russell King - ARM Linux admin wrote: > > On Wed, Feb 10, 2021 at 07:55:32PM +0100, Ard Biesheuvel wrote: > > Now that we have reduced the number of registers that we need to > > preserve when calling v7_invalidate_l1 from the boot code, we can use > > scratch registers to preserve the remaining ones, and get rid of the > > mini stack entirely. This works around any issues regarding cache > > behavior in relation to the uncached accesses to this memory, which is > > hard to get right in the general case (i.e., both bare metal and under > > virtualization) > > > > While at it, switch v7_invalidate_l1 to using ip as a scratch register > > instead of r4. This makes the function AAPCS compliant, and removes the > > need to stash r4 in ip across the call. > > You don't mention that we only do this for MP capable cores, which > is in itself quite a big change - maybe that change should be a > separate commit? > I'm not quite sure I understand what you are referring to here. All call sites are updated to use the macro to call v7_invalidate_l1(), so I don't think the UP-only and SMP-capable setup() paths are treated any differently. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel