Received: by 10.213.65.68 with SMTP id h4csp1656390imn; Thu, 15 Mar 2018 06:06:45 -0700 (PDT) X-Google-Smtp-Source: AG47ELtBi/fbMRwIg8AJTeOj7YeORoRHQ8eH9bxqypga34cRdjJmkweoEp6QM1axcQnlRKR6SQoO X-Received: by 2002:a17:902:526:: with SMTP id 35-v6mr8297314plf.276.1521119205003; Thu, 15 Mar 2018 06:06:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521119204; cv=none; d=google.com; s=arc-20160816; b=GorTvimBOKjRGo/kEyRBzwztMUIb7szsrFHV4/wJZmDvw2H0VRznRWCUekgg6Rwawq i5WsPcbnjWlpJEgz6ZophzggpNHwaXghxux7fLl323He3lId1yP+TPwm6Bri14IHMRJH PNzUJaBjmUufbhKOjTgTDpqdaqnBDaFLPC4+f1162GA7q1ueZzGm7E9oO0ClcZvM+aK6 C3pkGqgr0D6Qj8vUouLn0Y4fG48U4K8WwDwXFIwW/msZomwvCJlixr4STJexyV+1HL3L lrPZdtPr7rYUa6/LSqrOdNyZA3IEiU55IBpKvMnxo8jypPZc11l5j8+2miTA8w9ZwJqW NeDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id:arc-authentication-results; bh=h5ZfXodXpFvirbeON7/QXBeaTULv+ZQvXhN7VgNxsN4=; b=rPfQDQTos9+ZO9dvJ/nJxX470ZpdVpB4fFDXLz5BPI+d3IbIJbf7DiZ3aJIIalj6DX ONAWQdjwKfHu4/HSYmsRl/T9bFV6rXXH0lV+GdSh2TKimZzwy5I+k7S5/ghPkSQ5DqoH V8wgCAHYbXfPEOmQy5vz+viU0KMGanVmO4RsFq9HYjwi7uBPYLM0fTxIAYi8qU+q/RC7 mvqcXZrRVhP+C/d+bmaU1q4o6p3yvaPo/JJ7OTRy6aoIlPCYHJlKj5J933w7wWMfHX4H qj4O+kZFGkjKCAOhPGvAw6twCQsrU89ZtXeqCIb9EIw09UmL9HnxAFjB/oCEne1r6DK9 nWGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z5si3426052pgp.262.2018.03.15.06.06.23; Thu, 15 Mar 2018 06:06:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752108AbeCONEi (ORCPT + 99 others); Thu, 15 Mar 2018 09:04:38 -0400 Received: from mga18.intel.com ([134.134.136.126]:62155 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751639AbeCONEe (ORCPT ); Thu, 15 Mar 2018 09:04:34 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Mar 2018 06:04:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,310,1517904000"; d="scan'208";a="211815975" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by fmsmga005.fm.intel.com with ESMTP; 15 Mar 2018 06:04:29 -0700 Message-ID: <1521119068.10722.661.camel@linux.intel.com> Subject: Re: [PATCH v3 3/3] serial: core: Allow skipping old serial port initialization From: Andy Shevchenko To: Daniel Kurtz , Greg Kroah-Hartman Cc: adurbin@chromium.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Len Brown , Jiri Slaby , Kees Cook , Matthias Brugger , David Howells , Allen Pais , Sean Young , Douglas Anderson , Matt Redfearn , Jeffy Chen , Marc Gonzalez , "open list:ACPI" , "open list:SERIAL DRIVERS" Date: Thu, 15 Mar 2018 15:04:28 +0200 In-Reply-To: <20180315020445.150604-4-djkurtz@chromium.org> References: <20180315020445.150604-1-djkurtz@chromium.org> <20180315020445.150604-4-djkurtz@chromium.org> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.5-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-03-14 at 20:04 -0600, Daniel Kurtz wrote: > The old_serial_port global array in 8250_core is supposed to hold an > entry > for each serial port on the system that cannot be discovered via a > standard enumeration mechanism (aka ACPI/PCI/DTS). The array is > populated > at compile-time from the value specified in the SERIAL_PORT_DFNS > macro. > This macro is defined in arch/serial.h. > > For x86, this macro is currently unconditionally initialized to supply > four ioport UARTs (0x3F8, 0x2F8, 0x3E8, 0x2E8). > > However, not all x86 CPUs have these four ioport UARTs. For example, > the > UARTs on AMD Carrizo and later are separate memory mapped Designware > IP > blocks. > > Fairly early in boot the console_initcall univ8250_console_init > iterates > over this array and installs these old UARTs into the global array > serial8250_ports. Further, it attempts to register them for use as > the console. In other words, if, for example, the kernel commandline > has > console=ttyS0, the console will be switched over to one of these > non-existent UARTs. Only later, when the real UART drivers are probed > and their devices are instantiated will the console switch back over > to > the proper UART. > > This is noticeable when using earlycon, since part of the serial > console > log will appear to disappear (when the bogus old takes over) and then > re-appear (when the real UART finally gets registered for the > console). > > The problem is even more noticable when *not* using earlycon, since in > this case the entire console output is missing, having been > incorrectly > played back to the non-existing serial port. > > Create a global variable to allow skipping old serial port > initialization > and wire it up to the AMDCZ ACPI SPCR quirk and the special amdcz > earlycon > setup handler. I don't like this approach at all. But unfortunately I have nothing to propose. Just felt like I have to share my opinion on this. -- Andy Shevchenko Intel Finland Oy