Received: by 10.223.164.202 with SMTP id h10csp267928wrb; Tue, 14 Nov 2017 15:04:44 -0800 (PST) X-Google-Smtp-Source: AGs4zMbmC6KL3eKRFGq7+7Mq3rTt6I8/2JCsY77w5yC5p02llzUrFixaYxJ+yZwXpPWSeGMSwHPs X-Received: by 10.98.42.75 with SMTP id q72mr15111325pfq.221.1510700684489; Tue, 14 Nov 2017 15:04:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510700684; cv=none; d=google.com; s=arc-20160816; b=OUMDbulcgLQY9OuH+EelhFLglVakyDx2PA46GPliOJ/yGf7emk+m5EbgTLj6Hla0Ot 5nWOzcKEFiTicUYNTngm0m9OzlfL5mzpRv7ejop8blzfav7H6ChSo8zItlxryv5rBHFI Xhmh8VugOMegArk39dvq/fFVZyHIo6keqmKnx/XXn5qRIbB87ZkPmuOFTFw9mwrRu4/W DvkFCQdtX3Ip0XmQfy0lwx0Rha7XPaCZ8jYznXt2pD300b02Etw6IIwK+GMEFf+i8IXS tfoSjOrYRYlFfxHKKJ794AH9CyJ3CAIOz7myyBTfZRJv6wqA91cuppieBbLdBToYgz0f w7Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=n49j0/P04dcaziex4h3smJx0XbCHUlA58gq7mKe3/To=; b=h7hnXNtKxuf9yq2wbFjiAYmgNWDNx/IILk+L7YmLO60q6Y9Huz9p31lURNI0gTmzJI mFG8undIs7s18tJ5B73qnkjwk+Loa2jMk2vOppEw9qfTUwXn5fZCPMDW5o0n79ypM5l9 1+s6hcHZbZkVSovUBBP66ihObN42GlP/DuQxZqslK7nvwIBZ/9Qg1orfI9UqDfwwXO+D BrFmmGqRZg5SFACnzaPQR39iDhJPyhApHeRWJK9w/d5JEbYSqYCUzW80WW/nJ84w/Fvl FbCK6FkUbpLeX+of+/ED8o7Wwd17mYFBBDZJ4j903ZDj5ibTru1/Pl83kqyLava6iTus 0B8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 83si18304428pfj.308.2017.11.14.15.04.32; Tue, 14 Nov 2017 15:04:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756689AbdKNUyV (ORCPT + 88 others); Tue, 14 Nov 2017 15:54:21 -0500 Received: from muru.com ([72.249.23.125]:48624 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752528AbdKNUyM (ORCPT ); Tue, 14 Nov 2017 15:54:12 -0500 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 1DC1C8064; Tue, 14 Nov 2017 20:55:59 +0000 (UTC) Date: Tue, 14 Nov 2017 12:54:06 -0800 From: Tony Lindgren To: Tero Kristo Cc: Joonsoo Kim , Pavel Machek , pali.rohar@gmail.com, sre@kernel.org, kernel list , linux-arm-kernel , linux-omap@vger.kernel.org, khilman@kernel.org, aaro.koskinen@iki.fi, ivo.g.dimitrov.75@gmail.com, patrikbachan@gmail.com, serge@hallyn.com, abcloriens@gmail.com, "Aneesh Kumar K.V" , Vlastimil Babka , Andrew Morton , Stephen Rothwell , Russell King Subject: Re: n900 in next-20170901 Message-ID: <20171114205406.GC28152@atomide.com> References: <20171109150854.GC28152@atomide.com> <20171110001315.GA29669@js1304-P5Q-DELUXE> <20171110032610.GJ28152@atomide.com> <20171110063727.GA32073@js1304-P5Q-DELUXE> <20171110153620.GO28152@atomide.com> <20171114063724.GA16969@js1304-P5Q-DELUXE> <20171114173719.GA28152@atomide.com> <5c885f60-bc8c-5f8e-dc81-57eacc57abc8@ti.com> <20171114194432.GB28152@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Tero Kristo [171114 20:03]: > On 14/11/17 21:44, Tony Lindgren wrote: > > * Tero Kristo [171114 19:34]: > > > I guess you could just use rx51_secure_dispatcher and ditch the > > > save_secure_ram_context call completely (and most of the other related > > > code)? That one would handle the cache also in a clean manner. > > > > > > Something like: > > > > > > rx51_secure_dispatcher(25, 0, FLAG_START_CRITICAL, 4, > > > __pa(omap3_secure_ram_storage), 0, 1, 1); > > > > That's different, as rx51_secure_dispatcher does the following: > > > > - Use arguments + 1 instead of 4, we currently use just 4 > > - Disables local_irq and fiq, we are not doing that now > > - Flushes and invalidates cache range, we are not doing that > > - Calls omap_smc3 that only does mov r6, #0xff, and does not > > do mov r2, #4 > > - Missing nops after it's done > > > > This just based on a quick look I did earlier. So just > > because of the extra work it does we don't want to do it > > even if it worked :) > > Hmm ok, I was just thinking that all the extra flushes, irq disables etc. > might be good to have in place, as a safeguard when entering secure mode. > You might get glitches in certain conditions otherwise. Well it's been close to 10 years already without those flushes. And we only call this once on init.. And further changes should be a lot easier now. > The things it is missing might just be clutter. > > Anyway, that said, the changes you did look sane, but I might have cleaned > it up a bit further. :) Yeah OK, let's consider that as a separate patch. This attempts to not change the functionality, just move it out of SRAM. Regards, Tony From 1584079370671298650@xxx Tue Nov 14 21:43:30 +0000 2017 X-GM-THRID: 1577552291468010502 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread