Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3431591pxy; Tue, 4 May 2021 01:55:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzteVETGw1f7iKAwcKoixbfozIf332Crn2G6xdQ7uHCeW/rKR3Kp0nOQHn8ZTkVda40tHzT X-Received: by 2002:a50:bec1:: with SMTP id e1mr12449895edk.116.1620118544203; Tue, 04 May 2021 01:55:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620118544; cv=none; d=google.com; s=arc-20160816; b=Y+RbzUYKvNkxViMx37GkvAW7javqSWwrRgAksjQOtlAO7INYrIq8wib35JesT09wZa ICIKB1nXgVSlfg5/PmMgEnNQkWzHgf57vPy7ylB7C2l7cHGx74usep0dLuA4i1qPxpIP S2nrPDgZ5wSryLIz8NPLCN+98ghLXafDmEPh6kt9TgSG1T7US9H2TWLV/mlj5Ango101 slvdq8mEwxkNAqpWQhlZo0reaxk40Vy6L2DVLrpUcx8AeklYsDPyedhz8TAGREQE4CYH NZbWcMZ9DlzS7OoTVXlktitkhZ/bpa6RxqR/4tmw/AUhgJ1f5hPAuW4UH3Emf5zSjzOe Ms7A== 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=EG4tNJcjNsmsslrGSicquG7Fu1CihCNL07ZbolWDgHQ=; b=W2s2St3JZpFM/RoXX3a2++EEXg6FbFBaOqpjG398dfRwQG9yxmnd7I/mr7Z6DrayDS nzr3NoGkr5n1+zAqBoPi7OFV2IyK9rtRhJFgfC8DzV/UFv3Dl1d9q/Cuz9Tkac1rzNwd luYWYtcpyPDSyZ+o0Az5sodPFhohTpuBLPZMarH5Wk0op4yto1pRwKFVpfMmILoz0czY AWZXnADSIBQTQ7Wq1EF6kdNfGy08FPXW95Uq+CoSyqaF/s037I7j8bU5muoym2a+ZF9W n2BX8iLtWVry6Lss9IiHjNibEU8xS5o8uxEA3K3LzmoJnfMrYUdPk26pvmCp86ypXYCI 1CSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=jZspfJ0z; 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 q17si4798647edb.242.2021.05.04.01.55.20; Tue, 04 May 2021 01:55:44 -0700 (PDT) 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=jZspfJ0z; 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 S229867AbhEDH4M (ORCPT + 99 others); Tue, 4 May 2021 03:56:12 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:52246 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbhEDH4M (ORCPT ); Tue, 4 May 2021 03:56:12 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1620114916; 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=EG4tNJcjNsmsslrGSicquG7Fu1CihCNL07ZbolWDgHQ=; b=jZspfJ0z46Gap2x0s9kMV9rquHr/aUkaPA48jfmnbiMuVy27yFZadthxxCgSib8tni/aud PuiWBRV1kCBTGulXTZflzaKB//CqB8GafGZ4psxkCAfsY3dgZO5gumRoaWArNu5/NFeBTO +dvh7aLsm9k2SXXHxOV5ba+f0ehfYlMzZNmqPidCoqhx/WsEgCeStDQ1zl+1L7KRRU7PDy pqNa5/Z04OWe6NEX50JlrenWl9SHig29pvRMPUL8lw00XdfwzS7aFplV1/x7vFswr9Zlgf jzakyrEmbLEzidBzxE+wW9kYDqIHHI4fsfgVaWopGEGBpjEO01DivZ7NHziozw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1620114916; 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=EG4tNJcjNsmsslrGSicquG7Fu1CihCNL07ZbolWDgHQ=; b=qgJIu8H/AsATE3brN7k4w2CxE+Uunir/O9znRbq13nLO/lnmNWLI6jmoi+PfikOYBFda8T SRjhX4ChYmvMJTAQ== To: "Anand K. Mistry" Cc: x86@kernel.org, Borislav Petkov , "H. Peter Anvin" , Ingo Molnar , Linux Kernel Mailing List Subject: Re: [PATCH v2] x86: Add a prompt for HPET_EMULATE_RTC In-Reply-To: References: <20210429155950.v2.1.I2392cf11fb353d10459958100b69d93346fa167c@changeid> <87bl9se07w.ffs@nanos.tec.linutronix.de> Date: Tue, 04 May 2021 09:55:16 +0200 Message-ID: <87zgxbhr17.ffs@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 Tue, May 04 2021 at 11:21, Anand K. Mistry wrote: > On Mon, 3 May 2021 at 17:38, Thomas Gleixner wrote: >> On Thu, Apr 29 2021 at 16:00, Anand K. Mistry wrote: >> >> > This does two things: >> > 1. Makes the option visible in menuconfig, allowing the user to easily >> > disable this option >> > 2. Allows olddefconfig to respect the option if it is set in the old >> > .config file >> >> Well, it's pretty clear WHAT it does, but there is absolutely no >> reasoning WHY this knob is needed in the first place. > > Without this option, 'make oldolddefconfig' ignores the option in the > old .confg file and just sets it to the calculated default for the > platform. An easy way to test this is to do 'make defconfig' on > x86-64, set CONFIG_HPET_EMULATE_RTC=n in the generated .config, and > run 'make olddefconfig'. Without this patch, olddefconfig will ignore > the set option and overwrite it with CONFIG_HPET_EMULATE_RTC=y. Rightfully so because it's a functional correctness issue. When HPET is enabled in legacy mode it takes over the RTC interrupt line, which makes RTC alarms disfunctional and therefore we have to emulate it. So, no. > So, part of the why is that this enables the use of olddefconfig with > the CONFIG_HPET_EMULATE_RTC option. The other part of why is that my > team uses 'make olddefconfig' by providing a base config and then > using olddefconfig to fill in the unset values with defaults to make a > complete config file for a kernel build. I'd like to disable RTC > emulation on a particular platform, but I can't use a config option to > do it without this patch because 'make olddefconfig' will just ignore > the option. You can like to disable it, but that does not make it more correct. See above. If your platform does not have RTC_DRV_CMOS then you have to disable that which will also clear CONFIG_HPET_EMULATE_RTC. Thanks, tglx