Sun Dec 19 01:39:06 2021 UTC ()
Define kinda bogus ARCH_KMALLOC_MINALIGN that's probably enough.


(riastradh)
diff -r1.3 -r1.4 src/sys/external/bsd/common/include/linux/slab.h

cvs diff -r1.3 -r1.4 src/sys/external/bsd/common/include/linux/slab.h (expand / switch to unified diff)

--- src/sys/external/bsd/common/include/linux/slab.h 2021/12/19 01:33:44 1.3
+++ src/sys/external/bsd/common/include/linux/slab.h 2021/12/19 01:39:05 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: slab.h,v 1.3 2021/12/19 01:33:44 riastradh Exp $ */ 1/* $NetBSD: slab.h,v 1.4 2021/12/19 01:39:05 riastradh Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2013 The NetBSD Foundation, Inc. 4 * Copyright (c) 2013 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Taylor R. Campbell. 8 * by Taylor R. Campbell.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -32,26 +32,28 @@ @@ -32,26 +32,28 @@
32#ifndef _LINUX_SLAB_H_ 32#ifndef _LINUX_SLAB_H_
33#define _LINUX_SLAB_H_ 33#define _LINUX_SLAB_H_
34 34
35#include <sys/kmem.h> 35#include <sys/kmem.h>
36#include <sys/malloc.h> 36#include <sys/malloc.h>
37 37
38#include <machine/limits.h> 38#include <machine/limits.h>
39 39
40#include <uvm/uvm_extern.h> /* For PAGE_SIZE. */ 40#include <uvm/uvm_extern.h> /* For PAGE_SIZE. */
41 41
42#include <linux/gfp.h> 42#include <linux/gfp.h>
43#include <linux/rcupdate.h> 43#include <linux/rcupdate.h>
44 44
 45#define ARCH_KMALLOC_MINALIGN 4 /* XXX ??? */
 46
45/* XXX Should use kmem, but Linux kfree doesn't take the size. */ 47/* XXX Should use kmem, but Linux kfree doesn't take the size. */
46 48
47static inline int 49static inline int
48linux_gfp_to_malloc(gfp_t gfp) 50linux_gfp_to_malloc(gfp_t gfp)
49{ 51{
50 int flags = 0; 52 int flags = 0;
51 53
52 /* This has no meaning to us. */ 54 /* This has no meaning to us. */
53 gfp &= ~__GFP_NOWARN; 55 gfp &= ~__GFP_NOWARN;
54 gfp &= ~__GFP_RECLAIMABLE; 56 gfp &= ~__GFP_RECLAIMABLE;
55 57
56 /* Pretend this was the same as not passing __GFP_WAIT. */ 58 /* Pretend this was the same as not passing __GFP_WAIT. */
57 if (ISSET(gfp, __GFP_NORETRY)) { 59 if (ISSET(gfp, __GFP_NORETRY)) {