From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fkn0j-0003K1-0e for barebox@lists.infradead.org; Wed, 01 Aug 2018 09:01:38 +0000 Received: from kresse.hi.pengutronix.de ([2001:67c:670:100:1d::2a]) by metis.ext.pengutronix.de with esmtp (Exim 4.89) (envelope-from ) id 1fkn0X-0002cz-9D for barebox@lists.infradead.org; Wed, 01 Aug 2018 11:01:25 +0200 Message-ID: <1533114085.20186.1.camel@pengutronix.de> From: Lucas Stach Date: Wed, 01 Aug 2018 11:01:25 +0200 In-Reply-To: <20180801083831.12983-1-l.stach@pengutronix.de> References: <20180801083831.12983-1-l.stach@pengutronix.de> Mime-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH] ARM: mmu: fix cache flushing when replacing a section with a PTE To: barebox@lists.infradead.org UGxlYXNlIGlnbm9yZSB0aGlzIHBhdGNoLCBpdCdzIGFscmVhZHkgcGFydCBvZiBtYXN0ZXIgYW5k IGhhcyBiZWVuCnJlc2VudCBkdWUgdG8gUEVCS0FDLgoKQW0gTWl0dHdvY2gsIGRlbiAwMS4wOC4y MDE4LCAxMDozOCArMDIwMCBzY2hyaWViIEx1Y2FzIFN0YWNoOgo+IFdoZW4gcmVwbGFjaW5nIGEg c2VjdGlvbiB3aXRoIGEgUFRFLCB3ZSBtdXN0IG1ha2Ugc3VyZSB0aGF0IHRoZSBuZXdseQo+IGlu aXRpYWxpemVkIFBURSBlbnRyaWVzIGFyZSBmbHVzaGVkIGZyb20gdGhlIGNhY2hlIGJlZm9yZSBj aGFuZ2luZyB0aGUKPiBlbnRyeSBpbiB0aGUgVF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