mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 13:59:45 -04:00
Merge remote branch 'origin' into secretlab/next-devicetree
Merging in current state of Linus' tree to deal with merge conflicts and build failures in vio.c after merge. Conflicts: drivers/i2c/busses/i2c-cpm.c drivers/i2c/busses/i2c-mpc.c drivers/net/gianfar.c Also fixed up one line in arch/powerpc/kernel/vio.c to use the correct node pointer. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
@@ -87,7 +87,7 @@
|
||||
#define AE_NO_GLOBAL_LOCK (acpi_status) (0x0017 | AE_CODE_ENVIRONMENTAL)
|
||||
#define AE_ABORT_METHOD (acpi_status) (0x0018 | AE_CODE_ENVIRONMENTAL)
|
||||
#define AE_SAME_HANDLER (acpi_status) (0x0019 | AE_CODE_ENVIRONMENTAL)
|
||||
#define AE_WAKE_ONLY_GPE (acpi_status) (0x001A | AE_CODE_ENVIRONMENTAL)
|
||||
#define AE_NO_HANDLER (acpi_status) (0x001A | AE_CODE_ENVIRONMENTAL)
|
||||
#define AE_OWNER_ID_LIMIT (acpi_status) (0x001B | AE_CODE_ENVIRONMENTAL)
|
||||
|
||||
#define AE_CODE_ENV_MAX 0x001B
|
||||
|
||||
@@ -206,6 +206,7 @@
|
||||
#define ACPI_WARNING(plist) acpi_warning plist
|
||||
#define ACPI_EXCEPTION(plist) acpi_exception plist
|
||||
#define ACPI_ERROR(plist) acpi_error plist
|
||||
#define ACPI_DEBUG_OBJECT(obj,l,i) acpi_ex_do_debug_object(obj,l,i)
|
||||
|
||||
#else
|
||||
|
||||
@@ -215,6 +216,7 @@
|
||||
#define ACPI_WARNING(plist)
|
||||
#define ACPI_EXCEPTION(plist)
|
||||
#define ACPI_ERROR(plist)
|
||||
#define ACPI_DEBUG_OBJECT(obj,l,i)
|
||||
|
||||
#endif /* ACPI_NO_ERROR_MESSAGES */
|
||||
|
||||
|
||||
@@ -233,8 +233,8 @@ acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id,
|
||||
* Interim function needed for PCI IRQ routing
|
||||
*/
|
||||
void
|
||||
acpi_os_derive_pci_id(acpi_handle rhandle,
|
||||
acpi_handle chandle, struct acpi_pci_id **pci_id);
|
||||
acpi_os_derive_pci_id(acpi_handle device,
|
||||
acpi_handle region, struct acpi_pci_id **pci_id);
|
||||
|
||||
/*
|
||||
* Miscellaneous
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20100121
|
||||
#define ACPI_CA_VERSION 0x20100428
|
||||
|
||||
#include "actypes.h"
|
||||
#include "actbl.h"
|
||||
@@ -67,6 +67,8 @@ extern u8 acpi_gbl_leave_wake_gpes_disabled;
|
||||
extern u8 acpi_gbl_use_default_register_widths;
|
||||
extern acpi_name acpi_gbl_trace_method_name;
|
||||
extern u32 acpi_gbl_trace_flags;
|
||||
extern u8 acpi_gbl_enable_aml_debug_object;
|
||||
extern u8 acpi_gbl_copy_dsdt_locally;
|
||||
|
||||
extern u32 acpi_current_gpe_count;
|
||||
extern struct acpi_table_fadt acpi_gbl_FADT;
|
||||
@@ -164,7 +166,7 @@ acpi_get_devices(const char *HID,
|
||||
void *context, void **return_value);
|
||||
|
||||
acpi_status
|
||||
acpi_get_name(acpi_handle handle,
|
||||
acpi_get_name(acpi_handle object,
|
||||
u32 name_type, struct acpi_buffer *ret_path_ptr);
|
||||
|
||||
acpi_status
|
||||
@@ -172,14 +174,12 @@ acpi_get_handle(acpi_handle parent,
|
||||
acpi_string pathname, acpi_handle * ret_handle);
|
||||
|
||||
acpi_status
|
||||
acpi_attach_data(acpi_handle obj_handle,
|
||||
acpi_object_handler handler, void *data);
|
||||
acpi_attach_data(acpi_handle object, acpi_object_handler handler, void *data);
|
||||
|
||||
acpi_status acpi_detach_data(acpi_handle object, acpi_object_handler handler);
|
||||
|
||||
acpi_status
|
||||
acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler);
|
||||
|
||||
acpi_status
|
||||
acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data);
|
||||
acpi_get_data(acpi_handle object, acpi_object_handler handler, void **data);
|
||||
|
||||
acpi_status
|
||||
acpi_debug_trace(char *name, u32 debug_level, u32 debug_layer, u32 flags);
|
||||
@@ -201,7 +201,7 @@ acpi_evaluate_object_typed(acpi_handle object,
|
||||
acpi_object_type return_type);
|
||||
|
||||
acpi_status
|
||||
acpi_get_object_info(acpi_handle handle,
|
||||
acpi_get_object_info(acpi_handle object,
|
||||
struct acpi_device_info **return_buffer);
|
||||
|
||||
acpi_status acpi_install_method(u8 *buffer);
|
||||
@@ -283,16 +283,17 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status);
|
||||
*/
|
||||
acpi_status acpi_set_gpe(acpi_handle gpe_device, u32 gpe_number, u8 action);
|
||||
|
||||
acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u8 type);
|
||||
acpi_status
|
||||
acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u8 gpe_type);
|
||||
|
||||
acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u8 type);
|
||||
acpi_status
|
||||
acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u8 gpe_type);
|
||||
|
||||
acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags);
|
||||
acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number);
|
||||
|
||||
acpi_status
|
||||
acpi_get_gpe_status(acpi_handle gpe_device,
|
||||
u32 gpe_number,
|
||||
u32 flags, acpi_event_status * event_status);
|
||||
u32 gpe_number, acpi_event_status *event_status);
|
||||
|
||||
acpi_status acpi_disable_all_gpes(void);
|
||||
|
||||
@@ -315,33 +316,29 @@ acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * resource,
|
||||
void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_get_vendor_resource(acpi_handle device_handle,
|
||||
acpi_get_vendor_resource(acpi_handle device,
|
||||
char *name,
|
||||
struct acpi_vendor_uuid *uuid,
|
||||
struct acpi_buffer *ret_buffer);
|
||||
|
||||
acpi_status
|
||||
acpi_get_current_resources(acpi_handle device_handle,
|
||||
struct acpi_buffer *ret_buffer);
|
||||
acpi_get_current_resources(acpi_handle device, struct acpi_buffer *ret_buffer);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_status
|
||||
acpi_get_possible_resources(acpi_handle device_handle,
|
||||
struct acpi_buffer *ret_buffer);
|
||||
acpi_get_possible_resources(acpi_handle device, struct acpi_buffer *ret_buffer);
|
||||
#endif
|
||||
|
||||
acpi_status
|
||||
acpi_walk_resources(acpi_handle device_handle,
|
||||
acpi_walk_resources(acpi_handle device,
|
||||
char *name,
|
||||
acpi_walk_resource_callback user_function, void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_set_current_resources(acpi_handle device_handle,
|
||||
struct acpi_buffer *in_buffer);
|
||||
acpi_set_current_resources(acpi_handle device, struct acpi_buffer *in_buffer);
|
||||
|
||||
acpi_status
|
||||
acpi_get_irq_routing_table(acpi_handle bus_device_handle,
|
||||
struct acpi_buffer *ret_buffer);
|
||||
acpi_get_irq_routing_table(acpi_handle device, struct acpi_buffer *ret_buffer);
|
||||
|
||||
acpi_status
|
||||
acpi_resource_to_address64(struct acpi_resource *resource,
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
#define ACPI_SIG_IBFT "IBFT" /* i_sCSI Boot Firmware Table */
|
||||
#define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
|
||||
#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
|
||||
#define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
|
||||
#define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
|
||||
#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
|
||||
#define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
|
||||
@@ -677,6 +678,32 @@ struct acpi_mcfg_allocation {
|
||||
u32 reserved;
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* MCHI - Management Controller Host Interface Table
|
||||
* Version 1
|
||||
*
|
||||
* Conforms to "Management Component Transport Protocol (MCTP) Host
|
||||
* Interface Specification", Revision 1.0.0a, October 13, 2009
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
struct acpi_table_mchi {
|
||||
struct acpi_table_header header; /* Common ACPI table header */
|
||||
u8 interface_type;
|
||||
u8 protocol;
|
||||
u64 protocol_data;
|
||||
u8 interrupt_type;
|
||||
u8 gpe;
|
||||
u8 pci_device_flag;
|
||||
u32 global_interrupt;
|
||||
struct acpi_generic_address control_register;
|
||||
u8 pci_segment;
|
||||
u8 pci_bus;
|
||||
u8 pci_device;
|
||||
u8 pci_function;
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* SPCR - Serial Port Console Redirection table
|
||||
|
||||
@@ -663,44 +663,42 @@ typedef u32 acpi_event_status;
|
||||
#define ACPI_GPE_MAX 0xFF
|
||||
#define ACPI_NUM_GPE 256
|
||||
|
||||
/* Actions for acpi_set_gpe */
|
||||
|
||||
#define ACPI_GPE_ENABLE 0
|
||||
#define ACPI_GPE_DISABLE 1
|
||||
|
||||
/* gpe_types for acpi_enable_gpe and acpi_disable_gpe */
|
||||
|
||||
#define ACPI_GPE_TYPE_WAKE (u8) 0x01
|
||||
#define ACPI_GPE_TYPE_RUNTIME (u8) 0x02
|
||||
#define ACPI_GPE_TYPE_WAKE_RUN (u8) 0x03
|
||||
|
||||
/*
|
||||
* GPE info flags - Per GPE
|
||||
* +-+-+-+---+-+-+-+
|
||||
* |7|6|5|4:3|2|1|0|
|
||||
* +-+-+-+---+-+-+-+
|
||||
* | | | | | | |
|
||||
* | | | | | | +--- Interrupt type: Edge or Level Triggered
|
||||
* | | | | | +--- GPE can wake the system
|
||||
* | | | | +--- Unused
|
||||
* | | | +--- Type of dispatch -- to method, handler, or none
|
||||
* | | +--- Unused
|
||||
* | +--- Unused
|
||||
* +--- Unused
|
||||
* +-------+---+-+-+
|
||||
* | 7:4 |3:2|1|0|
|
||||
* +-------+---+-+-+
|
||||
* | | | |
|
||||
* | | | +--- Interrupt type: edge or level triggered
|
||||
* | | +----- GPE can wake the system
|
||||
* | +-------- Type of dispatch:to method, handler, or none
|
||||
* +-------------- <Reserved>
|
||||
*/
|
||||
#define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x01
|
||||
#define ACPI_GPE_LEVEL_TRIGGERED (u8) 0x01
|
||||
#define ACPI_GPE_EDGE_TRIGGERED (u8) 0x00
|
||||
|
||||
#define ACPI_GPE_TYPE_MASK (u8) 0x06
|
||||
#define ACPI_GPE_TYPE_WAKE_RUN (u8) 0x06
|
||||
#define ACPI_GPE_TYPE_WAKE (u8) 0x02
|
||||
#define ACPI_GPE_TYPE_RUNTIME (u8) 0x04 /* Default */
|
||||
#define ACPI_GPE_CAN_WAKE (u8) 0x02
|
||||
|
||||
#define ACPI_GPE_DISPATCH_MASK (u8) 0x18
|
||||
#define ACPI_GPE_DISPATCH_HANDLER (u8) 0x08
|
||||
#define ACPI_GPE_DISPATCH_METHOD (u8) 0x10
|
||||
#define ACPI_GPE_DISPATCH_NOT_USED (u8) 0x00 /* Default */
|
||||
#define ACPI_GPE_DISPATCH_MASK (u8) 0x0C
|
||||
#define ACPI_GPE_DISPATCH_HANDLER (u8) 0x04
|
||||
#define ACPI_GPE_DISPATCH_METHOD (u8) 0x08
|
||||
#define ACPI_GPE_DISPATCH_NOT_USED (u8) 0x00
|
||||
|
||||
/*
|
||||
* Flags for GPE and Lock interfaces
|
||||
*/
|
||||
#define ACPI_EVENT_WAKE_ENABLE 0x2 /* acpi_gpe_enable */
|
||||
#define ACPI_EVENT_WAKE_DISABLE 0x2 /* acpi_gpe_disable */
|
||||
|
||||
#define ACPI_NOT_ISR 0x1
|
||||
#define ACPI_ISR 0x0
|
||||
|
||||
@@ -953,7 +951,7 @@ acpi_status(*acpi_adr_space_setup) (acpi_handle region_handle,
|
||||
#define ACPI_REGION_DEACTIVATE 1
|
||||
|
||||
typedef
|
||||
acpi_status(*acpi_walk_callback) (acpi_handle obj_handle,
|
||||
acpi_status(*acpi_walk_callback) (acpi_handle object,
|
||||
u32 nesting_level,
|
||||
void *context, void **return_value);
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
* Atomically reads the value of @v. Note that the guaranteed
|
||||
* useful range of an atomic_t is only 24 bits.
|
||||
*/
|
||||
#define atomic_read(v) ((v)->counter)
|
||||
#define atomic_read(v) (*(volatile int *)&(v)->counter)
|
||||
|
||||
/**
|
||||
* atomic_set - set atomic variable
|
||||
|
||||
25
include/asm-generic/bitops/arch_hweight.h
Normal file
25
include/asm-generic/bitops/arch_hweight.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
|
||||
#define _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
|
||||
|
||||
#include <asm/types.h>
|
||||
|
||||
static inline unsigned int __arch_hweight32(unsigned int w)
|
||||
{
|
||||
return __sw_hweight32(w);
|
||||
}
|
||||
|
||||
static inline unsigned int __arch_hweight16(unsigned int w)
|
||||
{
|
||||
return __sw_hweight16(w);
|
||||
}
|
||||
|
||||
static inline unsigned int __arch_hweight8(unsigned int w)
|
||||
{
|
||||
return __sw_hweight8(w);
|
||||
}
|
||||
|
||||
static inline unsigned long __arch_hweight64(__u64 w)
|
||||
{
|
||||
return __sw_hweight64(w);
|
||||
}
|
||||
#endif /* _ASM_GENERIC_BITOPS_HWEIGHT_H_ */
|
||||
42
include/asm-generic/bitops/const_hweight.h
Normal file
42
include/asm-generic/bitops/const_hweight.h
Normal file
@@ -0,0 +1,42 @@
|
||||
#ifndef _ASM_GENERIC_BITOPS_CONST_HWEIGHT_H_
|
||||
#define _ASM_GENERIC_BITOPS_CONST_HWEIGHT_H_
|
||||
|
||||
/*
|
||||
* Compile time versions of __arch_hweightN()
|
||||
*/
|
||||
#define __const_hweight8(w) \
|
||||
( (!!((w) & (1ULL << 0))) + \
|
||||
(!!((w) & (1ULL << 1))) + \
|
||||
(!!((w) & (1ULL << 2))) + \
|
||||
(!!((w) & (1ULL << 3))) + \
|
||||
(!!((w) & (1ULL << 4))) + \
|
||||
(!!((w) & (1ULL << 5))) + \
|
||||
(!!((w) & (1ULL << 6))) + \
|
||||
(!!((w) & (1ULL << 7))) )
|
||||
|
||||
#define __const_hweight16(w) (__const_hweight8(w) + __const_hweight8((w) >> 8 ))
|
||||
#define __const_hweight32(w) (__const_hweight16(w) + __const_hweight16((w) >> 16))
|
||||
#define __const_hweight64(w) (__const_hweight32(w) + __const_hweight32((w) >> 32))
|
||||
|
||||
/*
|
||||
* Generic interface.
|
||||
*/
|
||||
#define hweight8(w) (__builtin_constant_p(w) ? __const_hweight8(w) : __arch_hweight8(w))
|
||||
#define hweight16(w) (__builtin_constant_p(w) ? __const_hweight16(w) : __arch_hweight16(w))
|
||||
#define hweight32(w) (__builtin_constant_p(w) ? __const_hweight32(w) : __arch_hweight32(w))
|
||||
#define hweight64(w) (__builtin_constant_p(w) ? __const_hweight64(w) : __arch_hweight64(w))
|
||||
|
||||
/*
|
||||
* Interface for known constant arguments
|
||||
*/
|
||||
#define HWEIGHT8(w) (BUILD_BUG_ON_ZERO(!__builtin_constant_p(w)) + __const_hweight8(w))
|
||||
#define HWEIGHT16(w) (BUILD_BUG_ON_ZERO(!__builtin_constant_p(w)) + __const_hweight16(w))
|
||||
#define HWEIGHT32(w) (BUILD_BUG_ON_ZERO(!__builtin_constant_p(w)) + __const_hweight32(w))
|
||||
#define HWEIGHT64(w) (BUILD_BUG_ON_ZERO(!__builtin_constant_p(w)) + __const_hweight64(w))
|
||||
|
||||
/*
|
||||
* Type invariant interface to the compile time constant hweight functions.
|
||||
*/
|
||||
#define HWEIGHT(w) HWEIGHT64((u64)w)
|
||||
|
||||
#endif /* _ASM_GENERIC_BITOPS_CONST_HWEIGHT_H_ */
|
||||
@@ -1,11 +1,7 @@
|
||||
#ifndef _ASM_GENERIC_BITOPS_HWEIGHT_H_
|
||||
#define _ASM_GENERIC_BITOPS_HWEIGHT_H_
|
||||
|
||||
#include <asm/types.h>
|
||||
|
||||
extern unsigned int hweight32(unsigned int w);
|
||||
extern unsigned int hweight16(unsigned int w);
|
||||
extern unsigned int hweight8(unsigned int w);
|
||||
extern unsigned long hweight64(__u64 w);
|
||||
#include <asm-generic/bitops/arch_hweight.h>
|
||||
#include <asm-generic/bitops/const_hweight.h>
|
||||
|
||||
#endif /* _ASM_GENERIC_BITOPS_HWEIGHT_H_ */
|
||||
|
||||
@@ -25,7 +25,10 @@ struct bug_entry {
|
||||
};
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#define BUGFLAG_WARNING (1<<0)
|
||||
#define BUGFLAG_WARNING (1 << 0)
|
||||
#define BUGFLAG_TAINT(taint) (BUGFLAG_WARNING | ((taint) << 8))
|
||||
#define BUG_GET_TAINT(bug) ((bug)->flags >> 8)
|
||||
|
||||
#endif /* CONFIG_GENERIC_BUG */
|
||||
|
||||
/*
|
||||
@@ -56,17 +59,25 @@ struct bug_entry {
|
||||
* appear at runtime. Use the versions with printk format strings
|
||||
* to provide better diagnostics.
|
||||
*/
|
||||
#ifndef __WARN
|
||||
#ifndef __WARN_TAINT
|
||||
#ifndef __ASSEMBLY__
|
||||
extern void warn_slowpath_fmt(const char *file, const int line,
|
||||
const char *fmt, ...) __attribute__((format(printf, 3, 4)));
|
||||
extern void warn_slowpath_fmt_taint(const char *file, const int line,
|
||||
unsigned taint, const char *fmt, ...)
|
||||
__attribute__((format(printf, 4, 5)));
|
||||
extern void warn_slowpath_null(const char *file, const int line);
|
||||
#define WANT_WARN_ON_SLOWPATH
|
||||
#endif
|
||||
#define __WARN() warn_slowpath_null(__FILE__, __LINE__)
|
||||
#define __WARN_printf(arg...) warn_slowpath_fmt(__FILE__, __LINE__, arg)
|
||||
#define __WARN_printf_taint(taint, arg...) \
|
||||
warn_slowpath_fmt_taint(__FILE__, __LINE__, taint, arg)
|
||||
#else
|
||||
#define __WARN() __WARN_TAINT(TAINT_WARN)
|
||||
#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
|
||||
#define __WARN_printf_taint(taint, arg...) \
|
||||
do { printk(arg); __WARN_TAINT(taint); } while (0)
|
||||
#endif
|
||||
|
||||
#ifndef WARN_ON
|
||||
@@ -87,6 +98,13 @@ extern void warn_slowpath_null(const char *file, const int line);
|
||||
})
|
||||
#endif
|
||||
|
||||
#define WARN_TAINT(condition, taint, format...) ({ \
|
||||
int __ret_warn_on = !!(condition); \
|
||||
if (unlikely(__ret_warn_on)) \
|
||||
__WARN_printf_taint(taint, format); \
|
||||
unlikely(__ret_warn_on); \
|
||||
})
|
||||
|
||||
#else /* !CONFIG_BUG */
|
||||
#ifndef HAVE_ARCH_BUG
|
||||
#define BUG() do {} while(0)
|
||||
@@ -110,6 +128,8 @@ extern void warn_slowpath_null(const char *file, const int line);
|
||||
})
|
||||
#endif
|
||||
|
||||
#define WARN_TAINT(condition, taint, format...) WARN_ON(condition)
|
||||
|
||||
#endif
|
||||
|
||||
#define WARN_ON_ONCE(condition) ({ \
|
||||
@@ -132,6 +152,16 @@ extern void warn_slowpath_null(const char *file, const int line);
|
||||
unlikely(__ret_warn_once); \
|
||||
})
|
||||
|
||||
#define WARN_TAINT_ONCE(condition, taint, format...) ({ \
|
||||
static bool __warned; \
|
||||
int __ret_warn_once = !!(condition); \
|
||||
\
|
||||
if (unlikely(__ret_warn_once)) \
|
||||
if (WARN_TAINT(!__warned, taint, format)) \
|
||||
__warned = true; \
|
||||
unlikely(__ret_warn_once); \
|
||||
})
|
||||
|
||||
#define WARN_ON_RATELIMIT(condition, state) \
|
||||
WARN_ON((condition) && __ratelimit(state))
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ static inline void dma_sync_single_range_for_cpu(struct device *dev,
|
||||
debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir);
|
||||
|
||||
} else
|
||||
dma_sync_single_for_cpu(dev, addr, size, dir);
|
||||
dma_sync_single_for_cpu(dev, addr + offset, size, dir);
|
||||
}
|
||||
|
||||
static inline void dma_sync_single_range_for_device(struct device *dev,
|
||||
@@ -148,7 +148,7 @@ static inline void dma_sync_single_range_for_device(struct device *dev,
|
||||
debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir);
|
||||
|
||||
} else
|
||||
dma_sync_single_for_device(dev, addr, size, dir);
|
||||
dma_sync_single_for_device(dev, addr + offset, size, dir);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
||||
@@ -28,7 +28,8 @@ KMAP_D(15) KM_UML_USERCOPY,
|
||||
KMAP_D(16) KM_IRQ_PTE,
|
||||
KMAP_D(17) KM_NMI,
|
||||
KMAP_D(18) KM_NMI_PTE,
|
||||
KMAP_D(19) KM_TYPE_NR
|
||||
KMAP_D(19) KM_KDB,
|
||||
KMAP_D(20) KM_TYPE_NR
|
||||
};
|
||||
|
||||
#undef KMAP_D
|
||||
|
||||
@@ -103,6 +103,23 @@ struct blkcipher_walk {
|
||||
unsigned int blocksize;
|
||||
};
|
||||
|
||||
struct ablkcipher_walk {
|
||||
struct {
|
||||
struct page *page;
|
||||
unsigned int offset;
|
||||
} src, dst;
|
||||
|
||||
struct scatter_walk in;
|
||||
unsigned int nbytes;
|
||||
struct scatter_walk out;
|
||||
unsigned int total;
|
||||
struct list_head buffers;
|
||||
u8 *iv_buffer;
|
||||
u8 *iv;
|
||||
int flags;
|
||||
unsigned int blocksize;
|
||||
};
|
||||
|
||||
extern const struct crypto_type crypto_ablkcipher_type;
|
||||
extern const struct crypto_type crypto_aead_type;
|
||||
extern const struct crypto_type crypto_blkcipher_type;
|
||||
@@ -173,6 +190,12 @@ int blkcipher_walk_virt_block(struct blkcipher_desc *desc,
|
||||
struct blkcipher_walk *walk,
|
||||
unsigned int blocksize);
|
||||
|
||||
int ablkcipher_walk_done(struct ablkcipher_request *req,
|
||||
struct ablkcipher_walk *walk, int err);
|
||||
int ablkcipher_walk_phys(struct ablkcipher_request *req,
|
||||
struct ablkcipher_walk *walk);
|
||||
void __ablkcipher_walk_complete(struct ablkcipher_walk *walk);
|
||||
|
||||
static inline void *crypto_tfm_ctx_aligned(struct crypto_tfm *tfm)
|
||||
{
|
||||
return PTR_ALIGN(crypto_tfm_ctx(tfm),
|
||||
@@ -283,6 +306,23 @@ static inline void blkcipher_walk_init(struct blkcipher_walk *walk,
|
||||
walk->total = nbytes;
|
||||
}
|
||||
|
||||
static inline void ablkcipher_walk_init(struct ablkcipher_walk *walk,
|
||||
struct scatterlist *dst,
|
||||
struct scatterlist *src,
|
||||
unsigned int nbytes)
|
||||
{
|
||||
walk->in.sg = src;
|
||||
walk->out.sg = dst;
|
||||
walk->total = nbytes;
|
||||
INIT_LIST_HEAD(&walk->buffers);
|
||||
}
|
||||
|
||||
static inline void ablkcipher_walk_complete(struct ablkcipher_walk *walk)
|
||||
{
|
||||
if (unlikely(!list_empty(&walk->buffers)))
|
||||
__ablkcipher_walk_complete(walk);
|
||||
}
|
||||
|
||||
static inline struct crypto_async_request *crypto_get_backlog(
|
||||
struct crypto_queue *queue)
|
||||
{
|
||||
|
||||
@@ -1428,10 +1428,13 @@ extern void drm_sysfs_connector_remove(struct drm_connector *connector);
|
||||
/* Graphics Execution Manager library functions (drm_gem.c) */
|
||||
int drm_gem_init(struct drm_device *dev);
|
||||
void drm_gem_destroy(struct drm_device *dev);
|
||||
void drm_gem_object_release(struct drm_gem_object *obj);
|
||||
void drm_gem_object_free(struct kref *kref);
|
||||
void drm_gem_object_free_unlocked(struct kref *kref);
|
||||
struct drm_gem_object *drm_gem_object_alloc(struct drm_device *dev,
|
||||
size_t size);
|
||||
int drm_gem_object_init(struct drm_device *dev,
|
||||
struct drm_gem_object *obj, size_t size);
|
||||
void drm_gem_object_handle_free(struct kref *kref);
|
||||
void drm_gem_vm_open(struct vm_area_struct *vma);
|
||||
void drm_gem_vm_close(struct vm_area_struct *vma);
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <linux/idr.h>
|
||||
|
||||
#include <linux/fb.h>
|
||||
#include <linux/slow-work.h>
|
||||
|
||||
struct drm_device;
|
||||
struct drm_mode_set;
|
||||
@@ -271,8 +272,6 @@ struct drm_framebuffer {
|
||||
unsigned int depth;
|
||||
int bits_per_pixel;
|
||||
int flags;
|
||||
struct fb_info *fbdev;
|
||||
u32 pseudo_palette[17];
|
||||
struct list_head filp_head;
|
||||
/* if you are using the helper */
|
||||
void *helper_private;
|
||||
@@ -369,9 +368,6 @@ struct drm_crtc_funcs {
|
||||
* @enabled: is this CRTC enabled?
|
||||
* @x: x position on screen
|
||||
* @y: y position on screen
|
||||
* @desired_mode: new desired mode
|
||||
* @desired_x: desired x for desired_mode
|
||||
* @desired_y: desired y for desired_mode
|
||||
* @funcs: CRTC control functions
|
||||
*
|
||||
* Each CRTC may have one or more connectors associated with it. This structure
|
||||
@@ -391,8 +387,6 @@ struct drm_crtc {
|
||||
struct drm_display_mode mode;
|
||||
|
||||
int x, y;
|
||||
struct drm_display_mode *desired_mode;
|
||||
int desired_x, desired_y;
|
||||
const struct drm_crtc_funcs *funcs;
|
||||
|
||||
/* CRTC gamma size for reporting to userspace */
|
||||
@@ -467,6 +461,15 @@ enum drm_connector_force {
|
||||
DRM_FORCE_ON_DIGITAL, /* for DVI-I use digital connector */
|
||||
};
|
||||
|
||||
/* should we poll this connector for connects and disconnects */
|
||||
/* hot plug detectable */
|
||||
#define DRM_CONNECTOR_POLL_HPD (1 << 0)
|
||||
/* poll for connections */
|
||||
#define DRM_CONNECTOR_POLL_CONNECT (1 << 1)
|
||||
/* can cleanly poll for disconnections without flickering the screen */
|
||||
/* DACs should rarely do this without a lot of testing */
|
||||
#define DRM_CONNECTOR_POLL_DISCONNECT (1 << 2)
|
||||
|
||||
/**
|
||||
* drm_connector - central DRM connector control structure
|
||||
* @crtc: CRTC this connector is currently connected to, NULL if none
|
||||
@@ -511,6 +514,8 @@ struct drm_connector {
|
||||
u32 property_ids[DRM_CONNECTOR_MAX_PROPERTY];
|
||||
uint64_t property_values[DRM_CONNECTOR_MAX_PROPERTY];
|
||||
|
||||
uint8_t polled; /* DRM_CONNECTOR_POLL_* */
|
||||
|
||||
/* requested DPMS state */
|
||||
int dpms;
|
||||
|
||||
@@ -521,7 +526,6 @@ struct drm_connector {
|
||||
uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER];
|
||||
uint32_t force_encoder_id;
|
||||
struct drm_encoder *encoder; /* currently active encoder */
|
||||
void *fb_helper_private;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -548,16 +552,10 @@ struct drm_mode_set {
|
||||
|
||||
/**
|
||||
* struct drm_mode_config_funcs - configure CRTCs for a given screen layout
|
||||
* @resize: adjust CRTCs as necessary for the proposed layout
|
||||
*
|
||||
* Currently only a resize hook is available. DRM will call back into the
|
||||
* driver with a new screen width and height. If the driver can't support
|
||||
* the proposed size, it can return false. Otherwise it should adjust
|
||||
* the CRTC<->connector mappings as needed and update its view of the screen.
|
||||
*/
|
||||
struct drm_mode_config_funcs {
|
||||
struct drm_framebuffer *(*fb_create)(struct drm_device *dev, struct drm_file *file_priv, struct drm_mode_fb_cmd *mode_cmd);
|
||||
int (*fb_changed)(struct drm_device *dev);
|
||||
void (*output_poll_changed)(struct drm_device *dev);
|
||||
};
|
||||
|
||||
struct drm_mode_group {
|
||||
@@ -590,14 +588,15 @@ struct drm_mode_config {
|
||||
|
||||
struct list_head property_list;
|
||||
|
||||
/* in-kernel framebuffers - hung of filp_head in drm_framebuffer */
|
||||
struct list_head fb_kernel_list;
|
||||
|
||||
int min_width, min_height;
|
||||
int max_width, max_height;
|
||||
struct drm_mode_config_funcs *funcs;
|
||||
resource_size_t fb_base;
|
||||
|
||||
/* output poll support */
|
||||
bool poll_enabled;
|
||||
struct delayed_slow_work output_poll_slow_work;
|
||||
|
||||
/* pointers to standard properties */
|
||||
struct list_head property_blob_list;
|
||||
struct drm_property *edid_property;
|
||||
@@ -666,8 +665,6 @@ extern void drm_fb_release(struct drm_file *file_priv);
|
||||
extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group);
|
||||
extern struct edid *drm_get_edid(struct drm_connector *connector,
|
||||
struct i2c_adapter *adapter);
|
||||
extern int drm_do_probe_ddc_edid(struct i2c_adapter *adapter,
|
||||
unsigned char *buf, int len);
|
||||
extern int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid);
|
||||
extern void drm_mode_probed_add(struct drm_connector *connector, struct drm_display_mode *mode);
|
||||
extern void drm_mode_remove(struct drm_connector *connector, struct drm_display_mode *mode);
|
||||
@@ -799,8 +796,14 @@ extern struct drm_display_mode *drm_cvt_mode(struct drm_device *dev,
|
||||
extern struct drm_display_mode *drm_gtf_mode(struct drm_device *dev,
|
||||
int hdisplay, int vdisplay, int vrefresh,
|
||||
bool interlaced, int margins);
|
||||
extern struct drm_display_mode *drm_gtf_mode_complex(struct drm_device *dev,
|
||||
int hdisplay, int vdisplay, int vrefresh,
|
||||
bool interlaced, int margins, int GTF_M,
|
||||
int GTF_2C, int GTF_K, int GTF_2J);
|
||||
extern int drm_add_modes_noedid(struct drm_connector *connector,
|
||||
int hdisplay, int vdisplay);
|
||||
|
||||
extern bool drm_edid_is_valid(struct edid *edid);
|
||||
struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev,
|
||||
int hsize, int vsize, int fresh);
|
||||
#endif /* __DRM_CRTC_H__ */
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
|
||||
#include <linux/fb.h>
|
||||
|
||||
#include "drm_fb_helper.h"
|
||||
struct drm_crtc_helper_funcs {
|
||||
/*
|
||||
* Control power levels on the CRTC. If the mode passed in is
|
||||
@@ -96,8 +95,6 @@ struct drm_connector_helper_funcs {
|
||||
|
||||
extern int drm_helper_probe_single_connector_modes(struct drm_connector *connector, uint32_t maxX, uint32_t maxY);
|
||||
extern void drm_helper_disable_unused_functions(struct drm_device *dev);
|
||||
extern int drm_helper_hotplug_stage_two(struct drm_device *dev);
|
||||
extern bool drm_helper_initial_config(struct drm_device *dev);
|
||||
extern int drm_crtc_helper_set_config(struct drm_mode_set *set);
|
||||
extern bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
|
||||
struct drm_display_mode *mode,
|
||||
@@ -123,12 +120,14 @@ static inline void drm_encoder_helper_add(struct drm_encoder *encoder,
|
||||
encoder->helper_private = (void *)funcs;
|
||||
}
|
||||
|
||||
static inline int drm_connector_helper_add(struct drm_connector *connector,
|
||||
static inline void drm_connector_helper_add(struct drm_connector *connector,
|
||||
const struct drm_connector_helper_funcs *funcs)
|
||||
{
|
||||
connector->helper_private = (void *)funcs;
|
||||
return drm_fb_helper_add_connector(connector);
|
||||
}
|
||||
|
||||
extern int drm_helper_resume_force_mode(struct drm_device *dev);
|
||||
extern void drm_kms_helper_poll_init(struct drm_device *dev);
|
||||
extern void drm_kms_helper_poll_fini(struct drm_device *dev);
|
||||
extern void drm_helper_hpd_irq_event(struct drm_device *dev);
|
||||
#endif
|
||||
|
||||
@@ -120,7 +120,7 @@ struct detailed_non_pixel {
|
||||
struct detailed_data_string str;
|
||||
struct detailed_data_monitor_range range;
|
||||
struct detailed_data_wpindex color;
|
||||
struct std_timing timings[5];
|
||||
struct std_timing timings[6];
|
||||
struct cvt_timing cvt[4];
|
||||
} data;
|
||||
} __attribute__((packed));
|
||||
@@ -201,7 +201,4 @@ struct edid {
|
||||
|
||||
#define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8))
|
||||
|
||||
/* define the number of Extension EDID block */
|
||||
#define DRM_MAX_EDID_EXT_NUM 4
|
||||
|
||||
#endif /* __DRM_EDID_H__ */
|
||||
|
||||
@@ -30,17 +30,12 @@
|
||||
#ifndef DRM_FB_HELPER_H
|
||||
#define DRM_FB_HELPER_H
|
||||
|
||||
struct drm_fb_helper;
|
||||
|
||||
struct drm_fb_helper_crtc {
|
||||
uint32_t crtc_id;
|
||||
struct drm_mode_set mode_set;
|
||||
};
|
||||
|
||||
|
||||
struct drm_fb_helper_funcs {
|
||||
void (*gamma_set)(struct drm_crtc *crtc, u16 red, u16 green,
|
||||
u16 blue, int regno);
|
||||
void (*gamma_get)(struct drm_crtc *crtc, u16 *red, u16 *green,
|
||||
u16 *blue, int regno);
|
||||
struct drm_display_mode *desired_mode;
|
||||
};
|
||||
|
||||
/* mode specified on the command line */
|
||||
@@ -57,8 +52,28 @@ struct drm_fb_helper_cmdline_mode {
|
||||
bool margins;
|
||||
};
|
||||
|
||||
struct drm_fb_helper_surface_size {
|
||||
u32 fb_width;
|
||||
u32 fb_height;
|
||||
u32 surface_width;
|
||||
u32 surface_height;
|
||||
u32 surface_bpp;
|
||||
u32 surface_depth;
|
||||
};
|
||||
|
||||
struct drm_fb_helper_funcs {
|
||||
void (*gamma_set)(struct drm_crtc *crtc, u16 red, u16 green,
|
||||
u16 blue, int regno);
|
||||
void (*gamma_get)(struct drm_crtc *crtc, u16 *red, u16 *green,
|
||||
u16 *blue, int regno);
|
||||
|
||||
int (*fb_probe)(struct drm_fb_helper *helper,
|
||||
struct drm_fb_helper_surface_size *sizes);
|
||||
};
|
||||
|
||||
struct drm_fb_helper_connector {
|
||||
struct drm_fb_helper_cmdline_mode cmdline_mode;
|
||||
struct drm_connector *connector;
|
||||
};
|
||||
|
||||
struct drm_fb_helper {
|
||||
@@ -67,24 +82,26 @@ struct drm_fb_helper {
|
||||
struct drm_display_mode *mode;
|
||||
int crtc_count;
|
||||
struct drm_fb_helper_crtc *crtc_info;
|
||||
int connector_count;
|
||||
struct drm_fb_helper_connector **connector_info;
|
||||
struct drm_fb_helper_funcs *funcs;
|
||||
int conn_limit;
|
||||
struct fb_info *fbdev;
|
||||
u32 pseudo_palette[17];
|
||||
struct list_head kernel_fb_list;
|
||||
|
||||
/* we got a hotplug but fbdev wasn't running the console
|
||||
delay until next set_par */
|
||||
bool delayed_hotplug;
|
||||
};
|
||||
|
||||
int drm_fb_helper_single_fb_probe(struct drm_device *dev,
|
||||
int preferred_bpp,
|
||||
int (*fb_create)(struct drm_device *dev,
|
||||
uint32_t fb_width,
|
||||
uint32_t fb_height,
|
||||
uint32_t surface_width,
|
||||
uint32_t surface_height,
|
||||
uint32_t surface_depth,
|
||||
uint32_t surface_bpp,
|
||||
struct drm_framebuffer **fb_ptr));
|
||||
int drm_fb_helper_init_crtc_count(struct drm_fb_helper *helper, int crtc_count,
|
||||
int max_conn);
|
||||
void drm_fb_helper_free(struct drm_fb_helper *helper);
|
||||
int drm_fb_helper_single_fb_probe(struct drm_fb_helper *helper,
|
||||
int preferred_bpp);
|
||||
|
||||
int drm_fb_helper_init(struct drm_device *dev,
|
||||
struct drm_fb_helper *helper, int crtc_count,
|
||||
int max_conn);
|
||||
void drm_fb_helper_fini(struct drm_fb_helper *helper);
|
||||
int drm_fb_helper_blank(int blank, struct fb_info *info);
|
||||
int drm_fb_helper_pan_display(struct fb_var_screeninfo *var,
|
||||
struct fb_info *info);
|
||||
@@ -99,13 +116,15 @@ int drm_fb_helper_setcolreg(unsigned regno,
|
||||
struct fb_info *info);
|
||||
|
||||
void drm_fb_helper_restore(void);
|
||||
void drm_fb_helper_fill_var(struct fb_info *info, struct drm_framebuffer *fb,
|
||||
void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper,
|
||||
uint32_t fb_width, uint32_t fb_height);
|
||||
void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
|
||||
uint32_t depth);
|
||||
|
||||
int drm_fb_helper_add_connector(struct drm_connector *connector);
|
||||
int drm_fb_helper_parse_command_line(struct drm_device *dev);
|
||||
int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info);
|
||||
|
||||
bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper);
|
||||
bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel);
|
||||
int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper);
|
||||
|
||||
#endif
|
||||
|
||||
67
include/drm/drm_fixed.h
Normal file
67
include/drm/drm_fixed.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright 2009 Red Hat Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors: Dave Airlie
|
||||
*/
|
||||
#ifndef DRM_FIXED_H
|
||||
#define DRM_FIXED_H
|
||||
|
||||
typedef union dfixed {
|
||||
u32 full;
|
||||
} fixed20_12;
|
||||
|
||||
|
||||
#define dfixed_const(A) (u32)(((A) << 12))/* + ((B + 0.000122)*4096)) */
|
||||
#define dfixed_const_half(A) (u32)(((A) << 12) + 2048)
|
||||
#define dfixed_const_666(A) (u32)(((A) << 12) + 2731)
|
||||
#define dfixed_const_8(A) (u32)(((A) << 12) + 3277)
|
||||
#define dfixed_mul(A, B) ((u64)((u64)(A).full * (B).full + 2048) >> 12)
|
||||
#define dfixed_init(A) { .full = dfixed_const((A)) }
|
||||
#define dfixed_init_half(A) { .full = dfixed_const_half((A)) }
|
||||
#define dfixed_trunc(A) ((A).full >> 12)
|
||||
|
||||
static inline u32 dfixed_floor(fixed20_12 A)
|
||||
{
|
||||
u32 non_frac = dfixed_trunc(A);
|
||||
|
||||
return dfixed_const(non_frac);
|
||||
}
|
||||
|
||||
static inline u32 dfixed_ceil(fixed20_12 A)
|
||||
{
|
||||
u32 non_frac = dfixed_trunc(A);
|
||||
|
||||
if (A.full > dfixed_const(non_frac))
|
||||
return dfixed_const(non_frac + 1);
|
||||
else
|
||||
return dfixed_const(non_frac);
|
||||
}
|
||||
|
||||
static inline u32 dfixed_div(fixed20_12 A, fixed20_12 B)
|
||||
{
|
||||
u64 tmp = ((u64)A.full << 13);
|
||||
|
||||
do_div(tmp, B.full);
|
||||
tmp += 1;
|
||||
tmp /= 2;
|
||||
return lower_32_bits(tmp);
|
||||
}
|
||||
#endif
|
||||
@@ -902,6 +902,7 @@ struct drm_radeon_cs {
|
||||
#define RADEON_INFO_NUM_GB_PIPES 0x01
|
||||
#define RADEON_INFO_NUM_Z_PIPES 0x02
|
||||
#define RADEON_INFO_ACCEL_WORKING 0x03
|
||||
#define RADEON_INFO_CRTC_FROM_ID 0x04
|
||||
|
||||
struct drm_radeon_info {
|
||||
uint32_t request;
|
||||
|
||||
@@ -66,6 +66,26 @@ struct ttm_placement {
|
||||
const uint32_t *busy_placement;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ttm_bus_placement
|
||||
*
|
||||
* @addr: mapped virtual address
|
||||
* @base: bus base address
|
||||
* @is_iomem: is this io memory ?
|
||||
* @size: size in byte
|
||||
* @offset: offset from the base address
|
||||
*
|
||||
* Structure indicating the bus placement of an object.
|
||||
*/
|
||||
struct ttm_bus_placement {
|
||||
void *addr;
|
||||
unsigned long base;
|
||||
unsigned long size;
|
||||
unsigned long offset;
|
||||
bool is_iomem;
|
||||
bool io_reserved;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* struct ttm_mem_reg
|
||||
@@ -75,6 +95,7 @@ struct ttm_placement {
|
||||
* @num_pages: Actual size of memory region in pages.
|
||||
* @page_alignment: Page alignment.
|
||||
* @placement: Placement flags.
|
||||
* @bus: Placement on io bus accessible to the CPU
|
||||
*
|
||||
* Structure indicating the placement and space resources used by a
|
||||
* buffer object.
|
||||
@@ -87,6 +108,7 @@ struct ttm_mem_reg {
|
||||
uint32_t page_alignment;
|
||||
uint32_t mem_type;
|
||||
uint32_t placement;
|
||||
struct ttm_bus_placement bus;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -274,6 +296,7 @@ struct ttm_bo_kmap_obj {
|
||||
ttm_bo_map_kmap = 3,
|
||||
ttm_bo_map_premapped = 4 | TTM_BO_MAP_IOMEM_MASK,
|
||||
} bo_kmap_type;
|
||||
struct ttm_buffer_object *bo;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -313,7 +336,8 @@ extern int ttm_bo_wait(struct ttm_buffer_object *bo, bool lazy,
|
||||
* @bo: The buffer object.
|
||||
* @placement: Proposed placement for the buffer object.
|
||||
* @interruptible: Sleep interruptible if sleeping.
|
||||
* @no_wait: Return immediately if the buffer is busy.
|
||||
* @no_wait_reserve: Return immediately if other buffers are busy.
|
||||
* @no_wait_gpu: Return immediately if the GPU is busy.
|
||||
*
|
||||
* Changes placement and caching policy of the buffer object
|
||||
* according proposed placement.
|
||||
@@ -325,7 +349,8 @@ extern int ttm_bo_wait(struct ttm_buffer_object *bo, bool lazy,
|
||||
*/
|
||||
extern int ttm_bo_validate(struct ttm_buffer_object *bo,
|
||||
struct ttm_placement *placement,
|
||||
bool interruptible, bool no_wait);
|
||||
bool interruptible, bool no_wait_reserve,
|
||||
bool no_wait_gpu);
|
||||
|
||||
/**
|
||||
* ttm_bo_unref
|
||||
@@ -336,6 +361,23 @@ extern int ttm_bo_validate(struct ttm_buffer_object *bo,
|
||||
*/
|
||||
extern void ttm_bo_unref(struct ttm_buffer_object **bo);
|
||||
|
||||
/**
|
||||
* ttm_bo_lock_delayed_workqueue
|
||||
*
|
||||
* Prevent the delayed workqueue from running.
|
||||
* Returns
|
||||
* True if the workqueue was queued at the time
|
||||
*/
|
||||
extern int ttm_bo_lock_delayed_workqueue(struct ttm_bo_device *bdev);
|
||||
|
||||
/**
|
||||
* ttm_bo_unlock_delayed_workqueue
|
||||
*
|
||||
* Allows the delayed workqueue to run.
|
||||
*/
|
||||
extern void ttm_bo_unlock_delayed_workqueue(struct ttm_bo_device *bdev,
|
||||
int resched);
|
||||
|
||||
/**
|
||||
* ttm_bo_synccpu_write_grab
|
||||
*
|
||||
|
||||
@@ -176,8 +176,6 @@ struct ttm_tt {
|
||||
|
||||
#define TTM_MEMTYPE_FLAG_FIXED (1 << 0) /* Fixed (on-card) PCI memory */
|
||||
#define TTM_MEMTYPE_FLAG_MAPPABLE (1 << 1) /* Memory mappable */
|
||||
#define TTM_MEMTYPE_FLAG_NEEDS_IOREMAP (1 << 2) /* Fixed memory needs ioremap
|
||||
before kernel access. */
|
||||
#define TTM_MEMTYPE_FLAG_CMA (1 << 3) /* Can't map aperture */
|
||||
|
||||
/**
|
||||
@@ -189,13 +187,6 @@ struct ttm_tt {
|
||||
* managed by this memory type.
|
||||
* @gpu_offset: If used, the GPU offset of the first managed page of
|
||||
* fixed memory or the first managed location in an aperture.
|
||||
* @io_offset: The io_offset of the first managed page of IO memory or
|
||||
* the first managed location in an aperture. For TTM_MEMTYPE_FLAG_CMA
|
||||
* memory, this should be set to NULL.
|
||||
* @io_size: The size of a managed IO region (fixed memory or aperture).
|
||||
* @io_addr: Virtual kernel address if the io region is pre-mapped. For
|
||||
* TTM_MEMTYPE_FLAG_NEEDS_IOREMAP there is no pre-mapped io map and
|
||||
* @io_addr should be set to NULL.
|
||||
* @size: Size of the managed region.
|
||||
* @available_caching: A mask of available caching types, TTM_PL_FLAG_XX,
|
||||
* as defined in ttm_placement_common.h
|
||||
@@ -221,9 +212,6 @@ struct ttm_mem_type_manager {
|
||||
bool use_type;
|
||||
uint32_t flags;
|
||||
unsigned long gpu_offset;
|
||||
unsigned long io_offset;
|
||||
unsigned long io_size;
|
||||
void *io_addr;
|
||||
uint64_t size;
|
||||
uint32_t available_caching;
|
||||
uint32_t default_caching;
|
||||
@@ -311,7 +299,8 @@ struct ttm_bo_driver {
|
||||
*/
|
||||
int (*move) (struct ttm_buffer_object *bo,
|
||||
bool evict, bool interruptible,
|
||||
bool no_wait, struct ttm_mem_reg *new_mem);
|
||||
bool no_wait_reserve, bool no_wait_gpu,
|
||||
struct ttm_mem_reg *new_mem);
|
||||
|
||||
/**
|
||||
* struct ttm_bo_driver_member verify_access
|
||||
@@ -351,12 +340,21 @@ struct ttm_bo_driver {
|
||||
struct ttm_mem_reg *new_mem);
|
||||
/* notify the driver we are taking a fault on this BO
|
||||
* and have reserved it */
|
||||
void (*fault_reserve_notify)(struct ttm_buffer_object *bo);
|
||||
int (*fault_reserve_notify)(struct ttm_buffer_object *bo);
|
||||
|
||||
/**
|
||||
* notify the driver that we're about to swap out this bo
|
||||
*/
|
||||
void (*swap_notify) (struct ttm_buffer_object *bo);
|
||||
|
||||
/**
|
||||
* Driver callback on when mapping io memory (for bo_move_memcpy
|
||||
* for instance). TTM will take care to call io_mem_free whenever
|
||||
* the mapping is not use anymore. io_mem_reserve & io_mem_free
|
||||
* are balanced.
|
||||
*/
|
||||
int (*io_mem_reserve)(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem);
|
||||
void (*io_mem_free)(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -633,7 +631,8 @@ extern bool ttm_mem_reg_is_pci(struct ttm_bo_device *bdev,
|
||||
* @proposed_placement: Proposed new placement for the buffer object.
|
||||
* @mem: A struct ttm_mem_reg.
|
||||
* @interruptible: Sleep interruptible when sliping.
|
||||
* @no_wait: Don't sleep waiting for space to become available.
|
||||
* @no_wait_reserve: Return immediately if other buffers are busy.
|
||||
* @no_wait_gpu: Return immediately if the GPU is busy.
|
||||
*
|
||||
* Allocate memory space for the buffer object pointed to by @bo, using
|
||||
* the placement flags in @mem, potentially evicting other idle buffer objects.
|
||||
@@ -647,7 +646,8 @@ extern bool ttm_mem_reg_is_pci(struct ttm_bo_device *bdev,
|
||||
extern int ttm_bo_mem_space(struct ttm_buffer_object *bo,
|
||||
struct ttm_placement *placement,
|
||||
struct ttm_mem_reg *mem,
|
||||
bool interruptible, bool no_wait);
|
||||
bool interruptible,
|
||||
bool no_wait_reserve, bool no_wait_gpu);
|
||||
/**
|
||||
* ttm_bo_wait_for_cpu
|
||||
*
|
||||
@@ -682,6 +682,11 @@ extern int ttm_bo_pci_offset(struct ttm_bo_device *bdev,
|
||||
unsigned long *bus_offset,
|
||||
unsigned long *bus_size);
|
||||
|
||||
extern int ttm_mem_io_reserve(struct ttm_bo_device *bdev,
|
||||
struct ttm_mem_reg *mem);
|
||||
extern void ttm_mem_io_free(struct ttm_bo_device *bdev,
|
||||
struct ttm_mem_reg *mem);
|
||||
|
||||
extern void ttm_bo_global_release(struct ttm_global_reference *ref);
|
||||
extern int ttm_bo_global_init(struct ttm_global_reference *ref);
|
||||
|
||||
@@ -789,34 +794,6 @@ extern void ttm_bo_unreserve(struct ttm_buffer_object *bo);
|
||||
extern int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo,
|
||||
bool interruptible);
|
||||
|
||||
/**
|
||||
* ttm_bo_block_reservation
|
||||
*
|
||||
* @bo: A pointer to a struct ttm_buffer_object.
|
||||
* @interruptible: Use interruptible sleep when waiting.
|
||||
* @no_wait: Don't sleep, but rather return -EBUSY.
|
||||
*
|
||||
* Block reservation for validation by simply reserving the buffer.
|
||||
* This is intended for single buffer use only without eviction,
|
||||
* and thus needs no deadlock protection.
|
||||
*
|
||||
* Returns:
|
||||
* -EBUSY: If no_wait == 1 and the buffer is already reserved.
|
||||
* -ERESTARTSYS: If interruptible == 1 and the process received a signal
|
||||
* while sleeping.
|
||||
*/
|
||||
extern int ttm_bo_block_reservation(struct ttm_buffer_object *bo,
|
||||
bool interruptible, bool no_wait);
|
||||
|
||||
/**
|
||||
* ttm_bo_unblock_reservation
|
||||
*
|
||||
* @bo: A pointer to a struct ttm_buffer_object.
|
||||
*
|
||||
* Unblocks reservation leaving lru lists untouched.
|
||||
*/
|
||||
extern void ttm_bo_unblock_reservation(struct ttm_buffer_object *bo);
|
||||
|
||||
/*
|
||||
* ttm_bo_util.c
|
||||
*/
|
||||
@@ -826,7 +803,8 @@ extern void ttm_bo_unblock_reservation(struct ttm_buffer_object *bo);
|
||||
*
|
||||
* @bo: A pointer to a struct ttm_buffer_object.
|
||||
* @evict: 1: This is an eviction. Don't try to pipeline.
|
||||
* @no_wait: Never sleep, but rather return with -EBUSY.
|
||||
* @no_wait_reserve: Return immediately if other buffers are busy.
|
||||
* @no_wait_gpu: Return immediately if the GPU is busy.
|
||||
* @new_mem: struct ttm_mem_reg indicating where to move.
|
||||
*
|
||||
* Optimized move function for a buffer object with both old and
|
||||
@@ -840,15 +818,16 @@ extern void ttm_bo_unblock_reservation(struct ttm_buffer_object *bo);
|
||||
*/
|
||||
|
||||
extern int ttm_bo_move_ttm(struct ttm_buffer_object *bo,
|
||||
bool evict, bool no_wait,
|
||||
struct ttm_mem_reg *new_mem);
|
||||
bool evict, bool no_wait_reserve,
|
||||
bool no_wait_gpu, struct ttm_mem_reg *new_mem);
|
||||
|
||||
/**
|
||||
* ttm_bo_move_memcpy
|
||||
*
|
||||
* @bo: A pointer to a struct ttm_buffer_object.
|
||||
* @evict: 1: This is an eviction. Don't try to pipeline.
|
||||
* @no_wait: Never sleep, but rather return with -EBUSY.
|
||||
* @no_wait_reserve: Return immediately if other buffers are busy.
|
||||
* @no_wait_gpu: Return immediately if the GPU is busy.
|
||||
* @new_mem: struct ttm_mem_reg indicating where to move.
|
||||
*
|
||||
* Fallback move function for a mappable buffer object in mappable memory.
|
||||
@@ -862,8 +841,8 @@ extern int ttm_bo_move_ttm(struct ttm_buffer_object *bo,
|
||||
*/
|
||||
|
||||
extern int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
|
||||
bool evict,
|
||||
bool no_wait, struct ttm_mem_reg *new_mem);
|
||||
bool evict, bool no_wait_reserve,
|
||||
bool no_wait_gpu, struct ttm_mem_reg *new_mem);
|
||||
|
||||
/**
|
||||
* ttm_bo_free_old_node
|
||||
@@ -882,7 +861,8 @@ extern void ttm_bo_free_old_node(struct ttm_buffer_object *bo);
|
||||
* @sync_obj_arg: An argument to pass to the sync object idle / wait
|
||||
* functions.
|
||||
* @evict: This is an evict move. Don't return until the buffer is idle.
|
||||
* @no_wait: Never sleep, but rather return with -EBUSY.
|
||||
* @no_wait_reserve: Return immediately if other buffers are busy.
|
||||
* @no_wait_gpu: Return immediately if the GPU is busy.
|
||||
* @new_mem: struct ttm_mem_reg indicating where to move.
|
||||
*
|
||||
* Accelerated move function to be called when an accelerated move
|
||||
@@ -896,7 +876,8 @@ extern void ttm_bo_free_old_node(struct ttm_buffer_object *bo);
|
||||
extern int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
|
||||
void *sync_obj,
|
||||
void *sync_obj_arg,
|
||||
bool evict, bool no_wait,
|
||||
bool evict, bool no_wait_reserve,
|
||||
bool no_wait_gpu,
|
||||
struct ttm_mem_reg *new_mem);
|
||||
/**
|
||||
* ttm_io_prot
|
||||
|
||||
74
include/drm/ttm/ttm_page_alloc.h
Normal file
74
include/drm/ttm/ttm_page_alloc.h
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Copyright (c) Red Hat Inc.
|
||||
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sub license,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the
|
||||
* next paragraph) shall be included in all copies or substantial portions
|
||||
* of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors: Dave Airlie <airlied@redhat.com>
|
||||
* Jerome Glisse <jglisse@redhat.com>
|
||||
*/
|
||||
#ifndef TTM_PAGE_ALLOC
|
||||
#define TTM_PAGE_ALLOC
|
||||
|
||||
#include "ttm_bo_driver.h"
|
||||
#include "ttm_memory.h"
|
||||
|
||||
/**
|
||||
* Get count number of pages from pool to pages list.
|
||||
*
|
||||
* @pages: heado of empty linked list where pages are filled.
|
||||
* @flags: ttm flags for page allocation.
|
||||
* @cstate: ttm caching state for the page.
|
||||
* @count: number of pages to allocate.
|
||||
*/
|
||||
int ttm_get_pages(struct list_head *pages,
|
||||
int flags,
|
||||
enum ttm_caching_state cstate,
|
||||
unsigned count);
|
||||
/**
|
||||
* Put linked list of pages to pool.
|
||||
*
|
||||
* @pages: list of pages to free.
|
||||
* @page_count: number of pages in the list. Zero can be passed for unknown
|
||||
* count.
|
||||
* @flags: ttm flags for page allocation.
|
||||
* @cstate: ttm caching state.
|
||||
*/
|
||||
void ttm_put_pages(struct list_head *pages,
|
||||
unsigned page_count,
|
||||
int flags,
|
||||
enum ttm_caching_state cstate);
|
||||
/**
|
||||
* Initialize pool allocator.
|
||||
*
|
||||
* Pool allocator is internaly reference counted so it can be initialized
|
||||
* multiple times but ttm_page_alloc_fini has to be called same number of
|
||||
* times.
|
||||
*/
|
||||
int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages);
|
||||
/**
|
||||
* Free pool allocator.
|
||||
*/
|
||||
void ttm_page_alloc_fini(void);
|
||||
|
||||
/**
|
||||
* Output the state of pools to debugfs file
|
||||
*/
|
||||
extern int ttm_page_alloc_debugfs(struct seq_file *m, void *data);
|
||||
#endif
|
||||
@@ -94,6 +94,7 @@ header-y += if_ppp.h
|
||||
header-y += if_slip.h
|
||||
header-y += if_strip.h
|
||||
header-y += if_tun.h
|
||||
header-y += if_x25.h
|
||||
header-y += in_route.h
|
||||
header-y += ioctl.h
|
||||
header-y += ip6_tunnel.h
|
||||
|
||||
@@ -116,11 +116,12 @@ extern unsigned long acpi_realmode_flags;
|
||||
|
||||
int acpi_register_gsi (struct device *dev, u32 gsi, int triggering, int polarity);
|
||||
int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
|
||||
int acpi_isa_irq_to_gsi (unsigned isa_irq, u32 *gsi);
|
||||
|
||||
#ifdef CONFIG_X86_IO_APIC
|
||||
extern int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity);
|
||||
extern int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity);
|
||||
#else
|
||||
#define acpi_get_override_irq(bus, trigger, polarity) (-1)
|
||||
#define acpi_get_override_irq(gsi, trigger, polarity) (-1)
|
||||
#endif
|
||||
/*
|
||||
* This function undoes the effect of one call to acpi_register_gsi().
|
||||
|
||||
29
include/linux/ahci_platform.h
Normal file
29
include/linux/ahci_platform.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* AHCI SATA platform driver
|
||||
*
|
||||
* Copyright 2004-2005 Red Hat, Inc.
|
||||
* Jeff Garzik <jgarzik@pobox.com>
|
||||
* Copyright 2010 MontaVista Software, LLC.
|
||||
* Anton Vorontsov <avorontsov@ru.mvista.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, or (at your option)
|
||||
* any later version.
|
||||
*/
|
||||
|
||||
#ifndef _AHCI_PLATFORM_H
|
||||
#define _AHCI_PLATFORM_H
|
||||
|
||||
struct device;
|
||||
struct ata_port_info;
|
||||
|
||||
struct ahci_platform_data {
|
||||
int (*init)(struct device *dev);
|
||||
void (*exit)(struct device *dev);
|
||||
const struct ata_port_info *ata_port_info;
|
||||
unsigned int force_port_map;
|
||||
unsigned int mask_port_map;
|
||||
};
|
||||
|
||||
#endif /* _AHCI_PLATFORM_H */
|
||||
16
include/linux/altera_jtaguart.h
Normal file
16
include/linux/altera_jtaguart.h
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* altera_jtaguart.h -- Altera JTAG UART driver defines.
|
||||
*/
|
||||
|
||||
#ifndef __ALTJUART_H
|
||||
#define __ALTJUART_H
|
||||
|
||||
#define ALTERA_JTAGUART_MAJOR 204
|
||||
#define ALTERA_JTAGUART_MINOR 186
|
||||
|
||||
struct altera_jtaguart_platform_uart {
|
||||
unsigned long mapbase; /* Physical address base */
|
||||
unsigned int irq; /* Interrupt vector */
|
||||
};
|
||||
|
||||
#endif /* __ALTJUART_H */
|
||||
14
include/linux/altera_uart.h
Normal file
14
include/linux/altera_uart.h
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* altera_uart.h -- Altera UART driver defines.
|
||||
*/
|
||||
|
||||
#ifndef __ALTUART_H
|
||||
#define __ALTUART_H
|
||||
|
||||
struct altera_uart_platform_uart {
|
||||
unsigned long mapbase; /* Physical address base */
|
||||
unsigned int irq; /* Interrupt vector */
|
||||
unsigned int uartclk; /* UART clock rate */
|
||||
};
|
||||
|
||||
#endif /* __ALTUART_H */
|
||||
@@ -6,8 +6,29 @@
|
||||
|
||||
#include <linux/mmc/host.h>
|
||||
|
||||
/**
|
||||
* struct mmci_platform_data - platform configuration for the MMCI
|
||||
* (also known as PL180) block.
|
||||
* @f_max: the maximum operational frequency for this host in this
|
||||
* platform configuration. When this is specified it takes precedence
|
||||
* over the module parameter for the same frequency.
|
||||
* @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
|
||||
* @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
|
||||
* @gpio_wp: read this GPIO pin to see if the card is write protected
|
||||
* @gpio_cd: read this GPIO pin to detect card insertion
|
||||
* @capabilities: the capabilities of the block as implemented in
|
||||
* this platform, signify anything MMC_CAP_* from mmc/host.h
|
||||
*/
|
||||
struct mmci_platform_data {
|
||||
unsigned int ocr_mask; /* available voltages */
|
||||
unsigned int f_max;
|
||||
unsigned int ocr_mask;
|
||||
u32 (*translate_vdd)(struct device *, unsigned int);
|
||||
unsigned int (*status)(struct device *);
|
||||
int gpio_wp;
|
||||
|
||||
@@ -467,7 +467,7 @@ enum ata_ioctls {
|
||||
|
||||
/* core structures */
|
||||
|
||||
struct ata_prd {
|
||||
struct ata_bmdma_prd {
|
||||
__le32 addr;
|
||||
__le32 flags_len;
|
||||
};
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/writeback.h>
|
||||
#include <asm/atomic.h>
|
||||
|
||||
@@ -88,6 +89,8 @@ struct backing_dev_info {
|
||||
|
||||
struct device *dev;
|
||||
|
||||
struct timer_list laptop_mode_wb_timer;
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
struct dentry *debug_dir;
|
||||
struct dentry *debug_stats;
|
||||
@@ -101,10 +104,12 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent,
|
||||
const char *fmt, ...);
|
||||
int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev);
|
||||
void bdi_unregister(struct backing_dev_info *bdi);
|
||||
int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int);
|
||||
void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb,
|
||||
long nr_pages);
|
||||
long nr_pages, int sb_locked);
|
||||
int bdi_writeback_task(struct bdi_writeback *wb);
|
||||
int bdi_has_dirty_io(struct backing_dev_info *bdi);
|
||||
void bdi_arm_supers_timer(void);
|
||||
|
||||
extern spinlock_t bdi_lock;
|
||||
extern struct list_head bdi_list;
|
||||
@@ -246,6 +251,7 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio);
|
||||
#endif
|
||||
|
||||
extern struct backing_dev_info default_backing_dev_info;
|
||||
extern struct backing_dev_info noop_backing_dev_info;
|
||||
void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page);
|
||||
|
||||
int writeback_in_progress(struct backing_dev_info *bdi);
|
||||
|
||||
@@ -10,6 +10,11 @@
|
||||
#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
|
||||
#endif
|
||||
|
||||
extern unsigned int __sw_hweight8(unsigned int w);
|
||||
extern unsigned int __sw_hweight16(unsigned int w);
|
||||
extern unsigned int __sw_hweight32(unsigned int w);
|
||||
extern unsigned long __sw_hweight64(__u64 w);
|
||||
|
||||
/*
|
||||
* Include this here because some architectures need generic_ffs/fls in
|
||||
* scope
|
||||
@@ -44,31 +49,6 @@ static inline unsigned long hweight_long(unsigned long w)
|
||||
return sizeof(w) == 4 ? hweight32(w) : hweight64(w);
|
||||
}
|
||||
|
||||
/*
|
||||
* Clearly slow versions of the hweightN() functions, their benefit is
|
||||
* of course compile time evaluation of constant arguments.
|
||||
*/
|
||||
#define HWEIGHT8(w) \
|
||||
( BUILD_BUG_ON_ZERO(!__builtin_constant_p(w)) + \
|
||||
(!!((w) & (1ULL << 0))) + \
|
||||
(!!((w) & (1ULL << 1))) + \
|
||||
(!!((w) & (1ULL << 2))) + \
|
||||
(!!((w) & (1ULL << 3))) + \
|
||||
(!!((w) & (1ULL << 4))) + \
|
||||
(!!((w) & (1ULL << 5))) + \
|
||||
(!!((w) & (1ULL << 6))) + \
|
||||
(!!((w) & (1ULL << 7))) )
|
||||
|
||||
#define HWEIGHT16(w) (HWEIGHT8(w) + HWEIGHT8((w) >> 8))
|
||||
#define HWEIGHT32(w) (HWEIGHT16(w) + HWEIGHT16((w) >> 16))
|
||||
#define HWEIGHT64(w) (HWEIGHT32(w) + HWEIGHT32((w) >> 32))
|
||||
|
||||
/*
|
||||
* Type invariant version that simply casts things to the
|
||||
* largest type.
|
||||
*/
|
||||
#define HWEIGHT(w) HWEIGHT64((u64)(w))
|
||||
|
||||
/**
|
||||
* rol32 - rotate a 32-bit value left
|
||||
* @word: value to rotate
|
||||
|
||||
@@ -186,15 +186,19 @@ struct request {
|
||||
};
|
||||
|
||||
/*
|
||||
* two pointers are available for the IO schedulers, if they need
|
||||
* Three pointers are available for the IO schedulers, if they need
|
||||
* more they have to dynamically allocate it.
|
||||
*/
|
||||
void *elevator_private;
|
||||
void *elevator_private2;
|
||||
void *elevator_private3;
|
||||
|
||||
struct gendisk *rq_disk;
|
||||
unsigned long start_time;
|
||||
|
||||
#ifdef CONFIG_BLK_CGROUP
|
||||
unsigned long long start_time_ns;
|
||||
unsigned long long io_start_time_ns; /* when passed to hardware */
|
||||
#endif
|
||||
/* Number of scatter-gather DMA addr+len pairs after
|
||||
* physical address coalescing is performed.
|
||||
*/
|
||||
@@ -917,7 +921,12 @@ extern void blk_abort_queue(struct request_queue *);
|
||||
*/
|
||||
extern struct request_queue *blk_init_queue_node(request_fn_proc *rfn,
|
||||
spinlock_t *lock, int node_id);
|
||||
extern struct request_queue *blk_init_allocated_queue_node(struct request_queue *,
|
||||
request_fn_proc *,
|
||||
spinlock_t *, int node_id);
|
||||
extern struct request_queue *blk_init_queue(request_fn_proc *, spinlock_t *);
|
||||
extern struct request_queue *blk_init_allocated_queue(struct request_queue *,
|
||||
request_fn_proc *, spinlock_t *);
|
||||
extern void blk_cleanup_queue(struct request_queue *);
|
||||
extern void blk_queue_make_request(struct request_queue *, make_request_fn *);
|
||||
extern void blk_queue_bounce_limit(struct request_queue *, u64);
|
||||
@@ -994,20 +1003,25 @@ static inline struct request *blk_map_queue_find_tag(struct blk_queue_tag *bqt,
|
||||
return NULL;
|
||||
return bqt->tag_index[tag];
|
||||
}
|
||||
|
||||
extern int blkdev_issue_flush(struct block_device *, sector_t *);
|
||||
#define DISCARD_FL_WAIT 0x01 /* wait for completion */
|
||||
#define DISCARD_FL_BARRIER 0x02 /* issue DISCARD_BARRIER request */
|
||||
extern int blkdev_issue_discard(struct block_device *, sector_t sector,
|
||||
sector_t nr_sects, gfp_t, int flags);
|
||||
|
||||
enum{
|
||||
BLKDEV_WAIT, /* wait for completion */
|
||||
BLKDEV_BARRIER, /*issue request with barrier */
|
||||
};
|
||||
#define BLKDEV_IFL_WAIT (1 << BLKDEV_WAIT)
|
||||
#define BLKDEV_IFL_BARRIER (1 << BLKDEV_BARRIER)
|
||||
extern int blkdev_issue_flush(struct block_device *, gfp_t, sector_t *,
|
||||
unsigned long);
|
||||
extern int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
|
||||
sector_t nr_sects, gfp_t gfp_mask, unsigned long flags);
|
||||
extern int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
|
||||
sector_t nr_sects, gfp_t gfp_mask, unsigned long flags);
|
||||
static inline int sb_issue_discard(struct super_block *sb,
|
||||
sector_t block, sector_t nr_blocks)
|
||||
{
|
||||
block <<= (sb->s_blocksize_bits - 9);
|
||||
nr_blocks <<= (sb->s_blocksize_bits - 9);
|
||||
return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_KERNEL,
|
||||
DISCARD_FL_BARRIER);
|
||||
BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER);
|
||||
}
|
||||
|
||||
extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm);
|
||||
@@ -1196,6 +1210,39 @@ static inline void put_dev_sector(Sector p)
|
||||
struct work_struct;
|
||||
int kblockd_schedule_work(struct request_queue *q, struct work_struct *work);
|
||||
|
||||
#ifdef CONFIG_BLK_CGROUP
|
||||
static inline void set_start_time_ns(struct request *req)
|
||||
{
|
||||
req->start_time_ns = sched_clock();
|
||||
}
|
||||
|
||||
static inline void set_io_start_time_ns(struct request *req)
|
||||
{
|
||||
req->io_start_time_ns = sched_clock();
|
||||
}
|
||||
|
||||
static inline uint64_t rq_start_time_ns(struct request *req)
|
||||
{
|
||||
return req->start_time_ns;
|
||||
}
|
||||
|
||||
static inline uint64_t rq_io_start_time_ns(struct request *req)
|
||||
{
|
||||
return req->io_start_time_ns;
|
||||
}
|
||||
#else
|
||||
static inline void set_start_time_ns(struct request *req) {}
|
||||
static inline void set_io_start_time_ns(struct request *req) {}
|
||||
static inline uint64_t rq_start_time_ns(struct request *req)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline uint64_t rq_io_start_time_ns(struct request *req)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MODULE_ALIAS_BLOCKDEV(major,minor) \
|
||||
MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor))
|
||||
#define MODULE_ALIAS_BLOCKDEV_MAJOR(major) \
|
||||
@@ -1283,10 +1330,11 @@ struct block_device_operations {
|
||||
int (*direct_access) (struct block_device *, sector_t,
|
||||
void **, unsigned long *);
|
||||
int (*media_changed) (struct gendisk *);
|
||||
unsigned long long (*set_capacity) (struct gendisk *,
|
||||
unsigned long long);
|
||||
void (*unlock_native_capacity) (struct gendisk *);
|
||||
int (*revalidate_disk) (struct gendisk *);
|
||||
int (*getgeo)(struct block_device *, struct hd_geometry *);
|
||||
/* this callback is with swap_lock and sometimes page table lock held */
|
||||
void (*swap_slot_free_notify) (struct block_device *, unsigned long);
|
||||
struct module *owner;
|
||||
};
|
||||
|
||||
|
||||
165
include/linux/caif/caif_socket.h
Normal file
165
include/linux/caif/caif_socket.h
Normal file
@@ -0,0 +1,165 @@
|
||||
/* linux/caif_socket.h
|
||||
* CAIF Definitions for CAIF socket and network layer
|
||||
* Copyright (C) ST-Ericsson AB 2010
|
||||
* Author: Sjur Brendeland/ sjur.brandeland@stericsson.com
|
||||
* License terms: GNU General Public License (GPL) version 2
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_CAIF_SOCKET_H
|
||||
#define _LINUX_CAIF_SOCKET_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/socket.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* enum caif_link_selector - Physical Link Selection.
|
||||
* @CAIF_LINK_HIGH_BANDW: Physical interface for high-bandwidth
|
||||
* traffic.
|
||||
* @CAIF_LINK_LOW_LATENCY: Physical interface for low-latency
|
||||
* traffic.
|
||||
*
|
||||
* CAIF Link Layers can register their link properties.
|
||||
* This enum is used for choosing between CAIF Link Layers when
|
||||
* setting up CAIF Channels when multiple CAIF Link Layers exists.
|
||||
*/
|
||||
enum caif_link_selector {
|
||||
CAIF_LINK_HIGH_BANDW,
|
||||
CAIF_LINK_LOW_LATENCY
|
||||
};
|
||||
|
||||
/**
|
||||
* enum caif_channel_priority - CAIF channel priorities.
|
||||
*
|
||||
* @CAIF_PRIO_MIN: Min priority for a channel.
|
||||
* @CAIF_PRIO_LOW: Low-priority channel.
|
||||
* @CAIF_PRIO_NORMAL: Normal/default priority level.
|
||||
* @CAIF_PRIO_HIGH: High priority level
|
||||
* @CAIF_PRIO_MAX: Max priority for channel
|
||||
*
|
||||
* Priority can be set on CAIF Channels in order to
|
||||
* prioritize between traffic on different CAIF Channels.
|
||||
* These priority levels are recommended, but the priority value
|
||||
* is not restricted to the values defined in this enum, any value
|
||||
* between CAIF_PRIO_MIN and CAIF_PRIO_MAX could be used.
|
||||
*/
|
||||
enum caif_channel_priority {
|
||||
CAIF_PRIO_MIN = 0x01,
|
||||
CAIF_PRIO_LOW = 0x04,
|
||||
CAIF_PRIO_NORMAL = 0x0f,
|
||||
CAIF_PRIO_HIGH = 0x14,
|
||||
CAIF_PRIO_MAX = 0x1F
|
||||
};
|
||||
|
||||
/**
|
||||
* enum caif_protocol_type - CAIF Channel type.
|
||||
* @CAIFPROTO_AT: Classic AT channel.
|
||||
* @CAIFPROTO_DATAGRAM: Datagram channel.
|
||||
* @CAIFPROTO_DATAGRAM_LOOP: Datagram loopback channel, used for testing.
|
||||
* @CAIFPROTO_UTIL: Utility (Psock) channel.
|
||||
* @CAIFPROTO_RFM: Remote File Manager
|
||||
*
|
||||
* This enum defines the CAIF Channel type to be used. This defines
|
||||
* the service to connect to on the modem.
|
||||
*/
|
||||
enum caif_protocol_type {
|
||||
CAIFPROTO_AT,
|
||||
CAIFPROTO_DATAGRAM,
|
||||
CAIFPROTO_DATAGRAM_LOOP,
|
||||
CAIFPROTO_UTIL,
|
||||
CAIFPROTO_RFM,
|
||||
_CAIFPROTO_MAX
|
||||
};
|
||||
#define CAIFPROTO_MAX _CAIFPROTO_MAX
|
||||
|
||||
/**
|
||||
* enum caif_at_type - AT Service Endpoint
|
||||
* @CAIF_ATTYPE_PLAIN: Connects to a plain vanilla AT channel.
|
||||
*/
|
||||
enum caif_at_type {
|
||||
CAIF_ATTYPE_PLAIN = 2
|
||||
};
|
||||
|
||||
/**
|
||||
* struct sockaddr_caif - the sockaddr structure for CAIF sockets.
|
||||
* @family: Address family number, must be AF_CAIF.
|
||||
* @u: Union of address data 'switched' by family.
|
||||
* :
|
||||
* @u.at: Applies when family = CAIFPROTO_AT.
|
||||
*
|
||||
* @u.at.type: Type of AT link to set up (enum caif_at_type).
|
||||
*
|
||||
* @u.util: Applies when family = CAIFPROTO_UTIL
|
||||
*
|
||||
* @u.util.service: Utility service name.
|
||||
*
|
||||
* @u.dgm: Applies when family = CAIFPROTO_DATAGRAM
|
||||
*
|
||||
* @u.dgm.connection_id: Datagram connection id.
|
||||
*
|
||||
* @u.dgm.nsapi: NSAPI of the PDP-Context.
|
||||
*
|
||||
* @u.rfm: Applies when family = CAIFPROTO_RFM
|
||||
*
|
||||
* @u.rfm.connection_id: Connection ID for RFM.
|
||||
*
|
||||
* @u.rfm.volume: Volume to mount.
|
||||
*
|
||||
* Description:
|
||||
* This structure holds the connect parameters used for setting up a
|
||||
* CAIF Channel. It defines the service to connect to on the modem.
|
||||
*/
|
||||
struct sockaddr_caif {
|
||||
sa_family_t family;
|
||||
union {
|
||||
struct {
|
||||
__u8 type; /* type: enum caif_at_type */
|
||||
} at; /* CAIFPROTO_AT */
|
||||
struct {
|
||||
char service[16];
|
||||
} util; /* CAIFPROTO_UTIL */
|
||||
union {
|
||||
__u32 connection_id;
|
||||
__u8 nsapi;
|
||||
} dgm; /* CAIFPROTO_DATAGRAM(_LOOP)*/
|
||||
struct {
|
||||
__u32 connection_id;
|
||||
char volume[16];
|
||||
} rfm; /* CAIFPROTO_RFM */
|
||||
} u;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum caif_socket_opts - CAIF option values for getsockopt and setsockopt.
|
||||
*
|
||||
* @CAIFSO_LINK_SELECT: Selector used if multiple CAIF Link layers are
|
||||
* available. Either a high bandwidth
|
||||
* link can be selected (CAIF_LINK_HIGH_BANDW) or
|
||||
* or a low latency link (CAIF_LINK_LOW_LATENCY).
|
||||
* This option is of type __u32.
|
||||
* Alternatively SO_BINDTODEVICE can be used.
|
||||
*
|
||||
* @CAIFSO_REQ_PARAM: Used to set the request parameters for a
|
||||
* utility channel. (maximum 256 bytes). This
|
||||
* option must be set before connecting.
|
||||
*
|
||||
* @CAIFSO_RSP_PARAM: Gets the response parameters for a utility
|
||||
* channel. (maximum 256 bytes). This option
|
||||
* is valid after a successful connect.
|
||||
*
|
||||
*
|
||||
* This enum defines the CAIF Socket options to be used on a socket
|
||||
* of type PF_CAIF.
|
||||
*
|
||||
*/
|
||||
enum caif_socket_opts {
|
||||
CAIFSO_LINK_SELECT = 127,
|
||||
CAIFSO_REQ_PARAM = 128,
|
||||
CAIFSO_RSP_PARAM = 129,
|
||||
};
|
||||
|
||||
#endif /* _LINUX_CAIF_SOCKET_H */
|
||||
34
include/linux/caif/if_caif.h
Normal file
34
include/linux/caif/if_caif.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (C) ST-Ericsson AB 2010
|
||||
* Author: Sjur Brendeland/ sjur.brandeland@stericsson.com
|
||||
* License terms: GNU General Public License (GPL) version 2
|
||||
*/
|
||||
|
||||
#ifndef IF_CAIF_H_
|
||||
#define IF_CAIF_H_
|
||||
#include <linux/sockios.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/socket.h>
|
||||
|
||||
/**
|
||||
* enum ifla_caif - CAIF NetlinkRT parameters.
|
||||
* @IFLA_CAIF_IPV4_CONNID: Connection ID for IPv4 PDP Context.
|
||||
* The type of attribute is NLA_U32.
|
||||
* @IFLA_CAIF_IPV6_CONNID: Connection ID for IPv6 PDP Context.
|
||||
* The type of attribute is NLA_U32.
|
||||
* @IFLA_CAIF_LOOPBACK: If different from zero, device is doing loopback
|
||||
* The type of attribute is NLA_U8.
|
||||
*
|
||||
* When using RT Netlink to create, destroy or configure a CAIF IP interface,
|
||||
* enum ifla_caif is used to specify the configuration attributes.
|
||||
*/
|
||||
enum ifla_caif {
|
||||
__IFLA_CAIF_UNSPEC,
|
||||
IFLA_CAIF_IPV4_CONNID,
|
||||
IFLA_CAIF_IPV6_CONNID,
|
||||
IFLA_CAIF_LOOPBACK,
|
||||
__IFLA_CAIF_MAX
|
||||
};
|
||||
#define IFLA_CAIF_MAX (__IFLA_CAIF_MAX-1)
|
||||
|
||||
#endif /*IF_CAIF_H_*/
|
||||
@@ -14,6 +14,7 @@
|
||||
#ifndef CAN_DEV_H
|
||||
#define CAN_DEV_H
|
||||
|
||||
#include <linux/can.h>
|
||||
#include <linux/can/netlink.h>
|
||||
#include <linux/can/error.h>
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
struct mcp251x_platform_data {
|
||||
unsigned long oscillator_frequency;
|
||||
int model;
|
||||
#define CAN_MCP251X_MCP2510 0
|
||||
#define CAN_MCP251X_MCP2515 1
|
||||
#define CAN_MCP251X_MCP2510 0x2510
|
||||
#define CAN_MCP251X_MCP2515 0x2515
|
||||
int (*board_specific_setup)(struct spi_device *spi);
|
||||
int (*transceiver_enable)(int enable);
|
||||
int (*power_enable) (int enable);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#define OCR_TX_SHIFT 2
|
||||
|
||||
struct sja1000_platform_data {
|
||||
u32 clock; /* CAN bus oscillator frequency in Hz */
|
||||
u32 osc_freq; /* CAN bus oscillator frequency in Hz */
|
||||
|
||||
u8 ocr; /* output control register */
|
||||
u8 cdr; /* clock divider register */
|
||||
|
||||
@@ -530,6 +530,7 @@ static inline struct cgroup_subsys_state *task_subsys_state(
|
||||
{
|
||||
return rcu_dereference_check(task->cgroups->subsys[subsys_id],
|
||||
rcu_read_lock_held() ||
|
||||
lockdep_is_held(&task->alloc_lock) ||
|
||||
cgroup_lock_is_held());
|
||||
}
|
||||
|
||||
|
||||
@@ -273,7 +273,6 @@ static inline s64 clocksource_cyc2ns(cycle_t cycles, u32 mult, u32 shift)
|
||||
}
|
||||
|
||||
|
||||
/* used to install a new clocksource */
|
||||
extern int clocksource_register(struct clocksource*);
|
||||
extern void clocksource_unregister(struct clocksource*);
|
||||
extern void clocksource_touch_watchdog(void);
|
||||
@@ -287,6 +286,24 @@ extern void clocksource_mark_unstable(struct clocksource *cs);
|
||||
extern void
|
||||
clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec);
|
||||
|
||||
/*
|
||||
* Don't call __clocksource_register_scale directly, use
|
||||
* clocksource_register_hz/khz
|
||||
*/
|
||||
extern int
|
||||
__clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq);
|
||||
|
||||
static inline int clocksource_register_hz(struct clocksource *cs, u32 hz)
|
||||
{
|
||||
return __clocksource_register_scale(cs, 1, hz);
|
||||
}
|
||||
|
||||
static inline int clocksource_register_khz(struct clocksource *cs, u32 khz)
|
||||
{
|
||||
return __clocksource_register_scale(cs, 1000, khz);
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec)
|
||||
{
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#define MAX_CODADEVS 5 /* how many do we allow */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/backing-dev.h>
|
||||
|
||||
struct kstatfs;
|
||||
|
||||
/* communication pending/processing queues */
|
||||
@@ -17,6 +19,7 @@ struct venus_comm {
|
||||
struct list_head vc_processing;
|
||||
int vc_inuse;
|
||||
struct super_block *vc_sb;
|
||||
struct backing_dev_info bdi;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -278,6 +278,27 @@ struct freq_attr {
|
||||
ssize_t (*store)(struct cpufreq_policy *, const char *, size_t count);
|
||||
};
|
||||
|
||||
#define cpufreq_freq_attr_ro(_name) \
|
||||
static struct freq_attr _name = \
|
||||
__ATTR(_name, 0444, show_##_name, NULL)
|
||||
|
||||
#define cpufreq_freq_attr_ro_perm(_name, _perm) \
|
||||
static struct freq_attr _name = \
|
||||
__ATTR(_name, _perm, show_##_name, NULL)
|
||||
|
||||
#define cpufreq_freq_attr_ro_old(_name) \
|
||||
static struct freq_attr _name##_old = \
|
||||
__ATTR(_name, 0444, show_##_name##_old, NULL)
|
||||
|
||||
#define cpufreq_freq_attr_rw(_name) \
|
||||
static struct freq_attr _name = \
|
||||
__ATTR(_name, 0644, show_##_name, store_##_name)
|
||||
|
||||
#define cpufreq_freq_attr_rw_old(_name) \
|
||||
static struct freq_attr _name##_old = \
|
||||
__ATTR(_name, 0644, show_##_name##_old, store_##_name##_old)
|
||||
|
||||
|
||||
struct global_attr {
|
||||
struct attribute attr;
|
||||
ssize_t (*show)(struct kobject *kobj,
|
||||
@@ -286,6 +307,15 @@ struct global_attr {
|
||||
const char *c, size_t count);
|
||||
};
|
||||
|
||||
#define define_one_global_ro(_name) \
|
||||
static struct global_attr _name = \
|
||||
__ATTR(_name, 0444, show_##_name, NULL)
|
||||
|
||||
#define define_one_global_rw(_name) \
|
||||
static struct global_attr _name = \
|
||||
__ATTR(_name, 0644, show_##_name, store_##_name)
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* CPUFREQ 2.6. INTERFACE *
|
||||
*********************************************************************/
|
||||
|
||||
@@ -21,8 +21,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_cpus_allowed(struct task_struct *p, struct cpumask *mask);
|
||||
extern void cpuset_cpus_allowed_locked(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);
|
||||
#define cpuset_current_mems_allowed (current->mems_allowed)
|
||||
void cpuset_init_current_mems_allowed(void);
|
||||
@@ -69,9 +68,6 @@ struct seq_file;
|
||||
extern void cpuset_task_status_allowed(struct seq_file *m,
|
||||
struct task_struct *task);
|
||||
|
||||
extern void cpuset_lock(void);
|
||||
extern void cpuset_unlock(void);
|
||||
|
||||
extern int cpuset_mem_spread_node(void);
|
||||
|
||||
static inline int cpuset_do_page_mem_spread(void)
|
||||
@@ -105,10 +101,11 @@ static inline void cpuset_cpus_allowed(struct task_struct *p,
|
||||
{
|
||||
cpumask_copy(mask, cpu_possible_mask);
|
||||
}
|
||||
static inline void cpuset_cpus_allowed_locked(struct task_struct *p,
|
||||
struct cpumask *mask)
|
||||
|
||||
static inline int cpuset_cpus_allowed_fallback(struct task_struct *p)
|
||||
{
|
||||
cpumask_copy(mask, cpu_possible_mask);
|
||||
cpumask_copy(&p->cpus_allowed, cpu_possible_mask);
|
||||
return cpumask_any(cpu_active_mask);
|
||||
}
|
||||
|
||||
static inline nodemask_t cpuset_mems_allowed(struct task_struct *p)
|
||||
@@ -157,9 +154,6 @@ static inline void cpuset_task_status_allowed(struct seq_file *m,
|
||||
{
|
||||
}
|
||||
|
||||
static inline void cpuset_lock(void) {}
|
||||
static inline void cpuset_unlock(void) {}
|
||||
|
||||
static inline int cpuset_mem_spread_node(void)
|
||||
{
|
||||
return 0;
|
||||
|
||||
@@ -186,6 +186,8 @@ d_iput: no no no yes
|
||||
|
||||
#define DCACHE_FSNOTIFY_PARENT_WATCHED 0x0080 /* Parent inode is watched by some fsnotify listener */
|
||||
|
||||
#define DCACHE_CANT_MOUNT 0x0100
|
||||
|
||||
extern spinlock_t dcache_lock;
|
||||
extern seqlock_t rename_lock;
|
||||
|
||||
@@ -358,6 +360,18 @@ static inline int d_unlinked(struct dentry *dentry)
|
||||
return d_unhashed(dentry) && !IS_ROOT(dentry);
|
||||
}
|
||||
|
||||
static inline int cant_mount(struct dentry *dentry)
|
||||
{
|
||||
return (dentry->d_flags & DCACHE_CANT_MOUNT);
|
||||
}
|
||||
|
||||
static inline void dont_mount(struct dentry *dentry)
|
||||
{
|
||||
spin_lock(&dentry->d_lock);
|
||||
dentry->d_flags |= DCACHE_CANT_MOUNT;
|
||||
spin_unlock(&dentry->d_lock);
|
||||
}
|
||||
|
||||
static inline struct dentry *dget_parent(struct dentry *dentry)
|
||||
{
|
||||
struct dentry *ret;
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define DCB_PROTO_VERSION 1
|
||||
|
||||
struct dcbmsg {
|
||||
__u8 dcb_family;
|
||||
__u8 cmd;
|
||||
|
||||
@@ -20,12 +20,14 @@ struct debug_obj_descr;
|
||||
* struct debug_obj - representaion of an tracked object
|
||||
* @node: hlist node to link the object into the tracker list
|
||||
* @state: tracked object state
|
||||
* @astate: current active state
|
||||
* @object: pointer to the real object
|
||||
* @descr: pointer to an object type specific debug description structure
|
||||
*/
|
||||
struct debug_obj {
|
||||
struct hlist_node node;
|
||||
enum debug_obj_state state;
|
||||
unsigned int astate;
|
||||
void *object;
|
||||
struct debug_obj_descr *descr;
|
||||
};
|
||||
@@ -60,6 +62,15 @@ extern void debug_object_deactivate(void *addr, struct debug_obj_descr *descr);
|
||||
extern void debug_object_destroy (void *addr, struct debug_obj_descr *descr);
|
||||
extern void debug_object_free (void *addr, struct debug_obj_descr *descr);
|
||||
|
||||
/*
|
||||
* Active state:
|
||||
* - Set at 0 upon initialization.
|
||||
* - Must return to 0 before deactivation.
|
||||
*/
|
||||
extern void
|
||||
debug_object_active_state(void *addr, struct debug_obj_descr *descr,
|
||||
unsigned int expect, unsigned int next);
|
||||
|
||||
extern void debug_objects_early_init(void);
|
||||
extern void debug_objects_mem_init(void);
|
||||
#else
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/semaphore.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/device.h>
|
||||
|
||||
@@ -208,6 +207,9 @@ struct class {
|
||||
int (*suspend)(struct device *dev, pm_message_t state);
|
||||
int (*resume)(struct device *dev);
|
||||
|
||||
const struct kobj_ns_type_operations *ns_type;
|
||||
const void *(*namespace)(struct device *dev);
|
||||
|
||||
const struct dev_pm_ops *pm;
|
||||
|
||||
struct class_private *p;
|
||||
@@ -409,7 +411,7 @@ struct device {
|
||||
const char *init_name; /* initial name of the device */
|
||||
struct device_type *type;
|
||||
|
||||
struct semaphore sem; /* semaphore to synchronize calls to
|
||||
struct mutex mutex; /* mutex to synchronize calls to
|
||||
* its driver.
|
||||
*/
|
||||
|
||||
@@ -459,6 +461,10 @@ struct device {
|
||||
|
||||
static inline const char *dev_name(const struct device *dev)
|
||||
{
|
||||
/* Use the init name until the kobject becomes available */
|
||||
if (dev->init_name)
|
||||
return dev->init_name;
|
||||
|
||||
return kobject_name(&dev->kobj);
|
||||
}
|
||||
|
||||
@@ -518,17 +524,17 @@ static inline bool device_async_suspend_enabled(struct device *dev)
|
||||
|
||||
static inline void device_lock(struct device *dev)
|
||||
{
|
||||
down(&dev->sem);
|
||||
mutex_lock(&dev->mutex);
|
||||
}
|
||||
|
||||
static inline int device_trylock(struct device *dev)
|
||||
{
|
||||
return down_trylock(&dev->sem);
|
||||
return mutex_trylock(&dev->mutex);
|
||||
}
|
||||
|
||||
static inline void device_unlock(struct device *dev)
|
||||
{
|
||||
up(&dev->sem);
|
||||
mutex_unlock(&dev->mutex);
|
||||
}
|
||||
|
||||
void driver_init(void);
|
||||
|
||||
@@ -40,11 +40,13 @@ typedef s32 dma_cookie_t;
|
||||
* enum dma_status - DMA transaction status
|
||||
* @DMA_SUCCESS: transaction completed successfully
|
||||
* @DMA_IN_PROGRESS: transaction not yet processed
|
||||
* @DMA_PAUSED: transaction is paused
|
||||
* @DMA_ERROR: transaction failed
|
||||
*/
|
||||
enum dma_status {
|
||||
DMA_SUCCESS,
|
||||
DMA_IN_PROGRESS,
|
||||
DMA_PAUSED,
|
||||
DMA_ERROR,
|
||||
};
|
||||
|
||||
@@ -106,6 +108,19 @@ enum dma_ctrl_flags {
|
||||
DMA_PREP_FENCE = (1 << 9),
|
||||
};
|
||||
|
||||
/**
|
||||
* enum dma_ctrl_cmd - DMA operations that can optionally be exercised
|
||||
* on a running channel.
|
||||
* @DMA_TERMINATE_ALL: terminate all ongoing transfers
|
||||
* @DMA_PAUSE: pause ongoing transfers
|
||||
* @DMA_RESUME: resume paused transfer
|
||||
*/
|
||||
enum dma_ctrl_cmd {
|
||||
DMA_TERMINATE_ALL,
|
||||
DMA_PAUSE,
|
||||
DMA_RESUME,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum sum_check_bits - bit position of pq_check_flags
|
||||
*/
|
||||
@@ -230,9 +245,84 @@ struct dma_async_tx_descriptor {
|
||||
dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx);
|
||||
dma_async_tx_callback callback;
|
||||
void *callback_param;
|
||||
#ifndef CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH
|
||||
struct dma_async_tx_descriptor *next;
|
||||
struct dma_async_tx_descriptor *parent;
|
||||
spinlock_t lock;
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH
|
||||
static inline void txd_lock(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
}
|
||||
static inline void txd_unlock(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
}
|
||||
static inline void txd_chain(struct dma_async_tx_descriptor *txd, struct dma_async_tx_descriptor *next)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
static inline void txd_clear_parent(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
}
|
||||
static inline void txd_clear_next(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
}
|
||||
static inline struct dma_async_tx_descriptor *txd_next(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
static inline struct dma_async_tx_descriptor *txd_parent(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#else
|
||||
static inline void txd_lock(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
spin_lock_bh(&txd->lock);
|
||||
}
|
||||
static inline void txd_unlock(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
spin_unlock_bh(&txd->lock);
|
||||
}
|
||||
static inline void txd_chain(struct dma_async_tx_descriptor *txd, struct dma_async_tx_descriptor *next)
|
||||
{
|
||||
txd->next = next;
|
||||
next->parent = txd;
|
||||
}
|
||||
static inline void txd_clear_parent(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
txd->parent = NULL;
|
||||
}
|
||||
static inline void txd_clear_next(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
txd->next = NULL;
|
||||
}
|
||||
static inline struct dma_async_tx_descriptor *txd_parent(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
return txd->parent;
|
||||
}
|
||||
static inline struct dma_async_tx_descriptor *txd_next(struct dma_async_tx_descriptor *txd)
|
||||
{
|
||||
return txd->next;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* struct dma_tx_state - filled in to report the status of
|
||||
* a transfer.
|
||||
* @last: last completed DMA cookie
|
||||
* @used: last issued DMA cookie (i.e. the one in progress)
|
||||
* @residue: the remaining number of bytes left to transmit
|
||||
* on the selected transfer for states DMA_IN_PROGRESS and
|
||||
* DMA_PAUSED if this is implemented in the driver, else 0
|
||||
*/
|
||||
struct dma_tx_state {
|
||||
dma_cookie_t last;
|
||||
dma_cookie_t used;
|
||||
u32 residue;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -261,8 +351,12 @@ struct dma_async_tx_descriptor {
|
||||
* @device_prep_dma_memset: prepares a memset operation
|
||||
* @device_prep_dma_interrupt: prepares an end of chain interrupt operation
|
||||
* @device_prep_slave_sg: prepares a slave dma operation
|
||||
* @device_terminate_all: terminate all pending operations
|
||||
* @device_is_tx_complete: poll for transaction completion
|
||||
* @device_control: manipulate all pending operations on a channel, returns
|
||||
* zero or error code
|
||||
* @device_tx_status: poll for transaction completion, the optional
|
||||
* txstate parameter can be supplied with a pointer to get a
|
||||
* struct with auxilary transfer status information, otherwise the call
|
||||
* will just return a simple status code
|
||||
* @device_issue_pending: push pending transactions to hardware
|
||||
*/
|
||||
struct dma_device {
|
||||
@@ -313,11 +407,12 @@ struct dma_device {
|
||||
struct dma_chan *chan, struct scatterlist *sgl,
|
||||
unsigned int sg_len, enum dma_data_direction direction,
|
||||
unsigned long flags);
|
||||
void (*device_terminate_all)(struct dma_chan *chan);
|
||||
int (*device_control)(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
|
||||
unsigned long arg);
|
||||
|
||||
enum dma_status (*device_is_tx_complete)(struct dma_chan *chan,
|
||||
dma_cookie_t cookie, dma_cookie_t *last,
|
||||
dma_cookie_t *used);
|
||||
enum dma_status (*device_tx_status)(struct dma_chan *chan,
|
||||
dma_cookie_t cookie,
|
||||
struct dma_tx_state *txstate);
|
||||
void (*device_issue_pending)(struct dma_chan *chan);
|
||||
};
|
||||
|
||||
@@ -558,7 +653,15 @@ static inline void dma_async_issue_pending(struct dma_chan *chan)
|
||||
static inline enum dma_status dma_async_is_tx_complete(struct dma_chan *chan,
|
||||
dma_cookie_t cookie, dma_cookie_t *last, dma_cookie_t *used)
|
||||
{
|
||||
return chan->device->device_is_tx_complete(chan, cookie, last, used);
|
||||
struct dma_tx_state state;
|
||||
enum dma_status status;
|
||||
|
||||
status = chan->device->device_tx_status(chan, cookie, &state);
|
||||
if (last)
|
||||
*last = state.last;
|
||||
if (used)
|
||||
*used = state.used;
|
||||
return status;
|
||||
}
|
||||
|
||||
#define dma_async_memcpy_complete(chan, cookie, last, used)\
|
||||
@@ -586,6 +689,16 @@ static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie,
|
||||
return DMA_IN_PROGRESS;
|
||||
}
|
||||
|
||||
static inline void
|
||||
dma_set_tx_state(struct dma_tx_state *st, dma_cookie_t last, dma_cookie_t used, u32 residue)
|
||||
{
|
||||
if (st) {
|
||||
st->last = last;
|
||||
st->used = used;
|
||||
st->residue = residue;
|
||||
}
|
||||
}
|
||||
|
||||
enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
|
||||
#ifdef CONFIG_DMA_ENGINE
|
||||
enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);
|
||||
|
||||
@@ -109,6 +109,15 @@ typedef struct fs_disk_quota {
|
||||
#define FS_DQ_RTBWARNS (1<<11)
|
||||
#define FS_DQ_WARNS_MASK (FS_DQ_BWARNS | FS_DQ_IWARNS | FS_DQ_RTBWARNS)
|
||||
|
||||
/*
|
||||
* Accounting values. These can only be set for filesystem with
|
||||
* non-transactional quotas that require quotacheck(8) in userspace.
|
||||
*/
|
||||
#define FS_DQ_BCOUNT (1<<12)
|
||||
#define FS_DQ_ICOUNT (1<<13)
|
||||
#define FS_DQ_RTBCOUNT (1<<14)
|
||||
#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.
|
||||
*/
|
||||
|
||||
@@ -53,10 +53,10 @@
|
||||
|
||||
|
||||
extern const char *drbd_buildtag(void);
|
||||
#define REL_VERSION "8.3.7"
|
||||
#define REL_VERSION "8.3.8rc1"
|
||||
#define API_VERSION 88
|
||||
#define PRO_VERSION_MIN 86
|
||||
#define PRO_VERSION_MAX 92
|
||||
#define PRO_VERSION_MAX 94
|
||||
|
||||
|
||||
enum drbd_io_error_p {
|
||||
@@ -139,6 +139,7 @@ enum drbd_ret_codes {
|
||||
ERR_DATA_NOT_CURRENT = 150,
|
||||
ERR_CONNECTED = 151, /* DRBD 8.3 only */
|
||||
ERR_PERM = 152,
|
||||
ERR_NEED_APV_93 = 153,
|
||||
|
||||
/* insert new ones above this line */
|
||||
AFTER_LAST_ERR_CODE
|
||||
|
||||
@@ -133,5 +133,21 @@
|
||||
#define DRBD_MAX_BIO_BVECS_MAX 128
|
||||
#define DRBD_MAX_BIO_BVECS_DEF 0
|
||||
|
||||
#define DRBD_DP_VOLUME_MIN 4
|
||||
#define DRBD_DP_VOLUME_MAX 1048576
|
||||
#define DRBD_DP_VOLUME_DEF 16384
|
||||
|
||||
#define DRBD_DP_INTERVAL_MIN 1
|
||||
#define DRBD_DP_INTERVAL_MAX 600
|
||||
#define DRBD_DP_INTERVAL_DEF 5
|
||||
|
||||
#define DRBD_RS_THROTTLE_TH_MIN 1
|
||||
#define DRBD_RS_THROTTLE_TH_MAX 600
|
||||
#define DRBD_RS_THROTTLE_TH_DEF 20
|
||||
|
||||
#define DRBD_RS_HOLD_OFF_TH_MIN 1
|
||||
#define DRBD_RS_HOLD_OFF_TH_MAX 6000
|
||||
#define DRBD_RS_HOLD_OFF_TH_DEF 100
|
||||
|
||||
#undef RANGE
|
||||
#endif
|
||||
|
||||
@@ -71,12 +71,17 @@ NL_PACKET(disconnect, 6, )
|
||||
NL_PACKET(resize, 7,
|
||||
NL_INT64( 29, T_MAY_IGNORE, resize_size)
|
||||
NL_BIT( 68, T_MAY_IGNORE, resize_force)
|
||||
NL_BIT( 69, T_MANDATORY, no_resync)
|
||||
)
|
||||
|
||||
NL_PACKET(syncer_conf, 8,
|
||||
NL_INTEGER( 30, T_MAY_IGNORE, rate)
|
||||
NL_INTEGER( 31, T_MAY_IGNORE, after)
|
||||
NL_INTEGER( 32, T_MAY_IGNORE, al_extents)
|
||||
NL_INTEGER( 71, T_MAY_IGNORE, dp_volume)
|
||||
NL_INTEGER( 72, T_MAY_IGNORE, dp_interval)
|
||||
NL_INTEGER( 73, T_MAY_IGNORE, throttle_th)
|
||||
NL_INTEGER( 74, T_MAY_IGNORE, hold_off_th)
|
||||
NL_STRING( 52, T_MAY_IGNORE, verify_alg, SHARED_SECRET_MAX)
|
||||
NL_STRING( 51, T_MAY_IGNORE, cpu_mask, 32)
|
||||
NL_STRING( 64, T_MAY_IGNORE, csums_alg, SHARED_SECRET_MAX)
|
||||
|
||||
@@ -14,6 +14,9 @@ typedef void (elevator_merged_fn) (struct request_queue *, struct request *, int
|
||||
|
||||
typedef int (elevator_allow_merge_fn) (struct request_queue *, struct request *, struct bio *);
|
||||
|
||||
typedef void (elevator_bio_merged_fn) (struct request_queue *,
|
||||
struct request *, struct bio *);
|
||||
|
||||
typedef int (elevator_dispatch_fn) (struct request_queue *, int);
|
||||
|
||||
typedef void (elevator_add_req_fn) (struct request_queue *, struct request *);
|
||||
@@ -36,6 +39,7 @@ struct elevator_ops
|
||||
elevator_merged_fn *elevator_merged_fn;
|
||||
elevator_merge_req_fn *elevator_merge_req_fn;
|
||||
elevator_allow_merge_fn *elevator_allow_merge_fn;
|
||||
elevator_bio_merged_fn *elevator_bio_merged_fn;
|
||||
|
||||
elevator_dispatch_fn *elevator_dispatch_fn;
|
||||
elevator_add_req_fn *elevator_add_req_fn;
|
||||
@@ -103,6 +107,8 @@ extern int elv_merge(struct request_queue *, struct request **, struct bio *);
|
||||
extern void elv_merge_requests(struct request_queue *, struct request *,
|
||||
struct request *);
|
||||
extern void elv_merged_request(struct request_queue *, struct request *, int);
|
||||
extern void elv_bio_merged(struct request_queue *q, struct request *,
|
||||
struct bio *);
|
||||
extern void elv_requeue_request(struct request_queue *, struct request *);
|
||||
extern int elv_queue_empty(struct request_queue *);
|
||||
extern struct request *elv_former_request(struct request_queue *, struct request *);
|
||||
|
||||
@@ -394,6 +394,7 @@ typedef struct elf64_shdr {
|
||||
#define NT_S390_TODPREG 0x303 /* s390 TOD programmable register */
|
||||
#define NT_S390_CTRS 0x304 /* s390 control registers */
|
||||
#define NT_S390_PREFIX 0x305 /* s390 prefix register */
|
||||
#define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */
|
||||
|
||||
|
||||
/* Note header in a PT_NOTE section */
|
||||
|
||||
@@ -150,8 +150,6 @@ static inline int elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregse
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
/*
|
||||
* These functions parameterize elf_core_dump in fs/binfmt_elf.c to write out
|
||||
* extra segments containing the gate DSO contents. Dumping its
|
||||
@@ -168,4 +166,6 @@ extern int
|
||||
elf_core_write_extra_data(struct file *file, size_t *size, unsigned long limit);
|
||||
extern size_t elf_core_extra_data_size(void);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _LINUX_ELFCORE_H */
|
||||
|
||||
@@ -310,6 +310,7 @@ struct ethtool_perm_addr {
|
||||
enum ethtool_flags {
|
||||
ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */
|
||||
ETH_FLAG_NTUPLE = (1 << 27), /* N-tuple filters enabled */
|
||||
ETH_FLAG_RXHASH = (1 << 28),
|
||||
};
|
||||
|
||||
/* The following structures are for supporting RX network flow
|
||||
@@ -490,12 +491,12 @@ void ethtool_ntuple_flush(struct net_device *dev);
|
||||
* get_ufo: Report whether UDP fragmentation offload is enabled
|
||||
* set_ufo: Turn UDP fragmentation offload on or off
|
||||
* self_test: Run specified self-tests
|
||||
* get_strings: Return a set of strings that describe the requested objects
|
||||
* get_strings: Return a set of strings that describe the requested objects
|
||||
* phys_id: Identify the device
|
||||
* get_stats: Return statistics about the device
|
||||
* get_flags: get 32-bit flags bitmap
|
||||
* set_flags: set 32-bit flags bitmap
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* get_settings:
|
||||
@@ -531,14 +532,20 @@ struct ethtool_ops {
|
||||
int (*nway_reset)(struct net_device *);
|
||||
u32 (*get_link)(struct net_device *);
|
||||
int (*get_eeprom_len)(struct net_device *);
|
||||
int (*get_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *);
|
||||
int (*set_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *);
|
||||
int (*get_eeprom)(struct net_device *,
|
||||
struct ethtool_eeprom *, u8 *);
|
||||
int (*set_eeprom)(struct net_device *,
|
||||
struct ethtool_eeprom *, u8 *);
|
||||
int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *);
|
||||
int (*set_coalesce)(struct net_device *, struct ethtool_coalesce *);
|
||||
void (*get_ringparam)(struct net_device *, struct ethtool_ringparam *);
|
||||
int (*set_ringparam)(struct net_device *, struct ethtool_ringparam *);
|
||||
void (*get_pauseparam)(struct net_device *, struct ethtool_pauseparam*);
|
||||
int (*set_pauseparam)(struct net_device *, struct ethtool_pauseparam*);
|
||||
void (*get_ringparam)(struct net_device *,
|
||||
struct ethtool_ringparam *);
|
||||
int (*set_ringparam)(struct net_device *,
|
||||
struct ethtool_ringparam *);
|
||||
void (*get_pauseparam)(struct net_device *,
|
||||
struct ethtool_pauseparam*);
|
||||
int (*set_pauseparam)(struct net_device *,
|
||||
struct ethtool_pauseparam*);
|
||||
u32 (*get_rx_csum)(struct net_device *);
|
||||
int (*set_rx_csum)(struct net_device *, u32);
|
||||
u32 (*get_tx_csum)(struct net_device *);
|
||||
@@ -550,21 +557,24 @@ struct ethtool_ops {
|
||||
void (*self_test)(struct net_device *, struct ethtool_test *, u64 *);
|
||||
void (*get_strings)(struct net_device *, u32 stringset, u8 *);
|
||||
int (*phys_id)(struct net_device *, u32);
|
||||
void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *);
|
||||
void (*get_ethtool_stats)(struct net_device *,
|
||||
struct ethtool_stats *, u64 *);
|
||||
int (*begin)(struct net_device *);
|
||||
void (*complete)(struct net_device *);
|
||||
u32 (*get_ufo)(struct net_device *);
|
||||
int (*set_ufo)(struct net_device *, u32);
|
||||
u32 (*get_flags)(struct net_device *);
|
||||
int (*set_flags)(struct net_device *, u32);
|
||||
u32 (*get_priv_flags)(struct net_device *);
|
||||
int (*set_priv_flags)(struct net_device *, u32);
|
||||
u32 (*get_ufo)(struct net_device *);
|
||||
int (*set_ufo)(struct net_device *, u32);
|
||||
u32 (*get_flags)(struct net_device *);
|
||||
int (*set_flags)(struct net_device *, u32);
|
||||
u32 (*get_priv_flags)(struct net_device *);
|
||||
int (*set_priv_flags)(struct net_device *, u32);
|
||||
int (*get_sset_count)(struct net_device *, int);
|
||||
int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, void *);
|
||||
int (*get_rxnfc)(struct net_device *,
|
||||
struct ethtool_rxnfc *, void *);
|
||||
int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *);
|
||||
int (*flash_device)(struct net_device *, struct ethtool_flash *);
|
||||
int (*flash_device)(struct net_device *, struct ethtool_flash *);
|
||||
int (*reset)(struct net_device *, u32 *);
|
||||
int (*set_rx_ntuple)(struct net_device *, struct ethtool_rx_ntuple *);
|
||||
int (*set_rx_ntuple)(struct net_device *,
|
||||
struct ethtool_rx_ntuple *);
|
||||
int (*get_rx_ntuple)(struct net_device *, u32 stringset, void *);
|
||||
};
|
||||
#endif /* __KERNEL__ */
|
||||
@@ -576,29 +586,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) */
|
||||
@@ -609,24 +619,24 @@ 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 */
|
||||
#define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */
|
||||
#define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */
|
||||
#define ETHTOOL_GGRO 0x0000002b /* Get GRO enable (ethtool_value) */
|
||||
#define ETHTOOL_SGRO 0x0000002c /* Set GRO enable (ethtool_value) */
|
||||
#define ETHTOOL_GRXRINGS 0x0000002d /* Get RX rings available for LB */
|
||||
#define ETHTOOL_GRXCLSRLCNT 0x0000002e /* Get RX class rule count */
|
||||
#define ETHTOOL_GRXCLSRULE 0x0000002f /* Get RX classification rule */
|
||||
#define ETHTOOL_GRXCLSRLALL 0x00000030 /* Get all RX classification rule */
|
||||
#define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */
|
||||
#define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */
|
||||
#define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */
|
||||
#define ETHTOOL_RESET 0x00000034 /* Reset hardware */
|
||||
#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_GRXRINGS 0x0000002d /* Get RX rings available for LB */
|
||||
#define ETHTOOL_GRXCLSRLCNT 0x0000002e /* Get RX class rule count */
|
||||
#define ETHTOOL_GRXCLSRULE 0x0000002f /* Get RX classification rule */
|
||||
#define ETHTOOL_GRXCLSRLALL 0x00000030 /* Get all RX classification rule */
|
||||
#define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */
|
||||
#define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */
|
||||
#define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */
|
||||
#define ETHTOOL_RESET 0x00000034 /* Reset hardware */
|
||||
#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 */
|
||||
|
||||
/* compatibility with older code */
|
||||
#define SPARC_ETH_GSET ETHTOOL_GSET
|
||||
@@ -635,18 +645,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)
|
||||
@@ -656,8 +666,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)
|
||||
@@ -696,12 +706,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
|
||||
|
||||
@@ -715,7 +725,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 */
|
||||
@@ -746,8 +756,8 @@ struct ethtool_ops {
|
||||
#define AH_V6_FLOW 0x0b
|
||||
#define ESP_V6_FLOW 0x0c
|
||||
#define IP_USER_FLOW 0x0d
|
||||
#define IPV4_FLOW 0x10
|
||||
#define IPV6_FLOW 0x11
|
||||
#define IPV4_FLOW 0x10
|
||||
#define IPV6_FLOW 0x11
|
||||
|
||||
/* L3-L4 network traffic flow hash options */
|
||||
#define RXH_L2DA (1 << 1)
|
||||
|
||||
@@ -106,6 +106,15 @@ struct ext2_sb_info {
|
||||
spinlock_t s_rsv_window_lock;
|
||||
struct rb_root s_rsv_window_root;
|
||||
struct ext2_reserve_window_node s_rsv_window_head;
|
||||
/*
|
||||
* s_lock protects against concurrent modifications of s_mount_state,
|
||||
* s_blocks_last, s_overhead_last and the content of superblock's
|
||||
* buffer pointed to by sbi->s_es.
|
||||
*
|
||||
* Note: It is used in ext2_show_options() to provide a consistent view
|
||||
* of the mount options.
|
||||
*/
|
||||
spinlock_t s_lock;
|
||||
};
|
||||
|
||||
static inline spinlock_t *
|
||||
|
||||
@@ -403,6 +403,7 @@ struct fb_cursor {
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/backlight.h>
|
||||
#include <linux/slab.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
struct vm_area_struct;
|
||||
@@ -862,10 +863,22 @@ struct fb_info {
|
||||
/* we need the PCI or similiar aperture base/size not
|
||||
smem_start/size as smem_start may just be an object
|
||||
allocated inside the aperture so may not actually overlap */
|
||||
resource_size_t aperture_base;
|
||||
resource_size_t aperture_size;
|
||||
struct apertures_struct {
|
||||
unsigned int count;
|
||||
struct aperture {
|
||||
resource_size_t base;
|
||||
resource_size_t size;
|
||||
} ranges[0];
|
||||
} *apertures;
|
||||
};
|
||||
|
||||
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);
|
||||
a->count = max_num;
|
||||
return a;
|
||||
}
|
||||
|
||||
#ifdef MODULE
|
||||
#define FBINFO_DEFAULT FBINFO_MODULE
|
||||
#else
|
||||
@@ -958,6 +971,8 @@ extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf,
|
||||
/* drivers/video/fbmem.c */
|
||||
extern int register_framebuffer(struct fb_info *fb_info);
|
||||
extern int unregister_framebuffer(struct fb_info *fb_info);
|
||||
extern void remove_conflicting_framebuffers(struct apertures_struct *a,
|
||||
const char *name, bool primary);
|
||||
extern int fb_prepare_logo(struct fb_info *fb_info, int rotate);
|
||||
extern int fb_show_logo(struct fb_info *fb_info, int rotate);
|
||||
extern char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size);
|
||||
|
||||
@@ -21,6 +21,12 @@
|
||||
*/
|
||||
#define F_NOTIFY (F_LINUX_SPECIFIC_BASE+2)
|
||||
|
||||
/*
|
||||
* Set and get of pipe page size array
|
||||
*/
|
||||
#define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7)
|
||||
#define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8)
|
||||
|
||||
/*
|
||||
* Types of directory notifications that may be requested.
|
||||
*/
|
||||
|
||||
@@ -123,7 +123,8 @@ struct sock_fprog { /* Required for SO_ATTACH_FILTER. */
|
||||
#define SKF_AD_NLATTR_NEST 16
|
||||
#define SKF_AD_MARK 20
|
||||
#define SKF_AD_QUEUE 24
|
||||
#define SKF_AD_MAX 28
|
||||
#define SKF_AD_HATYPE 28
|
||||
#define SKF_AD_MAX 32
|
||||
#define SKF_NET_OFF (-0x100000)
|
||||
#define SKF_LL_OFF (-0x200000)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
struct firmware {
|
||||
size_t size;
|
||||
const u8 *data;
|
||||
struct page **pages;
|
||||
};
|
||||
|
||||
struct device;
|
||||
|
||||
@@ -651,6 +651,7 @@ struct block_device {
|
||||
int bd_openers;
|
||||
struct mutex bd_mutex; /* open/close mutex */
|
||||
struct list_head bd_inodes;
|
||||
void * bd_claiming;
|
||||
void * bd_holder;
|
||||
int bd_holders;
|
||||
#ifdef CONFIG_SYSFS
|
||||
@@ -1280,10 +1281,12 @@ static inline int lock_may_write(struct inode *inode, loff_t start,
|
||||
|
||||
|
||||
struct fasync_struct {
|
||||
int magic;
|
||||
int fa_fd;
|
||||
struct fasync_struct *fa_next; /* singly linked list */
|
||||
struct file *fa_file;
|
||||
spinlock_t fa_lock;
|
||||
int magic;
|
||||
int fa_fd;
|
||||
struct fasync_struct *fa_next; /* singly linked list */
|
||||
struct file *fa_file;
|
||||
struct rcu_head fa_rcu;
|
||||
};
|
||||
|
||||
#define FASYNC_MAGIC 0x4601
|
||||
@@ -1292,8 +1295,6 @@ struct fasync_struct {
|
||||
extern int fasync_helper(int, struct file *, int, struct fasync_struct **);
|
||||
/* can be called from interrupts */
|
||||
extern void kill_fasync(struct fasync_struct **, int, int);
|
||||
/* only for net: no internal synchronization */
|
||||
extern void __kill_fasync(struct fasync_struct *, int, int);
|
||||
|
||||
extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
|
||||
extern int f_setown(struct file *filp, unsigned long arg, int force);
|
||||
@@ -1314,8 +1315,6 @@ extern int send_sigurg(struct fown_struct *fown);
|
||||
extern struct list_head super_blocks;
|
||||
extern spinlock_t sb_lock;
|
||||
|
||||
#define sb_entry(list) list_entry((list), struct super_block, s_list)
|
||||
#define S_BIAS (1<<30)
|
||||
struct super_block {
|
||||
struct list_head s_list; /* Keep this first */
|
||||
dev_t s_dev; /* search index; _not_ kdev_t */
|
||||
@@ -1334,12 +1333,11 @@ struct super_block {
|
||||
struct rw_semaphore s_umount;
|
||||
struct mutex s_lock;
|
||||
int s_count;
|
||||
int s_need_sync;
|
||||
atomic_t s_active;
|
||||
#ifdef CONFIG_SECURITY
|
||||
void *s_security;
|
||||
#endif
|
||||
struct xattr_handler **s_xattr;
|
||||
const struct xattr_handler **s_xattr;
|
||||
|
||||
struct list_head s_inodes; /* all inodes */
|
||||
struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */
|
||||
@@ -1431,7 +1429,8 @@ extern void dentry_unhash(struct dentry *dentry);
|
||||
* VFS file helper functions.
|
||||
*/
|
||||
extern int file_permission(struct file *, int);
|
||||
|
||||
extern void inode_init_owner(struct inode *inode, const struct inode *dir,
|
||||
mode_t mode);
|
||||
/*
|
||||
* VFS FS_IOC_FIEMAP helper definitions.
|
||||
*/
|
||||
@@ -1744,6 +1743,7 @@ struct file_system_type {
|
||||
|
||||
struct lock_class_key s_lock_key;
|
||||
struct lock_class_key s_umount_key;
|
||||
struct lock_class_key s_vfs_rename_key;
|
||||
|
||||
struct lock_class_key i_lock_key;
|
||||
struct lock_class_key i_mutex_key;
|
||||
@@ -1781,8 +1781,6 @@ extern int get_sb_pseudo(struct file_system_type *, char *,
|
||||
const struct super_operations *ops, unsigned long,
|
||||
struct vfsmount *mnt);
|
||||
extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);
|
||||
int __put_super_and_need_restart(struct super_block *sb);
|
||||
void put_super(struct super_block *sb);
|
||||
|
||||
/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
|
||||
#define fops_get(fops) \
|
||||
@@ -1802,6 +1800,8 @@ extern void drop_collected_mounts(struct vfsmount *);
|
||||
extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *,
|
||||
struct vfsmount *);
|
||||
extern int vfs_statfs(struct dentry *, struct kstatfs *);
|
||||
extern int freeze_super(struct super_block *super);
|
||||
extern int thaw_super(struct super_block *super);
|
||||
|
||||
extern int current_umask(void);
|
||||
|
||||
@@ -2087,9 +2087,9 @@ extern int __filemap_fdatawrite_range(struct address_space *mapping,
|
||||
extern int filemap_fdatawrite_range(struct address_space *mapping,
|
||||
loff_t start, loff_t end);
|
||||
|
||||
extern int vfs_fsync_range(struct file *file, struct dentry *dentry,
|
||||
loff_t start, loff_t end, int datasync);
|
||||
extern int vfs_fsync(struct file *file, struct dentry *dentry, int datasync);
|
||||
extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end,
|
||||
int datasync);
|
||||
extern int vfs_fsync(struct file *file, int datasync);
|
||||
extern int generic_write_sync(struct file *file, loff_t pos, loff_t count);
|
||||
extern void sync_supers(void);
|
||||
extern void emergency_sync(void);
|
||||
@@ -2315,8 +2315,9 @@ extern int vfs_fstatat(int , char __user *, struct kstat *, int);
|
||||
extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
|
||||
unsigned long arg);
|
||||
extern int __generic_block_fiemap(struct inode *inode,
|
||||
struct fiemap_extent_info *fieinfo, u64 start,
|
||||
u64 len, get_block_t *get_block);
|
||||
struct fiemap_extent_info *fieinfo,
|
||||
loff_t start, loff_t len,
|
||||
get_block_t *get_block);
|
||||
extern int generic_block_fiemap(struct inode *inode,
|
||||
struct fiemap_extent_info *fieinfo, u64 start,
|
||||
u64 len, get_block_t *get_block);
|
||||
@@ -2328,6 +2329,7 @@ extern struct super_block *get_super(struct block_device *);
|
||||
extern struct super_block *get_active_super(struct block_device *bdev);
|
||||
extern struct super_block *user_get_super(dev_t);
|
||||
extern void drop_super(struct super_block *sb);
|
||||
extern void iterate_supers(void (*)(struct super_block *, void *), void *);
|
||||
|
||||
extern int dcache_dir_open(struct inode *, struct file *);
|
||||
extern int dcache_dir_close(struct inode *, struct file *);
|
||||
@@ -2361,6 +2363,8 @@ extern void simple_release_fs(struct vfsmount **mount, int *count);
|
||||
|
||||
extern ssize_t simple_read_from_buffer(void __user *to, size_t count,
|
||||
loff_t *ppos, const void *from, size_t available);
|
||||
extern ssize_t simple_write_to_buffer(void *to, size_t available, loff_t *ppos,
|
||||
const void __user *from, size_t count);
|
||||
|
||||
extern int simple_fsync(struct file *, struct dentry *, int);
|
||||
|
||||
|
||||
@@ -82,9 +82,13 @@ void clear_ftrace_function(void);
|
||||
extern void ftrace_stub(unsigned long a0, unsigned long a1);
|
||||
|
||||
#else /* !CONFIG_FUNCTION_TRACER */
|
||||
# define register_ftrace_function(ops) do { } while (0)
|
||||
# define unregister_ftrace_function(ops) do { } while (0)
|
||||
# define clear_ftrace_function(ops) do { } while (0)
|
||||
/*
|
||||
* (un)register_ftrace_function must be a macro since the ops parameter
|
||||
* must not be evaluated.
|
||||
*/
|
||||
#define register_ftrace_function(ops) ({ 0; })
|
||||
#define unregister_ftrace_function(ops) ({ 0; })
|
||||
static inline void clear_ftrace_function(void) { }
|
||||
static inline void ftrace_kill(void) { }
|
||||
static inline void ftrace_stop(void) { }
|
||||
static inline void ftrace_start(void) { }
|
||||
@@ -237,11 +241,13 @@ extern int skip_trace(unsigned long ip);
|
||||
extern void ftrace_disable_daemon(void);
|
||||
extern void ftrace_enable_daemon(void);
|
||||
#else
|
||||
# define skip_trace(ip) ({ 0; })
|
||||
# define ftrace_force_update() ({ 0; })
|
||||
# define ftrace_set_filter(buf, len, reset) do { } while (0)
|
||||
# define ftrace_disable_daemon() do { } while (0)
|
||||
# define ftrace_enable_daemon() do { } while (0)
|
||||
static inline int skip_trace(unsigned long ip) { return 0; }
|
||||
static inline int ftrace_force_update(void) { return 0; }
|
||||
static inline void ftrace_set_filter(unsigned char *buf, int len, int reset)
|
||||
{
|
||||
}
|
||||
static inline void ftrace_disable_daemon(void) { }
|
||||
static inline void ftrace_enable_daemon(void) { }
|
||||
static inline void ftrace_release_mod(struct module *mod) {}
|
||||
static inline int register_ftrace_command(struct ftrace_func_command *cmd)
|
||||
{
|
||||
@@ -314,16 +320,16 @@ static inline void __ftrace_enabled_restore(int enabled)
|
||||
extern void time_hardirqs_on(unsigned long a0, unsigned long a1);
|
||||
extern void time_hardirqs_off(unsigned long a0, unsigned long a1);
|
||||
#else
|
||||
# define time_hardirqs_on(a0, a1) do { } while (0)
|
||||
# define time_hardirqs_off(a0, a1) do { } while (0)
|
||||
static inline void time_hardirqs_on(unsigned long a0, unsigned long a1) { }
|
||||
static inline void time_hardirqs_off(unsigned long a0, unsigned long a1) { }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PREEMPT_TRACER
|
||||
extern void trace_preempt_on(unsigned long a0, unsigned long a1);
|
||||
extern void trace_preempt_off(unsigned long a0, unsigned long a1);
|
||||
#else
|
||||
# define trace_preempt_on(a0, a1) do { } while (0)
|
||||
# define trace_preempt_off(a0, a1) do { } while (0)
|
||||
static inline void trace_preempt_on(unsigned long a0, unsigned long a1) { }
|
||||
static inline void trace_preempt_off(unsigned long a0, unsigned long a1) { }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FTRACE_MCOUNT_RECORD
|
||||
@@ -352,6 +358,10 @@ struct ftrace_graph_ret {
|
||||
int depth;
|
||||
};
|
||||
|
||||
/* Type of the callback handlers for tracing function graph*/
|
||||
typedef void (*trace_func_graph_ret_t)(struct ftrace_graph_ret *); /* return */
|
||||
typedef int (*trace_func_graph_ent_t)(struct ftrace_graph_ent *); /* entry */
|
||||
|
||||
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
||||
|
||||
/* for init task */
|
||||
@@ -400,10 +410,6 @@ extern char __irqentry_text_end[];
|
||||
|
||||
#define FTRACE_RETFUNC_DEPTH 50
|
||||
#define FTRACE_RETSTACK_ALLOC_SIZE 32
|
||||
/* Type of the callback handlers for tracing function graph*/
|
||||
typedef void (*trace_func_graph_ret_t)(struct ftrace_graph_ret *); /* return */
|
||||
typedef int (*trace_func_graph_ent_t)(struct ftrace_graph_ent *); /* entry */
|
||||
|
||||
extern int register_ftrace_graph(trace_func_graph_ret_t retfunc,
|
||||
trace_func_graph_ent_t entryfunc);
|
||||
|
||||
@@ -441,6 +447,13 @@ static inline void unpause_graph_tracing(void)
|
||||
static inline void ftrace_graph_init_task(struct task_struct *t) { }
|
||||
static inline void ftrace_graph_exit_task(struct task_struct *t) { }
|
||||
|
||||
static inline int register_ftrace_graph(trace_func_graph_ret_t retfunc,
|
||||
trace_func_graph_ent_t entryfunc)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
static inline void unregister_ftrace_graph(void) { }
|
||||
|
||||
static inline int task_curr_ret_stack(struct task_struct *tsk)
|
||||
{
|
||||
return -1;
|
||||
@@ -492,7 +505,9 @@ static inline int test_tsk_trace_graph(struct task_struct *tsk)
|
||||
return tsk->trace & TSK_TRACE_FL_GRAPH;
|
||||
}
|
||||
|
||||
extern int ftrace_dump_on_oops;
|
||||
enum ftrace_dump_mode;
|
||||
|
||||
extern enum ftrace_dump_mode ftrace_dump_on_oops;
|
||||
|
||||
#ifdef CONFIG_PREEMPT
|
||||
#define INIT_TRACE_RECURSION .trace_recursion = 0,
|
||||
@@ -504,18 +519,6 @@ extern int ftrace_dump_on_oops;
|
||||
#define INIT_TRACE_RECURSION
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HW_BRANCH_TRACER
|
||||
|
||||
void trace_hw_branch(u64 from, u64 to);
|
||||
void trace_hw_branch_oops(void);
|
||||
|
||||
#else /* CONFIG_HW_BRANCH_TRACER */
|
||||
|
||||
static inline void trace_hw_branch(u64 from, u64 to) {}
|
||||
static inline void trace_hw_branch_oops(void) {}
|
||||
|
||||
#endif /* CONFIG_HW_BRANCH_TRACER */
|
||||
|
||||
#ifdef CONFIG_FTRACE_SYSCALLS
|
||||
|
||||
unsigned long arch_syscall_addr(int nr);
|
||||
|
||||
@@ -25,6 +25,9 @@ const char *ftrace_print_flags_seq(struct trace_seq *p, const char *delim,
|
||||
const char *ftrace_print_symbols_seq(struct trace_seq *p, unsigned long val,
|
||||
const struct trace_print_flags *symbol_array);
|
||||
|
||||
const char *ftrace_print_hex_seq(struct trace_seq *p,
|
||||
const unsigned char *buf, int len);
|
||||
|
||||
/*
|
||||
* The trace entry - the most basic unit of tracing. This is what
|
||||
* is printed in the end as a single line in the trace output, such as:
|
||||
@@ -58,6 +61,7 @@ struct trace_iterator {
|
||||
/* The below is zeroed out in pipe_read */
|
||||
struct trace_seq seq;
|
||||
struct trace_entry *ent;
|
||||
unsigned long lost_events;
|
||||
int leftover;
|
||||
int cpu;
|
||||
u64 ts;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
struct inode;
|
||||
|
||||
extern struct xattr_handler generic_acl_access_handler;
|
||||
extern struct xattr_handler generic_acl_default_handler;
|
||||
extern const struct xattr_handler generic_acl_access_handler;
|
||||
extern const struct xattr_handler generic_acl_default_handler;
|
||||
|
||||
int generic_acl_init(struct inode *, struct inode *);
|
||||
int generic_acl_chmod(struct inode *);
|
||||
|
||||
@@ -80,4 +80,12 @@ enum {
|
||||
|
||||
#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* All generic netlink requests are serialized by a global lock. */
|
||||
extern void genl_lock(void);
|
||||
extern void genl_unlock(void);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __LINUX_GENERIC_NETLINK_H */
|
||||
|
||||
25
include/linux/gsmmux.h
Normal file
25
include/linux/gsmmux.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef _LINUX_GSMMUX_H
|
||||
#define _LINUX_GSMMUX_H
|
||||
|
||||
struct gsm_config
|
||||
{
|
||||
unsigned int adaption;
|
||||
unsigned int encapsulation;
|
||||
unsigned int initiator;
|
||||
unsigned int t1;
|
||||
unsigned int t2;
|
||||
unsigned int t3;
|
||||
unsigned int n2;
|
||||
unsigned int mru;
|
||||
unsigned int mtu;
|
||||
unsigned int k;
|
||||
unsigned int i;
|
||||
unsigned int unused[8]; /* Padding for expansion without
|
||||
breaking stuff */
|
||||
};
|
||||
|
||||
#define GSMIOC_GETCONF _IOR('G', 0, struct gsm_config)
|
||||
#define GSMIOC_SETCONF _IOW('G', 1, struct gsm_config)
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,26 +0,0 @@
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
struct cpustate_t {
|
||||
spinlock_t lock;
|
||||
int excl;
|
||||
int open_count;
|
||||
unsigned char cached_val;
|
||||
int inited;
|
||||
unsigned long *set_addr;
|
||||
unsigned long *clr_addr;
|
||||
};
|
||||
|
||||
|
||||
#define HDPU_CPUSTATE_NAME "hdpu cpustate"
|
||||
#define HDPU_NEXUS_NAME "hdpu nexus"
|
||||
|
||||
#define CPUSTATE_KERNEL_MAJOR 0x10
|
||||
|
||||
#define CPUSTATE_KERNEL_INIT_DRV 0 /* CPU State Driver Initialized */
|
||||
#define CPUSTATE_KERNEL_INIT_PCI 1 /* 64360 PCI Busses Init */
|
||||
#define CPUSTATE_KERNEL_INIT_REG 2 /* 64360 Bridge Init */
|
||||
#define CPUSTATE_KERNEL_CPU1_KICK 3 /* Boot cpu 1 */
|
||||
#define CPUSTATE_KERNEL_CPU1_OK 4 /* Cpu 1 has checked in */
|
||||
#define CPUSTATE_KERNEL_OK 5 /* Terminal state */
|
||||
#define CPUSTATE_KERNEL_RESET 14 /* Board reset via SW*/
|
||||
#define CPUSTATE_KERNEL_HALT 15 /* Board halted via SW*/
|
||||
@@ -308,11 +308,13 @@ struct hid_item {
|
||||
#define HID_QUIRK_NOTOUCH 0x00000002
|
||||
#define HID_QUIRK_IGNORE 0x00000004
|
||||
#define HID_QUIRK_NOGET 0x00000008
|
||||
#define HID_QUIRK_HIDDEV_FORCE 0x00000010
|
||||
#define HID_QUIRK_BADPAD 0x00000020
|
||||
#define HID_QUIRK_MULTI_INPUT 0x00000040
|
||||
#define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000
|
||||
#define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000
|
||||
#define HID_QUIRK_NO_INIT_REPORTS 0x20000000
|
||||
#define HID_QUIRK_NO_IGNORE 0x40000000
|
||||
|
||||
/*
|
||||
* This is the global environment of the parser. This information is
|
||||
@@ -589,6 +591,9 @@ struct hid_usage_id {
|
||||
* @report_fixup: called before report descriptor parsing (NULL means nop)
|
||||
* @input_mapping: invoked on input registering before mapping an usage
|
||||
* @input_mapped: invoked on input registering after mapping an usage
|
||||
* @suspend: invoked on suspend (NULL means nop)
|
||||
* @resume: invoked on resume if device was not reset (NULL means nop)
|
||||
* @reset_resume: invoked on resume if device was reset (NULL means nop)
|
||||
*
|
||||
* raw_event and event should return 0 on no action performed, 1 when no
|
||||
* further processing should be done and negative on error
|
||||
@@ -629,6 +634,11 @@ struct hid_driver {
|
||||
int (*input_mapped)(struct hid_device *hdev,
|
||||
struct hid_input *hidinput, struct hid_field *field,
|
||||
struct hid_usage *usage, unsigned long **bit, int *max);
|
||||
#ifdef CONFIG_PM
|
||||
int (*suspend)(struct hid_device *hdev, pm_message_t message);
|
||||
int (*resume)(struct hid_device *hdev);
|
||||
int (*reset_resume)(struct hid_device *hdev);
|
||||
#endif
|
||||
/* private: */
|
||||
struct device_driver driver;
|
||||
};
|
||||
|
||||
@@ -422,6 +422,8 @@ extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl,
|
||||
|
||||
extern int schedule_hrtimeout_range(ktime_t *expires, unsigned long delta,
|
||||
const enum hrtimer_mode mode);
|
||||
extern int schedule_hrtimeout_range_clock(ktime_t *expires,
|
||||
unsigned long delta, const enum hrtimer_mode mode, int clock);
|
||||
extern int schedule_hrtimeout(ktime_t *expires, const enum hrtimer_mode mode);
|
||||
|
||||
/* Soft interrupt function to run the hrtimer queues: */
|
||||
|
||||
@@ -9,9 +9,22 @@ enum {
|
||||
};
|
||||
|
||||
enum {
|
||||
HW_BREAKPOINT_R = 1,
|
||||
HW_BREAKPOINT_W = 2,
|
||||
HW_BREAKPOINT_X = 4,
|
||||
HW_BREAKPOINT_EMPTY = 0,
|
||||
HW_BREAKPOINT_R = 1,
|
||||
HW_BREAKPOINT_W = 2,
|
||||
HW_BREAKPOINT_RW = HW_BREAKPOINT_R | HW_BREAKPOINT_W,
|
||||
HW_BREAKPOINT_X = 4,
|
||||
HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X,
|
||||
};
|
||||
|
||||
enum bp_type_idx {
|
||||
TYPE_INST = 0,
|
||||
#ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS
|
||||
TYPE_DATA = 0,
|
||||
#else
|
||||
TYPE_DATA = 1,
|
||||
#endif
|
||||
TYPE_MAX
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
@@ -34,6 +47,12 @@ static inline void hw_breakpoint_init(struct perf_event_attr *attr)
|
||||
attr->sample_period = 1;
|
||||
}
|
||||
|
||||
static inline void ptrace_breakpoint_init(struct perf_event_attr *attr)
|
||||
{
|
||||
hw_breakpoint_init(attr);
|
||||
attr->exclude_kernel = 1;
|
||||
}
|
||||
|
||||
static inline unsigned long hw_breakpoint_addr(struct perf_event *bp)
|
||||
{
|
||||
return bp->attr.bp_addr;
|
||||
|
||||
9
include/linux/i2c-omap.h
Normal file
9
include/linux/i2c-omap.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef __I2C_OMAP_H__
|
||||
#define __I2C_OMAP_H__
|
||||
|
||||
struct omap_i2c_bus_platform_data {
|
||||
u32 clkrate;
|
||||
void (*set_mpu_wkup_lat)(struct device *dev, long set);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -359,6 +359,8 @@ struct i2c_adapter {
|
||||
int nr;
|
||||
char name[48];
|
||||
struct completion dev_released;
|
||||
|
||||
struct list_head userspace_clients;
|
||||
};
|
||||
#define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev)
|
||||
|
||||
|
||||
@@ -496,7 +496,7 @@ struct twl4030_madc_platform_data {
|
||||
int irq_line;
|
||||
};
|
||||
|
||||
/* Boards have uniqe mappings of {row, col} --> keycode.
|
||||
/* Boards have unique mappings of {row, col} --> keycode.
|
||||
* Column and row are 8 bits each, but range only from 0..7.
|
||||
* a PERSISTENT_KEY is "always on" and never reported.
|
||||
*/
|
||||
@@ -569,9 +569,9 @@ struct twl4030_codec_data {
|
||||
struct twl4030_codec_audio_data *audio;
|
||||
struct twl4030_codec_vibra_data *vibra;
|
||||
|
||||
/* twl6030 */
|
||||
int audpwron_gpio; /* audio power-on gpio */
|
||||
int naudint_irq; /* audio interrupt */
|
||||
/* twl6040 */
|
||||
int audpwron_gpio; /* audio power-on gpio */
|
||||
int naudint_irq; /* audio interrupt */
|
||||
};
|
||||
|
||||
struct twl4030_platform_data {
|
||||
@@ -664,15 +664,15 @@ static inline int twl4030charger_usb_en(int enable) { return 0; }
|
||||
#define TWL4030_REG_VUSB3V1 19
|
||||
|
||||
/* TWL6030 SMPS/LDO's */
|
||||
/* EXTERNAL dc-to-dc buck convertor contollable via SR */
|
||||
/* EXTERNAL dc-to-dc buck convertor controllable via SR */
|
||||
#define TWL6030_REG_VDD1 30
|
||||
#define TWL6030_REG_VDD2 31
|
||||
#define TWL6030_REG_VDD3 32
|
||||
|
||||
/* Non SR compliant dc-to-dc buck convertors */
|
||||
#define TWL6030_REG_VMEM 33
|
||||
#define TWL6030_REG_VMEM 33
|
||||
#define TWL6030_REG_V2V1 34
|
||||
#define TWL6030_REG_V1V29 35
|
||||
#define TWL6030_REG_V1V29 35
|
||||
#define TWL6030_REG_V1V8 36
|
||||
|
||||
/* EXTERNAL LDOs */
|
||||
|
||||
@@ -362,7 +362,7 @@ struct ide_drive_s;
|
||||
struct ide_disk_ops {
|
||||
int (*check)(struct ide_drive_s *, const char *);
|
||||
int (*get_capacity)(struct ide_drive_s *);
|
||||
u64 (*set_capacity)(struct ide_drive_s *, u64);
|
||||
void (*unlock_native_capacity)(struct ide_drive_s *);
|
||||
void (*setup)(struct ide_drive_s *);
|
||||
void (*flush)(struct ide_drive_s *);
|
||||
int (*init_media)(struct ide_drive_s *, struct gendisk *);
|
||||
|
||||
@@ -876,6 +876,7 @@ struct ieee80211_ht_cap {
|
||||
#define IEEE80211_HT_CAP_SGI_40 0x0040
|
||||
#define IEEE80211_HT_CAP_TX_STBC 0x0080
|
||||
#define IEEE80211_HT_CAP_RX_STBC 0x0300
|
||||
#define IEEE80211_HT_CAP_RX_STBC_SHIFT 8
|
||||
#define IEEE80211_HT_CAP_DELAY_BA 0x0400
|
||||
#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800
|
||||
#define IEEE80211_HT_CAP_DSSSCCK40 0x1000
|
||||
@@ -1211,6 +1212,8 @@ enum ieee80211_category {
|
||||
WLAN_CATEGORY_SA_QUERY = 8,
|
||||
WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9,
|
||||
WLAN_CATEGORY_WMM = 17,
|
||||
WLAN_CATEGORY_MESH_PLINK = 30, /* Pending ANA approval */
|
||||
WLAN_CATEGORY_MESH_PATH_SEL = 32, /* Pending ANA approval */
|
||||
WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126,
|
||||
WLAN_CATEGORY_VENDOR_SPECIFIC = 127,
|
||||
};
|
||||
@@ -1324,7 +1327,6 @@ enum ieee80211_back_actioncode {
|
||||
enum ieee80211_back_parties {
|
||||
WLAN_BACK_RECIPIENT = 0,
|
||||
WLAN_BACK_INITIATOR = 1,
|
||||
WLAN_BACK_TIMER = 2,
|
||||
};
|
||||
|
||||
/* SA Query action */
|
||||
|
||||
@@ -71,6 +71,8 @@
|
||||
* release skb->dst
|
||||
*/
|
||||
#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 IF_GET_IFACE 0x0001 /* for querying only */
|
||||
#define IF_GET_PROTO 0x0002
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
|
||||
#define ARPHRD_PHONET 820 /* PhoNet media type */
|
||||
#define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */
|
||||
#define ARPHRD_CAIF 822 /* CAIF media type */
|
||||
|
||||
#define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */
|
||||
#define ARPHRD_NONE 0xFFFE /* zero header length */
|
||||
|
||||
@@ -109,6 +109,7 @@
|
||||
#define ETH_P_TRAILER 0x001C /* Trailer switch tagging */
|
||||
#define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */
|
||||
#define ETH_P_IEEE802154 0x00F6 /* IEEE802.15.4 frame */
|
||||
#define ETH_P_CAIF 0x00F7 /* ST-Ericsson CAIF protocol */
|
||||
|
||||
/*
|
||||
* This is an Ethernet frame header.
|
||||
|
||||
@@ -37,6 +37,38 @@ struct rtnl_link_stats {
|
||||
__u32 tx_compressed;
|
||||
};
|
||||
|
||||
struct rtnl_link_stats64 {
|
||||
__u64 rx_packets; /* total packets received */
|
||||
__u64 tx_packets; /* total packets transmitted */
|
||||
__u64 rx_bytes; /* total bytes received */
|
||||
__u64 tx_bytes; /* total bytes transmitted */
|
||||
__u64 rx_errors; /* bad packets received */
|
||||
__u64 tx_errors; /* packet transmit problems */
|
||||
__u64 rx_dropped; /* no space in linux buffers */
|
||||
__u64 tx_dropped; /* no space available in linux */
|
||||
__u64 multicast; /* multicast packets received */
|
||||
__u64 collisions;
|
||||
|
||||
/* detailed rx_errors: */
|
||||
__u64 rx_length_errors;
|
||||
__u64 rx_over_errors; /* receiver ring buff overflow */
|
||||
__u64 rx_crc_errors; /* recved pkt with crc error */
|
||||
__u64 rx_frame_errors; /* recv'd frame alignment error */
|
||||
__u64 rx_fifo_errors; /* recv'r fifo overrun */
|
||||
__u64 rx_missed_errors; /* receiver missed packet */
|
||||
|
||||
/* detailed tx_errors */
|
||||
__u64 tx_aborted_errors;
|
||||
__u64 tx_carrier_errors;
|
||||
__u64 tx_fifo_errors;
|
||||
__u64 tx_heartbeat_errors;
|
||||
__u64 tx_window_errors;
|
||||
|
||||
/* for cslip etc */
|
||||
__u64 rx_compressed;
|
||||
__u64 tx_compressed;
|
||||
};
|
||||
|
||||
/* The struct should be in sync with struct ifmap */
|
||||
struct rtnl_link_ifmap {
|
||||
__u64 mem_start;
|
||||
@@ -79,10 +111,10 @@ enum {
|
||||
IFLA_NET_NS_PID,
|
||||
IFLA_IFALIAS,
|
||||
IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */
|
||||
IFLA_VF_MAC, /* Hardware queue specific attributes */
|
||||
IFLA_VF_VLAN,
|
||||
IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */
|
||||
IFLA_VFINFO,
|
||||
IFLA_VFINFO_LIST,
|
||||
IFLA_STATS64,
|
||||
IFLA_VF_PORTS,
|
||||
IFLA_PORT_SELF,
|
||||
__IFLA_MAX
|
||||
};
|
||||
|
||||
@@ -203,6 +235,24 @@ enum macvlan_mode {
|
||||
|
||||
/* SR-IOV virtual function managment section */
|
||||
|
||||
enum {
|
||||
IFLA_VF_INFO_UNSPEC,
|
||||
IFLA_VF_INFO,
|
||||
__IFLA_VF_INFO_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_VF_INFO_MAX (__IFLA_VF_INFO_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_VF_UNSPEC,
|
||||
IFLA_VF_MAC, /* Hardware queue specific attributes */
|
||||
IFLA_VF_VLAN,
|
||||
IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */
|
||||
__IFLA_VF_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_VF_MAX (__IFLA_VF_MAX - 1)
|
||||
|
||||
struct ifla_vf_mac {
|
||||
__u32 vf;
|
||||
__u8 mac[32]; /* MAX_ADDR_LEN */
|
||||
@@ -226,4 +276,77 @@ struct ifla_vf_info {
|
||||
__u32 qos;
|
||||
__u32 tx_rate;
|
||||
};
|
||||
|
||||
/* VF ports management section
|
||||
*
|
||||
* Nested layout of set/get msg is:
|
||||
*
|
||||
* [IFLA_NUM_VF]
|
||||
* [IFLA_VF_PORTS]
|
||||
* [IFLA_VF_PORT]
|
||||
* [IFLA_PORT_*], ...
|
||||
* [IFLA_VF_PORT]
|
||||
* [IFLA_PORT_*], ...
|
||||
* ...
|
||||
* [IFLA_PORT_SELF]
|
||||
* [IFLA_PORT_*], ...
|
||||
*/
|
||||
|
||||
enum {
|
||||
IFLA_VF_PORT_UNSPEC,
|
||||
IFLA_VF_PORT, /* nest */
|
||||
__IFLA_VF_PORT_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_VF_PORT_MAX (__IFLA_VF_PORT_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_PORT_UNSPEC,
|
||||
IFLA_PORT_VF, /* __u32 */
|
||||
IFLA_PORT_PROFILE, /* string */
|
||||
IFLA_PORT_VSI_TYPE, /* 802.1Qbg (pre-)standard VDP */
|
||||
IFLA_PORT_INSTANCE_UUID, /* binary UUID */
|
||||
IFLA_PORT_HOST_UUID, /* binary UUID */
|
||||
IFLA_PORT_REQUEST, /* __u8 */
|
||||
IFLA_PORT_RESPONSE, /* __u16, output only */
|
||||
__IFLA_PORT_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_PORT_MAX (__IFLA_PORT_MAX - 1)
|
||||
|
||||
#define PORT_PROFILE_MAX 40
|
||||
#define PORT_UUID_MAX 16
|
||||
#define PORT_SELF_VF -1
|
||||
|
||||
enum {
|
||||
PORT_REQUEST_PREASSOCIATE = 0,
|
||||
PORT_REQUEST_PREASSOCIATE_RR,
|
||||
PORT_REQUEST_ASSOCIATE,
|
||||
PORT_REQUEST_DISASSOCIATE,
|
||||
};
|
||||
|
||||
enum {
|
||||
PORT_VDP_RESPONSE_SUCCESS = 0,
|
||||
PORT_VDP_RESPONSE_INVALID_FORMAT,
|
||||
PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES,
|
||||
PORT_VDP_RESPONSE_UNUSED_VTID,
|
||||
PORT_VDP_RESPONSE_VTID_VIOLATION,
|
||||
PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION,
|
||||
PORT_VDP_RESPONSE_OUT_OF_SYNC,
|
||||
/* 0x08-0xFF reserved for future VDP use */
|
||||
PORT_PROFILE_RESPONSE_SUCCESS = 0x100,
|
||||
PORT_PROFILE_RESPONSE_INPROGRESS,
|
||||
PORT_PROFILE_RESPONSE_INVALID,
|
||||
PORT_PROFILE_RESPONSE_BADSTATE,
|
||||
PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES,
|
||||
PORT_PROFILE_RESPONSE_ERROR,
|
||||
};
|
||||
|
||||
struct ifla_port_vsi {
|
||||
__u8 vsi_mgr_id;
|
||||
__u8 vsi_type_id[3];
|
||||
__u8 vsi_type_version;
|
||||
__u8 pad[3];
|
||||
};
|
||||
|
||||
#endif /* _LINUX_IF_LINK_H */
|
||||
|
||||
@@ -85,6 +85,7 @@ extern netdev_tx_t macvlan_start_xmit(struct sk_buff *skb,
|
||||
struct net_device *dev);
|
||||
|
||||
|
||||
extern struct sk_buff *(*macvlan_handle_frame_hook)(struct sk_buff *);
|
||||
extern struct sk_buff *(*macvlan_handle_frame_hook)(struct macvlan_port *,
|
||||
struct sk_buff *);
|
||||
|
||||
#endif /* _LINUX_IF_MACVLAN_H */
|
||||
|
||||
@@ -47,6 +47,7 @@ struct sockaddr_ll {
|
||||
#define PACKET_TX_RING 13
|
||||
#define PACKET_LOSS 14
|
||||
#define PACKET_VNET_HDR 15
|
||||
#define PACKET_TX_TIMESTAMP 16
|
||||
|
||||
struct tpacket_stats {
|
||||
unsigned int tp_packets;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Linux PPP over L2TP (PPPoL2TP) Socket Implementation (RFC 2661)
|
||||
*
|
||||
* This file supplies definitions required by the PPP over L2TP driver
|
||||
* (pppol2tp.c). All version information wrt this file is located in pppol2tp.c
|
||||
* (l2tp_ppp.c). All version information wrt this file is located in l2tp_ppp.c
|
||||
*
|
||||
* License:
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -35,6 +35,20 @@ struct pppol2tp_addr {
|
||||
__u16 d_tunnel, d_session; /* For sending outgoing packets */
|
||||
};
|
||||
|
||||
/* The L2TPv3 protocol changes tunnel and session ids from 16 to 32
|
||||
* bits. So we need a different sockaddr structure.
|
||||
*/
|
||||
struct pppol2tpv3_addr {
|
||||
pid_t pid; /* pid that owns the fd.
|
||||
* 0 => current */
|
||||
int fd; /* FD of UDP or IP socket to use */
|
||||
|
||||
struct sockaddr_in addr; /* IP address and port to send to */
|
||||
|
||||
__u32 s_tunnel, s_session; /* For matching incoming packets */
|
||||
__u32 d_tunnel, d_session; /* For sending outgoing packets */
|
||||
};
|
||||
|
||||
/* Socket options:
|
||||
* DEBUG - bitmask of debug message categories
|
||||
* SENDSEQ - 0 => don't send packets with sequence numbers
|
||||
|
||||
@@ -72,6 +72,15 @@ struct sockaddr_pppol2tp {
|
||||
struct pppol2tp_addr pppol2tp;
|
||||
}__attribute__ ((packed));
|
||||
|
||||
/* The L2TPv3 protocol changes tunnel and session ids from 16 to 32
|
||||
* bits. So we need a different sockaddr structure.
|
||||
*/
|
||||
struct sockaddr_pppol2tpv3 {
|
||||
sa_family_t sa_family; /* address family, AF_PPPOX */
|
||||
unsigned int sa_protocol; /* protocol identifier */
|
||||
struct pppol2tpv3_addr pppol2tp;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* ioctl interface for defining forwarding of connections
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
#define TUNSETSNDBUF _IOW('T', 212, int)
|
||||
#define TUNATTACHFILTER _IOW('T', 213, struct sock_fprog)
|
||||
#define TUNDETACHFILTER _IOW('T', 214, struct sock_fprog)
|
||||
#define TUNGETVNETHDRSZ _IOR('T', 215, int)
|
||||
#define TUNSETVNETHDRSZ _IOW('T', 216, int)
|
||||
|
||||
/* TUNSETIFF ifr flags */
|
||||
#define IFF_TUN 0x0001
|
||||
|
||||
26
include/linux/if_x25.h
Normal file
26
include/linux/if_x25.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Linux X.25 packet to device interface
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _IF_X25_H
|
||||
#define _IF_X25_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* Documentation/networking/x25-iface.txt */
|
||||
#define X25_IFACE_DATA 0x00
|
||||
#define X25_IFACE_CONNECT 0x01
|
||||
#define X25_IFACE_DISCONNECT 0x02
|
||||
#define X25_IFACE_PARAMS 0x03
|
||||
|
||||
#endif /* _IF_X25_H */
|
||||
@@ -221,10 +221,10 @@ struct in6_flowlabel_req {
|
||||
#define IPV6_RTHDR 57
|
||||
#define IPV6_RECVDSTOPTS 58
|
||||
#define IPV6_DSTOPTS 59
|
||||
#if 0 /* not yet */
|
||||
#define IPV6_RECVPATHMTU 60
|
||||
#define IPV6_PATHMTU 61
|
||||
#define IPV6_DONTFRAG 62
|
||||
#if 0 /* not yet */
|
||||
#define IPV6_USE_MIN_MTU 63
|
||||
#endif
|
||||
|
||||
@@ -265,6 +265,9 @@ struct in6_flowlabel_req {
|
||||
#define IPV6_PREFER_SRC_CGA 0x0008
|
||||
#define IPV6_PREFER_SRC_NONCGA 0x0800
|
||||
|
||||
/* RFC5082: Generalized Ttl Security Mechanism */
|
||||
#define IPV6_MINHOPCOUNT 73
|
||||
|
||||
/*
|
||||
* Multicast Routing:
|
||||
* see include/linux/mroute6.h.
|
||||
|
||||
@@ -49,7 +49,6 @@ extern struct group_info init_groups;
|
||||
{ .first = &init_task.pids[PIDTYPE_PGID].node }, \
|
||||
{ .first = &init_task.pids[PIDTYPE_SID].node }, \
|
||||
}, \
|
||||
.rcu = RCU_HEAD_INIT, \
|
||||
.level = 0, \
|
||||
.numbers = { { \
|
||||
.nr = 0, \
|
||||
|
||||
@@ -806,6 +806,7 @@ struct input_absinfo {
|
||||
#define BUS_HOST 0x19
|
||||
#define BUS_GSC 0x1A
|
||||
#define BUS_ATARI 0x1B
|
||||
#define BUS_SPI 0x1C
|
||||
|
||||
/*
|
||||
* MT_TOOL types
|
||||
|
||||
63
include/linux/input/ad714x.h
Normal file
63
include/linux/input/ad714x.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* include/linux/input/ad714x.h
|
||||
*
|
||||
* AD714x is very flexible, it can be used as buttons, scrollwheel,
|
||||
* slider, touchpad at the same time. That depends on the boards.
|
||||
* 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_AD714X_H__
|
||||
#define __LINUX_INPUT_AD714X_H__
|
||||
|
||||
#define STAGE_NUM 12
|
||||
#define STAGE_CFGREG_NUM 8
|
||||
#define SYS_CFGREG_NUM 8
|
||||
|
||||
/* board information which need be initialized in arch/mach... */
|
||||
struct ad714x_slider_plat {
|
||||
int start_stage;
|
||||
int end_stage;
|
||||
int max_coord;
|
||||
};
|
||||
|
||||
struct ad714x_wheel_plat {
|
||||
int start_stage;
|
||||
int end_stage;
|
||||
int max_coord;
|
||||
};
|
||||
|
||||
struct ad714x_touchpad_plat {
|
||||
int x_start_stage;
|
||||
int x_end_stage;
|
||||
int x_max_coord;
|
||||
|
||||
int y_start_stage;
|
||||
int y_end_stage;
|
||||
int y_max_coord;
|
||||
};
|
||||
|
||||
struct ad714x_button_plat {
|
||||
int keycode;
|
||||
unsigned short l_mask;
|
||||
unsigned short h_mask;
|
||||
};
|
||||
|
||||
struct ad714x_platform_data {
|
||||
int slider_num;
|
||||
int wheel_num;
|
||||
int touchpad_num;
|
||||
int button_num;
|
||||
struct ad714x_slider_plat *slider;
|
||||
struct ad714x_wheel_plat *wheel;
|
||||
struct ad714x_touchpad_plat *touchpad;
|
||||
struct ad714x_button_plat *button;
|
||||
unsigned short stage_cfg_reg[STAGE_NUM][STAGE_CFGREG_NUM];
|
||||
unsigned short sys_cfg_reg[SYS_CFGREG_NUM];
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -39,7 +39,8 @@
|
||||
* These flags used only by the kernel as part of the
|
||||
* irq handling routines.
|
||||
*
|
||||
* IRQF_DISABLED - keep irqs disabled when calling the action handler
|
||||
* IRQF_DISABLED - keep irqs disabled when calling the action handler.
|
||||
* DEPRECATED. This flag is a NOOP and scheduled to be removed
|
||||
* IRQF_SAMPLE_RANDOM - irq is used to feed the random generator
|
||||
* IRQF_SHARED - allow sharing the irq among several devices
|
||||
* IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur
|
||||
@@ -77,6 +78,18 @@ enum {
|
||||
IRQTF_AFFINITY,
|
||||
};
|
||||
|
||||
/*
|
||||
* These values can be returned by request_any_context_irq() and
|
||||
* describe the context the interrupt will be run in.
|
||||
*
|
||||
* IRQC_IS_HARDIRQ - interrupt runs in hardirq context
|
||||
* IRQC_IS_NESTED - interrupt runs in a nested threaded context
|
||||
*/
|
||||
enum {
|
||||
IRQC_IS_HARDIRQ = 0,
|
||||
IRQC_IS_NESTED,
|
||||
};
|
||||
|
||||
typedef irqreturn_t (*irq_handler_t)(int, void *);
|
||||
|
||||
/**
|
||||
@@ -120,6 +133,10 @@ request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags,
|
||||
return request_threaded_irq(irq, handler, NULL, flags, name, dev);
|
||||
}
|
||||
|
||||
extern int __must_check
|
||||
request_any_context_irq(unsigned int irq, irq_handler_t handler,
|
||||
unsigned long flags, const char *name, void *dev_id);
|
||||
|
||||
extern void exit_irq_thread(void);
|
||||
#else
|
||||
|
||||
@@ -141,6 +158,13 @@ request_threaded_irq(unsigned int irq, irq_handler_t handler,
|
||||
return request_irq(irq, handler, flags, name, dev);
|
||||
}
|
||||
|
||||
static inline int __must_check
|
||||
request_any_context_irq(unsigned int irq, irq_handler_t handler,
|
||||
unsigned long flags, const char *name, void *dev_id)
|
||||
{
|
||||
return request_irq(irq, handler, flags, name, dev_id);
|
||||
}
|
||||
|
||||
static inline void exit_irq_thread(void) { }
|
||||
#endif
|
||||
|
||||
@@ -209,6 +233,7 @@ extern int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask);
|
||||
extern int irq_can_set_affinity(unsigned int irq);
|
||||
extern int irq_select_affinity(unsigned int irq);
|
||||
|
||||
extern int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m);
|
||||
#else /* CONFIG_SMP */
|
||||
|
||||
static inline int irq_set_affinity(unsigned int irq, const struct cpumask *m)
|
||||
@@ -223,6 +248,11 @@ static inline int irq_can_set_affinity(unsigned int irq)
|
||||
|
||||
static inline int irq_select_affinity(unsigned int irq) { return 0; }
|
||||
|
||||
static inline int irq_set_affinity_hint(unsigned int irq,
|
||||
const struct cpumask *m)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif /* CONFIG_SMP && CONFIG_GENERIC_HARDIRQS */
|
||||
|
||||
#ifdef CONFIG_GENERIC_HARDIRQS
|
||||
|
||||
@@ -37,9 +37,9 @@ struct iommu_ops {
|
||||
int (*attach_dev)(struct iommu_domain *domain, struct device *dev);
|
||||
void (*detach_dev)(struct iommu_domain *domain, struct device *dev);
|
||||
int (*map)(struct iommu_domain *domain, unsigned long iova,
|
||||
phys_addr_t paddr, size_t size, int prot);
|
||||
void (*unmap)(struct iommu_domain *domain, unsigned long iova,
|
||||
size_t size);
|
||||
phys_addr_t paddr, int gfp_order, int prot);
|
||||
int (*unmap)(struct iommu_domain *domain, unsigned long iova,
|
||||
int gfp_order);
|
||||
phys_addr_t (*iova_to_phys)(struct iommu_domain *domain,
|
||||
unsigned long iova);
|
||||
int (*domain_has_cap)(struct iommu_domain *domain,
|
||||
@@ -56,10 +56,10 @@ extern int iommu_attach_device(struct iommu_domain *domain,
|
||||
struct device *dev);
|
||||
extern void iommu_detach_device(struct iommu_domain *domain,
|
||||
struct device *dev);
|
||||
extern int iommu_map_range(struct iommu_domain *domain, unsigned long iova,
|
||||
phys_addr_t paddr, size_t size, int prot);
|
||||
extern void iommu_unmap_range(struct iommu_domain *domain, unsigned long iova,
|
||||
size_t size);
|
||||
extern int iommu_map(struct iommu_domain *domain, unsigned long iova,
|
||||
phys_addr_t paddr, int gfp_order, int prot);
|
||||
extern int iommu_unmap(struct iommu_domain *domain, unsigned long iova,
|
||||
int gfp_order);
|
||||
extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain,
|
||||
unsigned long iova);
|
||||
extern int iommu_domain_has_cap(struct iommu_domain *domain,
|
||||
@@ -96,16 +96,16 @@ static inline void iommu_detach_device(struct iommu_domain *domain,
|
||||
{
|
||||
}
|
||||
|
||||
static inline int iommu_map_range(struct iommu_domain *domain,
|
||||
unsigned long iova, phys_addr_t paddr,
|
||||
size_t size, int prot)
|
||||
static inline int iommu_map(struct iommu_domain *domain, unsigned long iova,
|
||||
phys_addr_t paddr, int gfp_order, int prot)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline void iommu_unmap_range(struct iommu_domain *domain,
|
||||
unsigned long iova, size_t size)
|
||||
static inline int iommu_unmap(struct iommu_domain *domain, unsigned long iova,
|
||||
int gfp_order)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain,
|
||||
|
||||
@@ -52,6 +52,7 @@ struct resource_list {
|
||||
|
||||
#define IORESOURCE_MEM_64 0x00100000
|
||||
#define IORESOURCE_WINDOW 0x00200000 /* forwarded by bridge */
|
||||
#define IORESOURCE_MUXED 0x00400000 /* Resource is software muxed */
|
||||
|
||||
#define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */
|
||||
#define IORESOURCE_DISABLED 0x10000000
|
||||
@@ -143,7 +144,8 @@ static inline unsigned long resource_type(const struct resource *res)
|
||||
}
|
||||
|
||||
/* Convenience shorthand with allocation */
|
||||
#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name), 0)
|
||||
#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name), 0)
|
||||
#define request_muxed_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name), IORESOURCE_MUXED)
|
||||
#define __request_mem_region(start,n,name, excl) __request_region(&iomem_resource, (start), (n), (name), excl)
|
||||
#define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name), 0)
|
||||
#define request_mem_region_exclusive(start,n,name) \
|
||||
|
||||
@@ -21,6 +21,10 @@ struct in6_pktinfo {
|
||||
int ipi6_ifindex;
|
||||
};
|
||||
|
||||
struct ip6_mtuinfo {
|
||||
struct sockaddr_in6 ip6m_addr;
|
||||
__u32 ip6m_mtu;
|
||||
};
|
||||
|
||||
struct in6_ifreq {
|
||||
struct in6_addr ifr6_addr;
|
||||
@@ -250,9 +254,11 @@ struct inet6_skb_parm {
|
||||
|
||||
#define IP6SKB_XFRM_TRANSFORMED 1
|
||||
#define IP6SKB_FORWARDED 2
|
||||
#define IP6SKB_REROUTED 4
|
||||
};
|
||||
|
||||
#define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb))
|
||||
#define IP6CBMTU(skb) ((struct ip6_mtuinfo *)((skb)->cb))
|
||||
|
||||
static inline int inet6_iif(const struct sk_buff *skb)
|
||||
{
|
||||
@@ -334,21 +340,25 @@ struct ipv6_pinfo {
|
||||
dstopts:1,
|
||||
odstopts:1,
|
||||
rxflow:1,
|
||||
rxtclass:1;
|
||||
rxtclass:1,
|
||||
rxpmtu:1;
|
||||
} bits;
|
||||
__u16 all;
|
||||
} rxopt;
|
||||
|
||||
/* sockopt flags */
|
||||
__u8 recverr:1,
|
||||
__u16 recverr:1,
|
||||
sndflow:1,
|
||||
pmtudisc:2,
|
||||
ipv6only:1,
|
||||
srcprefs:3; /* 001: prefer temporary address
|
||||
srcprefs:3, /* 001: prefer temporary address
|
||||
* 010: prefer public address
|
||||
* 100: prefer care-of address
|
||||
*/
|
||||
dontfrag:1;
|
||||
__u8 min_hopcount;
|
||||
__u8 tclass;
|
||||
__u8 padding;
|
||||
|
||||
__u32 dst_cookie;
|
||||
|
||||
@@ -358,6 +368,7 @@ struct ipv6_pinfo {
|
||||
|
||||
struct ipv6_txoptions *opt;
|
||||
struct sk_buff *pktoptions;
|
||||
struct sk_buff *rxpmtu;
|
||||
struct {
|
||||
struct ipv6_txoptions *opt;
|
||||
u8 hop_limit;
|
||||
@@ -372,6 +383,7 @@ struct raw6_sock {
|
||||
__u32 checksum; /* perform checksum */
|
||||
__u32 offset; /* checksum offset */
|
||||
struct icmp6_filter filter;
|
||||
__u32 ip6mr_table;
|
||||
/* ipv6_pinfo has to be the last member of raw6_sock, see inet6_sk_generic */
|
||||
struct ipv6_pinfo inet6;
|
||||
};
|
||||
|
||||
@@ -195,6 +195,7 @@ struct irq_desc {
|
||||
raw_spinlock_t lock;
|
||||
#ifdef CONFIG_SMP
|
||||
cpumask_var_t affinity;
|
||||
const struct cpumask *affinity_hint;
|
||||
unsigned int node;
|
||||
#ifdef CONFIG_GENERIC_PENDING_IRQ
|
||||
cpumask_var_t pending_mask;
|
||||
|
||||
@@ -43,10 +43,10 @@
|
||||
*/
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/mod_devicetable.h>
|
||||
|
||||
#define DEVICE_COUNT_COMPATIBLE 4
|
||||
|
||||
#define ISAPNP_ANY_ID 0xffff
|
||||
#define ISAPNP_CARD_DEVS 8
|
||||
|
||||
#define ISAPNP_CARD_ID(_va, _vb, _vc, _device) \
|
||||
@@ -74,12 +74,6 @@ struct isapnp_card_id {
|
||||
#define ISAPNP_DEVICE_SINGLE_END \
|
||||
.card_vendor = 0, .card_device = 0
|
||||
|
||||
struct isapnp_device_id {
|
||||
unsigned short card_vendor, card_device;
|
||||
unsigned short vendor, function;
|
||||
unsigned long driver_data; /* data private to the driver */
|
||||
};
|
||||
|
||||
#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))
|
||||
|
||||
#define __ISAPNP__
|
||||
|
||||
@@ -427,9 +427,9 @@ struct transaction_s
|
||||
enum {
|
||||
T_RUNNING,
|
||||
T_LOCKED,
|
||||
T_RUNDOWN,
|
||||
T_FLUSH,
|
||||
T_COMMIT,
|
||||
T_COMMIT_RECORD,
|
||||
T_FINISHED
|
||||
} t_state;
|
||||
|
||||
@@ -991,6 +991,7 @@ int journal_start_commit(journal_t *journal, tid_t *tid);
|
||||
int journal_force_commit_nested(journal_t *journal);
|
||||
int log_wait_commit(journal_t *journal, tid_t tid);
|
||||
int log_do_checkpoint(journal_t *journal);
|
||||
int journal_trans_will_send_data_barrier(journal_t *journal, tid_t tid);
|
||||
|
||||
void __log_wait_for_space(journal_t *journal);
|
||||
extern void __journal_drop_transaction(journal_t *, transaction_t *);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user