svn commit: r322795 - head/sys/compat/linuxkpi/common/include/linux
Mark Johnston
markj at FreeBSD.org
Tue Aug 22 17:13:30 UTC 2017
Author: markj
Date: Tue Aug 22 17:13:28 2017
New Revision: 322795
URL: https://svnweb.freebsd.org/changeset/base/322795
Log:
Add some miscellaneous definitions to support the DRM drivers.
MFC after: 1 week
Modified:
head/sys/compat/linuxkpi/common/include/linux/device.h
head/sys/compat/linuxkpi/common/include/linux/fs.h
head/sys/compat/linuxkpi/common/include/linux/kobject.h
head/sys/compat/linuxkpi/common/include/linux/lockdep.h
head/sys/compat/linuxkpi/common/include/linux/module.h
Modified: head/sys/compat/linuxkpi/common/include/linux/device.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/device.h Tue Aug 22 15:34:27 2017 (r322794)
+++ head/sys/compat/linuxkpi/common/include/linux/device.h Tue Aug 22 17:13:28 2017 (r322795)
@@ -50,12 +50,14 @@ enum irqreturn { IRQ_NONE = 0, IRQ_HANDLED, IRQ_WAKE_T
typedef enum irqreturn irqreturn_t;
struct device;
+struct fwnode_handle;
struct class {
const char *name;
struct module *owner;
struct kobject kobj;
devclass_t bsdclass;
+ const struct dev_pm_ops *pm;
void (*class_release)(struct class *class);
void (*dev_release)(struct device *dev);
char * (*devnode)(struct device *dev, umode_t *mode);
@@ -113,6 +115,7 @@ struct device {
unsigned int msix;
unsigned int msix_max;
const struct attribute_group **groups;
+ struct fwnode_handle *fwnode;
spinlock_t devres_lock;
struct list_head devres_head;
@@ -179,6 +182,7 @@ show_class_attr_string(struct class *class,
#define dev_warn(dev, fmt, ...) device_printf((dev)->bsddev, fmt, ##__VA_ARGS__)
#define dev_info(dev, fmt, ...) device_printf((dev)->bsddev, fmt, ##__VA_ARGS__)
#define dev_notice(dev, fmt, ...) device_printf((dev)->bsddev, fmt, ##__VA_ARGS__)
+#define dev_dbg(dev, fmt, ...) do { } while (0)
#define dev_printk(lvl, dev, fmt, ...) \
device_printf((dev)->bsddev, fmt, ##__VA_ARGS__)
Modified: head/sys/compat/linuxkpi/common/include/linux/fs.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/fs.h Tue Aug 22 15:34:27 2017 (r322794)
+++ head/sys/compat/linuxkpi/common/include/linux/fs.h Tue Aug 22 17:13:28 2017 (r322795)
@@ -53,9 +53,11 @@ struct pipe_inode_info;
struct vm_area_struct;
struct poll_table_struct;
struct files_struct;
+struct pfs_node;
#define inode vnode
#define i_cdev v_rdev
+#define i_private v_data
#define S_IRUGO (S_IRUSR | S_IRGRP | S_IROTH)
#define S_IWUGO (S_IWUSR | S_IWGRP | S_IWOTH)
@@ -65,6 +67,7 @@ typedef struct files_struct *fl_owner_t;
struct dentry {
struct inode *d_inode;
+ struct pfs_node *d_pfs_node;
};
struct file_operations;
Modified: head/sys/compat/linuxkpi/common/include/linux/kobject.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/kobject.h Tue Aug 22 15:34:27 2017 (r322794)
+++ head/sys/compat/linuxkpi/common/include/linux/kobject.h Tue Aug 22 17:13:28 2017 (r322795)
@@ -135,6 +135,11 @@ kobject_create_and_add(const char *name, struct kobjec
return (NULL);
}
+static inline void
+kobject_del(struct kobject *kobj __unused)
+{
+}
+
static inline char *
kobject_name(const struct kobject *kobj)
{
Modified: head/sys/compat/linuxkpi/common/include/linux/lockdep.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/lockdep.h Tue Aug 22 15:34:27 2017 (r322794)
+++ head/sys/compat/linuxkpi/common/include/linux/lockdep.h Tue Aug 22 17:13:28 2017 (r322795)
@@ -47,4 +47,6 @@ struct lock_class_key {
#define lockdep_is_held(m) (sx_xholder(&(m)->sx) == curthread)
+#define might_lock(m) do { } while (0)
+
#endif /* _LINUX_LOCKDEP_H_ */
Modified: head/sys/compat/linuxkpi/common/include/linux/module.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/module.h Tue Aug 22 15:34:27 2017 (r322794)
+++ head/sys/compat/linuxkpi/common/include/linux/module.h Tue Aug 22 17:13:28 2017 (r322795)
@@ -102,4 +102,6 @@ _module_run(void *arg)
#define module_put(module)
#define try_module_get(module) 1
+#define postcore_initcall(fn) module_init(fn)
+
#endif /* _LINUX_MODULE_H_ */
More information about the svn-src-all
mailing list