Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
This commit is contained in:
@@ -79,6 +79,7 @@ typedef int (*acpi_table_handler) (struct acpi_table_header *table);
|
||||
typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end);
|
||||
|
||||
char * __acpi_map_table (unsigned long phys_addr, unsigned long size);
|
||||
void __acpi_unmap_table(char *map, unsigned long size);
|
||||
int early_acpi_boot_init(void);
|
||||
int acpi_boot_init (void);
|
||||
int acpi_boot_table_init (void);
|
||||
|
||||
+19
-17
@@ -65,23 +65,20 @@ extern void free_bootmem(unsigned long addr, unsigned long size);
|
||||
#define BOOTMEM_DEFAULT 0
|
||||
#define BOOTMEM_EXCLUSIVE (1<<0)
|
||||
|
||||
extern int reserve_bootmem(unsigned long addr,
|
||||
unsigned long size,
|
||||
int flags);
|
||||
extern int reserve_bootmem_node(pg_data_t *pgdat,
|
||||
unsigned long physaddr,
|
||||
unsigned long size,
|
||||
int flags);
|
||||
#ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE
|
||||
extern int reserve_bootmem(unsigned long addr, unsigned long size, int flags);
|
||||
#endif
|
||||
unsigned long physaddr,
|
||||
unsigned long size,
|
||||
int flags);
|
||||
|
||||
extern void *__alloc_bootmem_nopanic(unsigned long size,
|
||||
extern void *__alloc_bootmem(unsigned long size,
|
||||
unsigned long align,
|
||||
unsigned long goal);
|
||||
extern void *__alloc_bootmem(unsigned long size,
|
||||
extern void *__alloc_bootmem_nopanic(unsigned long size,
|
||||
unsigned long align,
|
||||
unsigned long goal);
|
||||
extern void *__alloc_bootmem_low(unsigned long size,
|
||||
unsigned long align,
|
||||
unsigned long goal);
|
||||
extern void *__alloc_bootmem_node(pg_data_t *pgdat,
|
||||
unsigned long size,
|
||||
unsigned long align,
|
||||
@@ -90,30 +87,35 @@ extern void *__alloc_bootmem_node_nopanic(pg_data_t *pgdat,
|
||||
unsigned long size,
|
||||
unsigned long align,
|
||||
unsigned long goal);
|
||||
extern void *__alloc_bootmem_low(unsigned long size,
|
||||
unsigned long align,
|
||||
unsigned long goal);
|
||||
extern void *__alloc_bootmem_low_node(pg_data_t *pgdat,
|
||||
unsigned long size,
|
||||
unsigned long align,
|
||||
unsigned long goal);
|
||||
#ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE
|
||||
|
||||
#define alloc_bootmem(x) \
|
||||
__alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
|
||||
#define alloc_bootmem_nopanic(x) \
|
||||
__alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
|
||||
#define alloc_bootmem_low(x) \
|
||||
__alloc_bootmem_low(x, SMP_CACHE_BYTES, 0)
|
||||
#define alloc_bootmem_pages(x) \
|
||||
__alloc_bootmem(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
|
||||
#define alloc_bootmem_pages_nopanic(x) \
|
||||
__alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
|
||||
#define alloc_bootmem_low_pages(x) \
|
||||
__alloc_bootmem_low(x, PAGE_SIZE, 0)
|
||||
#define alloc_bootmem_node(pgdat, x) \
|
||||
__alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
|
||||
#define alloc_bootmem_pages_node(pgdat, x) \
|
||||
__alloc_bootmem_node(pgdat, x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
|
||||
#define alloc_bootmem_pages_node_nopanic(pgdat, x) \
|
||||
__alloc_bootmem_node_nopanic(pgdat, x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
|
||||
|
||||
#define alloc_bootmem_low(x) \
|
||||
__alloc_bootmem_low(x, SMP_CACHE_BYTES, 0)
|
||||
#define alloc_bootmem_low_pages(x) \
|
||||
__alloc_bootmem_low(x, PAGE_SIZE, 0)
|
||||
#define alloc_bootmem_low_pages_node(pgdat, x) \
|
||||
__alloc_bootmem_low_node(pgdat, x, PAGE_SIZE, 0)
|
||||
#endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */
|
||||
|
||||
extern int reserve_bootmem_generic(unsigned long addr, unsigned long size,
|
||||
int flags);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef BSG_H
|
||||
#define BSG_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define BSG_PROTOCOL_SCSI 0
|
||||
|
||||
#define BSG_SUB_PROTOCOL_SCSI_CMD 0
|
||||
|
||||
@@ -165,15 +165,8 @@ int sync_mapping_buffers(struct address_space *mapping);
|
||||
void unmap_underlying_metadata(struct block_device *bdev, sector_t block);
|
||||
|
||||
void mark_buffer_async_write(struct buffer_head *bh);
|
||||
void invalidate_bdev(struct block_device *);
|
||||
int sync_blockdev(struct block_device *bdev);
|
||||
void __wait_on_buffer(struct buffer_head *);
|
||||
wait_queue_head_t *bh_waitq_head(struct buffer_head *bh);
|
||||
int fsync_bdev(struct block_device *);
|
||||
struct super_block *freeze_bdev(struct block_device *);
|
||||
int thaw_bdev(struct block_device *, struct super_block *);
|
||||
int fsync_super(struct super_block *);
|
||||
int fsync_no_super(struct block_device *);
|
||||
struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block,
|
||||
unsigned size);
|
||||
struct buffer_head *__getblk(struct block_device *bdev, sector_t block,
|
||||
|
||||
@@ -125,4 +125,21 @@ int clk_set_parent(struct clk *clk, struct clk *parent);
|
||||
*/
|
||||
struct clk *clk_get_parent(struct clk *clk);
|
||||
|
||||
/**
|
||||
* clk_get_sys - get a clock based upon the device name
|
||||
* @dev_id: device name
|
||||
* @con_id: connection ID
|
||||
*
|
||||
* Returns a struct clk corresponding to the clock producer, or
|
||||
* valid IS_ERR() condition containing errno. The implementation
|
||||
* uses @dev_id and @con_id to determine the clock consumer, and
|
||||
* thereby the clock producer. In contrast to clk_get() this function
|
||||
* takes the device name instead of the device itself for identification.
|
||||
*
|
||||
* Drivers must assume that the clock source is not enabled.
|
||||
*
|
||||
* clk_get_sys should not be called from within interrupt context.
|
||||
*/
|
||||
struct clk *clk_get_sys(const char *dev_id, const char *con_id);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -125,6 +125,13 @@ struct compat_dirent {
|
||||
char d_name[256];
|
||||
};
|
||||
|
||||
struct compat_ustat {
|
||||
compat_daddr_t f_tfree;
|
||||
compat_ino_t f_tinode;
|
||||
char f_fname[6];
|
||||
char f_fpack[6];
|
||||
};
|
||||
|
||||
typedef union compat_sigval {
|
||||
compat_int_t sival_int;
|
||||
compat_uptr_t sival_ptr;
|
||||
@@ -178,6 +185,7 @@ long compat_sys_semtimedop(int semid, struct sembuf __user *tsems,
|
||||
unsigned nsems, const struct compat_timespec __user *timeout);
|
||||
asmlinkage long compat_sys_keyctl(u32 option,
|
||||
u32 arg2, u32 arg3, u32 arg4, u32 arg5);
|
||||
asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u32);
|
||||
|
||||
asmlinkage ssize_t compat_sys_readv(unsigned long fd,
|
||||
const struct compat_iovec __user *vec, unsigned long vlen);
|
||||
|
||||
@@ -112,7 +112,7 @@ struct dentry {
|
||||
struct list_head d_subdirs; /* our children */
|
||||
struct list_head d_alias; /* inode alias list */
|
||||
unsigned long d_time; /* used by d_revalidate */
|
||||
struct dentry_operations *d_op;
|
||||
const struct dentry_operations *d_op;
|
||||
struct super_block *d_sb; /* The root of the dentry tree */
|
||||
void *d_fsdata; /* fs-specific data */
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef DECOMPRESS_BUNZIP2_H
|
||||
#define DECOMPRESS_BUNZIP2_H
|
||||
|
||||
int bunzip2(unsigned char *inbuf, int len,
|
||||
int(*fill)(void*, unsigned int),
|
||||
int(*flush)(void*, unsigned int),
|
||||
unsigned char *output,
|
||||
int *pos,
|
||||
void(*error)(char *x));
|
||||
#endif
|
||||
@@ -0,0 +1,33 @@
|
||||
#ifndef DECOMPRESS_GENERIC_H
|
||||
#define DECOMPRESS_GENERIC_H
|
||||
|
||||
/* Minimal chunksize to be read.
|
||||
*Bzip2 prefers at least 4096
|
||||
*Lzma prefers 0x10000 */
|
||||
#define COMPR_IOBUF_SIZE 4096
|
||||
|
||||
typedef int (*decompress_fn) (unsigned char *inbuf, int len,
|
||||
int(*fill)(void*, unsigned int),
|
||||
int(*writebb)(void*, unsigned int),
|
||||
unsigned char *output,
|
||||
int *posp,
|
||||
void(*error)(char *x));
|
||||
|
||||
/* inbuf - input buffer
|
||||
*len - len of pre-read data in inbuf
|
||||
*fill - function to fill inbuf if empty
|
||||
*writebb - function to write out outbug
|
||||
*posp - if non-null, input position (number of bytes read) will be
|
||||
* returned here
|
||||
*
|
||||
*If len != 0, the inbuf is initialized (with as much data), and fill
|
||||
*should not be called
|
||||
*If len = 0, the inbuf is allocated, but empty. Its size is IOBUF_SIZE
|
||||
*fill should be called (repeatedly...) to read data, at most IOBUF_SIZE
|
||||
*/
|
||||
|
||||
/* Utility routine to detect the decompression method */
|
||||
decompress_fn decompress_method(const unsigned char *inbuf, int len,
|
||||
const char **name);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,13 @@
|
||||
#ifndef INFLATE_H
|
||||
#define INFLATE_H
|
||||
|
||||
/* Other housekeeping constants */
|
||||
#define INBUFSIZ 4096
|
||||
|
||||
int gunzip(unsigned char *inbuf, int len,
|
||||
int(*fill)(void*, unsigned int),
|
||||
int(*flush)(void*, unsigned int),
|
||||
unsigned char *output,
|
||||
int *pos,
|
||||
void(*error_fn)(char *x));
|
||||
#endif
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* linux/compr_mm.h
|
||||
*
|
||||
* Memory management for pre-boot and ramdisk uncompressors
|
||||
*
|
||||
* Authors: Alain Knaff <alain@knaff.lu>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef DECOMPR_MM_H
|
||||
#define DECOMPR_MM_H
|
||||
|
||||
#ifdef STATIC
|
||||
|
||||
/* Code active when included from pre-boot environment: */
|
||||
|
||||
/* A trivial malloc implementation, adapted from
|
||||
* malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
|
||||
*/
|
||||
static unsigned long malloc_ptr;
|
||||
static int malloc_count;
|
||||
|
||||
static void *malloc(int size)
|
||||
{
|
||||
void *p;
|
||||
|
||||
if (size < 0)
|
||||
error("Malloc error");
|
||||
if (!malloc_ptr)
|
||||
malloc_ptr = free_mem_ptr;
|
||||
|
||||
malloc_ptr = (malloc_ptr + 3) & ~3; /* Align */
|
||||
|
||||
p = (void *)malloc_ptr;
|
||||
malloc_ptr += size;
|
||||
|
||||
if (free_mem_end_ptr && malloc_ptr >= free_mem_end_ptr)
|
||||
error("Out of memory");
|
||||
|
||||
malloc_count++;
|
||||
return p;
|
||||
}
|
||||
|
||||
static void free(void *where)
|
||||
{
|
||||
malloc_count--;
|
||||
if (!malloc_count)
|
||||
malloc_ptr = free_mem_ptr;
|
||||
}
|
||||
|
||||
#define large_malloc(a) malloc(a)
|
||||
#define large_free(a) free(a)
|
||||
|
||||
#define set_error_fn(x)
|
||||
|
||||
#define INIT
|
||||
|
||||
#else /* STATIC */
|
||||
|
||||
/* Code active when compiled standalone for use when loading ramdisk: */
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
/* Use defines rather than static inline in order to avoid spurious
|
||||
* warnings when not needed (indeed large_malloc / large_free are not
|
||||
* needed by inflate */
|
||||
|
||||
#define malloc(a) kmalloc(a, GFP_KERNEL)
|
||||
#define free(a) kfree(a)
|
||||
|
||||
#define large_malloc(a) vmalloc(a)
|
||||
#define large_free(a) vfree(a)
|
||||
|
||||
static void(*error)(char *m);
|
||||
#define set_error_fn(x) error = x;
|
||||
|
||||
#define INIT __init
|
||||
#define STATIC
|
||||
|
||||
#include <linux/init.h>
|
||||
|
||||
#endif /* STATIC */
|
||||
|
||||
#endif /* DECOMPR_MM_H */
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef DECOMPRESS_UNLZMA_H
|
||||
#define DECOMPRESS_UNLZMA_H
|
||||
|
||||
int unlzma(unsigned char *, int,
|
||||
int(*fill)(void*, unsigned int),
|
||||
int(*flush)(void*, unsigned int),
|
||||
unsigned char *output,
|
||||
int *posp,
|
||||
void(*error)(char *x)
|
||||
);
|
||||
|
||||
#endif
|
||||
@@ -111,6 +111,15 @@ static inline void elf_core_copy_regs(elf_gregset_t *elfregs, struct pt_regs *re
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void elf_core_copy_kernel_regs(elf_gregset_t *elfregs, struct pt_regs *regs)
|
||||
{
|
||||
#ifdef ELF_CORE_COPY_KERNEL_REGS
|
||||
ELF_CORE_COPY_KERNEL_REGS((*elfregs), regs);
|
||||
#else
|
||||
elf_core_copy_regs(elfregs, regs);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs)
|
||||
{
|
||||
#ifdef ELF_CORE_COPY_TASK_REGS
|
||||
|
||||
+185
-33
@@ -25,10 +25,12 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/firewire-constants.h>
|
||||
|
||||
#define FW_CDEV_EVENT_BUS_RESET 0x00
|
||||
#define FW_CDEV_EVENT_RESPONSE 0x01
|
||||
#define FW_CDEV_EVENT_REQUEST 0x02
|
||||
#define FW_CDEV_EVENT_ISO_INTERRUPT 0x03
|
||||
#define FW_CDEV_EVENT_BUS_RESET 0x00
|
||||
#define FW_CDEV_EVENT_RESPONSE 0x01
|
||||
#define FW_CDEV_EVENT_REQUEST 0x02
|
||||
#define FW_CDEV_EVENT_ISO_INTERRUPT 0x03
|
||||
#define FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED 0x04
|
||||
#define FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED 0x05
|
||||
|
||||
/**
|
||||
* struct fw_cdev_event_common - Common part of all fw_cdev_event_ types
|
||||
@@ -136,7 +138,24 @@ struct fw_cdev_event_request {
|
||||
* This event is sent when the controller has completed an &fw_cdev_iso_packet
|
||||
* with the %FW_CDEV_ISO_INTERRUPT bit set. In the receive case, the headers
|
||||
* stripped of all packets up until and including the interrupt packet are
|
||||
* returned in the @header field.
|
||||
* returned in the @header field. The amount of header data per packet is as
|
||||
* specified at iso context creation by &fw_cdev_create_iso_context.header_size.
|
||||
*
|
||||
* In version 1 of this ABI, header data consisted of the 1394 isochronous
|
||||
* packet header, followed by quadlets from the packet payload if
|
||||
* &fw_cdev_create_iso_context.header_size > 4.
|
||||
*
|
||||
* In version 2 of this ABI, header data consist of the 1394 isochronous
|
||||
* packet header, followed by a timestamp quadlet if
|
||||
* &fw_cdev_create_iso_context.header_size > 4, followed by quadlets from the
|
||||
* packet payload if &fw_cdev_create_iso_context.header_size > 8.
|
||||
*
|
||||
* Behaviour of ver. 1 of this ABI is no longer available since ABI ver. 2.
|
||||
*
|
||||
* Format of 1394 iso packet header: 16 bits len, 2 bits tag, 6 bits channel,
|
||||
* 4 bits tcode, 4 bits sy, in big endian byte order. Format of timestamp:
|
||||
* 16 bits invalid, 3 bits cycleSeconds, 13 bits cycleCount, in big endian byte
|
||||
* order.
|
||||
*/
|
||||
struct fw_cdev_event_iso_interrupt {
|
||||
__u64 closure;
|
||||
@@ -146,6 +165,35 @@ struct fw_cdev_event_iso_interrupt {
|
||||
__u32 header[0];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fw_cdev_event_iso_resource - Iso resources were allocated or freed
|
||||
* @closure: See &fw_cdev_event_common;
|
||||
* set by %FW_CDEV_IOC_(DE)ALLOCATE_ISO_RESOURCE(_ONCE) ioctl
|
||||
* @type: %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED or
|
||||
* %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED
|
||||
* @handle: Reference by which an allocated resource can be deallocated
|
||||
* @channel: Isochronous channel which was (de)allocated, if any
|
||||
* @bandwidth: Bandwidth allocation units which were (de)allocated, if any
|
||||
*
|
||||
* An %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED event is sent after an isochronous
|
||||
* resource was allocated at the IRM. The client has to check @channel and
|
||||
* @bandwidth for whether the allocation actually succeeded.
|
||||
*
|
||||
* An %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED event is sent after an isochronous
|
||||
* resource was deallocated at the IRM. It is also sent when automatic
|
||||
* reallocation after a bus reset failed.
|
||||
*
|
||||
* @channel is <0 if no channel was (de)allocated or if reallocation failed.
|
||||
* @bandwidth is 0 if no bandwidth was (de)allocated or if reallocation failed.
|
||||
*/
|
||||
struct fw_cdev_event_iso_resource {
|
||||
__u64 closure;
|
||||
__u32 type;
|
||||
__u32 handle;
|
||||
__s32 channel;
|
||||
__s32 bandwidth;
|
||||
};
|
||||
|
||||
/**
|
||||
* union fw_cdev_event - Convenience union of fw_cdev_event_ types
|
||||
* @common: Valid for all types
|
||||
@@ -153,6 +201,9 @@ struct fw_cdev_event_iso_interrupt {
|
||||
* @response: Valid if @common.type == %FW_CDEV_EVENT_RESPONSE
|
||||
* @request: Valid if @common.type == %FW_CDEV_EVENT_REQUEST
|
||||
* @iso_interrupt: Valid if @common.type == %FW_CDEV_EVENT_ISO_INTERRUPT
|
||||
* @iso_resource: Valid if @common.type ==
|
||||
* %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED or
|
||||
* %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED
|
||||
*
|
||||
* Convenience union for userspace use. Events could be read(2) into an
|
||||
* appropriately aligned char buffer and then cast to this union for further
|
||||
@@ -163,33 +214,47 @@ struct fw_cdev_event_iso_interrupt {
|
||||
* not fit will be discarded so that the next read(2) will return a new event.
|
||||
*/
|
||||
union fw_cdev_event {
|
||||
struct fw_cdev_event_common common;
|
||||
struct fw_cdev_event_bus_reset bus_reset;
|
||||
struct fw_cdev_event_response response;
|
||||
struct fw_cdev_event_request request;
|
||||
struct fw_cdev_event_iso_interrupt iso_interrupt;
|
||||
struct fw_cdev_event_common common;
|
||||
struct fw_cdev_event_bus_reset bus_reset;
|
||||
struct fw_cdev_event_response response;
|
||||
struct fw_cdev_event_request request;
|
||||
struct fw_cdev_event_iso_interrupt iso_interrupt;
|
||||
struct fw_cdev_event_iso_resource iso_resource;
|
||||
};
|
||||
|
||||
#define FW_CDEV_IOC_GET_INFO _IOWR('#', 0x00, struct fw_cdev_get_info)
|
||||
#define FW_CDEV_IOC_SEND_REQUEST _IOW('#', 0x01, struct fw_cdev_send_request)
|
||||
#define FW_CDEV_IOC_ALLOCATE _IOWR('#', 0x02, struct fw_cdev_allocate)
|
||||
#define FW_CDEV_IOC_DEALLOCATE _IOW('#', 0x03, struct fw_cdev_deallocate)
|
||||
#define FW_CDEV_IOC_SEND_RESPONSE _IOW('#', 0x04, struct fw_cdev_send_response)
|
||||
#define FW_CDEV_IOC_INITIATE_BUS_RESET _IOW('#', 0x05, struct fw_cdev_initiate_bus_reset)
|
||||
#define FW_CDEV_IOC_ADD_DESCRIPTOR _IOWR('#', 0x06, struct fw_cdev_add_descriptor)
|
||||
#define FW_CDEV_IOC_REMOVE_DESCRIPTOR _IOW('#', 0x07, struct fw_cdev_remove_descriptor)
|
||||
/* available since kernel version 2.6.22 */
|
||||
#define FW_CDEV_IOC_GET_INFO _IOWR('#', 0x00, struct fw_cdev_get_info)
|
||||
#define FW_CDEV_IOC_SEND_REQUEST _IOW('#', 0x01, struct fw_cdev_send_request)
|
||||
#define FW_CDEV_IOC_ALLOCATE _IOWR('#', 0x02, struct fw_cdev_allocate)
|
||||
#define FW_CDEV_IOC_DEALLOCATE _IOW('#', 0x03, struct fw_cdev_deallocate)
|
||||
#define FW_CDEV_IOC_SEND_RESPONSE _IOW('#', 0x04, struct fw_cdev_send_response)
|
||||
#define FW_CDEV_IOC_INITIATE_BUS_RESET _IOW('#', 0x05, struct fw_cdev_initiate_bus_reset)
|
||||
#define FW_CDEV_IOC_ADD_DESCRIPTOR _IOWR('#', 0x06, struct fw_cdev_add_descriptor)
|
||||
#define FW_CDEV_IOC_REMOVE_DESCRIPTOR _IOW('#', 0x07, struct fw_cdev_remove_descriptor)
|
||||
#define FW_CDEV_IOC_CREATE_ISO_CONTEXT _IOWR('#', 0x08, struct fw_cdev_create_iso_context)
|
||||
#define FW_CDEV_IOC_QUEUE_ISO _IOWR('#', 0x09, struct fw_cdev_queue_iso)
|
||||
#define FW_CDEV_IOC_START_ISO _IOW('#', 0x0a, struct fw_cdev_start_iso)
|
||||
#define FW_CDEV_IOC_STOP_ISO _IOW('#', 0x0b, struct fw_cdev_stop_iso)
|
||||
|
||||
#define FW_CDEV_IOC_CREATE_ISO_CONTEXT _IOWR('#', 0x08, struct fw_cdev_create_iso_context)
|
||||
#define FW_CDEV_IOC_QUEUE_ISO _IOWR('#', 0x09, struct fw_cdev_queue_iso)
|
||||
#define FW_CDEV_IOC_START_ISO _IOW('#', 0x0a, struct fw_cdev_start_iso)
|
||||
#define FW_CDEV_IOC_STOP_ISO _IOW('#', 0x0b, struct fw_cdev_stop_iso)
|
||||
#define FW_CDEV_IOC_GET_CYCLE_TIMER _IOR('#', 0x0c, struct fw_cdev_get_cycle_timer)
|
||||
/* available since kernel version 2.6.24 */
|
||||
#define FW_CDEV_IOC_GET_CYCLE_TIMER _IOR('#', 0x0c, struct fw_cdev_get_cycle_timer)
|
||||
|
||||
/* FW_CDEV_VERSION History
|
||||
*
|
||||
* 1 Feb 18, 2007: Initial version.
|
||||
/* available since kernel version 2.6.30 */
|
||||
#define FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE _IOWR('#', 0x0d, struct fw_cdev_allocate_iso_resource)
|
||||
#define FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE _IOW('#', 0x0e, struct fw_cdev_deallocate)
|
||||
#define FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE _IOW('#', 0x0f, struct fw_cdev_allocate_iso_resource)
|
||||
#define FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE_ONCE _IOW('#', 0x10, struct fw_cdev_allocate_iso_resource)
|
||||
#define FW_CDEV_IOC_GET_SPEED _IO('#', 0x11) /* returns speed code */
|
||||
#define FW_CDEV_IOC_SEND_BROADCAST_REQUEST _IOW('#', 0x12, struct fw_cdev_send_request)
|
||||
#define FW_CDEV_IOC_SEND_STREAM_PACKET _IOW('#', 0x13, struct fw_cdev_send_stream_packet)
|
||||
|
||||
/*
|
||||
* FW_CDEV_VERSION History
|
||||
* 1 (2.6.22) - initial version
|
||||
* 2 (2.6.30) - changed &fw_cdev_event_iso_interrupt.header if
|
||||
* &fw_cdev_create_iso_context.header_size is 8 or more
|
||||
*/
|
||||
#define FW_CDEV_VERSION 1
|
||||
#define FW_CDEV_VERSION 2
|
||||
|
||||
/**
|
||||
* struct fw_cdev_get_info - General purpose information ioctl
|
||||
@@ -201,7 +266,7 @@ union fw_cdev_event {
|
||||
* case, @rom_length is updated with the actual length of the
|
||||
* configuration ROM.
|
||||
* @rom: If non-zero, address of a buffer to be filled by a copy of the
|
||||
* local node's configuration ROM
|
||||
* device's configuration ROM
|
||||
* @bus_reset: If non-zero, address of a buffer to be filled by a
|
||||
* &struct fw_cdev_event_bus_reset with the current state
|
||||
* of the bus. This does not cause a bus reset to happen.
|
||||
@@ -229,7 +294,7 @@ struct fw_cdev_get_info {
|
||||
* Send a request to the device. This ioctl implements all outgoing requests.
|
||||
* Both quadlet and block request specify the payload as a pointer to the data
|
||||
* in the @data field. Once the transaction completes, the kernel writes an
|
||||
* &fw_cdev_event_request event back. The @closure field is passed back to
|
||||
* &fw_cdev_event_response event back. The @closure field is passed back to
|
||||
* user space in the response event.
|
||||
*/
|
||||
struct fw_cdev_send_request {
|
||||
@@ -284,9 +349,9 @@ struct fw_cdev_allocate {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fw_cdev_deallocate - Free an address range allocation
|
||||
* @handle: Handle to the address range, as returned by the kernel when the
|
||||
* range was allocated
|
||||
* struct fw_cdev_deallocate - Free a CSR address range or isochronous resource
|
||||
* @handle: Handle to the address range or iso resource, as returned by the
|
||||
* kernel when the range or resource was allocated
|
||||
*/
|
||||
struct fw_cdev_deallocate {
|
||||
__u32 handle;
|
||||
@@ -329,6 +394,9 @@ struct fw_cdev_initiate_bus_reset {
|
||||
* If successful, the kernel adds the descriptor and writes back a handle to the
|
||||
* kernel-side object to be used for later removal of the descriptor block and
|
||||
* immediate key.
|
||||
*
|
||||
* This ioctl affects the configuration ROMs of all local nodes.
|
||||
* The ioctl only succeeds on device files which represent a local node.
|
||||
*/
|
||||
struct fw_cdev_add_descriptor {
|
||||
__u32 immediate;
|
||||
@@ -344,7 +412,7 @@ struct fw_cdev_add_descriptor {
|
||||
* descriptor was added
|
||||
*
|
||||
* Remove a descriptor block and accompanying immediate key from the local
|
||||
* node's configuration ROM.
|
||||
* nodes' configuration ROMs.
|
||||
*/
|
||||
struct fw_cdev_remove_descriptor {
|
||||
__u32 handle;
|
||||
@@ -370,6 +438,9 @@ struct fw_cdev_remove_descriptor {
|
||||
*
|
||||
* If a context was successfully created, the kernel writes back a handle to the
|
||||
* context, which must be passed in for subsequent operations on that context.
|
||||
*
|
||||
* Note that the effect of a @header_size > 4 depends on
|
||||
* &fw_cdev_get_info.version, as documented at &fw_cdev_event_iso_interrupt.
|
||||
*/
|
||||
struct fw_cdev_create_iso_context {
|
||||
__u32 type;
|
||||
@@ -473,10 +544,91 @@ struct fw_cdev_stop_iso {
|
||||
* The %FW_CDEV_IOC_GET_CYCLE_TIMER ioctl reads the isochronous cycle timer
|
||||
* and also the system clock. This allows to express the receive time of an
|
||||
* isochronous packet as a system time with microsecond accuracy.
|
||||
*
|
||||
* @cycle_timer consists of 7 bits cycleSeconds, 13 bits cycleCount, and
|
||||
* 12 bits cycleOffset, in host byte order.
|
||||
*/
|
||||
struct fw_cdev_get_cycle_timer {
|
||||
__u64 local_time;
|
||||
__u32 cycle_timer;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fw_cdev_allocate_iso_resource - (De)allocate a channel or bandwidth
|
||||
* @closure: Passed back to userspace in correponding iso resource events
|
||||
* @channels: Isochronous channels of which one is to be (de)allocated
|
||||
* @bandwidth: Isochronous bandwidth units to be (de)allocated
|
||||
* @handle: Handle to the allocation, written by the kernel (only valid in
|
||||
* case of %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE ioctls)
|
||||
*
|
||||
* The %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE ioctl initiates allocation of an
|
||||
* isochronous channel and/or of isochronous bandwidth at the isochronous
|
||||
* resource manager (IRM). Only one of the channels specified in @channels is
|
||||
* allocated. An %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED is sent after
|
||||
* communication with the IRM, indicating success or failure in the event data.
|
||||
* The kernel will automatically reallocate the resources after bus resets.
|
||||
* Should a reallocation fail, an %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED event
|
||||
* will be sent. The kernel will also automatically deallocate the resources
|
||||
* when the file descriptor is closed.
|
||||
*
|
||||
* The %FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE ioctl can be used to initiate
|
||||
* deallocation of resources which were allocated as described above.
|
||||
* An %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED event concludes this operation.
|
||||
*
|
||||
* The %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE ioctl is a variant of allocation
|
||||
* without automatic re- or deallocation.
|
||||
* An %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED event concludes this operation,
|
||||
* indicating success or failure in its data.
|
||||
*
|
||||
* The %FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE_ONCE ioctl works like
|
||||
* %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE except that resources are freed
|
||||
* instead of allocated.
|
||||
* An %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED event concludes this operation.
|
||||
*
|
||||
* To summarize, %FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE allocates iso resources
|
||||
* for the lifetime of the fd or handle.
|
||||
* In contrast, %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE allocates iso resources
|
||||
* for the duration of a bus generation.
|
||||
*
|
||||
* @channels is a host-endian bitfield with the least significant bit
|
||||
* representing channel 0 and the most significant bit representing channel 63:
|
||||
* 1ULL << c for each channel c that is a candidate for (de)allocation.
|
||||
*
|
||||
* @bandwidth is expressed in bandwidth allocation units, i.e. the time to send
|
||||
* one quadlet of data (payload or header data) at speed S1600.
|
||||
*/
|
||||
struct fw_cdev_allocate_iso_resource {
|
||||
__u64 closure;
|
||||
__u64 channels;
|
||||
__u32 bandwidth;
|
||||
__u32 handle;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fw_cdev_send_stream_packet - send an asynchronous stream packet
|
||||
* @length: Length of outgoing payload, in bytes
|
||||
* @tag: Data format tag
|
||||
* @channel: Isochronous channel to transmit to
|
||||
* @sy: Synchronization code
|
||||
* @closure: Passed back to userspace in the response event
|
||||
* @data: Userspace pointer to payload
|
||||
* @generation: The bus generation where packet is valid
|
||||
* @speed: Speed to transmit at
|
||||
*
|
||||
* The %FW_CDEV_IOC_SEND_STREAM_PACKET ioctl sends an asynchronous stream packet
|
||||
* to every device which is listening to the specified channel. The kernel
|
||||
* writes an &fw_cdev_event_response event which indicates success or failure of
|
||||
* the transmission.
|
||||
*/
|
||||
struct fw_cdev_send_stream_packet {
|
||||
__u32 length;
|
||||
__u32 tag;
|
||||
__u32 channel;
|
||||
__u32 sy;
|
||||
__u64 closure;
|
||||
__u64 data;
|
||||
__u32 generation;
|
||||
__u32 speed;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_FIREWIRE_CDEV_H */
|
||||
|
||||
+185
-35
@@ -1064,34 +1064,147 @@ extern int lease_modify(struct file_lock **, int);
|
||||
extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
|
||||
extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
|
||||
#else /* !CONFIG_FILE_LOCKING */
|
||||
#define fcntl_getlk(a, b) ({ -EINVAL; })
|
||||
#define fcntl_setlk(a, b, c, d) ({ -EACCES; })
|
||||
static inline int fcntl_getlk(struct file *file, struct flock __user *user)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int fcntl_setlk(unsigned int fd, struct file *file,
|
||||
unsigned int cmd, struct flock __user *user)
|
||||
{
|
||||
return -EACCES;
|
||||
}
|
||||
|
||||
#if BITS_PER_LONG == 32
|
||||
#define fcntl_getlk64(a, b) ({ -EINVAL; })
|
||||
#define fcntl_setlk64(a, b, c, d) ({ -EACCES; })
|
||||
static inline int fcntl_getlk64(struct file *file, struct flock64 __user *user)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int fcntl_setlk64(unsigned int fd, struct file *file,
|
||||
unsigned int cmd, struct flock64 __user *user)
|
||||
{
|
||||
return -EACCES;
|
||||
}
|
||||
#endif
|
||||
#define fcntl_setlease(a, b, c) ({ 0; })
|
||||
#define fcntl_getlease(a) ({ 0; })
|
||||
#define locks_init_lock(a) ({ })
|
||||
#define __locks_copy_lock(a, b) ({ })
|
||||
#define locks_copy_lock(a, b) ({ })
|
||||
#define locks_remove_posix(a, b) ({ })
|
||||
#define locks_remove_flock(a) ({ })
|
||||
#define posix_test_lock(a, b) ({ 0; })
|
||||
#define posix_lock_file(a, b, c) ({ -ENOLCK; })
|
||||
#define posix_lock_file_wait(a, b) ({ -ENOLCK; })
|
||||
#define posix_unblock_lock(a, b) (-ENOENT)
|
||||
#define vfs_test_lock(a, b) ({ 0; })
|
||||
#define vfs_lock_file(a, b, c, d) (-ENOLCK)
|
||||
#define vfs_cancel_lock(a, b) ({ 0; })
|
||||
#define flock_lock_file_wait(a, b) ({ -ENOLCK; })
|
||||
#define __break_lease(a, b) ({ 0; })
|
||||
#define lease_get_mtime(a, b) ({ })
|
||||
#define generic_setlease(a, b, c) ({ -EINVAL; })
|
||||
#define vfs_setlease(a, b, c) ({ -EINVAL; })
|
||||
#define lease_modify(a, b) ({ -EINVAL; })
|
||||
#define lock_may_read(a, b, c) ({ 1; })
|
||||
#define lock_may_write(a, b, c) ({ 1; })
|
||||
static inline int fcntl_setlease(unsigned int fd, struct file *filp, long arg)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int fcntl_getlease(struct file *filp)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void locks_init_lock(struct file_lock *fl)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static inline void __locks_copy_lock(struct file_lock *new, struct file_lock *fl)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static inline void locks_copy_lock(struct file_lock *new, struct file_lock *fl)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static inline void locks_remove_posix(struct file *filp, fl_owner_t owner)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static inline void locks_remove_flock(struct file *filp)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static inline void posix_test_lock(struct file *filp, struct file_lock *fl)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static inline int posix_lock_file(struct file *filp, struct file_lock *fl,
|
||||
struct file_lock *conflock)
|
||||
{
|
||||
return -ENOLCK;
|
||||
}
|
||||
|
||||
static inline int posix_lock_file_wait(struct file *filp, struct file_lock *fl)
|
||||
{
|
||||
return -ENOLCK;
|
||||
}
|
||||
|
||||
static inline int posix_unblock_lock(struct file *filp,
|
||||
struct file_lock *waiter)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static inline int vfs_test_lock(struct file *filp, struct file_lock *fl)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int vfs_lock_file(struct file *filp, unsigned int cmd,
|
||||
struct file_lock *fl, struct file_lock *conf)
|
||||
{
|
||||
return -ENOLCK;
|
||||
}
|
||||
|
||||
static inline int vfs_cancel_lock(struct file *filp, struct file_lock *fl)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int flock_lock_file_wait(struct file *filp,
|
||||
struct file_lock *request)
|
||||
{
|
||||
return -ENOLCK;
|
||||
}
|
||||
|
||||
static inline int __break_lease(struct inode *inode, unsigned int mode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void lease_get_mtime(struct inode *inode, struct timespec *time)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static inline int generic_setlease(struct file *filp, long arg,
|
||||
struct file_lock **flp)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int vfs_setlease(struct file *filp, long arg,
|
||||
struct file_lock **lease)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int lease_modify(struct file_lock **before, int arg)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int lock_may_read(struct inode *inode, loff_t start,
|
||||
unsigned long len)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline int lock_may_write(struct inode *inode, loff_t start,
|
||||
unsigned long len)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_FILE_LOCKING */
|
||||
|
||||
|
||||
@@ -1607,7 +1720,7 @@ struct super_block *sget(struct file_system_type *type,
|
||||
extern int get_sb_pseudo(struct file_system_type *, char *,
|
||||
const struct super_operations *ops, unsigned long,
|
||||
struct vfsmount *mnt);
|
||||
extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);
|
||||
extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);
|
||||
int __put_super_and_need_restart(struct super_block *sb);
|
||||
|
||||
/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
|
||||
@@ -1688,13 +1801,44 @@ static inline int break_lease(struct inode *inode, unsigned int mode)
|
||||
return 0;
|
||||
}
|
||||
#else /* !CONFIG_FILE_LOCKING */
|
||||
#define locks_mandatory_locked(a) ({ 0; })
|
||||
#define locks_mandatory_area(a, b, c, d, e) ({ 0; })
|
||||
#define __mandatory_lock(a) ({ 0; })
|
||||
#define mandatory_lock(a) ({ 0; })
|
||||
#define locks_verify_locked(a) ({ 0; })
|
||||
#define locks_verify_truncate(a, b, c) ({ 0; })
|
||||
#define break_lease(a, b) ({ 0; })
|
||||
static inline int locks_mandatory_locked(struct inode *inode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int locks_mandatory_area(int rw, struct inode *inode,
|
||||
struct file *filp, loff_t offset,
|
||||
size_t count)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int __mandatory_lock(struct inode *inode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int mandatory_lock(struct inode *inode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int locks_verify_locked(struct inode *inode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int locks_verify_truncate(struct inode *inode, struct file *filp,
|
||||
size_t size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int break_lease(struct inode *inode, unsigned int mode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_FILE_LOCKING */
|
||||
|
||||
/* fs/open.c */
|
||||
@@ -1731,6 +1875,13 @@ extern void bd_set_size(struct block_device *, loff_t size);
|
||||
extern void bd_forget(struct inode *inode);
|
||||
extern void bdput(struct block_device *);
|
||||
extern struct block_device *open_by_devnum(dev_t, fmode_t);
|
||||
extern void invalidate_bdev(struct block_device *);
|
||||
extern int sync_blockdev(struct block_device *bdev);
|
||||
extern struct super_block *freeze_bdev(struct block_device *);
|
||||
extern int thaw_bdev(struct block_device *bdev, struct super_block *sb);
|
||||
extern int fsync_bdev(struct block_device *);
|
||||
extern int fsync_super(struct super_block *);
|
||||
extern int fsync_no_super(struct block_device *);
|
||||
#else
|
||||
static inline void bd_forget(struct inode *inode) {}
|
||||
#endif
|
||||
@@ -1882,7 +2033,6 @@ static inline void allow_write_access(struct file *file)
|
||||
if (file)
|
||||
atomic_inc(&file->f_path.dentry->d_inode->i_writecount);
|
||||
}
|
||||
extern int do_pipe(int *);
|
||||
extern int do_pipe_flags(int *, int);
|
||||
extern struct file *create_read_pipe(struct file *f, int flags);
|
||||
extern struct file *create_write_pipe(int flags);
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
#ifndef _LINUX_I2C_ALGO_PCA_H
|
||||
#define _LINUX_I2C_ALGO_PCA_H
|
||||
|
||||
/* Clock speeds for the bus */
|
||||
/* Chips known to the pca algo */
|
||||
#define I2C_PCA_CHIP_9564 0x00
|
||||
#define I2C_PCA_CHIP_9665 0x01
|
||||
|
||||
/* Internal period for PCA9665 oscilator */
|
||||
#define I2C_PCA_OSC_PER 3 /* e10-8s */
|
||||
|
||||
/* Clock speeds for the bus for PCA9564*/
|
||||
#define I2C_PCA_CON_330kHz 0x00
|
||||
#define I2C_PCA_CON_288kHz 0x01
|
||||
#define I2C_PCA_CON_217kHz 0x02
|
||||
@@ -18,6 +25,26 @@
|
||||
#define I2C_PCA_ADR 0x02 /* OWN ADR Read/Write */
|
||||
#define I2C_PCA_CON 0x03 /* CONTROL Read/Write */
|
||||
|
||||
/* PCA9665 registers */
|
||||
#define I2C_PCA_INDPTR 0x00 /* INDIRECT Pointer Write Only */
|
||||
#define I2C_PCA_IND 0x02 /* INDIRECT Read/Write */
|
||||
|
||||
/* PCA9665 indirect registers */
|
||||
#define I2C_PCA_ICOUNT 0x00 /* Byte Count for buffered mode */
|
||||
#define I2C_PCA_IADR 0x01 /* OWN ADR */
|
||||
#define I2C_PCA_ISCLL 0x02 /* SCL LOW period */
|
||||
#define I2C_PCA_ISCLH 0x03 /* SCL HIGH period */
|
||||
#define I2C_PCA_ITO 0x04 /* TIMEOUT */
|
||||
#define I2C_PCA_IPRESET 0x05 /* Parallel bus reset */
|
||||
#define I2C_PCA_IMODE 0x06 /* I2C Bus mode */
|
||||
|
||||
/* PCA9665 I2C bus mode */
|
||||
#define I2C_PCA_MODE_STD 0x00 /* Standard mode */
|
||||
#define I2C_PCA_MODE_FAST 0x01 /* Fast mode */
|
||||
#define I2C_PCA_MODE_FASTP 0x02 /* Fast Plus mode */
|
||||
#define I2C_PCA_MODE_TURBO 0x03 /* Turbo mode */
|
||||
|
||||
|
||||
#define I2C_PCA_CON_AA 0x80 /* Assert Acknowledge */
|
||||
#define I2C_PCA_CON_ENSIO 0x40 /* Enable */
|
||||
#define I2C_PCA_CON_STA 0x20 /* Start */
|
||||
@@ -31,7 +58,9 @@ struct i2c_algo_pca_data {
|
||||
int (*read_byte) (void *data, int reg);
|
||||
int (*wait_for_completion) (void *data);
|
||||
void (*reset_chip) (void *data);
|
||||
/* i2c_clock values are defined in linux/i2c-algo-pca.h */
|
||||
/* For PCA9564, use one of the predefined frequencies:
|
||||
* 330000, 288000, 217000, 146000, 88000, 59000, 44000, 36000
|
||||
* For PCA9665, use the frequency you want here. */
|
||||
unsigned int i2c_clock;
|
||||
};
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ struct i2c_pca9564_pf_platform_data {
|
||||
* not supplied (negative value), but it
|
||||
* cannot exit some error conditions then */
|
||||
int i2c_clock_speed; /* values are defined in linux/i2c-algo-pca.h */
|
||||
int timeout; /* timeout = this value * 10us */
|
||||
int timeout; /* timeout in jiffies */
|
||||
};
|
||||
|
||||
#endif /* I2C_PCA9564_PLATFORM_H */
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
|
||||
#define ETH_P_AOE 0x88A2 /* ATA over Ethernet */
|
||||
#define ETH_P_TIPC 0x88CA /* TIPC */
|
||||
#define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */
|
||||
#define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
|
||||
|
||||
/*
|
||||
|
||||
@@ -484,6 +484,7 @@ int show_interrupts(struct seq_file *p, void *v);
|
||||
struct irq_desc;
|
||||
|
||||
extern int early_irq_init(void);
|
||||
extern int arch_probe_nr_irqs(void);
|
||||
extern int arch_early_irq_init(void);
|
||||
extern int arch_init_chip_data(struct irq_desc *desc, int cpu);
|
||||
|
||||
|
||||
+83
-3
@@ -180,11 +180,11 @@ struct irq_desc {
|
||||
unsigned int irqs_unhandled;
|
||||
spinlock_t lock;
|
||||
#ifdef CONFIG_SMP
|
||||
cpumask_t affinity;
|
||||
cpumask_var_t affinity;
|
||||
unsigned int cpu;
|
||||
#endif
|
||||
#ifdef CONFIG_GENERIC_PENDING_IRQ
|
||||
cpumask_t pending_mask;
|
||||
cpumask_var_t pending_mask;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_PROC_FS
|
||||
struct proc_dir_entry *dir;
|
||||
@@ -414,4 +414,84 @@ extern int set_irq_msi(unsigned int irq, struct msi_desc *entry);
|
||||
|
||||
#endif /* !CONFIG_S390 */
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/**
|
||||
* init_alloc_desc_masks - allocate cpumasks for irq_desc
|
||||
* @desc: pointer to irq_desc struct
|
||||
* @cpu: cpu which will be handling the cpumasks
|
||||
* @boot: true if need bootmem
|
||||
*
|
||||
* Allocates affinity and pending_mask cpumask if required.
|
||||
* Returns true if successful (or not required).
|
||||
* Side effect: affinity has all bits set, pending_mask has all bits clear.
|
||||
*/
|
||||
static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu,
|
||||
bool boot)
|
||||
{
|
||||
int node;
|
||||
|
||||
if (boot) {
|
||||
alloc_bootmem_cpumask_var(&desc->affinity);
|
||||
cpumask_setall(desc->affinity);
|
||||
|
||||
#ifdef CONFIG_GENERIC_PENDING_IRQ
|
||||
alloc_bootmem_cpumask_var(&desc->pending_mask);
|
||||
cpumask_clear(desc->pending_mask);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
node = cpu_to_node(cpu);
|
||||
|
||||
if (!alloc_cpumask_var_node(&desc->affinity, GFP_ATOMIC, node))
|
||||
return false;
|
||||
cpumask_setall(desc->affinity);
|
||||
|
||||
#ifdef CONFIG_GENERIC_PENDING_IRQ
|
||||
if (!alloc_cpumask_var_node(&desc->pending_mask, GFP_ATOMIC, node)) {
|
||||
free_cpumask_var(desc->affinity);
|
||||
return false;
|
||||
}
|
||||
cpumask_clear(desc->pending_mask);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* init_copy_desc_masks - copy cpumasks for irq_desc
|
||||
* @old_desc: pointer to old irq_desc struct
|
||||
* @new_desc: pointer to new irq_desc struct
|
||||
*
|
||||
* Insures affinity and pending_masks are copied to new irq_desc.
|
||||
* If !CONFIG_CPUMASKS_OFFSTACK the cpumasks are embedded in the
|
||||
* irq_desc struct so the copy is redundant.
|
||||
*/
|
||||
|
||||
static inline void init_copy_desc_masks(struct irq_desc *old_desc,
|
||||
struct irq_desc *new_desc)
|
||||
{
|
||||
#ifdef CONFIG_CPUMASKS_OFFSTACK
|
||||
cpumask_copy(new_desc->affinity, old_desc->affinity);
|
||||
|
||||
#ifdef CONFIG_GENERIC_PENDING_IRQ
|
||||
cpumask_copy(new_desc->pending_mask, old_desc->pending_mask);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#else /* !CONFIG_SMP */
|
||||
|
||||
static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu,
|
||||
bool boot)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline void init_copy_desc_masks(struct irq_desc *old_desc,
|
||||
struct irq_desc *new_desc)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
#endif /* _LINUX_IRQ_H */
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
# define for_each_irq_desc_reverse(irq, desc) \
|
||||
for (irq = nr_irqs - 1; irq >= 0; irq--)
|
||||
|
||||
#else /* CONFIG_GENERIC_HARDIRQS */
|
||||
|
||||
extern int nr_irqs;
|
||||
|
||||
+19
-3
@@ -182,6 +182,14 @@ struct kprobe_blackpoint {
|
||||
DECLARE_PER_CPU(struct kprobe *, current_kprobe);
|
||||
DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
|
||||
|
||||
/*
|
||||
* For #ifdef avoidance:
|
||||
*/
|
||||
static inline int kprobes_built_in(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_KRETPROBES
|
||||
extern void arch_prepare_kretprobe(struct kretprobe_instance *ri,
|
||||
struct pt_regs *regs);
|
||||
@@ -271,8 +279,16 @@ void unregister_kretprobes(struct kretprobe **rps, int num);
|
||||
void kprobe_flush_task(struct task_struct *tk);
|
||||
void recycle_rp_inst(struct kretprobe_instance *ri, struct hlist_head *head);
|
||||
|
||||
#else /* CONFIG_KPROBES */
|
||||
#else /* !CONFIG_KPROBES: */
|
||||
|
||||
static inline int kprobes_built_in(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline struct kprobe *get_kprobe(void *addr)
|
||||
{
|
||||
return NULL;
|
||||
@@ -329,5 +345,5 @@ static inline void unregister_kretprobes(struct kretprobe **rps, int num)
|
||||
static inline void kprobe_flush_task(struct task_struct *tk)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_KPROBES */
|
||||
#endif /* _LINUX_KPROBES_H */
|
||||
#endif /* CONFIG_KPROBES */
|
||||
#endif /* _LINUX_KPROBES_H */
|
||||
|
||||
@@ -49,4 +49,5 @@
|
||||
#define FUTEXFS_SUPER_MAGIC 0xBAD1DEA
|
||||
#define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA
|
||||
|
||||
#define STACK_END_MAGIC 0x57AC6E9D
|
||||
#endif /* __LINUX_MAGIC_H__ */
|
||||
|
||||
@@ -171,5 +171,6 @@
|
||||
#define VIOTAPE_MAJOR 230
|
||||
|
||||
#define BLOCK_EXT_MAJOR 259
|
||||
#define SCSI_OSD_MAJOR 260 /* open-osd's OSD scsi device */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#define TUN_MINOR 200
|
||||
#define MWAVE_MINOR 219 /* ACP/Mwave Modem */
|
||||
#define MPT_MINOR 220
|
||||
#define MPT2SAS_MINOR 221
|
||||
#define HPET_MINOR 228
|
||||
#define FUSE_MINOR 229
|
||||
#define KVM_MINOR 232
|
||||
|
||||
+49
-33
@@ -1,5 +1,5 @@
|
||||
#ifndef MMIOTRACE_H
|
||||
#define MMIOTRACE_H
|
||||
#ifndef _LINUX_MMIOTRACE_H
|
||||
#define _LINUX_MMIOTRACE_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/list.h>
|
||||
@@ -13,28 +13,34 @@ typedef void (*kmmio_post_handler_t)(struct kmmio_probe *,
|
||||
unsigned long condition, struct pt_regs *);
|
||||
|
||||
struct kmmio_probe {
|
||||
struct list_head list; /* kmmio internal list */
|
||||
unsigned long addr; /* start location of the probe point */
|
||||
unsigned long len; /* length of the probe region */
|
||||
kmmio_pre_handler_t pre_handler; /* Called before addr is executed. */
|
||||
kmmio_post_handler_t post_handler; /* Called after addr is executed */
|
||||
void *private;
|
||||
/* kmmio internal list: */
|
||||
struct list_head list;
|
||||
/* start location of the probe point: */
|
||||
unsigned long addr;
|
||||
/* length of the probe region: */
|
||||
unsigned long len;
|
||||
/* Called before addr is executed: */
|
||||
kmmio_pre_handler_t pre_handler;
|
||||
/* Called after addr is executed: */
|
||||
kmmio_post_handler_t post_handler;
|
||||
void *private;
|
||||
};
|
||||
|
||||
/* kmmio is active by some kmmio_probes? */
|
||||
static inline int is_kmmio_active(void)
|
||||
{
|
||||
extern unsigned int kmmio_count;
|
||||
return kmmio_count;
|
||||
}
|
||||
extern unsigned int kmmio_count;
|
||||
|
||||
extern int register_kmmio_probe(struct kmmio_probe *p);
|
||||
extern void unregister_kmmio_probe(struct kmmio_probe *p);
|
||||
|
||||
#ifdef CONFIG_MMIOTRACE
|
||||
/* kmmio is active by some kmmio_probes? */
|
||||
static inline int is_kmmio_active(void)
|
||||
{
|
||||
return kmmio_count;
|
||||
}
|
||||
|
||||
/* Called from page fault handler. */
|
||||
extern int kmmio_handler(struct pt_regs *regs, unsigned long addr);
|
||||
|
||||
#ifdef CONFIG_MMIOTRACE
|
||||
/* Called from ioremap.c */
|
||||
extern void mmiotrace_ioremap(resource_size_t offset, unsigned long size,
|
||||
void __iomem *addr);
|
||||
@@ -43,7 +49,17 @@ extern void mmiotrace_iounmap(volatile void __iomem *addr);
|
||||
/* For anyone to insert markers. Remember trailing newline. */
|
||||
extern int mmiotrace_printk(const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
#else
|
||||
#else /* !CONFIG_MMIOTRACE: */
|
||||
static inline int is_kmmio_active(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int kmmio_handler(struct pt_regs *regs, unsigned long addr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void mmiotrace_ioremap(resource_size_t offset,
|
||||
unsigned long size, void __iomem *addr)
|
||||
{
|
||||
@@ -63,28 +79,28 @@ static inline int mmiotrace_printk(const char *fmt, ...)
|
||||
#endif /* CONFIG_MMIOTRACE */
|
||||
|
||||
enum mm_io_opcode {
|
||||
MMIO_READ = 0x1, /* struct mmiotrace_rw */
|
||||
MMIO_WRITE = 0x2, /* struct mmiotrace_rw */
|
||||
MMIO_PROBE = 0x3, /* struct mmiotrace_map */
|
||||
MMIO_UNPROBE = 0x4, /* struct mmiotrace_map */
|
||||
MMIO_UNKNOWN_OP = 0x5, /* struct mmiotrace_rw */
|
||||
MMIO_READ = 0x1, /* struct mmiotrace_rw */
|
||||
MMIO_WRITE = 0x2, /* struct mmiotrace_rw */
|
||||
MMIO_PROBE = 0x3, /* struct mmiotrace_map */
|
||||
MMIO_UNPROBE = 0x4, /* struct mmiotrace_map */
|
||||
MMIO_UNKNOWN_OP = 0x5, /* struct mmiotrace_rw */
|
||||
};
|
||||
|
||||
struct mmiotrace_rw {
|
||||
resource_size_t phys; /* PCI address of register */
|
||||
unsigned long value;
|
||||
unsigned long pc; /* optional program counter */
|
||||
int map_id;
|
||||
unsigned char opcode; /* one of MMIO_{READ,WRITE,UNKNOWN_OP} */
|
||||
unsigned char width; /* size of register access in bytes */
|
||||
resource_size_t phys; /* PCI address of register */
|
||||
unsigned long value;
|
||||
unsigned long pc; /* optional program counter */
|
||||
int map_id;
|
||||
unsigned char opcode; /* one of MMIO_{READ,WRITE,UNKNOWN_OP} */
|
||||
unsigned char width; /* size of register access in bytes */
|
||||
};
|
||||
|
||||
struct mmiotrace_map {
|
||||
resource_size_t phys; /* base address in PCI space */
|
||||
unsigned long virt; /* base virtual address */
|
||||
unsigned long len; /* mapping size */
|
||||
int map_id;
|
||||
unsigned char opcode; /* MMIO_PROBE or MMIO_UNPROBE */
|
||||
resource_size_t phys; /* base address in PCI space */
|
||||
unsigned long virt; /* base virtual address */
|
||||
unsigned long len; /* mapping size */
|
||||
int map_id;
|
||||
unsigned char opcode; /* MMIO_PROBE or MMIO_UNPROBE */
|
||||
};
|
||||
|
||||
/* in kernel/trace/trace_mmiotrace.c */
|
||||
@@ -94,4 +110,4 @@ extern void mmio_trace_rw(struct mmiotrace_rw *rw);
|
||||
extern void mmio_trace_mapping(struct mmiotrace_map *map);
|
||||
extern int mmio_trace_printk(const char *fmt, va_list args);
|
||||
|
||||
#endif /* MMIOTRACE_H */
|
||||
#endif /* _LINUX_MMIOTRACE_H */
|
||||
|
||||
@@ -204,7 +204,7 @@ void ncp_update_inode2(struct inode *, struct ncp_entry_info *);
|
||||
/* linux/fs/ncpfs/dir.c */
|
||||
extern const struct inode_operations ncp_dir_inode_operations;
|
||||
extern const struct file_operations ncp_dir_operations;
|
||||
extern struct dentry_operations ncp_root_dentry_operations;
|
||||
extern const struct dentry_operations ncp_root_dentry_operations;
|
||||
int ncp_conn_logged_in(struct super_block *);
|
||||
int ncp_date_dos2unix(__le16 time, __le16 date);
|
||||
void ncp_date_unix2dos(int unix_date, __le16 * time, __le16 * date);
|
||||
|
||||
@@ -594,6 +594,14 @@ struct net_device_ops {
|
||||
#define HAVE_NETDEV_POLL
|
||||
void (*ndo_poll_controller)(struct net_device *dev);
|
||||
#endif
|
||||
#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
|
||||
int (*ndo_fcoe_ddp_setup)(struct net_device *dev,
|
||||
u16 xid,
|
||||
struct scatterlist *sgl,
|
||||
unsigned int sgc);
|
||||
int (*ndo_fcoe_ddp_done)(struct net_device *dev,
|
||||
u16 xid);
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -662,14 +670,17 @@ struct net_device
|
||||
#define NETIF_F_GRO 16384 /* Generic receive offload */
|
||||
#define NETIF_F_LRO 32768 /* large receive offload */
|
||||
|
||||
#define NETIF_F_FCOE_CRC (1 << 24) /* FCoE CRC32 */
|
||||
|
||||
/* Segmentation offload features */
|
||||
#define NETIF_F_GSO_SHIFT 16
|
||||
#define NETIF_F_GSO_MASK 0xffff0000
|
||||
#define NETIF_F_GSO_MASK 0x00ff0000
|
||||
#define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT)
|
||||
#define NETIF_F_UFO (SKB_GSO_UDP << NETIF_F_GSO_SHIFT)
|
||||
#define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT)
|
||||
#define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT)
|
||||
#define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT)
|
||||
#define NETIF_F_FSO (SKB_GSO_FCOE << NETIF_F_GSO_SHIFT)
|
||||
|
||||
/* List of features with software fallbacks. */
|
||||
#define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6)
|
||||
@@ -852,6 +863,11 @@ struct net_device
|
||||
struct dcbnl_rtnl_ops *dcbnl_ops;
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
|
||||
/* max exchange id for FCoE LRO by ddp */
|
||||
unsigned int fcoe_ddp_xid;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_COMPAT_NET_DEV_OPS
|
||||
struct {
|
||||
int (*init)(struct net_device *dev);
|
||||
|
||||
@@ -415,7 +415,7 @@ extern const struct inode_operations nfs_dir_inode_operations;
|
||||
extern const struct inode_operations nfs3_dir_inode_operations;
|
||||
#endif /* CONFIG_NFS_V3 */
|
||||
extern const struct file_operations nfs_dir_operations;
|
||||
extern struct dentry_operations nfs_dentry_operations;
|
||||
extern const struct dentry_operations nfs_dentry_operations;
|
||||
|
||||
extern void nfs_force_lookup_revalidate(struct inode *dir);
|
||||
extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_fattr *fattr);
|
||||
|
||||
@@ -785,7 +785,7 @@ struct nfs_access_entry;
|
||||
*/
|
||||
struct nfs_rpc_ops {
|
||||
u32 version; /* Protocol version */
|
||||
struct dentry_operations *dentry_ops;
|
||||
const struct dentry_operations *dentry_ops;
|
||||
const struct inode_operations *dir_inode_ops;
|
||||
const struct inode_operations *file_inode_ops;
|
||||
|
||||
|
||||
@@ -1237,6 +1237,7 @@
|
||||
#define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451
|
||||
#define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452
|
||||
#define PCI_DEVICE_ID_NVIDIA_NVENET_23 0x0453
|
||||
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_SMBUS 0x0542
|
||||
#define PCI_DEVICE_ID_NVIDIA_NVENET_24 0x054C
|
||||
#define PCI_DEVICE_ID_NVIDIA_NVENET_25 0x054D
|
||||
#define PCI_DEVICE_ID_NVIDIA_NVENET_26 0x054E
|
||||
@@ -1247,11 +1248,14 @@
|
||||
#define PCI_DEVICE_ID_NVIDIA_NVENET_31 0x07DF
|
||||
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560
|
||||
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C
|
||||
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP78S_SMBUS 0x0752
|
||||
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759
|
||||
#define PCI_DEVICE_ID_NVIDIA_NVENET_32 0x0760
|
||||
#define PCI_DEVICE_ID_NVIDIA_NVENET_33 0x0761
|
||||
#define PCI_DEVICE_ID_NVIDIA_NVENET_34 0x0762
|
||||
#define PCI_DEVICE_ID_NVIDIA_NVENET_35 0x0763
|
||||
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_SMBUS 0x07D8
|
||||
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP79_SMBUS 0x0AA2
|
||||
#define PCI_DEVICE_ID_NVIDIA_NVENET_36 0x0AB0
|
||||
#define PCI_DEVICE_ID_NVIDIA_NVENET_37 0x0AB1
|
||||
#define PCI_DEVICE_ID_NVIDIA_NVENET_38 0x0AB2
|
||||
@@ -1475,6 +1479,7 @@
|
||||
#define PCI_DEVICE_ID_SERVERWORKS_HT1000IDE 0x0214
|
||||
#define PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2 0x0217
|
||||
#define PCI_DEVICE_ID_SERVERWORKS_CSB6LPC 0x0227
|
||||
#define PCI_DEVICE_ID_SERVERWORKS_HT1100LD 0x0408
|
||||
|
||||
#define PCI_VENDOR_ID_SBE 0x1176
|
||||
#define PCI_DEVICE_ID_SBE_WANXL100 0x0301
|
||||
|
||||
+108
-53
@@ -5,53 +5,66 @@
|
||||
#include <linux/slab.h> /* For kmalloc() */
|
||||
#include <linux/smp.h>
|
||||
#include <linux/cpumask.h>
|
||||
#include <linux/pfn.h>
|
||||
|
||||
#include <asm/percpu.h>
|
||||
|
||||
#ifndef PER_CPU_BASE_SECTION
|
||||
#ifdef CONFIG_SMP
|
||||
#define PER_CPU_BASE_SECTION ".data.percpu"
|
||||
#else
|
||||
#define PER_CPU_BASE_SECTION ".data"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#define DEFINE_PER_CPU(type, name) \
|
||||
__attribute__((__section__(".data.percpu"))) \
|
||||
PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
|
||||
|
||||
#ifdef MODULE
|
||||
#define SHARED_ALIGNED_SECTION ".data.percpu"
|
||||
#define PER_CPU_SHARED_ALIGNED_SECTION ""
|
||||
#else
|
||||
#define SHARED_ALIGNED_SECTION ".data.percpu.shared_aligned"
|
||||
#define PER_CPU_SHARED_ALIGNED_SECTION ".shared_aligned"
|
||||
#endif
|
||||
#define PER_CPU_FIRST_SECTION ".first"
|
||||
|
||||
#else
|
||||
|
||||
#define PER_CPU_SHARED_ALIGNED_SECTION ""
|
||||
#define PER_CPU_FIRST_SECTION ""
|
||||
|
||||
#endif
|
||||
|
||||
#define DEFINE_PER_CPU_SECTION(type, name, section) \
|
||||
__attribute__((__section__(PER_CPU_BASE_SECTION section))) \
|
||||
PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
|
||||
|
||||
#define DEFINE_PER_CPU(type, name) \
|
||||
DEFINE_PER_CPU_SECTION(type, name, "")
|
||||
|
||||
#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \
|
||||
__attribute__((__section__(SHARED_ALIGNED_SECTION))) \
|
||||
PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name \
|
||||
DEFINE_PER_CPU_SECTION(type, name, PER_CPU_SHARED_ALIGNED_SECTION) \
|
||||
____cacheline_aligned_in_smp
|
||||
|
||||
#define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \
|
||||
__attribute__((__section__(".data.percpu.page_aligned"))) \
|
||||
PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
|
||||
#else
|
||||
#define DEFINE_PER_CPU(type, name) \
|
||||
PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
|
||||
#define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \
|
||||
DEFINE_PER_CPU_SECTION(type, name, ".page_aligned")
|
||||
|
||||
#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \
|
||||
DEFINE_PER_CPU(type, name)
|
||||
|
||||
#define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \
|
||||
DEFINE_PER_CPU(type, name)
|
||||
#endif
|
||||
#define DEFINE_PER_CPU_FIRST(type, name) \
|
||||
DEFINE_PER_CPU_SECTION(type, name, PER_CPU_FIRST_SECTION)
|
||||
|
||||
#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var)
|
||||
#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var)
|
||||
|
||||
/* Enough to cover all DEFINE_PER_CPUs in kernel, including modules. */
|
||||
#ifndef PERCPU_ENOUGH_ROOM
|
||||
/* enough to cover all DEFINE_PER_CPUs in modules */
|
||||
#ifdef CONFIG_MODULES
|
||||
#define PERCPU_MODULE_RESERVE 8192
|
||||
#define PERCPU_MODULE_RESERVE (8 << 10)
|
||||
#else
|
||||
#define PERCPU_MODULE_RESERVE 0
|
||||
#define PERCPU_MODULE_RESERVE 0
|
||||
#endif
|
||||
|
||||
#ifndef PERCPU_ENOUGH_ROOM
|
||||
#define PERCPU_ENOUGH_ROOM \
|
||||
(__per_cpu_end - __per_cpu_start + PERCPU_MODULE_RESERVE)
|
||||
#endif /* PERCPU_ENOUGH_ROOM */
|
||||
(ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \
|
||||
PERCPU_MODULE_RESERVE)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Must be an lvalue. Since @var must be a simple identifier,
|
||||
@@ -65,52 +78,94 @@
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
#ifdef CONFIG_HAVE_DYNAMIC_PER_CPU_AREA
|
||||
|
||||
/* minimum unit size, also is the maximum supported allocation size */
|
||||
#define PCPU_MIN_UNIT_SIZE PFN_ALIGN(64 << 10)
|
||||
|
||||
/*
|
||||
* PERCPU_DYNAMIC_RESERVE indicates the amount of free area to piggy
|
||||
* back on the first chunk for dynamic percpu allocation if arch is
|
||||
* manually allocating and mapping it for faster access (as a part of
|
||||
* large page mapping for example).
|
||||
*
|
||||
* The following values give between one and two pages of free space
|
||||
* after typical minimal boot (2-way SMP, single disk and NIC) with
|
||||
* both defconfig and a distro config on x86_64 and 32. More
|
||||
* intelligent way to determine this would be nice.
|
||||
*/
|
||||
#if BITS_PER_LONG > 32
|
||||
#define PERCPU_DYNAMIC_RESERVE (20 << 10)
|
||||
#else
|
||||
#define PERCPU_DYNAMIC_RESERVE (12 << 10)
|
||||
#endif
|
||||
|
||||
extern void *pcpu_base_addr;
|
||||
|
||||
typedef struct page * (*pcpu_get_page_fn_t)(unsigned int cpu, int pageno);
|
||||
typedef void (*pcpu_populate_pte_fn_t)(unsigned long addr);
|
||||
|
||||
extern size_t __init pcpu_setup_first_chunk(pcpu_get_page_fn_t get_page_fn,
|
||||
size_t static_size, size_t reserved_size,
|
||||
ssize_t dyn_size, ssize_t unit_size,
|
||||
void *base_addr,
|
||||
pcpu_populate_pte_fn_t populate_pte_fn);
|
||||
|
||||
extern ssize_t __init pcpu_embed_first_chunk(
|
||||
size_t static_size, size_t reserved_size,
|
||||
ssize_t dyn_size, ssize_t unit_size);
|
||||
|
||||
/*
|
||||
* Use this to get to a cpu's version of the per-cpu object
|
||||
* dynamically allocated. Non-atomic access to the current CPU's
|
||||
* version should probably be combined with get_cpu()/put_cpu().
|
||||
*/
|
||||
#define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu)))
|
||||
|
||||
extern void *__alloc_reserved_percpu(size_t size, size_t align);
|
||||
|
||||
#else /* CONFIG_HAVE_DYNAMIC_PER_CPU_AREA */
|
||||
|
||||
struct percpu_data {
|
||||
void *ptrs[1];
|
||||
};
|
||||
|
||||
#define __percpu_disguise(pdata) (struct percpu_data *)~(unsigned long)(pdata)
|
||||
/*
|
||||
* Use this to get to a cpu's version of the per-cpu object dynamically
|
||||
* allocated. Non-atomic access to the current CPU's version should
|
||||
* probably be combined with get_cpu()/put_cpu().
|
||||
*/
|
||||
#define percpu_ptr(ptr, cpu) \
|
||||
({ \
|
||||
struct percpu_data *__p = __percpu_disguise(ptr); \
|
||||
(__typeof__(ptr))__p->ptrs[(cpu)]; \
|
||||
|
||||
#define per_cpu_ptr(ptr, cpu) \
|
||||
({ \
|
||||
struct percpu_data *__p = __percpu_disguise(ptr); \
|
||||
(__typeof__(ptr))__p->ptrs[(cpu)]; \
|
||||
})
|
||||
|
||||
extern void *__percpu_alloc_mask(size_t size, gfp_t gfp, cpumask_t *mask);
|
||||
extern void percpu_free(void *__pdata);
|
||||
#endif /* CONFIG_HAVE_DYNAMIC_PER_CPU_AREA */
|
||||
|
||||
extern void *__alloc_percpu(size_t size, size_t align);
|
||||
extern void free_percpu(void *__pdata);
|
||||
|
||||
#else /* CONFIG_SMP */
|
||||
|
||||
#define percpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); })
|
||||
#define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); })
|
||||
|
||||
static __always_inline void *__percpu_alloc_mask(size_t size, gfp_t gfp, cpumask_t *mask)
|
||||
static inline void *__alloc_percpu(size_t size, size_t align)
|
||||
{
|
||||
return kzalloc(size, gfp);
|
||||
/*
|
||||
* Can't easily make larger alignment work with kmalloc. WARN
|
||||
* on it. Larger alignment should only be used for module
|
||||
* percpu sections on SMP for which this path isn't used.
|
||||
*/
|
||||
WARN_ON_ONCE(align > SMP_CACHE_BYTES);
|
||||
return kzalloc(size, GFP_KERNEL);
|
||||
}
|
||||
|
||||
static inline void percpu_free(void *__pdata)
|
||||
static inline void free_percpu(void *p)
|
||||
{
|
||||
kfree(__pdata);
|
||||
kfree(p);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
#define percpu_alloc_mask(size, gfp, mask) \
|
||||
__percpu_alloc_mask((size), (gfp), &(mask))
|
||||
|
||||
#define percpu_alloc(size, gfp) percpu_alloc_mask((size), (gfp), cpu_online_map)
|
||||
|
||||
/* (legacy) interface for use without CPU hotplug handling */
|
||||
|
||||
#define __alloc_percpu(size) percpu_alloc_mask((size), GFP_KERNEL, \
|
||||
cpu_possible_map)
|
||||
#define alloc_percpu(type) (type *)__alloc_percpu(sizeof(type))
|
||||
#define free_percpu(ptr) percpu_free((ptr))
|
||||
#define per_cpu_ptr(ptr, cpu) percpu_ptr((ptr), (cpu))
|
||||
#define alloc_percpu(type) (type *)__alloc_percpu(sizeof(type), \
|
||||
__alignof__(type))
|
||||
|
||||
#endif /* __LINUX_PERCPU_H */
|
||||
|
||||
@@ -198,6 +198,7 @@ struct mem_dqblk {
|
||||
qsize_t dqb_bhardlimit; /* absolute limit on disk blks alloc */
|
||||
qsize_t dqb_bsoftlimit; /* preferred limit on disk blks */
|
||||
qsize_t dqb_curspace; /* current used space */
|
||||
qsize_t dqb_rsvspace; /* current reserved space for delalloc*/
|
||||
qsize_t dqb_ihardlimit; /* absolute limit on allocated inodes */
|
||||
qsize_t dqb_isoftlimit; /* preferred inode limit */
|
||||
qsize_t dqb_curinodes; /* current # allocated inodes */
|
||||
@@ -276,8 +277,6 @@ struct dquot {
|
||||
struct mem_dqblk dq_dqb; /* Diskquota usage */
|
||||
};
|
||||
|
||||
#define NODQUOT (struct dquot *)NULL
|
||||
|
||||
#define QUOTA_OK 0
|
||||
#define NO_QUOTA 1
|
||||
|
||||
@@ -308,6 +307,14 @@ struct dquot_operations {
|
||||
int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */
|
||||
int (*mark_dirty) (struct dquot *); /* Dquot is marked dirty */
|
||||
int (*write_info) (struct super_block *, int); /* Write of quota "superblock" */
|
||||
/* reserve quota for delayed block allocation */
|
||||
int (*reserve_space) (struct inode *, qsize_t, int);
|
||||
/* claim reserved quota for delayed alloc */
|
||||
int (*claim_space) (struct inode *, qsize_t);
|
||||
/* release rsved quota for delayed alloc */
|
||||
void (*release_rsv) (struct inode *, qsize_t);
|
||||
/* get reserved quota for delayed alloc */
|
||||
qsize_t (*get_reserved_space) (struct inode *);
|
||||
};
|
||||
|
||||
/* Operations handling requests from userspace */
|
||||
|
||||
+78
-41
@@ -35,6 +35,11 @@ void dquot_destroy(struct dquot *dquot);
|
||||
int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc);
|
||||
int dquot_alloc_inode(const struct inode *inode, qsize_t number);
|
||||
|
||||
int dquot_reserve_space(struct inode *inode, qsize_t number, int prealloc);
|
||||
int dquot_claim_space(struct inode *inode, qsize_t number);
|
||||
void dquot_release_reserved_space(struct inode *inode, qsize_t number);
|
||||
qsize_t dquot_get_reserved_space(struct inode *inode);
|
||||
|
||||
int dquot_free_space(struct inode *inode, qsize_t number);
|
||||
int dquot_free_inode(const struct inode *inode, qsize_t number);
|
||||
|
||||
@@ -183,6 +188,16 @@ static inline int vfs_dq_alloc_space(struct inode *inode, qsize_t nr)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline int vfs_dq_reserve_space(struct inode *inode, qsize_t nr)
|
||||
{
|
||||
if (sb_any_quota_active(inode->i_sb)) {
|
||||
/* Used space is updated in alloc_space() */
|
||||
if (inode->i_sb->dq_op->reserve_space(inode, nr, 0) == NO_QUOTA)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int vfs_dq_alloc_inode(struct inode *inode)
|
||||
{
|
||||
if (sb_any_quota_active(inode->i_sb)) {
|
||||
@@ -193,6 +208,31 @@ static inline int vfs_dq_alloc_inode(struct inode *inode)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert in-memory reserved quotas to real consumed quotas
|
||||
*/
|
||||
static inline int vfs_dq_claim_space(struct inode *inode, qsize_t nr)
|
||||
{
|
||||
if (sb_any_quota_active(inode->i_sb)) {
|
||||
if (inode->i_sb->dq_op->claim_space(inode, nr) == NO_QUOTA)
|
||||
return 1;
|
||||
} else
|
||||
inode_add_bytes(inode, nr);
|
||||
|
||||
mark_inode_dirty(inode);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Release reserved (in-memory) quotas
|
||||
*/
|
||||
static inline
|
||||
void vfs_dq_release_reservation_space(struct inode *inode, qsize_t nr)
|
||||
{
|
||||
if (sb_any_quota_active(inode->i_sb))
|
||||
inode->i_sb->dq_op->release_rsv(inode, nr);
|
||||
}
|
||||
|
||||
static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr)
|
||||
{
|
||||
if (sb_any_quota_active(inode->i_sb))
|
||||
@@ -339,6 +379,22 @@ static inline int vfs_dq_alloc_space(struct inode *inode, qsize_t nr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int vfs_dq_reserve_space(struct inode *inode, qsize_t nr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int vfs_dq_claim_space(struct inode *inode, qsize_t nr)
|
||||
{
|
||||
return vfs_dq_alloc_space(inode, nr);
|
||||
}
|
||||
|
||||
static inline
|
||||
int vfs_dq_release_reservation_space(struct inode *inode, qsize_t nr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr)
|
||||
{
|
||||
inode_sub_bytes(inode, nr);
|
||||
@@ -354,67 +410,48 @@ static inline void vfs_dq_free_space(struct inode *inode, qsize_t nr)
|
||||
|
||||
static inline int vfs_dq_prealloc_block_nodirty(struct inode *inode, qsize_t nr)
|
||||
{
|
||||
return vfs_dq_prealloc_space_nodirty(inode,
|
||||
nr << inode->i_sb->s_blocksize_bits);
|
||||
return vfs_dq_prealloc_space_nodirty(inode, nr << inode->i_blkbits);
|
||||
}
|
||||
|
||||
static inline int vfs_dq_prealloc_block(struct inode *inode, qsize_t nr)
|
||||
{
|
||||
return vfs_dq_prealloc_space(inode,
|
||||
nr << inode->i_sb->s_blocksize_bits);
|
||||
return vfs_dq_prealloc_space(inode, nr << inode->i_blkbits);
|
||||
}
|
||||
|
||||
static inline int vfs_dq_alloc_block_nodirty(struct inode *inode, qsize_t nr)
|
||||
{
|
||||
return vfs_dq_alloc_space_nodirty(inode,
|
||||
nr << inode->i_sb->s_blocksize_bits);
|
||||
return vfs_dq_alloc_space_nodirty(inode, nr << inode->i_blkbits);
|
||||
}
|
||||
|
||||
static inline int vfs_dq_alloc_block(struct inode *inode, qsize_t nr)
|
||||
{
|
||||
return vfs_dq_alloc_space(inode,
|
||||
nr << inode->i_sb->s_blocksize_bits);
|
||||
return vfs_dq_alloc_space(inode, nr << inode->i_blkbits);
|
||||
}
|
||||
|
||||
static inline int vfs_dq_reserve_block(struct inode *inode, qsize_t nr)
|
||||
{
|
||||
return vfs_dq_reserve_space(inode, nr << inode->i_blkbits);
|
||||
}
|
||||
|
||||
static inline int vfs_dq_claim_block(struct inode *inode, qsize_t nr)
|
||||
{
|
||||
return vfs_dq_claim_space(inode, nr << inode->i_blkbits);
|
||||
}
|
||||
|
||||
static inline
|
||||
void vfs_dq_release_reservation_block(struct inode *inode, qsize_t nr)
|
||||
{
|
||||
vfs_dq_release_reservation_space(inode, nr << inode->i_blkbits);
|
||||
}
|
||||
|
||||
static inline void vfs_dq_free_block_nodirty(struct inode *inode, qsize_t nr)
|
||||
{
|
||||
vfs_dq_free_space_nodirty(inode, nr << inode->i_sb->s_blocksize_bits);
|
||||
vfs_dq_free_space_nodirty(inode, nr << inode->i_blkbits);
|
||||
}
|
||||
|
||||
static inline void vfs_dq_free_block(struct inode *inode, qsize_t nr)
|
||||
{
|
||||
vfs_dq_free_space(inode, nr << inode->i_sb->s_blocksize_bits);
|
||||
vfs_dq_free_space(inode, nr << inode->i_blkbits);
|
||||
}
|
||||
|
||||
/*
|
||||
* Define uppercase equivalents for compatibility with old function names
|
||||
* Can go away when we think all users have been converted (15/04/2008)
|
||||
*/
|
||||
#define DQUOT_INIT(inode) vfs_dq_init(inode)
|
||||
#define DQUOT_DROP(inode) vfs_dq_drop(inode)
|
||||
#define DQUOT_PREALLOC_SPACE_NODIRTY(inode, nr) \
|
||||
vfs_dq_prealloc_space_nodirty(inode, nr)
|
||||
#define DQUOT_PREALLOC_SPACE(inode, nr) vfs_dq_prealloc_space(inode, nr)
|
||||
#define DQUOT_ALLOC_SPACE_NODIRTY(inode, nr) \
|
||||
vfs_dq_alloc_space_nodirty(inode, nr)
|
||||
#define DQUOT_ALLOC_SPACE(inode, nr) vfs_dq_alloc_space(inode, nr)
|
||||
#define DQUOT_PREALLOC_BLOCK_NODIRTY(inode, nr) \
|
||||
vfs_dq_prealloc_block_nodirty(inode, nr)
|
||||
#define DQUOT_PREALLOC_BLOCK(inode, nr) vfs_dq_prealloc_block(inode, nr)
|
||||
#define DQUOT_ALLOC_BLOCK_NODIRTY(inode, nr) \
|
||||
vfs_dq_alloc_block_nodirty(inode, nr)
|
||||
#define DQUOT_ALLOC_BLOCK(inode, nr) vfs_dq_alloc_block(inode, nr)
|
||||
#define DQUOT_ALLOC_INODE(inode) vfs_dq_alloc_inode(inode)
|
||||
#define DQUOT_FREE_SPACE_NODIRTY(inode, nr) \
|
||||
vfs_dq_free_space_nodirty(inode, nr)
|
||||
#define DQUOT_FREE_SPACE(inode, nr) vfs_dq_free_space(inode, nr)
|
||||
#define DQUOT_FREE_BLOCK_NODIRTY(inode, nr) \
|
||||
vfs_dq_free_block_nodirty(inode, nr)
|
||||
#define DQUOT_FREE_BLOCK(inode, nr) vfs_dq_free_block(inode, nr)
|
||||
#define DQUOT_FREE_INODE(inode) vfs_dq_free_inode(inode)
|
||||
#define DQUOT_TRANSFER(inode, iattr) vfs_dq_transfer(inode, iattr)
|
||||
#define DQUOT_SYNC(sb) vfs_dq_sync(sb)
|
||||
#define DQUOT_OFF(sb, remount) vfs_dq_off(sb, remount)
|
||||
#define DQUOT_ON_REMOUNT(sb) vfs_dq_quota_on_remount(sb)
|
||||
|
||||
#endif /* _LINUX_QUOTAOPS_ */
|
||||
|
||||
+14
-2
@@ -1185,10 +1185,9 @@ struct task_struct {
|
||||
pid_t pid;
|
||||
pid_t tgid;
|
||||
|
||||
#ifdef CONFIG_CC_STACKPROTECTOR
|
||||
/* Canary value for the -fstack-protector gcc feature */
|
||||
unsigned long stack_canary;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* pointers to (original) parent process, youngest child, younger sibling,
|
||||
* older sibling, respectively. (p->father can be replaced with
|
||||
@@ -2107,6 +2106,19 @@ static inline int object_is_on_stack(void *obj)
|
||||
|
||||
extern void thread_info_cache_init(void);
|
||||
|
||||
#ifdef CONFIG_DEBUG_STACK_USAGE
|
||||
static inline unsigned long stack_not_used(struct task_struct *p)
|
||||
{
|
||||
unsigned long *n = end_of_stack(p);
|
||||
|
||||
do { /* Skip over canary */
|
||||
n++;
|
||||
} while (!*n);
|
||||
|
||||
return (unsigned long)n - (unsigned long)end_of_stack(p);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* set thread flags in other task's structures
|
||||
* - see asm/thread_info.h for TIF_xxxx flags available
|
||||
*/
|
||||
|
||||
@@ -237,6 +237,8 @@ enum {
|
||||
SKB_GSO_TCP_ECN = 1 << 3,
|
||||
|
||||
SKB_GSO_TCPV6 = 1 << 4,
|
||||
|
||||
SKB_GSO_FCOE = 1 << 5,
|
||||
};
|
||||
|
||||
#if BITS_PER_LONG > 32
|
||||
|
||||
@@ -176,6 +176,12 @@ static inline void init_call_single_data(void)
|
||||
#define put_cpu() preempt_enable()
|
||||
#define put_cpu_no_resched() preempt_enable_no_resched()
|
||||
|
||||
/*
|
||||
* Callback to arch code if there's nosmp or maxcpus=0 on the
|
||||
* boot command line:
|
||||
*/
|
||||
extern void arch_disable_smp_support(void);
|
||||
|
||||
void smp_setup_processor_id(void);
|
||||
|
||||
#endif /* __LINUX_SMP_H */
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef _LINUX_STACKPROTECTOR_H
|
||||
#define _LINUX_STACKPROTECTOR_H 1
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/random.h>
|
||||
|
||||
#ifdef CONFIG_CC_STACKPROTECTOR
|
||||
# include <asm/stackprotector.h>
|
||||
#else
|
||||
static inline void boot_init_stack_canary(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -193,5 +193,11 @@ int arch_update_cpu_topology(void);
|
||||
#ifndef topology_core_siblings
|
||||
#define topology_core_siblings(cpu) cpumask_of_cpu(cpu)
|
||||
#endif
|
||||
#ifndef topology_thread_cpumask
|
||||
#define topology_thread_cpumask(cpu) cpumask_of(cpu)
|
||||
#endif
|
||||
#ifndef topology_core_cpumask
|
||||
#define topology_core_cpumask(cpu) cpumask_of(cpu)
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_TOPOLOGY_H */
|
||||
|
||||
@@ -95,6 +95,9 @@ extern struct vm_struct *remove_vm_area(const void *addr);
|
||||
|
||||
extern int map_vm_area(struct vm_struct *area, pgprot_t prot,
|
||||
struct page ***pages);
|
||||
extern int map_kernel_range_noflush(unsigned long start, unsigned long size,
|
||||
pgprot_t prot, struct page **pages);
|
||||
extern void unmap_kernel_range_noflush(unsigned long addr, unsigned long size);
|
||||
extern void unmap_kernel_range(unsigned long addr, unsigned long size);
|
||||
|
||||
/* Allocate/destroy a 'vmalloc' VM area. */
|
||||
@@ -110,5 +113,6 @@ extern long vwrite(char *buf, char *addr, unsigned long count);
|
||||
*/
|
||||
extern rwlock_t vmlist_lock;
|
||||
extern struct vm_struct *vmlist;
|
||||
extern __init void vm_area_register_early(struct vm_struct *vm, size_t align);
|
||||
|
||||
#endif /* _LINUX_VMALLOC_H */
|
||||
|
||||
Reference in New Issue
Block a user