From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751293AbeAPPzZ (ORCPT + 1 other); Tue, 16 Jan 2018 10:55:25 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:42151 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790AbeAPPzY (ORCPT ); Tue, 16 Jan 2018 10:55:24 -0500 X-Google-Smtp-Source: ACJfBouIdDi5cpqDJSEInuykflzYbmiSqkziYwUM47L1y78kxLHRwDmNIV4Hd/NRFYfxo9BWfBcpHA== Date: Tue, 16 Jan 2018 16:55:20 +0100 From: Ingo Molnar To: Andy Shevchenko Cc: Greg Kroah-Hartman , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 4/6] x86/boot: Assume MMIO if serial base address supplied via earlyprintk Message-ID: <20180116155520.gqdztulncpsmu5zp@gmail.com> References: <20180114143254.15429-1-andriy.shevchenko@linux.intel.com> <20180114143254.15429-4-andriy.shevchenko@linux.intel.com> <20180116031342.bxczth3ylbzdvk2r@gmail.com> <1516100104.7000.1001.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516100104.7000.1001.camel@linux.intel.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: * Andy Shevchenko wrote: > On Tue, 2018-01-16 at 04:13 +0100, Ingo Molnar wrote: > > * Andy Shevchenko wrote: > > > > > If user supplied serial base address via kernel command line and > > > value > > > is higher than IO space limit (64k boundary), assume for now that > > > MMIO > > > byte access is required. > > > > > > Later we might expand or modify this if needed. > > > > Is this a standard pattern for serial code configuration values? > > I didn't get what you meant under "standard" here. > > IO space limit comes from generic io.h header and AFAIU is a hardware > limitation (outN (%dx), ...; inX (%dx); dx is 16 bit register). > > Using mmio8 out of the IO space is dictated by the (modern) x86 > platforms with non-standard (okay, high speed) UART location in address > space. So I was wondering whether we should just make mmio configuration an explicit parameter instead of a 'range hack'. Since we are introducing something entirely new the choice is ours. Doing it that way would technically be cleaner, as, at least theoretically, there could be platforms with mmio addresses below 64k physical, right? It's also more self-documenting if the new configuration/parameter says 'mmio' explicitly. Thanks, Ingo