Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756861Ab2HFSCY (ORCPT ); Mon, 6 Aug 2012 14:02:24 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:33673 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753674Ab2HFSCX (ORCPT ); Mon, 6 Aug 2012 14:02:23 -0400 Date: Mon, 6 Aug 2012 14:02:19 -0400 (EDT) From: Nicolas Pitre To: Russell King - ARM Linux cc: Cyril Chemparathy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, arnd@arndb.de, catalin.marinas@arm.com, will.deacon@arm.com Subject: Re: [PATCH 01/22] ARM: add mechanism for late code patching In-Reply-To: <20120806132642.GC18957@n2100.arm.linux.org.uk> Message-ID: References: <1343775898-28345-1-git-send-email-cyril@ti.com> <1343775898-28345-2-git-send-email-cyril@ti.com> <20120806111224.GA18957@n2100.arm.linux.org.uk> <501FC44E.1040806@ti.com> <20120806132642.GC18957@n2100.arm.linux.org.uk> User-Agent: Alpine 2.02 (LFD 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 989 Lines: 22 On Mon, 6 Aug 2012, Russell King - ARM Linux wrote: > On Mon, Aug 06, 2012 at 09:19:10AM -0400, Cyril Chemparathy wrote: > > With a flush_cache_all(), we could avoid having to operate a cacheline > > at a time, but that clobbers way more than necessary. > > You can't do that, because flush_cache_all() on some CPUs requires the > proper MMU mappings to be in place, and you can't get those mappings > in place because you don't have the V:P offsets fixed up in the kernel. > Welcome to the chicken and egg problem. This problem is fixed in this case by having the p2v and v2p code sites using an out-of-line non optimized computation until those sites are runtime patched with the inlined optimized computation we have today. Nicolas -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/