Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4071804pxb; Mon, 1 Feb 2021 11:37:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyjbuqdHPVWjdEd37jSHPzUF4Hsa/0S8NPEjXy4U3/DThtsSZSrIwlpP1nF/dXy4TjQNU1A X-Received: by 2002:a05:6402:46:: with SMTP id f6mr20423232edu.163.1612208225830; Mon, 01 Feb 2021 11:37:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612208225; cv=none; d=google.com; s=arc-20160816; b=VOj7EA1o4rMfopc6u4VVws9T8UGRYPwA/axtb199hlyezJf2KCjwPaQW3sso66o08j vf0VUverAeDj0kyELLKO76pNy0DgmG5+UYhCTEj/qZbnJNGwBU1pyz68Ia4G7krWN/1l 8Z/pHPGMgbnYDryRjJIYUlyXX1VDfkEh8QIrSrlUFGduJhsym6x3v1KkCFHeBFrt0bqD /rXEjWQAAjeN5nIKjHmCZLWhv8HcY7RpkaQXGjjwgvQUcLkyAtkcxvNs+TZUW+aDO1yZ iFB+/mHhBr+LyLiAww7cJKyCMm+/mL34XrBOTAKoiGzQC/9bSQt/2eUNiyJCL/VjGwkl AHYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=jwv3A3bSAAqY2wCAqqrB5nV+HQVHfwBw6+UsuhpSUq8=; b=OlOkztmu4Ct2GK1/zrVemIfTc/mJrAO+rVK+mcnw4GZLCq0PSyE2a3l14z8pLygDG1 hi2T9wQA1AsEZG2kc+qF6RsoRLIuPybhXyg0znqngFKlC1GLOT+AdeBuFHfVgXRWDNcH EkGBzu8y5dZoio5RzdrlQ9K4qQRjs5SjLhnE8PJsHSxuc+T4/Qq5gXmQLrpqgGa9+HsP aRHWOZaSsxpy4Is4OjaMSXpSm0ipNlR//REmkzttiETAwlqqyg3T+SrDIcic7nhrt5vM phL8bpcDjaZAx21LySEbv6SxRUB8SzrJWwfA62I7lAWY+sCdnmNfZeiXqfWhVwzr1Rt1 bRTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="G5S/Dgal"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l14si11823545edw.437.2021.02.01.11.36.39; Mon, 01 Feb 2021 11:37:05 -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=@linux-foundation.org header.s=google header.b="G5S/Dgal"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229555AbhBATd1 (ORCPT + 99 others); Mon, 1 Feb 2021 14:33:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbhBATdX (ORCPT ); Mon, 1 Feb 2021 14:33:23 -0500 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF7D6C061573 for ; Mon, 1 Feb 2021 11:32:42 -0800 (PST) Received: by mail-lf1-x136.google.com with SMTP id i187so24433211lfd.4 for ; Mon, 01 Feb 2021 11:32:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jwv3A3bSAAqY2wCAqqrB5nV+HQVHfwBw6+UsuhpSUq8=; b=G5S/Dgal7HfdGnSG6SXEgiDdPQZpL7d6sxZU5vSTKcrz5SG3Vkd1+T8LCywp7pDMQQ mB4bD3LmgpPCneKJZmgvxxUqZH3E07tAUqXpmaC9yo4ArxGnnCAs6hXbgpHnHMxPlmzG 4Cram0LsRP+Czba7W0OFxbOwKKpvGrBkOeOiY= 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=jwv3A3bSAAqY2wCAqqrB5nV+HQVHfwBw6+UsuhpSUq8=; b=Tyol8BlwZpfqRBEQdP6iRb0m/xewaUb0/KtqYFdwsRjbwj6PJCi2kyJTOMtZ/p/4p2 W0z2ANNJ1StrPk7aD2jChMWkhHa1ap28VKGedn08OUvy4zV492Hybff4vgqSZuKfnw2o Q3d8WxCkMrvEe4+LgdqY+ywTo1dBhq+VCQHDOCUD0KTHEf7Z3UAobaTHKxD5zhoywBOA vLWbn07k2KTCokhXJyARhWyucm4rqaaEyhHmsNFYp2Xccf7iVqbXC+6uks4lBfg64g4+ 500stcBxi/17ALFfJW7Ta/SA48U0B+/jxhI0ipkNTPCjIDWiLdCpqyuMke4Mv9Ztcnzr b10Q== X-Gm-Message-State: AOAM533rQKuOru6zXuFGNIg5pWxgufbpBGbzRNUHelxwLY52DL9Vu1Vt cPdGkqGrJ64jVQnO8epUG9h8E6jWzBhOXQ== X-Received: by 2002:a19:7ecf:: with SMTP id z198mr8813995lfc.650.1612207960873; Mon, 01 Feb 2021 11:32:40 -0800 (PST) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com. [209.85.167.48]) by smtp.gmail.com with ESMTPSA id d23sm3080258lfn.229.2021.02.01.11.32.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Feb 2021 11:32:39 -0800 (PST) Received: by mail-lf1-f48.google.com with SMTP id m22so24429840lfg.5 for ; Mon, 01 Feb 2021 11:32:38 -0800 (PST) X-Received: by 2002:a19:8186:: with SMTP id c128mr3292880lfd.377.1612207958309; Mon, 01 Feb 2021 11:32:38 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: <87zh0nbnha.fsf@nanos.tec.linutronix.de> From: Linus Torvalds Date: Mon, 1 Feb 2021 11:32:22 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V2] rtc: mc146818: Dont test for bit 0-5 in Register D To: Thomas Gleixner Cc: Serge Belyshev , Dirk Gouders , =?UTF-8?B?TWlja2HDq2wgU2FsYcO8bg==?= , LKML , Alexandre Belloni , Jason Gunthorpe , Miroslav Lichvar , John Stultz , Prarit Bhargava , Alessandro Zummo , linux-rtc@vger.kernel.org, Peter Zijlstra Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Linus