Merge branch 'devel-stable' into for-next
This commit is contained in:
@@ -701,6 +701,18 @@ static inline pte_t pte_mknuma(pte_t pte)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef ptep_set_numa
|
||||
static inline void ptep_set_numa(struct mm_struct *mm, unsigned long addr,
|
||||
pte_t *ptep)
|
||||
{
|
||||
pte_t ptent = *ptep;
|
||||
|
||||
ptent = pte_mknuma(ptent);
|
||||
set_pte_at(mm, addr, ptep, ptent);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef pmd_mknuma
|
||||
static inline pmd_t pmd_mknuma(pmd_t pmd)
|
||||
{
|
||||
@@ -708,6 +720,18 @@ static inline pmd_t pmd_mknuma(pmd_t pmd)
|
||||
return pmd_clear_flags(pmd, _PAGE_PRESENT);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef pmdp_set_numa
|
||||
static inline void pmdp_set_numa(struct mm_struct *mm, unsigned long addr,
|
||||
pmd_t *pmdp)
|
||||
{
|
||||
pmd_t pmd = *pmdp;
|
||||
|
||||
pmd = pmd_mknuma(pmd);
|
||||
set_pmd_at(mm, addr, pmdp, pmd);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
extern int pte_numa(pte_t pte);
|
||||
extern int pmd_numa(pmd_t pmd);
|
||||
@@ -715,6 +739,8 @@ extern pte_t pte_mknonnuma(pte_t pte);
|
||||
extern pmd_t pmd_mknonnuma(pmd_t pmd);
|
||||
extern pte_t pte_mknuma(pte_t pte);
|
||||
extern pmd_t pmd_mknuma(pmd_t pmd);
|
||||
extern void ptep_set_numa(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
|
||||
extern void pmdp_set_numa(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp);
|
||||
#endif /* CONFIG_ARCH_USES_NUMA_PROT_NONE */
|
||||
#else
|
||||
static inline int pmd_numa(pmd_t pmd)
|
||||
@@ -742,10 +768,23 @@ static inline pte_t pte_mknuma(pte_t pte)
|
||||
return pte;
|
||||
}
|
||||
|
||||
static inline void ptep_set_numa(struct mm_struct *mm, unsigned long addr,
|
||||
pte_t *ptep)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static inline pmd_t pmd_mknuma(pmd_t pmd)
|
||||
{
|
||||
return pmd;
|
||||
}
|
||||
|
||||
static inline void pmdp_set_numa(struct mm_struct *mm, unsigned long addr,
|
||||
pmd_t *pmdp)
|
||||
{
|
||||
return ;
|
||||
}
|
||||
#endif /* CONFIG_NUMA_BALANCING */
|
||||
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
@@ -199,6 +199,9 @@ int drm_err(const char *func, const char *format, ...);
|
||||
#define DRM_INFO(fmt, ...) \
|
||||
printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
|
||||
|
||||
#define DRM_INFO_ONCE(fmt, ...) \
|
||||
printk_once(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
|
||||
|
||||
/**
|
||||
* Debug output.
|
||||
*
|
||||
|
||||
@@ -907,6 +907,9 @@ struct drm_mode_config {
|
||||
|
||||
/* whether async page flip is supported or not */
|
||||
bool async_page_flip;
|
||||
|
||||
/* cursor size */
|
||||
uint32_t cursor_width, cursor_height;
|
||||
};
|
||||
|
||||
#define obj_to_crtc(x) container_of(x, struct drm_crtc, base)
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include <drm/ttm/ttm_bo_driver.h>
|
||||
#include <drm/ttm/ttm_memory.h>
|
||||
|
||||
struct device;
|
||||
|
||||
/**
|
||||
* Initialize pool allocator.
|
||||
*/
|
||||
|
||||
@@ -250,6 +250,17 @@ static inline unsigned bio_segments(struct bio *bio)
|
||||
struct bio_vec bv;
|
||||
struct bvec_iter iter;
|
||||
|
||||
/*
|
||||
* We special case discard/write same, because they interpret bi_size
|
||||
* differently:
|
||||
*/
|
||||
|
||||
if (bio->bi_rw & REQ_DISCARD)
|
||||
return 1;
|
||||
|
||||
if (bio->bi_rw & REQ_WRITE_SAME)
|
||||
return 1;
|
||||
|
||||
bio_for_each_segment(bv, bio, iter)
|
||||
segs++;
|
||||
|
||||
@@ -332,6 +343,7 @@ extern struct bio *bio_clone_fast(struct bio *, gfp_t, struct bio_set *);
|
||||
extern struct bio *bio_clone_bioset(struct bio *, gfp_t, struct bio_set *bs);
|
||||
|
||||
extern struct bio_set *fs_bio_set;
|
||||
unsigned int bio_integrity_tag_size(struct bio *bio);
|
||||
|
||||
static inline struct bio *bio_alloc(gfp_t gfp_mask, unsigned int nr_iovecs)
|
||||
{
|
||||
|
||||
@@ -83,6 +83,8 @@ struct blk_mq_ops {
|
||||
*/
|
||||
rq_timed_out_fn *timeout;
|
||||
|
||||
softirq_done_fn *complete;
|
||||
|
||||
/*
|
||||
* Override for hctx allocations (should probably go)
|
||||
*/
|
||||
@@ -119,11 +121,12 @@ void blk_mq_init_commands(struct request_queue *, void (*init)(void *data, struc
|
||||
|
||||
void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule);
|
||||
|
||||
void blk_mq_insert_request(struct request_queue *, struct request *, bool);
|
||||
void blk_mq_insert_request(struct request_queue *, struct request *,
|
||||
bool, bool);
|
||||
void blk_mq_run_queues(struct request_queue *q, bool async);
|
||||
void blk_mq_free_request(struct request *rq);
|
||||
bool blk_mq_can_queue(struct blk_mq_hw_ctx *);
|
||||
struct request *blk_mq_alloc_request(struct request_queue *q, int rw, gfp_t gfp, bool reserved);
|
||||
struct request *blk_mq_alloc_request(struct request_queue *q, int rw, gfp_t gfp);
|
||||
struct request *blk_mq_alloc_reserved_request(struct request_queue *q, int rw, gfp_t gfp);
|
||||
struct request *blk_mq_rq_from_tag(struct request_queue *q, unsigned int tag);
|
||||
|
||||
@@ -133,6 +136,8 @@ void blk_mq_free_single_hw_queue(struct blk_mq_hw_ctx *, unsigned int);
|
||||
|
||||
void blk_mq_end_io(struct request *rq, int error);
|
||||
|
||||
void blk_mq_complete_request(struct request *rq);
|
||||
|
||||
void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx);
|
||||
void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx);
|
||||
void blk_mq_stop_hw_queues(struct request_queue *q);
|
||||
|
||||
@@ -98,7 +98,7 @@ struct request {
|
||||
struct list_head queuelist;
|
||||
union {
|
||||
struct call_single_data csd;
|
||||
struct work_struct mq_flush_data;
|
||||
struct work_struct mq_flush_work;
|
||||
};
|
||||
|
||||
struct request_queue *q;
|
||||
@@ -448,13 +448,8 @@ struct request_queue {
|
||||
unsigned long flush_pending_since;
|
||||
struct list_head flush_queue[2];
|
||||
struct list_head flush_data_in_flight;
|
||||
union {
|
||||
struct request flush_rq;
|
||||
struct {
|
||||
spinlock_t mq_flush_lock;
|
||||
struct work_struct mq_flush_work;
|
||||
};
|
||||
};
|
||||
struct request *flush_rq;
|
||||
spinlock_t mq_flush_lock;
|
||||
|
||||
struct mutex sysfs_lock;
|
||||
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
#define CAN_SKB_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/can.h>
|
||||
#include <net/sock.h>
|
||||
|
||||
/*
|
||||
* The struct can_skb_priv is used to transport additional information along
|
||||
@@ -42,4 +44,40 @@ static inline void can_skb_reserve(struct sk_buff *skb)
|
||||
skb_reserve(skb, sizeof(struct can_skb_priv));
|
||||
}
|
||||
|
||||
static inline void can_skb_destructor(struct sk_buff *skb)
|
||||
{
|
||||
sock_put(skb->sk);
|
||||
}
|
||||
|
||||
static inline void can_skb_set_owner(struct sk_buff *skb, struct sock *sk)
|
||||
{
|
||||
if (sk) {
|
||||
sock_hold(sk);
|
||||
skb->destructor = can_skb_destructor;
|
||||
skb->sk = sk;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* returns an unshared skb owned by the original sock to be echo'ed back
|
||||
*/
|
||||
static inline struct sk_buff *can_create_echo_skb(struct sk_buff *skb)
|
||||
{
|
||||
if (skb_shared(skb)) {
|
||||
struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC);
|
||||
|
||||
if (likely(nskb)) {
|
||||
can_skb_set_owner(nskb, skb->sk);
|
||||
consume_skb(skb);
|
||||
return nskb;
|
||||
} else {
|
||||
kfree_skb(skb);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* we can assume to have an unshared skb with proper owner */
|
||||
return skb;
|
||||
}
|
||||
|
||||
#endif /* CAN_SKB_H */
|
||||
|
||||
@@ -373,8 +373,9 @@ extern const char *ceph_mds_op_name(int op);
|
||||
/*
|
||||
* Ceph setxattr request flags.
|
||||
*/
|
||||
#define CEPH_XATTR_CREATE 1
|
||||
#define CEPH_XATTR_REPLACE 2
|
||||
#define CEPH_XATTR_CREATE (1 << 0)
|
||||
#define CEPH_XATTR_REPLACE (1 << 1)
|
||||
#define CEPH_XATTR_REMOVE (1 << 31)
|
||||
|
||||
union ceph_mds_request_args {
|
||||
struct {
|
||||
|
||||
@@ -166,6 +166,8 @@ struct cgroup {
|
||||
*
|
||||
* The ID of the root cgroup is always 0, and a new cgroup
|
||||
* will be assigned with a smallest available ID.
|
||||
*
|
||||
* Allocating/Removing ID must be protected by cgroup_mutex.
|
||||
*/
|
||||
int id;
|
||||
|
||||
|
||||
@@ -75,11 +75,7 @@
|
||||
*
|
||||
* (asm goto is automatically volatile - the naming reflects this.)
|
||||
*/
|
||||
#if GCC_VERSION <= 40801
|
||||
# define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
|
||||
#else
|
||||
# define asm_volatile_goto(x...) do { asm goto(x); } while (0)
|
||||
#endif
|
||||
#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
|
||||
|
||||
#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
|
||||
#if GCC_VERSION >= 40400
|
||||
|
||||
@@ -171,7 +171,7 @@ struct dma_buf *dma_buf_export_named(void *priv, const struct dma_buf_ops *ops,
|
||||
size_t size, int flags, const char *);
|
||||
|
||||
#define dma_buf_export(priv, ops, size, flags) \
|
||||
dma_buf_export_named(priv, ops, size, flags, __FILE__)
|
||||
dma_buf_export_named(priv, ops, size, flags, KBUILD_MODNAME)
|
||||
|
||||
int dma_buf_fd(struct dma_buf *dmabuf, int flags);
|
||||
struct dma_buf *dma_buf_get(int fd);
|
||||
|
||||
@@ -99,7 +99,7 @@ struct fsnotify_ops {
|
||||
struct fsnotify_mark *inode_mark,
|
||||
struct fsnotify_mark *vfsmount_mark,
|
||||
u32 mask, void *data, int data_type,
|
||||
const unsigned char *file_name);
|
||||
const unsigned char *file_name, u32 cookie);
|
||||
void (*free_group_priv)(struct fsnotify_group *group);
|
||||
void (*freeing_mark)(struct fsnotify_mark *mark, struct fsnotify_group *group);
|
||||
void (*free_event)(struct fsnotify_event *event);
|
||||
@@ -160,7 +160,7 @@ struct fsnotify_group {
|
||||
|
||||
struct fasync_struct *fsn_fa; /* async notification */
|
||||
|
||||
struct fsnotify_event overflow_event; /* Event we queue when the
|
||||
struct fsnotify_event *overflow_event; /* Event we queue when the
|
||||
* notification list is too
|
||||
* full */
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
#include <linux/err.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
#ifdef CONFIG_GPIOLIB
|
||||
|
||||
struct device;
|
||||
struct gpio_chip;
|
||||
|
||||
@@ -18,6 +16,8 @@ struct gpio_chip;
|
||||
*/
|
||||
struct gpio_desc;
|
||||
|
||||
#ifdef CONFIG_GPIOLIB
|
||||
|
||||
/* Acquire and dispose GPIOs */
|
||||
struct gpio_desc *__must_check gpiod_get(struct device *dev,
|
||||
const char *con_id);
|
||||
|
||||
@@ -875,7 +875,7 @@ struct vmbus_channel_relid_released {
|
||||
struct vmbus_channel_initiate_contact {
|
||||
struct vmbus_channel_message_header header;
|
||||
u32 vmbus_version_requested;
|
||||
u32 padding2;
|
||||
u32 target_vcpu; /* The VCPU the host should respond to */
|
||||
u64 interrupt_page;
|
||||
u64 monitor_page1;
|
||||
u64 monitor_page2;
|
||||
|
||||
@@ -158,6 +158,11 @@ devm_request_irq(struct device *dev, unsigned int irq, irq_handler_t handler,
|
||||
devname, dev_id);
|
||||
}
|
||||
|
||||
extern int __must_check
|
||||
devm_request_any_context_irq(struct device *dev, unsigned int irq,
|
||||
irq_handler_t handler, unsigned long irqflags,
|
||||
const char *devname, void *dev_id);
|
||||
|
||||
extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id);
|
||||
|
||||
/*
|
||||
|
||||
@@ -118,9 +118,7 @@ extern int mq_init_ns(struct ipc_namespace *ns);
|
||||
* the new maximum will handle anyone else. I may have to revisit this
|
||||
* in the future.
|
||||
*/
|
||||
#define MIN_QUEUESMAX 1
|
||||
#define DFLT_QUEUESMAX 256
|
||||
#define HARD_QUEUESMAX 1024
|
||||
#define MIN_MSGMAX 1
|
||||
#define DFLT_MSG 10U
|
||||
#define DFLT_MSGMAX 10
|
||||
|
||||
@@ -249,7 +249,8 @@ void kernfs_notify(struct kernfs_node *kn);
|
||||
|
||||
const void *kernfs_super_ns(struct super_block *sb);
|
||||
struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags,
|
||||
struct kernfs_root *root, const void *ns);
|
||||
struct kernfs_root *root, bool *new_sb_created,
|
||||
const void *ns);
|
||||
void kernfs_kill_sb(struct super_block *sb);
|
||||
|
||||
void kernfs_init(void);
|
||||
@@ -317,7 +318,7 @@ static inline const void *kernfs_super_ns(struct super_block *sb)
|
||||
|
||||
static inline struct dentry *
|
||||
kernfs_mount_ns(struct file_system_type *fs_type, int flags,
|
||||
struct kernfs_root *root, const void *ns)
|
||||
struct kernfs_root *root, bool *new_sb_created, const void *ns)
|
||||
{ return ERR_PTR(-ENOSYS); }
|
||||
|
||||
static inline void kernfs_kill_sb(struct super_block *sb) { }
|
||||
@@ -368,9 +369,9 @@ static inline int kernfs_remove_by_name(struct kernfs_node *parent,
|
||||
|
||||
static inline struct dentry *
|
||||
kernfs_mount(struct file_system_type *fs_type, int flags,
|
||||
struct kernfs_root *root)
|
||||
struct kernfs_root *root, bool *new_sb_created)
|
||||
{
|
||||
return kernfs_mount_ns(fs_type, flags, root, NULL);
|
||||
return kernfs_mount_ns(fs_type, flags, root, new_sb_created, NULL);
|
||||
}
|
||||
|
||||
#endif /* __LINUX_KERNFS_H */
|
||||
|
||||
@@ -387,7 +387,7 @@ struct max8997_dev {
|
||||
struct i2c_client *muic; /* slave addr 0x4a */
|
||||
struct mutex iolock;
|
||||
|
||||
int type;
|
||||
unsigned long type;
|
||||
struct platform_device *battery; /* battery control (not fuel gauge) */
|
||||
|
||||
int irq;
|
||||
|
||||
@@ -163,7 +163,7 @@ struct max8998_dev {
|
||||
int ono;
|
||||
u8 irq_masks_cur[MAX8998_NUM_IRQ_REGS];
|
||||
u8 irq_masks_cache[MAX8998_NUM_IRQ_REGS];
|
||||
int type;
|
||||
unsigned long type;
|
||||
bool wakeup;
|
||||
};
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ struct tps65217_board {
|
||||
struct tps65217 {
|
||||
struct device *dev;
|
||||
struct tps65217_board *pdata;
|
||||
unsigned int id;
|
||||
unsigned long id;
|
||||
struct regulator_desc desc[TPS65217_NUM_REGULATOR];
|
||||
struct regulator_dev *rdev[TPS65217_NUM_REGULATOR];
|
||||
struct regmap *regmap;
|
||||
@@ -263,7 +263,7 @@ static inline struct tps65217 *dev_to_tps65217(struct device *dev)
|
||||
return dev_get_drvdata(dev);
|
||||
}
|
||||
|
||||
static inline int tps65217_chip_id(struct tps65217 *tps65217)
|
||||
static inline unsigned long tps65217_chip_id(struct tps65217 *tps65217)
|
||||
{
|
||||
return tps65217->id;
|
||||
}
|
||||
|
||||
@@ -38,8 +38,10 @@
|
||||
#include <linux/pci.h>
|
||||
#include <linux/spinlock_types.h>
|
||||
#include <linux/semaphore.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/radix-tree.h>
|
||||
|
||||
#include <linux/mlx5/device.h>
|
||||
#include <linux/mlx5/doorbell.h>
|
||||
|
||||
@@ -227,6 +229,7 @@ struct mlx5_uuar_info {
|
||||
* protect uuar allocation data structs
|
||||
*/
|
||||
struct mutex lock;
|
||||
u32 ver;
|
||||
};
|
||||
|
||||
struct mlx5_bf {
|
||||
|
||||
@@ -752,6 +752,9 @@ struct netdev_phys_port_id {
|
||||
unsigned char id_len;
|
||||
};
|
||||
|
||||
typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
|
||||
struct sk_buff *skb);
|
||||
|
||||
/*
|
||||
* This structure defines the management hooks for network devices.
|
||||
* The following hooks can be defined; unless noted otherwise, they are
|
||||
@@ -783,7 +786,7 @@ struct netdev_phys_port_id {
|
||||
* Required can not be NULL.
|
||||
*
|
||||
* u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb,
|
||||
* void *accel_priv);
|
||||
* void *accel_priv, select_queue_fallback_t fallback);
|
||||
* Called to decide which queue to when device supports multiple
|
||||
* transmit queues.
|
||||
*
|
||||
@@ -1005,7 +1008,8 @@ struct net_device_ops {
|
||||
struct net_device *dev);
|
||||
u16 (*ndo_select_queue)(struct net_device *dev,
|
||||
struct sk_buff *skb,
|
||||
void *accel_priv);
|
||||
void *accel_priv,
|
||||
select_queue_fallback_t fallback);
|
||||
void (*ndo_change_rx_flags)(struct net_device *dev,
|
||||
int flags);
|
||||
void (*ndo_set_rx_mode)(struct net_device *dev);
|
||||
@@ -1551,7 +1555,6 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev,
|
||||
struct netdev_queue *netdev_pick_tx(struct net_device *dev,
|
||||
struct sk_buff *skb,
|
||||
void *accel_priv);
|
||||
u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb);
|
||||
|
||||
/*
|
||||
* Net namespace inlines
|
||||
@@ -2275,6 +2278,26 @@ static inline void netdev_reset_queue(struct net_device *dev_queue)
|
||||
netdev_tx_reset_queue(netdev_get_tx_queue(dev_queue, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* netdev_cap_txqueue - check if selected tx queue exceeds device queues
|
||||
* @dev: network device
|
||||
* @queue_index: given tx queue index
|
||||
*
|
||||
* Returns 0 if given tx queue index >= number of device tx queues,
|
||||
* otherwise returns the originally passed tx queue index.
|
||||
*/
|
||||
static inline u16 netdev_cap_txqueue(struct net_device *dev, u16 queue_index)
|
||||
{
|
||||
if (unlikely(queue_index >= dev->real_num_tx_queues)) {
|
||||
net_warn_ratelimited("%s selects TX queue %d, but real number of TX queues is %d\n",
|
||||
dev->name, queue_index,
|
||||
dev->real_num_tx_queues);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return queue_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* netif_running - test if up
|
||||
* @dev: network device
|
||||
@@ -3068,7 +3091,12 @@ void netdev_change_features(struct net_device *dev);
|
||||
void netif_stacked_transfer_operstate(const struct net_device *rootdev,
|
||||
struct net_device *dev);
|
||||
|
||||
netdev_features_t netif_skb_features(struct sk_buff *skb);
|
||||
netdev_features_t netif_skb_dev_features(struct sk_buff *skb,
|
||||
const struct net_device *dev);
|
||||
static inline netdev_features_t netif_skb_features(struct sk_buff *skb)
|
||||
{
|
||||
return netif_skb_dev_features(skb, skb->dev);
|
||||
}
|
||||
|
||||
static inline bool net_gso_ok(netdev_features_t features, int gso_type)
|
||||
{
|
||||
|
||||
+89
-74
@@ -169,35 +169,15 @@ static inline const char *of_node_full_name(const struct device_node *np)
|
||||
|
||||
extern struct device_node *of_find_node_by_name(struct device_node *from,
|
||||
const char *name);
|
||||
#define for_each_node_by_name(dn, name) \
|
||||
for (dn = of_find_node_by_name(NULL, name); dn; \
|
||||
dn = of_find_node_by_name(dn, name))
|
||||
extern struct device_node *of_find_node_by_type(struct device_node *from,
|
||||
const char *type);
|
||||
#define for_each_node_by_type(dn, type) \
|
||||
for (dn = of_find_node_by_type(NULL, type); dn; \
|
||||
dn = of_find_node_by_type(dn, type))
|
||||
extern struct device_node *of_find_compatible_node(struct device_node *from,
|
||||
const char *type, const char *compat);
|
||||
#define for_each_compatible_node(dn, type, compatible) \
|
||||
for (dn = of_find_compatible_node(NULL, type, compatible); dn; \
|
||||
dn = of_find_compatible_node(dn, type, compatible))
|
||||
extern struct device_node *of_find_matching_node_and_match(
|
||||
struct device_node *from,
|
||||
const struct of_device_id *matches,
|
||||
const struct of_device_id **match);
|
||||
static inline struct device_node *of_find_matching_node(
|
||||
struct device_node *from,
|
||||
const struct of_device_id *matches)
|
||||
{
|
||||
return of_find_matching_node_and_match(from, matches, NULL);
|
||||
}
|
||||
#define for_each_matching_node(dn, matches) \
|
||||
for (dn = of_find_matching_node(NULL, matches); dn; \
|
||||
dn = of_find_matching_node(dn, matches))
|
||||
#define for_each_matching_node_and_match(dn, matches, match) \
|
||||
for (dn = of_find_matching_node_and_match(NULL, matches, match); \
|
||||
dn; dn = of_find_matching_node_and_match(dn, matches, match))
|
||||
|
||||
extern struct device_node *of_find_node_by_path(const char *path);
|
||||
extern struct device_node *of_find_node_by_phandle(phandle handle);
|
||||
extern struct device_node *of_get_parent(const struct device_node *node);
|
||||
@@ -209,43 +189,11 @@ extern struct device_node *of_get_next_available_child(
|
||||
|
||||
extern struct device_node *of_get_child_by_name(const struct device_node *node,
|
||||
const char *name);
|
||||
#define for_each_child_of_node(parent, child) \
|
||||
for (child = of_get_next_child(parent, NULL); child != NULL; \
|
||||
child = of_get_next_child(parent, child))
|
||||
|
||||
#define for_each_available_child_of_node(parent, child) \
|
||||
for (child = of_get_next_available_child(parent, NULL); child != NULL; \
|
||||
child = of_get_next_available_child(parent, child))
|
||||
|
||||
static inline int of_get_child_count(const struct device_node *np)
|
||||
{
|
||||
struct device_node *child;
|
||||
int num = 0;
|
||||
|
||||
for_each_child_of_node(np, child)
|
||||
num++;
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
static inline int of_get_available_child_count(const struct device_node *np)
|
||||
{
|
||||
struct device_node *child;
|
||||
int num = 0;
|
||||
|
||||
for_each_available_child_of_node(np, child)
|
||||
num++;
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
/* cache lookup */
|
||||
extern struct device_node *of_find_next_cache_node(const struct device_node *);
|
||||
extern struct device_node *of_find_node_with_property(
|
||||
struct device_node *from, const char *prop_name);
|
||||
#define for_each_node_with_property(dn, prop_name) \
|
||||
for (dn = of_find_node_with_property(NULL, prop_name); dn; \
|
||||
dn = of_find_node_with_property(dn, prop_name))
|
||||
|
||||
extern struct property *of_find_property(const struct device_node *np,
|
||||
const char *name,
|
||||
@@ -367,27 +315,48 @@ static inline struct device_node *of_find_node_by_name(struct device_node *from,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct device_node *of_find_node_by_type(struct device_node *from,
|
||||
const char *type)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct device_node *of_find_matching_node_and_match(
|
||||
struct device_node *from,
|
||||
const struct of_device_id *matches,
|
||||
const struct of_device_id **match)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct device_node *of_get_parent(const struct device_node *node)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct device_node *of_get_next_child(
|
||||
const struct device_node *node, struct device_node *prev)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct device_node *of_get_next_available_child(
|
||||
const struct device_node *node, struct device_node *prev)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct device_node *of_find_node_with_property(
|
||||
struct device_node *from, const char *prop_name)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline bool of_have_populated_dt(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Kill an unused variable warning on a device_node pointer */
|
||||
static inline void __of_use_dn(const struct device_node *np)
|
||||
{
|
||||
}
|
||||
|
||||
#define for_each_child_of_node(parent, child) \
|
||||
while (__of_use_dn(parent), __of_use_dn(child), 0)
|
||||
|
||||
#define for_each_available_child_of_node(parent, child) \
|
||||
while (0)
|
||||
|
||||
static inline struct device_node *of_get_child_by_name(
|
||||
const struct device_node *node,
|
||||
const char *name)
|
||||
@@ -395,16 +364,6 @@ static inline struct device_node *of_get_child_by_name(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline int of_get_child_count(const struct device_node *np)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int of_get_available_child_count(const struct device_node *np)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int of_device_is_compatible(const struct device_node *device,
|
||||
const char *name)
|
||||
{
|
||||
@@ -569,6 +528,13 @@ extern int of_node_to_nid(struct device_node *np);
|
||||
static inline int of_node_to_nid(struct device_node *device) { return 0; }
|
||||
#endif
|
||||
|
||||
static inline struct device_node *of_find_matching_node(
|
||||
struct device_node *from,
|
||||
const struct of_device_id *matches)
|
||||
{
|
||||
return of_find_matching_node_and_match(from, matches, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* of_property_read_bool - Findfrom a property
|
||||
* @np: device node from which the property value is to be read.
|
||||
@@ -618,6 +584,55 @@ static inline int of_property_read_u32(const struct device_node *np,
|
||||
s; \
|
||||
s = of_prop_next_string(prop, s))
|
||||
|
||||
#define for_each_node_by_name(dn, name) \
|
||||
for (dn = of_find_node_by_name(NULL, name); dn; \
|
||||
dn = of_find_node_by_name(dn, name))
|
||||
#define for_each_node_by_type(dn, type) \
|
||||
for (dn = of_find_node_by_type(NULL, type); dn; \
|
||||
dn = of_find_node_by_type(dn, type))
|
||||
#define for_each_compatible_node(dn, type, compatible) \
|
||||
for (dn = of_find_compatible_node(NULL, type, compatible); dn; \
|
||||
dn = of_find_compatible_node(dn, type, compatible))
|
||||
#define for_each_matching_node(dn, matches) \
|
||||
for (dn = of_find_matching_node(NULL, matches); dn; \
|
||||
dn = of_find_matching_node(dn, matches))
|
||||
#define for_each_matching_node_and_match(dn, matches, match) \
|
||||
for (dn = of_find_matching_node_and_match(NULL, matches, match); \
|
||||
dn; dn = of_find_matching_node_and_match(dn, matches, match))
|
||||
|
||||
#define for_each_child_of_node(parent, child) \
|
||||
for (child = of_get_next_child(parent, NULL); child != NULL; \
|
||||
child = of_get_next_child(parent, child))
|
||||
#define for_each_available_child_of_node(parent, child) \
|
||||
for (child = of_get_next_available_child(parent, NULL); child != NULL; \
|
||||
child = of_get_next_available_child(parent, child))
|
||||
|
||||
#define for_each_node_with_property(dn, prop_name) \
|
||||
for (dn = of_find_node_with_property(NULL, prop_name); dn; \
|
||||
dn = of_find_node_with_property(dn, prop_name))
|
||||
|
||||
static inline int of_get_child_count(const struct device_node *np)
|
||||
{
|
||||
struct device_node *child;
|
||||
int num = 0;
|
||||
|
||||
for_each_child_of_node(np, child)
|
||||
num++;
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
static inline int of_get_available_child_count(const struct device_node *np)
|
||||
{
|
||||
struct device_node *child;
|
||||
int num = 0;
|
||||
|
||||
for_each_available_child_of_node(np, child)
|
||||
num++;
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_PROC_FS) && defined(CONFIG_PROC_DEVICETREE)
|
||||
extern void proc_device_tree_add_node(struct device_node *, struct proc_dir_entry *);
|
||||
extern void proc_device_tree_add_prop(struct proc_dir_entry *pde, struct property *prop);
|
||||
|
||||
@@ -78,11 +78,13 @@ static inline int of_device_uevent_modalias(struct device *dev,
|
||||
|
||||
static inline void of_device_node_put(struct device *dev) { }
|
||||
|
||||
static inline const struct of_device_id *of_match_device(
|
||||
static inline const struct of_device_id *__of_match_device(
|
||||
const struct of_device_id *matches, const struct device *dev)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#define of_match_device(matches, dev) \
|
||||
__of_match_device(of_match_ptr(matches), (dev))
|
||||
|
||||
static inline struct device_node *of_cpu_device_node_get(int cpu)
|
||||
{
|
||||
|
||||
@@ -1169,8 +1169,23 @@ void msi_remove_pci_irq_vectors(struct pci_dev *dev);
|
||||
void pci_restore_msi_state(struct pci_dev *dev);
|
||||
int pci_msi_enabled(void);
|
||||
int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec);
|
||||
static inline int pci_enable_msi_exact(struct pci_dev *dev, int nvec)
|
||||
{
|
||||
int rc = pci_enable_msi_range(dev, nvec, nvec);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
int pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries,
|
||||
int minvec, int maxvec);
|
||||
static inline int pci_enable_msix_exact(struct pci_dev *dev,
|
||||
struct msix_entry *entries, int nvec)
|
||||
{
|
||||
int rc = pci_enable_msix_range(dev, entries, nvec, nvec);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
static inline int pci_msi_vec_count(struct pci_dev *dev) { return -ENOSYS; }
|
||||
static inline int pci_enable_msi_block(struct pci_dev *dev, int nvec)
|
||||
@@ -1189,9 +1204,14 @@ static inline int pci_msi_enabled(void) { return 0; }
|
||||
static inline int pci_enable_msi_range(struct pci_dev *dev, int minvec,
|
||||
int maxvec)
|
||||
{ return -ENOSYS; }
|
||||
static inline int pci_enable_msi_exact(struct pci_dev *dev, int nvec)
|
||||
{ return -ENOSYS; }
|
||||
static inline int pci_enable_msix_range(struct pci_dev *dev,
|
||||
struct msix_entry *entries, int minvec, int maxvec)
|
||||
{ return -ENOSYS; }
|
||||
static inline int pci_enable_msix_exact(struct pci_dev *dev,
|
||||
struct msix_entry *entries, int nvec)
|
||||
{ return -ENOSYS; }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PCIEPORTBUS
|
||||
|
||||
@@ -146,7 +146,9 @@ static inline void phy_set_bus_width(struct phy *phy, int bus_width)
|
||||
phy->attrs.bus_width = bus_width;
|
||||
}
|
||||
struct phy *phy_get(struct device *dev, const char *string);
|
||||
struct phy *phy_optional_get(struct device *dev, const char *string);
|
||||
struct phy *devm_phy_get(struct device *dev, const char *string);
|
||||
struct phy *devm_phy_optional_get(struct device *dev, const char *string);
|
||||
void phy_put(struct phy *phy);
|
||||
void devm_phy_put(struct device *dev, struct phy *phy);
|
||||
struct phy *of_phy_simple_xlate(struct device *dev,
|
||||
@@ -232,11 +234,23 @@ static inline struct phy *phy_get(struct device *dev, const char *string)
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline struct phy *phy_optional_get(struct device *dev,
|
||||
const char *string)
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline struct phy *devm_phy_get(struct device *dev, const char *string)
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline struct phy *devm_phy_optional_get(struct device *dev,
|
||||
const char *string)
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline void phy_put(struct phy *phy)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2916,5 +2916,22 @@ static inline bool skb_head_is_locked(const struct sk_buff *skb)
|
||||
{
|
||||
return !skb->head_frag || skb_cloned(skb);
|
||||
}
|
||||
|
||||
/**
|
||||
* skb_gso_network_seglen - Return length of individual segments of a gso packet
|
||||
*
|
||||
* @skb: GSO skb
|
||||
*
|
||||
* skb_gso_network_seglen is used to determine the real size of the
|
||||
* individual segments, including Layer3 (IP, IPv6) and L4 headers (TCP/UDP).
|
||||
*
|
||||
* The MAC/L2 header is not accounted for.
|
||||
*/
|
||||
static inline unsigned int skb_gso_network_seglen(const struct sk_buff *skb)
|
||||
{
|
||||
unsigned int hdr_len = skb_transport_header(skb) -
|
||||
skb_network_header(skb);
|
||||
return hdr_len + skb_gso_transport_seglen(skb);
|
||||
}
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _LINUX_SKBUFF_H */
|
||||
|
||||
@@ -188,6 +188,9 @@ static inline void kick_all_cpus_sync(void) { }
|
||||
*/
|
||||
extern void arch_disable_smp_support(void);
|
||||
|
||||
extern void arch_enable_nonboot_cpus_begin(void);
|
||||
extern void arch_enable_nonboot_cpus_end(void);
|
||||
|
||||
void smp_setup_processor_id(void);
|
||||
|
||||
#endif /* __LINUX_SMP_H */
|
||||
|
||||
@@ -273,7 +273,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
|
||||
* message while queuing transfers that arrive in the meantime. When the
|
||||
* driver is finished with this message, it must call
|
||||
* spi_finalize_current_message() so the subsystem can issue the next
|
||||
* transfer
|
||||
* message
|
||||
* @unprepare_transfer_hardware: there are currently no more messages on the
|
||||
* queue so the subsystem notifies the driver that it may relax the
|
||||
* hardware by issuing this call
|
||||
@@ -287,7 +287,10 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
|
||||
* - return 1 if the transfer is still in progress. When
|
||||
* the driver is finished with this transfer it must
|
||||
* call spi_finalize_current_transfer() so the subsystem
|
||||
* can issue the next transfer
|
||||
* can issue the next transfer. Note: transfer_one and
|
||||
* transfer_one_message are mutually exclusive; when both
|
||||
* are set, the generic subsystem does not call your
|
||||
* transfer_one callback.
|
||||
* @unprepare_message: undo any work done by prepare_message().
|
||||
* @cs_gpios: Array of GPIOs to use as chip select lines; one per CS
|
||||
* number. Any individual value may be -ENOENT for CS lines that
|
||||
|
||||
@@ -281,13 +281,15 @@ asmlinkage long sys_sched_setscheduler(pid_t pid, int policy,
|
||||
asmlinkage long sys_sched_setparam(pid_t pid,
|
||||
struct sched_param __user *param);
|
||||
asmlinkage long sys_sched_setattr(pid_t pid,
|
||||
struct sched_attr __user *attr);
|
||||
struct sched_attr __user *attr,
|
||||
unsigned int flags);
|
||||
asmlinkage long sys_sched_getscheduler(pid_t pid);
|
||||
asmlinkage long sys_sched_getparam(pid_t pid,
|
||||
struct sched_param __user *param);
|
||||
asmlinkage long sys_sched_getattr(pid_t pid,
|
||||
struct sched_attr __user *attr,
|
||||
unsigned int size);
|
||||
unsigned int size,
|
||||
unsigned int flags);
|
||||
asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len,
|
||||
unsigned long __user *user_mask_ptr);
|
||||
asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len,
|
||||
|
||||
@@ -126,6 +126,7 @@ extern bool arch_uprobe_xol_was_trapped(struct task_struct *tsk);
|
||||
extern int arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val, void *data);
|
||||
extern void arch_uprobe_abort_xol(struct arch_uprobe *aup, struct pt_regs *regs);
|
||||
extern unsigned long arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regs *regs);
|
||||
extern bool __weak arch_uprobe_ignore(struct arch_uprobe *aup, struct pt_regs *regs);
|
||||
#else /* !CONFIG_UPROBES */
|
||||
struct uprobes_state {
|
||||
};
|
||||
|
||||
@@ -1265,8 +1265,6 @@ typedef void (*usb_complete_t)(struct urb *);
|
||||
* @sg: scatter gather buffer list, the buffer size of each element in
|
||||
* the list (except the last) must be divisible by the endpoint's
|
||||
* max packet size if no_sg_constraint isn't set in 'struct usb_bus'
|
||||
* (FIXME: scatter-gather under xHCI is broken for periodic transfers.
|
||||
* Do not use urb->sg for interrupt endpoints for now, only bulk.)
|
||||
* @num_mapped_sgs: (internal) number of mapped sg entries
|
||||
* @num_sgs: number of entries in the sg list
|
||||
* @transfer_buffer_length: How big is transfer_buffer. The transfer may
|
||||
|
||||
@@ -419,10 +419,7 @@ __alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active,
|
||||
static struct lock_class_key __key; \
|
||||
const char *__lock_name; \
|
||||
\
|
||||
if (__builtin_constant_p(fmt)) \
|
||||
__lock_name = (fmt); \
|
||||
else \
|
||||
__lock_name = #fmt; \
|
||||
__lock_name = #fmt#args; \
|
||||
\
|
||||
__alloc_workqueue_key((fmt), (flags), (max_active), \
|
||||
&__key, __lock_name, ##args); \
|
||||
|
||||
@@ -97,7 +97,7 @@ void writeback_inodes_sb_nr(struct super_block *, unsigned long nr,
|
||||
int try_to_writeback_inodes_sb(struct super_block *, enum wb_reason reason);
|
||||
int try_to_writeback_inodes_sb_nr(struct super_block *, unsigned long nr,
|
||||
enum wb_reason reason);
|
||||
void sync_inodes_sb(struct super_block *sb, unsigned long older_than_this);
|
||||
void sync_inodes_sb(struct super_block *);
|
||||
void wakeup_flusher_threads(long nr_pages, enum wb_reason reason);
|
||||
void inode_wait_for_writeback(struct inode *inode);
|
||||
|
||||
|
||||
@@ -15,4 +15,6 @@ struct datalink_proto {
|
||||
struct list_head node;
|
||||
};
|
||||
|
||||
struct datalink_proto *make_EII_client(void);
|
||||
void destroy_EII_client(struct datalink_proto *dl);
|
||||
#endif
|
||||
|
||||
@@ -200,6 +200,8 @@ static inline void dn_sk_ports_copy(struct flowidn *fld, struct dn_scp *scp)
|
||||
}
|
||||
|
||||
unsigned int dn_mss_from_pmtu(struct net_device *dev, int mtu);
|
||||
void dn_register_sysctl(void);
|
||||
void dn_unregister_sysctl(void);
|
||||
|
||||
#define DN_MENUVER_ACC 0x01
|
||||
#define DN_MENUVER_USR 0x02
|
||||
|
||||
@@ -20,6 +20,8 @@ int dn_route_output_sock(struct dst_entry __rcu **pprt, struct flowidn *,
|
||||
struct sock *sk, int flags);
|
||||
int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb);
|
||||
void dn_rt_cache_flush(int delay);
|
||||
int dn_route_rcv(struct sk_buff *skb, struct net_device *dev,
|
||||
struct packet_type *pt, struct net_device *orig_dev);
|
||||
|
||||
/* Masks for flags field */
|
||||
#define DN_RT_F_PID 0x07 /* Mask for packet type */
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
struct ethoc_platform_data {
|
||||
u8 hwaddr[IFHWADDRLEN];
|
||||
s8 phy_id;
|
||||
u32 eth_clkfreq;
|
||||
};
|
||||
|
||||
#endif /* !LINUX_NET_ETHOC_H */
|
||||
|
||||
@@ -140,6 +140,17 @@ static __inline__ void ipxitf_hold(struct ipx_interface *intrfc)
|
||||
}
|
||||
|
||||
void ipxitf_down(struct ipx_interface *intrfc);
|
||||
struct ipx_interface *ipxitf_find_using_net(__be32 net);
|
||||
int ipxitf_send(struct ipx_interface *intrfc, struct sk_buff *skb, char *node);
|
||||
__be16 ipx_cksum(struct ipxhdr *packet, int length);
|
||||
int ipxrtr_add_route(__be32 network, struct ipx_interface *intrfc,
|
||||
unsigned char *node);
|
||||
void ipxrtr_del_routes(struct ipx_interface *intrfc);
|
||||
int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx,
|
||||
struct iovec *iov, size_t len, int noblock);
|
||||
int ipxrtr_route_skb(struct sk_buff *skb);
|
||||
struct ipx_route *ipxrtr_lookup(__be32 net);
|
||||
int ipxrtr_ioctl(unsigned int cmd, void __user *arg);
|
||||
|
||||
static __inline__ void ipxitf_put(struct ipx_interface *intrfc)
|
||||
{
|
||||
|
||||
@@ -162,6 +162,14 @@ extern struct list_head net_namespace_list;
|
||||
struct net *get_net_ns_by_pid(pid_t pid);
|
||||
struct net *get_net_ns_by_fd(int pid);
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
void ipx_register_sysctl(void);
|
||||
void ipx_unregister_sysctl(void);
|
||||
#else
|
||||
#define ipx_register_sysctl()
|
||||
#define ipx_unregister_sysctl()
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_NS
|
||||
void __put_net(struct net *net);
|
||||
|
||||
|
||||
@@ -284,6 +284,8 @@ extern unsigned int nf_conntrack_max;
|
||||
extern unsigned int nf_conntrack_hash_rnd;
|
||||
void init_nf_conntrack_hash_rnd(void);
|
||||
|
||||
void nf_conntrack_tmpl_insert(struct net *net, struct nf_conn *tmpl);
|
||||
|
||||
#define NF_CT_STAT_INC(net, count) __this_cpu_inc((net)->ct.stat->count)
|
||||
#define NF_CT_STAT_INC_ATOMIC(net, count) this_cpu_inc((net)->ct.stat->count)
|
||||
|
||||
|
||||
@@ -252,6 +252,7 @@ void nf_tables_unbind_set(const struct nft_ctx *ctx, struct nft_set *set,
|
||||
* @owner: module reference
|
||||
* @policy: netlink attribute policy
|
||||
* @maxattr: highest netlink attribute number
|
||||
* @family: address family for AF-specific types
|
||||
*/
|
||||
struct nft_expr_type {
|
||||
const struct nft_expr_ops *(*select_ops)(const struct nft_ctx *,
|
||||
@@ -262,6 +263,7 @@ struct nft_expr_type {
|
||||
struct module *owner;
|
||||
const struct nla_policy *policy;
|
||||
unsigned int maxattr;
|
||||
u8 family;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -320,7 +322,6 @@ static inline void *nft_expr_priv(const struct nft_expr *expr)
|
||||
* struct nft_rule - nf_tables rule
|
||||
*
|
||||
* @list: used internally
|
||||
* @rcu_head: used internally for rcu
|
||||
* @handle: rule handle
|
||||
* @genmask: generation mask
|
||||
* @dlen: length of expression data
|
||||
@@ -328,7 +329,6 @@ static inline void *nft_expr_priv(const struct nft_expr *expr)
|
||||
*/
|
||||
struct nft_rule {
|
||||
struct list_head list;
|
||||
struct rcu_head rcu_head;
|
||||
u64 handle:46,
|
||||
genmask:2,
|
||||
dlen:16;
|
||||
@@ -389,7 +389,6 @@ enum nft_chain_flags {
|
||||
*
|
||||
* @rules: list of rules in the chain
|
||||
* @list: used internally
|
||||
* @rcu_head: used internally
|
||||
* @net: net namespace that this chain belongs to
|
||||
* @table: table that this chain belongs to
|
||||
* @handle: chain handle
|
||||
@@ -401,7 +400,6 @@ enum nft_chain_flags {
|
||||
struct nft_chain {
|
||||
struct list_head rules;
|
||||
struct list_head list;
|
||||
struct rcu_head rcu_head;
|
||||
struct net *net;
|
||||
struct nft_table *table;
|
||||
u64 handle;
|
||||
@@ -529,6 +527,9 @@ void nft_unregister_expr(struct nft_expr_type *);
|
||||
#define MODULE_ALIAS_NFT_CHAIN(family, name) \
|
||||
MODULE_ALIAS("nft-chain-" __stringify(family) "-" name)
|
||||
|
||||
#define MODULE_ALIAS_NFT_AF_EXPR(family, name) \
|
||||
MODULE_ALIAS("nft-expr-" __stringify(family) "-" name)
|
||||
|
||||
#define MODULE_ALIAS_NFT_EXPR(name) \
|
||||
MODULE_ALIAS("nft-expr-" name)
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#ifndef _NFT_REJECT_H_
|
||||
#define _NFT_REJECT_H_
|
||||
|
||||
struct nft_reject {
|
||||
enum nft_reject_types type:8;
|
||||
u8 icmp_code;
|
||||
};
|
||||
|
||||
extern const struct nla_policy nft_reject_policy[];
|
||||
|
||||
int nft_reject_init(const struct nft_ctx *ctx,
|
||||
const struct nft_expr *expr,
|
||||
const struct nlattr * const tb[]);
|
||||
|
||||
int nft_reject_dump(struct sk_buff *skb, const struct nft_expr *expr);
|
||||
|
||||
void nft_reject_ipv4_eval(const struct nft_expr *expr,
|
||||
struct nft_data data[NFT_REG_MAX + 1],
|
||||
const struct nft_pktinfo *pkt);
|
||||
|
||||
void nft_reject_ipv6_eval(const struct nft_expr *expr,
|
||||
struct nft_data data[NFT_REG_MAX + 1],
|
||||
const struct nft_pktinfo *pkt);
|
||||
|
||||
#endif
|
||||
@@ -1653,17 +1653,6 @@ struct sctp_association {
|
||||
/* This is the last advertised value of rwnd over a SACK chunk. */
|
||||
__u32 a_rwnd;
|
||||
|
||||
/* Number of bytes by which the rwnd has slopped. The rwnd is allowed
|
||||
* to slop over a maximum of the association's frag_point.
|
||||
*/
|
||||
__u32 rwnd_over;
|
||||
|
||||
/* Keeps treack of rwnd pressure. This happens when we have
|
||||
* a window, but not recevie buffer (i.e small packets). This one
|
||||
* is releases slowly (1 PMTU at a time ).
|
||||
*/
|
||||
__u32 rwnd_press;
|
||||
|
||||
/* This is the sndbuf size in use for the association.
|
||||
* This corresponds to the sndbuf size for the association,
|
||||
* as specified in the sk->sndbuf.
|
||||
@@ -1892,8 +1881,7 @@ void sctp_assoc_update(struct sctp_association *old,
|
||||
__u32 sctp_association_get_next_tsn(struct sctp_association *);
|
||||
|
||||
void sctp_assoc_sync_pmtu(struct sock *, struct sctp_association *);
|
||||
void sctp_assoc_rwnd_increase(struct sctp_association *, unsigned int);
|
||||
void sctp_assoc_rwnd_decrease(struct sctp_association *, unsigned int);
|
||||
void sctp_assoc_rwnd_update(struct sctp_association *, bool);
|
||||
void sctp_assoc_set_primary(struct sctp_association *,
|
||||
struct sctp_transport *);
|
||||
void sctp_assoc_del_nonprimary_peers(struct sctp_association *,
|
||||
|
||||
@@ -226,7 +226,8 @@ enum ib_port_cap_flags {
|
||||
IB_PORT_CAP_MASK_NOTICE_SUP = 1 << 22,
|
||||
IB_PORT_BOOT_MGMT_SUP = 1 << 23,
|
||||
IB_PORT_LINK_LATENCY_SUP = 1 << 24,
|
||||
IB_PORT_CLIENT_REG_SUP = 1 << 25
|
||||
IB_PORT_CLIENT_REG_SUP = 1 << 25,
|
||||
IB_PORT_IP_BASED_GIDS = 1 << 26
|
||||
};
|
||||
|
||||
enum ib_port_width {
|
||||
|
||||
@@ -449,14 +449,22 @@ void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm,
|
||||
/* dapm audio pin control and status */
|
||||
int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm,
|
||||
const char *pin);
|
||||
int snd_soc_dapm_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
|
||||
const char *pin);
|
||||
int snd_soc_dapm_disable_pin(struct snd_soc_dapm_context *dapm,
|
||||
const char *pin);
|
||||
int snd_soc_dapm_disable_pin_unlocked(struct snd_soc_dapm_context *dapm,
|
||||
const char *pin);
|
||||
int snd_soc_dapm_nc_pin(struct snd_soc_dapm_context *dapm, const char *pin);
|
||||
int snd_soc_dapm_nc_pin_unlocked(struct snd_soc_dapm_context *dapm,
|
||||
const char *pin);
|
||||
int snd_soc_dapm_get_pin_status(struct snd_soc_dapm_context *dapm,
|
||||
const char *pin);
|
||||
int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm);
|
||||
int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
|
||||
const char *pin);
|
||||
int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
|
||||
const char *pin);
|
||||
int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm,
|
||||
const char *pin);
|
||||
void snd_soc_dapm_auto_nc_codec_pins(struct snd_soc_codec *codec);
|
||||
|
||||
@@ -525,7 +525,6 @@ struct se_cmd {
|
||||
#define CMD_T_COMPLETE (1 << 2)
|
||||
#define CMD_T_SENT (1 << 4)
|
||||
#define CMD_T_STOP (1 << 5)
|
||||
#define CMD_T_FAILED (1 << 6)
|
||||
#define CMD_T_DEV_ACTIVE (1 << 7)
|
||||
#define CMD_T_REQUEST_STOP (1 << 8)
|
||||
#define CMD_T_BUSY (1 << 9)
|
||||
|
||||
@@ -42,7 +42,6 @@ TRACE_EVENT(pstate_sample,
|
||||
u32 state,
|
||||
u64 mperf,
|
||||
u64 aperf,
|
||||
u32 energy,
|
||||
u32 freq
|
||||
),
|
||||
|
||||
@@ -51,7 +50,6 @@ TRACE_EVENT(pstate_sample,
|
||||
state,
|
||||
mperf,
|
||||
aperf,
|
||||
energy,
|
||||
freq
|
||||
),
|
||||
|
||||
@@ -61,7 +59,6 @@ TRACE_EVENT(pstate_sample,
|
||||
__field(u32, state)
|
||||
__field(u64, mperf)
|
||||
__field(u64, aperf)
|
||||
__field(u32, energy)
|
||||
__field(u32, freq)
|
||||
|
||||
),
|
||||
@@ -72,17 +69,15 @@ TRACE_EVENT(pstate_sample,
|
||||
__entry->state = state;
|
||||
__entry->mperf = mperf;
|
||||
__entry->aperf = aperf;
|
||||
__entry->energy = energy;
|
||||
__entry->freq = freq;
|
||||
),
|
||||
|
||||
TP_printk("core_busy=%lu scaled=%lu state=%lu mperf=%llu aperf=%llu energy=%lu freq=%lu ",
|
||||
TP_printk("core_busy=%lu scaled=%lu state=%lu mperf=%llu aperf=%llu freq=%lu ",
|
||||
(unsigned long)__entry->core_busy,
|
||||
(unsigned long)__entry->scaled_busy,
|
||||
(unsigned long)__entry->state,
|
||||
(unsigned long long)__entry->mperf,
|
||||
(unsigned long long)__entry->aperf,
|
||||
(unsigned long)__entry->energy,
|
||||
(unsigned long)__entry->freq
|
||||
)
|
||||
|
||||
|
||||
@@ -287,11 +287,11 @@ TRACE_EVENT(writeback_queue_io,
|
||||
__field(int, reason)
|
||||
),
|
||||
TP_fast_assign(
|
||||
unsigned long older_than_this = work->older_than_this;
|
||||
unsigned long *older_than_this = work->older_than_this;
|
||||
strncpy(__entry->name, dev_name(wb->bdi->dev), 32);
|
||||
__entry->older = older_than_this;
|
||||
__entry->older = older_than_this ? *older_than_this : 0;
|
||||
__entry->age = older_than_this ?
|
||||
(jiffies - older_than_this) * 1000 / HZ : -1;
|
||||
(jiffies - *older_than_this) * 1000 / HZ : -1;
|
||||
__entry->moved = moved;
|
||||
__entry->reason = work->reason;
|
||||
),
|
||||
|
||||
@@ -692,9 +692,13 @@ __SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \
|
||||
__SYSCALL(__NR_kcmp, sys_kcmp)
|
||||
#define __NR_finit_module 273
|
||||
__SYSCALL(__NR_finit_module, sys_finit_module)
|
||||
#define __NR_sched_setattr 274
|
||||
__SYSCALL(__NR_sched_setattr, sys_sched_setattr)
|
||||
#define __NR_sched_getattr 275
|
||||
__SYSCALL(__NR_sched_getattr, sys_sched_getattr)
|
||||
|
||||
#undef __NR_syscalls
|
||||
#define __NR_syscalls 274
|
||||
#define __NR_syscalls 276
|
||||
|
||||
/*
|
||||
* All syscalls below here should go away really,
|
||||
|
||||
@@ -619,6 +619,8 @@ struct drm_gem_open {
|
||||
#define DRM_PRIME_CAP_EXPORT 0x2
|
||||
#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6
|
||||
#define DRM_CAP_ASYNC_PAGE_FLIP 0x7
|
||||
#define DRM_CAP_CURSOR_WIDTH 0x8
|
||||
#define DRM_CAP_CURSOR_HEIGHT 0x9
|
||||
|
||||
/** DRM_IOCTL_GET_CAP ioctl argument type */
|
||||
struct drm_get_cap {
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
#define DRM_VMW_PARAM_MAX_SURF_MEMORY 7
|
||||
#define DRM_VMW_PARAM_3D_CAPS_SIZE 8
|
||||
#define DRM_VMW_PARAM_MAX_MOB_MEMORY 9
|
||||
#define DRM_VMW_PARAM_MAX_MOB_SIZE 10
|
||||
|
||||
/**
|
||||
* struct drm_vmw_getparam_arg
|
||||
|
||||
@@ -558,7 +558,6 @@ static inline char *btrfs_err_str(enum btrfs_err_code err_code)
|
||||
#define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, __u64)
|
||||
#define BTRFS_IOC_SPACE_INFO _IOWR(BTRFS_IOCTL_MAGIC, 20, \
|
||||
struct btrfs_ioctl_space_args)
|
||||
#define BTRFS_IOC_GLOBAL_RSV _IOR(BTRFS_IOCTL_MAGIC, 20, __u64)
|
||||
#define BTRFS_IOC_START_SYNC _IOR(BTRFS_IOCTL_MAGIC, 24, __u64)
|
||||
#define BTRFS_IOC_WAIT_SYNC _IOW(BTRFS_IOCTL_MAGIC, 22, __u64)
|
||||
#define BTRFS_IOC_SNAP_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 23, \
|
||||
|
||||
@@ -128,22 +128,13 @@ struct in6_flowlabel_req {
|
||||
* IPV6 extension headers
|
||||
*/
|
||||
#if __UAPI_DEF_IPPROTO_V6
|
||||
enum {
|
||||
IPPROTO_HOPOPTS = 0, /* IPv6 hop-by-hop options */
|
||||
#define IPPROTO_HOPOPTS IPPROTO_HOPOPTS
|
||||
IPPROTO_ROUTING = 43, /* IPv6 routing header */
|
||||
#define IPPROTO_ROUTING IPPROTO_ROUTING
|
||||
IPPROTO_FRAGMENT = 44, /* IPv6 fragmentation header */
|
||||
#define IPPROTO_FRAGMENT IPPROTO_FRAGMENT
|
||||
IPPROTO_ICMPV6 = 58, /* ICMPv6 */
|
||||
#define IPPROTO_ICMPV6 IPPROTO_ICMPV6
|
||||
IPPROTO_NONE = 59, /* IPv6 no next header */
|
||||
#define IPPROTO_NONE IPPROTO_NONE
|
||||
IPPROTO_DSTOPTS = 60, /* IPv6 destination options */
|
||||
#define IPPROTO_DSTOPTS IPPROTO_DSTOPTS
|
||||
IPPROTO_MH = 135, /* IPv6 mobility header */
|
||||
#define IPPROTO_MH IPPROTO_MH
|
||||
};
|
||||
#define IPPROTO_HOPOPTS 0 /* IPv6 hop-by-hop options */
|
||||
#define IPPROTO_ROUTING 43 /* IPv6 routing header */
|
||||
#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */
|
||||
#define IPPROTO_ICMPV6 58 /* ICMPv6 */
|
||||
#define IPPROTO_NONE 59 /* IPv6 no next header */
|
||||
#define IPPROTO_DSTOPTS 60 /* IPv6 destination options */
|
||||
#define IPPROTO_MH 135 /* IPv6 mobility header */
|
||||
#endif /* __UAPI_DEF_IPPROTO_V6 */
|
||||
|
||||
/*
|
||||
|
||||
@@ -39,7 +39,7 @@ struct mic_copy_desc {
|
||||
#else
|
||||
struct iovec *iov;
|
||||
#endif
|
||||
int iovcnt;
|
||||
__u32 iovcnt;
|
||||
__u8 vr_idx;
|
||||
__u8 update_used;
|
||||
__u32 out_len;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# UAPI Header export list
|
||||
header-y += evtchn.h
|
||||
header-y += gntalloc.h
|
||||
header-y += gntdev.h
|
||||
header-y += privcmd.h
|
||||
|
||||
@@ -113,13 +113,13 @@ typedef uint64_t blkif_sector_t;
|
||||
* it's less than the number provided by the backend. The indirect_grefs field
|
||||
* in blkif_request_indirect should be filled by the frontend with the
|
||||
* grant references of the pages that are holding the indirect segments.
|
||||
* This pages are filled with an array of blkif_request_segment_aligned
|
||||
* that hold the information about the segments. The number of indirect
|
||||
* pages to use is determined by the maximum number of segments
|
||||
* a indirect request contains. Every indirect page can contain a maximum
|
||||
* of 512 segments (PAGE_SIZE/sizeof(blkif_request_segment_aligned)),
|
||||
* so to calculate the number of indirect pages to use we have to do
|
||||
* ceil(indirect_segments/512).
|
||||
* These pages are filled with an array of blkif_request_segment that hold the
|
||||
* information about the segments. The number of indirect pages to use is
|
||||
* determined by the number of segments an indirect request contains. Every
|
||||
* indirect page can contain a maximum of
|
||||
* (PAGE_SIZE / sizeof(struct blkif_request_segment)) segments, so to
|
||||
* calculate the number of indirect pages to use we have to do
|
||||
* ceil(indirect_segments / (PAGE_SIZE / sizeof(struct blkif_request_segment))).
|
||||
*
|
||||
* If a backend does not recognize BLKIF_OP_INDIRECT, it should *not*
|
||||
* create the "feature-max-indirect-segments" node!
|
||||
@@ -135,13 +135,12 @@ typedef uint64_t blkif_sector_t;
|
||||
|
||||
#define BLKIF_MAX_INDIRECT_PAGES_PER_REQUEST 8
|
||||
|
||||
struct blkif_request_segment_aligned {
|
||||
grant_ref_t gref; /* reference to I/O buffer frame */
|
||||
/* @first_sect: first sector in frame to transfer (inclusive). */
|
||||
/* @last_sect: last sector in frame to transfer (inclusive). */
|
||||
uint8_t first_sect, last_sect;
|
||||
uint16_t _pad; /* padding to make it 8 bytes, so it's cache-aligned */
|
||||
} __attribute__((__packed__));
|
||||
struct blkif_request_segment {
|
||||
grant_ref_t gref; /* reference to I/O buffer frame */
|
||||
/* @first_sect: first sector in frame to transfer (inclusive). */
|
||||
/* @last_sect: last sector in frame to transfer (inclusive). */
|
||||
uint8_t first_sect, last_sect;
|
||||
};
|
||||
|
||||
struct blkif_request_rw {
|
||||
uint8_t nr_segments; /* number of segments */
|
||||
@@ -151,12 +150,7 @@ struct blkif_request_rw {
|
||||
#endif
|
||||
uint64_t id; /* private guest value, echoed in resp */
|
||||
blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */
|
||||
struct blkif_request_segment {
|
||||
grant_ref_t gref; /* reference to I/O buffer frame */
|
||||
/* @first_sect: first sector in frame to transfer (inclusive). */
|
||||
/* @last_sect: last sector in frame to transfer (inclusive). */
|
||||
uint8_t first_sect, last_sect;
|
||||
} seg[BLKIF_MAX_SEGMENTS_PER_REQUEST];
|
||||
struct blkif_request_segment seg[BLKIF_MAX_SEGMENTS_PER_REQUEST];
|
||||
} __attribute__((__packed__));
|
||||
|
||||
struct blkif_request_discard {
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
* deal in the Software without restriction, including without limitation the
|
||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Copyright (C) IBM Corp. 2006
|
||||
*/
|
||||
|
||||
#ifndef _XEN_XENCOMM_H_
|
||||
#define _XEN_XENCOMM_H_
|
||||
|
||||
/* A xencomm descriptor is a scatter/gather list containing physical
|
||||
* addresses corresponding to a virtually contiguous memory area. The
|
||||
* hypervisor translates these physical addresses to machine addresses to copy
|
||||
* to and from the virtually contiguous area.
|
||||
*/
|
||||
|
||||
#define XENCOMM_MAGIC 0x58434F4D /* 'XCOM' */
|
||||
#define XENCOMM_INVALID (~0UL)
|
||||
|
||||
struct xencomm_desc {
|
||||
uint32_t magic;
|
||||
uint32_t nr_addrs; /* the number of entries in address[] */
|
||||
uint64_t address[0];
|
||||
};
|
||||
|
||||
#endif /* _XEN_XENCOMM_H_ */
|
||||
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Copyright (C) IBM Corp. 2006
|
||||
*
|
||||
* Authors: Hollis Blanchard <hollisb@us.ibm.com>
|
||||
* Jerone Young <jyoung5@us.ibm.com>
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_XENCOMM_H_
|
||||
#define _LINUX_XENCOMM_H_
|
||||
|
||||
#include <xen/interface/xencomm.h>
|
||||
|
||||
#define XENCOMM_MINI_ADDRS 3
|
||||
struct xencomm_mini {
|
||||
struct xencomm_desc _desc;
|
||||
uint64_t address[XENCOMM_MINI_ADDRS];
|
||||
};
|
||||
|
||||
/* To avoid additionnal virt to phys conversion, an opaque structure is
|
||||
presented. */
|
||||
struct xencomm_handle;
|
||||
|
||||
extern void xencomm_free(struct xencomm_handle *desc);
|
||||
extern struct xencomm_handle *xencomm_map(void *ptr, unsigned long bytes);
|
||||
extern struct xencomm_handle *__xencomm_map_no_alloc(void *ptr,
|
||||
unsigned long bytes, struct xencomm_mini *xc_area);
|
||||
|
||||
#if 0
|
||||
#define XENCOMM_MINI_ALIGNED(xc_desc, n) \
|
||||
struct xencomm_mini xc_desc ## _base[(n)] \
|
||||
__attribute__((__aligned__(sizeof(struct xencomm_mini)))); \
|
||||
struct xencomm_mini *xc_desc = &xc_desc ## _base[0];
|
||||
#else
|
||||
/*
|
||||
* gcc bug workaround:
|
||||
* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16660
|
||||
* gcc doesn't handle properly stack variable with
|
||||
* __attribute__((__align__(sizeof(struct xencomm_mini))))
|
||||
*/
|
||||
#define XENCOMM_MINI_ALIGNED(xc_desc, n) \
|
||||
unsigned char xc_desc ## _base[((n) + 1 ) * \
|
||||
sizeof(struct xencomm_mini)]; \
|
||||
struct xencomm_mini *xc_desc = (struct xencomm_mini *) \
|
||||
((unsigned long)xc_desc ## _base + \
|
||||
(sizeof(struct xencomm_mini) - \
|
||||
((unsigned long)xc_desc ## _base) % \
|
||||
sizeof(struct xencomm_mini)));
|
||||
#endif
|
||||
#define xencomm_map_no_alloc(ptr, bytes) \
|
||||
({ XENCOMM_MINI_ALIGNED(xc_desc, 1); \
|
||||
__xencomm_map_no_alloc(ptr, bytes, xc_desc); })
|
||||
|
||||
/* provided by architecture code: */
|
||||
extern unsigned long xencomm_vtop(unsigned long vaddr);
|
||||
|
||||
static inline void *xencomm_pa(void *ptr)
|
||||
{
|
||||
return (void *)xencomm_vtop((unsigned long)ptr);
|
||||
}
|
||||
|
||||
#define xen_guest_handle(hnd) ((hnd).p)
|
||||
|
||||
#endif /* _LINUX_XENCOMM_H_ */
|
||||
Reference in New Issue
Block a user