From patchwork Mon Feb 12 21:39:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suren Baghdasaryan X-Patchwork-Id: 13554054 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 991C5C4829D for ; Mon, 12 Feb 2024 21:40:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C31B86B009B; Mon, 12 Feb 2024 16:40:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BE18C6B009C; Mon, 12 Feb 2024 16:40:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A33866B009D; Mon, 12 Feb 2024 16:40:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 89CB76B009B for ; Mon, 12 Feb 2024 16:40:10 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6BE96A1E71 for ; Mon, 12 Feb 2024 21:40:10 +0000 (UTC) X-FDA: 81784470180.18.73CE3E8 Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) by imf01.hostedemail.com (Postfix) with ESMTP id 93EB740011 for ; Mon, 12 Feb 2024 21:40:08 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=JzPe5imB; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf01.hostedemail.com: domain of 3N5DKZQYKCLYoqnajXckkcha.Ykihejqt-iigrWYg.knc@flex--surenb.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3N5DKZQYKCLYoqnajXckkcha.Ykihejqt-iigrWYg.knc@flex--surenb.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707774008; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=gyt+GmM2eMHRRKEe8/8uFf8EZSlg2sZI9NA/PbSxBWI=; b=Asu/NvfnqLIOEUTmgrvr0p5oJ6U939fzHCKM+d3c4yvhVHrDZT0AIXq1lf1u4Txw8xB5rC RpodIBhCvozFgSZ72R7Svbki1uq+RVbqaiMZ8UZjlmmqnfIXATj2gt5SVrHmNNgVm0qGxw osq/UQIj9UIvpNVcOYu5KjE0Bpk3nFY= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=JzPe5imB; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf01.hostedemail.com: domain of 3N5DKZQYKCLYoqnajXckkcha.Ykihejqt-iigrWYg.knc@flex--surenb.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3N5DKZQYKCLYoqnajXckkcha.Ykihejqt-iigrWYg.knc@flex--surenb.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707774008; a=rsa-sha256; cv=none; b=fbrTNflcIEIg338d0gJ259Ekpp7YK5d+DnRVZQ/yFARYYnqRIDCifEDlKdikgcIMFdrazl ST+2SQlzwgkKBfyBJt8+CVE1OxvztyE6WUhKYUiQLAm4KQOtsse6ADFeEBz7AZXqeuCNs/ lpcT2yARsNKUI7ng0xHzmEdaHzUes2s= Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-604ab15463aso4576627b3.3 for ; Mon, 12 Feb 2024 13:40:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707774007; x=1708378807; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=gyt+GmM2eMHRRKEe8/8uFf8EZSlg2sZI9NA/PbSxBWI=; b=JzPe5imBhkxrwDH8dDwFzaBFUhriOWz8cqS0HPRoL1wQOfhqYgFK7DBSjEonX3hdbS aivadebV8HIcAfxIRIxg0k2JhOEJ6xXbKJDajDZozSVvske9j+ZLNFdMCcPVHbq7H5qT Q2tEzYn/p6WG5he3ElneLQhx7OKagwPXh9Y4WEr2dRe0CnGWwRJsZQxLp2/2Z53S1hQL VmEBdiOFRhKHcdfjsekmwRNvz6nDMOaTtUdLy8jhHXmFV+F4dpctktsw0aIrktaiAUmo hkhqGaUHCkL5mtfJ40nSKUu3q2zc8z8bNeWpQAV1gbcHVn7Xb1eIRmWEWRPbdjEtaw62 n+4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707774007; x=1708378807; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gyt+GmM2eMHRRKEe8/8uFf8EZSlg2sZI9NA/PbSxBWI=; b=OT3RDIETDcNx4SblKXh2NlRqvFW2aFHSPKTE6FMzUd6JS//8N1IARruLFlCJ+D/uHc evtUFQOGG4M42IHO1kgVbbSA5NmgXPu+NgK/FtqmOiRa2HMZdOoO5bdf+dtko63FP7ya XSLR0/U+h+MBrw9luDXh8kBWsnq2clxKxAu7JzuMneqdnbFnTeOkVRjhgNjVoae56OxE IAxSRFIN0TMHn+40j0o09yUZt4t9scj8oVU/UriRZaaAgmFAv4oPQltFZaxWnJPkRsAE Nu82inZ6RgUYkX+UOANAqzXV0jCOBxfGjFc6qPh/DL0FcewoWoHW1UHPaY51n3AzKm4i yEfw== X-Forwarded-Encrypted: i=1; AJvYcCWxlI9r/yXVhwqOSK471eW9jBc4Pj8Oxz6wQnlViilToBAOan1UaJJniKjvfS/rlGMY5bU6okZvCFwLdyxrR+b0v18= X-Gm-Message-State: AOJu0YwTyL7pOcLheseB1ToRjMHpeKORd0vORGhdL0a0wFauQq/1XR5h NZ7V1ePEIdpzS4wOtdDHjMDXDD9FCEjCISY/8njOiigUk3djUaIALaQ4Okq7JvzqcPMqUAsfstB v/g== X-Google-Smtp-Source: AGHT+IFq2nZiWlkvaCq5BbxuMd0rU4hXzsPUeXzg8XtldG/VPRi/VWxJUnymRdhbS2wacAZbpAHHkokQ9sA= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:b848:2b3f:be49:9cbc]) (user=surenb job=sendgmr) by 2002:a81:848a:0:b0:604:49a1:8da0 with SMTP id u132-20020a81848a000000b0060449a18da0mr1393758ywf.8.1707774007616; Mon, 12 Feb 2024 13:40:07 -0800 (PST) Date: Mon, 12 Feb 2024 13:39:02 -0800 In-Reply-To: <20240212213922.783301-1-surenb@google.com> Mime-Version: 1.0 References: <20240212213922.783301-1-surenb@google.com> X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog Message-ID: <20240212213922.783301-17-surenb@google.com> Subject: [PATCH v3 16/35] change alloc_pages name in dma_map_ops to avoid name conflicts From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: kent.overstreet@linux.dev, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, keescook@chromium.org, ndesaulniers@google.com, vvvvvv@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, jbaron@akamai.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, surenb@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org X-Rspam-User: X-Stat-Signature: 9f6yij1tuskqfo4sqs3ee8o5e8stpb97 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 93EB740011 X-HE-Tag: 1707774008-322360 X-HE-Meta: U2FsdGVkX1+dcHaRwbfGaTAjbYHJWgm+DhU68StWBBDm4G4DC3EnTyY8lpNz+3JOH+CXw/2GbefzV5zRvzrzcBI0c4NFHeHP9xU7umELzSAiHNoIhW49oIFKvRL73Jq2kHi86Gdg+lov5xR2Nvi+yBrZRMo6WPUV8ogPgwMuLXTOYOjaabJ3lE8p9VYB89ipH9u4hIWnBPNOCF16Fb97konYaeD5OlQvuvGBWH75ZXfjRFJS7Owi/JiqSwx7mfGYcdi9TUQBM4nUrGG64iyYubYZDcMjRNLesCUnkJacZyiYWcZI3AqEMZO2AefZ3VTsiqs9pPYO9DQoLf75pfW0k4Ude3GUnzqvWgLUORiqDJXBRkYeg6N8E2rlE4lbZ+ZFL9ypblC6SdD6rsW1xJ9bkmB9uKm1TWAb6KRXsYWW9zfnULz8EKDQeGT2dcBm8izv679ujeWDRd1LI+mwtfE8NRy/rHr/f7Kw40bGqPxdMkGdQr2Xsj+54g4XQGLulZQS7dHNqkYPqgjnbiSmtu8e7XPLskMJxEvCQm7a6jZrdTf7HIp3tyfNYoQeIF/2Hi9oJ2+I77WxUl+GBOBAFI6tw0t22NnodfuTbwXXqpISgqEbkIp/HOVO5zQGuzFdGbCN0JH35RaaRKBDV5/8Av7Y+s/3sd8bNGj7X5vek0lJHKNsk04oUhMOlVDooG/T57QSfIa9azVTP03Kcg+0l2hmI4WzucRlvaOL8xaFpzk6TjIfn49iW2iaz97yeO3ykVN46L6JV0CSH1P2SkvaFzXnZXopiLZu2y3vXUHFT6M/zBR2Oi1nka/Mot0Bx5S1kTN4LzPah3l00rEPOfENKvX2yFpH5mFNUhh2QQ3b8gd8eovA9RLo9Txjr5msEtBPfWO4cmO4H8ySCKPAGafv7C0ZHVVpgx4MA3S/tkZwNtzxKusU6Ena7zIXk+ybUCtSkEEGXnuvSHFsjMprR9nFvyK J2CEjAj5 dusH5oW2gTVYCVKdftzBVZTl/krs2GUHBIz4cnLxqZAl8QPYWiSxa5u93rQsyF5DR3YiFST5aAoO7TBwq7UHuMOmrJjCxINVfP1r+9wCrBq806c71G6UuzbRLMt0i7jj37vBGzO4WaRCMm2F037eWHlJs13HK5VY5UTr3+rw5KTEYLd/u3PL/VWerYJjKX25dPhCe0aNi8EUOG2Ty/04XZwAgy2Dvkj7Aefhv1Oy91vBzQwfHyJzY5eBnzorhnf6+lNjxLTlEhCjcWkww/qKM/Ty2PTmJPnulg5z/YdbsoNsUA5bceileHlXqPu5okBtc//Z5hmpKThUWvhj0795vooLTK0K6A+l8J/jfFlZnoUL5G4Pzqn1EIOAKTYb6z4BlSK9JPngAiKFPhYv8dRd7XPWR938l5pBxszjcoLAn/HB1DsGue+R5QpGFULz+D1+OwNt0h0cz8R9SZsY89dmAMN/JA9/ta1+2Y3ze0Cj67eTqHpFFV9vRu14+/wiIhG+AHD5Y/ITHykJPODixdqUCQ2dGAWh/IoXkffZPlkVQgaXZvDacI4VeI+fZStlKfJ7mPSjEk9wlX+JRLtDMgwNRabXTYoyqj8EPiCMT6dSOPDR2J3RQOlU6qoPNu9ICyUWbgIHgXoWS0T8Q70CJtCBUjo/8xZNLX58ckSxUBBKK5AurVbiliqkRJKmE+OrH5y1P/PA7OMBxt6/bCWsh+B6hygrj3gH9GSzgP6SS X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: After redefining alloc_pages, all uses of that name are being replaced. Change the conflicting names to prevent preprocessor from replacing them when it's not intended. Signed-off-by: Suren Baghdasaryan --- arch/alpha/kernel/pci_iommu.c | 2 +- arch/mips/jazz/jazzdma.c | 2 +- arch/powerpc/kernel/dma-iommu.c | 2 +- arch/powerpc/platforms/ps3/system-bus.c | 4 ++-- arch/powerpc/platforms/pseries/vio.c | 2 +- arch/x86/kernel/amd_gart_64.c | 2 +- drivers/iommu/dma-iommu.c | 2 +- drivers/parisc/ccio-dma.c | 2 +- drivers/parisc/sba_iommu.c | 2 +- drivers/xen/grant-dma-ops.c | 2 +- drivers/xen/swiotlb-xen.c | 2 +- include/linux/dma-map-ops.h | 2 +- kernel/dma/mapping.c | 4 ++-- 13 files changed, 15 insertions(+), 15 deletions(-) diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c index c81183935e97..7fcf3e9b7103 100644 --- a/arch/alpha/kernel/pci_iommu.c +++ b/arch/alpha/kernel/pci_iommu.c @@ -929,7 +929,7 @@ const struct dma_map_ops alpha_pci_ops = { .dma_supported = alpha_pci_supported, .mmap = dma_common_mmap, .get_sgtable = dma_common_get_sgtable, - .alloc_pages = dma_common_alloc_pages, + .alloc_pages_op = dma_common_alloc_pages, .free_pages = dma_common_free_pages, }; EXPORT_SYMBOL(alpha_pci_ops); diff --git a/arch/mips/jazz/jazzdma.c b/arch/mips/jazz/jazzdma.c index eabddb89d221..c97b089b9902 100644 --- a/arch/mips/jazz/jazzdma.c +++ b/arch/mips/jazz/jazzdma.c @@ -617,7 +617,7 @@ const struct dma_map_ops jazz_dma_ops = { .sync_sg_for_device = jazz_dma_sync_sg_for_device, .mmap = dma_common_mmap, .get_sgtable = dma_common_get_sgtable, - .alloc_pages = dma_common_alloc_pages, + .alloc_pages_op = dma_common_alloc_pages, .free_pages = dma_common_free_pages, }; EXPORT_SYMBOL(jazz_dma_ops); diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c index 8920862ffd79..f0ae39e77e37 100644 --- a/arch/powerpc/kernel/dma-iommu.c +++ b/arch/powerpc/kernel/dma-iommu.c @@ -216,6 +216,6 @@ const struct dma_map_ops dma_iommu_ops = { .get_required_mask = dma_iommu_get_required_mask, .mmap = dma_common_mmap, .get_sgtable = dma_common_get_sgtable, - .alloc_pages = dma_common_alloc_pages, + .alloc_pages_op = dma_common_alloc_pages, .free_pages = dma_common_free_pages, }; diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c index d6b5f5ecd515..56dc6b29a3e7 100644 --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c @@ -695,7 +695,7 @@ static const struct dma_map_ops ps3_sb_dma_ops = { .unmap_page = ps3_unmap_page, .mmap = dma_common_mmap, .get_sgtable = dma_common_get_sgtable, - .alloc_pages = dma_common_alloc_pages, + .alloc_pages_op = dma_common_alloc_pages, .free_pages = dma_common_free_pages, }; @@ -709,7 +709,7 @@ static const struct dma_map_ops ps3_ioc0_dma_ops = { .unmap_page = ps3_unmap_page, .mmap = dma_common_mmap, .get_sgtable = dma_common_get_sgtable, - .alloc_pages = dma_common_alloc_pages, + .alloc_pages_op = dma_common_alloc_pages, .free_pages = dma_common_free_pages, }; diff --git a/arch/powerpc/platforms/pseries/vio.c b/arch/powerpc/platforms/pseries/vio.c index 2dc9cbc4bcd8..0c90fc4c3796 100644 --- a/arch/powerpc/platforms/pseries/vio.c +++ b/arch/powerpc/platforms/pseries/vio.c @@ -611,7 +611,7 @@ static const struct dma_map_ops vio_dma_mapping_ops = { .get_required_mask = dma_iommu_get_required_mask, .mmap = dma_common_mmap, .get_sgtable = dma_common_get_sgtable, - .alloc_pages = dma_common_alloc_pages, + .alloc_pages_op = dma_common_alloc_pages, .free_pages = dma_common_free_pages, }; diff --git a/arch/x86/kernel/amd_gart_64.c b/arch/x86/kernel/amd_gart_64.c index 2ae98f754e59..c884deca839b 100644 --- a/arch/x86/kernel/amd_gart_64.c +++ b/arch/x86/kernel/amd_gart_64.c @@ -676,7 +676,7 @@ static const struct dma_map_ops gart_dma_ops = { .get_sgtable = dma_common_get_sgtable, .dma_supported = dma_direct_supported, .get_required_mask = dma_direct_get_required_mask, - .alloc_pages = dma_direct_alloc_pages, + .alloc_pages_op = dma_direct_alloc_pages, .free_pages = dma_direct_free_pages, }; diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index 50ccc4f1ef81..8a1f7f5d1bca 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -1710,7 +1710,7 @@ static const struct dma_map_ops iommu_dma_ops = { .flags = DMA_F_PCI_P2PDMA_SUPPORTED, .alloc = iommu_dma_alloc, .free = iommu_dma_free, - .alloc_pages = dma_common_alloc_pages, + .alloc_pages_op = dma_common_alloc_pages, .free_pages = dma_common_free_pages, .alloc_noncontiguous = iommu_dma_alloc_noncontiguous, .free_noncontiguous = iommu_dma_free_noncontiguous, diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index 9ce0d20a6c58..feef537257d0 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c @@ -1022,7 +1022,7 @@ static const struct dma_map_ops ccio_ops = { .map_sg = ccio_map_sg, .unmap_sg = ccio_unmap_sg, .get_sgtable = dma_common_get_sgtable, - .alloc_pages = dma_common_alloc_pages, + .alloc_pages_op = dma_common_alloc_pages, .free_pages = dma_common_free_pages, }; diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c index 784037837f65..fc3863c09f83 100644 --- a/drivers/parisc/sba_iommu.c +++ b/drivers/parisc/sba_iommu.c @@ -1090,7 +1090,7 @@ static const struct dma_map_ops sba_ops = { .map_sg = sba_map_sg, .unmap_sg = sba_unmap_sg, .get_sgtable = dma_common_get_sgtable, - .alloc_pages = dma_common_alloc_pages, + .alloc_pages_op = dma_common_alloc_pages, .free_pages = dma_common_free_pages, }; diff --git a/drivers/xen/grant-dma-ops.c b/drivers/xen/grant-dma-ops.c index 76f6f26265a3..29257d2639db 100644 --- a/drivers/xen/grant-dma-ops.c +++ b/drivers/xen/grant-dma-ops.c @@ -282,7 +282,7 @@ static int xen_grant_dma_supported(struct device *dev, u64 mask) static const struct dma_map_ops xen_grant_dma_ops = { .alloc = xen_grant_dma_alloc, .free = xen_grant_dma_free, - .alloc_pages = xen_grant_dma_alloc_pages, + .alloc_pages_op = xen_grant_dma_alloc_pages, .free_pages = xen_grant_dma_free_pages, .mmap = dma_common_mmap, .get_sgtable = dma_common_get_sgtable, diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 0e6c6c25d154..1c4ef5111651 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -403,7 +403,7 @@ const struct dma_map_ops xen_swiotlb_dma_ops = { .dma_supported = xen_swiotlb_dma_supported, .mmap = dma_common_mmap, .get_sgtable = dma_common_get_sgtable, - .alloc_pages = dma_common_alloc_pages, + .alloc_pages_op = dma_common_alloc_pages, .free_pages = dma_common_free_pages, .max_mapping_size = swiotlb_max_mapping_size, }; diff --git a/include/linux/dma-map-ops.h b/include/linux/dma-map-ops.h index 4abc60f04209..9ee319851b5f 100644 --- a/include/linux/dma-map-ops.h +++ b/include/linux/dma-map-ops.h @@ -29,7 +29,7 @@ struct dma_map_ops { unsigned long attrs); void (*free)(struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle, unsigned long attrs); - struct page *(*alloc_pages)(struct device *dev, size_t size, + struct page *(*alloc_pages_op)(struct device *dev, size_t size, dma_addr_t *dma_handle, enum dma_data_direction dir, gfp_t gfp); void (*free_pages)(struct device *dev, size_t size, struct page *vaddr, diff --git a/kernel/dma/mapping.c b/kernel/dma/mapping.c index 58db8fd70471..5e2d51e1cdf6 100644 --- a/kernel/dma/mapping.c +++ b/kernel/dma/mapping.c @@ -570,9 +570,9 @@ static struct page *__dma_alloc_pages(struct device *dev, size_t size, size = PAGE_ALIGN(size); if (dma_alloc_direct(dev, ops)) return dma_direct_alloc_pages(dev, size, dma_handle, dir, gfp); - if (!ops->alloc_pages) + if (!ops->alloc_pages_op) return NULL; - return ops->alloc_pages(dev, size, dma_handle, dir, gfp); + return ops->alloc_pages_op(dev, size, dma_handle, dir, gfp); } struct page *dma_alloc_pages(struct device *dev, size_t size,