From patchwork Tue Feb 6 07:13:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bo Liu X-Patchwork-Id: 197218 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1370453dyb; Mon, 5 Feb 2024 23:16:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IG/7KHL33VcUuPNfsSt+JlQ7+KTFjb0Im/eY4T5I3Jw4ohMee1O57W3yQvsdbeuyDPAt2aa X-Received: by 2002:a05:6808:318e:b0:3bd:cacd:332d with SMTP id cd14-20020a056808318e00b003bdcacd332dmr3379915oib.40.1707203807529; Mon, 05 Feb 2024 23:16:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707203807; cv=pass; d=google.com; s=arc-20160816; b=yGCj9txZeYY8DYV33FLZ43WiVlqqBf7rHsBq3Y+DzctOFPAX5HkXOV54zNQymYY9gD oDJ93tpxSV9pWTFMBfEOZRLHE0Vkeh9MCM+SfKeJyXrO5TMcuJghuFq/+CKB7asAOqse Y3FoFEpI3/jhCMRnIHZDJzgbRUswdj3SnDx+DgWROFbKtRKInwj/pBA/kSafzvXXAPXj povcoGMtBg7hV3HVNb5dhEwpF+9JkJWBQDPzbtAy7zbLLJcO4p6hHZD6WonA3Oiijsxi djfznaEkhMFm3P7vosDL67RBzaucbnrIScuS9l5R19hGDg6OeQNcmvQHOg986UcAD6Dh CrEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=abuse-reports-to:tuid:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=gfJdUdKKwRnHD6IwN/Bk8JwPzIvfF8BeXDqgMhQkhTM=; fh=uQgXI5qU1+H67RAp0931wuiMqKtE24MFZkTXM/YJ6MY=; b=sbW9eK8w4R8AsH3337Mb3Pkme+RGm9ITrPaGfyxfxbtYTcAzO/RInYO/BFdH90Q+qd ME3YeYS8hHaLhm50yZYmeWLdqj71itHVRwSnQkFhNUyM7hR5rd/OYp3qEYKUOC7rN+33 DcPA7KziALm67XMSmzymNNX3y4Bdiw2vuK/wDBRQmDjgzp4KAEsbhrWRIZjpKqzotfwn DBRt5nKiHF+NbqzfBJJDd1V5bMmz0rWv/Db//3ugNhF5/xx6xGOTyutoSS7+Rhmb2CUi JZ7A2Vpx+oXJGvb0YsVeijamEwo4MkbFczcaGLxZ2amP4b0op3SrMVArYtZ+9oCNYH2T yBEA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=inspur.com); spf=pass (google.com: domain of linux-kernel+bounces-54399-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54399-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCV60DQoDHe1Qqry/kcZk/K8lffSx9Tu76613uNHVq+WZIPZgnixZVdzFYNJWd95NoRdEYpr5prqGh+SBKOJw3mXwXOEzw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c20-20020ae9e214000000b0078394c072d0si1667445qkc.573.2024.02.05.23.16.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 23:16:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54399-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=inspur.com); spf=pass (google.com: domain of linux-kernel+bounces-54399-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54399-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 518A71C2200C for ; Tue, 6 Feb 2024 07:16:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C1F68128809; Tue, 6 Feb 2024 07:13:52 +0000 (UTC) Received: from ssh248.corpemail.net (ssh248.corpemail.net [210.51.61.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3468112BEA0; Tue, 6 Feb 2024 07:13:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.51.61.248 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707203631; cv=none; b=a9YFN5sqpQr/TmSWDQLkSecxjcOvXlrlV1sPn9Q886DlRFB5K49CWdj7GQv6pQtSyfnKZgKw7QRvrXGLXHUnAEvYqMhS7ReU2G/seF8jIag7PGwDLyscKhvaVDoO13zEg+akTPKjRmCwuB32kYBqiaOJEyi/EUDbWR+TyJy+TWc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707203631; c=relaxed/simple; bh=QpJ7YkU2g9iHCXuzjsqQvlUek4FOFOhMQ9iS3IfyCsU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lQK+w44KDunkvvq4KmS5AnJYeBJSU9xzeMMT7Ys5qlWXOFfoI6AKMOeblDKIjTPeW/TROUzBEL0o3IBwWFtkh+iRF60WIXGEwjNMEcVvG9EF/KhWA5VbGuZChhIgj/1p5BZeTDkbhH86Ts5Fv0YKSAwtWSUJ0q6ms9PI2+YcSDc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=inspur.com; spf=pass smtp.mailfrom=inspur.com; arc=none smtp.client-ip=210.51.61.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=inspur.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=inspur.com Received: from ssh248.corpemail.net by ssh248.corpemail.net ((D)) with ASMTP (SSL) id CZT00043; Tue, 06 Feb 2024 15:13:43 +0800 Received: from localhost.localdomain.com (10.73.45.222) by jtjnmail201602.home.langchao.com (10.100.2.2) with Microsoft SMTP Server id 15.1.2507.34; Tue, 6 Feb 2024 15:13:43 +0800 From: Bo Liu To: , , , , , , , , , CC: , , , , , , Bo Liu Subject: [PATCH 11/18] mfd: rohm: convert to use maple tree register cache Date: Tue, 6 Feb 2024 02:13:07 -0500 Message-ID: <20240206071314.8721-12-liubo03@inspur.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20240206071314.8721-1-liubo03@inspur.com> References: <20240206071314.8721-1-liubo03@inspur.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 tUid: 20242061513430f5b0a1bdcc148beebfea2a7bea359c1 X-Abuse-Reports-To: service@corp-email.com Abuse-Reports-To: service@corp-email.com X-Complaints-To: service@corp-email.com X-Report-Abuse-To: service@corp-email.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790132939611034495 X-GMAIL-MSGID: 1790132939611034495 The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Bo Liu Acked-by: Matti Vaittinen --- drivers/mfd/rohm-bd71828.c | 4 ++-- drivers/mfd/rohm-bd718x7.c | 2 +- drivers/mfd/rohm-bd9576.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/rohm-bd71828.c b/drivers/mfd/rohm-bd71828.c index 594718f7e8e1..2f3826c7eef4 100644 --- a/drivers/mfd/rohm-bd71828.c +++ b/drivers/mfd/rohm-bd71828.c @@ -197,7 +197,7 @@ static const struct regmap_config bd71815_regmap = { .val_bits = 8, .volatile_table = &bd71815_volatile_regs, .max_register = BD71815_MAX_REGISTER - 1, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; static const struct regmap_config bd71828_regmap = { @@ -205,7 +205,7 @@ static const struct regmap_config bd71828_regmap = { .val_bits = 8, .volatile_table = &bd71828_volatile_regs, .max_register = BD71828_MAX_REGISTER, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; /* diff --git a/drivers/mfd/rohm-bd718x7.c b/drivers/mfd/rohm-bd718x7.c index 4798bdf27afb..7755a4c073bf 100644 --- a/drivers/mfd/rohm-bd718x7.c +++ b/drivers/mfd/rohm-bd718x7.c @@ -87,7 +87,7 @@ static const struct regmap_config bd718xx_regmap_config = { .val_bits = 8, .volatile_table = &volatile_regs, .max_register = BD718XX_MAX_REGISTER - 1, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; static int bd718xx_init_press_duration(struct regmap *regmap, diff --git a/drivers/mfd/rohm-bd9576.c b/drivers/mfd/rohm-bd9576.c index bceac7016740..3a9f61961721 100644 --- a/drivers/mfd/rohm-bd9576.c +++ b/drivers/mfd/rohm-bd9576.c @@ -62,7 +62,7 @@ static struct regmap_config bd957x_regmap = { .val_bits = 8, .volatile_table = &volatile_regs, .max_register = BD957X_MAX_REGISTER, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; static struct regmap_irq bd9576_irqs[] = {