Merge branch 'upstream'
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
#define _LINUX_ACCT_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
#include <asm/param.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
|
||||
+10
-3
@@ -124,7 +124,7 @@ struct kiocb {
|
||||
(x)->ki_users = 1; \
|
||||
(x)->ki_key = KIOCB_SYNC_KEY; \
|
||||
(x)->ki_filp = (filp); \
|
||||
(x)->ki_ctx = &tsk->active_mm->default_kioctx; \
|
||||
(x)->ki_ctx = NULL; \
|
||||
(x)->ki_cancel = NULL; \
|
||||
(x)->ki_dtor = NULL; \
|
||||
(x)->ki_obj.tsk = tsk; \
|
||||
@@ -210,8 +210,15 @@ struct kioctx *lookup_ioctx(unsigned long ctx_id);
|
||||
int FASTCALL(io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
|
||||
struct iocb *iocb));
|
||||
|
||||
#define get_ioctx(kioctx) do { if (unlikely(atomic_read(&(kioctx)->users) <= 0)) BUG(); atomic_inc(&(kioctx)->users); } while (0)
|
||||
#define put_ioctx(kioctx) do { if (unlikely(atomic_dec_and_test(&(kioctx)->users))) __put_ioctx(kioctx); else if (unlikely(atomic_read(&(kioctx)->users) < 0)) BUG(); } while (0)
|
||||
#define get_ioctx(kioctx) do { \
|
||||
BUG_ON(unlikely(atomic_read(&(kioctx)->users) <= 0)); \
|
||||
atomic_inc(&(kioctx)->users); \
|
||||
} while (0)
|
||||
#define put_ioctx(kioctx) do { \
|
||||
BUG_ON(unlikely(atomic_read(&(kioctx)->users) <= 0)); \
|
||||
if (unlikely(atomic_dec_and_test(&(kioctx)->users))) \
|
||||
__put_ioctx(kioctx); \
|
||||
} while (0)
|
||||
|
||||
#define in_aio() !is_sync_wait(current->io_wait)
|
||||
/* may be used for debugging */
|
||||
|
||||
@@ -84,6 +84,16 @@ static __inline__ int get_bitmask_order(unsigned int count)
|
||||
return order; /* We could be slightly more clever with -1 here... */
|
||||
}
|
||||
|
||||
static __inline__ int get_count_order(unsigned int count)
|
||||
{
|
||||
int order;
|
||||
|
||||
order = fls(count) - 1;
|
||||
if (count & (count - 1))
|
||||
order++;
|
||||
return order;
|
||||
}
|
||||
|
||||
/*
|
||||
* hweightN: returns the hamming weight (i.e. the number
|
||||
* of bits set) of a N-bit word
|
||||
|
||||
@@ -406,6 +406,7 @@ struct request_queue
|
||||
|
||||
atomic_t refcnt;
|
||||
|
||||
unsigned int nr_sorted;
|
||||
unsigned int in_flight;
|
||||
|
||||
/*
|
||||
@@ -631,6 +632,7 @@ static inline void elv_dispatch_add_tail(struct request_queue *q,
|
||||
{
|
||||
if (q->last_merge == rq)
|
||||
q->last_merge = NULL;
|
||||
q->nr_sorted--;
|
||||
|
||||
q->end_sector = rq_end_sector(rq);
|
||||
q->boundary_rq = rq;
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
#ifndef _CM4000_H_
|
||||
#define _CM4000_H_
|
||||
|
||||
#define MAX_ATR 33
|
||||
|
||||
#define CM4000_MAX_DEV 4
|
||||
|
||||
/* those two structures are passed via ioctl() from/to userspace. They are
|
||||
* used by existing userspace programs, so I kepth the awkward "bIFSD" naming
|
||||
* not to break compilation of userspace apps. -HW */
|
||||
|
||||
typedef struct atreq {
|
||||
int32_t atr_len;
|
||||
unsigned char atr[64];
|
||||
int32_t power_act;
|
||||
unsigned char bIFSD;
|
||||
unsigned char bIFSC;
|
||||
} atreq_t;
|
||||
|
||||
|
||||
/* what is particularly stupid in the original driver is the arch-dependant
|
||||
* member sizes. This leads to CONFIG_COMPAT breakage, since 32bit userspace
|
||||
* will lay out the structure members differently than the 64bit kernel.
|
||||
*
|
||||
* I've changed "ptsreq.protocol" from "unsigned long" to "u_int32_t".
|
||||
* On 32bit this will make no difference. With 64bit kernels, it will make
|
||||
* 32bit apps work, too.
|
||||
*/
|
||||
|
||||
typedef struct ptsreq {
|
||||
u_int32_t protocol; /*T=0: 2^0, T=1: 2^1*/
|
||||
unsigned char flags;
|
||||
unsigned char pts1;
|
||||
unsigned char pts2;
|
||||
unsigned char pts3;
|
||||
} ptsreq_t;
|
||||
|
||||
#define CM_IOC_MAGIC 'c'
|
||||
#define CM_IOC_MAXNR 255
|
||||
|
||||
#define CM_IOCGSTATUS _IOR (CM_IOC_MAGIC, 0, unsigned char *)
|
||||
#define CM_IOCGATR _IOWR(CM_IOC_MAGIC, 1, atreq_t *)
|
||||
#define CM_IOCSPTS _IOW (CM_IOC_MAGIC, 2, ptsreq_t *)
|
||||
#define CM_IOCSRDR _IO (CM_IOC_MAGIC, 3)
|
||||
#define CM_IOCARDOFF _IO (CM_IOC_MAGIC, 4)
|
||||
|
||||
#define CM_IOSDBGLVL _IOW(CM_IOC_MAGIC, 250, int*)
|
||||
|
||||
/* card and device states */
|
||||
#define CM_CARD_INSERTED 0x01
|
||||
#define CM_CARD_POWERED 0x02
|
||||
#define CM_ATR_PRESENT 0x04
|
||||
#define CM_ATR_VALID 0x08
|
||||
#define CM_STATE_VALID 0x0f
|
||||
/* extra info only from CM4000 */
|
||||
#define CM_NO_READER 0x10
|
||||
#define CM_BAD_CARD 0x20
|
||||
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define DEVICE_NAME "cmm"
|
||||
#define MODULE_NAME "cm4000_cs"
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _CM4000_H_ */
|
||||
@@ -259,6 +259,14 @@ COMPATIBLE_IOCTL(RTC_RD_TIME)
|
||||
COMPATIBLE_IOCTL(RTC_SET_TIME)
|
||||
COMPATIBLE_IOCTL(RTC_WKALM_SET)
|
||||
COMPATIBLE_IOCTL(RTC_WKALM_RD)
|
||||
/*
|
||||
* These two are only for the sbus rtc driver, but
|
||||
* hwclock tries them on every rtc device first when
|
||||
* running on sparc. On other architectures the entries
|
||||
* are useless but harmless.
|
||||
*/
|
||||
COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */
|
||||
COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */
|
||||
/* Little m */
|
||||
COMPATIBLE_IOCTL(MTIOCTOP)
|
||||
/* Socket level stuff */
|
||||
@@ -787,3 +795,70 @@ COMPATIBLE_IOCTL(HIDIOCGFLAG)
|
||||
COMPATIBLE_IOCTL(HIDIOCSFLAG)
|
||||
COMPATIBLE_IOCTL(HIDIOCGCOLLECTIONINDEX)
|
||||
COMPATIBLE_IOCTL(HIDIOCGCOLLECTIONINFO)
|
||||
/* dvb */
|
||||
COMPATIBLE_IOCTL(AUDIO_STOP)
|
||||
COMPATIBLE_IOCTL(AUDIO_PLAY)
|
||||
COMPATIBLE_IOCTL(AUDIO_PAUSE)
|
||||
COMPATIBLE_IOCTL(AUDIO_CONTINUE)
|
||||
COMPATIBLE_IOCTL(AUDIO_SELECT_SOURCE)
|
||||
COMPATIBLE_IOCTL(AUDIO_SET_MUTE)
|
||||
COMPATIBLE_IOCTL(AUDIO_SET_AV_SYNC)
|
||||
COMPATIBLE_IOCTL(AUDIO_SET_BYPASS_MODE)
|
||||
COMPATIBLE_IOCTL(AUDIO_CHANNEL_SELECT)
|
||||
COMPATIBLE_IOCTL(AUDIO_GET_STATUS)
|
||||
COMPATIBLE_IOCTL(AUDIO_GET_CAPABILITIES)
|
||||
COMPATIBLE_IOCTL(AUDIO_CLEAR_BUFFER)
|
||||
COMPATIBLE_IOCTL(AUDIO_SET_ID)
|
||||
COMPATIBLE_IOCTL(AUDIO_SET_MIXER)
|
||||
COMPATIBLE_IOCTL(AUDIO_SET_STREAMTYPE)
|
||||
COMPATIBLE_IOCTL(AUDIO_SET_EXT_ID)
|
||||
COMPATIBLE_IOCTL(AUDIO_SET_ATTRIBUTES)
|
||||
COMPATIBLE_IOCTL(AUDIO_SET_KARAOKE)
|
||||
COMPATIBLE_IOCTL(DMX_START)
|
||||
COMPATIBLE_IOCTL(DMX_STOP)
|
||||
COMPATIBLE_IOCTL(DMX_SET_FILTER)
|
||||
COMPATIBLE_IOCTL(DMX_SET_PES_FILTER)
|
||||
COMPATIBLE_IOCTL(DMX_SET_BUFFER_SIZE)
|
||||
COMPATIBLE_IOCTL(DMX_GET_PES_PIDS)
|
||||
COMPATIBLE_IOCTL(DMX_GET_CAPS)
|
||||
COMPATIBLE_IOCTL(DMX_SET_SOURCE)
|
||||
COMPATIBLE_IOCTL(DMX_GET_STC)
|
||||
COMPATIBLE_IOCTL(FE_GET_INFO)
|
||||
COMPATIBLE_IOCTL(FE_DISEQC_RESET_OVERLOAD)
|
||||
COMPATIBLE_IOCTL(FE_DISEQC_SEND_MASTER_CMD)
|
||||
COMPATIBLE_IOCTL(FE_DISEQC_RECV_SLAVE_REPLY)
|
||||
COMPATIBLE_IOCTL(FE_DISEQC_SEND_BURST)
|
||||
COMPATIBLE_IOCTL(FE_SET_TONE)
|
||||
COMPATIBLE_IOCTL(FE_SET_VOLTAGE)
|
||||
COMPATIBLE_IOCTL(FE_ENABLE_HIGH_LNB_VOLTAGE)
|
||||
COMPATIBLE_IOCTL(FE_READ_STATUS)
|
||||
COMPATIBLE_IOCTL(FE_READ_BER)
|
||||
COMPATIBLE_IOCTL(FE_READ_SIGNAL_STRENGTH)
|
||||
COMPATIBLE_IOCTL(FE_READ_SNR)
|
||||
COMPATIBLE_IOCTL(FE_READ_UNCORRECTED_BLOCKS)
|
||||
COMPATIBLE_IOCTL(FE_SET_FRONTEND)
|
||||
COMPATIBLE_IOCTL(FE_GET_FRONTEND)
|
||||
COMPATIBLE_IOCTL(FE_GET_EVENT)
|
||||
COMPATIBLE_IOCTL(FE_DISHNETWORK_SEND_LEGACY_CMD)
|
||||
COMPATIBLE_IOCTL(VIDEO_STOP)
|
||||
COMPATIBLE_IOCTL(VIDEO_PLAY)
|
||||
COMPATIBLE_IOCTL(VIDEO_FREEZE)
|
||||
COMPATIBLE_IOCTL(VIDEO_CONTINUE)
|
||||
COMPATIBLE_IOCTL(VIDEO_SELECT_SOURCE)
|
||||
COMPATIBLE_IOCTL(VIDEO_SET_BLANK)
|
||||
COMPATIBLE_IOCTL(VIDEO_GET_STATUS)
|
||||
COMPATIBLE_IOCTL(VIDEO_SET_DISPLAY_FORMAT)
|
||||
COMPATIBLE_IOCTL(VIDEO_FAST_FORWARD)
|
||||
COMPATIBLE_IOCTL(VIDEO_SLOWMOTION)
|
||||
COMPATIBLE_IOCTL(VIDEO_GET_CAPABILITIES)
|
||||
COMPATIBLE_IOCTL(VIDEO_CLEAR_BUFFER)
|
||||
COMPATIBLE_IOCTL(VIDEO_SET_ID)
|
||||
COMPATIBLE_IOCTL(VIDEO_SET_STREAMTYPE)
|
||||
COMPATIBLE_IOCTL(VIDEO_SET_FORMAT)
|
||||
COMPATIBLE_IOCTL(VIDEO_SET_SYSTEM)
|
||||
COMPATIBLE_IOCTL(VIDEO_SET_HIGHLIGHT)
|
||||
COMPATIBLE_IOCTL(VIDEO_SET_SPU)
|
||||
COMPATIBLE_IOCTL(VIDEO_GET_NAVI)
|
||||
COMPATIBLE_IOCTL(VIDEO_SET_ATTRIBUTES)
|
||||
COMPATIBLE_IOCTL(VIDEO_GET_SIZE)
|
||||
COMPATIBLE_IOCTL(VIDEO_GET_FRAME_RATE)
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* ds17287rtc.h - register definitions for the ds1728[57] RTC / CMOS RAM
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* (C) 2003 Guido Guenther <agx@sigxcpu.org>
|
||||
*/
|
||||
#ifndef __LINUX_DS17287RTC_H
|
||||
#define __LINUX_DS17287RTC_H
|
||||
|
||||
#include <linux/rtc.h> /* get the user-level API */
|
||||
#include <linux/spinlock.h> /* spinlock_t */
|
||||
#include <linux/mc146818rtc.h>
|
||||
|
||||
/* Register A */
|
||||
#define DS_REGA_DV2 0x40 /* countdown chain */
|
||||
#define DS_REGA_DV1 0x20 /* oscillator enable */
|
||||
#define DS_REGA_DV0 0x10 /* bank select */
|
||||
|
||||
/* bank 1 registers */
|
||||
#define DS_B1_MODEL 0x40 /* model number byte */
|
||||
#define DS_B1_SN1 0x41 /* serial number byte 1 */
|
||||
#define DS_B1_SN2 0x42 /* serial number byte 2 */
|
||||
#define DS_B1_SN3 0x43 /* serial number byte 3 */
|
||||
#define DS_B1_SN4 0x44 /* serial number byte 4 */
|
||||
#define DS_B1_SN5 0x45 /* serial number byte 5 */
|
||||
#define DS_B1_SN6 0x46 /* serial number byte 6 */
|
||||
#define DS_B1_CRC 0x47 /* CRC byte */
|
||||
#define DS_B1_CENTURY 0x48 /* Century byte */
|
||||
#define DS_B1_DALARM 0x49 /* date alarm */
|
||||
#define DS_B1_XCTRL4A 0x4a /* extendec control register 4a */
|
||||
#define DS_B1_XCTRL4B 0x4b /* extendec control register 4b */
|
||||
#define DS_B1_RTCADDR2 0x4e /* rtc address 2 */
|
||||
#define DS_B1_RTCADDR3 0x4f /* rtc address 3 */
|
||||
#define DS_B1_RAMLSB 0x50 /* extended ram LSB */
|
||||
#define DS_B1_RAMMSB 0x51 /* extended ram MSB */
|
||||
#define DS_B1_RAMDPORT 0x53 /* extended ram data port */
|
||||
|
||||
/* register details */
|
||||
/* extended control register 4a */
|
||||
#define DS_XCTRL4A_VRT2 0x80 /* valid ram and time */
|
||||
#define DS_XCTRL4A_INCR 0x40 /* increment progress status */
|
||||
#define DS_XCTRL4A_BME 0x20 /* burst mode enable */
|
||||
#define DS_XCTRL4A_PAB 0x08 /* power active bar ctrl */
|
||||
#define DS_XCTRL4A_RF 0x04 /* ram clear flag */
|
||||
#define DS_XCTRL4A_WF 0x02 /* wake up alarm flag */
|
||||
#define DS_XCTRL4A_KF 0x01 /* kickstart flag */
|
||||
|
||||
/* interrupt causes */
|
||||
#define DS_XCTRL4A_IFS (DS_XCTRL4A_RF|DS_XCTRL4A_WF|DS_XCTRL4A_KF)
|
||||
|
||||
/* extended control register 4b */
|
||||
#define DS_XCTRL4B_ABE 0x80 /* auxiliary battery enable */
|
||||
#define DS_XCTRL4B_E32K 0x40 /* enable 32.768 kHz Output */
|
||||
#define DS_XCTRL4B_CS 0x20 /* crystal select */
|
||||
#define DS_XCTRL4B_RCE 0x10 /* ram clear enable */
|
||||
#define DS_XCTRL4B_PRS 0x08 /* PAB resec select */
|
||||
#define DS_XCTRL4B_RIE 0x04 /* ram clear interrupt enable */
|
||||
#define DS_XCTRL4B_WFE 0x02 /* wake up alarm interrupt enable */
|
||||
#define DS_XCTRL4B_KFE 0x01 /* kickstart interrupt enable */
|
||||
|
||||
/* interrupt enable bits */
|
||||
#define DS_XCTRL4B_IFES (DS_XCTRL4B_RIE|DS_XCTRL4B_WFE|DS_XCTRL4B_KFE)
|
||||
|
||||
#endif /* __LINUX_DS17287RTC_H */
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* ds1742rtc.h - register definitions for the Real-Time-Clock / CMOS RAM
|
||||
*
|
||||
* Copyright (C) 1999-2001 Toshiba Corporation
|
||||
* Copyright (C) 2003 Ralf Baechle (ralf@linux-mips.org)
|
||||
*
|
||||
* Permission is hereby granted to copy, modify and redistribute this code
|
||||
* in terms of the GNU Library General Public License, Version 2 or later,
|
||||
* at your option.
|
||||
*/
|
||||
#ifndef __LINUX_DS1742RTC_H
|
||||
#define __LINUX_DS1742RTC_H
|
||||
|
||||
#include <asm/ds1742.h>
|
||||
|
||||
#define RTC_BRAM_SIZE 0x800
|
||||
#define RTC_OFFSET 0x7f8
|
||||
|
||||
/*
|
||||
* Register summary
|
||||
*/
|
||||
#define RTC_CONTROL (RTC_OFFSET + 0)
|
||||
#define RTC_CENTURY (RTC_OFFSET + 0)
|
||||
#define RTC_SECONDS (RTC_OFFSET + 1)
|
||||
#define RTC_MINUTES (RTC_OFFSET + 2)
|
||||
#define RTC_HOURS (RTC_OFFSET + 3)
|
||||
#define RTC_DAY (RTC_OFFSET + 4)
|
||||
#define RTC_DATE (RTC_OFFSET + 5)
|
||||
#define RTC_MONTH (RTC_OFFSET + 6)
|
||||
#define RTC_YEAR (RTC_OFFSET + 7)
|
||||
|
||||
#define RTC_CENTURY_MASK 0x3f
|
||||
#define RTC_SECONDS_MASK 0x7f
|
||||
#define RTC_DAY_MASK 0x07
|
||||
|
||||
/*
|
||||
* Bits in the Control/Century register
|
||||
*/
|
||||
#define RTC_WRITE 0x80
|
||||
#define RTC_READ 0x40
|
||||
|
||||
/*
|
||||
* Bits in the Seconds register
|
||||
*/
|
||||
#define RTC_STOP 0x80
|
||||
|
||||
/*
|
||||
* Bits in the Day register
|
||||
*/
|
||||
#define RTC_BATT_FLAG 0x80
|
||||
#define RTC_FREQ_TEST 0x40
|
||||
|
||||
#endif /* __LINUX_DS1742RTC_H */
|
||||
@@ -33,13 +33,13 @@ struct fdtable {
|
||||
* Open file table structure
|
||||
*/
|
||||
struct files_struct {
|
||||
atomic_t count;
|
||||
spinlock_t file_lock; /* Protects all the below members. Nests inside tsk->alloc_lock */
|
||||
atomic_t count;
|
||||
struct fdtable *fdt;
|
||||
struct fdtable fdtab;
|
||||
fd_set close_on_exec_init;
|
||||
fd_set open_fds_init;
|
||||
struct file * fd_array[NR_OPEN_DEFAULT];
|
||||
fd_set close_on_exec_init;
|
||||
fd_set open_fds_init;
|
||||
struct file * fd_array[NR_OPEN_DEFAULT];
|
||||
spinlock_t file_lock; /* Protects concurrent writers. Nests inside tsk->alloc_lock */
|
||||
};
|
||||
|
||||
#define files_fdtable(files) (rcu_dereference((files)->fdt))
|
||||
|
||||
@@ -31,7 +31,6 @@ struct font_desc {
|
||||
#define SUN12x22_IDX 7
|
||||
#define ACORN8x8_IDX 8
|
||||
#define MINI4x6_IDX 9
|
||||
#define RL_IDX 10
|
||||
|
||||
extern const struct font_desc font_vga_8x8,
|
||||
font_vga_8x16,
|
||||
@@ -42,7 +41,6 @@ extern const struct font_desc font_vga_8x8,
|
||||
font_sun_8x16,
|
||||
font_sun_12x22,
|
||||
font_acorn_8x8,
|
||||
font_rl,
|
||||
font_mini_4x6;
|
||||
|
||||
/* Find a font with a specific name */
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Definitions for any platform device related flags or structures for
|
||||
* Freescale processor devices
|
||||
*
|
||||
* Maintainer: Kumar Gala (kumar.gala@freescale.com)
|
||||
* Maintainer: Kumar Gala <galak@kernel.crashing.org>
|
||||
*
|
||||
* Copyright 2004 Freescale Semiconductor, Inc
|
||||
*
|
||||
|
||||
@@ -78,7 +78,7 @@ struct hd_struct {
|
||||
sector_t start_sect;
|
||||
sector_t nr_sects;
|
||||
struct kobject kobj;
|
||||
unsigned ios[2], sectors[2];
|
||||
unsigned ios[2], sectors[2]; /* READs and WRITEs */
|
||||
int policy, partno;
|
||||
};
|
||||
|
||||
@@ -89,7 +89,7 @@ struct hd_struct {
|
||||
#define GENHD_FL_SUPPRESS_PARTITION_INFO 32
|
||||
|
||||
struct disk_stats {
|
||||
unsigned sectors[2];
|
||||
unsigned sectors[2]; /* READs and WRITEs */
|
||||
unsigned ios[2];
|
||||
unsigned merges[2];
|
||||
unsigned ticks[2];
|
||||
|
||||
+13
-3
@@ -14,6 +14,13 @@ struct vm_area_struct;
|
||||
/* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low two bits) */
|
||||
#define __GFP_DMA ((__force gfp_t)0x01u)
|
||||
#define __GFP_HIGHMEM ((__force gfp_t)0x02u)
|
||||
#ifdef CONFIG_DMA_IS_DMA32
|
||||
#define __GFP_DMA32 ((__force gfp_t)0x01) /* ZONE_DMA is ZONE_DMA32 */
|
||||
#elif BITS_PER_LONG < 64
|
||||
#define __GFP_DMA32 ((__force gfp_t)0x00) /* ZONE_NORMAL is ZONE_DMA32 */
|
||||
#else
|
||||
#define __GFP_DMA32 ((__force gfp_t)0x04) /* Has own ZONE_DMA32 */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Action modifiers - doesn't change the zoning
|
||||
@@ -39,8 +46,7 @@ struct vm_area_struct;
|
||||
#define __GFP_COMP ((__force gfp_t)0x4000u)/* Add compound page metadata */
|
||||
#define __GFP_ZERO ((__force gfp_t)0x8000u)/* Return zeroed page on success */
|
||||
#define __GFP_NOMEMALLOC ((__force gfp_t)0x10000u) /* Don't use emergency reserves */
|
||||
#define __GFP_NORECLAIM ((__force gfp_t)0x20000u) /* No realy zone reclaim during allocation */
|
||||
#define __GFP_HARDWALL ((__force gfp_t)0x40000u) /* Enforce hardwall cpuset memory allocs */
|
||||
#define __GFP_HARDWALL ((__force gfp_t)0x20000u) /* Enforce hardwall cpuset memory allocs */
|
||||
|
||||
#define __GFP_BITS_SHIFT 20 /* Room for 20 __GFP_FOO bits */
|
||||
#define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1))
|
||||
@@ -49,7 +55,7 @@ struct vm_area_struct;
|
||||
#define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \
|
||||
__GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \
|
||||
__GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \
|
||||
__GFP_NOMEMALLOC|__GFP_NORECLAIM|__GFP_HARDWALL)
|
||||
__GFP_NOMEMALLOC|__GFP_HARDWALL)
|
||||
|
||||
#define GFP_ATOMIC (__GFP_HIGH)
|
||||
#define GFP_NOIO (__GFP_WAIT)
|
||||
@@ -64,6 +70,10 @@ struct vm_area_struct;
|
||||
|
||||
#define GFP_DMA __GFP_DMA
|
||||
|
||||
/* 4GB DMA on some platforms */
|
||||
#define GFP_DMA32 __GFP_DMA32
|
||||
|
||||
|
||||
#define gfp_zone(mask) ((__force int)((mask) & (__force gfp_t)GFP_ZONEMASK))
|
||||
|
||||
/*
|
||||
|
||||
@@ -90,6 +90,8 @@ extern void synchronize_irq(unsigned int irq);
|
||||
#define nmi_enter() irq_enter()
|
||||
#define nmi_exit() sub_preempt_count(HARDIRQ_OFFSET)
|
||||
|
||||
struct task_struct;
|
||||
|
||||
#ifndef CONFIG_VIRT_CPU_ACCOUNTING
|
||||
static inline void account_user_vtime(struct task_struct *tsk)
|
||||
{
|
||||
|
||||
@@ -102,8 +102,8 @@ static inline unsigned long hugetlb_total_pages(void)
|
||||
#define hugetlb_fault(mm, vma, addr, write) ({ BUG(); 0; })
|
||||
|
||||
#ifndef HPAGE_MASK
|
||||
#define HPAGE_MASK 0 /* Keep the compiler happy */
|
||||
#define HPAGE_SIZE 0
|
||||
#define HPAGE_MASK PAGE_MASK /* Keep the compiler happy */
|
||||
#define HPAGE_SIZE PAGE_SIZE
|
||||
#endif
|
||||
|
||||
#endif /* !CONFIG_HUGETLB_PAGE */
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
#define I2C_DRIVERID_CX25840 71 /* cx2584x video encoder */
|
||||
#define I2C_DRIVERID_SAA7127 72 /* saa7124 video encoder */
|
||||
#define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */
|
||||
#define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */
|
||||
|
||||
#define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */
|
||||
#define I2C_DRIVERID_EXP1 0xF1
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
.page_table_lock = SPIN_LOCK_UNLOCKED, \
|
||||
.mmlist = LIST_HEAD_INIT(name.mmlist), \
|
||||
.cpu_vm_mask = CPU_MASK_ALL, \
|
||||
.default_kioctx = INIT_KIOCTX(name.default_kioctx, name), \
|
||||
}
|
||||
|
||||
#define INIT_SIGNALS(sig) { \
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <linux/preempt.h>
|
||||
#include <linux/cpumask.h>
|
||||
#include <linux/hardirq.h>
|
||||
#include <linux/sched.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
+14
-2
@@ -59,6 +59,8 @@
|
||||
#define VPRINTK(fmt, args...)
|
||||
#endif /* ATA_DEBUG */
|
||||
|
||||
#define BPRINTK(fmt, args...) if (ap->flags & ATA_FLAG_DEBUGMSG) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args)
|
||||
|
||||
#ifdef ATA_NDEBUG
|
||||
#define assert(expr)
|
||||
#else
|
||||
@@ -119,6 +121,7 @@ enum {
|
||||
ATA_FLAG_PIO_DMA = (1 << 8), /* PIO cmds via DMA */
|
||||
ATA_FLAG_NOINTR = (1 << 9), /* FIXME: Remove this once
|
||||
* proper HSM is in place. */
|
||||
ATA_FLAG_DEBUGMSG = (1 << 10),
|
||||
|
||||
ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */
|
||||
ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */
|
||||
@@ -327,8 +330,6 @@ struct ata_port {
|
||||
|
||||
u8 ctl; /* cache of ATA control register */
|
||||
u8 last_ctl; /* Cache last written value */
|
||||
unsigned int bus_state;
|
||||
unsigned int port_state;
|
||||
unsigned int pio_mask;
|
||||
unsigned int mwdma_mask;
|
||||
unsigned int udma_mask;
|
||||
@@ -659,6 +660,17 @@ static inline void ata_tf_init(struct ata_port *ap, struct ata_taskfile *tf, uns
|
||||
tf->device = ATA_DEVICE_OBS | ATA_DEV1;
|
||||
}
|
||||
|
||||
static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
|
||||
{
|
||||
qc->__sg = NULL;
|
||||
qc->flags = 0;
|
||||
qc->cursect = qc->cursg = qc->cursg_ofs = 0;
|
||||
qc->nsect = 0;
|
||||
qc->nbytes = qc->curbytes = 0;
|
||||
|
||||
ata_tf_init(qc->ap, &qc->tf, qc->dev->devno);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ata_irq_on - Enable interrupts on a port.
|
||||
|
||||
+2
-8
@@ -206,12 +206,6 @@ struct vm_operations_struct {
|
||||
struct mmu_gather;
|
||||
struct inode;
|
||||
|
||||
#ifdef ARCH_HAS_ATOMIC_UNSIGNED
|
||||
typedef unsigned page_flags_t;
|
||||
#else
|
||||
typedef unsigned long page_flags_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Each physical page in the system has a struct page associated with
|
||||
* it to keep track of whatever it is we are using the page for at the
|
||||
@@ -219,7 +213,7 @@ typedef unsigned long page_flags_t;
|
||||
* a page.
|
||||
*/
|
||||
struct page {
|
||||
page_flags_t flags; /* Atomic flags, some possibly
|
||||
unsigned long flags; /* Atomic flags, some possibly
|
||||
* updated asynchronously */
|
||||
atomic_t _count; /* Usage count, see below. */
|
||||
atomic_t _mapcount; /* Count of ptes mapped in mms,
|
||||
@@ -435,7 +429,7 @@ static inline void put_page(struct page *page)
|
||||
#endif
|
||||
|
||||
/* Page flags: | [SECTION] | [NODE] | ZONE | ... | FLAGS | */
|
||||
#define SECTIONS_PGOFF ((sizeof(page_flags_t)*8) - SECTIONS_WIDTH)
|
||||
#define SECTIONS_PGOFF ((sizeof(unsigned long)*8) - SECTIONS_WIDTH)
|
||||
#define NODES_PGOFF (SECTIONS_PGOFF - NODES_WIDTH)
|
||||
#define ZONES_PGOFF (NODES_PGOFF - ZONES_WIDTH)
|
||||
|
||||
|
||||
+13
-9
@@ -71,10 +71,11 @@ struct per_cpu_pageset {
|
||||
#endif
|
||||
|
||||
#define ZONE_DMA 0
|
||||
#define ZONE_NORMAL 1
|
||||
#define ZONE_HIGHMEM 2
|
||||
#define ZONE_DMA32 1
|
||||
#define ZONE_NORMAL 2
|
||||
#define ZONE_HIGHMEM 3
|
||||
|
||||
#define MAX_NR_ZONES 3 /* Sync this with ZONES_SHIFT */
|
||||
#define MAX_NR_ZONES 4 /* Sync this with ZONES_SHIFT */
|
||||
#define ZONES_SHIFT 2 /* ceil(log2(MAX_NR_ZONES)) */
|
||||
|
||||
|
||||
@@ -108,9 +109,10 @@ struct per_cpu_pageset {
|
||||
|
||||
/*
|
||||
* On machines where it is needed (eg PCs) we divide physical memory
|
||||
* into multiple physical zones. On a PC we have 3 zones:
|
||||
* into multiple physical zones. On a PC we have 4 zones:
|
||||
*
|
||||
* ZONE_DMA < 16 MB ISA DMA capable memory
|
||||
* ZONE_DMA32 0 MB Empty
|
||||
* ZONE_NORMAL 16-896 MB direct mapped by the kernel
|
||||
* ZONE_HIGHMEM > 896 MB only page cache and user processes
|
||||
*/
|
||||
@@ -329,7 +331,7 @@ void get_zone_counts(unsigned long *active, unsigned long *inactive,
|
||||
void build_all_zonelists(void);
|
||||
void wakeup_kswapd(struct zone *zone, int order);
|
||||
int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
|
||||
int alloc_type, int can_try_harder, gfp_t gfp_high);
|
||||
int classzone_idx, int alloc_flags);
|
||||
|
||||
#ifdef CONFIG_HAVE_MEMORY_PRESENT
|
||||
void memory_present(int nid, unsigned long start, unsigned long end);
|
||||
@@ -433,7 +435,9 @@ int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *,
|
||||
|
||||
#include <linux/topology.h>
|
||||
/* Returns the number of the current Node. */
|
||||
#ifndef numa_node_id
|
||||
#define numa_node_id() (cpu_to_node(raw_smp_processor_id()))
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NEED_MULTIPLE_NODES
|
||||
|
||||
@@ -453,12 +457,12 @@ extern struct pglist_data contig_page_data;
|
||||
#include <asm/sparsemem.h>
|
||||
#endif
|
||||
|
||||
#if BITS_PER_LONG == 32 || defined(ARCH_HAS_ATOMIC_UNSIGNED)
|
||||
#if BITS_PER_LONG == 32
|
||||
/*
|
||||
* with 32 bit page->flags field, we reserve 8 bits for node/zone info.
|
||||
* there are 3 zones (2 bits) and this leaves 8-2=6 bits for nodes.
|
||||
* with 32 bit page->flags field, we reserve 9 bits for node/zone info.
|
||||
* there are 4 zones (3 bits) and this leaves 9-3=6 bits for nodes.
|
||||
*/
|
||||
#define FLAGS_RESERVED 8
|
||||
#define FLAGS_RESERVED 9
|
||||
|
||||
#elif BITS_PER_LONG == 64
|
||||
/*
|
||||
|
||||
@@ -112,7 +112,6 @@ struct nfnl_callback
|
||||
{
|
||||
int (*call)(struct sock *nl, struct sk_buff *skb,
|
||||
struct nlmsghdr *nlh, struct nfattr *cda[], int *errp);
|
||||
kernel_cap_t cap_required; /* capabilities required for this msg */
|
||||
u_int16_t attr_count; /* number of nfattr's */
|
||||
};
|
||||
|
||||
@@ -154,11 +153,14 @@ extern void nfattr_parse(struct nfattr *tb[], int maxattr,
|
||||
|
||||
#define nfattr_bad_size(tb, max, cta_min) \
|
||||
({ int __i, __res = 0; \
|
||||
for (__i=0; __i<max; __i++) \
|
||||
for (__i=0; __i<max; __i++) { \
|
||||
if (!cta_min[__i]) \
|
||||
continue; \
|
||||
if (tb[__i] && NFA_PAYLOAD(tb[__i]) < cta_min[__i]){ \
|
||||
__res = 1; \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
__res; \
|
||||
})
|
||||
|
||||
|
||||
@@ -53,12 +53,12 @@ void release_pages(struct page **pages, int nr, int cold);
|
||||
|
||||
static inline struct page *page_cache_alloc(struct address_space *x)
|
||||
{
|
||||
return alloc_pages(mapping_gfp_mask(x)|__GFP_NORECLAIM, 0);
|
||||
return alloc_pages(mapping_gfp_mask(x), 0);
|
||||
}
|
||||
|
||||
static inline struct page *page_cache_alloc_cold(struct address_space *x)
|
||||
{
|
||||
return alloc_pages(mapping_gfp_mask(x)|__GFP_COLD|__GFP_NORECLAIM, 0);
|
||||
return alloc_pages(mapping_gfp_mask(x)|__GFP_COLD, 0);
|
||||
}
|
||||
|
||||
typedef int filler_t(void *, struct page *);
|
||||
|
||||
@@ -805,6 +805,10 @@
|
||||
#define PCI_DEVICE_ID_APPLE_SH_SUNGEM 0x0051
|
||||
#define PCI_DEVICE_ID_APPLE_U3L_AGP 0x0058
|
||||
#define PCI_DEVICE_ID_APPLE_U3H_AGP 0x0059
|
||||
#define PCI_DEVICE_ID_APPLE_IPID2_AGP 0x0066
|
||||
#define PCI_DEVICE_ID_APPLE_IPID2_ATA 0x0069
|
||||
#define PCI_DEVICE_ID_APPLE_IPID2_FW 0x006a
|
||||
#define PCI_DEVICE_ID_APPLE_IPID2_GMAC 0x006b
|
||||
#define PCI_DEVICE_ID_APPLE_TIGON3 0x1645
|
||||
|
||||
#define PCI_VENDOR_ID_YAMAHA 0x1073
|
||||
@@ -1397,6 +1401,7 @@
|
||||
#define PCI_SUBDEVICE_ID_KEYSPAN_SX2 0x5334
|
||||
|
||||
#define PCI_VENDOR_ID_MARVELL 0x11ab
|
||||
#define PCI_DEVICE_ID_MARVELL_GT64111 0x4146
|
||||
#define PCI_DEVICE_ID_MARVELL_GT64260 0x6430
|
||||
#define PCI_DEVICE_ID_MARVELL_MV64360 0x6460
|
||||
#define PCI_DEVICE_ID_MARVELL_MV64460 0x6480
|
||||
|
||||
@@ -38,7 +38,7 @@ extern void free_percpu(const void *);
|
||||
|
||||
#else /* CONFIG_SMP */
|
||||
|
||||
#define per_cpu_ptr(ptr, cpu) (ptr)
|
||||
#define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); })
|
||||
|
||||
static inline void *__alloc_percpu(size_t size, size_t align)
|
||||
{
|
||||
|
||||
@@ -94,55 +94,6 @@ struct pm_dev
|
||||
struct list_head entry;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
extern int pm_active;
|
||||
|
||||
#define PM_IS_ACTIVE() (pm_active != 0)
|
||||
|
||||
/*
|
||||
* Register a device with power management
|
||||
*/
|
||||
struct pm_dev __deprecated *
|
||||
pm_register(pm_dev_t type, unsigned long id, pm_callback callback);
|
||||
|
||||
/*
|
||||
* Unregister a device with power management
|
||||
*/
|
||||
void __deprecated pm_unregister(struct pm_dev *dev);
|
||||
|
||||
/*
|
||||
* Unregister all devices with matching callback
|
||||
*/
|
||||
void __deprecated pm_unregister_all(pm_callback callback);
|
||||
|
||||
/*
|
||||
* Send a request to all devices
|
||||
*/
|
||||
int __deprecated pm_send_all(pm_request_t rqst, void *data);
|
||||
|
||||
#else /* CONFIG_PM */
|
||||
|
||||
#define PM_IS_ACTIVE() 0
|
||||
|
||||
static inline struct pm_dev *pm_register(pm_dev_t type,
|
||||
unsigned long id,
|
||||
pm_callback callback)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void pm_unregister(struct pm_dev *dev) {}
|
||||
|
||||
static inline void pm_unregister_all(pm_callback callback) {}
|
||||
|
||||
static inline int pm_send_all(pm_request_t rqst, void *data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
/* Functions above this comment are list-based old-style power
|
||||
* managment. Please avoid using them. */
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
#ifndef __LINUX_PM_LEGACY_H__
|
||||
#define __LINUX_PM_LEGACY_H__
|
||||
|
||||
#include <linux/config.h>
|
||||
|
||||
#ifdef CONFIG_PM_LEGACY
|
||||
|
||||
extern int pm_active;
|
||||
|
||||
#define PM_IS_ACTIVE() (pm_active != 0)
|
||||
|
||||
/*
|
||||
* Register a device with power management
|
||||
*/
|
||||
struct pm_dev __deprecated *
|
||||
pm_register(pm_dev_t type, unsigned long id, pm_callback callback);
|
||||
|
||||
/*
|
||||
* Unregister a device with power management
|
||||
*/
|
||||
void __deprecated pm_unregister(struct pm_dev *dev);
|
||||
|
||||
/*
|
||||
* Unregister all devices with matching callback
|
||||
*/
|
||||
void __deprecated pm_unregister_all(pm_callback callback);
|
||||
|
||||
/*
|
||||
* Send a request to all devices
|
||||
*/
|
||||
int __deprecated pm_send_all(pm_request_t rqst, void *data);
|
||||
|
||||
#else /* CONFIG_PM_LEGACY */
|
||||
|
||||
#define PM_IS_ACTIVE() 0
|
||||
|
||||
static inline struct pm_dev *pm_register(pm_dev_t type,
|
||||
unsigned long id,
|
||||
pm_callback callback)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void pm_unregister(struct pm_dev *dev) {}
|
||||
|
||||
static inline void pm_unregister_all(pm_callback callback) {}
|
||||
|
||||
static inline int pm_send_all(pm_request_t rqst, void *data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_PM_LEGACY */
|
||||
|
||||
#endif /* __LINUX_PM_LEGACY_H__ */
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/config.h>
|
||||
#include <linux/thread_info.h>
|
||||
#include <linux/linkage.h>
|
||||
|
||||
#ifdef CONFIG_DEBUG_PREEMPT
|
||||
|
||||
+24
-8
@@ -357,7 +357,6 @@ struct mm_struct {
|
||||
/* aio bits */
|
||||
rwlock_t ioctx_list_lock;
|
||||
struct kioctx *ioctx_list;
|
||||
struct kioctx default_kioctx;
|
||||
};
|
||||
|
||||
struct sighand_struct {
|
||||
@@ -1233,32 +1232,49 @@ static inline void task_unlock(struct task_struct *p)
|
||||
spin_unlock(&p->alloc_lock);
|
||||
}
|
||||
|
||||
#ifndef __HAVE_THREAD_FUNCTIONS
|
||||
|
||||
#define task_thread_info(task) (task)->thread_info
|
||||
|
||||
static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org)
|
||||
{
|
||||
*task_thread_info(p) = *task_thread_info(org);
|
||||
task_thread_info(p)->task = p;
|
||||
}
|
||||
|
||||
static inline unsigned long *end_of_stack(struct task_struct *p)
|
||||
{
|
||||
return (unsigned long *)(p->thread_info + 1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* set thread flags in other task's structures
|
||||
* - see asm/thread_info.h for TIF_xxxx flags available
|
||||
*/
|
||||
static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag)
|
||||
{
|
||||
set_ti_thread_flag(tsk->thread_info,flag);
|
||||
set_ti_thread_flag(task_thread_info(tsk), flag);
|
||||
}
|
||||
|
||||
static inline void clear_tsk_thread_flag(struct task_struct *tsk, int flag)
|
||||
{
|
||||
clear_ti_thread_flag(tsk->thread_info,flag);
|
||||
clear_ti_thread_flag(task_thread_info(tsk), flag);
|
||||
}
|
||||
|
||||
static inline int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag)
|
||||
{
|
||||
return test_and_set_ti_thread_flag(tsk->thread_info,flag);
|
||||
return test_and_set_ti_thread_flag(task_thread_info(tsk), flag);
|
||||
}
|
||||
|
||||
static inline int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag)
|
||||
{
|
||||
return test_and_clear_ti_thread_flag(tsk->thread_info,flag);
|
||||
return test_and_clear_ti_thread_flag(task_thread_info(tsk), flag);
|
||||
}
|
||||
|
||||
static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag)
|
||||
{
|
||||
return test_ti_thread_flag(tsk->thread_info,flag);
|
||||
return test_ti_thread_flag(task_thread_info(tsk), flag);
|
||||
}
|
||||
|
||||
static inline void set_tsk_need_resched(struct task_struct *tsk)
|
||||
@@ -1329,12 +1345,12 @@ extern void signal_wake_up(struct task_struct *t, int resume_stopped);
|
||||
|
||||
static inline unsigned int task_cpu(const struct task_struct *p)
|
||||
{
|
||||
return p->thread_info->cpu;
|
||||
return task_thread_info(p)->cpu;
|
||||
}
|
||||
|
||||
static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
|
||||
{
|
||||
p->thread_info->cpu = cpu;
|
||||
task_thread_info(p)->cpu = cpu;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
#define __LINUX_SMPLOCK_H
|
||||
|
||||
#include <linux/config.h>
|
||||
#ifdef CONFIG_LOCK_KERNEL
|
||||
#include <linux/sched.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#ifdef CONFIG_LOCK_KERNEL
|
||||
|
||||
#define kernel_locked() (current->lock_depth >= 0)
|
||||
|
||||
extern int __lockfunc __reacquire_kernel_lock(void);
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/compiler.h>
|
||||
|
||||
struct file;
|
||||
@@ -859,6 +858,7 @@ enum
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/list.h>
|
||||
|
||||
extern void sysctl_init(void);
|
||||
|
||||
|
||||
+12
-33
@@ -27,31 +27,6 @@ extern long do_no_restart_syscall(struct restart_block *parm);
|
||||
* - pass TIF_xxxx constants to these functions
|
||||
*/
|
||||
|
||||
static inline void set_thread_flag(int flag)
|
||||
{
|
||||
set_bit(flag,¤t_thread_info()->flags);
|
||||
}
|
||||
|
||||
static inline void clear_thread_flag(int flag)
|
||||
{
|
||||
clear_bit(flag,¤t_thread_info()->flags);
|
||||
}
|
||||
|
||||
static inline int test_and_set_thread_flag(int flag)
|
||||
{
|
||||
return test_and_set_bit(flag,¤t_thread_info()->flags);
|
||||
}
|
||||
|
||||
static inline int test_and_clear_thread_flag(int flag)
|
||||
{
|
||||
return test_and_clear_bit(flag,¤t_thread_info()->flags);
|
||||
}
|
||||
|
||||
static inline int test_thread_flag(int flag)
|
||||
{
|
||||
return test_bit(flag,¤t_thread_info()->flags);
|
||||
}
|
||||
|
||||
static inline void set_ti_thread_flag(struct thread_info *ti, int flag)
|
||||
{
|
||||
set_bit(flag,&ti->flags);
|
||||
@@ -77,15 +52,19 @@ static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
|
||||
return test_bit(flag,&ti->flags);
|
||||
}
|
||||
|
||||
static inline void set_need_resched(void)
|
||||
{
|
||||
set_thread_flag(TIF_NEED_RESCHED);
|
||||
}
|
||||
#define set_thread_flag(flag) \
|
||||
set_ti_thread_flag(current_thread_info(), flag)
|
||||
#define clear_thread_flag(flag) \
|
||||
clear_ti_thread_flag(current_thread_info(), flag)
|
||||
#define test_and_set_thread_flag(flag) \
|
||||
test_and_set_ti_thread_flag(current_thread_info(), flag)
|
||||
#define test_and_clear_thread_flag(flag) \
|
||||
test_and_clear_ti_thread_flag(current_thread_info(), flag)
|
||||
#define test_thread_flag(flag) \
|
||||
test_ti_thread_flag(current_thread_info(), flag)
|
||||
|
||||
static inline void clear_need_resched(void)
|
||||
{
|
||||
clear_thread_flag(TIF_NEED_RESCHED);
|
||||
}
|
||||
#define set_need_resched() set_thread_flag(TIF_NEED_RESCHED)
|
||||
#define clear_need_resched() clear_thread_flag(TIF_NEED_RESCHED)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
|
||||
static inline void
|
||||
set_normalized_timespec (struct timespec *ts, time_t sec, long nsec)
|
||||
{
|
||||
while (nsec > NSEC_PER_SEC) {
|
||||
while (nsec >= NSEC_PER_SEC) {
|
||||
nsec -= NSEC_PER_SEC;
|
||||
++sec;
|
||||
}
|
||||
|
||||
+3
-3
@@ -819,7 +819,7 @@ typedef void (*usb_complete_t)(struct urb *, struct pt_regs *);
|
||||
*/
|
||||
struct urb
|
||||
{
|
||||
/* private, usb core and host controller only fields in the urb */
|
||||
/* private: usb core and host controller only fields in the urb */
|
||||
struct kref kref; /* reference count of the URB */
|
||||
spinlock_t lock; /* lock for the URB */
|
||||
void *hcpriv; /* private data for host controller */
|
||||
@@ -827,7 +827,7 @@ struct urb
|
||||
atomic_t use_count; /* concurrent submissions counter */
|
||||
u8 reject; /* submissions will fail */
|
||||
|
||||
/* public, documented fields in the urb that can be used by drivers */
|
||||
/* public: documented fields in the urb that can be used by drivers */
|
||||
struct list_head urb_list; /* list head for use by the urb's
|
||||
* current owner */
|
||||
struct usb_device *dev; /* (in) pointer to associated device */
|
||||
@@ -1045,7 +1045,7 @@ struct usb_sg_request {
|
||||
size_t bytes;
|
||||
|
||||
/*
|
||||
* members below are private to usbcore,
|
||||
* members below are private: to usbcore,
|
||||
* and are not provided for driver access!
|
||||
*/
|
||||
spinlock_t lock;
|
||||
|
||||
@@ -636,6 +636,7 @@ typedef __u64 v4l2_std_id;
|
||||
#define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000)
|
||||
#define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000)
|
||||
#define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000)
|
||||
#define V4L2_STD_SECAM_LC ((v4l2_std_id)0x00800000)
|
||||
|
||||
/* ATSC/HDTV */
|
||||
#define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000)
|
||||
|
||||
Reference in New Issue
Block a user