Merge commit 'linus/master' into bkl/core
Merge reason: The staging tree has introduced the easycap driver lately. We need the latest updates to pushdown the bkl in its ioctl helper.
This commit is contained in:
commit
d9a145fb6e
6718 changed files with 426595 additions and 395349 deletions
|
@ -276,6 +276,7 @@ ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
|
|||
$(srctree)/include/asm-$(SRCARCH)/kvm_para.h),)
|
||||
unifdef-y += kvm_para.h
|
||||
endif
|
||||
unifdef-y += l2tp.h
|
||||
unifdef-y += llc.h
|
||||
unifdef-y += loop.h
|
||||
unifdef-y += lp.h
|
||||
|
|
|
@ -253,7 +253,7 @@ int acpi_resources_are_enforced(void);
|
|||
#ifdef CONFIG_PM_SLEEP
|
||||
void __init acpi_no_s4_hw_signature(void);
|
||||
void __init acpi_old_suspend_ordering(void);
|
||||
void __init acpi_s4_no_nvs(void);
|
||||
void __init acpi_nvs_nosave(void);
|
||||
#endif /* CONFIG_PM_SLEEP */
|
||||
|
||||
struct acpi_osc_context {
|
||||
|
|
|
@ -15,11 +15,13 @@
|
|||
#ifndef _AHCI_PLATFORM_H
|
||||
#define _AHCI_PLATFORM_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
|
||||
struct device;
|
||||
struct ata_port_info;
|
||||
|
||||
struct ahci_platform_data {
|
||||
int (*init)(struct device *dev);
|
||||
int (*init)(struct device *dev, void __iomem *addr);
|
||||
void (*exit)(struct device *dev);
|
||||
const struct ata_port_info *ata_port_info;
|
||||
unsigned int force_port_map;
|
||||
|
|
|
@ -14,14 +14,19 @@
|
|||
#ifndef ASMARM_AMBA_H
|
||||
#define ASMARM_AMBA_H
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/resource.h>
|
||||
|
||||
#define AMBA_NR_IRQS 2
|
||||
|
||||
struct clk;
|
||||
|
||||
struct amba_device {
|
||||
struct device dev;
|
||||
struct resource res;
|
||||
struct clk *pclk;
|
||||
u64 dma_mask;
|
||||
unsigned int periphid;
|
||||
unsigned int irq[AMBA_NR_IRQS];
|
||||
|
@ -59,6 +64,12 @@ struct amba_device *amba_find_device(const char *, struct device *, unsigned int
|
|||
int amba_request_regions(struct amba_device *, const char *);
|
||||
void amba_release_regions(struct amba_device *);
|
||||
|
||||
#define amba_pclk_enable(d) \
|
||||
(IS_ERR((d)->pclk) ? 0 : clk_enable((d)->pclk))
|
||||
|
||||
#define amba_pclk_disable(d) \
|
||||
do { if (!IS_ERR((d)->pclk)) clk_disable((d)->pclk); } while (0)
|
||||
|
||||
#define amba_config(d) (((d)->periphid >> 24) & 0xff)
|
||||
#define amba_rev(d) (((d)->periphid >> 20) & 0x0f)
|
||||
#define amba_manf(d) (((d)->periphid >> 12) & 0xff)
|
||||
|
|
|
@ -15,9 +15,10 @@
|
|||
* @ocr_mask: available voltages on the 4 pins from the block, this
|
||||
* is ignored if a regulator is used, see the MMC_VDD_* masks in
|
||||
* mmc/host.h
|
||||
* @translate_vdd: a callback function to translate a MMC_VDD_*
|
||||
* mask into a value to be binary or:ed and written into the
|
||||
* MMCIPWR register of the block
|
||||
* @vdd_handler: a callback function to translate a MMC_VDD_*
|
||||
* mask into a value to be binary (or set some other custom bits
|
||||
* in MMCIPWR) or:ed and written into the MMCIPWR register of the
|
||||
* block. May also control external power based on the power_mode.
|
||||
* @status: if no GPIO read function was given to the block in
|
||||
* gpio_wp (below) this function will be called to determine
|
||||
* whether a card is present in the MMC slot or not
|
||||
|
@ -29,7 +30,8 @@
|
|||
struct mmci_platform_data {
|
||||
unsigned int f_max;
|
||||
unsigned int ocr_mask;
|
||||
u32 (*translate_vdd)(struct device *, unsigned int);
|
||||
u32 (*vdd_handler)(struct device *, unsigned int vdd,
|
||||
unsigned char power_mode);
|
||||
unsigned int (*status)(struct device *);
|
||||
int gpio_wp;
|
||||
int gpio_cd;
|
||||
|
|
|
@ -38,10 +38,12 @@
|
|||
#define UART01x_FR 0x18 /* Flag register (Read only). */
|
||||
#define UART010_IIR 0x1C /* Interrupt indentification register (Read). */
|
||||
#define UART010_ICR 0x1C /* Interrupt clear register (Write). */
|
||||
#define ST_UART011_LCRH_RX 0x1C /* Rx line control register. */
|
||||
#define UART01x_ILPR 0x20 /* IrDA low power counter register. */
|
||||
#define UART011_IBRD 0x24 /* Integer baud rate divisor register. */
|
||||
#define UART011_FBRD 0x28 /* Fractional baud rate divisor register. */
|
||||
#define UART011_LCRH 0x2c /* Line control register. */
|
||||
#define ST_UART011_LCRH_TX 0x2c /* Tx Line control register. */
|
||||
#define UART011_CR 0x30 /* Control register. */
|
||||
#define UART011_IFLS 0x34 /* Interrupt fifo level select. */
|
||||
#define UART011_IMSC 0x38 /* Interrupt mask. */
|
||||
|
@ -84,6 +86,7 @@
|
|||
#define UART010_CR_TIE 0x0020
|
||||
#define UART010_CR_RIE 0x0010
|
||||
#define UART010_CR_MSIE 0x0008
|
||||
#define ST_UART011_CR_OVSFACT 0x0008 /* Oversampling factor */
|
||||
#define UART01x_CR_IIRLP 0x0004 /* SIR low power mode */
|
||||
#define UART01x_CR_SIREN 0x0002 /* SIR enable */
|
||||
#define UART01x_CR_UARTEN 0x0001 /* UART enable */
|
||||
|
|
|
@ -431,6 +431,14 @@ struct atm_dev *atm_dev_register(const char *type,const struct atmdev_ops *ops,
|
|||
int number,unsigned long *flags); /* number == -1: pick first available */
|
||||
struct atm_dev *atm_dev_lookup(int number);
|
||||
void atm_dev_deregister(struct atm_dev *dev);
|
||||
|
||||
/* atm_dev_signal_change
|
||||
*
|
||||
* Propagate lower layer signal change in atm_dev->signal to netdevice.
|
||||
* The event will be sent via a notifier call chain.
|
||||
*/
|
||||
void atm_dev_signal_change(struct atm_dev *dev, char signal);
|
||||
|
||||
void vcc_insert_socket(struct sock *sk);
|
||||
|
||||
|
||||
|
@ -510,6 +518,15 @@ void register_atm_ioctl(struct atm_ioctl *);
|
|||
*/
|
||||
void deregister_atm_ioctl(struct atm_ioctl *);
|
||||
|
||||
|
||||
/* register_atmdevice_notifier - register atm_dev notify events
|
||||
*
|
||||
* Clients like br2684 will register notify events
|
||||
* Currently we notify of signal found/lost
|
||||
*/
|
||||
int register_atmdevice_notifier(struct notifier_block *nb);
|
||||
void unregister_atmdevice_notifier(struct notifier_block *nb);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -82,8 +82,6 @@ struct backing_dev_info {
|
|||
struct bdi_writeback wb; /* default writeback info for this bdi */
|
||||
spinlock_t wb_lock; /* protects update side of wb_list */
|
||||
struct list_head wb_list; /* the flusher threads hanging off this bdi */
|
||||
unsigned long wb_mask; /* bitmask of registered tasks */
|
||||
unsigned int wb_cnt; /* number of registered tasks */
|
||||
|
||||
struct list_head work_list;
|
||||
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
#define PHY_ID_BCM50610 0x0143bd60
|
||||
#define PHY_ID_BCM50610M 0x0143bd70
|
||||
#define PHY_ID_BCM5241 0x0143bc30
|
||||
#define PHY_ID_BCMAC131 0x0143bc70
|
||||
#define PHY_ID_BCM5481 0x0143bca0
|
||||
#define PHY_ID_BCM5482 0x0143bcb0
|
||||
#define PHY_ID_BCM5411 0x00206070
|
||||
#define PHY_ID_BCM5421 0x002060e0
|
||||
#define PHY_ID_BCM5464 0x002060b0
|
||||
#define PHY_ID_BCM5461 0x002060c0
|
||||
#define PHY_ID_BCM57780 0x03625d90
|
||||
|
||||
#define PHY_BCM_OUI_MASK 0xfffffc00
|
||||
|
|
|
@ -62,6 +62,7 @@ enum caif_channel_priority {
|
|||
* @CAIFPROTO_DATAGRAM_LOOP: Datagram loopback channel, used for testing.
|
||||
* @CAIFPROTO_UTIL: Utility (Psock) channel.
|
||||
* @CAIFPROTO_RFM: Remote File Manager
|
||||
* @CAIFPROTO_DEBUG: Debug link
|
||||
*
|
||||
* This enum defines the CAIF Channel type to be used. This defines
|
||||
* the service to connect to on the modem.
|
||||
|
@ -72,6 +73,7 @@ enum caif_protocol_type {
|
|||
CAIFPROTO_DATAGRAM_LOOP,
|
||||
CAIFPROTO_UTIL,
|
||||
CAIFPROTO_RFM,
|
||||
CAIFPROTO_DEBUG,
|
||||
_CAIFPROTO_MAX
|
||||
};
|
||||
#define CAIFPROTO_MAX _CAIFPROTO_MAX
|
||||
|
@ -83,6 +85,28 @@ enum caif_protocol_type {
|
|||
enum caif_at_type {
|
||||
CAIF_ATTYPE_PLAIN = 2
|
||||
};
|
||||
/**
|
||||
* enum caif_debug_type - Content selection for debug connection
|
||||
* @CAIF_DEBUG_TRACE_INTERACTIVE: Connection will contain
|
||||
* both trace and interactive debug.
|
||||
* @CAIF_DEBUG_TRACE: Connection contains trace only.
|
||||
* @CAIF_DEBUG_INTERACTIVE: Connection to interactive debug.
|
||||
*/
|
||||
enum caif_debug_type {
|
||||
CAIF_DEBUG_TRACE_INTERACTIVE = 0,
|
||||
CAIF_DEBUG_TRACE,
|
||||
CAIF_DEBUG_INTERACTIVE,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum caif_debug_service - Debug Service Endpoint
|
||||
* @CAIF_RADIO_DEBUG_SERVICE: Debug service on the Radio sub-system
|
||||
* @CAIF_APP_DEBUG_SERVICE: Debug for the applications sub-system
|
||||
*/
|
||||
enum caif_debug_service {
|
||||
CAIF_RADIO_DEBUG_SERVICE = 1,
|
||||
CAIF_APP_DEBUG_SERVICE
|
||||
};
|
||||
|
||||
/**
|
||||
* struct sockaddr_caif - the sockaddr structure for CAIF sockets.
|
||||
|
@ -109,6 +133,12 @@ enum caif_at_type {
|
|||
*
|
||||
* @u.rfm.volume: Volume to mount.
|
||||
*
|
||||
* @u.dbg: Applies when family = CAIFPROTO_DEBUG.
|
||||
*
|
||||
* @u.dbg.type: Type of debug connection to set up
|
||||
* (caif_debug_type).
|
||||
*
|
||||
* @u.dbg.service: Service sub-system to connect (caif_debug_service
|
||||
* Description:
|
||||
* This structure holds the connect parameters used for setting up a
|
||||
* CAIF Channel. It defines the service to connect to on the modem.
|
||||
|
@ -130,6 +160,10 @@ struct sockaddr_caif {
|
|||
__u32 connection_id;
|
||||
char volume[16];
|
||||
} rfm; /* CAIFPROTO_RFM */
|
||||
struct {
|
||||
__u8 type; /* type:enum caif_debug_type */
|
||||
__u8 service; /* service:caif_debug_service */
|
||||
} dbg; /* CAIFPROTO_DEBUG */
|
||||
} u;
|
||||
};
|
||||
|
||||
|
|
20
include/linux/can/platform/flexcan.h
Normal file
20
include/linux/can/platform/flexcan.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright (C) 2010 Marc Kleine-Budde <kernel@pengutronix.de>
|
||||
*
|
||||
* This file is released under the GPLv2
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __CAN_PLATFORM_FLEXCAN_H
|
||||
#define __CAN_PLATFORM_FLEXCAN_H
|
||||
|
||||
/**
|
||||
* struct flexcan_platform_data - flex CAN controller platform data
|
||||
* @transceiver_enable: - called to power on/off the transceiver
|
||||
*
|
||||
*/
|
||||
struct flexcan_platform_data {
|
||||
void (*transceiver_switch)(int enable);
|
||||
};
|
||||
|
||||
#endif /* __CAN_PLATFORM_FLEXCAN_H */
|
|
@ -49,9 +49,6 @@ typedef struct __user_cap_data_struct {
|
|||
} __user *cap_user_data_t;
|
||||
|
||||
|
||||
#define XATTR_CAPS_SUFFIX "capability"
|
||||
#define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX
|
||||
|
||||
#define VFS_CAP_REVISION_MASK 0xFF000000
|
||||
#define VFS_CAP_REVISION_SHIFT 24
|
||||
#define VFS_CAP_FLAGS_MASK ~VFS_CAP_REVISION_MASK
|
||||
|
|
|
@ -578,6 +578,7 @@ struct task_struct *cgroup_iter_next(struct cgroup *cgrp,
|
|||
void cgroup_iter_end(struct cgroup *cgrp, struct cgroup_iter *it);
|
||||
int cgroup_scan_tasks(struct cgroup_scanner *scan);
|
||||
int cgroup_attach_task(struct cgroup *, struct task_struct *);
|
||||
int cgroup_attach_task_current_cg(struct task_struct *);
|
||||
|
||||
/*
|
||||
* CSS ID is ID for cgroup_subsys_state structs under subsys. This only works
|
||||
|
@ -634,6 +635,12 @@ static inline int cgroupstats_build(struct cgroupstats *stats,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* No cgroups - nothing to do */
|
||||
static inline int cgroup_attach_task_current_cg(struct task_struct *t)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_CGROUPS */
|
||||
|
||||
#endif /* _LINUX_CGROUP_H */
|
||||
|
|
|
@ -292,6 +292,8 @@ clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec);
|
|||
*/
|
||||
extern int
|
||||
__clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq);
|
||||
extern void
|
||||
__clocksource_updatefreq_scale(struct clocksource *cs, u32 scale, u32 freq);
|
||||
|
||||
static inline int clocksource_register_hz(struct clocksource *cs, u32 hz)
|
||||
{
|
||||
|
@ -303,6 +305,15 @@ static inline int clocksource_register_khz(struct clocksource *cs, u32 khz)
|
|||
return __clocksource_register_scale(cs, 1000, khz);
|
||||
}
|
||||
|
||||
static inline void __clocksource_updatefreq_hz(struct clocksource *cs, u32 hz)
|
||||
{
|
||||
__clocksource_updatefreq_scale(cs, 1, hz);
|
||||
}
|
||||
|
||||
static inline void __clocksource_updatefreq_khz(struct clocksource *cs, u32 khz)
|
||||
{
|
||||
__clocksource_updatefreq_scale(cs, 1000, khz);
|
||||
}
|
||||
|
||||
static inline void
|
||||
clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec)
|
||||
|
@ -313,11 +324,13 @@ clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec)
|
|||
|
||||
#ifdef CONFIG_GENERIC_TIME_VSYSCALL
|
||||
extern void
|
||||
update_vsyscall(struct timespec *ts, struct clocksource *c, u32 mult);
|
||||
update_vsyscall(struct timespec *ts, struct timespec *wtm,
|
||||
struct clocksource *c, u32 mult);
|
||||
extern void update_vsyscall_tz(void);
|
||||
#else
|
||||
static inline void
|
||||
update_vsyscall(struct timespec *ts, struct clocksource *c, u32 mult)
|
||||
update_vsyscall(struct timespec *ts, struct timespec *wtm,
|
||||
struct clocksource *c, u32 mult)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
# define __release(x) __context__(x,-1)
|
||||
# define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0)
|
||||
# define __percpu __attribute__((noderef, address_space(3)))
|
||||
# define __rcu
|
||||
extern void __chk_user_ptr(const volatile void __user *);
|
||||
extern void __chk_io_ptr(const volatile void __iomem *);
|
||||
#else
|
||||
|
@ -34,6 +35,7 @@ extern void __chk_io_ptr(const volatile void __iomem *);
|
|||
# define __release(x) (void)0
|
||||
# define __cond_lock(x,c) (c)
|
||||
# define __percpu
|
||||
# define __rcu
|
||||
#endif
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
|
|
@ -55,6 +55,16 @@ struct consw {
|
|||
void (*con_invert_region)(struct vc_data *, u16 *, int);
|
||||
u16 *(*con_screen_pos)(struct vc_data *, int);
|
||||
unsigned long (*con_getxy)(struct vc_data *, unsigned long, int *, int *);
|
||||
/*
|
||||
* Prepare the console for the debugger. This includes, but is not
|
||||
* limited to, unblanking the console, loading an appropriate
|
||||
* palette, and allowing debugger generated output.
|
||||
*/
|
||||
int (*con_debug_enter)(struct vc_data *);
|
||||
/*
|
||||
* Restore the console to its pre-debug state as closely as possible.
|
||||
*/
|
||||
int (*con_debug_leave)(struct vc_data *);
|
||||
};
|
||||
|
||||
extern const struct consw *conswitchp;
|
||||
|
@ -69,6 +79,14 @@ int register_con_driver(const struct consw *csw, int first, int last);
|
|||
int unregister_con_driver(const struct consw *csw);
|
||||
int take_over_console(const struct consw *sw, int first, int last, int deflt);
|
||||
void give_up_console(const struct consw *sw);
|
||||
#ifdef CONFIG_HW_CONSOLE
|
||||
int con_debug_enter(struct vc_data *vc);
|
||||
int con_debug_leave(void);
|
||||
#else
|
||||
#define con_debug_enter(vc) (0)
|
||||
#define con_debug_leave() (0)
|
||||
#endif
|
||||
|
||||
/* scroll */
|
||||
#define SM_UP (1)
|
||||
#define SM_DOWN (2)
|
||||
|
|
|
@ -48,6 +48,33 @@ extern ssize_t arch_cpu_release(const char *, size_t);
|
|||
#endif
|
||||
struct notifier_block;
|
||||
|
||||
/*
|
||||
* CPU notifier priorities.
|
||||
*/
|
||||
enum {
|
||||
/*
|
||||
* SCHED_ACTIVE marks a cpu which is coming up active during
|
||||
* CPU_ONLINE and CPU_DOWN_FAILED and must be the first
|
||||
* notifier. CPUSET_ACTIVE adjusts cpuset according to
|
||||
* cpu_active mask right after SCHED_ACTIVE. During
|
||||
* CPU_DOWN_PREPARE, SCHED_INACTIVE and CPUSET_INACTIVE are
|
||||
* ordered in the similar way.
|
||||
*
|
||||
* This ordering guarantees consistent cpu_active mask and
|
||||
* migration behavior to all cpu notifiers.
|
||||
*/
|
||||
CPU_PRI_SCHED_ACTIVE = INT_MAX,
|
||||
CPU_PRI_CPUSET_ACTIVE = INT_MAX - 1,
|
||||
CPU_PRI_SCHED_INACTIVE = INT_MIN + 1,
|
||||
CPU_PRI_CPUSET_INACTIVE = INT_MIN,
|
||||
|
||||
/* migration should happen before other stuff but after perf */
|
||||
CPU_PRI_PERF = 20,
|
||||
CPU_PRI_MIGRATION = 10,
|
||||
/* prepare workqueues for other notifiers */
|
||||
CPU_PRI_WORKQUEUE = 5,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/* Need to know about CPUs going up/down? */
|
||||
#if defined(CONFIG_HOTPLUG_CPU) || !defined(MODULE)
|
||||
|
|
|
@ -196,11 +196,6 @@ extern int __cpufreq_driver_getavg(struct cpufreq_policy *policy,
|
|||
int cpufreq_register_governor(struct cpufreq_governor *governor);
|
||||
void cpufreq_unregister_governor(struct cpufreq_governor *governor);
|
||||
|
||||
int lock_policy_rwsem_read(int cpu);
|
||||
int lock_policy_rwsem_write(int cpu);
|
||||
void unlock_policy_rwsem_read(int cpu);
|
||||
void unlock_policy_rwsem_write(int cpu);
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* CPUFREQ DRIVER INTERFACE *
|
||||
|
|
|
@ -20,6 +20,7 @@ extern int number_of_cpusets; /* How many cpusets are defined in system? */
|
|||
|
||||
extern int cpuset_init(void);
|
||||
extern void cpuset_init_smp(void);
|
||||
extern void cpuset_update_active_cpus(void);
|
||||
extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask);
|
||||
extern int cpuset_cpus_allowed_fallback(struct task_struct *p);
|
||||
extern nodemask_t cpuset_mems_allowed(struct task_struct *p);
|
||||
|
@ -132,6 +133,11 @@ static inline void set_mems_allowed(nodemask_t nodemask)
|
|||
static inline int cpuset_init(void) { return 0; }
|
||||
static inline void cpuset_init_smp(void) {}
|
||||
|
||||
static inline void cpuset_update_active_cpus(void)
|
||||
{
|
||||
partition_sched_domains(1, NULL, NULL);
|
||||
}
|
||||
|
||||
static inline void cpuset_cpus_allowed(struct task_struct *p,
|
||||
struct cpumask *mask)
|
||||
{
|
||||
|
|
|
@ -153,6 +153,7 @@ struct cred {
|
|||
extern void __put_cred(struct cred *);
|
||||
extern void exit_creds(struct task_struct *);
|
||||
extern int copy_creds(struct task_struct *, unsigned long);
|
||||
extern const struct cred *get_task_cred(struct task_struct *);
|
||||
extern struct cred *cred_alloc_blank(void);
|
||||
extern struct cred *prepare_creds(void);
|
||||
extern struct cred *prepare_exec_creds(void);
|
||||
|
@ -273,33 +274,18 @@ static inline void put_cred(const struct cred *_cred)
|
|||
* @task: The task to query
|
||||
*
|
||||
* Access the objective credentials of a task. The caller must hold the RCU
|
||||
* readlock.
|
||||
* readlock or the task must be dead and unable to change its own credentials.
|
||||
*
|
||||
* The caller must make sure task doesn't go away, either by holding a ref on
|
||||
* task or by holding tasklist_lock to prevent it from being unlinked.
|
||||
* The result of this function should not be passed directly to get_cred();
|
||||
* rather get_task_cred() should be used instead.
|
||||
*/
|
||||
#define __task_cred(task) \
|
||||
((const struct cred *)(rcu_dereference_check((task)->real_cred, rcu_read_lock_held() || lockdep_tasklist_lock_is_held())))
|
||||
|
||||
/**
|
||||
* get_task_cred - Get another task's objective credentials
|
||||
* @task: The task to query
|
||||
*
|
||||
* Get the objective credentials of a task, pinning them so that they can't go
|
||||
* away. Accessing a task's credentials directly is not permitted.
|
||||
*
|
||||
* The caller must make sure task doesn't go away, either by holding a ref on
|
||||
* task or by holding tasklist_lock to prevent it from being unlinked.
|
||||
*/
|
||||
#define get_task_cred(task) \
|
||||
({ \
|
||||
struct cred *__cred; \
|
||||
rcu_read_lock(); \
|
||||
__cred = (struct cred *) __task_cred((task)); \
|
||||
get_cred(__cred); \
|
||||
rcu_read_unlock(); \
|
||||
__cred; \
|
||||
})
|
||||
#define __task_cred(task) \
|
||||
({ \
|
||||
const struct task_struct *__t = (task); \
|
||||
rcu_dereference_check(__t->real_cred, \
|
||||
rcu_read_lock_held() || \
|
||||
task_is_dead(__t)); \
|
||||
})
|
||||
|
||||
/**
|
||||
* get_current_cred - Get the current task's subjective credentials
|
||||
|
|
|
@ -45,6 +45,7 @@ extern unsigned long lpj_fine;
|
|||
void calibrate_delay(void);
|
||||
void msleep(unsigned int msecs);
|
||||
unsigned long msleep_interruptible(unsigned int msecs);
|
||||
void usleep_range(unsigned long min, unsigned long max);
|
||||
|
||||
static inline void ssleep(unsigned int seconds)
|
||||
{
|
||||
|
|
|
@ -84,9 +84,8 @@ struct device *bus_find_device_by_name(struct bus_type *bus,
|
|||
struct device *start,
|
||||
const char *name);
|
||||
|
||||
int __must_check bus_for_each_drv(struct bus_type *bus,
|
||||
struct device_driver *start, void *data,
|
||||
int (*fn)(struct device_driver *, void *));
|
||||
int bus_for_each_drv(struct bus_type *bus, struct device_driver *start,
|
||||
void *data, int (*fn)(struct device_driver *, void *));
|
||||
|
||||
void bus_sort_breadthfirst(struct bus_type *bus,
|
||||
int (*compare)(const struct device *a,
|
||||
|
@ -110,10 +109,12 @@ extern int bus_unregister_notifier(struct bus_type *bus,
|
|||
*/
|
||||
#define BUS_NOTIFY_ADD_DEVICE 0x00000001 /* device added */
|
||||
#define BUS_NOTIFY_DEL_DEVICE 0x00000002 /* device removed */
|
||||
#define BUS_NOTIFY_BOUND_DRIVER 0x00000003 /* driver bound to device */
|
||||
#define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be
|
||||
#define BUS_NOTIFY_BIND_DRIVER 0x00000003 /* driver about to be
|
||||
bound */
|
||||
#define BUS_NOTIFY_BOUND_DRIVER 0x00000004 /* driver bound to device */
|
||||
#define BUS_NOTIFY_UNBIND_DRIVER 0x00000005 /* driver about to be
|
||||
unbound */
|
||||
#define BUS_NOTIFY_UNBOUND_DRIVER 0x00000005 /* driver is unbound
|
||||
#define BUS_NOTIFY_UNBOUND_DRIVER 0x00000006 /* driver is unbound
|
||||
from the device */
|
||||
|
||||
extern struct kset *bus_get_kset(struct bus_type *bus);
|
||||
|
@ -551,7 +552,7 @@ extern int device_for_each_child(struct device *dev, void *data,
|
|||
int (*fn)(struct device *dev, void *data));
|
||||
extern struct device *device_find_child(struct device *dev, void *data,
|
||||
int (*match)(struct device *dev, void *data));
|
||||
extern int device_rename(struct device *dev, char *new_name);
|
||||
extern int device_rename(struct device *dev, const char *new_name);
|
||||
extern int device_move(struct device *dev, struct device *new_parent,
|
||||
enum dpm_order dpm_order);
|
||||
extern const char *device_get_devnode(struct device *dev,
|
||||
|
@ -638,43 +639,103 @@ extern void sysdev_shutdown(void);
|
|||
|
||||
/* debugging and troubleshooting/diagnostic helpers. */
|
||||
extern const char *dev_driver_string(const struct device *dev);
|
||||
#define dev_printk(level, dev, format, arg...) \
|
||||
printk(level "%s %s: " format , dev_driver_string(dev) , \
|
||||
dev_name(dev) , ## arg)
|
||||
|
||||
#define dev_emerg(dev, format, arg...) \
|
||||
dev_printk(KERN_EMERG , dev , format , ## arg)
|
||||
#define dev_alert(dev, format, arg...) \
|
||||
dev_printk(KERN_ALERT , dev , format , ## arg)
|
||||
#define dev_crit(dev, format, arg...) \
|
||||
dev_printk(KERN_CRIT , dev , format , ## arg)
|
||||
#define dev_err(dev, format, arg...) \
|
||||
dev_printk(KERN_ERR , dev , format , ## arg)
|
||||
#define dev_warn(dev, format, arg...) \
|
||||
dev_printk(KERN_WARNING , dev , format , ## arg)
|
||||
#define dev_notice(dev, format, arg...) \
|
||||
dev_printk(KERN_NOTICE , dev , format , ## arg)
|
||||
#define dev_info(dev, format, arg...) \
|
||||
dev_printk(KERN_INFO , dev , format , ## arg)
|
||||
|
||||
#ifdef CONFIG_PRINTK
|
||||
|
||||
extern int dev_printk(const char *level, const struct device *dev,
|
||||
const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 3, 4)));
|
||||
extern int dev_emerg(const struct device *dev, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
extern int dev_alert(const struct device *dev, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
extern int dev_crit(const struct device *dev, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
extern int dev_err(const struct device *dev, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
extern int dev_warn(const struct device *dev, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
extern int dev_notice(const struct device *dev, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
extern int _dev_info(const struct device *dev, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
|
||||
#else
|
||||
|
||||
static inline int dev_printk(const char *level, const struct device *dev,
|
||||
const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 3, 4)));
|
||||
static inline int dev_printk(const char *level, const struct device *dev,
|
||||
const char *fmt, ...)
|
||||
{ return 0; }
|
||||
|
||||
static inline int dev_emerg(const struct device *dev, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
static inline int dev_emerg(const struct device *dev, const char *fmt, ...)
|
||||
{ return 0; }
|
||||
static inline int dev_crit(const struct device *dev, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
static inline int dev_crit(const struct device *dev, const char *fmt, ...)
|
||||
{ return 0; }
|
||||
static inline int dev_alert(const struct device *dev, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
static inline int dev_alert(const struct device *dev, const char *fmt, ...)
|
||||
{ return 0; }
|
||||
static inline int dev_err(const struct device *dev, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
static inline int dev_err(const struct device *dev, const char *fmt, ...)
|
||||
{ return 0; }
|
||||
static inline int dev_warn(const struct device *dev, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
static inline int dev_warn(const struct device *dev, const char *fmt, ...)
|
||||
{ return 0; }
|
||||
static inline int dev_notice(const struct device *dev, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
static inline int dev_notice(const struct device *dev, const char *fmt, ...)
|
||||
{ return 0; }
|
||||
static inline int _dev_info(const struct device *dev, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
static inline int _dev_info(const struct device *dev, const char *fmt, ...)
|
||||
{ return 0; }
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Stupid hackaround for existing uses of non-printk uses dev_info
|
||||
*
|
||||
* Note that the definition of dev_info below is actually _dev_info
|
||||
* and a macro is used to avoid redefining dev_info
|
||||
*/
|
||||
|
||||
#define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
|
||||
|
||||
#if defined(DEBUG)
|
||||
#define dev_dbg(dev, format, arg...) \
|
||||
dev_printk(KERN_DEBUG , dev , format , ## arg)
|
||||
dev_printk(KERN_DEBUG, dev, format, ##arg)
|
||||
#elif defined(CONFIG_DYNAMIC_DEBUG)
|
||||
#define dev_dbg(dev, format, ...) do { \
|
||||
#define dev_dbg(dev, format, ...) \
|
||||
do { \
|
||||
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
} while (0)
|
||||
#else
|
||||
#define dev_dbg(dev, format, arg...) \
|
||||
({ if (0) dev_printk(KERN_DEBUG, dev, format, ##arg); 0; })
|
||||
#define dev_dbg(dev, format, arg...) \
|
||||
({ \
|
||||
if (0) \
|
||||
dev_printk(KERN_DEBUG, dev, format, ##arg); \
|
||||
0; \
|
||||
})
|
||||
#endif
|
||||
|
||||
#ifdef VERBOSE_DEBUG
|
||||
#define dev_vdbg dev_dbg
|
||||
#else
|
||||
|
||||
#define dev_vdbg(dev, format, arg...) \
|
||||
({ if (0) dev_printk(KERN_DEBUG, dev, format, ##arg); 0; })
|
||||
#define dev_vdbg(dev, format, arg...) \
|
||||
({ \
|
||||
if (0) \
|
||||
dev_printk(KERN_DEBUG, dev, format, ##arg); \
|
||||
0; \
|
||||
})
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -20,6 +20,7 @@ enum dmi_device_type {
|
|||
DMI_DEV_TYPE_SAS,
|
||||
DMI_DEV_TYPE_IPMI = -1,
|
||||
DMI_DEV_TYPE_OEM_STRING = -2,
|
||||
DMI_DEV_TYPE_DEV_ONBOARD = -3,
|
||||
};
|
||||
|
||||
struct dmi_header {
|
||||
|
@ -37,6 +38,14 @@ struct dmi_device {
|
|||
|
||||
#ifdef CONFIG_DMI
|
||||
|
||||
struct dmi_dev_onboard {
|
||||
struct dmi_device dev;
|
||||
int instance;
|
||||
int segment;
|
||||
int bus;
|
||||
int devfn;
|
||||
};
|
||||
|
||||
extern int dmi_check_system(const struct dmi_system_id *list);
|
||||
const struct dmi_system_id *dmi_first_match(const struct dmi_system_id *list);
|
||||
extern const char * dmi_get_system_info(int field);
|
||||
|
|
34
include/linux/dns_resolver.h
Normal file
34
include/linux/dns_resolver.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* DNS Resolver upcall management for CIFS DFS and AFS
|
||||
* Handles host name to IP address resolution and DNS query for AFSDB RR.
|
||||
*
|
||||
* Copyright (c) International Business Machines Corp., 2008
|
||||
* Author(s): Steve French (sfrench@us.ibm.com)
|
||||
* Wang Lei (wang840925@gmail.com)
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation; either version 2.1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This library 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_DNS_RESOLVER_H
|
||||
#define _LINUX_DNS_RESOLVER_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
extern int dns_query(const char *type, const char *name, size_t namelen,
|
||||
const char *options, char **_result, time_t *_expiry);
|
||||
|
||||
#endif /* KERNEL */
|
||||
|
||||
#endif /* _LINUX_DNS_RESOLVER_H */
|
|
@ -49,7 +49,7 @@
|
|||
#define FS_DQUOT_VERSION 1 /* fs_disk_quota.d_version */
|
||||
typedef struct fs_disk_quota {
|
||||
__s8 d_version; /* version of this structure */
|
||||
__s8 d_flags; /* XFS_{USER,PROJ,GROUP}_QUOTA */
|
||||
__s8 d_flags; /* FS_{USER,PROJ,GROUP}_QUOTA */
|
||||
__u16 d_fieldmask; /* field specifier */
|
||||
__u32 d_id; /* user, project, or group ID */
|
||||
__u64 d_blk_hardlimit;/* absolute limit on disk blks */
|
||||
|
@ -119,18 +119,18 @@ typedef struct fs_disk_quota {
|
|||
#define FS_DQ_ACCT_MASK (FS_DQ_BCOUNT | FS_DQ_ICOUNT | FS_DQ_RTBCOUNT)
|
||||
|
||||
/*
|
||||
* Various flags related to quotactl(2). Only relevant to XFS filesystems.
|
||||
* Various flags related to quotactl(2).
|
||||
*/
|
||||
#define XFS_QUOTA_UDQ_ACCT (1<<0) /* user quota accounting */
|
||||
#define XFS_QUOTA_UDQ_ENFD (1<<1) /* user quota limits enforcement */
|
||||
#define XFS_QUOTA_GDQ_ACCT (1<<2) /* group quota accounting */
|
||||
#define XFS_QUOTA_GDQ_ENFD (1<<3) /* group quota limits enforcement */
|
||||
#define XFS_QUOTA_PDQ_ACCT (1<<4) /* project quota accounting */
|
||||
#define XFS_QUOTA_PDQ_ENFD (1<<5) /* project quota limits enforcement */
|
||||
#define FS_QUOTA_UDQ_ACCT (1<<0) /* user quota accounting */
|
||||
#define FS_QUOTA_UDQ_ENFD (1<<1) /* user quota limits enforcement */
|
||||
#define FS_QUOTA_GDQ_ACCT (1<<2) /* group quota accounting */
|
||||
#define FS_QUOTA_GDQ_ENFD (1<<3) /* group quota limits enforcement */
|
||||
#define FS_QUOTA_PDQ_ACCT (1<<4) /* project quota accounting */
|
||||
#define FS_QUOTA_PDQ_ENFD (1<<5) /* project quota limits enforcement */
|
||||
|
||||
#define XFS_USER_QUOTA (1<<0) /* user quota type */
|
||||
#define XFS_PROJ_QUOTA (1<<1) /* project quota type */
|
||||
#define XFS_GROUP_QUOTA (1<<2) /* group quota type */
|
||||
#define FS_USER_QUOTA (1<<0) /* user quota type */
|
||||
#define FS_PROJ_QUOTA (1<<1) /* project quota type */
|
||||
#define FS_GROUP_QUOTA (1<<2) /* group quota type */
|
||||
|
||||
/*
|
||||
* fs_quota_stat is the struct returned in Q_XGETQSTAT for a given file system.
|
||||
|
@ -151,7 +151,7 @@ typedef struct fs_qfilestat {
|
|||
|
||||
typedef struct fs_quota_stat {
|
||||
__s8 qs_version; /* version number for future changes */
|
||||
__u16 qs_flags; /* XFS_QUOTA_{U,P,G}DQ_{ACCT,ENFD} */
|
||||
__u16 qs_flags; /* FS_QUOTA_{U,P,G}DQ_{ACCT,ENFD} */
|
||||
__s8 qs_pad; /* unused */
|
||||
fs_qfilestat_t qs_uquota; /* user quota storage information */
|
||||
fs_qfilestat_t qs_gquota; /* group quota storage information */
|
||||
|
|
|
@ -62,6 +62,7 @@ typedef enum fe_caps {
|
|||
FE_CAN_8VSB = 0x200000,
|
||||
FE_CAN_16VSB = 0x400000,
|
||||
FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */
|
||||
FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */
|
||||
FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */
|
||||
FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */
|
||||
FE_CAN_RECOVER = 0x40000000, /* frontend can recover from a cable unplug automatically */
|
||||
|
|
|
@ -24,6 +24,6 @@
|
|||
#define _DVBVERSION_H_
|
||||
|
||||
#define DVB_API_VERSION 5
|
||||
#define DVB_API_VERSION_MINOR 1
|
||||
#define DVB_API_VERSION_MINOR 2
|
||||
|
||||
#endif /*_DVBVERSION_H_*/
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#define PCI_EEPROM_WIDTH_93C46 6
|
||||
#define PCI_EEPROM_WIDTH_93C56 8
|
||||
#define PCI_EEPROM_WIDTH_93C66 8
|
||||
#define PCI_EEPROM_WIDTH_93C86 8
|
||||
#define PCI_EEPROM_WIDTH_OPCODE 3
|
||||
#define PCI_EEPROM_WRITE_OPCODE 0x05
|
||||
#define PCI_EEPROM_READ_OPCODE 0x06
|
||||
|
|
|
@ -126,6 +126,20 @@ static inline void random_ether_addr(u8 *addr)
|
|||
addr [0] |= 0x02; /* set local assignment bit (IEEE802) */
|
||||
}
|
||||
|
||||
/**
|
||||
* dev_hw_addr_random - Create random MAC and set device flag
|
||||
* @dev: pointer to net_device structure
|
||||
* @addr: Pointer to a six-byte array containing the Ethernet address
|
||||
*
|
||||
* Generate random MAC to be used by a device and set addr_assign_type
|
||||
* so the state can be read by sysfs and be used by udev.
|
||||
*/
|
||||
static inline void dev_hw_addr_random(struct net_device *dev, u8 *hwaddr)
|
||||
{
|
||||
dev->addr_assign_type |= NET_ADDR_RANDOM;
|
||||
random_ether_addr(hwaddr);
|
||||
}
|
||||
|
||||
/**
|
||||
* compare_ether_addr - Compare two Ethernet addresses
|
||||
* @addr1: Pointer to a six-byte array containing the Ethernet address
|
||||
|
|
|
@ -379,11 +379,22 @@ struct ethtool_rxnfc {
|
|||
__u32 flow_type;
|
||||
/* The rx flow hash value or the rule DB size */
|
||||
__u64 data;
|
||||
/* The following fields are not valid and must not be used for
|
||||
* the ETHTOOL_{G,X}RXFH commands. */
|
||||
struct ethtool_rx_flow_spec fs;
|
||||
__u32 rule_cnt;
|
||||
__u32 rule_locs[0];
|
||||
};
|
||||
|
||||
struct ethtool_rxfh_indir {
|
||||
__u32 cmd;
|
||||
/* On entry, this is the array size of the user buffer. On
|
||||
* return from ETHTOOL_GRXFHINDIR, this is the array size of
|
||||
* the hardware indirection table. */
|
||||
__u32 size;
|
||||
__u32 ring_index[0]; /* ring/queue index for each hash value */
|
||||
};
|
||||
|
||||
struct ethtool_rx_ntuple_flow_spec {
|
||||
__u32 flow_type;
|
||||
union {
|
||||
|
@ -457,7 +468,7 @@ int ethtool_op_set_tso(struct net_device *dev, u32 data);
|
|||
u32 ethtool_op_get_ufo(struct net_device *dev);
|
||||
int ethtool_op_set_ufo(struct net_device *dev, u32 data);
|
||||
u32 ethtool_op_get_flags(struct net_device *dev);
|
||||
int ethtool_op_set_flags(struct net_device *dev, u32 data);
|
||||
int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported);
|
||||
void ethtool_ntuple_flush(struct net_device *dev);
|
||||
|
||||
/**
|
||||
|
@ -576,6 +587,10 @@ struct ethtool_ops {
|
|||
int (*set_rx_ntuple)(struct net_device *,
|
||||
struct ethtool_rx_ntuple *);
|
||||
int (*get_rx_ntuple)(struct net_device *, u32 stringset, void *);
|
||||
int (*get_rxfh_indir)(struct net_device *,
|
||||
struct ethtool_rxfh_indir *);
|
||||
int (*set_rxfh_indir)(struct net_device *,
|
||||
const struct ethtool_rxfh_indir *);
|
||||
};
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
|
@ -586,29 +601,29 @@ struct ethtool_ops {
|
|||
#define ETHTOOL_GREGS 0x00000004 /* Get NIC registers. */
|
||||
#define ETHTOOL_GWOL 0x00000005 /* Get wake-on-lan options. */
|
||||
#define ETHTOOL_SWOL 0x00000006 /* Set wake-on-lan options. */
|
||||
#define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */
|
||||
#define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */
|
||||
#define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */
|
||||
#define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */
|
||||
#define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */
|
||||
#define ETHTOOL_GLINK 0x0000000a /* Get link status (ethtool_value) */
|
||||
#define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */
|
||||
#define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */
|
||||
#define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */
|
||||
#define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */
|
||||
#define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */
|
||||
#define ETHTOOL_SCOALESCE 0x0000000f /* Set coalesce config. */
|
||||
#define ETHTOOL_GRINGPARAM 0x00000010 /* Get ring parameters */
|
||||
#define ETHTOOL_SRINGPARAM 0x00000011 /* Set ring parameters. */
|
||||
#define ETHTOOL_GPAUSEPARAM 0x00000012 /* Get pause parameters */
|
||||
#define ETHTOOL_SPAUSEPARAM 0x00000013 /* Set pause parameters. */
|
||||
#define ETHTOOL_GRXCSUM 0x00000014 /* Get RX hw csum enable (ethtool_value) */
|
||||
#define ETHTOOL_SRXCSUM 0x00000015 /* Set RX hw csum enable (ethtool_value) */
|
||||
#define ETHTOOL_GTXCSUM 0x00000016 /* Get TX hw csum enable (ethtool_value) */
|
||||
#define ETHTOOL_STXCSUM 0x00000017 /* Set TX hw csum enable (ethtool_value) */
|
||||
#define ETHTOOL_GRXCSUM 0x00000014 /* Get RX hw csum enable (ethtool_value) */
|
||||
#define ETHTOOL_SRXCSUM 0x00000015 /* Set RX hw csum enable (ethtool_value) */
|
||||
#define ETHTOOL_GTXCSUM 0x00000016 /* Get TX hw csum enable (ethtool_value) */
|
||||
#define ETHTOOL_STXCSUM 0x00000017 /* Set TX hw csum enable (ethtool_value) */
|
||||
#define ETHTOOL_GSG 0x00000018 /* Get scatter-gather enable
|
||||
* (ethtool_value) */
|
||||
#define ETHTOOL_SSG 0x00000019 /* Set scatter-gather enable
|
||||
* (ethtool_value). */
|
||||
#define ETHTOOL_TEST 0x0000001a /* execute NIC self-test. */
|
||||
#define ETHTOOL_GSTRINGS 0x0000001b /* get specified string set */
|
||||
#define ETHTOOL_PHYS_ID 0x0000001c /* identify the NIC */
|
||||
#define ETHTOOL_PHYS_ID 0x0000001c /* identify the NIC */
|
||||
#define ETHTOOL_GSTATS 0x0000001d /* get NIC-specific statistics */
|
||||
#define ETHTOOL_GTSO 0x0000001e /* Get TSO enable (ethtool_value) */
|
||||
#define ETHTOOL_STSO 0x0000001f /* Set TSO enable (ethtool_value) */
|
||||
|
@ -619,8 +634,8 @@ struct ethtool_ops {
|
|||
#define ETHTOOL_SGSO 0x00000024 /* Set GSO enable (ethtool_value) */
|
||||
#define ETHTOOL_GFLAGS 0x00000025 /* Get flags bitmap(ethtool_value) */
|
||||
#define ETHTOOL_SFLAGS 0x00000026 /* Set flags bitmap(ethtool_value) */
|
||||
#define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */
|
||||
#define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */
|
||||
#define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */
|
||||
#define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */
|
||||
|
||||
#define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */
|
||||
#define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */
|
||||
|
@ -637,6 +652,8 @@ struct ethtool_ops {
|
|||
#define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */
|
||||
#define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */
|
||||
#define ETHTOOL_GSSET_INFO 0x00000037 /* Get string set info */
|
||||
#define ETHTOOL_GRXFHINDIR 0x00000038 /* Get RX flow hash indir'n table */
|
||||
#define ETHTOOL_SRXFHINDIR 0x00000039 /* Set RX flow hash indir'n table */
|
||||
|
||||
/* compatibility with older code */
|
||||
#define SPARC_ETH_GSET ETHTOOL_GSET
|
||||
|
@ -645,18 +662,18 @@ struct ethtool_ops {
|
|||
/* Indicates what features are supported by the interface. */
|
||||
#define SUPPORTED_10baseT_Half (1 << 0)
|
||||
#define SUPPORTED_10baseT_Full (1 << 1)
|
||||
#define SUPPORTED_100baseT_Half (1 << 2)
|
||||
#define SUPPORTED_100baseT_Full (1 << 3)
|
||||
#define SUPPORTED_100baseT_Half (1 << 2)
|
||||
#define SUPPORTED_100baseT_Full (1 << 3)
|
||||
#define SUPPORTED_1000baseT_Half (1 << 4)
|
||||
#define SUPPORTED_1000baseT_Full (1 << 5)
|
||||
#define SUPPORTED_Autoneg (1 << 6)
|
||||
#define SUPPORTED_TP (1 << 7)
|
||||
#define SUPPORTED_AUI (1 << 8)
|
||||
#define SUPPORTED_MII (1 << 9)
|
||||
#define SUPPORTED_FIBRE (1 << 10)
|
||||
#define SUPPORTED_FIBRE (1 << 10)
|
||||
#define SUPPORTED_BNC (1 << 11)
|
||||
#define SUPPORTED_10000baseT_Full (1 << 12)
|
||||
#define SUPPORTED_Pause (1 << 13)
|
||||
#define SUPPORTED_Pause (1 << 13)
|
||||
#define SUPPORTED_Asym_Pause (1 << 14)
|
||||
#define SUPPORTED_2500baseX_Full (1 << 15)
|
||||
#define SUPPORTED_Backplane (1 << 16)
|
||||
|
@ -666,8 +683,8 @@ struct ethtool_ops {
|
|||
#define SUPPORTED_10000baseR_FEC (1 << 20)
|
||||
|
||||
/* Indicates what features are advertised by the interface. */
|
||||
#define ADVERTISED_10baseT_Half (1 << 0)
|
||||
#define ADVERTISED_10baseT_Full (1 << 1)
|
||||
#define ADVERTISED_10baseT_Half (1 << 0)
|
||||
#define ADVERTISED_10baseT_Full (1 << 1)
|
||||
#define ADVERTISED_100baseT_Half (1 << 2)
|
||||
#define ADVERTISED_100baseT_Full (1 << 3)
|
||||
#define ADVERTISED_1000baseT_Half (1 << 4)
|
||||
|
@ -706,12 +723,12 @@ struct ethtool_ops {
|
|||
#define DUPLEX_FULL 0x01
|
||||
|
||||
/* Which connector port. */
|
||||
#define PORT_TP 0x00
|
||||
#define PORT_TP 0x00
|
||||
#define PORT_AUI 0x01
|
||||
#define PORT_MII 0x02
|
||||
#define PORT_FIBRE 0x03
|
||||
#define PORT_BNC 0x04
|
||||
#define PORT_DA 0x05
|
||||
#define PORT_DA 0x05
|
||||
#define PORT_NONE 0xef
|
||||
#define PORT_OTHER 0xff
|
||||
|
||||
|
@ -725,7 +742,7 @@ struct ethtool_ops {
|
|||
/* Enable or disable autonegotiation. If this is set to enable,
|
||||
* the forced link modes above are completely ignored.
|
||||
*/
|
||||
#define AUTONEG_DISABLE 0x00
|
||||
#define AUTONEG_DISABLE 0x00
|
||||
#define AUTONEG_ENABLE 0x01
|
||||
|
||||
/* Mode MDI or MDI-X */
|
||||
|
|
|
@ -400,7 +400,6 @@ struct ext3_inode {
|
|||
#define EXT3_MOUNT_POSIX_ACL 0x08000 /* POSIX Access Control Lists */
|
||||
#define EXT3_MOUNT_RESERVATION 0x10000 /* Preallocation */
|
||||
#define EXT3_MOUNT_BARRIER 0x20000 /* Use block barriers */
|
||||
#define EXT3_MOUNT_NOBH 0x40000 /* No bufferheads */
|
||||
#define EXT3_MOUNT_QUOTA 0x80000 /* Some quota option set */
|
||||
#define EXT3_MOUNT_USRQUOTA 0x100000 /* "old" user quota */
|
||||
#define EXT3_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
#include <linux/i2c.h>
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/kgdb.h>
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
/* Definitions of frame buffers */
|
||||
|
||||
|
@ -607,6 +610,12 @@ struct fb_deferred_io {
|
|||
* LOCKING NOTE: those functions must _ALL_ be called with the console
|
||||
* semaphore held, this is the only suitable locking mechanism we have
|
||||
* in 2.6. Some may be called at interrupt time at this point though.
|
||||
*
|
||||
* The exception to this is the debug related hooks. Putting the fb
|
||||
* into a debug state (e.g. flipping to the kernel console) and restoring
|
||||
* it must be done in a lock-free manner, so low level drivers should
|
||||
* keep track of the initial console (if applicable) and may need to
|
||||
* perform direct, unlocked hardware writes in these hooks.
|
||||
*/
|
||||
|
||||
struct fb_ops {
|
||||
|
@ -676,6 +685,10 @@ struct fb_ops {
|
|||
|
||||
/* teardown any resources to do with this framebuffer */
|
||||
void (*fb_destroy)(struct fb_info *info);
|
||||
|
||||
/* called at KDB enter and leave time to prepare the console */
|
||||
int (*fb_debug_enter)(struct fb_info *info);
|
||||
int (*fb_debug_leave)(struct fb_info *info);
|
||||
};
|
||||
|
||||
#ifdef CONFIG_FB_TILEBLITTING
|
||||
|
@ -873,6 +886,8 @@ struct fb_info {
|
|||
static inline struct apertures_struct *alloc_apertures(unsigned int max_num) {
|
||||
struct apertures_struct *a = kzalloc(sizeof(struct apertures_struct)
|
||||
+ max_num * sizeof(struct aperture), GFP_KERNEL);
|
||||
if (!a)
|
||||
return NULL;
|
||||
a->count = max_num;
|
||||
return a;
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <linux/rcupdate.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/fs.h>
|
||||
|
||||
#include <asm/atomic.h>
|
||||
|
||||
|
@ -61,7 +62,8 @@ struct files_struct {
|
|||
(rcu_dereference_check((fdtfd), \
|
||||
rcu_read_lock_held() || \
|
||||
lockdep_is_held(&(files)->file_lock) || \
|
||||
atomic_read(&(files)->count) == 1))
|
||||
atomic_read(&(files)->count) == 1 || \
|
||||
rcu_my_thread_group_empty()))
|
||||
|
||||
#define files_fdtable(files) \
|
||||
(rcu_dereference_check_fdtable((files), (files)->fdt))
|
||||
|
|
|
@ -91,6 +91,54 @@ struct sock_fprog { /* Required for SO_ATTACH_FILTER. */
|
|||
#define BPF_TAX 0x00
|
||||
#define BPF_TXA 0x80
|
||||
|
||||
enum {
|
||||
BPF_S_RET_K = 0,
|
||||
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_AND_K,
|
||||
BPF_S_ALU_AND_X,
|
||||
BPF_S_ALU_OR_K,
|
||||
BPF_S_ALU_OR_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,
|
||||
};
|
||||
|
||||
#ifndef BPF_MAXINSNS
|
||||
#define BPF_MAXINSNS 4096
|
||||
#endif
|
||||
|
|
|
@ -30,12 +30,18 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/firewire-constants.h>
|
||||
|
||||
#define FW_CDEV_EVENT_BUS_RESET 0x00
|
||||
#define FW_CDEV_EVENT_RESPONSE 0x01
|
||||
#define FW_CDEV_EVENT_REQUEST 0x02
|
||||
#define FW_CDEV_EVENT_ISO_INTERRUPT 0x03
|
||||
#define FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED 0x04
|
||||
#define FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED 0x05
|
||||
#define FW_CDEV_EVENT_BUS_RESET 0x00
|
||||
#define FW_CDEV_EVENT_RESPONSE 0x01
|
||||
#define FW_CDEV_EVENT_REQUEST 0x02
|
||||
#define FW_CDEV_EVENT_ISO_INTERRUPT 0x03
|
||||
#define FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED 0x04
|
||||
#define FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED 0x05
|
||||
|
||||
/* available since kernel version 2.6.36 */
|
||||
#define FW_CDEV_EVENT_REQUEST2 0x06
|
||||
#define FW_CDEV_EVENT_PHY_PACKET_SENT 0x07
|
||||
#define FW_CDEV_EVENT_PHY_PACKET_RECEIVED 0x08
|
||||
#define FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL 0x09
|
||||
|
||||
/**
|
||||
* struct fw_cdev_event_common - Common part of all fw_cdev_event_ types
|
||||
|
@ -68,6 +74,10 @@ struct fw_cdev_event_common {
|
|||
* This event is sent when the bus the device belongs to goes through a bus
|
||||
* reset. It provides information about the new bus configuration, such as
|
||||
* new node ID for this device, new root ID, and others.
|
||||
*
|
||||
* If @bm_node_id is 0xffff right after bus reset it can be reread by an
|
||||
* %FW_CDEV_IOC_GET_INFO ioctl after bus manager selection was finished.
|
||||
* Kernels with ABI version < 4 do not set @bm_node_id.
|
||||
*/
|
||||
struct fw_cdev_event_bus_reset {
|
||||
__u64 closure;
|
||||
|
@ -82,8 +92,9 @@ struct fw_cdev_event_bus_reset {
|
|||
|
||||
/**
|
||||
* struct fw_cdev_event_response - Sent when a response packet was received
|
||||
* @closure: See &fw_cdev_event_common;
|
||||
* set by %FW_CDEV_IOC_SEND_REQUEST ioctl
|
||||
* @closure: See &fw_cdev_event_common; set by %FW_CDEV_IOC_SEND_REQUEST
|
||||
* or %FW_CDEV_IOC_SEND_BROADCAST_REQUEST
|
||||
* or %FW_CDEV_IOC_SEND_STREAM_PACKET ioctl
|
||||
* @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_RESPONSE
|
||||
* @rcode: Response code returned by the remote node
|
||||
* @length: Data length, i.e. the response's payload size in bytes
|
||||
|
@ -93,6 +104,11 @@ struct fw_cdev_event_bus_reset {
|
|||
* sent by %FW_CDEV_IOC_SEND_REQUEST ioctl. The payload data for responses
|
||||
* carrying data (read and lock responses) follows immediately and can be
|
||||
* accessed through the @data field.
|
||||
*
|
||||
* The event is also generated after conclusions of transactions that do not
|
||||
* involve response packets. This includes unified write transactions,
|
||||
* broadcast write transactions, and transmission of asynchronous stream
|
||||
* packets. @rcode indicates success or failure of such transmissions.
|
||||
*/
|
||||
struct fw_cdev_event_response {
|
||||
__u64 closure;
|
||||
|
@ -103,11 +119,46 @@ struct fw_cdev_event_response {
|
|||
};
|
||||
|
||||
/**
|
||||
* struct fw_cdev_event_request - Sent on incoming request to an address region
|
||||
* struct fw_cdev_event_request - Old version of &fw_cdev_event_request2
|
||||
* @closure: See &fw_cdev_event_common; set by %FW_CDEV_IOC_ALLOCATE ioctl
|
||||
* @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_REQUEST
|
||||
* @tcode: See &fw_cdev_event_request2
|
||||
* @offset: See &fw_cdev_event_request2
|
||||
* @handle: See &fw_cdev_event_request2
|
||||
* @length: See &fw_cdev_event_request2
|
||||
* @data: See &fw_cdev_event_request2
|
||||
*
|
||||
* This event is sent instead of &fw_cdev_event_request2 if the kernel or
|
||||
* the client implements ABI version <= 3.
|
||||
*
|
||||
* Unlike &fw_cdev_event_request2, the sender identity cannot be established,
|
||||
* broadcast write requests cannot be distinguished from unicast writes, and
|
||||
* @tcode of lock requests is %TCODE_LOCK_REQUEST.
|
||||
*
|
||||
* Requests to the FCP_REQUEST or FCP_RESPONSE register are responded to as
|
||||
* with &fw_cdev_event_request2, except in kernel 2.6.32 and older which send
|
||||
* the response packet of the client's %FW_CDEV_IOC_SEND_RESPONSE ioctl.
|
||||
*/
|
||||
struct fw_cdev_event_request {
|
||||
__u64 closure;
|
||||
__u32 type;
|
||||
__u32 tcode;
|
||||
__u64 offset;
|
||||
__u32 handle;
|
||||
__u32 length;
|
||||
__u32 data[0];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fw_cdev_event_request2 - Sent on incoming request to an address region
|
||||
* @closure: See &fw_cdev_event_common; set by %FW_CDEV_IOC_ALLOCATE ioctl
|
||||
* @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_REQUEST2
|
||||
* @tcode: Transaction code of the incoming request
|
||||
* @offset: The offset into the 48-bit per-node address space
|
||||
* @source_node_id: Sender node ID
|
||||
* @destination_node_id: Destination node ID
|
||||
* @card: The index of the card from which the request came
|
||||
* @generation: Bus generation in which the request is valid
|
||||
* @handle: Reference to the kernel-side pending request
|
||||
* @length: Data length, i.e. the request's payload size in bytes
|
||||
* @data: Incoming data, if any
|
||||
|
@ -120,12 +171,42 @@ struct fw_cdev_event_response {
|
|||
*
|
||||
* The payload data for requests carrying data (write and lock requests)
|
||||
* follows immediately and can be accessed through the @data field.
|
||||
*
|
||||
* Unlike &fw_cdev_event_request, @tcode of lock requests is one of the
|
||||
* firewire-core specific %TCODE_LOCK_MASK_SWAP...%TCODE_LOCK_VENDOR_DEPENDENT,
|
||||
* i.e. encodes the extended transaction code.
|
||||
*
|
||||
* @card may differ from &fw_cdev_get_info.card because requests are received
|
||||
* from all cards of the Linux host. @source_node_id, @destination_node_id, and
|
||||
* @generation pertain to that card. Destination node ID and bus generation may
|
||||
* therefore differ from the corresponding fields of the last
|
||||
* &fw_cdev_event_bus_reset.
|
||||
*
|
||||
* @destination_node_id may also differ from the current node ID because of a
|
||||
* non-local bus ID part or in case of a broadcast write request. Note, a
|
||||
* client must call an %FW_CDEV_IOC_SEND_RESPONSE ioctl even in case of a
|
||||
* broadcast write request; the kernel will then release the kernel-side pending
|
||||
* request but will not actually send a response packet.
|
||||
*
|
||||
* In case of a write request to FCP_REQUEST or FCP_RESPONSE, the kernel already
|
||||
* sent a write response immediately after the request was received; in this
|
||||
* case the client must still call an %FW_CDEV_IOC_SEND_RESPONSE ioctl to
|
||||
* release the kernel-side pending request, though another response won't be
|
||||
* sent.
|
||||
*
|
||||
* If the client subsequently needs to initiate requests to the sender node of
|
||||
* an &fw_cdev_event_request2, it needs to use a device file with matching
|
||||
* card index, node ID, and generation for outbound requests.
|
||||
*/
|
||||
struct fw_cdev_event_request {
|
||||
struct fw_cdev_event_request2 {
|
||||
__u64 closure;
|
||||
__u32 type;
|
||||
__u32 tcode;
|
||||
__u64 offset;
|
||||
__u32 source_node_id;
|
||||
__u32 destination_node_id;
|
||||
__u32 card;
|
||||
__u32 generation;
|
||||
__u32 handle;
|
||||
__u32 length;
|
||||
__u32 data[0];
|
||||
|
@ -141,26 +222,43 @@ struct fw_cdev_event_request {
|
|||
* @header: Stripped headers, if any
|
||||
*
|
||||
* This event is sent when the controller has completed an &fw_cdev_iso_packet
|
||||
* with the %FW_CDEV_ISO_INTERRUPT bit set. In the receive case, the headers
|
||||
* stripped of all packets up until and including the interrupt packet are
|
||||
* returned in the @header field. The amount of header data per packet is as
|
||||
* specified at iso context creation by &fw_cdev_create_iso_context.header_size.
|
||||
* with the %FW_CDEV_ISO_INTERRUPT bit set.
|
||||
*
|
||||
* In version 1 of this ABI, header data consisted of the 1394 isochronous
|
||||
* packet header, followed by quadlets from the packet payload if
|
||||
* &fw_cdev_create_iso_context.header_size > 4.
|
||||
* Isochronous transmit events (context type %FW_CDEV_ISO_CONTEXT_TRANSMIT):
|
||||
*
|
||||
* In version 2 of this ABI, header data consist of the 1394 isochronous
|
||||
* packet header, followed by a timestamp quadlet if
|
||||
* &fw_cdev_create_iso_context.header_size > 4, followed by quadlets from the
|
||||
* packet payload if &fw_cdev_create_iso_context.header_size > 8.
|
||||
* In version 3 and some implementations of version 2 of the ABI, &header_length
|
||||
* is a multiple of 4 and &header contains timestamps of all packets up until
|
||||
* the interrupt packet. The format of the timestamps is as described below for
|
||||
* isochronous reception. In version 1 of the ABI, &header_length was 0.
|
||||
*
|
||||
* Isochronous receive events (context type %FW_CDEV_ISO_CONTEXT_RECEIVE):
|
||||
*
|
||||
* The headers stripped of all packets up until and including the interrupt
|
||||
* packet are returned in the @header field. The amount of header data per
|
||||
* packet is as specified at iso context creation by
|
||||
* &fw_cdev_create_iso_context.header_size.
|
||||
*
|
||||
* Hence, _interrupt.header_length / _context.header_size is the number of
|
||||
* packets received in this interrupt event. The client can now iterate
|
||||
* through the mmap()'ed DMA buffer according to this number of packets and
|
||||
* to the buffer sizes as the client specified in &fw_cdev_queue_iso.
|
||||
*
|
||||
* Since version 2 of this ABI, the portion for each packet in _interrupt.header
|
||||
* consists of the 1394 isochronous packet header, followed by a timestamp
|
||||
* quadlet if &fw_cdev_create_iso_context.header_size > 4, followed by quadlets
|
||||
* from the packet payload if &fw_cdev_create_iso_context.header_size > 8.
|
||||
*
|
||||
* Format of 1394 iso packet header: 16 bits data_length, 2 bits tag, 6 bits
|
||||
* channel, 4 bits tcode, 4 bits sy, in big endian byte order.
|
||||
* data_length is the actual received size of the packet without the four
|
||||
* 1394 iso packet header bytes.
|
||||
*
|
||||
* Format of timestamp: 16 bits invalid, 3 bits cycleSeconds, 13 bits
|
||||
* cycleCount, in big endian byte order.
|
||||
*
|
||||
* In version 1 of the ABI, no timestamp quadlet was inserted; instead, payload
|
||||
* data followed directly after the 1394 is header if header_size > 4.
|
||||
* Behaviour of ver. 1 of this ABI is no longer available since ABI ver. 2.
|
||||
*
|
||||
* Format of 1394 iso packet header: 16 bits len, 2 bits tag, 6 bits channel,
|
||||
* 4 bits tcode, 4 bits sy, in big endian byte order. Format of timestamp:
|
||||
* 16 bits invalid, 3 bits cycleSeconds, 13 bits cycleCount, in big endian byte
|
||||
* order.
|
||||
*/
|
||||
struct fw_cdev_event_iso_interrupt {
|
||||
__u64 closure;
|
||||
|
@ -170,6 +268,43 @@ struct fw_cdev_event_iso_interrupt {
|
|||
__u32 header[0];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fw_cdev_event_iso_interrupt_mc - An iso buffer chunk was completed
|
||||
* @closure: See &fw_cdev_event_common;
|
||||
* set by %FW_CDEV_CREATE_ISO_CONTEXT ioctl
|
||||
* @type: %FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL
|
||||
* @completed: Offset into the receive buffer; data before this offest is valid
|
||||
*
|
||||
* This event is sent in multichannel contexts (context type
|
||||
* %FW_CDEV_ISO_CONTEXT_RECEIVE_MULTICHANNEL) for &fw_cdev_iso_packet buffer
|
||||
* chunks that have the %FW_CDEV_ISO_INTERRUPT bit set. Whether this happens
|
||||
* when a packet is completed and/or when a buffer chunk is completed depends
|
||||
* on the hardware implementation.
|
||||
*
|
||||
* The buffer is continuously filled with the following data, per packet:
|
||||
* - the 1394 iso packet header as described at &fw_cdev_event_iso_interrupt,
|
||||
* but in little endian byte order,
|
||||
* - packet payload (as many bytes as specified in the data_length field of
|
||||
* the 1394 iso packet header) in big endian byte order,
|
||||
* - 0...3 padding bytes as needed to align the following trailer quadlet,
|
||||
* - trailer quadlet, containing the reception timestamp as described at
|
||||
* &fw_cdev_event_iso_interrupt, but in little endian byte order.
|
||||
*
|
||||
* Hence the per-packet size is data_length (rounded up to a multiple of 4) + 8.
|
||||
* When processing the data, stop before a packet that would cross the
|
||||
* @completed offset.
|
||||
*
|
||||
* A packet near the end of a buffer chunk will typically spill over into the
|
||||
* next queued buffer chunk. It is the responsibility of the client to check
|
||||
* for this condition, assemble a broken-up packet from its parts, and not to
|
||||
* re-queue any buffer chunks in which as yet unread packet parts reside.
|
||||
*/
|
||||
struct fw_cdev_event_iso_interrupt_mc {
|
||||
__u64 closure;
|
||||
__u32 type;
|
||||
__u32 completed;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fw_cdev_event_iso_resource - Iso resources were allocated or freed
|
||||
* @closure: See &fw_cdev_event_common;
|
||||
|
@ -199,16 +334,46 @@ struct fw_cdev_event_iso_resource {
|
|||
__s32 bandwidth;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fw_cdev_event_phy_packet - A PHY packet was transmitted or received
|
||||
* @closure: See &fw_cdev_event_common; set by %FW_CDEV_IOC_SEND_PHY_PACKET
|
||||
* or %FW_CDEV_IOC_RECEIVE_PHY_PACKETS ioctl
|
||||
* @type: %FW_CDEV_EVENT_PHY_PACKET_SENT or %..._RECEIVED
|
||||
* @rcode: %RCODE_..., indicates success or failure of transmission
|
||||
* @length: Data length in bytes
|
||||
* @data: Incoming data
|
||||
*
|
||||
* If @type is %FW_CDEV_EVENT_PHY_PACKET_SENT, @length is 0 and @data empty,
|
||||
* except in case of a ping packet: Then, @length is 4, and @data[0] is the
|
||||
* ping time in 49.152MHz clocks if @rcode is %RCODE_COMPLETE.
|
||||
*
|
||||
* If @type is %FW_CDEV_EVENT_PHY_PACKET_RECEIVED, @length is 8 and @data
|
||||
* consists of the two PHY packet quadlets, in host byte order.
|
||||
*/
|
||||
struct fw_cdev_event_phy_packet {
|
||||
__u64 closure;
|
||||
__u32 type;
|
||||
__u32 rcode;
|
||||
__u32 length;
|
||||
__u32 data[0];
|
||||
};
|
||||
|
||||
/**
|
||||
* union fw_cdev_event - Convenience union of fw_cdev_event_ types
|
||||
* @common: Valid for all types
|
||||
* @bus_reset: Valid if @common.type == %FW_CDEV_EVENT_BUS_RESET
|
||||
* @response: Valid if @common.type == %FW_CDEV_EVENT_RESPONSE
|
||||
* @request: Valid if @common.type == %FW_CDEV_EVENT_REQUEST
|
||||
* @iso_interrupt: Valid if @common.type == %FW_CDEV_EVENT_ISO_INTERRUPT
|
||||
* @iso_resource: Valid if @common.type ==
|
||||
* @common: Valid for all types
|
||||
* @bus_reset: Valid if @common.type == %FW_CDEV_EVENT_BUS_RESET
|
||||
* @response: Valid if @common.type == %FW_CDEV_EVENT_RESPONSE
|
||||
* @request: Valid if @common.type == %FW_CDEV_EVENT_REQUEST
|
||||
* @request2: Valid if @common.type == %FW_CDEV_EVENT_REQUEST2
|
||||
* @iso_interrupt: Valid if @common.type == %FW_CDEV_EVENT_ISO_INTERRUPT
|
||||
* @iso_interrupt_mc: Valid if @common.type ==
|
||||
* %FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL
|
||||
* @iso_resource: Valid if @common.type ==
|
||||
* %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED or
|
||||
* %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED
|
||||
* @phy_packet: Valid if @common.type ==
|
||||
* %FW_CDEV_EVENT_PHY_PACKET_SENT or
|
||||
* %FW_CDEV_EVENT_PHY_PACKET_RECEIVED
|
||||
*
|
||||
* Convenience union for userspace use. Events could be read(2) into an
|
||||
* appropriately aligned char buffer and then cast to this union for further
|
||||
|
@ -223,8 +388,11 @@ union fw_cdev_event {
|
|||
struct fw_cdev_event_bus_reset bus_reset;
|
||||
struct fw_cdev_event_response response;
|
||||
struct fw_cdev_event_request request;
|
||||
struct fw_cdev_event_request2 request2; /* added in 2.6.36 */
|
||||
struct fw_cdev_event_iso_interrupt iso_interrupt;
|
||||
struct fw_cdev_event_iso_resource iso_resource;
|
||||
struct fw_cdev_event_iso_interrupt_mc iso_interrupt_mc; /* added in 2.6.36 */
|
||||
struct fw_cdev_event_iso_resource iso_resource; /* added in 2.6.30 */
|
||||
struct fw_cdev_event_phy_packet phy_packet; /* added in 2.6.36 */
|
||||
};
|
||||
|
||||
/* available since kernel version 2.6.22 */
|
||||
|
@ -256,23 +424,46 @@ union fw_cdev_event {
|
|||
/* available since kernel version 2.6.34 */
|
||||
#define FW_CDEV_IOC_GET_CYCLE_TIMER2 _IOWR('#', 0x14, struct fw_cdev_get_cycle_timer2)
|
||||
|
||||
/* available since kernel version 2.6.36 */
|
||||
#define FW_CDEV_IOC_SEND_PHY_PACKET _IOWR('#', 0x15, struct fw_cdev_send_phy_packet)
|
||||
#define FW_CDEV_IOC_RECEIVE_PHY_PACKETS _IOW('#', 0x16, struct fw_cdev_receive_phy_packets)
|
||||
#define FW_CDEV_IOC_SET_ISO_CHANNELS _IOW('#', 0x17, struct fw_cdev_set_iso_channels)
|
||||
|
||||
/*
|
||||
* FW_CDEV_VERSION History
|
||||
* ABI version history
|
||||
* 1 (2.6.22) - initial version
|
||||
* (2.6.24) - added %FW_CDEV_IOC_GET_CYCLE_TIMER
|
||||
* 2 (2.6.30) - changed &fw_cdev_event_iso_interrupt.header if
|
||||
* &fw_cdev_create_iso_context.header_size is 8 or more
|
||||
* - added %FW_CDEV_IOC_*_ISO_RESOURCE*,
|
||||
* %FW_CDEV_IOC_GET_SPEED, %FW_CDEV_IOC_SEND_BROADCAST_REQUEST,
|
||||
* %FW_CDEV_IOC_SEND_STREAM_PACKET
|
||||
* (2.6.32) - added time stamp to xmit &fw_cdev_event_iso_interrupt
|
||||
* (2.6.33) - IR has always packet-per-buffer semantics now, not one of
|
||||
* dual-buffer or packet-per-buffer depending on hardware
|
||||
* - shared use and auto-response for FCP registers
|
||||
* 3 (2.6.34) - made &fw_cdev_get_cycle_timer reliable
|
||||
* - added %FW_CDEV_IOC_GET_CYCLE_TIMER2
|
||||
* 4 (2.6.36) - added %FW_CDEV_EVENT_REQUEST2, %FW_CDEV_EVENT_PHY_PACKET_*,
|
||||
* and &fw_cdev_allocate.region_end
|
||||
* - implemented &fw_cdev_event_bus_reset.bm_node_id
|
||||
* - added %FW_CDEV_IOC_SEND_PHY_PACKET, _RECEIVE_PHY_PACKETS
|
||||
* - added %FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL,
|
||||
* %FW_CDEV_ISO_CONTEXT_RECEIVE_MULTICHANNEL, and
|
||||
* %FW_CDEV_IOC_SET_ISO_CHANNELS
|
||||
*/
|
||||
#define FW_CDEV_VERSION 3
|
||||
#define FW_CDEV_VERSION 3 /* Meaningless; don't use this macro. */
|
||||
|
||||
/**
|
||||
* struct fw_cdev_get_info - General purpose information ioctl
|
||||
* @version: The version field is just a running serial number.
|
||||
* We never break backwards compatibility, but may add more
|
||||
* structs and ioctls in later revisions.
|
||||
* @version: The version field is just a running serial number. Both an
|
||||
* input parameter (ABI version implemented by the client) and
|
||||
* output parameter (ABI version implemented by the kernel).
|
||||
* A client must not fill in an %FW_CDEV_VERSION defined from an
|
||||
* included kernel header file but the actual version for which
|
||||
* the client was implemented. This is necessary for forward
|
||||
* compatibility. We never break backwards compatibility, but
|
||||
* may add more structs, events, and ioctls in later revisions.
|
||||
* @rom_length: If @rom is non-zero, at most rom_length bytes of configuration
|
||||
* ROM will be copied into that user space address. In either
|
||||
* case, @rom_length is updated with the actual length of the
|
||||
|
@ -339,28 +530,48 @@ struct fw_cdev_send_response {
|
|||
};
|
||||
|
||||
/**
|
||||
* struct fw_cdev_allocate - Allocate a CSR address range
|
||||
* struct fw_cdev_allocate - Allocate a CSR in an address range
|
||||
* @offset: Start offset of the address range
|
||||
* @closure: To be passed back to userspace in request events
|
||||
* @length: Length of the address range, in bytes
|
||||
* @length: Length of the CSR, in bytes
|
||||
* @handle: Handle to the allocation, written by the kernel
|
||||
* @region_end: First address above the address range (added in ABI v4, 2.6.36)
|
||||
*
|
||||
* Allocate an address range in the 48-bit address space on the local node
|
||||
* (the controller). This allows userspace to listen for requests with an
|
||||
* offset within that address range. When the kernel receives a request
|
||||
* within the range, an &fw_cdev_event_request event will be written back.
|
||||
* The @closure field is passed back to userspace in the response event.
|
||||
* offset within that address range. Every time when the kernel receives a
|
||||
* request within the range, an &fw_cdev_event_request2 event will be emitted.
|
||||
* (If the kernel or the client implements ABI version <= 3, an
|
||||
* &fw_cdev_event_request will be generated instead.)
|
||||
*
|
||||
* The @closure field is passed back to userspace in these request events.
|
||||
* The @handle field is an out parameter, returning a handle to the allocated
|
||||
* range to be used for later deallocation of the range.
|
||||
*
|
||||
* The address range is allocated on all local nodes. The address allocation
|
||||
* is exclusive except for the FCP command and response registers.
|
||||
* is exclusive except for the FCP command and response registers. If an
|
||||
* exclusive address region is already in use, the ioctl fails with errno set
|
||||
* to %EBUSY.
|
||||
*
|
||||
* If kernel and client implement ABI version >= 4, the kernel looks up a free
|
||||
* spot of size @length inside [@offset..@region_end) and, if found, writes
|
||||
* the start address of the new CSR back in @offset. I.e. @offset is an
|
||||
* in and out parameter. If this automatic placement of a CSR in a bigger
|
||||
* address range is not desired, the client simply needs to set @region_end
|
||||
* = @offset + @length.
|
||||
*
|
||||
* If the kernel or the client implements ABI version <= 3, @region_end is
|
||||
* ignored and effectively assumed to be @offset + @length.
|
||||
*
|
||||
* @region_end is only present in a kernel header >= 2.6.36. If necessary,
|
||||
* this can for example be tested by #ifdef FW_CDEV_EVENT_REQUEST2.
|
||||
*/
|
||||
struct fw_cdev_allocate {
|
||||
__u64 offset;
|
||||
__u64 closure;
|
||||
__u32 length;
|
||||
__u32 handle;
|
||||
__u64 region_end; /* available since kernel version 2.6.36 */
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -382,9 +593,14 @@ struct fw_cdev_deallocate {
|
|||
* Initiate a bus reset for the bus this device is on. The bus reset can be
|
||||
* either the original (long) bus reset or the arbitrated (short) bus reset
|
||||
* introduced in 1394a-2000.
|
||||
*
|
||||
* The ioctl returns immediately. A subsequent &fw_cdev_event_bus_reset
|
||||
* indicates when the reset actually happened. Since ABI v4, this may be
|
||||
* considerably later than the ioctl because the kernel ensures a grace period
|
||||
* between subsequent bus resets as per IEEE 1394 bus management specification.
|
||||
*/
|
||||
struct fw_cdev_initiate_bus_reset {
|
||||
__u32 type; /* FW_CDEV_SHORT_RESET or FW_CDEV_LONG_RESET */
|
||||
__u32 type;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -408,9 +624,10 @@ struct fw_cdev_initiate_bus_reset {
|
|||
*
|
||||
* @immediate, @key, and @data array elements are CPU-endian quadlets.
|
||||
*
|
||||
* If successful, the kernel adds the descriptor and writes back a handle to the
|
||||
* kernel-side object to be used for later removal of the descriptor block and
|
||||
* immediate key.
|
||||
* If successful, the kernel adds the descriptor and writes back a @handle to
|
||||
* the kernel-side object to be used for later removal of the descriptor block
|
||||
* and immediate key. The kernel will also generate a bus reset to signal the
|
||||
* change of the configuration ROM to other nodes.
|
||||
*
|
||||
* This ioctl affects the configuration ROMs of all local nodes.
|
||||
* The ioctl only succeeds on device files which represent a local node.
|
||||
|
@ -429,38 +646,50 @@ struct fw_cdev_add_descriptor {
|
|||
* descriptor was added
|
||||
*
|
||||
* Remove a descriptor block and accompanying immediate key from the local
|
||||
* nodes' configuration ROMs.
|
||||
* nodes' configuration ROMs. The kernel will also generate a bus reset to
|
||||
* signal the change of the configuration ROM to other nodes.
|
||||
*/
|
||||
struct fw_cdev_remove_descriptor {
|
||||
__u32 handle;
|
||||
};
|
||||
|
||||
#define FW_CDEV_ISO_CONTEXT_TRANSMIT 0
|
||||
#define FW_CDEV_ISO_CONTEXT_RECEIVE 1
|
||||
#define FW_CDEV_ISO_CONTEXT_TRANSMIT 0
|
||||
#define FW_CDEV_ISO_CONTEXT_RECEIVE 1
|
||||
#define FW_CDEV_ISO_CONTEXT_RECEIVE_MULTICHANNEL 2 /* added in 2.6.36 */
|
||||
|
||||
/**
|
||||
* struct fw_cdev_create_iso_context - Create a context for isochronous IO
|
||||
* @type: %FW_CDEV_ISO_CONTEXT_TRANSMIT or %FW_CDEV_ISO_CONTEXT_RECEIVE
|
||||
* @header_size: Header size to strip for receive contexts
|
||||
* @channel: Channel to bind to
|
||||
* @speed: Speed for transmit contexts
|
||||
* @closure: To be returned in &fw_cdev_event_iso_interrupt
|
||||
* struct fw_cdev_create_iso_context - Create a context for isochronous I/O
|
||||
* @type: %FW_CDEV_ISO_CONTEXT_TRANSMIT or %FW_CDEV_ISO_CONTEXT_RECEIVE or
|
||||
* %FW_CDEV_ISO_CONTEXT_RECEIVE_MULTICHANNEL
|
||||
* @header_size: Header size to strip in single-channel reception
|
||||
* @channel: Channel to bind to in single-channel reception or transmission
|
||||
* @speed: Transmission speed
|
||||
* @closure: To be returned in &fw_cdev_event_iso_interrupt or
|
||||
* &fw_cdev_event_iso_interrupt_multichannel
|
||||
* @handle: Handle to context, written back by kernel
|
||||
*
|
||||
* Prior to sending or receiving isochronous I/O, a context must be created.
|
||||
* The context records information about the transmit or receive configuration
|
||||
* and typically maps to an underlying hardware resource. A context is set up
|
||||
* for either sending or receiving. It is bound to a specific isochronous
|
||||
* channel.
|
||||
* @channel.
|
||||
*
|
||||
* In case of multichannel reception, @header_size and @channel are ignored
|
||||
* and the channels are selected by %FW_CDEV_IOC_SET_ISO_CHANNELS.
|
||||
*
|
||||
* For %FW_CDEV_ISO_CONTEXT_RECEIVE contexts, @header_size must be at least 4
|
||||
* and must be a multiple of 4. It is ignored in other context types.
|
||||
*
|
||||
* @speed is ignored in receive context types.
|
||||
*
|
||||
* If a context was successfully created, the kernel writes back a handle to the
|
||||
* context, which must be passed in for subsequent operations on that context.
|
||||
*
|
||||
* For receive contexts, @header_size must be at least 4 and must be a multiple
|
||||
* of 4.
|
||||
*
|
||||
* Note that the effect of a @header_size > 4 depends on
|
||||
* &fw_cdev_get_info.version, as documented at &fw_cdev_event_iso_interrupt.
|
||||
* Limitations:
|
||||
* No more than one iso context can be created per fd.
|
||||
* The total number of contexts that all userspace and kernelspace drivers can
|
||||
* create on a card at a time is a hardware limit, typically 4 or 8 contexts per
|
||||
* direction, and of them at most one multichannel receive context.
|
||||
*/
|
||||
struct fw_cdev_create_iso_context {
|
||||
__u32 type;
|
||||
|
@ -471,6 +700,22 @@ struct fw_cdev_create_iso_context {
|
|||
__u32 handle;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fw_cdev_set_iso_channels - Select channels in multichannel reception
|
||||
* @channels: Bitmask of channels to listen to
|
||||
* @handle: Handle of the mutichannel receive context
|
||||
*
|
||||
* @channels is the bitwise or of 1ULL << n for each channel n to listen to.
|
||||
*
|
||||
* The ioctl fails with errno %EBUSY if there is already another receive context
|
||||
* on a channel in @channels. In that case, the bitmask of all unoccupied
|
||||
* channels is returned in @channels.
|
||||
*/
|
||||
struct fw_cdev_set_iso_channels {
|
||||
__u64 channels;
|
||||
__u32 handle;
|
||||
};
|
||||
|
||||
#define FW_CDEV_ISO_PAYLOAD_LENGTH(v) (v)
|
||||
#define FW_CDEV_ISO_INTERRUPT (1 << 16)
|
||||
#define FW_CDEV_ISO_SKIP (1 << 17)
|
||||
|
@ -481,42 +726,72 @@ struct fw_cdev_create_iso_context {
|
|||
|
||||
/**
|
||||
* struct fw_cdev_iso_packet - Isochronous packet
|
||||
* @control: Contains the header length (8 uppermost bits), the sy field
|
||||
* (4 bits), the tag field (2 bits), a sync flag (1 bit),
|
||||
* a skip flag (1 bit), an interrupt flag (1 bit), and the
|
||||
* @control: Contains the header length (8 uppermost bits),
|
||||
* the sy field (4 bits), the tag field (2 bits), a sync flag
|
||||
* or a skip flag (1 bit), an interrupt flag (1 bit), and the
|
||||
* payload length (16 lowermost bits)
|
||||
* @header: Header and payload
|
||||
* @header: Header and payload in case of a transmit context.
|
||||
*
|
||||
* &struct fw_cdev_iso_packet is used to describe isochronous packet queues.
|
||||
*
|
||||
* Use the FW_CDEV_ISO_ macros to fill in @control.
|
||||
* The @header array is empty in case of receive contexts.
|
||||
*
|
||||
* For transmit packets, the header length must be a multiple of 4 and specifies
|
||||
* the numbers of bytes in @header that will be prepended to the packet's
|
||||
* payload; these bytes are copied into the kernel and will not be accessed
|
||||
* after the ioctl has returned. The sy and tag fields are copied to the iso
|
||||
* packet header (these fields are specified by IEEE 1394a and IEC 61883-1).
|
||||
* The skip flag specifies that no packet is to be sent in a frame; when using
|
||||
* this, all other fields except the interrupt flag must be zero.
|
||||
* Context type %FW_CDEV_ISO_CONTEXT_TRANSMIT:
|
||||
*
|
||||
* For receive packets, the header length must be a multiple of the context's
|
||||
* header size; if the header length is larger than the context's header size,
|
||||
* multiple packets are queued for this entry. The sy and tag fields are
|
||||
* ignored. If the sync flag is set, the context drops all packets until
|
||||
* a packet with a matching sy field is received (the sync value to wait for is
|
||||
* specified in the &fw_cdev_start_iso structure). The payload length defines
|
||||
* how many payload bytes can be received for one packet (in addition to payload
|
||||
* quadlets that have been defined as headers and are stripped and returned in
|
||||
* the &fw_cdev_event_iso_interrupt structure). If more bytes are received, the
|
||||
* additional bytes are dropped. If less bytes are received, the remaining
|
||||
* bytes in this part of the payload buffer will not be written to, not even by
|
||||
* the next packet, i.e., packets received in consecutive frames will not
|
||||
* necessarily be consecutive in memory. If an entry has queued multiple
|
||||
* packets, the payload length is divided equally among them.
|
||||
* @control.HEADER_LENGTH must be a multiple of 4. It specifies the numbers of
|
||||
* bytes in @header that will be prepended to the packet's payload. These bytes
|
||||
* are copied into the kernel and will not be accessed after the ioctl has
|
||||
* returned.
|
||||
*
|
||||
* When a packet with the interrupt flag set has been completed, the
|
||||
* The @control.SY and TAG fields are copied to the iso packet header. These
|
||||
* fields are specified by IEEE 1394a and IEC 61883-1.
|
||||
*
|
||||
* The @control.SKIP flag specifies that no packet is to be sent in a frame.
|
||||
* When using this, all other fields except @control.INTERRUPT must be zero.
|
||||
*
|
||||
* When a packet with the @control.INTERRUPT flag set has been completed, an
|
||||
* &fw_cdev_event_iso_interrupt event will be sent.
|
||||
*
|
||||
* Context type %FW_CDEV_ISO_CONTEXT_RECEIVE:
|
||||
*
|
||||
* @control.HEADER_LENGTH must be a multiple of the context's header_size.
|
||||
* If the HEADER_LENGTH is larger than the context's header_size, multiple
|
||||
* packets are queued for this entry.
|
||||
*
|
||||
* The @control.SY and TAG fields are ignored.
|
||||
*
|
||||
* If the @control.SYNC flag is set, the context drops all packets until a
|
||||
* packet with a sy field is received which matches &fw_cdev_start_iso.sync.
|
||||
*
|
||||
* @control.PAYLOAD_LENGTH defines how many payload bytes can be received for
|
||||
* one packet (in addition to payload quadlets that have been defined as headers
|
||||
* and are stripped and returned in the &fw_cdev_event_iso_interrupt structure).
|
||||
* If more bytes are received, the additional bytes are dropped. If less bytes
|
||||
* are received, the remaining bytes in this part of the payload buffer will not
|
||||
* be written to, not even by the next packet. I.e., packets received in
|
||||
* consecutive frames will not necessarily be consecutive in memory. If an
|
||||
* entry has queued multiple packets, the PAYLOAD_LENGTH is divided equally
|
||||
* among them.
|
||||
*
|
||||
* When a packet with the @control.INTERRUPT flag set has been completed, an
|
||||
* &fw_cdev_event_iso_interrupt event will be sent. An entry that has queued
|
||||
* multiple receive packets is completed when its last packet is completed.
|
||||
*
|
||||
* Context type %FW_CDEV_ISO_CONTEXT_RECEIVE_MULTICHANNEL:
|
||||
*
|
||||
* Here, &fw_cdev_iso_packet would be more aptly named _iso_buffer_chunk since
|
||||
* it specifies a chunk of the mmap()'ed buffer, while the number and alignment
|
||||
* of packets to be placed into the buffer chunk is not known beforehand.
|
||||
*
|
||||
* @control.PAYLOAD_LENGTH is the size of the buffer chunk and specifies room
|
||||
* for header, payload, padding, and trailer bytes of one or more packets.
|
||||
* It must be a multiple of 4.
|
||||
*
|
||||
* @control.HEADER_LENGTH, TAG and SY are ignored. SYNC is treated as described
|
||||
* for single-channel reception.
|
||||
*
|
||||
* When a buffer chunk with the @control.INTERRUPT flag set has been filled
|
||||
* entirely, an &fw_cdev_event_iso_interrupt_mc event will be sent.
|
||||
*/
|
||||
struct fw_cdev_iso_packet {
|
||||
__u32 control;
|
||||
|
@ -525,9 +800,9 @@ struct fw_cdev_iso_packet {
|
|||
|
||||
/**
|
||||
* struct fw_cdev_queue_iso - Queue isochronous packets for I/O
|
||||
* @packets: Userspace pointer to packet data
|
||||
* @packets: Userspace pointer to an array of &fw_cdev_iso_packet
|
||||
* @data: Pointer into mmap()'ed payload buffer
|
||||
* @size: Size of packet data in bytes
|
||||
* @size: Size of the @packets array, in bytes
|
||||
* @handle: Isochronous context handle
|
||||
*
|
||||
* Queue a number of isochronous packets for reception or transmission.
|
||||
|
@ -540,6 +815,9 @@ struct fw_cdev_iso_packet {
|
|||
* The kernel may or may not queue all packets, but will write back updated
|
||||
* values of the @packets, @data and @size fields, so the ioctl can be
|
||||
* resubmitted easily.
|
||||
*
|
||||
* In case of a multichannel receive context, @data must be quadlet-aligned
|
||||
* relative to the buffer start.
|
||||
*/
|
||||
struct fw_cdev_queue_iso {
|
||||
__u64 packets;
|
||||
|
@ -698,4 +976,39 @@ struct fw_cdev_send_stream_packet {
|
|||
__u32 speed;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fw_cdev_send_phy_packet - send a PHY packet
|
||||
* @closure: Passed back to userspace in the PHY-packet-sent event
|
||||
* @data: First and second quadlet of the PHY packet
|
||||
* @generation: The bus generation where packet is valid
|
||||
*
|
||||
* The %FW_CDEV_IOC_SEND_PHY_PACKET ioctl sends a PHY packet to all nodes
|
||||
* on the same card as this device. After transmission, an
|
||||
* %FW_CDEV_EVENT_PHY_PACKET_SENT event is generated.
|
||||
*
|
||||
* The payload @data[] shall be specified in host byte order. Usually,
|
||||
* @data[1] needs to be the bitwise inverse of @data[0]. VersaPHY packets
|
||||
* are an exception to this rule.
|
||||
*
|
||||
* The ioctl is only permitted on device files which represent a local node.
|
||||
*/
|
||||
struct fw_cdev_send_phy_packet {
|
||||
__u64 closure;
|
||||
__u32 data[2];
|
||||
__u32 generation;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fw_cdev_receive_phy_packets - start reception of PHY packets
|
||||
* @closure: Passed back to userspace in phy packet events
|
||||
*
|
||||
* This ioctl activates issuing of %FW_CDEV_EVENT_PHY_PACKET_RECEIVED due to
|
||||
* incoming PHY packets from any node on the same bus as the device.
|
||||
*
|
||||
* The ioctl is only permitted on device files which represent a local node.
|
||||
*/
|
||||
struct fw_cdev_receive_phy_packets {
|
||||
__u64 closure;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_FIREWIRE_CDEV_H */
|
||||
|
|
|
@ -32,11 +32,13 @@
|
|||
#define CSR_CYCLE_TIME 0x200
|
||||
#define CSR_BUS_TIME 0x204
|
||||
#define CSR_BUSY_TIMEOUT 0x210
|
||||
#define CSR_PRIORITY_BUDGET 0x218
|
||||
#define CSR_BUS_MANAGER_ID 0x21c
|
||||
#define CSR_BANDWIDTH_AVAILABLE 0x220
|
||||
#define CSR_CHANNELS_AVAILABLE 0x224
|
||||
#define CSR_CHANNELS_AVAILABLE_HI 0x224
|
||||
#define CSR_CHANNELS_AVAILABLE_LO 0x228
|
||||
#define CSR_MAINT_UTILITY 0x230
|
||||
#define CSR_BROADCAST_CHANNEL 0x234
|
||||
#define CSR_CONFIG_ROM 0x400
|
||||
#define CSR_CONFIG_ROM_END 0x800
|
||||
|
@ -89,6 +91,11 @@ struct fw_card {
|
|||
struct list_head transaction_list;
|
||||
unsigned long reset_jiffies;
|
||||
|
||||
u32 split_timeout_hi;
|
||||
u32 split_timeout_lo;
|
||||
unsigned int split_timeout_cycles;
|
||||
unsigned int split_timeout_jiffies;
|
||||
|
||||
unsigned long long guid;
|
||||
unsigned max_receive;
|
||||
int link_speed;
|
||||
|
@ -104,18 +111,28 @@ struct fw_card {
|
|||
bool beta_repeaters_present;
|
||||
|
||||
int index;
|
||||
|
||||
struct list_head link;
|
||||
|
||||
/* Work struct for BM duties. */
|
||||
struct delayed_work work;
|
||||
struct list_head phy_receiver_list;
|
||||
|
||||
struct delayed_work br_work; /* bus reset job */
|
||||
bool br_short;
|
||||
|
||||
struct delayed_work bm_work; /* bus manager job */
|
||||
int bm_retries;
|
||||
int bm_generation;
|
||||
__be32 bm_transaction_data[2];
|
||||
int bm_node_id;
|
||||
bool bm_abdicate;
|
||||
|
||||
bool priority_budget_implemented; /* controller feature */
|
||||
bool broadcast_channel_auto_allocated; /* controller feature */
|
||||
|
||||
bool broadcast_channel_allocated;
|
||||
u32 broadcast_channel;
|
||||
__be32 topology_map[(CSR_TOPOLOGY_MAP_END - CSR_TOPOLOGY_MAP) / 4];
|
||||
|
||||
__be32 maint_utility_register;
|
||||
};
|
||||
|
||||
struct fw_attribute_group {
|
||||
|
@ -252,7 +269,7 @@ typedef void (*fw_transaction_callback_t)(struct fw_card *card, int rcode,
|
|||
typedef void (*fw_address_callback_t)(struct fw_card *card,
|
||||
struct fw_request *request,
|
||||
int tcode, int destination, int source,
|
||||
int generation, int speed,
|
||||
int generation,
|
||||
unsigned long long offset,
|
||||
void *data, size_t length,
|
||||
void *callback_data);
|
||||
|
@ -269,10 +286,10 @@ struct fw_packet {
|
|||
u32 timestamp;
|
||||
|
||||
/*
|
||||
* This callback is called when the packet transmission has
|
||||
* completed; for successful transmission, the status code is
|
||||
* the ack received from the destination, otherwise it's a
|
||||
* negative errno: ENOMEM, ESTALE, ETIMEDOUT, ENODEV, EIO.
|
||||
* This callback is called when the packet transmission has completed.
|
||||
* For successful transmission, the status code is the ack received
|
||||
* from the destination. Otherwise it is one of the juju-specific
|
||||
* rcodes: RCODE_SEND_ERROR, _CANCELLED, _BUSY, _GENERATION, _NO_ACK.
|
||||
* The callback can be called from tasklet context and thus
|
||||
* must never block.
|
||||
*/
|
||||
|
@ -355,17 +372,19 @@ void fw_core_remove_descriptor(struct fw_descriptor *desc);
|
|||
* scatter-gather streaming (e.g. assembling video frame automatically).
|
||||
*/
|
||||
struct fw_iso_packet {
|
||||
u16 payload_length; /* Length of indirect payload. */
|
||||
u32 interrupt:1; /* Generate interrupt on this packet */
|
||||
u32 skip:1; /* Set to not send packet at all. */
|
||||
u32 tag:2;
|
||||
u32 sy:4;
|
||||
u32 header_length:8; /* Length of immediate header. */
|
||||
u32 header[0];
|
||||
u16 payload_length; /* Length of indirect payload */
|
||||
u32 interrupt:1; /* Generate interrupt on this packet */
|
||||
u32 skip:1; /* tx: Set to not send packet at all */
|
||||
/* rx: Sync bit, wait for matching sy */
|
||||
u32 tag:2; /* tx: Tag in packet header */
|
||||
u32 sy:4; /* tx: Sy in packet header */
|
||||
u32 header_length:8; /* Length of immediate header */
|
||||
u32 header[0]; /* tx: Top of 1394 isoch. data_block */
|
||||
};
|
||||
|
||||
#define FW_ISO_CONTEXT_TRANSMIT 0
|
||||
#define FW_ISO_CONTEXT_RECEIVE 1
|
||||
#define FW_ISO_CONTEXT_TRANSMIT 0
|
||||
#define FW_ISO_CONTEXT_RECEIVE 1
|
||||
#define FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL 2
|
||||
|
||||
#define FW_ISO_CONTEXT_MATCH_TAG0 1
|
||||
#define FW_ISO_CONTEXT_MATCH_TAG1 2
|
||||
|
@ -389,24 +408,31 @@ struct fw_iso_buffer {
|
|||
int fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card,
|
||||
int page_count, enum dma_data_direction direction);
|
||||
void fw_iso_buffer_destroy(struct fw_iso_buffer *buffer, struct fw_card *card);
|
||||
size_t fw_iso_buffer_lookup(struct fw_iso_buffer *buffer, dma_addr_t completed);
|
||||
|
||||
struct fw_iso_context;
|
||||
typedef void (*fw_iso_callback_t)(struct fw_iso_context *context,
|
||||
u32 cycle, size_t header_length,
|
||||
void *header, void *data);
|
||||
typedef void (*fw_iso_mc_callback_t)(struct fw_iso_context *context,
|
||||
dma_addr_t completed, void *data);
|
||||
struct fw_iso_context {
|
||||
struct fw_card *card;
|
||||
int type;
|
||||
int channel;
|
||||
int speed;
|
||||
size_t header_size;
|
||||
fw_iso_callback_t callback;
|
||||
union {
|
||||
fw_iso_callback_t sc;
|
||||
fw_iso_mc_callback_t mc;
|
||||
} callback;
|
||||
void *callback_data;
|
||||
};
|
||||
|
||||
struct fw_iso_context *fw_iso_context_create(struct fw_card *card,
|
||||
int type, int channel, int speed, size_t header_size,
|
||||
fw_iso_callback_t callback, void *callback_data);
|
||||
int fw_iso_context_set_channels(struct fw_iso_context *ctx, u64 *channels);
|
||||
int fw_iso_context_queue(struct fw_iso_context *ctx,
|
||||
struct fw_iso_packet *packet,
|
||||
struct fw_iso_buffer *buffer,
|
||||
|
|
|
@ -53,6 +53,7 @@ struct inodes_stat_t {
|
|||
#define MAY_APPEND 8
|
||||
#define MAY_ACCESS 16
|
||||
#define MAY_OPEN 32
|
||||
#define MAY_CHDIR 64
|
||||
|
||||
/*
|
||||
* flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond
|
||||
|
@ -415,7 +416,8 @@ struct buffer_head;
|
|||
typedef int (get_block_t)(struct inode *inode, sector_t iblock,
|
||||
struct buffer_head *bh_result, int create);
|
||||
typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
|
||||
ssize_t bytes, void *private);
|
||||
ssize_t bytes, void *private, int ret,
|
||||
bool is_async);
|
||||
|
||||
/*
|
||||
* Attribute flags. These should be or-ed together to figure out what
|
||||
|
@ -1783,6 +1785,19 @@ extern int get_sb_pseudo(struct file_system_type *, char *,
|
|||
struct vfsmount *mnt);
|
||||
extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);
|
||||
|
||||
static inline void sb_mark_dirty(struct super_block *sb)
|
||||
{
|
||||
sb->s_dirt = 1;
|
||||
}
|
||||
static inline void sb_mark_clean(struct super_block *sb)
|
||||
{
|
||||
sb->s_dirt = 0;
|
||||
}
|
||||
static inline int sb_is_dirty(struct super_block *sb)
|
||||
{
|
||||
return sb->s_dirt;
|
||||
}
|
||||
|
||||
/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
|
||||
#define fops_get(fops) \
|
||||
(((fops) && try_module_get((fops)->owner) ? (fops) : NULL))
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <linux/fscache.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/slow-work.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
#define NR_MAXCACHES BITS_PER_LONG
|
||||
|
||||
|
@ -76,18 +76,14 @@ typedef void (*fscache_operation_release_t)(struct fscache_operation *op);
|
|||
typedef void (*fscache_operation_processor_t)(struct fscache_operation *op);
|
||||
|
||||
struct fscache_operation {
|
||||
union {
|
||||
struct work_struct fast_work; /* record for fast ops */
|
||||
struct slow_work slow_work; /* record for (very) slow ops */
|
||||
};
|
||||
struct work_struct work; /* record for async ops */
|
||||
struct list_head pend_link; /* link in object->pending_ops */
|
||||
struct fscache_object *object; /* object to be operated upon */
|
||||
|
||||
unsigned long flags;
|
||||
#define FSCACHE_OP_TYPE 0x000f /* operation type */
|
||||
#define FSCACHE_OP_FAST 0x0001 /* - fast op, processor may not sleep for disk */
|
||||
#define FSCACHE_OP_SLOW 0x0002 /* - (very) slow op, processor may sleep for disk */
|
||||
#define FSCACHE_OP_MYTHREAD 0x0003 /* - processing is done be issuing thread, not pool */
|
||||
#define FSCACHE_OP_ASYNC 0x0001 /* - async op, processor may sleep for disk */
|
||||
#define FSCACHE_OP_MYTHREAD 0x0002 /* - processing is done be issuing thread, not pool */
|
||||
#define FSCACHE_OP_WAITING 4 /* cleared when op is woken */
|
||||
#define FSCACHE_OP_EXCLUSIVE 5 /* exclusive op, other ops must wait */
|
||||
#define FSCACHE_OP_DEAD 6 /* op is now dead */
|
||||
|
@ -105,7 +101,8 @@ struct fscache_operation {
|
|||
/* operation releaser */
|
||||
fscache_operation_release_t release;
|
||||
|
||||
#ifdef CONFIG_SLOW_WORK_DEBUG
|
||||
#ifdef CONFIG_WORKQUEUE_DEBUGFS
|
||||
struct work_struct put_work; /* work to delay operation put */
|
||||
const char *name; /* operation name */
|
||||
const char *state; /* operation state */
|
||||
#define fscache_set_op_name(OP, N) do { (OP)->name = (N); } while(0)
|
||||
|
@ -117,7 +114,7 @@ struct fscache_operation {
|
|||
};
|
||||
|
||||
extern atomic_t fscache_op_debug_id;
|
||||
extern const struct slow_work_ops fscache_op_slow_work_ops;
|
||||
extern void fscache_op_work_func(struct work_struct *work);
|
||||
|
||||
extern void fscache_enqueue_operation(struct fscache_operation *);
|
||||
extern void fscache_put_operation(struct fscache_operation *);
|
||||
|
@ -128,33 +125,21 @@ extern void fscache_put_operation(struct fscache_operation *);
|
|||
* @release: The release function to assign
|
||||
*
|
||||
* Do basic initialisation of an operation. The caller must still set flags,
|
||||
* object, either fast_work or slow_work if necessary, and processor if needed.
|
||||
* object and processor if needed.
|
||||
*/
|
||||
static inline void fscache_operation_init(struct fscache_operation *op,
|
||||
fscache_operation_release_t release)
|
||||
fscache_operation_processor_t processor,
|
||||
fscache_operation_release_t release)
|
||||
{
|
||||
INIT_WORK(&op->work, fscache_op_work_func);
|
||||
atomic_set(&op->usage, 1);
|
||||
op->debug_id = atomic_inc_return(&fscache_op_debug_id);
|
||||
op->processor = processor;
|
||||
op->release = release;
|
||||
INIT_LIST_HEAD(&op->pend_link);
|
||||
fscache_set_op_state(op, "Init");
|
||||
}
|
||||
|
||||
/**
|
||||
* fscache_operation_init_slow - Do additional initialisation of a slow op
|
||||
* @op: The operation to initialise
|
||||
* @processor: The processor function to assign
|
||||
*
|
||||
* Do additional initialisation of an operation as required for slow work.
|
||||
*/
|
||||
static inline
|
||||
void fscache_operation_init_slow(struct fscache_operation *op,
|
||||
fscache_operation_processor_t processor)
|
||||
{
|
||||
op->processor = processor;
|
||||
slow_work_init(&op->slow_work, &fscache_op_slow_work_ops);
|
||||
}
|
||||
|
||||
/*
|
||||
* data read operation
|
||||
*/
|
||||
|
@ -389,7 +374,7 @@ struct fscache_object {
|
|||
struct fscache_cache *cache; /* cache that supplied this object */
|
||||
struct fscache_cookie *cookie; /* netfs's file/index object */
|
||||
struct fscache_object *parent; /* parent object */
|
||||
struct slow_work work; /* attention scheduling record */
|
||||
struct work_struct work; /* attention scheduling record */
|
||||
struct list_head dependents; /* FIFO of dependent objects */
|
||||
struct list_head dep_link; /* link in parent's dependents list */
|
||||
struct list_head pending_ops; /* unstarted operations on this object */
|
||||
|
@ -411,7 +396,7 @@ extern const char *fscache_object_states[];
|
|||
(test_bit(FSCACHE_IOERROR, &(obj)->cache->flags) && \
|
||||
(obj)->state >= FSCACHE_OBJECT_DYING)
|
||||
|
||||
extern const struct slow_work_ops fscache_object_slow_work_ops;
|
||||
extern void fscache_object_work_func(struct work_struct *work);
|
||||
|
||||
/**
|
||||
* fscache_object_init - Initialise a cache object description
|
||||
|
@ -433,7 +418,7 @@ void fscache_object_init(struct fscache_object *object,
|
|||
spin_lock_init(&object->lock);
|
||||
INIT_LIST_HEAD(&object->cache_link);
|
||||
INIT_HLIST_NODE(&object->cookie_link);
|
||||
vslow_work_init(&object->work, &fscache_object_slow_work_ops);
|
||||
INIT_WORK(&object->work, fscache_object_work_func);
|
||||
INIT_LIST_HEAD(&object->dependents);
|
||||
INIT_LIST_HEAD(&object->dep_link);
|
||||
INIT_LIST_HEAD(&object->pending_ops);
|
||||
|
@ -534,6 +519,8 @@ extern void fscache_io_error(struct fscache_cache *cache);
|
|||
extern void fscache_mark_pages_cached(struct fscache_retrieval *op,
|
||||
struct pagevec *pagevec);
|
||||
|
||||
extern bool fscache_object_sleep_till_congested(signed long *timeoutp);
|
||||
|
||||
extern enum fscache_checkaux fscache_check_aux(struct fscache_object *object,
|
||||
const void *data,
|
||||
uint16_t datalen);
|
||||
|
|
|
@ -85,7 +85,7 @@ struct fscache_cookie_def {
|
|||
|
||||
/* get an index key
|
||||
* - should store the key data in the buffer
|
||||
* - should return the amount of amount stored
|
||||
* - should return the amount of data stored
|
||||
* - not permitted to return an error
|
||||
* - the netfs data from the cookie being used as the source is
|
||||
* presented
|
||||
|
@ -454,6 +454,7 @@ int fscache_read_or_alloc_page(struct fscache_cookie *cookie,
|
|||
* @cookie: The cookie representing the cache object
|
||||
* @mapping: The netfs inode mapping to which the pages will be attached
|
||||
* @pages: A list of potential netfs pages to be filled
|
||||
* @nr_pages: Number of pages to be read and/or allocated
|
||||
* @end_io_func: The callback to invoke when and if each page is filled
|
||||
* @context: An arbitrary piece of data to pass on to end_io_func()
|
||||
* @gfp: The conditions under which memory allocation should be made
|
||||
|
|
223
include/linux/fsl-diu-fb.h
Normal file
223
include/linux/fsl-diu-fb.h
Normal file
|
@ -0,0 +1,223 @@
|
|||
/*
|
||||
* Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved.
|
||||
*
|
||||
* Freescale DIU Frame Buffer device driver
|
||||
*
|
||||
* Authors: Hongjun Chen <hong-jun.chen@freescale.com>
|
||||
* Paul Widmer <paul.widmer@freescale.com>
|
||||
* Srikanth Srinivasan <srikanth.srinivasan@freescale.com>
|
||||
* York Sun <yorksun@freescale.com>
|
||||
*
|
||||
* Based on imxfb.c Copyright (C) 2004 S.Hauer, Pengutronix
|
||||
*
|
||||
* 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 __FSL_DIU_FB_H__
|
||||
#define __FSL_DIU_FB_H__
|
||||
|
||||
/* Arbitrary threshold to determine the allocation method
|
||||
* See mpc8610fb_set_par(), map_video_memory(), and unmap_video_memory()
|
||||
*/
|
||||
#define MEM_ALLOC_THRESHOLD (1024*768*4+32)
|
||||
/* Minimum value that the pixel clock can be set to in pico seconds
|
||||
* This is determined by platform clock/3 where the minimum platform
|
||||
* clock is 533MHz. This gives 5629 pico seconds.
|
||||
*/
|
||||
#define MIN_PIX_CLK 5629
|
||||
#define MAX_PIX_CLK 96096
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct mfb_alpha {
|
||||
int enable;
|
||||
int alpha;
|
||||
};
|
||||
|
||||
struct mfb_chroma_key {
|
||||
int enable;
|
||||
__u8 red_max;
|
||||
__u8 green_max;
|
||||
__u8 blue_max;
|
||||
__u8 red_min;
|
||||
__u8 green_min;
|
||||
__u8 blue_min;
|
||||
};
|
||||
|
||||
struct aoi_display_offset {
|
||||
int x_aoi_d;
|
||||
int y_aoi_d;
|
||||
};
|
||||
|
||||
#define MFB_SET_CHROMA_KEY _IOW('M', 1, struct mfb_chroma_key)
|
||||
#define MFB_WAIT_FOR_VSYNC _IOW('F', 0x20, u_int32_t)
|
||||
#define MFB_SET_BRIGHTNESS _IOW('M', 3, __u8)
|
||||
|
||||
#define MFB_SET_ALPHA 0x80014d00
|
||||
#define MFB_GET_ALPHA 0x40014d00
|
||||
#define MFB_SET_AOID 0x80084d04
|
||||
#define MFB_GET_AOID 0x40084d04
|
||||
#define MFB_SET_PIXFMT 0x80014d08
|
||||
#define MFB_GET_PIXFMT 0x40014d08
|
||||
|
||||
#define FBIOGET_GWINFO 0x46E0
|
||||
#define FBIOPUT_GWINFO 0x46E1
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
/*
|
||||
* These are the fields of area descriptor(in DDR memory) for every plane
|
||||
*/
|
||||
struct diu_ad {
|
||||
/* Word 0(32-bit) in DDR memory */
|
||||
/* __u16 comp; */
|
||||
/* __u16 pixel_s:2; */
|
||||
/* __u16 pallete:1; */
|
||||
/* __u16 red_c:2; */
|
||||
/* __u16 green_c:2; */
|
||||
/* __u16 blue_c:2; */
|
||||
/* __u16 alpha_c:3; */
|
||||
/* __u16 byte_f:1; */
|
||||
/* __u16 res0:3; */
|
||||
|
||||
__be32 pix_fmt; /* hard coding pixel format */
|
||||
|
||||
/* Word 1(32-bit) in DDR memory */
|
||||
__le32 addr;
|
||||
|
||||
/* Word 2(32-bit) in DDR memory */
|
||||
/* __u32 delta_xs:11; */
|
||||
/* __u32 res1:1; */
|
||||
/* __u32 delta_ys:11; */
|
||||
/* __u32 res2:1; */
|
||||
/* __u32 g_alpha:8; */
|
||||
__le32 src_size_g_alpha;
|
||||
|
||||
/* Word 3(32-bit) in DDR memory */
|
||||
/* __u32 delta_xi:11; */
|
||||
/* __u32 res3:5; */
|
||||
/* __u32 delta_yi:11; */
|
||||
/* __u32 res4:3; */
|
||||
/* __u32 flip:2; */
|
||||
__le32 aoi_size;
|
||||
|
||||
/* Word 4(32-bit) in DDR memory */
|
||||
/*__u32 offset_xi:11;
|
||||
__u32 res5:5;
|
||||
__u32 offset_yi:11;
|
||||
__u32 res6:5;
|
||||
*/
|
||||
__le32 offset_xyi;
|
||||
|
||||
/* Word 5(32-bit) in DDR memory */
|
||||
/*__u32 offset_xd:11;
|
||||
__u32 res7:5;
|
||||
__u32 offset_yd:11;
|
||||
__u32 res8:5; */
|
||||
__le32 offset_xyd;
|
||||
|
||||
|
||||
/* Word 6(32-bit) in DDR memory */
|
||||
__u8 ckmax_r;
|
||||
__u8 ckmax_g;
|
||||
__u8 ckmax_b;
|
||||
__u8 res9;
|
||||
|
||||
/* Word 7(32-bit) in DDR memory */
|
||||
__u8 ckmin_r;
|
||||
__u8 ckmin_g;
|
||||
__u8 ckmin_b;
|
||||
__u8 res10;
|
||||
/* __u32 res10:8; */
|
||||
|
||||
/* Word 8(32-bit) in DDR memory */
|
||||
__le32 next_ad;
|
||||
|
||||
/* Word 9(32-bit) in DDR memory, just for 64-bit aligned */
|
||||
__u32 paddr;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* DIU register map */
|
||||
struct diu {
|
||||
__be32 desc[3];
|
||||
__be32 gamma;
|
||||
__be32 pallete;
|
||||
__be32 cursor;
|
||||
__be32 curs_pos;
|
||||
__be32 diu_mode;
|
||||
__be32 bgnd;
|
||||
__be32 bgnd_wb;
|
||||
__be32 disp_size;
|
||||
__be32 wb_size;
|
||||
__be32 wb_mem_addr;
|
||||
__be32 hsyn_para;
|
||||
__be32 vsyn_para;
|
||||
__be32 syn_pol;
|
||||
__be32 thresholds;
|
||||
__be32 int_status;
|
||||
__be32 int_mask;
|
||||
__be32 colorbar[8];
|
||||
__be32 filling;
|
||||
__be32 plut;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct diu_hw {
|
||||
struct diu *diu_reg;
|
||||
spinlock_t reg_lock;
|
||||
|
||||
__u32 mode; /* DIU operation mode */
|
||||
};
|
||||
|
||||
struct diu_addr {
|
||||
__u8 __iomem *vaddr; /* Virtual address */
|
||||
dma_addr_t paddr; /* Physical address */
|
||||
__u32 offset;
|
||||
};
|
||||
|
||||
struct diu_pool {
|
||||
struct diu_addr ad;
|
||||
struct diu_addr gamma;
|
||||
struct diu_addr pallete;
|
||||
struct diu_addr cursor;
|
||||
};
|
||||
|
||||
#define FSL_DIU_BASE_OFFSET 0x2C000 /* Offset of DIU */
|
||||
#define INT_LCDC 64 /* DIU interrupt number */
|
||||
|
||||
#define FSL_AOI_NUM 6 /* 5 AOIs and one dummy AOI */
|
||||
/* 1 for plane 0, 2 for plane 1&2 each */
|
||||
|
||||
/* Minimum X and Y resolutions */
|
||||
#define MIN_XRES 64
|
||||
#define MIN_YRES 64
|
||||
|
||||
/* HW cursor parameters */
|
||||
#define MAX_CURS 32
|
||||
|
||||
/* Modes of operation of DIU */
|
||||
#define MFB_MODE0 0 /* DIU off */
|
||||
#define MFB_MODE1 1 /* All three planes output to display */
|
||||
#define MFB_MODE2 2 /* Plane 1 to display, planes 2+3 written back*/
|
||||
#define MFB_MODE3 3 /* All three planes written back to memory */
|
||||
#define MFB_MODE4 4 /* Color bar generation */
|
||||
|
||||
/* INT_STATUS/INT_MASK field descriptions */
|
||||
#define INT_VSYNC 0x01 /* Vsync interrupt */
|
||||
#define INT_VSYNC_WB 0x02 /* Vsync interrupt for write back operation */
|
||||
#define INT_UNDRUN 0x04 /* Under run exception interrupt */
|
||||
#define INT_PARERR 0x08 /* Display parameters error interrupt */
|
||||
#define INT_LS_BF_VS 0x10 /* Lines before vsync. interrupt */
|
||||
|
||||
/* Panels'operation modes */
|
||||
#define MFB_TYPE_OUTPUT 0 /* Panel output to display */
|
||||
#define MFB_TYPE_OFF 1 /* Panel off */
|
||||
#define MFB_TYPE_WB 2 /* Panel written back to memory */
|
||||
#define MFB_TYPE_TEST 3 /* Panel generate color bar */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __FSL_DIU_FB_H__ */
|
|
@ -1,3 +1,8 @@
|
|||
/*
|
||||
* Ftrace header. For implementation details beyond the random comments
|
||||
* scattered below, see: Documentation/trace/ftrace-design.txt
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_FTRACE_H
|
||||
#define _LINUX_FTRACE_H
|
||||
|
||||
|
|
|
@ -11,8 +11,6 @@ struct trace_array;
|
|||
struct tracer;
|
||||
struct dentry;
|
||||
|
||||
DECLARE_PER_CPU(struct trace_seq, ftrace_event_seq);
|
||||
|
||||
struct trace_print_flags {
|
||||
unsigned long mask;
|
||||
const char *name;
|
||||
|
@ -58,6 +56,9 @@ struct trace_iterator {
|
|||
struct ring_buffer_iter *buffer_iter[NR_CPUS];
|
||||
unsigned long iter_flags;
|
||||
|
||||
/* trace_seq for __print_flags() and __print_symbolic() etc. */
|
||||
struct trace_seq tmp_seq;
|
||||
|
||||
/* The below is zeroed out in pipe_read */
|
||||
struct trace_seq seq;
|
||||
struct trace_entry *ent;
|
||||
|
@ -146,14 +147,19 @@ struct ftrace_event_class {
|
|||
int (*raw_init)(struct ftrace_event_call *);
|
||||
};
|
||||
|
||||
extern int ftrace_event_reg(struct ftrace_event_call *event,
|
||||
enum trace_reg type);
|
||||
|
||||
enum {
|
||||
TRACE_EVENT_FL_ENABLED_BIT,
|
||||
TRACE_EVENT_FL_FILTERED_BIT,
|
||||
TRACE_EVENT_FL_RECORDED_CMD_BIT,
|
||||
};
|
||||
|
||||
enum {
|
||||
TRACE_EVENT_FL_ENABLED = (1 << TRACE_EVENT_FL_ENABLED_BIT),
|
||||
TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT),
|
||||
TRACE_EVENT_FL_ENABLED = (1 << TRACE_EVENT_FL_ENABLED_BIT),
|
||||
TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT),
|
||||
TRACE_EVENT_FL_RECORDED_CMD = (1 << TRACE_EVENT_FL_RECORDED_CMD_BIT),
|
||||
};
|
||||
|
||||
struct ftrace_event_call {
|
||||
|
@ -171,6 +177,7 @@ struct ftrace_event_call {
|
|||
* 32 bit flags:
|
||||
* bit 1: enabled
|
||||
* bit 2: filter_active
|
||||
* bit 3: enabled cmd record
|
||||
*
|
||||
* Changes to flags must hold the event_mutex.
|
||||
*
|
||||
|
@ -257,8 +264,7 @@ static inline void
|
|||
perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr,
|
||||
u64 count, struct pt_regs *regs, void *head)
|
||||
{
|
||||
perf_tp_event(addr, count, raw_data, size, regs, head);
|
||||
perf_swevent_put_recursion_context(rctx);
|
||||
perf_tp_event(addr, count, raw_data, size, regs, head, rctx);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -37,6 +37,10 @@
|
|||
*
|
||||
* 7.14
|
||||
* - add splice support to fuse device
|
||||
*
|
||||
* 7.15
|
||||
* - add store notify
|
||||
* - add retrieve notify
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_FUSE_H
|
||||
|
@ -68,7 +72,7 @@
|
|||
#define FUSE_KERNEL_VERSION 7
|
||||
|
||||
/** Minor version number of this interface */
|
||||
#define FUSE_KERNEL_MINOR_VERSION 14
|
||||
#define FUSE_KERNEL_MINOR_VERSION 15
|
||||
|
||||
/** The node ID of the root inode */
|
||||
#define FUSE_ROOT_ID 1
|
||||
|
@ -251,6 +255,7 @@ enum fuse_opcode {
|
|||
FUSE_DESTROY = 38,
|
||||
FUSE_IOCTL = 39,
|
||||
FUSE_POLL = 40,
|
||||
FUSE_NOTIFY_REPLY = 41,
|
||||
|
||||
/* CUSE specific operations */
|
||||
CUSE_INIT = 4096,
|
||||
|
@ -260,6 +265,8 @@ enum fuse_notify_code {
|
|||
FUSE_NOTIFY_POLL = 1,
|
||||
FUSE_NOTIFY_INVAL_INODE = 2,
|
||||
FUSE_NOTIFY_INVAL_ENTRY = 3,
|
||||
FUSE_NOTIFY_STORE = 4,
|
||||
FUSE_NOTIFY_RETRIEVE = 5,
|
||||
FUSE_NOTIFY_CODE_MAX,
|
||||
};
|
||||
|
||||
|
@ -568,4 +575,29 @@ struct fuse_notify_inval_entry_out {
|
|||
__u32 padding;
|
||||
};
|
||||
|
||||
struct fuse_notify_store_out {
|
||||
__u64 nodeid;
|
||||
__u64 offset;
|
||||
__u32 size;
|
||||
__u32 padding;
|
||||
};
|
||||
|
||||
struct fuse_notify_retrieve_out {
|
||||
__u64 notify_unique;
|
||||
__u64 nodeid;
|
||||
__u64 offset;
|
||||
__u32 size;
|
||||
__u32 padding;
|
||||
};
|
||||
|
||||
/* Matches the size of fuse_write_in */
|
||||
struct fuse_notify_retrieve_in {
|
||||
__u64 dummy1;
|
||||
__u64 offset;
|
||||
__u32 size;
|
||||
__u32 dummy2;
|
||||
__u64 dummy3;
|
||||
__u64 dummy4;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_FUSE_H */
|
||||
|
|
|
@ -311,6 +311,7 @@ struct hid_item {
|
|||
#define HID_QUIRK_HIDDEV_FORCE 0x00000010
|
||||
#define HID_QUIRK_BADPAD 0x00000020
|
||||
#define HID_QUIRK_MULTI_INPUT 0x00000040
|
||||
#define HID_QUIRK_HIDINPUT_FORCE 0x00000080
|
||||
#define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000
|
||||
#define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000
|
||||
#define HID_QUIRK_NO_INIT_REPORTS 0x20000000
|
||||
|
|
|
@ -78,6 +78,40 @@
|
|||
|
||||
#define ADP5588_KEYMAPSIZE 80
|
||||
|
||||
#define GPI_PIN_ROW0 97
|
||||
#define GPI_PIN_ROW1 98
|
||||
#define GPI_PIN_ROW2 99
|
||||
#define GPI_PIN_ROW3 100
|
||||
#define GPI_PIN_ROW4 101
|
||||
#define GPI_PIN_ROW5 102
|
||||
#define GPI_PIN_ROW6 103
|
||||
#define GPI_PIN_ROW7 104
|
||||
#define GPI_PIN_COL0 105
|
||||
#define GPI_PIN_COL1 106
|
||||
#define GPI_PIN_COL2 107
|
||||
#define GPI_PIN_COL3 108
|
||||
#define GPI_PIN_COL4 109
|
||||
#define GPI_PIN_COL5 110
|
||||
#define GPI_PIN_COL6 111
|
||||
#define GPI_PIN_COL7 112
|
||||
#define GPI_PIN_COL8 113
|
||||
#define GPI_PIN_COL9 114
|
||||
|
||||
#define GPI_PIN_ROW_BASE GPI_PIN_ROW0
|
||||
#define GPI_PIN_ROW_END GPI_PIN_ROW7
|
||||
#define GPI_PIN_COL_BASE GPI_PIN_COL0
|
||||
#define GPI_PIN_COL_END GPI_PIN_COL9
|
||||
|
||||
#define GPI_PIN_BASE GPI_PIN_ROW_BASE
|
||||
#define GPI_PIN_END GPI_PIN_COL_END
|
||||
|
||||
#define ADP5588_GPIMAPSIZE_MAX (GPI_PIN_END - GPI_PIN_BASE + 1)
|
||||
|
||||
struct adp5588_gpi_map {
|
||||
unsigned short pin;
|
||||
unsigned short sw_evt;
|
||||
};
|
||||
|
||||
struct adp5588_kpad_platform_data {
|
||||
int rows; /* Number of rows */
|
||||
int cols; /* Number of columns */
|
||||
|
@ -87,6 +121,9 @@ struct adp5588_kpad_platform_data {
|
|||
unsigned en_keylock:1; /* Enable Key Lock feature */
|
||||
unsigned short unlock_key1; /* Unlock Key 1 */
|
||||
unsigned short unlock_key2; /* Unlock Key 2 */
|
||||
const struct adp5588_gpi_map *gpimap;
|
||||
unsigned short gpimapsize;
|
||||
const struct adp5588_gpio_platform_data *gpio_data;
|
||||
};
|
||||
|
||||
struct adp5588_gpio_platform_data {
|
||||
|
|
34
include/linux/i2c/mcs.h
Normal file
34
include/linux/i2c/mcs.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (C) 2009 - 2010 Samsung Electronics Co.Ltd
|
||||
* Author: Joonyoung Shim <jy0922.shim@samsung.com>
|
||||
* Author: HeungJun Kim <riverful.kim@samsung.com>
|
||||
*
|
||||
* 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_MCS_H
|
||||
#define __LINUX_MCS_H
|
||||
|
||||
#define MCS_KEY_MAP(v, c) ((((v) & 0xff) << 16) | ((c) & 0xffff))
|
||||
#define MCS_KEY_VAL(v) (((v) >> 16) & 0xff)
|
||||
#define MCS_KEY_CODE(v) ((v) & 0xffff)
|
||||
|
||||
struct mcs_platform_data {
|
||||
void (*cfg_pin)(void);
|
||||
|
||||
/* touchscreen */
|
||||
unsigned int x_size;
|
||||
unsigned int y_size;
|
||||
|
||||
/* touchkey */
|
||||
const u32 *keymap;
|
||||
unsigned int keymap_size;
|
||||
unsigned int key_maxval;
|
||||
bool no_autorepeat;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_MCS_H */
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* mcs5000_ts.h
|
||||
*
|
||||
* Copyright (C) 2009 Samsung Electronics Co.Ltd
|
||||
* Author: Joonyoung Shim <jy0922.shim@samsung.com>
|
||||
*
|
||||
* 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_MCS5000_TS_H
|
||||
#define __LINUX_MCS5000_TS_H
|
||||
|
||||
/* platform data for the MELFAS MCS-5000 touchscreen driver */
|
||||
struct mcs5000_ts_platform_data {
|
||||
void (*cfg_pin)(void);
|
||||
int x_size;
|
||||
int y_size;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_MCS5000_TS_H */
|
38
include/linux/i2c/qt602240_ts.h
Normal file
38
include/linux/i2c/qt602240_ts.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* AT42QT602240/ATMXT224 Touchscreen driver
|
||||
*
|
||||
* Copyright (C) 2010 Samsung Electronics Co.Ltd
|
||||
* Author: Joonyoung Shim <jy0922.shim@samsung.com>
|
||||
*
|
||||
* 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_QT602240_TS_H
|
||||
#define __LINUX_QT602240_TS_H
|
||||
|
||||
/* Orient */
|
||||
#define QT602240_NORMAL 0x0
|
||||
#define QT602240_DIAGONAL 0x1
|
||||
#define QT602240_HORIZONTAL_FLIP 0x2
|
||||
#define QT602240_ROTATED_90_COUNTER 0x3
|
||||
#define QT602240_VERTICAL_FLIP 0x4
|
||||
#define QT602240_ROTATED_90 0x5
|
||||
#define QT602240_ROTATED_180 0x6
|
||||
#define QT602240_DIAGONAL_COUNTER 0x7
|
||||
|
||||
/* The platform data for the AT42QT602240/ATMXT224 touchscreen driver */
|
||||
struct qt602240_platform_data {
|
||||
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;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_QT602240_TS_H */
|
|
@ -46,31 +46,31 @@ int i8042_remove_filter(bool (*filter)(unsigned char data, unsigned char str,
|
|||
|
||||
#else
|
||||
|
||||
void i8042_lock_chip(void)
|
||||
static inline void i8042_lock_chip(void)
|
||||
{
|
||||
}
|
||||
|
||||
void i8042_unlock_chip(void)
|
||||
static inline void i8042_unlock_chip(void)
|
||||
{
|
||||
}
|
||||
|
||||
int i8042_command(unsigned char *param, int command)
|
||||
static inline int i8042_command(unsigned char *param, int command)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
bool i8042_check_port_owner(const struct serio *serio)
|
||||
static inline bool i8042_check_port_owner(const struct serio *serio)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int i8042_install_filter(bool (*filter)(unsigned char data, unsigned char str,
|
||||
static inline int i8042_install_filter(bool (*filter)(unsigned char data, unsigned char str,
|
||||
struct serio *serio))
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
int i8042_remove_filter(bool (*filter)(unsigned char data, unsigned char str,
|
||||
static inline int i8042_remove_filter(bool (*filter)(unsigned char data, unsigned char str,
|
||||
struct serio *serio))
|
||||
{
|
||||
return -ENODEV;
|
||||
|
|
|
@ -458,7 +458,7 @@ enum {
|
|||
IDE_DFLAG_DOORLOCKING = (1 << 15),
|
||||
/* disallow DMA */
|
||||
IDE_DFLAG_NODMA = (1 << 16),
|
||||
/* powermanagment told us not to do anything, so sleep nicely */
|
||||
/* powermanagement told us not to do anything, so sleep nicely */
|
||||
IDE_DFLAG_BLOCKED = (1 << 17),
|
||||
/* sleeping & sleep field valid */
|
||||
IDE_DFLAG_SLEEPING = (1 << 18),
|
||||
|
|
|
@ -73,6 +73,8 @@
|
|||
#define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */
|
||||
#define IFF_IN_NETPOLL 0x1000 /* whether we are processing netpoll */
|
||||
#define IFF_DISABLE_NETPOLL 0x2000 /* disable netpoll at run-time */
|
||||
#define IFF_MACVLAN_PORT 0x4000 /* device used as macvlan port */
|
||||
#define IFF_BRIDGE_PORT 0x8000 /* device used as bridge port */
|
||||
|
||||
#define IF_GET_IFACE 0x0001 /* for querying only */
|
||||
#define IF_GET_PROTO 0x0002
|
||||
|
|
|
@ -83,6 +83,7 @@
|
|||
|
||||
#define BOND_DEFAULT_MAX_BONDS 1 /* Default maximum number of devices to support */
|
||||
|
||||
#define BOND_DEFAULT_TX_QUEUES 16 /* Default number of tx queues per device */
|
||||
/* hashing types */
|
||||
#define BOND_XMIT_POLICY_LAYER2 0 /* layer 2 (MAC only), default */
|
||||
#define BOND_XMIT_POLICY_LAYER34 1 /* layer 3+4 (IP ^ (TCP || UDP)) */
|
||||
|
|
|
@ -102,8 +102,6 @@ struct __fdb_entry {
|
|||
#include <linux/netdevice.h>
|
||||
|
||||
extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *));
|
||||
extern struct sk_buff *(*br_handle_frame_hook)(struct net_bridge_port *p,
|
||||
struct sk_buff *skb);
|
||||
extern int (*br_should_route_hook)(struct sk_buff *skb);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -119,7 +119,7 @@ struct ethhdr {
|
|||
unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
|
||||
unsigned char h_source[ETH_ALEN]; /* source ether addr */
|
||||
__be16 h_proto; /* packet type ID field */
|
||||
} __attribute__((packed));
|
||||
} __packed;
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/skbuff.h>
|
||||
|
|
|
@ -67,7 +67,7 @@ struct fddi_8022_1_hdr {
|
|||
__u8 dsap; /* destination service access point */
|
||||
__u8 ssap; /* source service access point */
|
||||
__u8 ctrl; /* control byte #1 */
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
/* Define 802.2 Type 2 header */
|
||||
struct fddi_8022_2_hdr {
|
||||
|
@ -75,7 +75,7 @@ struct fddi_8022_2_hdr {
|
|||
__u8 ssap; /* source service access point */
|
||||
__u8 ctrl_1; /* control byte #1 */
|
||||
__u8 ctrl_2; /* control byte #2 */
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
/* Define 802.2 SNAP header */
|
||||
#define FDDI_K_OUI_LEN 3
|
||||
|
@ -85,7 +85,7 @@ struct fddi_snap_hdr {
|
|||
__u8 ctrl; /* always 0x03 */
|
||||
__u8 oui[FDDI_K_OUI_LEN]; /* organizational universal id */
|
||||
__be16 ethertype; /* packet type ID field */
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
/* Define FDDI LLC frame header */
|
||||
struct fddihdr {
|
||||
|
@ -98,7 +98,7 @@ struct fddihdr {
|
|||
struct fddi_8022_2_hdr llc_8022_2;
|
||||
struct fddi_snap_hdr llc_snap;
|
||||
} hdr;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/netdevice.h>
|
||||
|
|
|
@ -135,7 +135,7 @@ struct frhdr
|
|||
__be16 PID;
|
||||
|
||||
#define IP_NLPID pad
|
||||
} __attribute__((packed));
|
||||
} __packed;
|
||||
|
||||
/* see RFC 1490 for the definition of the following */
|
||||
#define FRAD_I_UI 0x03
|
||||
|
|
|
@ -104,7 +104,7 @@ struct hippi_fp_hdr {
|
|||
__be32 fixed;
|
||||
#endif
|
||||
__be32 d2_size;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct hippi_le_hdr {
|
||||
#if defined (__BIG_ENDIAN_BITFIELD)
|
||||
|
@ -129,7 +129,7 @@ struct hippi_le_hdr {
|
|||
__u8 daddr[HIPPI_ALEN];
|
||||
__u16 locally_administered;
|
||||
__u8 saddr[HIPPI_ALEN];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
#define HIPPI_OUI_LEN 3
|
||||
/*
|
||||
|
@ -142,12 +142,12 @@ struct hippi_snap_hdr {
|
|||
__u8 ctrl; /* always 0x03 */
|
||||
__u8 oui[HIPPI_OUI_LEN]; /* organizational universal id (zero)*/
|
||||
__be16 ethertype; /* packet type ID field */
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct hippi_hdr {
|
||||
struct hippi_fp_hdr fp;
|
||||
struct hippi_le_hdr le;
|
||||
struct hippi_snap_hdr snap;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
#endif /* _LINUX_IF_HIPPI_H */
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/netlink.h>
|
||||
|
||||
/* The struct should be in sync with struct net_device_stats */
|
||||
/* This struct should be in sync with struct rtnl_link_stats64 */
|
||||
struct rtnl_link_stats {
|
||||
__u32 rx_packets; /* total packets received */
|
||||
__u32 tx_packets; /* total packets transmitted */
|
||||
|
@ -37,6 +37,7 @@ struct rtnl_link_stats {
|
|||
__u32 tx_compressed;
|
||||
};
|
||||
|
||||
/* The main device statistics structure */
|
||||
struct rtnl_link_stats64 {
|
||||
__u64 rx_packets; /* total packets received */
|
||||
__u64 tx_packets; /* total packets transmitted */
|
||||
|
@ -233,7 +234,7 @@ enum macvlan_mode {
|
|||
MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */
|
||||
};
|
||||
|
||||
/* SR-IOV virtual function managment section */
|
||||
/* SR-IOV virtual function management section */
|
||||
|
||||
enum {
|
||||
IFLA_VF_INFO_UNSPEC,
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <linux/netdevice.h>
|
||||
#include <linux/netlink.h>
|
||||
#include <net/netlink.h>
|
||||
#include <linux/u64_stats_sync.h>
|
||||
|
||||
#if defined(CONFIG_MACVTAP) || defined(CONFIG_MACVTAP_MODULE)
|
||||
struct socket *macvtap_get_socket(struct file *);
|
||||
|
@ -27,14 +28,16 @@ struct macvtap_queue;
|
|||
* struct macvlan_rx_stats - MACVLAN percpu rx stats
|
||||
* @rx_packets: number of received packets
|
||||
* @rx_bytes: number of received bytes
|
||||
* @multicast: number of received multicast packets
|
||||
* @rx_multicast: number of received multicast packets
|
||||
* @syncp: synchronization point for 64bit counters
|
||||
* @rx_errors: number of errors
|
||||
*/
|
||||
struct macvlan_rx_stats {
|
||||
unsigned long rx_packets;
|
||||
unsigned long rx_bytes;
|
||||
unsigned long multicast;
|
||||
unsigned long rx_errors;
|
||||
u64 rx_packets;
|
||||
u64 rx_bytes;
|
||||
u64 rx_multicast;
|
||||
struct u64_stats_sync syncp;
|
||||
unsigned long rx_errors;
|
||||
};
|
||||
|
||||
struct macvlan_dev {
|
||||
|
@ -56,17 +59,21 @@ static inline void macvlan_count_rx(const struct macvlan_dev *vlan,
|
|||
{
|
||||
struct macvlan_rx_stats *rx_stats;
|
||||
|
||||
rx_stats = per_cpu_ptr(vlan->rx_stats, smp_processor_id());
|
||||
rx_stats = this_cpu_ptr(vlan->rx_stats);
|
||||
if (likely(success)) {
|
||||
u64_stats_update_begin(&rx_stats->syncp);
|
||||
rx_stats->rx_packets++;;
|
||||
rx_stats->rx_bytes += len;
|
||||
if (multicast)
|
||||
rx_stats->multicast++;
|
||||
rx_stats->rx_multicast++;
|
||||
u64_stats_update_end(&rx_stats->syncp);
|
||||
} else {
|
||||
rx_stats->rx_errors++;
|
||||
}
|
||||
}
|
||||
|
||||
extern void macvlan_common_setup(struct net_device *dev);
|
||||
|
||||
extern int macvlan_common_newlink(struct net *src_net, struct net_device *dev,
|
||||
struct nlattr *tb[], struct nlattr *data[],
|
||||
int (*receive)(struct sk_buff *skb),
|
||||
|
@ -84,8 +91,4 @@ extern int macvlan_link_register(struct rtnl_link_ops *ops);
|
|||
extern netdev_tx_t macvlan_start_xmit(struct sk_buff *skb,
|
||||
struct net_device *dev);
|
||||
|
||||
|
||||
extern struct sk_buff *(*macvlan_handle_frame_hook)(struct macvlan_port *,
|
||||
struct sk_buff *);
|
||||
|
||||
#endif /* _LINUX_IF_MACVLAN_H */
|
||||
|
|
|
@ -48,6 +48,7 @@ struct sockaddr_ll {
|
|||
#define PACKET_LOSS 14
|
||||
#define PACKET_VNET_HDR 15
|
||||
#define PACKET_TX_TIMESTAMP 16
|
||||
#define PACKET_TIMESTAMP 17
|
||||
|
||||
struct tpacket_stats {
|
||||
unsigned int tp_packets;
|
||||
|
|
|
@ -59,7 +59,7 @@ struct sockaddr_pppox {
|
|||
union{
|
||||
struct pppoe_addr pppoe;
|
||||
}sa_addr;
|
||||
}__attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
/* The use of the above union isn't viable because the size of this
|
||||
* struct must stay fixed over time -- applications use sizeof(struct
|
||||
|
@ -70,7 +70,7 @@ struct sockaddr_pppol2tp {
|
|||
sa_family_t sa_family; /* address family, AF_PPPOX */
|
||||
unsigned int sa_protocol; /* protocol identifier */
|
||||
struct pppol2tp_addr pppol2tp;
|
||||
}__attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
/* The L2TPv3 protocol changes tunnel and session ids from 16 to 32
|
||||
* bits. So we need a different sockaddr structure.
|
||||
|
@ -79,7 +79,7 @@ struct sockaddr_pppol2tpv3 {
|
|||
sa_family_t sa_family; /* address family, AF_PPPOX */
|
||||
unsigned int sa_protocol; /* protocol identifier */
|
||||
struct pppol2tpv3_addr pppol2tp;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
|
@ -129,7 +129,7 @@ struct pppoe_hdr {
|
|||
__be16 sid;
|
||||
__be16 length;
|
||||
struct pppoe_tag tag[0];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
/* Length of entire PPPoE + PPP header */
|
||||
#define PPPOE_SES_HLEN 8
|
||||
|
|
|
@ -85,6 +85,7 @@ struct in_addr {
|
|||
#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR
|
||||
|
||||
#define IP_MINTTL 21
|
||||
#define IP_NODEFRAG 22
|
||||
|
||||
/* IP_MTU_DISCOVER values */
|
||||
#define IP_PMTUDISC_DONT 0 /* Never send DF frames */
|
||||
|
|
|
@ -691,9 +691,12 @@ struct input_absinfo {
|
|||
#define ABS_TILT_X 0x1a
|
||||
#define ABS_TILT_Y 0x1b
|
||||
#define ABS_TOOL_WIDTH 0x1c
|
||||
|
||||
#define ABS_VOLUME 0x20
|
||||
|
||||
#define ABS_MISC 0x28
|
||||
|
||||
#define ABS_MT_SLOT 0x2f /* MT slot being modified */
|
||||
#define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */
|
||||
#define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */
|
||||
#define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */
|
||||
|
@ -706,6 +709,12 @@ struct input_absinfo {
|
|||
#define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */
|
||||
#define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/* Implementation details, userspace should not care about these */
|
||||
#define ABS_MT_FIRST ABS_MT_TOUCH_MAJOR
|
||||
#define ABS_MT_LAST ABS_MT_PRESSURE
|
||||
#endif
|
||||
|
||||
#define ABS_MAX 0x3f
|
||||
#define ABS_CNT (ABS_MAX+1)
|
||||
|
||||
|
@ -1047,6 +1056,14 @@ struct ff_effect {
|
|||
#include <linux/timer.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
|
||||
/**
|
||||
* struct input_mt_slot - represents the state of an input MT slot
|
||||
* @abs: holds current values of ABS_MT axes for this slot
|
||||
*/
|
||||
struct input_mt_slot {
|
||||
int abs[ABS_MT_LAST - ABS_MT_FIRST + 1];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct input_dev - represents an input device
|
||||
* @name: name of the device
|
||||
|
@ -1063,6 +1080,10 @@ struct ff_effect {
|
|||
* @sndbit: bitmap of sound effects supported by the device
|
||||
* @ffbit: bitmap of force feedback effects supported by the device
|
||||
* @swbit: bitmap of switches present on the device
|
||||
* @hint_events_per_packet: average number of events generated by the
|
||||
* device in a packet (between EV_SYN/SYN_REPORT events). Used by
|
||||
* event handlers to estimate size of the buffer needed to hold
|
||||
* events.
|
||||
* @keycodemax: size of keycode table
|
||||
* @keycodesize: size of elements in keycode table
|
||||
* @keycode: map of scancodes to keycodes for this device
|
||||
|
@ -1078,9 +1099,12 @@ struct ff_effect {
|
|||
* @repeat_key: stores key code of the last key pressed; used to implement
|
||||
* software autorepeat
|
||||
* @timer: timer for software autorepeat
|
||||
* @sync: set to 1 when there were no new events since last EV_SYNC
|
||||
* @abs: current values for reports from absolute axes
|
||||
* @rep: current values for autorepeat parameters (delay, rate)
|
||||
* @mt: pointer to array of struct input_mt_slot holding current values
|
||||
* of tracked contacts
|
||||
* @mtsize: number of MT slots the device uses
|
||||
* @slot: MT slot currently being transmitted
|
||||
* @key: reflects current state of device's keys/buttons
|
||||
* @led: reflects current state of device's LEDs
|
||||
* @snd: reflects current state of sound effects
|
||||
|
@ -1119,6 +1143,7 @@ struct ff_effect {
|
|||
* last user closes the device
|
||||
* @going_away: marks devices that are in a middle of unregistering and
|
||||
* causes input_open_device*() fail with -ENODEV.
|
||||
* @sync: set to %true when there were no new events since last EV_SYN
|
||||
* @dev: driver model's view of this device
|
||||
* @h_list: list of input handles associated with the device. When
|
||||
* accessing the list dev->mutex must be held
|
||||
|
@ -1140,6 +1165,8 @@ struct input_dev {
|
|||
unsigned long ffbit[BITS_TO_LONGS(FF_CNT)];
|
||||
unsigned long swbit[BITS_TO_LONGS(SW_CNT)];
|
||||
|
||||
unsigned int hint_events_per_packet;
|
||||
|
||||
unsigned int keycodemax;
|
||||
unsigned int keycodesize;
|
||||
void *keycode;
|
||||
|
@ -1153,11 +1180,13 @@ struct input_dev {
|
|||
unsigned int repeat_key;
|
||||
struct timer_list timer;
|
||||
|
||||
int sync;
|
||||
|
||||
int abs[ABS_CNT];
|
||||
int rep[REP_MAX + 1];
|
||||
|
||||
struct input_mt_slot *mt;
|
||||
int mtsize;
|
||||
int slot;
|
||||
|
||||
unsigned long key[BITS_TO_LONGS(KEY_CNT)];
|
||||
unsigned long led[BITS_TO_LONGS(LED_CNT)];
|
||||
unsigned long snd[BITS_TO_LONGS(SND_CNT)];
|
||||
|
@ -1182,6 +1211,8 @@ struct input_dev {
|
|||
unsigned int users;
|
||||
bool going_away;
|
||||
|
||||
bool sync;
|
||||
|
||||
struct device dev;
|
||||
|
||||
struct list_head h_list;
|
||||
|
@ -1406,8 +1437,28 @@ static inline void input_mt_sync(struct input_dev *dev)
|
|||
input_event(dev, EV_SYN, SYN_MT_REPORT, 0);
|
||||
}
|
||||
|
||||
static inline void input_mt_slot(struct input_dev *dev, int slot)
|
||||
{
|
||||
input_event(dev, EV_ABS, ABS_MT_SLOT, slot);
|
||||
}
|
||||
|
||||
void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code);
|
||||
|
||||
/**
|
||||
* input_set_events_per_packet - tell handlers about the driver event rate
|
||||
* @dev: the input device used by the driver
|
||||
* @n_events: the average number of events between calls to input_sync()
|
||||
*
|
||||
* If the event rate sent from a device is unusually large, use this
|
||||
* function to set the expected event rate. This will allow handlers
|
||||
* to set up an appropriate buffer size for the event stream, in order
|
||||
* to minimize information loss.
|
||||
*/
|
||||
static inline void input_set_events_per_packet(struct input_dev *dev, int n_events)
|
||||
{
|
||||
dev->hint_events_per_packet = n_events;
|
||||
}
|
||||
|
||||
static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat)
|
||||
{
|
||||
dev->absmin[axis] = min;
|
||||
|
@ -1485,5 +1536,8 @@ int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file);
|
|||
int input_ff_create_memless(struct input_dev *dev, void *data,
|
||||
int (*play_effect)(struct input_dev *, void *, struct ff_effect *));
|
||||
|
||||
int input_mt_create_slots(struct input_dev *dev, unsigned int num_slots);
|
||||
void input_mt_destroy_slots(struct input_dev *dev);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
349
include/linux/input/adxl34x.h
Normal file
349
include/linux/input/adxl34x.h
Normal file
|
@ -0,0 +1,349 @@
|
|||
/*
|
||||
* include/linux/input/adxl34x.h
|
||||
*
|
||||
* Digital Accelerometer characteristics are highly application specific
|
||||
* and may vary between boards and models. The platform_data for the
|
||||
* device's "struct device" holds this information.
|
||||
*
|
||||
* Copyright 2009 Analog Devices Inc.
|
||||
*
|
||||
* Licensed under the GPL-2 or later.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_INPUT_ADXL34X_H__
|
||||
#define __LINUX_INPUT_ADXL34X_H__
|
||||
|
||||
struct adxl34x_platform_data {
|
||||
|
||||
/*
|
||||
* X,Y,Z Axis Offset:
|
||||
* offer user offset adjustments in twoscompliment
|
||||
* form with a scale factor of 15.6 mg/LSB (i.e. 0x7F = +2 g)
|
||||
*/
|
||||
|
||||
s8 x_axis_offset;
|
||||
s8 y_axis_offset;
|
||||
s8 z_axis_offset;
|
||||
|
||||
/*
|
||||
* TAP_X/Y/Z Enable: Setting TAP_X, Y, or Z Enable enables X,
|
||||
* Y, or Z participation in Tap detection. A '0' excludes the
|
||||
* selected axis from participation in Tap detection.
|
||||
* Setting the SUPPRESS bit suppresses Double Tap detection if
|
||||
* acceleration greater than tap_threshold is present between
|
||||
* taps.
|
||||
*/
|
||||
|
||||
#define ADXL_SUPPRESS (1 << 3)
|
||||
#define ADXL_TAP_X_EN (1 << 2)
|
||||
#define ADXL_TAP_Y_EN (1 << 1)
|
||||
#define ADXL_TAP_Z_EN (1 << 0)
|
||||
|
||||
u8 tap_axis_control;
|
||||
|
||||
/*
|
||||
* tap_threshold:
|
||||
* holds the threshold value for tap detection/interrupts.
|
||||
* The data format is unsigned. The scale factor is 62.5 mg/LSB
|
||||
* (i.e. 0xFF = +16 g). A zero value may result in undesirable
|
||||
* behavior if Tap/Double Tap is enabled.
|
||||
*/
|
||||
|
||||
u8 tap_threshold;
|
||||
|
||||
/*
|
||||
* tap_duration:
|
||||
* is an unsigned time value representing the maximum
|
||||
* time that an event must be above the tap_threshold threshold
|
||||
* to qualify as a tap event. The scale factor is 625 us/LSB. A zero
|
||||
* value will prevent Tap/Double Tap functions from working.
|
||||
*/
|
||||
|
||||
u8 tap_duration;
|
||||
|
||||
/*
|
||||
* tap_latency:
|
||||
* is an unsigned time value representing the wait time
|
||||
* from the detection of a tap event to the opening of the time
|
||||
* window tap_window for a possible second tap event. The scale
|
||||
* factor is 1.25 ms/LSB. A zero value will disable the Double Tap
|
||||
* function.
|
||||
*/
|
||||
|
||||
u8 tap_latency;
|
||||
|
||||
/*
|
||||
* tap_window:
|
||||
* is an unsigned time value representing the amount
|
||||
* of time after the expiration of tap_latency during which a second
|
||||
* tap can begin. The scale factor is 1.25 ms/LSB. A zero value will
|
||||
* disable the Double Tap function.
|
||||
*/
|
||||
|
||||
u8 tap_window;
|
||||
|
||||
/*
|
||||
* act_axis_control:
|
||||
* X/Y/Z Enable: A '1' enables X, Y, or Z participation in activity
|
||||
* or inactivity detection. A '0' excludes the selected axis from
|
||||
* participation. If all of the axes are excluded, the function is
|
||||
* disabled.
|
||||
* AC/DC: A '0' = DC coupled operation and a '1' = AC coupled
|
||||
* operation. In DC coupled operation, the current acceleration is
|
||||
* compared with activity_threshold and inactivity_threshold directly
|
||||
* to determine whether activity or inactivity is detected. In AC
|
||||
* coupled operation for activity detection, the acceleration value
|
||||
* at the start of activity detection is taken as a reference value.
|
||||
* New samples of acceleration are then compared to this
|
||||
* reference value and if the magnitude of the difference exceeds
|
||||
* activity_threshold the device will trigger an activity interrupt. In
|
||||
* AC coupled operation for inactivity detection, a reference value
|
||||
* is used again for comparison and is updated whenever the
|
||||
* device exceeds the inactivity threshold. Once the reference
|
||||
* value is selected, the device compares the magnitude of the
|
||||
* difference between the reference value and the current
|
||||
* acceleration with inactivity_threshold. If the difference is below
|
||||
* inactivity_threshold for a total of inactivity_time, the device is
|
||||
* considered inactive and the inactivity interrupt is triggered.
|
||||
*/
|
||||
|
||||
#define ADXL_ACT_ACDC (1 << 7)
|
||||
#define ADXL_ACT_X_EN (1 << 6)
|
||||
#define ADXL_ACT_Y_EN (1 << 5)
|
||||
#define ADXL_ACT_Z_EN (1 << 4)
|
||||
#define ADXL_INACT_ACDC (1 << 3)
|
||||
#define ADXL_INACT_X_EN (1 << 2)
|
||||
#define ADXL_INACT_Y_EN (1 << 1)
|
||||
#define ADXL_INACT_Z_EN (1 << 0)
|
||||
|
||||
u8 act_axis_control;
|
||||
|
||||
/*
|
||||
* activity_threshold:
|
||||
* holds the threshold value for activity detection.
|
||||
* The data format is unsigned. The scale factor is
|
||||
* 62.5 mg/LSB. A zero value may result in undesirable behavior if
|
||||
* Activity interrupt is enabled.
|
||||
*/
|
||||
|
||||
u8 activity_threshold;
|
||||
|
||||
/*
|
||||
* inactivity_threshold:
|
||||
* holds the threshold value for inactivity
|
||||
* detection. The data format is unsigned. The scale
|
||||
* factor is 62.5 mg/LSB. A zero value may result in undesirable
|
||||
* behavior if Inactivity interrupt is enabled.
|
||||
*/
|
||||
|
||||
u8 inactivity_threshold;
|
||||
|
||||
/*
|
||||
* inactivity_time:
|
||||
* is an unsigned time value representing the
|
||||
* amount of time that acceleration must be below the value in
|
||||
* inactivity_threshold for inactivity to be declared. The scale factor
|
||||
* is 1 second/LSB. Unlike the other interrupt functions, which
|
||||
* operate on unfiltered data, the inactivity function operates on the
|
||||
* filtered output data. At least one output sample must be
|
||||
* generated for the inactivity interrupt to be triggered. This will
|
||||
* result in the function appearing un-responsive if the
|
||||
* inactivity_time register is set with a value less than the time
|
||||
* constant of the Output Data Rate. A zero value will result in an
|
||||
* interrupt when the output data is below inactivity_threshold.
|
||||
*/
|
||||
|
||||
u8 inactivity_time;
|
||||
|
||||
/*
|
||||
* free_fall_threshold:
|
||||
* holds the threshold value for Free-Fall detection.
|
||||
* The data format is unsigned. The root-sum-square(RSS) value
|
||||
* of all axes is calculated and compared to the value in
|
||||
* free_fall_threshold to determine if a free fall event may be
|
||||
* occurring. The scale factor is 62.5 mg/LSB. A zero value may
|
||||
* result in undesirable behavior if Free-Fall interrupt is
|
||||
* enabled. Values between 300 and 600 mg (0x05 to 0x09) are
|
||||
* recommended.
|
||||
*/
|
||||
|
||||
u8 free_fall_threshold;
|
||||
|
||||
/*
|
||||
* free_fall_time:
|
||||
* is an unsigned time value representing the minimum
|
||||
* time that the RSS value of all axes must be less than
|
||||
* free_fall_threshold to generate a Free-Fall interrupt. The
|
||||
* scale factor is 5 ms/LSB. A zero value may result in
|
||||
* undesirable behavior if Free-Fall interrupt is enabled.
|
||||
* Values between 100 to 350 ms (0x14 to 0x46) are recommended.
|
||||
*/
|
||||
|
||||
u8 free_fall_time;
|
||||
|
||||
/*
|
||||
* data_rate:
|
||||
* Selects device bandwidth and output data rate.
|
||||
* RATE = 3200 Hz / (2^(15 - x)). Default value is 0x0A, or 100 Hz
|
||||
* Output Data Rate. An Output Data Rate should be selected that
|
||||
* is appropriate for the communication protocol and frequency
|
||||
* selected. Selecting too high of an Output Data Rate with a low
|
||||
* communication speed will result in samples being discarded.
|
||||
*/
|
||||
|
||||
u8 data_rate;
|
||||
|
||||
/*
|
||||
* data_range:
|
||||
* FULL_RES: When this bit is set with the device is
|
||||
* in Full-Resolution Mode, where the output resolution increases
|
||||
* with RANGE to maintain a 4 mg/LSB scale factor. When this
|
||||
* bit is cleared the device is in 10-bit Mode and RANGE determine the
|
||||
* maximum g-Range and scale factor.
|
||||
*/
|
||||
|
||||
#define ADXL_FULL_RES (1 << 3)
|
||||
#define ADXL_RANGE_PM_2g 0
|
||||
#define ADXL_RANGE_PM_4g 1
|
||||
#define ADXL_RANGE_PM_8g 2
|
||||
#define ADXL_RANGE_PM_16g 3
|
||||
|
||||
u8 data_range;
|
||||
|
||||
/*
|
||||
* low_power_mode:
|
||||
* A '0' = Normal operation and a '1' = Reduced
|
||||
* power operation with somewhat higher noise.
|
||||
*/
|
||||
|
||||
u8 low_power_mode;
|
||||
|
||||
/*
|
||||
* power_mode:
|
||||
* LINK: A '1' with both the activity and inactivity functions
|
||||
* enabled will delay the start of the activity function until
|
||||
* inactivity is detected. Once activity is detected, inactivity
|
||||
* detection will begin and prevent the detection of activity. This
|
||||
* bit serially links the activity and inactivity functions. When '0'
|
||||
* the inactivity and activity functions are concurrent. Additional
|
||||
* information can be found in the Application section under Link
|
||||
* Mode.
|
||||
* AUTO_SLEEP: A '1' sets the ADXL34x to switch to Sleep Mode
|
||||
* when inactivity (acceleration has been below inactivity_threshold
|
||||
* for at least inactivity_time) is detected and the LINK bit is set.
|
||||
* A '0' disables automatic switching to Sleep Mode. See SLEEP
|
||||
* for further description.
|
||||
*/
|
||||
|
||||
#define ADXL_LINK (1 << 5)
|
||||
#define ADXL_AUTO_SLEEP (1 << 4)
|
||||
|
||||
u8 power_mode;
|
||||
|
||||
/*
|
||||
* fifo_mode:
|
||||
* BYPASS The FIFO is bypassed
|
||||
* FIFO FIFO collects up to 32 values then stops collecting data
|
||||
* STREAM FIFO holds the last 32 data values. Once full, the FIFO's
|
||||
* oldest data is lost as it is replaced with newer data
|
||||
*
|
||||
* DEFAULT should be ADXL_FIFO_STREAM
|
||||
*/
|
||||
|
||||
#define ADXL_FIFO_BYPASS 0
|
||||
#define ADXL_FIFO_FIFO 1
|
||||
#define ADXL_FIFO_STREAM 2
|
||||
|
||||
u8 fifo_mode;
|
||||
|
||||
/*
|
||||
* watermark:
|
||||
* The Watermark feature can be used to reduce the interrupt load
|
||||
* of the system. The FIFO fills up to the value stored in watermark
|
||||
* [1..32] and then generates an interrupt.
|
||||
* A '0' disables the watermark feature.
|
||||
*/
|
||||
|
||||
u8 watermark;
|
||||
|
||||
u32 ev_type; /* EV_ABS or EV_REL */
|
||||
|
||||
u32 ev_code_x; /* ABS_X,Y,Z or REL_X,Y,Z */
|
||||
u32 ev_code_y; /* ABS_X,Y,Z or REL_X,Y,Z */
|
||||
u32 ev_code_z; /* ABS_X,Y,Z or REL_X,Y,Z */
|
||||
|
||||
/*
|
||||
* A valid BTN or KEY Code; use tap_axis_control to disable
|
||||
* event reporting
|
||||
*/
|
||||
|
||||
u32 ev_code_tap[3]; /* EV_KEY {X-Axis, Y-Axis, Z-Axis} */
|
||||
|
||||
/*
|
||||
* A valid BTN or KEY Code for Free-Fall or Activity enables
|
||||
* input event reporting. A '0' disables the Free-Fall or
|
||||
* Activity reporting.
|
||||
*/
|
||||
|
||||
u32 ev_code_ff; /* EV_KEY */
|
||||
u32 ev_code_act_inactivity; /* EV_KEY */
|
||||
|
||||
/*
|
||||
* Use ADXL34x INT2 instead of INT1
|
||||
*/
|
||||
u8 use_int2;
|
||||
|
||||
/*
|
||||
* ADXL346 only ORIENTATION SENSING feature
|
||||
* The orientation function of the ADXL346 reports both 2-D and
|
||||
* 3-D orientation concurrently.
|
||||
*/
|
||||
|
||||
#define ADXL_EN_ORIENTATION_2D 1
|
||||
#define ADXL_EN_ORIENTATION_3D 2
|
||||
#define ADXL_EN_ORIENTATION_2D_3D 3
|
||||
|
||||
u8 orientation_enable;
|
||||
|
||||
/*
|
||||
* The width of the deadzone region between two or more
|
||||
* orientation positions is determined by setting the Deadzone
|
||||
* value. The deadzone region size can be specified with a
|
||||
* resolution of 3.6deg. The deadzone angle represents the total
|
||||
* angle where the orientation is considered invalid.
|
||||
*/
|
||||
|
||||
#define ADXL_DEADZONE_ANGLE_0p0 0 /* !!!0.0 [deg] */
|
||||
#define ADXL_DEADZONE_ANGLE_3p6 1 /* 3.6 [deg] */
|
||||
#define ADXL_DEADZONE_ANGLE_7p2 2 /* 7.2 [deg] */
|
||||
#define ADXL_DEADZONE_ANGLE_10p8 3 /* 10.8 [deg] */
|
||||
#define ADXL_DEADZONE_ANGLE_14p4 4 /* 14.4 [deg] */
|
||||
#define ADXL_DEADZONE_ANGLE_18p0 5 /* 18.0 [deg] */
|
||||
#define ADXL_DEADZONE_ANGLE_21p6 6 /* 21.6 [deg] */
|
||||
#define ADXL_DEADZONE_ANGLE_25p2 7 /* 25.2 [deg] */
|
||||
|
||||
u8 deadzone_angle;
|
||||
|
||||
/*
|
||||
* To eliminate most human motion such as walking or shaking,
|
||||
* a Divisor value should be selected to effectively limit the
|
||||
* orientation bandwidth. Set the depth of the filter used to
|
||||
* low-pass filter the measured acceleration for stable
|
||||
* orientation sensing
|
||||
*/
|
||||
|
||||
#define ADXL_LP_FILTER_DIVISOR_2 0
|
||||
#define ADXL_LP_FILTER_DIVISOR_4 1
|
||||
#define ADXL_LP_FILTER_DIVISOR_8 2
|
||||
#define ADXL_LP_FILTER_DIVISOR_16 3
|
||||
#define ADXL_LP_FILTER_DIVISOR_32 4
|
||||
#define ADXL_LP_FILTER_DIVISOR_64 5
|
||||
#define ADXL_LP_FILTER_DIVISOR_128 6
|
||||
#define ADXL_LP_FILTER_DIVISOR_256 7
|
||||
|
||||
u8 divisor_length;
|
||||
|
||||
u32 ev_codes_orient_2d[4]; /* EV_KEY {+X, -X, +Y, -Y} */
|
||||
u32 ev_codes_orient_3d[6]; /* EV_KEY {+Z, +Y, +X, -X, -Y, -Z} */
|
||||
};
|
||||
#endif
|
10
include/linux/input/cy8ctmg110_pdata.h
Normal file
10
include/linux/input/cy8ctmg110_pdata.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef _LINUX_CY8CTMG110_PDATA_H
|
||||
#define _LINUX_CY8CTMG110_PDATA_H
|
||||
|
||||
struct cy8ctmg110_pdata
|
||||
{
|
||||
int reset_pin; /* Reset pin is wired to this GPIO (optional) */
|
||||
int irq_pin; /* IRQ pin is wired to this GPIO */
|
||||
};
|
||||
|
||||
#endif
|
|
@ -41,6 +41,9 @@ struct matrix_keymap_data {
|
|||
* @col_scan_delay_us: delay, measured in microseconds, that is
|
||||
* needed before we can keypad after activating column gpio
|
||||
* @debounce_ms: debounce interval in milliseconds
|
||||
* @clustered_irq: may be specified if interrupts of all row/column GPIOs
|
||||
* are bundled to one single irq
|
||||
* @clustered_irq_flags: flags that are needed for the clustered irq
|
||||
* @active_low: gpio polarity
|
||||
* @wakeup: controls whether the device should be set up as wakeup
|
||||
* source
|
||||
|
@ -63,6 +66,9 @@ struct matrix_keypad_platform_data {
|
|||
/* key debounce interval in milli-second */
|
||||
unsigned int debounce_ms;
|
||||
|
||||
unsigned int clustered_irq;
|
||||
unsigned int clustered_irq_flags;
|
||||
|
||||
bool active_low;
|
||||
bool wakeup;
|
||||
bool no_autorepeat;
|
||||
|
|
15
include/linux/intel_pmic_gpio.h
Normal file
15
include/linux/intel_pmic_gpio.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef LINUX_INTEL_PMIC_H
|
||||
#define LINUX_INTEL_PMIC_H
|
||||
|
||||
struct intel_pmic_gpio_platform_data {
|
||||
/* the first IRQ of the chip */
|
||||
unsigned irq_base;
|
||||
/* number assigned to the first GPIO */
|
||||
unsigned gpio_base;
|
||||
/* sram address for gpiointr register, the langwell chip will map
|
||||
* the PMIC spi GPIO expander's GPIOINTR register in sram.
|
||||
*/
|
||||
unsigned gpiointr;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -53,16 +53,21 @@
|
|||
* IRQF_ONESHOT - Interrupt is not reenabled after the hardirq handler finished.
|
||||
* Used by threaded interrupts which need to keep the
|
||||
* irq line disabled until the threaded handler has been run.
|
||||
* IRQF_NO_SUSPEND - Do not disable this IRQ during suspend
|
||||
*
|
||||
*/
|
||||
#define IRQF_DISABLED 0x00000020
|
||||
#define IRQF_SAMPLE_RANDOM 0x00000040
|
||||
#define IRQF_SHARED 0x00000080
|
||||
#define IRQF_PROBE_SHARED 0x00000100
|
||||
#define IRQF_TIMER 0x00000200
|
||||
#define __IRQF_TIMER 0x00000200
|
||||
#define IRQF_PERCPU 0x00000400
|
||||
#define IRQF_NOBALANCING 0x00000800
|
||||
#define IRQF_IRQPOLL 0x00001000
|
||||
#define IRQF_ONESHOT 0x00002000
|
||||
#define IRQF_NO_SUSPEND 0x00004000
|
||||
|
||||
#define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND)
|
||||
|
||||
/*
|
||||
* Bits used by threaded handlers:
|
||||
|
|
|
@ -79,7 +79,9 @@ io_mapping_free(struct io_mapping *mapping)
|
|||
|
||||
/* Atomic map/unmap */
|
||||
static inline void *
|
||||
io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset)
|
||||
io_mapping_map_atomic_wc(struct io_mapping *mapping,
|
||||
unsigned long offset,
|
||||
int slot)
|
||||
{
|
||||
resource_size_t phys_addr;
|
||||
unsigned long pfn;
|
||||
|
@ -87,13 +89,13 @@ io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset)
|
|||
BUG_ON(offset >= mapping->size);
|
||||
phys_addr = mapping->base + offset;
|
||||
pfn = (unsigned long) (phys_addr >> PAGE_SHIFT);
|
||||
return iomap_atomic_prot_pfn(pfn, KM_USER0, mapping->prot);
|
||||
return iomap_atomic_prot_pfn(pfn, slot, mapping->prot);
|
||||
}
|
||||
|
||||
static inline void
|
||||
io_mapping_unmap_atomic(void *vaddr)
|
||||
io_mapping_unmap_atomic(void *vaddr, int slot)
|
||||
{
|
||||
iounmap_atomic(vaddr, KM_USER0);
|
||||
iounmap_atomic(vaddr, slot);
|
||||
}
|
||||
|
||||
static inline void *
|
||||
|
@ -133,13 +135,15 @@ io_mapping_free(struct io_mapping *mapping)
|
|||
|
||||
/* Atomic map/unmap */
|
||||
static inline void *
|
||||
io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset)
|
||||
io_mapping_map_atomic_wc(struct io_mapping *mapping,
|
||||
unsigned long offset,
|
||||
int slot)
|
||||
{
|
||||
return ((char *) mapping) + offset;
|
||||
}
|
||||
|
||||
static inline void
|
||||
io_mapping_unmap_atomic(void *vaddr)
|
||||
io_mapping_unmap_atomic(void *vaddr, int slot)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -29,10 +29,10 @@ void __iowrite64_copy(void __iomem *to, const void *from, size_t count);
|
|||
|
||||
#ifdef CONFIG_MMU
|
||||
int ioremap_page_range(unsigned long addr, unsigned long end,
|
||||
unsigned long phys_addr, pgprot_t prot);
|
||||
phys_addr_t phys_addr, pgprot_t prot);
|
||||
#else
|
||||
static inline int ioremap_page_range(unsigned long addr, unsigned long end,
|
||||
unsigned long phys_addr, pgprot_t prot)
|
||||
phys_addr_t phys_addr, pgprot_t prot)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ struct iommu_domain {
|
|||
};
|
||||
|
||||
#define IOMMU_CAP_CACHE_COHERENCY 0x1
|
||||
#define IOMMU_CAP_INTR_REMAP 0x2 /* isolates device intrs */
|
||||
|
||||
struct iommu_ops {
|
||||
int (*domain_init)(struct iommu_domain *domain);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
#define IP_VS_SVC_F_PERSISTENT 0x0001 /* persistent port */
|
||||
#define IP_VS_SVC_F_HASHED 0x0002 /* hashed entry */
|
||||
#define IP_VS_SVC_F_ONEPACKET 0x0004 /* one-packet scheduling */
|
||||
|
||||
/*
|
||||
* Destination Server Flags
|
||||
|
@ -85,6 +86,7 @@
|
|||
#define IP_VS_CONN_F_SEQ_MASK 0x0600 /* in/out sequence mask */
|
||||
#define IP_VS_CONN_F_NO_CPORT 0x0800 /* no client port set yet */
|
||||
#define IP_VS_CONN_F_TEMPLATE 0x1000 /* template, not connection */
|
||||
#define IP_VS_CONN_F_ONE_PACKET 0x2000 /* forward only one packet */
|
||||
|
||||
#define IP_VS_SCHEDNAME_MAXLEN 16
|
||||
#define IP_VS_IFNAME_MAXLEN 16
|
||||
|
|
|
@ -58,7 +58,7 @@ struct ipv6_opt_hdr {
|
|||
/*
|
||||
* TLV encoded option data follows.
|
||||
*/
|
||||
} __attribute__ ((packed)); /* required for some archs */
|
||||
} __packed; /* required for some archs */
|
||||
|
||||
#define ipv6_destopt_hdr ipv6_opt_hdr
|
||||
#define ipv6_hopopt_hdr ipv6_opt_hdr
|
||||
|
@ -99,7 +99,7 @@ struct ipv6_destopt_hao {
|
|||
__u8 type;
|
||||
__u8 length;
|
||||
struct in6_addr addr;
|
||||
} __attribute__ ((__packed__));
|
||||
} __packed;
|
||||
|
||||
/*
|
||||
* IPv6 fixed header
|
||||
|
@ -246,7 +246,7 @@ struct inet6_skb_parm {
|
|||
__u16 srcrt;
|
||||
__u16 dst1;
|
||||
__u16 lastopt;
|
||||
__u32 nhoff;
|
||||
__u16 nhoff;
|
||||
__u16 flags;
|
||||
#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
|
||||
__u16 dsthao;
|
||||
|
|
123
include/linux/iscsi_boot_sysfs.h
Normal file
123
include/linux/iscsi_boot_sysfs.h
Normal file
|
@ -0,0 +1,123 @@
|
|||
/*
|
||||
* Export the iSCSI boot info to userland via sysfs.
|
||||
*
|
||||
* Copyright (C) 2010 Red Hat, Inc. All rights reserved.
|
||||
* Copyright (C) 2010 Mike Christie
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License v2.0 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.
|
||||
*/
|
||||
#ifndef _ISCSI_BOOT_SYSFS_
|
||||
#define _ISCSI_BOOT_SYSFS_
|
||||
|
||||
/*
|
||||
* The text attributes names for each of the kobjects.
|
||||
*/
|
||||
enum iscsi_boot_eth_properties_enum {
|
||||
ISCSI_BOOT_ETH_INDEX,
|
||||
ISCSI_BOOT_ETH_FLAGS,
|
||||
ISCSI_BOOT_ETH_IP_ADDR,
|
||||
ISCSI_BOOT_ETH_SUBNET_MASK,
|
||||
ISCSI_BOOT_ETH_ORIGIN,
|
||||
ISCSI_BOOT_ETH_GATEWAY,
|
||||
ISCSI_BOOT_ETH_PRIMARY_DNS,
|
||||
ISCSI_BOOT_ETH_SECONDARY_DNS,
|
||||
ISCSI_BOOT_ETH_DHCP,
|
||||
ISCSI_BOOT_ETH_VLAN,
|
||||
ISCSI_BOOT_ETH_MAC,
|
||||
/* eth_pci_bdf - this is replaced by link to the device itself. */
|
||||
ISCSI_BOOT_ETH_HOSTNAME,
|
||||
ISCSI_BOOT_ETH_END_MARKER,
|
||||
};
|
||||
|
||||
enum iscsi_boot_tgt_properties_enum {
|
||||
ISCSI_BOOT_TGT_INDEX,
|
||||
ISCSI_BOOT_TGT_FLAGS,
|
||||
ISCSI_BOOT_TGT_IP_ADDR,
|
||||
ISCSI_BOOT_TGT_PORT,
|
||||
ISCSI_BOOT_TGT_LUN,
|
||||
ISCSI_BOOT_TGT_CHAP_TYPE,
|
||||
ISCSI_BOOT_TGT_NIC_ASSOC,
|
||||
ISCSI_BOOT_TGT_NAME,
|
||||
ISCSI_BOOT_TGT_CHAP_NAME,
|
||||
ISCSI_BOOT_TGT_CHAP_SECRET,
|
||||
ISCSI_BOOT_TGT_REV_CHAP_NAME,
|
||||
ISCSI_BOOT_TGT_REV_CHAP_SECRET,
|
||||
ISCSI_BOOT_TGT_END_MARKER,
|
||||
};
|
||||
|
||||
enum iscsi_boot_initiator_properties_enum {
|
||||
ISCSI_BOOT_INI_INDEX,
|
||||
ISCSI_BOOT_INI_FLAGS,
|
||||
ISCSI_BOOT_INI_ISNS_SERVER,
|
||||
ISCSI_BOOT_INI_SLP_SERVER,
|
||||
ISCSI_BOOT_INI_PRI_RADIUS_SERVER,
|
||||
ISCSI_BOOT_INI_SEC_RADIUS_SERVER,
|
||||
ISCSI_BOOT_INI_INITIATOR_NAME,
|
||||
ISCSI_BOOT_INI_END_MARKER,
|
||||
};
|
||||
|
||||
struct attribute_group;
|
||||
|
||||
struct iscsi_boot_kobj {
|
||||
struct kobject kobj;
|
||||
struct attribute_group *attr_group;
|
||||
struct list_head list;
|
||||
|
||||
/*
|
||||
* Pointer to store driver specific info. If set this will
|
||||
* be freed for the LLD when the kobj release function is called.
|
||||
*/
|
||||
void *data;
|
||||
/*
|
||||
* Driver specific show function.
|
||||
*
|
||||
* The enum of the type. This can be any value of the above
|
||||
* properties.
|
||||
*/
|
||||
ssize_t (*show) (void *data, int type, char *buf);
|
||||
|
||||
/*
|
||||
* Drivers specific visibility function.
|
||||
* The function should return if they the attr should be readable
|
||||
* writable or should not be shown.
|
||||
*
|
||||
* The enum of the type. This can be any value of the above
|
||||
* properties.
|
||||
*/
|
||||
mode_t (*is_visible) (void *data, int type);
|
||||
};
|
||||
|
||||
struct iscsi_boot_kset {
|
||||
struct list_head kobj_list;
|
||||
struct kset *kset;
|
||||
};
|
||||
|
||||
struct iscsi_boot_kobj *
|
||||
iscsi_boot_create_initiator(struct iscsi_boot_kset *boot_kset, int index,
|
||||
void *data,
|
||||
ssize_t (*show) (void *data, int type, char *buf),
|
||||
mode_t (*is_visible) (void *data, int type));
|
||||
|
||||
struct iscsi_boot_kobj *
|
||||
iscsi_boot_create_ethernet(struct iscsi_boot_kset *boot_kset, int index,
|
||||
void *data,
|
||||
ssize_t (*show) (void *data, int type, char *buf),
|
||||
mode_t (*is_visible) (void *data, int type));
|
||||
struct iscsi_boot_kobj *
|
||||
iscsi_boot_create_target(struct iscsi_boot_kset *boot_kset, int index,
|
||||
void *data,
|
||||
ssize_t (*show) (void *data, int type, char *buf),
|
||||
mode_t (*is_visible) (void *data, int type));
|
||||
|
||||
struct iscsi_boot_kset *iscsi_boot_create_kset(const char *set_name);
|
||||
struct iscsi_boot_kset *iscsi_boot_create_host_kset(unsigned int hostno);
|
||||
void iscsi_boot_destroy_kset(struct iscsi_boot_kset *boot_kset);
|
||||
|
||||
#endif
|
|
@ -21,21 +21,13 @@
|
|||
#ifndef ISCSI_IBFT_H
|
||||
#define ISCSI_IBFT_H
|
||||
|
||||
struct ibft_table_header {
|
||||
char signature[4];
|
||||
u32 length;
|
||||
u8 revision;
|
||||
u8 checksum;
|
||||
char oem_id[6];
|
||||
char oem_table_id[8];
|
||||
char reserved[24];
|
||||
} __attribute__((__packed__));
|
||||
#include <acpi/acpi.h>
|
||||
|
||||
/*
|
||||
* Logical location of iSCSI Boot Format Table.
|
||||
* If the value is NULL there is no iBFT on the machine.
|
||||
*/
|
||||
extern struct ibft_table_header *ibft_addr;
|
||||
extern struct acpi_table_ibft *ibft_addr;
|
||||
|
||||
/*
|
||||
* Routine used to find and reserve the iSCSI Boot Format Table. The
|
||||
|
|
|
@ -317,7 +317,7 @@ typedef struct T30_s {
|
|||
__u8 r_scantime;
|
||||
__u8 r_id[FAXIDLEN];
|
||||
__u8 r_code;
|
||||
} __attribute__((packed)) T30_s;
|
||||
} __packed T30_s;
|
||||
|
||||
#define ISDN_TTY_FAX_CONN_IN 0
|
||||
#define ISDN_TTY_FAX_CONN_OUT 1
|
||||
|
|
|
@ -601,13 +601,13 @@ struct transaction_s
|
|||
* Number of outstanding updates running on this transaction
|
||||
* [t_handle_lock]
|
||||
*/
|
||||
int t_updates;
|
||||
atomic_t t_updates;
|
||||
|
||||
/*
|
||||
* Number of buffers reserved for use by all handles in this transaction
|
||||
* handle but not yet modified. [t_handle_lock]
|
||||
*/
|
||||
int t_outstanding_credits;
|
||||
atomic_t t_outstanding_credits;
|
||||
|
||||
/*
|
||||
* Forward and backward links for the circular list of all transactions
|
||||
|
@ -629,7 +629,7 @@ struct transaction_s
|
|||
/*
|
||||
* How many handles used this transaction? [t_handle_lock]
|
||||
*/
|
||||
int t_handle_count;
|
||||
atomic_t t_handle_count;
|
||||
|
||||
/*
|
||||
* This transaction is being forced and some process is
|
||||
|
@ -764,7 +764,7 @@ struct journal_s
|
|||
/*
|
||||
* Protect the various scalars in the journal
|
||||
*/
|
||||
spinlock_t j_state_lock;
|
||||
rwlock_t j_state_lock;
|
||||
|
||||
/*
|
||||
* Number of processes waiting to create a barrier lock [j_state_lock]
|
||||
|
@ -1026,11 +1026,12 @@ void __jbd2_journal_insert_checkpoint(struct journal_head *, transaction_t *);
|
|||
|
||||
struct jbd2_buffer_trigger_type {
|
||||
/*
|
||||
* Fired just before a buffer is written to the journal.
|
||||
* mapped_data is a mapped buffer that is the frozen data for
|
||||
* commit.
|
||||
* Fired a the moment data to write to the journal are known to be
|
||||
* stable - so either at the moment b_frozen_data is created or just
|
||||
* before a buffer is written to the journal. mapped_data is a mapped
|
||||
* buffer that is the frozen data for commit.
|
||||
*/
|
||||
void (*t_commit)(struct jbd2_buffer_trigger_type *type,
|
||||
void (*t_frozen)(struct jbd2_buffer_trigger_type *type,
|
||||
struct buffer_head *bh, void *mapped_data,
|
||||
size_t size);
|
||||
|
||||
|
@ -1042,7 +1043,7 @@ struct jbd2_buffer_trigger_type {
|
|||
struct buffer_head *bh);
|
||||
};
|
||||
|
||||
extern void jbd2_buffer_commit_trigger(struct journal_head *jh,
|
||||
extern void jbd2_buffer_frozen_trigger(struct journal_head *jh,
|
||||
void *mapped_data,
|
||||
struct jbd2_buffer_trigger_type *triggers);
|
||||
extern void jbd2_buffer_abort_trigger(struct journal_head *jh,
|
||||
|
@ -1081,7 +1082,9 @@ static inline handle_t *journal_current_handle(void)
|
|||
*/
|
||||
|
||||
extern handle_t *jbd2_journal_start(journal_t *, int nblocks);
|
||||
extern int jbd2_journal_restart (handle_t *, int nblocks);
|
||||
extern handle_t *jbd2__journal_start(journal_t *, int nblocks, int gfp_mask);
|
||||
extern int jbd2_journal_restart(handle_t *, int nblocks);
|
||||
extern int jbd2__journal_restart(handle_t *, int nblocks, int gfp_mask);
|
||||
extern int jbd2_journal_extend (handle_t *, int nblocks);
|
||||
extern int jbd2_journal_get_write_access(handle_t *, struct buffer_head *);
|
||||
extern int jbd2_journal_get_create_access (handle_t *, struct buffer_head *);
|
||||
|
@ -1256,8 +1259,8 @@ static inline int jbd_space_needed(journal_t *journal)
|
|||
{
|
||||
int nblocks = journal->j_max_transaction_buffers;
|
||||
if (journal->j_committing_transaction)
|
||||
nblocks += journal->j_committing_transaction->
|
||||
t_outstanding_credits;
|
||||
nblocks += atomic_read(&journal->j_committing_transaction->
|
||||
t_outstanding_credits);
|
||||
return nblocks;
|
||||
}
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ struct jffs2_raw_xref
|
|||
jint32_t hdr_crc;
|
||||
jint32_t ino; /* inode number */
|
||||
jint32_t xid; /* XATTR identifier number */
|
||||
jint32_t xseqno; /* xref sequencial number */
|
||||
jint32_t xseqno; /* xref sequential number */
|
||||
jint32_t node_crc;
|
||||
} __attribute__((packed));
|
||||
|
||||
|
|
|
@ -114,4 +114,8 @@ enum {
|
|||
KDB_INIT_EARLY,
|
||||
KDB_INIT_FULL,
|
||||
};
|
||||
|
||||
extern int kdbgetintenv(const char *, int *);
|
||||
extern int kdb_set(int, const char **);
|
||||
|
||||
#endif /* !_KDB_H */
|
||||
|
|
|
@ -171,6 +171,11 @@ static inline void might_fault(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
struct va_format {
|
||||
const char *fmt;
|
||||
va_list *va;
|
||||
};
|
||||
|
||||
extern struct atomic_notifier_head panic_notifier_list;
|
||||
extern long (*panic_blink)(long time);
|
||||
NORET_TYPE void panic(const char * fmt, ...)
|
||||
|
@ -247,6 +252,13 @@ extern struct pid *session_of_pgrp(struct pid *pgrp);
|
|||
#define FW_WARN "[Firmware Warn]: "
|
||||
#define FW_INFO "[Firmware Info]: "
|
||||
|
||||
/*
|
||||
* HW_ERR
|
||||
* Add this to a message for hardware errors, so that user can report
|
||||
* it to hardware vendor instead of LKML or software vendor.
|
||||
*/
|
||||
#define HW_ERR "[Hardware Error]: "
|
||||
|
||||
#ifdef CONFIG_PRINTK
|
||||
asmlinkage int vprintk(const char *fmt, va_list args)
|
||||
__attribute__ ((format (printf, 1, 0)));
|
||||
|
@ -508,9 +520,6 @@ extern void tracing_start(void);
|
|||
extern void tracing_stop(void);
|
||||
extern void ftrace_off_permanent(void);
|
||||
|
||||
extern void
|
||||
ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3);
|
||||
|
||||
static inline void __attribute__ ((format (printf, 1, 2)))
|
||||
____trace_printk_check_format(const char *fmt, ...)
|
||||
{
|
||||
|
@ -586,8 +595,6 @@ __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap);
|
|||
|
||||
extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode);
|
||||
#else
|
||||
static inline void
|
||||
ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { }
|
||||
static inline int
|
||||
trace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
|
@ -728,12 +735,6 @@ extern int do_sysinfo(struct sysinfo *info);
|
|||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#ifndef __EXPORTED_HEADERS__
|
||||
#ifndef __KERNEL__
|
||||
#warning Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __EXPORTED_HEADERS__ */
|
||||
|
||||
#define SI_LOAD_SHIFT 16
|
||||
struct sysinfo {
|
||||
long uptime; /* Seconds since boot */
|
||||
|
|
|
@ -90,6 +90,19 @@ struct kgdb_bkpt {
|
|||
enum kgdb_bpstate state;
|
||||
};
|
||||
|
||||
struct dbg_reg_def_t {
|
||||
char *name;
|
||||
int size;
|
||||
int offset;
|
||||
};
|
||||
|
||||
#ifndef DBG_MAX_REG_NUM
|
||||
#define DBG_MAX_REG_NUM 0
|
||||
#else
|
||||
extern struct dbg_reg_def_t dbg_reg_def[];
|
||||
extern char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs);
|
||||
extern int dbg_set_reg(int regno, void *mem, struct pt_regs *regs);
|
||||
#endif
|
||||
#ifndef KGDB_MAX_BREAKPOINTS
|
||||
# define KGDB_MAX_BREAKPOINTS 1000
|
||||
#endif
|
||||
|
@ -281,7 +294,7 @@ extern void kgdb_unregister_io_module(struct kgdb_io *local_kgdb_io_ops);
|
|||
extern struct kgdb_io *dbg_io_ops;
|
||||
|
||||
extern int kgdb_hex2long(char **ptr, unsigned long *long_val);
|
||||
extern int kgdb_mem2hex(char *mem, char *buf, int count);
|
||||
extern char *kgdb_mem2hex(char *mem, char *buf, int count);
|
||||
extern int kgdb_hex2mem(char *buf, char *mem, int count);
|
||||
|
||||
extern int kgdb_isremovedbreak(unsigned long addr);
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2008 Eduard - Gabriel Munteanu
|
||||
*
|
||||
* This file is released under GPL version 2.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_KMEMTRACE_H
|
||||
#define _LINUX_KMEMTRACE_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <trace/events/kmem.h>
|
||||
|
||||
#ifdef CONFIG_KMEMTRACE
|
||||
extern void kmemtrace_init(void);
|
||||
#else
|
||||
static inline void kmemtrace_init(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _LINUX_KMEMTRACE_H */
|
||||
|
|
@ -25,10 +25,14 @@
|
|||
* struct ks8842_platform_data - Platform data of the KS8842 network driver
|
||||
* @macaddr: The MAC address of the device, set to all 0:s to use the on in
|
||||
* the chip.
|
||||
* @rx_dma_channel: The DMA channel to use for RX, -1 for none.
|
||||
* @tx_dma_channel: The DMA channel to use for TX, -1 for none.
|
||||
*
|
||||
*/
|
||||
struct ks8842_platform_data {
|
||||
u8 macaddr[ETH_ALEN];
|
||||
int rx_dma_channel;
|
||||
int tx_dma_channel;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -30,8 +30,73 @@ struct task_struct *kthread_create(int (*threadfn)(void *data),
|
|||
void kthread_bind(struct task_struct *k, unsigned int cpu);
|
||||
int kthread_stop(struct task_struct *k);
|
||||
int kthread_should_stop(void);
|
||||
void *kthread_data(struct task_struct *k);
|
||||
|
||||
int kthreadd(void *unused);
|
||||
extern struct task_struct *kthreadd_task;
|
||||
|
||||
/*
|
||||
* Simple work processor based on kthread.
|
||||
*
|
||||
* This provides easier way to make use of kthreads. A kthread_work
|
||||
* can be queued and flushed using queue/flush_kthread_work()
|
||||
* respectively. Queued kthread_works are processed by a kthread
|
||||
* running kthread_worker_fn().
|
||||
*
|
||||
* A kthread_work can't be freed while it is executing.
|
||||
*/
|
||||
struct kthread_work;
|
||||
typedef void (*kthread_work_func_t)(struct kthread_work *work);
|
||||
|
||||
struct kthread_worker {
|
||||
spinlock_t lock;
|
||||
struct list_head work_list;
|
||||
struct task_struct *task;
|
||||
};
|
||||
|
||||
struct kthread_work {
|
||||
struct list_head node;
|
||||
kthread_work_func_t func;
|
||||
wait_queue_head_t done;
|
||||
atomic_t flushing;
|
||||
int queue_seq;
|
||||
int done_seq;
|
||||
};
|
||||
|
||||
#define KTHREAD_WORKER_INIT(worker) { \
|
||||
.lock = SPIN_LOCK_UNLOCKED, \
|
||||
.work_list = LIST_HEAD_INIT((worker).work_list), \
|
||||
}
|
||||
|
||||
#define KTHREAD_WORK_INIT(work, fn) { \
|
||||
.node = LIST_HEAD_INIT((work).node), \
|
||||
.func = (fn), \
|
||||
.done = __WAIT_QUEUE_HEAD_INITIALIZER((work).done), \
|
||||
.flushing = ATOMIC_INIT(0), \
|
||||
}
|
||||
|
||||
#define DEFINE_KTHREAD_WORKER(worker) \
|
||||
struct kthread_worker worker = KTHREAD_WORKER_INIT(worker)
|
||||
|
||||
#define DEFINE_KTHREAD_WORK(work, fn) \
|
||||
struct kthread_work work = KTHREAD_WORK_INIT(work, fn)
|
||||
|
||||
static inline void init_kthread_worker(struct kthread_worker *worker)
|
||||
{
|
||||
*worker = (struct kthread_worker)KTHREAD_WORKER_INIT(*worker);
|
||||
}
|
||||
|
||||
static inline void init_kthread_work(struct kthread_work *work,
|
||||
kthread_work_func_t fn)
|
||||
{
|
||||
*work = (struct kthread_work)KTHREAD_WORK_INIT(*work, fn);
|
||||
}
|
||||
|
||||
int kthread_worker_fn(void *worker_ptr);
|
||||
|
||||
bool queue_kthread_work(struct kthread_worker *worker,
|
||||
struct kthread_work *work);
|
||||
void flush_kthread_work(struct kthread_work *work);
|
||||
void flush_kthread_worker(struct kthread_worker *worker);
|
||||
|
||||
#endif /* _LINUX_KTHREAD_H */
|
||||
|
|
|
@ -524,6 +524,12 @@ struct kvm_enable_cap {
|
|||
#define KVM_CAP_PPC_OSI 52
|
||||
#define KVM_CAP_PPC_UNSET_IRQ 53
|
||||
#define KVM_CAP_ENABLE_CAP 54
|
||||
#ifdef __KVM_HAVE_XSAVE
|
||||
#define KVM_CAP_XSAVE 55
|
||||
#endif
|
||||
#ifdef __KVM_HAVE_XCRS
|
||||
#define KVM_CAP_XCRS 56
|
||||
#endif
|
||||
|
||||
#ifdef KVM_CAP_IRQ_ROUTING
|
||||
|
||||
|
@ -613,6 +619,7 @@ struct kvm_clock_data {
|
|||
*/
|
||||
#define KVM_CREATE_VCPU _IO(KVMIO, 0x41)
|
||||
#define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log)
|
||||
/* KVM_SET_MEMORY_ALIAS is obsolete: */
|
||||
#define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias)
|
||||
#define KVM_SET_NR_MMU_PAGES _IO(KVMIO, 0x44)
|
||||
#define KVM_GET_NR_MMU_PAGES _IO(KVMIO, 0x45)
|
||||
|
@ -714,6 +721,12 @@ struct kvm_clock_data {
|
|||
#define KVM_GET_DEBUGREGS _IOR(KVMIO, 0xa1, struct kvm_debugregs)
|
||||
#define KVM_SET_DEBUGREGS _IOW(KVMIO, 0xa2, struct kvm_debugregs)
|
||||
#define KVM_ENABLE_CAP _IOW(KVMIO, 0xa3, struct kvm_enable_cap)
|
||||
/* Available with KVM_CAP_XSAVE */
|
||||
#define KVM_GET_XSAVE _IOR(KVMIO, 0xa4, struct kvm_xsave)
|
||||
#define KVM_SET_XSAVE _IOW(KVMIO, 0xa5, struct kvm_xsave)
|
||||
/* Available with KVM_CAP_XCRS */
|
||||
#define KVM_GET_XCRS _IOR(KVMIO, 0xa6, struct kvm_xcrs)
|
||||
#define KVM_SET_XCRS _IOW(KVMIO, 0xa7, struct kvm_xcrs)
|
||||
|
||||
#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
|
||||
|
||||
|
|
|
@ -81,13 +81,14 @@ struct kvm_vcpu {
|
|||
int vcpu_id;
|
||||
struct mutex mutex;
|
||||
int cpu;
|
||||
atomic_t guest_mode;
|
||||
struct kvm_run *run;
|
||||
unsigned long requests;
|
||||
unsigned long guest_debug;
|
||||
int srcu_idx;
|
||||
|
||||
int fpu_active;
|
||||
int guest_fpu_loaded;
|
||||
int guest_fpu_loaded, guest_xcr0_loaded;
|
||||
wait_queue_head_t wq;
|
||||
int sigset_active;
|
||||
sigset_t sigset;
|
||||
|
@ -123,6 +124,7 @@ struct kvm_memory_slot {
|
|||
} *lpage_info[KVM_NR_PAGE_SIZES - 1];
|
||||
unsigned long userspace_addr;
|
||||
int user_alloc;
|
||||
int id;
|
||||
};
|
||||
|
||||
static inline unsigned long kvm_dirty_bitmap_bytes(struct kvm_memory_slot *memslot)
|
||||
|
@ -266,6 +268,8 @@ extern pfn_t bad_pfn;
|
|||
|
||||
int is_error_page(struct page *page);
|
||||
int is_error_pfn(pfn_t pfn);
|
||||
int is_hwpoison_pfn(pfn_t pfn);
|
||||
int is_fault_pfn(pfn_t pfn);
|
||||
int kvm_is_error_hva(unsigned long addr);
|
||||
int kvm_set_memory_region(struct kvm *kvm,
|
||||
struct kvm_userspace_memory_region *mem,
|
||||
|
@ -284,8 +288,6 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
|
|||
int user_alloc);
|
||||
void kvm_disable_largepages(void);
|
||||
void kvm_arch_flush_shadow(struct kvm *kvm);
|
||||
gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn);
|
||||
gfn_t unalias_gfn_instantiation(struct kvm *kvm, gfn_t gfn);
|
||||
|
||||
struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn);
|
||||
unsigned long gfn_to_hva(struct kvm *kvm, gfn_t gfn);
|
||||
|
@ -445,7 +447,8 @@ void kvm_register_irq_mask_notifier(struct kvm *kvm, int irq,
|
|||
struct kvm_irq_mask_notifier *kimn);
|
||||
void kvm_unregister_irq_mask_notifier(struct kvm *kvm, int irq,
|
||||
struct kvm_irq_mask_notifier *kimn);
|
||||
void kvm_fire_mask_notifiers(struct kvm *kvm, int irq, bool mask);
|
||||
void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned irqchip, unsigned pin,
|
||||
bool mask);
|
||||
|
||||
#ifdef __KVM_HAVE_IOAPIC
|
||||
void kvm_get_intr_delivery_bitmask(struct kvm_ioapic *ioapic,
|
||||
|
@ -562,10 +565,6 @@ static inline int mmu_notifier_retry(struct kvm_vcpu *vcpu, unsigned long mmu_se
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef KVM_ARCH_HAS_UNALIAS_INSTANTIATION
|
||||
#define unalias_gfn_instantiation unalias_gfn
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HAVE_KVM_IRQCHIP
|
||||
|
||||
#define KVM_MAX_IRQ_ROUTES 1024
|
||||
|
@ -628,5 +627,25 @@ static inline long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
|
|||
|
||||
#endif
|
||||
|
||||
static inline void kvm_make_request(int req, struct kvm_vcpu *vcpu)
|
||||
{
|
||||
set_bit(req, &vcpu->requests);
|
||||
}
|
||||
|
||||
static inline bool kvm_make_check_request(int req, struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return test_and_set_bit(req, &vcpu->requests);
|
||||
}
|
||||
|
||||
static inline bool kvm_check_request(int req, struct kvm_vcpu *vcpu)
|
||||
{
|
||||
if (test_bit(req, &vcpu->requests)) {
|
||||
clear_bit(req, &vcpu->requests);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -32,11 +32,11 @@
|
|||
|
||||
typedef unsigned long gva_t;
|
||||
typedef u64 gpa_t;
|
||||
typedef unsigned long gfn_t;
|
||||
typedef u64 gfn_t;
|
||||
|
||||
typedef unsigned long hva_t;
|
||||
typedef u64 hpa_t;
|
||||
typedef unsigned long hfn_t;
|
||||
typedef u64 hfn_t;
|
||||
|
||||
typedef hfn_t pfn_t;
|
||||
|
||||
|
|
|
@ -751,6 +751,7 @@ struct ata_port {
|
|||
struct ata_host *host;
|
||||
struct device *dev;
|
||||
|
||||
struct mutex scsi_scan_mutex;
|
||||
struct delayed_work hotplug_task;
|
||||
struct work_struct scsi_rescan_task;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef _LINUX_LIST_H
|
||||
#define _LINUX_LIST_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/poison.h>
|
||||
#include <linux/prefetch.h>
|
||||
|
@ -16,10 +17,6 @@
|
|||
* using the generic single-entry routines.
|
||||
*/
|
||||
|
||||
struct list_head {
|
||||
struct list_head *next, *prev;
|
||||
};
|
||||
|
||||
#define LIST_HEAD_INIT(name) { &(name), &(name) }
|
||||
|
||||
#define LIST_HEAD(name) \
|
||||
|
@ -566,14 +563,6 @@ static inline void list_splice_tail_init(struct list_head *list,
|
|||
* You lose the ability to access the tail in O(1).
|
||||
*/
|
||||
|
||||
struct hlist_head {
|
||||
struct hlist_node *first;
|
||||
};
|
||||
|
||||
struct hlist_node {
|
||||
struct hlist_node *next, **pprev;
|
||||
};
|
||||
|
||||
#define HLIST_HEAD_INIT { .first = NULL }
|
||||
#define HLIST_HEAD(name) struct hlist_head name = { .first = NULL }
|
||||
#define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL)
|
||||
|
|
|
@ -1,89 +0,0 @@
|
|||
#ifndef _LINUX_LMB_H
|
||||
#define _LINUX_LMB_H
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/*
|
||||
* Logical memory blocks.
|
||||
*
|
||||
* Copyright (C) 2001 Peter Bergner, IBM Corp.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/mm.h>
|
||||
|
||||
#define MAX_LMB_REGIONS 128
|
||||
|
||||
struct lmb_property {
|
||||
u64 base;
|
||||
u64 size;
|
||||
};
|
||||
|
||||
struct lmb_region {
|
||||
unsigned long cnt;
|
||||
u64 size;
|
||||
struct lmb_property region[MAX_LMB_REGIONS+1];
|
||||
};
|
||||
|
||||
struct lmb {
|
||||
unsigned long debug;
|
||||
u64 rmo_size;
|
||||
struct lmb_region memory;
|
||||
struct lmb_region reserved;
|
||||
};
|
||||
|
||||
extern struct lmb lmb;
|
||||
|
||||
extern void __init lmb_init(void);
|
||||
extern void __init lmb_analyze(void);
|
||||
extern long lmb_add(u64 base, u64 size);
|
||||
extern long lmb_remove(u64 base, u64 size);
|
||||
extern long __init lmb_free(u64 base, u64 size);
|
||||
extern long __init lmb_reserve(u64 base, u64 size);
|
||||
extern u64 __init lmb_alloc_nid(u64 size, u64 align, int nid,
|
||||
u64 (*nid_range)(u64, u64, int *));
|
||||
extern u64 __init lmb_alloc(u64 size, u64 align);
|
||||
extern u64 __init lmb_alloc_base(u64 size,
|
||||
u64, u64 max_addr);
|
||||
extern u64 __init __lmb_alloc_base(u64 size,
|
||||
u64 align, u64 max_addr);
|
||||
extern u64 __init lmb_phys_mem_size(void);
|
||||
extern u64 lmb_end_of_DRAM(void);
|
||||
extern void __init lmb_enforce_memory_limit(u64 memory_limit);
|
||||
extern int __init lmb_is_reserved(u64 addr);
|
||||
extern int lmb_is_region_reserved(u64 base, u64 size);
|
||||
extern int lmb_find(struct lmb_property *res);
|
||||
|
||||
extern void lmb_dump_all(void);
|
||||
|
||||
static inline u64
|
||||
lmb_size_bytes(struct lmb_region *type, unsigned long region_nr)
|
||||
{
|
||||
return type->region[region_nr].size;
|
||||
}
|
||||
static inline u64
|
||||
lmb_size_pages(struct lmb_region *type, unsigned long region_nr)
|
||||
{
|
||||
return lmb_size_bytes(type, region_nr) >> PAGE_SHIFT;
|
||||
}
|
||||
static inline u64
|
||||
lmb_start_pfn(struct lmb_region *type, unsigned long region_nr)
|
||||
{
|
||||
return type->region[region_nr].base >> PAGE_SHIFT;
|
||||
}
|
||||
static inline u64
|
||||
lmb_end_pfn(struct lmb_region *type, unsigned long region_nr)
|
||||
{
|
||||
return lmb_start_pfn(type, region_nr) +
|
||||
lmb_size_pages(type, region_nr);
|
||||
}
|
||||
|
||||
#include <asm/lmb.h>
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _LINUX_LMB_H */
|
|
@ -262,7 +262,7 @@ extern void lc_seq_dump_details(struct seq_file *seq, struct lru_cache *lc, char
|
|||
* @lc: the lru cache to operate on
|
||||
*
|
||||
* Note that the reference counts and order on the active and lru lists may
|
||||
* still change. Returns true if we aquired the lock.
|
||||
* still change. Returns true if we acquired the lock.
|
||||
*/
|
||||
static inline int lc_try_lock(struct lru_cache *lc)
|
||||
{
|
||||
|
|
|
@ -90,9 +90,41 @@ struct common_audit_data {
|
|||
u32 requested;
|
||||
u32 audited;
|
||||
u32 denied;
|
||||
/*
|
||||
* auditdeny is a bit tricky and unintuitive. See the
|
||||
* comments in avc.c for it's meaning and usage.
|
||||
*/
|
||||
u32 auditdeny;
|
||||
struct av_decision *avd;
|
||||
int result;
|
||||
} selinux_audit_data;
|
||||
#endif
|
||||
#ifdef CONFIG_SECURITY_APPARMOR
|
||||
struct {
|
||||
int error;
|
||||
int op;
|
||||
int type;
|
||||
void *profile;
|
||||
const char *name;
|
||||
const char *info;
|
||||
union {
|
||||
void *target;
|
||||
struct {
|
||||
long pos;
|
||||
void *target;
|
||||
} iface;
|
||||
struct {
|
||||
int rlim;
|
||||
unsigned long max;
|
||||
} rlim;
|
||||
struct {
|
||||
const char *target;
|
||||
u32 request;
|
||||
u32 denied;
|
||||
uid_t ouid;
|
||||
} fs;
|
||||
};
|
||||
} apparmor_audit_data;
|
||||
#endif
|
||||
};
|
||||
/* these callback will be implemented by a specific LSM */
|
||||
|
|
|
@ -251,7 +251,7 @@
|
|||
struct mISDNhead {
|
||||
unsigned int prim;
|
||||
unsigned int id;
|
||||
} __attribute__((packed));
|
||||
} __packed;
|
||||
|
||||
#define MISDN_HEADER_LEN sizeof(struct mISDNhead)
|
||||
#define MAX_DATA_SIZE 2048
|
||||
|
|
21
include/linux/marvell_phy.h
Normal file
21
include/linux/marvell_phy.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef _MARVELL_PHY_H
|
||||
#define _MARVELL_PHY_H
|
||||
|
||||
/* Mask used for ID comparisons */
|
||||
#define MARVELL_PHY_ID_MASK 0xfffffff0
|
||||
|
||||
/* Known PHY IDs */
|
||||
#define MARVELL_PHY_ID_88E1101 0x01410c60
|
||||
#define MARVELL_PHY_ID_88E1112 0x01410c90
|
||||
#define MARVELL_PHY_ID_88E1111 0x01410cc0
|
||||
#define MARVELL_PHY_ID_88E1118 0x01410e10
|
||||
#define MARVELL_PHY_ID_88E1121R 0x01410cb0
|
||||
#define MARVELL_PHY_ID_88E1145 0x01410cd0
|
||||
#define MARVELL_PHY_ID_88E1240 0x01410e30
|
||||
#define MARVELL_PHY_ID_88EC048 0x01410e90
|
||||
|
||||
/* struct phy_device dev_flags definitions */
|
||||
#define MARVELL_PHY_M1145_FLAGS_RESISTANCE 0x00000001
|
||||
#define MARVELL_PHY_M1118_DNS323_LEDS 0x00000002
|
||||
|
||||
#endif /* _MARVELL_PHY_H */
|
89
include/linux/memblock.h
Normal file
89
include/linux/memblock.h
Normal file
|
@ -0,0 +1,89 @@
|
|||
#ifndef _LINUX_MEMBLOCK_H
|
||||
#define _LINUX_MEMBLOCK_H
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/*
|
||||
* Logical memory blocks.
|
||||
*
|
||||
* Copyright (C) 2001 Peter Bergner, IBM Corp.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/mm.h>
|
||||
|
||||
#define MAX_MEMBLOCK_REGIONS 128
|
||||
|
||||
struct memblock_property {
|
||||
u64 base;
|
||||
u64 size;
|
||||
};
|
||||
|
||||
struct memblock_region {
|
||||
unsigned long cnt;
|
||||
u64 size;
|
||||
struct memblock_property region[MAX_MEMBLOCK_REGIONS+1];
|
||||
};
|
||||
|
||||
struct memblock {
|
||||
unsigned long debug;
|
||||
u64 rmo_size;
|
||||
struct memblock_region memory;
|
||||
struct memblock_region reserved;
|
||||
};
|
||||
|
||||
extern struct memblock memblock;
|
||||
|
||||
extern void __init memblock_init(void);
|
||||
extern void __init memblock_analyze(void);
|
||||
extern long memblock_add(u64 base, u64 size);
|
||||
extern long memblock_remove(u64 base, u64 size);
|
||||
extern long __init memblock_free(u64 base, u64 size);
|
||||
extern long __init memblock_reserve(u64 base, u64 size);
|
||||
extern u64 __init memblock_alloc_nid(u64 size, u64 align, int nid,
|
||||
u64 (*nid_range)(u64, u64, int *));
|
||||
extern u64 __init memblock_alloc(u64 size, u64 align);
|
||||
extern u64 __init memblock_alloc_base(u64 size,
|
||||
u64, u64 max_addr);
|
||||
extern u64 __init __memblock_alloc_base(u64 size,
|
||||
u64 align, u64 max_addr);
|
||||
extern u64 __init memblock_phys_mem_size(void);
|
||||
extern u64 memblock_end_of_DRAM(void);
|
||||
extern void __init memblock_enforce_memory_limit(u64 memory_limit);
|
||||
extern int __init memblock_is_reserved(u64 addr);
|
||||
extern int memblock_is_region_reserved(u64 base, u64 size);
|
||||
extern int memblock_find(struct memblock_property *res);
|
||||
|
||||
extern void memblock_dump_all(void);
|
||||
|
||||
static inline u64
|
||||
memblock_size_bytes(struct memblock_region *type, unsigned long region_nr)
|
||||
{
|
||||
return type->region[region_nr].size;
|
||||
}
|
||||
static inline u64
|
||||
memblock_size_pages(struct memblock_region *type, unsigned long region_nr)
|
||||
{
|
||||
return memblock_size_bytes(type, region_nr) >> PAGE_SHIFT;
|
||||
}
|
||||
static inline u64
|
||||
memblock_start_pfn(struct memblock_region *type, unsigned long region_nr)
|
||||
{
|
||||
return type->region[region_nr].base >> PAGE_SHIFT;
|
||||
}
|
||||
static inline u64
|
||||
memblock_end_pfn(struct memblock_region *type, unsigned long region_nr)
|
||||
{
|
||||
return memblock_start_pfn(type, region_nr) +
|
||||
memblock_size_pages(type, region_nr);
|
||||
}
|
||||
|
||||
#include <asm/memblock.h>
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _LINUX_MEMBLOCK_H */
|
|
@ -999,7 +999,7 @@ static inline void sync_mm_rss(struct task_struct *task, struct mm_struct *mm)
|
|||
* querying the cache size, so a fastpath for that case is appropriate.
|
||||
*/
|
||||
struct shrinker {
|
||||
int (*shrink)(int nr_to_scan, gfp_t gfp_mask);
|
||||
int (*shrink)(struct shrinker *, int nr_to_scan, gfp_t gfp_mask);
|
||||
int seeks; /* seeks to recreate an obj */
|
||||
|
||||
/* These are for internal use */
|
||||
|
@ -1465,6 +1465,14 @@ extern int sysctl_memory_failure_recovery;
|
|||
extern void shake_page(struct page *p, int access);
|
||||
extern atomic_long_t mce_bad_pages;
|
||||
extern int soft_offline_page(struct page *page, int flags);
|
||||
#ifdef CONFIG_MEMORY_FAILURE
|
||||
int is_hwpoison_address(unsigned long addr);
|
||||
#else
|
||||
static inline int is_hwpoison_address(unsigned long addr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
extern void dump_page(struct page *page);
|
||||
|
||||
|
|
|
@ -14,8 +14,10 @@ struct irq_desc;
|
|||
extern void mask_msi_irq(unsigned int irq);
|
||||
extern void unmask_msi_irq(unsigned int irq);
|
||||
extern void read_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg);
|
||||
extern void get_cached_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg);
|
||||
extern void write_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg);
|
||||
extern void read_msi_msg(unsigned int irq, struct msi_msg *msg);
|
||||
extern void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg);
|
||||
extern void write_msi_msg(unsigned int irq, struct msi_msg *msg);
|
||||
|
||||
struct msi_desc {
|
||||
|
|
|
@ -19,6 +19,11 @@ struct mv643xx_eth_shared_platform_data {
|
|||
struct mbus_dram_target_info *dram;
|
||||
struct platform_device *shared_smi;
|
||||
unsigned int t_clk;
|
||||
/*
|
||||
* Max packet size for Tx IP/Layer 4 checksum, when set to 0, default
|
||||
* limit of 9KiB will be used.
|
||||
*/
|
||||
int tx_csum_limit;
|
||||
};
|
||||
|
||||
#define MV643XX_ETH_PHY_ADDR_DEFAULT 0
|
||||
|
|
|
@ -88,7 +88,7 @@ struct nbd_request {
|
|||
char handle[8];
|
||||
__be64 from;
|
||||
__be32 len;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
/*
|
||||
* This is the reply packet that nbd-server sends back to the client after
|
||||
|
|
|
@ -27,7 +27,7 @@ struct ncp_request_header {
|
|||
__u8 conn_high;
|
||||
__u8 function;
|
||||
__u8 data[0];
|
||||
} __attribute__((packed));
|
||||
} __packed;
|
||||
|
||||
#define NCP_REPLY (0x3333)
|
||||
#define NCP_WATCHDOG (0x3E3E)
|
||||
|
@ -42,7 +42,7 @@ struct ncp_reply_header {
|
|||
__u8 completion_code;
|
||||
__u8 connection_state;
|
||||
__u8 data[0];
|
||||
} __attribute__((packed));
|
||||
} __packed;
|
||||
|
||||
#define NCP_VOLNAME_LEN (16)
|
||||
#define NCP_NUMBER_OF_VOLUMES (256)
|
||||
|
@ -158,7 +158,7 @@ struct nw_info_struct {
|
|||
#ifdef __KERNEL__
|
||||
struct nw_nfs_info nfs;
|
||||
#endif
|
||||
} __attribute__((packed));
|
||||
} __packed;
|
||||
|
||||
/* modify mask - use with MODIFY_DOS_INFO structure */
|
||||
#define DM_ATTRIBUTES (cpu_to_le32(0x02))
|
||||
|
@ -190,12 +190,12 @@ struct nw_modify_dos_info {
|
|||
__u16 inheritanceGrantMask;
|
||||
__u16 inheritanceRevokeMask;
|
||||
__u32 maximumSpace;
|
||||
} __attribute__((packed));
|
||||
} __packed;
|
||||
|
||||
struct nw_search_sequence {
|
||||
__u8 volNumber;
|
||||
__u32 dirBase;
|
||||
__u32 sequence;
|
||||
} __attribute__((packed));
|
||||
} __packed;
|
||||
|
||||
#endif /* _LINUX_NCP_H */
|
||||
|
|
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