From patchwork Thu Feb 9 04:02:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 54699 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp118024wrn; Wed, 8 Feb 2023 20:21:38 -0800 (PST) X-Google-Smtp-Source: AK7set9q8P+dkHOQ12B5QwzT7HYQg2yDmWcZSDM6ytRy1GJJi6QwhBDmGBTE6Vz9Rf2+06LkR/L+ X-Received: by 2002:a50:9315:0:b0:49d:a87f:ba78 with SMTP id m21-20020a509315000000b0049da87fba78mr10177002eda.35.1675916497967; Wed, 08 Feb 2023 20:21:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1675916497; cv=pass; d=google.com; s=arc-20160816; b=QPaqBuinGq5pYnexWyzRiBfdreP/wvLaq6GZSJaFyxugLWyCOtzLn5U/gHIj2Mb0Ij OEk2DGihJgzBVFo9XcKkPAAMtW8Lhzl0kPeTFsgz8YntPtMR0kJP7DHk0xQaPDNe4Yyt JHgVSgitdm8dKHYtbG3K5Fc87yOhD+sww/ZEyEgY+Df55k2KGa2oR9IspIYUI4sADcgK QeLPZvLcqzJS8qI/ywxp2X4j0W69CqJtSOoLJnTezqBRP/WA2fDCiXna0Hf7IEGA3hBK sgL2Aqd5EePaqTmZWQU5C3DIHoPXmnTYtF7/hYlfM+MyovmkaZyvb5r26Lu1BZm4AWO5 QJ5g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=spQA0Zq7uD4qbyX35eaOb14VrOuk5tWvLqau+eATdG0=; b=gPTCjd9a77dubyH6QJKUsYwVxX5W1ZFGmYASHDxhors2Pr0a22L6QVJWL4zVITOH4x dNbHHs/yLVFsv3dMmya5FfPRHMioeUjhWKIB2tq6gNzpmkfMFBOQQaPf1Xpi8tYTWqtp 5O8rgI0CsgRbeYNQhfVkUUUDrVhAt7pM1twrADdRzcfd9PV76lvGdR6MvroG7nGlCXAv sJj3RlPCdqhpxHtSFjtTU8VsJA1p+44y2WPSkRTTErwSmMB1/Ijl6nGtMk91QoKAzp4U OW6r1WQG7gi5gV6tT4kacwstdKkGlCmcfxPlNi3wLVIVbFW3yftE3U84HyEI+r8JoZz0 JWtg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=GAPOtMDc; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a15-20020aa7d90f000000b004aab2870e39si796436edr.610.2023.02.08.20.21.15; Wed, 08 Feb 2023 20:21:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=GAPOtMDc; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232988AbjBIEDg (ORCPT + 99 others); Wed, 8 Feb 2023 23:03:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232907AbjBIECz (ORCPT ); Wed, 8 Feb 2023 23:02:55 -0500 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2127.outbound.protection.outlook.com [40.107.117.127]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D27DF303C1 for ; Wed, 8 Feb 2023 20:02:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xy3licoxj3MiQkiCqtzYjNTGOG0JSsUNoIWcI/Rl87m6/z1Pl9SuM3j2pS4L27T97uBRuHwOa4gx9ravI49zYSok5iP/9sYRFqE6aw0kX1ED8G5pUA6oTN0CDttaw2Q1Uv7KQk9bfcTtLcsCNrMVxmoQE/OxWW+O9OPeE6Ybncn933djR3ctfzTq9AVJrXqFosiZuYrl3Vci4RI8OSB46na3FgdtoHzH1b/5QQSI//xm0CAnZS87SupQcJwh9wfRR7QsE9A4Nu6wk++PometqBQ1Mx5doveKeRcfO0iGqPfAsr7/4+tG1xlPPH2uibK1/uKfbLs6tiX4nWT+zk7QtQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=spQA0Zq7uD4qbyX35eaOb14VrOuk5tWvLqau+eATdG0=; b=Dgn/pMLFhf9t92zrGM7uu5PkJOSV868bEU+8eSoGyyP08LXdnO7wxluc9AJTTZuvF3O2LF4KSKD5IBc1OFN/GVQmQbGtR7jToS1xfGid/MS2x+6+ZBH5QgGf/wF1iiJfzrMIGJKGcBUyHVUDjkk8UJMZnCo8Fsbjs88omND204i5HBMJmd6zloFbFkd6fFCT/L7FQKup9L8DxGepy4K/CV/dSGcnMU0jgvYLCCBPfE7e2KaLX5NzU3Cc7pO0TI8Jwi6E1bMm7JqIqUf29hxeTJXWpbgETqGVLhJf+Uo8KousfZhvxuWRhL1fJ6jlTaqx/Krz/saqdXxftFNY4rmr/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=spQA0Zq7uD4qbyX35eaOb14VrOuk5tWvLqau+eATdG0=; b=GAPOtMDc9x8K0t6hE8wsG1B/AvNxPgxkzi5fmAVxkBpBVnKDncuD45pPTiNjDTVm28xHtBM/vFDSrfxNDmlJhjYeFvSBw8ZCMeCx9LZusRHPQBow5eZu0Viw71RX0mw5N3rwxE9Zg2PBYRt42uXyJMyBXz6tib0O2gUsVGI1m6hEyQiTAotI9pjCgiDckXZz1hG4L+M9cblK4Gck6FPIgB9H3SjbGiyAJCQE2xR/xFfbLysPyBSMqf4aeCkYyM4f5Lz9g4fHUzGe2cWZVuibJdHuzDday3zOtbT2ogP/M49atC5BlVEYwqVlCwDPKYQFbF/4a6iY31FqHVXP2VuBiA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by TYZPR06MB5806.apcprd06.prod.outlook.com (2603:1096:400:269::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17; Thu, 9 Feb 2023 04:02:50 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::3e52:d08c:ecf4:d572]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::3e52:d08c:ecf4:d572%5]) with mapi id 15.20.6086.011; Thu, 9 Feb 2023 04:02:50 +0000 From: Yangtao Li To: daniel.lezcano@linaro.org, tglx@linutronix.de, wens@csie.org, jernej.skrabec@gmail.com, samuel@sholland.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, Yangtao Li Subject: [PATCH] clocksource/drivers/timer-sun4i: Add CLOCK_EVT_FEAT_DYNIRQ Date: Thu, 9 Feb 2023 12:02:39 +0800 Message-Id: <20230209040239.24710-1-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB5806:EE_ X-MS-Office365-Filtering-Correlation-Id: 9882bae0-f820-46b0-c43c-08db0a52825d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nI2vcEJSvil+oGOo85UNq5dUg4JuXahKWwaLSXf5z/67nJHtE+x5tEgbuwl4iGaPd3t7Wf/jQ0ZDaiyZrN8jPjxwDwzPOwHLJX0RiwvG1dp7HNxp9My+35rr3kG2cir9HelKzxzIgLUb8p1085XFxGBs/OsxpXpALz73bLEZByfXfMqVlPMjJ9jPRR2Lp5qHtxN1dqWvipiT4RiTw3Gy8LpsjDb1tx5SFZsydkO1W6bN4/HpypIwumiC+r4K31drJBBsyN9kZyRfJy7oSZO9hHZ+llfEpJDv0l9EnMs9OUko5BgKS4qyYuk3hjY/u6isUbMD11VNVTXfjCgT84IKOIF5ffCGCq7qICWCb4Ah3Wmzk+OOF95gkfq30L/NTx6AS28M75zq5lgC04izPCtklwKBNDogTDE1OZVvO89LHoXnXrA9cB+T4LpaAAVgZPXoh0M4BBHZ3OOv7PiB8f/XnEw6LKQBvZxTLwQYmO4OD7HZG19SAnsPQ9vX9Aki9qmJX/5lCNSCUIZdyAufzXnDSTh8E6h/Id2btSJIpNcZzuPtALnAG1hBpTJhwK/m20uW2R8E9fyFci6B1sbDodKXatcFNFKnJ4dwoHA4fyMYz451ZNMHpziGLb2Ooa02DQIcFiCmOs1yIxhGsZGsPk6KEr4Uk0e/ZijqI+f5r0PgW6fVzuubpa3TPahPmfPuX/4QXIGHvUmlNI5W64PSA5MBoA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(346002)(136003)(376002)(39860400002)(396003)(366004)(451199018)(83380400001)(36756003)(5660300002)(2906002)(186003)(6506007)(6512007)(8936002)(26005)(41300700001)(66556008)(107886003)(6666004)(316002)(478600001)(6486002)(86362001)(52116002)(1076003)(38350700002)(38100700002)(2616005)(66476007)(4326008)(66946007)(8676002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ueA1QVuPRifvU/uUnz31wqJQ1Lo2Zbd7jnpUMzGIH7GlTCkwmTfDixghkHVPIkIjrWatWE4VTQ+aYOgxcg4oZsuKxVgPac3HWfH5H1Qjqs1yYof38G7PDsuclFkK3Pgm2haQGLn7GqH6IJnQ4l9TCA7eZfqitUqk3h6/sTVz7ZmP4XSyFAB+po1OdPk27o+2uMSH2DIdP9fehXvpkP0IB4KUNgEmwZTCpZQdB47fYsJ2lTXsUz/+tj13J4hCij4FxWes7skeugf6vs7wNfqbdPDmahpt+a/KBZ+8Qs0dfMiy357Pss5NflWkm/V7lRCOONUO0b7NiOpWVZIrMxumPaCxkMHN/+RyROp/kCRPquK+SpmSXPHJANfq4mmsXFrw2pU2wvJmQtBcMXztTDkE835tiLilKkVIgY+tyGzyqvJ3KPbXNZ7hpFBKFM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xm2LumQL4l+OoQ1Tumfv+RhGhWF9mS5beEq+E7zZEFAaw/ud836tDfD8oSh+tL7fZQFgaDoQkiSaz X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9882bae0-f820-46b0-c43c-08db0a52825d X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2023 04:02:49.6023 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xbcuHpPnRg12XvHiZTYX0+oEumpHL6q/8m59stYlQ9mblpBndpQqP6XI76Tr7TlwSPR9ozkho7ynw9IyXn86kQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5806 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757325817862112253?= X-GMAIL-MSGID: =?utf-8?q?1757325817862112253?= Add CLOCK_EVT_FEAT_DYNIRQ to allow the IRQ could be runtime set affinity to the cores that needs wake up, otherwise saying core0 has to send IPI to wakeup core1. With CLOCK_EVT_FEAT_DYNIRQ set, when broadcast timer could wake up the cores, IPI is not needed. After enabling this feature, especially the scene where cpuidle is enabled can benefit. Signed-off-by: Yangtao Li --- drivers/clocksource/timer-sun4i.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/timer-sun4i.c b/drivers/clocksource/timer-sun4i.c index e5a70aa1deb4..7bdcc60ad43c 100644 --- a/drivers/clocksource/timer-sun4i.c +++ b/drivers/clocksource/timer-sun4i.c @@ -144,7 +144,8 @@ static struct timer_of to = { .clkevt = { .name = "sun4i_tick", .rating = 350, - .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, + .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT | + CLOCK_EVT_FEAT_DYNIRQ, .set_state_shutdown = sun4i_clkevt_shutdown, .set_state_periodic = sun4i_clkevt_set_periodic, .set_state_oneshot = sun4i_clkevt_set_oneshot,