Merge branch 'next-samsung-asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into for-2.6.38
This commit is contained in:
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 */
|
||||
@@ -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) || \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -96,11 +96,15 @@
|
||||
*/
|
||||
#define in_nmi() (preempt_count() & NMI_MASK)
|
||||
|
||||
#if defined(CONFIG_PREEMPT)
|
||||
#if defined(CONFIG_PREEMPT) && defined(CONFIG_BKL)
|
||||
# define PREEMPT_INATOMIC_BASE kernel_locked()
|
||||
# define PREEMPT_CHECK_OFFSET 1
|
||||
#else
|
||||
# define PREEMPT_INATOMIC_BASE 0
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_PREEMPT)
|
||||
# define PREEMPT_CHECK_OFFSET 1
|
||||
#else
|
||||
# define PREEMPT_CHECK_OFFSET 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>
|
||||
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
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
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define _LINUX_RESOURCE_H
|
||||
|
||||
#include <linux/time.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* Resource control/accounting header file for linux
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -122,6 +122,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;
|
||||
};
|
||||
|
||||
@@ -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 *,
|
||||
|
||||
@@ -50,7 +50,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
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user