mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
Merge branch 'for-2.6.38' into for-2.6.39
This commit is contained in:
commit
a1926d1745
7488 changed files with 521348 additions and 251546 deletions
|
|
@ -148,9 +148,7 @@ struct acpi_device_flags {
|
|||
u32 suprise_removal_ok:1;
|
||||
u32 power_manageable:1;
|
||||
u32 performance_manageable:1;
|
||||
u32 wake_capable:1; /* Wakeup(_PRW) supported? */
|
||||
u32 force_power_state:1;
|
||||
u32 reserved:22;
|
||||
u32 reserved:24;
|
||||
};
|
||||
|
||||
/* File System */
|
||||
|
|
@ -242,20 +240,14 @@ struct acpi_device_perf {
|
|||
struct acpi_device_wakeup_flags {
|
||||
u8 valid:1; /* Can successfully enable wakeup? */
|
||||
u8 run_wake:1; /* Run-Wake GPE devices */
|
||||
u8 always_enabled:1; /* Run-wake devices that are always enabled */
|
||||
u8 notifier_present:1; /* Wake-up notify handler has been installed */
|
||||
};
|
||||
|
||||
struct acpi_device_wakeup_state {
|
||||
u8 enabled:1;
|
||||
};
|
||||
|
||||
struct acpi_device_wakeup {
|
||||
acpi_handle gpe_device;
|
||||
u64 gpe_number;
|
||||
u64 sleep_state;
|
||||
struct acpi_handle_list resources;
|
||||
struct acpi_device_wakeup_state state;
|
||||
struct acpi_device_wakeup_flags flags;
|
||||
int prepare_count;
|
||||
int run_wake_count;
|
||||
|
|
@ -328,8 +320,8 @@ void acpi_bus_data_handler(acpi_handle handle, void *context);
|
|||
acpi_status acpi_bus_get_status_handle(acpi_handle handle,
|
||||
unsigned long long *sta);
|
||||
int acpi_bus_get_status(struct acpi_device *device);
|
||||
int acpi_bus_get_power(acpi_handle handle, int *state);
|
||||
int acpi_bus_set_power(acpi_handle handle, int state);
|
||||
int acpi_bus_update_power(acpi_handle handle, int *state_p);
|
||||
bool acpi_bus_power_manageable(acpi_handle handle);
|
||||
bool acpi_bus_can_wakeup(acpi_handle handle);
|
||||
#ifdef CONFIG_ACPI_PROC_EVENT
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20101013
|
||||
#define ACPI_CA_VERSION 0x20101209
|
||||
|
||||
#include "actypes.h"
|
||||
#include "actbl.h"
|
||||
|
|
@ -228,6 +228,10 @@ acpi_status acpi_get_parent(acpi_handle object, acpi_handle * out_handle);
|
|||
acpi_status
|
||||
acpi_install_initialization_handler(acpi_init_handler handler, u32 function);
|
||||
|
||||
acpi_status
|
||||
acpi_install_global_event_handler(ACPI_GBL_EVENT_HANDLER handler,
|
||||
void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_install_fixed_event_handler(u32 acpi_event,
|
||||
acpi_event_handler handler, void *context);
|
||||
|
|
@ -258,11 +262,11 @@ acpi_remove_address_space_handler(acpi_handle device,
|
|||
acpi_status
|
||||
acpi_install_gpe_handler(acpi_handle gpe_device,
|
||||
u32 gpe_number,
|
||||
u32 type, acpi_event_handler address, void *context);
|
||||
u32 type, acpi_gpe_handler address, void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_remove_gpe_handler(acpi_handle gpe_device,
|
||||
u32 gpe_number, acpi_event_handler address);
|
||||
u32 gpe_number, acpi_gpe_handler address);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_status acpi_install_exception_handler(acpi_exception_handler handler);
|
||||
|
|
@ -292,11 +296,13 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number);
|
|||
|
||||
acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number);
|
||||
|
||||
acpi_status acpi_gpe_can_wake(acpi_handle gpe_device, u32 gpe_number);
|
||||
|
||||
acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number);
|
||||
|
||||
acpi_status acpi_gpe_wakeup(acpi_handle gpe_device, u32 gpe_number, u8 action);
|
||||
acpi_status
|
||||
acpi_setup_gpe_for_wake(acpi_handle parent_device,
|
||||
acpi_handle gpe_device, u32 gpe_number);
|
||||
|
||||
acpi_status acpi_set_gpe_wake_mask(acpi_handle gpe_device, u32 gpe_number, u8 action);
|
||||
|
||||
acpi_status
|
||||
acpi_get_gpe_status(acpi_handle gpe_device,
|
||||
|
|
@ -315,7 +321,7 @@ acpi_install_gpe_block(acpi_handle gpe_device,
|
|||
|
||||
acpi_status acpi_remove_gpe_block(acpi_handle gpe_device);
|
||||
|
||||
acpi_status acpi_update_gpes(void);
|
||||
acpi_status acpi_update_all_gpes(void);
|
||||
|
||||
/*
|
||||
* Resource interfaces
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ struct acpi_whea_header {
|
|||
struct acpi_table_bert {
|
||||
struct acpi_table_header header; /* Common ACPI table header */
|
||||
u32 region_length; /* Length of the boot error region */
|
||||
u64 address; /* Physical addresss of the error region */
|
||||
u64 address; /* Physical address of the error region */
|
||||
};
|
||||
|
||||
/* Boot Error Region (not a subtable, pointed to by Address field above) */
|
||||
|
|
|
|||
|
|
@ -656,33 +656,34 @@ typedef u32 acpi_event_status;
|
|||
#define ACPI_GPE_MAX 0xFF
|
||||
#define ACPI_NUM_GPE 256
|
||||
|
||||
/* Actions for acpi_gpe_wakeup, acpi_hw_low_set_gpe */
|
||||
/* Actions for acpi_set_gpe_wake_mask, acpi_hw_low_set_gpe */
|
||||
|
||||
#define ACPI_GPE_ENABLE 0
|
||||
#define ACPI_GPE_DISABLE 1
|
||||
#define ACPI_GPE_COND_ENABLE 2
|
||||
#define ACPI_GPE_CONDITIONAL_ENABLE 2
|
||||
|
||||
/*
|
||||
* GPE info flags - Per GPE
|
||||
* +-------+---+-+-+
|
||||
* | 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>
|
||||
* +-------+-+-+---+
|
||||
* | 7:4 |3|2|1:0|
|
||||
* +-------+-+-+---+
|
||||
* | | | |
|
||||
* | | | +-- Type of dispatch:to method, handler, notify, or none
|
||||
* | | +----- Interrupt type: edge or level triggered
|
||||
* | +------- Is a Wake GPE
|
||||
* +------------ <Reserved>
|
||||
*/
|
||||
#define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x01
|
||||
#define ACPI_GPE_LEVEL_TRIGGERED (u8) 0x01
|
||||
#define ACPI_GPE_DISPATCH_NONE (u8) 0x00
|
||||
#define ACPI_GPE_DISPATCH_METHOD (u8) 0x01
|
||||
#define ACPI_GPE_DISPATCH_HANDLER (u8) 0x02
|
||||
#define ACPI_GPE_DISPATCH_NOTIFY (u8) 0x03
|
||||
#define ACPI_GPE_DISPATCH_MASK (u8) 0x03
|
||||
|
||||
#define ACPI_GPE_LEVEL_TRIGGERED (u8) 0x04
|
||||
#define ACPI_GPE_EDGE_TRIGGERED (u8) 0x00
|
||||
#define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x04
|
||||
|
||||
#define ACPI_GPE_CAN_WAKE (u8) 0x02
|
||||
|
||||
#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
|
||||
#define ACPI_GPE_CAN_WAKE (u8) 0x08
|
||||
|
||||
/*
|
||||
* Flags for GPE and Lock interfaces
|
||||
|
|
@ -894,8 +895,19 @@ typedef void
|
|||
/*
|
||||
* Various handlers and callback procedures
|
||||
*/
|
||||
typedef
|
||||
void (*ACPI_GBL_EVENT_HANDLER) (u32 event_type,
|
||||
acpi_handle device,
|
||||
u32 event_number, void *context);
|
||||
|
||||
#define ACPI_EVENT_TYPE_GPE 0
|
||||
#define ACPI_EVENT_TYPE_FIXED 1
|
||||
|
||||
typedef u32(*acpi_event_handler) (void *context);
|
||||
|
||||
typedef
|
||||
u32 (*acpi_gpe_handler) (acpi_handle gpe_device, u32 gpe_number, void *context);
|
||||
|
||||
typedef
|
||||
void (*acpi_notify_handler) (acpi_handle device, u32 value, void *context);
|
||||
|
||||
|
|
@ -951,6 +963,10 @@ u32 (*acpi_interface_handler) (acpi_string interface_name, u32 supported);
|
|||
#define ACPI_INTERRUPT_NOT_HANDLED 0x00
|
||||
#define ACPI_INTERRUPT_HANDLED 0x01
|
||||
|
||||
/* GPE handler return values */
|
||||
|
||||
#define ACPI_REENABLE_GPE 0x80
|
||||
|
||||
/* Length of 32-bit EISAID values when converted back to a string */
|
||||
|
||||
#define ACPI_EISAID_STRING_SIZE 8 /* Includes null terminator */
|
||||
|
|
|
|||
|
|
@ -19,6 +19,12 @@
|
|||
extern int hest_disable;
|
||||
extern int erst_disable;
|
||||
|
||||
#ifdef CONFIG_ACPI_APEI
|
||||
void __init acpi_hest_init(void);
|
||||
#else
|
||||
static inline void acpi_hest_init(void) { return; }
|
||||
#endif
|
||||
|
||||
typedef int (*apei_hest_func_t)(struct acpi_hest_header *hest_hdr, void *data);
|
||||
int apei_hest_parse(apei_hest_func_t func, void *data);
|
||||
|
||||
|
|
|
|||
|
|
@ -324,6 +324,12 @@ int acpi_processor_tstate_has_changed(struct acpi_processor *pr);
|
|||
int acpi_processor_get_throttling_info(struct acpi_processor *pr);
|
||||
extern int acpi_processor_set_throttling(struct acpi_processor *pr,
|
||||
int state, bool force);
|
||||
/*
|
||||
* Reevaluate whether the T-state is invalid after one cpu is
|
||||
* onlined/offlined. In such case the flags.throttling will be updated.
|
||||
*/
|
||||
extern void acpi_processor_reevaluate_tstate(struct acpi_processor *pr,
|
||||
unsigned long action);
|
||||
extern const struct file_operations acpi_processor_throttling_fops;
|
||||
extern void acpi_processor_throttling_init(void);
|
||||
/* in processor_idle.c */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
#ifndef __ACPI_VIDEO_H
|
||||
#define __ACPI_VIDEO_H
|
||||
|
||||
#include <linux/errno.h> /* for ENODEV */
|
||||
|
||||
struct acpi_device;
|
||||
|
||||
#define ACPI_VIDEO_DISPLAY_CRT 1
|
||||
#define ACPI_VIDEO_DISPLAY_TV 2
|
||||
#define ACPI_VIDEO_DISPLAY_DVI 3
|
||||
|
|
@ -26,4 +30,3 @@ static inline int acpi_video_get_edid(struct acpi_device *device, int type,
|
|||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -211,6 +211,36 @@ static inline void outsl(unsigned long addr, const void *buffer, int count)
|
|||
}
|
||||
#endif
|
||||
|
||||
static inline void readsl(const void __iomem *addr, void *buf, int len)
|
||||
{
|
||||
insl((unsigned long)addr, buf, len);
|
||||
}
|
||||
|
||||
static inline void readsw(const void __iomem *addr, void *buf, int len)
|
||||
{
|
||||
insw((unsigned long)addr, buf, len);
|
||||
}
|
||||
|
||||
static inline void readsb(const void __iomem *addr, void *buf, int len)
|
||||
{
|
||||
insb((unsigned long)addr, buf, len);
|
||||
}
|
||||
|
||||
static inline void writesl(const void __iomem *addr, const void *buf, int len)
|
||||
{
|
||||
outsl((unsigned long)addr, buf, len);
|
||||
}
|
||||
|
||||
static inline void writesw(const void __iomem *addr, const void *buf, int len)
|
||||
{
|
||||
outsw((unsigned long)addr, buf, len);
|
||||
}
|
||||
|
||||
static inline void writesb(const void __iomem *addr, const void *buf, int len)
|
||||
{
|
||||
outsb((unsigned long)addr, buf, len);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_GENERIC_IOMAP
|
||||
#define ioread8(addr) readb(addr)
|
||||
#define ioread16(addr) readw(addr)
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@
|
|||
#endif
|
||||
#define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
|
||||
#define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */
|
||||
#define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */
|
||||
#define TCGETX 0x5432 /* SYS5 TCGETX compatibility */
|
||||
#define TCSETX 0x5433
|
||||
#define TCSETXF 0x5434
|
||||
|
|
|
|||
|
|
@ -22,15 +22,15 @@ DECLARE_PER_CPU(struct pt_regs *, __irq_regs);
|
|||
|
||||
static inline struct pt_regs *get_irq_regs(void)
|
||||
{
|
||||
return __get_cpu_var(__irq_regs);
|
||||
return __this_cpu_read(__irq_regs);
|
||||
}
|
||||
|
||||
static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
|
||||
{
|
||||
struct pt_regs *old_regs, **pp_regs = &__get_cpu_var(__irq_regs);
|
||||
struct pt_regs *old_regs;
|
||||
|
||||
old_regs = *pp_regs;
|
||||
*pp_regs = new_regs;
|
||||
old_regs = __this_cpu_read(__irq_regs);
|
||||
__this_cpu_write(__irq_regs, new_regs);
|
||||
return old_regs;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@
|
|||
#define MADV_MERGEABLE 12 /* KSM may merge identical pages */
|
||||
#define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */
|
||||
|
||||
#define MADV_HUGEPAGE 14 /* Worth backing with hugepages */
|
||||
#define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */
|
||||
|
||||
/* compatibility flags */
|
||||
#define MAP_FILE 0
|
||||
|
||||
|
|
|
|||
|
|
@ -5,67 +5,100 @@
|
|||
#ifdef CONFIG_MMU
|
||||
|
||||
#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
|
||||
/*
|
||||
* Largely same as above, but only sets the access flags (dirty,
|
||||
* accessed, and writable). Furthermore, we know it always gets set
|
||||
* to a "more permissive" setting, which allows most architectures
|
||||
* to optimize this. We return whether the PTE actually changed, which
|
||||
* in turn instructs the caller to do things like update__mmu_cache.
|
||||
* This used to be done in the caller, but sparc needs minor faults to
|
||||
* force that call on sun4c so we changed this macro slightly
|
||||
*/
|
||||
#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
|
||||
({ \
|
||||
int __changed = !pte_same(*(__ptep), __entry); \
|
||||
if (__changed) { \
|
||||
set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); \
|
||||
flush_tlb_page(__vma, __address); \
|
||||
} \
|
||||
__changed; \
|
||||
})
|
||||
extern int ptep_set_access_flags(struct vm_area_struct *vma,
|
||||
unsigned long address, pte_t *ptep,
|
||||
pte_t entry, int dirty);
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PMDP_SET_ACCESS_FLAGS
|
||||
extern int pmdp_set_access_flags(struct vm_area_struct *vma,
|
||||
unsigned long address, pmd_t *pmdp,
|
||||
pmd_t entry, int dirty);
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
|
||||
#define ptep_test_and_clear_young(__vma, __address, __ptep) \
|
||||
({ \
|
||||
pte_t __pte = *(__ptep); \
|
||||
int r = 1; \
|
||||
if (!pte_young(__pte)) \
|
||||
r = 0; \
|
||||
else \
|
||||
set_pte_at((__vma)->vm_mm, (__address), \
|
||||
(__ptep), pte_mkold(__pte)); \
|
||||
r; \
|
||||
})
|
||||
static inline int ptep_test_and_clear_young(struct vm_area_struct *vma,
|
||||
unsigned long address,
|
||||
pte_t *ptep)
|
||||
{
|
||||
pte_t pte = *ptep;
|
||||
int r = 1;
|
||||
if (!pte_young(pte))
|
||||
r = 0;
|
||||
else
|
||||
set_pte_at(vma->vm_mm, address, ptep, pte_mkold(pte));
|
||||
return r;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PMDP_TEST_AND_CLEAR_YOUNG
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
static inline int pmdp_test_and_clear_young(struct vm_area_struct *vma,
|
||||
unsigned long address,
|
||||
pmd_t *pmdp)
|
||||
{
|
||||
pmd_t pmd = *pmdp;
|
||||
int r = 1;
|
||||
if (!pmd_young(pmd))
|
||||
r = 0;
|
||||
else
|
||||
set_pmd_at(vma->vm_mm, address, pmdp, pmd_mkold(pmd));
|
||||
return r;
|
||||
}
|
||||
#else /* CONFIG_TRANSPARENT_HUGEPAGE */
|
||||
static inline int pmdp_test_and_clear_young(struct vm_area_struct *vma,
|
||||
unsigned long address,
|
||||
pmd_t *pmdp)
|
||||
{
|
||||
BUG();
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
|
||||
#define ptep_clear_flush_young(__vma, __address, __ptep) \
|
||||
({ \
|
||||
int __young; \
|
||||
__young = ptep_test_and_clear_young(__vma, __address, __ptep); \
|
||||
if (__young) \
|
||||
flush_tlb_page(__vma, __address); \
|
||||
__young; \
|
||||
})
|
||||
int ptep_clear_flush_young(struct vm_area_struct *vma,
|
||||
unsigned long address, pte_t *ptep);
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PMDP_CLEAR_YOUNG_FLUSH
|
||||
int pmdp_clear_flush_young(struct vm_area_struct *vma,
|
||||
unsigned long address, pmd_t *pmdp);
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR
|
||||
#define ptep_get_and_clear(__mm, __address, __ptep) \
|
||||
({ \
|
||||
pte_t __pte = *(__ptep); \
|
||||
pte_clear((__mm), (__address), (__ptep)); \
|
||||
__pte; \
|
||||
static inline pte_t ptep_get_and_clear(struct mm_struct *mm,
|
||||
unsigned long address,
|
||||
pte_t *ptep)
|
||||
{
|
||||
pte_t pte = *ptep;
|
||||
pte_clear(mm, address, ptep);
|
||||
return pte;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PMDP_GET_AND_CLEAR
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
static inline pmd_t pmdp_get_and_clear(struct mm_struct *mm,
|
||||
unsigned long address,
|
||||
pmd_t *pmdp)
|
||||
{
|
||||
pmd_t pmd = *pmdp;
|
||||
pmd_clear(mm, address, pmdp);
|
||||
return pmd;
|
||||
})
|
||||
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL
|
||||
#define ptep_get_and_clear_full(__mm, __address, __ptep, __full) \
|
||||
({ \
|
||||
pte_t __pte; \
|
||||
__pte = ptep_get_and_clear((__mm), (__address), (__ptep)); \
|
||||
__pte; \
|
||||
})
|
||||
static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm,
|
||||
unsigned long address, pte_t *ptep,
|
||||
int full)
|
||||
{
|
||||
pte_t pte;
|
||||
pte = ptep_get_and_clear(mm, address, ptep);
|
||||
return pte;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -74,20 +107,25 @@
|
|||
* not present, or in the process of an address space destruction.
|
||||
*/
|
||||
#ifndef __HAVE_ARCH_PTE_CLEAR_NOT_PRESENT_FULL
|
||||
#define pte_clear_not_present_full(__mm, __address, __ptep, __full) \
|
||||
do { \
|
||||
pte_clear((__mm), (__address), (__ptep)); \
|
||||
} while (0)
|
||||
static inline void pte_clear_not_present_full(struct mm_struct *mm,
|
||||
unsigned long address,
|
||||
pte_t *ptep,
|
||||
int full)
|
||||
{
|
||||
pte_clear(mm, address, ptep);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PTEP_CLEAR_FLUSH
|
||||
#define ptep_clear_flush(__vma, __address, __ptep) \
|
||||
({ \
|
||||
pte_t __pte; \
|
||||
__pte = ptep_get_and_clear((__vma)->vm_mm, __address, __ptep); \
|
||||
flush_tlb_page(__vma, __address); \
|
||||
__pte; \
|
||||
})
|
||||
extern pte_t ptep_clear_flush(struct vm_area_struct *vma,
|
||||
unsigned long address,
|
||||
pte_t *ptep);
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PMDP_CLEAR_FLUSH
|
||||
extern pmd_t pmdp_clear_flush(struct vm_area_struct *vma,
|
||||
unsigned long address,
|
||||
pmd_t *pmdp);
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PTEP_SET_WRPROTECT
|
||||
|
|
@ -99,8 +137,49 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PMDP_SET_WRPROTECT
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
static inline void pmdp_set_wrprotect(struct mm_struct *mm,
|
||||
unsigned long address, pmd_t *pmdp)
|
||||
{
|
||||
pmd_t old_pmd = *pmdp;
|
||||
set_pmd_at(mm, address, pmdp, pmd_wrprotect(old_pmd));
|
||||
}
|
||||
#else /* CONFIG_TRANSPARENT_HUGEPAGE */
|
||||
static inline void pmdp_set_wrprotect(struct mm_struct *mm,
|
||||
unsigned long address, pmd_t *pmdp)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PMDP_SPLITTING_FLUSH
|
||||
extern pmd_t pmdp_splitting_flush(struct vm_area_struct *vma,
|
||||
unsigned long address,
|
||||
pmd_t *pmdp);
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PTE_SAME
|
||||
#define pte_same(A,B) (pte_val(A) == pte_val(B))
|
||||
static inline int pte_same(pte_t pte_a, pte_t pte_b)
|
||||
{
|
||||
return pte_val(pte_a) == pte_val(pte_b);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PMD_SAME
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
|
||||
{
|
||||
return pmd_val(pmd_a) == pmd_val(pmd_b);
|
||||
}
|
||||
#else /* CONFIG_TRANSPARENT_HUGEPAGE */
|
||||
static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
|
||||
{
|
||||
BUG();
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PAGE_TEST_DIRTY
|
||||
|
|
@ -348,6 +427,24 @@ extern void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn,
|
|||
unsigned long size);
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
static inline int pmd_trans_huge(pmd_t pmd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int pmd_trans_splitting(pmd_t pmd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#ifndef __HAVE_ARCH_PMD_WRITE
|
||||
static inline int pmd_write(pmd_t pmd)
|
||||
{
|
||||
BUG();
|
||||
return 0;
|
||||
}
|
||||
#endif /* __HAVE_ARCH_PMD_WRITE */
|
||||
#endif
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#endif /* _ASM_GENERIC_PGTABLE_H */
|
||||
|
|
|
|||
|
|
@ -67,7 +67,8 @@
|
|||
* Align to a 32 byte boundary equal to the
|
||||
* alignment gcc 4.5 uses for a struct
|
||||
*/
|
||||
#define STRUCT_ALIGN() . = ALIGN(32)
|
||||
#define STRUCT_ALIGNMENT 32
|
||||
#define STRUCT_ALIGN() . = ALIGN(STRUCT_ALIGNMENT)
|
||||
|
||||
/* The actual configuration determine if the init/exit sections
|
||||
* are handled as text/data or they can be discarded (which
|
||||
|
|
@ -146,6 +147,13 @@
|
|||
#define TRACE_SYSCALLS()
|
||||
#endif
|
||||
|
||||
|
||||
#define KERNEL_DTB() \
|
||||
STRUCT_ALIGN(); \
|
||||
VMLINUX_SYMBOL(__dtb_start) = .; \
|
||||
*(.dtb.init.rodata) \
|
||||
VMLINUX_SYMBOL(__dtb_end) = .;
|
||||
|
||||
/* .data section */
|
||||
#define DATA_DATA \
|
||||
*(.data) \
|
||||
|
|
@ -192,7 +200,8 @@
|
|||
|
||||
#define READ_MOSTLY_DATA(align) \
|
||||
. = ALIGN(align); \
|
||||
*(.data..read_mostly)
|
||||
*(.data..read_mostly) \
|
||||
. = ALIGN(align);
|
||||
|
||||
#define CACHELINE_ALIGNED_DATA(align) \
|
||||
. = ALIGN(align); \
|
||||
|
|
@ -468,7 +477,8 @@
|
|||
MCOUNT_REC() \
|
||||
DEV_DISCARD(init.rodata) \
|
||||
CPU_DISCARD(init.rodata) \
|
||||
MEM_DISCARD(init.rodata)
|
||||
MEM_DISCARD(init.rodata) \
|
||||
KERNEL_DTB()
|
||||
|
||||
#define INIT_TEXT \
|
||||
*(.init.text) \
|
||||
|
|
|
|||
92
include/crypto/if_alg.h
Normal file
92
include/crypto/if_alg.h
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* if_alg: User-space algorithm interface
|
||||
*
|
||||
* Copyright (c) 2010 Herbert Xu <herbert@gondor.apana.org.au>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _CRYPTO_IF_ALG_H
|
||||
#define _CRYPTO_IF_ALG_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/if_alg.h>
|
||||
#include <linux/types.h>
|
||||
#include <net/sock.h>
|
||||
|
||||
#define ALG_MAX_PAGES 16
|
||||
|
||||
struct crypto_async_request;
|
||||
|
||||
struct alg_sock {
|
||||
/* struct sock must be the first member of struct alg_sock */
|
||||
struct sock sk;
|
||||
|
||||
struct sock *parent;
|
||||
|
||||
const struct af_alg_type *type;
|
||||
void *private;
|
||||
};
|
||||
|
||||
struct af_alg_completion {
|
||||
struct completion completion;
|
||||
int err;
|
||||
};
|
||||
|
||||
struct af_alg_control {
|
||||
struct af_alg_iv *iv;
|
||||
int op;
|
||||
};
|
||||
|
||||
struct af_alg_type {
|
||||
void *(*bind)(const char *name, u32 type, u32 mask);
|
||||
void (*release)(void *private);
|
||||
int (*setkey)(void *private, const u8 *key, unsigned int keylen);
|
||||
int (*accept)(void *private, struct sock *sk);
|
||||
|
||||
struct proto_ops *ops;
|
||||
struct module *owner;
|
||||
char name[14];
|
||||
};
|
||||
|
||||
struct af_alg_sgl {
|
||||
struct scatterlist sg[ALG_MAX_PAGES];
|
||||
struct page *pages[ALG_MAX_PAGES];
|
||||
};
|
||||
|
||||
int af_alg_register_type(const struct af_alg_type *type);
|
||||
int af_alg_unregister_type(const struct af_alg_type *type);
|
||||
|
||||
int af_alg_release(struct socket *sock);
|
||||
int af_alg_accept(struct sock *sk, struct socket *newsock);
|
||||
|
||||
int af_alg_make_sg(struct af_alg_sgl *sgl, void __user *addr, int len,
|
||||
int write);
|
||||
void af_alg_free_sg(struct af_alg_sgl *sgl);
|
||||
|
||||
int af_alg_cmsg_send(struct msghdr *msg, struct af_alg_control *con);
|
||||
|
||||
int af_alg_wait_for_completion(int err, struct af_alg_completion *completion);
|
||||
void af_alg_complete(struct crypto_async_request *req, int err);
|
||||
|
||||
static inline struct alg_sock *alg_sk(struct sock *sk)
|
||||
{
|
||||
return (struct alg_sock *)sk;
|
||||
}
|
||||
|
||||
static inline void af_alg_release_parent(struct sock *sk)
|
||||
{
|
||||
sock_put(alg_sk(sk)->parent);
|
||||
}
|
||||
|
||||
static inline void af_alg_init_completion(struct af_alg_completion *completion)
|
||||
{
|
||||
init_completion(&completion->completion);
|
||||
}
|
||||
|
||||
#endif /* _CRYPTO_IF_ALG_H */
|
||||
29
include/crypto/padlock.h
Normal file
29
include/crypto/padlock.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Driver for VIA PadLock
|
||||
*
|
||||
* Copyright (c) 2004 Michal Ludvig <michal@logix.cz>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _CRYPTO_PADLOCK_H
|
||||
#define _CRYPTO_PADLOCK_H
|
||||
|
||||
#define PADLOCK_ALIGNMENT 16
|
||||
|
||||
#define PFX KBUILD_MODNAME ": "
|
||||
|
||||
#define PADLOCK_CRA_PRIORITY 300
|
||||
#define PADLOCK_COMPOSITE_PRIORITY 400
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
#define STACK_ALIGN 16
|
||||
#else
|
||||
#define STACK_ALIGN 4
|
||||
#endif
|
||||
|
||||
#endif /* _CRYPTO_PADLOCK_H */
|
||||
|
|
@ -68,6 +68,21 @@ static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg)
|
|||
return (++sg)->length ? sg : (void *)sg_page(sg);
|
||||
}
|
||||
|
||||
static inline void scatterwalk_crypto_chain(struct scatterlist *head,
|
||||
struct scatterlist *sg,
|
||||
int chain, int num)
|
||||
{
|
||||
if (chain) {
|
||||
head->length += sg->length;
|
||||
sg = scatterwalk_sg_next(sg);
|
||||
}
|
||||
|
||||
if (sg)
|
||||
scatterwalk_sg_chain(head, num, sg);
|
||||
else
|
||||
sg_mark_end(head);
|
||||
}
|
||||
|
||||
static inline unsigned long scatterwalk_samebuf(struct scatter_walk *walk_in,
|
||||
struct scatter_walk *walk_out)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -683,6 +683,21 @@ struct drm_master {
|
|||
void *driver_priv; /**< Private structure for driver to use */
|
||||
};
|
||||
|
||||
/* Size of ringbuffer for vblank timestamps. Just double-buffer
|
||||
* in initial implementation.
|
||||
*/
|
||||
#define DRM_VBLANKTIME_RBSIZE 2
|
||||
|
||||
/* Flags and return codes for get_vblank_timestamp() driver function. */
|
||||
#define DRM_CALLED_FROM_VBLIRQ 1
|
||||
#define DRM_VBLANKTIME_SCANOUTPOS_METHOD (1 << 0)
|
||||
#define DRM_VBLANKTIME_INVBL (1 << 1)
|
||||
|
||||
/* get_scanout_position() return flags */
|
||||
#define DRM_SCANOUTPOS_VALID (1 << 0)
|
||||
#define DRM_SCANOUTPOS_INVBL (1 << 1)
|
||||
#define DRM_SCANOUTPOS_ACCURATE (1 << 2)
|
||||
|
||||
/**
|
||||
* DRM driver structure. This structure represent the common code for
|
||||
* a family of cards. There will one drm_device for each card present
|
||||
|
|
@ -760,6 +775,68 @@ struct drm_driver {
|
|||
*/
|
||||
int (*device_is_agp) (struct drm_device *dev);
|
||||
|
||||
/**
|
||||
* Called by vblank timestamping code.
|
||||
*
|
||||
* Return the current display scanout position from a crtc.
|
||||
*
|
||||
* \param dev DRM device.
|
||||
* \param crtc Id of the crtc to query.
|
||||
* \param *vpos Target location for current vertical scanout position.
|
||||
* \param *hpos Target location for current horizontal scanout position.
|
||||
*
|
||||
* Returns vpos as a positive number while in active scanout area.
|
||||
* Returns vpos as a negative number inside vblank, counting the number
|
||||
* of scanlines to go until end of vblank, e.g., -1 means "one scanline
|
||||
* until start of active scanout / end of vblank."
|
||||
*
|
||||
* \return Flags, or'ed together as follows:
|
||||
*
|
||||
* DRM_SCANOUTPOS_VALID = Query successfull.
|
||||
* DRM_SCANOUTPOS_INVBL = Inside vblank.
|
||||
* DRM_SCANOUTPOS_ACCURATE = Returned position is accurate. A lack of
|
||||
* this flag means that returned position may be offset by a constant
|
||||
* but unknown small number of scanlines wrt. real scanout position.
|
||||
*
|
||||
*/
|
||||
int (*get_scanout_position) (struct drm_device *dev, int crtc,
|
||||
int *vpos, int *hpos);
|
||||
|
||||
/**
|
||||
* Called by \c drm_get_last_vbltimestamp. Should return a precise
|
||||
* timestamp when the most recent VBLANK interval ended or will end.
|
||||
*
|
||||
* Specifically, the timestamp in @vblank_time should correspond as
|
||||
* closely as possible to the time when the first video scanline of
|
||||
* the video frame after the end of VBLANK will start scanning out,
|
||||
* the time immmediately after end of the VBLANK interval. If the
|
||||
* @crtc is currently inside VBLANK, this will be a time in the future.
|
||||
* If the @crtc is currently scanning out a frame, this will be the
|
||||
* past start time of the current scanout. This is meant to adhere
|
||||
* to the OpenML OML_sync_control extension specification.
|
||||
*
|
||||
* \param dev dev DRM device handle.
|
||||
* \param crtc crtc for which timestamp should be returned.
|
||||
* \param *max_error Maximum allowable timestamp error in nanoseconds.
|
||||
* Implementation should strive to provide timestamp
|
||||
* with an error of at most *max_error nanoseconds.
|
||||
* Returns true upper bound on error for timestamp.
|
||||
* \param *vblank_time Target location for returned vblank timestamp.
|
||||
* \param flags 0 = Defaults, no special treatment needed.
|
||||
* \param DRM_CALLED_FROM_VBLIRQ = Function is called from vblank
|
||||
* irq handler. Some drivers need to apply some workarounds
|
||||
* for gpu-specific vblank irq quirks if flag is set.
|
||||
*
|
||||
* \returns
|
||||
* Zero if timestamping isn't supported in current display mode or a
|
||||
* negative number on failure. A positive status code on success,
|
||||
* which describes how the vblank_time timestamp was computed.
|
||||
*/
|
||||
int (*get_vblank_timestamp) (struct drm_device *dev, int crtc,
|
||||
int *max_error,
|
||||
struct timeval *vblank_time,
|
||||
unsigned flags);
|
||||
|
||||
/* these have to be filled in */
|
||||
|
||||
irqreturn_t(*irq_handler) (DRM_IRQ_ARGS);
|
||||
|
|
@ -983,6 +1060,8 @@ struct drm_device {
|
|||
|
||||
wait_queue_head_t *vbl_queue; /**< VBLANK wait queue */
|
||||
atomic_t *_vblank_count; /**< number of VBLANK interrupts (driver must alloc the right number of counters) */
|
||||
struct timeval *_vblank_time; /**< timestamp of current vblank_count (drivers must alloc right number of fields) */
|
||||
spinlock_t vblank_time_lock; /**< Protects vblank count and time updates during vblank enable/disable */
|
||||
spinlock_t vbl_lock;
|
||||
atomic_t *vblank_refcount; /* number of users of vblank interruptsper crtc */
|
||||
u32 *last_vblank; /* protected by dev->vbl_lock, used */
|
||||
|
|
@ -1041,12 +1120,14 @@ struct drm_device {
|
|||
/*@{ */
|
||||
spinlock_t object_name_lock;
|
||||
struct idr object_name_idr;
|
||||
uint32_t invalidate_domains; /* domains pending invalidation */
|
||||
uint32_t flush_domains; /* domains pending flush */
|
||||
/*@} */
|
||||
|
||||
int switch_power_state;
|
||||
};
|
||||
|
||||
#define DRM_SWITCH_POWER_ON 0
|
||||
#define DRM_SWITCH_POWER_OFF 1
|
||||
#define DRM_SWITCH_POWER_CHANGING 2
|
||||
|
||||
static __inline__ int drm_core_check_feature(struct drm_device *dev,
|
||||
int feature)
|
||||
{
|
||||
|
|
@ -1284,11 +1365,22 @@ extern int drm_wait_vblank(struct drm_device *dev, void *data,
|
|||
struct drm_file *filp);
|
||||
extern int drm_vblank_wait(struct drm_device *dev, unsigned int *vbl_seq);
|
||||
extern u32 drm_vblank_count(struct drm_device *dev, int crtc);
|
||||
extern u32 drm_vblank_count_and_time(struct drm_device *dev, int crtc,
|
||||
struct timeval *vblanktime);
|
||||
extern void drm_handle_vblank(struct drm_device *dev, int crtc);
|
||||
extern int drm_vblank_get(struct drm_device *dev, int crtc);
|
||||
extern void drm_vblank_put(struct drm_device *dev, int crtc);
|
||||
extern void drm_vblank_off(struct drm_device *dev, int crtc);
|
||||
extern void drm_vblank_cleanup(struct drm_device *dev);
|
||||
extern u32 drm_get_last_vbltimestamp(struct drm_device *dev, int crtc,
|
||||
struct timeval *tvblank, unsigned flags);
|
||||
extern int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
|
||||
int crtc, int *max_error,
|
||||
struct timeval *vblank_time,
|
||||
unsigned flags,
|
||||
struct drm_crtc *refcrtc);
|
||||
extern void drm_calc_timestamping_constants(struct drm_crtc *crtc);
|
||||
|
||||
/* Modesetting support */
|
||||
extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc);
|
||||
extern void drm_vblank_post_modeset(struct drm_device *dev, int crtc);
|
||||
|
|
@ -1321,7 +1413,6 @@ extern int drm_agp_unbind_ioctl(struct drm_device *dev, void *data,
|
|||
extern int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request);
|
||||
extern int drm_agp_bind_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
extern void drm_agp_chipset_flush(struct drm_device *dev);
|
||||
|
||||
/* Stub support (drm_stub.h) */
|
||||
extern int drm_setmaster_ioctl(struct drm_device *dev, void *data,
|
||||
|
|
@ -1340,6 +1431,9 @@ extern void drm_put_dev(struct drm_device *dev);
|
|||
extern int drm_put_minor(struct drm_minor **minor);
|
||||
extern unsigned int drm_debug;
|
||||
|
||||
extern unsigned int drm_vblank_offdelay;
|
||||
extern unsigned int drm_timestamp_precision;
|
||||
|
||||
extern struct class *drm_class;
|
||||
extern struct proc_dir_entry *drm_proc_root;
|
||||
extern struct dentry *drm_debugfs_root;
|
||||
|
|
|
|||
|
|
@ -351,8 +351,14 @@ struct drm_crtc {
|
|||
|
||||
bool enabled;
|
||||
|
||||
/* Requested mode from modesetting. */
|
||||
struct drm_display_mode mode;
|
||||
|
||||
/* Programmed mode in hw, after adjustments for encoders,
|
||||
* crtc, panel scaling etc. Needed for timestamping etc.
|
||||
*/
|
||||
struct drm_display_mode hwmode;
|
||||
|
||||
int x, y;
|
||||
const struct drm_crtc_funcs *funcs;
|
||||
|
||||
|
|
@ -360,6 +366,9 @@ struct drm_crtc {
|
|||
uint32_t gamma_size;
|
||||
uint16_t *gamma_store;
|
||||
|
||||
/* Constants needed for precise vblank and swap timestamping. */
|
||||
s64 framedur_ns, linedur_ns, pixeldur_ns;
|
||||
|
||||
/* if you are using the helper */
|
||||
void *helper_private;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -62,11 +62,14 @@ struct drm_mm {
|
|||
struct list_head unused_nodes;
|
||||
int num_unused;
|
||||
spinlock_t unused_lock;
|
||||
unsigned int scan_check_range : 1;
|
||||
unsigned scan_alignment;
|
||||
unsigned long scan_size;
|
||||
unsigned long scan_hit_start;
|
||||
unsigned scan_hit_size;
|
||||
unsigned scanned_blocks;
|
||||
unsigned long scan_start;
|
||||
unsigned long scan_end;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -145,6 +148,10 @@ static inline struct drm_mm *drm_get_mm(struct drm_mm_node *block)
|
|||
|
||||
void drm_mm_init_scan(struct drm_mm *mm, unsigned long size,
|
||||
unsigned alignment);
|
||||
void drm_mm_init_scan_with_range(struct drm_mm *mm, unsigned long size,
|
||||
unsigned alignment,
|
||||
unsigned long start,
|
||||
unsigned long end);
|
||||
int drm_mm_scan_add_block(struct drm_mm_node *node);
|
||||
int drm_mm_scan_remove_block(struct drm_mm_node *node);
|
||||
|
||||
|
|
|
|||
|
|
@ -142,6 +142,42 @@
|
|||
{0x1002, 0x5e4c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x5e4d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x5e4f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6720, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6721, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6722, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6723, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6724, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6725, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6726, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6727, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6728, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6729, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6738, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6739, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6740, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6741, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6742, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6743, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6744, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6745, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6746, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6747, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6748, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6749, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6750, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6758, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6759, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6760, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6761, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6762, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6763, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6764, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6765, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6766, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6767, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6768, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6770, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6779, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6880, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6888, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6889, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \
|
||||
|
|
@ -419,6 +455,10 @@
|
|||
{0x1002, 0x9713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
{0x1002, 0x9714, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
{0x1002, 0x9715, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
{0x1002, 0x9802, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
{0x1002, 0x9803, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
{0x1002, 0x9804, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
{0x1002, 0x9805, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
{0, 0, 0}
|
||||
|
||||
#define r128_PCI_IDS \
|
||||
|
|
|
|||
|
|
@ -287,6 +287,9 @@ typedef struct drm_i915_irq_wait {
|
|||
#define I915_PARAM_HAS_EXECBUF2 9
|
||||
#define I915_PARAM_HAS_BSD 10
|
||||
#define I915_PARAM_HAS_BLT 11
|
||||
#define I915_PARAM_HAS_RELAXED_FENCING 12
|
||||
#define I915_PARAM_HAS_COHERENT_RINGS 13
|
||||
#define I915_PARAM_HAS_EXEC_CONSTANTS 14
|
||||
|
||||
typedef struct drm_i915_getparam {
|
||||
int param;
|
||||
|
|
@ -633,6 +636,17 @@ struct drm_i915_gem_execbuffer2 {
|
|||
#define I915_EXEC_RENDER (1<<0)
|
||||
#define I915_EXEC_BSD (2<<0)
|
||||
#define I915_EXEC_BLT (3<<0)
|
||||
|
||||
/* Used for switching the constants addressing mode on gen4+ RENDER ring.
|
||||
* Gen6+ only supports relative addressing to dynamic state (default) and
|
||||
* absolute addressing.
|
||||
*
|
||||
* These flags are ignored for the BSD and BLT rings.
|
||||
*/
|
||||
#define I915_EXEC_CONSTANTS_MASK (3<<6)
|
||||
#define I915_EXEC_CONSTANTS_REL_GENERAL (0<<6) /* default */
|
||||
#define I915_EXEC_CONSTANTS_ABSOLUTE (1<<6)
|
||||
#define I915_EXEC_CONSTANTS_REL_SURFACE (2<<6) /* gen4/5 only */
|
||||
__u64 flags;
|
||||
__u64 rsvd1;
|
||||
__u64 rsvd2;
|
||||
|
|
|
|||
|
|
@ -2,17 +2,40 @@
|
|||
|
||||
#ifndef _DRM_INTEL_GTT_H
|
||||
#define _DRM_INTEL_GTT_H
|
||||
struct intel_gtt {
|
||||
/* Number of stolen gtt entries at the beginning. */
|
||||
unsigned int gtt_stolen_entries;
|
||||
|
||||
const struct intel_gtt {
|
||||
/* Size of memory reserved for graphics by the BIOS */
|
||||
unsigned int stolen_size;
|
||||
/* Total number of gtt entries. */
|
||||
unsigned int gtt_total_entries;
|
||||
/* Part of the gtt that is mappable by the cpu, for those chips where
|
||||
* this is not the full gtt. */
|
||||
unsigned int gtt_mappable_entries;
|
||||
};
|
||||
/* Whether i915 needs to use the dmar apis or not. */
|
||||
unsigned int needs_dmar : 1;
|
||||
} *intel_gtt_get(void);
|
||||
|
||||
struct intel_gtt *intel_gtt_get(void);
|
||||
void intel_gtt_chipset_flush(void);
|
||||
void intel_gtt_unmap_memory(struct scatterlist *sg_list, int num_sg);
|
||||
void intel_gtt_clear_range(unsigned int first_entry, unsigned int num_entries);
|
||||
int intel_gtt_map_memory(struct page **pages, unsigned int num_entries,
|
||||
struct scatterlist **sg_list, int *num_sg);
|
||||
void intel_gtt_insert_sg_entries(struct scatterlist *sg_list,
|
||||
unsigned int sg_len,
|
||||
unsigned int pg_start,
|
||||
unsigned int flags);
|
||||
void intel_gtt_insert_pages(unsigned int first_entry, unsigned int num_entries,
|
||||
struct page **pages, unsigned int flags);
|
||||
|
||||
/* Special gtt memory types */
|
||||
#define AGP_DCACHE_MEMORY 1
|
||||
#define AGP_PHYS_MEMORY 2
|
||||
|
||||
/* New caching attributes for gen6/sandybridge */
|
||||
#define AGP_USER_CACHED_MEMORY_LLC_MLC (AGP_USER_TYPES + 2)
|
||||
#define AGP_USER_UNCACHED_MEMORY (AGP_USER_TYPES + 4)
|
||||
|
||||
/* flag for GFDT type */
|
||||
#define AGP_USER_CACHED_MEMORY_GFDT (1 << 3)
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -71,16 +71,14 @@ struct drm_nouveau_gpuobj_free {
|
|||
#define NOUVEAU_GETPARAM_PCI_VENDOR 3
|
||||
#define NOUVEAU_GETPARAM_PCI_DEVICE 4
|
||||
#define NOUVEAU_GETPARAM_BUS_TYPE 5
|
||||
#define NOUVEAU_GETPARAM_FB_PHYSICAL 6
|
||||
#define NOUVEAU_GETPARAM_AGP_PHYSICAL 7
|
||||
#define NOUVEAU_GETPARAM_FB_SIZE 8
|
||||
#define NOUVEAU_GETPARAM_AGP_SIZE 9
|
||||
#define NOUVEAU_GETPARAM_PCI_PHYSICAL 10
|
||||
#define NOUVEAU_GETPARAM_CHIPSET_ID 11
|
||||
#define NOUVEAU_GETPARAM_VM_VRAM_BASE 12
|
||||
#define NOUVEAU_GETPARAM_GRAPH_UNITS 13
|
||||
#define NOUVEAU_GETPARAM_PTIMER_TIME 14
|
||||
#define NOUVEAU_GETPARAM_HAS_BO_USAGE 15
|
||||
#define NOUVEAU_GETPARAM_HAS_PAGEFLIP 16
|
||||
struct drm_nouveau_getparam {
|
||||
uint64_t param;
|
||||
uint64_t value;
|
||||
|
|
@ -171,7 +169,6 @@ struct drm_nouveau_gem_pushbuf {
|
|||
};
|
||||
|
||||
#define NOUVEAU_GEM_CPU_PREP_NOWAIT 0x00000001
|
||||
#define NOUVEAU_GEM_CPU_PREP_NOBLOCK 0x00000002
|
||||
#define NOUVEAU_GEM_CPU_PREP_WRITE 0x00000004
|
||||
struct drm_nouveau_gem_cpu_prep {
|
||||
uint32_t handle;
|
||||
|
|
|
|||
|
|
@ -906,6 +906,7 @@ struct drm_radeon_cs {
|
|||
#define RADEON_INFO_ACCEL_WORKING2 0x05
|
||||
#define RADEON_INFO_TILING_CONFIG 0x06
|
||||
#define RADEON_INFO_WANT_HYPERZ 0x07
|
||||
#define RADEON_INFO_WANT_CMASK 0x08 /* get access to CMASK on r300 */
|
||||
|
||||
struct drm_radeon_info {
|
||||
uint32_t request;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,8 @@ struct ttm_placement {
|
|||
* @is_iomem: is this io memory ?
|
||||
* @size: size in byte
|
||||
* @offset: offset from the base address
|
||||
* @io_reserved_vm: The VM system has a refcount in @io_reserved_count
|
||||
* @io_reserved_count: Refcounting the numbers of callers to ttm_mem_io_reserve
|
||||
*
|
||||
* Structure indicating the bus placement of an object.
|
||||
*/
|
||||
|
|
@ -83,7 +85,8 @@ struct ttm_bus_placement {
|
|||
unsigned long size;
|
||||
unsigned long offset;
|
||||
bool is_iomem;
|
||||
bool io_reserved;
|
||||
bool io_reserved_vm;
|
||||
uint64_t io_reserved_count;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -154,7 +157,6 @@ struct ttm_tt;
|
|||
* keeps one refcount. When this refcount reaches zero,
|
||||
* the object is destroyed.
|
||||
* @event_queue: Queue for processes waiting on buffer object status change.
|
||||
* @lock: spinlock protecting mostly synchronization members.
|
||||
* @mem: structure describing current placement.
|
||||
* @persistant_swap_storage: Usually the swap storage is deleted for buffers
|
||||
* pinned in physical memory. If this behaviour is not desired, this member
|
||||
|
|
@ -213,7 +215,6 @@ struct ttm_buffer_object {
|
|||
struct kref kref;
|
||||
struct kref list_kref;
|
||||
wait_queue_head_t event_queue;
|
||||
spinlock_t lock;
|
||||
|
||||
/**
|
||||
* Members protected by the bo::reserved lock.
|
||||
|
|
@ -237,6 +238,7 @@ struct ttm_buffer_object {
|
|||
struct list_head lru;
|
||||
struct list_head ddestroy;
|
||||
struct list_head swap;
|
||||
struct list_head io_reserve_lru;
|
||||
uint32_t val_seq;
|
||||
bool seq_valid;
|
||||
|
||||
|
|
@ -248,10 +250,10 @@ struct ttm_buffer_object {
|
|||
atomic_t reserved;
|
||||
|
||||
/**
|
||||
* Members protected by the bo::lock
|
||||
* Members protected by struct buffer_object_device::fence_lock
|
||||
* In addition, setting sync_obj to anything else
|
||||
* than NULL requires bo::reserved to be held. This allows for
|
||||
* checking NULL while reserved but not holding bo::lock.
|
||||
* checking NULL while reserved but not holding the mentioned lock.
|
||||
*/
|
||||
|
||||
void *sync_obj_arg;
|
||||
|
|
@ -364,6 +366,44 @@ extern int ttm_bo_validate(struct ttm_buffer_object *bo,
|
|||
*/
|
||||
extern void ttm_bo_unref(struct ttm_buffer_object **bo);
|
||||
|
||||
|
||||
/**
|
||||
* ttm_bo_list_ref_sub
|
||||
*
|
||||
* @bo: The buffer object.
|
||||
* @count: The number of references with which to decrease @bo::list_kref;
|
||||
* @never_free: The refcount should not reach zero with this operation.
|
||||
*
|
||||
* Release @count lru list references to this buffer object.
|
||||
*/
|
||||
extern void ttm_bo_list_ref_sub(struct ttm_buffer_object *bo, int count,
|
||||
bool never_free);
|
||||
|
||||
/**
|
||||
* ttm_bo_add_to_lru
|
||||
*
|
||||
* @bo: The buffer object.
|
||||
*
|
||||
* Add this bo to the relevant mem type lru and, if it's backed by
|
||||
* system pages (ttms) to the swap list.
|
||||
* This function must be called with struct ttm_bo_global::lru_lock held, and
|
||||
* is typically called immediately prior to unreserving a bo.
|
||||
*/
|
||||
extern void ttm_bo_add_to_lru(struct ttm_buffer_object *bo);
|
||||
|
||||
/**
|
||||
* ttm_bo_del_from_lru
|
||||
*
|
||||
* @bo: The buffer object.
|
||||
*
|
||||
* Remove this bo from all lru lists used to lookup and reserve an object.
|
||||
* This function must be called with struct ttm_bo_global::lru_lock held,
|
||||
* and is usually called just immediately after the bo has been reserved to
|
||||
* avoid recursive reservation from lru lists.
|
||||
*/
|
||||
extern int ttm_bo_del_from_lru(struct ttm_buffer_object *bo);
|
||||
|
||||
|
||||
/**
|
||||
* ttm_bo_lock_delayed_workqueue
|
||||
*
|
||||
|
|
|
|||
|
|
@ -179,30 +179,6 @@ struct ttm_tt {
|
|||
#define TTM_MEMTYPE_FLAG_MAPPABLE (1 << 1) /* Memory mappable */
|
||||
#define TTM_MEMTYPE_FLAG_CMA (1 << 3) /* Can't map aperture */
|
||||
|
||||
/**
|
||||
* struct ttm_mem_type_manager
|
||||
*
|
||||
* @has_type: The memory type has been initialized.
|
||||
* @use_type: The memory type is enabled.
|
||||
* @flags: TTM_MEMTYPE_XX flags identifying the traits of the memory
|
||||
* 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.
|
||||
* @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
|
||||
* @default_caching: The default caching policy used for a buffer object
|
||||
* placed in this memory type if the user doesn't provide one.
|
||||
* @manager: The range manager used for this memory type. FIXME: If the aperture
|
||||
* has a page size different from the underlying system, the granularity
|
||||
* of this manager should take care of this. But the range allocating code
|
||||
* in ttm_bo.c needs to be modified for this.
|
||||
* @lru: The lru list for this memory type.
|
||||
*
|
||||
* This structure is used to identify and manage memory types for a device.
|
||||
* It's set up by the ttm_bo_driver::init_mem_type method.
|
||||
*/
|
||||
|
||||
struct ttm_mem_type_manager;
|
||||
|
||||
struct ttm_mem_type_manager_func {
|
||||
|
|
@ -287,6 +263,36 @@ struct ttm_mem_type_manager_func {
|
|||
void (*debug)(struct ttm_mem_type_manager *man, const char *prefix);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ttm_mem_type_manager
|
||||
*
|
||||
* @has_type: The memory type has been initialized.
|
||||
* @use_type: The memory type is enabled.
|
||||
* @flags: TTM_MEMTYPE_XX flags identifying the traits of the memory
|
||||
* 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.
|
||||
* @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
|
||||
* @default_caching: The default caching policy used for a buffer object
|
||||
* placed in this memory type if the user doesn't provide one.
|
||||
* @func: structure pointer implementing the range manager. See above
|
||||
* @priv: Driver private closure for @func.
|
||||
* @io_reserve_mutex: Mutex optionally protecting shared io_reserve structures
|
||||
* @use_io_reserve_lru: Use an lru list to try to unreserve io_mem_regions
|
||||
* reserved by the TTM vm system.
|
||||
* @io_reserve_lru: Optional lru list for unreserving io mem regions.
|
||||
* @io_reserve_fastpath: Only use bdev::driver::io_mem_reserve to obtain
|
||||
* static information. bdev::driver::io_mem_free is never used.
|
||||
* @lru: The lru list for this memory type.
|
||||
*
|
||||
* This structure is used to identify and manage memory types for a device.
|
||||
* It's set up by the ttm_bo_driver::init_mem_type method.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
struct ttm_mem_type_manager {
|
||||
struct ttm_bo_device *bdev;
|
||||
|
||||
|
|
@ -303,6 +309,15 @@ struct ttm_mem_type_manager {
|
|||
uint32_t default_caching;
|
||||
const struct ttm_mem_type_manager_func *func;
|
||||
void *priv;
|
||||
struct mutex io_reserve_mutex;
|
||||
bool use_io_reserve_lru;
|
||||
bool io_reserve_fastpath;
|
||||
|
||||
/*
|
||||
* Protected by @io_reserve_mutex:
|
||||
*/
|
||||
|
||||
struct list_head io_reserve_lru;
|
||||
|
||||
/*
|
||||
* Protected by the global->lru_lock.
|
||||
|
|
@ -510,9 +525,12 @@ struct ttm_bo_global {
|
|||
*
|
||||
* @driver: Pointer to a struct ttm_bo_driver struct setup by the driver.
|
||||
* @man: An array of mem_type_managers.
|
||||
* @fence_lock: Protects the synchronizing members on *all* bos belonging
|
||||
* to this device.
|
||||
* @addr_space_mm: Range manager for the device address space.
|
||||
* lru_lock: Spinlock that protects the buffer+device lru lists and
|
||||
* ddestroy lists.
|
||||
* @val_seq: Current validation sequence.
|
||||
* @nice_mode: Try nicely to wait for buffer idle when cleaning a manager.
|
||||
* If a GPU lockup has been detected, this is forced to 0.
|
||||
* @dev_mapping: A pointer to the struct address_space representing the
|
||||
|
|
@ -531,6 +549,7 @@ struct ttm_bo_device {
|
|||
struct ttm_bo_driver *driver;
|
||||
rwlock_t vm_lock;
|
||||
struct ttm_mem_type_manager man[TTM_NUM_MEM_TYPES];
|
||||
spinlock_t fence_lock;
|
||||
/*
|
||||
* Protected by the vm lock.
|
||||
*/
|
||||
|
|
@ -541,6 +560,7 @@ struct ttm_bo_device {
|
|||
* Protected by the global:lru lock.
|
||||
*/
|
||||
struct list_head ddestroy;
|
||||
uint32_t val_seq;
|
||||
|
||||
/*
|
||||
* Protected by load / firstopen / lastclose /unload sync.
|
||||
|
|
@ -753,31 +773,6 @@ extern void ttm_bo_mem_put_locked(struct ttm_buffer_object *bo,
|
|||
|
||||
extern int ttm_bo_wait_cpu(struct ttm_buffer_object *bo, bool no_wait);
|
||||
|
||||
/**
|
||||
* ttm_bo_pci_offset - Get the PCI offset for the buffer object memory.
|
||||
*
|
||||
* @bo Pointer to a struct ttm_buffer_object.
|
||||
* @bus_base On return the base of the PCI region
|
||||
* @bus_offset On return the byte offset into the PCI region
|
||||
* @bus_size On return the byte size of the buffer object or zero if
|
||||
* the buffer object memory is not accessible through a PCI region.
|
||||
*
|
||||
* Returns:
|
||||
* -EINVAL if the buffer object is currently not mappable.
|
||||
* 0 otherwise.
|
||||
*/
|
||||
|
||||
extern int ttm_bo_pci_offset(struct ttm_bo_device *bdev,
|
||||
struct ttm_mem_reg *mem,
|
||||
unsigned long *bus_base,
|
||||
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 drm_global_reference *ref);
|
||||
extern int ttm_bo_global_init(struct drm_global_reference *ref);
|
||||
|
||||
|
|
@ -809,6 +804,22 @@ extern int ttm_bo_device_init(struct ttm_bo_device *bdev,
|
|||
*/
|
||||
extern void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo);
|
||||
|
||||
/**
|
||||
* ttm_bo_unmap_virtual
|
||||
*
|
||||
* @bo: tear down the virtual mappings for this BO
|
||||
*
|
||||
* The caller must take ttm_mem_io_lock before calling this function.
|
||||
*/
|
||||
extern void ttm_bo_unmap_virtual_locked(struct ttm_buffer_object *bo);
|
||||
|
||||
extern int ttm_mem_io_reserve_vm(struct ttm_buffer_object *bo);
|
||||
extern void ttm_mem_io_free_vm(struct ttm_buffer_object *bo);
|
||||
extern int ttm_mem_io_lock(struct ttm_mem_type_manager *man,
|
||||
bool interruptible);
|
||||
extern void ttm_mem_io_unlock(struct ttm_mem_type_manager *man);
|
||||
|
||||
|
||||
/**
|
||||
* ttm_bo_reserve:
|
||||
*
|
||||
|
|
@ -859,11 +870,44 @@ extern void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo);
|
|||
* try again. (only if use_sequence == 1).
|
||||
* -ERESTARTSYS: A wait for the buffer to become unreserved was interrupted by
|
||||
* a signal. Release all buffer reservations and return to user-space.
|
||||
* -EBUSY: The function needed to sleep, but @no_wait was true
|
||||
* -EDEADLK: Bo already reserved using @sequence. This error code will only
|
||||
* be returned if @use_sequence is set to true.
|
||||
*/
|
||||
extern int ttm_bo_reserve(struct ttm_buffer_object *bo,
|
||||
bool interruptible,
|
||||
bool no_wait, bool use_sequence, uint32_t sequence);
|
||||
|
||||
|
||||
/**
|
||||
* ttm_bo_reserve_locked:
|
||||
*
|
||||
* @bo: A pointer to a struct ttm_buffer_object.
|
||||
* @interruptible: Sleep interruptible if waiting.
|
||||
* @no_wait: Don't sleep while trying to reserve, rather return -EBUSY.
|
||||
* @use_sequence: If @bo is already reserved, Only sleep waiting for
|
||||
* it to become unreserved if @sequence < (@bo)->sequence.
|
||||
*
|
||||
* Must be called with struct ttm_bo_global::lru_lock held,
|
||||
* and will not remove reserved buffers from the lru lists.
|
||||
* The function may release the LRU spinlock if it needs to sleep.
|
||||
* Otherwise identical to ttm_bo_reserve.
|
||||
*
|
||||
* Returns:
|
||||
* -EAGAIN: The reservation may cause a deadlock.
|
||||
* Release all buffer reservations, wait for @bo to become unreserved and
|
||||
* try again. (only if use_sequence == 1).
|
||||
* -ERESTARTSYS: A wait for the buffer to become unreserved was interrupted by
|
||||
* a signal. Release all buffer reservations and return to user-space.
|
||||
* -EBUSY: The function needed to sleep, but @no_wait was true
|
||||
* -EDEADLK: Bo already reserved using @sequence. This error code will only
|
||||
* be returned if @use_sequence is set to true.
|
||||
*/
|
||||
extern int ttm_bo_reserve_locked(struct ttm_buffer_object *bo,
|
||||
bool interruptible,
|
||||
bool no_wait, bool use_sequence,
|
||||
uint32_t sequence);
|
||||
|
||||
/**
|
||||
* ttm_bo_unreserve
|
||||
*
|
||||
|
|
@ -873,6 +917,16 @@ extern int ttm_bo_reserve(struct ttm_buffer_object *bo,
|
|||
*/
|
||||
extern void ttm_bo_unreserve(struct ttm_buffer_object *bo);
|
||||
|
||||
/**
|
||||
* ttm_bo_unreserve_locked
|
||||
*
|
||||
* @bo: A pointer to a struct ttm_buffer_object.
|
||||
*
|
||||
* Unreserve a previous reservation of @bo.
|
||||
* Needs to be called with struct ttm_bo_global::lru_lock held.
|
||||
*/
|
||||
extern void ttm_bo_unreserve_locked(struct ttm_buffer_object *bo);
|
||||
|
||||
/**
|
||||
* ttm_bo_wait_unreserved
|
||||
*
|
||||
|
|
|
|||
|
|
@ -41,7 +41,10 @@
|
|||
* @bo: refcounted buffer object pointer.
|
||||
* @new_sync_obj_arg: New sync_obj_arg for @bo, to be used once
|
||||
* adding a new sync object.
|
||||
* @reservied: Indicates whether @bo has been reserved for validation.
|
||||
* @reserved: Indicates whether @bo has been reserved for validation.
|
||||
* @removed: Indicates whether @bo has been removed from lru lists.
|
||||
* @put_count: Number of outstanding references on bo::list_kref.
|
||||
* @old_sync_obj: Pointer to a sync object about to be unreferenced
|
||||
*/
|
||||
|
||||
struct ttm_validate_buffer {
|
||||
|
|
@ -49,6 +52,9 @@ struct ttm_validate_buffer {
|
|||
struct ttm_buffer_object *bo;
|
||||
void *new_sync_obj_arg;
|
||||
bool reserved;
|
||||
bool removed;
|
||||
int put_count;
|
||||
void *old_sync_obj;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -66,7 +72,6 @@ extern void ttm_eu_backoff_reservation(struct list_head *list);
|
|||
* function ttm_eu_reserve_buffers
|
||||
*
|
||||
* @list: thread private list of ttm_validate_buffer structs.
|
||||
* @val_seq: A unique sequence number.
|
||||
*
|
||||
* Tries to reserve bos pointed to by the list entries for validation.
|
||||
* If the function returns 0, all buffers are marked as "unfenced",
|
||||
|
|
@ -88,7 +93,7 @@ extern void ttm_eu_backoff_reservation(struct list_head *list);
|
|||
* has failed.
|
||||
*/
|
||||
|
||||
extern int ttm_eu_reserve_buffers(struct list_head *list, uint32_t val_seq);
|
||||
extern int ttm_eu_reserve_buffers(struct list_head *list);
|
||||
|
||||
/**
|
||||
* function ttm_eu_fence_buffer_objects.
|
||||
|
|
|
|||
29
include/keys/encrypted-type.h
Normal file
29
include/keys/encrypted-type.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright (C) 2010 IBM Corporation
|
||||
* Author: Mimi Zohar <zohar@us.ibm.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, version 2 of the License.
|
||||
*/
|
||||
|
||||
#ifndef _KEYS_ENCRYPTED_TYPE_H
|
||||
#define _KEYS_ENCRYPTED_TYPE_H
|
||||
|
||||
#include <linux/key.h>
|
||||
#include <linux/rcupdate.h>
|
||||
|
||||
struct encrypted_key_payload {
|
||||
struct rcu_head rcu;
|
||||
char *master_desc; /* datablob: master key name */
|
||||
char *datalen; /* datablob: decrypted key length */
|
||||
u8 *iv; /* datablob: iv */
|
||||
u8 *encrypted_data; /* datablob: encrypted data */
|
||||
unsigned short datablob_len; /* length of datablob */
|
||||
unsigned short decrypted_datalen; /* decrypted data length */
|
||||
u8 decrypted_data[0]; /* decrypted data + datablob + hmac */
|
||||
};
|
||||
|
||||
extern struct key_type key_type_encrypted;
|
||||
|
||||
#endif /* _KEYS_ENCRYPTED_TYPE_H */
|
||||
31
include/keys/trusted-type.h
Normal file
31
include/keys/trusted-type.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (C) 2010 IBM Corporation
|
||||
* Author: David Safford <safford@us.ibm.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, version 2 of the License.
|
||||
*/
|
||||
|
||||
#ifndef _KEYS_TRUSTED_TYPE_H
|
||||
#define _KEYS_TRUSTED_TYPE_H
|
||||
|
||||
#include <linux/key.h>
|
||||
#include <linux/rcupdate.h>
|
||||
|
||||
#define MIN_KEY_SIZE 32
|
||||
#define MAX_KEY_SIZE 128
|
||||
#define MAX_BLOB_SIZE 320
|
||||
|
||||
struct trusted_key_payload {
|
||||
struct rcu_head rcu;
|
||||
unsigned int key_len;
|
||||
unsigned int blob_len;
|
||||
unsigned char migratable;
|
||||
unsigned char key[MAX_KEY_SIZE + 1];
|
||||
unsigned char blob[MAX_BLOB_SIZE];
|
||||
};
|
||||
|
||||
extern struct key_type key_type_trusted;
|
||||
|
||||
#endif /* _KEYS_TRUSTED_TYPE_H */
|
||||
|
|
@ -20,15 +20,18 @@ header-y += wimax/
|
|||
objhdr-y += version.h
|
||||
|
||||
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \
|
||||
$(srctree)/include/asm-$(SRCARCH)/a.out.h),)
|
||||
$(srctree)/include/asm-$(SRCARCH)/a.out.h \
|
||||
$(INSTALL_HDR_PATH)/include/asm-*/a.out.h),)
|
||||
header-y += a.out.h
|
||||
endif
|
||||
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \
|
||||
$(srctree)/include/asm-$(SRCARCH)/kvm.h),)
|
||||
$(srctree)/include/asm-$(SRCARCH)/kvm.h \
|
||||
$(INSTALL_HDR_PATH)/include/asm-*/kvm.h),)
|
||||
header-y += kvm.h
|
||||
endif
|
||||
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
|
||||
$(srctree)/include/asm-$(SRCARCH)/kvm_para.h),)
|
||||
$(srctree)/include/asm-$(SRCARCH)/kvm_para.h \
|
||||
$(INSTALL_HDR_PATH)/include/asm-*/kvm_para.h),)
|
||||
header-y += kvm_para.h
|
||||
endif
|
||||
|
||||
|
|
@ -155,6 +158,7 @@ header-y += icmpv6.h
|
|||
header-y += if.h
|
||||
header-y += if_addr.h
|
||||
header-y += if_addrlabel.h
|
||||
header-y += if_alg.h
|
||||
header-y += if_arcnet.h
|
||||
header-y += if_arp.h
|
||||
header-y += if_bonding.h
|
||||
|
|
@ -367,7 +371,6 @@ header-y += utime.h
|
|||
header-y += utsname.h
|
||||
header-y += veth.h
|
||||
header-y += vhost.h
|
||||
header-y += videodev.h
|
||||
header-y += videodev2.h
|
||||
header-y += virtio_9p.h
|
||||
header-y += virtio_balloon.h
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ static inline int acpi_video_display_switch_support(void)
|
|||
|
||||
extern int acpi_blacklisted(void);
|
||||
extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d);
|
||||
extern int acpi_osi_setup(char *str);
|
||||
extern void acpi_osi_setup(char *str);
|
||||
|
||||
#ifdef CONFIG_ACPI_NUMA
|
||||
int acpi_get_pxm(acpi_handle handle);
|
||||
|
|
@ -352,4 +352,14 @@ static inline int acpi_table_parse(char *id,
|
|||
return -1;
|
||||
}
|
||||
#endif /* !CONFIG_ACPI */
|
||||
|
||||
#ifdef CONFIG_ACPI_SLEEP
|
||||
int suspend_nvs_register(unsigned long start, unsigned long size);
|
||||
#else
|
||||
static inline int suspend_nvs_register(unsigned long a, unsigned long b)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*_LINUX_ACPI_H*/
|
||||
|
|
|
|||
|
|
@ -102,10 +102,8 @@ extern struct agp_memory *agp_allocate_memory(struct agp_bridge_data *, size_t,
|
|||
extern int agp_copy_info(struct agp_bridge_data *, struct agp_kern_info *);
|
||||
extern int agp_bind_memory(struct agp_memory *, off_t);
|
||||
extern int agp_unbind_memory(struct agp_memory *);
|
||||
extern int agp_rebind_memory(void);
|
||||
extern void agp_enable(struct agp_bridge_data *, u32);
|
||||
extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *);
|
||||
extern void agp_backend_release(struct agp_bridge_data *);
|
||||
extern void agp_flush_chipset(struct agp_bridge_data *);
|
||||
|
||||
#endif /* _AGP_BACKEND_H */
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
#include <linux/device.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/resource.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
|
||||
#define AMBA_NR_IRQS 2
|
||||
#define AMBA_CID 0xb105f00d
|
||||
|
|
@ -28,6 +29,7 @@ struct amba_device {
|
|||
struct device dev;
|
||||
struct resource res;
|
||||
struct clk *pclk;
|
||||
struct regulator *vcore;
|
||||
u64 dma_mask;
|
||||
unsigned int periphid;
|
||||
unsigned int irq[AMBA_NR_IRQS];
|
||||
|
|
@ -71,6 +73,12 @@ void amba_release_regions(struct amba_device *);
|
|||
#define amba_pclk_disable(d) \
|
||||
do { if (!IS_ERR((d)->pclk)) clk_disable((d)->pclk); } while (0)
|
||||
|
||||
#define amba_vcore_enable(d) \
|
||||
(IS_ERR((d)->vcore) ? 0 : regulator_enable((d)->vcore))
|
||||
|
||||
#define amba_vcore_disable(d) \
|
||||
do { if (!IS_ERR((d)->vcore)) regulator_disable((d)->vcore); } while (0)
|
||||
|
||||
/* Some drivers don't use the struct amba_device */
|
||||
#define AMBA_CONFIG_BITS(a) (((a) >> 24) & 0xff)
|
||||
#define AMBA_REV_BITS(a) (((a) >> 20) & 0x0f)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
*
|
||||
* Please credit ARM.com
|
||||
* Documentation: ARM DDI 0196D
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef AMBA_PL08X_H
|
||||
|
|
@ -22,6 +21,15 @@
|
|||
#include <linux/dmaengine.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
struct pl08x_lli;
|
||||
struct pl08x_driver_data;
|
||||
|
||||
/* Bitmasks for selecting AHB ports for DMA transfers */
|
||||
enum {
|
||||
PL08X_AHB1 = (1 << 0),
|
||||
PL08X_AHB2 = (1 << 1)
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pl08x_channel_data - data structure to pass info between
|
||||
* platform and PL08x driver regarding channel configuration
|
||||
|
|
@ -46,8 +54,10 @@
|
|||
* @circular_buffer: whether the buffer passed in is circular and
|
||||
* shall simply be looped round round (like a record baby round
|
||||
* round round round)
|
||||
* @single: the device connected to this channel will request single
|
||||
* DMA transfers, not bursts. (Bursts are default.)
|
||||
* @single: the device connected to this channel will request single DMA
|
||||
* transfers, not bursts. (Bursts are default.)
|
||||
* @periph_buses: the device connected to this channel is accessible via
|
||||
* these buses (use PL08X_AHB1 | PL08X_AHB2).
|
||||
*/
|
||||
struct pl08x_channel_data {
|
||||
char *bus_id;
|
||||
|
|
@ -55,10 +65,10 @@ struct pl08x_channel_data {
|
|||
int max_signal;
|
||||
u32 muxval;
|
||||
u32 cctl;
|
||||
u32 ccfg;
|
||||
dma_addr_t addr;
|
||||
bool circular_buffer;
|
||||
bool single;
|
||||
u8 periph_buses;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -67,24 +77,23 @@ struct pl08x_channel_data {
|
|||
* @addr: current address
|
||||
* @maxwidth: the maximum width of a transfer on this bus
|
||||
* @buswidth: the width of this bus in bytes: 1, 2 or 4
|
||||
* @fill_bytes: bytes required to fill to the next bus memory
|
||||
* boundary
|
||||
* @fill_bytes: bytes required to fill to the next bus memory boundary
|
||||
*/
|
||||
struct pl08x_bus_data {
|
||||
dma_addr_t addr;
|
||||
u8 maxwidth;
|
||||
u8 buswidth;
|
||||
u32 fill_bytes;
|
||||
size_t fill_bytes;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pl08x_phy_chan - holder for the physical channels
|
||||
* @id: physical index to this channel
|
||||
* @lock: a lock to use when altering an instance of this struct
|
||||
* @signal: the physical signal (aka channel) serving this
|
||||
* physical channel right now
|
||||
* @serving: the virtual channel currently being served by this
|
||||
* physical channel
|
||||
* @signal: the physical signal (aka channel) serving this physical channel
|
||||
* right now
|
||||
* @serving: the virtual channel currently being served by this physical
|
||||
* channel
|
||||
*/
|
||||
struct pl08x_phy_chan {
|
||||
unsigned int id;
|
||||
|
|
@ -92,11 +101,6 @@ struct pl08x_phy_chan {
|
|||
spinlock_t lock;
|
||||
int signal;
|
||||
struct pl08x_dma_chan *serving;
|
||||
u32 csrc;
|
||||
u32 cdst;
|
||||
u32 clli;
|
||||
u32 cctl;
|
||||
u32 ccfg;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -108,26 +112,23 @@ struct pl08x_txd {
|
|||
struct dma_async_tx_descriptor tx;
|
||||
struct list_head node;
|
||||
enum dma_data_direction direction;
|
||||
struct pl08x_bus_data srcbus;
|
||||
struct pl08x_bus_data dstbus;
|
||||
int len;
|
||||
dma_addr_t src_addr;
|
||||
dma_addr_t dst_addr;
|
||||
size_t len;
|
||||
dma_addr_t llis_bus;
|
||||
void *llis_va;
|
||||
struct pl08x_channel_data *cd;
|
||||
bool active;
|
||||
struct pl08x_lli *llis_va;
|
||||
/* Default cctl value for LLIs */
|
||||
u32 cctl;
|
||||
/*
|
||||
* Settings to be put into the physical channel when we
|
||||
* trigger this txd
|
||||
* trigger this txd. Other registers are in llis_va[0].
|
||||
*/
|
||||
u32 csrc;
|
||||
u32 cdst;
|
||||
u32 clli;
|
||||
u32 cctl;
|
||||
u32 ccfg;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pl08x_dma_chan_state - holds the PL08x specific virtual
|
||||
* channel states
|
||||
* struct pl08x_dma_chan_state - holds the PL08x specific virtual channel
|
||||
* states
|
||||
* @PL08X_CHAN_IDLE: the channel is idle
|
||||
* @PL08X_CHAN_RUNNING: the channel has allocated a physical transport
|
||||
* channel and is running a transfer on it
|
||||
|
|
@ -147,6 +148,8 @@ enum pl08x_dma_chan_state {
|
|||
* struct pl08x_dma_chan - this structure wraps a DMA ENGINE channel
|
||||
* @chan: wrappped abstract channel
|
||||
* @phychan: the physical channel utilized by this channel, if there is one
|
||||
* @phychan_hold: if non-zero, hold on to the physical channel even if we
|
||||
* have no pending entries
|
||||
* @tasklet: tasklet scheduled by the IRQ to handle actual work etc
|
||||
* @name: name of channel
|
||||
* @cd: channel platform data
|
||||
|
|
@ -154,53 +157,49 @@ enum pl08x_dma_chan_state {
|
|||
* @runtime_direction: current direction of this channel according to
|
||||
* runtime config
|
||||
* @lc: last completed transaction on this channel
|
||||
* @desc_list: queued transactions pending on this channel
|
||||
* @pend_list: queued transactions pending on this channel
|
||||
* @at: active transaction on this channel
|
||||
* @lockflags: sometimes we let a lock last between two function calls,
|
||||
* especially prep/submit, and then we need to store the IRQ flags
|
||||
* in the channel state, here
|
||||
* @lock: a lock for this channel data
|
||||
* @host: a pointer to the host (internal use)
|
||||
* @state: whether the channel is idle, paused, running etc
|
||||
* @slave: whether this channel is a device (slave) or for memcpy
|
||||
* @waiting: a TX descriptor on this channel which is waiting for
|
||||
* a physical channel to become available
|
||||
* @waiting: a TX descriptor on this channel which is waiting for a physical
|
||||
* channel to become available
|
||||
*/
|
||||
struct pl08x_dma_chan {
|
||||
struct dma_chan chan;
|
||||
struct pl08x_phy_chan *phychan;
|
||||
int phychan_hold;
|
||||
struct tasklet_struct tasklet;
|
||||
char *name;
|
||||
struct pl08x_channel_data *cd;
|
||||
dma_addr_t runtime_addr;
|
||||
enum dma_data_direction runtime_direction;
|
||||
atomic_t last_issued;
|
||||
dma_cookie_t lc;
|
||||
struct list_head desc_list;
|
||||
struct list_head pend_list;
|
||||
struct pl08x_txd *at;
|
||||
unsigned long lockflags;
|
||||
spinlock_t lock;
|
||||
void *host;
|
||||
struct pl08x_driver_data *host;
|
||||
enum pl08x_dma_chan_state state;
|
||||
bool slave;
|
||||
struct pl08x_txd *waiting;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pl08x_platform_data - the platform configuration for the
|
||||
* PL08x PrimeCells.
|
||||
* struct pl08x_platform_data - the platform configuration for the PL08x
|
||||
* PrimeCells.
|
||||
* @slave_channels: the channels defined for the different devices on the
|
||||
* platform, all inclusive, including multiplexed channels. The available
|
||||
* physical channels will be multiplexed around these signals as they
|
||||
* are requested, just enumerate all possible channels.
|
||||
* @get_signal: request a physical signal to be used for a DMA
|
||||
* transfer immediately: if there is some multiplexing or similar blocking
|
||||
* the use of the channel the transfer can be denied by returning
|
||||
* less than zero, else it returns the allocated signal number
|
||||
* physical channels will be multiplexed around these signals as they are
|
||||
* requested, just enumerate all possible channels.
|
||||
* @get_signal: request a physical signal to be used for a DMA transfer
|
||||
* immediately: if there is some multiplexing or similar blocking the use
|
||||
* of the channel the transfer can be denied by returning less than zero,
|
||||
* else it returns the allocated signal number
|
||||
* @put_signal: indicate to the platform that this physical signal is not
|
||||
* running any DMA transfer and multiplexing can be recycled
|
||||
* @bus_bit_lli: Bit[0] of the address indicated which AHB bus master the
|
||||
* LLI addresses are on 0/1 Master 1/2.
|
||||
* @lli_buses: buses which LLIs can be fetched from: PL08X_AHB1 | PL08X_AHB2
|
||||
* @mem_buses: buses which memory can be accessed from: PL08X_AHB1 | PL08X_AHB2
|
||||
*/
|
||||
struct pl08x_platform_data {
|
||||
struct pl08x_channel_data *slave_channels;
|
||||
|
|
@ -208,6 +207,8 @@ struct pl08x_platform_data {
|
|||
struct pl08x_channel_data memcpy_channel;
|
||||
int (*get_signal)(struct pl08x_dma_chan *);
|
||||
void (*put_signal)(struct pl08x_dma_chan *);
|
||||
u8 lli_buses;
|
||||
u8 mem_buses;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_AMBA_PL08X
|
||||
|
|
|
|||
|
|
@ -113,6 +113,21 @@
|
|||
#define UART01x_LCRH_PEN 0x02
|
||||
#define UART01x_LCRH_BRK 0x01
|
||||
|
||||
#define ST_UART011_DMAWM_RX_1 (0 << 3)
|
||||
#define ST_UART011_DMAWM_RX_2 (1 << 3)
|
||||
#define ST_UART011_DMAWM_RX_4 (2 << 3)
|
||||
#define ST_UART011_DMAWM_RX_8 (3 << 3)
|
||||
#define ST_UART011_DMAWM_RX_16 (4 << 3)
|
||||
#define ST_UART011_DMAWM_RX_32 (5 << 3)
|
||||
#define ST_UART011_DMAWM_RX_48 (6 << 3)
|
||||
#define ST_UART011_DMAWM_TX_1 0
|
||||
#define ST_UART011_DMAWM_TX_2 1
|
||||
#define ST_UART011_DMAWM_TX_4 2
|
||||
#define ST_UART011_DMAWM_TX_8 3
|
||||
#define ST_UART011_DMAWM_TX_16 4
|
||||
#define ST_UART011_DMAWM_TX_32 5
|
||||
#define ST_UART011_DMAWM_TX_48 6
|
||||
|
||||
#define UART010_IIR_RTIS 0x08
|
||||
#define UART010_IIR_TIS 0x04
|
||||
#define UART010_IIR_RIS 0x02
|
||||
|
|
@ -180,6 +195,13 @@ struct amba_device; /* in uncompress this is included but amba/bus.h is not */
|
|||
struct amba_pl010_data {
|
||||
void (*set_mctrl)(struct amba_device *dev, void __iomem *base, unsigned int mctrl);
|
||||
};
|
||||
|
||||
struct dma_chan;
|
||||
struct amba_pl011_data {
|
||||
bool (*dma_filter)(struct dma_chan *chan, void *filter_param);
|
||||
void *dma_rx_param;
|
||||
void *dma_tx_param;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -427,8 +427,10 @@ extern rwlock_t vcc_sklist_lock;
|
|||
|
||||
#define ATM_SKB(skb) (((struct atm_skb_data *) (skb)->cb))
|
||||
|
||||
struct atm_dev *atm_dev_register(const char *type,const struct atmdev_ops *ops,
|
||||
int number,unsigned long *flags); /* number == -1: pick first available */
|
||||
struct atm_dev *atm_dev_register(const char *type, struct device *parent,
|
||||
const struct atmdev_ops *ops,
|
||||
int number, /* -1 == pick first available */
|
||||
unsigned long *flags);
|
||||
struct atm_dev *atm_dev_lookup(int number);
|
||||
void atm_dev_deregister(struct atm_dev *dev);
|
||||
|
||||
|
|
|
|||
|
|
@ -372,6 +372,7 @@ struct audit_buffer;
|
|||
struct audit_context;
|
||||
struct inode;
|
||||
struct netlink_skb_parms;
|
||||
struct path;
|
||||
struct linux_binprm;
|
||||
struct mq_attr;
|
||||
struct mqstat;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#define AUTOFS_MIN_PROTO_VERSION 3
|
||||
#define AUTOFS_MAX_PROTO_VERSION 5
|
||||
|
||||
#define AUTOFS_PROTO_SUBVERSION 1
|
||||
#define AUTOFS_PROTO_SUBVERSION 2
|
||||
|
||||
/* Mask for expire behaviour */
|
||||
#define AUTOFS_EXP_IMMEDIATE 1
|
||||
|
|
|
|||
30
include/linux/average.h
Normal file
30
include/linux/average.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#ifndef _LINUX_AVERAGE_H
|
||||
#define _LINUX_AVERAGE_H
|
||||
|
||||
/* Exponentially weighted moving average (EWMA) */
|
||||
|
||||
/* For more documentation see lib/average.c */
|
||||
|
||||
struct ewma {
|
||||
unsigned long internal;
|
||||
unsigned long factor;
|
||||
unsigned long weight;
|
||||
};
|
||||
|
||||
extern void ewma_init(struct ewma *avg, unsigned long factor,
|
||||
unsigned long weight);
|
||||
|
||||
extern struct ewma *ewma_add(struct ewma *avg, unsigned long val);
|
||||
|
||||
/**
|
||||
* ewma_read() - Get average value
|
||||
* @avg: Average structure
|
||||
*
|
||||
* Returns the average value held in @avg.
|
||||
*/
|
||||
static inline unsigned long ewma_read(const struct ewma *avg)
|
||||
{
|
||||
return avg->internal >> avg->factor;
|
||||
}
|
||||
|
||||
#endif /* _LINUX_AVERAGE_H */
|
||||
|
|
@ -24,6 +24,7 @@ struct bfin_mii_bus_platform_data {
|
|||
const unsigned short *mac_peripherals;
|
||||
int phy_mode;
|
||||
unsigned int phy_mask;
|
||||
unsigned short vlan1_mask, vlan2_mask;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ struct pt_regs;
|
|||
/*
|
||||
* This structure is used to hold the arguments that are used when loading binaries.
|
||||
*/
|
||||
struct linux_binprm{
|
||||
struct linux_binprm {
|
||||
char buf[BINPRM_BUF_SIZE];
|
||||
#ifdef CONFIG_MMU
|
||||
struct vm_area_struct *vma;
|
||||
|
|
@ -93,7 +93,6 @@ struct linux_binfmt {
|
|||
int (*load_shlib)(struct file *);
|
||||
int (*core_dump)(struct coredump_params *cprm);
|
||||
unsigned long min_coredump; /* minimal dump size */
|
||||
int hasvdso;
|
||||
};
|
||||
|
||||
extern int __register_binfmt(struct linux_binfmt *fmt, int insert);
|
||||
|
|
@ -113,7 +112,7 @@ extern void unregister_binfmt(struct linux_binfmt *);
|
|||
|
||||
extern int prepare_binprm(struct linux_binprm *);
|
||||
extern int __must_check remove_arg_zero(struct linux_binprm *);
|
||||
extern int search_binary_handler(struct linux_binprm *,struct pt_regs *);
|
||||
extern int search_binary_handler(struct linux_binprm *, struct pt_regs *);
|
||||
extern int flush_old_exec(struct linux_binprm * bprm);
|
||||
extern void setup_new_exec(struct linux_binprm * bprm);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
#ifndef __LINUX_BIT_SPINLOCK_H
|
||||
#define __LINUX_BIT_SPINLOCK_H
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/preempt.h>
|
||||
#include <asm/atomic.h>
|
||||
|
||||
/*
|
||||
* bit-based spin_lock()
|
||||
*
|
||||
|
|
|
|||
|
|
@ -109,6 +109,17 @@ static inline __u8 ror8(__u8 word, unsigned int shift)
|
|||
return (word >> shift) | (word << (8 - shift));
|
||||
}
|
||||
|
||||
/**
|
||||
* sign_extend32 - sign extend a 32-bit value using specified bit as sign-bit
|
||||
* @value: value to sign extend
|
||||
* @index: 0 based bit index (0<=index<32) to sign bit
|
||||
*/
|
||||
static inline __s32 sign_extend32(__u32 value, int index)
|
||||
{
|
||||
__u8 shift = 31 - index;
|
||||
return (__s32)(value << shift) >> shift;
|
||||
}
|
||||
|
||||
static inline unsigned fls_long(unsigned long l)
|
||||
{
|
||||
if (sizeof(l) == 4)
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ struct request {
|
|||
void *elevator_private3;
|
||||
|
||||
struct gendisk *rq_disk;
|
||||
struct hd_struct *part;
|
||||
unsigned long start_time;
|
||||
#ifdef CONFIG_BLK_CGROUP
|
||||
unsigned long long start_time_ns;
|
||||
|
|
@ -250,7 +251,7 @@ struct queue_limits {
|
|||
|
||||
unsigned char misaligned;
|
||||
unsigned char discard_misaligned;
|
||||
unsigned char no_cluster;
|
||||
unsigned char cluster;
|
||||
signed char discard_zeroes_data;
|
||||
};
|
||||
|
||||
|
|
@ -380,7 +381,6 @@ struct request_queue
|
|||
#endif
|
||||
};
|
||||
|
||||
#define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */
|
||||
#define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */
|
||||
#define QUEUE_FLAG_STOPPED 2 /* queue is stopped */
|
||||
#define QUEUE_FLAG_SYNCFULL 3 /* read queue has been filled */
|
||||
|
|
@ -403,7 +403,6 @@ struct request_queue
|
|||
#define QUEUE_FLAG_SECDISCARD 19 /* supports SECDISCARD */
|
||||
|
||||
#define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \
|
||||
(1 << QUEUE_FLAG_CLUSTER) | \
|
||||
(1 << QUEUE_FLAG_STACKABLE) | \
|
||||
(1 << QUEUE_FLAG_SAME_COMP) | \
|
||||
(1 << QUEUE_FLAG_ADD_RANDOM))
|
||||
|
|
@ -510,6 +509,11 @@ static inline void queue_flag_clear(unsigned int flag, struct request_queue *q)
|
|||
|
||||
#define rq_data_dir(rq) ((rq)->cmd_flags & 1)
|
||||
|
||||
static inline unsigned int blk_queue_cluster(struct request_queue *q)
|
||||
{
|
||||
return q->limits.cluster;
|
||||
}
|
||||
|
||||
/*
|
||||
* We regard a request as sync, if either a read or a sync write
|
||||
*/
|
||||
|
|
@ -643,7 +647,6 @@ static inline void rq_flush_dcache_pages(struct request *rq)
|
|||
|
||||
extern int blk_register_queue(struct gendisk *disk);
|
||||
extern void blk_unregister_queue(struct gendisk *disk);
|
||||
extern void register_disk(struct gendisk *dev);
|
||||
extern void generic_make_request(struct bio *bio);
|
||||
extern void blk_rq_init(struct request_queue *q, struct request *rq);
|
||||
extern void blk_put_request(struct request *);
|
||||
|
|
@ -805,6 +808,7 @@ extern struct request_queue *blk_init_allocated_queue(struct request_queue *,
|
|||
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);
|
||||
extern void blk_limits_max_hw_sectors(struct queue_limits *, unsigned int);
|
||||
extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int);
|
||||
extern void blk_queue_max_segments(struct request_queue *, unsigned short);
|
||||
extern void blk_queue_max_segment_size(struct request_queue *, unsigned int);
|
||||
|
|
@ -1252,6 +1256,9 @@ struct block_device_operations {
|
|||
int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
|
||||
int (*direct_access) (struct block_device *, sector_t,
|
||||
void **, unsigned long *);
|
||||
unsigned int (*check_events) (struct gendisk *disk,
|
||||
unsigned int clearing);
|
||||
/* ->media_changed() is DEPRECATED, use ->check_events() instead */
|
||||
int (*media_changed) (struct gendisk *);
|
||||
void (*unlock_native_capacity) (struct gendisk *);
|
||||
int (*revalidate_disk) (struct gendisk *);
|
||||
|
|
|
|||
|
|
@ -105,6 +105,8 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat,
|
|||
|
||||
#define alloc_bootmem(x) \
|
||||
__alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
|
||||
#define alloc_bootmem_align(x, align) \
|
||||
__alloc_bootmem(x, align, __pa(MAX_DMA_ADDRESS))
|
||||
#define alloc_bootmem_nopanic(x) \
|
||||
__alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
|
||||
#define alloc_bootmem_pages(x) \
|
||||
|
|
|
|||
|
|
@ -246,7 +246,6 @@ struct cpu_vfs_cap_data {
|
|||
/* Allow configuration of the secure attention key */
|
||||
/* Allow administration of the random device */
|
||||
/* Allow examination and configuration of disk quotas */
|
||||
/* Allow configuring the kernel's syslog (printk behaviour) */
|
||||
/* Allow setting the domainname */
|
||||
/* Allow setting the hostname */
|
||||
/* Allow calling bdflush() */
|
||||
|
|
@ -352,7 +351,11 @@ struct cpu_vfs_cap_data {
|
|||
|
||||
#define CAP_MAC_ADMIN 33
|
||||
|
||||
#define CAP_LAST_CAP CAP_MAC_ADMIN
|
||||
/* Allow configuring the kernel's syslog (printk behaviour) */
|
||||
|
||||
#define CAP_SYSLOG 34
|
||||
|
||||
#define CAP_LAST_CAP CAP_SYSLOG
|
||||
|
||||
#define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@ int cdev_add(struct cdev *, dev_t, unsigned);
|
|||
|
||||
void cdev_del(struct cdev *);
|
||||
|
||||
int cdev_index(struct inode *inode);
|
||||
|
||||
void cd_forget(struct inode *);
|
||||
|
||||
extern struct backing_dev_info directly_mappable_cdev_bdi;
|
||||
|
|
|
|||
|
|
@ -946,6 +946,8 @@ struct cdrom_device_info {
|
|||
/* device-related storage */
|
||||
unsigned int options : 30; /* options flags */
|
||||
unsigned mc_flags : 2; /* media change buffer flags */
|
||||
unsigned int vfs_events; /* cached events for vfs path */
|
||||
unsigned int ioctl_events; /* cached events for ioctl path */
|
||||
int use_count; /* number of times device opened */
|
||||
char name[20]; /* name of the device type */
|
||||
/* per-device flags */
|
||||
|
|
@ -965,6 +967,8 @@ struct cdrom_device_ops {
|
|||
int (*open) (struct cdrom_device_info *, int);
|
||||
void (*release) (struct cdrom_device_info *);
|
||||
int (*drive_status) (struct cdrom_device_info *, int);
|
||||
unsigned int (*check_events) (struct cdrom_device_info *cdi,
|
||||
unsigned int clearing, int slot);
|
||||
int (*media_changed) (struct cdrom_device_info *, int);
|
||||
int (*tray_move) (struct cdrom_device_info *, int);
|
||||
int (*lock_door) (struct cdrom_device_info *, int);
|
||||
|
|
@ -993,6 +997,8 @@ extern int cdrom_open(struct cdrom_device_info *cdi, struct block_device *bdev,
|
|||
extern void cdrom_release(struct cdrom_device_info *cdi, fmode_t mode);
|
||||
extern int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev,
|
||||
fmode_t mode, unsigned int cmd, unsigned long arg);
|
||||
extern unsigned int cdrom_check_events(struct cdrom_device_info *cdi,
|
||||
unsigned int clearing);
|
||||
extern int cdrom_media_changed(struct cdrom_device_info *);
|
||||
|
||||
extern int register_cdrom(struct cdrom_device_info *cdi);
|
||||
|
|
|
|||
|
|
@ -43,6 +43,10 @@
|
|||
#define CEPH_FEATURE_NOSRCADDR (1<<1)
|
||||
#define CEPH_FEATURE_MONCLOCKCHECK (1<<2)
|
||||
#define CEPH_FEATURE_FLOCK (1<<3)
|
||||
#define CEPH_FEATURE_SUBSCRIBE2 (1<<4)
|
||||
#define CEPH_FEATURE_MONNAMES (1<<5)
|
||||
#define CEPH_FEATURE_RECONNECT_SEQ (1<<6)
|
||||
#define CEPH_FEATURE_DIRLAYOUTHASH (1<<7)
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -55,10 +59,10 @@ struct ceph_file_layout {
|
|||
__le32 fl_stripe_count; /* over this many objects */
|
||||
__le32 fl_object_size; /* until objects are this big, then move to
|
||||
new objects */
|
||||
__le32 fl_cas_hash; /* 0 = none; 1 = sha256 */
|
||||
__le32 fl_cas_hash; /* UNUSED. 0 = none; 1 = sha256 */
|
||||
|
||||
/* pg -> disk layout */
|
||||
__le32 fl_object_stripe_unit; /* for per-object parity, if any */
|
||||
__le32 fl_object_stripe_unit; /* UNUSED. for per-object parity, if any */
|
||||
|
||||
/* object -> pg layout */
|
||||
__le32 fl_pg_preferred; /* preferred primary for pg (-1 for none) */
|
||||
|
|
@ -69,6 +73,12 @@ struct ceph_file_layout {
|
|||
|
||||
int ceph_file_layout_is_valid(const struct ceph_file_layout *layout);
|
||||
|
||||
struct ceph_dir_layout {
|
||||
__u8 dl_dir_hash; /* see ceph_hash.h for ids */
|
||||
__u8 dl_unused1;
|
||||
__u16 dl_unused2;
|
||||
__u32 dl_unused3;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* crypto algorithms */
|
||||
#define CEPH_CRYPTO_NONE 0x0
|
||||
|
|
@ -457,7 +467,7 @@ struct ceph_mds_reply_inode {
|
|||
struct ceph_timespec rctime;
|
||||
struct ceph_frag_tree_head fragtree; /* (must be at end of struct) */
|
||||
} __attribute__ ((packed));
|
||||
/* followed by frag array, then symlink string, then xattr blob */
|
||||
/* followed by frag array, symlink string, dir layout, xattr blob */
|
||||
|
||||
/* reply_lease follows dname, and reply_inode */
|
||||
struct ceph_mds_reply_lease {
|
||||
|
|
|
|||
|
|
@ -227,8 +227,10 @@ extern int ceph_open_session(struct ceph_client *client);
|
|||
extern void ceph_release_page_vector(struct page **pages, int num_pages);
|
||||
|
||||
extern struct page **ceph_get_direct_page_vector(const char __user *data,
|
||||
int num_pages);
|
||||
extern void ceph_put_page_vector(struct page **pages, int num_pages);
|
||||
int num_pages,
|
||||
bool write_page);
|
||||
extern void ceph_put_page_vector(struct page **pages, int num_pages,
|
||||
bool dirty);
|
||||
extern void ceph_release_page_vector(struct page **pages, int num_pages);
|
||||
extern struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags);
|
||||
extern int ceph_copy_user_to_page_vector(struct page **pages,
|
||||
|
|
|
|||
|
|
@ -110,17 +110,12 @@ struct ceph_msg_pos {
|
|||
|
||||
/*
|
||||
* ceph_connection state bit flags
|
||||
*
|
||||
* QUEUED and BUSY are used together to ensure that only a single
|
||||
* thread is currently opening, reading or writing data to the socket.
|
||||
*/
|
||||
#define LOSSYTX 0 /* we can close channel or drop messages on errors */
|
||||
#define CONNECTING 1
|
||||
#define NEGOTIATING 2
|
||||
#define KEEPALIVE_PENDING 3
|
||||
#define WRITE_PENDING 4 /* we have data ready to send */
|
||||
#define QUEUED 5 /* there is work queued on this connection */
|
||||
#define BUSY 6 /* work is being done */
|
||||
#define STANDBY 8 /* no outgoing messages, socket closed. we keep
|
||||
* the ceph_connection around to maintain shared
|
||||
* state with the peer. */
|
||||
|
|
|
|||
|
|
@ -564,7 +564,7 @@ struct cgroup_iter {
|
|||
/*
|
||||
* To iterate across the tasks in a cgroup:
|
||||
*
|
||||
* 1) call cgroup_iter_start to intialize an iterator
|
||||
* 1) call cgroup_iter_start to initialize an iterator
|
||||
*
|
||||
* 2) call cgroup_iter_next() to retrieve member tasks until it
|
||||
* returns NULL or until you want to end the iteration
|
||||
|
|
|
|||
36
include/linux/clkdev.h
Normal file
36
include/linux/clkdev.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* include/linux/clkdev.h
|
||||
*
|
||||
* Copyright (C) 2008 Russell King.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* Helper for the clk API to assist looking up a struct clk.
|
||||
*/
|
||||
#ifndef __CLKDEV_H
|
||||
#define __CLKDEV_H
|
||||
|
||||
#include <asm/clkdev.h>
|
||||
|
||||
struct clk;
|
||||
struct device;
|
||||
|
||||
struct clk_lookup {
|
||||
struct list_head node;
|
||||
const char *dev_id;
|
||||
const char *con_id;
|
||||
struct clk *clk;
|
||||
};
|
||||
|
||||
struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id,
|
||||
const char *dev_fmt, ...);
|
||||
|
||||
void clkdev_add(struct clk_lookup *cl);
|
||||
void clkdev_drop(struct clk_lookup *cl);
|
||||
|
||||
void clkdev_add_table(struct clk_lookup *, size_t);
|
||||
int clk_add_alias(const char *, const char *, char *, struct device *);
|
||||
|
||||
#endif
|
||||
|
|
@ -61,13 +61,31 @@ union cnt32_to_63 {
|
|||
*
|
||||
* 2) this code must not be preempted for a duration longer than the
|
||||
* 32-bit counter half period minus the longest period between two
|
||||
* calls to this code.
|
||||
* calls to this code;
|
||||
*
|
||||
* Those requirements ensure proper update to the state bit in memory.
|
||||
* This is usually not a problem in practice, but if it is then a kernel
|
||||
* timer should be scheduled to manage for this code to be executed often
|
||||
* enough.
|
||||
*
|
||||
* And finally:
|
||||
*
|
||||
* 3) the cnt_lo argument must be seen as a globally incrementing value,
|
||||
* meaning that it should be a direct reference to the counter data which
|
||||
* can be evaluated according to a specific ordering within the macro,
|
||||
* and not the result of a previous evaluation stored in a variable.
|
||||
*
|
||||
* For example, this is wrong:
|
||||
*
|
||||
* u32 partial = get_hw_count();
|
||||
* u64 full = cnt32_to_63(partial);
|
||||
* return full;
|
||||
*
|
||||
* This is fine:
|
||||
*
|
||||
* u64 full = cnt32_to_63(get_hw_count());
|
||||
* return full;
|
||||
*
|
||||
* Note that the top bit (bit 63) in the returned value should be considered
|
||||
* as garbage. It is not cleared here because callers are likely to use a
|
||||
* multiplier on the returned value which can get rid of the top bit
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
/* Coda filesystem -- Linux Minicache
|
||||
*
|
||||
* Copyright (C) 1989 - 1997 Carnegie Mellon University
|
||||
*
|
||||
* Carnegie Mellon University encourages users of this software to
|
||||
* contribute improvements to the Coda project. Contact Peter Braam
|
||||
* <coda@cs.cmu.edu>
|
||||
*/
|
||||
|
||||
#ifndef _CFSNC_HEADER_
|
||||
#define _CFSNC_HEADER_
|
||||
|
||||
/* credential cache */
|
||||
void coda_cache_enter(struct inode *inode, int mask);
|
||||
void coda_cache_clear_inode(struct inode *);
|
||||
void coda_cache_clear_all(struct super_block *sb);
|
||||
int coda_cache_check(struct inode *inode, int mask);
|
||||
|
||||
/* for downcalls and attributes and lookups */
|
||||
void coda_flag_inode_children(struct inode *inode, int flag);
|
||||
|
||||
#endif /* _CFSNC_HEADER_ */
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
/*
|
||||
* coda_fs_i.h
|
||||
*
|
||||
* Copyright (C) 1998 Carnegie Mellon University
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_CODA_FS_I
|
||||
#define _LINUX_CODA_FS_I
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/coda.h>
|
||||
|
||||
/*
|
||||
* coda fs inode data
|
||||
* c_lock protects accesses to c_flags, c_mapcount, c_cached_epoch, c_uid and
|
||||
* c_cached_perm.
|
||||
* vfs_inode is set only when the inode is created and never changes.
|
||||
* c_fid is set when the inode is created and should be considered immutable.
|
||||
*/
|
||||
struct coda_inode_info {
|
||||
struct CodaFid c_fid; /* Coda identifier */
|
||||
u_short c_flags; /* flags (see below) */
|
||||
unsigned int c_mapcount; /* nr of times this inode is mapped */
|
||||
unsigned int c_cached_epoch; /* epoch for cached permissions */
|
||||
vuid_t c_uid; /* fsuid for cached permissions */
|
||||
unsigned int c_cached_perm; /* cached access permissions */
|
||||
spinlock_t c_lock;
|
||||
struct inode vfs_inode;
|
||||
};
|
||||
|
||||
/*
|
||||
* coda fs file private data
|
||||
*/
|
||||
#define CODA_MAGIC 0xC0DAC0DA
|
||||
struct coda_file_info {
|
||||
int cfi_magic; /* magic number */
|
||||
struct file *cfi_container; /* container file for this cnode */
|
||||
unsigned int cfi_mapcount; /* nr of times this file is mapped */
|
||||
};
|
||||
|
||||
#define CODA_FTOC(file) ((struct coda_file_info *)((file)->private_data))
|
||||
|
||||
/* flags */
|
||||
#define C_VATTR 0x1 /* Validity of vattr in inode */
|
||||
#define C_FLUSH 0x2 /* used after a flush */
|
||||
#define C_DYING 0x4 /* from venus (which died) */
|
||||
#define C_PURGE 0x8
|
||||
|
||||
int coda_cnode_make(struct inode **, struct CodaFid *, struct super_block *);
|
||||
struct inode *coda_iget(struct super_block *sb, struct CodaFid *fid, struct coda_vattr *attr);
|
||||
int coda_cnode_makectl(struct inode **inode, struct super_block *sb);
|
||||
struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb);
|
||||
void coda_replace_fid(struct inode *, struct CodaFid *, struct CodaFid *);
|
||||
|
||||
#endif
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
/*
|
||||
* Coda File System, Linux Kernel module
|
||||
*
|
||||
* Original version, adapted from cfs_mach.c, (C) Carnegie Mellon University
|
||||
* Linux modifications (C) 1996, Peter J. Braam
|
||||
* Rewritten for Linux 2.1 (C) 1997 Carnegie Mellon University
|
||||
*
|
||||
* Carnegie Mellon University encourages users of this software to
|
||||
* contribute improvements to the Coda project.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_CODA_FS
|
||||
#define _LINUX_CODA_FS
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/param.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/coda_fs_i.h>
|
||||
|
||||
/* operations */
|
||||
extern const struct inode_operations coda_dir_inode_operations;
|
||||
extern const struct inode_operations coda_file_inode_operations;
|
||||
extern const struct inode_operations coda_ioctl_inode_operations;
|
||||
|
||||
extern const struct address_space_operations coda_file_aops;
|
||||
extern const struct address_space_operations coda_symlink_aops;
|
||||
|
||||
extern const struct file_operations coda_dir_operations;
|
||||
extern const struct file_operations coda_file_operations;
|
||||
extern const struct file_operations coda_ioctl_operations;
|
||||
|
||||
/* operations shared over more than one file */
|
||||
int coda_open(struct inode *i, struct file *f);
|
||||
int coda_release(struct inode *i, struct file *f);
|
||||
int coda_permission(struct inode *inode, int mask);
|
||||
int coda_revalidate_inode(struct dentry *);
|
||||
int coda_getattr(struct vfsmount *, struct dentry *, struct kstat *);
|
||||
int coda_setattr(struct dentry *, struct iattr *);
|
||||
|
||||
/* this file: heloers */
|
||||
char *coda_f2s(struct CodaFid *f);
|
||||
int coda_isroot(struct inode *i);
|
||||
int coda_iscontrol(const char *name, size_t length);
|
||||
|
||||
void coda_vattr_to_iattr(struct inode *, struct coda_vattr *);
|
||||
void coda_iattr_to_vattr(struct iattr *, struct coda_vattr *);
|
||||
unsigned short coda_flags_to_cflags(unsigned short);
|
||||
|
||||
/* sysctl.h */
|
||||
void coda_sysctl_init(void);
|
||||
void coda_sysctl_clean(void);
|
||||
|
||||
#define CODA_ALLOC(ptr, cast, size) do { \
|
||||
if (size < PAGE_SIZE) \
|
||||
ptr = kmalloc((unsigned long) size, GFP_KERNEL); \
|
||||
else \
|
||||
ptr = (cast)vmalloc((unsigned long) size); \
|
||||
if (!ptr) \
|
||||
printk("kernel malloc returns 0 at %s:%d\n", __FILE__, __LINE__); \
|
||||
else memset( ptr, 0, size ); \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define CODA_FREE(ptr,size) \
|
||||
do { if (size < PAGE_SIZE) kfree((ptr)); else vfree((ptr)); } while (0)
|
||||
|
||||
/* inode to cnode access functions */
|
||||
|
||||
static inline struct coda_inode_info *ITOC(struct inode *inode)
|
||||
{
|
||||
return list_entry(inode, struct coda_inode_info, vfs_inode);
|
||||
}
|
||||
|
||||
static __inline__ struct CodaFid *coda_i2f(struct inode *inode)
|
||||
{
|
||||
return &(ITOC(inode)->c_fid);
|
||||
}
|
||||
|
||||
static __inline__ char *coda_i2s(struct inode *inode)
|
||||
{
|
||||
return coda_f2s(&(ITOC(inode)->c_fid));
|
||||
}
|
||||
|
||||
/* this will not zap the inode away */
|
||||
static __inline__ void coda_flag_inode(struct inode *inode, int flag)
|
||||
{
|
||||
struct coda_inode_info *cii = ITOC(inode);
|
||||
|
||||
spin_lock(&cii->c_lock);
|
||||
cii->c_flags |= flag;
|
||||
spin_unlock(&cii->c_lock);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -11,6 +11,9 @@
|
|||
/* The full zone was compacted */
|
||||
#define COMPACT_COMPLETE 3
|
||||
|
||||
#define COMPACT_MODE_DIRECT_RECLAIM 0
|
||||
#define COMPACT_MODE_KSWAPD 1
|
||||
|
||||
#ifdef CONFIG_COMPACTION
|
||||
extern int sysctl_compact_memory;
|
||||
extern int sysctl_compaction_handler(struct ctl_table *table, int write,
|
||||
|
|
@ -21,7 +24,12 @@ extern int sysctl_extfrag_handler(struct ctl_table *table, int write,
|
|||
|
||||
extern int fragmentation_index(struct zone *zone, unsigned int order);
|
||||
extern unsigned long try_to_compact_pages(struct zonelist *zonelist,
|
||||
int order, gfp_t gfp_mask, nodemask_t *mask);
|
||||
int order, gfp_t gfp_mask, nodemask_t *mask,
|
||||
bool sync);
|
||||
extern unsigned long compaction_suitable(struct zone *zone, int order);
|
||||
extern unsigned long compact_zone_order(struct zone *zone, int order,
|
||||
gfp_t gfp_mask, bool sync,
|
||||
int compact_mode);
|
||||
|
||||
/* Do not skip compaction more than 64 times */
|
||||
#define COMPACT_MAX_DEFER_SHIFT 6
|
||||
|
|
@ -54,7 +62,20 @@ static inline bool compaction_deferred(struct zone *zone)
|
|||
|
||||
#else
|
||||
static inline unsigned long try_to_compact_pages(struct zonelist *zonelist,
|
||||
int order, gfp_t gfp_mask, nodemask_t *nodemask)
|
||||
int order, gfp_t gfp_mask, nodemask_t *nodemask,
|
||||
bool sync)
|
||||
{
|
||||
return COMPACT_CONTINUE;
|
||||
}
|
||||
|
||||
static inline unsigned long compaction_suitable(struct zone *zone, int order)
|
||||
{
|
||||
return COMPACT_SKIPPED;
|
||||
}
|
||||
|
||||
static inline unsigned long compact_zone_order(struct zone *zone, int order,
|
||||
gfp_t gfp_mask, bool sync,
|
||||
int compact_mode)
|
||||
{
|
||||
return COMPACT_CONTINUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,10 +81,10 @@ extern int wait_for_completion_interruptible(struct completion *x);
|
|||
extern int wait_for_completion_killable(struct completion *x);
|
||||
extern unsigned long wait_for_completion_timeout(struct completion *x,
|
||||
unsigned long timeout);
|
||||
extern unsigned long wait_for_completion_interruptible_timeout(
|
||||
struct completion *x, unsigned long timeout);
|
||||
extern unsigned long wait_for_completion_killable_timeout(
|
||||
struct completion *x, unsigned long timeout);
|
||||
extern long wait_for_completion_interruptible_timeout(
|
||||
struct completion *x, unsigned long timeout);
|
||||
extern long wait_for_completion_killable_timeout(
|
||||
struct completion *x, unsigned long timeout);
|
||||
extern bool try_wait_for_completion(struct completion *x);
|
||||
extern bool completion_done(struct completion *x);
|
||||
|
||||
|
|
|
|||
|
|
@ -126,6 +126,12 @@ struct console {
|
|||
struct console *next;
|
||||
};
|
||||
|
||||
/*
|
||||
* for_each_console() allows you to iterate on each console
|
||||
*/
|
||||
#define for_each_console(con) \
|
||||
for (con = console_drivers; con != NULL; con = con->next)
|
||||
|
||||
extern int console_set_on_cmdline;
|
||||
|
||||
extern int add_preferred_console(char *name, int idx, char *options);
|
||||
|
|
@ -145,7 +151,7 @@ extern int is_console_locked(void);
|
|||
extern int braille_register_console(struct console *, int index,
|
||||
char *console_options, char *braille_options);
|
||||
extern int braille_unregister_console(struct console *);
|
||||
|
||||
extern void console_sysfs_notify(void);
|
||||
extern int console_suspend_enabled;
|
||||
|
||||
/* Suspend and resume console messages over PM events */
|
||||
|
|
|
|||
|
|
@ -39,10 +39,12 @@
|
|||
* Severity difinition for error_severity in struct cper_record_header
|
||||
* and section_severity in struct cper_section_descriptor
|
||||
*/
|
||||
#define CPER_SEV_RECOVERABLE 0x0
|
||||
#define CPER_SEV_FATAL 0x1
|
||||
#define CPER_SEV_CORRECTED 0x2
|
||||
#define CPER_SEV_INFORMATIONAL 0x3
|
||||
enum {
|
||||
CPER_SEV_RECOVERABLE,
|
||||
CPER_SEV_FATAL,
|
||||
CPER_SEV_CORRECTED,
|
||||
CPER_SEV_INFORMATIONAL,
|
||||
};
|
||||
|
||||
/*
|
||||
* Validation bits difinition for validation_bits in struct
|
||||
|
|
@ -201,6 +203,47 @@
|
|||
UUID_LE(0x036F84E1, 0x7F37, 0x428c, 0xA7, 0x9E, 0x57, 0x5F, \
|
||||
0xDF, 0xAA, 0x84, 0xEC)
|
||||
|
||||
#define CPER_PROC_VALID_TYPE 0x0001
|
||||
#define CPER_PROC_VALID_ISA 0x0002
|
||||
#define CPER_PROC_VALID_ERROR_TYPE 0x0004
|
||||
#define CPER_PROC_VALID_OPERATION 0x0008
|
||||
#define CPER_PROC_VALID_FLAGS 0x0010
|
||||
#define CPER_PROC_VALID_LEVEL 0x0020
|
||||
#define CPER_PROC_VALID_VERSION 0x0040
|
||||
#define CPER_PROC_VALID_BRAND_INFO 0x0080
|
||||
#define CPER_PROC_VALID_ID 0x0100
|
||||
#define CPER_PROC_VALID_TARGET_ADDRESS 0x0200
|
||||
#define CPER_PROC_VALID_REQUESTOR_ID 0x0400
|
||||
#define CPER_PROC_VALID_RESPONDER_ID 0x0800
|
||||
#define CPER_PROC_VALID_IP 0x1000
|
||||
|
||||
#define CPER_MEM_VALID_ERROR_STATUS 0x0001
|
||||
#define CPER_MEM_VALID_PHYSICAL_ADDRESS 0x0002
|
||||
#define CPER_MEM_VALID_PHYSICAL_ADDRESS_MASK 0x0004
|
||||
#define CPER_MEM_VALID_NODE 0x0008
|
||||
#define CPER_MEM_VALID_CARD 0x0010
|
||||
#define CPER_MEM_VALID_MODULE 0x0020
|
||||
#define CPER_MEM_VALID_BANK 0x0040
|
||||
#define CPER_MEM_VALID_DEVICE 0x0080
|
||||
#define CPER_MEM_VALID_ROW 0x0100
|
||||
#define CPER_MEM_VALID_COLUMN 0x0200
|
||||
#define CPER_MEM_VALID_BIT_POSITION 0x0400
|
||||
#define CPER_MEM_VALID_REQUESTOR_ID 0x0800
|
||||
#define CPER_MEM_VALID_RESPONDER_ID 0x1000
|
||||
#define CPER_MEM_VALID_TARGET_ID 0x2000
|
||||
#define CPER_MEM_VALID_ERROR_TYPE 0x4000
|
||||
|
||||
#define CPER_PCIE_VALID_PORT_TYPE 0x0001
|
||||
#define CPER_PCIE_VALID_VERSION 0x0002
|
||||
#define CPER_PCIE_VALID_COMMAND_STATUS 0x0004
|
||||
#define CPER_PCIE_VALID_DEVICE_ID 0x0008
|
||||
#define CPER_PCIE_VALID_SERIAL_NUMBER 0x0010
|
||||
#define CPER_PCIE_VALID_BRIDGE_CONTROL_STATUS 0x0020
|
||||
#define CPER_PCIE_VALID_CAPABILITY 0x0040
|
||||
#define CPER_PCIE_VALID_AER_INFO 0x0080
|
||||
|
||||
#define CPER_PCIE_SLOT_SHIFT 3
|
||||
|
||||
/*
|
||||
* All tables and structs must be byte-packed to match CPER
|
||||
* specification, since the tables are provided by the system BIOS
|
||||
|
|
@ -306,6 +349,41 @@ struct cper_sec_mem_err {
|
|||
__u8 error_type;
|
||||
};
|
||||
|
||||
struct cper_sec_pcie {
|
||||
__u64 validation_bits;
|
||||
__u32 port_type;
|
||||
struct {
|
||||
__u8 minor;
|
||||
__u8 major;
|
||||
__u8 reserved[2];
|
||||
} version;
|
||||
__u16 command;
|
||||
__u16 status;
|
||||
__u32 reserved;
|
||||
struct {
|
||||
__u16 vendor_id;
|
||||
__u16 device_id;
|
||||
__u8 class_code[3];
|
||||
__u8 function;
|
||||
__u8 device;
|
||||
__u16 segment;
|
||||
__u8 bus;
|
||||
__u8 secondary_bus;
|
||||
__u16 slot;
|
||||
__u8 reserved;
|
||||
} device_id;
|
||||
struct {
|
||||
__u32 lower;
|
||||
__u32 upper;
|
||||
} serial_number;
|
||||
struct {
|
||||
__u16 secondary_status;
|
||||
__u16 control;
|
||||
} bridge;
|
||||
__u8 capability[60];
|
||||
__u8 aer_info[96];
|
||||
};
|
||||
|
||||
/* Reset to default packing */
|
||||
#pragma pack()
|
||||
|
||||
|
|
|
|||
|
|
@ -47,13 +47,7 @@ struct cpuidle_state {
|
|||
|
||||
/* Idle State Flags */
|
||||
#define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */
|
||||
#define CPUIDLE_FLAG_CHECK_BM (0x02) /* BM activity will exit state */
|
||||
#define CPUIDLE_FLAG_POLL (0x10) /* no latency, no savings */
|
||||
#define CPUIDLE_FLAG_SHALLOW (0x20) /* low latency, minimal savings */
|
||||
#define CPUIDLE_FLAG_BALANCED (0x40) /* medium latency, moderate savings */
|
||||
#define CPUIDLE_FLAG_DEEP (0x80) /* high latency, large savings */
|
||||
#define CPUIDLE_FLAG_IGNORE (0x100) /* ignore during this idle period */
|
||||
#define CPUIDLE_FLAG_TLB_FLUSHED (0x200) /* tlb will be flushed */
|
||||
|
||||
#define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000)
|
||||
|
||||
|
|
|
|||
|
|
@ -84,9 +84,11 @@ struct cramfs_super {
|
|||
| CRAMFS_FLAG_WRONG_SIGNATURE \
|
||||
| CRAMFS_FLAG_SHIFTED_ROOT_OFFSET )
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/* Uncompression interfaces to the underlying zlib */
|
||||
int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen);
|
||||
int cramfs_uncompress_init(void);
|
||||
void cramfs_uncompress_exit(void);
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -20,7 +20,14 @@ extern ssize_t copy_oldmem_page(unsigned long, char *, size_t,
|
|||
#define vmcore_elf_check_arch_cross(x) 0
|
||||
#endif
|
||||
|
||||
#define vmcore_elf_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x))
|
||||
/*
|
||||
* Architecture code can redefine this if there are any special checks
|
||||
* needed for 64-bit ELF vmcores. In case of 32-bit only architecture,
|
||||
* this can be set to zero.
|
||||
*/
|
||||
#ifndef vmcore_elf64_check_arch
|
||||
#define vmcore_elf64_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* is_kdump_kernel() checks whether this kernel is booting after a panic of
|
||||
|
|
|
|||
|
|
@ -103,14 +103,20 @@ static inline int cs5535_has_vsa2(void)
|
|||
#define GPIO_POSITIVE_EDGE_STS 0x48
|
||||
#define GPIO_NEGATIVE_EDGE_STS 0x4C
|
||||
|
||||
#define GPIO_FLTR7_AMOUNT 0xD8
|
||||
|
||||
#define GPIO_MAP_X 0xE0
|
||||
#define GPIO_MAP_Y 0xE4
|
||||
#define GPIO_MAP_Z 0xE8
|
||||
#define GPIO_MAP_W 0xEC
|
||||
|
||||
#define GPIO_FE7_SEL 0xF7
|
||||
|
||||
void cs5535_gpio_set(unsigned offset, unsigned int reg);
|
||||
void cs5535_gpio_clear(unsigned offset, unsigned int reg);
|
||||
int cs5535_gpio_isset(unsigned offset, unsigned int reg);
|
||||
int cs5535_gpio_set_irq(unsigned group, unsigned irq);
|
||||
void cs5535_gpio_setup_event(unsigned offset, int pair, int pme);
|
||||
|
||||
/* MFGPTs */
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@
|
|||
#include <asm/atomic.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/rculist.h>
|
||||
#include <linux/rculist_bl.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/seqlock.h>
|
||||
#include <linux/cache.h>
|
||||
#include <linux/rcupdate.h>
|
||||
|
||||
|
|
@ -45,6 +47,27 @@ struct dentry_stat_t {
|
|||
};
|
||||
extern struct dentry_stat_t dentry_stat;
|
||||
|
||||
/*
|
||||
* Compare 2 name strings, return 0 if they match, otherwise non-zero.
|
||||
* The strings are both count bytes long, and count is non-zero.
|
||||
*/
|
||||
static inline int dentry_cmp(const unsigned char *cs, size_t scount,
|
||||
const unsigned char *ct, size_t tcount)
|
||||
{
|
||||
int ret;
|
||||
if (scount != tcount)
|
||||
return 1;
|
||||
do {
|
||||
ret = (*cs != *ct);
|
||||
if (ret)
|
||||
break;
|
||||
cs++;
|
||||
ct++;
|
||||
tcount--;
|
||||
} while (tcount);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Name hashing routines. Initial hash value */
|
||||
/* Hash courtesy of the R5 hash in reiserfs modulo sign bits */
|
||||
#define init_name_hash() 0
|
||||
|
|
@ -81,25 +104,33 @@ full_name_hash(const unsigned char *name, unsigned int len)
|
|||
* large memory footprint increase).
|
||||
*/
|
||||
#ifdef CONFIG_64BIT
|
||||
#define DNAME_INLINE_LEN_MIN 32 /* 192 bytes */
|
||||
# define DNAME_INLINE_LEN 32 /* 192 bytes */
|
||||
#else
|
||||
#define DNAME_INLINE_LEN_MIN 40 /* 128 bytes */
|
||||
# ifdef CONFIG_SMP
|
||||
# define DNAME_INLINE_LEN 36 /* 128 bytes */
|
||||
# else
|
||||
# define DNAME_INLINE_LEN 40 /* 128 bytes */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
struct dentry {
|
||||
atomic_t d_count;
|
||||
/* RCU lookup touched fields */
|
||||
unsigned int d_flags; /* protected by d_lock */
|
||||
spinlock_t d_lock; /* per dentry lock */
|
||||
int d_mounted;
|
||||
struct inode *d_inode; /* Where the name belongs to - NULL is
|
||||
* negative */
|
||||
/*
|
||||
* The next three fields are touched by __d_lookup. Place them here
|
||||
* so they all fit in a cache line.
|
||||
*/
|
||||
struct hlist_node d_hash; /* lookup hash list */
|
||||
seqcount_t d_seq; /* per dentry seqlock */
|
||||
struct hlist_bl_node d_hash; /* lookup hash list */
|
||||
struct dentry *d_parent; /* parent directory */
|
||||
struct qstr d_name;
|
||||
struct inode *d_inode; /* Where the name belongs to - NULL is
|
||||
* negative */
|
||||
unsigned char d_iname[DNAME_INLINE_LEN]; /* small names */
|
||||
|
||||
/* Ref lookup also touches following */
|
||||
unsigned int d_count; /* protected by d_lock */
|
||||
spinlock_t d_lock; /* per dentry lock */
|
||||
const struct dentry_operations *d_op;
|
||||
struct super_block *d_sb; /* The root of the dentry tree */
|
||||
unsigned long d_time; /* used by d_revalidate */
|
||||
void *d_fsdata; /* fs-specific data */
|
||||
|
||||
struct list_head d_lru; /* LRU list */
|
||||
/*
|
||||
|
|
@ -111,12 +142,6 @@ struct dentry {
|
|||
} d_u;
|
||||
struct list_head d_subdirs; /* our children */
|
||||
struct list_head d_alias; /* inode alias list */
|
||||
unsigned long d_time; /* used by d_revalidate */
|
||||
const struct dentry_operations *d_op;
|
||||
struct super_block *d_sb; /* The root of the dentry tree */
|
||||
void *d_fsdata; /* fs-specific data */
|
||||
|
||||
unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -133,97 +158,69 @@ enum dentry_d_lock_class
|
|||
|
||||
struct dentry_operations {
|
||||
int (*d_revalidate)(struct dentry *, struct nameidata *);
|
||||
int (*d_hash) (struct dentry *, struct qstr *);
|
||||
int (*d_compare) (struct dentry *, struct qstr *, struct qstr *);
|
||||
int (*d_delete)(struct dentry *);
|
||||
int (*d_hash)(const struct dentry *, const struct inode *,
|
||||
struct qstr *);
|
||||
int (*d_compare)(const struct dentry *, const struct inode *,
|
||||
const struct dentry *, const struct inode *,
|
||||
unsigned int, const char *, const struct qstr *);
|
||||
int (*d_delete)(const struct dentry *);
|
||||
void (*d_release)(struct dentry *);
|
||||
void (*d_iput)(struct dentry *, struct inode *);
|
||||
char *(*d_dname)(struct dentry *, char *, int);
|
||||
};
|
||||
|
||||
/* the dentry parameter passed to d_hash and d_compare is the parent
|
||||
* directory of the entries to be compared. It is used in case these
|
||||
* functions need any directory specific information for determining
|
||||
* equivalency classes. Using the dentry itself might not work, as it
|
||||
* might be a negative dentry which has no information associated with
|
||||
* it */
|
||||
struct vfsmount *(*d_automount)(struct path *);
|
||||
int (*d_manage)(struct dentry *, bool, bool);
|
||||
} ____cacheline_aligned;
|
||||
|
||||
/*
|
||||
locking rules:
|
||||
big lock dcache_lock d_lock may block
|
||||
d_revalidate: no no no yes
|
||||
d_hash no no no yes
|
||||
d_compare: no yes yes no
|
||||
d_delete: no yes no no
|
||||
d_release: no no no yes
|
||||
d_iput: no no no yes
|
||||
* Locking rules for dentry_operations callbacks are to be found in
|
||||
* Documentation/filesystems/Locking. Keep it updated!
|
||||
*
|
||||
* FUrther descriptions are found in Documentation/filesystems/vfs.txt.
|
||||
* Keep it updated too!
|
||||
*/
|
||||
|
||||
/* d_flags entries */
|
||||
#define DCACHE_AUTOFS_PENDING 0x0001 /* autofs: "under construction" */
|
||||
#define DCACHE_NFSFS_RENAMED 0x0002 /* this dentry has been "silly
|
||||
* renamed" and has to be
|
||||
* deleted on the last dput()
|
||||
*/
|
||||
#define DCACHE_DISCONNECTED 0x0004
|
||||
/* This dentry is possibly not currently connected to the dcache tree,
|
||||
* in which case its parent will either be itself, or will have this
|
||||
* flag as well. nfsd will not use a dentry with this bit set, but will
|
||||
* first endeavour to clear the bit either by discovering that it is
|
||||
* connected, or by performing lookup operations. Any filesystem which
|
||||
* supports nfsd_operations MUST have a lookup function which, if it finds
|
||||
* a directory inode with a DCACHE_DISCONNECTED dentry, will d_move
|
||||
* that dentry into place and return that dentry rather than the passed one,
|
||||
* typically using d_splice_alias.
|
||||
*/
|
||||
#define DCACHE_NFSFS_RENAMED 0x0002
|
||||
/* this dentry has been "silly renamed" and has to be deleted on the last
|
||||
* dput() */
|
||||
|
||||
#define DCACHE_DISCONNECTED 0x0004
|
||||
/* This dentry is possibly not currently connected to the dcache tree, in
|
||||
* which case its parent will either be itself, or will have this flag as
|
||||
* well. nfsd will not use a dentry with this bit set, but will first
|
||||
* endeavour to clear the bit either by discovering that it is connected,
|
||||
* or by performing lookup operations. Any filesystem which supports
|
||||
* nfsd_operations MUST have a lookup function which, if it finds a
|
||||
* directory inode with a DCACHE_DISCONNECTED dentry, will d_move that
|
||||
* dentry into place and return that dentry rather than the passed one,
|
||||
* typically using d_splice_alias. */
|
||||
|
||||
#define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */
|
||||
#define DCACHE_UNHASHED 0x0010
|
||||
|
||||
#define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 /* Parent inode is watched by inotify */
|
||||
#define DCACHE_INOTIFY_PARENT_WATCHED 0x0020
|
||||
/* Parent inode is watched by inotify */
|
||||
|
||||
#define DCACHE_COOKIE 0x0040 /* For use by dcookie subsystem */
|
||||
|
||||
#define DCACHE_FSNOTIFY_PARENT_WATCHED 0x0080 /* Parent inode is watched by some fsnotify listener */
|
||||
#define DCACHE_FSNOTIFY_PARENT_WATCHED 0x0080
|
||||
/* Parent inode is watched by some fsnotify listener */
|
||||
|
||||
#define DCACHE_CANT_MOUNT 0x0100
|
||||
#define DCACHE_GENOCIDE 0x0200
|
||||
|
||||
#define DCACHE_OP_HASH 0x1000
|
||||
#define DCACHE_OP_COMPARE 0x2000
|
||||
#define DCACHE_OP_REVALIDATE 0x4000
|
||||
#define DCACHE_OP_DELETE 0x8000
|
||||
|
||||
#define DCACHE_MOUNTED 0x10000 /* is a mountpoint */
|
||||
#define DCACHE_NEED_AUTOMOUNT 0x20000 /* handle automount on this dir */
|
||||
#define DCACHE_MANAGE_TRANSIT 0x40000 /* manage transit from this dirent */
|
||||
#define DCACHE_MANAGED_DENTRY \
|
||||
(DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT)
|
||||
|
||||
extern spinlock_t dcache_lock;
|
||||
extern seqlock_t rename_lock;
|
||||
|
||||
/**
|
||||
* d_drop - drop a dentry
|
||||
* @dentry: dentry to drop
|
||||
*
|
||||
* d_drop() unhashes the entry from the parent dentry hashes, so that it won't
|
||||
* be found through a VFS lookup any more. Note that this is different from
|
||||
* deleting the dentry - d_delete will try to mark the dentry negative if
|
||||
* possible, giving a successful _negative_ lookup, while d_drop will
|
||||
* just make the cache lookup fail.
|
||||
*
|
||||
* d_drop() is used mainly for stuff that wants to invalidate a dentry for some
|
||||
* reason (NFS timeouts or autofs deletes).
|
||||
*
|
||||
* __d_drop requires dentry->d_lock.
|
||||
*/
|
||||
|
||||
static inline void __d_drop(struct dentry *dentry)
|
||||
{
|
||||
if (!(dentry->d_flags & DCACHE_UNHASHED)) {
|
||||
dentry->d_flags |= DCACHE_UNHASHED;
|
||||
hlist_del_rcu(&dentry->d_hash);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void d_drop(struct dentry *dentry)
|
||||
{
|
||||
spin_lock(&dcache_lock);
|
||||
spin_lock(&dentry->d_lock);
|
||||
__d_drop(dentry);
|
||||
spin_unlock(&dentry->d_lock);
|
||||
spin_unlock(&dcache_lock);
|
||||
}
|
||||
|
||||
static inline int dname_external(struct dentry *dentry)
|
||||
{
|
||||
return dentry->d_name.name != dentry->d_iname;
|
||||
|
|
@ -235,10 +232,14 @@ static inline int dname_external(struct dentry *dentry)
|
|||
extern void d_instantiate(struct dentry *, struct inode *);
|
||||
extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *);
|
||||
extern struct dentry * d_materialise_unique(struct dentry *, struct inode *);
|
||||
extern void __d_drop(struct dentry *dentry);
|
||||
extern void d_drop(struct dentry *dentry);
|
||||
extern void d_delete(struct dentry *);
|
||||
extern void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op);
|
||||
|
||||
/* allocate/de-allocate */
|
||||
extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
|
||||
extern struct dentry * d_alloc_pseudo(struct super_block *, const struct qstr *);
|
||||
extern struct dentry * d_splice_alias(struct inode *, struct dentry *);
|
||||
extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *);
|
||||
extern struct dentry * d_obtain_alias(struct inode *);
|
||||
|
|
@ -296,14 +297,40 @@ static inline struct dentry *d_add_unique(struct dentry *entry, struct inode *in
|
|||
return res;
|
||||
}
|
||||
|
||||
extern void dentry_update_name_case(struct dentry *, struct qstr *);
|
||||
|
||||
/* used for rename() and baskets */
|
||||
extern void d_move(struct dentry *, struct dentry *);
|
||||
extern struct dentry *d_ancestor(struct dentry *, struct dentry *);
|
||||
|
||||
/* appendix may either be NULL or be used for transname suffixes */
|
||||
extern struct dentry * d_lookup(struct dentry *, struct qstr *);
|
||||
extern struct dentry * __d_lookup(struct dentry *, struct qstr *);
|
||||
extern struct dentry * d_hash_and_lookup(struct dentry *, struct qstr *);
|
||||
extern struct dentry *d_lookup(struct dentry *, struct qstr *);
|
||||
extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *);
|
||||
extern struct dentry *__d_lookup(struct dentry *, struct qstr *);
|
||||
extern struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name,
|
||||
unsigned *seq, struct inode **inode);
|
||||
|
||||
/**
|
||||
* __d_rcu_to_refcount - take a refcount on dentry if sequence check is ok
|
||||
* @dentry: dentry to take a ref on
|
||||
* @seq: seqcount to verify against
|
||||
* Returns: 0 on failure, else 1.
|
||||
*
|
||||
* __d_rcu_to_refcount operates on a dentry,seq pair that was returned
|
||||
* by __d_lookup_rcu, to get a reference on an rcu-walk dentry.
|
||||
*/
|
||||
static inline int __d_rcu_to_refcount(struct dentry *dentry, unsigned seq)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
assert_spin_locked(&dentry->d_lock);
|
||||
if (!read_seqcount_retry(&dentry->d_seq, seq)) {
|
||||
ret = 1;
|
||||
dentry->d_count++;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* validate "insecure" dentry pointer */
|
||||
extern int d_validate(struct dentry *, struct dentry *);
|
||||
|
|
@ -316,34 +343,37 @@ extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...);
|
|||
extern char *__d_path(const struct path *path, struct path *root, char *, int);
|
||||
extern char *d_path(const struct path *, char *, int);
|
||||
extern char *d_path_with_unreachable(const struct path *, char *, int);
|
||||
extern char *__dentry_path(struct dentry *, char *, int);
|
||||
extern char *dentry_path_raw(struct dentry *, char *, int);
|
||||
extern char *dentry_path(struct dentry *, char *, int);
|
||||
|
||||
/* Allocation counts.. */
|
||||
|
||||
/**
|
||||
* dget, dget_locked - get a reference to a dentry
|
||||
* dget, dget_dlock - get a reference to a dentry
|
||||
* @dentry: dentry to get a reference to
|
||||
*
|
||||
* Given a dentry or %NULL pointer increment the reference count
|
||||
* if appropriate and return the dentry. A dentry will not be
|
||||
* destroyed when it has references. dget() should never be
|
||||
* called for dentries with zero reference counter. For these cases
|
||||
* (preferably none, functions in dcache.c are sufficient for normal
|
||||
* needs and they take necessary precautions) you should hold dcache_lock
|
||||
* and call dget_locked() instead of dget().
|
||||
* destroyed when it has references.
|
||||
*/
|
||||
|
||||
static inline struct dentry *dget_dlock(struct dentry *dentry)
|
||||
{
|
||||
if (dentry)
|
||||
dentry->d_count++;
|
||||
return dentry;
|
||||
}
|
||||
|
||||
static inline struct dentry *dget(struct dentry *dentry)
|
||||
{
|
||||
if (dentry) {
|
||||
BUG_ON(!atomic_read(&dentry->d_count));
|
||||
atomic_inc(&dentry->d_count);
|
||||
spin_lock(&dentry->d_lock);
|
||||
dget_dlock(dentry);
|
||||
spin_unlock(&dentry->d_lock);
|
||||
}
|
||||
return dentry;
|
||||
}
|
||||
|
||||
extern struct dentry * dget_locked(struct dentry *);
|
||||
extern struct dentry *dget_parent(struct dentry *dentry);
|
||||
|
||||
/**
|
||||
* d_unhashed - is dentry hashed
|
||||
|
|
@ -374,21 +404,16 @@ static inline void dont_mount(struct dentry *dentry)
|
|||
spin_unlock(&dentry->d_lock);
|
||||
}
|
||||
|
||||
static inline struct dentry *dget_parent(struct dentry *dentry)
|
||||
{
|
||||
struct dentry *ret;
|
||||
|
||||
spin_lock(&dentry->d_lock);
|
||||
ret = dget(dentry->d_parent);
|
||||
spin_unlock(&dentry->d_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
extern void dput(struct dentry *);
|
||||
|
||||
static inline int d_mountpoint(struct dentry *dentry)
|
||||
static inline bool d_managed(struct dentry *dentry)
|
||||
{
|
||||
return dentry->d_mounted;
|
||||
return dentry->d_flags & DCACHE_MANAGED_DENTRY;
|
||||
}
|
||||
|
||||
static inline bool d_mountpoint(struct dentry *dentry)
|
||||
{
|
||||
return dentry->d_flags & DCACHE_MOUNTED;
|
||||
}
|
||||
|
||||
extern struct vfsmount *lookup_mnt(struct path *);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,89 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* IEEE 802.1Qaz std supported values */
|
||||
#define IEEE_8021QAZ_MAX_TCS 8
|
||||
|
||||
/* This structure contains the IEEE 802.1Qaz ETS managed object
|
||||
*
|
||||
* @willing: willing bit in ETS configuratin TLV
|
||||
* @ets_cap: indicates supported capacity of ets feature
|
||||
* @cbs: credit based shaper ets algorithm supported
|
||||
* @tc_tx_bw: tc tx bandwidth indexed by traffic class
|
||||
* @tc_rx_bw: tc rx bandwidth indexed by traffic class
|
||||
* @tc_tsa: TSA Assignment table, indexed by traffic class
|
||||
* @prio_tc: priority assignment table mapping 8021Qp to traffic class
|
||||
* @tc_reco_bw: recommended tc bandwidth indexed by traffic class for TLV
|
||||
* @tc_reco_tsa: recommended tc bandwidth indexed by traffic class for TLV
|
||||
* @reco_prio_tc: recommended tc tx bandwidth indexed by traffic class for TLV
|
||||
*
|
||||
* Recommended values are used to set fields in the ETS recommendation TLV
|
||||
* with hardware offloaded LLDP.
|
||||
*
|
||||
* ----
|
||||
* TSA Assignment 8 bit identifiers
|
||||
* 0 strict priority
|
||||
* 1 credit-based shaper
|
||||
* 2 enhanced transmission selection
|
||||
* 3-254 reserved
|
||||
* 255 vendor specific
|
||||
*/
|
||||
struct ieee_ets {
|
||||
__u8 willing;
|
||||
__u8 ets_cap;
|
||||
__u8 cbs;
|
||||
__u8 tc_tx_bw[IEEE_8021QAZ_MAX_TCS];
|
||||
__u8 tc_rx_bw[IEEE_8021QAZ_MAX_TCS];
|
||||
__u8 tc_tsa[IEEE_8021QAZ_MAX_TCS];
|
||||
__u8 prio_tc[IEEE_8021QAZ_MAX_TCS];
|
||||
__u8 tc_reco_bw[IEEE_8021QAZ_MAX_TCS];
|
||||
__u8 tc_reco_tsa[IEEE_8021QAZ_MAX_TCS];
|
||||
__u8 reco_prio_tc[IEEE_8021QAZ_MAX_TCS];
|
||||
};
|
||||
|
||||
/* This structure contains the IEEE 802.1Qaz PFC managed object
|
||||
*
|
||||
* @pfc_cap: Indicates the number of traffic classes on the local device
|
||||
* that may simultaneously have PFC enabled.
|
||||
* @pfc_en: bitmap indicating pfc enabled traffic classes
|
||||
* @mbc: enable macsec bypass capability
|
||||
* @delay: the allowance made for a round-trip propagation delay of the
|
||||
* link in bits.
|
||||
* @requests: count of the sent pfc frames
|
||||
* @indications: count of the received pfc frames
|
||||
*/
|
||||
struct ieee_pfc {
|
||||
__u8 pfc_cap;
|
||||
__u8 pfc_en;
|
||||
__u8 mbc;
|
||||
__u16 delay;
|
||||
__u64 requests[IEEE_8021QAZ_MAX_TCS];
|
||||
__u64 indications[IEEE_8021QAZ_MAX_TCS];
|
||||
};
|
||||
|
||||
/* This structure contains the IEEE 802.1Qaz APP managed object. This
|
||||
* object is also used for the CEE std as well. There is no difference
|
||||
* between the objects.
|
||||
*
|
||||
* @selector: protocol identifier type
|
||||
* @protocol: protocol of type indicated
|
||||
* @priority: 3-bit unsigned integer indicating priority
|
||||
*
|
||||
* ----
|
||||
* Selector field values
|
||||
* 0 Reserved
|
||||
* 1 Ethertype
|
||||
* 2 Well known port number over TCP or SCTP
|
||||
* 3 Well known port number over UDP or DCCP
|
||||
* 4 Well known port number over TCP, SCTP, UDP, or DCCP
|
||||
* 5-7 Reserved
|
||||
*/
|
||||
struct dcb_app {
|
||||
__u8 selector;
|
||||
__u32 protocol;
|
||||
__u8 priority;
|
||||
};
|
||||
|
||||
struct dcbmsg {
|
||||
__u8 dcb_family;
|
||||
__u8 cmd;
|
||||
|
|
@ -50,6 +133,12 @@ struct dcbmsg {
|
|||
* @DCB_CMD_SBCN: get backward congestion notification configration.
|
||||
* @DCB_CMD_GAPP: get application protocol configuration
|
||||
* @DCB_CMD_SAPP: set application protocol configuration
|
||||
* @DCB_CMD_IEEE_SET: set IEEE 802.1Qaz configuration
|
||||
* @DCB_CMD_IEEE_GET: get IEEE 802.1Qaz configuration
|
||||
* @DCB_CMD_GDCBX: get DCBX engine configuration
|
||||
* @DCB_CMD_SDCBX: set DCBX engine configuration
|
||||
* @DCB_CMD_GFEATCFG: get DCBX features flags
|
||||
* @DCB_CMD_SFEATCFG: set DCBX features negotiation flags
|
||||
*/
|
||||
enum dcbnl_commands {
|
||||
DCB_CMD_UNDEFINED,
|
||||
|
|
@ -83,6 +172,15 @@ enum dcbnl_commands {
|
|||
DCB_CMD_GAPP,
|
||||
DCB_CMD_SAPP,
|
||||
|
||||
DCB_CMD_IEEE_SET,
|
||||
DCB_CMD_IEEE_GET,
|
||||
|
||||
DCB_CMD_GDCBX,
|
||||
DCB_CMD_SDCBX,
|
||||
|
||||
DCB_CMD_GFEATCFG,
|
||||
DCB_CMD_SFEATCFG,
|
||||
|
||||
__DCB_CMD_ENUM_MAX,
|
||||
DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1,
|
||||
};
|
||||
|
|
@ -102,6 +200,9 @@ enum dcbnl_commands {
|
|||
* @DCB_ATTR_CAP: DCB capabilities of the device (NLA_NESTED)
|
||||
* @DCB_ATTR_NUMTCS: number of traffic classes supported (NLA_NESTED)
|
||||
* @DCB_ATTR_BCN: backward congestion notification configuration (NLA_NESTED)
|
||||
* @DCB_ATTR_IEEE: IEEE 802.1Qaz supported attributes (NLA_NESTED)
|
||||
* @DCB_ATTR_DCBX: DCBX engine configuration in the device (NLA_U8)
|
||||
* @DCB_ATTR_FEATCFG: DCBX features flags (NLA_NESTED)
|
||||
*/
|
||||
enum dcbnl_attrs {
|
||||
DCB_ATTR_UNDEFINED,
|
||||
|
|
@ -119,10 +220,32 @@ enum dcbnl_attrs {
|
|||
DCB_ATTR_BCN,
|
||||
DCB_ATTR_APP,
|
||||
|
||||
/* IEEE std attributes */
|
||||
DCB_ATTR_IEEE,
|
||||
|
||||
DCB_ATTR_DCBX,
|
||||
DCB_ATTR_FEATCFG,
|
||||
|
||||
__DCB_ATTR_ENUM_MAX,
|
||||
DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1,
|
||||
};
|
||||
|
||||
enum ieee_attrs {
|
||||
DCB_ATTR_IEEE_UNSPEC,
|
||||
DCB_ATTR_IEEE_ETS,
|
||||
DCB_ATTR_IEEE_PFC,
|
||||
DCB_ATTR_IEEE_APP_TABLE,
|
||||
__DCB_ATTR_IEEE_MAX
|
||||
};
|
||||
#define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1)
|
||||
|
||||
enum ieee_attrs_app {
|
||||
DCB_ATTR_IEEE_APP_UNSPEC,
|
||||
DCB_ATTR_IEEE_APP,
|
||||
__DCB_ATTR_IEEE_APP_MAX
|
||||
};
|
||||
#define DCB_ATTR_IEEE_APP_MAX (__DCB_ATTR_IEEE_APP_MAX - 1)
|
||||
|
||||
/**
|
||||
* enum dcbnl_pfc_attrs - DCB Priority Flow Control user priority nested attrs
|
||||
*
|
||||
|
|
@ -262,6 +385,8 @@ enum dcbnl_tc_attrs {
|
|||
* @DCB_CAP_ATTR_GSP: (NLA_U8) device supports group strict priority
|
||||
* @DCB_CAP_ATTR_BCN: (NLA_U8) device supports Backwards Congestion
|
||||
* Notification
|
||||
* @DCB_CAP_ATTR_DCBX: (NLA_U8) device supports DCBX engine
|
||||
*
|
||||
*/
|
||||
enum dcbnl_cap_attrs {
|
||||
DCB_CAP_ATTR_UNDEFINED,
|
||||
|
|
@ -273,11 +398,44 @@ enum dcbnl_cap_attrs {
|
|||
DCB_CAP_ATTR_PFC_TCS,
|
||||
DCB_CAP_ATTR_GSP,
|
||||
DCB_CAP_ATTR_BCN,
|
||||
DCB_CAP_ATTR_DCBX,
|
||||
|
||||
__DCB_CAP_ATTR_ENUM_MAX,
|
||||
DCB_CAP_ATTR_MAX = __DCB_CAP_ATTR_ENUM_MAX - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* DCBX capability flags
|
||||
*
|
||||
* @DCB_CAP_DCBX_HOST: DCBX negotiation is performed by the host LLDP agent.
|
||||
* 'set' routines are used to configure the device with
|
||||
* the negotiated parameters
|
||||
*
|
||||
* @DCB_CAP_DCBX_LLD_MANAGED: DCBX negotiation is not performed in the host but
|
||||
* by another entity
|
||||
* 'get' routines are used to retrieve the
|
||||
* negotiated parameters
|
||||
* 'set' routines can be used to set the initial
|
||||
* negotiation configuration
|
||||
*
|
||||
* @DCB_CAP_DCBX_VER_CEE: for a non-host DCBX engine, indicates the engine
|
||||
* supports the CEE protocol flavor
|
||||
*
|
||||
* @DCB_CAP_DCBX_VER_IEEE: for a non-host DCBX engine, indicates the engine
|
||||
* supports the IEEE protocol flavor
|
||||
*
|
||||
* @DCB_CAP_DCBX_STATIC: for a non-host DCBX engine, indicates the engine
|
||||
* supports static configuration (i.e no actual
|
||||
* negotiation is performed negotiated parameters equal
|
||||
* the initial configuration)
|
||||
*
|
||||
*/
|
||||
#define DCB_CAP_DCBX_HOST 0x01
|
||||
#define DCB_CAP_DCBX_LLD_MANAGED 0x02
|
||||
#define DCB_CAP_DCBX_VER_CEE 0x04
|
||||
#define DCB_CAP_DCBX_VER_IEEE 0x08
|
||||
#define DCB_CAP_DCBX_STATIC 0x10
|
||||
|
||||
/**
|
||||
* enum dcbnl_numtcs_attrs - number of traffic classes
|
||||
*
|
||||
|
|
@ -355,4 +513,30 @@ enum dcbnl_app_attrs {
|
|||
DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum dcbnl_featcfg_attrs - features conifiguration flags
|
||||
*
|
||||
* @DCB_FEATCFG_ATTR_UNDEFINED: unspecified attribute to catch errors
|
||||
* @DCB_FEATCFG_ATTR_ALL: (NLA_FLAG) all features configuration attributes
|
||||
* @DCB_FEATCFG_ATTR_PG: (NLA_U8) configuration flags for priority groups
|
||||
* @DCB_FEATCFG_ATTR_PFC: (NLA_U8) configuration flags for priority
|
||||
* flow control
|
||||
* @DCB_FEATCFG_ATTR_APP: (NLA_U8) configuration flags for application TLV
|
||||
*
|
||||
*/
|
||||
#define DCB_FEATCFG_ERROR 0x01 /* error in feature resolution */
|
||||
#define DCB_FEATCFG_ENABLE 0x02 /* enable feature */
|
||||
#define DCB_FEATCFG_WILLING 0x04 /* feature is willing */
|
||||
#define DCB_FEATCFG_ADVERTISE 0x08 /* advertise feature */
|
||||
enum dcbnl_featcfg_attrs {
|
||||
DCB_FEATCFG_ATTR_UNDEFINED,
|
||||
DCB_FEATCFG_ATTR_ALL,
|
||||
DCB_FEATCFG_ATTR_PG,
|
||||
DCB_FEATCFG_ATTR_PFC,
|
||||
DCB_FEATCFG_ATTR_APP,
|
||||
|
||||
__DCB_FEATCFG_ATTR_ENUM_MAX,
|
||||
DCB_FEATCFG_ATTR_MAX = __DCB_FEATCFG_ATTR_ENUM_MAX - 1,
|
||||
};
|
||||
|
||||
#endif /* __LINUX_DCBNL_H__ */
|
||||
|
|
|
|||
|
|
@ -197,6 +197,21 @@ enum dccp_feature_numbers {
|
|||
DCCPF_MAX_CCID_SPECIFIC = 255,
|
||||
};
|
||||
|
||||
/* DCCP socket control message types for cmsg */
|
||||
enum dccp_cmsg_type {
|
||||
DCCP_SCM_PRIORITY = 1,
|
||||
DCCP_SCM_QPOLICY_MAX = 0xFFFF,
|
||||
/* ^-- Up to here reserved exclusively for qpolicy parameters */
|
||||
DCCP_SCM_MAX
|
||||
};
|
||||
|
||||
/* DCCP priorities for outgoing/queued packets */
|
||||
enum dccp_packet_dequeueing_policy {
|
||||
DCCPQ_POLICY_SIMPLE,
|
||||
DCCPQ_POLICY_PRIO,
|
||||
DCCPQ_POLICY_MAX
|
||||
};
|
||||
|
||||
/* DCCP socket options */
|
||||
#define DCCP_SOCKOPT_PACKET_SIZE 1 /* XXX deprecated, without effect */
|
||||
#define DCCP_SOCKOPT_SERVICE 2
|
||||
|
|
@ -210,6 +225,8 @@ enum dccp_feature_numbers {
|
|||
#define DCCP_SOCKOPT_CCID 13
|
||||
#define DCCP_SOCKOPT_TX_CCID 14
|
||||
#define DCCP_SOCKOPT_RX_CCID 15
|
||||
#define DCCP_SOCKOPT_QPOLICY_ID 16
|
||||
#define DCCP_SOCKOPT_QPOLICY_TXQLEN 17
|
||||
#define DCCP_SOCKOPT_CCID_RX_INFO 128
|
||||
#define DCCP_SOCKOPT_CCID_TX_INFO 192
|
||||
|
||||
|
|
@ -458,10 +475,13 @@ struct dccp_ackvec;
|
|||
* @dccps_hc_rx_ccid - CCID used for the receiver (or receiving half-connection)
|
||||
* @dccps_hc_tx_ccid - CCID used for the sender (or sending half-connection)
|
||||
* @dccps_options_received - parsed set of retrieved options
|
||||
* @dccps_qpolicy - TX dequeueing policy, one of %dccp_packet_dequeueing_policy
|
||||
* @dccps_tx_qlen - maximum length of the TX queue
|
||||
* @dccps_role - role of this sock, one of %dccp_role
|
||||
* @dccps_hc_rx_insert_options - receiver wants to add options when acking
|
||||
* @dccps_hc_tx_insert_options - sender wants to add options when sending
|
||||
* @dccps_server_timewait - server holds timewait state on close (RFC 4340, 8.3)
|
||||
* @dccps_sync_scheduled - flag which signals "send out-of-band message soon"
|
||||
* @dccps_xmitlet - tasklet scheduled by the TX CCID to dequeue data packets
|
||||
* @dccps_xmit_timer - used by the TX CCID to delay sending (rate-based pacing)
|
||||
* @dccps_syn_rtt - RTT sample from Request/Response exchange (in usecs)
|
||||
|
|
@ -499,10 +519,13 @@ struct dccp_sock {
|
|||
struct ccid *dccps_hc_rx_ccid;
|
||||
struct ccid *dccps_hc_tx_ccid;
|
||||
struct dccp_options_received dccps_options_received;
|
||||
__u8 dccps_qpolicy;
|
||||
__u32 dccps_tx_qlen;
|
||||
enum dccp_role dccps_role:2;
|
||||
__u8 dccps_hc_rx_insert_options:1;
|
||||
__u8 dccps_hc_tx_insert_options:1;
|
||||
__u8 dccps_server_timewait:1;
|
||||
__u8 dccps_sync_scheduled:1;
|
||||
struct tasklet_struct dccps_xmitlet;
|
||||
struct timer_list dccps_xmit_timer;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@
|
|||
#ifdef CONFIG_PROFILING
|
||||
|
||||
#include <linux/dcache.h>
|
||||
#include <linux/path.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
struct dcookie_user;
|
||||
struct path;
|
||||
|
||||
/**
|
||||
* dcookie_register - register a user of dcookies
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
#ifndef INFLATE_H
|
||||
#define INFLATE_H
|
||||
|
||||
/* Other housekeeping constants */
|
||||
#define INBUFSIZ 4096
|
||||
|
||||
int gunzip(unsigned char *inbuf, int len,
|
||||
int(*fill)(void*, unsigned int),
|
||||
int(*flush)(void*, unsigned int),
|
||||
|
|
|
|||
|
|
@ -61,8 +61,6 @@ static void free(void *where)
|
|||
#define large_malloc(a) malloc(a)
|
||||
#define large_free(a) free(a)
|
||||
|
||||
#define set_error_fn(x)
|
||||
|
||||
#define INIT
|
||||
|
||||
#else /* STATIC */
|
||||
|
|
@ -72,6 +70,7 @@ static void free(void *where)
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
/* Use defines rather than static inline in order to avoid spurious
|
||||
|
|
@ -84,9 +83,6 @@ static void free(void *where)
|
|||
#define large_malloc(a) vmalloc(a)
|
||||
#define large_free(a) vfree(a)
|
||||
|
||||
static void(*error)(char *m);
|
||||
#define set_error_fn(x) error = x;
|
||||
|
||||
#define INIT __init
|
||||
#define STATIC
|
||||
|
||||
|
|
|
|||
19
include/linux/decompress/unxz.h
Normal file
19
include/linux/decompress/unxz.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Wrapper for decompressing XZ-compressed kernel, initramfs, and initrd
|
||||
*
|
||||
* Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*/
|
||||
|
||||
#ifndef DECOMPRESS_UNXZ_H
|
||||
#define DECOMPRESS_UNXZ_H
|
||||
|
||||
int unxz(unsigned char *in, int in_size,
|
||||
int (*fill)(void *dest, unsigned int size),
|
||||
int (*flush)(void *src, unsigned int size),
|
||||
unsigned char *out, int *in_used,
|
||||
void (*error)(char *x));
|
||||
|
||||
#endif
|
||||
|
|
@ -193,6 +193,13 @@ struct dm_target {
|
|||
char *error;
|
||||
};
|
||||
|
||||
/* Each target can link one of these into the table */
|
||||
struct dm_target_callbacks {
|
||||
struct list_head list;
|
||||
int (*congested_fn) (struct dm_target_callbacks *, int);
|
||||
void (*unplug_fn)(struct dm_target_callbacks *);
|
||||
};
|
||||
|
||||
int dm_register_target(struct target_type *t);
|
||||
void dm_unregister_target(struct target_type *t);
|
||||
|
||||
|
|
@ -268,6 +275,11 @@ int dm_table_create(struct dm_table **result, fmode_t mode,
|
|||
int dm_table_add_target(struct dm_table *t, const char *type,
|
||||
sector_t start, sector_t len, char *params);
|
||||
|
||||
/*
|
||||
* Target_ctr should call this if it needs to add any callbacks.
|
||||
*/
|
||||
void dm_table_add_target_callbacks(struct dm_table *t, struct dm_target_callbacks *cb);
|
||||
|
||||
/*
|
||||
* Finally call this to make the table ready for use.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -30,9 +30,8 @@ struct device_private;
|
|||
struct device_driver;
|
||||
struct driver_private;
|
||||
struct class;
|
||||
struct class_private;
|
||||
struct subsys_private;
|
||||
struct bus_type;
|
||||
struct bus_type_private;
|
||||
struct device_node;
|
||||
|
||||
struct bus_attribute {
|
||||
|
|
@ -65,7 +64,7 @@ struct bus_type {
|
|||
|
||||
const struct dev_pm_ops *pm;
|
||||
|
||||
struct bus_type_private *p;
|
||||
struct subsys_private *p;
|
||||
};
|
||||
|
||||
extern int __must_check bus_register(struct bus_type *bus);
|
||||
|
|
@ -197,6 +196,7 @@ struct class {
|
|||
|
||||
struct class_attribute *class_attrs;
|
||||
struct device_attribute *dev_attrs;
|
||||
struct bin_attribute *dev_bin_attrs;
|
||||
struct kobject *dev_kobj;
|
||||
|
||||
int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env);
|
||||
|
|
@ -213,7 +213,7 @@ struct class {
|
|||
|
||||
const struct dev_pm_ops *pm;
|
||||
|
||||
struct class_private *p;
|
||||
struct subsys_private *p;
|
||||
};
|
||||
|
||||
struct class_dev_iter {
|
||||
|
|
@ -508,13 +508,13 @@ static inline int device_is_registered(struct device *dev)
|
|||
|
||||
static inline void device_enable_async_suspend(struct device *dev)
|
||||
{
|
||||
if (dev->power.status == DPM_ON)
|
||||
if (!dev->power.in_suspend)
|
||||
dev->power.async_suspend = true;
|
||||
}
|
||||
|
||||
static inline void device_disable_async_suspend(struct device *dev)
|
||||
{
|
||||
if (dev->power.status == DPM_ON)
|
||||
if (!dev->power.in_suspend)
|
||||
dev->power.async_suspend = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
* Remove a device, destroy any tables.
|
||||
*
|
||||
* DM_DEV_RENAME:
|
||||
* Rename a device.
|
||||
* Rename a device or set its uuid if none was previously supplied.
|
||||
*
|
||||
* DM_SUSPEND:
|
||||
* This performs both suspend and resume, depending which flag is
|
||||
|
|
@ -267,9 +267,9 @@ enum {
|
|||
#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
|
||||
|
||||
#define DM_VERSION_MAJOR 4
|
||||
#define DM_VERSION_MINOR 18
|
||||
#define DM_VERSION_PATCHLEVEL 0
|
||||
#define DM_VERSION_EXTRA "-ioctl (2010-06-29)"
|
||||
#define DM_VERSION_MINOR 19
|
||||
#define DM_VERSION_PATCHLEVEL 1
|
||||
#define DM_VERSION_EXTRA "-ioctl (2011-01-07)"
|
||||
|
||||
/* Status bits */
|
||||
#define DM_READONLY_FLAG (1 << 0) /* In/Out */
|
||||
|
|
@ -322,4 +322,10 @@ enum {
|
|||
*/
|
||||
#define DM_UEVENT_GENERATED_FLAG (1 << 13) /* Out */
|
||||
|
||||
/*
|
||||
* If set, rename changes the uuid not the name. Only permitted
|
||||
* if no uuid was previously supplied: an existing uuid cannot be changed.
|
||||
*/
|
||||
#define DM_UUID_FLAG (1 << 14) /* In */
|
||||
|
||||
#endif /* _LINUX_DM_IOCTL_H */
|
||||
|
|
|
|||
|
|
@ -370,6 +370,16 @@
|
|||
#define DM_ULOG_REQUEST_TYPE(request_type) \
|
||||
(DM_ULOG_REQUEST_MASK & (request_type))
|
||||
|
||||
/*
|
||||
* DM_ULOG_REQUEST_VERSION is incremented when there is a
|
||||
* change to the way information is passed between kernel
|
||||
* and userspace. This could be a structure change of
|
||||
* dm_ulog_request or a change in the way requests are
|
||||
* issued/handled. Changes are outlined here:
|
||||
* version 1: Initial implementation
|
||||
*/
|
||||
#define DM_ULOG_REQUEST_VERSION 1
|
||||
|
||||
struct dm_ulog_request {
|
||||
/*
|
||||
* The local unique identifier (luid) and the universally unique
|
||||
|
|
@ -383,8 +393,9 @@ struct dm_ulog_request {
|
|||
*/
|
||||
uint64_t luid;
|
||||
char uuid[DM_UUID_LEN];
|
||||
char padding[7]; /* Padding because DM_UUID_LEN = 129 */
|
||||
char padding[3]; /* Padding because DM_UUID_LEN = 129 */
|
||||
|
||||
uint32_t version; /* See DM_ULOG_REQUEST_VERSION */
|
||||
int32_t error; /* Used to report back processing errors */
|
||||
|
||||
uint32_t seq; /* Sequence number for request */
|
||||
|
|
|
|||
|
|
@ -532,7 +532,7 @@ static inline int dmaengine_resume(struct dma_chan *chan)
|
|||
return dmaengine_device_control(chan, DMA_RESUME, 0);
|
||||
}
|
||||
|
||||
static inline int dmaengine_submit(struct dma_async_tx_descriptor *desc)
|
||||
static inline dma_cookie_t dmaengine_submit(struct dma_async_tx_descriptor *desc)
|
||||
{
|
||||
return desc->tx_submit(desc);
|
||||
}
|
||||
|
|
@ -824,6 +824,8 @@ 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);
|
||||
void dma_issue_pending_all(void);
|
||||
struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param);
|
||||
void dma_release_channel(struct dma_chan *chan);
|
||||
#else
|
||||
static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
|
||||
{
|
||||
|
|
@ -831,7 +833,14 @@ static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descript
|
|||
}
|
||||
static inline void dma_issue_pending_all(void)
|
||||
{
|
||||
do { } while (0);
|
||||
}
|
||||
static inline struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask,
|
||||
dma_filter_fn fn, void *fn_param)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
static inline void dma_release_channel(struct dma_chan *chan)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -842,8 +851,6 @@ void dma_async_device_unregister(struct dma_device *device);
|
|||
void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
|
||||
struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type);
|
||||
#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
|
||||
struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param);
|
||||
void dma_release_channel(struct dma_chan *chan);
|
||||
|
||||
/* --- Helper iov-locking functions --- */
|
||||
|
||||
|
|
|
|||
|
|
@ -44,34 +44,24 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n,
|
|||
extern int ddebug_remove_module(const char *mod_name);
|
||||
|
||||
#define dynamic_pr_debug(fmt, ...) do { \
|
||||
__label__ do_printk; \
|
||||
__label__ out; \
|
||||
static struct _ddebug descriptor \
|
||||
__used \
|
||||
__attribute__((section("__verbose"), aligned(8))) = \
|
||||
{ KBUILD_MODNAME, __func__, __FILE__, fmt, __LINE__, \
|
||||
_DPRINTK_FLAGS_DEFAULT }; \
|
||||
JUMP_LABEL(&descriptor.enabled, do_printk); \
|
||||
goto out; \
|
||||
do_printk: \
|
||||
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \
|
||||
out: ; \
|
||||
if (unlikely(descriptor.enabled)) \
|
||||
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define dynamic_dev_dbg(dev, fmt, ...) do { \
|
||||
__label__ do_printk; \
|
||||
__label__ out; \
|
||||
static struct _ddebug descriptor \
|
||||
__used \
|
||||
__attribute__((section("__verbose"), aligned(8))) = \
|
||||
{ KBUILD_MODNAME, __func__, __FILE__, fmt, __LINE__, \
|
||||
_DPRINTK_FLAGS_DEFAULT }; \
|
||||
JUMP_LABEL(&descriptor.enabled, do_printk); \
|
||||
goto out; \
|
||||
do_printk: \
|
||||
dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \
|
||||
out: ; \
|
||||
if (unlikely(descriptor.enabled)) \
|
||||
dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -195,15 +195,9 @@ enum {
|
|||
/*
|
||||
* io context count accounting
|
||||
*/
|
||||
#define elv_ioc_count_mod(name, __val) \
|
||||
do { \
|
||||
preempt_disable(); \
|
||||
__get_cpu_var(name) += (__val); \
|
||||
preempt_enable(); \
|
||||
} while (0)
|
||||
|
||||
#define elv_ioc_count_inc(name) elv_ioc_count_mod(name, 1)
|
||||
#define elv_ioc_count_dec(name) elv_ioc_count_mod(name, -1)
|
||||
#define elv_ioc_count_mod(name, __val) this_cpu_add(name, __val)
|
||||
#define elv_ioc_count_inc(name) this_cpu_inc(name)
|
||||
#define elv_ioc_count_dec(name) this_cpu_dec(name)
|
||||
|
||||
#define elv_ioc_count_read(name) \
|
||||
({ \
|
||||
|
|
|
|||
|
|
@ -48,8 +48,10 @@ extern int eth_validate_addr(struct net_device *dev);
|
|||
|
||||
|
||||
|
||||
extern struct net_device *alloc_etherdev_mq(int sizeof_priv, unsigned int queue_count);
|
||||
extern struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs,
|
||||
unsigned int rxqs);
|
||||
#define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1)
|
||||
#define alloc_etherdev_mq(sizeof_priv, count) alloc_etherdev_mqs(sizeof_priv, count, count)
|
||||
|
||||
/**
|
||||
* is_zero_ether_addr - Determine if give Ethernet address is all zeros.
|
||||
|
|
@ -96,6 +98,17 @@ static inline int is_broadcast_ether_addr(const u8 *addr)
|
|||
return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == 0xff;
|
||||
}
|
||||
|
||||
/**
|
||||
* is_unicast_ether_addr - Determine if the Ethernet address is unicast
|
||||
* @addr: Pointer to a six-byte array containing the Ethernet address
|
||||
*
|
||||
* Return true if the address is a unicast address.
|
||||
*/
|
||||
static inline int is_unicast_ether_addr(const u8 *addr)
|
||||
{
|
||||
return !is_multicast_ether_addr(addr);
|
||||
}
|
||||
|
||||
/**
|
||||
* is_valid_ether_addr - Determine if the given Ethernet address is valid
|
||||
* @addr: Pointer to a six-byte array containing the Ethernet address
|
||||
|
|
|
|||
|
|
@ -691,7 +691,9 @@ struct ethtool_ops {
|
|||
#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) */
|
||||
/* Get link status for host, i.e. whether the interface *and* the
|
||||
* physical port (if there is one) are up (ethtool_value). */
|
||||
#define ETHTOOL_GLINK 0x0000000a
|
||||
#define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */
|
||||
#define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */
|
||||
#define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */
|
||||
|
|
|
|||
|
|
@ -724,21 +724,30 @@ struct ext3_dir_entry_2 {
|
|||
~EXT3_DIR_ROUND)
|
||||
#define EXT3_MAX_REC_LEN ((1<<16)-1)
|
||||
|
||||
/*
|
||||
* Tests against MAX_REC_LEN etc were put in place for 64k block
|
||||
* sizes; if that is not possible on this arch, we can skip
|
||||
* those tests and speed things up.
|
||||
*/
|
||||
static inline unsigned ext3_rec_len_from_disk(__le16 dlen)
|
||||
{
|
||||
unsigned len = le16_to_cpu(dlen);
|
||||
|
||||
#if (PAGE_CACHE_SIZE >= 65536)
|
||||
if (len == EXT3_MAX_REC_LEN)
|
||||
return 1 << 16;
|
||||
#endif
|
||||
return len;
|
||||
}
|
||||
|
||||
static inline __le16 ext3_rec_len_to_disk(unsigned len)
|
||||
{
|
||||
#if (PAGE_CACHE_SIZE >= 65536)
|
||||
if (len == (1 << 16))
|
||||
return cpu_to_le16(EXT3_MAX_REC_LEN);
|
||||
else if (len > (1 << 16))
|
||||
BUG();
|
||||
#endif
|
||||
return cpu_to_le16(len);
|
||||
}
|
||||
|
||||
|
|
@ -856,6 +865,7 @@ extern struct ext3_group_desc * ext3_get_group_desc(struct super_block * sb,
|
|||
extern int ext3_should_retry_alloc(struct super_block *sb, int *retries);
|
||||
extern void ext3_init_block_alloc_info(struct inode *);
|
||||
extern void ext3_rsv_window_add(struct super_block *sb, struct ext3_reserve_window_node *rsv);
|
||||
extern int ext3_trim_fs(struct super_block *sb, struct fstrim_range *range);
|
||||
|
||||
/* dir.c */
|
||||
extern int ext3_check_dir_entry(const char *, struct inode *,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#define _FALLOC_H_
|
||||
|
||||
#define FALLOC_FL_KEEP_SIZE 0x01 /* default is extend size */
|
||||
#define FALLOC_FL_PUNCH_HOLE 0x02 /* de-allocates range */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
|
|
|
|||
|
|
@ -83,11 +83,13 @@
|
|||
FAN_ALL_PERM_EVENTS |\
|
||||
FAN_Q_OVERFLOW)
|
||||
|
||||
#define FANOTIFY_METADATA_VERSION 2
|
||||
#define FANOTIFY_METADATA_VERSION 3
|
||||
|
||||
struct fanotify_event_metadata {
|
||||
__u32 event_len;
|
||||
__u32 vers;
|
||||
__u8 vers;
|
||||
__u8 reserved;
|
||||
__u16 metadata_len;
|
||||
__aligned_u64 mask;
|
||||
__s32 fd;
|
||||
__s32 pid;
|
||||
|
|
@ -96,11 +98,13 @@ struct fanotify_event_metadata {
|
|||
struct fanotify_response {
|
||||
__s32 fd;
|
||||
__u32 response;
|
||||
} __attribute__ ((packed));
|
||||
};
|
||||
|
||||
/* Legit userspace responses to a _PERM event */
|
||||
#define FAN_ALLOW 0x01
|
||||
#define FAN_DENY 0x02
|
||||
/* No fd set in event */
|
||||
#define FAN_NOFD -1
|
||||
|
||||
/* Helper functions to deal with fanotify_event_metadata buffers */
|
||||
#define FAN_EVENT_METADATA_LEN (sizeof(struct fanotify_event_metadata))
|
||||
|
|
|
|||
|
|
@ -1092,6 +1092,8 @@ extern int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var);
|
|||
extern const unsigned char *fb_firmware_edid(struct device *device);
|
||||
extern void fb_edid_to_monspecs(unsigned char *edid,
|
||||
struct fb_monspecs *specs);
|
||||
extern void fb_edid_add_monspecs(unsigned char *edid,
|
||||
struct fb_monspecs *specs);
|
||||
extern void fb_destroy_modedb(struct fb_videomode *modedb);
|
||||
extern int fb_find_mode_cvt(struct fb_videomode *mode, int margins, int rb);
|
||||
extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter);
|
||||
|
|
@ -1150,6 +1152,7 @@ struct fb_videomode {
|
|||
|
||||
extern const char *fb_mode_option;
|
||||
extern const struct fb_videomode vesa_modes[];
|
||||
extern const struct fb_videomode cea_modes[64];
|
||||
|
||||
struct fb_modelist {
|
||||
struct list_head list;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
#define AT_REMOVEDIR 0x200 /* Remove directory instead of
|
||||
unlinking file. */
|
||||
#define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
|
||||
#define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount traversal */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
* Copyright (c) 2009 Orex Computed Radiography
|
||||
* Baruch Siach <baruch@tkos.co.il>
|
||||
*
|
||||
* Copyright (C) 2010 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* Header file for the FEC platform data
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -16,6 +18,7 @@
|
|||
|
||||
struct fec_platform_data {
|
||||
phy_interface_t phy;
|
||||
unsigned char mac[ETH_ALEN];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ extern struct file *alloc_file(struct path *, fmode_t mode,
|
|||
|
||||
static inline void fput_light(struct file *file, int fput_needed)
|
||||
{
|
||||
if (unlikely(fput_needed))
|
||||
if (fput_needed)
|
||||
fput(file);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,54 +91,6 @@ struct sock_fprog { /* Required for SO_ATTACH_FILTER. */
|
|||
#define BPF_TAX 0x00
|
||||
#define BPF_TXA 0x80
|
||||
|
||||
enum {
|
||||
BPF_S_RET_K = 0,
|
||||
BPF_S_RET_A,
|
||||
BPF_S_ALU_ADD_K,
|
||||
BPF_S_ALU_ADD_X,
|
||||
BPF_S_ALU_SUB_K,
|
||||
BPF_S_ALU_SUB_X,
|
||||
BPF_S_ALU_MUL_K,
|
||||
BPF_S_ALU_MUL_X,
|
||||
BPF_S_ALU_DIV_X,
|
||||
BPF_S_ALU_AND_K,
|
||||
BPF_S_ALU_AND_X,
|
||||
BPF_S_ALU_OR_K,
|
||||
BPF_S_ALU_OR_X,
|
||||
BPF_S_ALU_LSH_K,
|
||||
BPF_S_ALU_LSH_X,
|
||||
BPF_S_ALU_RSH_K,
|
||||
BPF_S_ALU_RSH_X,
|
||||
BPF_S_ALU_NEG,
|
||||
BPF_S_LD_W_ABS,
|
||||
BPF_S_LD_H_ABS,
|
||||
BPF_S_LD_B_ABS,
|
||||
BPF_S_LD_W_LEN,
|
||||
BPF_S_LD_W_IND,
|
||||
BPF_S_LD_H_IND,
|
||||
BPF_S_LD_B_IND,
|
||||
BPF_S_LD_IMM,
|
||||
BPF_S_LDX_W_LEN,
|
||||
BPF_S_LDX_B_MSH,
|
||||
BPF_S_LDX_IMM,
|
||||
BPF_S_MISC_TAX,
|
||||
BPF_S_MISC_TXA,
|
||||
BPF_S_ALU_DIV_K,
|
||||
BPF_S_LD_MEM,
|
||||
BPF_S_LDX_MEM,
|
||||
BPF_S_ST,
|
||||
BPF_S_STX,
|
||||
BPF_S_JMP_JA,
|
||||
BPF_S_JMP_JEQ_K,
|
||||
BPF_S_JMP_JEQ_X,
|
||||
BPF_S_JMP_JGE_K,
|
||||
BPF_S_JMP_JGE_X,
|
||||
BPF_S_JMP_JGT_K,
|
||||
BPF_S_JMP_JGT_X,
|
||||
BPF_S_JMP_JSET_K,
|
||||
BPF_S_JMP_JSET_X,
|
||||
};
|
||||
|
||||
#ifndef BPF_MAXINSNS
|
||||
#define BPF_MAXINSNS 4096
|
||||
#endif
|
||||
|
|
@ -172,7 +124,9 @@ enum {
|
|||
#define SKF_AD_MARK 20
|
||||
#define SKF_AD_QUEUE 24
|
||||
#define SKF_AD_HATYPE 28
|
||||
#define SKF_AD_MAX 32
|
||||
#define SKF_AD_RXHASH 32
|
||||
#define SKF_AD_CPU 36
|
||||
#define SKF_AD_MAX 40
|
||||
#define SKF_NET_OFF (-0x100000)
|
||||
#define SKF_LL_OFF (-0x200000)
|
||||
|
||||
|
|
@ -194,8 +148,8 @@ struct sk_buff;
|
|||
struct sock;
|
||||
|
||||
extern int sk_filter(struct sock *sk, struct sk_buff *skb);
|
||||
extern unsigned int sk_run_filter(struct sk_buff *skb,
|
||||
struct sock_filter *filter, int flen);
|
||||
extern unsigned int sk_run_filter(const struct sk_buff *skb,
|
||||
const struct sock_filter *filter);
|
||||
extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
|
||||
extern int sk_detach_filter(struct sock *sk);
|
||||
extern int sk_chk_filter(struct sock_filter *filter, int flen);
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ struct fw_cdev_event_iso_interrupt {
|
|||
* @closure: See &fw_cdev_event_common;
|
||||
* set by %FW_CDEV_CREATE_ISO_CONTEXT ioctl
|
||||
* @type: %FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL
|
||||
* @completed: Offset into the receive buffer; data before this offest is valid
|
||||
* @completed: Offset into the receive buffer; data before this offset is valid
|
||||
*
|
||||
* This event is sent in multichannel contexts (context type
|
||||
* %FW_CDEV_ISO_CONTEXT_RECEIVE_MULTICHANNEL) for &fw_cdev_iso_packet buffer
|
||||
|
|
|
|||
|
|
@ -302,9 +302,9 @@ struct fw_packet {
|
|||
struct fw_transaction {
|
||||
int node_id; /* The generation is implied; it is always the current. */
|
||||
int tlabel;
|
||||
int timestamp;
|
||||
struct list_head link;
|
||||
struct fw_card *card;
|
||||
bool is_split_transaction;
|
||||
struct timer_list split_timeout_timer;
|
||||
|
||||
struct fw_packet packet;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
#define _LINUX_FIRMWARE_MAP_H
|
||||
|
||||
#include <linux/list.h>
|
||||
#include <linux/kobject.h>
|
||||
|
||||
/*
|
||||
* provide a dummy interface if CONFIG_FIRMWARE_MEMMAP is disabled
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ void *flex_array_get(struct flex_array *fa, unsigned int element_nr);
|
|||
int flex_array_shrink(struct flex_array *fa);
|
||||
|
||||
#define flex_array_put_ptr(fa, nr, src, gfp) \
|
||||
flex_array_put(fa, nr, &(void *)(src), gfp)
|
||||
flex_array_put(fa, nr, (void *)&(src), gfp)
|
||||
|
||||
void *flex_array_get_ptr(struct flex_array *fa, unsigned int element_nr);
|
||||
|
||||
|
|
|
|||
|
|
@ -242,6 +242,7 @@ struct inodes_stat_t {
|
|||
#define S_SWAPFILE 256 /* Do not truncate: swapon got its bmaps */
|
||||
#define S_PRIVATE 512 /* Inode is fs-internal */
|
||||
#define S_IMA 1024 /* Inode has an associated IMA struct */
|
||||
#define S_AUTOMOUNT 2048 /* Automount/referral quasi-directory */
|
||||
|
||||
/*
|
||||
* Note that nosuid etc flags are inode-specific: setting some file-system
|
||||
|
|
@ -277,6 +278,7 @@ struct inodes_stat_t {
|
|||
#define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE)
|
||||
#define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE)
|
||||
#define IS_IMA(inode) ((inode)->i_flags & S_IMA)
|
||||
#define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT)
|
||||
|
||||
/* the read-only stuff doesn't really belong here, but any other place is
|
||||
probably as bad and I don't want to create yet another include file. */
|
||||
|
|
@ -382,7 +384,6 @@ struct inodes_stat_t {
|
|||
#include <linux/path.h>
|
||||
#include <linux/stat.h>
|
||||
#include <linux/cache.h>
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/radix-tree.h>
|
||||
#include <linux/prio_tree.h>
|
||||
|
|
@ -392,6 +393,7 @@ struct inodes_stat_t {
|
|||
#include <linux/capability.h>
|
||||
#include <linux/semaphore.h>
|
||||
#include <linux/fiemap.h>
|
||||
#include <linux/rculist_bl.h>
|
||||
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
|
@ -401,6 +403,7 @@ struct hd_geometry;
|
|||
struct iovec;
|
||||
struct nameidata;
|
||||
struct kiocb;
|
||||
struct kobject;
|
||||
struct pipe_inode_info;
|
||||
struct poll_table_struct;
|
||||
struct kstatfs;
|
||||
|
|
@ -602,6 +605,7 @@ struct address_space_operations {
|
|||
sector_t (*bmap)(struct address_space *, sector_t);
|
||||
void (*invalidatepage) (struct page *, unsigned long);
|
||||
int (*releasepage) (struct page *, gfp_t);
|
||||
void (*freepage)(struct page *);
|
||||
ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
|
||||
loff_t offset, unsigned long nr_segs);
|
||||
int (*get_xip_mem)(struct address_space *, pgoff_t, int,
|
||||
|
|
@ -662,8 +666,9 @@ struct block_device {
|
|||
void * bd_claiming;
|
||||
void * bd_holder;
|
||||
int bd_holders;
|
||||
bool bd_write_holder;
|
||||
#ifdef CONFIG_SYSFS
|
||||
struct list_head bd_holder_list;
|
||||
struct list_head bd_holder_disks;
|
||||
#endif
|
||||
struct block_device * bd_contains;
|
||||
unsigned bd_block_size;
|
||||
|
|
@ -732,16 +737,31 @@ struct posix_acl;
|
|||
#define ACL_NOT_CACHED ((void *)(-1))
|
||||
|
||||
struct inode {
|
||||
/* RCU path lookup touches following: */
|
||||
umode_t i_mode;
|
||||
uid_t i_uid;
|
||||
gid_t i_gid;
|
||||
const struct inode_operations *i_op;
|
||||
struct super_block *i_sb;
|
||||
|
||||
spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */
|
||||
unsigned int i_flags;
|
||||
struct mutex i_mutex;
|
||||
|
||||
unsigned long i_state;
|
||||
unsigned long dirtied_when; /* jiffies of first dirtying */
|
||||
|
||||
struct hlist_node i_hash;
|
||||
struct list_head i_wb_list; /* backing dev IO list */
|
||||
struct list_head i_lru; /* inode LRU list */
|
||||
struct list_head i_sb_list;
|
||||
struct list_head i_dentry;
|
||||
union {
|
||||
struct list_head i_dentry;
|
||||
struct rcu_head i_rcu;
|
||||
};
|
||||
unsigned long i_ino;
|
||||
atomic_t i_count;
|
||||
unsigned int i_nlink;
|
||||
uid_t i_uid;
|
||||
gid_t i_gid;
|
||||
dev_t i_rdev;
|
||||
unsigned int i_blkbits;
|
||||
u64 i_version;
|
||||
|
|
@ -754,13 +774,8 @@ struct inode {
|
|||
struct timespec i_ctime;
|
||||
blkcnt_t i_blocks;
|
||||
unsigned short i_bytes;
|
||||
umode_t i_mode;
|
||||
spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */
|
||||
struct mutex i_mutex;
|
||||
struct rw_semaphore i_alloc_sem;
|
||||
const struct inode_operations *i_op;
|
||||
const struct file_operations *i_fop; /* former ->i_op->default_file_ops */
|
||||
struct super_block *i_sb;
|
||||
struct file_lock *i_flock;
|
||||
struct address_space *i_mapping;
|
||||
struct address_space i_data;
|
||||
|
|
@ -781,11 +796,6 @@ struct inode {
|
|||
struct hlist_head i_fsnotify_marks;
|
||||
#endif
|
||||
|
||||
unsigned long i_state;
|
||||
unsigned long dirtied_when; /* jiffies of first dirtying */
|
||||
|
||||
unsigned int i_flags;
|
||||
|
||||
#ifdef CONFIG_IMA
|
||||
/* protected by i_lock */
|
||||
unsigned int i_readcount; /* struct files open RO */
|
||||
|
|
@ -1058,7 +1068,6 @@ struct lock_manager_operations {
|
|||
int (*fl_grant)(struct file_lock *, struct file_lock *, int);
|
||||
void (*fl_release_private)(struct file_lock *);
|
||||
void (*fl_break)(struct file_lock *);
|
||||
int (*fl_mylease)(struct file_lock *, struct file_lock *);
|
||||
int (*fl_change)(struct file_lock **, int);
|
||||
};
|
||||
|
||||
|
|
@ -1371,13 +1380,13 @@ struct super_block {
|
|||
const struct xattr_handler **s_xattr;
|
||||
|
||||
struct list_head s_inodes; /* all inodes */
|
||||
struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */
|
||||
struct hlist_bl_head s_anon; /* anonymous dentries for (nfs) exporting */
|
||||
#ifdef CONFIG_SMP
|
||||
struct list_head __percpu *s_files;
|
||||
#else
|
||||
struct list_head s_files;
|
||||
#endif
|
||||
/* s_dentry_lru and s_nr_dentry_unused are protected by dcache_lock */
|
||||
/* s_dentry_lru, s_nr_dentry_unused protected by dcache.c lru locks */
|
||||
struct list_head s_dentry_lru; /* unused dentry lru */
|
||||
int s_nr_dentry_unused; /* # of dentry on lru */
|
||||
|
||||
|
|
@ -1416,6 +1425,7 @@ struct super_block {
|
|||
* generic_show_options()
|
||||
*/
|
||||
char __rcu *s_options;
|
||||
const struct dentry_operations *s_d_op; /* default d_op for dentries */
|
||||
};
|
||||
|
||||
extern struct timespec current_fs_time(struct super_block *sb);
|
||||
|
|
@ -1473,8 +1483,8 @@ struct fiemap_extent_info {
|
|||
unsigned int fi_flags; /* Flags as passed from user */
|
||||
unsigned int fi_extents_mapped; /* Number of mapped extents */
|
||||
unsigned int fi_extents_max; /* Size of fiemap_extent array */
|
||||
struct fiemap_extent *fi_extents_start; /* Start of fiemap_extent
|
||||
* array */
|
||||
struct fiemap_extent __user *fi_extents_start; /* Start of
|
||||
fiemap_extent array */
|
||||
};
|
||||
int fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical,
|
||||
u64 phys, u64 len, u32 flags);
|
||||
|
|
@ -1542,11 +1552,22 @@ struct file_operations {
|
|||
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
|
||||
ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
|
||||
int (*setlease)(struct file *, long, struct file_lock **);
|
||||
long (*fallocate)(struct file *file, int mode, loff_t offset,
|
||||
loff_t len);
|
||||
};
|
||||
|
||||
#define IPERM_FLAG_RCU 0x0001
|
||||
|
||||
struct inode_operations {
|
||||
int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
|
||||
struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
|
||||
void * (*follow_link) (struct dentry *, struct nameidata *);
|
||||
int (*permission) (struct inode *, int, unsigned int);
|
||||
int (*check_acl)(struct inode *, int, unsigned int);
|
||||
|
||||
int (*readlink) (struct dentry *, char __user *,int);
|
||||
void (*put_link) (struct dentry *, struct nameidata *, void *);
|
||||
|
||||
int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
|
||||
int (*link) (struct dentry *,struct inode *,struct dentry *);
|
||||
int (*unlink) (struct inode *,struct dentry *);
|
||||
int (*symlink) (struct inode *,struct dentry *,const char *);
|
||||
|
|
@ -1555,12 +1576,7 @@ struct inode_operations {
|
|||
int (*mknod) (struct inode *,struct dentry *,int,dev_t);
|
||||
int (*rename) (struct inode *, struct dentry *,
|
||||
struct inode *, struct dentry *);
|
||||
int (*readlink) (struct dentry *, char __user *,int);
|
||||
void * (*follow_link) (struct dentry *, struct nameidata *);
|
||||
void (*put_link) (struct dentry *, struct nameidata *, void *);
|
||||
void (*truncate) (struct inode *);
|
||||
int (*permission) (struct inode *, int);
|
||||
int (*check_acl)(struct inode *, int);
|
||||
int (*setattr) (struct dentry *, struct iattr *);
|
||||
int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
|
||||
int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
|
||||
|
|
@ -1568,11 +1584,9 @@ struct inode_operations {
|
|||
ssize_t (*listxattr) (struct dentry *, char *, size_t);
|
||||
int (*removexattr) (struct dentry *, const char *);
|
||||
void (*truncate_range)(struct inode *, loff_t, loff_t);
|
||||
long (*fallocate)(struct inode *inode, int mode, loff_t offset,
|
||||
loff_t len);
|
||||
int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start,
|
||||
u64 len);
|
||||
};
|
||||
} ____cacheline_aligned;
|
||||
|
||||
struct seq_file;
|
||||
|
||||
|
|
@ -1823,7 +1837,9 @@ struct super_block *sget(struct file_system_type *type,
|
|||
int (*set)(struct super_block *,void *),
|
||||
void *data);
|
||||
extern struct dentry *mount_pseudo(struct file_system_type *, char *,
|
||||
const struct super_operations *ops, unsigned long);
|
||||
const struct super_operations *ops,
|
||||
const struct dentry_operations *dops,
|
||||
unsigned long);
|
||||
extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);
|
||||
|
||||
static inline void sb_mark_dirty(struct super_block *sb)
|
||||
|
|
@ -2005,7 +2021,6 @@ extern struct block_device *bdgrab(struct block_device *bdev);
|
|||
extern void bd_set_size(struct block_device *, loff_t size);
|
||||
extern void bd_forget(struct inode *inode);
|
||||
extern void bdput(struct block_device *);
|
||||
extern struct block_device *open_by_devnum(dev_t, fmode_t);
|
||||
extern void invalidate_bdev(struct block_device *);
|
||||
extern int sync_blockdev(struct block_device *bdev);
|
||||
extern struct super_block *freeze_bdev(struct block_device *);
|
||||
|
|
@ -2036,16 +2051,26 @@ extern const struct file_operations def_fifo_fops;
|
|||
extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long);
|
||||
extern int blkdev_ioctl(struct block_device *, fmode_t, unsigned, unsigned long);
|
||||
extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long);
|
||||
extern int blkdev_get(struct block_device *, fmode_t);
|
||||
extern int blkdev_put(struct block_device *, fmode_t);
|
||||
extern int bd_claim(struct block_device *, void *);
|
||||
extern void bd_release(struct block_device *);
|
||||
extern int blkdev_get(struct block_device *bdev, fmode_t mode, void *holder);
|
||||
extern struct block_device *blkdev_get_by_path(const char *path, fmode_t mode,
|
||||
void *holder);
|
||||
extern struct block_device *blkdev_get_by_dev(dev_t dev, fmode_t mode,
|
||||
void *holder);
|
||||
extern int blkdev_put(struct block_device *bdev, fmode_t mode);
|
||||
#ifdef CONFIG_SYSFS
|
||||
extern int bd_claim_by_disk(struct block_device *, void *, struct gendisk *);
|
||||
extern void bd_release_from_disk(struct block_device *, struct gendisk *);
|
||||
extern int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk);
|
||||
extern void bd_unlink_disk_holder(struct block_device *bdev,
|
||||
struct gendisk *disk);
|
||||
#else
|
||||
#define bd_claim_by_disk(bdev, holder, disk) bd_claim(bdev, holder)
|
||||
#define bd_release_from_disk(bdev, disk) bd_release(bdev)
|
||||
static inline int bd_link_disk_holder(struct block_device *bdev,
|
||||
struct gendisk *disk)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void bd_unlink_disk_holder(struct block_device *bdev,
|
||||
struct gendisk *disk)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
@ -2081,8 +2106,6 @@ static inline void unregister_chrdev(unsigned int major, const char *name)
|
|||
extern const char *__bdevname(dev_t, char *buffer);
|
||||
extern const char *bdevname(struct block_device *bdev, char *buffer);
|
||||
extern struct block_device *lookup_bdev(const char *);
|
||||
extern struct block_device *open_bdev_exclusive(const char *, fmode_t, void *);
|
||||
extern void close_bdev_exclusive(struct block_device *, fmode_t);
|
||||
extern void blkdev_show(struct seq_file *,off_t);
|
||||
|
||||
#else
|
||||
|
|
@ -2157,8 +2180,8 @@ extern sector_t bmap(struct inode *, sector_t);
|
|||
#endif
|
||||
extern int notify_change(struct dentry *, struct iattr *);
|
||||
extern int inode_permission(struct inode *, int);
|
||||
extern int generic_permission(struct inode *, int,
|
||||
int (*check_acl)(struct inode *, int));
|
||||
extern int generic_permission(struct inode *, int, unsigned int,
|
||||
int (*check_acl)(struct inode *, int, unsigned int));
|
||||
|
||||
static inline bool execute_ok(struct inode *inode)
|
||||
{
|
||||
|
|
@ -2229,6 +2252,7 @@ extern void iget_failed(struct inode *);
|
|||
extern void end_writeback(struct inode *);
|
||||
extern void __destroy_inode(struct inode *);
|
||||
extern struct inode *new_inode(struct super_block *);
|
||||
extern void free_inode_nonrcu(struct inode *inode);
|
||||
extern int should_remove_suid(struct dentry *);
|
||||
extern int file_remove_suid(struct file *);
|
||||
|
||||
|
|
@ -2445,6 +2469,10 @@ static inline ino_t parent_ino(struct dentry *dentry)
|
|||
{
|
||||
ino_t res;
|
||||
|
||||
/*
|
||||
* Don't strictly need d_lock here? If the parent ino could change
|
||||
* then surely we'd have a deeper race in the caller?
|
||||
*/
|
||||
spin_lock(&dentry->d_lock);
|
||||
res = dentry->d_parent->d_inode->i_ino;
|
||||
spin_unlock(&dentry->d_lock);
|
||||
|
|
|
|||
|
|
@ -2,10 +2,13 @@
|
|||
#define _LINUX_FS_STRUCT_H
|
||||
|
||||
#include <linux/path.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/seqlock.h>
|
||||
|
||||
struct fs_struct {
|
||||
int users;
|
||||
spinlock_t lock;
|
||||
seqcount_t seq;
|
||||
int umask;
|
||||
int in_exec;
|
||||
struct path root, pwd;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
/*
|
||||
* fsnotify_d_instantiate - instantiate a dentry for inode
|
||||
* Called with dcache_lock held.
|
||||
*/
|
||||
static inline void fsnotify_d_instantiate(struct dentry *dentry,
|
||||
struct inode *inode)
|
||||
|
|
@ -62,7 +61,6 @@ static inline int fsnotify_perm(struct file *file, int mask)
|
|||
|
||||
/*
|
||||
* fsnotify_d_move - dentry has been moved
|
||||
* Called with dcache_lock and dentry->d_lock held.
|
||||
*/
|
||||
static inline void fsnotify_d_move(struct dentry *dentry)
|
||||
{
|
||||
|
|
@ -235,9 +233,6 @@ static inline void fsnotify_open(struct file *file)
|
|||
if (S_ISDIR(inode->i_mode))
|
||||
mask |= FS_ISDIR;
|
||||
|
||||
/* FMODE_NONOTIFY must never be set from user */
|
||||
file->f_mode &= ~FMODE_NONOTIFY;
|
||||
|
||||
fsnotify_parent(path, NULL, mask);
|
||||
fsnotify(inode, mask, path, FSNOTIFY_EVENT_PATH, NULL, 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ struct fsnotify_group {
|
|||
struct mutex access_mutex;
|
||||
struct list_head access_list;
|
||||
wait_queue_head_t access_waitq;
|
||||
bool bypass_perm; /* protected by access_mutex */
|
||||
atomic_t bypass_perm;
|
||||
#endif /* CONFIG_FANOTIFY_ACCESS_PERMISSIONS */
|
||||
int f_flags;
|
||||
unsigned int max_marks;
|
||||
|
|
@ -329,9 +329,15 @@ static inline void __fsnotify_update_dcache_flags(struct dentry *dentry)
|
|||
{
|
||||
struct dentry *parent;
|
||||
|
||||
assert_spin_locked(&dcache_lock);
|
||||
assert_spin_locked(&dentry->d_lock);
|
||||
|
||||
/*
|
||||
* Serialisation of setting PARENT_WATCHED on the dentries is provided
|
||||
* by d_lock. If inotify_inode_watched changes after we have taken
|
||||
* d_lock, the following __fsnotify_update_child_dentry_flags call will
|
||||
* find our entry, so it will spin until we complete here, and update
|
||||
* us with the new state.
|
||||
*/
|
||||
parent = dentry->d_parent;
|
||||
if (parent->d_inode && fsnotify_inode_watches_children(parent->d_inode))
|
||||
dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED;
|
||||
|
|
@ -341,15 +347,12 @@ static inline void __fsnotify_update_dcache_flags(struct dentry *dentry)
|
|||
|
||||
/*
|
||||
* fsnotify_d_instantiate - instantiate a dentry for inode
|
||||
* Called with dcache_lock held.
|
||||
*/
|
||||
static inline void __fsnotify_d_instantiate(struct dentry *dentry, struct inode *inode)
|
||||
{
|
||||
if (!inode)
|
||||
return;
|
||||
|
||||
assert_spin_locked(&dcache_lock);
|
||||
|
||||
spin_lock(&dentry->d_lock);
|
||||
__fsnotify_update_dcache_flags(dentry);
|
||||
spin_unlock(&dentry->d_lock);
|
||||
|
|
|
|||
|
|
@ -154,12 +154,14 @@ enum {
|
|||
TRACE_EVENT_FL_ENABLED_BIT,
|
||||
TRACE_EVENT_FL_FILTERED_BIT,
|
||||
TRACE_EVENT_FL_RECORDED_CMD_BIT,
|
||||
TRACE_EVENT_FL_CAP_ANY_BIT,
|
||||
};
|
||||
|
||||
enum {
|
||||
TRACE_EVENT_FL_ENABLED = (1 << TRACE_EVENT_FL_ENABLED_BIT),
|
||||
TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT),
|
||||
TRACE_EVENT_FL_RECORDED_CMD = (1 << TRACE_EVENT_FL_RECORDED_CMD_BIT),
|
||||
TRACE_EVENT_FL_CAP_ANY = (1 << TRACE_EVENT_FL_CAP_ANY_BIT),
|
||||
};
|
||||
|
||||
struct ftrace_event_call {
|
||||
|
|
@ -196,6 +198,14 @@ struct ftrace_event_call {
|
|||
#endif
|
||||
};
|
||||
|
||||
#define __TRACE_EVENT_FLAGS(name, value) \
|
||||
static int __init trace_init_flags_##name(void) \
|
||||
{ \
|
||||
event_##name.flags = value; \
|
||||
return 0; \
|
||||
} \
|
||||
early_initcall(trace_init_flags_##name);
|
||||
|
||||
#define PERF_MAX_TRACE_SIZE 2048
|
||||
|
||||
#define MAX_FILTER_PRED 32
|
||||
|
|
@ -215,6 +225,10 @@ enum {
|
|||
FILTER_PTR_STRING,
|
||||
};
|
||||
|
||||
#define EVENT_STORAGE_SIZE 128
|
||||
extern struct mutex event_storage_mutex;
|
||||
extern char event_storage[EVENT_STORAGE_SIZE];
|
||||
|
||||
extern int trace_event_raw_init(struct ftrace_event_call *call);
|
||||
extern int trace_define_field(struct ftrace_event_call *call, const char *type,
|
||||
const char *name, int offset, int size,
|
||||
|
|
|
|||
|
|
@ -41,6 +41,12 @@
|
|||
* 7.15
|
||||
* - add store notify
|
||||
* - add retrieve notify
|
||||
*
|
||||
* 7.16
|
||||
* - add BATCH_FORGET request
|
||||
* - FUSE_IOCTL_UNRESTRICTED shall now return with array of 'struct
|
||||
* fuse_ioctl_iovec' instead of ambiguous 'struct iovec'
|
||||
* - add FUSE_IOCTL_32BIT flag
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_FUSE_H
|
||||
|
|
@ -72,7 +78,7 @@
|
|||
#define FUSE_KERNEL_VERSION 7
|
||||
|
||||
/** Minor version number of this interface */
|
||||
#define FUSE_KERNEL_MINOR_VERSION 15
|
||||
#define FUSE_KERNEL_MINOR_VERSION 16
|
||||
|
||||
/** The node ID of the root inode */
|
||||
#define FUSE_ROOT_ID 1
|
||||
|
|
@ -200,12 +206,14 @@ struct fuse_file_lock {
|
|||
* FUSE_IOCTL_COMPAT: 32bit compat ioctl on 64bit machine
|
||||
* FUSE_IOCTL_UNRESTRICTED: not restricted to well-formed ioctls, retry allowed
|
||||
* FUSE_IOCTL_RETRY: retry with new iovecs
|
||||
* FUSE_IOCTL_32BIT: 32bit ioctl
|
||||
*
|
||||
* FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs
|
||||
*/
|
||||
#define FUSE_IOCTL_COMPAT (1 << 0)
|
||||
#define FUSE_IOCTL_UNRESTRICTED (1 << 1)
|
||||
#define FUSE_IOCTL_RETRY (1 << 2)
|
||||
#define FUSE_IOCTL_32BIT (1 << 3)
|
||||
|
||||
#define FUSE_IOCTL_MAX_IOV 256
|
||||
|
||||
|
|
@ -256,6 +264,7 @@ enum fuse_opcode {
|
|||
FUSE_IOCTL = 39,
|
||||
FUSE_POLL = 40,
|
||||
FUSE_NOTIFY_REPLY = 41,
|
||||
FUSE_BATCH_FORGET = 42,
|
||||
|
||||
/* CUSE specific operations */
|
||||
CUSE_INIT = 4096,
|
||||
|
|
@ -290,6 +299,16 @@ struct fuse_forget_in {
|
|||
__u64 nlookup;
|
||||
};
|
||||
|
||||
struct fuse_forget_one {
|
||||
__u64 nodeid;
|
||||
__u64 nlookup;
|
||||
};
|
||||
|
||||
struct fuse_batch_forget_in {
|
||||
__u32 count;
|
||||
__u32 dummy;
|
||||
};
|
||||
|
||||
struct fuse_getattr_in {
|
||||
__u32 getattr_flags;
|
||||
__u32 dummy;
|
||||
|
|
@ -510,6 +529,11 @@ struct fuse_ioctl_in {
|
|||
__u32 out_size;
|
||||
};
|
||||
|
||||
struct fuse_ioctl_iovec {
|
||||
__u64 base;
|
||||
__u64 len;
|
||||
};
|
||||
|
||||
struct fuse_ioctl_out {
|
||||
__s32 result;
|
||||
__u32 flags;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,6 @@ extern const struct xattr_handler generic_acl_default_handler;
|
|||
|
||||
int generic_acl_init(struct inode *, struct inode *);
|
||||
int generic_acl_chmod(struct inode *);
|
||||
int generic_check_acl(struct inode *inode, int mask);
|
||||
int generic_check_acl(struct inode *inode, int mask, unsigned int flags);
|
||||
|
||||
#endif /* LINUX_GENERIC_ACL_H */
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue