mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
Merge branch 'smp' into misc
Conflicts: arch/arm/kernel/entry-armv.S arch/arm/mm/ioremap.c
This commit is contained in:
commit
4ec3eb1363
1391 changed files with 25581 additions and 12331 deletions
37
include/linux/atomic.h
Normal file
37
include/linux/atomic.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#ifndef _LINUX_ATOMIC_H
|
||||
#define _LINUX_ATOMIC_H
|
||||
#include <asm/atomic.h>
|
||||
|
||||
/**
|
||||
* atomic_inc_not_zero_hint - increment if not null
|
||||
* @v: pointer of type atomic_t
|
||||
* @hint: probable value of the atomic before the increment
|
||||
*
|
||||
* This version of atomic_inc_not_zero() gives a hint of probable
|
||||
* value of the atomic. This helps processor to not read the memory
|
||||
* before doing the atomic read/modify/write cycle, lowering
|
||||
* number of bus transactions on some arches.
|
||||
*
|
||||
* Returns: 0 if increment was not done, 1 otherwise.
|
||||
*/
|
||||
#ifndef atomic_inc_not_zero_hint
|
||||
static inline int atomic_inc_not_zero_hint(atomic_t *v, int hint)
|
||||
{
|
||||
int val, c = hint;
|
||||
|
||||
/* sanity test, should be removed by compiler if hint is a constant */
|
||||
if (!hint)
|
||||
return atomic_inc_not_zero(v);
|
||||
|
||||
do {
|
||||
val = atomic_cmpxchg(v, c, c + 1);
|
||||
if (val == c)
|
||||
return 1;
|
||||
c = val;
|
||||
} while (c);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_ATOMIC_H */
|
||||
|
|
@ -29,6 +29,7 @@ struct linux_binprm{
|
|||
char buf[BINPRM_BUF_SIZE];
|
||||
#ifdef CONFIG_MMU
|
||||
struct vm_area_struct *vma;
|
||||
unsigned long vma_pages;
|
||||
#else
|
||||
# define MAX_ARG_PAGES 32
|
||||
struct page *page[MAX_ARG_PAGES];
|
||||
|
|
@ -59,6 +60,10 @@ struct linux_binprm{
|
|||
unsigned long loader, exec;
|
||||
};
|
||||
|
||||
extern void acct_arg_size(struct linux_binprm *bprm, unsigned long pages);
|
||||
extern struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
|
||||
int write);
|
||||
|
||||
#define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0
|
||||
#define BINPRM_FLAGS_ENFORCE_NONDUMP (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT)
|
||||
|
||||
|
|
|
|||
|
|
@ -66,10 +66,6 @@
|
|||
#define bio_offset(bio) bio_iovec((bio))->bv_offset
|
||||
#define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx)
|
||||
#define bio_sectors(bio) ((bio)->bi_size >> 9)
|
||||
#define bio_empty_barrier(bio) \
|
||||
((bio->bi_rw & REQ_HARDBARRIER) && \
|
||||
!bio_has_data(bio) && \
|
||||
!(bio->bi_rw & REQ_DISCARD))
|
||||
|
||||
static inline unsigned int bio_cur_bytes(struct bio *bio)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -122,7 +122,6 @@ enum rq_flag_bits {
|
|||
__REQ_FAILFAST_TRANSPORT, /* no driver retries of transport errors */
|
||||
__REQ_FAILFAST_DRIVER, /* no driver retries of driver errors */
|
||||
|
||||
__REQ_HARDBARRIER, /* may not be passed by drive either */
|
||||
__REQ_SYNC, /* request is sync (sync write or read) */
|
||||
__REQ_META, /* metadata io request */
|
||||
__REQ_DISCARD, /* request to discard sectors */
|
||||
|
|
@ -159,7 +158,6 @@ enum rq_flag_bits {
|
|||
#define REQ_FAILFAST_DEV (1 << __REQ_FAILFAST_DEV)
|
||||
#define REQ_FAILFAST_TRANSPORT (1 << __REQ_FAILFAST_TRANSPORT)
|
||||
#define REQ_FAILFAST_DRIVER (1 << __REQ_FAILFAST_DRIVER)
|
||||
#define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER)
|
||||
#define REQ_SYNC (1 << __REQ_SYNC)
|
||||
#define REQ_META (1 << __REQ_META)
|
||||
#define REQ_DISCARD (1 << __REQ_DISCARD)
|
||||
|
|
@ -168,8 +166,8 @@ enum rq_flag_bits {
|
|||
#define REQ_FAILFAST_MASK \
|
||||
(REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER)
|
||||
#define REQ_COMMON_MASK \
|
||||
(REQ_WRITE | REQ_FAILFAST_MASK | REQ_HARDBARRIER | REQ_SYNC | \
|
||||
REQ_META | REQ_DISCARD | REQ_NOIDLE | REQ_FLUSH | REQ_FUA)
|
||||
(REQ_WRITE | REQ_FAILFAST_MASK | REQ_SYNC | REQ_META | REQ_DISCARD | \
|
||||
REQ_NOIDLE | REQ_FLUSH | REQ_FUA)
|
||||
#define REQ_CLONE_MASK REQ_COMMON_MASK
|
||||
|
||||
#define REQ_UNPLUG (1 << __REQ_UNPLUG)
|
||||
|
|
|
|||
|
|
@ -552,8 +552,7 @@ static inline void blk_clear_queue_full(struct request_queue *q, int sync)
|
|||
* it already be started by driver.
|
||||
*/
|
||||
#define RQ_NOMERGE_FLAGS \
|
||||
(REQ_NOMERGE | REQ_STARTED | REQ_HARDBARRIER | REQ_SOFTBARRIER | \
|
||||
REQ_FLUSH | REQ_FUA)
|
||||
(REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA)
|
||||
#define rq_mergeable(rq) \
|
||||
(!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \
|
||||
(((rq)->cmd_flags & REQ_DISCARD) || \
|
||||
|
|
|
|||
|
|
@ -227,8 +227,7 @@ 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,
|
||||
loff_t off, size_t len);
|
||||
int num_pages);
|
||||
extern void ceph_put_page_vector(struct page **pages, int num_pages);
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ struct ceph_msg {
|
|||
struct ceph_buffer *middle;
|
||||
struct page **pages; /* data payload. NOT OWNER. */
|
||||
unsigned nr_pages; /* size of page array */
|
||||
unsigned page_alignment; /* io offset in first page */
|
||||
struct ceph_pagelist *pagelist; /* instead of pages */
|
||||
struct list_head list_head;
|
||||
struct kref kref;
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ struct ceph_osd_request {
|
|||
struct ceph_file_layout r_file_layout;
|
||||
struct ceph_snap_context *r_snapc; /* snap context for writes */
|
||||
unsigned r_num_pages; /* size of page array (follows) */
|
||||
unsigned r_page_alignment; /* io offset in first page */
|
||||
struct page **r_pages; /* pages for data payload */
|
||||
int r_pages_from_pool;
|
||||
int r_own_pages; /* if true, i own page list */
|
||||
|
|
@ -194,7 +195,8 @@ extern struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *,
|
|||
int do_sync, u32 truncate_seq,
|
||||
u64 truncate_size,
|
||||
struct timespec *mtime,
|
||||
bool use_mempool, int num_reply);
|
||||
bool use_mempool, int num_reply,
|
||||
int page_align);
|
||||
|
||||
static inline void ceph_osdc_get_request(struct ceph_osd_request *req)
|
||||
{
|
||||
|
|
@ -218,7 +220,8 @@ extern int ceph_osdc_readpages(struct ceph_osd_client *osdc,
|
|||
struct ceph_file_layout *layout,
|
||||
u64 off, u64 *plen,
|
||||
u32 truncate_seq, u64 truncate_size,
|
||||
struct page **pages, int nr_pages);
|
||||
struct page **pages, int nr_pages,
|
||||
int page_align);
|
||||
|
||||
extern int ceph_osdc_writepages(struct ceph_osd_client *osdc,
|
||||
struct ceph_vino vino,
|
||||
|
|
|
|||
|
|
@ -175,10 +175,21 @@ static inline int set_msi_sid(struct irte *irte, struct pci_dev *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#define enable_intr_remapping(mode) (-1)
|
||||
#define disable_intr_remapping() (0)
|
||||
#define reenable_intr_remapping(mode) (0)
|
||||
#define intr_remapping_enabled (0)
|
||||
|
||||
static inline int enable_intr_remapping(int eim)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline void disable_intr_remapping(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int reenable_intr_remapping(int eim)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Can't use the common MSI interrupt functions
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
|
||||
extern const char *drbd_buildtag(void);
|
||||
#define REL_VERSION "8.3.9rc2"
|
||||
#define REL_VERSION "8.3.9"
|
||||
#define API_VERSION 88
|
||||
#define PRO_VERSION_MIN 86
|
||||
#define PRO_VERSION_MAX 95
|
||||
|
|
|
|||
|
|
@ -1122,6 +1122,7 @@ extern const struct fb_videomode *fb_find_best_display(const struct fb_monspecs
|
|||
|
||||
/* drivers/video/fbcmap.c */
|
||||
extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp);
|
||||
extern int fb_alloc_cmap_gfp(struct fb_cmap *cmap, int len, int transp, gfp_t flags);
|
||||
extern void fb_dealloc_cmap(struct fb_cmap *cmap);
|
||||
extern int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to);
|
||||
extern int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to);
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@
|
|||
#define SEEK_MAX SEEK_END
|
||||
|
||||
struct fstrim_range {
|
||||
uint64_t start;
|
||||
uint64_t len;
|
||||
uint64_t minlen;
|
||||
__u64 start;
|
||||
__u64 len;
|
||||
__u64 minlen;
|
||||
};
|
||||
|
||||
/* And dynamically-tunable limits and defaults: */
|
||||
|
|
@ -1612,7 +1612,6 @@ struct super_operations {
|
|||
ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
|
||||
#endif
|
||||
int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
|
||||
int (*trim_fs) (struct super_block *, struct fstrim_range *);
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ struct aoi_display_offset {
|
|||
};
|
||||
|
||||
#define MFB_SET_CHROMA_KEY _IOW('M', 1, struct mfb_chroma_key)
|
||||
#define MFB_WAIT_FOR_VSYNC _IOW('F', 0x20, u_int32_t)
|
||||
#define MFB_SET_BRIGHTNESS _IOW('M', 3, __u8)
|
||||
|
||||
#define MFB_SET_ALPHA 0x80014d00
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@
|
|||
#define LINUX_HARDIRQ_H
|
||||
|
||||
#include <linux/preempt.h>
|
||||
#ifdef CONFIG_PREEMPT
|
||||
#include <linux/smp_lock.h>
|
||||
#endif
|
||||
#include <linux/lockdep.h>
|
||||
#include <linux/ftrace_irq.h>
|
||||
#include <asm/hardirq.h>
|
||||
|
|
@ -97,7 +94,8 @@
|
|||
#define in_nmi() (preempt_count() & NMI_MASK)
|
||||
|
||||
#if defined(CONFIG_PREEMPT) && defined(CONFIG_BKL)
|
||||
# define PREEMPT_INATOMIC_BASE kernel_locked()
|
||||
# include <linux/sched.h>
|
||||
# define PREEMPT_INATOMIC_BASE (current->lock_depth >= 0)
|
||||
#else
|
||||
# define PREEMPT_INATOMIC_BASE 0
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/hardirq.h>
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ enum bp_type_idx {
|
|||
|
||||
#ifdef CONFIG_HAVE_HW_BREAKPOINT
|
||||
|
||||
extern int __init init_hw_breakpoint(void);
|
||||
|
||||
static inline void hw_breakpoint_init(struct perf_event_attr *attr)
|
||||
{
|
||||
memset(attr, 0, sizeof(*attr));
|
||||
|
|
@ -108,6 +110,8 @@ static inline struct arch_hw_breakpoint *counter_arch_bp(struct perf_event *bp)
|
|||
|
||||
#else /* !CONFIG_HAVE_HW_BREAKPOINT */
|
||||
|
||||
static inline int __init init_hw_breakpoint(void) { return 0; }
|
||||
|
||||
static inline struct perf_event *
|
||||
register_user_hw_breakpoint(struct perf_event_attr *attr,
|
||||
perf_overflow_handler_t triggered,
|
||||
|
|
|
|||
|
|
@ -32,28 +32,6 @@
|
|||
*/
|
||||
|
||||
/* --- Bit algorithm adapters */
|
||||
#define I2C_HW_B_BT848 0x010005 /* BT848 video boards */
|
||||
#define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */
|
||||
#define I2C_HW_B_ZR36067 0x010019 /* Zoran-36057/36067 based boards */
|
||||
#define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */
|
||||
#define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */
|
||||
#define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */
|
||||
#define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */
|
||||
#define I2C_HW_B_AU0828 0x010023 /* auvitek au0828 usb bridge */
|
||||
#define I2C_HW_B_CX231XX 0x010024 /* Conexant CX231XX USB based cards */
|
||||
#define I2C_HW_B_HDPVR 0x010025 /* Hauppauge HD PVR */
|
||||
|
||||
/* --- SGI adapters */
|
||||
#define I2C_HW_SGI_VINO 0x160000
|
||||
|
||||
/* --- SMBus only adapters */
|
||||
#define I2C_HW_SMBUS_W9968CF 0x04000d
|
||||
#define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */
|
||||
#define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */
|
||||
#define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */
|
||||
|
||||
/* --- Miscellaneous adapters */
|
||||
#define I2C_HW_SAA7146 0x060000 /* SAA7146 video decoder bus */
|
||||
#define I2C_HW_SAA7134 0x090000 /* SAA7134 video decoder bus */
|
||||
|
||||
#endif /* LINUX_I2C_ID_H */
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ struct i2c_algorithm {
|
|||
*/
|
||||
struct i2c_adapter {
|
||||
struct module *owner;
|
||||
unsigned int id;
|
||||
unsigned int id __deprecated;
|
||||
unsigned int class; /* classes to allow probing for */
|
||||
const struct i2c_algorithm *algo; /* the algorithm to access the bus */
|
||||
void *algo_data;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Analog Devices ADP5588 I/O Expander and QWERTY Keypad Controller
|
||||
*
|
||||
* Copyright 2009 Analog Devices Inc.
|
||||
* Copyright 2009-2010 Analog Devices Inc.
|
||||
*
|
||||
* Licensed under the GPL-2 or later.
|
||||
*/
|
||||
|
|
@ -77,13 +77,26 @@
|
|||
/* Configuration Register1 */
|
||||
#define ADP5588_AUTO_INC (1 << 7)
|
||||
#define ADP5588_GPIEM_CFG (1 << 6)
|
||||
#define ADP5588_OVR_FLOW_M (1 << 5)
|
||||
#define ADP5588_INT_CFG (1 << 4)
|
||||
#define ADP5588_OVR_FLOW_IEN (1 << 3)
|
||||
#define ADP5588_K_LCK_IM (1 << 2)
|
||||
#define ADP5588_GPI_IEN (1 << 1)
|
||||
#define ADP5588_KE_IEN (1 << 0)
|
||||
|
||||
/* Interrupt Status Register */
|
||||
#define ADP5588_CMP2_INT (1 << 5)
|
||||
#define ADP5588_CMP1_INT (1 << 4)
|
||||
#define ADP5588_OVR_FLOW_INT (1 << 3)
|
||||
#define ADP5588_K_LCK_INT (1 << 2)
|
||||
#define ADP5588_GPI_INT (1 << 1)
|
||||
#define ADP5588_KE_INT (1 << 0)
|
||||
|
||||
/* Key Lock and Event Counter Register */
|
||||
#define ADP5588_K_LCK_EN (1 << 6)
|
||||
#define ADP5588_LCK21 0x30
|
||||
#define ADP5588_KEC 0xF
|
||||
|
||||
#define ADP5588_MAXGPIO 18
|
||||
#define ADP5588_BANK(offs) ((offs) >> 3)
|
||||
#define ADP5588_BIT(offs) (1u << ((offs) & 0x7))
|
||||
|
|
|
|||
|
|
@ -339,6 +339,31 @@ static inline int vlan_get_tag(const struct sk_buff *skb, u16 *vlan_tci)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* vlan_get_protocol - get protocol EtherType.
|
||||
* @skb: skbuff to query
|
||||
*
|
||||
* Returns the EtherType of the packet, regardless of whether it is
|
||||
* vlan encapsulated (normal or hardware accelerated) or not.
|
||||
*/
|
||||
static inline __be16 vlan_get_protocol(const struct sk_buff *skb)
|
||||
{
|
||||
__be16 protocol = 0;
|
||||
|
||||
if (vlan_tx_tag_present(skb) ||
|
||||
skb->protocol != cpu_to_be16(ETH_P_8021Q))
|
||||
protocol = skb->protocol;
|
||||
else {
|
||||
__be16 proto, *protop;
|
||||
protop = skb_header_pointer(skb, offsetof(struct vlan_ethhdr,
|
||||
h_vlan_encapsulated_proto),
|
||||
sizeof(proto), &proto);
|
||||
if (likely(protop))
|
||||
protocol = *protop;
|
||||
}
|
||||
|
||||
return protocol;
|
||||
}
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
/* VLAN IOCTLs are found in sockios.h */
|
||||
|
|
|
|||
|
|
@ -1406,6 +1406,8 @@ static inline void input_set_drvdata(struct input_dev *dev, void *data)
|
|||
int __must_check input_register_device(struct input_dev *);
|
||||
void input_unregister_device(struct input_dev *);
|
||||
|
||||
void input_reset_device(struct input_dev *);
|
||||
|
||||
int __must_check input_register_handler(struct input_handler *);
|
||||
void input_unregister_handler(struct input_handler *);
|
||||
|
||||
|
|
@ -1421,7 +1423,7 @@ void input_release_device(struct input_handle *);
|
|||
int input_open_device(struct input_handle *);
|
||||
void input_close_device(struct input_handle *);
|
||||
|
||||
int input_flush_device(struct input_handle* handle, struct file* file);
|
||||
int input_flush_device(struct input_handle *handle, struct file *file);
|
||||
|
||||
void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
|
||||
void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value);
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ int put_io_context(struct io_context *ioc);
|
|||
void exit_io_context(struct task_struct *task);
|
||||
struct io_context *get_io_context(gfp_t gfp_flags, int node);
|
||||
struct io_context *alloc_io_context(gfp_t gfp_flags, int node);
|
||||
void copy_io_context(struct io_context **pdst, struct io_context **psrc);
|
||||
#else
|
||||
static inline void exit_io_context(struct task_struct *task)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,13 +17,11 @@
|
|||
#include <linux/bitops.h>
|
||||
#include <linux/log2.h>
|
||||
#include <linux/typecheck.h>
|
||||
#include <linux/printk.h>
|
||||
#include <linux/dynamic_debug.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/bug.h>
|
||||
|
||||
extern const char linux_banner[];
|
||||
extern const char linux_proc_banner[];
|
||||
|
||||
#define USHRT_MAX ((u16)(~0U))
|
||||
#define SHRT_MAX ((s16)(USHRT_MAX>>1))
|
||||
#define SHRT_MIN ((s16)(-SHRT_MAX - 1))
|
||||
|
|
@ -60,7 +58,7 @@ extern const char linux_proc_banner[];
|
|||
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
|
||||
#define roundup(x, y) ( \
|
||||
{ \
|
||||
typeof(y) __y = y; \
|
||||
const typeof(y) __y = y; \
|
||||
(((x) + (__y - 1)) / __y) * __y; \
|
||||
} \
|
||||
)
|
||||
|
|
@ -110,31 +108,6 @@ extern const char linux_proc_banner[];
|
|||
*/
|
||||
#define lower_32_bits(n) ((u32)(n))
|
||||
|
||||
#define KERN_EMERG "<0>" /* system is unusable */
|
||||
#define KERN_ALERT "<1>" /* action must be taken immediately */
|
||||
#define KERN_CRIT "<2>" /* critical conditions */
|
||||
#define KERN_ERR "<3>" /* error conditions */
|
||||
#define KERN_WARNING "<4>" /* warning conditions */
|
||||
#define KERN_NOTICE "<5>" /* normal but significant condition */
|
||||
#define KERN_INFO "<6>" /* informational */
|
||||
#define KERN_DEBUG "<7>" /* debug-level messages */
|
||||
|
||||
/* Use the default kernel loglevel */
|
||||
#define KERN_DEFAULT "<d>"
|
||||
/*
|
||||
* Annotation for a "continued" line of log printout (only done after a
|
||||
* line that had no enclosing \n). Only to be used by core/arch code
|
||||
* during early bootup (a continued line is not SMP-safe otherwise).
|
||||
*/
|
||||
#define KERN_CONT "<c>"
|
||||
|
||||
extern int console_printk[];
|
||||
|
||||
#define console_loglevel (console_printk[0])
|
||||
#define default_message_loglevel (console_printk[1])
|
||||
#define minimum_console_loglevel (console_printk[2])
|
||||
#define default_console_loglevel (console_printk[3])
|
||||
|
||||
struct completion;
|
||||
struct pt_regs;
|
||||
struct user;
|
||||
|
|
@ -187,11 +160,6 @@ static inline void might_fault(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
struct va_format {
|
||||
const char *fmt;
|
||||
va_list *va;
|
||||
};
|
||||
|
||||
extern struct atomic_notifier_head panic_notifier_list;
|
||||
extern long (*panic_blink)(int state);
|
||||
NORET_TYPE void panic(const char * fmt, ...)
|
||||
|
|
@ -245,114 +213,8 @@ extern int func_ptr_is_kernel_text(void *ptr);
|
|||
struct pid;
|
||||
extern struct pid *session_of_pgrp(struct pid *pgrp);
|
||||
|
||||
/*
|
||||
* FW_BUG
|
||||
* Add this to a message where you are sure the firmware is buggy or behaves
|
||||
* really stupid or out of spec. Be aware that the responsible BIOS developer
|
||||
* should be able to fix this issue or at least get a concrete idea of the
|
||||
* problem by reading your message without the need of looking at the kernel
|
||||
* code.
|
||||
*
|
||||
* Use it for definite and high priority BIOS bugs.
|
||||
*
|
||||
* FW_WARN
|
||||
* Use it for not that clear (e.g. could the kernel messed up things already?)
|
||||
* and medium priority BIOS bugs.
|
||||
*
|
||||
* FW_INFO
|
||||
* Use this one if you want to tell the user or vendor about something
|
||||
* suspicious, but generally harmless related to the firmware.
|
||||
*
|
||||
* Use it for information or very low priority BIOS bugs.
|
||||
*/
|
||||
#define FW_BUG "[Firmware Bug]: "
|
||||
#define FW_WARN "[Firmware Warn]: "
|
||||
#define FW_INFO "[Firmware Info]: "
|
||||
|
||||
/*
|
||||
* HW_ERR
|
||||
* Add this to a message for hardware errors, so that user can report
|
||||
* it to hardware vendor instead of LKML or software vendor.
|
||||
*/
|
||||
#define HW_ERR "[Hardware Error]: "
|
||||
|
||||
#ifdef CONFIG_PRINTK
|
||||
asmlinkage int vprintk(const char *fmt, va_list args)
|
||||
__attribute__ ((format (printf, 1, 0)));
|
||||
asmlinkage int printk(const char * fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2))) __cold;
|
||||
|
||||
/*
|
||||
* Please don't use printk_ratelimit(), because it shares ratelimiting state
|
||||
* with all other unrelated printk_ratelimit() callsites. Instead use
|
||||
* printk_ratelimited() or plain old __ratelimit().
|
||||
*/
|
||||
extern int __printk_ratelimit(const char *func);
|
||||
#define printk_ratelimit() __printk_ratelimit(__func__)
|
||||
extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
|
||||
unsigned int interval_msec);
|
||||
|
||||
extern int printk_delay_msec;
|
||||
|
||||
/*
|
||||
* Print a one-time message (analogous to WARN_ONCE() et al):
|
||||
*/
|
||||
#define printk_once(x...) ({ \
|
||||
static bool __print_once; \
|
||||
\
|
||||
if (!__print_once) { \
|
||||
__print_once = true; \
|
||||
printk(x); \
|
||||
} \
|
||||
})
|
||||
|
||||
void log_buf_kexec_setup(void);
|
||||
#else
|
||||
static inline int vprintk(const char *s, va_list args)
|
||||
__attribute__ ((format (printf, 1, 0)));
|
||||
static inline int vprintk(const char *s, va_list args) { return 0; }
|
||||
static inline int printk(const char *s, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
static inline int __cold printk(const char *s, ...) { return 0; }
|
||||
static inline int printk_ratelimit(void) { return 0; }
|
||||
static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \
|
||||
unsigned int interval_msec) \
|
||||
{ return false; }
|
||||
|
||||
/* No effect, but we still get type checking even in the !PRINTK case: */
|
||||
#define printk_once(x...) printk(x)
|
||||
|
||||
static inline void log_buf_kexec_setup(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Dummy printk for disabled debugging statements to use whilst maintaining
|
||||
* gcc's format and side-effect checking.
|
||||
*/
|
||||
static inline __attribute__ ((format (printf, 1, 2)))
|
||||
int no_printk(const char *s, ...) { return 0; }
|
||||
|
||||
extern int printk_needs_cpu(int cpu);
|
||||
extern void printk_tick(void);
|
||||
|
||||
extern void asmlinkage __attribute__((format(printf, 1, 2)))
|
||||
early_printk(const char *fmt, ...);
|
||||
|
||||
unsigned long int_sqrt(unsigned long);
|
||||
|
||||
static inline void console_silent(void)
|
||||
{
|
||||
console_loglevel = 0;
|
||||
}
|
||||
|
||||
static inline void console_verbose(void)
|
||||
{
|
||||
if (console_loglevel)
|
||||
console_loglevel = 15;
|
||||
}
|
||||
|
||||
extern void bust_spinlocks(int yes);
|
||||
extern void wake_up_klogd(void);
|
||||
extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */
|
||||
|
|
@ -389,22 +251,6 @@ extern enum system_states {
|
|||
#define TAINT_CRAP 10
|
||||
#define TAINT_FIRMWARE_WORKAROUND 11
|
||||
|
||||
extern void dump_stack(void) __cold;
|
||||
|
||||
enum {
|
||||
DUMP_PREFIX_NONE,
|
||||
DUMP_PREFIX_ADDRESS,
|
||||
DUMP_PREFIX_OFFSET
|
||||
};
|
||||
extern void hex_dump_to_buffer(const void *buf, size_t len,
|
||||
int rowsize, int groupsize,
|
||||
char *linebuf, size_t linebuflen, bool ascii);
|
||||
extern void print_hex_dump(const char *level, const char *prefix_str,
|
||||
int prefix_type, int rowsize, int groupsize,
|
||||
const void *buf, size_t len, bool ascii);
|
||||
extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
|
||||
const void *buf, size_t len);
|
||||
|
||||
extern const char hex_asc[];
|
||||
#define hex_asc_lo(x) hex_asc[((x) & 0x0f)]
|
||||
#define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4]
|
||||
|
|
@ -418,94 +264,6 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
|
|||
|
||||
extern int hex_to_bin(char ch);
|
||||
|
||||
#ifndef pr_fmt
|
||||
#define pr_fmt(fmt) fmt
|
||||
#endif
|
||||
|
||||
#define pr_emerg(fmt, ...) \
|
||||
printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_alert(fmt, ...) \
|
||||
printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_crit(fmt, ...) \
|
||||
printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_err(fmt, ...) \
|
||||
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_warning(fmt, ...) \
|
||||
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_warn pr_warning
|
||||
#define pr_notice(fmt, ...) \
|
||||
printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_info(fmt, ...) \
|
||||
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_cont(fmt, ...) \
|
||||
printk(KERN_CONT fmt, ##__VA_ARGS__)
|
||||
|
||||
/* pr_devel() should produce zero code unless DEBUG is defined */
|
||||
#ifdef DEBUG
|
||||
#define pr_devel(fmt, ...) \
|
||||
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#else
|
||||
#define pr_devel(fmt, ...) \
|
||||
({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; })
|
||||
#endif
|
||||
|
||||
/* If you are writing a driver, please use dev_dbg instead */
|
||||
#if defined(DEBUG)
|
||||
#define pr_debug(fmt, ...) \
|
||||
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#elif defined(CONFIG_DYNAMIC_DEBUG)
|
||||
/* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */
|
||||
#define pr_debug(fmt, ...) \
|
||||
dynamic_pr_debug(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define pr_debug(fmt, ...) \
|
||||
({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; })
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ratelimited messages with local ratelimit_state,
|
||||
* no local ratelimit_state used in the !PRINTK case
|
||||
*/
|
||||
#ifdef CONFIG_PRINTK
|
||||
#define printk_ratelimited(fmt, ...) ({ \
|
||||
static DEFINE_RATELIMIT_STATE(_rs, \
|
||||
DEFAULT_RATELIMIT_INTERVAL, \
|
||||
DEFAULT_RATELIMIT_BURST); \
|
||||
\
|
||||
if (__ratelimit(&_rs)) \
|
||||
printk(fmt, ##__VA_ARGS__); \
|
||||
})
|
||||
#else
|
||||
/* No effect, but we still get type checking even in the !PRINTK case: */
|
||||
#define printk_ratelimited printk
|
||||
#endif
|
||||
|
||||
#define pr_emerg_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_alert_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_crit_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_err_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_warning_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_warn_ratelimited pr_warning_ratelimited
|
||||
#define pr_notice_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_info_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
|
||||
/* no pr_cont_ratelimited, don't do that... */
|
||||
/* If you are writing a driver, please use dev_dbg instead */
|
||||
#if defined(DEBUG)
|
||||
#define pr_debug_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#else
|
||||
#define pr_debug_ratelimited(fmt, ...) \
|
||||
({ if (0) printk_ratelimited(KERN_DEBUG pr_fmt(fmt), \
|
||||
##__VA_ARGS__); 0; })
|
||||
#endif
|
||||
|
||||
/*
|
||||
* General tracing related utility functions - trace_printk(),
|
||||
* tracing_on/tracing_off and tracing_start()/tracing_stop
|
||||
|
|
|
|||
47
include/linux/leds-lp5521.h
Normal file
47
include/linux/leds-lp5521.h
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* LP5521 LED chip driver.
|
||||
*
|
||||
* Copyright (C) 2010 Nokia Corporation
|
||||
*
|
||||
* Contact: Samu Onkalo <samu.p.onkalo@nokia.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_LP5521_H
|
||||
#define __LINUX_LP5521_H
|
||||
|
||||
/* See Documentation/leds/leds-lp5521.txt */
|
||||
|
||||
struct lp5521_led_config {
|
||||
u8 chan_nr;
|
||||
u8 led_current; /* mA x10, 0 if led is not connected */
|
||||
u8 max_current;
|
||||
};
|
||||
|
||||
#define LP5521_CLOCK_AUTO 0
|
||||
#define LP5521_CLOCK_INT 1
|
||||
#define LP5521_CLOCK_EXT 2
|
||||
|
||||
struct lp5521_platform_data {
|
||||
struct lp5521_led_config *led_config;
|
||||
u8 num_channels;
|
||||
u8 clock_mode;
|
||||
int (*setup_resources)(void);
|
||||
void (*release_resources)(void);
|
||||
void (*enable)(bool state);
|
||||
};
|
||||
|
||||
#endif /* __LINUX_LP5521_H */
|
||||
47
include/linux/leds-lp5523.h
Normal file
47
include/linux/leds-lp5523.h
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* LP5523 LED Driver
|
||||
*
|
||||
* Copyright (C) 2010 Nokia Corporation
|
||||
*
|
||||
* Contact: Samu Onkalo <samu.p.onkalo@nokia.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_LP5523_H
|
||||
#define __LINUX_LP5523_H
|
||||
|
||||
/* See Documentation/leds/leds-lp5523.txt */
|
||||
|
||||
struct lp5523_led_config {
|
||||
u8 chan_nr;
|
||||
u8 led_current; /* mA x10, 0 if led is not connected */
|
||||
u8 max_current;
|
||||
};
|
||||
|
||||
#define LP5523_CLOCK_AUTO 0
|
||||
#define LP5523_CLOCK_INT 1
|
||||
#define LP5523_CLOCK_EXT 2
|
||||
|
||||
struct lp5523_platform_data {
|
||||
struct lp5523_led_config *led_config;
|
||||
u8 num_channels;
|
||||
u8 clock_mode;
|
||||
int (*setup_resources)(void);
|
||||
void (*release_resources)(void);
|
||||
void (*enable)(bool state);
|
||||
};
|
||||
|
||||
#endif /* __LINUX_LP5523_H */
|
||||
|
|
@ -15,6 +15,7 @@
|
|||
#include <linux/list.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/rwsem.h>
|
||||
#include <linux/timer.h>
|
||||
|
||||
struct device;
|
||||
/*
|
||||
|
|
@ -45,10 +46,14 @@ struct led_classdev {
|
|||
/* Get LED brightness level */
|
||||
enum led_brightness (*brightness_get)(struct led_classdev *led_cdev);
|
||||
|
||||
/* Activate hardware accelerated blink, delays are in
|
||||
* miliseconds and if none is provided then a sensible default
|
||||
* should be chosen. The call can adjust the timings if it can't
|
||||
* match the values specified exactly. */
|
||||
/*
|
||||
* Activate hardware accelerated blink, delays are in milliseconds
|
||||
* and if both are zero then a sensible default should be chosen.
|
||||
* The call should adjust the timings in that case and if it can't
|
||||
* match the values specified exactly.
|
||||
* Deactivate blinking again when the brightness is set to a fixed
|
||||
* value via the brightness_set() callback.
|
||||
*/
|
||||
int (*blink_set)(struct led_classdev *led_cdev,
|
||||
unsigned long *delay_on,
|
||||
unsigned long *delay_off);
|
||||
|
|
@ -57,6 +62,10 @@ struct led_classdev {
|
|||
struct list_head node; /* LED Device list */
|
||||
const char *default_trigger; /* Trigger to use */
|
||||
|
||||
unsigned long blink_delay_on, blink_delay_off;
|
||||
struct timer_list blink_timer;
|
||||
int blink_brightness;
|
||||
|
||||
#ifdef CONFIG_LEDS_TRIGGERS
|
||||
/* Protects the trigger data below */
|
||||
struct rw_semaphore trigger_lock;
|
||||
|
|
@ -73,6 +82,36 @@ extern void led_classdev_unregister(struct led_classdev *led_cdev);
|
|||
extern void led_classdev_suspend(struct led_classdev *led_cdev);
|
||||
extern void led_classdev_resume(struct led_classdev *led_cdev);
|
||||
|
||||
/**
|
||||
* led_blink_set - set blinking with software fallback
|
||||
* @led_cdev: the LED to start blinking
|
||||
* @delay_on: the time it should be on (in ms)
|
||||
* @delay_off: the time it should ble off (in ms)
|
||||
*
|
||||
* This function makes the LED blink, attempting to use the
|
||||
* hardware acceleration if possible, but falling back to
|
||||
* software blinking if there is no hardware blinking or if
|
||||
* the LED refuses the passed values.
|
||||
*
|
||||
* Note that if software blinking is active, simply calling
|
||||
* led_cdev->brightness_set() will not stop the blinking,
|
||||
* use led_classdev_brightness_set() instead.
|
||||
*/
|
||||
extern void led_blink_set(struct led_classdev *led_cdev,
|
||||
unsigned long *delay_on,
|
||||
unsigned long *delay_off);
|
||||
/**
|
||||
* led_brightness_set - set LED brightness
|
||||
* @led_cdev: the LED to set
|
||||
* @brightness: the brightness to set it to
|
||||
*
|
||||
* Set an LED's brightness, and, if necessary, cancel the
|
||||
* software blink timer that implements blinking when the
|
||||
* hardware doesn't.
|
||||
*/
|
||||
extern void led_brightness_set(struct led_classdev *led_cdev,
|
||||
enum led_brightness brightness);
|
||||
|
||||
/*
|
||||
* LED Triggers
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -986,7 +986,7 @@ extern void ata_host_init(struct ata_host *, struct device *,
|
|||
unsigned long, struct ata_port_operations *);
|
||||
extern int ata_scsi_detect(struct scsi_host_template *sht);
|
||||
extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
|
||||
extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *));
|
||||
extern int ata_scsi_queuecmd(struct Scsi_Host *h, struct scsi_cmnd *cmd);
|
||||
extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev,
|
||||
int cmd, void __user *arg);
|
||||
extern void ata_sas_port_destroy(struct ata_port *);
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ struct nlm_host {
|
|||
struct sockaddr_storage h_addr; /* peer address */
|
||||
size_t h_addrlen;
|
||||
struct sockaddr_storage h_srcaddr; /* our address (optional) */
|
||||
size_t h_srcaddrlen;
|
||||
struct rpc_clnt *h_rpcclnt; /* RPC client to talk to peer */
|
||||
char *h_name; /* remote hostname */
|
||||
u32 h_version; /* interface version */
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#define MARVELL_PHY_ID_88E1118 0x01410e10
|
||||
#define MARVELL_PHY_ID_88E1121R 0x01410cb0
|
||||
#define MARVELL_PHY_ID_88E1145 0x01410cd0
|
||||
#define MARVELL_PHY_ID_88E1149R 0x01410e50
|
||||
#define MARVELL_PHY_ID_88E1240 0x01410e30
|
||||
#define MARVELL_PHY_ID_88E1318S 0x01410e90
|
||||
|
||||
|
|
|
|||
|
|
@ -522,9 +522,6 @@
|
|||
#define WM8350_MCLK_SEL_PLL_32K 3
|
||||
#define WM8350_MCLK_SEL_MCLK 5
|
||||
|
||||
#define WM8350_MCLK_DIR_OUT 0
|
||||
#define WM8350_MCLK_DIR_IN 1
|
||||
|
||||
/* clock divider id's */
|
||||
#define WM8350_ADC_CLKDIV 0
|
||||
#define WM8350_DAC_CLKDIV 1
|
||||
|
|
|
|||
|
|
@ -168,6 +168,7 @@ struct mmc_host {
|
|||
/* DDR mode at 1.8V */
|
||||
#define MMC_CAP_1_2V_DDR (1 << 12) /* can support */
|
||||
/* DDR mode at 1.2V */
|
||||
#define MMC_CAP_POWER_OFF_CARD (1 << 13) /* Can power off after boot */
|
||||
|
||||
mmc_pm_flag_t pm_caps; /* supported pm features */
|
||||
|
||||
|
|
|
|||
|
|
@ -59,19 +59,19 @@ struct sh_mmcif_plat_data {
|
|||
#define MMCIF_CE_HOST_STS2 0x0000004C
|
||||
#define MMCIF_CE_VERSION 0x0000007C
|
||||
|
||||
extern inline u32 sh_mmcif_readl(void __iomem *addr, int reg)
|
||||
static inline u32 sh_mmcif_readl(void __iomem *addr, int reg)
|
||||
{
|
||||
return readl(addr + reg);
|
||||
}
|
||||
|
||||
extern inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val)
|
||||
static inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val)
|
||||
{
|
||||
writel(val, addr + reg);
|
||||
}
|
||||
|
||||
#define SH_MMCIF_BBS 512 /* boot block size */
|
||||
|
||||
extern inline void sh_mmcif_boot_cmd_send(void __iomem *base,
|
||||
static inline void sh_mmcif_boot_cmd_send(void __iomem *base,
|
||||
unsigned long cmd, unsigned long arg)
|
||||
{
|
||||
sh_mmcif_writel(base, MMCIF_CE_INT, 0);
|
||||
|
|
@ -79,7 +79,7 @@ extern inline void sh_mmcif_boot_cmd_send(void __iomem *base,
|
|||
sh_mmcif_writel(base, MMCIF_CE_CMD_SET, cmd);
|
||||
}
|
||||
|
||||
extern inline int sh_mmcif_boot_cmd_poll(void __iomem *base, unsigned long mask)
|
||||
static inline int sh_mmcif_boot_cmd_poll(void __iomem *base, unsigned long mask)
|
||||
{
|
||||
unsigned long tmp;
|
||||
int cnt;
|
||||
|
|
@ -95,14 +95,14 @@ extern inline int sh_mmcif_boot_cmd_poll(void __iomem *base, unsigned long mask)
|
|||
return -1;
|
||||
}
|
||||
|
||||
extern inline int sh_mmcif_boot_cmd(void __iomem *base,
|
||||
static inline int sh_mmcif_boot_cmd(void __iomem *base,
|
||||
unsigned long cmd, unsigned long arg)
|
||||
{
|
||||
sh_mmcif_boot_cmd_send(base, cmd, arg);
|
||||
return sh_mmcif_boot_cmd_poll(base, 0x00010000);
|
||||
}
|
||||
|
||||
extern inline int sh_mmcif_boot_do_read_single(void __iomem *base,
|
||||
static inline int sh_mmcif_boot_do_read_single(void __iomem *base,
|
||||
unsigned int block_nr,
|
||||
unsigned long *buf)
|
||||
{
|
||||
|
|
@ -125,7 +125,7 @@ extern inline int sh_mmcif_boot_do_read_single(void __iomem *base,
|
|||
return 0;
|
||||
}
|
||||
|
||||
extern inline int sh_mmcif_boot_do_read(void __iomem *base,
|
||||
static inline int sh_mmcif_boot_do_read(void __iomem *base,
|
||||
unsigned long first_block,
|
||||
unsigned long nr_blocks,
|
||||
void *buf)
|
||||
|
|
@ -143,7 +143,7 @@ extern inline int sh_mmcif_boot_do_read(void __iomem *base,
|
|||
return ret;
|
||||
}
|
||||
|
||||
extern inline void sh_mmcif_boot_init(void __iomem *base)
|
||||
static inline void sh_mmcif_boot_init(void __iomem *base)
|
||||
{
|
||||
unsigned long tmp;
|
||||
|
||||
|
|
@ -177,7 +177,7 @@ extern inline void sh_mmcif_boot_init(void __iomem *base)
|
|||
sh_mmcif_boot_cmd(base, 0x03400040, 0x00010000);
|
||||
}
|
||||
|
||||
extern inline void sh_mmcif_boot_slurp(void __iomem *base,
|
||||
static inline void sh_mmcif_boot_slurp(void __iomem *base,
|
||||
unsigned char *buf,
|
||||
unsigned long no_bytes)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -517,7 +517,7 @@ static inline void __module_get(struct module *module)
|
|||
#define symbol_put_addr(p) do { } while(0)
|
||||
|
||||
#endif /* CONFIG_MODULE_UNLOAD */
|
||||
int use_module(struct module *a, struct module *b);
|
||||
int ref_module(struct module *a, struct module *b);
|
||||
|
||||
/* This is a #define so the string doesn't get put in every .o file */
|
||||
#define module_name(mod) \
|
||||
|
|
|
|||
|
|
@ -1554,6 +1554,11 @@ static inline void netif_tx_wake_all_queues(struct net_device *dev)
|
|||
|
||||
static inline void netif_tx_stop_queue(struct netdev_queue *dev_queue)
|
||||
{
|
||||
if (WARN_ON(!dev_queue)) {
|
||||
printk(KERN_INFO "netif_stop_queue() cannot be called before "
|
||||
"register_netdev()");
|
||||
return;
|
||||
}
|
||||
set_bit(__QUEUE_STATE_XOFF, &dev_queue->state);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ NF_HOOK_COND(uint8_t pf, unsigned int hook, struct sk_buff *skb,
|
|||
int ret;
|
||||
|
||||
if (!cond ||
|
||||
(ret = nf_hook_thresh(pf, hook, skb, in, out, okfn, INT_MIN) == 1))
|
||||
((ret = nf_hook_thresh(pf, hook, skb, in, out, okfn, INT_MIN)) == 1))
|
||||
ret = okfn(skb);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -593,12 +593,6 @@ nfs_fileid_to_ino_t(u64 fileid)
|
|||
return ino;
|
||||
}
|
||||
|
||||
#define nfs_wait_event(clnt, wq, condition) \
|
||||
({ \
|
||||
int __retval = wait_event_killable(wq, condition); \
|
||||
__retval; \
|
||||
})
|
||||
|
||||
#define NFS_JUKEBOX_RETRY_TIME (5 * HZ)
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
|
|
|||
|
|
@ -483,6 +483,7 @@ struct nfs_entry {
|
|||
int eof;
|
||||
struct nfs_fh * fh;
|
||||
struct nfs_fattr * fattr;
|
||||
unsigned char d_type;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -59,8 +59,6 @@ static inline void ClearPageCgroup##uname(struct page_cgroup *pc) \
|
|||
static inline int TestClearPageCgroup##uname(struct page_cgroup *pc) \
|
||||
{ return test_and_clear_bit(PCG_##lname, &pc->flags); }
|
||||
|
||||
TESTPCGFLAG(Locked, LOCK)
|
||||
|
||||
/* Cache flag is set only once (at allocation) */
|
||||
TESTPCGFLAG(Cache, CACHE)
|
||||
CLEARPCGFLAG(Cache, CACHE)
|
||||
|
|
@ -104,6 +102,11 @@ static inline void unlock_page_cgroup(struct page_cgroup *pc)
|
|||
bit_spin_unlock(PCG_LOCK, &pc->flags);
|
||||
}
|
||||
|
||||
static inline int page_is_cgroup_locked(struct page_cgroup *pc)
|
||||
{
|
||||
return bit_spin_is_locked(PCG_LOCK, &pc->flags);
|
||||
}
|
||||
|
||||
#else /* CONFIG_CGROUP_MEM_RES_CTLR */
|
||||
struct page_cgroup;
|
||||
|
||||
|
|
|
|||
|
|
@ -2047,6 +2047,7 @@
|
|||
#define PCI_DEVICE_ID_AFAVLAB_P030 0x2182
|
||||
#define PCI_SUBDEVICE_ID_AFAVLAB_P061 0x2150
|
||||
|
||||
#define PCI_VENDOR_ID_BCM_GVC 0x14a4
|
||||
#define PCI_VENDOR_ID_BROADCOM 0x14e4
|
||||
#define PCI_DEVICE_ID_TIGON3_5752 0x1600
|
||||
#define PCI_DEVICE_ID_TIGON3_5752M 0x1601
|
||||
|
|
@ -2441,6 +2442,7 @@
|
|||
#define PCI_DEVICE_ID_INTEL_MFD_SDIO2 0x0822
|
||||
#define PCI_DEVICE_ID_INTEL_MFD_EMMC0 0x0823
|
||||
#define PCI_DEVICE_ID_INTEL_MFD_EMMC1 0x0824
|
||||
#define PCI_DEVICE_ID_INTEL_MRST_SD2 0x084F
|
||||
#define PCI_DEVICE_ID_INTEL_I960 0x0960
|
||||
#define PCI_DEVICE_ID_INTEL_I960RM 0x0962
|
||||
#define PCI_DEVICE_ID_INTEL_8257X_SOL 0x1062
|
||||
|
|
|
|||
|
|
@ -747,6 +747,16 @@ struct perf_event {
|
|||
u64 tstamp_running;
|
||||
u64 tstamp_stopped;
|
||||
|
||||
/*
|
||||
* timestamp shadows the actual context timing but it can
|
||||
* be safely used in NMI interrupt context. It reflects the
|
||||
* context time as it was when the event was last scheduled in.
|
||||
*
|
||||
* ctx_time already accounts for ctx->timestamp. Therefore to
|
||||
* compute ctx_time for a sample, simply add perf_clock().
|
||||
*/
|
||||
u64 shadow_ctx_time;
|
||||
|
||||
struct perf_event_attr attr;
|
||||
struct hw_perf_event hw;
|
||||
|
||||
|
|
@ -840,6 +850,7 @@ struct perf_event_context {
|
|||
int nr_active;
|
||||
int is_active;
|
||||
int nr_stat;
|
||||
int rotate_disable;
|
||||
atomic_t refcount;
|
||||
struct task_struct *task;
|
||||
|
||||
|
|
@ -898,20 +909,6 @@ extern int perf_num_counters(void);
|
|||
extern const char *perf_pmu_name(void);
|
||||
extern void __perf_event_task_sched_in(struct task_struct *task);
|
||||
extern void __perf_event_task_sched_out(struct task_struct *task, struct task_struct *next);
|
||||
|
||||
extern atomic_t perf_task_events;
|
||||
|
||||
static inline void perf_event_task_sched_in(struct task_struct *task)
|
||||
{
|
||||
COND_STMT(&perf_task_events, __perf_event_task_sched_in(task));
|
||||
}
|
||||
|
||||
static inline
|
||||
void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next)
|
||||
{
|
||||
COND_STMT(&perf_task_events, __perf_event_task_sched_out(task, next));
|
||||
}
|
||||
|
||||
extern int perf_event_init_task(struct task_struct *child);
|
||||
extern void perf_event_exit_task(struct task_struct *child);
|
||||
extern void perf_event_free_task(struct task_struct *task);
|
||||
|
|
@ -1020,6 +1017,21 @@ have_event:
|
|||
__perf_sw_event(event_id, nr, nmi, regs, addr);
|
||||
}
|
||||
|
||||
extern atomic_t perf_task_events;
|
||||
|
||||
static inline void perf_event_task_sched_in(struct task_struct *task)
|
||||
{
|
||||
COND_STMT(&perf_task_events, __perf_event_task_sched_in(task));
|
||||
}
|
||||
|
||||
static inline
|
||||
void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next)
|
||||
{
|
||||
perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0);
|
||||
|
||||
COND_STMT(&perf_task_events, __perf_event_task_sched_out(task, next));
|
||||
}
|
||||
|
||||
extern void perf_event_mmap(struct vm_area_struct *vma);
|
||||
extern struct perf_guest_info_callbacks *perf_guest_cbs;
|
||||
extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks);
|
||||
|
|
|
|||
|
|
@ -160,5 +160,6 @@ void generic_pipe_buf_release(struct pipe_inode_info *, struct pipe_buffer *);
|
|||
|
||||
/* for F_SETPIPE_SZ and F_GETPIPE_SZ */
|
||||
long pipe_fcntl(struct file *, unsigned int, unsigned long arg);
|
||||
struct pipe_inode_info *get_pipe_info(struct file *file);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
248
include/linux/printk.h
Normal file
248
include/linux/printk.h
Normal file
|
|
@ -0,0 +1,248 @@
|
|||
#ifndef __KERNEL_PRINTK__
|
||||
#define __KERNEL_PRINTK__
|
||||
|
||||
extern const char linux_banner[];
|
||||
extern const char linux_proc_banner[];
|
||||
|
||||
#define KERN_EMERG "<0>" /* system is unusable */
|
||||
#define KERN_ALERT "<1>" /* action must be taken immediately */
|
||||
#define KERN_CRIT "<2>" /* critical conditions */
|
||||
#define KERN_ERR "<3>" /* error conditions */
|
||||
#define KERN_WARNING "<4>" /* warning conditions */
|
||||
#define KERN_NOTICE "<5>" /* normal but significant condition */
|
||||
#define KERN_INFO "<6>" /* informational */
|
||||
#define KERN_DEBUG "<7>" /* debug-level messages */
|
||||
|
||||
/* Use the default kernel loglevel */
|
||||
#define KERN_DEFAULT "<d>"
|
||||
/*
|
||||
* Annotation for a "continued" line of log printout (only done after a
|
||||
* line that had no enclosing \n). Only to be used by core/arch code
|
||||
* during early bootup (a continued line is not SMP-safe otherwise).
|
||||
*/
|
||||
#define KERN_CONT "<c>"
|
||||
|
||||
extern int console_printk[];
|
||||
|
||||
#define console_loglevel (console_printk[0])
|
||||
#define default_message_loglevel (console_printk[1])
|
||||
#define minimum_console_loglevel (console_printk[2])
|
||||
#define default_console_loglevel (console_printk[3])
|
||||
|
||||
struct va_format {
|
||||
const char *fmt;
|
||||
va_list *va;
|
||||
};
|
||||
|
||||
/*
|
||||
* FW_BUG
|
||||
* Add this to a message where you are sure the firmware is buggy or behaves
|
||||
* really stupid or out of spec. Be aware that the responsible BIOS developer
|
||||
* should be able to fix this issue or at least get a concrete idea of the
|
||||
* problem by reading your message without the need of looking at the kernel
|
||||
* code.
|
||||
*
|
||||
* Use it for definite and high priority BIOS bugs.
|
||||
*
|
||||
* FW_WARN
|
||||
* Use it for not that clear (e.g. could the kernel messed up things already?)
|
||||
* and medium priority BIOS bugs.
|
||||
*
|
||||
* FW_INFO
|
||||
* Use this one if you want to tell the user or vendor about something
|
||||
* suspicious, but generally harmless related to the firmware.
|
||||
*
|
||||
* Use it for information or very low priority BIOS bugs.
|
||||
*/
|
||||
#define FW_BUG "[Firmware Bug]: "
|
||||
#define FW_WARN "[Firmware Warn]: "
|
||||
#define FW_INFO "[Firmware Info]: "
|
||||
|
||||
/*
|
||||
* HW_ERR
|
||||
* Add this to a message for hardware errors, so that user can report
|
||||
* it to hardware vendor instead of LKML or software vendor.
|
||||
*/
|
||||
#define HW_ERR "[Hardware Error]: "
|
||||
|
||||
#ifdef CONFIG_PRINTK
|
||||
asmlinkage int vprintk(const char *fmt, va_list args)
|
||||
__attribute__ ((format (printf, 1, 0)));
|
||||
asmlinkage int printk(const char * fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2))) __cold;
|
||||
|
||||
/*
|
||||
* Please don't use printk_ratelimit(), because it shares ratelimiting state
|
||||
* with all other unrelated printk_ratelimit() callsites. Instead use
|
||||
* printk_ratelimited() or plain old __ratelimit().
|
||||
*/
|
||||
extern int __printk_ratelimit(const char *func);
|
||||
#define printk_ratelimit() __printk_ratelimit(__func__)
|
||||
extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
|
||||
unsigned int interval_msec);
|
||||
|
||||
extern int printk_delay_msec;
|
||||
extern int dmesg_restrict;
|
||||
|
||||
/*
|
||||
* Print a one-time message (analogous to WARN_ONCE() et al):
|
||||
*/
|
||||
#define printk_once(x...) ({ \
|
||||
static bool __print_once; \
|
||||
\
|
||||
if (!__print_once) { \
|
||||
__print_once = true; \
|
||||
printk(x); \
|
||||
} \
|
||||
})
|
||||
|
||||
void log_buf_kexec_setup(void);
|
||||
#else
|
||||
static inline int vprintk(const char *s, va_list args)
|
||||
__attribute__ ((format (printf, 1, 0)));
|
||||
static inline int vprintk(const char *s, va_list args) { return 0; }
|
||||
static inline int printk(const char *s, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
static inline int __cold printk(const char *s, ...) { return 0; }
|
||||
static inline int printk_ratelimit(void) { return 0; }
|
||||
static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \
|
||||
unsigned int interval_msec) \
|
||||
{ return false; }
|
||||
|
||||
/* No effect, but we still get type checking even in the !PRINTK case: */
|
||||
#define printk_once(x...) printk(x)
|
||||
|
||||
static inline void log_buf_kexec_setup(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Dummy printk for disabled debugging statements to use whilst maintaining
|
||||
* gcc's format and side-effect checking.
|
||||
*/
|
||||
static inline __attribute__ ((format (printf, 1, 2)))
|
||||
int no_printk(const char *s, ...) { return 0; }
|
||||
|
||||
extern int printk_needs_cpu(int cpu);
|
||||
extern void printk_tick(void);
|
||||
|
||||
extern void asmlinkage __attribute__((format(printf, 1, 2)))
|
||||
early_printk(const char *fmt, ...);
|
||||
|
||||
static inline void console_silent(void)
|
||||
{
|
||||
console_loglevel = 0;
|
||||
}
|
||||
|
||||
static inline void console_verbose(void)
|
||||
{
|
||||
if (console_loglevel)
|
||||
console_loglevel = 15;
|
||||
}
|
||||
|
||||
extern void dump_stack(void) __cold;
|
||||
|
||||
enum {
|
||||
DUMP_PREFIX_NONE,
|
||||
DUMP_PREFIX_ADDRESS,
|
||||
DUMP_PREFIX_OFFSET
|
||||
};
|
||||
extern void hex_dump_to_buffer(const void *buf, size_t len,
|
||||
int rowsize, int groupsize,
|
||||
char *linebuf, size_t linebuflen, bool ascii);
|
||||
extern void print_hex_dump(const char *level, const char *prefix_str,
|
||||
int prefix_type, int rowsize, int groupsize,
|
||||
const void *buf, size_t len, bool ascii);
|
||||
extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
|
||||
const void *buf, size_t len);
|
||||
|
||||
#ifndef pr_fmt
|
||||
#define pr_fmt(fmt) fmt
|
||||
#endif
|
||||
|
||||
#define pr_emerg(fmt, ...) \
|
||||
printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_alert(fmt, ...) \
|
||||
printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_crit(fmt, ...) \
|
||||
printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_err(fmt, ...) \
|
||||
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_warning(fmt, ...) \
|
||||
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_warn pr_warning
|
||||
#define pr_notice(fmt, ...) \
|
||||
printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_info(fmt, ...) \
|
||||
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_cont(fmt, ...) \
|
||||
printk(KERN_CONT fmt, ##__VA_ARGS__)
|
||||
|
||||
/* pr_devel() should produce zero code unless DEBUG is defined */
|
||||
#ifdef DEBUG
|
||||
#define pr_devel(fmt, ...) \
|
||||
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#else
|
||||
#define pr_devel(fmt, ...) \
|
||||
({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; })
|
||||
#endif
|
||||
|
||||
/* If you are writing a driver, please use dev_dbg instead */
|
||||
#if defined(DEBUG)
|
||||
#define pr_debug(fmt, ...) \
|
||||
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#elif defined(CONFIG_DYNAMIC_DEBUG)
|
||||
/* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */
|
||||
#define pr_debug(fmt, ...) \
|
||||
dynamic_pr_debug(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define pr_debug(fmt, ...) \
|
||||
({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; })
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ratelimited messages with local ratelimit_state,
|
||||
* no local ratelimit_state used in the !PRINTK case
|
||||
*/
|
||||
#ifdef CONFIG_PRINTK
|
||||
#define printk_ratelimited(fmt, ...) ({ \
|
||||
static DEFINE_RATELIMIT_STATE(_rs, \
|
||||
DEFAULT_RATELIMIT_INTERVAL, \
|
||||
DEFAULT_RATELIMIT_BURST); \
|
||||
\
|
||||
if (__ratelimit(&_rs)) \
|
||||
printk(fmt, ##__VA_ARGS__); \
|
||||
})
|
||||
#else
|
||||
/* No effect, but we still get type checking even in the !PRINTK case: */
|
||||
#define printk_ratelimited printk
|
||||
#endif
|
||||
|
||||
#define pr_emerg_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_alert_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_crit_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_err_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_warning_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_warn_ratelimited pr_warning_ratelimited
|
||||
#define pr_notice_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#define pr_info_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
|
||||
/* no pr_cont_ratelimited, don't do that... */
|
||||
/* If you are writing a driver, please use dev_dbg instead */
|
||||
#if defined(DEBUG)
|
||||
#define pr_debug_ratelimited(fmt, ...) \
|
||||
printk_ratelimited(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#else
|
||||
#define pr_debug_ratelimited(fmt, ...) \
|
||||
({ if (0) printk_ratelimited(KERN_DEBUG pr_fmt(fmt), \
|
||||
##__VA_ARGS__); 0; })
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -8,6 +8,7 @@ struct platform_pwm_backlight_data {
|
|||
int pwm_id;
|
||||
unsigned int max_brightness;
|
||||
unsigned int dft_brightness;
|
||||
unsigned int lth_brightness;
|
||||
unsigned int pwm_period_ns;
|
||||
int (*init)(struct device *dev);
|
||||
int (*notify)(struct device *dev, int brightness);
|
||||
|
|
|
|||
|
|
@ -34,19 +34,13 @@
|
|||
* needed for RCU lookups (because root->height is unreliable). The only
|
||||
* time callers need worry about this is when doing a lookup_slot under
|
||||
* RCU.
|
||||
*
|
||||
* Indirect pointer in fact is also used to tag the last pointer of a node
|
||||
* when it is shrunk, before we rcu free the node. See shrink code for
|
||||
* details.
|
||||
*/
|
||||
#define RADIX_TREE_INDIRECT_PTR 1
|
||||
#define RADIX_TREE_RETRY ((void *)-1UL)
|
||||
|
||||
static inline void *radix_tree_ptr_to_indirect(void *ptr)
|
||||
{
|
||||
return (void *)((unsigned long)ptr | RADIX_TREE_INDIRECT_PTR);
|
||||
}
|
||||
|
||||
static inline void *radix_tree_indirect_to_ptr(void *ptr)
|
||||
{
|
||||
return (void *)((unsigned long)ptr & ~RADIX_TREE_INDIRECT_PTR);
|
||||
}
|
||||
#define radix_tree_indirect_to_ptr(ptr) \
|
||||
radix_tree_indirect_to_ptr((void __force *)(ptr))
|
||||
|
||||
|
|
@ -140,16 +134,29 @@ do { \
|
|||
* removed.
|
||||
*
|
||||
* For use with radix_tree_lookup_slot(). Caller must hold tree at least read
|
||||
* locked across slot lookup and dereference. More likely, will be used with
|
||||
* radix_tree_replace_slot(), as well, so caller will hold tree write locked.
|
||||
* locked across slot lookup and dereference. Not required if write lock is
|
||||
* held (ie. items cannot be concurrently inserted).
|
||||
*
|
||||
* radix_tree_deref_retry must be used to confirm validity of the pointer if
|
||||
* only the read lock is held.
|
||||
*/
|
||||
static inline void *radix_tree_deref_slot(void **pslot)
|
||||
{
|
||||
void *ret = rcu_dereference(*pslot);
|
||||
if (unlikely(radix_tree_is_indirect_ptr(ret)))
|
||||
ret = RADIX_TREE_RETRY;
|
||||
return ret;
|
||||
return rcu_dereference(*pslot);
|
||||
}
|
||||
|
||||
/**
|
||||
* radix_tree_deref_retry - check radix_tree_deref_slot
|
||||
* @arg: pointer returned by radix_tree_deref_slot
|
||||
* Returns: 0 if retry is not required, otherwise retry is required
|
||||
*
|
||||
* radix_tree_deref_retry must be used with radix_tree_deref_slot.
|
||||
*/
|
||||
static inline int radix_tree_deref_retry(void *arg)
|
||||
{
|
||||
return unlikely((unsigned long)arg & RADIX_TREE_INDIRECT_PTR);
|
||||
}
|
||||
|
||||
/**
|
||||
* radix_tree_replace_slot - replace item in a slot
|
||||
* @pslot: pointer to slot, returned by radix_tree_lookup_slot
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
#include <asm/unaligned.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/reiserfs_fs_i.h>
|
||||
#include <linux/reiserfs_fs_sb.h>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#define _LINUX_RESOURCE_H
|
||||
|
||||
#include <linux/time.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* Resource control/accounting header file for linux
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
#include <linux/if_link.h>
|
||||
#include <linux/if_addr.h>
|
||||
#include <linux/neighbour.h>
|
||||
#include <linux/netdevice.h>
|
||||
|
||||
/* rtnetlink families. Values up to 127 are reserved for real address
|
||||
* families, values above 128 may be used arbitrarily.
|
||||
|
|
@ -606,6 +605,7 @@ struct tcamsg {
|
|||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/netdevice.h>
|
||||
|
||||
static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -862,6 +862,7 @@ struct sched_group {
|
|||
* single CPU.
|
||||
*/
|
||||
unsigned int cpu_power, cpu_power_orig;
|
||||
unsigned int group_weight;
|
||||
|
||||
/*
|
||||
* The CPUs this group covers.
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@ extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3,
|
|||
extern int cap_task_setscheduler(struct task_struct *p);
|
||||
extern int cap_task_setioprio(struct task_struct *p, int ioprio);
|
||||
extern int cap_task_setnice(struct task_struct *p, int nice);
|
||||
extern int cap_syslog(int type, bool from_file);
|
||||
extern int cap_vm_enough_memory(struct mm_struct *mm, long pages);
|
||||
|
||||
struct msghdr;
|
||||
|
|
@ -1388,7 +1387,7 @@ struct security_operations {
|
|||
int (*sysctl) (struct ctl_table *table, int op);
|
||||
int (*quotactl) (int cmds, int type, int id, struct super_block *sb);
|
||||
int (*quota_on) (struct dentry *dentry);
|
||||
int (*syslog) (int type, bool from_file);
|
||||
int (*syslog) (int type);
|
||||
int (*settime) (struct timespec *ts, struct timezone *tz);
|
||||
int (*vm_enough_memory) (struct mm_struct *mm, long pages);
|
||||
|
||||
|
|
@ -1671,7 +1670,7 @@ int security_real_capable_noaudit(struct task_struct *tsk, int cap);
|
|||
int security_sysctl(struct ctl_table *table, int op);
|
||||
int security_quotactl(int cmds, int type, int id, struct super_block *sb);
|
||||
int security_quota_on(struct dentry *dentry);
|
||||
int security_syslog(int type, bool from_file);
|
||||
int security_syslog(int type);
|
||||
int security_settime(struct timespec *ts, struct timezone *tz);
|
||||
int security_vm_enough_memory(long pages);
|
||||
int security_vm_enough_memory_mm(struct mm_struct *mm, long pages);
|
||||
|
|
@ -1901,9 +1900,9 @@ static inline int security_quota_on(struct dentry *dentry)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int security_syslog(int type, bool from_file)
|
||||
static inline int security_syslog(int type)
|
||||
{
|
||||
return cap_syslog(type, from_file);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int security_settime(struct timespec *ts, struct timezone *tz)
|
||||
|
|
|
|||
|
|
@ -19,11 +19,13 @@ struct clk_mapping {
|
|||
};
|
||||
|
||||
struct clk_ops {
|
||||
#ifdef CONFIG_SH_CLK_CPG_LEGACY
|
||||
void (*init)(struct clk *clk);
|
||||
#endif
|
||||
int (*enable)(struct clk *clk);
|
||||
void (*disable)(struct clk *clk);
|
||||
unsigned long (*recalc)(struct clk *clk);
|
||||
int (*set_rate)(struct clk *clk, unsigned long rate, int algo_id);
|
||||
int (*set_rate)(struct clk *clk, unsigned long rate);
|
||||
int (*set_parent)(struct clk *clk, struct clk *parent);
|
||||
long (*round_rate)(struct clk *clk, unsigned long rate);
|
||||
};
|
||||
|
|
@ -67,36 +69,6 @@ int clk_register(struct clk *);
|
|||
void clk_unregister(struct clk *);
|
||||
void clk_enable_init_clocks(void);
|
||||
|
||||
/**
|
||||
* clk_set_rate_ex - set the clock rate for a clock source, with additional parameter
|
||||
* @clk: clock source
|
||||
* @rate: desired clock rate in Hz
|
||||
* @algo_id: algorithm id to be passed down to ops->set_rate
|
||||
*
|
||||
* Returns success (0) or negative errno.
|
||||
*/
|
||||
int clk_set_rate_ex(struct clk *clk, unsigned long rate, int algo_id);
|
||||
|
||||
enum clk_sh_algo_id {
|
||||
NO_CHANGE = 0,
|
||||
|
||||
IUS_N1_N1,
|
||||
IUS_322,
|
||||
IUS_522,
|
||||
IUS_N11,
|
||||
|
||||
SB_N1,
|
||||
|
||||
SB3_N1,
|
||||
SB3_32,
|
||||
SB3_43,
|
||||
SB3_54,
|
||||
|
||||
BP_N1,
|
||||
|
||||
IP_N1,
|
||||
};
|
||||
|
||||
struct clk_div_mult_table {
|
||||
unsigned int *divisors;
|
||||
unsigned int nr_divisors;
|
||||
|
|
@ -122,6 +94,10 @@ int clk_rate_table_find(struct clk *clk,
|
|||
long clk_rate_div_range_round(struct clk *clk, unsigned int div_min,
|
||||
unsigned int div_max, unsigned long rate);
|
||||
|
||||
long clk_round_parent(struct clk *clk, unsigned long target,
|
||||
unsigned long *best_freq, unsigned long *parent_freq,
|
||||
unsigned int div_min, unsigned int div_max);
|
||||
|
||||
#define SH_CLK_MSTP32(_parent, _enable_reg, _enable_bit, _flags) \
|
||||
{ \
|
||||
.parent = _parent, \
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ struct intc_hw_desc {
|
|||
unsigned int nr_subgroups;
|
||||
};
|
||||
|
||||
#define _INTC_ARRAY(a) a, a == NULL ? 0 : sizeof(a)/sizeof(*a)
|
||||
#define _INTC_ARRAY(a) a, __same_type(a, NULL) ? 0 : sizeof(a)/sizeof(*a)
|
||||
|
||||
#define INTC_HW_DESC(vectors, groups, mask_regs, \
|
||||
prio_regs, sense_regs, ack_regs) \
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ struct sh_timer_config {
|
|||
char *name;
|
||||
long channel_offset;
|
||||
int timer_bit;
|
||||
char *clk;
|
||||
unsigned long clockevent_rating;
|
||||
unsigned long clocksource_rating;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
#ifdef CONFIG_LOCK_KERNEL
|
||||
#include <linux/sched.h>
|
||||
|
||||
#define kernel_locked() (current->lock_depth >= 0)
|
||||
|
||||
extern int __lockfunc __reacquire_kernel_lock(void);
|
||||
extern void __lockfunc __release_kernel_lock(void);
|
||||
|
||||
|
|
@ -58,7 +56,6 @@ static inline void cycle_kernel_lock(void)
|
|||
#define lock_kernel()
|
||||
#define unlock_kernel()
|
||||
#define cycle_kernel_lock() do { } while(0)
|
||||
#define kernel_locked() 1
|
||||
#endif /* CONFIG_BKL */
|
||||
|
||||
#define release_kernel_lock(task) do { } while(0)
|
||||
|
|
|
|||
|
|
@ -82,13 +82,6 @@ struct svc_xprt {
|
|||
struct net *xpt_net;
|
||||
};
|
||||
|
||||
static inline void register_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u)
|
||||
{
|
||||
spin_lock(&xpt->xpt_lock);
|
||||
list_add(&u->list, &xpt->xpt_users);
|
||||
spin_unlock(&xpt->xpt_lock);
|
||||
}
|
||||
|
||||
static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u)
|
||||
{
|
||||
spin_lock(&xpt->xpt_lock);
|
||||
|
|
@ -96,6 +89,23 @@ static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user
|
|||
spin_unlock(&xpt->xpt_lock);
|
||||
}
|
||||
|
||||
static inline int register_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u)
|
||||
{
|
||||
spin_lock(&xpt->xpt_lock);
|
||||
if (test_bit(XPT_CLOSE, &xpt->xpt_flags)) {
|
||||
/*
|
||||
* The connection is about to be deleted soon (or,
|
||||
* worse, may already be deleted--in which case we've
|
||||
* already notified the xpt_users).
|
||||
*/
|
||||
spin_unlock(&xpt->xpt_lock);
|
||||
return -ENOTCONN;
|
||||
}
|
||||
list_add(&u->list, &xpt->xpt_users);
|
||||
spin_unlock(&xpt->xpt_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int svc_reg_xprt_class(struct svc_xprt_class *);
|
||||
void svc_unreg_xprt_class(struct svc_xprt_class *);
|
||||
void svc_xprt_init(struct svc_xprt_class *, struct svc_xprt *,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include <linux/tty_driver.h>
|
||||
#include <linux/tty_ldisc.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/smp_lock.h>
|
||||
|
||||
#include <asm/system.h>
|
||||
|
||||
|
|
@ -50,7 +49,7 @@
|
|||
#define N_V253 19 /* Codec control over voice modem */
|
||||
#define N_CAIF 20 /* CAIF protocol for talking to modems */
|
||||
#define N_GSM0710 21 /* GSM 0710 Mux */
|
||||
#define N_TI_WL 22 /* for TI's WL BT, FM, GPS combo chips */
|
||||
#define N_TI_WL 22 /* for TI's WL BT, FM, GPS combo chips */
|
||||
|
||||
/*
|
||||
* This character is the same as _POSIX_VDISABLE: it cannot be used as
|
||||
|
|
|
|||
|
|
@ -797,7 +797,7 @@ struct usbdrv_wrap {
|
|||
* @disconnect: Called when the interface is no longer accessible, usually
|
||||
* because its device has been (or is being) disconnected or the
|
||||
* driver module is being unloaded.
|
||||
* @ioctl: Used for drivers that want to talk to userspace through
|
||||
* @unlocked_ioctl: Used for drivers that want to talk to userspace through
|
||||
* the "usbfs" filesystem. This lets devices provide ways to
|
||||
* expose information to user space regardless of where they
|
||||
* do (or don't) show up otherwise in the filesystem.
|
||||
|
|
|
|||
|
|
@ -89,6 +89,8 @@ struct musb_hdrc_config {
|
|||
/* A GPIO controlling VRSEL in Blackfin */
|
||||
unsigned int gpio_vrsel;
|
||||
unsigned int gpio_vrsel_active;
|
||||
/* musb CLKIN in Blackfin in MHZ */
|
||||
unsigned char clkin;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue