From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (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 0FBF72E92BA for ; Wed, 19 Aug 2026 07:31:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787124674; cv=none; b=sVFEQNQGRuB2fTQ+8MYMMoCoqksaS0WNLnkdM29V7BlzWbNAPFHPoUpCu0LgOQk/L+3fZ8eBOSVoBdoUbMUB/2C68k3bL5FLzj3KClolgCFoA28pKlR5csc07tgNNji/5rpWAqb5Y4vq/f3CvB9sRWnSO+9RTJ5N9H4OLfP5O4U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787124674; c=relaxed/simple; bh=KDz40ob1DP1awgyQpoQz8zlL0Dgc5sAY4J66gSV3FQw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=D68Kvat9v4PdLk+YPmI0T+Sioc8blX8P+EfoVjlAwVgpDQ11Ppau6eWzzi/4bfWCs2nxDBRWkTMc42Un185RmVAWtdSj8hZI0RfDVWDLpeo/P3QIrsJt5k9MXJWltZe76MQorjWeu2Aotmus/KpHdTOPC5wU2J842FkG7ymJcEI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.com; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-c15d47266baso64065066b.3 for ; Wed, 19 Aug 2026 00:31:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787124671; x=1787729471; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=HiDaEknU4hvGEw8cYMmApLQGE2jE6rj6ed8HdH6DIqQ=; b=h7rRqdHTq/ja6D0SxdttrHXXSOI7l8wRVCmy26xBltiK+ORjNzhhu3N4uOQuzyld2W cQ6CDA6KQ8K+VPZV8m6qGHaR9gkcwsNrA6vUZIZx/gFwstl4mbH2mGU6KPf/u3fK7IJB lDma1cJT2WBV4Q3mHIh9qCCnKow5ehoAMoy306GYgKGzCpr2PKMFH0MGiutg11OI4i6f NHRf5rKg8QsoioVmpU7vze+EHsh6jQxJOY3xGI2iJgv+cJ89HK1d3hhtBue5eXg6mnEA wYl7JoWT+5T7jpYYkZ81ivxLW093deiRoBSDYC3vZ0CKV1rF0EQmErr+DhAENvset9BB 4kjg== X-Forwarded-Encrypted: i=1; AHgh+RoYIOyIbZvCRMpbI30Vhk02A02thP+WlaAB7EWBV+WsJL7B5yUBiHvVn4IXJA7PI+ey4AYy/Bu7GOkK4M4=@vger.kernel.org X-Gm-Message-State: AOJu0Ywz9SxwiaWEQK3ih10SvbOSOr44xvCcN7QvDRNnjtRNQ1UbzpzR s/bC/G9myf6CIBuJBZ4/n6w0YUjYo3+xJBKYejWY/qX41n0Ag4Kabqb1 X-Gm-Gg: AR+sD137u1xifGQr1M1Pi7ZJ+S/dwTDLo8FW1E2C6MIPy58PKAnpfm8n26RPnSLSVAH njBCbX59eDneTHIy0/yHZd2vCvshZ3OqKizznZQ09iK0wOvt9yVoVCBv9/iOTG0auOluS6p4OrF SHKhcCNYqKTSrY6BG2Nc4E1y1PCmIktSpcyo3KtKw53UISAfwSG2eWT5ZC2lXfOofwkgV9YwrSx +/UGDKTn1TiAokERmWl7z65k3E0/BzXFA2pCl/bDwGSJUTfVPFaWdckMmdPBJecDYzPTkDRWDox rMA4sZxMn5yNXjADFQGOWDc4GxSwcljMfzcqVO76iZxIebSLzy2c9A8xvH8su82U7MS8dkLK4jx 4CXpjnAFtmoGlPJUeOLJxVGW3IXwH3oIhDoxHB6VmzEmh1R1bNor27M6JrCAY9KthNWnAFsU6L2 qf37WkuKrTYilXR3dRlQUcIssX0IKShItnTNSJkpOAsLuM5lnWQ2OlyWqGyfhAA38qVnLjhTZrf EZVxddoSnIIj3FEcNIYdg== X-Received: by 2002:a17:906:9c95:b0:c12:74af:51f3 with SMTP id a640c23a62f3a-c242a5af4fcmr134040566b.6.1787124671066; Wed, 19 Aug 2026 00:31:11 -0700 (PDT) Received: from [192.168.1.135] ([83.106.158.114]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c243c7c2b45sm37142066b.13.2026.08.19.00.31.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Aug 2026 00:31:10 -0700 (PDT) Message-ID: <47719008-a26d-481c-8b0c-8acf669e987f@linux.com> Date: Wed, 19 Aug 2026 08:31:10 +0100 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: [PATCH] serial: 8250: don't register ports that have no hardware To: Greg Kroah-Hartman Cc: Jiri Slaby , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org References: <20260818185200.10243-1-tanure@linux.com> <2026081923-magical-enlisted-64ff@gregkh> <2026081908-clamp-safely-de2f@gregkh> Content-Language: en-US From: Lucas Tanure In-Reply-To: <2026081908-clamp-safely-de2f@gregkh> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 19/08/2026 07:49, Greg Kroah-Hartman wrote: > On Wed, Aug 19, 2026 at 07:40:17AM +0100, Lucas Tanure wrote: >> On 19/08/2026 06:57, Greg Kroah-Hartman wrote: >>> On Tue, Aug 18, 2026 at 07:52:00PM +0100, Lucas Tanure wrote: >>>> The 8250 driver creates a fixed set of port slots at boot and >>>> registers a ttyS device for each one, even when the slot describes no >>>> hardware. On device tree platforms those slots are empty, but they >>>> still take the ttyS0..ttyS3 names. >>>> >>>> New Amlogic SoCs (S4, T7) name their real UARTs ttyS as well. With >>>> both drivers built in, as in arm64 defconfig, the real port fails to bind: >>> >>> Then fix that bug, don't break everyone else's systems because of it. >>> >> Hi, >> >> Understood. I thought preventing 8250 from probing on devices that don't use >> it would be a good idea, and fix my bug. Thanks for the feedback. >> >> I will tak to Amlogic list the ttyS name collision introduced for the new >> Amlogic SoCs in e71aab9d6132. > > That was an explicit decision by Amlogic to do that, so there should not > be any collisions as their systems should NOT be having the older 8250 > device tree entries. > > So perhaps just fix your device tree to not be broken? > > thanks, > > greg k-h Hi, There are no 8250 nodes in the Vim4 device tree. At __serial8250_isa_init_ports() in 8250_platform.c it creates nr_uarts ports unconditionally: for (i = 0; i < nr_uarts; i++) serial8250_setup_port(i); And serial8250_init calls serial8250_isa_init_ports unconditionally. So by just probing the module the serial ports are created. Am I missing something? I can also boot with 8250.nr_uarts=0 to make the issue go away, but I would prefer a code fix for the colision. I will take the naming question to the Amlogic list, but I wanted to double check my understand of the code. Thanks, Lucas