mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
Merge branch 'fixes-2.6.39' into for-2.6.40
This commit is contained in:
commit
6988f20fe0
830 changed files with 33294 additions and 15847 deletions
|
|
@ -165,10 +165,36 @@ extern void warn_slowpath_null(const char *file, const int line);
|
|||
#define WARN_ON_RATELIMIT(condition, state) \
|
||||
WARN_ON((condition) && __ratelimit(state))
|
||||
|
||||
/*
|
||||
* WARN_ON_SMP() is for cases that the warning is either
|
||||
* meaningless for !SMP or may even cause failures.
|
||||
* This is usually used for cases that we have
|
||||
* WARN_ON(!spin_is_locked(&lock)) checks, as spin_is_locked()
|
||||
* returns 0 for uniprocessor settings.
|
||||
* It can also be used with values that are only defined
|
||||
* on SMP:
|
||||
*
|
||||
* struct foo {
|
||||
* [...]
|
||||
* #ifdef CONFIG_SMP
|
||||
* int bar;
|
||||
* #endif
|
||||
* };
|
||||
*
|
||||
* void func(struct foo *zoot)
|
||||
* {
|
||||
* WARN_ON_SMP(!zoot->bar);
|
||||
*
|
||||
* For CONFIG_SMP, WARN_ON_SMP() should act the same as WARN_ON(),
|
||||
* and should be a nop and return false for uniprocessor.
|
||||
*
|
||||
* if (WARN_ON_SMP(x)) returns true only when CONFIG_SMP is set
|
||||
* and x is true.
|
||||
*/
|
||||
#ifdef CONFIG_SMP
|
||||
# define WARN_ON_SMP(x) WARN_ON(x)
|
||||
#else
|
||||
# define WARN_ON_SMP(x) do { } while (0)
|
||||
# define WARN_ON_SMP(x) ({0;})
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -687,6 +687,28 @@
|
|||
*(.discard.*) \
|
||||
}
|
||||
|
||||
/**
|
||||
* PERCPU_INPUT - the percpu input sections
|
||||
* @cacheline: cacheline size
|
||||
*
|
||||
* The core percpu section names and core symbols which do not rely
|
||||
* directly upon load addresses.
|
||||
*
|
||||
* @cacheline is used to align subsections to avoid false cacheline
|
||||
* sharing between subsections for different purposes.
|
||||
*/
|
||||
#define PERCPU_INPUT(cacheline) \
|
||||
VMLINUX_SYMBOL(__per_cpu_start) = .; \
|
||||
*(.data..percpu..first) \
|
||||
. = ALIGN(PAGE_SIZE); \
|
||||
*(.data..percpu..page_aligned) \
|
||||
. = ALIGN(cacheline); \
|
||||
*(.data..percpu..readmostly) \
|
||||
. = ALIGN(cacheline); \
|
||||
*(.data..percpu) \
|
||||
*(.data..percpu..shared_aligned) \
|
||||
VMLINUX_SYMBOL(__per_cpu_end) = .;
|
||||
|
||||
/**
|
||||
* PERCPU_VADDR - define output section for percpu area
|
||||
* @cacheline: cacheline size
|
||||
|
|
@ -715,16 +737,7 @@
|
|||
VMLINUX_SYMBOL(__per_cpu_load) = .; \
|
||||
.data..percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \
|
||||
- LOAD_OFFSET) { \
|
||||
VMLINUX_SYMBOL(__per_cpu_start) = .; \
|
||||
*(.data..percpu..first) \
|
||||
. = ALIGN(PAGE_SIZE); \
|
||||
*(.data..percpu..page_aligned) \
|
||||
. = ALIGN(cacheline); \
|
||||
*(.data..percpu..readmostly) \
|
||||
. = ALIGN(cacheline); \
|
||||
*(.data..percpu) \
|
||||
*(.data..percpu..shared_aligned) \
|
||||
VMLINUX_SYMBOL(__per_cpu_end) = .; \
|
||||
PERCPU_INPUT(cacheline) \
|
||||
} phdr \
|
||||
. = VMLINUX_SYMBOL(__per_cpu_load) + SIZEOF(.data..percpu);
|
||||
|
||||
|
|
@ -744,16 +757,7 @@
|
|||
. = ALIGN(PAGE_SIZE); \
|
||||
.data..percpu : AT(ADDR(.data..percpu) - LOAD_OFFSET) { \
|
||||
VMLINUX_SYMBOL(__per_cpu_load) = .; \
|
||||
VMLINUX_SYMBOL(__per_cpu_start) = .; \
|
||||
*(.data..percpu..first) \
|
||||
. = ALIGN(PAGE_SIZE); \
|
||||
*(.data..percpu..page_aligned) \
|
||||
. = ALIGN(cacheline); \
|
||||
*(.data..percpu..readmostly) \
|
||||
. = ALIGN(cacheline); \
|
||||
*(.data..percpu) \
|
||||
*(.data..percpu..shared_aligned) \
|
||||
VMLINUX_SYMBOL(__per_cpu_end) = .; \
|
||||
PERCPU_INPUT(cacheline) \
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -463,12 +463,15 @@ struct drm_irq_busid {
|
|||
enum drm_vblank_seq_type {
|
||||
_DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */
|
||||
_DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */
|
||||
/* bits 1-6 are reserved for high crtcs */
|
||||
_DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e,
|
||||
_DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */
|
||||
_DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */
|
||||
_DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */
|
||||
_DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */
|
||||
_DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */
|
||||
};
|
||||
#define _DRM_VBLANK_HIGH_CRTC_SHIFT 1
|
||||
|
||||
#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE)
|
||||
#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \
|
||||
|
|
@ -753,6 +756,7 @@ struct drm_event_vblank {
|
|||
};
|
||||
|
||||
#define DRM_CAP_DUMB_BUFFER 0x1
|
||||
#define DRM_CAP_VBLANK_HIGH_CRTC 0x2
|
||||
|
||||
/* typedef area */
|
||||
#ifndef __KERNEL__
|
||||
|
|
|
|||
79
include/linux/bch.h
Normal file
79
include/linux/bch.h
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Generic binary BCH encoding/decoding library
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright © 2011 Parrot S.A.
|
||||
*
|
||||
* Author: Ivan Djelic <ivan.djelic@parrot.com>
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* This library provides runtime configurable encoding/decoding of binary
|
||||
* Bose-Chaudhuri-Hocquenghem (BCH) codes.
|
||||
*/
|
||||
#ifndef _BCH_H
|
||||
#define _BCH_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/**
|
||||
* struct bch_control - BCH control structure
|
||||
* @m: Galois field order
|
||||
* @n: maximum codeword size in bits (= 2^m-1)
|
||||
* @t: error correction capability in bits
|
||||
* @ecc_bits: ecc exact size in bits, i.e. generator polynomial degree (<=m*t)
|
||||
* @ecc_bytes: ecc max size (m*t bits) in bytes
|
||||
* @a_pow_tab: Galois field GF(2^m) exponentiation lookup table
|
||||
* @a_log_tab: Galois field GF(2^m) log lookup table
|
||||
* @mod8_tab: remainder generator polynomial lookup tables
|
||||
* @ecc_buf: ecc parity words buffer
|
||||
* @ecc_buf2: ecc parity words buffer
|
||||
* @xi_tab: GF(2^m) base for solving degree 2 polynomial roots
|
||||
* @syn: syndrome buffer
|
||||
* @cache: log-based polynomial representation buffer
|
||||
* @elp: error locator polynomial
|
||||
* @poly_2t: temporary polynomials of degree 2t
|
||||
*/
|
||||
struct bch_control {
|
||||
unsigned int m;
|
||||
unsigned int n;
|
||||
unsigned int t;
|
||||
unsigned int ecc_bits;
|
||||
unsigned int ecc_bytes;
|
||||
/* private: */
|
||||
uint16_t *a_pow_tab;
|
||||
uint16_t *a_log_tab;
|
||||
uint32_t *mod8_tab;
|
||||
uint32_t *ecc_buf;
|
||||
uint32_t *ecc_buf2;
|
||||
unsigned int *xi_tab;
|
||||
unsigned int *syn;
|
||||
int *cache;
|
||||
struct gf_poly *elp;
|
||||
struct gf_poly *poly_2t[4];
|
||||
};
|
||||
|
||||
struct bch_control *init_bch(int m, int t, unsigned int prim_poly);
|
||||
|
||||
void free_bch(struct bch_control *bch);
|
||||
|
||||
void encode_bch(struct bch_control *bch, const uint8_t *data,
|
||||
unsigned int len, uint8_t *ecc);
|
||||
|
||||
int decode_bch(struct bch_control *bch, const uint8_t *data, unsigned int len,
|
||||
const uint8_t *recv_ecc, const uint8_t *calc_ecc,
|
||||
const unsigned int *syn, unsigned int *errloc);
|
||||
|
||||
#endif /* _BCH_H */
|
||||
|
|
@ -36,6 +36,7 @@ struct emac_platform_data {
|
|||
|
||||
u8 rmii_en;
|
||||
u8 version;
|
||||
bool no_bd_ram;
|
||||
void (*interrupt_enable) (void);
|
||||
void (*interrupt_disable) (void);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -633,8 +633,12 @@ static inline int devtmpfs_mount(const char *mountpoint) { return 0; }
|
|||
/* drivers/base/power/shutdown.c */
|
||||
extern void device_shutdown(void);
|
||||
|
||||
#ifndef CONFIG_ARCH_NO_SYSDEV_OPS
|
||||
/* drivers/base/sys.c */
|
||||
extern void sysdev_shutdown(void);
|
||||
#else
|
||||
static inline void sysdev_shutdown(void) { }
|
||||
#endif
|
||||
|
||||
/* debugging and troubleshooting/diagnostic helpers. */
|
||||
extern const char *dev_driver_string(const struct device *dev);
|
||||
|
|
|
|||
|
|
@ -267,9 +267,9 @@ enum {
|
|||
#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
|
||||
|
||||
#define DM_VERSION_MAJOR 4
|
||||
#define DM_VERSION_MINOR 19
|
||||
#define DM_VERSION_PATCHLEVEL 1
|
||||
#define DM_VERSION_EXTRA "-ioctl (2011-01-07)"
|
||||
#define DM_VERSION_MINOR 20
|
||||
#define DM_VERSION_PATCHLEVEL 0
|
||||
#define DM_VERSION_EXTRA "-ioctl (2011-02-02)"
|
||||
|
||||
/* Status bits */
|
||||
#define DM_READONLY_FLAG (1 << 0) /* In/Out */
|
||||
|
|
@ -328,4 +328,10 @@ enum {
|
|||
*/
|
||||
#define DM_UUID_FLAG (1 << 14) /* In */
|
||||
|
||||
/*
|
||||
* If set, all buffers are wiped after use. Use when sending
|
||||
* or requesting sensitive data such as an encryption key.
|
||||
*/
|
||||
#define DM_SECURE_DATA_FLAG (1 << 15) /* In */
|
||||
|
||||
#endif /* _LINUX_DM_IOCTL_H */
|
||||
|
|
|
|||
|
|
@ -53,10 +53,10 @@
|
|||
|
||||
|
||||
extern const char *drbd_buildtag(void);
|
||||
#define REL_VERSION "8.3.9"
|
||||
#define REL_VERSION "8.3.10"
|
||||
#define API_VERSION 88
|
||||
#define PRO_VERSION_MIN 86
|
||||
#define PRO_VERSION_MAX 95
|
||||
#define PRO_VERSION_MAX 96
|
||||
|
||||
|
||||
enum drbd_io_error_p {
|
||||
|
|
@ -96,8 +96,14 @@ enum drbd_on_no_data {
|
|||
OND_SUSPEND_IO
|
||||
};
|
||||
|
||||
enum drbd_on_congestion {
|
||||
OC_BLOCK,
|
||||
OC_PULL_AHEAD,
|
||||
OC_DISCONNECT,
|
||||
};
|
||||
|
||||
/* KEEP the order, do not delete or insert. Only append. */
|
||||
enum drbd_ret_codes {
|
||||
enum drbd_ret_code {
|
||||
ERR_CODE_BASE = 100,
|
||||
NO_ERROR = 101,
|
||||
ERR_LOCAL_ADDR = 102,
|
||||
|
|
@ -146,6 +152,9 @@ enum drbd_ret_codes {
|
|||
ERR_PERM = 152,
|
||||
ERR_NEED_APV_93 = 153,
|
||||
ERR_STONITH_AND_PROT_A = 154,
|
||||
ERR_CONG_NOT_PROTO_A = 155,
|
||||
ERR_PIC_AFTER_DEP = 156,
|
||||
ERR_PIC_PEER_DEP = 157,
|
||||
|
||||
/* insert new ones above this line */
|
||||
AFTER_LAST_ERR_CODE
|
||||
|
|
@ -199,6 +208,10 @@ enum drbd_conns {
|
|||
C_VERIFY_T,
|
||||
C_PAUSED_SYNC_S,
|
||||
C_PAUSED_SYNC_T,
|
||||
|
||||
C_AHEAD,
|
||||
C_BEHIND,
|
||||
|
||||
C_MASK = 31
|
||||
};
|
||||
|
||||
|
|
@ -259,7 +272,7 @@ union drbd_state {
|
|||
unsigned int i;
|
||||
};
|
||||
|
||||
enum drbd_state_ret_codes {
|
||||
enum drbd_state_rv {
|
||||
SS_CW_NO_NEED = 4,
|
||||
SS_CW_SUCCESS = 3,
|
||||
SS_NOTHING_TO_DO = 2,
|
||||
|
|
@ -290,7 +303,7 @@ enum drbd_state_ret_codes {
|
|||
extern const char *drbd_conn_str(enum drbd_conns);
|
||||
extern const char *drbd_role_str(enum drbd_role);
|
||||
extern const char *drbd_disk_str(enum drbd_disk_state);
|
||||
extern const char *drbd_set_st_err_str(enum drbd_state_ret_codes);
|
||||
extern const char *drbd_set_st_err_str(enum drbd_state_rv);
|
||||
|
||||
#define SHARED_SECRET_MAX 64
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@
|
|||
#define DEBUG_RANGE_CHECK 0
|
||||
|
||||
#define DRBD_MINOR_COUNT_MIN 1
|
||||
#define DRBD_MINOR_COUNT_MAX 255
|
||||
#define DRBD_MINOR_COUNT_MAX 256
|
||||
#define DRBD_MINOR_COUNT_DEF 32
|
||||
|
||||
#define DRBD_DIALOG_REFRESH_MIN 0
|
||||
#define DRBD_DIALOG_REFRESH_MAX 600
|
||||
|
|
@ -129,6 +130,7 @@
|
|||
#define DRBD_AFTER_SB_2P_DEF ASB_DISCONNECT
|
||||
#define DRBD_RR_CONFLICT_DEF ASB_DISCONNECT
|
||||
#define DRBD_ON_NO_DATA_DEF OND_IO_ERROR
|
||||
#define DRBD_ON_CONGESTION_DEF OC_BLOCK
|
||||
|
||||
#define DRBD_MAX_BIO_BVECS_MIN 0
|
||||
#define DRBD_MAX_BIO_BVECS_MAX 128
|
||||
|
|
@ -154,5 +156,13 @@
|
|||
#define DRBD_C_MIN_RATE_MAX (4 << 20)
|
||||
#define DRBD_C_MIN_RATE_DEF 4096
|
||||
|
||||
#define DRBD_CONG_FILL_MIN 0
|
||||
#define DRBD_CONG_FILL_MAX (10<<21) /* 10GByte in sectors */
|
||||
#define DRBD_CONG_FILL_DEF 0
|
||||
|
||||
#define DRBD_CONG_EXTENTS_MIN DRBD_AL_EXTENTS_MIN
|
||||
#define DRBD_CONG_EXTENTS_MAX DRBD_AL_EXTENTS_MAX
|
||||
#define DRBD_CONG_EXTENTS_DEF DRBD_AL_EXTENTS_DEF
|
||||
|
||||
#undef RANGE
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -56,6 +56,9 @@ NL_PACKET(net_conf, 5,
|
|||
NL_INTEGER( 39, T_MAY_IGNORE, rr_conflict)
|
||||
NL_INTEGER( 40, T_MAY_IGNORE, ping_timeo)
|
||||
NL_INTEGER( 67, T_MAY_IGNORE, rcvbuf_size)
|
||||
NL_INTEGER( 81, T_MAY_IGNORE, on_congestion)
|
||||
NL_INTEGER( 82, T_MAY_IGNORE, cong_fill)
|
||||
NL_INTEGER( 83, T_MAY_IGNORE, cong_extents)
|
||||
/* 59 addr_family was available in GIT, never released */
|
||||
NL_BIT( 60, T_MANDATORY, mind_af)
|
||||
NL_BIT( 27, T_MAY_IGNORE, want_lose)
|
||||
|
|
@ -66,7 +69,9 @@ NL_PACKET(net_conf, 5,
|
|||
NL_BIT( 70, T_MANDATORY, dry_run)
|
||||
)
|
||||
|
||||
NL_PACKET(disconnect, 6, )
|
||||
NL_PACKET(disconnect, 6,
|
||||
NL_BIT( 84, T_MAY_IGNORE, force)
|
||||
)
|
||||
|
||||
NL_PACKET(resize, 7,
|
||||
NL_INT64( 29, T_MAY_IGNORE, resize_size)
|
||||
|
|
@ -143,9 +148,13 @@ NL_PACKET(new_c_uuid, 26,
|
|||
NL_BIT( 63, T_MANDATORY, clear_bm)
|
||||
)
|
||||
|
||||
#ifdef NL_RESPONSE
|
||||
NL_RESPONSE(return_code_only, 27)
|
||||
#endif
|
||||
|
||||
#undef NL_PACKET
|
||||
#undef NL_INTEGER
|
||||
#undef NL_INT64
|
||||
#undef NL_BIT
|
||||
#undef NL_STRING
|
||||
|
||||
#undef NL_RESPONSE
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
/* declare packet_type enums */
|
||||
enum packet_types {
|
||||
#define NL_PACKET(name, number, fields) P_ ## name = number,
|
||||
#define NL_RESPONSE(name, number) P_ ## name = number,
|
||||
#define NL_INTEGER(pn, pr, member)
|
||||
#define NL_INT64(pn, pr, member)
|
||||
#define NL_BIT(pn, pr, member)
|
||||
|
|
|
|||
|
|
@ -648,6 +648,9 @@ enum ethtool_sfeatures_retval_bits {
|
|||
|
||||
#include <linux/rculist.h>
|
||||
|
||||
/* needed by dev_disable_lro() */
|
||||
extern int __ethtool_set_flags(struct net_device *dev, u32 flags);
|
||||
|
||||
struct ethtool_rx_ntuple_flow_spec_container {
|
||||
struct ethtool_rx_ntuple_flow_spec fs;
|
||||
struct list_head list;
|
||||
|
|
|
|||
|
|
@ -1636,7 +1636,7 @@ struct super_operations {
|
|||
};
|
||||
|
||||
/*
|
||||
* Inode state bits. Protected by inode_lock.
|
||||
* Inode state bits. Protected by inode->i_lock
|
||||
*
|
||||
* Three bits determine the dirty state of the inode, I_DIRTY_SYNC,
|
||||
* I_DIRTY_DATASYNC and I_DIRTY_PAGES.
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <asm/ptrace.h>
|
||||
#include <asm/irq_regs.h>
|
||||
|
||||
struct seq_file;
|
||||
struct irq_desc;
|
||||
struct irq_data;
|
||||
typedef void (*irq_flow_handler_t)(unsigned int irq,
|
||||
|
|
@ -270,6 +271,7 @@ static inline bool irqd_can_move_in_process_context(struct irq_data *d)
|
|||
* @irq_set_wake: enable/disable power-management wake-on of an IRQ
|
||||
* @irq_bus_lock: function to lock access to slow bus (i2c) chips
|
||||
* @irq_bus_sync_unlock:function to sync and unlock slow bus (i2c) chips
|
||||
* @irq_print_chip: optional to print special chip info in show_interrupts
|
||||
* @flags: chip specific flags
|
||||
*
|
||||
* @release: release function solely used by UML
|
||||
|
|
@ -317,6 +319,8 @@ struct irq_chip {
|
|||
void (*irq_bus_lock)(struct irq_data *data);
|
||||
void (*irq_bus_sync_unlock)(struct irq_data *data);
|
||||
|
||||
void (*irq_print_chip)(struct irq_data *data, struct seq_file *p);
|
||||
|
||||
unsigned long flags;
|
||||
|
||||
/* Currently used only by UML, might disappear one day.*/
|
||||
|
|
|
|||
|
|
@ -100,13 +100,6 @@ struct irq_desc {
|
|||
extern struct irq_desc irq_desc[NR_IRQS];
|
||||
#endif
|
||||
|
||||
/* Will be removed once the last users in power and sh are gone */
|
||||
extern struct irq_desc *irq_to_desc_alloc_node(unsigned int irq, int node);
|
||||
static inline struct irq_desc *move_irq_desc(struct irq_desc *desc, int node)
|
||||
{
|
||||
return desc;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_GENERIC_HARDIRQS
|
||||
|
||||
static inline struct irq_data *irq_desc_get_irq_data(struct irq_desc *desc)
|
||||
|
|
@ -178,7 +171,36 @@ static inline int irq_has_action(unsigned int irq)
|
|||
return desc->action != NULL;
|
||||
}
|
||||
|
||||
/* caller has locked the irq_desc and both params are valid */
|
||||
static inline void __irq_set_handler_locked(unsigned int irq,
|
||||
irq_flow_handler_t handler)
|
||||
{
|
||||
struct irq_desc *desc;
|
||||
|
||||
desc = irq_to_desc(irq);
|
||||
desc->handle_irq = handler;
|
||||
}
|
||||
|
||||
/* caller has locked the irq_desc and both params are valid */
|
||||
static inline void
|
||||
__irq_set_chip_handler_name_locked(unsigned int irq, struct irq_chip *chip,
|
||||
irq_flow_handler_t handler, const char *name)
|
||||
{
|
||||
struct irq_desc *desc;
|
||||
|
||||
desc = irq_to_desc(irq);
|
||||
irq_desc_get_irq_data(desc)->chip = chip;
|
||||
desc->handle_irq = handler;
|
||||
desc->name = name;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
|
||||
static inline void __set_irq_handler_unlocked(int irq,
|
||||
irq_flow_handler_t handler)
|
||||
{
|
||||
__irq_set_handler_locked(irq, handler);
|
||||
}
|
||||
|
||||
static inline int irq_balancing_disabled(unsigned int irq)
|
||||
{
|
||||
struct irq_desc *desc;
|
||||
|
|
@ -188,14 +210,13 @@ static inline int irq_balancing_disabled(unsigned int irq)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* caller has locked the irq_desc and both params are valid */
|
||||
static inline void __set_irq_handler_unlocked(int irq,
|
||||
irq_flow_handler_t handler)
|
||||
static inline void
|
||||
irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class)
|
||||
{
|
||||
struct irq_desc *desc;
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
|
||||
desc = irq_to_desc(irq);
|
||||
desc->handle_irq = handler;
|
||||
if (desc)
|
||||
lockdep_set_class(&desc->lock, class);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IRQ_PREFLOW_FASTEOI
|
||||
|
|
|
|||
|
|
@ -432,13 +432,35 @@ struct jbd2_journal_handle
|
|||
int h_err;
|
||||
|
||||
/* Flags [no locking] */
|
||||
unsigned int h_sync: 1; /* sync-on-close */
|
||||
unsigned int h_jdata: 1; /* force data journaling */
|
||||
unsigned int h_aborted: 1; /* fatal error on handle */
|
||||
unsigned int h_sync:1; /* sync-on-close */
|
||||
unsigned int h_jdata:1; /* force data journaling */
|
||||
unsigned int h_aborted:1; /* fatal error on handle */
|
||||
unsigned int h_cowing:1; /* COWing block to snapshot */
|
||||
|
||||
/* Number of buffers requested by user:
|
||||
* (before adding the COW credits factor) */
|
||||
unsigned int h_base_credits:14;
|
||||
|
||||
/* Number of buffers the user is allowed to dirty:
|
||||
* (counts only buffers dirtied when !h_cowing) */
|
||||
unsigned int h_user_credits:14;
|
||||
|
||||
|
||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||
struct lockdep_map h_lockdep_map;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_JBD2_DEBUG
|
||||
/* COW debugging counters: */
|
||||
unsigned int h_cow_moved; /* blocks moved to snapshot */
|
||||
unsigned int h_cow_copied; /* blocks copied to snapshot */
|
||||
unsigned int h_cow_ok_jh; /* blocks already COWed during current
|
||||
transaction */
|
||||
unsigned int h_cow_ok_bitmap; /* blocks not set in COW bitmap */
|
||||
unsigned int h_cow_ok_mapped;/* blocks already mapped in snapshot */
|
||||
unsigned int h_cow_bitmaps; /* COW bitmaps created */
|
||||
unsigned int h_cow_excluded; /* blocks set in exclude bitmap */
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,13 @@ struct journal_head {
|
|||
*/
|
||||
unsigned b_modified;
|
||||
|
||||
/*
|
||||
* This feild tracks the last transaction id in which this buffer
|
||||
* has been cowed
|
||||
* [jbd_lock_bh_state()]
|
||||
*/
|
||||
unsigned b_cow_tid;
|
||||
|
||||
/*
|
||||
* Copy of the buffer data frozen for writing to the log.
|
||||
* [jbd_lock_bh_state()]
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ const char *kallsyms_lookup(unsigned long addr,
|
|||
|
||||
/* Look up a kernel symbol and return it in a text buffer. */
|
||||
extern int sprint_symbol(char *buffer, unsigned long address);
|
||||
extern int sprint_backtrace(char *buffer, unsigned long address);
|
||||
|
||||
/* Look up a kernel symbol and print it to the kernel messages. */
|
||||
extern void __print_symbol(const char *fmt, unsigned long address);
|
||||
|
|
@ -79,6 +80,12 @@ static inline int sprint_symbol(char *buffer, unsigned long addr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int sprint_backtrace(char *buffer, unsigned long addr)
|
||||
{
|
||||
*buffer = '\0';
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int lookup_symbol_name(unsigned long addr, char *symname)
|
||||
{
|
||||
return -ERANGE;
|
||||
|
|
|
|||
|
|
@ -145,6 +145,9 @@ extern void led_trigger_register_simple(const char *name,
|
|||
extern void led_trigger_unregister_simple(struct led_trigger *trigger);
|
||||
extern void led_trigger_event(struct led_trigger *trigger,
|
||||
enum led_brightness event);
|
||||
extern void led_trigger_blink(struct led_trigger *trigger,
|
||||
unsigned long *delay_on,
|
||||
unsigned long *delay_off);
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
|||
|
|
@ -139,17 +139,23 @@ struct ab8500 {
|
|||
u8 oldmask[AB8500_NUM_IRQ_REGS];
|
||||
};
|
||||
|
||||
struct regulator_reg_init;
|
||||
struct regulator_init_data;
|
||||
|
||||
/**
|
||||
* struct ab8500_platform_data - AB8500 platform data
|
||||
* @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used
|
||||
* @init: board-specific initialization after detection of ab8500
|
||||
* @num_regulator_reg_init: number of regulator init registers
|
||||
* @regulator_reg_init: regulator init registers
|
||||
* @num_regulator: number of regulators
|
||||
* @regulator: machine-specific constraints for regulators
|
||||
*/
|
||||
struct ab8500_platform_data {
|
||||
int irq_base;
|
||||
void (*init) (struct ab8500 *);
|
||||
int num_regulator_reg_init;
|
||||
struct ab8500_regulator_reg_init *regulator_reg_init;
|
||||
int num_regulator;
|
||||
struct regulator_init_data *regulator;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -62,6 +62,24 @@ struct mfd_cell {
|
|||
extern int mfd_cell_enable(struct platform_device *pdev);
|
||||
extern int mfd_cell_disable(struct platform_device *pdev);
|
||||
|
||||
/*
|
||||
* "Clone" multiple platform devices for a single cell. This is to be used
|
||||
* for devices that have multiple users of a cell. For example, if an mfd
|
||||
* driver wants the cell "foo" to be used by a GPIO driver, an MTD driver,
|
||||
* and a platform driver, the following bit of code would be use after first
|
||||
* calling mfd_add_devices():
|
||||
*
|
||||
* const char *fclones[] = { "foo-gpio", "foo-mtd" };
|
||||
* err = mfd_clone_cells("foo", fclones, ARRAY_SIZE(fclones));
|
||||
*
|
||||
* Each driver (MTD, GPIO, and platform driver) would then register
|
||||
* platform_drivers for "foo-mtd", "foo-gpio", and "foo", respectively.
|
||||
* The cell's .enable/.disable hooks should be used to deal with hardware
|
||||
* resource contention.
|
||||
*/
|
||||
extern int mfd_clone_cell(const char *cell, const char **clones,
|
||||
size_t n_clones);
|
||||
|
||||
/*
|
||||
* Given a platform device that's been created by mfd_add_devices(), fetch
|
||||
* the mfd_cell that created it.
|
||||
|
|
@ -87,13 +105,4 @@ extern int mfd_add_devices(struct device *parent, int id,
|
|||
|
||||
extern void mfd_remove_devices(struct device *parent);
|
||||
|
||||
/*
|
||||
* For MFD drivers with clients sharing access to resources, these create
|
||||
* multiple platform devices per cell. Contention handling must still be
|
||||
* handled via drivers (ie, with enable/disable hooks).
|
||||
*/
|
||||
extern int mfd_shared_platform_driver_register(struct platform_driver *drv,
|
||||
const char *cellname);
|
||||
extern void mfd_shared_platform_driver_unregister(struct platform_driver *drv);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
#include <linux/i2c.h>
|
||||
|
||||
#define MAX8997_REG_INVALID (0xff)
|
||||
|
||||
enum max8997_pmic_reg {
|
||||
MAX8997_REG_PMIC_ID0 = 0x00,
|
||||
MAX8997_REG_PMIC_ID1 = 0x01,
|
||||
|
|
@ -313,6 +315,7 @@ enum max8997_irq {
|
|||
#define MAX8997_REG_BUCK2DVS(x) (MAX8997_REG_BUCK2DVS1 + (x) - 1)
|
||||
#define MAX8997_REG_BUCK5DVS(x) (MAX8997_REG_BUCK5DVS1 + (x) - 1)
|
||||
|
||||
#define MAX8997_NUM_GPIO 12
|
||||
struct max8997_dev {
|
||||
struct device *dev;
|
||||
struct i2c_client *i2c; /* 0xcc / PMIC, Battery Control, and FLASH */
|
||||
|
|
@ -324,11 +327,19 @@ struct max8997_dev {
|
|||
int type;
|
||||
struct platform_device *battery; /* battery control (not fuel gauge) */
|
||||
|
||||
int irq;
|
||||
int ono;
|
||||
int irq_base;
|
||||
bool wakeup;
|
||||
struct mutex irqlock;
|
||||
int irq_masks_cur[MAX8997_IRQ_GROUP_NR];
|
||||
int irq_masks_cache[MAX8997_IRQ_GROUP_NR];
|
||||
|
||||
/* For hibernation */
|
||||
u8 reg_dump[MAX8997_REG_PMIC_END + MAX8997_MUIC_REG_END +
|
||||
MAX8997_HAPTIC_REG_END];
|
||||
|
||||
bool gpio_status[MAX8997_NUM_GPIO];
|
||||
};
|
||||
|
||||
enum max8997_types {
|
||||
|
|
@ -336,6 +347,10 @@ enum max8997_types {
|
|||
TYPE_MAX8966,
|
||||
};
|
||||
|
||||
extern int max8997_irq_init(struct max8997_dev *max8997);
|
||||
extern void max8997_irq_exit(struct max8997_dev *max8997);
|
||||
extern int max8997_irq_resume(struct max8997_dev *max8997);
|
||||
|
||||
extern int max8997_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest);
|
||||
extern int max8997_bulk_read(struct i2c_client *i2c, u8 reg, int count,
|
||||
u8 *buf);
|
||||
|
|
@ -344,4 +359,10 @@ extern int max8997_bulk_write(struct i2c_client *i2c, u8 reg, int count,
|
|||
u8 *buf);
|
||||
extern int max8997_update_reg(struct i2c_client *i2c, u8 reg, u8 val, u8 mask);
|
||||
|
||||
#define MAX8997_GPIO_INT_BOTH (0x3 << 4)
|
||||
#define MAX8997_GPIO_INT_RISE (0x2 << 4)
|
||||
#define MAX8997_GPIO_INT_FALL (0x1 << 4)
|
||||
|
||||
#define MAX8997_GPIO_INT_MASK (0x3 << 4)
|
||||
#define MAX8997_GPIO_DATA_MASK (0x1 << 2)
|
||||
#endif /* __LINUX_MFD_MAX8997_PRIV_H */
|
||||
|
|
|
|||
|
|
@ -78,8 +78,11 @@ struct max8997_regulator_data {
|
|||
};
|
||||
|
||||
struct max8997_platform_data {
|
||||
bool wakeup;
|
||||
/* IRQ: Not implemented */
|
||||
/* IRQ */
|
||||
int irq_base;
|
||||
int ono;
|
||||
int wakeup;
|
||||
|
||||
/* ---- PMIC ---- */
|
||||
struct max8997_regulator_data *regulators;
|
||||
int num_regulators;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,11 @@
|
|||
|
||||
#include <asm/atomic.h>
|
||||
|
||||
#define MAX_MSIX_P_PORT 17
|
||||
#define MAX_MSIX 64
|
||||
#define MSIX_LEGACY_SZ 4
|
||||
#define MIN_MSIX_P_PORT 5
|
||||
|
||||
enum {
|
||||
MLX4_FLAG_MSI_X = 1 << 0,
|
||||
MLX4_FLAG_OLD_PORT_CMDS = 1 << 1,
|
||||
|
|
@ -145,8 +150,10 @@ enum {
|
|||
};
|
||||
|
||||
enum mlx4_protocol {
|
||||
MLX4_PROTOCOL_IB,
|
||||
MLX4_PROTOCOL_EN,
|
||||
MLX4_PROT_IB_IPV6 = 0,
|
||||
MLX4_PROT_ETH,
|
||||
MLX4_PROT_IB_IPV4,
|
||||
MLX4_PROT_FCOE
|
||||
};
|
||||
|
||||
enum {
|
||||
|
|
@ -173,6 +180,12 @@ enum mlx4_special_vlan_idx {
|
|||
MLX4_VLAN_REGULAR
|
||||
};
|
||||
|
||||
enum mlx4_steer_type {
|
||||
MLX4_MC_STEER = 0,
|
||||
MLX4_UC_STEER,
|
||||
MLX4_NUM_STEERS
|
||||
};
|
||||
|
||||
enum {
|
||||
MLX4_NUM_FEXCH = 64 * 1024,
|
||||
};
|
||||
|
|
@ -223,6 +236,7 @@ struct mlx4_caps {
|
|||
int num_eqs;
|
||||
int reserved_eqs;
|
||||
int num_comp_vectors;
|
||||
int comp_pool;
|
||||
int num_mpts;
|
||||
int num_mtt_segs;
|
||||
int mtts_per_seg;
|
||||
|
|
@ -245,6 +259,9 @@ struct mlx4_caps {
|
|||
u16 stat_rate_support;
|
||||
int udp_rss;
|
||||
int loopback_support;
|
||||
int vep_uc_steering;
|
||||
int vep_mc_steering;
|
||||
int wol;
|
||||
u8 port_width_cap[MLX4_MAX_PORTS + 1];
|
||||
int max_gso_sz;
|
||||
int reserved_qps_cnt[MLX4_NUM_QP_REGION];
|
||||
|
|
@ -334,6 +351,17 @@ struct mlx4_fmr {
|
|||
struct mlx4_uar {
|
||||
unsigned long pfn;
|
||||
int index;
|
||||
struct list_head bf_list;
|
||||
unsigned free_bf_bmap;
|
||||
void __iomem *map;
|
||||
void __iomem *bf_map;
|
||||
};
|
||||
|
||||
struct mlx4_bf {
|
||||
unsigned long offset;
|
||||
int buf_size;
|
||||
struct mlx4_uar *uar;
|
||||
void __iomem *reg;
|
||||
};
|
||||
|
||||
struct mlx4_cq {
|
||||
|
|
@ -415,7 +443,7 @@ struct mlx4_dev {
|
|||
unsigned long flags;
|
||||
struct mlx4_caps caps;
|
||||
struct radix_tree_root qp_table_tree;
|
||||
u32 rev_id;
|
||||
u8 rev_id;
|
||||
char board_id[MLX4_BOARD_ID_LEN];
|
||||
};
|
||||
|
||||
|
|
@ -461,6 +489,8 @@ void mlx4_pd_free(struct mlx4_dev *dev, u32 pdn);
|
|||
|
||||
int mlx4_uar_alloc(struct mlx4_dev *dev, struct mlx4_uar *uar);
|
||||
void mlx4_uar_free(struct mlx4_dev *dev, struct mlx4_uar *uar);
|
||||
int mlx4_bf_alloc(struct mlx4_dev *dev, struct mlx4_bf *bf);
|
||||
void mlx4_bf_free(struct mlx4_dev *dev, struct mlx4_bf *bf);
|
||||
|
||||
int mlx4_mtt_init(struct mlx4_dev *dev, int npages, int page_shift,
|
||||
struct mlx4_mtt *mtt);
|
||||
|
|
@ -508,9 +538,15 @@ int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
|
|||
int block_mcast_loopback, enum mlx4_protocol protocol);
|
||||
int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
|
||||
enum mlx4_protocol protocol);
|
||||
int mlx4_multicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port);
|
||||
int mlx4_multicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port);
|
||||
int mlx4_unicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port);
|
||||
int mlx4_unicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port);
|
||||
int mlx4_SET_MCAST_FLTR(struct mlx4_dev *dev, u8 port, u64 mac, u64 clear, u8 mode);
|
||||
|
||||
int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index);
|
||||
void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int index);
|
||||
int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn, u8 wrap);
|
||||
void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int qpn);
|
||||
int mlx4_replace_mac(struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac, u8 wrap);
|
||||
|
||||
int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx);
|
||||
int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index);
|
||||
|
|
@ -526,5 +562,10 @@ void mlx4_fmr_unmap(struct mlx4_dev *dev, struct mlx4_fmr *fmr,
|
|||
int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr);
|
||||
int mlx4_SYNC_TPT(struct mlx4_dev *dev);
|
||||
int mlx4_test_interrupts(struct mlx4_dev *dev);
|
||||
int mlx4_assign_eq(struct mlx4_dev *dev, char* name , int* vector);
|
||||
void mlx4_release_eq(struct mlx4_dev *dev, int vec);
|
||||
|
||||
int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port);
|
||||
int mlx4_wol_write(struct mlx4_dev *dev, u64 config, int port);
|
||||
|
||||
#endif /* MLX4_DEVICE_H */
|
||||
|
|
|
|||
|
|
@ -303,6 +303,7 @@ struct mlx4_wqe_data_seg {
|
|||
|
||||
enum {
|
||||
MLX4_INLINE_ALIGN = 64,
|
||||
MLX4_INLINE_SEG = 1 << 31,
|
||||
};
|
||||
|
||||
struct mlx4_wqe_inline_seg {
|
||||
|
|
|
|||
|
|
@ -861,7 +861,7 @@ extern void pagefault_out_of_memory(void);
|
|||
#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK)
|
||||
|
||||
/*
|
||||
* Flags passed to __show_mem() and __show_free_areas() to suppress output in
|
||||
* Flags passed to show_mem() and __show_free_areas() to suppress output in
|
||||
* various contexts.
|
||||
*/
|
||||
#define SHOW_MEM_FILTER_NODES (0x0001u) /* filter disallowed nodes */
|
||||
|
|
@ -1360,8 +1360,7 @@ extern void setup_per_zone_wmarks(void);
|
|||
extern void calculate_zone_inactive_ratio(struct zone *zone);
|
||||
extern void mem_init(void);
|
||||
extern void __init mmap_init(void);
|
||||
extern void show_mem(void);
|
||||
extern void __show_mem(unsigned int flags);
|
||||
extern void show_mem(unsigned int flags);
|
||||
extern void si_meminfo(struct sysinfo * val);
|
||||
extern void si_meminfo_node(struct sysinfo *val, int nid);
|
||||
extern int after_bootmem;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ struct mtd_blktrans_dev {
|
|||
struct mtd_info *mtd;
|
||||
struct mutex lock;
|
||||
int devnum;
|
||||
bool bg_stop;
|
||||
unsigned long size;
|
||||
int readonly;
|
||||
int open;
|
||||
|
|
@ -62,6 +63,7 @@ struct mtd_blktrans_ops {
|
|||
unsigned long block, char *buffer);
|
||||
int (*discard)(struct mtd_blktrans_dev *dev,
|
||||
unsigned long block, unsigned nr_blocks);
|
||||
void (*background)(struct mtd_blktrans_dev *dev);
|
||||
|
||||
/* Block layer ioctls */
|
||||
int (*getgeo)(struct mtd_blktrans_dev *dev, struct hd_geometry *geo);
|
||||
|
|
@ -85,6 +87,7 @@ extern int register_mtd_blktrans(struct mtd_blktrans_ops *tr);
|
|||
extern int deregister_mtd_blktrans(struct mtd_blktrans_ops *tr);
|
||||
extern int add_mtd_blktrans_dev(struct mtd_blktrans_dev *dev);
|
||||
extern int del_mtd_blktrans_dev(struct mtd_blktrans_dev *dev);
|
||||
extern int mtd_blktrans_cease_background(struct mtd_blktrans_dev *dev);
|
||||
|
||||
|
||||
#endif /* __MTD_TRANS_H__ */
|
||||
|
|
|
|||
|
|
@ -535,6 +535,7 @@ struct cfi_fixup {
|
|||
#define CFI_MFR_CONTINUATION 0x007F
|
||||
|
||||
#define CFI_MFR_AMD 0x0001
|
||||
#define CFI_MFR_AMIC 0x0037
|
||||
#define CFI_MFR_ATMEL 0x001F
|
||||
#define CFI_MFR_EON 0x001C
|
||||
#define CFI_MFR_FUJITSU 0x0004
|
||||
|
|
|
|||
29
include/linux/mtd/latch-addr-flash.h
Normal file
29
include/linux/mtd/latch-addr-flash.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Interface for NOR flash driver whose high address lines are latched
|
||||
*
|
||||
* Copyright © 2008 MontaVista Software, Inc. <source@mvista.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public License
|
||||
* version 2. This program is licensed "as is" without any warranty of any
|
||||
* kind, whether express or implied.
|
||||
*/
|
||||
#ifndef __LATCH_ADDR_FLASH__
|
||||
#define __LATCH_ADDR_FLASH__
|
||||
|
||||
struct map_info;
|
||||
struct mtd_partition;
|
||||
|
||||
struct latch_addr_flash_data {
|
||||
unsigned int width;
|
||||
unsigned int size;
|
||||
|
||||
int (*init)(void *data, int cs);
|
||||
void (*done)(void *data);
|
||||
void (*set_window)(unsigned long offset, void *data);
|
||||
void *data;
|
||||
|
||||
unsigned int nr_parts;
|
||||
struct mtd_partition *parts;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -140,6 +140,7 @@ typedef enum {
|
|||
NAND_ECC_HW,
|
||||
NAND_ECC_HW_SYNDROME,
|
||||
NAND_ECC_HW_OOB_FIRST,
|
||||
NAND_ECC_SOFT_BCH,
|
||||
} nand_ecc_modes_t;
|
||||
|
||||
/*
|
||||
|
|
@ -339,6 +340,7 @@ struct nand_hw_control {
|
|||
* @prepad: padding information for syndrome based ecc generators
|
||||
* @postpad: padding information for syndrome based ecc generators
|
||||
* @layout: ECC layout control struct pointer
|
||||
* @priv: pointer to private ecc control data
|
||||
* @hwctl: function to control hardware ecc generator. Must only
|
||||
* be provided if an hardware ECC is available
|
||||
* @calculate: function for ecc calculation or readback from ecc hardware
|
||||
|
|
@ -362,6 +364,7 @@ struct nand_ecc_ctrl {
|
|||
int prepad;
|
||||
int postpad;
|
||||
struct nand_ecclayout *layout;
|
||||
void *priv;
|
||||
void (*hwctl)(struct mtd_info *mtd, int mode);
|
||||
int (*calculate)(struct mtd_info *mtd, const uint8_t *dat,
|
||||
uint8_t *ecc_code);
|
||||
|
|
|
|||
72
include/linux/mtd/nand_bch.h
Normal file
72
include/linux/mtd/nand_bch.h
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright © 2011 Ivan Djelic <ivan.djelic@parrot.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* This file is the header for the NAND BCH ECC implementation.
|
||||
*/
|
||||
|
||||
#ifndef __MTD_NAND_BCH_H__
|
||||
#define __MTD_NAND_BCH_H__
|
||||
|
||||
struct mtd_info;
|
||||
struct nand_bch_control;
|
||||
|
||||
#if defined(CONFIG_MTD_NAND_ECC_BCH)
|
||||
|
||||
static inline int mtd_nand_has_bch(void) { return 1; }
|
||||
|
||||
/*
|
||||
* Calculate BCH ecc code
|
||||
*/
|
||||
int nand_bch_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
|
||||
u_char *ecc_code);
|
||||
|
||||
/*
|
||||
* Detect and correct bit errors
|
||||
*/
|
||||
int nand_bch_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc,
|
||||
u_char *calc_ecc);
|
||||
/*
|
||||
* Initialize BCH encoder/decoder
|
||||
*/
|
||||
struct nand_bch_control *
|
||||
nand_bch_init(struct mtd_info *mtd, unsigned int eccsize,
|
||||
unsigned int eccbytes, struct nand_ecclayout **ecclayout);
|
||||
/*
|
||||
* Release BCH encoder/decoder resources
|
||||
*/
|
||||
void nand_bch_free(struct nand_bch_control *nbc);
|
||||
|
||||
#else /* !CONFIG_MTD_NAND_ECC_BCH */
|
||||
|
||||
static inline int mtd_nand_has_bch(void) { return 0; }
|
||||
|
||||
static inline int
|
||||
nand_bch_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
|
||||
u_char *ecc_code)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline int
|
||||
nand_bch_correct_data(struct mtd_info *mtd, unsigned char *buf,
|
||||
unsigned char *read_ecc, unsigned char *calc_ecc)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline struct nand_bch_control *
|
||||
nand_bch_init(struct mtd_info *mtd, unsigned int eccsize,
|
||||
unsigned int eccbytes, struct nand_ecclayout **ecclayout)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void nand_bch_free(struct nand_bch_control *nbc) {}
|
||||
|
||||
#endif /* CONFIG_MTD_NAND_ECC_BCH */
|
||||
|
||||
#endif /* __MTD_NAND_BCH_H__ */
|
||||
|
|
@ -198,6 +198,7 @@ struct onenand_chip {
|
|||
#define ONENAND_SKIP_UNLOCK_CHECK (0x0100)
|
||||
#define ONENAND_PAGEBUF_ALLOC (0x1000)
|
||||
#define ONENAND_OOBBUF_ALLOC (0x2000)
|
||||
#define ONENAND_SKIP_INITIAL_UNLOCKING (0x4000)
|
||||
|
||||
#define ONENAND_IS_4KB_PAGE(this) \
|
||||
(this->options & ONENAND_HAS_4KB_PAGE)
|
||||
|
|
|
|||
|
|
@ -550,6 +550,7 @@ enum {
|
|||
NFSPROC4_CLNT_SETACL,
|
||||
NFSPROC4_CLNT_FS_LOCATIONS,
|
||||
NFSPROC4_CLNT_RELEASE_LOCKOWNER,
|
||||
NFSPROC4_CLNT_SECINFO,
|
||||
|
||||
/* nfs41 */
|
||||
NFSPROC4_CLNT_EXCHANGE_ID,
|
||||
|
|
@ -560,6 +561,7 @@ enum {
|
|||
NFSPROC4_CLNT_RECLAIM_COMPLETE,
|
||||
NFSPROC4_CLNT_LAYOUTGET,
|
||||
NFSPROC4_CLNT_GETDEVICEINFO,
|
||||
NFSPROC4_CLNT_LAYOUTCOMMIT,
|
||||
};
|
||||
|
||||
/* nfs41 types */
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@
|
|||
#define FLUSH_STABLE 4 /* commit to stable storage */
|
||||
#define FLUSH_LOWPRI 8 /* low priority background flush */
|
||||
#define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */
|
||||
#define FLUSH_COND_STABLE 32 /* conditional stable write - only stable
|
||||
* if everything fits in one RPC */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
|
|
@ -93,8 +95,13 @@ struct nfs_open_context {
|
|||
int error;
|
||||
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
struct nfs_open_dir_context {
|
||||
struct rpc_cred *cred;
|
||||
__u64 dir_cookie;
|
||||
__u64 dup_cookie;
|
||||
int duped;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -191,6 +198,7 @@ struct nfs_inode {
|
|||
|
||||
/* pNFS layout information */
|
||||
struct pnfs_layout_hdr *layout;
|
||||
atomic_t commits_outstanding;
|
||||
#endif /* CONFIG_NFS_V4*/
|
||||
#ifdef CONFIG_NFS_FSCACHE
|
||||
struct fscache_cookie *fscache;
|
||||
|
|
@ -219,6 +227,8 @@ struct nfs_inode {
|
|||
#define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */
|
||||
#define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */
|
||||
#define NFS_INO_COMMIT (7) /* inode is committing unstable writes */
|
||||
#define NFS_INO_PNFS_COMMIT (8) /* use pnfs code for commit */
|
||||
#define NFS_INO_LAYOUTCOMMIT (9) /* layoutcommit required */
|
||||
|
||||
static inline struct nfs_inode *NFS_I(const struct inode *inode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,11 +33,15 @@ enum {
|
|||
PG_CLEAN,
|
||||
PG_NEED_COMMIT,
|
||||
PG_NEED_RESCHED,
|
||||
PG_PNFS_COMMIT,
|
||||
};
|
||||
|
||||
struct nfs_inode;
|
||||
struct nfs_page {
|
||||
struct list_head wb_list; /* Defines state of page: */
|
||||
union {
|
||||
struct list_head wb_list; /* Defines state of page: */
|
||||
struct pnfs_layout_segment *wb_commit_lseg; /* Used when PG_PNFS_COMMIT set */
|
||||
};
|
||||
struct page *wb_page; /* page to read in/write out */
|
||||
struct nfs_open_context *wb_context; /* File state context info */
|
||||
struct nfs_lock_context *wb_lock_context; /* lock context info */
|
||||
|
|
@ -57,6 +61,7 @@ struct nfs_pageio_descriptor {
|
|||
size_t pg_count;
|
||||
size_t pg_bsize;
|
||||
unsigned int pg_base;
|
||||
char pg_moreio;
|
||||
|
||||
struct inode *pg_inode;
|
||||
int (*pg_doio)(struct nfs_pageio_descriptor *);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <linux/nfsacl.h>
|
||||
#include <linux/nfs3.h>
|
||||
#include <linux/sunrpc/gss_api.h>
|
||||
|
||||
/*
|
||||
* To change the maximum rsize and wsize supported by the NFS client, adjust
|
||||
|
|
@ -14,6 +15,9 @@
|
|||
#define NFS_DEF_FILE_IO_SIZE (4096U)
|
||||
#define NFS_MIN_FILE_IO_SIZE (1024U)
|
||||
|
||||
/* Forward declaration for NFS v3 */
|
||||
struct nfs4_secinfo_flavors;
|
||||
|
||||
struct nfs_fsid {
|
||||
uint64_t major;
|
||||
uint64_t minor;
|
||||
|
|
@ -78,6 +82,7 @@ struct nfs_fattr {
|
|||
#define NFS_ATTR_FATTR_CHANGE (1U << 17)
|
||||
#define NFS_ATTR_FATTR_PRECHANGE (1U << 18)
|
||||
#define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */
|
||||
#define NFS_ATTR_FATTR_MOUNTPOINT (1U << 20) /* Treat as mountpoint */
|
||||
|
||||
#define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \
|
||||
| NFS_ATTR_FATTR_MODE \
|
||||
|
|
@ -190,8 +195,9 @@ struct nfs4_get_lease_time_res {
|
|||
#define PNFS_LAYOUT_MAXSIZE 4096
|
||||
|
||||
struct nfs4_layoutdriver_data {
|
||||
struct page **pages;
|
||||
__u32 pglen;
|
||||
__u32 len;
|
||||
void *buf;
|
||||
};
|
||||
|
||||
struct pnfs_layout_range {
|
||||
|
|
@ -209,6 +215,7 @@ struct nfs4_layoutget_args {
|
|||
struct nfs_open_context *ctx;
|
||||
struct nfs4_sequence_args seq_args;
|
||||
nfs4_stateid stateid;
|
||||
struct nfs4_layoutdriver_data layout;
|
||||
};
|
||||
|
||||
struct nfs4_layoutget_res {
|
||||
|
|
@ -216,8 +223,8 @@ struct nfs4_layoutget_res {
|
|||
struct pnfs_layout_range range;
|
||||
__u32 type;
|
||||
nfs4_stateid stateid;
|
||||
struct nfs4_layoutdriver_data layout;
|
||||
struct nfs4_sequence_res seq_res;
|
||||
struct nfs4_layoutdriver_data *layoutp;
|
||||
};
|
||||
|
||||
struct nfs4_layoutget {
|
||||
|
|
@ -236,6 +243,29 @@ struct nfs4_getdeviceinfo_res {
|
|||
struct nfs4_sequence_res seq_res;
|
||||
};
|
||||
|
||||
struct nfs4_layoutcommit_args {
|
||||
nfs4_stateid stateid;
|
||||
__u64 lastbytewritten;
|
||||
struct inode *inode;
|
||||
const u32 *bitmask;
|
||||
struct nfs4_sequence_args seq_args;
|
||||
};
|
||||
|
||||
struct nfs4_layoutcommit_res {
|
||||
struct nfs_fattr *fattr;
|
||||
const struct nfs_server *server;
|
||||
struct nfs4_sequence_res seq_res;
|
||||
};
|
||||
|
||||
struct nfs4_layoutcommit_data {
|
||||
struct rpc_task task;
|
||||
struct nfs_fattr fattr;
|
||||
struct pnfs_layout_segment *lseg;
|
||||
struct rpc_cred *cred;
|
||||
struct nfs4_layoutcommit_args args;
|
||||
struct nfs4_layoutcommit_res res;
|
||||
};
|
||||
|
||||
/*
|
||||
* Arguments to the open call.
|
||||
*/
|
||||
|
|
@ -936,6 +966,38 @@ struct nfs4_fs_locations_res {
|
|||
struct nfs4_sequence_res seq_res;
|
||||
};
|
||||
|
||||
struct nfs4_secinfo_oid {
|
||||
unsigned int len;
|
||||
char data[GSS_OID_MAX_LEN];
|
||||
};
|
||||
|
||||
struct nfs4_secinfo_gss {
|
||||
struct nfs4_secinfo_oid sec_oid4;
|
||||
unsigned int qop4;
|
||||
unsigned int service;
|
||||
};
|
||||
|
||||
struct nfs4_secinfo_flavor {
|
||||
unsigned int flavor;
|
||||
struct nfs4_secinfo_gss gss;
|
||||
};
|
||||
|
||||
struct nfs4_secinfo_flavors {
|
||||
unsigned int num_flavors;
|
||||
struct nfs4_secinfo_flavor flavors[0];
|
||||
};
|
||||
|
||||
struct nfs4_secinfo_arg {
|
||||
const struct nfs_fh *dir_fh;
|
||||
const struct qstr *name;
|
||||
struct nfs4_sequence_args seq_args;
|
||||
};
|
||||
|
||||
struct nfs4_secinfo_res {
|
||||
struct nfs4_secinfo_flavors *flavors;
|
||||
struct nfs4_sequence_res seq_res;
|
||||
};
|
||||
|
||||
#endif /* CONFIG_NFS_V4 */
|
||||
|
||||
struct nfstime4 {
|
||||
|
|
@ -1040,6 +1102,7 @@ struct nfs_write_data {
|
|||
struct nfs_writeres res; /* result struct */
|
||||
struct pnfs_layout_segment *lseg;
|
||||
struct nfs_client *ds_clp; /* pNFS data server */
|
||||
int ds_commit_index;
|
||||
const struct rpc_call_ops *mds_ops;
|
||||
int (*write_done_cb) (struct rpc_task *task, struct nfs_write_data *data);
|
||||
#ifdef CONFIG_NFS_V4
|
||||
|
|
@ -1071,7 +1134,7 @@ struct nfs_rpc_ops {
|
|||
struct nfs_fattr *);
|
||||
int (*setattr) (struct dentry *, struct nfs_fattr *,
|
||||
struct iattr *);
|
||||
int (*lookup) (struct inode *, struct qstr *,
|
||||
int (*lookup) (struct rpc_clnt *clnt, struct inode *, struct qstr *,
|
||||
struct nfs_fh *, struct nfs_fattr *);
|
||||
int (*access) (struct inode *, struct nfs_access_entry *);
|
||||
int (*readlink)(struct inode *, struct page *, unsigned int,
|
||||
|
|
@ -1118,6 +1181,7 @@ struct nfs_rpc_ops {
|
|||
struct iattr *iattr);
|
||||
int (*init_client) (struct nfs_client *, const struct rpc_timeout *,
|
||||
const char *, rpc_authflavor_t, int);
|
||||
int (*secinfo)(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *);
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
extern void pcie_aspm_init_link_state(struct pci_dev *pdev);
|
||||
extern void pcie_aspm_exit_link_state(struct pci_dev *pdev);
|
||||
extern void pcie_aspm_pm_state_change(struct pci_dev *pdev);
|
||||
extern void pcie_aspm_powersave_config_link(struct pci_dev *pdev);
|
||||
extern void pci_disable_link_state(struct pci_dev *pdev, int state);
|
||||
extern void pcie_clear_aspm(void);
|
||||
extern void pcie_no_aspm(void);
|
||||
|
|
@ -39,6 +40,9 @@ static inline void pcie_aspm_exit_link_state(struct pci_dev *pdev)
|
|||
static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev)
|
||||
{
|
||||
}
|
||||
static inline void pcie_aspm_powersave_config_link(struct pci_dev *pdev)
|
||||
{
|
||||
}
|
||||
static inline void pci_disable_link_state(struct pci_dev *pdev, int state)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1002,12 +1002,11 @@ extern bool pcie_ports_auto;
|
|||
#endif
|
||||
|
||||
#ifndef CONFIG_PCIEASPM
|
||||
static inline int pcie_aspm_enabled(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int pcie_aspm_enabled(void) { return 0; }
|
||||
static inline bool pcie_aspm_support_enabled(void) { return false; }
|
||||
#else
|
||||
extern int pcie_aspm_enabled(void);
|
||||
extern bool pcie_aspm_support_enabled(void);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PCIEAER
|
||||
|
|
|
|||
|
|
@ -938,9 +938,7 @@ struct perf_cpu_context {
|
|||
struct list_head rotation_list;
|
||||
int jiffies_interval;
|
||||
struct pmu *active_pmu;
|
||||
#ifdef CONFIG_CGROUP_PERF
|
||||
struct perf_cgroup *cgrp;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct perf_output_handle {
|
||||
|
|
|
|||
|
|
@ -529,13 +529,19 @@ struct dev_power_domain {
|
|||
*/
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
extern void device_pm_lock(void);
|
||||
#ifndef CONFIG_ARCH_NO_SYSDEV_OPS
|
||||
extern int sysdev_suspend(pm_message_t state);
|
||||
extern int sysdev_resume(void);
|
||||
#else
|
||||
static inline int sysdev_suspend(pm_message_t state) { return 0; }
|
||||
static inline int sysdev_resume(void) { return 0; }
|
||||
#endif
|
||||
|
||||
extern void device_pm_lock(void);
|
||||
extern void dpm_resume_noirq(pm_message_t state);
|
||||
extern void dpm_resume_end(pm_message_t state);
|
||||
|
||||
extern void device_pm_unlock(void);
|
||||
extern int sysdev_suspend(pm_message_t state);
|
||||
extern int dpm_suspend_noirq(pm_message_t state);
|
||||
extern int dpm_suspend_start(pm_message_t state);
|
||||
|
||||
|
|
|
|||
39
include/linux/power/bq20z75.h
Normal file
39
include/linux/power/bq20z75.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Gas Gauge driver for TI's BQ20Z75
|
||||
*
|
||||
* Copyright (c) 2010, NVIDIA Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_POWER_BQ20Z75_H_
|
||||
#define __LINUX_POWER_BQ20Z75_H_
|
||||
|
||||
#include <linux/power_supply.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/**
|
||||
* struct bq20z75_platform_data - platform data for bq20z75 devices
|
||||
* @battery_detect: GPIO which is used to detect battery presence
|
||||
* @battery_detect_present: gpio state when battery is present (0 / 1)
|
||||
* @i2c_retry_count: # of times to retry on i2c IO failure
|
||||
*/
|
||||
struct bq20z75_platform_data {
|
||||
int battery_detect;
|
||||
int battery_detect_present;
|
||||
int i2c_retry_count;
|
||||
};
|
||||
|
||||
#endif
|
||||
19
include/linux/power/bq27x00_battery.h
Normal file
19
include/linux/power/bq27x00_battery.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef __LINUX_BQ27X00_BATTERY_H__
|
||||
#define __LINUX_BQ27X00_BATTERY_H__
|
||||
|
||||
/**
|
||||
* struct bq27000_plaform_data - Platform data for bq27000 devices
|
||||
* @name: Name of the battery. If NULL the driver will fallback to "bq27000".
|
||||
* @read: HDQ read callback.
|
||||
* This function should provide access to the HDQ bus the battery is
|
||||
* connected to.
|
||||
* The first parameter is a pointer to the battery device, the second the
|
||||
* register to be read. The return value should either be the content of
|
||||
* the passed register or an error value.
|
||||
*/
|
||||
struct bq27000_platform_data {
|
||||
const char *name;
|
||||
int (*read)(struct device *dev, unsigned int);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -173,6 +173,8 @@ struct power_supply {
|
|||
char *full_trig_name;
|
||||
struct led_trigger *online_trig;
|
||||
char *online_trig_name;
|
||||
struct led_trigger *charging_blink_full_solid_trig;
|
||||
char *charging_blink_full_solid_trig_name;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
@ -213,4 +215,49 @@ extern void power_supply_unregister(struct power_supply *psy);
|
|||
/* For APM emulation, think legacy userspace. */
|
||||
extern struct class *power_supply_class;
|
||||
|
||||
static inline bool power_supply_is_amp_property(enum power_supply_property psp)
|
||||
{
|
||||
switch (psp) {
|
||||
case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN:
|
||||
case POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN:
|
||||
case POWER_SUPPLY_PROP_CHARGE_FULL:
|
||||
case POWER_SUPPLY_PROP_CHARGE_EMPTY:
|
||||
case POWER_SUPPLY_PROP_CHARGE_NOW:
|
||||
case POWER_SUPPLY_PROP_CHARGE_AVG:
|
||||
case POWER_SUPPLY_PROP_CHARGE_COUNTER:
|
||||
case POWER_SUPPLY_PROP_CURRENT_MAX:
|
||||
case POWER_SUPPLY_PROP_CURRENT_NOW:
|
||||
case POWER_SUPPLY_PROP_CURRENT_AVG:
|
||||
return 1;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline bool power_supply_is_watt_property(enum power_supply_property psp)
|
||||
{
|
||||
switch (psp) {
|
||||
case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN:
|
||||
case POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN:
|
||||
case POWER_SUPPLY_PROP_ENERGY_FULL:
|
||||
case POWER_SUPPLY_PROP_ENERGY_EMPTY:
|
||||
case POWER_SUPPLY_PROP_ENERGY_NOW:
|
||||
case POWER_SUPPLY_PROP_ENERGY_AVG:
|
||||
case POWER_SUPPLY_PROP_VOLTAGE_MAX:
|
||||
case POWER_SUPPLY_PROP_VOLTAGE_MIN:
|
||||
case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
|
||||
case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
|
||||
case POWER_SUPPLY_PROP_VOLTAGE_NOW:
|
||||
case POWER_SUPPLY_PROP_VOLTAGE_AVG:
|
||||
case POWER_SUPPLY_PROP_POWER_NOW:
|
||||
return 1;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* __LINUX_POWER_SUPPLY_H__ */
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ static inline int dquot_alloc_space(struct inode *inode, qsize_t nr)
|
|||
/*
|
||||
* Mark inode fully dirty. Since we are allocating blocks, inode
|
||||
* would become fully dirty soon anyway and it reportedly
|
||||
* reduces inode_lock contention.
|
||||
* reduces lock contention.
|
||||
*/
|
||||
mark_inode_dirty(inode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
*
|
||||
* License Terms: GNU General Public License v2
|
||||
*
|
||||
* Author: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson
|
||||
*
|
||||
* Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson
|
||||
* Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_MFD_AB8500_REGULATOR_H
|
||||
|
|
@ -17,6 +17,7 @@ enum ab8500_regulator_id {
|
|||
AB8500_LDO_AUX3,
|
||||
AB8500_LDO_INTCORE,
|
||||
AB8500_LDO_TVOUT,
|
||||
AB8500_LDO_USB,
|
||||
AB8500_LDO_AUDIO,
|
||||
AB8500_LDO_ANAMIC1,
|
||||
AB8500_LDO_ANAMIC2,
|
||||
|
|
@ -24,4 +25,50 @@ enum ab8500_regulator_id {
|
|||
AB8500_LDO_ANA,
|
||||
AB8500_NUM_REGULATORS,
|
||||
};
|
||||
|
||||
/* AB8500 register initialization */
|
||||
struct ab8500_regulator_reg_init {
|
||||
int id;
|
||||
u8 value;
|
||||
};
|
||||
|
||||
#define INIT_REGULATOR_REGISTER(_id, _value) \
|
||||
{ \
|
||||
.id = _id, \
|
||||
.value = _value, \
|
||||
}
|
||||
|
||||
/* AB8500 registers */
|
||||
enum ab8500_regulator_reg {
|
||||
AB8500_REGUREQUESTCTRL2,
|
||||
AB8500_REGUREQUESTCTRL3,
|
||||
AB8500_REGUREQUESTCTRL4,
|
||||
AB8500_REGUSYSCLKREQ1HPVALID1,
|
||||
AB8500_REGUSYSCLKREQ1HPVALID2,
|
||||
AB8500_REGUHWHPREQ1VALID1,
|
||||
AB8500_REGUHWHPREQ1VALID2,
|
||||
AB8500_REGUHWHPREQ2VALID1,
|
||||
AB8500_REGUHWHPREQ2VALID2,
|
||||
AB8500_REGUSWHPREQVALID1,
|
||||
AB8500_REGUSWHPREQVALID2,
|
||||
AB8500_REGUSYSCLKREQVALID1,
|
||||
AB8500_REGUSYSCLKREQVALID2,
|
||||
AB8500_REGUMISC1,
|
||||
AB8500_VAUDIOSUPPLY,
|
||||
AB8500_REGUCTRL1VAMIC,
|
||||
AB8500_VPLLVANAREGU,
|
||||
AB8500_VREFDDR,
|
||||
AB8500_EXTSUPPLYREGU,
|
||||
AB8500_VAUX12REGU,
|
||||
AB8500_VRF1VAUX3REGU,
|
||||
AB8500_VAUX1SEL,
|
||||
AB8500_VAUX2SEL,
|
||||
AB8500_VRF1VAUX3SEL,
|
||||
AB8500_REGUCTRL2SPARE,
|
||||
AB8500_REGUCTRLDISCH,
|
||||
AB8500_REGUCTRLDISCH2,
|
||||
AB8500_VSMPS1SEL1,
|
||||
AB8500_NUM_REGULATOR_REGISTERS,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -153,6 +153,8 @@ int regulator_list_voltage(struct regulator *regulator, unsigned selector);
|
|||
int regulator_is_supported_voltage(struct regulator *regulator,
|
||||
int min_uV, int max_uV);
|
||||
int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV);
|
||||
int regulator_set_voltage_time(struct regulator *regulator,
|
||||
int old_uV, int new_uV);
|
||||
int regulator_get_voltage(struct regulator *regulator);
|
||||
int regulator_sync_voltage(struct regulator *regulator);
|
||||
int regulator_set_current_limit(struct regulator *regulator,
|
||||
|
|
|
|||
|
|
@ -63,7 +63,11 @@ enum regulator_status {
|
|||
* when running with the specified parameters.
|
||||
*
|
||||
* @enable_time: Time taken for the regulator voltage output voltage to
|
||||
* stabalise after being enabled, in microseconds.
|
||||
* stabilise after being enabled, in microseconds.
|
||||
* @set_voltage_time_sel: Time taken for the regulator voltage output voltage
|
||||
* to stabilise after being set to a new value, in microseconds.
|
||||
* The function provides the from and to voltage selector, the
|
||||
* function should return the worst case.
|
||||
*
|
||||
* @set_suspend_voltage: Set the voltage for the regulator when the system
|
||||
* is suspended.
|
||||
|
|
@ -103,8 +107,11 @@ struct regulator_ops {
|
|||
int (*set_mode) (struct regulator_dev *, unsigned int mode);
|
||||
unsigned int (*get_mode) (struct regulator_dev *);
|
||||
|
||||
/* Time taken to enable the regulator */
|
||||
/* Time taken to enable or set voltage on the regulator */
|
||||
int (*enable_time) (struct regulator_dev *);
|
||||
int (*set_voltage_time_sel) (struct regulator_dev *,
|
||||
unsigned int old_selector,
|
||||
unsigned int new_selector);
|
||||
|
||||
/* report regulator status ... most other accessors report
|
||||
* control inputs, this reports results of combining inputs
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@ struct regulator_init_data {
|
|||
};
|
||||
|
||||
int regulator_suspend_prepare(suspend_state_t state);
|
||||
int regulator_suspend_finish(void);
|
||||
|
||||
#ifdef CONFIG_REGULATOR
|
||||
void regulator_has_full_constraints(void);
|
||||
|
|
|
|||
|
|
@ -517,7 +517,7 @@ struct thread_group_cputimer {
|
|||
struct autogroup;
|
||||
|
||||
/*
|
||||
* NOTE! "signal_struct" does not have it's own
|
||||
* NOTE! "signal_struct" does not have its own
|
||||
* locking, because a shared signal_struct always
|
||||
* implies a shared sighand_struct, so locking
|
||||
* sighand_struct is always a proper superset of
|
||||
|
|
|
|||
|
|
@ -126,6 +126,9 @@ struct gss_api_mech *gss_mech_get_by_name(const char *);
|
|||
/* Similar, but get by pseudoflavor. */
|
||||
struct gss_api_mech *gss_mech_get_by_pseudoflavor(u32);
|
||||
|
||||
/* Fill in an array with a list of supported pseudoflavors */
|
||||
int gss_mech_list_pseudoflavors(u32 *);
|
||||
|
||||
/* Just increments the mechanism's reference count and returns its input: */
|
||||
struct gss_api_mech * gss_mech_get(struct gss_api_mech *);
|
||||
|
||||
|
|
|
|||
|
|
@ -33,12 +33,13 @@ struct sysdev_class {
|
|||
const char *name;
|
||||
struct list_head drivers;
|
||||
struct sysdev_class_attribute **attrs;
|
||||
|
||||
struct kset kset;
|
||||
#ifndef CONFIG_ARCH_NO_SYSDEV_OPS
|
||||
/* Default operations for these types of devices */
|
||||
int (*shutdown)(struct sys_device *);
|
||||
int (*suspend)(struct sys_device *, pm_message_t state);
|
||||
int (*resume)(struct sys_device *);
|
||||
struct kset kset;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct sysdev_class_attribute {
|
||||
|
|
@ -76,9 +77,11 @@ struct sysdev_driver {
|
|||
struct list_head entry;
|
||||
int (*add)(struct sys_device *);
|
||||
int (*remove)(struct sys_device *);
|
||||
#ifndef CONFIG_ARCH_NO_SYSDEV_OPS
|
||||
int (*shutdown)(struct sys_device *);
|
||||
int (*suspend)(struct sys_device *, pm_message_t state);
|
||||
int (*resume)(struct sys_device *);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
struct backing_dev_info;
|
||||
|
||||
extern spinlock_t inode_lock;
|
||||
extern spinlock_t inode_wb_list_lock;
|
||||
|
||||
/*
|
||||
* fs/fs-writeback.c
|
||||
|
|
|
|||
|
|
@ -486,7 +486,8 @@ struct rate_info {
|
|||
* @plink_state: mesh peer link state
|
||||
* @signal: signal strength of last received packet in dBm
|
||||
* @signal_avg: signal strength average in dBm
|
||||
* @txrate: current unicast bitrate to this station
|
||||
* @txrate: current unicast bitrate from this station
|
||||
* @rxrate: current unicast bitrate to this station
|
||||
* @rx_packets: packets received from this station
|
||||
* @tx_packets: packets transmitted to this station
|
||||
* @tx_retries: cumulative retry counts
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ static inline struct inet_peer *rt6_get_peer(struct rt6_info *rt)
|
|||
extern void ip6_route_input(struct sk_buff *skb);
|
||||
|
||||
extern struct dst_entry * ip6_route_output(struct net *net,
|
||||
struct sock *sk,
|
||||
const struct sock *sk,
|
||||
struct flowi6 *fl6);
|
||||
|
||||
extern int ip6_route_init(void);
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ struct fib_nh {
|
|||
struct fib_info *nh_parent;
|
||||
unsigned nh_flags;
|
||||
unsigned char nh_scope;
|
||||
unsigned char nh_cfg_scope;
|
||||
#ifdef CONFIG_IP_ROUTE_MULTIPATH
|
||||
int nh_weight;
|
||||
int nh_power;
|
||||
|
|
@ -62,6 +61,7 @@ struct fib_nh {
|
|||
int nh_oif;
|
||||
__be32 nh_gw;
|
||||
__be32 nh_saddr;
|
||||
int nh_saddr_genid;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -74,9 +74,10 @@ struct fib_info {
|
|||
struct net *fib_net;
|
||||
int fib_treeref;
|
||||
atomic_t fib_clntref;
|
||||
int fib_dead;
|
||||
unsigned fib_flags;
|
||||
int fib_protocol;
|
||||
unsigned char fib_dead;
|
||||
unsigned char fib_protocol;
|
||||
unsigned char fib_scope;
|
||||
__be32 fib_prefsrc;
|
||||
u32 fib_priority;
|
||||
u32 *fib_metrics;
|
||||
|
|
@ -141,12 +142,19 @@ struct fib_result_nl {
|
|||
|
||||
#endif /* CONFIG_IP_ROUTE_MULTIPATH */
|
||||
|
||||
#define FIB_RES_SADDR(res) (FIB_RES_NH(res).nh_saddr)
|
||||
extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh);
|
||||
|
||||
#define FIB_RES_SADDR(net, res) \
|
||||
((FIB_RES_NH(res).nh_saddr_genid == \
|
||||
atomic_read(&(net)->ipv4.dev_addr_genid)) ? \
|
||||
FIB_RES_NH(res).nh_saddr : \
|
||||
fib_info_update_nh_saddr((net), &FIB_RES_NH(res)))
|
||||
#define FIB_RES_GW(res) (FIB_RES_NH(res).nh_gw)
|
||||
#define FIB_RES_DEV(res) (FIB_RES_NH(res).nh_dev)
|
||||
#define FIB_RES_OIF(res) (FIB_RES_NH(res).nh_oif)
|
||||
|
||||
#define FIB_RES_PREFSRC(res) ((res).fi->fib_prefsrc ? : FIB_RES_SADDR(res))
|
||||
#define FIB_RES_PREFSRC(net, res) ((res).fi->fib_prefsrc ? : \
|
||||
FIB_RES_SADDR(net, res))
|
||||
|
||||
struct fib_table {
|
||||
struct hlist_node tb_hlist;
|
||||
|
|
|
|||
|
|
@ -1160,7 +1160,7 @@ enum ieee80211_hw_flags {
|
|||
* @napi_weight: weight used for NAPI polling. You must specify an
|
||||
* appropriate value here if a napi_poll operation is provided
|
||||
* by your driver.
|
||||
|
||||
*
|
||||
* @max_rx_aggregation_subframes: maximum buffer size (number of
|
||||
* sub-frames) to be used for A-MPDU block ack receiver
|
||||
* aggregation.
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ struct netns_ipv4 {
|
|||
int current_rt_cache_rebuild_count;
|
||||
|
||||
atomic_t rt_genid;
|
||||
atomic_t dev_addr_genid;
|
||||
|
||||
#ifdef CONFIG_IP_MROUTE
|
||||
#ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES
|
||||
|
|
|
|||
|
|
@ -207,6 +207,7 @@ extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb);
|
|||
|
||||
struct in_ifaddr;
|
||||
extern void fib_add_ifaddr(struct in_ifaddr *);
|
||||
extern void fib_del_ifaddr(struct in_ifaddr *, struct in_ifaddr *);
|
||||
|
||||
static inline void ip_rt_put(struct rtable * rt)
|
||||
{
|
||||
|
|
@ -269,8 +270,8 @@ static inline struct rtable *ip_route_newports(struct rtable *rt,
|
|||
struct flowi4 fl4 = {
|
||||
.flowi4_oif = rt->rt_oif,
|
||||
.flowi4_mark = rt->rt_mark,
|
||||
.daddr = rt->rt_key_dst,
|
||||
.saddr = rt->rt_key_src,
|
||||
.daddr = rt->rt_dst,
|
||||
.saddr = rt->rt_src,
|
||||
.flowi4_tos = rt->rt_tos,
|
||||
.flowi4_proto = protocol,
|
||||
.fl4_sport = sport,
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ struct qdisc_rate_table {
|
|||
enum qdisc_state_t {
|
||||
__QDISC_STATE_SCHED,
|
||||
__QDISC_STATE_DEACTIVATED,
|
||||
__QDISC_STATE_THROTTLED,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -32,7 +33,6 @@ enum qdisc_state_t {
|
|||
*/
|
||||
enum qdisc___state_t {
|
||||
__QDISC___STATE_RUNNING = 1,
|
||||
__QDISC___STATE_THROTTLED = 2,
|
||||
};
|
||||
|
||||
struct qdisc_size_table {
|
||||
|
|
@ -106,17 +106,17 @@ static inline void qdisc_run_end(struct Qdisc *qdisc)
|
|||
|
||||
static inline bool qdisc_is_throttled(const struct Qdisc *qdisc)
|
||||
{
|
||||
return (qdisc->__state & __QDISC___STATE_THROTTLED) ? true : false;
|
||||
return test_bit(__QDISC_STATE_THROTTLED, &qdisc->state) ? true : false;
|
||||
}
|
||||
|
||||
static inline void qdisc_throttled(struct Qdisc *qdisc)
|
||||
{
|
||||
qdisc->__state |= __QDISC___STATE_THROTTLED;
|
||||
set_bit(__QDISC_STATE_THROTTLED, &qdisc->state);
|
||||
}
|
||||
|
||||
static inline void qdisc_unthrottled(struct Qdisc *qdisc)
|
||||
{
|
||||
qdisc->__state &= ~__QDISC___STATE_THROTTLED;
|
||||
clear_bit(__QDISC_STATE_THROTTLED, &qdisc->state);
|
||||
}
|
||||
|
||||
struct Qdisc_class_ops {
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ struct iscsi_segment {
|
|||
struct scatterlist *sg;
|
||||
void *sg_mapped;
|
||||
unsigned int sg_offset;
|
||||
bool atomic_mapped;
|
||||
|
||||
iscsi_segment_done_fn_t *done;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -462,7 +462,7 @@ static inline int scsi_device_qas(struct scsi_device *sdev)
|
|||
}
|
||||
static inline int scsi_device_enclosure(struct scsi_device *sdev)
|
||||
{
|
||||
return sdev->inquiry[6] & (1<<6);
|
||||
return sdev->inquiry ? (sdev->inquiry[6] & (1<<6)) : 1;
|
||||
}
|
||||
|
||||
static inline int scsi_device_protection(struct scsi_device *sdev)
|
||||
|
|
|
|||
|
|
@ -1031,9 +1031,7 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_s
|
|||
#define snd_pcm_lib_mmap_iomem NULL
|
||||
#endif
|
||||
|
||||
int snd_pcm_lib_mmap_noncached(struct snd_pcm_substream *substream,
|
||||
struct vm_area_struct *area);
|
||||
#define snd_pcm_lib_mmap_vmalloc snd_pcm_lib_mmap_noncached
|
||||
#define snd_pcm_lib_mmap_vmalloc NULL
|
||||
|
||||
static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include <net/sock.h>
|
||||
#include <net/tcp.h>
|
||||
|
||||
#define TARGET_CORE_MOD_VERSION "v4.0.0-rc6"
|
||||
#define TARGET_CORE_MOD_VERSION "v4.0.0-rc7-ml"
|
||||
#define SHUTDOWN_SIGS (sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGABRT))
|
||||
|
||||
/* Used by transport_generic_allocate_iovecs() */
|
||||
|
|
@ -239,7 +239,7 @@ struct t10_alua_lu_gp {
|
|||
} ____cacheline_aligned;
|
||||
|
||||
struct t10_alua_lu_gp_member {
|
||||
int lu_gp_assoc:1;
|
||||
bool lu_gp_assoc;
|
||||
atomic_t lu_gp_mem_ref_cnt;
|
||||
spinlock_t lu_gp_mem_lock;
|
||||
struct t10_alua_lu_gp *lu_gp;
|
||||
|
|
@ -271,7 +271,7 @@ struct t10_alua_tg_pt_gp {
|
|||
} ____cacheline_aligned;
|
||||
|
||||
struct t10_alua_tg_pt_gp_member {
|
||||
int tg_pt_gp_assoc:1;
|
||||
bool tg_pt_gp_assoc;
|
||||
atomic_t tg_pt_gp_mem_ref_cnt;
|
||||
spinlock_t tg_pt_gp_mem_lock;
|
||||
struct t10_alua_tg_pt_gp *tg_pt_gp;
|
||||
|
|
@ -336,7 +336,7 @@ struct t10_pr_registration {
|
|||
int pr_res_type;
|
||||
int pr_res_scope;
|
||||
/* Used for fabric initiator WWPNs using a ISID */
|
||||
int isid_present_at_reg:1;
|
||||
bool isid_present_at_reg;
|
||||
u32 pr_res_mapped_lun;
|
||||
u32 pr_aptpl_target_lun;
|
||||
u32 pr_res_generation;
|
||||
|
|
@ -418,7 +418,7 @@ struct se_transport_task {
|
|||
unsigned long long t_task_lba;
|
||||
int t_tasks_failed;
|
||||
int t_tasks_fua;
|
||||
int t_tasks_bidi:1;
|
||||
bool t_tasks_bidi;
|
||||
u32 t_task_cdbs;
|
||||
u32 t_tasks_check;
|
||||
u32 t_tasks_no;
|
||||
|
|
@ -470,7 +470,7 @@ struct se_task {
|
|||
u8 task_flags;
|
||||
int task_error_status;
|
||||
int task_state_flags;
|
||||
int task_padded_sg:1;
|
||||
bool task_padded_sg;
|
||||
unsigned long long task_lba;
|
||||
u32 task_no;
|
||||
u32 task_sectors;
|
||||
|
|
@ -494,8 +494,8 @@ struct se_task {
|
|||
struct list_head t_state_list;
|
||||
} ____cacheline_aligned;
|
||||
|
||||
#define TASK_CMD(task) ((struct se_cmd *)task->task_se_cmd)
|
||||
#define TASK_DEV(task) ((struct se_device *)task->se_dev)
|
||||
#define TASK_CMD(task) ((task)->task_se_cmd)
|
||||
#define TASK_DEV(task) ((task)->se_dev)
|
||||
|
||||
struct se_cmd {
|
||||
/* SAM response code being sent to initiator */
|
||||
|
|
@ -551,8 +551,8 @@ struct se_cmd {
|
|||
void (*transport_complete_callback)(struct se_cmd *);
|
||||
} ____cacheline_aligned;
|
||||
|
||||
#define T_TASK(cmd) ((struct se_transport_task *)(cmd->t_task))
|
||||
#define CMD_TFO(cmd) ((struct target_core_fabric_ops *)cmd->se_tfo)
|
||||
#define T_TASK(cmd) ((cmd)->t_task)
|
||||
#define CMD_TFO(cmd) ((cmd)->se_tfo)
|
||||
|
||||
struct se_tmr_req {
|
||||
/* Task Management function to be preformed */
|
||||
|
|
@ -583,7 +583,7 @@ struct se_ua {
|
|||
struct se_node_acl {
|
||||
char initiatorname[TRANSPORT_IQN_LEN];
|
||||
/* Used to signal demo mode created ACL, disabled by default */
|
||||
int dynamic_node_acl:1;
|
||||
bool dynamic_node_acl;
|
||||
u32 queue_depth;
|
||||
u32 acl_index;
|
||||
u64 num_cmds;
|
||||
|
|
@ -601,7 +601,8 @@ struct se_node_acl {
|
|||
struct config_group acl_attrib_group;
|
||||
struct config_group acl_auth_group;
|
||||
struct config_group acl_param_group;
|
||||
struct config_group *acl_default_groups[4];
|
||||
struct config_group acl_fabric_stat_group;
|
||||
struct config_group *acl_default_groups[5];
|
||||
struct list_head acl_list;
|
||||
struct list_head acl_sess_list;
|
||||
} ____cacheline_aligned;
|
||||
|
|
@ -615,13 +616,19 @@ struct se_session {
|
|||
struct list_head sess_acl_list;
|
||||
} ____cacheline_aligned;
|
||||
|
||||
#define SE_SESS(cmd) ((struct se_session *)(cmd)->se_sess)
|
||||
#define SE_NODE_ACL(sess) ((struct se_node_acl *)(sess)->se_node_acl)
|
||||
#define SE_SESS(cmd) ((cmd)->se_sess)
|
||||
#define SE_NODE_ACL(sess) ((sess)->se_node_acl)
|
||||
|
||||
struct se_device;
|
||||
struct se_transform_info;
|
||||
struct scatterlist;
|
||||
|
||||
struct se_ml_stat_grps {
|
||||
struct config_group stat_group;
|
||||
struct config_group scsi_auth_intr_group;
|
||||
struct config_group scsi_att_intr_port_group;
|
||||
};
|
||||
|
||||
struct se_lun_acl {
|
||||
char initiatorname[TRANSPORT_IQN_LEN];
|
||||
u32 mapped_lun;
|
||||
|
|
@ -629,10 +636,13 @@ struct se_lun_acl {
|
|||
struct se_lun *se_lun;
|
||||
struct list_head lacl_list;
|
||||
struct config_group se_lun_group;
|
||||
struct se_ml_stat_grps ml_stat_grps;
|
||||
} ____cacheline_aligned;
|
||||
|
||||
#define ML_STAT_GRPS(lacl) (&(lacl)->ml_stat_grps)
|
||||
|
||||
struct se_dev_entry {
|
||||
int def_pr_registered:1;
|
||||
bool def_pr_registered;
|
||||
/* See transport_lunflags_table */
|
||||
u32 lun_flags;
|
||||
u32 deve_cmds;
|
||||
|
|
@ -693,6 +703,13 @@ struct se_dev_attrib {
|
|||
struct config_group da_group;
|
||||
} ____cacheline_aligned;
|
||||
|
||||
struct se_dev_stat_grps {
|
||||
struct config_group stat_group;
|
||||
struct config_group scsi_dev_group;
|
||||
struct config_group scsi_tgt_dev_group;
|
||||
struct config_group scsi_lu_group;
|
||||
};
|
||||
|
||||
struct se_subsystem_dev {
|
||||
/* Used for struct se_subsystem_dev-->se_dev_alias, must be less than PAGE_SIZE */
|
||||
#define SE_DEV_ALIAS_LEN 512
|
||||
|
|
@ -716,11 +733,14 @@ struct se_subsystem_dev {
|
|||
struct config_group se_dev_group;
|
||||
/* For T10 Reservations */
|
||||
struct config_group se_dev_pr_group;
|
||||
/* For target_core_stat.c groups */
|
||||
struct se_dev_stat_grps dev_stat_grps;
|
||||
} ____cacheline_aligned;
|
||||
|
||||
#define T10_ALUA(su_dev) (&(su_dev)->t10_alua)
|
||||
#define T10_RES(su_dev) (&(su_dev)->t10_reservation)
|
||||
#define T10_PR_OPS(su_dev) (&(su_dev)->t10_reservation.pr_ops)
|
||||
#define DEV_STAT_GRP(dev) (&(dev)->dev_stat_grps)
|
||||
|
||||
struct se_device {
|
||||
/* Set to 1 if thread is NOT sleeping on thread_sem */
|
||||
|
|
@ -803,8 +823,8 @@ struct se_device {
|
|||
struct list_head g_se_dev_list;
|
||||
} ____cacheline_aligned;
|
||||
|
||||
#define SE_DEV(cmd) ((struct se_device *)(cmd)->se_lun->lun_se_dev)
|
||||
#define SU_DEV(dev) ((struct se_subsystem_dev *)(dev)->se_sub_dev)
|
||||
#define SE_DEV(cmd) ((cmd)->se_lun->lun_se_dev)
|
||||
#define SU_DEV(dev) ((dev)->se_sub_dev)
|
||||
#define DEV_ATTRIB(dev) (&(dev)->se_sub_dev->se_dev_attrib)
|
||||
#define DEV_T10_WWN(dev) (&(dev)->se_sub_dev->t10_wwn)
|
||||
|
||||
|
|
@ -832,7 +852,14 @@ struct se_hba {
|
|||
struct se_subsystem_api *transport;
|
||||
} ____cacheline_aligned;
|
||||
|
||||
#define SE_HBA(d) ((struct se_hba *)(d)->se_hba)
|
||||
#define SE_HBA(dev) ((dev)->se_hba)
|
||||
|
||||
struct se_port_stat_grps {
|
||||
struct config_group stat_group;
|
||||
struct config_group scsi_port_group;
|
||||
struct config_group scsi_tgt_port_group;
|
||||
struct config_group scsi_transport_group;
|
||||
};
|
||||
|
||||
struct se_lun {
|
||||
/* See transport_lun_status_table */
|
||||
|
|
@ -848,11 +875,13 @@ struct se_lun {
|
|||
struct list_head lun_cmd_list;
|
||||
struct list_head lun_acl_list;
|
||||
struct se_device *lun_se_dev;
|
||||
struct se_port *lun_sep;
|
||||
struct config_group lun_group;
|
||||
struct se_port *lun_sep;
|
||||
struct se_port_stat_grps port_stat_grps;
|
||||
} ____cacheline_aligned;
|
||||
|
||||
#define SE_LUN(c) ((struct se_lun *)(c)->se_lun)
|
||||
#define SE_LUN(cmd) ((cmd)->se_lun)
|
||||
#define PORT_STAT_GRP(lun) (&(lun)->port_stat_grps)
|
||||
|
||||
struct scsi_port_stats {
|
||||
u64 cmd_pdus;
|
||||
|
|
@ -919,11 +948,13 @@ struct se_portal_group {
|
|||
struct config_group tpg_param_group;
|
||||
} ____cacheline_aligned;
|
||||
|
||||
#define TPG_TFO(se_tpg) ((struct target_core_fabric_ops *)(se_tpg)->se_tpg_tfo)
|
||||
#define TPG_TFO(se_tpg) ((se_tpg)->se_tpg_tfo)
|
||||
|
||||
struct se_wwn {
|
||||
struct target_fabric_configfs *wwn_tf;
|
||||
struct config_group wwn_group;
|
||||
struct config_group *wwn_default_groups[2];
|
||||
struct config_group fabric_stat_group;
|
||||
} ____cacheline_aligned;
|
||||
|
||||
struct se_global {
|
||||
|
|
|
|||
|
|
@ -14,10 +14,12 @@ extern void target_fabric_configfs_deregister(struct target_fabric_configfs *);
|
|||
struct target_fabric_configfs_template {
|
||||
struct config_item_type tfc_discovery_cit;
|
||||
struct config_item_type tfc_wwn_cit;
|
||||
struct config_item_type tfc_wwn_fabric_stats_cit;
|
||||
struct config_item_type tfc_tpg_cit;
|
||||
struct config_item_type tfc_tpg_base_cit;
|
||||
struct config_item_type tfc_tpg_lun_cit;
|
||||
struct config_item_type tfc_tpg_port_cit;
|
||||
struct config_item_type tfc_tpg_port_stat_cit;
|
||||
struct config_item_type tfc_tpg_np_cit;
|
||||
struct config_item_type tfc_tpg_np_base_cit;
|
||||
struct config_item_type tfc_tpg_attrib_cit;
|
||||
|
|
@ -27,7 +29,9 @@ struct target_fabric_configfs_template {
|
|||
struct config_item_type tfc_tpg_nacl_attrib_cit;
|
||||
struct config_item_type tfc_tpg_nacl_auth_cit;
|
||||
struct config_item_type tfc_tpg_nacl_param_cit;
|
||||
struct config_item_type tfc_tpg_nacl_stat_cit;
|
||||
struct config_item_type tfc_tpg_mappedlun_cit;
|
||||
struct config_item_type tfc_tpg_mappedlun_stat_cit;
|
||||
};
|
||||
|
||||
struct target_fabric_configfs {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ struct target_core_fabric_ops {
|
|||
* for scatterlist chaining using transport_do_task_sg_link(),
|
||||
* disabled by default
|
||||
*/
|
||||
int task_sg_chaining:1;
|
||||
bool task_sg_chaining;
|
||||
char *(*get_fabric_name)(void);
|
||||
u8 (*get_fabric_proto_ident)(struct se_portal_group *);
|
||||
char *(*tpg_get_wwn)(struct se_portal_group *);
|
||||
|
|
|
|||
|
|
@ -1,37 +1,29 @@
|
|||
#ifndef TARGET_CORE_TMR_H
|
||||
#define TARGET_CORE_TMR_H
|
||||
|
||||
/* task management function values */
|
||||
#ifdef ABORT_TASK
|
||||
#undef ABORT_TASK
|
||||
#endif /* ABORT_TASK */
|
||||
#define ABORT_TASK 1
|
||||
#ifdef ABORT_TASK_SET
|
||||
#undef ABORT_TASK_SET
|
||||
#endif /* ABORT_TASK_SET */
|
||||
#define ABORT_TASK_SET 2
|
||||
#ifdef CLEAR_ACA
|
||||
#undef CLEAR_ACA
|
||||
#endif /* CLEAR_ACA */
|
||||
#define CLEAR_ACA 3
|
||||
#ifdef CLEAR_TASK_SET
|
||||
#undef CLEAR_TASK_SET
|
||||
#endif /* CLEAR_TASK_SET */
|
||||
#define CLEAR_TASK_SET 4
|
||||
#define LUN_RESET 5
|
||||
#define TARGET_WARM_RESET 6
|
||||
#define TARGET_COLD_RESET 7
|
||||
#define TASK_REASSIGN 8
|
||||
/* fabric independent task management function values */
|
||||
enum tcm_tmreq_table {
|
||||
TMR_ABORT_TASK = 1,
|
||||
TMR_ABORT_TASK_SET = 2,
|
||||
TMR_CLEAR_ACA = 3,
|
||||
TMR_CLEAR_TASK_SET = 4,
|
||||
TMR_LUN_RESET = 5,
|
||||
TMR_TARGET_WARM_RESET = 6,
|
||||
TMR_TARGET_COLD_RESET = 7,
|
||||
TMR_FABRIC_TMR = 255,
|
||||
};
|
||||
|
||||
/* task management response values */
|
||||
#define TMR_FUNCTION_COMPLETE 0
|
||||
#define TMR_TASK_DOES_NOT_EXIST 1
|
||||
#define TMR_LUN_DOES_NOT_EXIST 2
|
||||
#define TMR_TASK_STILL_ALLEGIANT 3
|
||||
#define TMR_TASK_FAILOVER_NOT_SUPPORTED 4
|
||||
#define TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED 5
|
||||
#define TMR_FUNCTION_AUTHORIZATION_FAILED 6
|
||||
#define TMR_FUNCTION_REJECTED 255
|
||||
/* fabric independent task management response values */
|
||||
enum tcm_tmrsp_table {
|
||||
TMR_FUNCTION_COMPLETE = 0,
|
||||
TMR_TASK_DOES_NOT_EXIST = 1,
|
||||
TMR_LUN_DOES_NOT_EXIST = 2,
|
||||
TMR_TASK_STILL_ALLEGIANT = 3,
|
||||
TMR_TASK_FAILOVER_NOT_SUPPORTED = 4,
|
||||
TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED = 5,
|
||||
TMR_FUNCTION_AUTHORIZATION_FAILED = 6,
|
||||
TMR_FUNCTION_REJECTED = 255,
|
||||
};
|
||||
|
||||
extern struct kmem_cache *se_tmr_req_cache;
|
||||
|
||||
|
|
|
|||
|
|
@ -109,6 +109,8 @@
|
|||
struct se_mem;
|
||||
struct se_subsystem_api;
|
||||
|
||||
extern struct kmem_cache *se_mem_cache;
|
||||
|
||||
extern int init_se_global(void);
|
||||
extern void release_se_global(void);
|
||||
extern void init_scsi_index_table(void);
|
||||
|
|
@ -190,6 +192,8 @@ extern void transport_generic_process_write(struct se_cmd *);
|
|||
extern int transport_generic_do_tmr(struct se_cmd *);
|
||||
/* From target_core_alua.c */
|
||||
extern int core_alua_check_nonop_delay(struct se_cmd *);
|
||||
/* From target_core_cdb.c */
|
||||
extern int transport_emulate_control_cdb(struct se_task *);
|
||||
|
||||
/*
|
||||
* Each se_transport_task_t can have N number of possible struct se_task's
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -17,19 +17,17 @@ TRACE_EVENT(jbd2_checkpoint,
|
|||
TP_ARGS(journal, result),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( int, dev_major )
|
||||
__field( int, dev_minor )
|
||||
__field( dev_t, dev )
|
||||
__field( int, result )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev);
|
||||
__entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev);
|
||||
__entry->dev = journal->j_fs_dev->bd_dev;
|
||||
__entry->result = result;
|
||||
),
|
||||
|
||||
TP_printk("dev %d,%d result %d",
|
||||
__entry->dev_major, __entry->dev_minor, __entry->result)
|
||||
TP_printk("dev %s result %d",
|
||||
jbd2_dev_to_name(__entry->dev), __entry->result)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(jbd2_commit,
|
||||
|
|
@ -39,22 +37,20 @@ DECLARE_EVENT_CLASS(jbd2_commit,
|
|||
TP_ARGS(journal, commit_transaction),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( int, dev_major )
|
||||
__field( int, dev_minor )
|
||||
__field( dev_t, dev )
|
||||
__field( char, sync_commit )
|
||||
__field( int, transaction )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev);
|
||||
__entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev);
|
||||
__entry->dev = journal->j_fs_dev->bd_dev;
|
||||
__entry->sync_commit = commit_transaction->t_synchronous_commit;
|
||||
__entry->transaction = commit_transaction->t_tid;
|
||||
),
|
||||
|
||||
TP_printk("dev %d,%d transaction %d sync %d",
|
||||
__entry->dev_major, __entry->dev_minor,
|
||||
__entry->transaction, __entry->sync_commit)
|
||||
TP_printk("dev %s transaction %d sync %d",
|
||||
jbd2_dev_to_name(__entry->dev), __entry->transaction,
|
||||
__entry->sync_commit)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(jbd2_commit, jbd2_start_commit,
|
||||
|
|
@ -91,24 +87,22 @@ TRACE_EVENT(jbd2_end_commit,
|
|||
TP_ARGS(journal, commit_transaction),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( int, dev_major )
|
||||
__field( int, dev_minor )
|
||||
__field( dev_t, dev )
|
||||
__field( char, sync_commit )
|
||||
__field( int, transaction )
|
||||
__field( int, head )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev);
|
||||
__entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev);
|
||||
__entry->dev = journal->j_fs_dev->bd_dev;
|
||||
__entry->sync_commit = commit_transaction->t_synchronous_commit;
|
||||
__entry->transaction = commit_transaction->t_tid;
|
||||
__entry->head = journal->j_tail_sequence;
|
||||
),
|
||||
|
||||
TP_printk("dev %d,%d transaction %d sync %d head %d",
|
||||
__entry->dev_major, __entry->dev_minor,
|
||||
__entry->transaction, __entry->sync_commit, __entry->head)
|
||||
TP_printk("dev %s transaction %d sync %d head %d",
|
||||
jbd2_dev_to_name(__entry->dev), __entry->transaction,
|
||||
__entry->sync_commit, __entry->head)
|
||||
);
|
||||
|
||||
TRACE_EVENT(jbd2_submit_inode_data,
|
||||
|
|
@ -117,20 +111,17 @@ TRACE_EVENT(jbd2_submit_inode_data,
|
|||
TP_ARGS(inode),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( int, dev_major )
|
||||
__field( int, dev_minor )
|
||||
__field( dev_t, dev )
|
||||
__field( ino_t, ino )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->dev_major = MAJOR(inode->i_sb->s_dev);
|
||||
__entry->dev_minor = MINOR(inode->i_sb->s_dev);
|
||||
__entry->dev = inode->i_sb->s_dev;
|
||||
__entry->ino = inode->i_ino;
|
||||
),
|
||||
|
||||
TP_printk("dev %d,%d ino %lu",
|
||||
__entry->dev_major, __entry->dev_minor,
|
||||
(unsigned long) __entry->ino)
|
||||
TP_printk("dev %s ino %lu",
|
||||
jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino)
|
||||
);
|
||||
|
||||
TRACE_EVENT(jbd2_run_stats,
|
||||
|
|
@ -140,8 +131,7 @@ TRACE_EVENT(jbd2_run_stats,
|
|||
TP_ARGS(dev, tid, stats),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( int, dev_major )
|
||||
__field( int, dev_minor )
|
||||
__field( dev_t, dev )
|
||||
__field( unsigned long, tid )
|
||||
__field( unsigned long, wait )
|
||||
__field( unsigned long, running )
|
||||
|
|
@ -154,8 +144,7 @@ TRACE_EVENT(jbd2_run_stats,
|
|||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->dev_major = MAJOR(dev);
|
||||
__entry->dev_minor = MINOR(dev);
|
||||
__entry->dev = dev;
|
||||
__entry->tid = tid;
|
||||
__entry->wait = stats->rs_wait;
|
||||
__entry->running = stats->rs_running;
|
||||
|
|
@ -167,9 +156,9 @@ TRACE_EVENT(jbd2_run_stats,
|
|||
__entry->blocks_logged = stats->rs_blocks_logged;
|
||||
),
|
||||
|
||||
TP_printk("dev %d,%d tid %lu wait %u running %u locked %u flushing %u "
|
||||
TP_printk("dev %s tid %lu wait %u running %u locked %u flushing %u "
|
||||
"logging %u handle_count %u blocks %u blocks_logged %u",
|
||||
__entry->dev_major, __entry->dev_minor, __entry->tid,
|
||||
jbd2_dev_to_name(__entry->dev), __entry->tid,
|
||||
jiffies_to_msecs(__entry->wait),
|
||||
jiffies_to_msecs(__entry->running),
|
||||
jiffies_to_msecs(__entry->locked),
|
||||
|
|
@ -186,8 +175,7 @@ TRACE_EVENT(jbd2_checkpoint_stats,
|
|||
TP_ARGS(dev, tid, stats),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( int, dev_major )
|
||||
__field( int, dev_minor )
|
||||
__field( dev_t, dev )
|
||||
__field( unsigned long, tid )
|
||||
__field( unsigned long, chp_time )
|
||||
__field( __u32, forced_to_close )
|
||||
|
|
@ -196,8 +184,7 @@ TRACE_EVENT(jbd2_checkpoint_stats,
|
|||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->dev_major = MAJOR(dev);
|
||||
__entry->dev_minor = MINOR(dev);
|
||||
__entry->dev = dev;
|
||||
__entry->tid = tid;
|
||||
__entry->chp_time = stats->cs_chp_time;
|
||||
__entry->forced_to_close= stats->cs_forced_to_close;
|
||||
|
|
@ -205,9 +192,9 @@ TRACE_EVENT(jbd2_checkpoint_stats,
|
|||
__entry->dropped = stats->cs_dropped;
|
||||
),
|
||||
|
||||
TP_printk("dev %d,%d tid %lu chp_time %u forced_to_close %u "
|
||||
TP_printk("dev %s tid %lu chp_time %u forced_to_close %u "
|
||||
"written %u dropped %u",
|
||||
__entry->dev_major, __entry->dev_minor, __entry->tid,
|
||||
jbd2_dev_to_name(__entry->dev), __entry->tid,
|
||||
jiffies_to_msecs(__entry->chp_time),
|
||||
__entry->forced_to_close, __entry->written, __entry->dropped)
|
||||
);
|
||||
|
|
@ -220,8 +207,7 @@ TRACE_EVENT(jbd2_cleanup_journal_tail,
|
|||
TP_ARGS(journal, first_tid, block_nr, freed),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( int, dev_major )
|
||||
__field( int, dev_minor )
|
||||
__field( dev_t, dev )
|
||||
__field( tid_t, tail_sequence )
|
||||
__field( tid_t, first_tid )
|
||||
__field(unsigned long, block_nr )
|
||||
|
|
@ -229,18 +215,16 @@ TRACE_EVENT(jbd2_cleanup_journal_tail,
|
|||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev);
|
||||
__entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev);
|
||||
__entry->dev = journal->j_fs_dev->bd_dev;
|
||||
__entry->tail_sequence = journal->j_tail_sequence;
|
||||
__entry->first_tid = first_tid;
|
||||
__entry->block_nr = block_nr;
|
||||
__entry->freed = freed;
|
||||
),
|
||||
|
||||
TP_printk("dev %d,%d from %u to %u offset %lu freed %lu",
|
||||
__entry->dev_major, __entry->dev_minor,
|
||||
__entry->tail_sequence, __entry->first_tid,
|
||||
__entry->block_nr, __entry->freed)
|
||||
TP_printk("dev %s from %u to %u offset %lu freed %lu",
|
||||
jbd2_dev_to_name(__entry->dev), __entry->tail_sequence,
|
||||
__entry->first_tid, __entry->block_nr, __entry->freed)
|
||||
);
|
||||
|
||||
#endif /* _TRACE_JBD2_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue