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=-6.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 E3EE7C43461 for ; Wed, 16 Sep 2020 04:06:58 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 8029E20708 for ; Wed, 16 Sep 2020 04:06:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="yRx7ZWPJ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JI6cl06/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8029E20708 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5F72T5QFStylIWlOfDGMymOzWNkTVCTbd7evDpcsHAQ=; b=yRx7ZWPJJLLN2ehy6lXK9rgvJ x7UfdcVPb5k/F8lF1FEW82OpHEHdZOGo/R/BcTGHdvL8cNvrxr9sGFI9xGX6qKr+jjAWqt3tVsQ43 /H6Q7nW7GgltnpS2SfuN48bxGjA9m/B+a0Tdnjxhz9e49IJMqO8hpJbAl7OFQCYZQVVsdYIhyV5uN yj5vIv5ll/cRKoowsS4xEUASx3ld9SQUr06XGapcU9fcOq0W066d6wcWPTo+CAXXGkLFIHNMzo1D4 O7b1XV/64HbDSUKdTMVi4oJMWB9L4Bo4PirVZqwZ0G1WBvcXDNe5/uBzeseWDa2K5V+7g66u7yOZL E2W2izkVg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIOh5-0004g8-1v; Wed, 16 Sep 2020 04:05:19 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIOh2-0004fb-Ry for linux-arm-kernel@lists.infradead.org; Wed, 16 Sep 2020 04:05:17 +0000 Received: by mail-pg1-x543.google.com with SMTP id j34so3141454pgi.7 for ; Tue, 15 Sep 2020 21:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=J5hBLNAeKi7sYZ3kBhjD3Odx80a8hnn7AnndRx+Ra8w=; b=JI6cl06/ZTc9Eqe4z9EIUEoq8cN7ktx+bhfqFUaPKb9qD4Ftz8EmjiAa+6pJH5y3kl ztEPpr9a1qYIM+MxU7OIaCWSrLAn6Hzepv3g/YbrWuHmSjKpLd8Rt5rUt6eMBjsdNONV dLbulSM55aHScKGon+ECfE7K9eZe0Z73KvnepSSaL+TZGp4KbsU2uUrFbiPpBw6rfAS0 mBg+hUuCgaQ47Ff1pw2L6aYIG/Xo2k9pz8Ewjkt5WcQlOrzyfv/ZnD9WD/WR1z/sGosJ hVEa2uaTzJs7A5PM3RoUzHdPa1FTViY0ptVCFcwXRpX0m5e7xyVcYF1DxxC7qCr5SOli iwBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=J5hBLNAeKi7sYZ3kBhjD3Odx80a8hnn7AnndRx+Ra8w=; b=gg/fa7zVHafHSedScJ9vg048deX9K2Lf4j+1RdxSsHbLoAuV+qcLzage9Nh5AuYiey NUxcMWAwqmCRjyOkErheTlR3rSV4114IeqtWYVfFtWk7gAGRraAP4CVXkPKh4lDuSSIJ Uda0PVFEu5uDgqnvZ1GxaP80er+dfHWn2s+e2tdz8fAnL1rdOi1AvAm6ROJ2lQQu2JfE AUnAqBJFP6vG2ISTUbsBKh5kdQPZTENszU3pHUGzkfPBIU7zRvpUwyw2XvflmgP/pdXt 5YKBtd7k/WAntEAHxfABhbJdbP/z1wPWVdax7tMHsRnrUtnF6mtxDkifYAUsYr1kvgdB CdTg== X-Gm-Message-State: AOAM5305shfxn6WCOoyuoA+XqHHNTdXLGR8Kqi3edF3uV8NfgzC3CQTn YWTk+IF61CUycdlaKObhL38h3+AJSzE= X-Google-Smtp-Source: ABdhPJwuBQJfISTIpXKH+vrbO4W1krC4th+wfsmwkF0zsNhfMBFZefvLS0SVIQPZr+pLCQ+S2HXWGw== X-Received: by 2002:a63:521c:: with SMTP id g28mr10130802pgb.43.1600229114515; Tue, 15 Sep 2020 21:05:14 -0700 (PDT) Received: from dtor-ws ([2620:15c:202:201:a6ae:11ff:fe11:fcc3]) by smtp.gmail.com with ESMTPSA id d25sm7586887pgl.23.2020.09.15.21.05.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 21:05:13 -0700 (PDT) Date: Tue, 15 Sep 2020 21:05:11 -0700 From: Dmitry Torokhov To: Boqun Feng Subject: Re: [PATCH v4 08/11] Input: hyperv-keyboard: Use VMBUS_RING_SIZE() for ringbuffer sizes Message-ID: <20200916040511.GH1681290@dtor-ws> References: <20200916034817.30282-1-boqun.feng@gmail.com> <20200916034817.30282-9-boqun.feng@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200916034817.30282-9-boqun.feng@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200916_000516_936611_46E2F704 X-CRM114-Status: GOOD ( 16.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, linux-hyperv@vger.kernel.org, catalin.marinas@arm.com, Michael Kelley , Benjamin Tissoires , "K. Y. Srinivasan" , will@kernel.org, ardb@kernel.org, Wei Liu , Stephen Hemminger , linux-scsi@vger.kernel.org, maz@kernel.org, linux-input@vger.kernel.org, Jakub Kicinski , "James E.J. Bottomley" , arnd@arndb.de, Haiyang Zhang , Jiri Kosina , linux-arm-kernel@lists.infradead.org, "Martin K. Petersen" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 16, 2020 at 11:48:14AM +0800, Boqun Feng wrote: > For a Hyper-V vmbus, the size of the ringbuffer has two requirements: > > 1) it has to take one PAGE_SIZE for the header > > 2) it has to be PAGE_SIZE aligned so that double-mapping can work > > VMBUS_RING_SIZE() could calculate a correct ringbuffer size which > fulfills both requirements, therefore use it to make sure vmbus work > when PAGE_SIZE != HV_HYP_PAGE_SIZE (4K). > > Note that since the argument for VMBUS_RING_SIZE() is the size of > payload (data part), so it will be minus 4k (the size of header when > PAGE_SIZE = 4k) than the original value to keep the ringbuffer total > size unchanged when PAGE_SIZE = 4k. > > Signed-off-by: Boqun Feng > Cc: Michael Kelley > Cc: Dmitry Torokhov Acked-by: Dmitry Torokhov Please feel free to merge through whatever tree the rest of the patches will go. Thanks. -- Dmitry _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel