From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755211AbdKNUCv (ORCPT ); Tue, 14 Nov 2017 15:02:51 -0500 Received: from fllnx210.ext.ti.com ([198.47.19.17]:61061 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754052AbdKNUCm (ORCPT ); Tue, 14 Nov 2017 15:02:42 -0500 Subject: Re: n900 in next-20170901 To: Tony Lindgren CC: Joonsoo Kim , Pavel Machek , , , kernel list , linux-arm-kernel , , , , , , , , "Aneesh Kumar K.V" , Vlastimil Babka , Andrew Morton , Stephen Rothwell , Russell King References: <20171109003639.GB23982@js1304-P5Q-DELUXE> <20171109035031.GA24383@js1304-P5Q-DELUXE> <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> From: Tero Kristo Message-ID: Date: Tue, 14 Nov 2017 22:01:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171114194432.GB28152@atomide.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. :) -Tero -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki