From patchwork Thu Mar 21 16:36:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suren Baghdasaryan X-Patchwork-Id: 13599174 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 5DA58C6FD1F for ; Thu, 21 Mar 2024 16:38:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6D1776B00AB; Thu, 21 Mar 2024 12:37:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 659B66B00AD; Thu, 21 Mar 2024 12:37:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 485D46B00AE; Thu, 21 Mar 2024 12:37:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 2D2AE6B00AB for ; Thu, 21 Mar 2024 12:37:50 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id F163980B19 for ; Thu, 21 Mar 2024 16:37:49 +0000 (UTC) X-FDA: 81921602658.27.7D590E9 Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) by imf25.hostedemail.com (Postfix) with ESMTP id 1B380A001F for ; Thu, 21 Mar 2024 16:37:47 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=UmrIvuzb; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf25.hostedemail.com: domain of 3W2L8ZQYKCEg241oxlqyyqvo.mywvsx47-wwu5kmu.y1q@flex--surenb.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3W2L8ZQYKCEg241oxlqyyqvo.mywvsx47-wwu5kmu.y1q@flex--surenb.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1711039068; 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=jp7kzC4k0D+sc/q1IPxvwe52UJDwCcNnw+Zbq+7qIDQ=; b=CMAY0maTfs5Gu2J70uMEbGDG4ydnls2G/BnnG0swLi4iePIPHZCsWx7vgFtM0G2OYOoJuG aQtKLKoA5JF4tstQzTFP4SQUzjqBVsfcPE2VPfzHL40xOw+yWj53vNkowjOXKeb7PZHnIN dNanXY4uvHaW2umIsHmA3qP0tqCpPao= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=UmrIvuzb; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf25.hostedemail.com: domain of 3W2L8ZQYKCEg241oxlqyyqvo.mywvsx47-wwu5kmu.y1q@flex--surenb.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3W2L8ZQYKCEg241oxlqyyqvo.mywvsx47-wwu5kmu.y1q@flex--surenb.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1711039068; a=rsa-sha256; cv=none; b=6LwQi7ZgX7O8Wl1ycORPMp2tytv4f5v+qgi+SYzo+0KWdt6fya/DdOfHYwKV8rkBBMMU2q 04tKIvdo495f+heXUqcE6uzkhLBl7jAI88Zu5DlYGc89Cwy6V4AuLaNCPH1sgz3W9GznkR WOKLnteGMcNk2nCJ5r9nrdQsAJgDMos= Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-60a605154d0so14620177b3.0 for ; Thu, 21 Mar 2024 09:37:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1711039067; x=1711643867; 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=jp7kzC4k0D+sc/q1IPxvwe52UJDwCcNnw+Zbq+7qIDQ=; b=UmrIvuzbSkDAmQqKB9LOhD/hnghQoYP9xBauvt/jvW3Rn/9RSzW3zlTh2mwrSRlwy5 +PXoEBEK+RayKojkYidhvN9DT0bEsT6/SJuazocq7LH00M95UQNyV7EWPPhFYr864uTY klHFJv7kVCqb1R8ny2uHCcUbUmORdrS+RLRks+XSNrCcaqAfsFPLkvxYFN8ghCpTCEwI 91gtqEd0A3Mizf5e3zcbdTgk8d9EoCw6zeXeL/nyrU6NOqw08V8J73pQqzk5Jh+58fsi QtaShWoNIhgw/v5AjJ2Rr+t2pso4mkrEWCCaPh8W7z/r3G3IyCoaOSFSm+VdD/zIX+tL Ba+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711039067; x=1711643867; 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=jp7kzC4k0D+sc/q1IPxvwe52UJDwCcNnw+Zbq+7qIDQ=; b=lGTZ/8vHM10CblqUqcCtXJmDLMqA55yMO0u4/1voLqvAtz/d5UT4eSZxhhvaN2pPte OJ+sS70NuZSn9y/QyeWqm1X22OjSUb0bhiTyg0rcT/W6lAUWFManwzOBohmp7uUmDfG+ 7J9ah5DrzsNvLMXYNV33kr3fir0TWHqtpAaCjBaMhtEcuU/juFQDZklszHf/xicE6bL4 ds14VQJESPjO5W8C4F5+xs/cm/cpVZV8UvtXfkfQUTwjIcrxO8WPEOn6XDuE/GtjKAjn CRP6vtC7Ulq/RmLGAz9KJCs7kwreozsX2vOT79nfXhSWUppG6YqXRXE8CCbazmEk6Gd6 xX0A== X-Forwarded-Encrypted: i=1; AJvYcCVqDKusFSj4HDAy7BQA64cZNgFrSwSoHuBFGQ+cT5HdAbZZUyix9UxCLdzAd7cHyaMDyD9SIm7z0J8/V/7047E2kvI= X-Gm-Message-State: AOJu0Yxl/UWbnF1WkUj1vTdxZajV9ml3Q7eU8Gw0x04IPsdmaC5ZapDB qIIR1M49ZPWqv8LLgIDhbmJoB29Wib1fdxQ3YzzSfftaqrrQBll8tpuPkRoAqHB/FxSxZWXQDBp Hpw== X-Google-Smtp-Source: AGHT+IFI5aLEMhGkJPVMYqKYBpHCCYs3laPPvxTJvnz1VdKYfIbwJ16TvQd2SO6GjZkf9rmaF0ZSWy/DcA4= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:a489:6433:be5d:e639]) (user=surenb job=sendgmr) by 2002:a05:690c:6f91:b0:60a:1844:74ef with SMTP id je17-20020a05690c6f9100b0060a184474efmr881713ywb.1.1711039067006; Thu, 21 Mar 2024 09:37:47 -0700 (PDT) Date: Thu, 21 Mar 2024 09:36:39 -0700 In-Reply-To: <20240321163705.3067592-1-surenb@google.com> Mime-Version: 1.0 References: <20240321163705.3067592-1-surenb@google.com> X-Mailer: git-send-email 2.44.0.291.gc1ea87d7ee-goog Message-ID: <20240321163705.3067592-18-surenb@google.com> Subject: [PATCH v6 17/37] 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, penguin-kernel@i-love.sakura.ne.jp, 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, jhubbard@nvidia.com, 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, songmuchun@bytedance.com, jbaron@akamai.com, aliceryhl@google.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-Rspamd-Queue-Id: 1B380A001F X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: b3oztrsgbze93a4mcnt1fn4wquumnxae X-HE-Tag: 1711039067-318360 X-HE-Meta: U2FsdGVkX19vyDj2LQ2ziSgE4w6yIUJUvtwAQCPEeEneLCMe0Hyh3fGrGio5fSi0cBPqcEI7LOCKu2MvIFzoO0Ko/Jswk3mRg4C7ahq6MSpGn9Dm3nvKg6wVcmYjjpdy0b9+XO4QGSaUbNHRxHboAI0nHKrTklqBlS9TSo+jC43UWCpKjwPt+zQZxHWjqou2LymmcRkWavvB9su4O/8PKewMu+WhzTv3G8yhVVwEMnNCK3FHc6PEjFPeI9YpsoBO4XPbG3FoHStSw3x1oISDr/eTjtEkTUQgHGZdd8TNOy48hciyphmEAJP67ONExAUo+zD5Y2IguBheywbGy2veiMy7i4V/Bkp06K4sxIiJolnpykIy9Y3oVDoRBwnbvifgLi0p3ssjbywtyvMEFDjgMAPgMhXKKDR7uoACgB3CsRkZ/9hziozHloQSDZyHgulpBFIvzaKgk5FNozEcMxYEpZ10A5AvD1FgWoxUuEcQP2S69EgrQL1DOgod4uMSZ1aLqg0wDh8IOBiiuZwQA0Nar+spGfMwWGpOipk/C10HPjJp27d3X7pdenn/XAxQJbLPv9kdw6kpJrdPPVTsKS0HSh/lhR+qsewJHk+0U554wi66qFp4YKwsLPFHjkUONIXc+GwQEz0PhSd3sXPqBKMZfLqNoLn82GuvlwgFW9SHiczD++yMLd0CrlDsCP82tcRpayeJJjanlX6rLVhlAiSAfns7NhQakldVtzjN2Kg8UycJ6WUIxyBulptx40nhwDr3c9tg4pBdUkB0UwcAqOxD6Ze+sGIC+M/cVc8qF0dOrA3Xri5tItJdtq2Pme/DwADdJD6i3tIJNxO0Rh7r0Uli4lmlBXs0cGfpkMH9kuPo2eqWIOoJlLKx5IujIrpy42b4ktteQqG48K6UbWAfb4Jggjn0vKN6Xua3AdkTlygvOVBCSdyg/OQg9nbocHzp6aI+t5QxehJaWQ30t666haL 70QdLjz6 abHru8yUesHG6J9rLRAAuWcqZAHkd2yOmPEv4yTBvDGTQBd9sraYgqP+K+iZfonY5hQrwIF0TyTP3XAoQ3xMY1NRFzNtcaow/guXZCV/8A7YHT+VPSvyookKuKmZGOVztzlgR4SA1IfwdaCx+WONaIOm5q6qA/TjHoeG3dTBTVwSxElQi1M600CW/ISAV6kKVL1udzp5LhVOSS4/gxNQ2XWQV82EI13YNzP0153Fgz8k55nPkql4S4IMQ3XR1OBc6yeLdHkFk+uWts/nvFzi6/EfER4WON4CPBdaH/Ye24tD0Ps+MSgM2U6zpUvdgYcxehCxDqYtM06UHvl0R7z6UtHGpek8p6+RdwFmdPvpGAb87hVtJfFugYM9K56qyP9XaQ4blRYpm0Ycn7nwl3rxNLAkC/dedNTdlQAAU7ghyum93nzFu27Gci1mffwhne7rXfgp6kuaUzpuewZcRnPFBm5/cwj5BrHxXgedw+rdoK6geOgmBOiCWPLlkuzMzL9tSeeowj5i18UNuzQ8I5kfa3FatfEw9PVRpRyv567RKijzD/ri7sqODZGbgmw+LuGqXKA6//Y0LPMqI7rR0TPwPC2h1VykCnKv9cNSVqvnLuBMRv4T/vuN66M6BeuhsfXFvDI3G+V3mFNolL1u2+yEsul/aX1d78fkTanr94mccdA4hI8OuONCdxkXF/mDruQYFSI6WMlhOSD3ayhOOnDwgH5dlQHzmS6bB+DWh 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 90ff85c879bf..477c1d5e1737 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 b58f5a3311c3..6ba52481a1d7 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -1715,7 +1715,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,