From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94D2BC43381 for ; Wed, 13 Mar 2019 17:17:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 66F6021019 for ; Wed, 13 Mar 2019 17:17:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Jrg1ESIo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 66F6021019 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Z8myNbQGSE48C09PXxxVDlNjXBxbFfFFP/hXjIPBOcQ=; b=Jrg1ESIoPsYGVY +l/6TwICY3+0AfRqSMDf01tEyuQy24XK2NEMQxpw2g5nIPO+68oeVfIKib+lnC7XRRsMBYhIzks0C tdMJMarnENJCWXgpSAEjAp0uCuzpJJSpmiVhtpluY4TaKEwuco9JY6Xu90zXxQS57P5iMM4gkjv0Z 2qxjEc7mhWMRCXaRw2ZXKelBeMiyrQIbTfTLhCi9Sf8wq1KFhzRh5divAjFk1YTNsducmIcXxwoCN YvT+CJTdgySXlbQYQITlWwc1uYsztvpm/qFm9RA3PY2sHXuzM4zZnNbuAoH0sU2453e9gQH+wCrHT 2UfQpHankrgrApBCHnDA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h47VL-0005Eb-Pj; Wed, 13 Mar 2019 17:17:23 +0000 Received: from mail-wr1-f48.google.com ([209.85.221.48]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h47VH-0005EE-8T for linux-arm-kernel@lists.infradead.org; Wed, 13 Mar 2019 17:17:21 +0000 Received: by mail-wr1-f48.google.com with SMTP id o9so2860874wrv.9 for ; Wed, 13 Mar 2019 10:17:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=6sbUrWmoVzADBndVgqIFaX/kyLeylNsbfWUVFK0JOas=; b=JXOw+4HaJs3lzxaHl45yo0jG9NBD8LsmFTVRRwc5GXmM4WDjQRrpd4Sk27uNZg644g kNg/UDbfnnfD02LaXaElHjnYTXPO3ZbmfsIKR0yBX/PNUz9bvLT+dRCTv+00EN9y2C4o zoiFW7Dw+tNmz+aPWHo4JgQQ8TCcTDZKkkYFLUNZ2fG7kbqE5x/dU70asqdg4x7xWkGN gOSgTWzCgLJUkkytRoVimSZ57olToKLy6pu+sHuofz+cBRd2Pzat6GHFG5MI5qDtNXqW VC3wpFXi0A5jOzeVQQQL+3hxi6eQsLprTO4odGaJ5N9PvTOxWWargVvU5B9wZ0D9EE8l Safg== X-Gm-Message-State: APjAAAVEa7cd1P1Jt7J4gaKxcecr2+oiBYZxlmnCzLImAZg1BopXzctk 8+MIJbgGMbcTE1TJt+HigEVJlA== X-Google-Smtp-Source: APXvYqzIWgqqr7I6BeG3SHBvFQCtTgEtoimYgAD4lYjkZn06Onr9bpAbHk2LdWUDLOnhMwZh7qhcyg== X-Received: by 2002:adf:efca:: with SMTP id i10mr28441362wrp.265.1552497437313; Wed, 13 Mar 2019 10:17:17 -0700 (PDT) Received: from vitty.brq.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id o18sm39996168wrg.40.2019.03.13.10.17.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Mar 2019 10:17:16 -0700 (PDT) From: Vitaly Kuznetsov To: Michael Kelley Subject: RE: [PATCH 1/2] Drivers: hv: Move Hyper-V clockevents code to new clocksource driver In-Reply-To: References: <1552426813-9568-1-git-send-email-mikelley@microsoft.com> <1552426813-9568-2-git-send-email-mikelley@microsoft.com> <874l87tbz2.fsf@vitty.brq.redhat.com> <87pnqusvjq.fsf@vitty.brq.redhat.com> Date: Wed, 13 Mar 2019 18:17:15 +0100 Message-ID: <87mulysnhg.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190313_101719_302474_83AD8BC4 X-CRM114-Status: GOOD ( 17.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "mark.rutland@arm.com" , "linux-hyperv@vger.kernel.org" , "marc.zyngier@arm.com" , "catalin.marinas@arm.com" , "jasowang@redhat.com" , "will.deacon@arm.com" , "linux-kernel@vger.kernel.org" , "marcelo.cerri@canonical.com" , "olaf@aepfle.de" , "gregkh@linuxfoundation.org" , "apw@canonical.com" , Sunil Muthuswamy , KY Srinivasan , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Michael Kelley writes: > From: Vitaly Kuznetsov Sent: Wednesday, March 13, 2019 7:23 AM > >> >> > diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile >> >> > index be6e0fb..a887955 100644 >> >> > --- a/drivers/clocksource/Makefile >> >> > +++ b/drivers/clocksource/Makefile >> >> > @@ -83,3 +83,4 @@ obj-$(CONFIG_ATCPIT100_TIMER) += timer-atcpit100.o >> >> > obj-$(CONFIG_RISCV_TIMER) += timer-riscv.o >> >> > obj-$(CONFIG_CSKY_MP_TIMER) += timer-mp-csky.o >> >> > obj-$(CONFIG_GX6605S_TIMER) += timer-gx6605s.o >> >> > +obj-$(CONFIG_HYPERV) += hyperv_syntimer.o >> >> >> >> (just a couple of spare thoughs) >> >> >> >> CONFIG_HYPERV can also be a module, are we OK with that? (we'll have to >> >> support module loading/unloading then and honestly I see no reason for >> >> that. I would prefer everything but VMBus devices to be in >> >> kernel.) If we don't want it to be a module we can create a hidden >> >> CONFIG_HYPERV_STIMER or something like that - just like we already do >> >> for CONFIG_HYPERV_TSCPAGE. >> >> >> >> There is, however, one additional dependency here: when running in >> >> non-direct mode, Hyper-V clockevent devices require functional Hyper-V >> >> messaging - which currently lives in VMBus code so that may explain why >> >> you may want to keep stimer code in the same entity. Or, alternatively, >> >> we can move Hyper-V messaging out of VMBus code (is it actually >> >> architecture-agnostic?) >> >> >> > >> > I thought about introducing CONFIG_HYPERV_STIMER, but in my >> > judgment it was just unnecessary complexity. The Hyper-V clocksource >> > driver can't exist independent of Hyper-V, and vice versa. When both the >> > clocksource and clockevents code is considered, the VMbus driver and >> > Hyper-V initialization code has to call directly into the driver since the >> > Hyper-V synthetic timers and reference time counter aren't independently >> > enumerated. Even if we could get the Hyper-V messaging out of VMbus >> > code, we would still need the clocksource initialization call directly from >> > hyperv_init(), which is not in a module (see the 2nd patch of the series). >> > >> >> Right, so hv_init_clocksource() cannot live in hv_vmbus module and we >> need to somehow prevent hyperv_syntimer.o from going in there. And >> >> +obj-$(CONFIG_HYPERV) += hyperv_syntimer.o >> >> will do exactly the opposite - put it in hv_vmbus module. Or am I >> missing something? (I haven't tried to build your code yet, sorry). >> > > That line just controls whether hyperv_syntimer.o is built. It doesn't put > it in the hv_vmbus module. All of the clocksource .o files that are built go > into the kernel, not in a module. But thinking about it more, the above works > correctly when CONFIG_HYPERV=y, but not when CONFIG_HYPERV=m. Yes, that's what I meant. > I'll have to introduce CONFIG_HYPERV_TIMER after all. Will fix this in v2. Thanks > for the discussion! Thanks! -- Vitaly _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel