Received: by 10.213.65.68 with SMTP id h4csp58167imn; Thu, 15 Mar 2018 09:26:36 -0700 (PDT) X-Google-Smtp-Source: AG47ELtp1r7LtMErCHdSkpnSt5b3jLk8s5JYwTeSkKE1GTpHJDuYRezUp/Pgf8j6Gh7yE2+fEmy0 X-Received: by 2002:a17:902:146:: with SMTP id 64-v6mr8724365plb.30.1521131196459; Thu, 15 Mar 2018 09:26:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521131196; cv=none; d=google.com; s=arc-20160816; b=qohaiT9bJczNQPvj95OpeqUWwwhoEDAGavLSPnoHm4vOeVWlthiInNxBJ2V8rZ6iAq a/Vhbq+RY8RCWgQmIFyl9bhNZk/0JVvGZoN267leBo0mtnE+fmmG+RfwW/XVLUi/lUO0 xnA4G+AniDWAiQaqdEal/zJgQsMIM+0IQKG9zo7yyYNKWm0YV2kraYvTKXydUNagsUUR AHl3TR4UrzskG8tn7VopdMiEqqInvNreyUjgQREHJzDkBlz9M3aSeKtpyjLs5CvfNBIN SqNp/9EP4naA/h+dGwzGn3vbguphny9H98rlK5c7Nc19K8rJYvnR9n3zftm0i93BoTfN uCVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=dqhdkdy/h6UX6sahWFDFKqey7uRN79sU7NC9fFvWt7c=; b=0BjmZRm5qRIGR2xvyY+I9GEyHGmF8BkTgPtGJjgHl7TFR8GQxL+0GJN6U/ymMK4DKW TWp29HL1cGcxL5IBRz2Hev7fIxk3oCk3FzXt/Ql1cBk2ef7OlzZZ51j1JRItNcggfV/L sL8uuWLy+X50I5C07Iy9YOg2Jl+bPcSD/0hKee1JVibN4HbMwdfapUwWV9r5nagde+MX xIcP8+Qye8N4QK78uzlurjf38Hsd3sSrbMTUsmgA/gRKlCn0dZUd6aSTcgsN9bwaPYrQ pnSQH8fbsPWnsex6SD4NMiR1w5AbbelRYYAV7Fai0LXnAqv2B6UBlWzKfpi5T44VsZpU IWvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=G3KMFotI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2si3602199pgq.750.2018.03.15.09.26.22; Thu, 15 Mar 2018 09:26:36 -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; dkim=pass header.i=@chromium.org header.s=google header.b=G3KMFotI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751458AbeCOQZL (ORCPT + 99 others); Thu, 15 Mar 2018 12:25:11 -0400 Received: from mail-ua0-f196.google.com ([209.85.217.196]:40862 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751884AbeCOQZI (ORCPT ); Thu, 15 Mar 2018 12:25:08 -0400 Received: by mail-ua0-f196.google.com with SMTP id c14so4743595uak.7 for ; Thu, 15 Mar 2018 09:25:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dqhdkdy/h6UX6sahWFDFKqey7uRN79sU7NC9fFvWt7c=; b=G3KMFotI5IbrOflkrx9DUd50OdsNdos6u7rg75mYYHKQPPv59iXXUKadxX7dgRA34y ZzH0WZNyrl4CcRVR/UmXHRb1tJn6Jntb4o8lZXVlZZ/JOV3l4DoNaz3Ic+ikkVrXXHRo M2RpbBc9gZxgHXgBSOxVXv+zAj55neHwVjAvA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dqhdkdy/h6UX6sahWFDFKqey7uRN79sU7NC9fFvWt7c=; b=Oq2s23CqZ+r6Hff1Q7VH+zafAkcd72sFi+HurhFxki9u5ziEWMxlguejCvzUSjBDW9 /W8sa3AXg5HjoQ2xigh0Cei2jonE/rVutIee45G650QDtbHJOyA1PdLROYgmPvQWTIPb dVX/oSid0Y7osf2kaANaU7UQ56WJIo+J1HjZ2p1/2EgxLNhcAedK5OJlbACE2bzKbwHf r7jBasyGXKBkOpHuztEjysNRhN1uhpkSaTBct2qDsrTHjDWepUTsWqj/F7kwkTEjUOML AIA2W1tQ3+VFUQSnFAmM3B0Vmi2isqJS3GH8S3ntgbzxDp67esovO9iLtJ2fdy1rbLsq XQpA== X-Gm-Message-State: AElRT7F3LEVCn0HQecM6sxTapIvha+png3g951fhUQFxP1obP6BnOtET v5vpeqR8CqI7bp0Ntz3sgT5RlSHJ11aKu8lyNaXCSw== X-Received: by 10.176.81.212 with SMTP id h20mr4634102uaa.67.1521131106686; Thu, 15 Mar 2018 09:25:06 -0700 (PDT) MIME-Version: 1.0 References: <20180315020445.150604-1-djkurtz@chromium.org> <20180315020445.150604-4-djkurtz@chromium.org> <1521119068.10722.661.camel@linux.intel.com> In-Reply-To: <1521119068.10722.661.camel@linux.intel.com> From: Daniel Kurtz Date: Thu, 15 Mar 2018 16:24:56 +0000 Message-ID: Subject: Re: [PATCH v3 3/3] serial: core: Allow skipping old serial port initialization To: Andy Shevchenko Cc: Greg Kroah-Hartman , adurbin@chromium.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Len Brown , jslaby@suse.com, Kees Cook , mbrugger@suse.com, dhowells@redhat.com, allen.lkml@gmail.com, sean@mess.org, Doug Anderson , matt.redfearn@mips.com, Jeffy , marc_gonzalez@sigmadesigns.com, linux-acpi@vger.kernel.org, linux-serial@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 15, 2018 at 7:04 AM Andy Shevchenko < andriy.shevchenko@linux.intel.com> wrote: > 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. I'm not very proud of this either, but I don't know how else to set this flag. I proposed a Kconfig option earlier, but that also met resistance. Perhaps another kernel command line option? > -- > Andy Shevchenko > Intel Finland Oy