From patchwork Tue Apr 7 01:16:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 11477141 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C64501392 for ; Tue, 7 Apr 2020 01:16:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A4B2B207FF for ; Tue, 7 Apr 2020 01:16:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DItxWHo1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726648AbgDGBQs (ORCPT ); Mon, 6 Apr 2020 21:16:48 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:48566 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726635AbgDGBQr (ORCPT ); Mon, 6 Apr 2020 21:16:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586222206; 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=5TH7w/JfrvK6PO93eOn/asqSkXlWjc9e7s1Mrzet5kE=; b=DItxWHo1onP01S5Mn6ZFOHKDEYzkrKZVfwBN+q9NU2DPRI3ZNa6ILEpOEQ0WiuC7LDSMLo 0CT//Gyx1k/RphJYy1/+ofjMYJzcl7N2ahyY7i0Lvk+eEBQVaP10Ig8COeEghzT3q/J4A2 3UVI7KSTJ3uP1I5SZ9sF2eQK+6TN4+w= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-438-Y03AHXgOO_WmaAlpn-VpWw-1; Mon, 06 Apr 2020 21:16:45 -0400 X-MC-Unique: Y03AHXgOO_WmaAlpn-VpWw-1 Received: by mail-wr1-f70.google.com with SMTP id h95so856066wrh.11 for ; Mon, 06 Apr 2020 18:16:44 -0700 (PDT) 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=5TH7w/JfrvK6PO93eOn/asqSkXlWjc9e7s1Mrzet5kE=; b=rbDeNX2yaJbglwDS4WRYmBQw3e1FA1bSsE0w4cZsXqmuEkFH+TUM6WLtB03hJrjxyv eFtS8Kejs9o6AThulX7gwNVGPQW7X7fvnvvhrCIeqGtrjBtOx/Ag7j8+Urg8c9E0aKji T7ithDvGNPWcUCNU6LP/JEoZn01i+BoBJMOlwV0j4HRI8MSQviFp2mYvqDhSH9cm3cTQ cs80BaweaOHbpg+bKzkvVT/ssk5blf2DNSbno7JoLitYDEOYtnR4Q/3QFJdOThZ5TEVl eMAriG24MLhiyBYvl5CEpEyWFjQW5g6k10zXh1HbIj1NJ0hn2tlsNqGAib8aqRZXhcBV pAew== X-Gm-Message-State: AGi0PuaCRjMmbNF9zRCIhS+O2/2RPmzgMx9EOKwYHl/lYM7wG3QP0AJQ bbTX4n94xdBWx3ceNZM6R7L0INcL3lyGXXItLKlWM0hAqs96sDNebohOa15xS/wOCthg4cQhzcu oS711TCQUb0DfAHgyaDAZ6uoRGHzFmg== X-Received: by 2002:adf:f8c1:: with SMTP id f1mr2102830wrq.345.1586222204017; Mon, 06 Apr 2020 18:16:44 -0700 (PDT) X-Google-Smtp-Source: APiQypIUKx/E68FBj3d4XOQ00hcyXYBl/67P8FPYE2YoFyXU7fFCF05zzALyhpIqvei+4TT7JQeC9g== X-Received: by 2002:adf:f8c1:: with SMTP id f1mr2102818wrq.345.1586222203824; Mon, 06 Apr 2020 18:16:43 -0700 (PDT) Received: from redhat.com (bzq-79-176-51-222.red.bezeqint.net. [79.176.51.222]) by smtp.gmail.com with ESMTPSA id o67sm136301wmo.5.2020.04.06.18.16.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 18:16:43 -0700 (PDT) Date: Mon, 6 Apr 2020 21:16:42 -0400 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Cc: Ohad Ben-Cohen , Bjorn Andersson , linux-remoteproc@vger.kernel.org Subject: [PATCH v8 07/19] remoteproc: pull in slab.h Message-ID: <20200407011612.478226-8-mst@redhat.com> References: <20200407011612.478226-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200407011612.478226-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org In preparation to virtio header changes, include slab.h directly as this module is using it. Signed-off-by: Michael S. Tsirkin Acked-by: Bjorn Andersson --- drivers/remoteproc/remoteproc_sysfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/remoteproc/remoteproc_sysfs.c b/drivers/remoteproc/remoteproc_sysfs.c index 7f8536b73295..52b871327b55 100644 --- a/drivers/remoteproc/remoteproc_sysfs.c +++ b/drivers/remoteproc/remoteproc_sysfs.c @@ -4,6 +4,7 @@ */ #include +#include #include "remoteproc_internal.h" From patchwork Tue Apr 7 01:16:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 11477153 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C01AB912 for ; Tue, 7 Apr 2020 01:17:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9E94120801 for ; Tue, 7 Apr 2020 01:17:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="L1m0sqfK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726825AbgDGBRG (ORCPT ); Mon, 6 Apr 2020 21:17:06 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:42899 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726794AbgDGBRE (ORCPT ); Mon, 6 Apr 2020 21:17:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586222223; 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=TEc48I7L40swgY91SNpoqqlFJs2YDtsi09a3nE4rzt0=; b=L1m0sqfKzS5IrWAvXOgKD04i1HfGmSjmMeoP7KxDc4scov0Kkp9KHt4N5LJq1D7MHWk8Tm OaaZnuI4vJau0DwVU3+ejRLeDnr4RKibrYgU/kBn9KwhLL/Iatni5z4ivLaJ9kaUxXVLTK HGIcVSwQU7f93tRsrvZGragl5U+XWic= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-260-sq8RTNIEOVSybhEiSdYYMA-1; Mon, 06 Apr 2020 21:17:02 -0400 X-MC-Unique: sq8RTNIEOVSybhEiSdYYMA-1 Received: by mail-wm1-f69.google.com with SMTP id s15so47987wmc.0 for ; Mon, 06 Apr 2020 18:17:02 -0700 (PDT) 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=TEc48I7L40swgY91SNpoqqlFJs2YDtsi09a3nE4rzt0=; b=fY0lAlTc0Yxwk0ndOWwSK8F9hhfFhQWli3yMeeZbzHlGSaoGbpZ953WS35q8GiYWgU qanTFQLZwQ0czqZXyunBom5JQBrm/6TPn5GABPz5mnEdquv8QtkSKOLxs4JOgfKlY/GY wfxzE+LJg2r+BQ5WJKa3WLob/NG6egQMoQ6eez2LiovgLEuZ0ukNrCztMB7mXp62Nrm7 9txLreHyWKEO52qM6gbaaQXhdNoccV2U8us8s6eMH9flgVrD6AovVp6dt3BDLg17EgSZ lsgPGo+eH33n7yH6ZDkkiHxo1gOPx7qiIRnwlve9O2gURVQrsU8k9OTXY+cROtRqgjC+ BJvQ== X-Gm-Message-State: AGi0PuYTssFtSPp6V1mmxutM6cPPr9o8J+YqTkxplBshpdB4SkeVPn2N rZsq/Mmc5DngNBMnB0oHfTsuezRdQPEjoOzBPct1L1sWzZsj9oZ0KQWYFDmyTl1WYVtqc91xk5F 9w/DFCBd3Rg6jLnPofWmDS4nN6ctrKg== X-Received: by 2002:a1c:7f8e:: with SMTP id a136mr2117566wmd.33.1586222220759; Mon, 06 Apr 2020 18:17:00 -0700 (PDT) X-Google-Smtp-Source: APiQypKQ8ZFP7SqvR9SfME3wLzzSSain/ZwRIGeGpFsv0tcRpM9Qel1kekfQFVeNUkF4nqbNDouBCQ== X-Received: by 2002:a1c:7f8e:: with SMTP id a136mr2117550wmd.33.1586222220535; Mon, 06 Apr 2020 18:17:00 -0700 (PDT) Received: from redhat.com (bzq-79-176-51-222.red.bezeqint.net. [79.176.51.222]) by smtp.gmail.com with ESMTPSA id u22sm94021wmu.43.2020.04.06.18.16.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 18:17:00 -0700 (PDT) Date: Mon, 6 Apr 2020 21:16:58 -0400 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Cc: Ohad Ben-Cohen , Bjorn Andersson , linux-remoteproc@vger.kernel.org Subject: [PATCH v8 15/19] remoteproc: switch to virtio_legacy_init/size Message-ID: <20200407011612.478226-16-mst@redhat.com> References: <20200407011612.478226-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200407011612.478226-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org These are used for legacy ring format, switch to APIs that make this explicit. Signed-off-by: Michael S. Tsirkin Acked-by: Bjorn Andersson --- drivers/remoteproc/remoteproc_core.c | 2 +- drivers/remoteproc/remoteproc_virtio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 097f33e4f1f3..c350a01e6c4e 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -322,7 +322,7 @@ int rproc_alloc_vring(struct rproc_vdev *rvdev, int i) struct rproc_mem_entry *mem; /* actual size of vring (in bytes) */ - size = PAGE_ALIGN(vring_size(rvring->len, rvring->align)); + size = PAGE_ALIGN(vring_legacy_size(rvring->len, rvring->align)); rsc = (void *)rproc->table_ptr + rvdev->rsc_offset; diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c index 8c07cb2ca8ba..35b02468197a 100644 --- a/drivers/remoteproc/remoteproc_virtio.c +++ b/drivers/remoteproc/remoteproc_virtio.c @@ -95,7 +95,7 @@ static struct virtqueue *rp_find_vq(struct virtio_device *vdev, len = rvring->len; /* zero vring */ - size = vring_size(len, rvring->align); + size = vring_legacy_size(len, rvring->align); memset(addr, 0, size); dev_dbg(dev, "vring%d: va %pK qsz %d notifyid %d\n",