From nobody Tue Apr 05 14:42:35 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 830341A8F265; Tue, 5 Apr 2022 14:42:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KXr300rT0z4cbx; Tue, 5 Apr 2022 14:42:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649169756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hDJJV+F4BzHJpRcfOoRpYYr3jM6SUikpKZ+Ziy6WMNY=; b=gUAFmq9Ma+XE5izvf6GgfznByphUzVHZP3LfVFni3kxRT/5Diy9JF/FP8+zmoe5CtudfIS iw8V8cMiV3fbqVfzdWLRHanKziTRl4Bd3iWjbFpZ0Zmnqol+fq34/wrkFOWwupLmwzLS99 793PKWlMWM49vP0e483lFz8xjOaYWbZ+B7hzstewsgDJTrKoeX26sfJiOs8HicNw3Gc5+G 5NOE3qmn5SbQUKtyoEsQMyNSXbdAa2d2EHxv4uLXPtvCe9HHGRHe1Ml1pEaS5L4/PNuCG4 er6USDmyW6KmGnuTTMqCh+WNZwezUR7xvp0PhdKKkS958f70BkjWMWF8ZaHWoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C91DA1E9; Tue, 5 Apr 2022 14:42:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 235EgZ5j033179; Tue, 5 Apr 2022 14:42:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 235EgZpJ033178; Tue, 5 Apr 2022 14:42:35 GMT (envelope-from git) Date: Tue, 5 Apr 2022 14:42:35 GMT Message-Id: <202204051442.235EgZpJ033178@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 4e94b3542dd6 - stable/13 - linuxkpi: move io_mapping_create_wc to .c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4e94b3542dd6a5c3f60431e811013f4dbf603227 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649169756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hDJJV+F4BzHJpRcfOoRpYYr3jM6SUikpKZ+Ziy6WMNY=; b=xSNAKkuFWU8CdLErt4kfxgfwRY/6CoIA2edVUG7NAvY8I7JsRd3wI7B69dRoZcoINyGnAJ yFBKUAO1WKj321CENIWQVN+tG6l/djOlXa/tq5c0Jdkr0Mnlj5gZYiUunPHid9OY0OfCHm A+FTo8Td4qtTqmTOMeCWF4ia+2IrXVZS/h2dk0YADAbcgt7VFhdcsQsk76q66BE3gS0u4L oUtvC41xeR4V7icxc6/aoI9hCfqe0n0btS/LVlRQNQYaPuifbpd1KKxbCd1QEbpmzWjhgO AqYBkzZDuKEArliUELrSdY+x+TyUZIb08HYV1EkAnWDOtY6IEksn6nYx63U5tQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649169756; a=rsa-sha256; cv=none; b=WiAsvzBdCyB7hJ1WkuUF2QP4whHA/q8qsZPJMhSV9bC84YHUaOi1PrVGUVo82EaFFsheHS +FWR52ZROGX22ksJCBV5g8TwFiZ7zTY06MyEm9HqfIv4UkpzrTOlUl2KfkNppqkjfcbMfG hjdpi2c+1FFjP4doLXIn/5X5514n906oroDoBlNFcNitwHKbOFbLv+1xwr6WYiKhLpCap1 ZSy70lxrrLBHkvQ8P9oIQ5RTnDONYBjxN+A5GGmxgXrJdzXWxlnO0N5ZuVk7iNsR5vHsuQ E2+BgqDokL+dg/GckYoxmK6mztOqy6mCVyPaVe4GnQsjK72VYEDGciSJRGA39g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4e94b3542dd6a5c3f60431e811013f4dbf603227 commit 4e94b3542dd6a5c3f60431e811013f4dbf603227 Author: Warner Losh AuthorDate: 2022-04-05 05:06:37 +0000 Commit: Warner Losh CommitDate: 2022-04-05 14:40:11 +0000 linuxkpi: move io_mapping_create_wc to .c Move io_mapping_create_wc to .c because it encodes the size of struct io_mapping so we move this from the client module to the linuxkpi module. Sponsored by: Netflix Reviewed by: hselasky, emaste Differential Revision: https://reviews.freebsd.org/D34776 (cherry picked from commit 132b00f90613d8cc797137d4c3d2dcb99ba3c690) --- sys/compat/linuxkpi/common/include/linux/io-mapping.h | 13 ++----------- sys/compat/linuxkpi/common/src/linux_compat.c | 12 ++++++++++++ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/io-mapping.h b/sys/compat/linuxkpi/common/include/linux/io-mapping.h index 9c7ad5095bf3..5c24f1ff8659 100644 --- a/sys/compat/linuxkpi/common/include/linux/io-mapping.h +++ b/sys/compat/linuxkpi/common/include/linux/io-mapping.h @@ -46,6 +46,8 @@ struct io_mapping { vm_memattr_t attr; }; +struct io_mapping *io_mapping_create_wc(resource_size_t base, unsigned long size); + static inline struct io_mapping * io_mapping_init_wc(struct io_mapping *mapping, resource_size_t base, unsigned long size) @@ -63,17 +65,6 @@ io_mapping_init_wc(struct io_mapping *mapping, resource_size_t base, return (mapping); } -static inline struct io_mapping * -io_mapping_create_wc(resource_size_t base, unsigned long size) -{ - struct io_mapping *mapping; - - mapping = kmalloc(sizeof(*mapping), GFP_KERNEL); - if (mapping == NULL) - return (NULL); - return (io_mapping_init_wc(mapping, base, size)); -} - static inline void io_mapping_fini(struct io_mapping *mapping) { diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index a146b7bc9aa0..a574f8bad0f1 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -86,6 +86,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -2717,6 +2718,17 @@ linuxkpi_net_ratelimit(void) lkpi_net_maxpps)); } +struct io_mapping * +io_mapping_create_wc(resource_size_t base, unsigned long size) +{ + struct io_mapping *mapping; + + mapping = kmalloc(sizeof(*mapping), GFP_KERNEL); + if (mapping == NULL) + return (NULL); + return (io_mapping_init_wc(mapping, base, size)); +} + #if defined(__i386__) || defined(__amd64__) bool linux_cpu_has_clflush; #endif