Received: by 10.213.65.68 with SMTP id h4csp1050221imn; Wed, 14 Mar 2018 08:09:27 -0700 (PDT) X-Google-Smtp-Source: AG47ELtsGJGZTs5z8gHC3itgNzHUxQtzMicr73fFMQiLVLaSLQ+/xzYKV6vcfP6mqKtMwcvk7sBd X-Received: by 10.98.163.143 with SMTP id q15mr4619083pfl.94.1521040167211; Wed, 14 Mar 2018 08:09:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521040167; cv=none; d=google.com; s=arc-20160816; b=R8Csuu0Jk9eQi1M56yxOTgUSS27NW+J5wK9CSHoKqwDepm1IwH4dyT4V5OkNAYhAIA 9prT11qgxaIv7MhLEcsgGOShaaZBoccSCEeXhmDRMGHXd3Gny3ZulYEI6QgSTcKGqQGy NH+Rx4BoLQZzDCWtWDC6EaCQG6UEm0GnUEbuHILmdTyuoYrrgeyKl/ji9KI0VwYHEFg5 82/o47WPsDAhQSWNKdXyXxIJiYn26ho/wcM/K7LBgTNelQfsc/P/S3n2l48ScdKx8DRi 0Ig/PpWJi5jc3HDtVuV6sdaL3cFBdwoHCgppQBZb/3HJQTUem/ziN2c30cjnHIyg9RHK eCFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=tIdpmAKHFg/yQzFqy6O/wIyrYel5WcfCH+jONXWPVLo=; b=uO8mrtUSrIjCAhSNteRK4JGFicK3MEx3G2nThI/ltrbJtazy/+y8oD1PJorh6dPNFs y+5+iOkYV50SA1UoEvzZF/vbYP/XQGtEoF2GcHU3Z+ndJkXolsv/neDqz7Dk2m4H2awZ V5UgrOOnN9D/1RNRsskepRDQFp9Z2mCvNJfTVq3JwSRc02b/hL3FXlyH0DcSqAKk3lcx GOebAFdZRTWLM0npKqgO2j/NUoU75hwGtUgPSncKjnNVkxqTiSDQqCH+i3C0KwjWCnrd yIf3XXhLuGPZ8mhDJ9E6TH6adbUbWdYrSEMOMVTyG3tg5QVieS1Pev99pYbK+jEycL9O rVmQ== 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 s11-v6si2112974plj.701.2018.03.14.08.09.11; Wed, 14 Mar 2018 08:09:27 -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 S1752052AbeCNPIB (ORCPT + 99 others); Wed, 14 Mar 2018 11:08:01 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:51483 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751757AbeCNPIA (ORCPT ); Wed, 14 Mar 2018 11:08:00 -0400 Received: from hsi-kbw-5-158-153-52.hsi19.kabel-badenwuerttemberg.de ([5.158.153.52] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ew80F-0003gk-V7; Wed, 14 Mar 2018 16:07:44 +0100 Date: Wed, 14 Mar 2018 16:07:43 +0100 (CET) From: Thomas Gleixner To: Rajneesh Bhardwaj cc: x86@kernel.org, mingo@redhat.com, hpa@zytor.com, rjw@rjwysocki.net, anshuman.gupta@intel.com, andriy.shevchenko@linux.intel.com, linux-kernel@vger.kernel.org, Alan Cox Subject: Re: [PATCH v2] x86: i8237: Register based on FADT legacy boot flag In-Reply-To: <1521004627-30329-1-git-send-email-rajneesh.bhardwaj@intel.com> Message-ID: References: <1521004627-30329-1-git-send-email-rajneesh.bhardwaj@intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 14 Mar 2018, Rajneesh Bhardwaj wrote: > static int __init i8237A_init_ops(void) > { > + /* > + * From SKL PCH onwards, the port 0x61 bit 4 would stop toggle and s/would stop toggle/stops toggling/ You are describing a fact, right? > + * the legacy DMA device is removed in which the I/O ports (81h-83h, > + * 87h, 89h-8Bh, 8Fh) related to it are removed as well. All > + * removed ports must return 0xff for a inb() request. > + * > + * Note: DMA_PAGE_2 (port 0x81) should not be checked for detecting > + * the presence of DMA device since it may be used by BIOS to decode > + * LPC traffic for POST codes. Original LPC only decodes one byte of > + * port 0x80 but some BIOS may choose to enhance PCH LPC port 0x8x > + * decoding. > + */ > + if (dma_inb(DMA_PAGE_0) == 0xFF) > + return -ENODEV; > + > + /* > + * It should be OK to not load this driver as newer SoC may not Should? Is this based on facts or hope? > + * support 8237 DMA or bus mastering from LPC. Platform firmware > + * must announce the support for such legacy devices via > + * ACPI_FADT_LEGACY_DEVICES field in FADT table. > + */ > + if (!x86_platform.legacy.devices.pnpbios && dmi_get_bios_year() >= 2017) Please use arch_pnpbios_disabled() and explain why you need that year check. If there is no pnpbios then why is the year interesting and why would anyone trust something which comes from BIOS? Thanks, tglx