Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp37015lqt; Sun, 17 Mar 2024 23:42:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXxhLexz5ry7BhZ52X1eUdLirfQnymC2BbdmFw6RkmrpBPJ29FMqYgjoZpjOgsBYAiCUFChD7+hJH91fmfbyO7nggBQH1tUT0VEXh+Nwg== X-Google-Smtp-Source: AGHT+IFh5OFp1WmpkUYcLgo4RhXpT8hJnIz5WLyTOeZAinS2D9d0/hj52DDyTyoYxPoeIFlfQzix X-Received: by 2002:a05:6402:f0c:b0:568:c125:6556 with SMTP id i12-20020a0564020f0c00b00568c1256556mr5065792eda.28.1710744125998; Sun, 17 Mar 2024 23:42:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710744125; cv=pass; d=google.com; s=arc-20160816; b=jjPTHXcGYtKQON3rhFG92E8fTeg3c9fO2d3Z14miWYt8hk4D3+Rlx49Fl/mELrYzqh 9cCVzRGvXRduoR3KQQpHz9Y74EAYqlGZ1192YyxiBTl3EAHvNASHb3hb9RvOJ9IAC1Kv Cbna2THc0teuLvI6AK9KXXk5fmiLqK6utpeqg/gfGGD1ZNsiutscEIHceS4l5CzBt6m+ mBv2yB6uIdab8ayo3mqMZDvSBy2DMheOYLZTeR9YjqUmgHjs2v7RUg6HcXx8yuFUsbRM J1MBc2ET9PYmKt5am2utdo3cE+vhAlEdeXyaXU/LknuydVMmIwqW2on7M5yI3L1M+Yzf YfHg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=abuse-reports-to:tuid:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from; bh=xE3lGDBK+QxAw087zo65NooTlX8+lqxysAZ3UWP0vBI=; fh=3mneduMSM9CVccPT9qTX605RSjiaq8sQwHzjozwG3eQ=; b=wCcf3oba6FMoojSpnNEwVUmD1+/wUKE7sFgJorMlZtMd8ChiHW3vrmK4FGfQd+6tTS EDoMIzTtXFhA+/55pyRR1HM1bMNFq6UFSAv13vLgbdhhWrV8agmT/EsjxxUrHbheKaRx UX879nWmr9F/omCYDEssPMH+LW4c1D6YFTaRmVhnYOnjeK/oxvcmCIvIW9SSmyF8WmNN 24KIKW2Pxl3Aq76ZDxXfR2eqMkLRQHdWsAzdilnPegsmtcGPKtu6RC/qxlS7EnLCvT/S pE4OCb1F42p0UOIL1w8szKtuP93qIlVddlGsgpWXyE+zfvJ/axcGbRS7eN7kfPpiCEk+ 0KbQ==; 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-105748-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105748-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z21-20020a056402275500b0056b80787e32si159496edd.38.2024.03.17.23.42.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 23:42:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105748-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=inspur.com); spf=pass (google.com: domain of linux-kernel+bounces-105748-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105748-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id B4F2B1F21673 for ; Mon, 18 Mar 2024 06:42:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8349622089; Mon, 18 Mar 2024 06:41:58 +0000 (UTC) Received: from ssh247.corpemail.net (ssh247.corpemail.net [210.51.61.247]) (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 584FC22612; Mon, 18 Mar 2024 06:41:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.51.61.247 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710744118; cv=none; b=rOfT6k3OVSGaN1QKMjuK2GtcFLUsAuTle2CtUY2e/jbEwxqpJyiVs488R8mLKAsp31ACNmpnlo/UdugQIKYe9bVND05z+C4bp3K8ry5oy/DJyYtDMHykf1zOyuq8y740UVijT37dsptmh0hWMjl3JKQRXd5QCKJ5vCvc3LJTWLU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710744118; c=relaxed/simple; bh=AATr7CGNc+WPe0fSd7MYXySc17AXkQBdU/dEvJNO1uE=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Y/NyHqZbYTl2rCBvVAMtyG6wznSNIKEpolKklDz6eTggwXRrM1XMgbxF0S8b61HJ5Iq1c64u1ly6WLtmkM3kurhWWjcNwGLgGO4vrwdDkXmp0O4zgq87/DTlSKcm8FW/Kh2B4Jtql5TXHya/E6uu1iq3F5dGwB1bYQK9ARE63Y8= 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.247 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 ssh247.corpemail.net by ssh247.corpemail.net ((D)) with ASMTP (SSL) id OZG00039; Mon, 18 Mar 2024 14:40:39 +0800 Received: from localhost.localdomain (10.94.10.188) by jtjnmail201603.home.langchao.com (10.100.2.3) with Microsoft SMTP Server id 15.1.2507.35; Mon, 18 Mar 2024 14:40:37 +0800 From: wangkaiyuan To: , , , CC: , , wangkaiyuan Subject: [PATCH 1/2] tty: serial: max310x: convert to use maple tree register cache Date: Mon, 18 Mar 2024 14:40:36 +0800 Message-ID: <20240318064036.1656-1-wangkaiyuan@inspur.com> X-Mailer: git-send-email 2.27.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain tUid: 2024318144039383f8983b5a35fcdbd5d1775ba0cebaf 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 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: wangkaiyuan --- drivers/tty/serial/max310x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c index 14dd9cfaa9f7..3b72b2137275 100644 --- a/drivers/tty/serial/max310x.c +++ b/drivers/tty/serial/max310x.c @@ -1478,7 +1478,7 @@ static struct regmap_config regcfg = { .reg_bits = 8, .val_bits = 8, .write_flag_mask = MAX310X_WRITE_BIT, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .max_register = MAX310X_REG_1F, .writeable_reg = max310x_reg_writeable, .volatile_reg = max310x_reg_volatile, @@ -1582,7 +1582,7 @@ static int max310x_i2c_extended_reg_enable(struct device *dev, bool enable) static struct regmap_config regcfg_i2c = { .reg_bits = 8, .val_bits = 8, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .writeable_reg = max310x_reg_writeable, .volatile_reg = max310x_reg_volatile, .precious_reg = max310x_reg_precious, -- 2.27.0