From patchwork Wed Apr 21 09:16:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1468648 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=INaZWHy0; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FQFKm4W1qz9sRR for ; Wed, 21 Apr 2021 19:16:28 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5CA5482B48; Wed, 21 Apr 2021 11:16:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="INaZWHy0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3513C82B48; Wed, 21 Apr 2021 11:16:17 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2072a.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::72a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2C33A826BA for ; Wed, 21 Apr 2021 11:16:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=avg5zr1tgnNUDRO42bgrGrZPvyLf6fCp4glUZQQnRTyq+BThjmJiNHNhxf1ddqKsW54eK1NGtc05noswrdGicgZX3MnGop9MAr/AdmGn8X1+VeMzXRFGRLd34DcUqwcC+2BG40Gyj9PN56ZaJt95pgcerXe3W33Et/no+6v/q2RkzrPassubMx2WVs+iMpvMX86VQr/RSQTS7eEzOHenrtob3S+983zawFgbGK3ny4fNXNLNgN2PgxEmdZ6yYx6wvRdtwavJ7s9JVOcdhnbr3LGqxInA3ay89kRbyemYbVUIjvwKRBVbCeEKkqaCba6xjkcttb9drAtoMCg1GB0kDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qlmJOgo+ybYtRP4jZaQlErzowoqnStHe/RySYBlIwRI=; b=W30Fr25BgooQo2V52NTgAP8xNCYf7YBaQrEJCbMufvChouT4wBFASXBGPMXCT/InmLLpdVNrf+OvmkTBXswT2KNbxXnNsIs+/fR2JgoN41p+/QoJPsQUPr8gBBk1ME6aNJvSmWVOHpFvgM6MhFkkmxlYXViOoDSoxhUZHx5ZfT8W++yfTfP11ABtCj+3AS7I54C/Wu28sryem7UNFuEeIW/of8LPST2nUAFYDFzIB7A22FeznIWzEH9UWCS8LwU7MOoGRlUDNKV17x1YPahMqox3UHLYOjyoqRYfwuUD1dPZbf+9Sd7Ay0nUXIXX7EEBeyEaP6d1Go5fT2jGH0Tfkw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qlmJOgo+ybYtRP4jZaQlErzowoqnStHe/RySYBlIwRI=; b=INaZWHy04H0IDAW613CJrecvei3BXDUn2igJ1JaSnF0ZvCWzo1vdkWAtn7eiEMtuwjG2VZ8Wb4vXQ1EwI0LALjWjYVcMI4AQ0hMP+fmEcsm/UNrGB4eRPr/u/4pz6KStXzKaoRBR+Q7qPo31yixxhKNWxHOspgAuMMmWrLLqd2g= Authentication-Results: lists.denx.de; dkim=none (message not signed) header.d=none;lists.denx.de; dmarc=none action=none header.from=prevas.dk; Received: from AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:3f::10) by AM9PR10MB4514.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:26d::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21; Wed, 21 Apr 2021 09:16:12 +0000 Received: from AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM ([fe80::888d:190b:b3b5:1ad2]) by AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM ([fe80::888d:190b:b3b5:1ad2%3]) with mapi id 15.20.4065.021; Wed, 21 Apr 2021 09:16:12 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Christophe Leroy , Wolfgang Denk , Stefan Roese , Tom Rini , Rasmus Villemoes Subject: [PATCH v3 0/2] powerpc: introduce CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD Date: Wed, 21 Apr 2021 11:16:01 +0200 Message-Id: <20210421091603.1459154-1-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210413193827.2632540-1-rasmus.villemoes@prevas.dk> References: <20210413193827.2632540-1-rasmus.villemoes@prevas.dk> X-Originating-IP: [80.208.71.248] X-ClientProxiedBy: AM9P193CA0027.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:21e::32) To AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:3f::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from prevas-ravi.prevas.se (80.208.71.248) by AM9P193CA0027.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:21e::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.18 via Frontend Transport; Wed, 21 Apr 2021 09:16:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5e85daf1-db54-498b-21d7-08d904a61b79 X-MS-TrafficTypeDiagnostic: AM9PR10MB4514: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: M6XDGQt33yp1NWKQIRZTgvgvCAcG6QJ+5iw3U69AC5BGLbhi9wJ2vp24JLorkIYn9qm7eqDSYwNcEp2SHPpFFlRlDAmEBGpCzLDCP3LCpBvFOo7JC7y67uHYMB7/r3vHwXkDxB8+nSkXT3dc3LTg+IOk71RLz5XIftlSR6OTWM/VZ25I4KNmkkvrmhYrZQrCWRwqK958QJ9GEohqby4cFmc7bm0ZwGT22y9zBXgUPcdXNuQ7VG7dgw38GvbQnD+eshgCNEhC6rSHV92AW1yGuzRIDBbvqa2wAoibgLuD3TbT3ZK6zT04xE80QnFI4Py7Pv7DicxLDBdKEi9I4ass1mMmswHh7/H4YSWPmUd/FzoFOsdw7LGkyNZ0HCqbwRPpZpUxeMc4K1kLy1JY/u752rDk/ByXnb2t8AkNWF4dIr4j2MSdbnK4KnilSjtg2meEcoyThrcTlL2eQG3bEf69wbyxAgGp+5CZYFqShkxxzvoK7Gq76jFPxsrf4ZtR4JK7c3ysFKcA8Br+h94GGQ/sZkLfT7CJURVyYBfJP0T5YOXs1AFXvWwwI7ylo7ozNmYOKU5KItX6gT+Krg3+BVIrqrBLKpPZBwTo3WVAf1amQtTJFIRDXOhHutva7CUV1334TluDsFcRQLVXELBQ5iPHaci4XjVbgvKnyXH4O+2WM5i+u3zwQ1gOddVzo91+2AGFAfsBhTATul8XGFAuEjhbHeVdreBTsK03uB6RA3Bh078= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(366004)(136003)(346002)(396003)(39850400004)(376002)(5660300002)(6666004)(6916009)(1076003)(83380400001)(86362001)(66946007)(36756003)(66476007)(66556008)(6512007)(2616005)(107886003)(16526019)(44832011)(186003)(4326008)(966005)(8676002)(956004)(478600001)(6486002)(6506007)(38100700002)(38350700002)(316002)(52116002)(54906003)(8976002)(8936002)(2906002)(26005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: ITl+iT7/trsPpl5ZDxxethAtiTr/kwigHK2Nw//Lov3o+5fH++uZQ3PaBHFrl7Yrq23UzZdsjtkB17BQjWWfxc4okhKqutjLKVaCafvM5fFu32xjgquoNxyu89H9kHzCO86aiDyj58fQYYD8RJyjlKr9s3q6v/jEJt9Oq3zz4qJQv+1a3Zixwd5E8Y5t+jzNs7Woht3e/Dc/jgDXsmH2vFJbVjbgvGi8sG/fE+ESkVAaqWHsFh+bbHpkY6vP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cCgrpZVKf5UL X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 5e85daf1-db54-498b-21d7-08d904a61b79 X-MS-Exchange-CrossTenant-AuthSource: AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Apr 2021 09:16:12.3270 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kcnOJeSK249cE+x03W9RF2wFi/4f2CPrC0quTa66Catalvj9gV2vAG9ysogXDzSB8YR+95zIflrmVtuyg3iH4xfSsWpmT8se7TUTjZB0ymo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR10MB4514 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean v3: Introduce a little helper function as suggested by Stefan. gcc generates the same code before and after that refactoring - in particular, the code is still the same as before these patches when the config option is left at its default. Include Stefan's Reviewed-bys. v2 cover letter: Back in June, I sent a patch [1] to reduce the number of WATCHDOG_RESET calls in flush_cache() to one per 64K. Wolfgang rejected that, saying that the threshold should be configurable. So here's a new version which introduces a config knob. When left at its default, the generated code is binary identical to what one gets before these patches. I stumbled on the CONFIG_5xx and thought I ought to make the config knob depend on !CONFIG_5xx, but it turns out it's better to just remove that piece of legacy, hence the first janitorial patch. [1] https://lists.denx.de/pipermail/u-boot/2020-June/414852.html Rasmus Villemoes (2): powerpc: lib: remove leftover CONFIG_5xx powerpc: introduce CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD arch/powerpc/Kconfig | 1 + arch/powerpc/lib/Kconfig | 9 +++++++++ arch/powerpc/lib/cache.c | 17 +++++++++++++---- 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 arch/powerpc/lib/Kconfig