Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp295153rdb; Wed, 17 Jan 2024 02:06:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHz2fdGPmv3OYOPk+oIMKahNSLPcGfGivEMs8l17CYLGgZ72xPOROnYS3sXqnS9eRVHws++ X-Received: by 2002:a05:6a00:174e:b0:6da:b46f:9e37 with SMTP id j14-20020a056a00174e00b006dab46f9e37mr5751762pfc.55.1705485980196; Wed, 17 Jan 2024 02:06:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705485980; cv=pass; d=google.com; s=arc-20160816; b=uOlQCgLL48n3RQWHXI4OQas3m3sP2LvjxDg0YEat5qWTIkZq+C9szK3hJIPCN0kmqb 4PzTxEvcltyUaHgRPX1LEzYE2yBbDPZXO3aqczJnMiUKCL/W+NBKjZ9D0eyyHSkmHV2h FDFrYOVFr1yh71KRc4/ey7bGMayGD54E1EETydRBm7v7iqBFFT2JgsohchObapP5zCBl rUvXgXWQyCHWsOgbOmlvztySbWT9vsbl6PhClUkyHrn+XTUAlWVCVt22vPnnC20l1sVd 2Zujr0q6rrGqnVmxO7k0XqMxGdsckA9t18BtLVNrY/yU3caKILEICo+Z1QTciNSUujal /WSw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=HCc9tibi82Pbj/50pOz8Sj6mdn1A2UjXuVfV339QXA8=; fh=mYVL5Ixi17cNS7mQyJMebtJakUSXim2zHrjQRTDaZsY=; b=HO4v23qUJVErXO3HT+ZXQtMRVs6d6H0jFpaf8fxz48hFujxml7Wz03FiW5hxhCFrAI 5i9sg4Yhkf3NLCbW+rJdM1TBIpBoznGmvZjBEbcp7l7AcKYbLQnnlRuLDfrG29TODWmq c8m67v1tG/bn7yoYsptUyxUueKwZSoXKBaeoLaDdaCZ/McqRyGRRGYji2RI0UEIjmRva 1siIo7wRAoHsN78OipQEIFnvkI47D4wzuvAVgQsB4irdHuVwuMuaRHHHuw5984qn9eal H8MxysoKFJ4pAzSSoSNY/lfZz970W+nvexbPyhP15FBq6jtRD2cvNmCT47Vkt32FLkYT vcPw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ZZXmJ4Ul; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-28806-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28806-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id i1-20020a639d01000000b005cdb499ac69si13158830pgd.53.2024.01.17.02.06.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 02:06:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28806-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ZZXmJ4Ul; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-28806-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28806-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 A144D286E8C for ; Wed, 17 Jan 2024 10:06:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 303621DA4C; Wed, 17 Jan 2024 10:03:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ZZXmJ4Ul"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="0k/sjsjK" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 E5C081DA35; Wed, 17 Jan 2024 10:03:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705485817; cv=none; b=JIsj0rL17ehzYC6tvt5m87sFanDb87elQKQ9tGncT9DmXHkHZW9DKeZ9luDvBRh6Sx9PiUq+z0DdNxYqCD8AQKlV1jIo3/XEtoM12YDOvS2a4cf57P/L0ucbZ6YEPKiMN0E9kLMQsNYKJ93DJmcVrQ2BMZcnWHKGH+OokNBQ7N0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705485817; c=relaxed/simple; bh=CUFmMxfNLORzIKiq952Jyw/HdLoR8XCLYDcnFC2DXz8=; h=From:DKIM-Signature:DKIM-Signature:To:Cc:Subject:In-Reply-To: References:Date:Message-ID:MIME-Version:Content-Type; b=gUeh5HWuuhGV7wKXp/0BvkYzrxqLB51h07QxWSThcaT1aS341w1ccgD2+s0dXycIFYT4vTi0XM+ybMP1O2TJ/jx/Tu3toEUbBhoOsMsga3v2gxr9GTrLZTAjkZFTqtrsHMhGwCSCBFalz86qxLf+ke9VlI1gJTdUpRhxoP6XEbs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ZZXmJ4Ul; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=0k/sjsjK; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1705485807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HCc9tibi82Pbj/50pOz8Sj6mdn1A2UjXuVfV339QXA8=; b=ZZXmJ4UlQeBoTS4g16SsNQJ+AVWCmnLGY1sIC3TaHan/EhbZoed4jD4FMjI/teA0BqooZT /R2yJQ8qJHLj1v/CQjmLZMYU+q66J/630pLOiQVBT0LceKRi1+6iEuSDdYUIM2CO9d4NNd qrlOALJPdr0kfUnX3VeR7wN/I5NYaoAtfjvAghpFAFAYUaNTx+agqKQICvuAqWsIFL684q SoSM7T7ReJFXRHHLz3FxFet4j7UYaGg3/TPjAQim6F6sqOcrNPDkgPbhzu35KQAO7ZEHd5 IC1yvSQj0URVDQtY6ZdboR3wWkFkiOGf4H/cGoHKDnVRXVR+NSSQat+0Sp8+gw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1705485807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HCc9tibi82Pbj/50pOz8Sj6mdn1A2UjXuVfV339QXA8=; b=0k/sjsjKP0Eln9OzFwC1CgeKauAHsB01SWuXb5eGvwSJ3g5ZBS9ssUYVBQxL1OIWaAfTmW PMyLyQ+xvmjbAJBg== To: "Chang, Junxiao" , "bigeasy@linutronix.de" , "tglx@linutronix.de" , "rostedt@goodmis.org" , "linux-kernel@vger.kernel.org" Cc: "Li, Hao3" , "Li, Lili" , "Gao, Jianfeng" , "linux-rt-users@vger.kernel.org" Subject: RE: [PATCH] printk: nbcon: check uart port is nbcon or not in nbcon_release In-Reply-To: References: <20240117065226.4166127-1-junxiao.chang@intel.com> <871qagtlk2.fsf@jogness.linutronix.de> Date: Wed, 17 Jan 2024 11:09:24 +0106 Message-ID: <87y1cos2dv.fsf@jogness.linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On 2024-01-17, "Chang, Junxiao" wrote: > There are several serial ports in one Intel ADL hardware, they are > enumerated as ttyS0, ttyS1, ttyS4, and so on. Multiple console options > might be appended to kernel command line. For example, > "console=ttyS0,115200n8 console=ttyS4,115200n8 > console=ttyS5,115200n8". > > In this case, several uarts "cons" pointers are same. Typically a UART driver will register the console structure in the driver's initcall(), which is only called once per driver. This is why it is usually not possible to have multiple UART consoles. If a driver _does_ allow registering consoles for multiple devices, then it must allocate separate console structs for each registration. Note that register_console() will generate a warning and abort if a driver attempts to register the same console struct twice: WARN(con == newcon, "console '%s%d' already registered\n", con->name, con->index) So I ask again. Please explain how this is possible. John