Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4074886pxb; Mon, 1 Feb 2021 11:42:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxkEnGXwwTxg6gcC1I9Yy3G/MoKvsaZDyK7pJ24e40drUBdsjd+co5qv5BgG+5S+nt5oXn X-Received: by 2002:a17:906:2583:: with SMTP id m3mr19067569ejb.499.1612208561301; Mon, 01 Feb 2021 11:42:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612208561; cv=none; d=google.com; s=arc-20160816; b=DhWLjjQ7fakQYjE7OLo8l4xrfyXG4XXBwMjkSRpvTX4O0ANqjxTu2CKWSIYa0kdgPR Gv/xJczPjSuL1JeC/P50ax3SJM7HbOtTKDmmL6CuNYZzO72ISrcohQCrG9D646Hn3kiQ M9R4w6u/pAo2uBN9pmUn0ZF1Ot6ob7Fe6MuB6FavjToKufXLqRj8qfjyP8ykrJv5Kq4I 6CX314xu/VpSOV8SZsv20ZYFCU7TVt4cu9JAppSh7NPA2ePuGkvDjOuFCE6wBakrNKB0 MqC0XR4bMubKDPXXdSfbZaLZTDSr2RNXAMpyF5IPy3kMsYbPinGvcWcJdSTNdpU8Zgde 9UpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=VtZpA2AJJR10BLs4JGvZpp2Gn1wezLDmpF5F8OMPGRE=; b=uy8RkpdITKh+5PDZFY/vKpTEUETra+YRgU1xBiVzkln7DJJ1qtrxCZXODHFAe7iGIE IbOlPWEuarnCiVu1g0OBfCHy2msmEtP4Wr5eweRzAgONkg2CZp/DNgA3chhQ/0F/YrC1 S7hTiMjqB63anCinE/sHYqI71K9x5jYnBpMbaAT5mxRVHS7pFuyNIxziM+Of/dmY5BL5 UcWjYtPY5hx7TjRaJUrM//lSSOmQb9GOsANACqzn0JnUyX5zWlx8q9eCb0lF0UxK52Ke xQYZyxuL2fQwahw/+0DfuT7G+nF4XvtqnJVONS4ECbb0M0qFunNCg9ICeeltA7BOOZLU EeYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=EMEln62r; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j6si1714345ejc.262.2021.02.01.11.42.16; Mon, 01 Feb 2021 11:42:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=EMEln62r; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231196AbhBATkt (ORCPT + 99 others); Mon, 1 Feb 2021 14:40:49 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:59668 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229555AbhBATks (ORCPT ); Mon, 1 Feb 2021 14:40:48 -0500 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1612208406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VtZpA2AJJR10BLs4JGvZpp2Gn1wezLDmpF5F8OMPGRE=; b=EMEln62rnkqh9yGqgBlAHg4ORN+rRmUVEI5A0AxQE/WDb3GZdkzEZmx1HwHD/60gIDiCHL vhF1xYKzPD7+Qrvb9/Zib5GVc1Zsf1ofk4oMVUFEP4mNaCfM4p5y8U4G03VhcwBzsW+6XU quFwGd9FiH4pjhIP0v9j0MwEY/+WItOHE7l8AV1nvaBgB0LVXv0MQihEZnOSCO7VYEZWTa r57n90uOdmZJCsV90ROBoL0FAm401ZOhaI8VhH7syETRLlSYMmFf4J+UCdkolJjCEtumly uG0aONmlnLUjxfl2x6ecOfNYCozu3GTIH2eZDGSwnZlGHIehcba+HBWl060+fA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1612208406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VtZpA2AJJR10BLs4JGvZpp2Gn1wezLDmpF5F8OMPGRE=; b=yHRmdsqKwMr9q9mnEoOKAFUyXCNS41Y3tnu5/rDGDkEJ80GVXuFTLZNYVgHC8b5yFppPiu 0QEtPg8SYvrB6IAw== To: Linus Torvalds Cc: Serge Belyshev , Dirk Gouders , =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , LKML , Alexandre Belloni , Jason Gunthorpe , Miroslav Lichvar , John Stultz , Prarit Bhargava , Alessandro Zummo , linux-rtc@vger.kernel.org, Peter Zijlstra Subject: Re: [PATCH V2] rtc: mc146818: Dont test for bit 0-5 in Register D In-Reply-To: References: <20201206214613.444124194@linutronix.de> <20201206220541.594826678@linutronix.de> <19a7753c-c492-42e4-241a-8a052b32bb63@digikod.net> <871re7hlsg.fsf@nanos.tec.linutronix.de> <98cb59e8-ecb4-e29d-0b8f-73683ef2bee7@digikod.net> <87y2gfg18p.fsf@nanos.tec.linutronix.de> <87tur3fx7w.fsf@nanos.tec.linutronix.de> <877dnrc2sv.fsf@depni.sinp.msu.ru> <8735yfd2q4.fsf@nanos.tec.linutronix.de> <87zh0nbnha.fsf@nanos.tec.linutronix.de> Date: Mon, 01 Feb 2021 20:40:06 +0100 Message-ID: <87wnvrbmqx.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 01 2021 at 11:32, Linus Torvalds wrote: > On Mon, Feb 1, 2021 at 11:24 AM Thomas Gleixner wrote: >> >> While it cures the problem on the reporters machine it breaks machines >> with Intel chipsets which use bit 0-5 of the D register. So check only >> for bit 6 being 0 which is the case on these Intel machines as well. > > This looks fine, but it might also be worth it simply just checking > for the only really special value: 0xff, and going "ok, that looks > like missing hardware". > > That's what a few other drivers historically do in their probing > routines, so it's not unheard of (ie you can find drivers doing that > kind of > > /* If we read 0xff from the LSR, there is no UART here. */ > if (inb(.. port ..) == 0xff) > > in their init routines. > > Not a big deal either way, I just think it would be more in like with > what other places do in similar situations Yeah, we can do that as well. Either way is fine. Thanks, tglx