mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
Bump version to 3.4.113
This commit is contained in:
@@ -198,9 +198,29 @@ typedef int INT32;
|
||||
typedef s32 acpi_native_int;
|
||||
|
||||
typedef u32 acpi_size;
|
||||
|
||||
#ifdef ACPI_32BIT_PHYSICAL_ADDRESS
|
||||
|
||||
/*
|
||||
* OSPMs can define this to shrink the size of the structures for 32-bit
|
||||
* none PAE environment. ASL compiler may always define this to generate
|
||||
* 32-bit OSPM compliant tables.
|
||||
*/
|
||||
typedef u32 acpi_io_address;
|
||||
typedef u32 acpi_physical_address;
|
||||
|
||||
#else /* ACPI_32BIT_PHYSICAL_ADDRESS */
|
||||
|
||||
/*
|
||||
* It is reported that, after some calculations, the physical addresses can
|
||||
* wrap over the 32-bit boundary on 32-bit PAE environment.
|
||||
* https://bugzilla.kernel.org/show_bug.cgi?id=87971
|
||||
*/
|
||||
typedef u64 acpi_io_address;
|
||||
typedef u64 acpi_physical_address;
|
||||
|
||||
#endif /* ACPI_32BIT_PHYSICAL_ADDRESS */
|
||||
|
||||
#define ACPI_MAX_PTR ACPI_UINT32_MAX
|
||||
#define ACPI_SIZE_MAX ACPI_UINT32_MAX
|
||||
|
||||
@@ -475,6 +495,7 @@ typedef u64 acpi_integer;
|
||||
#define ACPI_NO_ACPI_ENABLE 0x10
|
||||
#define ACPI_NO_DEVICE_INIT 0x20
|
||||
#define ACPI_NO_OBJECT_INIT 0x40
|
||||
#define ACPI_NO_FACS_INIT 0x80
|
||||
|
||||
/*
|
||||
* Initialization state
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
#define ACPI_CONSTANT_EVAL_ONLY
|
||||
#define ACPI_LARGE_NAMESPACE_NODE
|
||||
#define ACPI_DATA_TABLE_DISASSEMBLY
|
||||
#define ACPI_32BIT_PHYSICAL_ADDRESS
|
||||
#endif
|
||||
|
||||
#ifdef ACPI_EXEC_APP
|
||||
|
||||
@@ -7,6 +7,16 @@
|
||||
#include <linux/mm_types.h>
|
||||
#include <linux/bug.h>
|
||||
|
||||
/*
|
||||
* On almost all architectures and configurations, 0 can be used as the
|
||||
* upper ceiling to free_pgtables(): on many architectures it has the same
|
||||
* effect as using TASK_SIZE. However, there is one configuration which
|
||||
* must impose a more careful limit, to avoid freeing kernel pgtables.
|
||||
*/
|
||||
#ifndef USER_PGTABLES_CEILING
|
||||
#define USER_PGTABLES_CEILING 0UL
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
|
||||
extern int ptep_set_access_flags(struct vm_area_struct *vma,
|
||||
unsigned long address, pte_t *ptep,
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
static __inline__ void *drm_calloc_large(size_t nmemb, size_t size)
|
||||
{
|
||||
if (size != 0 && nmemb > ULONG_MAX / size)
|
||||
if (size != 0 && nmemb > SIZE_MAX / size)
|
||||
return NULL;
|
||||
|
||||
if (size * nmemb <= PAGE_SIZE)
|
||||
@@ -44,7 +44,7 @@ static __inline__ void *drm_calloc_large(size_t nmemb, size_t size)
|
||||
/* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */
|
||||
static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size)
|
||||
{
|
||||
if (size != 0 && nmemb > ULONG_MAX / size)
|
||||
if (size != 0 && nmemb > SIZE_MAX / size)
|
||||
return NULL;
|
||||
|
||||
if (size * nmemb <= PAGE_SIZE)
|
||||
|
||||
@@ -223,6 +223,8 @@ struct drm_mode_get_connector {
|
||||
__u32 connection;
|
||||
__u32 mm_width, mm_height; /**< HxW in millimeters */
|
||||
__u32 subpixel;
|
||||
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
#define DRM_MODE_PROP_PENDING (1<<0)
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
{0x1002, 0x4C64, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \
|
||||
{0x1002, 0x4C66, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \
|
||||
{0x1002, 0x4C67, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \
|
||||
{0x1002, 0x4C6E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280|RADEON_IS_MOBILITY}, \
|
||||
{0x1002, 0x4E44, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \
|
||||
{0x1002, 0x4E45, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \
|
||||
{0x1002, 0x4E46, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \
|
||||
@@ -231,6 +230,7 @@
|
||||
{0x1002, 0x6819, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6821, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6822, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6823, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6824, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
@@ -238,11 +238,13 @@
|
||||
{0x1002, 0x6827, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6829, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x682A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x682B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x682D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x682F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6830, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6831, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6835, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6837, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6838, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6839, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \
|
||||
@@ -541,7 +543,7 @@
|
||||
{0x1002, 0x9645, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO2|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
{0x1002, 0x9647, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP},\
|
||||
{0x1002, 0x9648, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP},\
|
||||
{0x1002, 0x9649, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP},\
|
||||
{0x1002, 0x9649, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO2|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP},\
|
||||
{0x1002, 0x964a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
{0x1002, 0x964b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
{0x1002, 0x964c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
@@ -594,6 +596,8 @@
|
||||
{0x1002, 0x9999, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
{0x1002, 0x999A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
{0x1002, 0x999B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
{0x1002, 0x999C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
{0x1002, 0x999D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
{0x1002, 0x99A0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
{0x1002, 0x99A2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
{0x1002, 0x99A4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
|
||||
|
||||
@@ -110,6 +110,12 @@ int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base);
|
||||
void acpi_irq_stats_init(void);
|
||||
extern u32 acpi_irq_handled;
|
||||
extern u32 acpi_irq_not_handled;
|
||||
extern unsigned int acpi_sci_irq;
|
||||
#define INVALID_ACPI_IRQ ((unsigned)-1)
|
||||
static inline bool acpi_sci_irq_valid(void)
|
||||
{
|
||||
return acpi_sci_irq != INVALID_ACPI_IRQ;
|
||||
}
|
||||
|
||||
extern int sbf_port;
|
||||
extern unsigned long acpi_realmode_flags;
|
||||
|
||||
@@ -937,7 +937,7 @@ static inline int atapi_cdb_len(const u16 *dev_id)
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool atapi_command_packet_set(const u16 *dev_id)
|
||||
static inline int atapi_command_packet_set(const u16 *dev_id)
|
||||
{
|
||||
return (dev_id[ATA_ID_CONFIG] >> 8) & 0x1f;
|
||||
}
|
||||
|
||||
@@ -480,14 +480,14 @@ static inline void audit_syscall_entry(int arch, int major, unsigned long a0,
|
||||
unsigned long a1, unsigned long a2,
|
||||
unsigned long a3)
|
||||
{
|
||||
if (unlikely(!audit_dummy_context()))
|
||||
if (unlikely(current->audit_context))
|
||||
__audit_syscall_entry(arch, major, a0, a1, a2, a3);
|
||||
}
|
||||
static inline void audit_syscall_exit(void *pt_regs)
|
||||
{
|
||||
if (unlikely(current->audit_context)) {
|
||||
int success = is_syscall_success(pt_regs);
|
||||
int return_code = regs_return_value(pt_regs);
|
||||
long return_code = regs_return_value(pt_regs);
|
||||
|
||||
__audit_syscall_exit(success, return_code);
|
||||
}
|
||||
|
||||
@@ -113,9 +113,6 @@ extern void setup_new_exec(struct linux_binprm * bprm);
|
||||
extern void would_dump(struct linux_binprm *, struct file *);
|
||||
|
||||
extern int suid_dumpable;
|
||||
#define SUID_DUMP_DISABLE 0 /* No setuid dumping */
|
||||
#define SUID_DUMP_USER 1 /* Dump as user of process */
|
||||
#define SUID_DUMP_ROOT 2 /* Dump as root */
|
||||
|
||||
/* Stack area protections */
|
||||
#define EXSTACK_DEFAULT 0 /* Whatever the arch defaults to */
|
||||
|
||||
@@ -185,6 +185,21 @@ static inline unsigned long __ffs64(u64 word)
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#ifndef set_mask_bits
|
||||
#define set_mask_bits(ptr, _mask, _bits) \
|
||||
({ \
|
||||
const typeof(*ptr) mask = (_mask), bits = (_bits); \
|
||||
typeof(*ptr) old, new; \
|
||||
\
|
||||
do { \
|
||||
old = ACCESS_ONCE(*ptr); \
|
||||
new = (old & ~mask) | bits; \
|
||||
} while (cmpxchg(ptr, old, new) != old); \
|
||||
\
|
||||
new; \
|
||||
})
|
||||
#endif
|
||||
|
||||
#ifndef find_last_bit
|
||||
/**
|
||||
* find_last_bit - find the last set bit in a memory region
|
||||
|
||||
@@ -144,7 +144,9 @@ enum rq_flag_bits {
|
||||
__REQ_ELVPRIV, /* elevator private data attached */
|
||||
__REQ_FAILED, /* set if the request failed */
|
||||
__REQ_QUIET, /* don't worry about errors */
|
||||
__REQ_PREEMPT, /* set for "ide_preempt" requests */
|
||||
__REQ_PREEMPT, /* set for "ide_preempt" requests and also
|
||||
for requests for which the SCSI "quiesce"
|
||||
state must be ignored. */
|
||||
__REQ_ALLOCED, /* request came from our alloc pool */
|
||||
__REQ_COPY_USER, /* contains copies of user pages */
|
||||
__REQ_FLUSH_SEQ, /* request for flush sequence */
|
||||
|
||||
@@ -1069,10 +1069,9 @@ static inline int queue_alignment_offset(struct request_queue *q)
|
||||
static inline int queue_limit_alignment_offset(struct queue_limits *lim, sector_t sector)
|
||||
{
|
||||
unsigned int granularity = max(lim->physical_block_size, lim->io_min);
|
||||
unsigned int alignment = (sector << 9) & (granularity - 1);
|
||||
unsigned int alignment = sector_div(sector, granularity >> 9) << 9;
|
||||
|
||||
return (granularity + lim->alignment_offset - alignment)
|
||||
& (granularity - 1);
|
||||
return (granularity + lim->alignment_offset - alignment) % granularity;
|
||||
}
|
||||
|
||||
static inline int bdev_alignment_offset(struct block_device *bdev)
|
||||
|
||||
@@ -166,12 +166,13 @@ void __wait_on_buffer(struct buffer_head *);
|
||||
wait_queue_head_t *bh_waitq_head(struct buffer_head *bh);
|
||||
struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block,
|
||||
unsigned size);
|
||||
struct buffer_head *__getblk(struct block_device *bdev, sector_t block,
|
||||
unsigned size);
|
||||
struct buffer_head *__getblk_gfp(struct block_device *bdev, sector_t block,
|
||||
unsigned size, gfp_t gfp);
|
||||
void __brelse(struct buffer_head *);
|
||||
void __bforget(struct buffer_head *);
|
||||
void __breadahead(struct block_device *, sector_t block, unsigned int size);
|
||||
struct buffer_head *__bread(struct block_device *, sector_t block, unsigned size);
|
||||
struct buffer_head *__bread_gfp(struct block_device *,
|
||||
sector_t block, unsigned size, gfp_t gfp);
|
||||
void invalidate_bh_lrus(void);
|
||||
struct buffer_head *alloc_buffer_head(gfp_t gfp_flags);
|
||||
void free_buffer_head(struct buffer_head * bh);
|
||||
@@ -286,7 +287,13 @@ static inline void bforget(struct buffer_head *bh)
|
||||
static inline struct buffer_head *
|
||||
sb_bread(struct super_block *sb, sector_t block)
|
||||
{
|
||||
return __bread(sb->s_bdev, block, sb->s_blocksize);
|
||||
return __bread_gfp(sb->s_bdev, block, sb->s_blocksize, __GFP_MOVABLE);
|
||||
}
|
||||
|
||||
static inline struct buffer_head *
|
||||
sb_bread_unmovable(struct super_block *sb, sector_t block)
|
||||
{
|
||||
return __bread_gfp(sb->s_bdev, block, sb->s_blocksize, 0);
|
||||
}
|
||||
|
||||
static inline void
|
||||
@@ -298,7 +305,14 @@ sb_breadahead(struct super_block *sb, sector_t block)
|
||||
static inline struct buffer_head *
|
||||
sb_getblk(struct super_block *sb, sector_t block)
|
||||
{
|
||||
return __getblk(sb->s_bdev, block, sb->s_blocksize);
|
||||
return __getblk_gfp(sb->s_bdev, block, sb->s_blocksize, __GFP_MOVABLE);
|
||||
}
|
||||
|
||||
|
||||
static inline struct buffer_head *
|
||||
sb_getblk_gfp(struct super_block *sb, sector_t block, gfp_t gfp)
|
||||
{
|
||||
return __getblk_gfp(sb->s_bdev, block, sb->s_blocksize, gfp);
|
||||
}
|
||||
|
||||
static inline struct buffer_head *
|
||||
@@ -335,6 +349,36 @@ static inline void lock_buffer(struct buffer_head *bh)
|
||||
__lock_buffer(bh);
|
||||
}
|
||||
|
||||
static inline struct buffer_head *getblk_unmovable(struct block_device *bdev,
|
||||
sector_t block,
|
||||
unsigned size)
|
||||
{
|
||||
return __getblk_gfp(bdev, block, size, 0);
|
||||
}
|
||||
|
||||
static inline struct buffer_head *__getblk(struct block_device *bdev,
|
||||
sector_t block,
|
||||
unsigned size)
|
||||
{
|
||||
return __getblk_gfp(bdev, block, size, __GFP_MOVABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* __bread() - reads a specified block and returns the bh
|
||||
* @bdev: the block_device to read from
|
||||
* @block: number of block
|
||||
* @size: size (in bytes) to read
|
||||
*
|
||||
* Reads a specified block, and returns buffer head that contains it.
|
||||
* The page cache is allocated from movable area so that it can be migrated.
|
||||
* It returns NULL if the block was unreadable.
|
||||
*/
|
||||
static inline struct buffer_head *
|
||||
__bread(struct block_device *bdev, sector_t block, unsigned size)
|
||||
{
|
||||
return __bread_gfp(bdev, block, size, __GFP_MOVABLE);
|
||||
}
|
||||
|
||||
extern int __set_page_dirty_buffers(struct page *page);
|
||||
|
||||
#else /* CONFIG_BLOCK */
|
||||
|
||||
@@ -52,6 +52,9 @@ struct ceph_auth_client_ops {
|
||||
*/
|
||||
int (*create_authorizer)(struct ceph_auth_client *ac, int peer_type,
|
||||
struct ceph_auth_handshake *auth);
|
||||
/* ensure that an existing authorizer is up to date */
|
||||
int (*update_authorizer)(struct ceph_auth_client *ac, int peer_type,
|
||||
struct ceph_auth_handshake *auth);
|
||||
int (*verify_authorizer_reply)(struct ceph_auth_client *ac,
|
||||
struct ceph_authorizer *a, size_t len);
|
||||
void (*destroy_authorizer)(struct ceph_auth_client *ac,
|
||||
@@ -75,6 +78,8 @@ struct ceph_auth_client {
|
||||
u64 global_id; /* our unique id in system */
|
||||
const struct ceph_crypto_key *key; /* our secret key */
|
||||
unsigned want_keys; /* which services we want */
|
||||
|
||||
struct mutex mutex;
|
||||
};
|
||||
|
||||
extern struct ceph_auth_client *ceph_auth_init(const char *name,
|
||||
@@ -94,5 +99,18 @@ extern int ceph_build_auth(struct ceph_auth_client *ac,
|
||||
void *msg_buf, size_t msg_len);
|
||||
|
||||
extern int ceph_auth_is_authenticated(struct ceph_auth_client *ac);
|
||||
extern int ceph_auth_create_authorizer(struct ceph_auth_client *ac,
|
||||
int peer_type,
|
||||
struct ceph_auth_handshake *auth);
|
||||
extern void ceph_auth_destroy_authorizer(struct ceph_auth_client *ac,
|
||||
struct ceph_authorizer *a);
|
||||
extern int ceph_auth_update_authorizer(struct ceph_auth_client *ac,
|
||||
int peer_type,
|
||||
struct ceph_auth_handshake *a);
|
||||
extern int ceph_auth_verify_authorizer_reply(struct ceph_auth_client *ac,
|
||||
struct ceph_authorizer *a,
|
||||
size_t len);
|
||||
extern void ceph_auth_invalidate_authorizer(struct ceph_auth_client *ac,
|
||||
int peer_type);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,7 +32,6 @@ extern int cgroup_lock_is_held(void);
|
||||
extern bool cgroup_lock_live_group(struct cgroup *cgrp);
|
||||
extern void cgroup_unlock(void);
|
||||
extern void cgroup_fork(struct task_struct *p);
|
||||
extern void cgroup_fork_callbacks(struct task_struct *p);
|
||||
extern void cgroup_post_fork(struct task_struct *p);
|
||||
extern void cgroup_exit(struct task_struct *p, int run_callbacks);
|
||||
extern int cgroupstats_build(struct cgroupstats *stats,
|
||||
@@ -508,16 +507,54 @@ static inline struct cgroup_subsys_state *cgroup_subsys_state(
|
||||
return cgrp->subsys[subsys_id];
|
||||
}
|
||||
|
||||
/*
|
||||
* function to get the cgroup_subsys_state which allows for extra
|
||||
* rcu_dereference_check() conditions, such as locks used during the
|
||||
* cgroup_subsys::attach() methods.
|
||||
/**
|
||||
* task_css_set_check - obtain a task's css_set with extra access conditions
|
||||
* @task: the task to obtain css_set for
|
||||
* @__c: extra condition expression to be passed to rcu_dereference_check()
|
||||
*
|
||||
* A task's css_set is RCU protected, initialized and exited while holding
|
||||
* task_lock(), and can only be modified while holding both cgroup_mutex
|
||||
* and task_lock() while the task is alive. This macro verifies that the
|
||||
* caller is inside proper critical section and returns @task's css_set.
|
||||
*
|
||||
* The caller can also specify additional allowed conditions via @__c, such
|
||||
* as locks used during the cgroup_subsys::attach() methods.
|
||||
*/
|
||||
#define task_css_set_check(task, __c) \
|
||||
rcu_dereference_check((task)->cgroups, \
|
||||
lockdep_is_held(&(task)->alloc_lock) || \
|
||||
cgroup_lock_is_held() || (__c))
|
||||
|
||||
/**
|
||||
* task_subsys_state_check - obtain css for (task, subsys) w/ extra access conds
|
||||
* @task: the target task
|
||||
* @subsys_id: the target subsystem ID
|
||||
* @__c: extra condition expression to be passed to rcu_dereference_check()
|
||||
*
|
||||
* Return the cgroup_subsys_state for the (@task, @subsys_id) pair. The
|
||||
* synchronization rules are the same as task_css_set_check().
|
||||
*/
|
||||
#define task_subsys_state_check(task, subsys_id, __c) \
|
||||
rcu_dereference_check(task->cgroups->subsys[subsys_id], \
|
||||
lockdep_is_held(&task->alloc_lock) || \
|
||||
cgroup_lock_is_held() || (__c))
|
||||
task_css_set_check((task), (__c))->subsys[(subsys_id)]
|
||||
|
||||
/**
|
||||
* task_css_set - obtain a task's css_set
|
||||
* @task: the task to obtain css_set for
|
||||
*
|
||||
* See task_css_set_check().
|
||||
*/
|
||||
static inline struct css_set *task_css_set(struct task_struct *task)
|
||||
{
|
||||
return task_css_set_check(task, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* task_subsys_state - obtain css for (task, subsys)
|
||||
* @task: the target task
|
||||
* @subsys_id: the target subsystem ID
|
||||
*
|
||||
* See task_subsys_state_check().
|
||||
*/
|
||||
static inline struct cgroup_subsys_state *
|
||||
task_subsys_state(struct task_struct *task, int subsys_id)
|
||||
{
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
/*
|
||||
* Common definitions for all gcc versions go here.
|
||||
*/
|
||||
#define GCC_VERSION (__GNUC__ * 10000 \
|
||||
+ __GNUC_MINOR__ * 100 \
|
||||
+ __GNUC_PATCHLEVEL__)
|
||||
|
||||
|
||||
/* Optimization barrier */
|
||||
@@ -34,6 +37,9 @@
|
||||
__asm__ ("" : "=r"(__ptr) : "0"(ptr)); \
|
||||
(typeof(ptr)) (__ptr + (off)); })
|
||||
|
||||
/* Make the optimizer believe the variable can be manipulated arbitrarily. */
|
||||
#define OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "=r" (var) : "0" (var))
|
||||
|
||||
#ifdef __CHECKER__
|
||||
#define __must_be_array(arr) 0
|
||||
#else
|
||||
|
||||
@@ -31,6 +31,22 @@
|
||||
|
||||
#define __linktime_error(message) __attribute__((__error__(message)))
|
||||
|
||||
/*
|
||||
* GCC 'asm goto' miscompiles certain code sequences:
|
||||
*
|
||||
* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
|
||||
*
|
||||
* Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
|
||||
* Fixed in GCC 4.8.2 and later versions.
|
||||
*
|
||||
* (asm goto is automatically volatile - the naming reflects this.)
|
||||
*/
|
||||
#if GCC_VERSION <= 40801
|
||||
# define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
|
||||
#else
|
||||
# define asm_volatile_goto(x...) do { asm goto(x); } while (0)
|
||||
#endif
|
||||
|
||||
#if __GNUC_MINOR__ >= 5
|
||||
/*
|
||||
* Mark a position in code as unreachable. This can be used to
|
||||
|
||||
66
include/linux/compiler-gcc5.h
Normal file
66
include/linux/compiler-gcc5.h
Normal file
@@ -0,0 +1,66 @@
|
||||
#ifndef __LINUX_COMPILER_H
|
||||
#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead."
|
||||
#endif
|
||||
|
||||
#define __used __attribute__((__used__))
|
||||
#define __must_check __attribute__((warn_unused_result))
|
||||
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
|
||||
|
||||
/* Mark functions as cold. gcc will assume any path leading to a call
|
||||
to them will be unlikely. This means a lot of manual unlikely()s
|
||||
are unnecessary now for any paths leading to the usual suspects
|
||||
like BUG(), printk(), panic() etc. [but let's keep them for now for
|
||||
older compilers]
|
||||
|
||||
Early snapshots of gcc 4.3 don't support this and we can't detect this
|
||||
in the preprocessor, but we can live with this because they're unreleased.
|
||||
Maketime probing would be overkill here.
|
||||
|
||||
gcc also has a __attribute__((__hot__)) to move hot functions into
|
||||
a special section, but I don't see any sense in this right now in
|
||||
the kernel context */
|
||||
#define __cold __attribute__((__cold__))
|
||||
|
||||
#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
|
||||
|
||||
#ifndef __CHECKER__
|
||||
# define __compiletime_warning(message) __attribute__((warning(message)))
|
||||
# define __compiletime_error(message) __attribute__((error(message)))
|
||||
#endif /* __CHECKER__ */
|
||||
|
||||
/*
|
||||
* Mark a position in code as unreachable. This can be used to
|
||||
* suppress control flow warnings after asm blocks that transfer
|
||||
* control elsewhere.
|
||||
*
|
||||
* Early snapshots of gcc 4.5 don't support this and we can't detect
|
||||
* this in the preprocessor, but we can live with this because they're
|
||||
* unreleased. Really, we need to have autoconf for the kernel.
|
||||
*/
|
||||
#define unreachable() __builtin_unreachable()
|
||||
|
||||
/* Mark a function definition as prohibited from being cloned. */
|
||||
#define __noclone __attribute__((__noclone__))
|
||||
|
||||
/*
|
||||
* Tell the optimizer that something else uses this function or variable.
|
||||
*/
|
||||
#define __visible __attribute__((externally_visible))
|
||||
|
||||
/*
|
||||
* GCC 'asm goto' miscompiles certain code sequences:
|
||||
*
|
||||
* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
|
||||
*
|
||||
* Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
|
||||
* Fixed in GCC 4.8.2 and later versions.
|
||||
*
|
||||
* (asm goto is automatically volatile - the naming reflects this.)
|
||||
*/
|
||||
#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
|
||||
|
||||
#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
|
||||
#define __HAVE_BUILTIN_BSWAP32__
|
||||
#define __HAVE_BUILTIN_BSWAP64__
|
||||
#define __HAVE_BUILTIN_BSWAP16__
|
||||
#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
#undef barrier
|
||||
#undef RELOC_HIDE
|
||||
#undef OPTIMIZER_HIDE_VAR
|
||||
|
||||
#define barrier() __memory_barrier()
|
||||
|
||||
@@ -23,9 +24,13 @@
|
||||
__ptr = (unsigned long) (ptr); \
|
||||
(typeof(ptr)) (__ptr + (off)); })
|
||||
|
||||
/* This should act as an optimization barrier on var.
|
||||
* Given that this compiler does not have inline assembly, a compiler barrier
|
||||
* is the best we can do.
|
||||
*/
|
||||
#define OPTIMIZER_HIDE_VAR(var) barrier()
|
||||
|
||||
/* Intel ECC compiler doesn't support __builtin_types_compatible_p() */
|
||||
#define __must_be_array(a) 0
|
||||
|
||||
#endif
|
||||
|
||||
#define uninitialized_var(x) x
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user