From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mx1.emlix.com ([188.40.240.192]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZIUs-0005EX-35 for barebox@lists.infradead.org; Thu, 14 May 2020 18:22:21 +0000 Received: from mailer.emlix.com (p5098be52.dip0.t-ipconnect.de [80.152.190.82]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.emlix.com (Postfix) with ESMTPS id BBB8F5FDE7 for ; Thu, 14 May 2020 20:22:12 +0200 (CEST) From: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= Date: Thu, 14 May 2020 20:21:52 +0200 Message-Id: <76fd510b47399354e06406a6bb82f562d350d4cf.1589477005.git.dg@emlix.com> In-Reply-To: References: In-Reply-To: References: 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 v2 04/10] Introduce idle slice To: barebox@lists.infradead.org Cc: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= U29tZSBjb2RlIGNhbid0IGZvcmVzZWUgd2hpY2ggcmVzb3VyY2VzIHdpbGwgYmUgdXNlZCBieSBp dHMgcG9sbGVyLiBUaGlzCmlzIHRoZSBjYXNlIGVzcGVjaWFsbHkgaW4gcG9sbGVycyB0aGF0IHdp bGwgZXhlY3V0ZSBhcmJpdHJhcnkgY29tbWFuZHMKaW5wdXQgYnkgdGhlIHVzZXIuIFdpdGggdGhp cyBjb21taXQgYSBzcGVjaWFsIHNsaWNlIGlzIGludHJvZHVjZWQgdGhhdCBpcwpyZWxlYXNlZCBv bmx5IHdoZW4gQmFyZWJveCBpcyB3YWl0aW5nIGZvciBjb25zb2xlIGlucHV0IGFuZCBvbmx5IHdo ZW4gaXQKaXMgZG9pbmcgdGhhdCBvdXRzaWRlIG9mIGFueSBjb21tYW5kLiBDb2RlIHRoYXQgd2Fu dHMgdG8gZGVwZW5kIG9uIHRoZQppZGxlIHNsaWNlIG11c3Qgc2VsZWN0IENPTkZJR19JRExFX1NM SUNFIHRvIG1ha2UgaXQgYXZhaWxhYmxlLgoKU2lnbmVkLW9mZi1ieTogRGFuaWVsIEdsw7Zja25l ciA8ZGdAZW1saXguY29tPgotLS0KIGNvbW1vbi9LY29uZmlnICAgICAgICAgICAgIHwgIDQgKysr KwogY29tbW9uL2JpbmZtdC5jICAgICAgICAgICAgfCAgMyArKysKIGNvbW1vbi9jb21tYW5kLmMg ICAgICAgICAgIHwgIDMgKysrCiBjb21tb24vY29uc29sZV9jb3VudGRvd24uYyB8ICAzICsrKwog Y29tbW9uL3BvbGxlci5jICAgICAgICAgICAgfCAgMiArKwogY29tbW9uL3NsaWNlLmMgICAgICAg ICAgICAgfCAyNCArKysrKysrKysrKysrKysrKysrKysrKysKIGluY2x1ZGUvc2xpY2UuaCAgICAg ICAgICAgIHwgMTAgKysrKysrKysrKwogbGliL3JlYWRsaW5lLmMgICAgICAgICAgICAgfCAgOCAr KysrKysrLQogOCBmaWxlcyBjaGFuZ2VkLCA1NiBpbnNlcnRpb25zKCspLCAxIGRlbGV0aW9uKC0p CgpkaWZmIC0tZ2l0IGEvY29tbW9uL0tjb25maWcgYi9jb21tb24vS2NvbmZpZwppbmRleCA0MDBj MDU1M2MuLjJmYTkxNDBkZSAxMDA2NDQKLS0tIGEvY29tbW9uL0tjb25maWcKKysrIGIvY29tbW9u L0tjb25maWcKQEAgLTkxMyw2ICs5MTMsMTAgQEAgY29uZmlnIEJBUkVCT1hDUkMzMl9UQVJHRVQK IGNvbmZpZyBQT0xMRVIKIAlib29sICJnZW5lcmljIHBvbGxpbmcgaW5mcmFzdHJ1Y3R1cmUiCiAK K2NvbmZpZyBJRExFX1NMSUNFCisJYm9vbAorCWRlZmF1bHQgbgorCiBjb25maWcgU1RBVE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