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
This commit is contained in:
parent
2bf3361d56
commit
132b00f906
@ -46,6 +46,8 @@ struct io_mapping {
|
|||||||
vm_memattr_t attr;
|
vm_memattr_t attr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct io_mapping *io_mapping_create_wc(resource_size_t base, unsigned long size);
|
||||||
|
|
||||||
static inline struct io_mapping *
|
static inline struct io_mapping *
|
||||||
io_mapping_init_wc(struct io_mapping *mapping, resource_size_t base,
|
io_mapping_init_wc(struct io_mapping *mapping, resource_size_t base,
|
||||||
unsigned long size)
|
unsigned long size)
|
||||||
@ -63,17 +65,6 @@ io_mapping_init_wc(struct io_mapping *mapping, resource_size_t base,
|
|||||||
return (mapping);
|
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
|
static inline void
|
||||||
io_mapping_fini(struct io_mapping *mapping)
|
io_mapping_fini(struct io_mapping *mapping)
|
||||||
{
|
{
|
||||||
|
@ -87,6 +87,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <linux/kthread.h>
|
#include <linux/kthread.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/compat.h>
|
#include <linux/compat.h>
|
||||||
|
#include <linux/io-mapping.h>
|
||||||
#include <linux/poll.h>
|
#include <linux/poll.h>
|
||||||
#include <linux/smp.h>
|
#include <linux/smp.h>
|
||||||
#include <linux/wait_bit.h>
|
#include <linux/wait_bit.h>
|
||||||
@ -2716,6 +2717,17 @@ linuxkpi_net_ratelimit(void)
|
|||||||
lkpi_net_maxpps));
|
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__)
|
#if defined(__i386__) || defined(__amd64__)
|
||||||
bool linux_cpu_has_clflush;
|
bool linux_cpu_has_clflush;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user