Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8249494rwp; Wed, 19 Jul 2023 07:20:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlEef/ZtkdxXLVKshe2ov9uGP6V0B67cwGw/HseHO41k8PEjFg5AnyNc3NZFDFmlldmxMG/6 X-Received: by 2002:a17:902:c406:b0:1b9:e9b2:1288 with SMTP id k6-20020a170902c40600b001b9e9b21288mr3037176plk.38.1689776403498; Wed, 19 Jul 2023 07:20:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689776403; cv=none; d=google.com; s=arc-20160816; b=B0l+0CxMH/iQz+H0frj7K+MImjK1Tk5G4YG/9v4kjFiiQLw8tfsxFGLemwHDRdFYFz LgT5ZHv4qAr+MNlzTm8YkfE28B9yZOjjuIGaIkd8cft3czNeJeWU2J9KbcPPWOwYcwKU RYkW4SPCIgclkX/XwutrSLO3wH3aNnU2waUjfoKjz3nV3iT6kbGJFu7vy0F/2agqHn+q gC9BNIg8ur6MCgZC2Lu0G6awpF1qMfyYaHMeun2Q8PVB0mBE2W/4S77120RlqOYEUdxT XaEU9pAQEBAdn0kgRPQ9c3T4k4C+gZy/2YYhcngbewYxGBEUlcK2EPCLlz6d2BY+zlD3 on+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=QiNlW3QcQ9ysWW0ZdRHaoXec9iRWIMLVgYxsJW+BksY=; fh=V1DRt7gTZQzMAtrSrAYZJaxa45HEr7f0mRAzCSnlle0=; b=Z9Wox0SIer9ETw22LypmgmspsH30isL9s2V0Ckemo/tXm0ukc1LzmLNuau/s3OxxXq 9yyddeuGQr+tYqOq16OlsZNSLkrp6+NwaA9nyXGp0NPXvNHrijasLGdjfdn2plj0d+iB KCSp6jPZ6OqZqGq/4FBhSo0TTnWalYOdgsZk9vAtao5E7c/EDjeBxAjSQjTdyoHGasd0 AGljng231siW7KfZr5g5a1+7KcwX0vHSTpzZiGRDqPD4Tc57wYzAstaxSE1Hq9WHn80x uyKfDAbVRF0G3dNZsdRhBt4VEWnzlOvi31lgrQQBdUR/qWYiMD/mnq+d/BHbAZQ8oFhB sZ8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CRFpK4Cv; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kx5-20020a170902f94500b001b8c9c273afsi3442920plb.456.2023.07.19.07.19.50; Wed, 19 Jul 2023 07:20:03 -0700 (PDT) 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=@intel.com header.s=Intel header.b=CRFpK4Cv; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231403AbjGSN74 (ORCPT + 99 others); Wed, 19 Jul 2023 09:59:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230028AbjGSN7z (ORCPT ); Wed, 19 Jul 2023 09:59:55 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEE198E; Wed, 19 Jul 2023 06:59:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689775194; x=1721311194; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=looCyhUaIxJ67yA9rnHsM2+5OW4oeW1pu/8q4IfbMgk=; b=CRFpK4Cvt6kCCh48XQ8nCJbnzascqI8ktQ9K3LfuKYeXUi1cYSpRIlSe eBNzx1r9zsSZDdRoA0JIhTUQeWfgqzHESO/gY5wA2EGztScXKObx/OLaP XTkPQZXGPm4RvQCRVdOA/5ze10dfq/GUD0vHxjTnUG3Kb8V1FpnPxUnF2 aMW/5LFGSzOD/XWKkJ1wvkBc7yYYeZxauh+l8Efoyg9yztZ/w8dKcw3Qu 29uZXXcbe70SDenrIKD/2HwjAFc9cymwEpGfwGGsT//R0qeXWDpDIoL1c LDqDFM8bfO1TE6RlPs9eOV2+6Lo5oSHvl3c8+5jqezhmN01IrICiA339a Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10776"; a="452842430" X-IronPort-AV: E=Sophos;i="6.01,216,1684825200"; d="scan'208";a="452842430" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2023 06:59:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10776"; a="727308049" X-IronPort-AV: E=Sophos;i="6.01,216,1684825200"; d="scan'208";a="727308049" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga007.fm.intel.com with ESMTP; 19 Jul 2023 06:59:51 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qM7iX-00DBxH-1P; Wed, 19 Jul 2023 16:59:49 +0300 Date: Wed, 19 Jul 2023 16:59:49 +0300 From: Andy Shevchenko To: Tony Lindgren Cc: Greg Kroah-Hartman , Jiri Slaby , Dhruva Gole , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , John Ogness , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-omap@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] serial: core: Add sysfs links for serial core port instances for ttys Message-ID: References: <20230719051613.46569-1-tony@atomide.com> <20230719054321.GJ5194@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230719054321.GJ5194@atomide.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 On Wed, Jul 19, 2023 at 08:43:21AM +0300, Tony Lindgren wrote: > * Andy Shevchenko [230719 05:34]: > > On Wed, Jul 19, 2023 at 08:16:11AM +0300, Tony Lindgren wrote: > > > Let's allow the userspace to find out the tty name for a serial core > > > controller id if a tty exists. This can be done with: > > > > > > $ grep DEVNAME /sys/bus/serial-base/devices/port*/tty/uevent > > > /sys/bus/serial-base/devices/port.00:04.0/tty/uevent:DEVNAME=ttyS0 > > > /sys/bus/serial-base/devices/port.serial8250.1/tty/uevent:DEVNAME=ttyS1 > > > /sys/bus/serial-base/devices/port.serial8250.2/tty/uevent:DEVNAME=ttyS2 > > > /sys/bus/serial-base/devices/port.serial8250.3/tty/uevent:DEVNAME=ttyS3 > > > > What part is the controller ID here? > > Oh looks like controller id it's missing in the name, I'll send a fix > for that. > > > We also have something in procfs (I don't remember what info exactly is there). > > Do you mean /proc/devices? Something tty specific, /proc/tty/, but I had a look and it seems for another stuff. > > > And with this, we can add /dev/serial/by-id symlinks to the serial port > > > device instances so we can start using serial core port addressing in > > > addition to the legacy ttyS naming. > > > > > > The naming we can use is dev_name:0.0 where 0.0 are the serial core > > > controller id and port id, so for the ttyS0 example above the naming > > > would be 00:04.0:0.0. > > > > This is interesting idea. But any hint why it can be useful? > > If you have lots of serial ports and we are stuck with adding aliases > for the ports in the dts files where the ttyS naming and ordering does > not really help or may not necessarily make sense if the ports are on > different buses or domains. With CONFIG_SERIAL_8250_RUNTIME_UARTS=4, > the ttyS naming is only needed for the legacy ports really. I see. Does it fix the long standing issue with ttyS enumeration (on x86 at least) when depending on the presence of the legacy ports the HSUART (high speed) can preempt the legacy placeholders (ttyS0..ttyS3)? To me sounds like it may very well do fix it and I would be glad to see that in the commit message (as selling point) and in documentation. -- With Best Regards, Andy Shevchenko