Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp43219lqo; Wed, 15 May 2024 20:35:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVcyleJY1NJUzYTmT37OHIrqPgRFoyAJD4VLn4inW204fWWmYX0IzwD0y/oavHLXEnOyKSW8b+VDZzcFE/0WkI3Bs3RI/+nItqY9yPuzw== X-Google-Smtp-Source: AGHT+IFR1fQRViHxHiIHcj8UDFzzYN1wlyMgEtX8eQC7kAS6aWczhPJTjxx2ovKHvwEUROW41emX X-Received: by 2002:a05:6a00:1483:b0:6ea:f422:64ce with SMTP id d2e1a72fcca58-6f4e03a3acfmr24970193b3a.33.1715830523043; Wed, 15 May 2024 20:35:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715830523; cv=pass; d=google.com; s=arc-20160816; b=GtX2XPzi4+m/auzW60EHeYKH/gH9KY3E3QuzbYAmsm8TRknAx7AiW0A4+qUWA37AKr C/ZIJGbf+5ys/Z2R2mZtQekzkBF5h2zYX5KPVGJN7BTcz9HSfY5/58tNrHIFX1CeulPE 5NFGF8hhTY3dm+df2vc4eC2pvjqY6poIIPtagmWZsb1u2IRszEZCSeYUrX5L/exxJnGP 1oT/Pd92HAS9Ka22v/87e94QWpRkCsSOVRTRY4IFkQA/DB0BeQNLdu6K3T98GvUX3idd LHV1pF2MqW5lz3nqfE6htdpMqQHF4pZKNWkBcGN4OYUJbWdH92ZqiLJggd8L1iKPp3Ss QNkA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=hX5liz/Fe6YKpIijJgT2jfuKiPvSGL9g2t06s49+ebI=; fh=ovk48UeAoJd2dZEUR2HpsHr9QKQOxvs/RT1X1ACN7Tg=; b=t54QtYpwFrLgye5bNzawCpxZjUoMk4g72M87lBgEG0LZoVBfADeWU95Cmz6jVj1UwU 6bt3sHWAfXBfpAof/Ozx2XnXgPSqTjSDCHm0Ez135Cw3Szo6UBETHeO1Z7slBsL1iGje PRo5wmk0ZK8AEmgSI4b7YJag1jx36fRLpZJnOLsGry5zp8dNdC2LiQG8shAK136wxB8x jCDtlmMp1yn0tXnmHtXU+0pqY1ECZc0PcVTO8HYGRGzMJZJWhp3PzMd8p/fbHeNUuh88 Bl556wUEA/Z09vMY4OkwLsAzcnLnNPs5RLlLbyOniZFYNdyqKMzhunaaCFtGUEKsxqxc hYXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UX7VhaVr; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-180604-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180604-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6580de1c900si1264152a12.653.2024.05.15.20.35.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 20:35:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180604-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UX7VhaVr; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-180604-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180604-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 769B62837F5 for ; Thu, 16 May 2024 03:35:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D18546A4; Thu, 16 May 2024 03:35:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UX7VhaVr" Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (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 E85994436; Thu, 16 May 2024 03:35:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715830512; cv=none; b=I4P60XQCsqiz4hbDswnh4/OtF2esT1uPMexN3maIIqJNX6WJHXWPMgIxvTVeHYdoo3JEY8BDvI4NfpYN7pcWiuEOlD3Daw/TZ3yxOkTexkFIPYdtqxJ2v5r4pAgDiv9Eqha3ted99RXJKX/9yx5LrGQWumjAcBjfcej2D5LlCq4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715830512; c=relaxed/simple; bh=2+EBAwZSXv7snld41RZlX3M09+s/iFM2dzlAQGBv3fA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=EqYmDw3ARG+7syhwoqdETi0Pw+u2MIg2xr7Sxwn8EAZYDTHBaA58aUsxwZzFoQz1zMdyof02zTqw6peQLUTV03LTdoqxY03m+k1o5PIZQvgApUZJyA3zuy+8HF+/DdF5/O8bo3DhJQWAdJYiCp0/gBHpSlKDv6ETtMRrNXVtp4s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UX7VhaVr; arc=none smtp.client-ip=209.85.222.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-792b8bca915so731518585a.2; Wed, 15 May 2024 20:35:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715830510; x=1716435310; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=hX5liz/Fe6YKpIijJgT2jfuKiPvSGL9g2t06s49+ebI=; b=UX7VhaVrQS6t5YNIaRQEFCko2m6rCgU8T/q5lHn+kqTRPum+USiGOVi1867uVk3Vwo qBhqCqVPrgIBKf8gMFlH3Gm4fLT+B8V/ksmaTKxB7+12AGpKlLJkKqNChAC7drONM1dU Ek82PlXv2Zk/SEA1gRRM+lU6PakAmN2uSO7TuuU8JLVCeG4tSQQC/hNaiEgAdP8GkK/+ +4xvVPefOb3tZBXe161M0wT8rJyppi94G8qLNxnzpG0sf2gI4eHvYKcEe2eyfxEBYKFX YU5C//ET4/g78hYwlmbua+JcUNbSsFDleyQpih/yLKCNIV20W1A/QeBTO7LWzJDcY23s kvJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715830510; x=1716435310; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hX5liz/Fe6YKpIijJgT2jfuKiPvSGL9g2t06s49+ebI=; b=JlwpQoNjG5EdAPogd9X2+ReiBbBoNokoKM7S+3kiwRyposHMi4/iAXvol+8GVibMdn F1xxujaEpAsqowTm6HRD1qWkfAGEEzKiTp8Kvvq3bGBjX+fDEUtSnriYKHWl4kiAQM7w W5ZymdX/8/w/DMGtJxLPe2MGg88B38Y8yeLNRUw1HzIp3QAPcdGDTjRqd+81MOkJ32zD imxIVOA/BPSkyP9Hy8R7D2Acr+8HkaEJBzxUeYkmoLxljDZwqXrCk9y/KMqaBAHx1Uja 58zVTUi42G0+T/NI0RPU0es2cA+Qtycm16si6SKEUqeCkfI0fwMUvRextAYoIGOJto9h dgwA== X-Forwarded-Encrypted: i=1; AJvYcCV0rj6IxemffImoifyVYG5if34QJxOsGVJFQGSCBY5clMPihPU+1gqTIfaviH/MJpowBGzTeeEYwfNQ4m9pA1gue3I3yjdYO6WsIxBcQp54Pi9dn7MyxIVxr720C9o6F3jFTVgIybOfXkpM X-Gm-Message-State: AOJu0Yy+Shh/G7qaWG/xEekpihv6I9QdLfFQtkh00rxxr4wagc540C3n VaiFymHb2Tur2Usi0a/7/nN/fQWrdPBCzU8i8IONqpQIKLrGTugz X-Received: by 2002:a05:620a:4610:b0:792:c7dd:c057 with SMTP id af79cd13be357-792c7ddc885mr2292841285a.72.1715830509604; Wed, 15 May 2024 20:35:09 -0700 (PDT) Received: from [192.168.1.3] (ip68-4-215-93.oc.oc.cox.net. [68.4.215.93]) by smtp.gmail.com with ESMTPSA id af79cd13be357-792bf340b32sm757383985a.126.2024.05.15.20.35.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 May 2024 20:35:08 -0700 (PDT) Message-ID: <8a699761-de25-409d-9d8a-aa0c1ac4c605@gmail.com> Date: Wed, 15 May 2024 20:35:06 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: drivers/net/dsa/dsa_loop_bdinfo.c build problems To: Masahiro Yamada Cc: Andrew Lunn , Stephen Langstaff , Alexander Lobakin , Linux Kbuild mailing list , linux-kernel@vger.kernel.org, OlteanV@gmail.com References: <212a9464-d52b-4730-95b9-5a0aebd38c91@gmail.com> <688e54ec-3b29-4e3b-a2c3-f2c83b9c97b7@lunn.ch> <732d8bb2-1d4f-4958-b130-0bd15a407271@gmail.com> <949fcbea-23dc-44c1-9146-c358b15b9253@lunn.ch> <19db38dd-b265-45d3-af1c-85d4cb8d075a@gmail.com> Content-Language: en-US From: Florian Fainelli Autocrypt: addr=f.fainelli@gmail.com; keydata= xsDiBEjPuBIRBACW9MxSJU9fvEOCTnRNqG/13rAGsj+vJqontvoDSNxRgmafP8d3nesnqPyR xGlkaOSDuu09rxuW+69Y2f1TzjFuGpBk4ysWOR85O2Nx8AJ6fYGCoeTbovrNlGT1M9obSFGQ X3IzRnWoqlfudjTO5TKoqkbOgpYqIo5n1QbEjCCwCwCg3DOH/4ug2AUUlcIT9/l3pGvoRJ0E AICDzi3l7pmC5IWn2n1mvP5247urtHFs/uusE827DDj3K8Upn2vYiOFMBhGsxAk6YKV6IP0d ZdWX6fqkJJlu9cSDvWtO1hXeHIfQIE/xcqvlRH783KrihLcsmnBqOiS6rJDO2x1eAgC8meAX SAgsrBhcgGl2Rl5gh/jkeA5ykwbxA/9u1eEuL70Qzt5APJmqVXR+kWvrqdBVPoUNy/tQ8mYc nzJJ63ng3tHhnwHXZOu8hL4nqwlYHRa9eeglXYhBqja4ZvIvCEqSmEukfivk+DlIgVoOAJbh qIWgvr3SIEuR6ayY3f5j0f2ejUMYlYYnKdiHXFlF9uXm1ELrb0Y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uQC/gyyx3nbL/lVlHbxr4tb6YkhkO6shjXhQh7nQb33FjGO4P WU11Nr9i/qoV8QCo12MQEo244RRA6VMud06y/E449rWZFSTwGqb0FS0seTcYNvxt8PB2izX+ HZA8SL54j479ubxhfuoTu5nXdtFYFj5Lj5x34LKPx7MpgAmj0H7SDhpFWF2FzcC1bjiW9mjW HaKaX23Awt97AqQZXegbfkJwX2Y53ufq8Np3e1542lh3/mpiGSilCsaTahEGrHK+lIusl6mz Joil+u3k01ofvJMK0ZdzGUZ/aPMZ16LofjFA+MNxWrZFrkYmiGdv+LG45zSlZyIvzSiG2lKy kuVag+IijCIom78P9jRtB1q1Q5lwZp2TLAJlz92DmFwBg1hyFzwDADjZ2nrDxKUiybXIgZp9 aU2d++ptEGCVJOfEW4qpWCCLPbOT7XBr+g/4H3qWbs3j/cDDq7LuVYIe+wchy/iXEJaQVeTC y5arMQorqTFWlEOgRA8OP47L9knl9i4xuR0euV6DChDrguup2aJVU8JPBBgRAgAPAhsMBQJU X9LxBQkeXB3fAAoJEGFXmRW1Y3YOj4UAn3nrFLPZekMeqX5aD/aq/dsbXSfyAKC45Go0YyxV HGuUuzv+GKZ6nsysJw== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 5/15/2024 7:17 PM, Masahiro Yamada wrote: > On Thu, May 16, 2024 at 4:21 AM Florian Fainelli wrote: >> >> Adding Olek and Masahiro, >> >> On 5/14/24 21:05, Florian Fainelli wrote: >>> >>> >>> On 5/14/2024 9:17 AM, Andrew Lunn wrote: >>>> On Tue, May 14, 2024 at 05:08:24PM +0100, Stephen Langstaff wrote: >>>>> On Tue, May 14, 2024 at 1:32 PM Andrew Lunn wrote: >>>>> >>>>>> So try to making FIXED_PHY = m, and load it after dsa_loop_bdinfo.ko. >>>>> >>>>> In my configuration FIXED_PHY is selected by several other modules: >>>>> │ Selected by [y]: >>>>> │ - FSL_DPAA_ETH [=y] && NETDEVICES [=y] && ETHERNET [=y] && >>>>> NET_VENDOR_FREESCALE [=y] && FSL_DPAA [=y] && FSL_FMAN [=y] >>>>> │ - FWNODE_MDIO [=y] && NETDEVICES [=y] && MDIO_DEVICE [=y] && >>>>> (ACPI [=y] || OF [=y] || COMPILE_TEST [=n]) >>>>> │ - OF_MDIO [=y] && NETDEVICES [=y] && MDIO_DEVICE [=y] && OF [=y] >>>>> && PHYLIB [=y] >>>>> >>>>> ...so it looks pretty tied up with the MDIO support which I guess I >>>>> will need for the real PHY! >>>>> >>>>> If I sorted out building the dsa_loop_bdinfo.c code as a built-in do >>>>> you think that would solve the ordering issue? >>> >>> I have re-created the issue with CONFIG_FIXED_PHY=y and for a reason I >>> do not yet understand the following rule: >>> >>> obj-$(CONFIG_FIXED_PHY) += dsa_loop_bdinfo.o >>> >>> does not result in the kernel image containing the dsa_loop_bdinfo.o >>> object symbols. I am fairly sure this worked when this was submitted >>> back then, so give me a day or two to figure out why. AFAICT the make >>> rule is simply not executed. >> >> Bisection landed on 227d72063fccb2d19b30fb4197fba478514f7d83 ("dsa: >> simplify Kconfig symbols and dependencies") which appeared in v5.13 and >> specifically this hunk being reverted back to how it was before gets us >> the build results we want: >> >> diff --git a/drivers/net/Makefile b/drivers/net/Makefile >> index 7ffd2d03efaf..5da6424bc6f8 100644 >> --- a/drivers/net/Makefile >> +++ b/drivers/net/Makefile >> @@ -45,7 +45,7 @@ obj-$(CONFIG_ARCNET) += arcnet/ >> obj-$(CONFIG_DEV_APPLETALK) += appletalk/ >> obj-$(CONFIG_CAIF) += caif/ >> obj-$(CONFIG_CAN) += can/ >> -obj-$(CONFIG_NET_DSA) += dsa/ >> +obj-y += dsa/ >> obj-$(CONFIG_ETHERNET) += ethernet/ >> obj-$(CONFIG_FDDI) += fddi/ >> obj-$(CONFIG_HIPPI) += hippi/ >> >> Masahiro, for context in drivers/net/dsa/Makefile we have this bit: >> >> obj-$(CONFIG_NET_DSA_LOOP) += dsa_loop.o >> ifdef CONFIG_NET_DSA_LOOP >> obj-$(CONFIG_FIXED_PHY) += dsa_loop_bdinfo.o >> endif >> >> whereby we want dsa_loop.o to follow the value of CONFIG_NET_DSA_LOOP, >> and we want dsa_loop_bdinfo.o to be either built as a module or built >> into the kernel and we want to follow the value of CONFIG_FIXED_PHY >> because there is a functional dependency between the two objects. >> >> Prior to Olek's change this would work just fine because we would always >> descend into drivers/net/dsa/ but after his change, and assuming that >> CONFIG_NET_DSA=m which is the case, then we no longer get >> dsa_loop_bdinfo.o to be built at all when CONFIG_FIXED_PHY=y. >> Essentially only obj-m rules are being processed, obj-y rules are not. >> >> That does not really seem intuitive to me as to why any suggestions on >> how to fix that, short of unconditionally descending into the tree like >> we used to? > > > > "obj-m += dsa/" means everything under dsa/ must be modular. > > > > If there is a built-in object under dsa/ with CONFIG_NET_DSA=m, > you cannot do "obj-$(CONFIG_NET_DSA) += dsa/". > > > You need to change it back to "obj-y += dsa/". Thanks, posted a patch doing that! Is there anyway that Kbuild could be warning about such a situation? -- Florian