Linux 3.16-rc5
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJTwvRvAAoJEHm+PkMAQRiG8CoIAJucWkj+MJFFoDXjR9hfI8U7 /WeQLJP0GpWGMXd2KznX9epCuw5rsuaPAxCy1HFDNOa7OtNYacWrsIhByxOIDLwL YjDB9+fpMMPFWsr+LPJa8Ombh/TveCS77w6Pt5VMZFwvIKujiNK/C3MdxjReH5Gr iTGm8x7nEs2D6L2+5sQVlhXot/97phxIlBSP6wPXEiaztNZ9/JZi905Xpgq+WU16 ZOA8MlJj1TQD4xcWyUcsQ5REwIOdQ6xxPF00wv/12RFela+Puy4JLAilnV6Mc12U fwYOZKbUNBS8rjfDDdyX3sljV1L5iFFqKkW3WFdnv/z8ZaZSo5NupWuavDnifKw= =6Q8o -----END PGP SIGNATURE----- Merge tag 'v3.16-rc5' into timers/core Reason: Bring in upstream modifications, so the pending changes which depend on them can be queued.
This commit is contained in:
commit
afdb094380
4678 changed files with 184249 additions and 90401 deletions
|
|
@ -44,6 +44,7 @@ struct ahci_host_priv *ahci_platform_get_resources(
|
|||
int ahci_platform_init_host(struct platform_device *pdev,
|
||||
struct ahci_host_priv *hpriv,
|
||||
const struct ata_port_info *pi_template,
|
||||
unsigned long host_flags,
|
||||
unsigned int force_port_map,
|
||||
unsigned int mask_port_map);
|
||||
|
||||
|
|
|
|||
47
include/linux/amba/xilinx_dma.h
Normal file
47
include/linux/amba/xilinx_dma.h
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Xilinx DMA Engine drivers support header file
|
||||
*
|
||||
* Copyright (C) 2010-2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* This 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.
|
||||
*/
|
||||
|
||||
#ifndef __DMA_XILINX_DMA_H
|
||||
#define __DMA_XILINX_DMA_H
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/dmaengine.h>
|
||||
|
||||
/**
|
||||
* struct xilinx_vdma_config - VDMA Configuration structure
|
||||
* @frm_dly: Frame delay
|
||||
* @gen_lock: Whether in gen-lock mode
|
||||
* @master: Master that it syncs to
|
||||
* @frm_cnt_en: Enable frame count enable
|
||||
* @park: Whether wants to park
|
||||
* @park_frm: Frame to park on
|
||||
* @coalesc: Interrupt coalescing threshold
|
||||
* @delay: Delay counter
|
||||
* @reset: Reset Channel
|
||||
* @ext_fsync: External Frame Sync source
|
||||
*/
|
||||
struct xilinx_vdma_config {
|
||||
int frm_dly;
|
||||
int gen_lock;
|
||||
int master;
|
||||
int frm_cnt_en;
|
||||
int park;
|
||||
int park_frm;
|
||||
int coalesc;
|
||||
int delay;
|
||||
int reset;
|
||||
int ext_fsync;
|
||||
};
|
||||
|
||||
int xilinx_vdma_channel_set_config(struct dma_chan *dchan,
|
||||
struct xilinx_vdma_config *cfg);
|
||||
|
||||
#endif
|
||||
|
|
@ -36,6 +36,8 @@ struct ath9k_platform_data {
|
|||
|
||||
int (*get_mac_revision)(void);
|
||||
int (*external_reset)(void);
|
||||
|
||||
bool use_eeprom;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_ATH9K_PLATFORM_H */
|
||||
|
|
|
|||
|
|
@ -186,6 +186,15 @@ static inline void *bio_data(struct bio *bio)
|
|||
#define BIOVEC_SEG_BOUNDARY(q, b1, b2) \
|
||||
__BIO_SEG_BOUNDARY(bvec_to_phys((b1)), bvec_to_phys((b2)) + (b2)->bv_len, queue_segment_boundary((q)))
|
||||
|
||||
/*
|
||||
* Check if adding a bio_vec after bprv with offset would create a gap in
|
||||
* the SG list. Most drivers don't care about this, but some do.
|
||||
*/
|
||||
static inline bool bvec_gap_to_prev(struct bio_vec *bprv, unsigned int offset)
|
||||
{
|
||||
return offset || ((bprv->bv_offset + bprv->bv_len) & (PAGE_SIZE - 1));
|
||||
}
|
||||
|
||||
#define bio_io_error(bio) bio_endio((bio), -EIO)
|
||||
|
||||
/*
|
||||
|
|
@ -644,10 +653,6 @@ struct biovec_slab {
|
|||
|
||||
#if defined(CONFIG_BLK_DEV_INTEGRITY)
|
||||
|
||||
|
||||
|
||||
#define bip_vec_idx(bip, idx) (&(bip->bip_vec[(idx)]))
|
||||
|
||||
#define bip_for_each_vec(bvl, bip, iter) \
|
||||
for_each_bvec(bvl, (bip)->bip_vec, iter, (bip)->bip_iter)
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ struct blk_mq_hw_ctx {
|
|||
unsigned int nr_ctx;
|
||||
struct blk_mq_ctx **ctxs;
|
||||
|
||||
unsigned int wait_index;
|
||||
atomic_t wait_index;
|
||||
|
||||
struct blk_mq_tags *tags;
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ enum {
|
|||
BLK_MQ_S_STOPPED = 0,
|
||||
BLK_MQ_S_TAG_ACTIVE = 1,
|
||||
|
||||
BLK_MQ_MAX_DEPTH = 2048,
|
||||
BLK_MQ_MAX_DEPTH = 10240,
|
||||
|
||||
BLK_MQ_CPU_WORK_BATCH = 8,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@
|
|||
#ifndef __LINUX_BLK_TYPES_H
|
||||
#define __LINUX_BLK_TYPES_H
|
||||
|
||||
#ifdef CONFIG_BLOCK
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct bio_set;
|
||||
|
|
@ -28,6 +26,8 @@ struct bio_vec {
|
|||
unsigned int bv_offset;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_BLOCK
|
||||
|
||||
struct bvec_iter {
|
||||
sector_t bi_sector; /* device address in 512 byte
|
||||
sectors */
|
||||
|
|
|
|||
|
|
@ -280,6 +280,7 @@ struct queue_limits {
|
|||
unsigned long seg_boundary_mask;
|
||||
|
||||
unsigned int max_hw_sectors;
|
||||
unsigned int chunk_sectors;
|
||||
unsigned int max_sectors;
|
||||
unsigned int max_segment_size;
|
||||
unsigned int physical_block_size;
|
||||
|
|
@ -511,6 +512,7 @@ struct request_queue {
|
|||
#define QUEUE_FLAG_DEAD 19 /* queue tear-down finished */
|
||||
#define QUEUE_FLAG_INIT_DONE 20 /* queue is initialized */
|
||||
#define QUEUE_FLAG_NO_SG_MERGE 21 /* don't attempt to merge SG segments*/
|
||||
#define QUEUE_FLAG_SG_GAPS 22 /* queue doesn't support SG gaps */
|
||||
|
||||
#define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \
|
||||
(1 << QUEUE_FLAG_STACKABLE) | \
|
||||
|
|
@ -795,6 +797,7 @@ extern void __blk_put_request(struct request_queue *, struct request *);
|
|||
extern struct request *blk_get_request(struct request_queue *, int, gfp_t);
|
||||
extern struct request *blk_make_request(struct request_queue *, struct bio *,
|
||||
gfp_t);
|
||||
extern void blk_rq_set_block_pc(struct request *);
|
||||
extern void blk_requeue_request(struct request_queue *, struct request *);
|
||||
extern void blk_add_request_payload(struct request *rq, struct page *page,
|
||||
unsigned int len);
|
||||
|
|
@ -910,6 +913,20 @@ static inline unsigned int blk_queue_get_max_sectors(struct request_queue *q,
|
|||
return q->limits.max_sectors;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return maximum size of a request at given offset. Only valid for
|
||||
* file system requests.
|
||||
*/
|
||||
static inline unsigned int blk_max_size_offset(struct request_queue *q,
|
||||
sector_t offset)
|
||||
{
|
||||
if (!q->limits.chunk_sectors)
|
||||
return q->limits.max_sectors;
|
||||
|
||||
return q->limits.chunk_sectors -
|
||||
(offset & (q->limits.chunk_sectors - 1));
|
||||
}
|
||||
|
||||
static inline unsigned int blk_rq_get_max_sectors(struct request *rq)
|
||||
{
|
||||
struct request_queue *q = rq->q;
|
||||
|
|
@ -917,7 +934,11 @@ static inline unsigned int blk_rq_get_max_sectors(struct request *rq)
|
|||
if (unlikely(rq->cmd_type == REQ_TYPE_BLOCK_PC))
|
||||
return q->limits.max_hw_sectors;
|
||||
|
||||
return blk_queue_get_max_sectors(q, rq->cmd_flags);
|
||||
if (!q->limits.chunk_sectors)
|
||||
return blk_queue_get_max_sectors(q, rq->cmd_flags);
|
||||
|
||||
return min(blk_max_size_offset(q, blk_rq_pos(rq)),
|
||||
blk_queue_get_max_sectors(q, rq->cmd_flags));
|
||||
}
|
||||
|
||||
static inline unsigned int blk_rq_count_bios(struct request *rq)
|
||||
|
|
@ -983,6 +1004,7 @@ extern void blk_queue_make_request(struct request_queue *, make_request_fn *);
|
|||
extern void blk_queue_bounce_limit(struct request_queue *, u64);
|
||||
extern void blk_limits_max_hw_sectors(struct queue_limits *, unsigned int);
|
||||
extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int);
|
||||
extern void blk_queue_chunk_sectors(struct request_queue *, unsigned int);
|
||||
extern void blk_queue_max_segments(struct request_queue *, unsigned short);
|
||||
extern void blk_queue_max_segment_size(struct request_queue *, unsigned int);
|
||||
extern void blk_queue_max_discard_sectors(struct request_queue *q,
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef CAN_CORE_H
|
||||
#define CAN_CORE_H
|
||||
#ifndef _CAN_CORE_H
|
||||
#define _CAN_CORE_H
|
||||
|
||||
#include <linux/can.h>
|
||||
#include <linux/skbuff.h>
|
||||
|
|
@ -58,4 +58,4 @@ extern void can_rx_unregister(struct net_device *dev, canid_t can_id,
|
|||
extern int can_send(struct sk_buff *skb, int loop);
|
||||
extern int can_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
|
||||
|
||||
#endif /* CAN_CORE_H */
|
||||
#endif /* !_CAN_CORE_H */
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef CAN_DEV_H
|
||||
#define CAN_DEV_H
|
||||
#ifndef _CAN_DEV_H
|
||||
#define _CAN_DEV_H
|
||||
|
||||
#include <linux/can.h>
|
||||
#include <linux/can/netlink.h>
|
||||
|
|
@ -132,4 +132,4 @@ struct sk_buff *alloc_canfd_skb(struct net_device *dev,
|
|||
struct sk_buff *alloc_can_err_skb(struct net_device *dev,
|
||||
struct can_frame **cf);
|
||||
|
||||
#endif /* CAN_DEV_H */
|
||||
#endif /* !_CAN_DEV_H */
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef CAN_LED_H
|
||||
#define CAN_LED_H
|
||||
#ifndef _CAN_LED_H
|
||||
#define _CAN_LED_H
|
||||
|
||||
#include <linux/if.h>
|
||||
#include <linux/leds.h>
|
||||
|
|
@ -48,4 +48,4 @@ static inline void can_led_notifier_exit(void)
|
|||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* !_CAN_LED_H */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef _CAN_PLATFORM_CC770_H_
|
||||
#define _CAN_PLATFORM_CC770_H_
|
||||
#ifndef _CAN_PLATFORM_CC770_H
|
||||
#define _CAN_PLATFORM_CC770_H
|
||||
|
||||
/* CPU Interface Register (0x02) */
|
||||
#define CPUIF_CEN 0x01 /* Clock Out Enable */
|
||||
|
|
@ -30,4 +30,4 @@ struct cc770_platform_data {
|
|||
u8 bcr; /* Bus Configuration Register */
|
||||
};
|
||||
|
||||
#endif /* !_CAN_PLATFORM_CC770_H_ */
|
||||
#endif /* !_CAN_PLATFORM_CC770_H */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef __CAN_PLATFORM_MCP251X_H__
|
||||
#define __CAN_PLATFORM_MCP251X_H__
|
||||
#ifndef _CAN_PLATFORM_MCP251X_H
|
||||
#define _CAN_PLATFORM_MCP251X_H
|
||||
|
||||
/*
|
||||
*
|
||||
|
|
@ -18,4 +18,4 @@ struct mcp251x_platform_data {
|
|||
unsigned long oscillator_frequency;
|
||||
};
|
||||
|
||||
#endif /* __CAN_PLATFORM_MCP251X_H__ */
|
||||
#endif /* !_CAN_PLATFORM_MCP251X_H */
|
||||
|
|
|
|||
17
include/linux/can/platform/rcar_can.h
Normal file
17
include/linux/can/platform/rcar_can.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef _CAN_PLATFORM_RCAR_CAN_H_
|
||||
#define _CAN_PLATFORM_RCAR_CAN_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* Clock Select Register settings */
|
||||
enum CLKR {
|
||||
CLKR_CLKP1 = 0, /* Peripheral clock (clkp1) */
|
||||
CLKR_CLKP2 = 1, /* Peripheral clock (clkp2) */
|
||||
CLKR_CLKEXT = 3 /* Externally input clock */
|
||||
};
|
||||
|
||||
struct rcar_can_platform_data {
|
||||
enum CLKR clock_select; /* Clock source select */
|
||||
};
|
||||
|
||||
#endif /* !_CAN_PLATFORM_RCAR_CAN_H_ */
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef _CAN_PLATFORM_SJA1000_H_
|
||||
#define _CAN_PLATFORM_SJA1000_H_
|
||||
#ifndef _CAN_PLATFORM_SJA1000_H
|
||||
#define _CAN_PLATFORM_SJA1000_H
|
||||
|
||||
/* clock divider register */
|
||||
#define CDR_CLKOUT_MASK 0x07
|
||||
|
|
@ -32,4 +32,4 @@ struct sja1000_platform_data {
|
|||
u8 cdr; /* clock divider register */
|
||||
};
|
||||
|
||||
#endif /* !_CAN_PLATFORM_SJA1000_H_ */
|
||||
#endif /* !_CAN_PLATFORM_SJA1000_H */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef __CAN_PLATFORM_TI_HECC_H__
|
||||
#define __CAN_PLATFORM_TI_HECC_H__
|
||||
#ifndef _CAN_PLATFORM_TI_HECC_H
|
||||
#define _CAN_PLATFORM_TI_HECC_H
|
||||
|
||||
/*
|
||||
* TI HECC (High End CAN Controller) driver platform header
|
||||
|
|
@ -41,4 +41,4 @@ struct ti_hecc_platform_data {
|
|||
u32 version;
|
||||
void (*transceiver_switch) (int);
|
||||
};
|
||||
#endif
|
||||
#endif /* !_CAN_PLATFORM_TI_HECC_H */
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef CAN_SKB_H
|
||||
#define CAN_SKB_H
|
||||
#ifndef _CAN_SKB_H
|
||||
#define _CAN_SKB_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/skbuff.h>
|
||||
|
|
@ -80,4 +80,4 @@ static inline struct sk_buff *can_create_echo_skb(struct sk_buff *skb)
|
|||
return skb;
|
||||
}
|
||||
|
||||
#endif /* CAN_SKB_H */
|
||||
#endif /* !_CAN_SKB_H */
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ extern bool has_ns_capability_noaudit(struct task_struct *t,
|
|||
struct user_namespace *ns, int cap);
|
||||
extern bool capable(int cap);
|
||||
extern bool ns_capable(struct user_namespace *ns, int cap);
|
||||
extern bool inode_capable(const struct inode *inode, int cap);
|
||||
extern bool capable_wrt_inode_uidgid(const struct inode *inode, int cap);
|
||||
extern bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap);
|
||||
|
||||
/* audit system wants to get cap info from files as well */
|
||||
|
|
|
|||
|
|
@ -625,6 +625,8 @@ int ceph_flags_to_mode(int flags);
|
|||
CEPH_CAP_LINK_EXCL | \
|
||||
CEPH_CAP_XATTR_EXCL | \
|
||||
CEPH_CAP_FILE_EXCL)
|
||||
#define CEPH_CAP_ANY_FILE_RD (CEPH_CAP_FILE_RD | CEPH_CAP_FILE_CACHE | \
|
||||
CEPH_CAP_FILE_SHARED)
|
||||
#define CEPH_CAP_ANY_FILE_WR (CEPH_CAP_FILE_WR | CEPH_CAP_FILE_BUFFER | \
|
||||
CEPH_CAP_FILE_EXCL)
|
||||
#define CEPH_CAP_ANY_WR (CEPH_CAP_ANY_EXCL | CEPH_CAP_ANY_FILE_WR)
|
||||
|
|
|
|||
|
|
@ -222,8 +222,6 @@ extern void ceph_copy_to_page_vector(struct page **pages,
|
|||
extern void ceph_copy_from_page_vector(struct page **pages,
|
||||
void *data,
|
||||
loff_t off, size_t len);
|
||||
extern int ceph_copy_page_vector_to_user(struct page **pages, void __user *data,
|
||||
loff_t off, size_t len);
|
||||
extern void ceph_zero_page_vector_range(int off, int len, struct page **pages);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ struct ceph_mon_request {
|
|||
};
|
||||
|
||||
/*
|
||||
* ceph_mon_generic_request is being used for the statfs and poolop requests
|
||||
* which are bening done a bit differently because we need to get data back
|
||||
* to the caller
|
||||
* ceph_mon_generic_request is being used for the statfs, poolop and
|
||||
* mon_get_version requests which are being done a bit differently
|
||||
* because we need to get data back to the caller
|
||||
*/
|
||||
struct ceph_mon_generic_request {
|
||||
struct kref kref;
|
||||
|
|
@ -104,10 +104,15 @@ extern int ceph_monc_got_mdsmap(struct ceph_mon_client *monc, u32 have);
|
|||
extern int ceph_monc_got_osdmap(struct ceph_mon_client *monc, u32 have);
|
||||
|
||||
extern void ceph_monc_request_next_osdmap(struct ceph_mon_client *monc);
|
||||
extern int ceph_monc_wait_osdmap(struct ceph_mon_client *monc, u32 epoch,
|
||||
unsigned long timeout);
|
||||
|
||||
extern int ceph_monc_do_statfs(struct ceph_mon_client *monc,
|
||||
struct ceph_statfs *buf);
|
||||
|
||||
extern int ceph_monc_do_get_version(struct ceph_mon_client *monc,
|
||||
const char *what, u64 *newest);
|
||||
|
||||
extern int ceph_monc_open_session(struct ceph_mon_client *monc);
|
||||
|
||||
extern int ceph_monc_validate_auth(struct ceph_mon_client *monc);
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include <linux/percpu-refcount.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/kernfs.h>
|
||||
#include <linux/wait.h>
|
||||
|
||||
#ifdef CONFIG_CGROUPS
|
||||
|
||||
|
|
@ -47,21 +48,45 @@ enum cgroup_subsys_id {
|
|||
};
|
||||
#undef SUBSYS
|
||||
|
||||
/* Per-subsystem/per-cgroup state maintained by the system. */
|
||||
/*
|
||||
* Per-subsystem/per-cgroup state maintained by the system. This is the
|
||||
* fundamental structural building block that controllers deal with.
|
||||
*
|
||||
* Fields marked with "PI:" are public and immutable and may be accessed
|
||||
* directly without synchronization.
|
||||
*/
|
||||
struct cgroup_subsys_state {
|
||||
/* the cgroup that this css is attached to */
|
||||
/* PI: the cgroup that this css is attached to */
|
||||
struct cgroup *cgroup;
|
||||
|
||||
/* the cgroup subsystem that this css is attached to */
|
||||
/* PI: the cgroup subsystem that this css is attached to */
|
||||
struct cgroup_subsys *ss;
|
||||
|
||||
/* reference count - access via css_[try]get() and css_put() */
|
||||
struct percpu_ref refcnt;
|
||||
|
||||
/* the parent css */
|
||||
/* PI: the parent css */
|
||||
struct cgroup_subsys_state *parent;
|
||||
|
||||
unsigned long flags;
|
||||
/* siblings list anchored at the parent's ->children */
|
||||
struct list_head sibling;
|
||||
struct list_head children;
|
||||
|
||||
/*
|
||||
* PI: Subsys-unique ID. 0 is unused and root is always 1. The
|
||||
* matching css can be looked up using css_from_id().
|
||||
*/
|
||||
int id;
|
||||
|
||||
unsigned int flags;
|
||||
|
||||
/*
|
||||
* Monotonically increasing unique serial number which defines a
|
||||
* uniform order among all csses. It's guaranteed that all
|
||||
* ->children lists are in the ascending order of ->serial_nr and
|
||||
* used to allow interrupting and resuming iterations.
|
||||
*/
|
||||
u64 serial_nr;
|
||||
|
||||
/* percpu_ref killing and RCU release */
|
||||
struct rcu_head rcu_head;
|
||||
|
|
@ -70,8 +95,9 @@ struct cgroup_subsys_state {
|
|||
|
||||
/* bits in struct cgroup_subsys_state flags field */
|
||||
enum {
|
||||
CSS_ROOT = (1 << 0), /* this CSS is the root of the subsystem */
|
||||
CSS_NO_REF = (1 << 0), /* no reference counting for this css */
|
||||
CSS_ONLINE = (1 << 1), /* between ->css_online() and ->css_offline() */
|
||||
CSS_RELEASED = (1 << 2), /* refcnt reached zero, released */
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -82,8 +108,7 @@ enum {
|
|||
*/
|
||||
static inline void css_get(struct cgroup_subsys_state *css)
|
||||
{
|
||||
/* We don't need to reference count the root state */
|
||||
if (!(css->flags & CSS_ROOT))
|
||||
if (!(css->flags & CSS_NO_REF))
|
||||
percpu_ref_get(&css->refcnt);
|
||||
}
|
||||
|
||||
|
|
@ -91,35 +116,51 @@ static inline void css_get(struct cgroup_subsys_state *css)
|
|||
* css_tryget - try to obtain a reference on the specified css
|
||||
* @css: target css
|
||||
*
|
||||
* Obtain a reference on @css if it's alive. The caller naturally needs to
|
||||
* ensure that @css is accessible but doesn't have to be holding a
|
||||
* Obtain a reference on @css unless it already has reached zero and is
|
||||
* being released. This function doesn't care whether @css is on or
|
||||
* offline. The caller naturally needs to ensure that @css is accessible
|
||||
* but doesn't have to be holding a reference on it - IOW, RCU protected
|
||||
* access is good enough for this function. Returns %true if a reference
|
||||
* count was successfully obtained; %false otherwise.
|
||||
*/
|
||||
static inline bool css_tryget(struct cgroup_subsys_state *css)
|
||||
{
|
||||
if (!(css->flags & CSS_NO_REF))
|
||||
return percpu_ref_tryget(&css->refcnt);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* css_tryget_online - try to obtain a reference on the specified css if online
|
||||
* @css: target css
|
||||
*
|
||||
* Obtain a reference on @css if it's online. The caller naturally needs
|
||||
* to ensure that @css is accessible but doesn't have to be holding a
|
||||
* reference on it - IOW, RCU protected access is good enough for this
|
||||
* function. Returns %true if a reference count was successfully obtained;
|
||||
* %false otherwise.
|
||||
*/
|
||||
static inline bool css_tryget(struct cgroup_subsys_state *css)
|
||||
static inline bool css_tryget_online(struct cgroup_subsys_state *css)
|
||||
{
|
||||
if (css->flags & CSS_ROOT)
|
||||
return true;
|
||||
return percpu_ref_tryget(&css->refcnt);
|
||||
if (!(css->flags & CSS_NO_REF))
|
||||
return percpu_ref_tryget_live(&css->refcnt);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* css_put - put a css reference
|
||||
* @css: target css
|
||||
*
|
||||
* Put a reference obtained via css_get() and css_tryget().
|
||||
* Put a reference obtained via css_get() and css_tryget_online().
|
||||
*/
|
||||
static inline void css_put(struct cgroup_subsys_state *css)
|
||||
{
|
||||
if (!(css->flags & CSS_ROOT))
|
||||
if (!(css->flags & CSS_NO_REF))
|
||||
percpu_ref_put(&css->refcnt);
|
||||
}
|
||||
|
||||
/* bits in struct cgroup flags field */
|
||||
enum {
|
||||
/* Control Group is dead */
|
||||
CGRP_DEAD,
|
||||
/*
|
||||
* Control Group has previously had a child cgroup or a task,
|
||||
* but no longer (only if CGRP_NOTIFY_ON_RELEASE is set)
|
||||
|
|
@ -133,48 +174,37 @@ enum {
|
|||
* specified at mount time and thus is implemented here.
|
||||
*/
|
||||
CGRP_CPUSET_CLONE_CHILDREN,
|
||||
/* see the comment above CGRP_ROOT_SANE_BEHAVIOR for details */
|
||||
CGRP_SANE_BEHAVIOR,
|
||||
};
|
||||
|
||||
struct cgroup {
|
||||
/* self css with NULL ->ss, points back to this cgroup */
|
||||
struct cgroup_subsys_state self;
|
||||
|
||||
unsigned long flags; /* "unsigned long" so bitops work */
|
||||
|
||||
/*
|
||||
* idr allocated in-hierarchy ID.
|
||||
*
|
||||
* The ID of the root cgroup is always 0, and a new cgroup
|
||||
* will be assigned with a smallest available ID.
|
||||
* ID 0 is not used, the ID of the root cgroup is always 1, and a
|
||||
* new cgroup will be assigned with a smallest available ID.
|
||||
*
|
||||
* Allocating/Removing ID must be protected by cgroup_mutex.
|
||||
*/
|
||||
int id;
|
||||
|
||||
/* the number of attached css's */
|
||||
int nr_css;
|
||||
|
||||
atomic_t refcnt;
|
||||
|
||||
/*
|
||||
* We link our 'sibling' struct into our parent's 'children'.
|
||||
* Our children link their 'sibling' into our 'children'.
|
||||
* If this cgroup contains any tasks, it contributes one to
|
||||
* populated_cnt. All children with non-zero popuplated_cnt of
|
||||
* their own contribute one. The count is zero iff there's no task
|
||||
* in this cgroup or its subtree.
|
||||
*/
|
||||
struct list_head sibling; /* my parent's children */
|
||||
struct list_head children; /* my children */
|
||||
int populated_cnt;
|
||||
|
||||
struct cgroup *parent; /* my parent */
|
||||
struct kernfs_node *kn; /* cgroup kernfs entry */
|
||||
struct kernfs_node *populated_kn; /* kn for "cgroup.subtree_populated" */
|
||||
|
||||
/*
|
||||
* Monotonically increasing unique serial number which defines a
|
||||
* uniform order among all cgroups. It's guaranteed that all
|
||||
* ->children lists are in the ascending order of ->serial_nr.
|
||||
* It's used to allow interrupting and resuming iterations.
|
||||
*/
|
||||
u64 serial_nr;
|
||||
|
||||
/* The bitmask of subsystems attached to this cgroup */
|
||||
unsigned long subsys_mask;
|
||||
/* the bitmask of subsystems enabled on the child cgroups */
|
||||
unsigned int child_subsys_mask;
|
||||
|
||||
/* Private pointers for each registered subsystem */
|
||||
struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
|
||||
|
|
@ -187,6 +217,15 @@ struct cgroup {
|
|||
*/
|
||||
struct list_head cset_links;
|
||||
|
||||
/*
|
||||
* On the default hierarchy, a css_set for a cgroup with some
|
||||
* susbsys disabled will point to css's which are associated with
|
||||
* the closest ancestor which has the subsys enabled. The
|
||||
* following lists all css_sets which point to this cgroup's css
|
||||
* for the given subsystem.
|
||||
*/
|
||||
struct list_head e_csets[CGROUP_SUBSYS_COUNT];
|
||||
|
||||
/*
|
||||
* Linked list running through all cgroups that can
|
||||
* potentially be reaped by the release agent. Protected by
|
||||
|
|
@ -201,12 +240,8 @@ struct cgroup {
|
|||
struct list_head pidlists;
|
||||
struct mutex pidlist_mutex;
|
||||
|
||||
/* dummy css with NULL ->ss, points back to this cgroup */
|
||||
struct cgroup_subsys_state dummy_css;
|
||||
|
||||
/* For css percpu_ref killing and RCU-protected deletion */
|
||||
struct rcu_head rcu_head;
|
||||
struct work_struct destroy_work;
|
||||
/* used to wait for offlining of csses */
|
||||
wait_queue_head_t offline_waitq;
|
||||
};
|
||||
|
||||
#define MAX_CGROUP_ROOT_NAMELEN 64
|
||||
|
|
@ -250,6 +285,12 @@ enum {
|
|||
*
|
||||
* - "cgroup.clone_children" is removed.
|
||||
*
|
||||
* - "cgroup.subtree_populated" is available. Its value is 0 if
|
||||
* the cgroup and its descendants contain no task; otherwise, 1.
|
||||
* The file also generates kernfs notification which can be
|
||||
* monitored through poll and [di]notify when the value of the
|
||||
* file changes.
|
||||
*
|
||||
* - If mount is requested with sane_behavior but without any
|
||||
* subsystem, the default unified hierarchy is mounted.
|
||||
*
|
||||
|
|
@ -264,6 +305,8 @@ enum {
|
|||
* the flag is not created.
|
||||
*
|
||||
* - blkcg: blk-throttle becomes properly hierarchical.
|
||||
*
|
||||
* - debug: disallowed on the default hierarchy.
|
||||
*/
|
||||
CGRP_ROOT_SANE_BEHAVIOR = (1 << 0),
|
||||
|
||||
|
|
@ -282,6 +325,9 @@ enum {
|
|||
struct cgroup_root {
|
||||
struct kernfs_root *kf_root;
|
||||
|
||||
/* The bitmask of subsystems attached to this hierarchy */
|
||||
unsigned int subsys_mask;
|
||||
|
||||
/* Unique id for this hierarchy. */
|
||||
int hierarchy_id;
|
||||
|
||||
|
|
@ -295,7 +341,7 @@ struct cgroup_root {
|
|||
struct list_head root_list;
|
||||
|
||||
/* Hierarchy-specific flags */
|
||||
unsigned long flags;
|
||||
unsigned int flags;
|
||||
|
||||
/* IDs for cgroups in this hierarchy */
|
||||
struct idr cgroup_idr;
|
||||
|
|
@ -342,6 +388,9 @@ struct css_set {
|
|||
*/
|
||||
struct list_head cgrp_links;
|
||||
|
||||
/* the default cgroup associated with this css_set */
|
||||
struct cgroup *dfl_cgrp;
|
||||
|
||||
/*
|
||||
* Set of subsystem states, one for each subsystem. This array is
|
||||
* immutable after creation apart from the init_css_set during
|
||||
|
|
@ -366,6 +415,15 @@ struct css_set {
|
|||
struct cgroup *mg_src_cgrp;
|
||||
struct css_set *mg_dst_cset;
|
||||
|
||||
/*
|
||||
* On the default hierarhcy, ->subsys[ssid] may point to a css
|
||||
* attached to an ancestor instead of the cgroup this css_set is
|
||||
* associated with. The following node is anchored at
|
||||
* ->subsys[ssid]->cgroup->e_csets[ssid] and provides a way to
|
||||
* iterate through all css's attached to a given cgroup.
|
||||
*/
|
||||
struct list_head e_cset_node[CGROUP_SUBSYS_COUNT];
|
||||
|
||||
/* For RCU-protected deletion */
|
||||
struct rcu_head rcu_head;
|
||||
};
|
||||
|
|
@ -405,8 +463,7 @@ struct cftype {
|
|||
|
||||
/*
|
||||
* The maximum length of string, excluding trailing nul, that can
|
||||
* be passed to write_string. If < PAGE_SIZE-1, PAGE_SIZE-1 is
|
||||
* assumed.
|
||||
* be passed to write. If < PAGE_SIZE-1, PAGE_SIZE-1 is assumed.
|
||||
*/
|
||||
size_t max_write_len;
|
||||
|
||||
|
|
@ -453,19 +510,13 @@ struct cftype {
|
|||
s64 val);
|
||||
|
||||
/*
|
||||
* write_string() is passed a nul-terminated kernelspace
|
||||
* buffer of maximum length determined by max_write_len.
|
||||
* Returns 0 or -ve error code.
|
||||
* write() is the generic write callback which maps directly to
|
||||
* kernfs write operation and overrides all other operations.
|
||||
* Maximum write size is determined by ->max_write_len. Use
|
||||
* of_css/cft() to access the associated css and cft.
|
||||
*/
|
||||
int (*write_string)(struct cgroup_subsys_state *css, struct cftype *cft,
|
||||
char *buffer);
|
||||
/*
|
||||
* trigger() callback can be used to get some kick from the
|
||||
* userspace, when the actual string written is not important
|
||||
* at all. The private field can be used to determine the
|
||||
* kick type for multiplexing.
|
||||
*/
|
||||
int (*trigger)(struct cgroup_subsys_state *css, unsigned int event);
|
||||
ssize_t (*write)(struct kernfs_open_file *of,
|
||||
char *buf, size_t nbytes, loff_t off);
|
||||
|
||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||
struct lock_class_key lockdep_key;
|
||||
|
|
@ -504,14 +555,24 @@ static inline ino_t cgroup_ino(struct cgroup *cgrp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline struct cftype *seq_cft(struct seq_file *seq)
|
||||
/* cft/css accessors for cftype->write() operation */
|
||||
static inline struct cftype *of_cft(struct kernfs_open_file *of)
|
||||
{
|
||||
struct kernfs_open_file *of = seq->private;
|
||||
|
||||
return of->kn->priv;
|
||||
}
|
||||
|
||||
struct cgroup_subsys_state *seq_css(struct seq_file *seq);
|
||||
struct cgroup_subsys_state *of_css(struct kernfs_open_file *of);
|
||||
|
||||
/* cft/css accessors for cftype->seq_*() operations */
|
||||
static inline struct cftype *seq_cft(struct seq_file *seq)
|
||||
{
|
||||
return of_cft(seq->private);
|
||||
}
|
||||
|
||||
static inline struct cgroup_subsys_state *seq_css(struct seq_file *seq)
|
||||
{
|
||||
return of_css(seq->private);
|
||||
}
|
||||
|
||||
/*
|
||||
* Name / path handling functions. All are thin wrappers around the kernfs
|
||||
|
|
@ -612,6 +673,9 @@ struct cgroup_subsys {
|
|||
/* link to parent, protected by cgroup_lock() */
|
||||
struct cgroup_root *root;
|
||||
|
||||
/* idr for css->id */
|
||||
struct idr css_idr;
|
||||
|
||||
/*
|
||||
* List of cftypes. Each entry is the first entry of an array
|
||||
* terminated by zero length name.
|
||||
|
|
@ -626,19 +690,6 @@ struct cgroup_subsys {
|
|||
#include <linux/cgroup_subsys.h>
|
||||
#undef SUBSYS
|
||||
|
||||
/**
|
||||
* css_parent - find the parent css
|
||||
* @css: the target cgroup_subsys_state
|
||||
*
|
||||
* Return the parent css of @css. This function is guaranteed to return
|
||||
* non-NULL parent as long as @css isn't the root.
|
||||
*/
|
||||
static inline
|
||||
struct cgroup_subsys_state *css_parent(struct cgroup_subsys_state *css)
|
||||
{
|
||||
return css->parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* task_css_set_check - obtain a task's css_set with extra access conditions
|
||||
* @task: the task to obtain css_set for
|
||||
|
|
@ -731,14 +782,14 @@ struct cgroup_subsys_state *css_from_id(int id, struct cgroup_subsys *ss);
|
|||
* @pos: the css * to use as the loop cursor
|
||||
* @parent: css whose children to walk
|
||||
*
|
||||
* Walk @parent's children. Must be called under rcu_read_lock(). A child
|
||||
* css which hasn't finished ->css_online() or already has finished
|
||||
* ->css_offline() may show up during traversal and it's each subsystem's
|
||||
* responsibility to verify that each @pos is alive.
|
||||
* Walk @parent's children. Must be called under rcu_read_lock().
|
||||
*
|
||||
* If a subsystem synchronizes against the parent in its ->css_online() and
|
||||
* before starting iterating, a css which finished ->css_online() is
|
||||
* guaranteed to be visible in the future iterations.
|
||||
* If a subsystem synchronizes ->css_online() and the start of iteration, a
|
||||
* css which finished ->css_online() is guaranteed to be visible in the
|
||||
* future iterations and will stay visible until the last reference is put.
|
||||
* A css which hasn't finished ->css_online() or already finished
|
||||
* ->css_offline() may show up during traversal. It's each subsystem's
|
||||
* responsibility to synchronize against on/offlining.
|
||||
*
|
||||
* It is allowed to temporarily drop RCU read lock during iteration. The
|
||||
* caller is responsible for ensuring that @pos remains accessible until
|
||||
|
|
@ -761,17 +812,16 @@ css_rightmost_descendant(struct cgroup_subsys_state *pos);
|
|||
* @root: css whose descendants to walk
|
||||
*
|
||||
* Walk @root's descendants. @root is included in the iteration and the
|
||||
* first node to be visited. Must be called under rcu_read_lock(). A
|
||||
* descendant css which hasn't finished ->css_online() or already has
|
||||
* finished ->css_offline() may show up during traversal and it's each
|
||||
* subsystem's responsibility to verify that each @pos is alive.
|
||||
* first node to be visited. Must be called under rcu_read_lock().
|
||||
*
|
||||
* If a subsystem synchronizes against the parent in its ->css_online() and
|
||||
* before starting iterating, and synchronizes against @pos on each
|
||||
* iteration, any descendant css which finished ->css_online() is
|
||||
* guaranteed to be visible in the future iterations.
|
||||
* If a subsystem synchronizes ->css_online() and the start of iteration, a
|
||||
* css which finished ->css_online() is guaranteed to be visible in the
|
||||
* future iterations and will stay visible until the last reference is put.
|
||||
* A css which hasn't finished ->css_online() or already finished
|
||||
* ->css_offline() may show up during traversal. It's each subsystem's
|
||||
* responsibility to synchronize against on/offlining.
|
||||
*
|
||||
* In other words, the following guarantees that a descendant can't escape
|
||||
* For example, the following guarantees that a descendant can't escape
|
||||
* state updates of its ancestors.
|
||||
*
|
||||
* my_online(@css)
|
||||
|
|
@ -827,18 +877,34 @@ css_next_descendant_post(struct cgroup_subsys_state *pos,
|
|||
*
|
||||
* Similar to css_for_each_descendant_pre() but performs post-order
|
||||
* traversal instead. @root is included in the iteration and the last
|
||||
* node to be visited. Note that the walk visibility guarantee described
|
||||
* in pre-order walk doesn't apply the same to post-order walks.
|
||||
* node to be visited.
|
||||
*
|
||||
* If a subsystem synchronizes ->css_online() and the start of iteration, a
|
||||
* css which finished ->css_online() is guaranteed to be visible in the
|
||||
* future iterations and will stay visible until the last reference is put.
|
||||
* A css which hasn't finished ->css_online() or already finished
|
||||
* ->css_offline() may show up during traversal. It's each subsystem's
|
||||
* responsibility to synchronize against on/offlining.
|
||||
*
|
||||
* Note that the walk visibility guarantee example described in pre-order
|
||||
* walk doesn't apply the same to post-order walks.
|
||||
*/
|
||||
#define css_for_each_descendant_post(pos, css) \
|
||||
for ((pos) = css_next_descendant_post(NULL, (css)); (pos); \
|
||||
(pos) = css_next_descendant_post((pos), (css)))
|
||||
|
||||
bool css_has_online_children(struct cgroup_subsys_state *css);
|
||||
|
||||
/* A css_task_iter should be treated as an opaque object */
|
||||
struct css_task_iter {
|
||||
struct cgroup_subsys_state *origin_css;
|
||||
struct list_head *cset_link;
|
||||
struct list_head *task;
|
||||
struct cgroup_subsys *ss;
|
||||
|
||||
struct list_head *cset_pos;
|
||||
struct list_head *cset_head;
|
||||
|
||||
struct list_head *task_pos;
|
||||
struct list_head *tasks_head;
|
||||
struct list_head *mg_tasks_head;
|
||||
};
|
||||
|
||||
void css_task_iter_start(struct cgroup_subsys_state *css,
|
||||
|
|
@ -849,8 +915,8 @@ void css_task_iter_end(struct css_task_iter *it);
|
|||
int cgroup_attach_task_all(struct task_struct *from, struct task_struct *);
|
||||
int cgroup_transfer_tasks(struct cgroup *to, struct cgroup *from);
|
||||
|
||||
struct cgroup_subsys_state *css_tryget_from_dir(struct dentry *dentry,
|
||||
struct cgroup_subsys *ss);
|
||||
struct cgroup_subsys_state *css_tryget_online_from_dir(struct dentry *dentry,
|
||||
struct cgroup_subsys *ss);
|
||||
|
||||
#else /* !CONFIG_CGROUPS */
|
||||
|
||||
|
|
|
|||
|
|
@ -7,10 +7,6 @@
|
|||
SUBSYS(cpuset)
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_CGROUP_DEBUG)
|
||||
SUBSYS(debug)
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_CGROUP_SCHED)
|
||||
SUBSYS(cpu)
|
||||
#endif
|
||||
|
|
@ -50,6 +46,13 @@ SUBSYS(net_prio)
|
|||
#if IS_ENABLED(CONFIG_CGROUP_HUGETLB)
|
||||
SUBSYS(hugetlb)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following subsystems are not supported on the default hierarchy.
|
||||
*/
|
||||
#if IS_ENABLED(CONFIG_CGROUP_DEBUG)
|
||||
SUBSYS(debug)
|
||||
#endif
|
||||
/*
|
||||
* DO NOT ADD ANY SUBSYSTEM WITHOUT EXPLICIT ACKS FROM CGROUP MAINTAINERS.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@
|
|||
* @idlest_reg: register containing the DPLL idle status bitfield
|
||||
* @autoidle_mask: mask of the DPLL autoidle mode bitfield in @autoidle_reg
|
||||
* @freqsel_mask: mask of the DPLL jitter correction bitfield in @control_reg
|
||||
* @dcc_mask: mask of the DPLL DCC correction bitfield @mult_div1_reg
|
||||
* @dcc_rate: rate atleast which DCC @dcc_mask must be set
|
||||
* @idlest_mask: mask of the DPLL idle status bitfield in @idlest_reg
|
||||
* @lpmode_mask: mask of the DPLL low-power mode bitfield in @control_reg
|
||||
* @m4xen_mask: mask of the DPLL M4X multiplier bitfield in @control_reg
|
||||
|
|
@ -86,6 +88,8 @@ struct dpll_data {
|
|||
u32 idlest_mask;
|
||||
u32 dco_mask;
|
||||
u32 sddiv_mask;
|
||||
u32 dcc_mask;
|
||||
unsigned long dcc_rate;
|
||||
u32 lpmode_mask;
|
||||
u32 m4xen_mask;
|
||||
u8 auto_recal_bit;
|
||||
|
|
@ -94,7 +98,26 @@ struct dpll_data {
|
|||
u8 flags;
|
||||
};
|
||||
|
||||
struct clk_hw_omap_ops;
|
||||
struct clk_hw_omap;
|
||||
|
||||
/**
|
||||
* struct clk_hw_omap_ops - OMAP clk ops
|
||||
* @find_idlest: find idlest register information for a clock
|
||||
* @find_companion: find companion clock register information for a clock,
|
||||
* basically converts CM_ICLKEN* <-> CM_FCLKEN*
|
||||
* @allow_idle: enables autoidle hardware functionality for a clock
|
||||
* @deny_idle: prevent autoidle hardware functionality for a clock
|
||||
*/
|
||||
struct clk_hw_omap_ops {
|
||||
void (*find_idlest)(struct clk_hw_omap *oclk,
|
||||
void __iomem **idlest_reg,
|
||||
u8 *idlest_bit, u8 *idlest_val);
|
||||
void (*find_companion)(struct clk_hw_omap *oclk,
|
||||
void __iomem **other_reg,
|
||||
u8 *other_bit);
|
||||
void (*allow_idle)(struct clk_hw_omap *oclk);
|
||||
void (*deny_idle)(struct clk_hw_omap *oclk);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct clk_hw_omap - OMAP struct clk
|
||||
|
|
@ -259,6 +282,12 @@ int omap2_dflt_clk_enable(struct clk_hw *hw);
|
|||
void omap2_dflt_clk_disable(struct clk_hw *hw);
|
||||
int omap2_dflt_clk_is_enabled(struct clk_hw *hw);
|
||||
void omap3_clk_lock_dpll5(void);
|
||||
unsigned long omap2_dpllcore_recalc(struct clk_hw *hw,
|
||||
unsigned long parent_rate);
|
||||
int omap2_reprogram_dpllcore(struct clk_hw *clk, unsigned long rate,
|
||||
unsigned long parent_rate);
|
||||
void omap2xxx_clkt_dpllcore_init(struct clk_hw *hw);
|
||||
void omap2xxx_clkt_vps_init(void);
|
||||
|
||||
void __iomem *ti_clk_get_reg_addr(struct device_node *node, int index);
|
||||
void ti_dt_clocks_register(struct ti_dt_clk *oclks);
|
||||
|
|
@ -278,6 +307,8 @@ int omap5xxx_dt_clk_init(void);
|
|||
int dra7xx_dt_clk_init(void);
|
||||
int am33xx_dt_clk_init(void);
|
||||
int am43xx_dt_clk_init(void);
|
||||
int omap2420_dt_clk_init(void);
|
||||
int omap2430_dt_clk_init(void);
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
void of_ti_clk_allow_autoidle_all(void);
|
||||
|
|
@ -287,6 +318,8 @@ static inline void of_ti_clk_allow_autoidle_all(void) { }
|
|||
static inline void of_ti_clk_deny_autoidle_all(void) { }
|
||||
#endif
|
||||
|
||||
extern const struct clk_hw_omap_ops clkhwops_omap2xxx_dpll;
|
||||
extern const struct clk_hw_omap_ops clkhwops_omap2430_i2chs_wait;
|
||||
extern const struct clk_hw_omap_ops clkhwops_omap3_dpll;
|
||||
extern const struct clk_hw_omap_ops clkhwops_omap4_dpllmx;
|
||||
extern const struct clk_hw_omap_ops clkhwops_wait;
|
||||
|
|
|
|||
|
|
@ -383,7 +383,9 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
|
|||
/* Ignore/forbid kprobes attach on very low level functions marked by this attribute: */
|
||||
#ifdef CONFIG_KPROBES
|
||||
# define __kprobes __attribute__((__section__(".kprobes.text")))
|
||||
# define nokprobe_inline __always_inline
|
||||
#else
|
||||
# define __kprobes
|
||||
# define nokprobe_inline inline
|
||||
#endif
|
||||
#endif /* __LINUX_COMPILER_H */
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ struct cpufreq_policy {
|
|||
unsigned int max; /* in kHz */
|
||||
unsigned int cur; /* in kHz, only needed if cpufreq
|
||||
* governors are used */
|
||||
unsigned int restore_freq; /* = policy->cur before transition */
|
||||
unsigned int suspend_freq; /* freq to set during suspend */
|
||||
|
||||
unsigned int policy; /* see above */
|
||||
|
|
@ -221,11 +222,35 @@ struct cpufreq_driver {
|
|||
|
||||
/* define one out of two */
|
||||
int (*setpolicy) (struct cpufreq_policy *policy);
|
||||
|
||||
/*
|
||||
* On failure, should always restore frequency to policy->restore_freq
|
||||
* (i.e. old freq).
|
||||
*/
|
||||
int (*target) (struct cpufreq_policy *policy, /* Deprecated */
|
||||
unsigned int target_freq,
|
||||
unsigned int relation);
|
||||
int (*target_index) (struct cpufreq_policy *policy,
|
||||
unsigned int index);
|
||||
/*
|
||||
* Only for drivers with target_index() and CPUFREQ_ASYNC_NOTIFICATION
|
||||
* unset.
|
||||
*
|
||||
* get_intermediate should return a stable intermediate frequency
|
||||
* platform wants to switch to and target_intermediate() should set CPU
|
||||
* to to that frequency, before jumping to the frequency corresponding
|
||||
* to 'index'. Core will take care of sending notifications and driver
|
||||
* doesn't have to handle them in target_intermediate() or
|
||||
* target_index().
|
||||
*
|
||||
* Drivers can return '0' from get_intermediate() in case they don't
|
||||
* wish to switch to intermediate frequency for some target frequency.
|
||||
* In that case core will directly call ->target_index().
|
||||
*/
|
||||
unsigned int (*get_intermediate)(struct cpufreq_policy *policy,
|
||||
unsigned int index);
|
||||
int (*target_intermediate)(struct cpufreq_policy *policy,
|
||||
unsigned int index);
|
||||
|
||||
/* should be defined, if possible */
|
||||
unsigned int (*get) (unsigned int cpu);
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ struct cpuidle_device {
|
|||
};
|
||||
|
||||
DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices);
|
||||
DECLARE_PER_CPU(struct cpuidle_device, cpuidle_dev);
|
||||
|
||||
/**
|
||||
* cpuidle_get_last_residency - retrieves the last state's residency time
|
||||
|
|
|
|||
|
|
@ -142,6 +142,13 @@ static inline unsigned int cpumask_any_but(const struct cpumask *mask,
|
|||
return 1;
|
||||
}
|
||||
|
||||
static inline int cpumask_set_cpu_local_first(int i, int numa_node, cpumask_t *dstp)
|
||||
{
|
||||
set_bit(0, cpumask_bits(dstp));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define for_each_cpu(cpu, mask) \
|
||||
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
|
||||
#define for_each_cpu_not(cpu, mask) \
|
||||
|
|
@ -192,6 +199,7 @@ static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp)
|
|||
|
||||
int cpumask_next_and(int n, const struct cpumask *, const struct cpumask *);
|
||||
int cpumask_any_but(const struct cpumask *mask, unsigned int cpu);
|
||||
int cpumask_set_cpu_local_first(int i, int numa_node, cpumask_t *dstp);
|
||||
|
||||
/**
|
||||
* for_each_cpu - iterate over every cpu in a mask
|
||||
|
|
@ -600,7 +608,7 @@ static inline int cpulist_scnprintf(char *buf, int len,
|
|||
static inline int cpumask_parse(const char *buf, struct cpumask *dstp)
|
||||
{
|
||||
char *nl = strchr(buf, '\n');
|
||||
int len = nl ? nl - buf : strlen(buf);
|
||||
unsigned int len = nl ? (unsigned int)(nl - buf) : strlen(buf);
|
||||
|
||||
return bitmap_parse(buf, len, cpumask_bits(dstp), nr_cpumask_bits);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
#define _LINUX_CRC7_H
|
||||
#include <linux/types.h>
|
||||
|
||||
extern const u8 crc7_syndrome_table[256];
|
||||
extern const u8 crc7_be_syndrome_table[256];
|
||||
|
||||
static inline u8 crc7_byte(u8 crc, u8 data)
|
||||
static inline u8 crc7_be_byte(u8 crc, u8 data)
|
||||
{
|
||||
return crc7_syndrome_table[(crc << 1) ^ data];
|
||||
return crc7_be_syndrome_table[crc ^ data];
|
||||
}
|
||||
|
||||
extern u8 crc7(u8 crc, const u8 *buffer, size_t len);
|
||||
extern u8 crc7_be(u8 crc, const u8 *buffer, size_t len);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
10
include/linux/dell-led.h
Normal file
10
include/linux/dell-led.h
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#ifndef __DELL_LED_H__
|
||||
#define __DELL_LED_H__
|
||||
|
||||
enum {
|
||||
DELL_LED_MICMUTE,
|
||||
};
|
||||
|
||||
int dell_app_wmi_led_set(int whichled, int on);
|
||||
|
||||
#endif
|
||||
|
|
@ -115,12 +115,6 @@ typedef int (*dm_busy_fn) (struct dm_target *ti);
|
|||
|
||||
void dm_error(const char *message);
|
||||
|
||||
/*
|
||||
* Combine device limits.
|
||||
*/
|
||||
int dm_set_device_limits(struct dm_target *ti, struct dm_dev *dev,
|
||||
sector_t start, sector_t len, void *data);
|
||||
|
||||
struct dm_dev {
|
||||
struct block_device *bdev;
|
||||
fmode_t mode;
|
||||
|
|
@ -132,7 +126,7 @@ struct dm_dev {
|
|||
* are opened/closed correctly.
|
||||
*/
|
||||
int dm_get_device(struct dm_target *ti, const char *path, fmode_t mode,
|
||||
struct dm_dev **result);
|
||||
struct dm_dev **result);
|
||||
void dm_put_device(struct dm_target *ti, struct dm_dev *d);
|
||||
|
||||
/*
|
||||
|
|
@ -291,6 +285,7 @@ struct dm_target_io {
|
|||
struct dm_io *io;
|
||||
struct dm_target *ti;
|
||||
unsigned target_bio_nr;
|
||||
unsigned *len_ptr;
|
||||
struct bio clone;
|
||||
};
|
||||
|
||||
|
|
@ -401,6 +396,7 @@ int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid);
|
|||
struct gendisk *dm_disk(struct mapped_device *md);
|
||||
int dm_suspended(struct dm_target *ti);
|
||||
int dm_noflush_suspending(struct dm_target *ti);
|
||||
void dm_accept_partial_bio(struct bio *bio, unsigned n_sectors);
|
||||
union map_info *dm_get_rq_mapinfo(struct request *rq);
|
||||
|
||||
struct queue_limits *dm_get_queue_limits(struct mapped_device *md);
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ struct dma_chan_dev {
|
|||
};
|
||||
|
||||
/**
|
||||
* enum dma_slave_buswidth - defines bus with of the DMA slave
|
||||
* enum dma_slave_buswidth - defines bus width of the DMA slave
|
||||
* device, source or target buses
|
||||
*/
|
||||
enum dma_slave_buswidth {
|
||||
|
|
|
|||
|
|
@ -133,7 +133,6 @@ extern struct request *elv_latter_request(struct request_queue *, struct request
|
|||
extern int elv_register_queue(struct request_queue *q);
|
||||
extern void elv_unregister_queue(struct request_queue *q);
|
||||
extern int elv_may_queue(struct request_queue *, int);
|
||||
extern void elv_abort_queue(struct request_queue *);
|
||||
extern void elv_completed_request(struct request_queue *, struct request *);
|
||||
extern int elv_set_request(struct request_queue *q, struct request *rq,
|
||||
struct bio *bio, gfp_t gfp_mask);
|
||||
|
|
|
|||
|
|
@ -154,13 +154,20 @@ static inline u32 ethtool_rxfh_indir_default(u32 index, u32 n_rx_rings)
|
|||
* @reset: Reset (part of) the device, as specified by a bitmask of
|
||||
* flags from &enum ethtool_reset_flags. Returns a negative
|
||||
* error code or zero.
|
||||
* @get_rxfh_key_size: Get the size of the RX flow hash key.
|
||||
* Returns zero if not supported for this specific device.
|
||||
* @get_rxfh_indir_size: Get the size of the RX flow hash indirection table.
|
||||
* Returns zero if not supported for this specific device.
|
||||
* @get_rxfh_indir: Get the contents of the RX flow hash indirection table.
|
||||
* Will not be called if @get_rxfh_indir_size returns zero.
|
||||
* @get_rxfh: Get the contents of the RX flow hash indirection table and hash
|
||||
* key.
|
||||
* Will only be called if one or both of @get_rxfh_indir_size and
|
||||
* @get_rxfh_key_size are implemented and return non-zero.
|
||||
* Returns a negative error code or zero.
|
||||
* @set_rxfh_indir: Set the contents of the RX flow hash indirection table.
|
||||
* Will not be called if @get_rxfh_indir_size returns zero.
|
||||
* @set_rxfh: Set the contents of the RX flow hash indirection table and/or
|
||||
* hash key. In case only the indirection table or hash key is to be
|
||||
* changed, the other argument will be %NULL.
|
||||
* Will only be called if one or both of @get_rxfh_indir_size and
|
||||
* @get_rxfh_key_size are implemented and return non-zero.
|
||||
* Returns a negative error code or zero.
|
||||
* @get_channels: Get number of channels.
|
||||
* @set_channels: Set number of channels. Returns a negative error code or
|
||||
|
|
@ -232,9 +239,11 @@ struct ethtool_ops {
|
|||
int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *);
|
||||
int (*flash_device)(struct net_device *, struct ethtool_flash *);
|
||||
int (*reset)(struct net_device *, u32 *);
|
||||
u32 (*get_rxfh_key_size)(struct net_device *);
|
||||
u32 (*get_rxfh_indir_size)(struct net_device *);
|
||||
int (*get_rxfh_indir)(struct net_device *, u32 *);
|
||||
int (*set_rxfh_indir)(struct net_device *, const u32 *);
|
||||
int (*get_rxfh)(struct net_device *, u32 *indir, u8 *key);
|
||||
int (*set_rxfh)(struct net_device *, const u32 *indir,
|
||||
const u8 *key);
|
||||
void (*get_channels)(struct net_device *, struct ethtool_channels *);
|
||||
int (*set_channels)(struct net_device *, struct ethtool_channels *);
|
||||
int (*get_dump_flag)(struct net_device *, struct ethtool_dump *);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#define F2FS_LOG_SECTORS_PER_BLOCK 3 /* 4KB: F2FS_BLKSIZE */
|
||||
#define F2FS_BLKSIZE 4096 /* support only 4KB block */
|
||||
#define F2FS_MAX_EXTENSION 64 /* # of extension entries */
|
||||
#define F2FS_BLK_ALIGN(x) (((x) + F2FS_BLKSIZE - 1) / F2FS_BLKSIZE)
|
||||
|
||||
#define NULL_ADDR ((block_t)0) /* used as block_t addresses */
|
||||
#define NEW_ADDR ((block_t)-1) /* used as block_t addresses */
|
||||
|
|
@ -75,6 +76,7 @@ struct f2fs_super_block {
|
|||
__le16 volume_name[512]; /* volume name */
|
||||
__le32 extension_count; /* # of extensions below */
|
||||
__u8 extension_list[F2FS_MAX_EXTENSION][8]; /* extension array */
|
||||
__le32 cp_payload;
|
||||
} __packed;
|
||||
|
||||
/*
|
||||
|
|
@ -146,6 +148,9 @@ struct f2fs_extent {
|
|||
#define ADDRS_PER_BLOCK 1018 /* Address Pointers in a Direct Block */
|
||||
#define NIDS_PER_BLOCK 1018 /* Node IDs in an Indirect Block */
|
||||
|
||||
#define ADDRS_PER_PAGE(page, fi) \
|
||||
(IS_INODE(page) ? ADDRS_PER_INODE(fi) : ADDRS_PER_BLOCK)
|
||||
|
||||
#define NODE_DIR1_BLOCK (DEF_ADDRS_PER_INODE + 1)
|
||||
#define NODE_DIR2_BLOCK (DEF_ADDRS_PER_INODE + 2)
|
||||
#define NODE_IND1_BLOCK (DEF_ADDRS_PER_INODE + 3)
|
||||
|
|
@ -391,6 +396,9 @@ typedef __le32 f2fs_hash_t;
|
|||
/* MAX level for dir lookup */
|
||||
#define MAX_DIR_HASH_DEPTH 63
|
||||
|
||||
/* MAX buckets in one level of dir */
|
||||
#define MAX_DIR_BUCKETS (1 << ((MAX_DIR_HASH_DEPTH / 2) - 1))
|
||||
|
||||
#define SIZE_OF_DIR_ENTRY 11 /* by byte */
|
||||
#define SIZE_OF_DENTRY_BITMAP ((NR_DENTRY_IN_BLOCK + BITS_PER_BYTE - 1) / \
|
||||
BITS_PER_BYTE)
|
||||
|
|
|
|||
|
|
@ -37,21 +37,270 @@
|
|||
#define BPF_CALL 0x80 /* function call */
|
||||
#define BPF_EXIT 0x90 /* function return */
|
||||
|
||||
/* Register numbers */
|
||||
enum {
|
||||
BPF_REG_0 = 0,
|
||||
BPF_REG_1,
|
||||
BPF_REG_2,
|
||||
BPF_REG_3,
|
||||
BPF_REG_4,
|
||||
BPF_REG_5,
|
||||
BPF_REG_6,
|
||||
BPF_REG_7,
|
||||
BPF_REG_8,
|
||||
BPF_REG_9,
|
||||
BPF_REG_10,
|
||||
__MAX_BPF_REG,
|
||||
};
|
||||
|
||||
/* BPF has 10 general purpose 64-bit registers and stack frame. */
|
||||
#define MAX_BPF_REG 11
|
||||
#define MAX_BPF_REG __MAX_BPF_REG
|
||||
|
||||
/* ArgX, context and stack frame pointer register positions. Note,
|
||||
* Arg1, Arg2, Arg3, etc are used as argument mappings of function
|
||||
* calls in BPF_CALL instruction.
|
||||
*/
|
||||
#define BPF_REG_ARG1 BPF_REG_1
|
||||
#define BPF_REG_ARG2 BPF_REG_2
|
||||
#define BPF_REG_ARG3 BPF_REG_3
|
||||
#define BPF_REG_ARG4 BPF_REG_4
|
||||
#define BPF_REG_ARG5 BPF_REG_5
|
||||
#define BPF_REG_CTX BPF_REG_6
|
||||
#define BPF_REG_FP BPF_REG_10
|
||||
|
||||
/* Additional register mappings for converted user programs. */
|
||||
#define BPF_REG_A BPF_REG_0
|
||||
#define BPF_REG_X BPF_REG_7
|
||||
#define BPF_REG_TMP BPF_REG_8
|
||||
|
||||
/* BPF program can access up to 512 bytes of stack space. */
|
||||
#define MAX_BPF_STACK 512
|
||||
|
||||
/* Arg1, context and stack frame pointer register positions. */
|
||||
#define ARG1_REG 1
|
||||
#define CTX_REG 6
|
||||
#define FP_REG 10
|
||||
/* Helper macros for filter block array initializers. */
|
||||
|
||||
/* ALU ops on registers, bpf_add|sub|...: dst_reg += src_reg */
|
||||
|
||||
#define BPF_ALU64_REG(OP, DST, SRC) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_ALU64 | BPF_OP(OP) | BPF_X, \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = SRC, \
|
||||
.off = 0, \
|
||||
.imm = 0 })
|
||||
|
||||
#define BPF_ALU32_REG(OP, DST, SRC) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_ALU | BPF_OP(OP) | BPF_X, \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = SRC, \
|
||||
.off = 0, \
|
||||
.imm = 0 })
|
||||
|
||||
/* ALU ops on immediates, bpf_add|sub|...: dst_reg += imm32 */
|
||||
|
||||
#define BPF_ALU64_IMM(OP, DST, IMM) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_ALU64 | BPF_OP(OP) | BPF_K, \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = 0, \
|
||||
.off = 0, \
|
||||
.imm = IMM })
|
||||
|
||||
#define BPF_ALU32_IMM(OP, DST, IMM) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_ALU | BPF_OP(OP) | BPF_K, \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = 0, \
|
||||
.off = 0, \
|
||||
.imm = IMM })
|
||||
|
||||
/* Endianess conversion, cpu_to_{l,b}e(), {l,b}e_to_cpu() */
|
||||
|
||||
#define BPF_ENDIAN(TYPE, DST, LEN) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_ALU | BPF_END | BPF_SRC(TYPE), \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = 0, \
|
||||
.off = 0, \
|
||||
.imm = LEN })
|
||||
|
||||
/* Short form of mov, dst_reg = src_reg */
|
||||
|
||||
#define BPF_MOV64_REG(DST, SRC) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_ALU64 | BPF_MOV | BPF_X, \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = SRC, \
|
||||
.off = 0, \
|
||||
.imm = 0 })
|
||||
|
||||
#define BPF_MOV32_REG(DST, SRC) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_ALU | BPF_MOV | BPF_X, \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = SRC, \
|
||||
.off = 0, \
|
||||
.imm = 0 })
|
||||
|
||||
/* Short form of mov, dst_reg = imm32 */
|
||||
|
||||
#define BPF_MOV64_IMM(DST, IMM) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_ALU64 | BPF_MOV | BPF_K, \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = 0, \
|
||||
.off = 0, \
|
||||
.imm = IMM })
|
||||
|
||||
#define BPF_MOV32_IMM(DST, IMM) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_ALU | BPF_MOV | BPF_K, \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = 0, \
|
||||
.off = 0, \
|
||||
.imm = IMM })
|
||||
|
||||
/* Short form of mov based on type, BPF_X: dst_reg = src_reg, BPF_K: dst_reg = imm32 */
|
||||
|
||||
#define BPF_MOV64_RAW(TYPE, DST, SRC, IMM) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_ALU64 | BPF_MOV | BPF_SRC(TYPE), \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = SRC, \
|
||||
.off = 0, \
|
||||
.imm = IMM })
|
||||
|
||||
#define BPF_MOV32_RAW(TYPE, DST, SRC, IMM) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_ALU | BPF_MOV | BPF_SRC(TYPE), \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = SRC, \
|
||||
.off = 0, \
|
||||
.imm = IMM })
|
||||
|
||||
/* Direct packet access, R0 = *(uint *) (skb->data + imm32) */
|
||||
|
||||
#define BPF_LD_ABS(SIZE, IMM) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_LD | BPF_SIZE(SIZE) | BPF_ABS, \
|
||||
.dst_reg = 0, \
|
||||
.src_reg = 0, \
|
||||
.off = 0, \
|
||||
.imm = IMM })
|
||||
|
||||
/* Indirect packet access, R0 = *(uint *) (skb->data + src_reg + imm32) */
|
||||
|
||||
#define BPF_LD_IND(SIZE, SRC, IMM) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_LD | BPF_SIZE(SIZE) | BPF_IND, \
|
||||
.dst_reg = 0, \
|
||||
.src_reg = SRC, \
|
||||
.off = 0, \
|
||||
.imm = IMM })
|
||||
|
||||
/* Memory load, dst_reg = *(uint *) (src_reg + off16) */
|
||||
|
||||
#define BPF_LDX_MEM(SIZE, DST, SRC, OFF) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_LDX | BPF_SIZE(SIZE) | BPF_MEM, \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = SRC, \
|
||||
.off = OFF, \
|
||||
.imm = 0 })
|
||||
|
||||
/* Memory store, *(uint *) (dst_reg + off16) = src_reg */
|
||||
|
||||
#define BPF_STX_MEM(SIZE, DST, SRC, OFF) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_STX | BPF_SIZE(SIZE) | BPF_MEM, \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = SRC, \
|
||||
.off = OFF, \
|
||||
.imm = 0 })
|
||||
|
||||
/* Memory store, *(uint *) (dst_reg + off16) = imm32 */
|
||||
|
||||
#define BPF_ST_MEM(SIZE, DST, OFF, IMM) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_ST | BPF_SIZE(SIZE) | BPF_MEM, \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = 0, \
|
||||
.off = OFF, \
|
||||
.imm = IMM })
|
||||
|
||||
/* Conditional jumps against registers, if (dst_reg 'op' src_reg) goto pc + off16 */
|
||||
|
||||
#define BPF_JMP_REG(OP, DST, SRC, OFF) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_JMP | BPF_OP(OP) | BPF_X, \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = SRC, \
|
||||
.off = OFF, \
|
||||
.imm = 0 })
|
||||
|
||||
/* Conditional jumps against immediates, if (dst_reg 'op' imm32) goto pc + off16 */
|
||||
|
||||
#define BPF_JMP_IMM(OP, DST, IMM, OFF) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_JMP | BPF_OP(OP) | BPF_K, \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = 0, \
|
||||
.off = OFF, \
|
||||
.imm = IMM })
|
||||
|
||||
/* Function call */
|
||||
|
||||
#define BPF_EMIT_CALL(FUNC) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_JMP | BPF_CALL, \
|
||||
.dst_reg = 0, \
|
||||
.src_reg = 0, \
|
||||
.off = 0, \
|
||||
.imm = ((FUNC) - __bpf_call_base) })
|
||||
|
||||
/* Raw code statement block */
|
||||
|
||||
#define BPF_RAW_INSN(CODE, DST, SRC, OFF, IMM) \
|
||||
((struct sock_filter_int) { \
|
||||
.code = CODE, \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = SRC, \
|
||||
.off = OFF, \
|
||||
.imm = IMM })
|
||||
|
||||
/* Program exit */
|
||||
|
||||
#define BPF_EXIT_INSN() \
|
||||
((struct sock_filter_int) { \
|
||||
.code = BPF_JMP | BPF_EXIT, \
|
||||
.dst_reg = 0, \
|
||||
.src_reg = 0, \
|
||||
.off = 0, \
|
||||
.imm = 0 })
|
||||
|
||||
#define bytes_to_bpf_size(bytes) \
|
||||
({ \
|
||||
int bpf_size = -EINVAL; \
|
||||
\
|
||||
if (bytes == sizeof(u8)) \
|
||||
bpf_size = BPF_B; \
|
||||
else if (bytes == sizeof(u16)) \
|
||||
bpf_size = BPF_H; \
|
||||
else if (bytes == sizeof(u32)) \
|
||||
bpf_size = BPF_W; \
|
||||
else if (bytes == sizeof(u64)) \
|
||||
bpf_size = BPF_DW; \
|
||||
\
|
||||
bpf_size; \
|
||||
})
|
||||
|
||||
/* Macro to invoke filter function. */
|
||||
#define SK_RUN_FILTER(filter, ctx) (*filter->bpf_func)(ctx, filter->insnsi)
|
||||
|
||||
struct sock_filter_int {
|
||||
__u8 code; /* opcode */
|
||||
__u8 a_reg:4; /* dest register */
|
||||
__u8 x_reg:4; /* source register */
|
||||
__u8 dst_reg:4; /* dest register */
|
||||
__u8 src_reg:4; /* source register */
|
||||
__s16 off; /* signed offset */
|
||||
__s32 imm; /* signed immediate constant */
|
||||
};
|
||||
|
|
@ -97,21 +346,16 @@ static inline unsigned int sk_filter_size(unsigned int proglen)
|
|||
#define sk_filter_proglen(fprog) \
|
||||
(fprog->len * sizeof(fprog->filter[0]))
|
||||
|
||||
#define SK_RUN_FILTER(filter, ctx) \
|
||||
(*filter->bpf_func)(ctx, filter->insnsi)
|
||||
|
||||
int sk_filter(struct sock *sk, struct sk_buff *skb);
|
||||
|
||||
u32 sk_run_filter_int_seccomp(const struct seccomp_data *ctx,
|
||||
const struct sock_filter_int *insni);
|
||||
u32 sk_run_filter_int_skb(const struct sk_buff *ctx,
|
||||
const struct sock_filter_int *insni);
|
||||
void sk_filter_select_runtime(struct sk_filter *fp);
|
||||
void sk_filter_free(struct sk_filter *fp);
|
||||
|
||||
int sk_convert_filter(struct sock_filter *prog, int len,
|
||||
struct sock_filter_int *new_prog, int *new_len);
|
||||
|
||||
int sk_unattached_filter_create(struct sk_filter **pfp,
|
||||
struct sock_fprog *fprog);
|
||||
struct sock_fprog_kern *fprog);
|
||||
void sk_unattached_filter_destroy(struct sk_filter *fp);
|
||||
|
||||
int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
|
||||
|
|
@ -120,11 +364,48 @@ int sk_detach_filter(struct sock *sk);
|
|||
int sk_chk_filter(struct sock_filter *filter, unsigned int flen);
|
||||
int sk_get_filter(struct sock *sk, struct sock_filter __user *filter,
|
||||
unsigned int len);
|
||||
void sk_decode_filter(struct sock_filter *filt, struct sock_filter *to);
|
||||
|
||||
void sk_filter_charge(struct sock *sk, struct sk_filter *fp);
|
||||
void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp);
|
||||
|
||||
u64 __bpf_call_base(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5);
|
||||
void bpf_int_jit_compile(struct sk_filter *fp);
|
||||
|
||||
#define BPF_ANC BIT(15)
|
||||
|
||||
static inline u16 bpf_anc_helper(const struct sock_filter *ftest)
|
||||
{
|
||||
BUG_ON(ftest->code & BPF_ANC);
|
||||
|
||||
switch (ftest->code) {
|
||||
case BPF_LD | BPF_W | BPF_ABS:
|
||||
case BPF_LD | BPF_H | BPF_ABS:
|
||||
case BPF_LD | BPF_B | BPF_ABS:
|
||||
#define BPF_ANCILLARY(CODE) case SKF_AD_OFF + SKF_AD_##CODE: \
|
||||
return BPF_ANC | SKF_AD_##CODE
|
||||
switch (ftest->k) {
|
||||
BPF_ANCILLARY(PROTOCOL);
|
||||
BPF_ANCILLARY(PKTTYPE);
|
||||
BPF_ANCILLARY(IFINDEX);
|
||||
BPF_ANCILLARY(NLATTR);
|
||||
BPF_ANCILLARY(NLATTR_NEST);
|
||||
BPF_ANCILLARY(MARK);
|
||||
BPF_ANCILLARY(QUEUE);
|
||||
BPF_ANCILLARY(HATYPE);
|
||||
BPF_ANCILLARY(RXHASH);
|
||||
BPF_ANCILLARY(CPU);
|
||||
BPF_ANCILLARY(ALU_XOR_X);
|
||||
BPF_ANCILLARY(VLAN_TAG);
|
||||
BPF_ANCILLARY(VLAN_TAG_PRESENT);
|
||||
BPF_ANCILLARY(PAY_OFFSET);
|
||||
BPF_ANCILLARY(RANDOM);
|
||||
}
|
||||
/* Fallthrough. */
|
||||
default:
|
||||
return ftest->code;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BPF_JIT
|
||||
#include <stdarg.h>
|
||||
#include <linux/linkage.h>
|
||||
|
|
@ -144,85 +425,20 @@ static inline void bpf_jit_dump(unsigned int flen, unsigned int proglen,
|
|||
}
|
||||
#else
|
||||
#include <linux/slab.h>
|
||||
|
||||
static inline void bpf_jit_compile(struct sk_filter *fp)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void bpf_jit_free(struct sk_filter *fp)
|
||||
{
|
||||
kfree(fp);
|
||||
}
|
||||
#endif
|
||||
#endif /* CONFIG_BPF_JIT */
|
||||
|
||||
static inline int bpf_tell_extensions(void)
|
||||
{
|
||||
return SKF_AD_MAX;
|
||||
}
|
||||
|
||||
enum {
|
||||
BPF_S_RET_K = 1,
|
||||
BPF_S_RET_A,
|
||||
BPF_S_ALU_ADD_K,
|
||||
BPF_S_ALU_ADD_X,
|
||||
BPF_S_ALU_SUB_K,
|
||||
BPF_S_ALU_SUB_X,
|
||||
BPF_S_ALU_MUL_K,
|
||||
BPF_S_ALU_MUL_X,
|
||||
BPF_S_ALU_DIV_X,
|
||||
BPF_S_ALU_MOD_K,
|
||||
BPF_S_ALU_MOD_X,
|
||||
BPF_S_ALU_AND_K,
|
||||
BPF_S_ALU_AND_X,
|
||||
BPF_S_ALU_OR_K,
|
||||
BPF_S_ALU_OR_X,
|
||||
BPF_S_ALU_XOR_K,
|
||||
BPF_S_ALU_XOR_X,
|
||||
BPF_S_ALU_LSH_K,
|
||||
BPF_S_ALU_LSH_X,
|
||||
BPF_S_ALU_RSH_K,
|
||||
BPF_S_ALU_RSH_X,
|
||||
BPF_S_ALU_NEG,
|
||||
BPF_S_LD_W_ABS,
|
||||
BPF_S_LD_H_ABS,
|
||||
BPF_S_LD_B_ABS,
|
||||
BPF_S_LD_W_LEN,
|
||||
BPF_S_LD_W_IND,
|
||||
BPF_S_LD_H_IND,
|
||||
BPF_S_LD_B_IND,
|
||||
BPF_S_LD_IMM,
|
||||
BPF_S_LDX_W_LEN,
|
||||
BPF_S_LDX_B_MSH,
|
||||
BPF_S_LDX_IMM,
|
||||
BPF_S_MISC_TAX,
|
||||
BPF_S_MISC_TXA,
|
||||
BPF_S_ALU_DIV_K,
|
||||
BPF_S_LD_MEM,
|
||||
BPF_S_LDX_MEM,
|
||||
BPF_S_ST,
|
||||
BPF_S_STX,
|
||||
BPF_S_JMP_JA,
|
||||
BPF_S_JMP_JEQ_K,
|
||||
BPF_S_JMP_JEQ_X,
|
||||
BPF_S_JMP_JGE_K,
|
||||
BPF_S_JMP_JGE_X,
|
||||
BPF_S_JMP_JGT_K,
|
||||
BPF_S_JMP_JGT_X,
|
||||
BPF_S_JMP_JSET_K,
|
||||
BPF_S_JMP_JSET_X,
|
||||
/* Ancillary data */
|
||||
BPF_S_ANC_PROTOCOL,
|
||||
BPF_S_ANC_PKTTYPE,
|
||||
BPF_S_ANC_IFINDEX,
|
||||
BPF_S_ANC_NLATTR,
|
||||
BPF_S_ANC_NLATTR_NEST,
|
||||
BPF_S_ANC_MARK,
|
||||
BPF_S_ANC_QUEUE,
|
||||
BPF_S_ANC_HATYPE,
|
||||
BPF_S_ANC_RXHASH,
|
||||
BPF_S_ANC_CPU,
|
||||
BPF_S_ANC_ALU_XOR_X,
|
||||
BPF_S_ANC_VLAN_TAG,
|
||||
BPF_S_ANC_VLAN_TAG_PRESENT,
|
||||
BPF_S_ANC_PAY_OFFSET,
|
||||
};
|
||||
|
||||
#endif /* __LINUX_FILTER_H__ */
|
||||
|
|
|
|||
|
|
@ -128,6 +128,10 @@ typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
|
|||
#define FMODE_ATOMIC_POS ((__force fmode_t)0x8000)
|
||||
/* Write access to underlying fs */
|
||||
#define FMODE_WRITER ((__force fmode_t)0x10000)
|
||||
/* Has read method(s) */
|
||||
#define FMODE_CAN_READ ((__force fmode_t)0x20000)
|
||||
/* Has write method(s) */
|
||||
#define FMODE_CAN_WRITE ((__force fmode_t)0x40000)
|
||||
|
||||
/* File was opened by fanotify and shouldn't generate fanotify events */
|
||||
#define FMODE_NONOTIFY ((__force fmode_t)0x1000000)
|
||||
|
|
@ -343,8 +347,7 @@ struct address_space_operations {
|
|||
void (*invalidatepage) (struct page *, unsigned int, unsigned int);
|
||||
int (*releasepage) (struct page *, gfp_t);
|
||||
void (*freepage)(struct page *);
|
||||
ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
|
||||
loff_t offset, unsigned long nr_segs);
|
||||
ssize_t (*direct_IO)(int, struct kiocb *, struct iov_iter *iter, loff_t offset);
|
||||
int (*get_xip_mem)(struct address_space *, pgoff_t, int,
|
||||
void **, unsigned long *);
|
||||
/*
|
||||
|
|
@ -1448,6 +1451,8 @@ struct block_device_operations;
|
|||
#define HAVE_COMPAT_IOCTL 1
|
||||
#define HAVE_UNLOCKED_IOCTL 1
|
||||
|
||||
struct iov_iter;
|
||||
|
||||
struct file_operations {
|
||||
struct module *owner;
|
||||
loff_t (*llseek) (struct file *, loff_t, int);
|
||||
|
|
@ -1455,6 +1460,8 @@ struct file_operations {
|
|||
ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
|
||||
ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
|
||||
ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
|
||||
ssize_t (*read_iter) (struct kiocb *, struct iov_iter *);
|
||||
ssize_t (*write_iter) (struct kiocb *, struct iov_iter *);
|
||||
int (*iterate) (struct file *, struct dir_context *);
|
||||
unsigned int (*poll) (struct file *, struct poll_table_struct *);
|
||||
long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
|
||||
|
|
@ -1914,6 +1921,12 @@ static inline int break_lease(struct inode *inode, unsigned int mode)
|
|||
|
||||
static inline int break_deleg(struct inode *inode, unsigned int mode)
|
||||
{
|
||||
/*
|
||||
* Since this check is lockless, we must ensure that any refcounts
|
||||
* taken are done before checking inode->i_flock. Otherwise, we could
|
||||
* end up racing with tasks trying to set a new lease on this file.
|
||||
*/
|
||||
smp_mb();
|
||||
if (inode->i_flock)
|
||||
return __break_lease(inode, mode, FL_DELEG);
|
||||
return 0;
|
||||
|
|
@ -2404,20 +2417,18 @@ extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *);
|
|||
extern int generic_file_remap_pages(struct vm_area_struct *, unsigned long addr,
|
||||
unsigned long size, pgoff_t pgoff);
|
||||
int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk);
|
||||
extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t);
|
||||
extern ssize_t __generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long);
|
||||
extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t);
|
||||
extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *,
|
||||
unsigned long *, loff_t, size_t, size_t);
|
||||
extern ssize_t generic_file_read_iter(struct kiocb *, struct iov_iter *);
|
||||
extern ssize_t __generic_file_write_iter(struct kiocb *, struct iov_iter *);
|
||||
extern ssize_t generic_file_write_iter(struct kiocb *, struct iov_iter *);
|
||||
extern ssize_t generic_file_direct_write(struct kiocb *, struct iov_iter *, loff_t);
|
||||
extern ssize_t generic_perform_write(struct file *, struct iov_iter *, loff_t);
|
||||
extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos);
|
||||
extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos);
|
||||
extern int generic_segment_checks(const struct iovec *iov,
|
||||
unsigned long *nr_segs, size_t *count, int access_flags);
|
||||
extern ssize_t new_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos);
|
||||
extern ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos);
|
||||
|
||||
/* fs/block_dev.c */
|
||||
extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov,
|
||||
unsigned long nr_segs, loff_t pos);
|
||||
extern ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from);
|
||||
extern int blkdev_fsync(struct file *filp, loff_t start, loff_t end,
|
||||
int datasync);
|
||||
extern void block_sync_page(struct page *page);
|
||||
|
|
@ -2427,7 +2438,7 @@ extern ssize_t generic_file_splice_read(struct file *, loff_t *,
|
|||
struct pipe_inode_info *, size_t, unsigned int);
|
||||
extern ssize_t default_file_splice_read(struct file *, loff_t *,
|
||||
struct pipe_inode_info *, size_t, unsigned int);
|
||||
extern ssize_t generic_file_splice_write(struct pipe_inode_info *,
|
||||
extern ssize_t iter_file_splice_write(struct pipe_inode_info *,
|
||||
struct file *, loff_t *, size_t, unsigned int);
|
||||
extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe,
|
||||
struct file *out, loff_t *, size_t len, unsigned int flags);
|
||||
|
|
@ -2477,16 +2488,16 @@ enum {
|
|||
void dio_end_io(struct bio *bio, int error);
|
||||
|
||||
ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
|
||||
struct block_device *bdev, const struct iovec *iov, loff_t offset,
|
||||
unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
|
||||
struct block_device *bdev, struct iov_iter *iter, loff_t offset,
|
||||
get_block_t get_block, dio_iodone_t end_io,
|
||||
dio_submit_t submit_io, int flags);
|
||||
|
||||
static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb,
|
||||
struct inode *inode, const struct iovec *iov, loff_t offset,
|
||||
unsigned long nr_segs, get_block_t get_block)
|
||||
struct inode *inode, struct iov_iter *iter, loff_t offset,
|
||||
get_block_t get_block)
|
||||
{
|
||||
return __blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov,
|
||||
offset, nr_segs, get_block, NULL, NULL,
|
||||
return __blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iter,
|
||||
offset, get_block, NULL, NULL,
|
||||
DIO_LOCKING | DIO_SKIP_HOLES);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -62,9 +62,6 @@ typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip,
|
|||
* set in the flags member.
|
||||
*
|
||||
* ENABLED - set/unset when ftrace_ops is registered/unregistered
|
||||
* GLOBAL - set manualy by ftrace_ops user to denote the ftrace_ops
|
||||
* is part of the global tracers sharing the same filter
|
||||
* via set_ftrace_* debugfs files.
|
||||
* DYNAMIC - set when ftrace_ops is registered to denote dynamically
|
||||
* allocated ftrace_ops which need special care
|
||||
* CONTROL - set manualy by ftrace_ops user to denote the ftrace_ops
|
||||
|
|
@ -96,15 +93,14 @@ typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip,
|
|||
*/
|
||||
enum {
|
||||
FTRACE_OPS_FL_ENABLED = 1 << 0,
|
||||
FTRACE_OPS_FL_GLOBAL = 1 << 1,
|
||||
FTRACE_OPS_FL_DYNAMIC = 1 << 2,
|
||||
FTRACE_OPS_FL_CONTROL = 1 << 3,
|
||||
FTRACE_OPS_FL_SAVE_REGS = 1 << 4,
|
||||
FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED = 1 << 5,
|
||||
FTRACE_OPS_FL_RECURSION_SAFE = 1 << 6,
|
||||
FTRACE_OPS_FL_STUB = 1 << 7,
|
||||
FTRACE_OPS_FL_INITIALIZED = 1 << 8,
|
||||
FTRACE_OPS_FL_DELETED = 1 << 9,
|
||||
FTRACE_OPS_FL_DYNAMIC = 1 << 1,
|
||||
FTRACE_OPS_FL_CONTROL = 1 << 2,
|
||||
FTRACE_OPS_FL_SAVE_REGS = 1 << 3,
|
||||
FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED = 1 << 4,
|
||||
FTRACE_OPS_FL_RECURSION_SAFE = 1 << 5,
|
||||
FTRACE_OPS_FL_STUB = 1 << 6,
|
||||
FTRACE_OPS_FL_INITIALIZED = 1 << 7,
|
||||
FTRACE_OPS_FL_DELETED = 1 << 8,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -366,14 +362,12 @@ enum {
|
|||
* IGNORE - The function is already what we want it to be
|
||||
* MAKE_CALL - Start tracing the function
|
||||
* MODIFY_CALL - Stop saving regs for the function
|
||||
* MODIFY_CALL_REGS - Start saving regs for the function
|
||||
* MAKE_NOP - Stop tracing the function
|
||||
*/
|
||||
enum {
|
||||
FTRACE_UPDATE_IGNORE,
|
||||
FTRACE_UPDATE_MAKE_CALL,
|
||||
FTRACE_UPDATE_MODIFY_CALL,
|
||||
FTRACE_UPDATE_MODIFY_CALL_REGS,
|
||||
FTRACE_UPDATE_MAKE_NOP,
|
||||
};
|
||||
|
||||
|
|
@ -404,6 +398,8 @@ int ftrace_update_record(struct dyn_ftrace *rec, int enable);
|
|||
int ftrace_test_record(struct dyn_ftrace *rec, int enable);
|
||||
void ftrace_run_stop_machine(int command);
|
||||
unsigned long ftrace_location(unsigned long ip);
|
||||
unsigned long ftrace_get_addr_new(struct dyn_ftrace *rec);
|
||||
unsigned long ftrace_get_addr_curr(struct dyn_ftrace *rec);
|
||||
|
||||
extern ftrace_func_t ftrace_trace_function;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@ const char *ftrace_print_symbols_seq_u64(struct trace_seq *p,
|
|||
*symbol_array);
|
||||
#endif
|
||||
|
||||
const char *ftrace_print_bitmask_seq(struct trace_seq *p, void *bitmask_ptr,
|
||||
unsigned int bitmask_size);
|
||||
|
||||
const char *ftrace_print_hex_seq(struct trace_seq *p,
|
||||
const unsigned char *buf, int len);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,29 +3,53 @@
|
|||
|
||||
struct device;
|
||||
|
||||
/**
|
||||
* struct gpio_keys_button - configuration parameters
|
||||
* @code: input event code (KEY_*, SW_*)
|
||||
* @gpio: %-1 if this key does not support gpio
|
||||
* @active_low: %true indicates that button is considered
|
||||
* depressed when gpio is low
|
||||
* @desc: label that will be attached to button's gpio
|
||||
* @type: input event type (%EV_KEY, %EV_SW, %EV_ABS)
|
||||
* @wakeup: configure the button as a wake-up source
|
||||
* @debounce_interval: debounce ticks interval in msecs
|
||||
* @can_disable: %true indicates that userspace is allowed to
|
||||
* disable button via sysfs
|
||||
* @value: axis value for %EV_ABS
|
||||
* @irq: Irq number in case of interrupt keys
|
||||
*/
|
||||
struct gpio_keys_button {
|
||||
/* Configuration parameters */
|
||||
unsigned int code; /* input event code (KEY_*, SW_*) */
|
||||
int gpio; /* -1 if this key does not support gpio */
|
||||
unsigned int code;
|
||||
int gpio;
|
||||
int active_low;
|
||||
const char *desc;
|
||||
unsigned int type; /* input event type (EV_KEY, EV_SW, EV_ABS) */
|
||||
int wakeup; /* configure the button as a wake-up source */
|
||||
int debounce_interval; /* debounce ticks interval in msecs */
|
||||
unsigned int type;
|
||||
int wakeup;
|
||||
int debounce_interval;
|
||||
bool can_disable;
|
||||
int value; /* axis value for EV_ABS */
|
||||
unsigned int irq; /* Irq number in case of interrupt keys */
|
||||
int value;
|
||||
unsigned int irq;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct gpio_keys_platform_data - platform data for gpio_keys driver
|
||||
* @buttons: pointer to array of &gpio_keys_button structures
|
||||
* describing buttons attached to the device
|
||||
* @nbuttons: number of elements in @buttons array
|
||||
* @poll_interval: polling interval in msecs - for polling driver only
|
||||
* @rep: enable input subsystem auto repeat
|
||||
* @enable: platform hook for enabling the device
|
||||
* @disable: platform hook for disabling the device
|
||||
* @name: input device name
|
||||
*/
|
||||
struct gpio_keys_platform_data {
|
||||
struct gpio_keys_button *buttons;
|
||||
int nbuttons;
|
||||
unsigned int poll_interval; /* polling interval in msecs -
|
||||
for polling driver only */
|
||||
unsigned int rep:1; /* enable input subsystem auto repeat */
|
||||
unsigned int poll_interval;
|
||||
unsigned int rep:1;
|
||||
int (*enable)(struct device *dev);
|
||||
void (*disable)(struct device *dev);
|
||||
const char *name; /* input device name */
|
||||
const char *name;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -15,35 +15,14 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* For key_map array */
|
||||
#define MXT_NUM_GPIO 4
|
||||
|
||||
/* Orient */
|
||||
#define MXT_NORMAL 0x0
|
||||
#define MXT_DIAGONAL 0x1
|
||||
#define MXT_HORIZONTAL_FLIP 0x2
|
||||
#define MXT_ROTATED_90_COUNTER 0x3
|
||||
#define MXT_VERTICAL_FLIP 0x4
|
||||
#define MXT_ROTATED_90 0x5
|
||||
#define MXT_ROTATED_180 0x6
|
||||
#define MXT_DIAGONAL_COUNTER 0x7
|
||||
|
||||
/* The platform data for the Atmel maXTouch touchscreen driver */
|
||||
struct mxt_platform_data {
|
||||
const u8 *config;
|
||||
size_t config_length;
|
||||
|
||||
unsigned int x_line;
|
||||
unsigned int y_line;
|
||||
unsigned int x_size;
|
||||
unsigned int y_size;
|
||||
unsigned int blen;
|
||||
unsigned int threshold;
|
||||
unsigned int voltage;
|
||||
unsigned char orient;
|
||||
u32 config_crc;
|
||||
unsigned long irqflags;
|
||||
bool is_tp;
|
||||
const unsigned int key_map[MXT_NUM_GPIO];
|
||||
u8 t19_num_keys;
|
||||
const unsigned int *t19_keymap;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_ATMEL_MXT_TS_H */
|
||||
|
|
|
|||
|
|
@ -498,7 +498,10 @@ static inline int twl6030_mmc_card_detect(struct device *dev, int slot)
|
|||
#define RES_GRP_ALL 0x7 /* All resource groups */
|
||||
|
||||
#define RES_TYPE2_R0 0x0
|
||||
#define RES_TYPE2_R1 0x1
|
||||
#define RES_TYPE2_R2 0x2
|
||||
|
||||
#define RES_TYPE_R0 0x0
|
||||
#define RES_TYPE_ALL 0x7
|
||||
|
||||
/* Resource states */
|
||||
|
|
@ -671,6 +674,7 @@ struct twl4030_power_data {
|
|||
struct twl4030_script **scripts;
|
||||
unsigned num;
|
||||
struct twl4030_resconfig *resource_config;
|
||||
struct twl4030_resconfig *board_config;
|
||||
#define TWL4030_RESCONFIG_UNDEF ((u8)-1)
|
||||
bool use_poweroff; /* Board is wired for TWL poweroff */
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1711,6 +1711,7 @@ enum ieee80211_eid {
|
|||
WLAN_EID_RRM_ENABLED_CAPABILITIES = 70,
|
||||
WLAN_EID_MULTIPLE_BSSID = 71,
|
||||
WLAN_EID_BSS_COEX_2040 = 72,
|
||||
WLAN_EID_BSS_INTOLERANT_CHL_REPORT = 73,
|
||||
WLAN_EID_OVERLAP_BSS_SCAN_PARAM = 74,
|
||||
WLAN_EID_RIC_DESCRIPTOR = 75,
|
||||
WLAN_EID_MMIE = 76,
|
||||
|
|
|
|||
|
|
@ -16,9 +16,28 @@
|
|||
#include <linux/netdevice.h>
|
||||
#include <uapi/linux/if_bridge.h>
|
||||
|
||||
struct br_ip {
|
||||
union {
|
||||
__be32 ip4;
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
struct in6_addr ip6;
|
||||
#endif
|
||||
} u;
|
||||
__be16 proto;
|
||||
__u16 vid;
|
||||
};
|
||||
|
||||
struct br_ip_list {
|
||||
struct list_head list;
|
||||
struct br_ip addr;
|
||||
};
|
||||
|
||||
extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *));
|
||||
|
||||
typedef int br_should_route_hook_t(struct sk_buff *skb);
|
||||
extern br_should_route_hook_t __rcu *br_should_route_hook;
|
||||
int br_multicast_list_adjacent(struct net_device *dev,
|
||||
struct list_head *br_ip_list);
|
||||
bool br_multicast_has_querier_adjacent(struct net_device *dev, int proto);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -10,8 +10,9 @@ struct ifla_vf_info {
|
|||
__u8 mac[32];
|
||||
__u32 vlan;
|
||||
__u32 qos;
|
||||
__u32 tx_rate;
|
||||
__u32 spoofchk;
|
||||
__u32 linkstate;
|
||||
__u32 min_tx_rate;
|
||||
__u32 max_tx_rate;
|
||||
};
|
||||
#endif /* _LINUX_IF_LINK_H */
|
||||
|
|
|
|||
|
|
@ -57,6 +57,9 @@ struct macvlan_dev {
|
|||
netdev_features_t tap_features;
|
||||
int minor;
|
||||
int nest_level;
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
struct netpoll *netpoll;
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void macvlan_count_rx(const struct macvlan_dev *vlan,
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ struct vlan_pcpu_stats {
|
|||
|
||||
#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
|
||||
|
||||
extern struct net_device *__vlan_find_dev_deep(struct net_device *real_dev,
|
||||
extern struct net_device *__vlan_find_dev_deep_rcu(struct net_device *real_dev,
|
||||
__be16 vlan_proto, u16 vlan_id);
|
||||
extern struct net_device *vlan_dev_real_dev(const struct net_device *dev);
|
||||
extern u16 vlan_dev_vlan_id(const struct net_device *dev);
|
||||
|
|
@ -206,7 +206,7 @@ static inline int vlan_get_encap_level(struct net_device *dev)
|
|||
}
|
||||
#else
|
||||
static inline struct net_device *
|
||||
__vlan_find_dev_deep(struct net_device *real_dev,
|
||||
__vlan_find_dev_deep_rcu(struct net_device *real_dev,
|
||||
__be16 vlan_proto, u16 vlan_id)
|
||||
{
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -48,9 +48,12 @@ struct input_polled_dev {
|
|||
|
||||
/* private: */
|
||||
struct delayed_work work;
|
||||
|
||||
bool devres_managed;
|
||||
};
|
||||
|
||||
struct input_polled_dev *input_allocate_polled_device(void);
|
||||
struct input_polled_dev *devm_input_allocate_polled_device(struct device *dev);
|
||||
void input_free_polled_device(struct input_polled_dev *dev);
|
||||
int input_register_polled_device(struct input_polled_dev *dev);
|
||||
void input_unregister_polled_device(struct input_polled_dev *dev);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,52 @@
|
|||
#ifndef _PIXCIR_I2C_TS_H
|
||||
#define _PIXCIR_I2C_TS_H
|
||||
|
||||
/*
|
||||
* Register map
|
||||
*/
|
||||
#define PIXCIR_REG_POWER_MODE 51
|
||||
#define PIXCIR_REG_INT_MODE 52
|
||||
|
||||
/*
|
||||
* Power modes:
|
||||
* active: max scan speed
|
||||
* idle: lower scan speed with automatic transition to active on touch
|
||||
* halt: datasheet says sleep but this is more like halt as the chip
|
||||
* clocks are cut and it can only be brought out of this mode
|
||||
* using the RESET pin.
|
||||
*/
|
||||
enum pixcir_power_mode {
|
||||
PIXCIR_POWER_ACTIVE,
|
||||
PIXCIR_POWER_IDLE,
|
||||
PIXCIR_POWER_HALT,
|
||||
};
|
||||
|
||||
#define PIXCIR_POWER_MODE_MASK 0x03
|
||||
#define PIXCIR_POWER_ALLOW_IDLE (1UL << 2)
|
||||
|
||||
/*
|
||||
* Interrupt modes:
|
||||
* periodical: interrupt is asserted periodicaly
|
||||
* diff coordinates: interrupt is asserted when coordinates change
|
||||
* level on touch: interrupt level asserted during touch
|
||||
* pulse on touch: interrupt pulse asserted druing touch
|
||||
*
|
||||
*/
|
||||
enum pixcir_int_mode {
|
||||
PIXCIR_INT_PERIODICAL,
|
||||
PIXCIR_INT_DIFF_COORD,
|
||||
PIXCIR_INT_LEVEL_TOUCH,
|
||||
PIXCIR_INT_PULSE_TOUCH,
|
||||
};
|
||||
|
||||
#define PIXCIR_INT_MODE_MASK 0x03
|
||||
#define PIXCIR_INT_ENABLE (1UL << 3)
|
||||
#define PIXCIR_INT_POL_HIGH (1UL << 2)
|
||||
|
||||
struct pixcir_ts_platform_data {
|
||||
int (*attb_read_val)(void);
|
||||
int x_max;
|
||||
int y_max;
|
||||
int gpio_attb; /* GPIO connected to ATTB line */
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
22
include/linux/input/touchscreen.h
Normal file
22
include/linux/input/touchscreen.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2014 Sebastian Reichel <sre@kernel.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 as published by
|
||||
* the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef _TOUCHSCREEN_H
|
||||
#define _TOUCHSCREEN_H
|
||||
|
||||
#include <linux/input.h>
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
void touchscreen_parse_of_params(struct input_dev *dev);
|
||||
#else
|
||||
static inline void touchscreen_parse_of_params(struct input_dev *dev)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -164,11 +164,6 @@ unsigned capi_cmsg_header(_cmsg * cmsg, __u16 _ApplId,
|
|||
__u8 _Command, __u8 _Subcommand,
|
||||
__u16 _Messagenumber, __u32 _Controller);
|
||||
|
||||
/*
|
||||
* capi_info2str generated a readable string for Capi2.0 reasons.
|
||||
*/
|
||||
char *capi_info2str(__u16 reason);
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ struct kernfs_elem_attr {
|
|||
const struct kernfs_ops *ops;
|
||||
struct kernfs_open_node *open;
|
||||
loff_t size;
|
||||
struct kernfs_node *notify_next; /* for kernfs_notify() */
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -304,6 +305,7 @@ struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags,
|
|||
struct kernfs_root *root, unsigned long magic,
|
||||
bool *new_sb_created, const void *ns);
|
||||
void kernfs_kill_sb(struct super_block *sb);
|
||||
struct super_block *kernfs_pin_sb(struct kernfs_root *root, const void *ns);
|
||||
|
||||
void kernfs_init(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -309,6 +309,17 @@ static inline key_serial_t key_serial(const struct key *key)
|
|||
|
||||
extern void key_set_timeout(struct key *, unsigned);
|
||||
|
||||
/*
|
||||
* The permissions required on a key that we're looking up.
|
||||
*/
|
||||
#define KEY_NEED_VIEW 0x01 /* Require permission to view attributes */
|
||||
#define KEY_NEED_READ 0x02 /* Require permission to read content */
|
||||
#define KEY_NEED_WRITE 0x04 /* Require permission to update / modify */
|
||||
#define KEY_NEED_SEARCH 0x08 /* Require permission to search (keyring) or find (key) */
|
||||
#define KEY_NEED_LINK 0x10 /* Require permission to link */
|
||||
#define KEY_NEED_SETATTR 0x20 /* Require permission to change attributes */
|
||||
#define KEY_NEED_ALL 0x3f /* All the above permissions */
|
||||
|
||||
/**
|
||||
* key_is_instantiated - Determine if a key has been positively instantiated
|
||||
* @key: The key to check.
|
||||
|
|
|
|||
|
|
@ -205,10 +205,10 @@ struct kretprobe_blackpoint {
|
|||
void *addr;
|
||||
};
|
||||
|
||||
struct kprobe_blackpoint {
|
||||
const char *name;
|
||||
struct kprobe_blacklist_entry {
|
||||
struct list_head list;
|
||||
unsigned long start_addr;
|
||||
unsigned long range;
|
||||
unsigned long end_addr;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_KPROBES
|
||||
|
|
@ -265,6 +265,7 @@ extern void arch_disarm_kprobe(struct kprobe *p);
|
|||
extern int arch_init_kprobes(void);
|
||||
extern void show_registers(struct pt_regs *regs);
|
||||
extern void kprobes_inc_nmissed_count(struct kprobe *p);
|
||||
extern bool arch_within_kprobe_blacklist(unsigned long addr);
|
||||
|
||||
struct kprobe_insn_cache {
|
||||
struct mutex mutex;
|
||||
|
|
@ -355,7 +356,7 @@ static inline void reset_current_kprobe(void)
|
|||
|
||||
static inline struct kprobe_ctlblk *get_kprobe_ctlblk(void)
|
||||
{
|
||||
return (&__get_cpu_var(kprobe_ctlblk));
|
||||
return this_cpu_ptr(&kprobe_ctlblk);
|
||||
}
|
||||
|
||||
int register_kprobe(struct kprobe *p);
|
||||
|
|
@ -476,4 +477,18 @@ static inline int enable_jprobe(struct jprobe *jp)
|
|||
return enable_kprobe(&jp->kp);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_KPROBES
|
||||
/*
|
||||
* Blacklist ganerating macro. Specify functions which is not probed
|
||||
* by using this macro.
|
||||
*/
|
||||
#define __NOKPROBE_SYMBOL(fname) \
|
||||
static unsigned long __used \
|
||||
__attribute__((section("_kprobe_blacklist"))) \
|
||||
_kbl_addr_##fname = (unsigned long)fname;
|
||||
#define NOKPROBE_SYMBOL(fname) __NOKPROBE_SYMBOL(fname)
|
||||
#else
|
||||
#define NOKPROBE_SYMBOL(fname)
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_KPROBES_H */
|
||||
|
|
|
|||
|
|
@ -304,6 +304,30 @@ static inline int ktime_compare(const ktime_t cmp1, const ktime_t cmp2)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ktime_after - Compare if a ktime_t value is bigger than another one.
|
||||
* @cmp1: comparable1
|
||||
* @cmp2: comparable2
|
||||
*
|
||||
* Return: true if cmp1 happened after cmp2.
|
||||
*/
|
||||
static inline bool ktime_after(const ktime_t cmp1, const ktime_t cmp2)
|
||||
{
|
||||
return ktime_compare(cmp1, cmp2) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ktime_before - Compare if a ktime_t value is smaller than another one.
|
||||
* @cmp1: comparable1
|
||||
* @cmp2: comparable2
|
||||
*
|
||||
* Return: true if cmp1 happened before cmp2.
|
||||
*/
|
||||
static inline bool ktime_before(const ktime_t cmp1, const ktime_t cmp2)
|
||||
{
|
||||
return ktime_compare(cmp1, cmp2) < 0;
|
||||
}
|
||||
|
||||
static inline s64 ktime_to_us(const ktime_t kt)
|
||||
{
|
||||
struct timeval tv = ktime_to_timeval(kt);
|
||||
|
|
|
|||
|
|
@ -586,7 +586,7 @@ void mark_page_dirty(struct kvm *kvm, gfn_t gfn);
|
|||
|
||||
void kvm_vcpu_block(struct kvm_vcpu *vcpu);
|
||||
void kvm_vcpu_kick(struct kvm_vcpu *vcpu);
|
||||
bool kvm_vcpu_yield_to(struct kvm_vcpu *target);
|
||||
int kvm_vcpu_yield_to(struct kvm_vcpu *target);
|
||||
void kvm_vcpu_on_spin(struct kvm_vcpu *vcpu);
|
||||
void kvm_load_guest_fpu(struct kvm_vcpu *vcpu);
|
||||
void kvm_put_guest_fpu(struct kvm_vcpu *vcpu);
|
||||
|
|
|
|||
|
|
@ -17,13 +17,13 @@
|
|||
#include <linux/fs.h>
|
||||
#include <linux/kref.h>
|
||||
#include <linux/utsname.h>
|
||||
#include <linux/nfsd/nfsfh.h>
|
||||
#include <linux/lockd/bind.h>
|
||||
#include <linux/lockd/xdr.h>
|
||||
#ifdef CONFIG_LOCKD_V4
|
||||
#include <linux/lockd/xdr4.h>
|
||||
#endif
|
||||
#include <linux/lockd/debug.h>
|
||||
#include <linux/sunrpc/svc.h>
|
||||
|
||||
/*
|
||||
* Version string
|
||||
|
|
|
|||
|
|
@ -18,38 +18,38 @@
|
|||
#ifndef __LINUX_MFD_SEC_RTC_H
|
||||
#define __LINUX_MFD_SEC_RTC_H
|
||||
|
||||
enum sec_rtc_reg {
|
||||
SEC_RTC_SEC,
|
||||
SEC_RTC_MIN,
|
||||
SEC_RTC_HOUR,
|
||||
SEC_RTC_WEEKDAY,
|
||||
SEC_RTC_DATE,
|
||||
SEC_RTC_MONTH,
|
||||
SEC_RTC_YEAR1,
|
||||
SEC_RTC_YEAR2,
|
||||
SEC_ALARM0_SEC,
|
||||
SEC_ALARM0_MIN,
|
||||
SEC_ALARM0_HOUR,
|
||||
SEC_ALARM0_WEEKDAY,
|
||||
SEC_ALARM0_DATE,
|
||||
SEC_ALARM0_MONTH,
|
||||
SEC_ALARM0_YEAR1,
|
||||
SEC_ALARM0_YEAR2,
|
||||
SEC_ALARM1_SEC,
|
||||
SEC_ALARM1_MIN,
|
||||
SEC_ALARM1_HOUR,
|
||||
SEC_ALARM1_WEEKDAY,
|
||||
SEC_ALARM1_DATE,
|
||||
SEC_ALARM1_MONTH,
|
||||
SEC_ALARM1_YEAR1,
|
||||
SEC_ALARM1_YEAR2,
|
||||
SEC_ALARM0_CONF,
|
||||
SEC_ALARM1_CONF,
|
||||
SEC_RTC_STATUS,
|
||||
SEC_WTSR_SMPL_CNTL,
|
||||
SEC_RTC_UDR_CON,
|
||||
enum s5m_rtc_reg {
|
||||
S5M_RTC_SEC,
|
||||
S5M_RTC_MIN,
|
||||
S5M_RTC_HOUR,
|
||||
S5M_RTC_WEEKDAY,
|
||||
S5M_RTC_DATE,
|
||||
S5M_RTC_MONTH,
|
||||
S5M_RTC_YEAR1,
|
||||
S5M_RTC_YEAR2,
|
||||
S5M_ALARM0_SEC,
|
||||
S5M_ALARM0_MIN,
|
||||
S5M_ALARM0_HOUR,
|
||||
S5M_ALARM0_WEEKDAY,
|
||||
S5M_ALARM0_DATE,
|
||||
S5M_ALARM0_MONTH,
|
||||
S5M_ALARM0_YEAR1,
|
||||
S5M_ALARM0_YEAR2,
|
||||
S5M_ALARM1_SEC,
|
||||
S5M_ALARM1_MIN,
|
||||
S5M_ALARM1_HOUR,
|
||||
S5M_ALARM1_WEEKDAY,
|
||||
S5M_ALARM1_DATE,
|
||||
S5M_ALARM1_MONTH,
|
||||
S5M_ALARM1_YEAR1,
|
||||
S5M_ALARM1_YEAR2,
|
||||
S5M_ALARM0_CONF,
|
||||
S5M_ALARM1_CONF,
|
||||
S5M_RTC_STATUS,
|
||||
S5M_WTSR_SMPL_CNTL,
|
||||
S5M_RTC_UDR_CON,
|
||||
|
||||
SEC_RTC_REG_MAX,
|
||||
S5M_RTC_REG_MAX,
|
||||
};
|
||||
|
||||
enum s2mps_rtc_reg {
|
||||
|
|
@ -88,9 +88,9 @@ enum s2mps_rtc_reg {
|
|||
#define HOUR_12 (1 << 7)
|
||||
#define HOUR_AMPM (1 << 6)
|
||||
#define HOUR_PM (1 << 5)
|
||||
#define ALARM0_STATUS (1 << 1)
|
||||
#define ALARM1_STATUS (1 << 2)
|
||||
#define UPDATE_AD (1 << 0)
|
||||
#define S5M_ALARM0_STATUS (1 << 1)
|
||||
#define S5M_ALARM1_STATUS (1 << 2)
|
||||
#define S5M_UPDATE_AD (1 << 0)
|
||||
|
||||
#define S2MPS_ALARM0_STATUS (1 << 2)
|
||||
#define S2MPS_ALARM1_STATUS (1 << 1)
|
||||
|
|
@ -101,16 +101,26 @@ enum s2mps_rtc_reg {
|
|||
#define MODEL24_SHIFT 1
|
||||
#define MODEL24_MASK (1 << MODEL24_SHIFT)
|
||||
/* RTC Update Register1 */
|
||||
#define RTC_UDR_SHIFT 0
|
||||
#define RTC_UDR_MASK (1 << RTC_UDR_SHIFT)
|
||||
#define S5M_RTC_UDR_SHIFT 0
|
||||
#define S5M_RTC_UDR_MASK (1 << S5M_RTC_UDR_SHIFT)
|
||||
#define S2MPS_RTC_WUDR_SHIFT 4
|
||||
#define S2MPS_RTC_WUDR_MASK (1 << S2MPS_RTC_WUDR_SHIFT)
|
||||
#define S2MPS_RTC_RUDR_SHIFT 0
|
||||
#define S2MPS_RTC_RUDR_MASK (1 << S2MPS_RTC_RUDR_SHIFT)
|
||||
#define RTC_TCON_SHIFT 1
|
||||
#define RTC_TCON_MASK (1 << RTC_TCON_SHIFT)
|
||||
#define RTC_TIME_EN_SHIFT 3
|
||||
#define RTC_TIME_EN_MASK (1 << RTC_TIME_EN_SHIFT)
|
||||
#define S5M_RTC_TIME_EN_SHIFT 3
|
||||
#define S5M_RTC_TIME_EN_MASK (1 << S5M_RTC_TIME_EN_SHIFT)
|
||||
/*
|
||||
* UDR_T field in S5M_RTC_UDR_CON register determines the time needed
|
||||
* for updating alarm and time registers. Default is 7.32 ms.
|
||||
*/
|
||||
#define S5M_RTC_UDR_T_SHIFT 6
|
||||
#define S5M_RTC_UDR_T_MASK (0x3 << S5M_RTC_UDR_T_SHIFT)
|
||||
#define S5M_RTC_UDR_T_7320_US (0x0 << S5M_RTC_UDR_T_SHIFT)
|
||||
#define S5M_RTC_UDR_T_1830_US (0x1 << S5M_RTC_UDR_T_SHIFT)
|
||||
#define S5M_RTC_UDR_T_3660_US (0x2 << S5M_RTC_UDR_T_SHIFT)
|
||||
#define S5M_RTC_UDR_T_450_US (0x3 << S5M_RTC_UDR_T_SHIFT)
|
||||
|
||||
/* RTC Hour register */
|
||||
#define HOUR_PM_SHIFT 6
|
||||
|
|
|
|||
|
|
@ -401,6 +401,7 @@ struct mlx4_caps {
|
|||
int max_rq_desc_sz;
|
||||
int max_qp_init_rdma;
|
||||
int max_qp_dest_rdma;
|
||||
u32 *qp0_qkey;
|
||||
u32 *qp0_proxy;
|
||||
u32 *qp1_proxy;
|
||||
u32 *qp0_tunnel;
|
||||
|
|
@ -449,7 +450,6 @@ struct mlx4_caps {
|
|||
int reserved_qps_base[MLX4_NUM_QP_REGION];
|
||||
int log_num_macs;
|
||||
int log_num_vlans;
|
||||
int log_num_prios;
|
||||
enum mlx4_port_type port_type[MLX4_MAX_PORTS + 1];
|
||||
u8 supported_type[MLX4_MAX_PORTS + 1];
|
||||
u8 suggested_type[MLX4_MAX_PORTS + 1];
|
||||
|
|
@ -577,6 +577,9 @@ struct mlx4_cq {
|
|||
|
||||
u32 cons_index;
|
||||
|
||||
u16 irq;
|
||||
bool irq_affinity_change;
|
||||
|
||||
__be32 *set_ci_db;
|
||||
__be32 *arm_db;
|
||||
int arm_sn;
|
||||
|
|
@ -837,7 +840,7 @@ static inline int mlx4_is_slave(struct mlx4_dev *dev)
|
|||
}
|
||||
|
||||
int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
|
||||
struct mlx4_buf *buf);
|
||||
struct mlx4_buf *buf, gfp_t gfp);
|
||||
void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf);
|
||||
static inline void *mlx4_buf_offset(struct mlx4_buf *buf, int offset)
|
||||
{
|
||||
|
|
@ -874,9 +877,10 @@ int mlx4_mw_enable(struct mlx4_dev *dev, struct mlx4_mw *mw);
|
|||
int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
|
||||
int start_index, int npages, u64 *page_list);
|
||||
int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
|
||||
struct mlx4_buf *buf);
|
||||
struct mlx4_buf *buf, gfp_t gfp);
|
||||
|
||||
int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order);
|
||||
int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order,
|
||||
gfp_t gfp);
|
||||
void mlx4_db_free(struct mlx4_dev *dev, struct mlx4_db *db);
|
||||
|
||||
int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres,
|
||||
|
|
@ -892,7 +896,8 @@ void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq);
|
|||
int mlx4_qp_reserve_range(struct mlx4_dev *dev, int cnt, int align, int *base);
|
||||
void mlx4_qp_release_range(struct mlx4_dev *dev, int base_qpn, int cnt);
|
||||
|
||||
int mlx4_qp_alloc(struct mlx4_dev *dev, int qpn, struct mlx4_qp *qp);
|
||||
int mlx4_qp_alloc(struct mlx4_dev *dev, int qpn, struct mlx4_qp *qp,
|
||||
gfp_t gfp);
|
||||
void mlx4_qp_free(struct mlx4_dev *dev, struct mlx4_qp *qp);
|
||||
|
||||
int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, u32 cqn, u16 xrcdn,
|
||||
|
|
@ -1234,4 +1239,8 @@ int mlx4_phys_to_slave_port(struct mlx4_dev *dev, int slave, int port);
|
|||
int mlx4_get_base_gid_ix(struct mlx4_dev *dev, int slave, int port);
|
||||
|
||||
int mlx4_config_vxlan_port(struct mlx4_dev *dev, __be16 udp_port);
|
||||
int mlx4_vf_smi_enabled(struct mlx4_dev *dev, int slave, int port);
|
||||
int mlx4_vf_get_enable_smi_admin(struct mlx4_dev *dev, int slave, int port);
|
||||
int mlx4_vf_set_enable_smi_admin(struct mlx4_dev *dev, int slave, int port,
|
||||
int enable);
|
||||
#endif /* MLX4_DEVICE_H */
|
||||
|
|
|
|||
|
|
@ -427,7 +427,6 @@ struct mlx5_core_mr {
|
|||
u64 size;
|
||||
u32 key;
|
||||
u32 pd;
|
||||
u32 access;
|
||||
};
|
||||
|
||||
struct mlx5_core_srq {
|
||||
|
|
|
|||
|
|
@ -63,12 +63,12 @@ struct mmc_ext_csd {
|
|||
unsigned int power_off_longtime; /* Units: ms */
|
||||
u8 power_off_notification; /* state */
|
||||
unsigned int hs_max_dtr;
|
||||
unsigned int hs200_max_dtr;
|
||||
#define MMC_HIGH_26_MAX_DTR 26000000
|
||||
#define MMC_HIGH_52_MAX_DTR 52000000
|
||||
#define MMC_HIGH_DDR_MAX_DTR 52000000
|
||||
#define MMC_HS200_MAX_DTR 200000000
|
||||
unsigned int sectors;
|
||||
unsigned int card_type;
|
||||
unsigned int hc_erase_size; /* In sectors */
|
||||
unsigned int hc_erase_timeout; /* In milliseconds */
|
||||
unsigned int sec_trim_mult; /* Secure trim multiplier */
|
||||
|
|
@ -110,6 +110,7 @@ struct mmc_ext_csd {
|
|||
u8 raw_pwr_cl_200_360; /* 237 */
|
||||
u8 raw_pwr_cl_ddr_52_195; /* 238 */
|
||||
u8 raw_pwr_cl_ddr_52_360; /* 239 */
|
||||
u8 raw_pwr_cl_ddr_200_360; /* 253 */
|
||||
u8 raw_bkops_status; /* 246 */
|
||||
u8 raw_sectors[4]; /* 212 - 4 bytes */
|
||||
|
||||
|
|
@ -194,6 +195,7 @@ struct sdio_cis {
|
|||
};
|
||||
|
||||
struct mmc_host;
|
||||
struct mmc_ios;
|
||||
struct sdio_func;
|
||||
struct sdio_func_tuple;
|
||||
|
||||
|
|
@ -250,15 +252,11 @@ struct mmc_card {
|
|||
unsigned int state; /* (our) card state */
|
||||
#define MMC_STATE_PRESENT (1<<0) /* present in sysfs */
|
||||
#define MMC_STATE_READONLY (1<<1) /* card is read-only */
|
||||
#define MMC_STATE_HIGHSPEED (1<<2) /* card is in high speed mode */
|
||||
#define MMC_STATE_BLOCKADDR (1<<3) /* card uses block-addressing */
|
||||
#define MMC_STATE_HIGHSPEED_DDR (1<<4) /* card is in high speed mode */
|
||||
#define MMC_STATE_ULTRAHIGHSPEED (1<<5) /* card is in ultra high speed mode */
|
||||
#define MMC_CARD_SDXC (1<<6) /* card is SDXC */
|
||||
#define MMC_CARD_REMOVED (1<<7) /* card has been removed */
|
||||
#define MMC_STATE_HIGHSPEED_200 (1<<8) /* card is in HS200 mode */
|
||||
#define MMC_STATE_DOING_BKOPS (1<<10) /* card is doing BKOPS */
|
||||
#define MMC_STATE_SUSPENDED (1<<11) /* card is suspended */
|
||||
#define MMC_STATE_BLOCKADDR (1<<2) /* card uses block-addressing */
|
||||
#define MMC_CARD_SDXC (1<<3) /* card is SDXC */
|
||||
#define MMC_CARD_REMOVED (1<<4) /* card has been removed */
|
||||
#define MMC_STATE_DOING_BKOPS (1<<5) /* card is doing BKOPS */
|
||||
#define MMC_STATE_SUSPENDED (1<<6) /* card is suspended */
|
||||
unsigned int quirks; /* card quirks */
|
||||
#define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */
|
||||
#define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1) /* use func->cur_blksize */
|
||||
|
|
@ -301,6 +299,7 @@ struct mmc_card {
|
|||
struct sdio_func_tuple *tuples; /* unknown common tuples */
|
||||
|
||||
unsigned int sd_bus_speed; /* Bus Speed Mode set for the card */
|
||||
unsigned int mmc_avail_type; /* supported device type by both host and card */
|
||||
|
||||
struct dentry *debugfs_root;
|
||||
struct mmc_part part[MMC_NUM_PHY_PARTITION]; /* physical partitions */
|
||||
|
|
@ -353,7 +352,7 @@ struct mmc_fixup {
|
|||
#define CID_OEMID_ANY ((unsigned short) -1)
|
||||
#define CID_NAME_ANY (NULL)
|
||||
|
||||
#define END_FIXUP { 0 }
|
||||
#define END_FIXUP { NULL }
|
||||
|
||||
#define _FIXUP_EXT(_name, _manfid, _oemid, _rev_start, _rev_end, \
|
||||
_cis_vendor, _cis_device, \
|
||||
|
|
@ -418,11 +417,7 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data)
|
|||
|
||||
#define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT)
|
||||
#define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY)
|
||||
#define mmc_card_highspeed(c) ((c)->state & MMC_STATE_HIGHSPEED)
|
||||
#define mmc_card_hs200(c) ((c)->state & MMC_STATE_HIGHSPEED_200)
|
||||
#define mmc_card_blockaddr(c) ((c)->state & MMC_STATE_BLOCKADDR)
|
||||
#define mmc_card_ddr_mode(c) ((c)->state & MMC_STATE_HIGHSPEED_DDR)
|
||||
#define mmc_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED)
|
||||
#define mmc_card_ext_capacity(c) ((c)->state & MMC_CARD_SDXC)
|
||||
#define mmc_card_removed(c) ((c) && ((c)->state & MMC_CARD_REMOVED))
|
||||
#define mmc_card_doing_bkops(c) ((c)->state & MMC_STATE_DOING_BKOPS)
|
||||
|
|
@ -430,11 +425,7 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data)
|
|||
|
||||
#define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT)
|
||||
#define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY)
|
||||
#define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED)
|
||||
#define mmc_card_set_hs200(c) ((c)->state |= MMC_STATE_HIGHSPEED_200)
|
||||
#define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR)
|
||||
#define mmc_card_set_ddr_mode(c) ((c)->state |= MMC_STATE_HIGHSPEED_DDR)
|
||||
#define mmc_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED)
|
||||
#define mmc_card_set_ext_capacity(c) ((c)->state |= MMC_CARD_SDXC)
|
||||
#define mmc_card_set_removed(c) ((c)->state |= MMC_CARD_REMOVED)
|
||||
#define mmc_card_set_doing_bkops(c) ((c)->state |= MMC_STATE_DOING_BKOPS)
|
||||
|
|
|
|||
|
|
@ -248,20 +248,6 @@ struct dw_mci_board {
|
|||
/* delay in mS before detecting cards after interrupt */
|
||||
u32 detect_delay_ms;
|
||||
|
||||
int (*init)(u32 slot_id, irq_handler_t , void *);
|
||||
int (*get_ro)(u32 slot_id);
|
||||
int (*get_cd)(u32 slot_id);
|
||||
int (*get_ocr)(u32 slot_id);
|
||||
int (*get_bus_wd)(u32 slot_id);
|
||||
/*
|
||||
* Enable power to selected slot and set voltage to desired level.
|
||||
* Voltage levels are specified using MMC_VDD_xxx defines defined
|
||||
* in linux/mmc/host.h file.
|
||||
*/
|
||||
void (*setpower)(u32 slot_id, u32 volt);
|
||||
void (*exit)(u32 slot_id);
|
||||
void (*select_slot)(u32 slot_id);
|
||||
|
||||
struct dw_mci_dma_ops *dma_ops;
|
||||
struct dma_pdata *data;
|
||||
struct block_settings *blk_settings;
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
#include <linux/fault-inject.h>
|
||||
|
||||
#include <linux/mmc/core.h>
|
||||
#include <linux/mmc/card.h>
|
||||
#include <linux/mmc/pm.h>
|
||||
|
||||
struct mmc_ios {
|
||||
|
|
@ -58,13 +59,9 @@ struct mmc_ios {
|
|||
#define MMC_TIMING_UHS_SDR50 5
|
||||
#define MMC_TIMING_UHS_SDR104 6
|
||||
#define MMC_TIMING_UHS_DDR50 7
|
||||
#define MMC_TIMING_MMC_HS200 8
|
||||
|
||||
#define MMC_SDR_MODE 0
|
||||
#define MMC_1_2V_DDR_MODE 1
|
||||
#define MMC_1_8V_DDR_MODE 2
|
||||
#define MMC_1_2V_SDR_MODE 3
|
||||
#define MMC_1_8V_SDR_MODE 4
|
||||
#define MMC_TIMING_MMC_DDR52 8
|
||||
#define MMC_TIMING_MMC_HS200 9
|
||||
#define MMC_TIMING_MMC_HS400 10
|
||||
|
||||
unsigned char signal_voltage; /* signalling voltage (1.8V or 3.3V) */
|
||||
|
||||
|
|
@ -136,6 +133,9 @@ struct mmc_host_ops {
|
|||
|
||||
/* The tuning command opcode value is different for SD and eMMC cards */
|
||||
int (*execute_tuning)(struct mmc_host *host, u32 opcode);
|
||||
|
||||
/* Prepare HS400 target operating frequency depending host driver */
|
||||
int (*prepare_hs400_tuning)(struct mmc_host *host, struct mmc_ios *ios);
|
||||
int (*select_drive_strength)(unsigned int max_dtr, int host_drv, int card_drv);
|
||||
void (*hw_reset)(struct mmc_host *host);
|
||||
void (*card_event)(struct mmc_host *host);
|
||||
|
|
@ -278,6 +278,11 @@ struct mmc_host {
|
|||
#define MMC_CAP2_PACKED_CMD (MMC_CAP2_PACKED_RD | \
|
||||
MMC_CAP2_PACKED_WR)
|
||||
#define MMC_CAP2_NO_PRESCAN_POWERUP (1 << 14) /* Don't power up before scan */
|
||||
#define MMC_CAP2_HS400_1_8V (1 << 15) /* Can support HS400 1.8V */
|
||||
#define MMC_CAP2_HS400_1_2V (1 << 16) /* Can support HS400 1.2V */
|
||||
#define MMC_CAP2_HS400 (MMC_CAP2_HS400_1_8V | \
|
||||
MMC_CAP2_HS400_1_2V)
|
||||
#define MMC_CAP2_SDIO_IRQ_NOTHREAD (1 << 17)
|
||||
|
||||
mmc_pm_flag_t pm_caps; /* supported pm features */
|
||||
|
||||
|
|
@ -318,6 +323,8 @@ struct mmc_host {
|
|||
int rescan_disable; /* disable card detection */
|
||||
int rescan_entered; /* used with nonremovable devices */
|
||||
|
||||
bool trigger_card_event; /* card_event necessary */
|
||||
|
||||
struct mmc_card *card; /* device attached to this host */
|
||||
|
||||
wait_queue_head_t wq;
|
||||
|
|
@ -391,12 +398,13 @@ static inline void mmc_signal_sdio_irq(struct mmc_host *host)
|
|||
wake_up_process(host->sdio_irq_thread);
|
||||
}
|
||||
|
||||
void sdio_run_irqs(struct mmc_host *host);
|
||||
|
||||
#ifdef CONFIG_REGULATOR
|
||||
int mmc_regulator_get_ocrmask(struct regulator *supply);
|
||||
int mmc_regulator_set_ocr(struct mmc_host *mmc,
|
||||
struct regulator *supply,
|
||||
unsigned short vdd_bit);
|
||||
int mmc_regulator_get_supply(struct mmc_host *mmc);
|
||||
#else
|
||||
static inline int mmc_regulator_get_ocrmask(struct regulator *supply)
|
||||
{
|
||||
|
|
@ -409,13 +417,10 @@ static inline int mmc_regulator_set_ocr(struct mmc_host *mmc,
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int mmc_regulator_get_supply(struct mmc_host *mmc)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int mmc_regulator_get_supply(struct mmc_host *mmc);
|
||||
|
||||
int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *);
|
||||
|
||||
static inline int mmc_card_is_removable(struct mmc_host *host)
|
||||
|
|
@ -475,4 +480,32 @@ static inline unsigned int mmc_host_clk_rate(struct mmc_host *host)
|
|||
return host->ios.clock;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline int mmc_card_hs(struct mmc_card *card)
|
||||
{
|
||||
return card->host->ios.timing == MMC_TIMING_SD_HS ||
|
||||
card->host->ios.timing == MMC_TIMING_MMC_HS;
|
||||
}
|
||||
|
||||
static inline int mmc_card_uhs(struct mmc_card *card)
|
||||
{
|
||||
return card->host->ios.timing >= MMC_TIMING_UHS_SDR12 &&
|
||||
card->host->ios.timing <= MMC_TIMING_UHS_DDR50;
|
||||
}
|
||||
|
||||
static inline bool mmc_card_hs200(struct mmc_card *card)
|
||||
{
|
||||
return card->host->ios.timing == MMC_TIMING_MMC_HS200;
|
||||
}
|
||||
|
||||
static inline bool mmc_card_ddr52(struct mmc_card *card)
|
||||
{
|
||||
return card->host->ios.timing == MMC_TIMING_MMC_DDR52;
|
||||
}
|
||||
|
||||
static inline bool mmc_card_hs400(struct mmc_card *card)
|
||||
{
|
||||
return card->host->ios.timing == MMC_TIMING_MMC_HS400;
|
||||
}
|
||||
|
||||
#endif /* LINUX_MMC_HOST_H */
|
||||
|
|
|
|||
|
|
@ -325,6 +325,7 @@ struct _mmc_csd {
|
|||
#define EXT_CSD_POWER_OFF_LONG_TIME 247 /* RO */
|
||||
#define EXT_CSD_GENERIC_CMD6_TIME 248 /* RO */
|
||||
#define EXT_CSD_CACHE_SIZE 249 /* RO, 4 bytes */
|
||||
#define EXT_CSD_PWR_CL_DDR_200_360 253 /* RO */
|
||||
#define EXT_CSD_TAG_UNIT_SIZE 498 /* RO */
|
||||
#define EXT_CSD_DATA_TAG_SUPPORT 499 /* RO */
|
||||
#define EXT_CSD_MAX_PACKED_WRITES 500 /* RO */
|
||||
|
|
@ -354,18 +355,25 @@ struct _mmc_csd {
|
|||
#define EXT_CSD_CMD_SET_SECURE (1<<1)
|
||||
#define EXT_CSD_CMD_SET_CPSECURE (1<<2)
|
||||
|
||||
#define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */
|
||||
#define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */
|
||||
#define EXT_CSD_CARD_TYPE_MASK 0x3F /* Mask out reserved bits */
|
||||
#define EXT_CSD_CARD_TYPE_HS_26 (1<<0) /* Card can run at 26MHz */
|
||||
#define EXT_CSD_CARD_TYPE_HS_52 (1<<1) /* Card can run at 52MHz */
|
||||
#define EXT_CSD_CARD_TYPE_HS (EXT_CSD_CARD_TYPE_HS_26 | \
|
||||
EXT_CSD_CARD_TYPE_HS_52)
|
||||
#define EXT_CSD_CARD_TYPE_DDR_1_8V (1<<2) /* Card can run at 52MHz */
|
||||
/* DDR mode @1.8V or 3V I/O */
|
||||
#define EXT_CSD_CARD_TYPE_DDR_1_2V (1<<3) /* Card can run at 52MHz */
|
||||
/* DDR mode @1.2V I/O */
|
||||
#define EXT_CSD_CARD_TYPE_DDR_52 (EXT_CSD_CARD_TYPE_DDR_1_8V \
|
||||
| EXT_CSD_CARD_TYPE_DDR_1_2V)
|
||||
#define EXT_CSD_CARD_TYPE_SDR_1_8V (1<<4) /* Card can run at 200MHz */
|
||||
#define EXT_CSD_CARD_TYPE_SDR_1_2V (1<<5) /* Card can run at 200MHz */
|
||||
#define EXT_CSD_CARD_TYPE_HS200_1_8V (1<<4) /* Card can run at 200MHz */
|
||||
#define EXT_CSD_CARD_TYPE_HS200_1_2V (1<<5) /* Card can run at 200MHz */
|
||||
/* SDR mode @1.2V I/O */
|
||||
#define EXT_CSD_CARD_TYPE_HS200 (EXT_CSD_CARD_TYPE_HS200_1_8V | \
|
||||
EXT_CSD_CARD_TYPE_HS200_1_2V)
|
||||
#define EXT_CSD_CARD_TYPE_HS400_1_8V (1<<6) /* Card can run at 200MHz DDR, 1.8V */
|
||||
#define EXT_CSD_CARD_TYPE_HS400_1_2V (1<<7) /* Card can run at 200MHz DDR, 1.2V */
|
||||
#define EXT_CSD_CARD_TYPE_HS400 (EXT_CSD_CARD_TYPE_HS400_1_8V | \
|
||||
EXT_CSD_CARD_TYPE_HS400_1_2V)
|
||||
|
||||
#define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */
|
||||
#define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */
|
||||
|
|
@ -373,6 +381,11 @@ struct _mmc_csd {
|
|||
#define EXT_CSD_DDR_BUS_WIDTH_4 5 /* Card is in 4 bit DDR mode */
|
||||
#define EXT_CSD_DDR_BUS_WIDTH_8 6 /* Card is in 8 bit DDR mode */
|
||||
|
||||
#define EXT_CSD_TIMING_BC 0 /* Backwards compatility */
|
||||
#define EXT_CSD_TIMING_HS 1 /* High speed */
|
||||
#define EXT_CSD_TIMING_HS200 2 /* HS200 */
|
||||
#define EXT_CSD_TIMING_HS400 3 /* HS400 */
|
||||
|
||||
#define EXT_CSD_SEC_ER_EN BIT(0)
|
||||
#define EXT_CSD_SEC_BD_BLK_EN BIT(2)
|
||||
#define EXT_CSD_SEC_GB_CL_EN BIT(4)
|
||||
|
|
|
|||
|
|
@ -57,12 +57,8 @@ struct sdhci_host {
|
|||
#define SDHCI_QUIRK_BROKEN_CARD_DETECTION (1<<15)
|
||||
/* Controller reports inverted write-protect state */
|
||||
#define SDHCI_QUIRK_INVERTED_WRITE_PROTECT (1<<16)
|
||||
/* Controller has nonstandard clock management */
|
||||
#define SDHCI_QUIRK_NONSTANDARD_CLOCK (1<<17)
|
||||
/* Controller does not like fast PIO transfers */
|
||||
#define SDHCI_QUIRK_PIO_NEEDS_DELAY (1<<18)
|
||||
/* Controller losing signal/interrupt enable states after reset */
|
||||
#define SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET (1<<19)
|
||||
/* Controller has to be forced to use block size of 2048 bytes */
|
||||
#define SDHCI_QUIRK_FORCE_BLK_SZ_2048 (1<<20)
|
||||
/* Controller cannot do multi-block transfers */
|
||||
|
|
@ -147,6 +143,7 @@ struct sdhci_host {
|
|||
|
||||
bool runtime_suspended; /* Host is runtime suspended */
|
||||
bool bus_on; /* Bus power prevents runtime suspend */
|
||||
bool preset_enabled; /* Preset is enabled */
|
||||
|
||||
struct mmc_request *mrq; /* Current request */
|
||||
struct mmc_command *cmd; /* Current command */
|
||||
|
|
@ -164,8 +161,7 @@ struct sdhci_host {
|
|||
dma_addr_t adma_addr; /* Mapped ADMA descr. table */
|
||||
dma_addr_t align_addr; /* Mapped bounce buffer */
|
||||
|
||||
struct tasklet_struct card_tasklet; /* Tasklet structures */
|
||||
struct tasklet_struct finish_tasklet;
|
||||
struct tasklet_struct finish_tasklet; /* Tasklet structures */
|
||||
|
||||
struct timer_list timer; /* Timer for timeouts */
|
||||
|
||||
|
|
@ -177,6 +173,13 @@ struct sdhci_host {
|
|||
unsigned int ocr_avail_mmc;
|
||||
u32 ocr_mask; /* available voltages */
|
||||
|
||||
unsigned timing; /* Current timing */
|
||||
|
||||
u32 thread_isr;
|
||||
|
||||
/* cached registers */
|
||||
u32 ier;
|
||||
|
||||
wait_queue_head_t buf_ready_int; /* Waitqueue for Buffer Read Ready interrupt */
|
||||
unsigned int tuning_done; /* Condition flag set when CMD19 succeeds */
|
||||
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ extern bool parameq(const char *name1, const char *name2);
|
|||
extern bool parameqn(const char *name1, const char *name2, size_t n);
|
||||
|
||||
/* Called on module insert or kernel boot */
|
||||
extern int parse_args(const char *name,
|
||||
extern char *parse_args(const char *name,
|
||||
char *args,
|
||||
const struct kernel_param *params,
|
||||
unsigned num,
|
||||
|
|
|
|||
|
|
@ -175,6 +175,11 @@ typedef enum {
|
|||
#define NAND_OWN_BUFFERS 0x00020000
|
||||
/* Chip may not exist, so silence any errors in scan */
|
||||
#define NAND_SCAN_SILENT_NODEV 0x00040000
|
||||
/*
|
||||
* This option could be defined by controller drivers to protect against
|
||||
* kmap'ed, vmalloc'ed highmem buffers being passed from upper layers
|
||||
*/
|
||||
#define NAND_USE_BOUNCE_BUFFER 0x00080000
|
||||
/*
|
||||
* Autodetect nand buswidth with readid/onfi.
|
||||
* This suppose the driver will configure the hardware in 8 bits mode
|
||||
|
|
@ -552,8 +557,7 @@ struct nand_buffers {
|
|||
* @ecc: [BOARDSPECIFIC] ECC control structure
|
||||
* @buffers: buffer structure for read/write
|
||||
* @hwcontrol: platform-specific hardware control structure
|
||||
* @erase_cmd: [INTERN] erase command write function, selectable due
|
||||
* to AND support.
|
||||
* @erase: [REPLACEABLE] erase function
|
||||
* @scan_bbt: [REPLACEABLE] function to scan bad block table
|
||||
* @chip_delay: [BOARDSPECIFIC] chip dependent delay for transferring
|
||||
* data from array to read regs (tR).
|
||||
|
|
@ -637,7 +641,7 @@ struct nand_chip {
|
|||
void (*cmdfunc)(struct mtd_info *mtd, unsigned command, int column,
|
||||
int page_addr);
|
||||
int(*waitfunc)(struct mtd_info *mtd, struct nand_chip *this);
|
||||
void (*erase_cmd)(struct mtd_info *mtd, int page);
|
||||
int (*erase)(struct mtd_info *mtd, int page);
|
||||
int (*scan_bbt)(struct mtd_info *mtd);
|
||||
int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state,
|
||||
int status, int page);
|
||||
|
|
|
|||
|
|
@ -101,9 +101,6 @@ static inline void send_pfow_command(struct map_info *map,
|
|||
unsigned long len, map_word *datum)
|
||||
{
|
||||
int bits_per_chip = map_bankwidth(map) * 8;
|
||||
int chipnum;
|
||||
struct lpddr_private *lpddr = map->fldrv_priv;
|
||||
chipnum = adr >> lpddr->chipshift;
|
||||
|
||||
map_write(map, CMD(cmd_code), map->pfow_base + PFOW_COMMAND_CODE);
|
||||
map_write(map, CMD(adr & ((1<<bits_per_chip) - 1)),
|
||||
|
|
|
|||
214
include/linux/mtd/spi-nor.h
Normal file
214
include/linux/mtd/spi-nor.h
Normal file
|
|
@ -0,0 +1,214 @@
|
|||
/*
|
||||
* Copyright (C) 2014 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_MTD_SPI_NOR_H
|
||||
#define __LINUX_MTD_SPI_NOR_H
|
||||
|
||||
/*
|
||||
* Note on opcode nomenclature: some opcodes have a format like
|
||||
* SPINOR_OP_FUNCTION{4,}_x_y_z. The numbers x, y, and z stand for the number
|
||||
* of I/O lines used for the opcode, address, and data (respectively). The
|
||||
* FUNCTION has an optional suffix of '4', to represent an opcode which
|
||||
* requires a 4-byte (32-bit) address.
|
||||
*/
|
||||
|
||||
/* Flash opcodes. */
|
||||
#define SPINOR_OP_WREN 0x06 /* Write enable */
|
||||
#define SPINOR_OP_RDSR 0x05 /* Read status register */
|
||||
#define SPINOR_OP_WRSR 0x01 /* Write status register 1 byte */
|
||||
#define SPINOR_OP_READ 0x03 /* Read data bytes (low frequency) */
|
||||
#define SPINOR_OP_READ_FAST 0x0b /* Read data bytes (high frequency) */
|
||||
#define SPINOR_OP_READ_1_1_2 0x3b /* Read data bytes (Dual SPI) */
|
||||
#define SPINOR_OP_READ_1_1_4 0x6b /* Read data bytes (Quad SPI) */
|
||||
#define SPINOR_OP_PP 0x02 /* Page program (up to 256 bytes) */
|
||||
#define SPINOR_OP_BE_4K 0x20 /* Erase 4KiB block */
|
||||
#define SPINOR_OP_BE_4K_PMC 0xd7 /* Erase 4KiB block on PMC chips */
|
||||
#define SPINOR_OP_BE_32K 0x52 /* Erase 32KiB block */
|
||||
#define SPINOR_OP_CHIP_ERASE 0xc7 /* Erase whole flash chip */
|
||||
#define SPINOR_OP_SE 0xd8 /* Sector erase (usually 64KiB) */
|
||||
#define SPINOR_OP_RDID 0x9f /* Read JEDEC ID */
|
||||
#define SPINOR_OP_RDCR 0x35 /* Read configuration register */
|
||||
|
||||
/* 4-byte address opcodes - used on Spansion and some Macronix flashes. */
|
||||
#define SPINOR_OP_READ4 0x13 /* Read data bytes (low frequency) */
|
||||
#define SPINOR_OP_READ4_FAST 0x0c /* Read data bytes (high frequency) */
|
||||
#define SPINOR_OP_READ4_1_1_2 0x3c /* Read data bytes (Dual SPI) */
|
||||
#define SPINOR_OP_READ4_1_1_4 0x6c /* Read data bytes (Quad SPI) */
|
||||
#define SPINOR_OP_PP_4B 0x12 /* Page program (up to 256 bytes) */
|
||||
#define SPINOR_OP_SE_4B 0xdc /* Sector erase (usually 64KiB) */
|
||||
|
||||
/* Used for SST flashes only. */
|
||||
#define SPINOR_OP_BP 0x02 /* Byte program */
|
||||
#define SPINOR_OP_WRDI 0x04 /* Write disable */
|
||||
#define SPINOR_OP_AAI_WP 0xad /* Auto address increment word program */
|
||||
|
||||
/* Used for Macronix and Winbond flashes. */
|
||||
#define SPINOR_OP_EN4B 0xb7 /* Enter 4-byte mode */
|
||||
#define SPINOR_OP_EX4B 0xe9 /* Exit 4-byte mode */
|
||||
|
||||
/* Used for Spansion flashes only. */
|
||||
#define SPINOR_OP_BRWR 0x17 /* Bank register write */
|
||||
|
||||
/* Status Register bits. */
|
||||
#define SR_WIP 1 /* Write in progress */
|
||||
#define SR_WEL 2 /* Write enable latch */
|
||||
/* meaning of other SR_* bits may differ between vendors */
|
||||
#define SR_BP0 4 /* Block protect 0 */
|
||||
#define SR_BP1 8 /* Block protect 1 */
|
||||
#define SR_BP2 0x10 /* Block protect 2 */
|
||||
#define SR_SRWD 0x80 /* SR write protect */
|
||||
|
||||
#define SR_QUAD_EN_MX 0x40 /* Macronix Quad I/O */
|
||||
|
||||
/* Configuration Register bits. */
|
||||
#define CR_QUAD_EN_SPAN 0x2 /* Spansion Quad I/O */
|
||||
|
||||
enum read_mode {
|
||||
SPI_NOR_NORMAL = 0,
|
||||
SPI_NOR_FAST,
|
||||
SPI_NOR_DUAL,
|
||||
SPI_NOR_QUAD,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct spi_nor_xfer_cfg - Structure for defining a Serial Flash transfer
|
||||
* @wren: command for "Write Enable", or 0x00 for not required
|
||||
* @cmd: command for operation
|
||||
* @cmd_pins: number of pins to send @cmd (1, 2, 4)
|
||||
* @addr: address for operation
|
||||
* @addr_pins: number of pins to send @addr (1, 2, 4)
|
||||
* @addr_width: number of address bytes
|
||||
* (3,4, or 0 for address not required)
|
||||
* @mode: mode data
|
||||
* @mode_pins: number of pins to send @mode (1, 2, 4)
|
||||
* @mode_cycles: number of mode cycles (0 for mode not required)
|
||||
* @dummy_cycles: number of dummy cycles (0 for dummy not required)
|
||||
*/
|
||||
struct spi_nor_xfer_cfg {
|
||||
u8 wren;
|
||||
u8 cmd;
|
||||
u8 cmd_pins;
|
||||
u32 addr;
|
||||
u8 addr_pins;
|
||||
u8 addr_width;
|
||||
u8 mode;
|
||||
u8 mode_pins;
|
||||
u8 mode_cycles;
|
||||
u8 dummy_cycles;
|
||||
};
|
||||
|
||||
#define SPI_NOR_MAX_CMD_SIZE 8
|
||||
enum spi_nor_ops {
|
||||
SPI_NOR_OPS_READ = 0,
|
||||
SPI_NOR_OPS_WRITE,
|
||||
SPI_NOR_OPS_ERASE,
|
||||
SPI_NOR_OPS_LOCK,
|
||||
SPI_NOR_OPS_UNLOCK,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct spi_nor - Structure for defining a the SPI NOR layer
|
||||
* @mtd: point to a mtd_info structure
|
||||
* @lock: the lock for the read/write/erase/lock/unlock operations
|
||||
* @dev: point to a spi device, or a spi nor controller device.
|
||||
* @page_size: the page size of the SPI NOR
|
||||
* @addr_width: number of address bytes
|
||||
* @erase_opcode: the opcode for erasing a sector
|
||||
* @read_opcode: the read opcode
|
||||
* @read_dummy: the dummy needed by the read operation
|
||||
* @program_opcode: the program opcode
|
||||
* @flash_read: the mode of the read
|
||||
* @sst_write_second: used by the SST write operation
|
||||
* @cfg: used by the read_xfer/write_xfer
|
||||
* @cmd_buf: used by the write_reg
|
||||
* @prepare: [OPTIONAL] do some preparations for the
|
||||
* read/write/erase/lock/unlock operations
|
||||
* @unprepare: [OPTIONAL] do some post work after the
|
||||
* read/write/erase/lock/unlock operations
|
||||
* @read_xfer: [OPTIONAL] the read fundamental primitive
|
||||
* @write_xfer: [OPTIONAL] the writefundamental primitive
|
||||
* @read_reg: [DRIVER-SPECIFIC] read out the register
|
||||
* @write_reg: [DRIVER-SPECIFIC] write data to the register
|
||||
* @read_id: [REPLACEABLE] read out the ID data, and find
|
||||
* the proper spi_device_id
|
||||
* @wait_till_ready: [REPLACEABLE] wait till the NOR becomes ready
|
||||
* @read: [DRIVER-SPECIFIC] read data from the SPI NOR
|
||||
* @write: [DRIVER-SPECIFIC] write data to the SPI NOR
|
||||
* @erase: [DRIVER-SPECIFIC] erase a sector of the SPI NOR
|
||||
* at the offset @offs
|
||||
* @priv: the private data
|
||||
*/
|
||||
struct spi_nor {
|
||||
struct mtd_info *mtd;
|
||||
struct mutex lock;
|
||||
struct device *dev;
|
||||
u32 page_size;
|
||||
u8 addr_width;
|
||||
u8 erase_opcode;
|
||||
u8 read_opcode;
|
||||
u8 read_dummy;
|
||||
u8 program_opcode;
|
||||
enum read_mode flash_read;
|
||||
bool sst_write_second;
|
||||
struct spi_nor_xfer_cfg cfg;
|
||||
u8 cmd_buf[SPI_NOR_MAX_CMD_SIZE];
|
||||
|
||||
int (*prepare)(struct spi_nor *nor, enum spi_nor_ops ops);
|
||||
void (*unprepare)(struct spi_nor *nor, enum spi_nor_ops ops);
|
||||
int (*read_xfer)(struct spi_nor *nor, struct spi_nor_xfer_cfg *cfg,
|
||||
u8 *buf, size_t len);
|
||||
int (*write_xfer)(struct spi_nor *nor, struct spi_nor_xfer_cfg *cfg,
|
||||
u8 *buf, size_t len);
|
||||
int (*read_reg)(struct spi_nor *nor, u8 opcode, u8 *buf, int len);
|
||||
int (*write_reg)(struct spi_nor *nor, u8 opcode, u8 *buf, int len,
|
||||
int write_enable);
|
||||
const struct spi_device_id *(*read_id)(struct spi_nor *nor);
|
||||
int (*wait_till_ready)(struct spi_nor *nor);
|
||||
|
||||
int (*read)(struct spi_nor *nor, loff_t from,
|
||||
size_t len, size_t *retlen, u_char *read_buf);
|
||||
void (*write)(struct spi_nor *nor, loff_t to,
|
||||
size_t len, size_t *retlen, const u_char *write_buf);
|
||||
int (*erase)(struct spi_nor *nor, loff_t offs);
|
||||
|
||||
void *priv;
|
||||
};
|
||||
|
||||
/**
|
||||
* spi_nor_scan() - scan the SPI NOR
|
||||
* @nor: the spi_nor structure
|
||||
* @id: the spi_device_id provided by the driver
|
||||
* @mode: the read mode supported by the driver
|
||||
*
|
||||
* The drivers can use this fuction to scan the SPI NOR.
|
||||
* In the scanning, it will try to get all the necessary information to
|
||||
* fill the mtd_info{} and the spi_nor{}.
|
||||
*
|
||||
* The board may assigns a spi_device_id with @id which be used to compared with
|
||||
* the spi_device_id detected by the scanning.
|
||||
*
|
||||
* Return: 0 for success, others for failure.
|
||||
*/
|
||||
int spi_nor_scan(struct spi_nor *nor, const struct spi_device_id *id,
|
||||
enum read_mode mode);
|
||||
extern const struct spi_device_id spi_nor_ids[];
|
||||
|
||||
/**
|
||||
* spi_nor_match_id() - find the spi_device_id by the name
|
||||
* @name: the name of the spi_device_id
|
||||
*
|
||||
* The drivers use this function to find the spi_device_id
|
||||
* specified by the @name.
|
||||
*
|
||||
* Return: returns the right spi_device_id pointer on success,
|
||||
* and returns NULL on failure.
|
||||
*/
|
||||
const struct spi_device_id *spi_nor_match_id(char *name);
|
||||
|
||||
#endif
|
||||
|
|
@ -42,9 +42,11 @@ enum {
|
|||
NETIF_F_TSO6_BIT, /* ... TCPv6 segmentation */
|
||||
NETIF_F_FSO_BIT, /* ... FCoE segmentation */
|
||||
NETIF_F_GSO_GRE_BIT, /* ... GRE with TSO */
|
||||
NETIF_F_GSO_GRE_CSUM_BIT, /* ... GRE with csum with TSO */
|
||||
NETIF_F_GSO_IPIP_BIT, /* ... IPIP tunnel with TSO */
|
||||
NETIF_F_GSO_SIT_BIT, /* ... SIT tunnel with TSO */
|
||||
NETIF_F_GSO_UDP_TUNNEL_BIT, /* ... UDP TUNNEL with TSO */
|
||||
NETIF_F_GSO_UDP_TUNNEL_CSUM_BIT,/* ... UDP TUNNEL with TSO & CSUM */
|
||||
NETIF_F_GSO_MPLS_BIT, /* ... MPLS segmentation */
|
||||
/**/NETIF_F_GSO_LAST = /* last bit, see GSO_MASK */
|
||||
NETIF_F_GSO_MPLS_BIT,
|
||||
|
|
@ -111,9 +113,11 @@ enum {
|
|||
#define NETIF_F_RXFCS __NETIF_F(RXFCS)
|
||||
#define NETIF_F_RXALL __NETIF_F(RXALL)
|
||||
#define NETIF_F_GSO_GRE __NETIF_F(GSO_GRE)
|
||||
#define NETIF_F_GSO_GRE_CSUM __NETIF_F(GSO_GRE_CSUM)
|
||||
#define NETIF_F_GSO_IPIP __NETIF_F(GSO_IPIP)
|
||||
#define NETIF_F_GSO_SIT __NETIF_F(GSO_SIT)
|
||||
#define NETIF_F_GSO_UDP_TUNNEL __NETIF_F(GSO_UDP_TUNNEL)
|
||||
#define NETIF_F_GSO_UDP_TUNNEL_CSUM __NETIF_F(GSO_UDP_TUNNEL_CSUM)
|
||||
#define NETIF_F_GSO_MPLS __NETIF_F(GSO_MPLS)
|
||||
#define NETIF_F_HW_VLAN_STAG_FILTER __NETIF_F(HW_VLAN_STAG_FILTER)
|
||||
#define NETIF_F_HW_VLAN_STAG_RX __NETIF_F(HW_VLAN_STAG_RX)
|
||||
|
|
|
|||
|
|
@ -56,9 +56,6 @@ struct device;
|
|||
struct phy_device;
|
||||
/* 802.11 specific */
|
||||
struct wireless_dev;
|
||||
/* source back-compat hooks */
|
||||
#define SET_ETHTOOL_OPS(netdev,ops) \
|
||||
( (netdev)->ethtool_ops = (ops) )
|
||||
|
||||
void netdev_set_default_ethtool_ops(struct net_device *dev,
|
||||
const struct ethtool_ops *ops);
|
||||
|
|
@ -853,7 +850,8 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
|
|||
* SR-IOV management functions.
|
||||
* int (*ndo_set_vf_mac)(struct net_device *dev, int vf, u8* mac);
|
||||
* int (*ndo_set_vf_vlan)(struct net_device *dev, int vf, u16 vlan, u8 qos);
|
||||
* int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate);
|
||||
* int (*ndo_set_vf_rate)(struct net_device *dev, int vf, int min_tx_rate,
|
||||
* int max_tx_rate);
|
||||
* int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting);
|
||||
* int (*ndo_get_vf_config)(struct net_device *dev,
|
||||
* int vf, struct ifla_vf_info *ivf);
|
||||
|
|
@ -1047,8 +1045,9 @@ struct net_device_ops {
|
|||
int queue, u8 *mac);
|
||||
int (*ndo_set_vf_vlan)(struct net_device *dev,
|
||||
int queue, u16 vlan, u8 qos);
|
||||
int (*ndo_set_vf_tx_rate)(struct net_device *dev,
|
||||
int vf, int rate);
|
||||
int (*ndo_set_vf_rate)(struct net_device *dev,
|
||||
int vf, int min_tx_rate,
|
||||
int max_tx_rate);
|
||||
int (*ndo_set_vf_spoofchk)(struct net_device *dev,
|
||||
int vf, bool setting);
|
||||
int (*ndo_get_vf_config)(struct net_device *dev,
|
||||
|
|
@ -2634,6 +2633,7 @@ int dev_get_phys_port_id(struct net_device *dev,
|
|||
struct netdev_phys_port_id *ppid);
|
||||
int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
|
||||
struct netdev_queue *txq);
|
||||
int __dev_forward_skb(struct net_device *dev, struct sk_buff *skb);
|
||||
int dev_forward_skb(struct net_device *dev, struct sk_buff *skb);
|
||||
bool is_skb_forwardable(struct net_device *dev, struct sk_buff *skb);
|
||||
|
||||
|
|
@ -3003,6 +3003,15 @@ int __hw_addr_sync(struct netdev_hw_addr_list *to_list,
|
|||
struct netdev_hw_addr_list *from_list, int addr_len);
|
||||
void __hw_addr_unsync(struct netdev_hw_addr_list *to_list,
|
||||
struct netdev_hw_addr_list *from_list, int addr_len);
|
||||
int __hw_addr_sync_dev(struct netdev_hw_addr_list *list,
|
||||
struct net_device *dev,
|
||||
int (*sync)(struct net_device *, const unsigned char *),
|
||||
int (*unsync)(struct net_device *,
|
||||
const unsigned char *));
|
||||
void __hw_addr_unsync_dev(struct netdev_hw_addr_list *list,
|
||||
struct net_device *dev,
|
||||
int (*unsync)(struct net_device *,
|
||||
const unsigned char *));
|
||||
void __hw_addr_init(struct netdev_hw_addr_list *list);
|
||||
|
||||
/* Functions used for device addresses handling */
|
||||
|
|
@ -3023,6 +3032,38 @@ void dev_uc_unsync(struct net_device *to, struct net_device *from);
|
|||
void dev_uc_flush(struct net_device *dev);
|
||||
void dev_uc_init(struct net_device *dev);
|
||||
|
||||
/**
|
||||
* __dev_uc_sync - Synchonize device's unicast list
|
||||
* @dev: device to sync
|
||||
* @sync: function to call if address should be added
|
||||
* @unsync: function to call if address should be removed
|
||||
*
|
||||
* Add newly added addresses to the interface, and release
|
||||
* addresses that have been deleted.
|
||||
**/
|
||||
static inline int __dev_uc_sync(struct net_device *dev,
|
||||
int (*sync)(struct net_device *,
|
||||
const unsigned char *),
|
||||
int (*unsync)(struct net_device *,
|
||||
const unsigned char *))
|
||||
{
|
||||
return __hw_addr_sync_dev(&dev->uc, dev, sync, unsync);
|
||||
}
|
||||
|
||||
/**
|
||||
* __dev_uc_unsync - Remove synchonized addresses from device
|
||||
* @dev: device to sync
|
||||
* @unsync: function to call if address should be removed
|
||||
*
|
||||
* Remove all addresses that were added to the device by dev_uc_sync().
|
||||
**/
|
||||
static inline void __dev_uc_unsync(struct net_device *dev,
|
||||
int (*unsync)(struct net_device *,
|
||||
const unsigned char *))
|
||||
{
|
||||
__hw_addr_unsync_dev(&dev->uc, dev, unsync);
|
||||
}
|
||||
|
||||
/* Functions used for multicast addresses handling */
|
||||
int dev_mc_add(struct net_device *dev, const unsigned char *addr);
|
||||
int dev_mc_add_global(struct net_device *dev, const unsigned char *addr);
|
||||
|
|
@ -3035,6 +3076,38 @@ void dev_mc_unsync(struct net_device *to, struct net_device *from);
|
|||
void dev_mc_flush(struct net_device *dev);
|
||||
void dev_mc_init(struct net_device *dev);
|
||||
|
||||
/**
|
||||
* __dev_mc_sync - Synchonize device's multicast list
|
||||
* @dev: device to sync
|
||||
* @sync: function to call if address should be added
|
||||
* @unsync: function to call if address should be removed
|
||||
*
|
||||
* Add newly added addresses to the interface, and release
|
||||
* addresses that have been deleted.
|
||||
**/
|
||||
static inline int __dev_mc_sync(struct net_device *dev,
|
||||
int (*sync)(struct net_device *,
|
||||
const unsigned char *),
|
||||
int (*unsync)(struct net_device *,
|
||||
const unsigned char *))
|
||||
{
|
||||
return __hw_addr_sync_dev(&dev->mc, dev, sync, unsync);
|
||||
}
|
||||
|
||||
/**
|
||||
* __dev_mc_unsync - Remove synchonized addresses from device
|
||||
* @dev: device to sync
|
||||
* @unsync: function to call if address should be removed
|
||||
*
|
||||
* Remove all addresses that were added to the device by dev_mc_sync().
|
||||
**/
|
||||
static inline void __dev_mc_unsync(struct net_device *dev,
|
||||
int (*unsync)(struct net_device *,
|
||||
const unsigned char *))
|
||||
{
|
||||
__hw_addr_unsync_dev(&dev->mc, dev, unsync);
|
||||
}
|
||||
|
||||
/* Functions used for secondary unicast and multicast support */
|
||||
void dev_set_rx_mode(struct net_device *dev);
|
||||
void __dev_set_rx_mode(struct net_device *dev);
|
||||
|
|
@ -3180,6 +3253,20 @@ const char *netdev_drivername(const struct net_device *dev);
|
|||
|
||||
void linkwatch_run_queue(void);
|
||||
|
||||
static inline netdev_features_t netdev_intersect_features(netdev_features_t f1,
|
||||
netdev_features_t f2)
|
||||
{
|
||||
if (f1 & NETIF_F_GEN_CSUM)
|
||||
f1 |= (NETIF_F_ALL_CSUM & ~NETIF_F_GEN_CSUM);
|
||||
if (f2 & NETIF_F_GEN_CSUM)
|
||||
f2 |= (NETIF_F_ALL_CSUM & ~NETIF_F_GEN_CSUM);
|
||||
f1 &= f2;
|
||||
if (f1 & NETIF_F_GEN_CSUM)
|
||||
f1 &= ~(NETIF_F_ALL_CSUM & ~NETIF_F_GEN_CSUM);
|
||||
|
||||
return f1;
|
||||
}
|
||||
|
||||
static inline netdev_features_t netdev_get_wanted_features(
|
||||
struct net_device *dev)
|
||||
{
|
||||
|
|
@ -3218,6 +3305,13 @@ static inline bool net_gso_ok(netdev_features_t features, int gso_type)
|
|||
BUILD_BUG_ON(SKB_GSO_TCP_ECN != (NETIF_F_TSO_ECN >> NETIF_F_GSO_SHIFT));
|
||||
BUILD_BUG_ON(SKB_GSO_TCPV6 != (NETIF_F_TSO6 >> NETIF_F_GSO_SHIFT));
|
||||
BUILD_BUG_ON(SKB_GSO_FCOE != (NETIF_F_FSO >> NETIF_F_GSO_SHIFT));
|
||||
BUILD_BUG_ON(SKB_GSO_GRE != (NETIF_F_GSO_GRE >> NETIF_F_GSO_SHIFT));
|
||||
BUILD_BUG_ON(SKB_GSO_GRE_CSUM != (NETIF_F_GSO_GRE_CSUM >> NETIF_F_GSO_SHIFT));
|
||||
BUILD_BUG_ON(SKB_GSO_IPIP != (NETIF_F_GSO_IPIP >> NETIF_F_GSO_SHIFT));
|
||||
BUILD_BUG_ON(SKB_GSO_SIT != (NETIF_F_GSO_SIT >> NETIF_F_GSO_SHIFT));
|
||||
BUILD_BUG_ON(SKB_GSO_UDP_TUNNEL != (NETIF_F_GSO_UDP_TUNNEL >> NETIF_F_GSO_SHIFT));
|
||||
BUILD_BUG_ON(SKB_GSO_UDP_TUNNEL_CSUM != (NETIF_F_GSO_UDP_TUNNEL_CSUM >> NETIF_F_GSO_SHIFT));
|
||||
BUILD_BUG_ON(SKB_GSO_MPLS != (NETIF_F_GSO_MPLS >> NETIF_F_GSO_SHIFT));
|
||||
|
||||
return (features & feature) == feature;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,17 @@
|
|||
|
||||
#include <uapi/linux/netfilter/nfnetlink_acct.h>
|
||||
|
||||
enum {
|
||||
NFACCT_NO_QUOTA = -1,
|
||||
NFACCT_UNDERQUOTA,
|
||||
NFACCT_OVERQUOTA,
|
||||
};
|
||||
|
||||
struct nf_acct;
|
||||
|
||||
struct nf_acct *nfnl_acct_find_get(const char *filter_name);
|
||||
void nfnl_acct_put(struct nf_acct *acct);
|
||||
void nfnl_acct_update(const struct sk_buff *skb, struct nf_acct *nfacct);
|
||||
|
||||
extern int nfnl_acct_overquota(const struct sk_buff *skb,
|
||||
struct nf_acct *nfacct);
|
||||
#endif /* _NFNL_ACCT_H */
|
||||
|
|
|
|||
|
|
@ -46,7 +46,8 @@ struct netlink_kernel_cfg {
|
|||
unsigned int flags;
|
||||
void (*input)(struct sk_buff *skb);
|
||||
struct mutex *cb_mutex;
|
||||
void (*bind)(int group);
|
||||
int (*bind)(int group);
|
||||
void (*unbind)(int group);
|
||||
bool (*compare)(struct net *net, struct sock *sk);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@ static inline void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *sourc
|
|||
enum nfs3_stable_how {
|
||||
NFS_UNSTABLE = 0,
|
||||
NFS_DATA_SYNC = 1,
|
||||
NFS_FILE_SYNC = 2
|
||||
NFS_FILE_SYNC = 2,
|
||||
|
||||
/* used by direct.c to mark verf as invalid */
|
||||
NFS_INVALID_STABLE_HOW = -1
|
||||
};
|
||||
#endif /* _LINUX_NFS_H */
|
||||
|
|
|
|||
|
|
@ -399,8 +399,6 @@ enum lock_type4 {
|
|||
#define FATTR4_WORD2_LAYOUT_BLKSIZE (1UL << 1)
|
||||
#define FATTR4_WORD2_MDSTHRESHOLD (1UL << 4)
|
||||
#define FATTR4_WORD2_SECURITY_LABEL (1UL << 16)
|
||||
#define FATTR4_WORD2_CHANGE_SECURITY_LABEL \
|
||||
(1UL << 17)
|
||||
|
||||
/* MDS threshold bitmap bits */
|
||||
#define THRESHOLD_RD (1UL << 0)
|
||||
|
|
|
|||
|
|
@ -459,13 +459,12 @@ extern int nfs3_removexattr (struct dentry *, const char *name);
|
|||
/*
|
||||
* linux/fs/nfs/direct.c
|
||||
*/
|
||||
extern ssize_t nfs_direct_IO(int, struct kiocb *, const struct iovec *, loff_t,
|
||||
unsigned long);
|
||||
extern ssize_t nfs_direct_IO(int, struct kiocb *, struct iov_iter *, loff_t);
|
||||
extern ssize_t nfs_file_direct_read(struct kiocb *iocb,
|
||||
const struct iovec *iov, unsigned long nr_segs,
|
||||
struct iov_iter *iter,
|
||||
loff_t pos, bool uio);
|
||||
extern ssize_t nfs_file_direct_write(struct kiocb *iocb,
|
||||
const struct iovec *iov, unsigned long nr_segs,
|
||||
struct iov_iter *iter,
|
||||
loff_t pos, bool uio);
|
||||
|
||||
/*
|
||||
|
|
@ -520,7 +519,6 @@ extern int nfs_writepage(struct page *page, struct writeback_control *wbc);
|
|||
extern int nfs_writepages(struct address_space *, struct writeback_control *);
|
||||
extern int nfs_flush_incompatible(struct file *file, struct page *page);
|
||||
extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int);
|
||||
extern void nfs_writeback_done(struct rpc_task *, struct nfs_write_data *);
|
||||
|
||||
/*
|
||||
* Try to write back everything synchronously (but check the
|
||||
|
|
@ -553,7 +551,6 @@ nfs_have_writebacks(struct inode *inode)
|
|||
extern int nfs_readpage(struct file *, struct page *);
|
||||
extern int nfs_readpages(struct file *, struct address_space *,
|
||||
struct list_head *, unsigned);
|
||||
extern int nfs_readpage_result(struct rpc_task *, struct nfs_read_data *);
|
||||
extern int nfs_readpage_async(struct nfs_open_context *, struct inode *,
|
||||
struct page *);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,12 +22,17 @@
|
|||
* Valid flags for a dirty buffer
|
||||
*/
|
||||
enum {
|
||||
PG_BUSY = 0,
|
||||
PG_MAPPED,
|
||||
PG_CLEAN,
|
||||
PG_NEED_COMMIT,
|
||||
PG_NEED_RESCHED,
|
||||
PG_COMMIT_TO_DS,
|
||||
PG_BUSY = 0, /* nfs_{un}lock_request */
|
||||
PG_MAPPED, /* page private set for buffered io */
|
||||
PG_CLEAN, /* write succeeded */
|
||||
PG_COMMIT_TO_DS, /* used by pnfs layouts */
|
||||
PG_INODE_REF, /* extra ref held by inode (head req only) */
|
||||
PG_HEADLOCK, /* page group lock of wb_head */
|
||||
PG_TEARDOWN, /* page group sync for destroy */
|
||||
PG_UNLOCKPAGE, /* page group sync bit in read path */
|
||||
PG_UPTODATE, /* page group sync bit in read path */
|
||||
PG_WB_END, /* page group sync bit in write path */
|
||||
PG_REMOVE, /* page group sync bit in write path */
|
||||
};
|
||||
|
||||
struct nfs_inode;
|
||||
|
|
@ -43,15 +48,29 @@ struct nfs_page {
|
|||
struct kref wb_kref; /* reference count */
|
||||
unsigned long wb_flags;
|
||||
struct nfs_write_verifier wb_verf; /* Commit cookie */
|
||||
struct nfs_page *wb_this_page; /* list of reqs for this page */
|
||||
struct nfs_page *wb_head; /* head pointer for req list */
|
||||
};
|
||||
|
||||
struct nfs_pageio_descriptor;
|
||||
struct nfs_pageio_ops {
|
||||
void (*pg_init)(struct nfs_pageio_descriptor *, struct nfs_page *);
|
||||
bool (*pg_test)(struct nfs_pageio_descriptor *, struct nfs_page *, struct nfs_page *);
|
||||
size_t (*pg_test)(struct nfs_pageio_descriptor *, struct nfs_page *,
|
||||
struct nfs_page *);
|
||||
int (*pg_doio)(struct nfs_pageio_descriptor *);
|
||||
};
|
||||
|
||||
struct nfs_rw_ops {
|
||||
const fmode_t rw_mode;
|
||||
struct nfs_rw_header *(*rw_alloc_header)(void);
|
||||
void (*rw_free_header)(struct nfs_rw_header *);
|
||||
void (*rw_release)(struct nfs_pgio_data *);
|
||||
int (*rw_done)(struct rpc_task *, struct nfs_pgio_data *, struct inode *);
|
||||
void (*rw_result)(struct rpc_task *, struct nfs_pgio_data *);
|
||||
void (*rw_initiate)(struct nfs_pgio_data *, struct rpc_message *,
|
||||
struct rpc_task_setup *, int);
|
||||
};
|
||||
|
||||
struct nfs_pageio_descriptor {
|
||||
struct list_head pg_list;
|
||||
unsigned long pg_bytes_written;
|
||||
|
|
@ -63,6 +82,7 @@ struct nfs_pageio_descriptor {
|
|||
|
||||
struct inode *pg_inode;
|
||||
const struct nfs_pageio_ops *pg_ops;
|
||||
const struct nfs_rw_ops *pg_rw_ops;
|
||||
int pg_ioflags;
|
||||
int pg_error;
|
||||
const struct rpc_call_ops *pg_rpc_callops;
|
||||
|
|
@ -75,29 +95,33 @@ struct nfs_pageio_descriptor {
|
|||
#define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags))
|
||||
|
||||
extern struct nfs_page *nfs_create_request(struct nfs_open_context *ctx,
|
||||
struct inode *inode,
|
||||
struct page *page,
|
||||
struct nfs_page *last,
|
||||
unsigned int offset,
|
||||
unsigned int count);
|
||||
extern void nfs_release_request(struct nfs_page *req);
|
||||
extern void nfs_release_request(struct nfs_page *);
|
||||
|
||||
|
||||
extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
|
||||
struct inode *inode,
|
||||
const struct nfs_pageio_ops *pg_ops,
|
||||
const struct nfs_pgio_completion_ops *compl_ops,
|
||||
const struct nfs_rw_ops *rw_ops,
|
||||
size_t bsize,
|
||||
int how);
|
||||
extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *,
|
||||
struct nfs_page *);
|
||||
extern void nfs_pageio_complete(struct nfs_pageio_descriptor *desc);
|
||||
extern void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *, pgoff_t);
|
||||
extern bool nfs_generic_pg_test(struct nfs_pageio_descriptor *desc,
|
||||
extern size_t nfs_generic_pg_test(struct nfs_pageio_descriptor *desc,
|
||||
struct nfs_page *prev,
|
||||
struct nfs_page *req);
|
||||
extern int nfs_wait_on_request(struct nfs_page *);
|
||||
extern void nfs_unlock_request(struct nfs_page *req);
|
||||
extern void nfs_unlock_and_release_request(struct nfs_page *req);
|
||||
extern void nfs_unlock_and_release_request(struct nfs_page *);
|
||||
extern void nfs_page_group_lock(struct nfs_page *);
|
||||
extern void nfs_page_group_unlock(struct nfs_page *);
|
||||
extern bool nfs_page_group_sync_on_bit(struct nfs_page *, unsigned int);
|
||||
|
||||
/*
|
||||
* Lock the page of an asynchronous request
|
||||
|
|
|
|||
|
|
@ -488,45 +488,9 @@ struct nfs4_delegreturnres {
|
|||
const struct nfs_server *server;
|
||||
};
|
||||
|
||||
/*
|
||||
* Arguments to the read call.
|
||||
*/
|
||||
struct nfs_readargs {
|
||||
struct nfs4_sequence_args seq_args;
|
||||
struct nfs_fh * fh;
|
||||
struct nfs_open_context *context;
|
||||
struct nfs_lock_context *lock_context;
|
||||
nfs4_stateid stateid;
|
||||
__u64 offset;
|
||||
__u32 count;
|
||||
unsigned int pgbase;
|
||||
struct page ** pages;
|
||||
};
|
||||
|
||||
struct nfs_readres {
|
||||
struct nfs4_sequence_res seq_res;
|
||||
struct nfs_fattr * fattr;
|
||||
__u32 count;
|
||||
int eof;
|
||||
};
|
||||
|
||||
/*
|
||||
* Arguments to the write call.
|
||||
*/
|
||||
struct nfs_writeargs {
|
||||
struct nfs4_sequence_args seq_args;
|
||||
struct nfs_fh * fh;
|
||||
struct nfs_open_context *context;
|
||||
struct nfs_lock_context *lock_context;
|
||||
nfs4_stateid stateid;
|
||||
__u64 offset;
|
||||
__u32 count;
|
||||
enum nfs3_stable_how stable;
|
||||
unsigned int pgbase;
|
||||
struct page ** pages;
|
||||
const u32 * bitmask;
|
||||
};
|
||||
|
||||
struct nfs_write_verifier {
|
||||
char data[8];
|
||||
};
|
||||
|
|
@ -536,12 +500,31 @@ struct nfs_writeverf {
|
|||
enum nfs3_stable_how committed;
|
||||
};
|
||||
|
||||
struct nfs_writeres {
|
||||
/*
|
||||
* Arguments shared by the read and write call.
|
||||
*/
|
||||
struct nfs_pgio_args {
|
||||
struct nfs4_sequence_args seq_args;
|
||||
struct nfs_fh * fh;
|
||||
struct nfs_open_context *context;
|
||||
struct nfs_lock_context *lock_context;
|
||||
nfs4_stateid stateid;
|
||||
__u64 offset;
|
||||
__u32 count;
|
||||
unsigned int pgbase;
|
||||
struct page ** pages;
|
||||
const u32 * bitmask; /* used by write */
|
||||
enum nfs3_stable_how stable; /* used by write */
|
||||
};
|
||||
|
||||
struct nfs_pgio_res {
|
||||
struct nfs4_sequence_res seq_res;
|
||||
struct nfs_fattr * fattr;
|
||||
struct nfs_writeverf * verf;
|
||||
__u32 count;
|
||||
const struct nfs_server *server;
|
||||
int eof; /* used by read */
|
||||
struct nfs_writeverf * verf; /* used by write */
|
||||
const struct nfs_server *server; /* used by write */
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -1129,6 +1112,7 @@ struct pnfs_commit_bucket {
|
|||
struct list_head committing;
|
||||
struct pnfs_layout_segment *wlseg;
|
||||
struct pnfs_layout_segment *clseg;
|
||||
struct nfs_writeverf direct_verf;
|
||||
};
|
||||
|
||||
struct pnfs_ds_commit_info {
|
||||
|
|
@ -1264,20 +1248,6 @@ struct nfs_page_array {
|
|||
struct page *page_array[NFS_PAGEVEC_SIZE];
|
||||
};
|
||||
|
||||
struct nfs_read_data {
|
||||
struct nfs_pgio_header *header;
|
||||
struct list_head list;
|
||||
struct rpc_task task;
|
||||
struct nfs_fattr fattr; /* fattr storage */
|
||||
struct nfs_readargs args;
|
||||
struct nfs_readres res;
|
||||
unsigned long timestamp; /* For lease renewal */
|
||||
int (*read_done_cb) (struct rpc_task *task, struct nfs_read_data *data);
|
||||
__u64 mds_offset;
|
||||
struct nfs_page_array pages;
|
||||
struct nfs_client *ds_clp; /* pNFS data server */
|
||||
};
|
||||
|
||||
/* used as flag bits in nfs_pgio_header */
|
||||
enum {
|
||||
NFS_IOHDR_ERROR = 0,
|
||||
|
|
@ -1287,19 +1257,22 @@ enum {
|
|||
NFS_IOHDR_NEED_RESCHED,
|
||||
};
|
||||
|
||||
struct nfs_pgio_data;
|
||||
|
||||
struct nfs_pgio_header {
|
||||
struct inode *inode;
|
||||
struct rpc_cred *cred;
|
||||
struct list_head pages;
|
||||
struct list_head rpc_list;
|
||||
struct nfs_pgio_data *data;
|
||||
atomic_t refcnt;
|
||||
struct nfs_page *req;
|
||||
struct nfs_writeverf *verf;
|
||||
struct nfs_writeverf verf; /* Used for writes */
|
||||
struct pnfs_layout_segment *lseg;
|
||||
loff_t io_start;
|
||||
const struct rpc_call_ops *mds_ops;
|
||||
void (*release) (struct nfs_pgio_header *hdr);
|
||||
const struct nfs_pgio_completion_ops *completion_ops;
|
||||
const struct nfs_rw_ops *rw_ops;
|
||||
struct nfs_direct_req *dreq;
|
||||
void *layout_private;
|
||||
spinlock_t lock;
|
||||
|
|
@ -1310,30 +1283,24 @@ struct nfs_pgio_header {
|
|||
unsigned long flags;
|
||||
};
|
||||
|
||||
struct nfs_read_header {
|
||||
struct nfs_pgio_header header;
|
||||
struct nfs_read_data rpc_data;
|
||||
};
|
||||
|
||||
struct nfs_write_data {
|
||||
struct nfs_pgio_data {
|
||||
struct nfs_pgio_header *header;
|
||||
struct list_head list;
|
||||
struct rpc_task task;
|
||||
struct nfs_fattr fattr;
|
||||
struct nfs_writeverf verf;
|
||||
struct nfs_writeargs args; /* argument struct */
|
||||
struct nfs_writeres res; /* result struct */
|
||||
struct nfs_writeverf verf; /* Used for writes */
|
||||
struct nfs_pgio_args args; /* argument struct */
|
||||
struct nfs_pgio_res res; /* result struct */
|
||||
unsigned long timestamp; /* For lease renewal */
|
||||
int (*write_done_cb) (struct rpc_task *task, struct nfs_write_data *data);
|
||||
int (*pgio_done_cb) (struct rpc_task *task, struct nfs_pgio_data *data);
|
||||
__u64 mds_offset; /* Filelayout dense stripe */
|
||||
struct nfs_page_array pages;
|
||||
struct nfs_client *ds_clp; /* pNFS data server */
|
||||
int ds_idx; /* ds index if ds_clp is set */
|
||||
};
|
||||
|
||||
struct nfs_write_header {
|
||||
struct nfs_rw_header {
|
||||
struct nfs_pgio_header header;
|
||||
struct nfs_write_data rpc_data;
|
||||
struct nfs_writeverf verf;
|
||||
struct nfs_pgio_data rpc_data;
|
||||
};
|
||||
|
||||
struct nfs_mds_commit_info {
|
||||
|
|
@ -1465,16 +1432,11 @@ struct nfs_rpc_ops {
|
|||
struct nfs_pathconf *);
|
||||
int (*set_capabilities)(struct nfs_server *, struct nfs_fh *);
|
||||
int (*decode_dirent)(struct xdr_stream *, struct nfs_entry *, int);
|
||||
void (*read_setup) (struct nfs_read_data *, struct rpc_message *);
|
||||
void (*read_pageio_init)(struct nfs_pageio_descriptor *, struct inode *,
|
||||
const struct nfs_pgio_completion_ops *);
|
||||
int (*read_rpc_prepare)(struct rpc_task *, struct nfs_read_data *);
|
||||
int (*read_done) (struct rpc_task *, struct nfs_read_data *);
|
||||
void (*write_setup) (struct nfs_write_data *, struct rpc_message *);
|
||||
void (*write_pageio_init)(struct nfs_pageio_descriptor *, struct inode *, int,
|
||||
const struct nfs_pgio_completion_ops *);
|
||||
int (*write_rpc_prepare)(struct rpc_task *, struct nfs_write_data *);
|
||||
int (*write_done) (struct rpc_task *, struct nfs_write_data *);
|
||||
int (*pgio_rpc_prepare)(struct rpc_task *, struct nfs_pgio_data *);
|
||||
void (*read_setup) (struct nfs_pgio_data *, struct rpc_message *);
|
||||
int (*read_done) (struct rpc_task *, struct nfs_pgio_data *);
|
||||
void (*write_setup) (struct nfs_pgio_data *, struct rpc_message *);
|
||||
int (*write_done) (struct rpc_task *, struct nfs_pgio_data *);
|
||||
void (*commit_setup) (struct nfs_commit_data *, struct rpc_message *);
|
||||
void (*commit_rpc_prepare)(struct rpc_task *, struct nfs_commit_data *);
|
||||
int (*commit_done) (struct rpc_task *, struct nfs_commit_data *);
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
/*
|
||||
* linux/include/linux/nfsd/debug.h
|
||||
*
|
||||
* Debugging-related stuff for nfsd
|
||||
*
|
||||
* Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de>
|
||||
*/
|
||||
#ifndef LINUX_NFSD_DEBUG_H
|
||||
#define LINUX_NFSD_DEBUG_H
|
||||
|
||||
#include <uapi/linux/nfsd/debug.h>
|
||||
|
||||
# undef ifdebug
|
||||
# ifdef NFSD_DEBUG
|
||||
# define ifdebug(flag) if (nfsd_debug & NFSDDBG_##flag)
|
||||
# else
|
||||
# define ifdebug(flag) if (0)
|
||||
# endif
|
||||
#endif /* LINUX_NFSD_DEBUG_H */
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
/*
|
||||
* include/linux/nfsd/export.h
|
||||
*
|
||||
* Public declarations for NFS exports. The definitions for the
|
||||
* syscall interface are in nfsctl.h
|
||||
*
|
||||
* Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de>
|
||||
*/
|
||||
#ifndef NFSD_EXPORT_H
|
||||
#define NFSD_EXPORT_H
|
||||
|
||||
# include <linux/nfsd/nfsfh.h>
|
||||
#include <uapi/linux/nfsd/export.h>
|
||||
|
||||
/*
|
||||
* FS Locations
|
||||
*/
|
||||
|
||||
#define MAX_FS_LOCATIONS 128
|
||||
|
||||
struct nfsd4_fs_location {
|
||||
char *hosts; /* colon separated list of hosts */
|
||||
char *path; /* slash separated list of path components */
|
||||
};
|
||||
|
||||
struct nfsd4_fs_locations {
|
||||
uint32_t locations_count;
|
||||
struct nfsd4_fs_location *locations;
|
||||
/* If we're not actually serving this data ourselves (only providing a
|
||||
* list of replicas that do serve it) then we set "migrated": */
|
||||
int migrated;
|
||||
};
|
||||
|
||||
/*
|
||||
* We keep an array of pseudoflavors with the export, in order from most
|
||||
* to least preferred. For the foreseeable future, we don't expect more
|
||||
* than the eight pseudoflavors null, unix, krb5, krb5i, krb5p, skpm3,
|
||||
* spkm3i, and spkm3p (and using all 8 at once should be rare).
|
||||
*/
|
||||
#define MAX_SECINFO_LIST 8
|
||||
|
||||
struct exp_flavor_info {
|
||||
u32 pseudoflavor;
|
||||
u32 flags;
|
||||
};
|
||||
|
||||
struct svc_export {
|
||||
struct cache_head h;
|
||||
struct auth_domain * ex_client;
|
||||
int ex_flags;
|
||||
struct path ex_path;
|
||||
kuid_t ex_anon_uid;
|
||||
kgid_t ex_anon_gid;
|
||||
int ex_fsid;
|
||||
unsigned char * ex_uuid; /* 16 byte fsid */
|
||||
struct nfsd4_fs_locations ex_fslocs;
|
||||
int ex_nflavors;
|
||||
struct exp_flavor_info ex_flavors[MAX_SECINFO_LIST];
|
||||
struct cache_detail *cd;
|
||||
};
|
||||
|
||||
/* an "export key" (expkey) maps a filehandlefragement to an
|
||||
* svc_export for a given client. There can be several per export,
|
||||
* for the different fsid types.
|
||||
*/
|
||||
struct svc_expkey {
|
||||
struct cache_head h;
|
||||
|
||||
struct auth_domain * ek_client;
|
||||
int ek_fsidtype;
|
||||
u32 ek_fsid[6];
|
||||
|
||||
struct path ek_path;
|
||||
};
|
||||
|
||||
#define EX_ISSYNC(exp) (!((exp)->ex_flags & NFSEXP_ASYNC))
|
||||
#define EX_NOHIDE(exp) ((exp)->ex_flags & NFSEXP_NOHIDE)
|
||||
#define EX_WGATHER(exp) ((exp)->ex_flags & NFSEXP_GATHERED_WRITES)
|
||||
|
||||
int nfsexp_flags(struct svc_rqst *rqstp, struct svc_export *exp);
|
||||
__be32 check_nfsd_access(struct svc_export *exp, struct svc_rqst *rqstp);
|
||||
|
||||
/*
|
||||
* Function declarations
|
||||
*/
|
||||
int nfsd_export_init(struct net *);
|
||||
void nfsd_export_shutdown(struct net *);
|
||||
void nfsd_export_flush(struct net *);
|
||||
struct svc_export * rqst_exp_get_by_name(struct svc_rqst *,
|
||||
struct path *);
|
||||
struct svc_export * rqst_exp_parent(struct svc_rqst *,
|
||||
struct path *);
|
||||
struct svc_export * rqst_find_fsidzero_export(struct svc_rqst *);
|
||||
int exp_rootfh(struct net *, struct auth_domain *,
|
||||
char *path, struct knfsd_fh *, int maxsize);
|
||||
__be32 exp_pseudoroot(struct svc_rqst *, struct svc_fh *);
|
||||
__be32 nfserrno(int errno);
|
||||
|
||||
static inline void exp_put(struct svc_export *exp)
|
||||
{
|
||||
cache_put(&exp->h, exp->cd);
|
||||
}
|
||||
|
||||
static inline void exp_get(struct svc_export *exp)
|
||||
{
|
||||
cache_get(&exp->h);
|
||||
}
|
||||
struct svc_export * rqst_exp_find(struct svc_rqst *, int, u32 *);
|
||||
|
||||
#endif /* NFSD_EXPORT_H */
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
/*
|
||||
* include/linux/nfsd/nfsfh.h
|
||||
*
|
||||
* This file describes the layout of the file handles as passed
|
||||
* over the wire.
|
||||
*
|
||||
* Earlier versions of knfsd used to sign file handles using keyed MD5
|
||||
* or SHA. I've removed this code, because it doesn't give you more
|
||||
* security than blocking external access to port 2049 on your firewall.
|
||||
*
|
||||
* Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de>
|
||||
*/
|
||||
#ifndef _LINUX_NFSD_FH_H
|
||||
#define _LINUX_NFSD_FH_H
|
||||
|
||||
# include <linux/sunrpc/svc.h>
|
||||
#include <uapi/linux/nfsd/nfsfh.h>
|
||||
|
||||
static inline __u32 ino_t_to_u32(ino_t ino)
|
||||
{
|
||||
return (__u32) ino;
|
||||
}
|
||||
|
||||
static inline ino_t u32_to_ino_t(__u32 uino)
|
||||
{
|
||||
return (ino_t) uino;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is the internal representation of an NFS handle used in knfsd.
|
||||
* pre_mtime/post_version will be used to support wcc_attr's in NFSv3.
|
||||
*/
|
||||
typedef struct svc_fh {
|
||||
struct knfsd_fh fh_handle; /* FH data */
|
||||
struct dentry * fh_dentry; /* validated dentry */
|
||||
struct svc_export * fh_export; /* export pointer */
|
||||
int fh_maxsize; /* max size for fh_handle */
|
||||
|
||||
unsigned char fh_locked; /* inode locked by us */
|
||||
unsigned char fh_want_write; /* remount protection taken */
|
||||
|
||||
#ifdef CONFIG_NFSD_V3
|
||||
unsigned char fh_post_saved; /* post-op attrs saved */
|
||||
unsigned char fh_pre_saved; /* pre-op attrs saved */
|
||||
|
||||
/* Pre-op attributes saved during fh_lock */
|
||||
__u64 fh_pre_size; /* size before operation */
|
||||
struct timespec fh_pre_mtime; /* mtime before oper */
|
||||
struct timespec fh_pre_ctime; /* ctime before oper */
|
||||
/*
|
||||
* pre-op nfsv4 change attr: note must check IS_I_VERSION(inode)
|
||||
* to find out if it is valid.
|
||||
*/
|
||||
u64 fh_pre_change;
|
||||
|
||||
/* Post-op attributes saved in fh_unlock */
|
||||
struct kstat fh_post_attr; /* full attrs after operation */
|
||||
u64 fh_post_change; /* nfsv4 change; see above */
|
||||
#endif /* CONFIG_NFSD_V3 */
|
||||
|
||||
} svc_fh;
|
||||
|
||||
#endif /* _LINUX_NFSD_FH_H */
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
* linux/include/linux/nfsd/stats.h
|
||||
*
|
||||
* Statistics for NFS server.
|
||||
*
|
||||
* Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
|
||||
*/
|
||||
#ifndef LINUX_NFSD_STATS_H
|
||||
#define LINUX_NFSD_STATS_H
|
||||
|
||||
#include <uapi/linux/nfsd/stats.h>
|
||||
|
||||
|
||||
struct nfsd_stats {
|
||||
unsigned int rchits; /* repcache hits */
|
||||
unsigned int rcmisses; /* repcache hits */
|
||||
unsigned int rcnocache; /* uncached reqs */
|
||||
unsigned int fh_stale; /* FH stale error */
|
||||
unsigned int fh_lookup; /* dentry cached */
|
||||
unsigned int fh_anon; /* anon file dentry returned */
|
||||
unsigned int fh_nocache_dir; /* filehandle not found in dcache */
|
||||
unsigned int fh_nocache_nondir; /* filehandle not found in dcache */
|
||||
unsigned int io_read; /* bytes returned to read requests */
|
||||
unsigned int io_write; /* bytes passed in write requests */
|
||||
unsigned int th_cnt; /* number of available threads */
|
||||
unsigned int th_usage[10]; /* number of ticks during which n perdeciles
|
||||
* of available threads were in use */
|
||||
unsigned int th_fullcnt; /* number of times last free thread was used */
|
||||
unsigned int ra_size; /* size of ra cache */
|
||||
unsigned int ra_depth[11]; /* number of times ra entry was found that deep
|
||||
* in the cache (10percentiles). [10] = not found */
|
||||
#ifdef CONFIG_NFSD_V4
|
||||
unsigned int nfs4_opcount[LAST_NFS4_OP + 1]; /* count of individual nfsv4 operations */
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
extern struct nfsd_stats nfsdstats;
|
||||
extern struct svc_stat nfsd_svcstats;
|
||||
|
||||
void nfsd_stat_init(void);
|
||||
void nfsd_stat_shutdown(void);
|
||||
|
||||
#endif /* LINUX_NFSD_STATS_H */
|
||||
|
|
@ -80,6 +80,22 @@ enum {
|
|||
|
||||
IEEE802154_ATTR_FRAME_RETRIES,
|
||||
|
||||
IEEE802154_ATTR_LLSEC_ENABLED,
|
||||
IEEE802154_ATTR_LLSEC_SECLEVEL,
|
||||
IEEE802154_ATTR_LLSEC_KEY_MODE,
|
||||
IEEE802154_ATTR_LLSEC_KEY_SOURCE_SHORT,
|
||||
IEEE802154_ATTR_LLSEC_KEY_SOURCE_EXTENDED,
|
||||
IEEE802154_ATTR_LLSEC_KEY_ID,
|
||||
IEEE802154_ATTR_LLSEC_FRAME_COUNTER,
|
||||
IEEE802154_ATTR_LLSEC_KEY_BYTES,
|
||||
IEEE802154_ATTR_LLSEC_KEY_USAGE_FRAME_TYPES,
|
||||
IEEE802154_ATTR_LLSEC_KEY_USAGE_COMMANDS,
|
||||
IEEE802154_ATTR_LLSEC_FRAME_TYPE,
|
||||
IEEE802154_ATTR_LLSEC_CMD_FRAME_ID,
|
||||
IEEE802154_ATTR_LLSEC_SECLEVELS,
|
||||
IEEE802154_ATTR_LLSEC_DEV_OVERRIDE,
|
||||
IEEE802154_ATTR_LLSEC_DEV_KEY_MODE,
|
||||
|
||||
__IEEE802154_ATTR_MAX,
|
||||
};
|
||||
|
||||
|
|
@ -134,6 +150,21 @@ enum {
|
|||
|
||||
IEEE802154_SET_MACPARAMS,
|
||||
|
||||
IEEE802154_LLSEC_GETPARAMS,
|
||||
IEEE802154_LLSEC_SETPARAMS,
|
||||
IEEE802154_LLSEC_LIST_KEY,
|
||||
IEEE802154_LLSEC_ADD_KEY,
|
||||
IEEE802154_LLSEC_DEL_KEY,
|
||||
IEEE802154_LLSEC_LIST_DEV,
|
||||
IEEE802154_LLSEC_ADD_DEV,
|
||||
IEEE802154_LLSEC_DEL_DEV,
|
||||
IEEE802154_LLSEC_LIST_DEVKEY,
|
||||
IEEE802154_LLSEC_ADD_DEVKEY,
|
||||
IEEE802154_LLSEC_DEL_DEVKEY,
|
||||
IEEE802154_LLSEC_LIST_SECLEVEL,
|
||||
IEEE802154_LLSEC_ADD_SECLEVEL,
|
||||
IEEE802154_LLSEC_DEL_SECLEVEL,
|
||||
|
||||
__IEEE802154_CMD_MAX,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -32,15 +32,24 @@ static inline void touch_nmi_watchdog(void)
|
|||
#ifdef arch_trigger_all_cpu_backtrace
|
||||
static inline bool trigger_all_cpu_backtrace(void)
|
||||
{
|
||||
arch_trigger_all_cpu_backtrace();
|
||||
arch_trigger_all_cpu_backtrace(true);
|
||||
|
||||
return true;
|
||||
}
|
||||
static inline bool trigger_allbutself_cpu_backtrace(void)
|
||||
{
|
||||
arch_trigger_all_cpu_backtrace(false);
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
static inline bool trigger_all_cpu_backtrace(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
static inline bool trigger_allbutself_cpu_backtrace(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LOCKUP_DETECTOR
|
||||
|
|
@ -48,6 +57,7 @@ int hw_nmi_is_cpu_stuck(struct pt_regs *);
|
|||
u64 hw_nmi_get_sample_period(int watchdog_thresh);
|
||||
extern int watchdog_user_enabled;
|
||||
extern int watchdog_thresh;
|
||||
extern int sysctl_softlockup_all_cpu_backtrace;
|
||||
struct ctl_table;
|
||||
extern int proc_dowatchdog(struct ctl_table *, int ,
|
||||
void __user *, size_t *, loff_t *);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Definitions for the NVM Express interface
|
||||
* Copyright (c) 2011-2013, Intel Corporation.
|
||||
* Copyright (c) 2011-2014, Intel Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
|
|
@ -10,10 +10,6 @@
|
|||
* 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.,
|
||||
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_NVME_H
|
||||
|
|
@ -66,8 +62,8 @@ enum {
|
|||
|
||||
#define NVME_VS(major, minor) (major << 16 | minor)
|
||||
|
||||
extern unsigned char io_timeout;
|
||||
#define NVME_IO_TIMEOUT (io_timeout * HZ)
|
||||
extern unsigned char nvme_io_timeout;
|
||||
#define NVME_IO_TIMEOUT (nvme_io_timeout * HZ)
|
||||
|
||||
/*
|
||||
* Represents an NVM Express device. Each nvme_dev is a PCI function.
|
||||
|
|
@ -94,7 +90,7 @@ struct nvme_dev {
|
|||
struct miscdevice miscdev;
|
||||
work_func_t reset_workfn;
|
||||
struct work_struct reset_work;
|
||||
struct notifier_block nb;
|
||||
struct work_struct cpu_work;
|
||||
char name[12];
|
||||
char serial[20];
|
||||
char model[40];
|
||||
|
|
@ -103,6 +99,7 @@ struct nvme_dev {
|
|||
u32 stripe_size;
|
||||
u16 oncs;
|
||||
u16 abort_limit;
|
||||
u8 vwc;
|
||||
u8 initialized;
|
||||
};
|
||||
|
||||
|
|
@ -159,7 +156,6 @@ struct nvme_iod *nvme_map_user_pages(struct nvme_dev *dev, int write,
|
|||
void nvme_unmap_user_pages(struct nvme_dev *dev, int write,
|
||||
struct nvme_iod *iod);
|
||||
int nvme_submit_io_cmd(struct nvme_dev *, struct nvme_command *, u32 *);
|
||||
int nvme_submit_flush_data(struct nvme_queue *nvmeq, struct nvme_ns *ns);
|
||||
int nvme_submit_admin_cmd(struct nvme_dev *, struct nvme_command *,
|
||||
u32 *result);
|
||||
int nvme_identify(struct nvme_dev *, unsigned nsid, unsigned cns,
|
||||
|
|
|
|||
|
|
@ -22,12 +22,12 @@ extern struct phy_device *of_phy_connect(struct net_device *dev,
|
|||
struct phy_device *of_phy_attach(struct net_device *dev,
|
||||
struct device_node *phy_np, u32 flags,
|
||||
phy_interface_t iface);
|
||||
extern struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
|
||||
void (*hndlr)(struct net_device *),
|
||||
phy_interface_t iface);
|
||||
|
||||
extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np);
|
||||
|
||||
extern void of_mdiobus_link_phydev(struct mii_bus *mdio,
|
||||
struct phy_device *phydev);
|
||||
|
||||
#else /* CONFIG_OF */
|
||||
static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
|
||||
{
|
||||
|
|
@ -59,17 +59,30 @@ static inline struct phy_device *of_phy_attach(struct net_device *dev,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
|
||||
void (*hndlr)(struct net_device *),
|
||||
phy_interface_t iface)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void of_mdiobus_link_phydev(struct mii_bus *mdio,
|
||||
struct phy_device *phydev)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_OF */
|
||||
|
||||
#if defined(CONFIG_OF) && defined(CONFIG_FIXED_PHY)
|
||||
extern int of_phy_register_fixed_link(struct device_node *np);
|
||||
extern bool of_phy_is_fixed_link(struct device_node *np);
|
||||
#else
|
||||
static inline int of_phy_register_fixed_link(struct device_node *np)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
static inline bool of_phy_is_fixed_link(struct device_node *np)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __LINUX_OF_MDIO_H */
|
||||
|
|
|
|||
|
|
@ -1,23 +1,6 @@
|
|||
/*
|
||||
* OMAP DMA Engine support
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#ifndef __LINUX_OMAP_DMA_H
|
||||
#define __LINUX_OMAP_DMA_H
|
||||
|
||||
struct dma_chan;
|
||||
|
||||
#if defined(CONFIG_DMA_OMAP) || (defined(CONFIG_DMA_OMAP_MODULE) && defined(MODULE))
|
||||
bool omap_dma_filter_fn(struct dma_chan *, void *);
|
||||
#else
|
||||
static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
#include <linux/omap-dmaengine.h>
|
||||
|
||||
/*
|
||||
* Legacy OMAP DMA handling defines and functions
|
||||
|
|
|
|||
21
include/linux/omap-dmaengine.h
Normal file
21
include/linux/omap-dmaengine.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* OMAP DMA Engine support
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#ifndef __LINUX_OMAP_DMAENGINE_H
|
||||
#define __LINUX_OMAP_DMAENGINE_H
|
||||
|
||||
struct dma_chan;
|
||||
|
||||
#if defined(CONFIG_DMA_OMAP) || (defined(CONFIG_DMA_OMAP_MODULE) && defined(MODULE))
|
||||
bool omap_dma_filter_fn(struct dma_chan *, void *);
|
||||
#else
|
||||
static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
#endif /* __LINUX_OMAP_DMAENGINE_H */
|
||||
|
|
@ -360,6 +360,9 @@ static inline void ClearPageCompound(struct page *page)
|
|||
ClearPageHead(page);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define PG_head_mask ((1L << PG_head))
|
||||
|
||||
#else
|
||||
/*
|
||||
* Reduce page flag use as much as possible by overlapping
|
||||
|
|
|
|||
|
|
@ -164,13 +164,17 @@ enum pci_dev_flags {
|
|||
/* INTX_DISABLE in PCI_COMMAND register disables MSI
|
||||
* generation too.
|
||||
*/
|
||||
PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) 1,
|
||||
PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) (1 << 0),
|
||||
/* Device configuration is irrevocably lost if disabled into D3 */
|
||||
PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2,
|
||||
PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) (1 << 1),
|
||||
/* Provide indication device is assigned by a Virtual Machine Manager */
|
||||
PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) 4,
|
||||
PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) (1 << 2),
|
||||
/* Flag for quirk use to store if quirk-specific ACS is enabled */
|
||||
PCI_DEV_FLAGS_ACS_ENABLED_QUIRK = (__force pci_dev_flags_t) 8,
|
||||
PCI_DEV_FLAGS_ACS_ENABLED_QUIRK = (__force pci_dev_flags_t) (1 << 3),
|
||||
/* Flag to indicate the device uses dma_alias_devfn */
|
||||
PCI_DEV_FLAGS_DMA_ALIAS_DEVFN = (__force pci_dev_flags_t) (1 << 4),
|
||||
/* Use a PCIe-to-PCI bridge alias even if !pci_is_pcie */
|
||||
PCI_DEV_FLAG_PCIE_BRIDGE_ALIAS = (__force pci_dev_flags_t) (1 << 5),
|
||||
};
|
||||
|
||||
enum pci_irq_reroute_variant {
|
||||
|
|
@ -268,6 +272,7 @@ struct pci_dev {
|
|||
u8 rom_base_reg; /* which config register controls the ROM */
|
||||
u8 pin; /* which interrupt pin this device uses */
|
||||
u16 pcie_flags_reg; /* cached PCIe Capabilities Register */
|
||||
u8 dma_alias_devfn;/* devfn of DMA alias, if any */
|
||||
|
||||
struct pci_driver *driver; /* which driver has allocated this device */
|
||||
u64 dma_mask; /* Mask of the bits of bus address this
|
||||
|
|
@ -1809,6 +1814,10 @@ static inline struct eeh_dev *pci_dev_to_eeh_dev(struct pci_dev *pdev)
|
|||
}
|
||||
#endif
|
||||
|
||||
int pci_for_each_dma_alias(struct pci_dev *pdev,
|
||||
int (*fn)(struct pci_dev *pdev,
|
||||
u16 alias, void *data), void *data);
|
||||
|
||||
/**
|
||||
* pci_find_upstream_pcie_bridge - find upstream PCIe-to-PCI bridge of a device
|
||||
* @pdev: the PCI device
|
||||
|
|
|
|||
|
|
@ -146,10 +146,10 @@
|
|||
* Declaration/definition used for per-CPU variables that must be read mostly.
|
||||
*/
|
||||
#define DECLARE_PER_CPU_READ_MOSTLY(type, name) \
|
||||
DECLARE_PER_CPU_SECTION(type, name, "..readmostly")
|
||||
DECLARE_PER_CPU_SECTION(type, name, "..read_mostly")
|
||||
|
||||
#define DEFINE_PER_CPU_READ_MOSTLY(type, name) \
|
||||
DEFINE_PER_CPU_SECTION(type, name, "..readmostly")
|
||||
DEFINE_PER_CPU_SECTION(type, name, "..read_mostly")
|
||||
|
||||
/*
|
||||
* Intermodule exports for per-CPU variables. sparse forgets about
|
||||
|
|
|
|||
|
|
@ -121,6 +121,36 @@ static inline void percpu_ref_get(struct percpu_ref *ref)
|
|||
* percpu_ref_tryget - try to increment a percpu refcount
|
||||
* @ref: percpu_ref to try-get
|
||||
*
|
||||
* Increment a percpu refcount unless its count already reached zero.
|
||||
* Returns %true on success; %false on failure.
|
||||
*
|
||||
* The caller is responsible for ensuring that @ref stays accessible.
|
||||
*/
|
||||
static inline bool percpu_ref_tryget(struct percpu_ref *ref)
|
||||
{
|
||||
unsigned __percpu *pcpu_count;
|
||||
int ret = false;
|
||||
|
||||
rcu_read_lock_sched();
|
||||
|
||||
pcpu_count = ACCESS_ONCE(ref->pcpu_count);
|
||||
|
||||
if (likely(REF_STATUS(pcpu_count) == PCPU_REF_PTR)) {
|
||||
this_cpu_inc(*pcpu_count);
|
||||
ret = true;
|
||||
} else {
|
||||
ret = atomic_inc_not_zero(&ref->count);
|
||||
}
|
||||
|
||||
rcu_read_unlock_sched();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* percpu_ref_tryget_live - try to increment a live percpu refcount
|
||||
* @ref: percpu_ref to try-get
|
||||
*
|
||||
* Increment a percpu refcount unless it has already been killed. Returns
|
||||
* %true on success; %false on failure.
|
||||
*
|
||||
|
|
@ -128,8 +158,10 @@ static inline void percpu_ref_get(struct percpu_ref *ref)
|
|||
* will fail. For such guarantee, percpu_ref_kill_and_confirm() should be
|
||||
* used. After the confirm_kill callback is invoked, it's guaranteed that
|
||||
* no new reference will be given out by percpu_ref_tryget().
|
||||
*
|
||||
* The caller is responsible for ensuring that @ref stays accessible.
|
||||
*/
|
||||
static inline bool percpu_ref_tryget(struct percpu_ref *ref)
|
||||
static inline bool percpu_ref_tryget_live(struct percpu_ref *ref)
|
||||
{
|
||||
unsigned __percpu *pcpu_count;
|
||||
int ret = false;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
*/
|
||||
#define get_cpu_var(var) (*({ \
|
||||
preempt_disable(); \
|
||||
&__get_cpu_var(var); }))
|
||||
this_cpu_ptr(&var); }))
|
||||
|
||||
/*
|
||||
* The weird & is necessary because sparse considers (void)(var) to be
|
||||
|
|
|
|||
|
|
@ -166,6 +166,11 @@ struct perf_event;
|
|||
*/
|
||||
#define PERF_EVENT_TXN 0x1
|
||||
|
||||
/**
|
||||
* pmu::capabilities flags
|
||||
*/
|
||||
#define PERF_PMU_CAP_NO_INTERRUPT 0x01
|
||||
|
||||
/**
|
||||
* struct pmu - generic performance monitoring unit
|
||||
*/
|
||||
|
|
@ -178,6 +183,11 @@ struct pmu {
|
|||
const char *name;
|
||||
int type;
|
||||
|
||||
/*
|
||||
* various common per-pmu feature flags
|
||||
*/
|
||||
int capabilities;
|
||||
|
||||
int * __percpu pmu_disable_count;
|
||||
struct perf_cpu_context * __percpu pmu_cpu_context;
|
||||
int task_ctx_nr;
|
||||
|
|
@ -696,7 +706,8 @@ extern struct perf_guest_info_callbacks *perf_guest_cbs;
|
|||
extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks);
|
||||
extern int perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks);
|
||||
|
||||
extern void perf_event_comm(struct task_struct *tsk);
|
||||
extern void perf_event_exec(void);
|
||||
extern void perf_event_comm(struct task_struct *tsk, bool exec);
|
||||
extern void perf_event_fork(struct task_struct *tsk);
|
||||
|
||||
/* Callchains */
|
||||
|
|
@ -773,7 +784,7 @@ extern void perf_event_enable(struct perf_event *event);
|
|||
extern void perf_event_disable(struct perf_event *event);
|
||||
extern int __perf_event_disable(void *info);
|
||||
extern void perf_event_task_tick(void);
|
||||
#else
|
||||
#else /* !CONFIG_PERF_EVENTS: */
|
||||
static inline void
|
||||
perf_event_task_sched_in(struct task_struct *prev,
|
||||
struct task_struct *task) { }
|
||||
|
|
@ -803,7 +814,8 @@ static inline int perf_unregister_guest_info_callbacks
|
|||
(struct perf_guest_info_callbacks *callbacks) { return 0; }
|
||||
|
||||
static inline void perf_event_mmap(struct vm_area_struct *vma) { }
|
||||
static inline void perf_event_comm(struct task_struct *tsk) { }
|
||||
static inline void perf_event_exec(void) { }
|
||||
static inline void perf_event_comm(struct task_struct *tsk, bool exec) { }
|
||||
static inline void perf_event_fork(struct task_struct *tsk) { }
|
||||
static inline void perf_event_init(void) { }
|
||||
static inline int perf_swevent_get_recursion_context(void) { return -1; }
|
||||
|
|
|
|||
|
|
@ -198,6 +198,13 @@ static inline struct mii_bus *mdiobus_alloc(void)
|
|||
int mdiobus_register(struct mii_bus *bus);
|
||||
void mdiobus_unregister(struct mii_bus *bus);
|
||||
void mdiobus_free(struct mii_bus *bus);
|
||||
struct mii_bus *devm_mdiobus_alloc_size(struct device *dev, int sizeof_priv);
|
||||
static inline struct mii_bus *devm_mdiobus_alloc(struct device *dev)
|
||||
{
|
||||
return devm_mdiobus_alloc_size(dev, 0);
|
||||
}
|
||||
|
||||
void devm_mdiobus_free(struct device *dev, struct mii_bus *bus);
|
||||
struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr);
|
||||
int mdiobus_read(struct mii_bus *bus, int addr, u32 regnum);
|
||||
int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val);
|
||||
|
|
@ -529,6 +536,15 @@ struct phy_driver {
|
|||
/* See set_wol, but for checking whether Wake on LAN is enabled. */
|
||||
void (*get_wol)(struct phy_device *dev, struct ethtool_wolinfo *wol);
|
||||
|
||||
/*
|
||||
* Called to inform a PHY device driver when the core is about to
|
||||
* change the link state. This callback is supposed to be used as
|
||||
* fixup hook for drivers that need to take action when the link
|
||||
* state changes. Drivers are by no means allowed to mess with the
|
||||
* PHY device structure in their implementations.
|
||||
*/
|
||||
void (*link_change_notify)(struct phy_device *dev);
|
||||
|
||||
struct device_driver driver;
|
||||
};
|
||||
#define to_phy_driver(d) container_of(d, struct phy_driver, driver)
|
||||
|
|
@ -666,6 +682,7 @@ static inline int phy_read_status(struct phy_device *phydev)
|
|||
return phydev->drv->read_status(phydev);
|
||||
}
|
||||
|
||||
int genphy_config_init(struct phy_device *phydev);
|
||||
int genphy_setup_forced(struct phy_device *phydev);
|
||||
int genphy_restart_aneg(struct phy_device *phydev);
|
||||
int genphy_config_aneg(struct phy_device *phydev);
|
||||
|
|
|
|||
|
|
@ -9,15 +9,31 @@ struct fixed_phy_status {
|
|||
int asym_pause;
|
||||
};
|
||||
|
||||
struct device_node;
|
||||
|
||||
#ifdef CONFIG_FIXED_PHY
|
||||
extern int fixed_phy_add(unsigned int irq, int phy_id,
|
||||
struct fixed_phy_status *status);
|
||||
extern int fixed_phy_register(unsigned int irq,
|
||||
struct fixed_phy_status *status,
|
||||
struct device_node *np);
|
||||
extern void fixed_phy_del(int phy_addr);
|
||||
#else
|
||||
static inline int fixed_phy_add(unsigned int irq, int phy_id,
|
||||
struct fixed_phy_status *status)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
static inline int fixed_phy_register(unsigned int irq,
|
||||
struct fixed_phy_status *status,
|
||||
struct device_node *np)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
static inline int fixed_phy_del(int phy_addr)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif /* CONFIG_FIXED_PHY */
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
enum bch_ecc {
|
||||
BCH4_ECC = 0,
|
||||
BCH8_ECC,
|
||||
BCH16_ECC,
|
||||
};
|
||||
|
||||
/* ELM support 8 error syndrome process */
|
||||
|
|
@ -38,7 +39,7 @@ struct elm_errorvec {
|
|||
bool error_reported;
|
||||
bool error_uncorrectable;
|
||||
int error_count;
|
||||
int error_loc[ERROR_VECTOR_MAX];
|
||||
int error_loc[16];
|
||||
};
|
||||
|
||||
void elm_decode_bch_error_page(struct device *dev, u8 *ecc_calc,
|
||||
|
|
|
|||
22
include/linux/platform_data/intel-mid_wdt.h
Normal file
22
include/linux/platform_data/intel-mid_wdt.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* intel-mid_wdt: generic Intel MID SCU watchdog driver
|
||||
*
|
||||
* Copyright (C) 2014 Intel Corporation. All rights reserved.
|
||||
* Contact: David Cohen <david.a.cohen@linux.intel.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of version 2 of the GNU General
|
||||
* Public License as published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __INTEL_MID_WDT_H__
|
||||
#define __INTEL_MID_WDT_H__
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
struct intel_mid_wdt_pdata {
|
||||
int irq;
|
||||
int (*probe)(struct platform_device *pdev);
|
||||
};
|
||||
|
||||
#endif /*__INTEL_MID_WDT_H__*/
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
* Copyright 2013 Maximilian Güntner <maximilian.guentner@gmail.com>
|
||||
*
|
||||
* This file is subject to the terms and conditions of version 2 of
|
||||
* the GNU General Public License. See the file COPYING in the main
|
||||
* directory of this archive for more details.
|
||||
*
|
||||
* Based on leds-pca963x.h by Peter Meerwald <p.meerwald@bct-electronic.com>
|
||||
*
|
||||
* LED driver for the NXP PCA9685 PWM chip
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_PCA9685_H
|
||||
#define __LINUX_PCA9685_H
|
||||
|
||||
#include <linux/leds.h>
|
||||
|
||||
enum pca9685_outdrv {
|
||||
PCA9685_OPEN_DRAIN,
|
||||
PCA9685_TOTEM_POLE,
|
||||
};
|
||||
|
||||
enum pca9685_inverted {
|
||||
PCA9685_NOT_INVERTED,
|
||||
PCA9685_INVERTED,
|
||||
};
|
||||
|
||||
struct pca9685_platform_data {
|
||||
struct led_platform_data leds;
|
||||
enum pca9685_outdrv outdrv;
|
||||
enum pca9685_inverted inverted;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_PCA9685_H */
|
||||
|
|
@ -31,6 +31,8 @@ enum omap_ecc {
|
|||
OMAP_ECC_BCH8_CODE_HW_DETECTION_SW,
|
||||
/* 8-bit ECC calculation by GPMC, Error detection by ELM */
|
||||
OMAP_ECC_BCH8_CODE_HW,
|
||||
/* 16-bit ECC calculation by GPMC, Error detection by ELM */
|
||||
OMAP_ECC_BCH16_CODE_HW,
|
||||
};
|
||||
|
||||
struct gpmc_nand_regs {
|
||||
|
|
@ -50,6 +52,9 @@ struct gpmc_nand_regs {
|
|||
void __iomem *gpmc_bch_result1[GPMC_BCH_NUM_REMAINDER];
|
||||
void __iomem *gpmc_bch_result2[GPMC_BCH_NUM_REMAINDER];
|
||||
void __iomem *gpmc_bch_result3[GPMC_BCH_NUM_REMAINDER];
|
||||
void __iomem *gpmc_bch_result4[GPMC_BCH_NUM_REMAINDER];
|
||||
void __iomem *gpmc_bch_result5[GPMC_BCH_NUM_REMAINDER];
|
||||
void __iomem *gpmc_bch_result6[GPMC_BCH_NUM_REMAINDER];
|
||||
};
|
||||
|
||||
struct omap_nand_platform_data {
|
||||
|
|
|
|||
|
|
@ -58,6 +58,9 @@ struct pxa3xx_nand_platform_data {
|
|||
/* use an flash-based bad block table */
|
||||
bool flash_bbt;
|
||||
|
||||
/* requested ECC strength and ECC step size */
|
||||
int ecc_strength, ecc_step_size;
|
||||
|
||||
const struct mtd_partition *parts[NUM_CHIP_SELECT];
|
||||
unsigned int nr_parts[NUM_CHIP_SELECT];
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue