From mboxrd@z Thu Jan 1 00:00:00 1970 From: achandran@mvista.com (Arun Chandran) Date: Wed, 27 Aug 2014 10:26:45 +0530 Subject: Kexec on arm64 In-Reply-To: <1409092348.21254.9.camel@smoke> References: <1406162287.4062.39.camel@smoke> <20140724093603.GC4079@leverpostej> <1406247468.4062.59.camel@smoke> <1406333901.4062.69.camel@smoke> <20140728153812.GA2576@leverpostej> <1406592548.28348.49.camel@smoke> <20140729133557.GQ2576@leverpostej> <1406668741.28348.75.camel@smoke> <1407172869.8971.54.camel@smoke> <1407442058.8971.106.camel@smoke> <1409092348.21254.9.camel@smoke> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Geoff, On Wed, Aug 27, 2014 at 4:02 AM, Geoff Levand wrote: > Hi Arun, > > On Wed, 2014-08-13 at 16:39 +0530, Arun Chandran wrote: >> I have one more concern regarding flushing of D-cache area corresponding >> to the kexec_list entrees. >> >> Currently kexec_list_walk() is doing >> >> 1) flush_dcache_area of the kexec_list[0] till PAGE_SIZE >> >> 2) continue accessing entries in kexec_list[0] to PAGE_SIZE >> >> 3) switch to next kexec_list depending upon kexec_list[entry] & flag >> == IND_INDIRECTION >> >> 4) goto 1 >> >> Shouldn't that be doing flush_dcache_area() after completely using the list?? > > We just want to get any data in the dcache out to the PoC before > disabling the dcache, so as long as there are only reads, and no writes > to those addresses, kexec_list_walk() should work OK. > Yes. I missed that point. If we don't perform any writes flushing works just fine. > I will move the flush of the new kernel image to after it is copied in > relocate_new_kernel(). I think that your L3 cache may not work with > what we have now: > > current: invalidate dcache -> turn off dcache -> write data to PoC > proposed: turn off dcache -> write data to PoC -> invalidate dcache > Yes this exactly what I have done here http://lists.infradead.org/pipermail/linux-arm-kernel/2014-August/278857.html ; that code should live inside relocate_new_kernel(). I am doing the cache invalidation(only invalidation) in relocate_new_kernel(). As we run that code after cache's are off(L3 only comes to picture when lower level caches are on) we are writing to data (new kernel) to PoC. --Arun