From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2870A335553 for ; Mon, 22 Dec 2025 10:18:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766398719; cv=none; b=VN5DJ7YyJMyppuvmgbvz+tG+l0Y4tBJFrbDikG0c3O++9rPL/sJ0nXi/D4mF/Agl5aXDvw5B2Gxn7gNIwU44c7gBt0TZnM7nEeaPj2x5+cFEvwHPD4dbGCWcM8DNpoOY55c5PwwebleTds/olIHT1vNDINByeSuyWgXwva/umo0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766398719; c=relaxed/simple; bh=VdFN7B4vxaPkLRgecOZAm1jnjJMdZrdh8+171cPJB0k=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=ZerSyPWLucB121BaV8TdGzrwJPkntgdwB0saiO3MzCSNCpjtkeEGbEanPGmGxtJq9ySApWlCG1Hta82S4gcusDfsq+kPSQL4OyS0FEKyu2v8oY9wlqqWeNaqWaBqtICMJYKnOU/xhz4U4H9upTTeEWmRIP2DVXoVemc+MDLAVqU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rasmusvillemoes.dk; spf=pass smtp.mailfrom=rasmusvillemoes.dk; dkim=pass (1024-bit key) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk header.b=g3QiW6SY; arc=none smtp.client-ip=209.85.167.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rasmusvillemoes.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rasmusvillemoes.dk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk header.b="g3QiW6SY" Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-594270ec7f9so4429158e87.3 for ; Mon, 22 Dec 2025 02:18:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; t=1766398715; x=1767003515; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5oDw1okAqcyqJSW/wOF+4mNh67gVaCYwmV+RlCLGkAI=; b=g3QiW6SYYKaIMVTG+s783cUqGIfPsaCkSrbc54NK1DtB5AHgRolPiT8N991FCPbf0c 5XykoGM8fx96Dpv4JJnai2WO8ZAOcXAKW6QLPgYdkn06XrbbD0AWkDY7BtJBhlYxmyT+ Qt0VxUMDC88LreMhAuQHuH+NTM3PDbdUBaLuc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766398715; x=1767003515; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5oDw1okAqcyqJSW/wOF+4mNh67gVaCYwmV+RlCLGkAI=; b=NEDLNUAa2Y0b5KoIire3cYqn0ZE8uV96a/AyBV6K325JKzuiF6B3joLs5+MclYCtoV CA9dc312cdWctCDg1Yv4Un8OkTxcp4fCErLOscr4wwOVYSZrH6OPXChXUpYXVhhrMYuV xHv587NVlTjf/yOQmjqKkfVoCBlbjqPyy9DhPpq1qDhz9OwFNHySQBu8+YS3MROJcrJE lsipzs0aTtCRtXTRYt47Bd2LAjTRSb+yor0Hm7BcfwqoBodPcs4fkoILQBnOxfMGC043 0B/A5YWupeLMVonKs/VhZRb4WcltfxNRAk9sYGjNJYcYu5iVDJaNi+mf+pEi/05+tkzR ez5Q== X-Forwarded-Encrypted: i=1; AJvYcCW1X2MGrUzymlLePo/eOOz8xUY0Hc/ZCK7HV8js1tqsGAfTSDEROydUgeGDStY6maMFliKx2K67ir++MJk=@vger.kernel.org X-Gm-Message-State: AOJu0YxSlFrAJOb1jtYUqHoZxfLZ+nyV++CZo1m244r4eDNk3zdEohGe pidZKnAnoZzmkPcqlK/0rA/9HbzLdShWDL710lQCieA4OD6SbMFWcoLrBokO0PuHdFk= X-Gm-Gg: AY/fxX5+dV0XusgG20jt+QPDCHXfaDkxm+l03PCmDU3j1DMV7lIeItOII05GEt17+Pq eoEwU69yrT7rsleIUeJnzLX4P+ZBY/2AuLsScWJJm22S2VFOzEPZWdexNIGgRXTs5gmaIGHX2ZE k8AKdNIK6WPLRT591mrjqDc/Co8JKRTOJ/M2pRlJrxl+aNlYBwbcyBQv5EZda0OmNL50nyisbAA g0iWS3dzewhRtLtpx788nVTwpdiM7E3DEdiwUyCqVEfUYjoQHOdWXHStMsA5lKF9UZ6+lhrI4tn dhMUDhhiuS4KtfaZhvnTkDuI5TmKJiKGa4DZLfD0P6ogMMKVeD5pHnxJ2YDAr2i41/0KkloHil0 HU68pN0qfzp8WwQbaXldGN3bFrWuEGgbklp/tlvgj3EBdS5jeKKile1Pm9atew3WKqkZBXTemek 4e52EXLLuBn5gsKA== X-Google-Smtp-Source: AGHT+IGeC6o1HVzazEgiOz1noJRTSTMdjMp+xdHrmQsE6lN/XZ0gi+/qxAf5PguUCf3kLfVe//gA3Q== X-Received: by 2002:a05:6512:128c:b0:59a:10d3:7a57 with SMTP id 2adb3069b0e04-59a17d46ae2mr4353720e87.27.1766398715117; Mon, 22 Dec 2025 02:18:35 -0800 (PST) Received: from localhost ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-59a1861f64dsm2981554e87.80.2025.12.22.02.18.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Dec 2025 02:18:34 -0800 (PST) From: Rasmus Villemoes To: Rob Herring Cc: Saravana Kannan , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] of: property: stop creating callback for each pinctrl-N property In-Reply-To: (Rob Herring's message of "Fri, 19 Dec 2025 08:18:22 -0600") References: <20251219121811.390988-1-linux@rasmusvillemoes.dk> Date: Mon, 22 Dec 2025 11:18:33 +0100 Message-ID: <87wm2estty.fsf@prevas.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Dec 19 2025, Rob Herring wrote: > On Fri, Dec 19, 2025 at 6:18=E2=80=AFAM Rasmus Villemoes > wrote: >> >> While not a lot in the grand scheme of things, this eliminates 8*2 >> pointless function calls for almost every property present in the >> device tree (the exception are the few properties that were already >> matched). It also seems to reduce .text by about 1.5K - why gcc >> decides to inline parse_prop_cells() in every instantiation I don't know. > > Presumably it is still doing that with all the other cases? Perhaps we > should add a noinline attr. Yes, it does, parse_prop_cells() does not exist at all in the generated code (I've just tested with arm64 defconfig and arm imx_v6_v7_defconfig). Adding noinline to just parse_prop_cells (on top of current patch) does $ size drivers/of/property.o.{old,new} text data bss dec hex filename 18098 278 0 18376 47c8 drivers/of/property.o.old 14962 278 0 15240 3b88 drivers/of/property.o.new There are only two uses of DEFINE_SUFFIX_PROP, so giving parse_suffix_prop_cells() the same treatment doesn't result in that much (merely 300 bytes), but should probably be done as well for consistency. I'll send a proper patch. >> Supporting double-digit suffixes would still require tweaking, but it >> does match pinctrl-9. > > Looks to me like double-digit suffixes would work. Even pinctrl-0foo > would work (which is fine IMO). Ah, yes, if matching ^pinctrl-[0-9] is sufficient and not ^pinctrl-[0-9]+$ (or something even worse to avoid-leading-0-unless-exactly-0), it does work, and I agree that that's unlikely to ever be a problem. Rasmus