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.92.3 #3 (Red Hat Linux)) id 1jbLGh-0007y1-C8 for barebox@lists.infradead.org; Wed, 20 May 2020 09:44:13 +0000 From: Sascha Hauer Date: Wed, 20 May 2020 11:43:51 +0200 Message-Id: <20200520094403.12651-8-s.hauer@pengutronix.de> In-Reply-To: <20200520094403.12651-1-s.hauer@pengutronix.de> References: <20200520094403.12651-1-s.hauer@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: [PATCH 07/19] Introduce idle slice To: Barebox List Cc: Edmund Henniges , =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= RnJvbTogRGFuaWVsIEdsw7Zja25lciA8ZGdAZW1saXguY29tPgoKU29tZSBjb2RlIGNhbid0IGZv cmVzZWUgd2hpY2ggcmVzb3VyY2VzIHdpbGwgYmUgdXNlZCBieSBpdHMgcG9sbGVyLiBUaGlzCmlz IHRoZSBjYXNlIGVzcGVjaWFsbHkgaW4gcG9sbGVycyB0aGF0IHdpbGwgZXhlY3V0ZSBhcmJpdHJh cnkgY29tbWFuZHMKaW5wdXQgYnkgdGhlIHVzZXIuIFdpdGggdGhpcyBjb21taXQgYSBzcGVjaWFs IHNsaWNlIGlzIGludHJvZHVjZWQgdGhhdCBpcwpyZWxlYXNlZCBvbmx5IHdoZW4gQmFyZWJveCBp cyB3YWl0aW5nIGZvciBjb25zb2xlIGlucHV0IGFuZCBvbmx5IHdoZW4gaXQKaXMgZG9pbmcgdGhh dCBvdXRzaWRlIG9mIGFueSBjb21tYW5kLiBDb2RlIHRoYXQgd2FudHMgdG8gZGVwZW5kIG9uIHRo ZQppZ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