mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
Merge commit 'v3.7-rc1' into stable/for-linus-3.7
* commit 'v3.7-rc1': (10892 commits) Linux 3.7-rc1 x86, boot: Explicitly include autoconf.h for hostprogs perf: Fix UAPI fallout ARM: config: make sure that platforms are ordered by option string ARM: config: sort select statements alphanumerically UAPI: (Scripted) Disintegrate include/linux/byteorder UAPI: (Scripted) Disintegrate include/linux UAPI: Unexport linux/blk_types.h UAPI: Unexport part of linux/ppp-comp.h perf: Handle new rbtree implementation procfs: don't need a PATH_MAX allocation to hold a string representation of an int vfs: embed struct filename inside of names_cache allocation if possible audit: make audit_inode take struct filename vfs: make path_openat take a struct filename pointer vfs: turn do_path_lookup into wrapper around struct filename variant audit: allow audit code to satisfy getname requests from its names_list vfs: define struct filename and have getname() return it btrfs: Fix compilation with user namespace support enabled userns: Fix posix_acl_file_xattr_userns gid conversion userns: Properly print bluetooth socket uids ...
This commit is contained in:
commit
e05dacd71d
13183 changed files with 693597 additions and 375473 deletions
235
include/acpi/acbuffer.h
Normal file
235
include/acpi/acbuffer.h
Normal file
|
|
@ -0,0 +1,235 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Name: acbuffer.h - Support for buffers returned by ACPI predefined names
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions, and the following disclaimer,
|
||||
* without modification.
|
||||
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
|
||||
* substantially similar to the "NO WARRANTY" disclaimer below
|
||||
* ("Disclaimer") and any redistribution must be conditioned upon
|
||||
* including a substantially similar Disclaimer requirement for further
|
||||
* binary redistribution.
|
||||
* 3. Neither the names of the above-listed copyright holders nor the names
|
||||
* of any contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of the
|
||||
* GNU General Public License ("GPL") version 2 as published by the Free
|
||||
* Software Foundation.
|
||||
*
|
||||
* NO WARRANTY
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef __ACBUFFER_H__
|
||||
#define __ACBUFFER_H__
|
||||
|
||||
/*
|
||||
* Contains buffer structures for these predefined names:
|
||||
* _FDE, _GRT, _GTM, _PLD, _SRT
|
||||
*/
|
||||
|
||||
/*
|
||||
* Note: C bitfields are not used for this reason:
|
||||
*
|
||||
* "Bitfields are great and easy to read, but unfortunately the C language
|
||||
* does not specify the layout of bitfields in memory, which means they are
|
||||
* essentially useless for dealing with packed data in on-disk formats or
|
||||
* binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
|
||||
* this decision was a design error in C. Ritchie could have picked an order
|
||||
* and stuck with it." Norman Ramsey.
|
||||
* See http://stackoverflow.com/a/1053662/41661
|
||||
*/
|
||||
|
||||
/* _FDE return value */
|
||||
|
||||
struct acpi_fde_info {
|
||||
u32 floppy0;
|
||||
u32 floppy1;
|
||||
u32 floppy2;
|
||||
u32 floppy3;
|
||||
u32 tape;
|
||||
};
|
||||
|
||||
/*
|
||||
* _GRT return value
|
||||
* _SRT input value
|
||||
*/
|
||||
struct acpi_grt_info {
|
||||
u16 year;
|
||||
u8 month;
|
||||
u8 day;
|
||||
u8 hour;
|
||||
u8 minute;
|
||||
u8 second;
|
||||
u8 valid;
|
||||
u16 milliseconds;
|
||||
u16 timezone;
|
||||
u8 daylight;
|
||||
u8 reserved[3];
|
||||
};
|
||||
|
||||
/* _GTM return value */
|
||||
|
||||
struct acpi_gtm_info {
|
||||
u32 pio_speed0;
|
||||
u32 dma_speed0;
|
||||
u32 pio_speed1;
|
||||
u32 dma_speed1;
|
||||
u32 flags;
|
||||
};
|
||||
|
||||
/*
|
||||
* Formatted _PLD return value. The minimum size is a package containing
|
||||
* one buffer.
|
||||
* Revision 1: Buffer is 16 bytes (128 bits)
|
||||
* Revision 2: Buffer is 20 bytes (160 bits)
|
||||
*
|
||||
* Note: This structure is returned from the acpi_decode_pld_buffer
|
||||
* interface.
|
||||
*/
|
||||
struct acpi_pld_info {
|
||||
u8 revision;
|
||||
u8 ignore_color;
|
||||
u32 color;
|
||||
u16 width;
|
||||
u16 height;
|
||||
u8 user_visible;
|
||||
u8 dock;
|
||||
u8 lid;
|
||||
u8 panel;
|
||||
u8 vertical_position;
|
||||
u8 horizontal_position;
|
||||
u8 shape;
|
||||
u8 group_orientation;
|
||||
u8 group_token;
|
||||
u8 group_position;
|
||||
u8 bay;
|
||||
u8 ejectable;
|
||||
u8 ospm_eject_required;
|
||||
u8 cabinet_number;
|
||||
u8 card_cage_number;
|
||||
u8 reference;
|
||||
u8 rotation;
|
||||
u8 order;
|
||||
u8 reserved;
|
||||
u16 vertical_offset;
|
||||
u16 horizontal_offset;
|
||||
};
|
||||
|
||||
/*
|
||||
* Macros to:
|
||||
* 1) Convert a _PLD buffer to internal struct acpi_pld_info format - ACPI_PLD_GET*
|
||||
* (Used by acpi_decode_pld_buffer)
|
||||
* 2) Construct a _PLD buffer - ACPI_PLD_SET*
|
||||
* (Intended for BIOS use only)
|
||||
*/
|
||||
#define ACPI_PLD_REV1_BUFFER_SIZE 16 /* For Revision 1 of the buffer (From ACPI spec) */
|
||||
#define ACPI_PLD_BUFFER_SIZE 20 /* For Revision 2 of the buffer (From ACPI spec) */
|
||||
|
||||
/* First 32-bit dword, bits 0:32 */
|
||||
|
||||
#define ACPI_PLD_GET_REVISION(dword) ACPI_GET_BITS (dword, 0, ACPI_7BIT_MASK)
|
||||
#define ACPI_PLD_SET_REVISION(dword,value) ACPI_SET_BITS (dword, 0, ACPI_7BIT_MASK, value) /* Offset 0, Len 7 */
|
||||
|
||||
#define ACPI_PLD_GET_IGNORE_COLOR(dword) ACPI_GET_BITS (dword, 7, ACPI_1BIT_MASK)
|
||||
#define ACPI_PLD_SET_IGNORE_COLOR(dword,value) ACPI_SET_BITS (dword, 7, ACPI_1BIT_MASK, value) /* Offset 7, Len 1 */
|
||||
|
||||
#define ACPI_PLD_GET_COLOR(dword) ACPI_GET_BITS (dword, 8, ACPI_24BIT_MASK)
|
||||
#define ACPI_PLD_SET_COLOR(dword,value) ACPI_SET_BITS (dword, 8, ACPI_24BIT_MASK, value) /* Offset 8, Len 24 */
|
||||
|
||||
/* Second 32-bit dword, bits 33:63 */
|
||||
|
||||
#define ACPI_PLD_GET_WIDTH(dword) ACPI_GET_BITS (dword, 0, ACPI_16BIT_MASK)
|
||||
#define ACPI_PLD_SET_WIDTH(dword,value) ACPI_SET_BITS (dword, 0, ACPI_16BIT_MASK, value) /* Offset 32+0=32, Len 16 */
|
||||
|
||||
#define ACPI_PLD_GET_HEIGHT(dword) ACPI_GET_BITS (dword, 16, ACPI_16BIT_MASK)
|
||||
#define ACPI_PLD_SET_HEIGHT(dword,value) ACPI_SET_BITS (dword, 16, ACPI_16BIT_MASK, value) /* Offset 32+16=48, Len 16 */
|
||||
|
||||
/* Third 32-bit dword, bits 64:95 */
|
||||
|
||||
#define ACPI_PLD_GET_USER_VISIBLE(dword) ACPI_GET_BITS (dword, 0, ACPI_1BIT_MASK)
|
||||
#define ACPI_PLD_SET_USER_VISIBLE(dword,value) ACPI_SET_BITS (dword, 0, ACPI_1BIT_MASK, value) /* Offset 64+0=64, Len 1 */
|
||||
|
||||
#define ACPI_PLD_GET_DOCK(dword) ACPI_GET_BITS (dword, 1, ACPI_1BIT_MASK)
|
||||
#define ACPI_PLD_SET_DOCK(dword,value) ACPI_SET_BITS (dword, 1, ACPI_1BIT_MASK, value) /* Offset 64+1=65, Len 1 */
|
||||
|
||||
#define ACPI_PLD_GET_LID(dword) ACPI_GET_BITS (dword, 2, ACPI_1BIT_MASK)
|
||||
#define ACPI_PLD_SET_LID(dword,value) ACPI_SET_BITS (dword, 2, ACPI_1BIT_MASK, value) /* Offset 64+2=66, Len 1 */
|
||||
|
||||
#define ACPI_PLD_GET_PANEL(dword) ACPI_GET_BITS (dword, 3, ACPI_3BIT_MASK)
|
||||
#define ACPI_PLD_SET_PANEL(dword,value) ACPI_SET_BITS (dword, 3, ACPI_3BIT_MASK, value) /* Offset 64+3=67, Len 3 */
|
||||
|
||||
#define ACPI_PLD_GET_VERTICAL(dword) ACPI_GET_BITS (dword, 6, ACPI_2BIT_MASK)
|
||||
#define ACPI_PLD_SET_VERTICAL(dword,value) ACPI_SET_BITS (dword, 6, ACPI_2BIT_MASK, value) /* Offset 64+6=70, Len 2 */
|
||||
|
||||
#define ACPI_PLD_GET_HORIZONTAL(dword) ACPI_GET_BITS (dword, 8, ACPI_2BIT_MASK)
|
||||
#define ACPI_PLD_SET_HORIZONTAL(dword,value) ACPI_SET_BITS (dword, 8, ACPI_2BIT_MASK, value) /* Offset 64+8=72, Len 2 */
|
||||
|
||||
#define ACPI_PLD_GET_SHAPE(dword) ACPI_GET_BITS (dword, 10, ACPI_4BIT_MASK)
|
||||
#define ACPI_PLD_SET_SHAPE(dword,value) ACPI_SET_BITS (dword, 10, ACPI_4BIT_MASK, value) /* Offset 64+10=74, Len 4 */
|
||||
|
||||
#define ACPI_PLD_GET_ORIENTATION(dword) ACPI_GET_BITS (dword, 14, ACPI_1BIT_MASK)
|
||||
#define ACPI_PLD_SET_ORIENTATION(dword,value) ACPI_SET_BITS (dword, 14, ACPI_1BIT_MASK, value) /* Offset 64+14=78, Len 1 */
|
||||
|
||||
#define ACPI_PLD_GET_TOKEN(dword) ACPI_GET_BITS (dword, 15, ACPI_8BIT_MASK)
|
||||
#define ACPI_PLD_SET_TOKEN(dword,value) ACPI_SET_BITS (dword, 15, ACPI_8BIT_MASK, value) /* Offset 64+15=79, Len 8 */
|
||||
|
||||
#define ACPI_PLD_GET_POSITION(dword) ACPI_GET_BITS (dword, 23, ACPI_8BIT_MASK)
|
||||
#define ACPI_PLD_SET_POSITION(dword,value) ACPI_SET_BITS (dword, 23, ACPI_8BIT_MASK, value) /* Offset 64+23=87, Len 8 */
|
||||
|
||||
#define ACPI_PLD_GET_BAY(dword) ACPI_GET_BITS (dword, 31, ACPI_1BIT_MASK)
|
||||
#define ACPI_PLD_SET_BAY(dword,value) ACPI_SET_BITS (dword, 31, ACPI_1BIT_MASK, value) /* Offset 64+31=95, Len 1 */
|
||||
|
||||
/* Fourth 32-bit dword, bits 96:127 */
|
||||
|
||||
#define ACPI_PLD_GET_EJECTABLE(dword) ACPI_GET_BITS (dword, 0, ACPI_1BIT_MASK)
|
||||
#define ACPI_PLD_SET_EJECTABLE(dword,value) ACPI_SET_BITS (dword, 0, ACPI_1BIT_MASK, value) /* Offset 96+0=96, Len 1 */
|
||||
|
||||
#define ACPI_PLD_GET_OSPM_EJECT(dword) ACPI_GET_BITS (dword, 1, ACPI_1BIT_MASK)
|
||||
#define ACPI_PLD_SET_OSPM_EJECT(dword,value) ACPI_SET_BITS (dword, 1, ACPI_1BIT_MASK, value) /* Offset 96+1=97, Len 1 */
|
||||
|
||||
#define ACPI_PLD_GET_CABINET(dword) ACPI_GET_BITS (dword, 2, ACPI_8BIT_MASK)
|
||||
#define ACPI_PLD_SET_CABINET(dword,value) ACPI_SET_BITS (dword, 2, ACPI_8BIT_MASK, value) /* Offset 96+2=98, Len 8 */
|
||||
|
||||
#define ACPI_PLD_GET_CARD_CAGE(dword) ACPI_GET_BITS (dword, 10, ACPI_8BIT_MASK)
|
||||
#define ACPI_PLD_SET_CARD_CAGE(dword,value) ACPI_SET_BITS (dword, 10, ACPI_8BIT_MASK, value) /* Offset 96+10=106, Len 8 */
|
||||
|
||||
#define ACPI_PLD_GET_REFERENCE(dword) ACPI_GET_BITS (dword, 18, ACPI_1BIT_MASK)
|
||||
#define ACPI_PLD_SET_REFERENCE(dword,value) ACPI_SET_BITS (dword, 18, ACPI_1BIT_MASK, value) /* Offset 96+18=114, Len 1 */
|
||||
|
||||
#define ACPI_PLD_GET_ROTATION(dword) ACPI_GET_BITS (dword, 19, ACPI_4BIT_MASK)
|
||||
#define ACPI_PLD_SET_ROTATION(dword,value) ACPI_SET_BITS (dword, 19, ACPI_4BIT_MASK, value) /* Offset 96+19=115, Len 4 */
|
||||
|
||||
#define ACPI_PLD_GET_ORDER(dword) ACPI_GET_BITS (dword, 23, ACPI_5BIT_MASK)
|
||||
#define ACPI_PLD_SET_ORDER(dword,value) ACPI_SET_BITS (dword, 23, ACPI_5BIT_MASK, value) /* Offset 96+23=119, Len 5 */
|
||||
|
||||
/* Fifth 32-bit dword, bits 128:159 (Revision 2 of _PLD only) */
|
||||
|
||||
#define ACPI_PLD_GET_VERT_OFFSET(dword) ACPI_GET_BITS (dword, 0, ACPI_16BIT_MASK)
|
||||
#define ACPI_PLD_SET_VERT_OFFSET(dword,value) ACPI_SET_BITS (dword, 0, ACPI_16BIT_MASK, value) /* Offset 128+0=128, Len 16 */
|
||||
|
||||
#define ACPI_PLD_GET_HORIZ_OFFSET(dword) ACPI_GET_BITS (dword, 16, ACPI_16BIT_MASK)
|
||||
#define ACPI_PLD_SET_HORIZ_OFFSET(dword,value) ACPI_SET_BITS (dword, 16, ACPI_16BIT_MASK, value) /* Offset 128+16=144, Len 16 */
|
||||
|
||||
#endif /* ACBUFFER_H */
|
||||
|
|
@ -63,11 +63,10 @@
|
|||
#define METHOD_NAME__PRW "_PRW"
|
||||
#define METHOD_NAME__SRS "_SRS"
|
||||
#define METHOD_NAME__CBA "_CBA"
|
||||
#define METHOD_NAME__PLD "_PLD"
|
||||
|
||||
/* Method names - these methods must appear at the namespace root */
|
||||
|
||||
#define METHOD_PATHNAME__BFS "\\_BFS"
|
||||
#define METHOD_PATHNAME__GTS "\\_GTS"
|
||||
#define METHOD_PATHNAME__PTS "\\_PTS"
|
||||
#define METHOD_PATHNAME__SST "\\_SI._SST"
|
||||
#define METHOD_PATHNAME__WAK "\\_WAK"
|
||||
|
|
|
|||
|
|
@ -53,14 +53,14 @@
|
|||
*
|
||||
* Note: The order of these include files is important.
|
||||
*/
|
||||
#include "platform/acenv.h" /* Environment-specific items */
|
||||
#include "acnames.h" /* Common ACPI names and strings */
|
||||
#include "actypes.h" /* ACPICA data types and structures */
|
||||
#include "acexcep.h" /* ACPICA exceptions */
|
||||
#include "actbl.h" /* ACPI table definitions */
|
||||
#include "acoutput.h" /* Error output and Debug macros */
|
||||
#include "acrestyp.h" /* Resource Descriptor structs */
|
||||
#include "acpiosxf.h" /* OSL interfaces (ACPICA-to-OS) */
|
||||
#include "acpixf.h" /* ACPI core subsystem external interfaces */
|
||||
#include <acpi/platform/acenv.h> /* Environment-specific items */
|
||||
#include <acpi/acnames.h> /* Common ACPI names and strings */
|
||||
#include <acpi/actypes.h> /* ACPICA data types and structures */
|
||||
#include <acpi/acexcep.h> /* ACPICA exceptions */
|
||||
#include <acpi/actbl.h> /* ACPI table definitions */
|
||||
#include <acpi/acoutput.h> /* Error output and Debug macros */
|
||||
#include <acpi/acrestyp.h> /* Resource Descriptor structs */
|
||||
#include <acpi/acpiosxf.h> /* OSL interfaces (ACPICA-to-OS) */
|
||||
#include <acpi/acpixf.h> /* ACPI core subsystem external interfaces */
|
||||
|
||||
#endif /* __ACPI_H__ */
|
||||
|
|
|
|||
|
|
@ -54,37 +54,8 @@ acpi_status
|
|||
acpi_evaluate_hotplug_ost(acpi_handle handle, u32 source_event,
|
||||
u32 status_code, struct acpi_buffer *status_buf);
|
||||
|
||||
struct acpi_pld {
|
||||
unsigned int revision:7; /* 0 */
|
||||
unsigned int ignore_colour:1; /* 7 */
|
||||
unsigned int colour:24; /* 8 */
|
||||
unsigned int width:16; /* 32 */
|
||||
unsigned int height:16; /* 48 */
|
||||
unsigned int user_visible:1; /* 64 */
|
||||
unsigned int dock:1; /* 65 */
|
||||
unsigned int lid:1; /* 66 */
|
||||
unsigned int panel:3; /* 67 */
|
||||
unsigned int vertical_pos:2; /* 70 */
|
||||
unsigned int horizontal_pos:2; /* 72 */
|
||||
unsigned int shape:4; /* 74 */
|
||||
unsigned int group_orientation:1; /* 78 */
|
||||
unsigned int group_token:8; /* 79 */
|
||||
unsigned int group_position:8; /* 87 */
|
||||
unsigned int bay:1; /* 95 */
|
||||
unsigned int ejectable:1; /* 96 */
|
||||
unsigned int ospm_eject_required:1; /* 97 */
|
||||
unsigned int cabinet_number:8; /* 98 */
|
||||
unsigned int card_cage_number:8; /* 106 */
|
||||
unsigned int reference:1; /* 114 */
|
||||
unsigned int rotation:4; /* 115 */
|
||||
unsigned int order:5; /* 119 */
|
||||
unsigned int reserved:4; /* 124 */
|
||||
unsigned int vertical_offset:16; /* 128 */
|
||||
unsigned int horizontal_offset:16; /* 144 */
|
||||
} __attribute__((__packed__));
|
||||
|
||||
acpi_status
|
||||
acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld *pld);
|
||||
acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld);
|
||||
#ifdef CONFIG_ACPI
|
||||
|
||||
#include <linux/proc_fs.h>
|
||||
|
|
@ -208,6 +179,7 @@ struct acpi_device_pnp {
|
|||
struct list_head ids; /* _HID and _CIDs */
|
||||
acpi_device_name device_name; /* Driver-determined */
|
||||
acpi_device_class device_class; /* " */
|
||||
union acpi_object *str_obj; /* unicode string for _STR method */
|
||||
};
|
||||
|
||||
#define acpi_device_bid(d) ((d)->pnp.bus_id)
|
||||
|
|
@ -282,8 +254,16 @@ struct acpi_device_wakeup {
|
|||
int prepare_count;
|
||||
};
|
||||
|
||||
/* Device */
|
||||
struct acpi_device_physical_node {
|
||||
u8 node_id;
|
||||
struct list_head node;
|
||||
struct device *dev;
|
||||
};
|
||||
|
||||
/* set maximum of physical nodes to 32 for expansibility */
|
||||
#define ACPI_MAX_PHYSICAL_NODE 32
|
||||
|
||||
/* Device */
|
||||
struct acpi_device {
|
||||
int device_type;
|
||||
acpi_handle handle; /* no handle for fixed hardware */
|
||||
|
|
@ -304,6 +284,10 @@ struct acpi_device {
|
|||
struct device dev;
|
||||
struct acpi_bus_ops bus_ops; /* workaround for different code path for hotplug */
|
||||
enum acpi_bus_removal_type removal_type; /* indicate for different removal type */
|
||||
u8 physical_node_count;
|
||||
struct list_head physical_node_list;
|
||||
struct mutex physical_node_lock;
|
||||
DECLARE_BITMAP(physical_node_id_bitmap, ACPI_MAX_PHYSICAL_NODE);
|
||||
};
|
||||
|
||||
static inline void *acpi_driver_data(struct acpi_device *d)
|
||||
|
|
@ -381,6 +365,19 @@ int acpi_match_device_ids(struct acpi_device *device,
|
|||
int acpi_create_dir(struct acpi_device *);
|
||||
void acpi_remove_dir(struct acpi_device *);
|
||||
|
||||
|
||||
/**
|
||||
* module_acpi_driver(acpi_driver) - Helper macro for registering an ACPI driver
|
||||
* @__acpi_driver: acpi_driver struct
|
||||
*
|
||||
* Helper macro for ACPI drivers which do not do anything special in module
|
||||
* init/exit. This eliminates a lot of boilerplate. Each module may only
|
||||
* use this macro once, and calling it replaces module_init() and module_exit()
|
||||
*/
|
||||
#define module_acpi_driver(__acpi_driver) \
|
||||
module_driver(__acpi_driver, acpi_bus_register_driver, \
|
||||
acpi_bus_unregister_driver)
|
||||
|
||||
/*
|
||||
* Bind physical devices with ACPI devices
|
||||
*/
|
||||
|
|
@ -394,7 +391,6 @@ struct acpi_bus_type {
|
|||
};
|
||||
int register_acpi_bus_type(struct acpi_bus_type *);
|
||||
int unregister_acpi_bus_type(struct acpi_bus_type *);
|
||||
struct device *acpi_get_physical_device(acpi_handle);
|
||||
|
||||
struct acpi_pci_root {
|
||||
struct list_head node;
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@
|
|||
#ifndef __ACPIOSXF_H__
|
||||
#define __ACPIOSXF_H__
|
||||
|
||||
#include "platform/acenv.h"
|
||||
#include "actypes.h"
|
||||
#include <acpi/platform/acenv.h>
|
||||
#include <acpi/actypes.h>
|
||||
|
||||
/* Types for acpi_os_execute */
|
||||
|
||||
|
|
|
|||
|
|
@ -47,11 +47,12 @@
|
|||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20120711
|
||||
#define ACPI_CA_VERSION 0x20120913
|
||||
|
||||
#include "acconfig.h"
|
||||
#include "actypes.h"
|
||||
#include "actbl.h"
|
||||
#include <acpi/acconfig.h>
|
||||
#include <acpi/actypes.h>
|
||||
#include <acpi/actbl.h>
|
||||
#include <acpi/acbuffer.h>
|
||||
|
||||
extern u8 acpi_gbl_permanent_mmap;
|
||||
|
||||
|
|
@ -144,6 +145,10 @@ acpi_check_address_range(acpi_adr_space_type space_id,
|
|||
acpi_physical_address address,
|
||||
acpi_size length, u8 warn);
|
||||
|
||||
acpi_status
|
||||
acpi_decode_pld_buffer(u8 *in_buffer,
|
||||
acpi_size length, struct acpi_pld_info **return_buffer);
|
||||
|
||||
/*
|
||||
* ACPI Memory management
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -79,9 +79,15 @@
|
|||
#pragma pack(1)
|
||||
|
||||
/*
|
||||
* Note about bitfields: The u8 type is used for bitfields in ACPI tables.
|
||||
* This is the only type that is even remotely portable. Anything else is not
|
||||
* portable, so do not use any other bitfield types.
|
||||
* Note: C bitfields are not used for this reason:
|
||||
*
|
||||
* "Bitfields are great and easy to read, but unfortunately the C language
|
||||
* does not specify the layout of bitfields in memory, which means they are
|
||||
* essentially useless for dealing with packed data in on-disk formats or
|
||||
* binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
|
||||
* this decision was a design error in C. Ritchie could have picked an order
|
||||
* and stuck with it." Norman Ramsey.
|
||||
* See http://stackoverflow.com/a/1053662/41661
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
@ -94,7 +100,7 @@
|
|||
struct acpi_table_header {
|
||||
char signature[ACPI_NAME_SIZE]; /* ASCII table signature */
|
||||
u32 length; /* Length of table in bytes, including this header */
|
||||
u8 revision; /* ACPI Specification minor version # */
|
||||
u8 revision; /* ACPI Specification minor version number */
|
||||
u8 checksum; /* To make sum of entire table == 0 */
|
||||
char oem_id[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */
|
||||
char oem_table_id[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */
|
||||
|
|
@ -108,7 +114,7 @@ struct acpi_table_header {
|
|||
* GAS - Generic Address Structure (ACPI 2.0+)
|
||||
*
|
||||
* Note: Since this structure is used in the ACPI tables, it is byte aligned.
|
||||
* If misaliged access is not supported by the hardware, accesses to the
|
||||
* If misaligned access is not supported by the hardware, accesses to the
|
||||
* 64-bit Address field must be performed with care.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
|
@ -210,18 +216,18 @@ struct acpi_table_fadt {
|
|||
u8 preferred_profile; /* Conveys preferred power management profile to OSPM. */
|
||||
u16 sci_interrupt; /* System vector of SCI interrupt */
|
||||
u32 smi_command; /* 32-bit Port address of SMI command port */
|
||||
u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */
|
||||
u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */
|
||||
u8 s4_bios_request; /* Value to write to SMI CMD to enter S4BIOS state */
|
||||
u8 acpi_enable; /* Value to write to SMI_CMD to enable ACPI */
|
||||
u8 acpi_disable; /* Value to write to SMI_CMD to disable ACPI */
|
||||
u8 s4_bios_request; /* Value to write to SMI_CMD to enter S4BIOS state */
|
||||
u8 pstate_control; /* Processor performance state control */
|
||||
u32 pm1a_event_block; /* 32-bit Port address of Power Mgt 1a Event Reg Blk */
|
||||
u32 pm1b_event_block; /* 32-bit Port address of Power Mgt 1b Event Reg Blk */
|
||||
u32 pm1a_control_block; /* 32-bit Port address of Power Mgt 1a Control Reg Blk */
|
||||
u32 pm1b_control_block; /* 32-bit Port address of Power Mgt 1b Control Reg Blk */
|
||||
u32 pm2_control_block; /* 32-bit Port address of Power Mgt 2 Control Reg Blk */
|
||||
u32 pm_timer_block; /* 32-bit Port address of Power Mgt Timer Ctrl Reg Blk */
|
||||
u32 gpe0_block; /* 32-bit Port address of General Purpose Event 0 Reg Blk */
|
||||
u32 gpe1_block; /* 32-bit Port address of General Purpose Event 1 Reg Blk */
|
||||
u32 pm1a_event_block; /* 32-bit port address of Power Mgt 1a Event Reg Blk */
|
||||
u32 pm1b_event_block; /* 32-bit port address of Power Mgt 1b Event Reg Blk */
|
||||
u32 pm1a_control_block; /* 32-bit port address of Power Mgt 1a Control Reg Blk */
|
||||
u32 pm1b_control_block; /* 32-bit port address of Power Mgt 1b Control Reg Blk */
|
||||
u32 pm2_control_block; /* 32-bit port address of Power Mgt 2 Control Reg Blk */
|
||||
u32 pm_timer_block; /* 32-bit port address of Power Mgt Timer Ctrl Reg Blk */
|
||||
u32 gpe0_block; /* 32-bit port address of General Purpose Event 0 Reg Blk */
|
||||
u32 gpe1_block; /* 32-bit port address of General Purpose Event 1 Reg Blk */
|
||||
u8 pm1_event_length; /* Byte Length of ports at pm1x_event_block */
|
||||
u8 pm1_control_length; /* Byte Length of ports at pm1x_control_block */
|
||||
u8 pm2_control_length; /* Byte Length of ports at pm2_control_block */
|
||||
|
|
@ -229,12 +235,12 @@ struct acpi_table_fadt {
|
|||
u8 gpe0_block_length; /* Byte Length of ports at gpe0_block */
|
||||
u8 gpe1_block_length; /* Byte Length of ports at gpe1_block */
|
||||
u8 gpe1_base; /* Offset in GPE number space where GPE1 events start */
|
||||
u8 cst_control; /* Support for the _CST object and C States change notification */
|
||||
u8 cst_control; /* Support for the _CST object and C-States change notification */
|
||||
u16 c2_latency; /* Worst case HW latency to enter/exit C2 state */
|
||||
u16 c3_latency; /* Worst case HW latency to enter/exit C3 state */
|
||||
u16 flush_size; /* Processor's memory cache line width, in bytes */
|
||||
u16 flush_size; /* Processor memory cache line width, in bytes */
|
||||
u16 flush_stride; /* Number of flush strides that need to be read */
|
||||
u8 duty_offset; /* Processor duty cycle index in processor's P_CNT reg */
|
||||
u8 duty_offset; /* Processor duty cycle index in processor P_CNT reg */
|
||||
u8 duty_width; /* Processor duty cycle value bit width in P_CNT register */
|
||||
u8 day_alarm; /* Index to day-of-month alarm in RTC CMOS RAM */
|
||||
u8 month_alarm; /* Index to month-of-year alarm in RTC CMOS RAM */
|
||||
|
|
@ -255,11 +261,11 @@ struct acpi_table_fadt {
|
|||
struct acpi_generic_address xpm_timer_block; /* 64-bit Extended Power Mgt Timer Ctrl Reg Blk address */
|
||||
struct acpi_generic_address xgpe0_block; /* 64-bit Extended General Purpose Event 0 Reg Blk address */
|
||||
struct acpi_generic_address xgpe1_block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */
|
||||
struct acpi_generic_address sleep_control; /* 64-bit Sleep Control register */
|
||||
struct acpi_generic_address sleep_status; /* 64-bit Sleep Status register */
|
||||
struct acpi_generic_address sleep_control; /* 64-bit Sleep Control register (ACPI 5.0) */
|
||||
struct acpi_generic_address sleep_status; /* 64-bit Sleep Status register (ACPI 5.0) */
|
||||
};
|
||||
|
||||
/* Masks for FADT Boot Architecture Flags (boot_flags) */
|
||||
/* Masks for FADT Boot Architecture Flags (boot_flags) [Vx]=Introduced in this FADT revision */
|
||||
|
||||
#define ACPI_FADT_LEGACY_DEVICES (1) /* 00: [V2] System has LPC or ISA bus devices */
|
||||
#define ACPI_FADT_8042 (1<<1) /* 01: [V3] System has an 8042 controller on port 60/64 */
|
||||
|
|
@ -272,13 +278,13 @@ struct acpi_table_fadt {
|
|||
|
||||
/* Masks for FADT flags */
|
||||
|
||||
#define ACPI_FADT_WBINVD (1) /* 00: [V1] The wbinvd instruction works properly */
|
||||
#define ACPI_FADT_WBINVD_FLUSH (1<<1) /* 01: [V1] wbinvd flushes but does not invalidate caches */
|
||||
#define ACPI_FADT_WBINVD (1) /* 00: [V1] The WBINVD instruction works properly */
|
||||
#define ACPI_FADT_WBINVD_FLUSH (1<<1) /* 01: [V1] WBINVD flushes but does not invalidate caches */
|
||||
#define ACPI_FADT_C1_SUPPORTED (1<<2) /* 02: [V1] All processors support C1 state */
|
||||
#define ACPI_FADT_C2_MP_SUPPORTED (1<<3) /* 03: [V1] C2 state works on MP system */
|
||||
#define ACPI_FADT_POWER_BUTTON (1<<4) /* 04: [V1] Power button is handled as a control method device */
|
||||
#define ACPI_FADT_SLEEP_BUTTON (1<<5) /* 05: [V1] Sleep button is handled as a control method device */
|
||||
#define ACPI_FADT_FIXED_RTC (1<<6) /* 06: [V1] RTC wakeup status not in fixed register space */
|
||||
#define ACPI_FADT_FIXED_RTC (1<<6) /* 06: [V1] RTC wakeup status is not in fixed register space */
|
||||
#define ACPI_FADT_S4_RTC_WAKE (1<<7) /* 07: [V1] RTC alarm can wake system from S4 */
|
||||
#define ACPI_FADT_32BIT_TIMER (1<<8) /* 08: [V1] ACPI timer width is 32-bit (0=24-bit) */
|
||||
#define ACPI_FADT_DOCKING_SUPPORTED (1<<9) /* 09: [V1] Docking supported */
|
||||
|
|
@ -297,7 +303,7 @@ struct acpi_table_fadt {
|
|||
|
||||
/* Values for preferred_profile (Preferred Power Management Profiles) */
|
||||
|
||||
enum acpi_prefered_pm_profiles {
|
||||
enum acpi_preferred_pm_profiles {
|
||||
PM_UNSPECIFIED = 0,
|
||||
PM_DESKTOP = 1,
|
||||
PM_MOBILE = 2,
|
||||
|
|
@ -335,7 +341,7 @@ union acpi_name_union {
|
|||
struct acpi_table_desc {
|
||||
acpi_physical_address address;
|
||||
struct acpi_table_header *pointer;
|
||||
u32 length; /* Length fixed at 32 bits */
|
||||
u32 length; /* Length fixed at 32 bits (fixed in table header) */
|
||||
union acpi_name_union signature;
|
||||
acpi_owner_id owner_id;
|
||||
u8 flags;
|
||||
|
|
|
|||
|
|
@ -79,9 +79,15 @@
|
|||
#pragma pack(1)
|
||||
|
||||
/*
|
||||
* Note about bitfields: The u8 type is used for bitfields in ACPI tables.
|
||||
* This is the only type that is even remotely portable. Anything else is not
|
||||
* portable, so do not use any other bitfield types.
|
||||
* Note: C bitfields are not used for this reason:
|
||||
*
|
||||
* "Bitfields are great and easy to read, but unfortunately the C language
|
||||
* does not specify the layout of bitfields in memory, which means they are
|
||||
* essentially useless for dealing with packed data in on-disk formats or
|
||||
* binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
|
||||
* this decision was a design error in C. Ritchie could have picked an order
|
||||
* and stuck with it." Norman Ramsey.
|
||||
* See http://stackoverflow.com/a/1053662/41661
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
@ -489,7 +495,9 @@ enum acpi_hest_notify_types {
|
|||
ACPI_HEST_NOTIFY_LOCAL = 2,
|
||||
ACPI_HEST_NOTIFY_SCI = 3,
|
||||
ACPI_HEST_NOTIFY_NMI = 4,
|
||||
ACPI_HEST_NOTIFY_RESERVED = 5 /* 5 and greater are reserved */
|
||||
ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */
|
||||
ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */
|
||||
ACPI_HEST_NOTIFY_RESERVED = 7 /* 7 and greater are reserved */
|
||||
};
|
||||
|
||||
/* Values for config_write_enable bitfield above */
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@
|
|||
*/
|
||||
#define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
|
||||
#define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
|
||||
#define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */
|
||||
#define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */
|
||||
#define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
|
||||
#define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
|
||||
#define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
|
||||
|
|
@ -96,9 +98,15 @@
|
|||
#pragma pack(1)
|
||||
|
||||
/*
|
||||
* Note about bitfields: The u8 type is used for bitfields in ACPI tables.
|
||||
* This is the only type that is even remotely portable. Anything else is not
|
||||
* portable, so do not use any other bitfield types.
|
||||
* Note: C bitfields are not used for this reason:
|
||||
*
|
||||
* "Bitfields are great and easy to read, but unfortunately the C language
|
||||
* does not specify the layout of bitfields in memory, which means they are
|
||||
* essentially useless for dealing with packed data in on-disk formats or
|
||||
* binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
|
||||
* this decision was a design error in C. Ritchie could have picked an order
|
||||
* and stuck with it." Norman Ramsey.
|
||||
* See http://stackoverflow.com/a/1053662/41661
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
@ -230,6 +238,115 @@ struct acpi_table_boot {
|
|||
u8 reserved[3];
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* CSRT - Core System Resource Table
|
||||
* Version 0
|
||||
*
|
||||
* Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
struct acpi_table_csrt {
|
||||
struct acpi_table_header header; /* Common ACPI table header */
|
||||
};
|
||||
|
||||
/* Resource Group subtable */
|
||||
|
||||
struct acpi_csrt_group {
|
||||
u32 length;
|
||||
u32 vendor_id;
|
||||
u32 subvendor_id;
|
||||
u16 device_id;
|
||||
u16 subdevice_id;
|
||||
u16 revision;
|
||||
u16 reserved;
|
||||
u32 info_length;
|
||||
|
||||
/* Shared data (length = info_length) immediately follows */
|
||||
};
|
||||
|
||||
/* Resource Descriptor subtable */
|
||||
|
||||
struct acpi_csrt_descriptor {
|
||||
u32 length;
|
||||
u16 type;
|
||||
u16 subtype;
|
||||
u32 uid;
|
||||
|
||||
/* Resource-specific information immediately follows */
|
||||
};
|
||||
|
||||
/* Resource Types */
|
||||
|
||||
#define ACPI_CSRT_TYPE_INTERRUPT 0x0001
|
||||
#define ACPI_CSRT_TYPE_TIMER 0x0002
|
||||
#define ACPI_CSRT_TYPE_DMA 0x0003
|
||||
|
||||
/* Resource Subtypes */
|
||||
|
||||
#define ACPI_CSRT_XRUPT_LINE 0x0000
|
||||
#define ACPI_CSRT_XRUPT_CONTROLLER 0x0001
|
||||
#define ACPI_CSRT_TIMER 0x0000
|
||||
#define ACPI_CSRT_DMA_CHANNEL 0x0000
|
||||
#define ACPI_CSRT_DMA_CONTROLLER 0x0001
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* DBG2 - Debug Port Table 2
|
||||
* Version 0 (Both main table and subtables)
|
||||
*
|
||||
* Conforms to "Microsoft Debug Port Table 2 (DBG2)", May 22 2012.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
struct acpi_table_dbg2 {
|
||||
struct acpi_table_header header; /* Common ACPI table header */
|
||||
u32 info_offset;
|
||||
u32 info_count;
|
||||
};
|
||||
|
||||
/* Debug Device Information Subtable */
|
||||
|
||||
struct acpi_dbg2_device {
|
||||
u8 revision;
|
||||
u16 length;
|
||||
u8 register_count; /* Number of base_address registers */
|
||||
u16 namepath_length;
|
||||
u16 namepath_offset;
|
||||
u16 oem_data_length;
|
||||
u16 oem_data_offset;
|
||||
u16 port_type;
|
||||
u16 port_subtype;
|
||||
u16 reserved;
|
||||
u16 base_address_offset;
|
||||
u16 address_size_offset;
|
||||
/*
|
||||
* Data that follows:
|
||||
* base_address (required) - Each in 12-byte Generic Address Structure format.
|
||||
* address_size (required) - Array of u32 sizes corresponding to each base_address register.
|
||||
* Namepath (required) - Null terminated string. Single dot if not supported.
|
||||
* oem_data (optional) - Length is oem_data_length.
|
||||
*/
|
||||
};
|
||||
|
||||
/* Types for port_type field above */
|
||||
|
||||
#define ACPI_DBG2_SERIAL_PORT 0x8000
|
||||
#define ACPI_DBG2_1394_PORT 0x8001
|
||||
#define ACPI_DBG2_USB_PORT 0x8002
|
||||
#define ACPI_DBG2_NET_PORT 0x8003
|
||||
|
||||
/* Subtypes for port_subtype field above */
|
||||
|
||||
#define ACPI_DBG2_16550_COMPATIBLE 0x0000
|
||||
#define ACPI_DBG2_16550_SUBSET 0x0001
|
||||
|
||||
#define ACPI_DBG2_1394_STANDARD 0x0000
|
||||
|
||||
#define ACPI_DBG2_USB_XHCI 0x0000
|
||||
#define ACPI_DBG2_USB_EHCI 0x0001
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* DBGP - Debug Port table
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@
|
|||
/* Reserved table signatures */
|
||||
|
||||
#define ACPI_SIG_CSRT "CSRT" /* Core System Resources Table */
|
||||
#define ACPI_SIG_DBG2 "DBG2" /* Debug Port table 2 */
|
||||
#define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */
|
||||
#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
|
||||
#define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */
|
||||
|
|
@ -87,9 +86,15 @@
|
|||
#pragma pack(1)
|
||||
|
||||
/*
|
||||
* Note about bitfields: The u8 type is used for bitfields in ACPI tables.
|
||||
* This is the only type that is even remotely portable. Anything else is not
|
||||
* portable, so do not use any other bitfield types.
|
||||
* Note: C bitfields are not used for this reason:
|
||||
*
|
||||
* "Bitfields are great and easy to read, but unfortunately the C language
|
||||
* does not specify the layout of bitfields in memory, which means they are
|
||||
* essentially useless for dealing with packed data in on-disk formats or
|
||||
* binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
|
||||
* this decision was a design error in C. Ritchie could have picked an order
|
||||
* and stuck with it." Norman Ramsey.
|
||||
* See http://stackoverflow.com/a/1053662/41661
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
|
|||
|
|
@ -518,13 +518,6 @@ typedef u64 acpi_integer;
|
|||
#define ACPI_SLEEP_TYPE_MAX 0x7
|
||||
#define ACPI_SLEEP_TYPE_INVALID 0xFF
|
||||
|
||||
/*
|
||||
* Sleep/Wake flags
|
||||
*/
|
||||
#define ACPI_NO_OPTIONAL_METHODS 0x00 /* Do not execute any optional methods */
|
||||
#define ACPI_EXECUTE_GTS 0x01 /* For enter sleep interface */
|
||||
#define ACPI_EXECUTE_BFS 0x02 /* For leave sleep prep interface */
|
||||
|
||||
/*
|
||||
* Standard notify values
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@
|
|||
/*! [Begin] no source code translation */
|
||||
|
||||
#if defined(_LINUX) || defined(__linux__)
|
||||
#include "aclinux.h"
|
||||
#include <acpi/platform/aclinux.h>
|
||||
|
||||
#elif defined(_AED_EFI)
|
||||
#include "acefi.h"
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@
|
|||
|
||||
/* Linux uses GCC */
|
||||
|
||||
#include "acgcc.h"
|
||||
#include <acpi/platform/acgcc.h>
|
||||
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/cpuidle.h>
|
||||
#include <linux/thermal.h>
|
||||
#include <asm/acpi.h>
|
||||
|
||||
|
|
@ -59,13 +58,11 @@ struct acpi_processor_cx {
|
|||
u8 entry_method;
|
||||
u8 index;
|
||||
u32 latency;
|
||||
u32 power;
|
||||
u8 bm_sts_skip;
|
||||
char desc[ACPI_CX_DESC_LEN];
|
||||
};
|
||||
|
||||
struct acpi_processor_power {
|
||||
struct cpuidle_device dev;
|
||||
struct acpi_processor_cx *state;
|
||||
unsigned long bm_check_timestamp;
|
||||
u32 default_state;
|
||||
|
|
@ -325,12 +322,10 @@ extern void acpi_processor_reevaluate_tstate(struct acpi_processor *pr,
|
|||
extern const struct file_operations acpi_processor_throttling_fops;
|
||||
extern void acpi_processor_throttling_init(void);
|
||||
/* in processor_idle.c */
|
||||
int acpi_processor_power_init(struct acpi_processor *pr,
|
||||
struct acpi_device *device);
|
||||
int acpi_processor_power_init(struct acpi_processor *pr);
|
||||
int acpi_processor_power_exit(struct acpi_processor *pr);
|
||||
int acpi_processor_cst_has_changed(struct acpi_processor *pr);
|
||||
int acpi_processor_hotplug(struct acpi_processor *pr);
|
||||
int acpi_processor_power_exit(struct acpi_processor *pr,
|
||||
struct acpi_device *device);
|
||||
int acpi_processor_suspend(struct device *dev);
|
||||
int acpi_processor_resume(struct device *dev);
|
||||
extern struct cpuidle_driver acpi_idle_driver;
|
||||
|
|
|
|||
|
|
@ -1,35 +0,0 @@
|
|||
header-y += auxvec.h
|
||||
header-y += bitsperlong.h
|
||||
header-y += errno-base.h
|
||||
header-y += errno.h
|
||||
header-y += fcntl.h
|
||||
header-y += int-l64.h
|
||||
header-y += int-ll64.h
|
||||
header-y += ioctl.h
|
||||
header-y += ioctls.h
|
||||
header-y += ipcbuf.h
|
||||
header-y += kvm_para.h
|
||||
header-y += mman-common.h
|
||||
header-y += mman.h
|
||||
header-y += msgbuf.h
|
||||
header-y += param.h
|
||||
header-y += poll.h
|
||||
header-y += posix_types.h
|
||||
header-y += resource.h
|
||||
header-y += sembuf.h
|
||||
header-y += setup.h
|
||||
header-y += shmbuf.h
|
||||
header-y += shmparam.h
|
||||
header-y += siginfo.h
|
||||
header-y += signal-defs.h
|
||||
header-y += signal.h
|
||||
header-y += socket.h
|
||||
header-y += sockios.h
|
||||
header-y += stat.h
|
||||
header-y += statfs.h
|
||||
header-y += swab.h
|
||||
header-y += termbits.h
|
||||
header-y += termios.h
|
||||
header-y += types.h
|
||||
header-y += ucontext.h
|
||||
header-y += unistd.h
|
||||
|
|
@ -1,45 +1 @@
|
|||
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \
|
||||
$(srctree)/include/asm-$(SRCARCH)/kvm.h),)
|
||||
header-y += kvm.h
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
|
||||
$(srctree)/include/asm-$(SRCARCH)/kvm_para.h),)
|
||||
header-y += kvm_para.h
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \
|
||||
$(srctree)/include/asm-$(SRCARCH)/a.out.h),)
|
||||
header-y += a.out.h
|
||||
endif
|
||||
|
||||
header-y += auxvec.h
|
||||
header-y += bitsperlong.h
|
||||
header-y += byteorder.h
|
||||
header-y += errno.h
|
||||
header-y += fcntl.h
|
||||
header-y += ioctl.h
|
||||
header-y += ioctls.h
|
||||
header-y += ipcbuf.h
|
||||
header-y += mman.h
|
||||
header-y += msgbuf.h
|
||||
header-y += param.h
|
||||
header-y += poll.h
|
||||
header-y += posix_types.h
|
||||
header-y += ptrace.h
|
||||
header-y += resource.h
|
||||
header-y += sembuf.h
|
||||
header-y += setup.h
|
||||
header-y += shmbuf.h
|
||||
header-y += sigcontext.h
|
||||
header-y += siginfo.h
|
||||
header-y += signal.h
|
||||
header-y += socket.h
|
||||
header-y += sockios.h
|
||||
header-y += stat.h
|
||||
header-y += statfs.h
|
||||
header-y += swab.h
|
||||
header-y += termbits.h
|
||||
header-y += termios.h
|
||||
header-y += types.h
|
||||
header-y += unistd.h
|
||||
include include/uapi/asm-generic/Kbuild.asm
|
||||
|
|
|
|||
15
include/asm-generic/bitops/builtin-__ffs.h
Normal file
15
include/asm-generic/bitops/builtin-__ffs.h
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#ifndef _ASM_GENERIC_BITOPS_BUILTIN___FFS_H_
|
||||
#define _ASM_GENERIC_BITOPS_BUILTIN___FFS_H_
|
||||
|
||||
/**
|
||||
* __ffs - find first bit in word.
|
||||
* @word: The word to search
|
||||
*
|
||||
* Undefined if no bit exists, so code should check against 0 first.
|
||||
*/
|
||||
static __always_inline unsigned long __ffs(unsigned long word)
|
||||
{
|
||||
return __builtin_ctzl(word);
|
||||
}
|
||||
|
||||
#endif
|
||||
15
include/asm-generic/bitops/builtin-__fls.h
Normal file
15
include/asm-generic/bitops/builtin-__fls.h
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#ifndef _ASM_GENERIC_BITOPS_BUILTIN___FLS_H_
|
||||
#define _ASM_GENERIC_BITOPS_BUILTIN___FLS_H_
|
||||
|
||||
/**
|
||||
* __fls - find last (most-significant) set bit in a long word
|
||||
* @word: the word to search
|
||||
*
|
||||
* Undefined if no set bit exists, so code should check against 0 first.
|
||||
*/
|
||||
static __always_inline unsigned long __fls(unsigned long word)
|
||||
{
|
||||
return (sizeof(word) * 8) - 1 - __builtin_clzl(word);
|
||||
}
|
||||
|
||||
#endif
|
||||
17
include/asm-generic/bitops/builtin-ffs.h
Normal file
17
include/asm-generic/bitops/builtin-ffs.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef _ASM_GENERIC_BITOPS_BUILTIN_FFS_H_
|
||||
#define _ASM_GENERIC_BITOPS_BUILTIN_FFS_H_
|
||||
|
||||
/**
|
||||
* ffs - find first bit set
|
||||
* @x: the word to search
|
||||
*
|
||||
* This is defined the same way as
|
||||
* the libc and compiler builtin ffs routines, therefore
|
||||
* differs in spirit from the above ffz (man ffs).
|
||||
*/
|
||||
static __always_inline int ffs(int x)
|
||||
{
|
||||
return __builtin_ffs(x);
|
||||
}
|
||||
|
||||
#endif
|
||||
16
include/asm-generic/bitops/builtin-fls.h
Normal file
16
include/asm-generic/bitops/builtin-fls.h
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#ifndef _ASM_GENERIC_BITOPS_BUILTIN_FLS_H_
|
||||
#define _ASM_GENERIC_BITOPS_BUILTIN_FLS_H_
|
||||
|
||||
/**
|
||||
* fls - find last (most-significant) bit set
|
||||
* @x: the word to search
|
||||
*
|
||||
* This is defined the same way as ffs.
|
||||
* Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
|
||||
*/
|
||||
static __always_inline int fls(int x)
|
||||
{
|
||||
return x ? sizeof(x) * 8 - __builtin_clz(x) : 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
57
include/asm-generic/bitops/count_zeros.h
Normal file
57
include/asm-generic/bitops/count_zeros.h
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
/* Count leading and trailing zeros functions
|
||||
*
|
||||
* Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
|
||||
* Written by David Howells (dhowells@redhat.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public Licence
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the Licence, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef _ASM_GENERIC_BITOPS_COUNT_ZEROS_H_
|
||||
#define _ASM_GENERIC_BITOPS_COUNT_ZEROS_H_
|
||||
|
||||
#include <asm/bitops.h>
|
||||
|
||||
/**
|
||||
* count_leading_zeros - Count the number of zeros from the MSB back
|
||||
* @x: The value
|
||||
*
|
||||
* Count the number of leading zeros from the MSB going towards the LSB in @x.
|
||||
*
|
||||
* If the MSB of @x is set, the result is 0.
|
||||
* If only the LSB of @x is set, then the result is BITS_PER_LONG-1.
|
||||
* If @x is 0 then the result is COUNT_LEADING_ZEROS_0.
|
||||
*/
|
||||
static inline int count_leading_zeros(unsigned long x)
|
||||
{
|
||||
if (sizeof(x) == 4)
|
||||
return BITS_PER_LONG - fls(x);
|
||||
else
|
||||
return BITS_PER_LONG - fls64(x);
|
||||
}
|
||||
|
||||
#define COUNT_LEADING_ZEROS_0 BITS_PER_LONG
|
||||
|
||||
/**
|
||||
* count_trailing_zeros - Count the number of zeros from the LSB forwards
|
||||
* @x: The value
|
||||
*
|
||||
* Count the number of trailing zeros from the LSB going towards the MSB in @x.
|
||||
*
|
||||
* If the LSB of @x is set, the result is 0.
|
||||
* If only the MSB of @x is set, then the result is BITS_PER_LONG-1.
|
||||
* If @x is 0 then the result is COUNT_TRAILING_ZEROS_0.
|
||||
*/
|
||||
static inline int count_trailing_zeros(unsigned long x)
|
||||
{
|
||||
#define COUNT_TRAILING_ZEROS_0 (-1)
|
||||
|
||||
if (sizeof(x) == 4)
|
||||
return ffs(x);
|
||||
else
|
||||
return (x != 0) ? __ffs(x) : COUNT_TRAILING_ZEROS_0;
|
||||
}
|
||||
|
||||
#endif /* _ASM_GENERIC_BITOPS_COUNT_ZEROS_H_ */
|
||||
|
|
@ -54,6 +54,16 @@ static inline int test_bit_le(int nr, const void *addr)
|
|||
return test_bit(nr ^ BITOP_LE_SWIZZLE, addr);
|
||||
}
|
||||
|
||||
static inline void set_bit_le(int nr, void *addr)
|
||||
{
|
||||
set_bit(nr ^ BITOP_LE_SWIZZLE, addr);
|
||||
}
|
||||
|
||||
static inline void clear_bit_le(int nr, void *addr)
|
||||
{
|
||||
clear_bit(nr ^ BITOP_LE_SWIZZLE, addr);
|
||||
}
|
||||
|
||||
static inline void __set_bit_le(int nr, void *addr)
|
||||
{
|
||||
__set_bit(nr ^ BITOP_LE_SWIZZLE, addr);
|
||||
|
|
|
|||
|
|
@ -1,18 +1,8 @@
|
|||
#ifndef __ASM_GENERIC_BITS_PER_LONG
|
||||
#define __ASM_GENERIC_BITS_PER_LONG
|
||||
|
||||
/*
|
||||
* There seems to be no way of detecting this automatically from user
|
||||
* space, so 64 bit architectures should override this in their
|
||||
* bitsperlong.h. In particular, an architecture that supports
|
||||
* both 32 and 64 bit user space must not rely on CONFIG_64BIT
|
||||
* to decide it, but rather check a compiler provided macro.
|
||||
*/
|
||||
#ifndef __BITS_PER_LONG
|
||||
#define __BITS_PER_LONG 32
|
||||
#endif
|
||||
#include <uapi/asm-generic/bitsperlong.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
#define BITS_PER_LONG 64
|
||||
|
|
@ -32,5 +22,4 @@
|
|||
#define BITS_PER_LONG_LONG 64
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __ASM_GENERIC_BITS_PER_LONG */
|
||||
|
|
|
|||
28
include/asm-generic/clkdev.h
Normal file
28
include/asm-generic/clkdev.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* include/asm-generic/clkdev.h
|
||||
*
|
||||
* Based on the ARM clkdev.h:
|
||||
* Copyright (C) 2008 Russell King.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* Helper for the clk API to assist looking up a struct clk.
|
||||
*/
|
||||
#ifndef __ASM_CLKDEV_H
|
||||
#define __ASM_CLKDEV_H
|
||||
|
||||
#include <linux/slab.h>
|
||||
|
||||
struct clk;
|
||||
|
||||
static inline int __clk_get(struct clk *clk) { return 1; }
|
||||
static inline void __clk_put(struct clk *clk) { }
|
||||
|
||||
static inline struct clk_lookup_alloc *__clkdev_alloc(size_t size)
|
||||
{
|
||||
return kzalloc(size, GFP_KERNEL);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -60,6 +60,8 @@ struct device_node;
|
|||
* @get: returns value for signal "offset"; for output signals this
|
||||
* returns either the value actually sensed, or zero
|
||||
* @direction_output: configures signal "offset" as output, or returns error
|
||||
* @set_debounce: optional hook for setting debounce time for specified gpio in
|
||||
* interrupt triggered gpio chips
|
||||
* @set: assigns output value for signal "offset"
|
||||
* @to_irq: optional hook supporting non-static gpio_to_irq() mappings;
|
||||
* implementation may not sleep
|
||||
|
|
|
|||
|
|
@ -4,33 +4,11 @@
|
|||
* Integer declarations for architectures which use "long"
|
||||
* for 64-bit types.
|
||||
*/
|
||||
|
||||
#ifndef _ASM_GENERIC_INT_L64_H
|
||||
#define _ASM_GENERIC_INT_L64_H
|
||||
|
||||
#include <asm/bitsperlong.h>
|
||||
#include <uapi/asm-generic/int-l64.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
/*
|
||||
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
|
||||
* header files exported to user space
|
||||
*/
|
||||
|
||||
typedef __signed__ char __s8;
|
||||
typedef unsigned char __u8;
|
||||
|
||||
typedef __signed__ short __s16;
|
||||
typedef unsigned short __u16;
|
||||
|
||||
typedef __signed__ int __s32;
|
||||
typedef unsigned int __u32;
|
||||
|
||||
typedef __signed__ long __s64;
|
||||
typedef unsigned long __u64;
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
|
@ -68,6 +46,4 @@ typedef unsigned long u64;
|
|||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _ASM_GENERIC_INT_L64_H */
|
||||
|
|
|
|||
|
|
@ -4,38 +4,11 @@
|
|||
* Integer declarations for architectures which use "long long"
|
||||
* for 64-bit types.
|
||||
*/
|
||||
|
||||
#ifndef _ASM_GENERIC_INT_LL64_H
|
||||
#define _ASM_GENERIC_INT_LL64_H
|
||||
|
||||
#include <asm/bitsperlong.h>
|
||||
#include <uapi/asm-generic/int-ll64.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
/*
|
||||
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
|
||||
* header files exported to user space
|
||||
*/
|
||||
|
||||
typedef __signed__ char __s8;
|
||||
typedef unsigned char __u8;
|
||||
|
||||
typedef __signed__ short __s16;
|
||||
typedef unsigned short __u16;
|
||||
|
||||
typedef __signed__ int __s32;
|
||||
typedef unsigned int __u32;
|
||||
|
||||
#ifdef __GNUC__
|
||||
__extension__ typedef __signed__ long long __s64;
|
||||
__extension__ typedef unsigned long long __u64;
|
||||
#else
|
||||
typedef __signed__ long long __s64;
|
||||
typedef unsigned long long __u64;
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
|
@ -73,6 +46,4 @@ typedef unsigned long long u64;
|
|||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _ASM_GENERIC_INT_LL64_H */
|
||||
|
|
|
|||
|
|
@ -1,105 +1,12 @@
|
|||
#ifndef _ASM_GENERIC_IOCTL_H
|
||||
#define _ASM_GENERIC_IOCTL_H
|
||||
|
||||
/* ioctl command encoding: 32 bits total, command in lower 16 bits,
|
||||
* size of the parameter structure in the lower 14 bits of the
|
||||
* upper 16 bits.
|
||||
* Encoding the size of the parameter structure in the ioctl request
|
||||
* is useful for catching programs compiled with old versions
|
||||
* and to avoid overwriting user space outside the user buffer area.
|
||||
* The highest 2 bits are reserved for indicating the ``access mode''.
|
||||
* NOTE: This limits the max parameter size to 16kB -1 !
|
||||
*/
|
||||
#include <uapi/asm-generic/ioctl.h>
|
||||
|
||||
/*
|
||||
* The following is for compatibility across the various Linux
|
||||
* platforms. The generic ioctl numbering scheme doesn't really enforce
|
||||
* a type field. De facto, however, the top 8 bits of the lower 16
|
||||
* bits are indeed used as a type field, so we might just as well make
|
||||
* this explicit here. Please be sure to use the decoding macros
|
||||
* below from now on.
|
||||
*/
|
||||
#define _IOC_NRBITS 8
|
||||
#define _IOC_TYPEBITS 8
|
||||
|
||||
/*
|
||||
* Let any architecture override either of the following before
|
||||
* including this file.
|
||||
*/
|
||||
|
||||
#ifndef _IOC_SIZEBITS
|
||||
# define _IOC_SIZEBITS 14
|
||||
#endif
|
||||
|
||||
#ifndef _IOC_DIRBITS
|
||||
# define _IOC_DIRBITS 2
|
||||
#endif
|
||||
|
||||
#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
|
||||
#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
|
||||
#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
|
||||
#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
|
||||
|
||||
#define _IOC_NRSHIFT 0
|
||||
#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
|
||||
#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
|
||||
#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
|
||||
|
||||
/*
|
||||
* Direction bits, which any architecture can choose to override
|
||||
* before including this file.
|
||||
*/
|
||||
|
||||
#ifndef _IOC_NONE
|
||||
# define _IOC_NONE 0U
|
||||
#endif
|
||||
|
||||
#ifndef _IOC_WRITE
|
||||
# define _IOC_WRITE 1U
|
||||
#endif
|
||||
|
||||
#ifndef _IOC_READ
|
||||
# define _IOC_READ 2U
|
||||
#endif
|
||||
|
||||
#define _IOC(dir,type,nr,size) \
|
||||
(((dir) << _IOC_DIRSHIFT) | \
|
||||
((type) << _IOC_TYPESHIFT) | \
|
||||
((nr) << _IOC_NRSHIFT) | \
|
||||
((size) << _IOC_SIZESHIFT))
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/* provoke compile error for invalid uses of size argument */
|
||||
extern unsigned int __invalid_size_argument_for_IOC;
|
||||
#define _IOC_TYPECHECK(t) \
|
||||
((sizeof(t) == sizeof(t[1]) && \
|
||||
sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
|
||||
sizeof(t) : __invalid_size_argument_for_IOC)
|
||||
#else
|
||||
#define _IOC_TYPECHECK(t) (sizeof(t))
|
||||
#endif
|
||||
|
||||
/* used to create numbers */
|
||||
#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
|
||||
#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size)))
|
||||
#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
|
||||
#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
|
||||
#define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
|
||||
#define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
|
||||
#define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
|
||||
|
||||
/* used to decode ioctl numbers.. */
|
||||
#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
|
||||
#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
|
||||
#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
|
||||
#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
|
||||
|
||||
/* ...and for the drivers/sound files... */
|
||||
|
||||
#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
|
||||
#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT)
|
||||
#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
|
||||
#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT)
|
||||
#define IOCSIZE_SHIFT (_IOC_SIZESHIFT)
|
||||
|
||||
#endif /* _ASM_GENERIC_IOCTL_H */
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
#ifndef _ASM_GENERIC_KVM_PARA_H
|
||||
#define _ASM_GENERIC_KVM_PARA_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <uapi/asm-generic/kvm_para.h>
|
||||
|
||||
|
||||
/*
|
||||
* This function is used by architectures that support kvm to avoid issuing
|
||||
|
|
@ -17,6 +18,4 @@ static inline unsigned int kvm_arch_para_features(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif /* _KERNEL__ */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -5,18 +5,44 @@
|
|||
* Many architectures just need a simple module
|
||||
* loader without arch specific data.
|
||||
*/
|
||||
#ifndef CONFIG_HAVE_MOD_ARCH_SPECIFIC
|
||||
struct mod_arch_specific
|
||||
{
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
#define Elf_Shdr Elf64_Shdr
|
||||
#define Elf_Sym Elf64_Sym
|
||||
#define Elf_Ehdr Elf64_Ehdr
|
||||
#else
|
||||
#define Elf_Shdr Elf32_Shdr
|
||||
#define Elf_Sym Elf32_Sym
|
||||
#define Elf_Ehdr Elf32_Ehdr
|
||||
#define Elf_Shdr Elf64_Shdr
|
||||
#define Elf_Phdr Elf64_Phdr
|
||||
#define Elf_Sym Elf64_Sym
|
||||
#define Elf_Dyn Elf64_Dyn
|
||||
#define Elf_Ehdr Elf64_Ehdr
|
||||
#define Elf_Addr Elf64_Addr
|
||||
#ifdef CONFIG_MODULES_USE_ELF_REL
|
||||
#define Elf_Rel Elf64_Rel
|
||||
#endif
|
||||
#ifdef CONFIG_MODULES_USE_ELF_RELA
|
||||
#define Elf_Rela Elf64_Rela
|
||||
#endif
|
||||
#define ELF_R_TYPE(X) ELF64_R_TYPE(X)
|
||||
#define ELF_R_SYM(X) ELF64_R_SYM(X)
|
||||
|
||||
#else /* CONFIG_64BIT */
|
||||
|
||||
#define Elf_Shdr Elf32_Shdr
|
||||
#define Elf_Phdr Elf32_Phdr
|
||||
#define Elf_Sym Elf32_Sym
|
||||
#define Elf_Dyn Elf32_Dyn
|
||||
#define Elf_Ehdr Elf32_Ehdr
|
||||
#define Elf_Addr Elf32_Addr
|
||||
#ifdef CONFIG_MODULES_USE_ELF_REL
|
||||
#define Elf_Rel Elf32_Rel
|
||||
#endif
|
||||
#ifdef CONFIG_MODULES_USE_ELF_RELA
|
||||
#define Elf_Rela Elf32_Rela
|
||||
#endif
|
||||
#define ELF_R_TYPE(X) ELF32_R_TYPE(X)
|
||||
#define ELF_R_SYM(X) ELF32_R_SYM(X)
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_GENERIC_MODULE_H */
|
||||
|
|
|
|||
|
|
@ -1,25 +1,10 @@
|
|||
#ifndef __ASM_GENERIC_PARAM_H
|
||||
#define __ASM_GENERIC_PARAM_H
|
||||
|
||||
#ifndef HZ
|
||||
#define HZ 100
|
||||
#endif
|
||||
#include <uapi/asm-generic/param.h>
|
||||
|
||||
#ifndef EXEC_PAGESIZE
|
||||
#define EXEC_PAGESIZE 4096
|
||||
#endif
|
||||
|
||||
#ifndef NOGROUP
|
||||
#define NOGROUP (-1)
|
||||
#endif
|
||||
|
||||
#define MAXHOSTNAMELEN 64 /* max length of hostname */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
# undef HZ
|
||||
# define HZ CONFIG_HZ /* Internal kernel timer frequency */
|
||||
# define USER_HZ 100 /* some user interfaces are */
|
||||
# define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_GENERIC_PARAM_H */
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ static inline pmd_t pmdp_get_and_clear(struct mm_struct *mm,
|
|||
pmd_t *pmdp)
|
||||
{
|
||||
pmd_t pmd = *pmdp;
|
||||
pmd_clear(mm, address, pmdp);
|
||||
pmd_clear(pmdp);
|
||||
return pmd;
|
||||
}
|
||||
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
|
||||
|
|
@ -162,6 +162,19 @@ extern void pmdp_splitting_flush(struct vm_area_struct *vma,
|
|||
unsigned long address, pmd_t *pmdp);
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PGTABLE_DEPOSIT
|
||||
extern void pgtable_trans_huge_deposit(struct mm_struct *mm, pgtable_t pgtable);
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PGTABLE_WITHDRAW
|
||||
extern pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm);
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PMDP_INVALIDATE
|
||||
extern void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address,
|
||||
pmd_t *pmdp);
|
||||
#endif
|
||||
|
||||
#ifndef __HAVE_ARCH_PTE_SAME
|
||||
static inline int pte_same(pte_t pte_a, pte_t pte_b)
|
||||
{
|
||||
|
|
@ -381,48 +394,59 @@ static inline void ptep_modify_prot_commit(struct mm_struct *mm,
|
|||
|
||||
#ifndef __HAVE_PFNMAP_TRACKING
|
||||
/*
|
||||
* Interface that can be used by architecture code to keep track of
|
||||
* memory type of pfn mappings (remap_pfn_range, vm_insert_pfn)
|
||||
*
|
||||
* track_pfn_vma_new is called when a _new_ pfn mapping is being established
|
||||
* for physical range indicated by pfn and size.
|
||||
* Interfaces that can be used by architecture code to keep track of
|
||||
* memory type of pfn mappings specified by the remap_pfn_range,
|
||||
* vm_insert_pfn.
|
||||
*/
|
||||
static inline int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t *prot,
|
||||
unsigned long pfn, unsigned long size)
|
||||
|
||||
/*
|
||||
* track_pfn_remap is called when a _new_ pfn mapping is being established
|
||||
* by remap_pfn_range() for physical range indicated by pfn and size.
|
||||
*/
|
||||
static inline int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot,
|
||||
unsigned long pfn, unsigned long addr,
|
||||
unsigned long size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Interface that can be used by architecture code to keep track of
|
||||
* memory type of pfn mappings (remap_pfn_range, vm_insert_pfn)
|
||||
*
|
||||
* track_pfn_vma_copy is called when vma that is covering the pfnmap gets
|
||||
* track_pfn_insert is called when a _new_ single pfn is established
|
||||
* by vm_insert_pfn().
|
||||
*/
|
||||
static inline int track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot,
|
||||
unsigned long pfn)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* track_pfn_copy is called when vma that is covering the pfnmap gets
|
||||
* copied through copy_page_range().
|
||||
*/
|
||||
static inline int track_pfn_vma_copy(struct vm_area_struct *vma)
|
||||
static inline int track_pfn_copy(struct vm_area_struct *vma)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Interface that can be used by architecture code to keep track of
|
||||
* memory type of pfn mappings (remap_pfn_range, vm_insert_pfn)
|
||||
*
|
||||
* untrack_pfn_vma is called while unmapping a pfnmap for a region.
|
||||
* untrack can be called for a specific region indicated by pfn and size or
|
||||
* can be for the entire vma (in which case size can be zero).
|
||||
* can be for the entire vma (in which case pfn, size are zero).
|
||||
*/
|
||||
static inline void untrack_pfn_vma(struct vm_area_struct *vma,
|
||||
unsigned long pfn, unsigned long size)
|
||||
static inline void untrack_pfn(struct vm_area_struct *vma,
|
||||
unsigned long pfn, unsigned long size)
|
||||
{
|
||||
}
|
||||
#else
|
||||
extern int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t *prot,
|
||||
unsigned long pfn, unsigned long size);
|
||||
extern int track_pfn_vma_copy(struct vm_area_struct *vma);
|
||||
extern void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn,
|
||||
unsigned long size);
|
||||
extern int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot,
|
||||
unsigned long pfn, unsigned long addr,
|
||||
unsigned long size);
|
||||
extern int track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot,
|
||||
unsigned long pfn);
|
||||
extern int track_pfn_copy(struct vm_area_struct *vma);
|
||||
extern void untrack_pfn(struct vm_area_struct *vma, unsigned long pfn,
|
||||
unsigned long size);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
|
|
|
|||
|
|
@ -1,70 +1,8 @@
|
|||
#ifndef _ASM_GENERIC_RESOURCE_H
|
||||
#define _ASM_GENERIC_RESOURCE_H
|
||||
|
||||
/*
|
||||
* Resource limit IDs
|
||||
*
|
||||
* ( Compatibility detail: there are architectures that have
|
||||
* a different rlimit ID order in the 5-9 range and want
|
||||
* to keep that order for binary compatibility. The reasons
|
||||
* are historic and all new rlimits are identical across all
|
||||
* arches. If an arch has such special order for some rlimits
|
||||
* then it defines them prior including asm-generic/resource.h. )
|
||||
*/
|
||||
#include <uapi/asm-generic/resource.h>
|
||||
|
||||
#define RLIMIT_CPU 0 /* CPU time in sec */
|
||||
#define RLIMIT_FSIZE 1 /* Maximum filesize */
|
||||
#define RLIMIT_DATA 2 /* max data size */
|
||||
#define RLIMIT_STACK 3 /* max stack size */
|
||||
#define RLIMIT_CORE 4 /* max core file size */
|
||||
|
||||
#ifndef RLIMIT_RSS
|
||||
# define RLIMIT_RSS 5 /* max resident set size */
|
||||
#endif
|
||||
|
||||
#ifndef RLIMIT_NPROC
|
||||
# define RLIMIT_NPROC 6 /* max number of processes */
|
||||
#endif
|
||||
|
||||
#ifndef RLIMIT_NOFILE
|
||||
# define RLIMIT_NOFILE 7 /* max number of open files */
|
||||
#endif
|
||||
|
||||
#ifndef RLIMIT_MEMLOCK
|
||||
# define RLIMIT_MEMLOCK 8 /* max locked-in-memory address space */
|
||||
#endif
|
||||
|
||||
#ifndef RLIMIT_AS
|
||||
# define RLIMIT_AS 9 /* address space limit */
|
||||
#endif
|
||||
|
||||
#define RLIMIT_LOCKS 10 /* maximum file locks held */
|
||||
#define RLIMIT_SIGPENDING 11 /* max number of pending signals */
|
||||
#define RLIMIT_MSGQUEUE 12 /* maximum bytes in POSIX mqueues */
|
||||
#define RLIMIT_NICE 13 /* max nice prio allowed to raise to
|
||||
0-39 for nice level 19 .. -20 */
|
||||
#define RLIMIT_RTPRIO 14 /* maximum realtime priority */
|
||||
#define RLIMIT_RTTIME 15 /* timeout for RT tasks in us */
|
||||
#define RLIM_NLIMITS 16
|
||||
|
||||
/*
|
||||
* SuS says limits have to be unsigned.
|
||||
* Which makes a ton more sense anyway.
|
||||
*
|
||||
* Some architectures override this (for compatibility reasons):
|
||||
*/
|
||||
#ifndef RLIM_INFINITY
|
||||
# define RLIM_INFINITY (~0UL)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* RLIMIT_STACK default maximum - some architectures override it:
|
||||
*/
|
||||
#ifndef _STK_LIM_MAX
|
||||
# define _STK_LIM_MAX RLIM_INFINITY
|
||||
#endif
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/*
|
||||
* boot-time rlimit defaults for the init task:
|
||||
|
|
@ -89,6 +27,4 @@
|
|||
[RLIMIT_RTTIME] = { RLIM_INFINITY, RLIM_INFINITY }, \
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,145 +1,8 @@
|
|||
#ifndef _ASM_GENERIC_SIGINFO_H
|
||||
#define _ASM_GENERIC_SIGINFO_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/types.h>
|
||||
#include <uapi/asm-generic/siginfo.h>
|
||||
|
||||
typedef union sigval {
|
||||
int sival_int;
|
||||
void __user *sival_ptr;
|
||||
} sigval_t;
|
||||
|
||||
/*
|
||||
* This is the size (including padding) of the part of the
|
||||
* struct siginfo that is before the union.
|
||||
*/
|
||||
#ifndef __ARCH_SI_PREAMBLE_SIZE
|
||||
#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
|
||||
#endif
|
||||
|
||||
#define SI_MAX_SIZE 128
|
||||
#ifndef SI_PAD_SIZE
|
||||
#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
|
||||
#endif
|
||||
|
||||
#ifndef __ARCH_SI_UID_T
|
||||
#define __ARCH_SI_UID_T __kernel_uid32_t
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The default "si_band" type is "long", as specified by POSIX.
|
||||
* However, some architectures want to override this to "int"
|
||||
* for historical compatibility reasons, so we allow that.
|
||||
*/
|
||||
#ifndef __ARCH_SI_BAND_T
|
||||
#define __ARCH_SI_BAND_T long
|
||||
#endif
|
||||
|
||||
#ifndef __ARCH_SI_CLOCK_T
|
||||
#define __ARCH_SI_CLOCK_T __kernel_clock_t
|
||||
#endif
|
||||
|
||||
#ifndef __ARCH_SI_ATTRIBUTES
|
||||
#define __ARCH_SI_ATTRIBUTES
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_ARCH_SIGINFO_T
|
||||
|
||||
typedef struct siginfo {
|
||||
int si_signo;
|
||||
int si_errno;
|
||||
int si_code;
|
||||
|
||||
union {
|
||||
int _pad[SI_PAD_SIZE];
|
||||
|
||||
/* kill() */
|
||||
struct {
|
||||
__kernel_pid_t _pid; /* sender's pid */
|
||||
__ARCH_SI_UID_T _uid; /* sender's uid */
|
||||
} _kill;
|
||||
|
||||
/* POSIX.1b timers */
|
||||
struct {
|
||||
__kernel_timer_t _tid; /* timer id */
|
||||
int _overrun; /* overrun count */
|
||||
char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
|
||||
sigval_t _sigval; /* same as below */
|
||||
int _sys_private; /* not to be passed to user */
|
||||
} _timer;
|
||||
|
||||
/* POSIX.1b signals */
|
||||
struct {
|
||||
__kernel_pid_t _pid; /* sender's pid */
|
||||
__ARCH_SI_UID_T _uid; /* sender's uid */
|
||||
sigval_t _sigval;
|
||||
} _rt;
|
||||
|
||||
/* SIGCHLD */
|
||||
struct {
|
||||
__kernel_pid_t _pid; /* which child */
|
||||
__ARCH_SI_UID_T _uid; /* sender's uid */
|
||||
int _status; /* exit code */
|
||||
__ARCH_SI_CLOCK_T _utime;
|
||||
__ARCH_SI_CLOCK_T _stime;
|
||||
} _sigchld;
|
||||
|
||||
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
|
||||
struct {
|
||||
void __user *_addr; /* faulting insn/memory ref. */
|
||||
#ifdef __ARCH_SI_TRAPNO
|
||||
int _trapno; /* TRAP # which caused the signal */
|
||||
#endif
|
||||
short _addr_lsb; /* LSB of the reported address */
|
||||
} _sigfault;
|
||||
|
||||
/* SIGPOLL */
|
||||
struct {
|
||||
__ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */
|
||||
int _fd;
|
||||
} _sigpoll;
|
||||
|
||||
/* SIGSYS */
|
||||
struct {
|
||||
void __user *_call_addr; /* calling user insn */
|
||||
int _syscall; /* triggering system call number */
|
||||
unsigned int _arch; /* AUDIT_ARCH_* of syscall */
|
||||
} _sigsys;
|
||||
} _sifields;
|
||||
} __ARCH_SI_ATTRIBUTES siginfo_t;
|
||||
|
||||
/* If the arch shares siginfo, then it has SIGSYS. */
|
||||
#define __ARCH_SIGSYS
|
||||
#endif
|
||||
|
||||
/*
|
||||
* How these fields are to be accessed.
|
||||
*/
|
||||
#define si_pid _sifields._kill._pid
|
||||
#define si_uid _sifields._kill._uid
|
||||
#define si_tid _sifields._timer._tid
|
||||
#define si_overrun _sifields._timer._overrun
|
||||
#define si_sys_private _sifields._timer._sys_private
|
||||
#define si_status _sifields._sigchld._status
|
||||
#define si_utime _sifields._sigchld._utime
|
||||
#define si_stime _sifields._sigchld._stime
|
||||
#define si_value _sifields._rt._sigval
|
||||
#define si_int _sifields._rt._sigval.sival_int
|
||||
#define si_ptr _sifields._rt._sigval.sival_ptr
|
||||
#define si_addr _sifields._sigfault._addr
|
||||
#ifdef __ARCH_SI_TRAPNO
|
||||
#define si_trapno _sifields._sigfault._trapno
|
||||
#endif
|
||||
#define si_addr_lsb _sifields._sigfault._addr_lsb
|
||||
#define si_band _sifields._sigpoll._band
|
||||
#define si_fd _sifields._sigpoll._fd
|
||||
#ifdef __ARCH_SIGSYS
|
||||
#define si_call_addr _sifields._sigsys._call_addr
|
||||
#define si_syscall _sifields._sigsys._syscall
|
||||
#define si_arch _sifields._sigsys._arch
|
||||
#endif
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#define __SI_MASK 0xffff0000u
|
||||
#define __SI_KILL (0 << 16)
|
||||
#define __SI_TIMER (1 << 16)
|
||||
|
|
@ -150,162 +13,6 @@ typedef struct siginfo {
|
|||
#define __SI_MESGQ (6 << 16)
|
||||
#define __SI_SYS (7 << 16)
|
||||
#define __SI_CODE(T,N) ((T) | ((N) & 0xffff))
|
||||
#else
|
||||
#define __SI_KILL 0
|
||||
#define __SI_TIMER 0
|
||||
#define __SI_POLL 0
|
||||
#define __SI_FAULT 0
|
||||
#define __SI_CHLD 0
|
||||
#define __SI_RT 0
|
||||
#define __SI_MESGQ 0
|
||||
#define __SI_SYS 0
|
||||
#define __SI_CODE(T,N) (N)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* si_code values
|
||||
* Digital reserves positive values for kernel-generated signals.
|
||||
*/
|
||||
#define SI_USER 0 /* sent by kill, sigsend, raise */
|
||||
#define SI_KERNEL 0x80 /* sent by the kernel from somewhere */
|
||||
#define SI_QUEUE -1 /* sent by sigqueue */
|
||||
#define SI_TIMER __SI_CODE(__SI_TIMER,-2) /* sent by timer expiration */
|
||||
#define SI_MESGQ __SI_CODE(__SI_MESGQ,-3) /* sent by real time mesq state change */
|
||||
#define SI_ASYNCIO -4 /* sent by AIO completion */
|
||||
#define SI_SIGIO -5 /* sent by queued SIGIO */
|
||||
#define SI_TKILL -6 /* sent by tkill system call */
|
||||
#define SI_DETHREAD -7 /* sent by execve() killing subsidiary threads */
|
||||
|
||||
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
|
||||
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
|
||||
|
||||
/*
|
||||
* SIGILL si_codes
|
||||
*/
|
||||
#define ILL_ILLOPC (__SI_FAULT|1) /* illegal opcode */
|
||||
#define ILL_ILLOPN (__SI_FAULT|2) /* illegal operand */
|
||||
#define ILL_ILLADR (__SI_FAULT|3) /* illegal addressing mode */
|
||||
#define ILL_ILLTRP (__SI_FAULT|4) /* illegal trap */
|
||||
#define ILL_PRVOPC (__SI_FAULT|5) /* privileged opcode */
|
||||
#define ILL_PRVREG (__SI_FAULT|6) /* privileged register */
|
||||
#define ILL_COPROC (__SI_FAULT|7) /* coprocessor error */
|
||||
#define ILL_BADSTK (__SI_FAULT|8) /* internal stack error */
|
||||
#define NSIGILL 8
|
||||
|
||||
/*
|
||||
* SIGFPE si_codes
|
||||
*/
|
||||
#define FPE_INTDIV (__SI_FAULT|1) /* integer divide by zero */
|
||||
#define FPE_INTOVF (__SI_FAULT|2) /* integer overflow */
|
||||
#define FPE_FLTDIV (__SI_FAULT|3) /* floating point divide by zero */
|
||||
#define FPE_FLTOVF (__SI_FAULT|4) /* floating point overflow */
|
||||
#define FPE_FLTUND (__SI_FAULT|5) /* floating point underflow */
|
||||
#define FPE_FLTRES (__SI_FAULT|6) /* floating point inexact result */
|
||||
#define FPE_FLTINV (__SI_FAULT|7) /* floating point invalid operation */
|
||||
#define FPE_FLTSUB (__SI_FAULT|8) /* subscript out of range */
|
||||
#define NSIGFPE 8
|
||||
|
||||
/*
|
||||
* SIGSEGV si_codes
|
||||
*/
|
||||
#define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */
|
||||
#define SEGV_ACCERR (__SI_FAULT|2) /* invalid permissions for mapped object */
|
||||
#define NSIGSEGV 2
|
||||
|
||||
/*
|
||||
* SIGBUS si_codes
|
||||
*/
|
||||
#define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */
|
||||
#define BUS_ADRERR (__SI_FAULT|2) /* non-existent physical address */
|
||||
#define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */
|
||||
/* hardware memory error consumed on a machine check: action required */
|
||||
#define BUS_MCEERR_AR (__SI_FAULT|4)
|
||||
/* hardware memory error detected in process but not consumed: action optional*/
|
||||
#define BUS_MCEERR_AO (__SI_FAULT|5)
|
||||
#define NSIGBUS 5
|
||||
|
||||
/*
|
||||
* SIGTRAP si_codes
|
||||
*/
|
||||
#define TRAP_BRKPT (__SI_FAULT|1) /* process breakpoint */
|
||||
#define TRAP_TRACE (__SI_FAULT|2) /* process trace trap */
|
||||
#define TRAP_BRANCH (__SI_FAULT|3) /* process taken branch trap */
|
||||
#define TRAP_HWBKPT (__SI_FAULT|4) /* hardware breakpoint/watchpoint */
|
||||
#define NSIGTRAP 4
|
||||
|
||||
/*
|
||||
* SIGCHLD si_codes
|
||||
*/
|
||||
#define CLD_EXITED (__SI_CHLD|1) /* child has exited */
|
||||
#define CLD_KILLED (__SI_CHLD|2) /* child was killed */
|
||||
#define CLD_DUMPED (__SI_CHLD|3) /* child terminated abnormally */
|
||||
#define CLD_TRAPPED (__SI_CHLD|4) /* traced child has trapped */
|
||||
#define CLD_STOPPED (__SI_CHLD|5) /* child has stopped */
|
||||
#define CLD_CONTINUED (__SI_CHLD|6) /* stopped child has continued */
|
||||
#define NSIGCHLD 6
|
||||
|
||||
/*
|
||||
* SIGPOLL si_codes
|
||||
*/
|
||||
#define POLL_IN (__SI_POLL|1) /* data input available */
|
||||
#define POLL_OUT (__SI_POLL|2) /* output buffers available */
|
||||
#define POLL_MSG (__SI_POLL|3) /* input message available */
|
||||
#define POLL_ERR (__SI_POLL|4) /* i/o error */
|
||||
#define POLL_PRI (__SI_POLL|5) /* high priority input available */
|
||||
#define POLL_HUP (__SI_POLL|6) /* device disconnected */
|
||||
#define NSIGPOLL 6
|
||||
|
||||
/*
|
||||
* SIGSYS si_codes
|
||||
*/
|
||||
#define SYS_SECCOMP (__SI_SYS|1) /* seccomp triggered */
|
||||
#define NSIGSYS 1
|
||||
|
||||
/*
|
||||
* sigevent definitions
|
||||
*
|
||||
* It seems likely that SIGEV_THREAD will have to be handled from
|
||||
* userspace, libpthread transmuting it to SIGEV_SIGNAL, which the
|
||||
* thread manager then catches and does the appropriate nonsense.
|
||||
* However, everything is written out here so as to not get lost.
|
||||
*/
|
||||
#define SIGEV_SIGNAL 0 /* notify via signal */
|
||||
#define SIGEV_NONE 1 /* other notification: meaningless */
|
||||
#define SIGEV_THREAD 2 /* deliver via thread creation */
|
||||
#define SIGEV_THREAD_ID 4 /* deliver to thread */
|
||||
|
||||
/*
|
||||
* This works because the alignment is ok on all current architectures
|
||||
* but we leave open this being overridden in the future
|
||||
*/
|
||||
#ifndef __ARCH_SIGEV_PREAMBLE_SIZE
|
||||
#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t))
|
||||
#endif
|
||||
|
||||
#define SIGEV_MAX_SIZE 64
|
||||
#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) \
|
||||
/ sizeof(int))
|
||||
|
||||
typedef struct sigevent {
|
||||
sigval_t sigev_value;
|
||||
int sigev_signo;
|
||||
int sigev_notify;
|
||||
union {
|
||||
int _pad[SIGEV_PAD_SIZE];
|
||||
int _tid;
|
||||
|
||||
struct {
|
||||
void (*_function)(sigval_t);
|
||||
void *_attribute; /* really pthread_attr_t */
|
||||
} _sigev_thread;
|
||||
} _sigev_un;
|
||||
} sigevent_t;
|
||||
|
||||
#define sigev_notify_function _sigev_un._sigev_thread._function
|
||||
#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
|
||||
#define sigev_notify_thread_id _sigev_un._tid
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
struct siginfo;
|
||||
void do_schedule_next_timer(struct siginfo *info);
|
||||
|
|
@ -327,6 +34,4 @@ static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
|
|||
|
||||
extern int copy_siginfo_to_user(struct siginfo __user *to, struct siginfo *from);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,131 +1,16 @@
|
|||
#ifndef __ASM_GENERIC_SIGNAL_H
|
||||
#define __ASM_GENERIC_SIGNAL_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define _NSIG 64
|
||||
#define _NSIG_BPW __BITS_PER_LONG
|
||||
#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
|
||||
|
||||
#define SIGHUP 1
|
||||
#define SIGINT 2
|
||||
#define SIGQUIT 3
|
||||
#define SIGILL 4
|
||||
#define SIGTRAP 5
|
||||
#define SIGABRT 6
|
||||
#define SIGIOT 6
|
||||
#define SIGBUS 7
|
||||
#define SIGFPE 8
|
||||
#define SIGKILL 9
|
||||
#define SIGUSR1 10
|
||||
#define SIGSEGV 11
|
||||
#define SIGUSR2 12
|
||||
#define SIGPIPE 13
|
||||
#define SIGALRM 14
|
||||
#define SIGTERM 15
|
||||
#define SIGSTKFLT 16
|
||||
#define SIGCHLD 17
|
||||
#define SIGCONT 18
|
||||
#define SIGSTOP 19
|
||||
#define SIGTSTP 20
|
||||
#define SIGTTIN 21
|
||||
#define SIGTTOU 22
|
||||
#define SIGURG 23
|
||||
#define SIGXCPU 24
|
||||
#define SIGXFSZ 25
|
||||
#define SIGVTALRM 26
|
||||
#define SIGPROF 27
|
||||
#define SIGWINCH 28
|
||||
#define SIGIO 29
|
||||
#define SIGPOLL SIGIO
|
||||
/*
|
||||
#define SIGLOST 29
|
||||
*/
|
||||
#define SIGPWR 30
|
||||
#define SIGSYS 31
|
||||
#define SIGUNUSED 31
|
||||
|
||||
/* These should not be considered constants from userland. */
|
||||
#define SIGRTMIN 32
|
||||
#ifndef SIGRTMAX
|
||||
#define SIGRTMAX _NSIG
|
||||
#endif
|
||||
|
||||
/*
|
||||
* SA_FLAGS values:
|
||||
*
|
||||
* SA_ONSTACK indicates that a registered stack_t will be used.
|
||||
* SA_RESTART flag to get restarting signals (which were the default long ago)
|
||||
* SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
|
||||
* SA_RESETHAND clears the handler when the signal is delivered.
|
||||
* SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
|
||||
* SA_NODEFER prevents the current signal from being masked in the handler.
|
||||
*
|
||||
* SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
|
||||
* Unix names RESETHAND and NODEFER respectively.
|
||||
*/
|
||||
#define SA_NOCLDSTOP 0x00000001
|
||||
#define SA_NOCLDWAIT 0x00000002
|
||||
#define SA_SIGINFO 0x00000004
|
||||
#define SA_ONSTACK 0x08000000
|
||||
#define SA_RESTART 0x10000000
|
||||
#define SA_NODEFER 0x40000000
|
||||
#define SA_RESETHAND 0x80000000
|
||||
|
||||
#define SA_NOMASK SA_NODEFER
|
||||
#define SA_ONESHOT SA_RESETHAND
|
||||
|
||||
/*
|
||||
* New architectures should not define the obsolete
|
||||
* SA_RESTORER 0x04000000
|
||||
*/
|
||||
|
||||
/*
|
||||
* sigaltstack controls
|
||||
*/
|
||||
#define SS_ONSTACK 1
|
||||
#define SS_DISABLE 2
|
||||
|
||||
#define MINSIGSTKSZ 2048
|
||||
#define SIGSTKSZ 8192
|
||||
#include <uapi/asm-generic/signal.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
typedef struct {
|
||||
unsigned long sig[_NSIG_WORDS];
|
||||
} sigset_t;
|
||||
|
||||
/* not actually used, but required for linux/syscalls.h */
|
||||
typedef unsigned long old_sigset_t;
|
||||
|
||||
#include <asm-generic/signal-defs.h>
|
||||
|
||||
struct sigaction {
|
||||
__sighandler_t sa_handler;
|
||||
unsigned long sa_flags;
|
||||
#ifdef SA_RESTORER
|
||||
__sigrestore_t sa_restorer;
|
||||
#endif
|
||||
sigset_t sa_mask; /* mask last for extensibility */
|
||||
};
|
||||
|
||||
struct k_sigaction {
|
||||
struct sigaction sa;
|
||||
};
|
||||
|
||||
typedef struct sigaltstack {
|
||||
void __user *ss_sp;
|
||||
int ss_flags;
|
||||
size_t ss_size;
|
||||
} stack_t;
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <asm/sigcontext.h>
|
||||
#undef __HAVE_ARCH_SIG_BITOPS
|
||||
|
||||
#define ptrace_signal_deliver(regs, cookie) do { } while (0)
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* _ASM_GENERIC_SIGNAL_H */
|
||||
|
|
|
|||
|
|
@ -1,86 +1,7 @@
|
|||
#ifndef _GENERIC_STATFS_H
|
||||
#define _GENERIC_STATFS_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <uapi/asm-generic/statfs.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
typedef __kernel_fsid_t fsid_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Most 64-bit platforms use 'long', while most 32-bit platforms use '__u32'.
|
||||
* Yes, they differ in signedness as well as size.
|
||||
* Special cases can override it for themselves -- except for S390x, which
|
||||
* is just a little too special for us. And MIPS, which I'm not touching
|
||||
* with a 10' pole.
|
||||
*/
|
||||
#ifndef __statfs_word
|
||||
#if __BITS_PER_LONG == 64
|
||||
#define __statfs_word long
|
||||
#else
|
||||
#define __statfs_word __u32
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct statfs {
|
||||
__statfs_word f_type;
|
||||
__statfs_word f_bsize;
|
||||
__statfs_word f_blocks;
|
||||
__statfs_word f_bfree;
|
||||
__statfs_word f_bavail;
|
||||
__statfs_word f_files;
|
||||
__statfs_word f_ffree;
|
||||
__kernel_fsid_t f_fsid;
|
||||
__statfs_word f_namelen;
|
||||
__statfs_word f_frsize;
|
||||
__statfs_word f_flags;
|
||||
__statfs_word f_spare[4];
|
||||
};
|
||||
|
||||
/*
|
||||
* ARM needs to avoid the 32-bit padding at the end, for consistency
|
||||
* between EABI and OABI
|
||||
*/
|
||||
#ifndef ARCH_PACK_STATFS64
|
||||
#define ARCH_PACK_STATFS64
|
||||
#endif
|
||||
|
||||
struct statfs64 {
|
||||
__statfs_word f_type;
|
||||
__statfs_word f_bsize;
|
||||
__u64 f_blocks;
|
||||
__u64 f_bfree;
|
||||
__u64 f_bavail;
|
||||
__u64 f_files;
|
||||
__u64 f_ffree;
|
||||
__kernel_fsid_t f_fsid;
|
||||
__statfs_word f_namelen;
|
||||
__statfs_word f_frsize;
|
||||
__statfs_word f_flags;
|
||||
__statfs_word f_spare[4];
|
||||
} ARCH_PACK_STATFS64;
|
||||
|
||||
/*
|
||||
* IA64 and x86_64 need to avoid the 32-bit padding at the end,
|
||||
* to be compatible with the i386 ABI
|
||||
*/
|
||||
#ifndef ARCH_PACK_COMPAT_STATFS64
|
||||
#define ARCH_PACK_COMPAT_STATFS64
|
||||
#endif
|
||||
|
||||
struct compat_statfs64 {
|
||||
__u32 f_type;
|
||||
__u32 f_bsize;
|
||||
__u64 f_blocks;
|
||||
__u64 f_bfree;
|
||||
__u64 f_bavail;
|
||||
__u64 f_files;
|
||||
__u64 f_ffree;
|
||||
__kernel_fsid_t f_fsid;
|
||||
__u32 f_namelen;
|
||||
__u32 f_frsize;
|
||||
__u32 f_flags;
|
||||
__u32 f_spare[4];
|
||||
} ARCH_PACK_COMPAT_STATFS64;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,54 +1,9 @@
|
|||
#ifndef _ASM_GENERIC_TERMIOS_H
|
||||
#define _ASM_GENERIC_TERMIOS_H
|
||||
/*
|
||||
* Most architectures have straight copies of the x86 code, with
|
||||
* varying levels of bug fixes on top. Usually it's a good idea
|
||||
* to use this generic version instead, but be careful to avoid
|
||||
* ABI changes.
|
||||
* New architectures should not provide their own version.
|
||||
*/
|
||||
|
||||
#include <asm/termbits.h>
|
||||
#include <asm/ioctls.h>
|
||||
|
||||
struct winsize {
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
unsigned short ws_xpixel;
|
||||
unsigned short ws_ypixel;
|
||||
};
|
||||
|
||||
#define NCC 8
|
||||
struct termio {
|
||||
unsigned short c_iflag; /* input mode flags */
|
||||
unsigned short c_oflag; /* output mode flags */
|
||||
unsigned short c_cflag; /* control mode flags */
|
||||
unsigned short c_lflag; /* local mode flags */
|
||||
unsigned char c_line; /* line discipline */
|
||||
unsigned char c_cc[NCC]; /* control characters */
|
||||
};
|
||||
|
||||
/* modem lines */
|
||||
#define TIOCM_LE 0x001
|
||||
#define TIOCM_DTR 0x002
|
||||
#define TIOCM_RTS 0x004
|
||||
#define TIOCM_ST 0x008
|
||||
#define TIOCM_SR 0x010
|
||||
#define TIOCM_CTS 0x020
|
||||
#define TIOCM_CAR 0x040
|
||||
#define TIOCM_RNG 0x080
|
||||
#define TIOCM_DSR 0x100
|
||||
#define TIOCM_CD TIOCM_CAR
|
||||
#define TIOCM_RI TIOCM_RNG
|
||||
#define TIOCM_OUT1 0x2000
|
||||
#define TIOCM_OUT2 0x4000
|
||||
#define TIOCM_LOOP 0x8000
|
||||
|
||||
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
#include <uapi/asm-generic/termios.h>
|
||||
|
||||
/* intr=^C quit=^\ erase=del kill=^U
|
||||
eof=^D vtime=\0 vmin=\1 sxtc=\0
|
||||
|
|
@ -149,6 +104,4 @@ static inline int kernel_termios_to_user_termios(struct termios __user *u,
|
|||
}
|
||||
#endif /* TCGETS2 */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _ASM_GENERIC_TERMIOS_H */
|
||||
|
|
|
|||
|
|
@ -1,908 +1,4 @@
|
|||
#if !defined(_ASM_GENERIC_UNISTD_H) || defined(__SYSCALL)
|
||||
#define _ASM_GENERIC_UNISTD_H
|
||||
|
||||
#include <asm/bitsperlong.h>
|
||||
|
||||
/*
|
||||
* This file contains the system call numbers, based on the
|
||||
* layout of the x86-64 architecture, which embeds the
|
||||
* pointer to the syscall in the table.
|
||||
*
|
||||
* As a basic principle, no duplication of functionality
|
||||
* should be added, e.g. we don't use lseek when llseek
|
||||
* is present. New architectures should use this file
|
||||
* and implement the less feature-full calls in user space.
|
||||
*/
|
||||
|
||||
#ifndef __SYSCALL
|
||||
#define __SYSCALL(x, y)
|
||||
#endif
|
||||
|
||||
#if __BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)
|
||||
#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _32)
|
||||
#else
|
||||
#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64)
|
||||
#endif
|
||||
|
||||
#ifdef __SYSCALL_COMPAT
|
||||
#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _comp)
|
||||
#define __SC_COMP_3264(_nr, _32, _64, _comp) __SYSCALL(_nr, _comp)
|
||||
#else
|
||||
#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys)
|
||||
#define __SC_COMP_3264(_nr, _32, _64, _comp) __SC_3264(_nr, _32, _64)
|
||||
#endif
|
||||
|
||||
#define __NR_io_setup 0
|
||||
__SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup)
|
||||
#define __NR_io_destroy 1
|
||||
__SYSCALL(__NR_io_destroy, sys_io_destroy)
|
||||
#define __NR_io_submit 2
|
||||
__SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit)
|
||||
#define __NR_io_cancel 3
|
||||
__SYSCALL(__NR_io_cancel, sys_io_cancel)
|
||||
#define __NR_io_getevents 4
|
||||
__SC_COMP(__NR_io_getevents, sys_io_getevents, compat_sys_io_getevents)
|
||||
|
||||
/* fs/xattr.c */
|
||||
#define __NR_setxattr 5
|
||||
__SYSCALL(__NR_setxattr, sys_setxattr)
|
||||
#define __NR_lsetxattr 6
|
||||
__SYSCALL(__NR_lsetxattr, sys_lsetxattr)
|
||||
#define __NR_fsetxattr 7
|
||||
__SYSCALL(__NR_fsetxattr, sys_fsetxattr)
|
||||
#define __NR_getxattr 8
|
||||
__SYSCALL(__NR_getxattr, sys_getxattr)
|
||||
#define __NR_lgetxattr 9
|
||||
__SYSCALL(__NR_lgetxattr, sys_lgetxattr)
|
||||
#define __NR_fgetxattr 10
|
||||
__SYSCALL(__NR_fgetxattr, sys_fgetxattr)
|
||||
#define __NR_listxattr 11
|
||||
__SYSCALL(__NR_listxattr, sys_listxattr)
|
||||
#define __NR_llistxattr 12
|
||||
__SYSCALL(__NR_llistxattr, sys_llistxattr)
|
||||
#define __NR_flistxattr 13
|
||||
__SYSCALL(__NR_flistxattr, sys_flistxattr)
|
||||
#define __NR_removexattr 14
|
||||
__SYSCALL(__NR_removexattr, sys_removexattr)
|
||||
#define __NR_lremovexattr 15
|
||||
__SYSCALL(__NR_lremovexattr, sys_lremovexattr)
|
||||
#define __NR_fremovexattr 16
|
||||
__SYSCALL(__NR_fremovexattr, sys_fremovexattr)
|
||||
|
||||
/* fs/dcache.c */
|
||||
#define __NR_getcwd 17
|
||||
__SYSCALL(__NR_getcwd, sys_getcwd)
|
||||
|
||||
/* fs/cookies.c */
|
||||
#define __NR_lookup_dcookie 18
|
||||
__SC_COMP(__NR_lookup_dcookie, sys_lookup_dcookie, compat_sys_lookup_dcookie)
|
||||
|
||||
/* fs/eventfd.c */
|
||||
#define __NR_eventfd2 19
|
||||
__SYSCALL(__NR_eventfd2, sys_eventfd2)
|
||||
|
||||
/* fs/eventpoll.c */
|
||||
#define __NR_epoll_create1 20
|
||||
__SYSCALL(__NR_epoll_create1, sys_epoll_create1)
|
||||
#define __NR_epoll_ctl 21
|
||||
__SYSCALL(__NR_epoll_ctl, sys_epoll_ctl)
|
||||
#define __NR_epoll_pwait 22
|
||||
__SC_COMP(__NR_epoll_pwait, sys_epoll_pwait, compat_sys_epoll_pwait)
|
||||
|
||||
/* fs/fcntl.c */
|
||||
#define __NR_dup 23
|
||||
__SYSCALL(__NR_dup, sys_dup)
|
||||
#define __NR_dup3 24
|
||||
__SYSCALL(__NR_dup3, sys_dup3)
|
||||
#define __NR3264_fcntl 25
|
||||
__SC_COMP_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl, compat_sys_fcntl64)
|
||||
|
||||
/* fs/inotify_user.c */
|
||||
#define __NR_inotify_init1 26
|
||||
__SYSCALL(__NR_inotify_init1, sys_inotify_init1)
|
||||
#define __NR_inotify_add_watch 27
|
||||
__SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch)
|
||||
#define __NR_inotify_rm_watch 28
|
||||
__SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch)
|
||||
|
||||
/* fs/ioctl.c */
|
||||
#define __NR_ioctl 29
|
||||
__SC_COMP(__NR_ioctl, sys_ioctl, compat_sys_ioctl)
|
||||
|
||||
/* fs/ioprio.c */
|
||||
#define __NR_ioprio_set 30
|
||||
__SYSCALL(__NR_ioprio_set, sys_ioprio_set)
|
||||
#define __NR_ioprio_get 31
|
||||
__SYSCALL(__NR_ioprio_get, sys_ioprio_get)
|
||||
|
||||
/* fs/locks.c */
|
||||
#define __NR_flock 32
|
||||
__SYSCALL(__NR_flock, sys_flock)
|
||||
|
||||
/* fs/namei.c */
|
||||
#define __NR_mknodat 33
|
||||
__SYSCALL(__NR_mknodat, sys_mknodat)
|
||||
#define __NR_mkdirat 34
|
||||
__SYSCALL(__NR_mkdirat, sys_mkdirat)
|
||||
#define __NR_unlinkat 35
|
||||
__SYSCALL(__NR_unlinkat, sys_unlinkat)
|
||||
#define __NR_symlinkat 36
|
||||
__SYSCALL(__NR_symlinkat, sys_symlinkat)
|
||||
#define __NR_linkat 37
|
||||
__SYSCALL(__NR_linkat, sys_linkat)
|
||||
#define __NR_renameat 38
|
||||
__SYSCALL(__NR_renameat, sys_renameat)
|
||||
|
||||
/* fs/namespace.c */
|
||||
#define __NR_umount2 39
|
||||
__SYSCALL(__NR_umount2, sys_umount)
|
||||
#define __NR_mount 40
|
||||
__SC_COMP(__NR_mount, sys_mount, compat_sys_mount)
|
||||
#define __NR_pivot_root 41
|
||||
__SYSCALL(__NR_pivot_root, sys_pivot_root)
|
||||
|
||||
/* fs/nfsctl.c */
|
||||
#define __NR_nfsservctl 42
|
||||
__SYSCALL(__NR_nfsservctl, sys_ni_syscall)
|
||||
|
||||
/* fs/open.c */
|
||||
#define __NR3264_statfs 43
|
||||
__SC_COMP_3264(__NR3264_statfs, sys_statfs64, sys_statfs, \
|
||||
compat_sys_statfs64)
|
||||
#define __NR3264_fstatfs 44
|
||||
__SC_COMP_3264(__NR3264_fstatfs, sys_fstatfs64, sys_fstatfs, \
|
||||
compat_sys_fstatfs64)
|
||||
#define __NR3264_truncate 45
|
||||
__SC_COMP_3264(__NR3264_truncate, sys_truncate64, sys_truncate, \
|
||||
compat_sys_truncate64)
|
||||
#define __NR3264_ftruncate 46
|
||||
__SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate, \
|
||||
compat_sys_ftruncate64)
|
||||
|
||||
#define __NR_fallocate 47
|
||||
__SC_COMP(__NR_fallocate, sys_fallocate, compat_sys_fallocate)
|
||||
#define __NR_faccessat 48
|
||||
__SYSCALL(__NR_faccessat, sys_faccessat)
|
||||
#define __NR_chdir 49
|
||||
__SYSCALL(__NR_chdir, sys_chdir)
|
||||
#define __NR_fchdir 50
|
||||
__SYSCALL(__NR_fchdir, sys_fchdir)
|
||||
#define __NR_chroot 51
|
||||
__SYSCALL(__NR_chroot, sys_chroot)
|
||||
#define __NR_fchmod 52
|
||||
__SYSCALL(__NR_fchmod, sys_fchmod)
|
||||
#define __NR_fchmodat 53
|
||||
__SYSCALL(__NR_fchmodat, sys_fchmodat)
|
||||
#define __NR_fchownat 54
|
||||
__SYSCALL(__NR_fchownat, sys_fchownat)
|
||||
#define __NR_fchown 55
|
||||
__SYSCALL(__NR_fchown, sys_fchown)
|
||||
#define __NR_openat 56
|
||||
__SC_COMP(__NR_openat, sys_openat, compat_sys_openat)
|
||||
#define __NR_close 57
|
||||
__SYSCALL(__NR_close, sys_close)
|
||||
#define __NR_vhangup 58
|
||||
__SYSCALL(__NR_vhangup, sys_vhangup)
|
||||
|
||||
/* fs/pipe.c */
|
||||
#define __NR_pipe2 59
|
||||
__SYSCALL(__NR_pipe2, sys_pipe2)
|
||||
|
||||
/* fs/quota.c */
|
||||
#define __NR_quotactl 60
|
||||
__SYSCALL(__NR_quotactl, sys_quotactl)
|
||||
|
||||
/* fs/readdir.c */
|
||||
#define __NR_getdents64 61
|
||||
__SC_COMP(__NR_getdents64, sys_getdents64, compat_sys_getdents64)
|
||||
|
||||
/* fs/read_write.c */
|
||||
#define __NR3264_lseek 62
|
||||
__SC_3264(__NR3264_lseek, sys_llseek, sys_lseek)
|
||||
#define __NR_read 63
|
||||
__SYSCALL(__NR_read, sys_read)
|
||||
#define __NR_write 64
|
||||
__SYSCALL(__NR_write, sys_write)
|
||||
#define __NR_readv 65
|
||||
__SC_COMP(__NR_readv, sys_readv, compat_sys_readv)
|
||||
#define __NR_writev 66
|
||||
__SC_COMP(__NR_writev, sys_writev, compat_sys_writev)
|
||||
#define __NR_pread64 67
|
||||
__SC_COMP(__NR_pread64, sys_pread64, compat_sys_pread64)
|
||||
#define __NR_pwrite64 68
|
||||
__SC_COMP(__NR_pwrite64, sys_pwrite64, compat_sys_pwrite64)
|
||||
#define __NR_preadv 69
|
||||
__SC_COMP(__NR_preadv, sys_preadv, compat_sys_preadv)
|
||||
#define __NR_pwritev 70
|
||||
__SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev)
|
||||
|
||||
/* fs/sendfile.c */
|
||||
#define __NR3264_sendfile 71
|
||||
__SYSCALL(__NR3264_sendfile, sys_sendfile64)
|
||||
|
||||
/* fs/select.c */
|
||||
#define __NR_pselect6 72
|
||||
__SC_COMP(__NR_pselect6, sys_pselect6, compat_sys_pselect6)
|
||||
#define __NR_ppoll 73
|
||||
__SC_COMP(__NR_ppoll, sys_ppoll, compat_sys_ppoll)
|
||||
|
||||
/* fs/signalfd.c */
|
||||
#define __NR_signalfd4 74
|
||||
__SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4)
|
||||
|
||||
/* fs/splice.c */
|
||||
#define __NR_vmsplice 75
|
||||
__SC_COMP(__NR_vmsplice, sys_vmsplice, compat_sys_vmsplice)
|
||||
#define __NR_splice 76
|
||||
__SYSCALL(__NR_splice, sys_splice)
|
||||
#define __NR_tee 77
|
||||
__SYSCALL(__NR_tee, sys_tee)
|
||||
|
||||
/* fs/stat.c */
|
||||
#define __NR_readlinkat 78
|
||||
__SYSCALL(__NR_readlinkat, sys_readlinkat)
|
||||
#define __NR3264_fstatat 79
|
||||
__SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat)
|
||||
#define __NR3264_fstat 80
|
||||
__SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat)
|
||||
|
||||
/* fs/sync.c */
|
||||
#define __NR_sync 81
|
||||
__SYSCALL(__NR_sync, sys_sync)
|
||||
#define __NR_fsync 82
|
||||
__SYSCALL(__NR_fsync, sys_fsync)
|
||||
#define __NR_fdatasync 83
|
||||
__SYSCALL(__NR_fdatasync, sys_fdatasync)
|
||||
#ifdef __ARCH_WANT_SYNC_FILE_RANGE2
|
||||
#define __NR_sync_file_range2 84
|
||||
__SC_COMP(__NR_sync_file_range2, sys_sync_file_range2, \
|
||||
compat_sys_sync_file_range2)
|
||||
#else
|
||||
#define __NR_sync_file_range 84
|
||||
__SC_COMP(__NR_sync_file_range, sys_sync_file_range, \
|
||||
compat_sys_sync_file_range)
|
||||
#endif
|
||||
|
||||
/* fs/timerfd.c */
|
||||
#define __NR_timerfd_create 85
|
||||
__SYSCALL(__NR_timerfd_create, sys_timerfd_create)
|
||||
#define __NR_timerfd_settime 86
|
||||
__SC_COMP(__NR_timerfd_settime, sys_timerfd_settime, \
|
||||
compat_sys_timerfd_settime)
|
||||
#define __NR_timerfd_gettime 87
|
||||
__SC_COMP(__NR_timerfd_gettime, sys_timerfd_gettime, \
|
||||
compat_sys_timerfd_gettime)
|
||||
|
||||
/* fs/utimes.c */
|
||||
#define __NR_utimensat 88
|
||||
__SC_COMP(__NR_utimensat, sys_utimensat, compat_sys_utimensat)
|
||||
|
||||
/* kernel/acct.c */
|
||||
#define __NR_acct 89
|
||||
__SYSCALL(__NR_acct, sys_acct)
|
||||
|
||||
/* kernel/capability.c */
|
||||
#define __NR_capget 90
|
||||
__SYSCALL(__NR_capget, sys_capget)
|
||||
#define __NR_capset 91
|
||||
__SYSCALL(__NR_capset, sys_capset)
|
||||
|
||||
/* kernel/exec_domain.c */
|
||||
#define __NR_personality 92
|
||||
__SYSCALL(__NR_personality, sys_personality)
|
||||
|
||||
/* kernel/exit.c */
|
||||
#define __NR_exit 93
|
||||
__SYSCALL(__NR_exit, sys_exit)
|
||||
#define __NR_exit_group 94
|
||||
__SYSCALL(__NR_exit_group, sys_exit_group)
|
||||
#define __NR_waitid 95
|
||||
__SC_COMP(__NR_waitid, sys_waitid, compat_sys_waitid)
|
||||
|
||||
/* kernel/fork.c */
|
||||
#define __NR_set_tid_address 96
|
||||
__SYSCALL(__NR_set_tid_address, sys_set_tid_address)
|
||||
#define __NR_unshare 97
|
||||
__SYSCALL(__NR_unshare, sys_unshare)
|
||||
|
||||
/* kernel/futex.c */
|
||||
#define __NR_futex 98
|
||||
__SC_COMP(__NR_futex, sys_futex, compat_sys_futex)
|
||||
#define __NR_set_robust_list 99
|
||||
__SC_COMP(__NR_set_robust_list, sys_set_robust_list, \
|
||||
compat_sys_set_robust_list)
|
||||
#define __NR_get_robust_list 100
|
||||
__SC_COMP(__NR_get_robust_list, sys_get_robust_list, \
|
||||
compat_sys_get_robust_list)
|
||||
|
||||
/* kernel/hrtimer.c */
|
||||
#define __NR_nanosleep 101
|
||||
__SC_COMP(__NR_nanosleep, sys_nanosleep, compat_sys_nanosleep)
|
||||
|
||||
/* kernel/itimer.c */
|
||||
#define __NR_getitimer 102
|
||||
__SC_COMP(__NR_getitimer, sys_getitimer, compat_sys_getitimer)
|
||||
#define __NR_setitimer 103
|
||||
__SC_COMP(__NR_setitimer, sys_setitimer, compat_sys_setitimer)
|
||||
|
||||
/* kernel/kexec.c */
|
||||
#define __NR_kexec_load 104
|
||||
__SC_COMP(__NR_kexec_load, sys_kexec_load, compat_sys_kexec_load)
|
||||
|
||||
/* kernel/module.c */
|
||||
#define __NR_init_module 105
|
||||
__SYSCALL(__NR_init_module, sys_init_module)
|
||||
#define __NR_delete_module 106
|
||||
__SYSCALL(__NR_delete_module, sys_delete_module)
|
||||
|
||||
/* kernel/posix-timers.c */
|
||||
#define __NR_timer_create 107
|
||||
__SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create)
|
||||
#define __NR_timer_gettime 108
|
||||
__SC_COMP(__NR_timer_gettime, sys_timer_gettime, compat_sys_timer_gettime)
|
||||
#define __NR_timer_getoverrun 109
|
||||
__SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun)
|
||||
#define __NR_timer_settime 110
|
||||
__SC_COMP(__NR_timer_settime, sys_timer_settime, compat_sys_timer_settime)
|
||||
#define __NR_timer_delete 111
|
||||
__SYSCALL(__NR_timer_delete, sys_timer_delete)
|
||||
#define __NR_clock_settime 112
|
||||
__SC_COMP(__NR_clock_settime, sys_clock_settime, compat_sys_clock_settime)
|
||||
#define __NR_clock_gettime 113
|
||||
__SC_COMP(__NR_clock_gettime, sys_clock_gettime, compat_sys_clock_gettime)
|
||||
#define __NR_clock_getres 114
|
||||
__SC_COMP(__NR_clock_getres, sys_clock_getres, compat_sys_clock_getres)
|
||||
#define __NR_clock_nanosleep 115
|
||||
__SC_COMP(__NR_clock_nanosleep, sys_clock_nanosleep, \
|
||||
compat_sys_clock_nanosleep)
|
||||
|
||||
/* kernel/printk.c */
|
||||
#define __NR_syslog 116
|
||||
__SYSCALL(__NR_syslog, sys_syslog)
|
||||
|
||||
/* kernel/ptrace.c */
|
||||
#define __NR_ptrace 117
|
||||
__SYSCALL(__NR_ptrace, sys_ptrace)
|
||||
|
||||
/* kernel/sched.c */
|
||||
#define __NR_sched_setparam 118
|
||||
__SYSCALL(__NR_sched_setparam, sys_sched_setparam)
|
||||
#define __NR_sched_setscheduler 119
|
||||
__SYSCALL(__NR_sched_setscheduler, sys_sched_setscheduler)
|
||||
#define __NR_sched_getscheduler 120
|
||||
__SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler)
|
||||
#define __NR_sched_getparam 121
|
||||
__SYSCALL(__NR_sched_getparam, sys_sched_getparam)
|
||||
#define __NR_sched_setaffinity 122
|
||||
__SC_COMP(__NR_sched_setaffinity, sys_sched_setaffinity, \
|
||||
compat_sys_sched_setaffinity)
|
||||
#define __NR_sched_getaffinity 123
|
||||
__SC_COMP(__NR_sched_getaffinity, sys_sched_getaffinity, \
|
||||
compat_sys_sched_getaffinity)
|
||||
#define __NR_sched_yield 124
|
||||
__SYSCALL(__NR_sched_yield, sys_sched_yield)
|
||||
#define __NR_sched_get_priority_max 125
|
||||
__SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max)
|
||||
#define __NR_sched_get_priority_min 126
|
||||
__SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min)
|
||||
#define __NR_sched_rr_get_interval 127
|
||||
__SC_COMP(__NR_sched_rr_get_interval, sys_sched_rr_get_interval, \
|
||||
compat_sys_sched_rr_get_interval)
|
||||
|
||||
/* kernel/signal.c */
|
||||
#define __NR_restart_syscall 128
|
||||
__SYSCALL(__NR_restart_syscall, sys_restart_syscall)
|
||||
#define __NR_kill 129
|
||||
__SYSCALL(__NR_kill, sys_kill)
|
||||
#define __NR_tkill 130
|
||||
__SYSCALL(__NR_tkill, sys_tkill)
|
||||
#define __NR_tgkill 131
|
||||
__SYSCALL(__NR_tgkill, sys_tgkill)
|
||||
#define __NR_sigaltstack 132
|
||||
__SC_COMP(__NR_sigaltstack, sys_sigaltstack, compat_sys_sigaltstack)
|
||||
#define __NR_rt_sigsuspend 133
|
||||
__SC_COMP(__NR_rt_sigsuspend, sys_rt_sigsuspend, compat_sys_rt_sigsuspend)
|
||||
#define __NR_rt_sigaction 134
|
||||
__SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction)
|
||||
#define __NR_rt_sigprocmask 135
|
||||
__SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask)
|
||||
#define __NR_rt_sigpending 136
|
||||
__SYSCALL(__NR_rt_sigpending, sys_rt_sigpending)
|
||||
#define __NR_rt_sigtimedwait 137
|
||||
__SC_COMP(__NR_rt_sigtimedwait, sys_rt_sigtimedwait, \
|
||||
compat_sys_rt_sigtimedwait)
|
||||
#define __NR_rt_sigqueueinfo 138
|
||||
__SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \
|
||||
compat_sys_rt_sigqueueinfo)
|
||||
#define __NR_rt_sigreturn 139
|
||||
__SC_COMP(__NR_rt_sigreturn, sys_rt_sigreturn, compat_sys_rt_sigreturn)
|
||||
|
||||
/* kernel/sys.c */
|
||||
#define __NR_setpriority 140
|
||||
__SYSCALL(__NR_setpriority, sys_setpriority)
|
||||
#define __NR_getpriority 141
|
||||
__SYSCALL(__NR_getpriority, sys_getpriority)
|
||||
#define __NR_reboot 142
|
||||
__SYSCALL(__NR_reboot, sys_reboot)
|
||||
#define __NR_setregid 143
|
||||
__SYSCALL(__NR_setregid, sys_setregid)
|
||||
#define __NR_setgid 144
|
||||
__SYSCALL(__NR_setgid, sys_setgid)
|
||||
#define __NR_setreuid 145
|
||||
__SYSCALL(__NR_setreuid, sys_setreuid)
|
||||
#define __NR_setuid 146
|
||||
__SYSCALL(__NR_setuid, sys_setuid)
|
||||
#define __NR_setresuid 147
|
||||
__SYSCALL(__NR_setresuid, sys_setresuid)
|
||||
#define __NR_getresuid 148
|
||||
__SYSCALL(__NR_getresuid, sys_getresuid)
|
||||
#define __NR_setresgid 149
|
||||
__SYSCALL(__NR_setresgid, sys_setresgid)
|
||||
#define __NR_getresgid 150
|
||||
__SYSCALL(__NR_getresgid, sys_getresgid)
|
||||
#define __NR_setfsuid 151
|
||||
__SYSCALL(__NR_setfsuid, sys_setfsuid)
|
||||
#define __NR_setfsgid 152
|
||||
__SYSCALL(__NR_setfsgid, sys_setfsgid)
|
||||
#define __NR_times 153
|
||||
__SC_COMP(__NR_times, sys_times, compat_sys_times)
|
||||
#define __NR_setpgid 154
|
||||
__SYSCALL(__NR_setpgid, sys_setpgid)
|
||||
#define __NR_getpgid 155
|
||||
__SYSCALL(__NR_getpgid, sys_getpgid)
|
||||
#define __NR_getsid 156
|
||||
__SYSCALL(__NR_getsid, sys_getsid)
|
||||
#define __NR_setsid 157
|
||||
__SYSCALL(__NR_setsid, sys_setsid)
|
||||
#define __NR_getgroups 158
|
||||
__SYSCALL(__NR_getgroups, sys_getgroups)
|
||||
#define __NR_setgroups 159
|
||||
__SYSCALL(__NR_setgroups, sys_setgroups)
|
||||
#define __NR_uname 160
|
||||
__SYSCALL(__NR_uname, sys_newuname)
|
||||
#define __NR_sethostname 161
|
||||
__SYSCALL(__NR_sethostname, sys_sethostname)
|
||||
#define __NR_setdomainname 162
|
||||
__SYSCALL(__NR_setdomainname, sys_setdomainname)
|
||||
#define __NR_getrlimit 163
|
||||
__SC_COMP(__NR_getrlimit, sys_getrlimit, compat_sys_getrlimit)
|
||||
#define __NR_setrlimit 164
|
||||
__SC_COMP(__NR_setrlimit, sys_setrlimit, compat_sys_setrlimit)
|
||||
#define __NR_getrusage 165
|
||||
__SC_COMP(__NR_getrusage, sys_getrusage, compat_sys_getrusage)
|
||||
#define __NR_umask 166
|
||||
__SYSCALL(__NR_umask, sys_umask)
|
||||
#define __NR_prctl 167
|
||||
__SYSCALL(__NR_prctl, sys_prctl)
|
||||
#define __NR_getcpu 168
|
||||
__SYSCALL(__NR_getcpu, sys_getcpu)
|
||||
|
||||
/* kernel/time.c */
|
||||
#define __NR_gettimeofday 169
|
||||
__SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday)
|
||||
#define __NR_settimeofday 170
|
||||
__SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday)
|
||||
#define __NR_adjtimex 171
|
||||
__SC_COMP(__NR_adjtimex, sys_adjtimex, compat_sys_adjtimex)
|
||||
|
||||
/* kernel/timer.c */
|
||||
#define __NR_getpid 172
|
||||
__SYSCALL(__NR_getpid, sys_getpid)
|
||||
#define __NR_getppid 173
|
||||
__SYSCALL(__NR_getppid, sys_getppid)
|
||||
#define __NR_getuid 174
|
||||
__SYSCALL(__NR_getuid, sys_getuid)
|
||||
#define __NR_geteuid 175
|
||||
__SYSCALL(__NR_geteuid, sys_geteuid)
|
||||
#define __NR_getgid 176
|
||||
__SYSCALL(__NR_getgid, sys_getgid)
|
||||
#define __NR_getegid 177
|
||||
__SYSCALL(__NR_getegid, sys_getegid)
|
||||
#define __NR_gettid 178
|
||||
__SYSCALL(__NR_gettid, sys_gettid)
|
||||
#define __NR_sysinfo 179
|
||||
__SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo)
|
||||
|
||||
/* ipc/mqueue.c */
|
||||
#define __NR_mq_open 180
|
||||
__SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open)
|
||||
#define __NR_mq_unlink 181
|
||||
__SYSCALL(__NR_mq_unlink, sys_mq_unlink)
|
||||
#define __NR_mq_timedsend 182
|
||||
__SC_COMP(__NR_mq_timedsend, sys_mq_timedsend, compat_sys_mq_timedsend)
|
||||
#define __NR_mq_timedreceive 183
|
||||
__SC_COMP(__NR_mq_timedreceive, sys_mq_timedreceive, \
|
||||
compat_sys_mq_timedreceive)
|
||||
#define __NR_mq_notify 184
|
||||
__SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify)
|
||||
#define __NR_mq_getsetattr 185
|
||||
__SC_COMP(__NR_mq_getsetattr, sys_mq_getsetattr, compat_sys_mq_getsetattr)
|
||||
|
||||
/* ipc/msg.c */
|
||||
#define __NR_msgget 186
|
||||
__SYSCALL(__NR_msgget, sys_msgget)
|
||||
#define __NR_msgctl 187
|
||||
__SC_COMP(__NR_msgctl, sys_msgctl, compat_sys_msgctl)
|
||||
#define __NR_msgrcv 188
|
||||
__SC_COMP(__NR_msgrcv, sys_msgrcv, compat_sys_msgrcv)
|
||||
#define __NR_msgsnd 189
|
||||
__SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd)
|
||||
|
||||
/* ipc/sem.c */
|
||||
#define __NR_semget 190
|
||||
__SYSCALL(__NR_semget, sys_semget)
|
||||
#define __NR_semctl 191
|
||||
__SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl)
|
||||
#define __NR_semtimedop 192
|
||||
__SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop)
|
||||
#define __NR_semop 193
|
||||
__SYSCALL(__NR_semop, sys_semop)
|
||||
|
||||
/* ipc/shm.c */
|
||||
#define __NR_shmget 194
|
||||
__SYSCALL(__NR_shmget, sys_shmget)
|
||||
#define __NR_shmctl 195
|
||||
__SC_COMP(__NR_shmctl, sys_shmctl, compat_sys_shmctl)
|
||||
#define __NR_shmat 196
|
||||
__SC_COMP(__NR_shmat, sys_shmat, compat_sys_shmat)
|
||||
#define __NR_shmdt 197
|
||||
__SYSCALL(__NR_shmdt, sys_shmdt)
|
||||
|
||||
/* net/socket.c */
|
||||
#define __NR_socket 198
|
||||
__SYSCALL(__NR_socket, sys_socket)
|
||||
#define __NR_socketpair 199
|
||||
__SYSCALL(__NR_socketpair, sys_socketpair)
|
||||
#define __NR_bind 200
|
||||
__SYSCALL(__NR_bind, sys_bind)
|
||||
#define __NR_listen 201
|
||||
__SYSCALL(__NR_listen, sys_listen)
|
||||
#define __NR_accept 202
|
||||
__SYSCALL(__NR_accept, sys_accept)
|
||||
#define __NR_connect 203
|
||||
__SYSCALL(__NR_connect, sys_connect)
|
||||
#define __NR_getsockname 204
|
||||
__SYSCALL(__NR_getsockname, sys_getsockname)
|
||||
#define __NR_getpeername 205
|
||||
__SYSCALL(__NR_getpeername, sys_getpeername)
|
||||
#define __NR_sendto 206
|
||||
__SYSCALL(__NR_sendto, sys_sendto)
|
||||
#define __NR_recvfrom 207
|
||||
__SC_COMP(__NR_recvfrom, sys_recvfrom, compat_sys_recvfrom)
|
||||
#define __NR_setsockopt 208
|
||||
__SC_COMP(__NR_setsockopt, sys_setsockopt, compat_sys_setsockopt)
|
||||
#define __NR_getsockopt 209
|
||||
__SC_COMP(__NR_getsockopt, sys_getsockopt, compat_sys_getsockopt)
|
||||
#define __NR_shutdown 210
|
||||
__SYSCALL(__NR_shutdown, sys_shutdown)
|
||||
#define __NR_sendmsg 211
|
||||
__SC_COMP(__NR_sendmsg, sys_sendmsg, compat_sys_sendmsg)
|
||||
#define __NR_recvmsg 212
|
||||
__SC_COMP(__NR_recvmsg, sys_recvmsg, compat_sys_recvmsg)
|
||||
|
||||
/* mm/filemap.c */
|
||||
#define __NR_readahead 213
|
||||
__SC_COMP(__NR_readahead, sys_readahead, compat_sys_readahead)
|
||||
|
||||
/* mm/nommu.c, also with MMU */
|
||||
#define __NR_brk 214
|
||||
__SYSCALL(__NR_brk, sys_brk)
|
||||
#define __NR_munmap 215
|
||||
__SYSCALL(__NR_munmap, sys_munmap)
|
||||
#define __NR_mremap 216
|
||||
__SYSCALL(__NR_mremap, sys_mremap)
|
||||
|
||||
/* security/keys/keyctl.c */
|
||||
#define __NR_add_key 217
|
||||
__SYSCALL(__NR_add_key, sys_add_key)
|
||||
#define __NR_request_key 218
|
||||
__SYSCALL(__NR_request_key, sys_request_key)
|
||||
#define __NR_keyctl 219
|
||||
__SC_COMP(__NR_keyctl, sys_keyctl, compat_sys_keyctl)
|
||||
|
||||
/* arch/example/kernel/sys_example.c */
|
||||
#define __NR_clone 220
|
||||
__SYSCALL(__NR_clone, sys_clone)
|
||||
#define __NR_execve 221
|
||||
__SC_COMP(__NR_execve, sys_execve, compat_sys_execve)
|
||||
|
||||
#define __NR3264_mmap 222
|
||||
__SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap)
|
||||
/* mm/fadvise.c */
|
||||
#define __NR3264_fadvise64 223
|
||||
__SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
|
||||
|
||||
/* mm/, CONFIG_MMU only */
|
||||
#ifndef __ARCH_NOMMU
|
||||
#define __NR_swapon 224
|
||||
__SYSCALL(__NR_swapon, sys_swapon)
|
||||
#define __NR_swapoff 225
|
||||
__SYSCALL(__NR_swapoff, sys_swapoff)
|
||||
#define __NR_mprotect 226
|
||||
__SYSCALL(__NR_mprotect, sys_mprotect)
|
||||
#define __NR_msync 227
|
||||
__SYSCALL(__NR_msync, sys_msync)
|
||||
#define __NR_mlock 228
|
||||
__SYSCALL(__NR_mlock, sys_mlock)
|
||||
#define __NR_munlock 229
|
||||
__SYSCALL(__NR_munlock, sys_munlock)
|
||||
#define __NR_mlockall 230
|
||||
__SYSCALL(__NR_mlockall, sys_mlockall)
|
||||
#define __NR_munlockall 231
|
||||
__SYSCALL(__NR_munlockall, sys_munlockall)
|
||||
#define __NR_mincore 232
|
||||
__SYSCALL(__NR_mincore, sys_mincore)
|
||||
#define __NR_madvise 233
|
||||
__SYSCALL(__NR_madvise, sys_madvise)
|
||||
#define __NR_remap_file_pages 234
|
||||
__SYSCALL(__NR_remap_file_pages, sys_remap_file_pages)
|
||||
#define __NR_mbind 235
|
||||
__SC_COMP(__NR_mbind, sys_mbind, compat_sys_mbind)
|
||||
#define __NR_get_mempolicy 236
|
||||
__SC_COMP(__NR_get_mempolicy, sys_get_mempolicy, compat_sys_get_mempolicy)
|
||||
#define __NR_set_mempolicy 237
|
||||
__SC_COMP(__NR_set_mempolicy, sys_set_mempolicy, compat_sys_set_mempolicy)
|
||||
#define __NR_migrate_pages 238
|
||||
__SC_COMP(__NR_migrate_pages, sys_migrate_pages, compat_sys_migrate_pages)
|
||||
#define __NR_move_pages 239
|
||||
__SC_COMP(__NR_move_pages, sys_move_pages, compat_sys_move_pages)
|
||||
#endif
|
||||
|
||||
#define __NR_rt_tgsigqueueinfo 240
|
||||
__SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \
|
||||
compat_sys_rt_tgsigqueueinfo)
|
||||
#define __NR_perf_event_open 241
|
||||
__SYSCALL(__NR_perf_event_open, sys_perf_event_open)
|
||||
#define __NR_accept4 242
|
||||
__SYSCALL(__NR_accept4, sys_accept4)
|
||||
#define __NR_recvmmsg 243
|
||||
__SC_COMP(__NR_recvmmsg, sys_recvmmsg, compat_sys_recvmmsg)
|
||||
|
||||
/*
|
||||
* Architectures may provide up to 16 syscalls of their own
|
||||
* starting with this value.
|
||||
*/
|
||||
#define __NR_arch_specific_syscall 244
|
||||
|
||||
#define __NR_wait4 260
|
||||
__SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4)
|
||||
#define __NR_prlimit64 261
|
||||
__SYSCALL(__NR_prlimit64, sys_prlimit64)
|
||||
#define __NR_fanotify_init 262
|
||||
__SYSCALL(__NR_fanotify_init, sys_fanotify_init)
|
||||
#define __NR_fanotify_mark 263
|
||||
__SYSCALL(__NR_fanotify_mark, sys_fanotify_mark)
|
||||
#define __NR_name_to_handle_at 264
|
||||
__SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at)
|
||||
#define __NR_open_by_handle_at 265
|
||||
__SC_COMP(__NR_open_by_handle_at, sys_open_by_handle_at, \
|
||||
compat_sys_open_by_handle_at)
|
||||
#define __NR_clock_adjtime 266
|
||||
__SC_COMP(__NR_clock_adjtime, sys_clock_adjtime, compat_sys_clock_adjtime)
|
||||
#define __NR_syncfs 267
|
||||
__SYSCALL(__NR_syncfs, sys_syncfs)
|
||||
#define __NR_setns 268
|
||||
__SYSCALL(__NR_setns, sys_setns)
|
||||
#define __NR_sendmmsg 269
|
||||
__SC_COMP(__NR_sendmmsg, sys_sendmmsg, compat_sys_sendmmsg)
|
||||
#define __NR_process_vm_readv 270
|
||||
__SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \
|
||||
compat_sys_process_vm_readv)
|
||||
#define __NR_process_vm_writev 271
|
||||
__SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \
|
||||
compat_sys_process_vm_writev)
|
||||
|
||||
#undef __NR_syscalls
|
||||
#define __NR_syscalls 272
|
||||
|
||||
/*
|
||||
* All syscalls below here should go away really,
|
||||
* these are provided for both review and as a porting
|
||||
* help for the C library version.
|
||||
*
|
||||
* Last chance: are any of these important enough to
|
||||
* enable by default?
|
||||
*/
|
||||
#ifdef __ARCH_WANT_SYSCALL_NO_AT
|
||||
#define __NR_open 1024
|
||||
__SYSCALL(__NR_open, sys_open)
|
||||
#define __NR_link 1025
|
||||
__SYSCALL(__NR_link, sys_link)
|
||||
#define __NR_unlink 1026
|
||||
__SYSCALL(__NR_unlink, sys_unlink)
|
||||
#define __NR_mknod 1027
|
||||
__SYSCALL(__NR_mknod, sys_mknod)
|
||||
#define __NR_chmod 1028
|
||||
__SYSCALL(__NR_chmod, sys_chmod)
|
||||
#define __NR_chown 1029
|
||||
__SYSCALL(__NR_chown, sys_chown)
|
||||
#define __NR_mkdir 1030
|
||||
__SYSCALL(__NR_mkdir, sys_mkdir)
|
||||
#define __NR_rmdir 1031
|
||||
__SYSCALL(__NR_rmdir, sys_rmdir)
|
||||
#define __NR_lchown 1032
|
||||
__SYSCALL(__NR_lchown, sys_lchown)
|
||||
#define __NR_access 1033
|
||||
__SYSCALL(__NR_access, sys_access)
|
||||
#define __NR_rename 1034
|
||||
__SYSCALL(__NR_rename, sys_rename)
|
||||
#define __NR_readlink 1035
|
||||
__SYSCALL(__NR_readlink, sys_readlink)
|
||||
#define __NR_symlink 1036
|
||||
__SYSCALL(__NR_symlink, sys_symlink)
|
||||
#define __NR_utimes 1037
|
||||
__SYSCALL(__NR_utimes, sys_utimes)
|
||||
#define __NR3264_stat 1038
|
||||
__SC_3264(__NR3264_stat, sys_stat64, sys_newstat)
|
||||
#define __NR3264_lstat 1039
|
||||
__SC_3264(__NR3264_lstat, sys_lstat64, sys_newlstat)
|
||||
|
||||
#undef __NR_syscalls
|
||||
#define __NR_syscalls (__NR3264_lstat+1)
|
||||
#endif /* __ARCH_WANT_SYSCALL_NO_AT */
|
||||
|
||||
#ifdef __ARCH_WANT_SYSCALL_NO_FLAGS
|
||||
#define __NR_pipe 1040
|
||||
__SYSCALL(__NR_pipe, sys_pipe)
|
||||
#define __NR_dup2 1041
|
||||
__SYSCALL(__NR_dup2, sys_dup2)
|
||||
#define __NR_epoll_create 1042
|
||||
__SYSCALL(__NR_epoll_create, sys_epoll_create)
|
||||
#define __NR_inotify_init 1043
|
||||
__SYSCALL(__NR_inotify_init, sys_inotify_init)
|
||||
#define __NR_eventfd 1044
|
||||
__SYSCALL(__NR_eventfd, sys_eventfd)
|
||||
#define __NR_signalfd 1045
|
||||
__SYSCALL(__NR_signalfd, sys_signalfd)
|
||||
|
||||
#undef __NR_syscalls
|
||||
#define __NR_syscalls (__NR_signalfd+1)
|
||||
#endif /* __ARCH_WANT_SYSCALL_NO_FLAGS */
|
||||
|
||||
#if (__BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)) && \
|
||||
defined(__ARCH_WANT_SYSCALL_OFF_T)
|
||||
#define __NR_sendfile 1046
|
||||
__SYSCALL(__NR_sendfile, sys_sendfile)
|
||||
#define __NR_ftruncate 1047
|
||||
__SYSCALL(__NR_ftruncate, sys_ftruncate)
|
||||
#define __NR_truncate 1048
|
||||
__SYSCALL(__NR_truncate, sys_truncate)
|
||||
#define __NR_stat 1049
|
||||
__SYSCALL(__NR_stat, sys_newstat)
|
||||
#define __NR_lstat 1050
|
||||
__SYSCALL(__NR_lstat, sys_newlstat)
|
||||
#define __NR_fstat 1051
|
||||
__SYSCALL(__NR_fstat, sys_newfstat)
|
||||
#define __NR_fcntl 1052
|
||||
__SYSCALL(__NR_fcntl, sys_fcntl)
|
||||
#define __NR_fadvise64 1053
|
||||
#define __ARCH_WANT_SYS_FADVISE64
|
||||
__SYSCALL(__NR_fadvise64, sys_fadvise64)
|
||||
#define __NR_newfstatat 1054
|
||||
#define __ARCH_WANT_SYS_NEWFSTATAT
|
||||
__SYSCALL(__NR_newfstatat, sys_newfstatat)
|
||||
#define __NR_fstatfs 1055
|
||||
__SYSCALL(__NR_fstatfs, sys_fstatfs)
|
||||
#define __NR_statfs 1056
|
||||
__SYSCALL(__NR_statfs, sys_statfs)
|
||||
#define __NR_lseek 1057
|
||||
__SYSCALL(__NR_lseek, sys_lseek)
|
||||
#define __NR_mmap 1058
|
||||
__SYSCALL(__NR_mmap, sys_mmap)
|
||||
|
||||
#undef __NR_syscalls
|
||||
#define __NR_syscalls (__NR_mmap+1)
|
||||
#endif /* 32 bit off_t syscalls */
|
||||
|
||||
#ifdef __ARCH_WANT_SYSCALL_DEPRECATED
|
||||
#define __NR_alarm 1059
|
||||
#define __ARCH_WANT_SYS_ALARM
|
||||
__SYSCALL(__NR_alarm, sys_alarm)
|
||||
#define __NR_getpgrp 1060
|
||||
#define __ARCH_WANT_SYS_GETPGRP
|
||||
__SYSCALL(__NR_getpgrp, sys_getpgrp)
|
||||
#define __NR_pause 1061
|
||||
#define __ARCH_WANT_SYS_PAUSE
|
||||
__SYSCALL(__NR_pause, sys_pause)
|
||||
#define __NR_time 1062
|
||||
#define __ARCH_WANT_SYS_TIME
|
||||
#define __ARCH_WANT_COMPAT_SYS_TIME
|
||||
__SYSCALL(__NR_time, sys_time)
|
||||
#define __NR_utime 1063
|
||||
#define __ARCH_WANT_SYS_UTIME
|
||||
__SYSCALL(__NR_utime, sys_utime)
|
||||
|
||||
#define __NR_creat 1064
|
||||
__SYSCALL(__NR_creat, sys_creat)
|
||||
#define __NR_getdents 1065
|
||||
#define __ARCH_WANT_SYS_GETDENTS
|
||||
__SYSCALL(__NR_getdents, sys_getdents)
|
||||
#define __NR_futimesat 1066
|
||||
__SYSCALL(__NR_futimesat, sys_futimesat)
|
||||
#define __NR_select 1067
|
||||
#define __ARCH_WANT_SYS_SELECT
|
||||
__SYSCALL(__NR_select, sys_select)
|
||||
#define __NR_poll 1068
|
||||
__SYSCALL(__NR_poll, sys_poll)
|
||||
#define __NR_epoll_wait 1069
|
||||
__SYSCALL(__NR_epoll_wait, sys_epoll_wait)
|
||||
#define __NR_ustat 1070
|
||||
__SYSCALL(__NR_ustat, sys_ustat)
|
||||
#define __NR_vfork 1071
|
||||
__SYSCALL(__NR_vfork, sys_vfork)
|
||||
#define __NR_oldwait4 1072
|
||||
__SYSCALL(__NR_oldwait4, sys_wait4)
|
||||
#define __NR_recv 1073
|
||||
__SYSCALL(__NR_recv, sys_recv)
|
||||
#define __NR_send 1074
|
||||
__SYSCALL(__NR_send, sys_send)
|
||||
#define __NR_bdflush 1075
|
||||
__SYSCALL(__NR_bdflush, sys_bdflush)
|
||||
#define __NR_umount 1076
|
||||
__SYSCALL(__NR_umount, sys_oldumount)
|
||||
#define __ARCH_WANT_SYS_OLDUMOUNT
|
||||
#define __NR_uselib 1077
|
||||
__SYSCALL(__NR_uselib, sys_uselib)
|
||||
#define __NR__sysctl 1078
|
||||
__SYSCALL(__NR__sysctl, sys_sysctl)
|
||||
|
||||
#define __NR_fork 1079
|
||||
#ifdef CONFIG_MMU
|
||||
__SYSCALL(__NR_fork, sys_fork)
|
||||
#else
|
||||
__SYSCALL(__NR_fork, sys_ni_syscall)
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
#undef __NR_syscalls
|
||||
#define __NR_syscalls (__NR_fork+1)
|
||||
|
||||
#endif /* __ARCH_WANT_SYSCALL_DEPRECATED */
|
||||
|
||||
/*
|
||||
* 32 bit systems traditionally used different
|
||||
* syscalls for off_t and loff_t arguments, while
|
||||
* 64 bit systems only need the off_t version.
|
||||
* For new 32 bit platforms, there is no need to
|
||||
* implement the old 32 bit off_t syscalls, so
|
||||
* they take different names.
|
||||
* Here we map the numbers so that both versions
|
||||
* use the same syscall table layout.
|
||||
*/
|
||||
#if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT)
|
||||
#define __NR_fcntl __NR3264_fcntl
|
||||
#define __NR_statfs __NR3264_statfs
|
||||
#define __NR_fstatfs __NR3264_fstatfs
|
||||
#define __NR_truncate __NR3264_truncate
|
||||
#define __NR_ftruncate __NR3264_ftruncate
|
||||
#define __NR_lseek __NR3264_lseek
|
||||
#define __NR_sendfile __NR3264_sendfile
|
||||
#define __NR_newfstatat __NR3264_fstatat
|
||||
#define __NR_fstat __NR3264_fstat
|
||||
#define __NR_mmap __NR3264_mmap
|
||||
#define __NR_fadvise64 __NR3264_fadvise64
|
||||
#ifdef __NR3264_stat
|
||||
#define __NR_stat __NR3264_stat
|
||||
#define __NR_lstat __NR3264_lstat
|
||||
#endif
|
||||
#else
|
||||
#define __NR_fcntl64 __NR3264_fcntl
|
||||
#define __NR_statfs64 __NR3264_statfs
|
||||
#define __NR_fstatfs64 __NR3264_fstatfs
|
||||
#define __NR_truncate64 __NR3264_truncate
|
||||
#define __NR_ftruncate64 __NR3264_ftruncate
|
||||
#define __NR_llseek __NR3264_lseek
|
||||
#define __NR_sendfile64 __NR3264_sendfile
|
||||
#define __NR_fstatat64 __NR3264_fstatat
|
||||
#define __NR_fstat64 __NR3264_fstat
|
||||
#define __NR_mmap2 __NR3264_mmap
|
||||
#define __NR_fadvise64_64 __NR3264_fadvise64
|
||||
#ifdef __NR3264_stat
|
||||
#define __NR_stat64 __NR3264_stat
|
||||
#define __NR_lstat64 __NR3264_lstat
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <uapi/asm-generic/unistd.h>
|
||||
|
||||
/*
|
||||
* These are required system calls, we should
|
||||
|
|
@ -926,6 +22,3 @@ __SYSCALL(__NR_fork, sys_ni_syscall)
|
|||
#ifndef cond_syscall
|
||||
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _ASM_GENERIC_UNISTD_H */
|
||||
|
|
|
|||
|
|
@ -530,9 +530,18 @@
|
|||
*(.scommon) \
|
||||
}
|
||||
|
||||
/*
|
||||
* Allow archectures to redefine BSS_FIRST_SECTIONS to add extra
|
||||
* sections to the front of bss.
|
||||
*/
|
||||
#ifndef BSS_FIRST_SECTIONS
|
||||
#define BSS_FIRST_SECTIONS
|
||||
#endif
|
||||
|
||||
#define BSS(bss_align) \
|
||||
. = ALIGN(bss_align); \
|
||||
.bss : AT(ADDR(.bss) - LOAD_OFFSET) { \
|
||||
BSS_FIRST_SECTIONS \
|
||||
*(.bss..page_aligned) \
|
||||
*(.dynbss) \
|
||||
*(.bss) \
|
||||
|
|
|
|||
|
|
@ -693,7 +693,7 @@ static struct xor_block_template xor_block_32regs = {
|
|||
.do_5 = xor_32regs_5,
|
||||
};
|
||||
|
||||
static struct xor_block_template xor_block_8regs_p = {
|
||||
static struct xor_block_template xor_block_8regs_p __maybe_unused = {
|
||||
.name = "8regs_prefetch",
|
||||
.do_2 = xor_8regs_p_2,
|
||||
.do_3 = xor_8regs_p_3,
|
||||
|
|
@ -701,7 +701,7 @@ static struct xor_block_template xor_block_8regs_p = {
|
|||
.do_5 = xor_8regs_p_5,
|
||||
};
|
||||
|
||||
static struct xor_block_template xor_block_32regs_p = {
|
||||
static struct xor_block_template xor_block_32regs_p __maybe_unused = {
|
||||
.name = "32regs_prefetch",
|
||||
.do_2 = xor_32regs_p_2,
|
||||
.do_3 = xor_32regs_p_3,
|
||||
|
|
|
|||
21
include/clocksource/arm_generic.h
Normal file
21
include/clocksource/arm_generic.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __CLKSOURCE_ARM_GENERIC_H
|
||||
#define __CLKSOURCE_ARM_GENERIC_H
|
||||
|
||||
extern int arm_generic_timer_init(void);
|
||||
|
||||
#endif
|
||||
27
include/crypto/cast5.h
Normal file
27
include/crypto/cast5.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef _CRYPTO_CAST5_H
|
||||
#define _CRYPTO_CAST5_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/crypto.h>
|
||||
|
||||
#define CAST5_BLOCK_SIZE 8
|
||||
#define CAST5_MIN_KEY_SIZE 5
|
||||
#define CAST5_MAX_KEY_SIZE 16
|
||||
|
||||
struct cast5_ctx {
|
||||
u32 Km[16];
|
||||
u8 Kr[16];
|
||||
int rr; /* rr ? rounds = 12 : rounds = 16; (rfc 2144) */
|
||||
};
|
||||
|
||||
int cast5_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen);
|
||||
|
||||
void __cast5_encrypt(struct cast5_ctx *ctx, u8 *dst, const u8 *src);
|
||||
void __cast5_decrypt(struct cast5_ctx *ctx, u8 *dst, const u8 *src);
|
||||
|
||||
extern const u32 cast5_s1[256];
|
||||
extern const u32 cast5_s2[256];
|
||||
extern const u32 cast5_s3[256];
|
||||
extern const u32 cast5_s4[256];
|
||||
|
||||
#endif
|
||||
28
include/crypto/cast6.h
Normal file
28
include/crypto/cast6.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef _CRYPTO_CAST6_H
|
||||
#define _CRYPTO_CAST6_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/crypto.h>
|
||||
|
||||
#define CAST6_BLOCK_SIZE 16
|
||||
#define CAST6_MIN_KEY_SIZE 16
|
||||
#define CAST6_MAX_KEY_SIZE 32
|
||||
|
||||
struct cast6_ctx {
|
||||
u32 Km[12][4];
|
||||
u8 Kr[12][4];
|
||||
};
|
||||
|
||||
int __cast6_setkey(struct cast6_ctx *ctx, const u8 *key,
|
||||
unsigned int keylen, u32 *flags);
|
||||
int cast6_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen);
|
||||
|
||||
void __cast6_encrypt(struct cast6_ctx *ctx, u8 *dst, const u8 *src);
|
||||
void __cast6_decrypt(struct cast6_ctx *ctx, u8 *dst, const u8 *src);
|
||||
|
||||
extern const u32 cast6_s1[256];
|
||||
extern const u32 cast6_s2[256];
|
||||
extern const u32 cast6_s3[256];
|
||||
extern const u32 cast6_s4[256];
|
||||
|
||||
#endif
|
||||
|
|
@ -83,6 +83,8 @@ struct hash_alg_common *ahash_attr_alg(struct rtattr *rta, u32 type, u32 mask);
|
|||
|
||||
int crypto_register_shash(struct shash_alg *alg);
|
||||
int crypto_unregister_shash(struct shash_alg *alg);
|
||||
int crypto_register_shashes(struct shash_alg *algs, int count);
|
||||
int crypto_unregister_shashes(struct shash_alg *algs, int count);
|
||||
int shash_register_instance(struct crypto_template *tmpl,
|
||||
struct shash_instance *inst);
|
||||
void shash_free_instance(struct crypto_instance *inst);
|
||||
|
|
|
|||
108
include/crypto/public_key.h
Normal file
108
include/crypto/public_key.h
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
/* Asymmetric public-key algorithm definitions
|
||||
*
|
||||
* See Documentation/crypto/asymmetric-keys.txt
|
||||
*
|
||||
* Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
|
||||
* Written by David Howells (dhowells@redhat.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public Licence
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the Licence, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_PUBLIC_KEY_H
|
||||
#define _LINUX_PUBLIC_KEY_H
|
||||
|
||||
#include <linux/mpi.h>
|
||||
|
||||
enum pkey_algo {
|
||||
PKEY_ALGO_DSA,
|
||||
PKEY_ALGO_RSA,
|
||||
PKEY_ALGO__LAST
|
||||
};
|
||||
|
||||
extern const char *const pkey_algo[PKEY_ALGO__LAST];
|
||||
|
||||
enum pkey_hash_algo {
|
||||
PKEY_HASH_MD4,
|
||||
PKEY_HASH_MD5,
|
||||
PKEY_HASH_SHA1,
|
||||
PKEY_HASH_RIPE_MD_160,
|
||||
PKEY_HASH_SHA256,
|
||||
PKEY_HASH_SHA384,
|
||||
PKEY_HASH_SHA512,
|
||||
PKEY_HASH_SHA224,
|
||||
PKEY_HASH__LAST
|
||||
};
|
||||
|
||||
extern const char *const pkey_hash_algo[PKEY_HASH__LAST];
|
||||
|
||||
enum pkey_id_type {
|
||||
PKEY_ID_PGP, /* OpenPGP generated key ID */
|
||||
PKEY_ID_X509, /* X.509 arbitrary subjectKeyIdentifier */
|
||||
PKEY_ID_TYPE__LAST
|
||||
};
|
||||
|
||||
extern const char *const pkey_id_type[PKEY_ID_TYPE__LAST];
|
||||
|
||||
/*
|
||||
* Cryptographic data for the public-key subtype of the asymmetric key type.
|
||||
*
|
||||
* Note that this may include private part of the key as well as the public
|
||||
* part.
|
||||
*/
|
||||
struct public_key {
|
||||
const struct public_key_algorithm *algo;
|
||||
u8 capabilities;
|
||||
#define PKEY_CAN_ENCRYPT 0x01
|
||||
#define PKEY_CAN_DECRYPT 0x02
|
||||
#define PKEY_CAN_SIGN 0x04
|
||||
#define PKEY_CAN_VERIFY 0x08
|
||||
enum pkey_id_type id_type : 8;
|
||||
union {
|
||||
MPI mpi[5];
|
||||
struct {
|
||||
MPI p; /* DSA prime */
|
||||
MPI q; /* DSA group order */
|
||||
MPI g; /* DSA group generator */
|
||||
MPI y; /* DSA public-key value = g^x mod p */
|
||||
MPI x; /* DSA secret exponent (if present) */
|
||||
} dsa;
|
||||
struct {
|
||||
MPI n; /* RSA public modulus */
|
||||
MPI e; /* RSA public encryption exponent */
|
||||
MPI d; /* RSA secret encryption exponent (if present) */
|
||||
MPI p; /* RSA secret prime (if present) */
|
||||
MPI q; /* RSA secret prime (if present) */
|
||||
} rsa;
|
||||
};
|
||||
};
|
||||
|
||||
extern void public_key_destroy(void *payload);
|
||||
|
||||
/*
|
||||
* Public key cryptography signature data
|
||||
*/
|
||||
struct public_key_signature {
|
||||
u8 *digest;
|
||||
u8 digest_size; /* Number of bytes in digest */
|
||||
u8 nr_mpi; /* Occupancy of mpi[] */
|
||||
enum pkey_hash_algo pkey_hash_algo : 8;
|
||||
union {
|
||||
MPI mpi[2];
|
||||
struct {
|
||||
MPI s; /* m^d mod n */
|
||||
} rsa;
|
||||
struct {
|
||||
MPI r;
|
||||
MPI s;
|
||||
} dsa;
|
||||
};
|
||||
};
|
||||
|
||||
struct key;
|
||||
extern int verify_signature(const struct key *key,
|
||||
const struct public_key_signature *sig);
|
||||
|
||||
#endif /* _LINUX_PUBLIC_KEY_H */
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
header-y += drm.h
|
||||
header-y += drm_fourcc.h
|
||||
header-y += drm_mode.h
|
||||
header-y += drm_sarea.h
|
||||
header-y += exynos_drm.h
|
||||
header-y += i810_drm.h
|
||||
header-y += i915_drm.h
|
||||
header-y += mga_drm.h
|
||||
header-y += nouveau_drm.h
|
||||
header-y += r128_drm.h
|
||||
header-y += radeon_drm.h
|
||||
header-y += savage_drm.h
|
||||
header-y += sis_drm.h
|
||||
header-y += via_drm.h
|
||||
header-y += vmwgfx_drm.h
|
||||
|
|
@ -72,7 +72,8 @@
|
|||
#include <linux/workqueue.h>
|
||||
#include <linux/poll.h>
|
||||
#include <asm/pgalloc.h>
|
||||
#include "drm.h"
|
||||
#include <drm/drm.h>
|
||||
#include <drm/drm_sarea.h>
|
||||
|
||||
#include <linux/idr.h>
|
||||
|
||||
|
|
@ -84,9 +85,9 @@ struct module;
|
|||
struct drm_file;
|
||||
struct drm_device;
|
||||
|
||||
#include "drm_os_linux.h"
|
||||
#include "drm_hashtab.h"
|
||||
#include "drm_mm.h"
|
||||
#include <drm/drm_os_linux.h>
|
||||
#include <drm/drm_hashtab.h>
|
||||
#include <drm/drm_mm.h>
|
||||
|
||||
#define DRM_UT_CORE 0x01
|
||||
#define DRM_UT_DRIVER 0x02
|
||||
|
|
@ -426,8 +427,8 @@ struct drm_prime_file_private {
|
|||
/** File private data */
|
||||
struct drm_file {
|
||||
int authenticated;
|
||||
pid_t pid;
|
||||
uid_t uid;
|
||||
struct pid *pid;
|
||||
kuid_t uid;
|
||||
drm_magic_t magic;
|
||||
unsigned long ioctl_count;
|
||||
struct list_head lhead;
|
||||
|
|
@ -675,7 +676,7 @@ struct drm_gem_object {
|
|||
struct dma_buf_attachment *import_attach;
|
||||
};
|
||||
|
||||
#include "drm_crtc.h"
|
||||
#include <drm/drm_crtc.h>
|
||||
|
||||
/* per-master structure */
|
||||
struct drm_master {
|
||||
|
|
@ -1303,7 +1304,7 @@ extern void drm_vm_close_locked(struct drm_device *dev, struct vm_area_struct *v
|
|||
extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait);
|
||||
|
||||
/* Memory management support (drm_memory.h) */
|
||||
#include "drm_memory.h"
|
||||
#include <drm/drm_memory.h>
|
||||
extern void drm_free_agp(DRM_AGP_MEM * handle, int pages);
|
||||
extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start);
|
||||
extern DRM_AGP_MEM *drm_agp_bind_pages(struct drm_device *dev,
|
||||
|
|
@ -1367,6 +1368,7 @@ extern int drm_remove_magic(struct drm_master *master, drm_magic_t magic);
|
|||
|
||||
/* Cache management (drm_cache.c) */
|
||||
void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
|
||||
void drm_clflush_sg(struct sg_table *st);
|
||||
void drm_clflush_virt_range(char *addr, unsigned long length);
|
||||
|
||||
/* Locking IOCTL support (drm_lock.h) */
|
||||
|
|
@ -1612,7 +1614,7 @@ void drm_gem_vm_open(struct vm_area_struct *vma);
|
|||
void drm_gem_vm_close(struct vm_area_struct *vma);
|
||||
int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma);
|
||||
|
||||
#include "drm_global.h"
|
||||
#include <drm/drm_global.h>
|
||||
|
||||
static inline void
|
||||
drm_gem_object_reference(struct drm_gem_object *obj)
|
||||
|
|
@ -1721,7 +1723,7 @@ static __inline__ void drm_core_dropmap(struct drm_local_map *map)
|
|||
{
|
||||
}
|
||||
|
||||
#include "drm_mem_util.h"
|
||||
#include <drm/drm_mem_util.h>
|
||||
|
||||
extern int drm_fill_in_dev(struct drm_device *dev,
|
||||
const struct pci_device_id *ent,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#ifndef _DRM_BUFFER_H_
|
||||
#define _DRM_BUFFER_H_
|
||||
|
||||
#include "drmP.h"
|
||||
#include <drm/drmP.h>
|
||||
|
||||
struct drm_buffer {
|
||||
int iterator;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/idr.h>
|
||||
#include <linux/fb.h>
|
||||
#include <drm/drm_mode.h>
|
||||
|
||||
#include <drm/drm_fourcc.h>
|
||||
|
||||
|
|
@ -215,11 +216,10 @@ struct drm_display_info {
|
|||
u32 color_formats;
|
||||
|
||||
u8 cea_rev;
|
||||
|
||||
char *raw_edid; /* if any */
|
||||
};
|
||||
|
||||
struct drm_framebuffer_funcs {
|
||||
/* note: use drm_framebuffer_remove() */
|
||||
void (*destroy)(struct drm_framebuffer *framebuffer);
|
||||
int (*create_handle)(struct drm_framebuffer *fb,
|
||||
struct drm_file *file_priv,
|
||||
|
|
@ -244,6 +244,16 @@ struct drm_framebuffer_funcs {
|
|||
|
||||
struct drm_framebuffer {
|
||||
struct drm_device *dev;
|
||||
/*
|
||||
* Note that the fb is refcounted for the benefit of driver internals,
|
||||
* for example some hw, disabling a CRTC/plane is asynchronous, and
|
||||
* scanout does not actually complete until the next vblank. So some
|
||||
* cleanup (like releasing the reference(s) on the backing GEM bo(s))
|
||||
* should be deferred. In cases like this, the driver would like to
|
||||
* hold a ref to the fb even though it has already been removed from
|
||||
* userspace perspective.
|
||||
*/
|
||||
struct kref refcount;
|
||||
struct list_head head;
|
||||
struct drm_mode_object base;
|
||||
const struct drm_framebuffer_funcs *funcs;
|
||||
|
|
@ -359,6 +369,9 @@ struct drm_crtc_funcs {
|
|||
* @enabled: is this CRTC enabled?
|
||||
* @mode: current mode timings
|
||||
* @hwmode: mode timings as programmed to hw regs
|
||||
* @invert_dimensions: for purposes of error checking crtc vs fb sizes,
|
||||
* invert the width/height of the crtc. This is used if the driver
|
||||
* is performing 90 or 270 degree rotated scanout
|
||||
* @x: x position on screen
|
||||
* @y: y position on screen
|
||||
* @funcs: CRTC control functions
|
||||
|
|
@ -392,6 +405,8 @@ struct drm_crtc {
|
|||
*/
|
||||
struct drm_display_mode hwmode;
|
||||
|
||||
bool invert_dimensions;
|
||||
|
||||
int x, y;
|
||||
const struct drm_crtc_funcs *funcs;
|
||||
|
||||
|
|
@ -593,6 +608,7 @@ struct drm_connector {
|
|||
int video_latency[2]; /* [0]: progressive, [1]: interlaced */
|
||||
int audio_latency[2];
|
||||
int null_edid_counter; /* needed to workaround some HW bugs where we get all 0s */
|
||||
unsigned bad_edid_counter;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -862,6 +878,7 @@ extern char *drm_get_tv_subconnector_name(int val);
|
|||
extern char *drm_get_tv_select_name(int val);
|
||||
extern void drm_fb_release(struct drm_file *file_priv);
|
||||
extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group);
|
||||
extern bool drm_probe_ddc(struct i2c_adapter *adapter);
|
||||
extern struct edid *drm_get_edid(struct drm_connector *connector,
|
||||
struct i2c_adapter *adapter);
|
||||
extern int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid);
|
||||
|
|
@ -920,6 +937,9 @@ extern void drm_framebuffer_set_object(struct drm_device *dev,
|
|||
extern int drm_framebuffer_init(struct drm_device *dev,
|
||||
struct drm_framebuffer *fb,
|
||||
const struct drm_framebuffer_funcs *funcs);
|
||||
extern void drm_framebuffer_unreference(struct drm_framebuffer *fb);
|
||||
extern void drm_framebuffer_reference(struct drm_framebuffer *fb);
|
||||
extern void drm_framebuffer_remove(struct drm_framebuffer *fb);
|
||||
extern void drm_framebuffer_cleanup(struct drm_framebuffer *fb);
|
||||
extern int drmfb_probe(struct drm_device *dev, struct drm_crtc *crtc);
|
||||
extern int drmfb_remove(struct drm_device *dev, struct drm_framebuffer *fb);
|
||||
|
|
@ -1035,7 +1055,7 @@ extern int drm_add_modes_noedid(struct drm_connector *connector,
|
|||
int hdisplay, int vdisplay);
|
||||
|
||||
extern int drm_edid_header_is_valid(const u8 *raw_edid);
|
||||
extern bool drm_edid_block_valid(u8 *raw_edid, int block);
|
||||
extern bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid);
|
||||
extern bool drm_edid_is_valid(struct edid *edid);
|
||||
struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev,
|
||||
int hsize, int vsize, int fresh,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,19 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/i2c.h>
|
||||
|
||||
/* From the VESA DisplayPort spec */
|
||||
/*
|
||||
* Unless otherwise noted, all values are from the DP 1.1a spec. Note that
|
||||
* DP and DPCD versions are independent. Differences from 1.0 are not noted,
|
||||
* 1.0 devices basically don't exist in the wild.
|
||||
*
|
||||
* Abbreviations, in chronological order:
|
||||
*
|
||||
* eDP: Embedded DisplayPort version 1
|
||||
* DPI: DisplayPort Interoperability Guideline v1.1a
|
||||
* 1.2: DisplayPort 1.2
|
||||
*
|
||||
* 1.2 formally includes both eDP and DPI definitions.
|
||||
*/
|
||||
|
||||
#define AUX_NATIVE_WRITE 0x8
|
||||
#define AUX_NATIVE_READ 0x9
|
||||
|
|
@ -53,7 +65,7 @@
|
|||
|
||||
#define DP_MAX_LANE_COUNT 0x002
|
||||
# define DP_MAX_LANE_COUNT_MASK 0x1f
|
||||
# define DP_TPS3_SUPPORTED (1 << 6)
|
||||
# define DP_TPS3_SUPPORTED (1 << 6) /* 1.2 */
|
||||
# define DP_ENHANCED_FRAME_CAP (1 << 7)
|
||||
|
||||
#define DP_MAX_DOWNSPREAD 0x003
|
||||
|
|
@ -69,19 +81,33 @@
|
|||
/* 10b = TMDS or HDMI */
|
||||
/* 11b = Other */
|
||||
# define DP_FORMAT_CONVERSION (1 << 3)
|
||||
# define DP_DETAILED_CAP_INFO_AVAILABLE (1 << 4) /* DPI */
|
||||
|
||||
#define DP_MAIN_LINK_CHANNEL_CODING 0x006
|
||||
|
||||
#define DP_DOWN_STREAM_PORT_COUNT 0x007
|
||||
#define DP_PORT_COUNT_MASK 0x0f
|
||||
#define DP_OUI_SUPPORT (1 << 7)
|
||||
# define DP_PORT_COUNT_MASK 0x0f
|
||||
# define DP_MSA_TIMING_PAR_IGNORED (1 << 6) /* eDP */
|
||||
# define DP_OUI_SUPPORT (1 << 7)
|
||||
|
||||
#define DP_EDP_CONFIGURATION_CAP 0x00d
|
||||
#define DP_TRAINING_AUX_RD_INTERVAL 0x00e
|
||||
#define DP_I2C_SPEED_CAP 0x00c /* DPI */
|
||||
# define DP_I2C_SPEED_1K 0x01
|
||||
# define DP_I2C_SPEED_5K 0x02
|
||||
# define DP_I2C_SPEED_10K 0x04
|
||||
# define DP_I2C_SPEED_100K 0x08
|
||||
# define DP_I2C_SPEED_400K 0x10
|
||||
# define DP_I2C_SPEED_1M 0x20
|
||||
|
||||
#define DP_PSR_SUPPORT 0x070
|
||||
#define DP_EDP_CONFIGURATION_CAP 0x00d /* XXX 1.2? */
|
||||
#define DP_TRAINING_AUX_RD_INTERVAL 0x00e /* XXX 1.2? */
|
||||
|
||||
/* Multiple stream transport */
|
||||
#define DP_MSTM_CAP 0x021 /* 1.2 */
|
||||
# define DP_MST_CAP (1 << 0)
|
||||
|
||||
#define DP_PSR_SUPPORT 0x070 /* XXX 1.2? */
|
||||
# define DP_PSR_IS_SUPPORTED 1
|
||||
#define DP_PSR_CAPS 0x071
|
||||
#define DP_PSR_CAPS 0x071 /* XXX 1.2? */
|
||||
# define DP_PSR_NO_TRAIN_ON_EXIT 1
|
||||
# define DP_PSR_SETUP_TIME_330 (0 << 1)
|
||||
# define DP_PSR_SETUP_TIME_275 (1 << 1)
|
||||
|
|
@ -93,11 +119,36 @@
|
|||
# define DP_PSR_SETUP_TIME_MASK (7 << 1)
|
||||
# define DP_PSR_SETUP_TIME_SHIFT 1
|
||||
|
||||
/*
|
||||
* 0x80-0x8f describe downstream port capabilities, but there are two layouts
|
||||
* based on whether DP_DETAILED_CAP_INFO_AVAILABLE was set. If it was not,
|
||||
* each port's descriptor is one byte wide. If it was set, each port's is
|
||||
* four bytes wide, starting with the one byte from the base info. As of
|
||||
* DP interop v1.1a only VGA defines additional detail.
|
||||
*/
|
||||
|
||||
/* offset 0 */
|
||||
#define DP_DOWNSTREAM_PORT_0 0x80
|
||||
# define DP_DS_PORT_TYPE_MASK (7 << 0)
|
||||
# define DP_DS_PORT_TYPE_DP 0
|
||||
# define DP_DS_PORT_TYPE_VGA 1
|
||||
# define DP_DS_PORT_TYPE_DVI 2
|
||||
# define DP_DS_PORT_TYPE_HDMI 3
|
||||
# define DP_DS_PORT_TYPE_NON_EDID 4
|
||||
# define DP_DS_PORT_HPD (1 << 3)
|
||||
/* offset 1 for VGA is maximum megapixels per second / 8 */
|
||||
/* offset 2 */
|
||||
# define DP_DS_VGA_MAX_BPC_MASK (3 << 0)
|
||||
# define DP_DS_VGA_8BPC 0
|
||||
# define DP_DS_VGA_10BPC 1
|
||||
# define DP_DS_VGA_12BPC 2
|
||||
# define DP_DS_VGA_16BPC 3
|
||||
|
||||
/* link configuration */
|
||||
#define DP_LINK_BW_SET 0x100
|
||||
# define DP_LINK_BW_1_62 0x06
|
||||
# define DP_LINK_BW_2_7 0x0a
|
||||
# define DP_LINK_BW_5_4 0x14
|
||||
# define DP_LINK_BW_5_4 0x14 /* 1.2 */
|
||||
|
||||
#define DP_LANE_COUNT_SET 0x101
|
||||
# define DP_LANE_COUNT_MASK 0x0f
|
||||
|
|
@ -107,7 +158,7 @@
|
|||
# define DP_TRAINING_PATTERN_DISABLE 0
|
||||
# define DP_TRAINING_PATTERN_1 1
|
||||
# define DP_TRAINING_PATTERN_2 2
|
||||
# define DP_TRAINING_PATTERN_3 3
|
||||
# define DP_TRAINING_PATTERN_3 3 /* 1.2 */
|
||||
# define DP_TRAINING_PATTERN_MASK 0x3
|
||||
|
||||
# define DP_LINK_QUAL_PATTERN_DISABLE (0 << 2)
|
||||
|
|
@ -148,24 +199,38 @@
|
|||
|
||||
#define DP_DOWNSPREAD_CTRL 0x107
|
||||
# define DP_SPREAD_AMP_0_5 (1 << 4)
|
||||
# define DP_MSA_TIMING_PAR_IGNORE_EN (1 << 7) /* eDP */
|
||||
|
||||
#define DP_MAIN_LINK_CHANNEL_CODING_SET 0x108
|
||||
# define DP_SET_ANSI_8B10B (1 << 0)
|
||||
|
||||
#define DP_PSR_EN_CFG 0x170
|
||||
#define DP_I2C_SPEED_CONTROL_STATUS 0x109 /* DPI */
|
||||
/* bitmask as for DP_I2C_SPEED_CAP */
|
||||
|
||||
#define DP_EDP_CONFIGURATION_SET 0x10a /* XXX 1.2? */
|
||||
|
||||
#define DP_MSTM_CTRL 0x111 /* 1.2 */
|
||||
# define DP_MST_EN (1 << 0)
|
||||
# define DP_UP_REQ_EN (1 << 1)
|
||||
# define DP_UPSTREAM_IS_SRC (1 << 2)
|
||||
|
||||
#define DP_PSR_EN_CFG 0x170 /* XXX 1.2? */
|
||||
# define DP_PSR_ENABLE (1 << 0)
|
||||
# define DP_PSR_MAIN_LINK_ACTIVE (1 << 1)
|
||||
# define DP_PSR_CRC_VERIFICATION (1 << 2)
|
||||
# define DP_PSR_FRAME_CAPTURE (1 << 3)
|
||||
|
||||
#define DP_SINK_COUNT 0x200
|
||||
/* prior to 1.2 bit 7 was reserved mbz */
|
||||
# define DP_GET_SINK_COUNT(x) ((((x) & 0x80) >> 1) | ((x) & 0x3f))
|
||||
# define DP_SINK_CP_READY (1 << 6)
|
||||
|
||||
#define DP_DEVICE_SERVICE_IRQ_VECTOR 0x201
|
||||
# define DP_REMOTE_CONTROL_COMMAND_PENDING (1 << 0)
|
||||
# define DP_AUTOMATED_TEST_REQUEST (1 << 1)
|
||||
# define DP_CP_IRQ (1 << 2)
|
||||
# define DP_SINK_SPECIFIC_IRQ (1 << 6)
|
||||
|
||||
#define DP_EDP_CONFIGURATION_SET 0x10a
|
||||
|
||||
#define DP_LANE0_1_STATUS 0x202
|
||||
#define DP_LANE2_3_STATUS 0x203
|
||||
# define DP_LANE_CR_DONE (1 << 0)
|
||||
|
|
@ -225,14 +290,14 @@
|
|||
# define DP_SET_POWER_D0 0x1
|
||||
# define DP_SET_POWER_D3 0x2
|
||||
|
||||
#define DP_PSR_ERROR_STATUS 0x2006
|
||||
#define DP_PSR_ERROR_STATUS 0x2006 /* XXX 1.2? */
|
||||
# define DP_PSR_LINK_CRC_ERROR (1 << 0)
|
||||
# define DP_PSR_RFB_STORAGE_ERROR (1 << 1)
|
||||
|
||||
#define DP_PSR_ESI 0x2007
|
||||
#define DP_PSR_ESI 0x2007 /* XXX 1.2? */
|
||||
# define DP_PSR_CAPS_CHANGE (1 << 0)
|
||||
|
||||
#define DP_PSR_STATUS 0x2008
|
||||
#define DP_PSR_STATUS 0x2008 /* XXX 1.2? */
|
||||
# define DP_PSR_SINK_INACTIVE 0
|
||||
# define DP_PSR_SINK_ACTIVE_SRC_SYNCED 1
|
||||
# define DP_PSR_SINK_ACTIVE_RFB 2
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
#ifndef __DRM_ENCODER_SLAVE_H__
|
||||
#define __DRM_ENCODER_SLAVE_H__
|
||||
|
||||
#include "drmP.h"
|
||||
#include "drm_crtc.h"
|
||||
#include <drm/drmP.h>
|
||||
#include <drm/drm_crtc.h>
|
||||
|
||||
/**
|
||||
* struct drm_encoder_slave_funcs - Entry points exposed by a slave encoder driver
|
||||
|
|
|
|||
27
include/drm/drm_fb_cma_helper.h
Normal file
27
include/drm/drm_fb_cma_helper.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef __DRM_FB_CMA_HELPER_H__
|
||||
#define __DRM_FB_CMA_HELPER_H__
|
||||
|
||||
struct drm_fbdev_cma;
|
||||
struct drm_gem_cma_object;
|
||||
|
||||
struct drm_framebuffer;
|
||||
struct drm_device;
|
||||
struct drm_file;
|
||||
struct drm_mode_fb_cmd2;
|
||||
|
||||
struct drm_fbdev_cma *drm_fbdev_cma_init(struct drm_device *dev,
|
||||
unsigned int preferred_bpp, unsigned int num_crtc,
|
||||
unsigned int max_conn_count);
|
||||
void drm_fbdev_cma_fini(struct drm_fbdev_cma *fbdev_cma);
|
||||
|
||||
void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma);
|
||||
void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma);
|
||||
|
||||
struct drm_framebuffer *drm_fb_cma_create(struct drm_device *dev,
|
||||
struct drm_file *file_priv, struct drm_mode_fb_cmd2 *mode_cmd);
|
||||
|
||||
struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb,
|
||||
unsigned int plane);
|
||||
|
||||
#endif
|
||||
|
||||
44
include/drm/drm_gem_cma_helper.h
Normal file
44
include/drm/drm_gem_cma_helper.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef __DRM_GEM_CMA_HELPER_H__
|
||||
#define __DRM_GEM_CMA_HELPER_H__
|
||||
|
||||
struct drm_gem_cma_object {
|
||||
struct drm_gem_object base;
|
||||
dma_addr_t paddr;
|
||||
void *vaddr;
|
||||
};
|
||||
|
||||
static inline struct drm_gem_cma_object *
|
||||
to_drm_gem_cma_obj(struct drm_gem_object *gem_obj)
|
||||
{
|
||||
return container_of(gem_obj, struct drm_gem_cma_object, base);
|
||||
}
|
||||
|
||||
/* free gem object. */
|
||||
void drm_gem_cma_free_object(struct drm_gem_object *gem_obj);
|
||||
|
||||
/* create memory region for drm framebuffer. */
|
||||
int drm_gem_cma_dumb_create(struct drm_file *file_priv,
|
||||
struct drm_device *drm, struct drm_mode_create_dumb *args);
|
||||
|
||||
/* map memory region for drm framebuffer to user space. */
|
||||
int drm_gem_cma_dumb_map_offset(struct drm_file *file_priv,
|
||||
struct drm_device *drm, uint32_t handle, uint64_t *offset);
|
||||
|
||||
/* set vm_flags and we can change the vm attribute to other one at here. */
|
||||
int drm_gem_cma_mmap(struct file *filp, struct vm_area_struct *vma);
|
||||
|
||||
/*
|
||||
* destroy memory region allocated.
|
||||
* - a gem handle and physical memory region pointed by a gem object
|
||||
* would be released by drm_gem_handle_delete().
|
||||
*/
|
||||
int drm_gem_cma_dumb_destroy(struct drm_file *file_priv,
|
||||
struct drm_device *drm, unsigned int handle);
|
||||
|
||||
/* allocate physical memory. */
|
||||
struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm,
|
||||
unsigned int size);
|
||||
|
||||
extern const struct vm_operations_struct drm_gem_cma_vm_ops;
|
||||
|
||||
#endif /* __DRM_GEM_CMA_HELPER_H__ */
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include "drmP.h"
|
||||
#include <drm/drmP.h>
|
||||
|
||||
/**
|
||||
* Cut down version of drm_memory_debug.h, which used to be called
|
||||
|
|
|
|||
|
|
@ -25,182 +25,10 @@
|
|||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _EXYNOS_DRM_H_
|
||||
#define _EXYNOS_DRM_H_
|
||||
|
||||
#include "drm.h"
|
||||
|
||||
/**
|
||||
* User-desired buffer creation information structure.
|
||||
*
|
||||
* @size: user-desired memory allocation size.
|
||||
* - this size value would be page-aligned internally.
|
||||
* @flags: user request for setting memory type or cache attributes.
|
||||
* @handle: returned a handle to created gem object.
|
||||
* - this handle will be set by gem module of kernel side.
|
||||
*/
|
||||
struct drm_exynos_gem_create {
|
||||
uint64_t size;
|
||||
unsigned int flags;
|
||||
unsigned int handle;
|
||||
};
|
||||
|
||||
/**
|
||||
* A structure for getting buffer offset.
|
||||
*
|
||||
* @handle: a pointer to gem object created.
|
||||
* @pad: just padding to be 64-bit aligned.
|
||||
* @offset: relatived offset value of the memory region allocated.
|
||||
* - this value should be set by user.
|
||||
*/
|
||||
struct drm_exynos_gem_map_off {
|
||||
unsigned int handle;
|
||||
unsigned int pad;
|
||||
uint64_t offset;
|
||||
};
|
||||
|
||||
/**
|
||||
* A structure for mapping buffer.
|
||||
*
|
||||
* @handle: a handle to gem object created.
|
||||
* @pad: just padding to be 64-bit aligned.
|
||||
* @size: memory size to be mapped.
|
||||
* @mapped: having user virtual address mmaped.
|
||||
* - this variable would be filled by exynos gem module
|
||||
* of kernel side with user virtual address which is allocated
|
||||
* by do_mmap().
|
||||
*/
|
||||
struct drm_exynos_gem_mmap {
|
||||
unsigned int handle;
|
||||
unsigned int pad;
|
||||
uint64_t size;
|
||||
uint64_t mapped;
|
||||
};
|
||||
|
||||
/**
|
||||
* A structure to gem information.
|
||||
*
|
||||
* @handle: a handle to gem object created.
|
||||
* @flags: flag value including memory type and cache attribute and
|
||||
* this value would be set by driver.
|
||||
* @size: size to memory region allocated by gem and this size would
|
||||
* be set by driver.
|
||||
*/
|
||||
struct drm_exynos_gem_info {
|
||||
unsigned int handle;
|
||||
unsigned int flags;
|
||||
uint64_t size;
|
||||
};
|
||||
|
||||
/**
|
||||
* A structure for user connection request of virtual display.
|
||||
*
|
||||
* @connection: indicate whether doing connetion or not by user.
|
||||
* @extensions: if this value is 1 then the vidi driver would need additional
|
||||
* 128bytes edid data.
|
||||
* @edid: the edid data pointer from user side.
|
||||
*/
|
||||
struct drm_exynos_vidi_connection {
|
||||
unsigned int connection;
|
||||
unsigned int extensions;
|
||||
uint64_t edid;
|
||||
};
|
||||
|
||||
/* memory type definitions. */
|
||||
enum e_drm_exynos_gem_mem_type {
|
||||
/* Physically Continuous memory and used as default. */
|
||||
EXYNOS_BO_CONTIG = 0 << 0,
|
||||
/* Physically Non-Continuous memory. */
|
||||
EXYNOS_BO_NONCONTIG = 1 << 0,
|
||||
/* non-cachable mapping and used as default. */
|
||||
EXYNOS_BO_NONCACHABLE = 0 << 1,
|
||||
/* cachable mapping. */
|
||||
EXYNOS_BO_CACHABLE = 1 << 1,
|
||||
/* write-combine mapping. */
|
||||
EXYNOS_BO_WC = 1 << 2,
|
||||
EXYNOS_BO_MASK = EXYNOS_BO_NONCONTIG | EXYNOS_BO_CACHABLE |
|
||||
EXYNOS_BO_WC
|
||||
};
|
||||
|
||||
struct drm_exynos_g2d_get_ver {
|
||||
__u32 major;
|
||||
__u32 minor;
|
||||
};
|
||||
|
||||
struct drm_exynos_g2d_cmd {
|
||||
__u32 offset;
|
||||
__u32 data;
|
||||
};
|
||||
|
||||
enum drm_exynos_g2d_event_type {
|
||||
G2D_EVENT_NOT,
|
||||
G2D_EVENT_NONSTOP,
|
||||
G2D_EVENT_STOP, /* not yet */
|
||||
};
|
||||
|
||||
struct drm_exynos_g2d_set_cmdlist {
|
||||
__u64 cmd;
|
||||
__u64 cmd_gem;
|
||||
__u32 cmd_nr;
|
||||
__u32 cmd_gem_nr;
|
||||
|
||||
/* for g2d event */
|
||||
__u64 event_type;
|
||||
__u64 user_data;
|
||||
};
|
||||
|
||||
struct drm_exynos_g2d_exec {
|
||||
__u64 async;
|
||||
};
|
||||
|
||||
#define DRM_EXYNOS_GEM_CREATE 0x00
|
||||
#define DRM_EXYNOS_GEM_MAP_OFFSET 0x01
|
||||
#define DRM_EXYNOS_GEM_MMAP 0x02
|
||||
/* Reserved 0x03 ~ 0x05 for exynos specific gem ioctl */
|
||||
#define DRM_EXYNOS_GEM_GET 0x04
|
||||
#define DRM_EXYNOS_VIDI_CONNECTION 0x07
|
||||
|
||||
/* G2D */
|
||||
#define DRM_EXYNOS_G2D_GET_VER 0x20
|
||||
#define DRM_EXYNOS_G2D_SET_CMDLIST 0x21
|
||||
#define DRM_EXYNOS_G2D_EXEC 0x22
|
||||
|
||||
#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create)
|
||||
|
||||
#define DRM_IOCTL_EXYNOS_GEM_MAP_OFFSET DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_GEM_MAP_OFFSET, struct drm_exynos_gem_map_off)
|
||||
|
||||
#define DRM_IOCTL_EXYNOS_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_GEM_MMAP, struct drm_exynos_gem_mmap)
|
||||
|
||||
#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info)
|
||||
|
||||
#define DRM_IOCTL_EXYNOS_VIDI_CONNECTION DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_VIDI_CONNECTION, struct drm_exynos_vidi_connection)
|
||||
|
||||
#define DRM_IOCTL_EXYNOS_G2D_GET_VER DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_G2D_GET_VER, struct drm_exynos_g2d_get_ver)
|
||||
#define DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_G2D_SET_CMDLIST, struct drm_exynos_g2d_set_cmdlist)
|
||||
#define DRM_IOCTL_EXYNOS_G2D_EXEC DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_G2D_EXEC, struct drm_exynos_g2d_exec)
|
||||
|
||||
/* EXYNOS specific events */
|
||||
#define DRM_EXYNOS_G2D_EVENT 0x80000000
|
||||
|
||||
struct drm_exynos_g2d_event {
|
||||
struct drm_event base;
|
||||
__u64 user_data;
|
||||
__u32 tv_sec;
|
||||
__u32 tv_usec;
|
||||
__u32 cmdlist_no;
|
||||
__u32 reserved;
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <uapi/drm/exynos_drm.h>
|
||||
|
||||
/**
|
||||
* A structure for lcd panel information.
|
||||
|
|
@ -257,5 +85,4 @@ struct exynos_drm_hdmi_pdata {
|
|||
int (*get_hpd)(void);
|
||||
};
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _EXYNOS_DRM_H_ */
|
||||
|
|
|
|||
|
|
@ -23,899 +23,15 @@
|
|||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _I915_DRM_H_
|
||||
#define _I915_DRM_H_
|
||||
|
||||
#include "drm.h"
|
||||
#include <uapi/drm/i915_drm.h>
|
||||
|
||||
/* Please note that modifications to all structs defined here are
|
||||
* subject to backwards-compatibility constraints.
|
||||
*/
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/* For use by IPS driver */
|
||||
extern unsigned long i915_read_mch_val(void);
|
||||
extern bool i915_gpu_raise(void);
|
||||
extern bool i915_gpu_lower(void);
|
||||
extern bool i915_gpu_busy(void);
|
||||
extern bool i915_gpu_turbo_disable(void);
|
||||
#endif
|
||||
|
||||
/* Each region is a minimum of 16k, and there are at most 255 of them.
|
||||
*/
|
||||
#define I915_NR_TEX_REGIONS 255 /* table size 2k - maximum due to use
|
||||
* of chars for next/prev indices */
|
||||
#define I915_LOG_MIN_TEX_REGION_SIZE 14
|
||||
|
||||
typedef struct _drm_i915_init {
|
||||
enum {
|
||||
I915_INIT_DMA = 0x01,
|
||||
I915_CLEANUP_DMA = 0x02,
|
||||
I915_RESUME_DMA = 0x03
|
||||
} func;
|
||||
unsigned int mmio_offset;
|
||||
int sarea_priv_offset;
|
||||
unsigned int ring_start;
|
||||
unsigned int ring_end;
|
||||
unsigned int ring_size;
|
||||
unsigned int front_offset;
|
||||
unsigned int back_offset;
|
||||
unsigned int depth_offset;
|
||||
unsigned int w;
|
||||
unsigned int h;
|
||||
unsigned int pitch;
|
||||
unsigned int pitch_bits;
|
||||
unsigned int back_pitch;
|
||||
unsigned int depth_pitch;
|
||||
unsigned int cpp;
|
||||
unsigned int chipset;
|
||||
} drm_i915_init_t;
|
||||
|
||||
typedef struct _drm_i915_sarea {
|
||||
struct drm_tex_region texList[I915_NR_TEX_REGIONS + 1];
|
||||
int last_upload; /* last time texture was uploaded */
|
||||
int last_enqueue; /* last time a buffer was enqueued */
|
||||
int last_dispatch; /* age of the most recently dispatched buffer */
|
||||
int ctxOwner; /* last context to upload state */
|
||||
int texAge;
|
||||
int pf_enabled; /* is pageflipping allowed? */
|
||||
int pf_active;
|
||||
int pf_current_page; /* which buffer is being displayed? */
|
||||
int perf_boxes; /* performance boxes to be displayed */
|
||||
int width, height; /* screen size in pixels */
|
||||
|
||||
drm_handle_t front_handle;
|
||||
int front_offset;
|
||||
int front_size;
|
||||
|
||||
drm_handle_t back_handle;
|
||||
int back_offset;
|
||||
int back_size;
|
||||
|
||||
drm_handle_t depth_handle;
|
||||
int depth_offset;
|
||||
int depth_size;
|
||||
|
||||
drm_handle_t tex_handle;
|
||||
int tex_offset;
|
||||
int tex_size;
|
||||
int log_tex_granularity;
|
||||
int pitch;
|
||||
int rotation; /* 0, 90, 180 or 270 */
|
||||
int rotated_offset;
|
||||
int rotated_size;
|
||||
int rotated_pitch;
|
||||
int virtualX, virtualY;
|
||||
|
||||
unsigned int front_tiled;
|
||||
unsigned int back_tiled;
|
||||
unsigned int depth_tiled;
|
||||
unsigned int rotated_tiled;
|
||||
unsigned int rotated2_tiled;
|
||||
|
||||
int pipeA_x;
|
||||
int pipeA_y;
|
||||
int pipeA_w;
|
||||
int pipeA_h;
|
||||
int pipeB_x;
|
||||
int pipeB_y;
|
||||
int pipeB_w;
|
||||
int pipeB_h;
|
||||
|
||||
/* fill out some space for old userspace triple buffer */
|
||||
drm_handle_t unused_handle;
|
||||
__u32 unused1, unused2, unused3;
|
||||
|
||||
/* buffer object handles for static buffers. May change
|
||||
* over the lifetime of the client.
|
||||
*/
|
||||
__u32 front_bo_handle;
|
||||
__u32 back_bo_handle;
|
||||
__u32 unused_bo_handle;
|
||||
__u32 depth_bo_handle;
|
||||
|
||||
} drm_i915_sarea_t;
|
||||
|
||||
/* due to userspace building against these headers we need some compat here */
|
||||
#define planeA_x pipeA_x
|
||||
#define planeA_y pipeA_y
|
||||
#define planeA_w pipeA_w
|
||||
#define planeA_h pipeA_h
|
||||
#define planeB_x pipeB_x
|
||||
#define planeB_y pipeB_y
|
||||
#define planeB_w pipeB_w
|
||||
#define planeB_h pipeB_h
|
||||
|
||||
/* Flags for perf_boxes
|
||||
*/
|
||||
#define I915_BOX_RING_EMPTY 0x1
|
||||
#define I915_BOX_FLIP 0x2
|
||||
#define I915_BOX_WAIT 0x4
|
||||
#define I915_BOX_TEXTURE_LOAD 0x8
|
||||
#define I915_BOX_LOST_CONTEXT 0x10
|
||||
|
||||
/* I915 specific ioctls
|
||||
* The device specific ioctl range is 0x40 to 0x79.
|
||||
*/
|
||||
#define DRM_I915_INIT 0x00
|
||||
#define DRM_I915_FLUSH 0x01
|
||||
#define DRM_I915_FLIP 0x02
|
||||
#define DRM_I915_BATCHBUFFER 0x03
|
||||
#define DRM_I915_IRQ_EMIT 0x04
|
||||
#define DRM_I915_IRQ_WAIT 0x05
|
||||
#define DRM_I915_GETPARAM 0x06
|
||||
#define DRM_I915_SETPARAM 0x07
|
||||
#define DRM_I915_ALLOC 0x08
|
||||
#define DRM_I915_FREE 0x09
|
||||
#define DRM_I915_INIT_HEAP 0x0a
|
||||
#define DRM_I915_CMDBUFFER 0x0b
|
||||
#define DRM_I915_DESTROY_HEAP 0x0c
|
||||
#define DRM_I915_SET_VBLANK_PIPE 0x0d
|
||||
#define DRM_I915_GET_VBLANK_PIPE 0x0e
|
||||
#define DRM_I915_VBLANK_SWAP 0x0f
|
||||
#define DRM_I915_HWS_ADDR 0x11
|
||||
#define DRM_I915_GEM_INIT 0x13
|
||||
#define DRM_I915_GEM_EXECBUFFER 0x14
|
||||
#define DRM_I915_GEM_PIN 0x15
|
||||
#define DRM_I915_GEM_UNPIN 0x16
|
||||
#define DRM_I915_GEM_BUSY 0x17
|
||||
#define DRM_I915_GEM_THROTTLE 0x18
|
||||
#define DRM_I915_GEM_ENTERVT 0x19
|
||||
#define DRM_I915_GEM_LEAVEVT 0x1a
|
||||
#define DRM_I915_GEM_CREATE 0x1b
|
||||
#define DRM_I915_GEM_PREAD 0x1c
|
||||
#define DRM_I915_GEM_PWRITE 0x1d
|
||||
#define DRM_I915_GEM_MMAP 0x1e
|
||||
#define DRM_I915_GEM_SET_DOMAIN 0x1f
|
||||
#define DRM_I915_GEM_SW_FINISH 0x20
|
||||
#define DRM_I915_GEM_SET_TILING 0x21
|
||||
#define DRM_I915_GEM_GET_TILING 0x22
|
||||
#define DRM_I915_GEM_GET_APERTURE 0x23
|
||||
#define DRM_I915_GEM_MMAP_GTT 0x24
|
||||
#define DRM_I915_GET_PIPE_FROM_CRTC_ID 0x25
|
||||
#define DRM_I915_GEM_MADVISE 0x26
|
||||
#define DRM_I915_OVERLAY_PUT_IMAGE 0x27
|
||||
#define DRM_I915_OVERLAY_ATTRS 0x28
|
||||
#define DRM_I915_GEM_EXECBUFFER2 0x29
|
||||
#define DRM_I915_GET_SPRITE_COLORKEY 0x2a
|
||||
#define DRM_I915_SET_SPRITE_COLORKEY 0x2b
|
||||
#define DRM_I915_GEM_WAIT 0x2c
|
||||
#define DRM_I915_GEM_CONTEXT_CREATE 0x2d
|
||||
#define DRM_I915_GEM_CONTEXT_DESTROY 0x2e
|
||||
|
||||
#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
|
||||
#define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH)
|
||||
#define DRM_IOCTL_I915_FLIP DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLIP)
|
||||
#define DRM_IOCTL_I915_BATCHBUFFER DRM_IOW( DRM_COMMAND_BASE + DRM_I915_BATCHBUFFER, drm_i915_batchbuffer_t)
|
||||
#define DRM_IOCTL_I915_IRQ_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_IRQ_EMIT, drm_i915_irq_emit_t)
|
||||
#define DRM_IOCTL_I915_IRQ_WAIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_IRQ_WAIT, drm_i915_irq_wait_t)
|
||||
#define DRM_IOCTL_I915_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GETPARAM, drm_i915_getparam_t)
|
||||
#define DRM_IOCTL_I915_SETPARAM DRM_IOW( DRM_COMMAND_BASE + DRM_I915_SETPARAM, drm_i915_setparam_t)
|
||||
#define DRM_IOCTL_I915_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_ALLOC, drm_i915_mem_alloc_t)
|
||||
#define DRM_IOCTL_I915_FREE DRM_IOW( DRM_COMMAND_BASE + DRM_I915_FREE, drm_i915_mem_free_t)
|
||||
#define DRM_IOCTL_I915_INIT_HEAP DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT_HEAP, drm_i915_mem_init_heap_t)
|
||||
#define DRM_IOCTL_I915_CMDBUFFER DRM_IOW( DRM_COMMAND_BASE + DRM_I915_CMDBUFFER, drm_i915_cmdbuffer_t)
|
||||
#define DRM_IOCTL_I915_DESTROY_HEAP DRM_IOW( DRM_COMMAND_BASE + DRM_I915_DESTROY_HEAP, drm_i915_mem_destroy_heap_t)
|
||||
#define DRM_IOCTL_I915_SET_VBLANK_PIPE DRM_IOW( DRM_COMMAND_BASE + DRM_I915_SET_VBLANK_PIPE, drm_i915_vblank_pipe_t)
|
||||
#define DRM_IOCTL_I915_GET_VBLANK_PIPE DRM_IOR( DRM_COMMAND_BASE + DRM_I915_GET_VBLANK_PIPE, drm_i915_vblank_pipe_t)
|
||||
#define DRM_IOCTL_I915_VBLANK_SWAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_VBLANK_SWAP, drm_i915_vblank_swap_t)
|
||||
#define DRM_IOCTL_I915_HWS_ADDR DRM_IOW(DRM_COMMAND_BASE + DRM_I915_HWS_ADDR, struct drm_i915_gem_init)
|
||||
#define DRM_IOCTL_I915_GEM_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_INIT, struct drm_i915_gem_init)
|
||||
#define DRM_IOCTL_I915_GEM_EXECBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER, struct drm_i915_gem_execbuffer)
|
||||
#define DRM_IOCTL_I915_GEM_EXECBUFFER2 DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER2, struct drm_i915_gem_execbuffer2)
|
||||
#define DRM_IOCTL_I915_GEM_PIN DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_PIN, struct drm_i915_gem_pin)
|
||||
#define DRM_IOCTL_I915_GEM_UNPIN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_UNPIN, struct drm_i915_gem_unpin)
|
||||
#define DRM_IOCTL_I915_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_BUSY, struct drm_i915_gem_busy)
|
||||
#define DRM_IOCTL_I915_GEM_THROTTLE DRM_IO ( DRM_COMMAND_BASE + DRM_I915_GEM_THROTTLE)
|
||||
#define DRM_IOCTL_I915_GEM_ENTERVT DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_ENTERVT)
|
||||
#define DRM_IOCTL_I915_GEM_LEAVEVT DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_LEAVEVT)
|
||||
#define DRM_IOCTL_I915_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CREATE, struct drm_i915_gem_create)
|
||||
#define DRM_IOCTL_I915_GEM_PREAD DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_PREAD, struct drm_i915_gem_pread)
|
||||
#define DRM_IOCTL_I915_GEM_PWRITE DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_PWRITE, struct drm_i915_gem_pwrite)
|
||||
#define DRM_IOCTL_I915_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP, struct drm_i915_gem_mmap)
|
||||
#define DRM_IOCTL_I915_GEM_MMAP_GTT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP_GTT, struct drm_i915_gem_mmap_gtt)
|
||||
#define DRM_IOCTL_I915_GEM_SET_DOMAIN DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_SET_DOMAIN, struct drm_i915_gem_set_domain)
|
||||
#define DRM_IOCTL_I915_GEM_SW_FINISH DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_SW_FINISH, struct drm_i915_gem_sw_finish)
|
||||
#define DRM_IOCTL_I915_GEM_SET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_SET_TILING, struct drm_i915_gem_set_tiling)
|
||||
#define DRM_IOCTL_I915_GEM_GET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling)
|
||||
#define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture)
|
||||
#define DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_PIPE_FROM_CRTC_ID, struct drm_i915_get_pipe_from_crtc_id)
|
||||
#define DRM_IOCTL_I915_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MADVISE, struct drm_i915_gem_madvise)
|
||||
#define DRM_IOCTL_I915_OVERLAY_PUT_IMAGE DRM_IOW(DRM_COMMAND_BASE + DRM_I915_OVERLAY_PUT_IMAGE, struct drm_intel_overlay_put_image)
|
||||
#define DRM_IOCTL_I915_OVERLAY_ATTRS DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_OVERLAY_ATTRS, struct drm_intel_overlay_attrs)
|
||||
#define DRM_IOCTL_I915_SET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey)
|
||||
#define DRM_IOCTL_I915_GET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey)
|
||||
#define DRM_IOCTL_I915_GEM_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_WAIT, struct drm_i915_gem_wait)
|
||||
#define DRM_IOCTL_I915_GEM_CONTEXT_CREATE DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_CREATE, struct drm_i915_gem_context_create)
|
||||
#define DRM_IOCTL_I915_GEM_CONTEXT_DESTROY DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_DESTROY, struct drm_i915_gem_context_destroy)
|
||||
|
||||
/* Allow drivers to submit batchbuffers directly to hardware, relying
|
||||
* on the security mechanisms provided by hardware.
|
||||
*/
|
||||
typedef struct drm_i915_batchbuffer {
|
||||
int start; /* agp offset */
|
||||
int used; /* nr bytes in use */
|
||||
int DR1; /* hw flags for GFX_OP_DRAWRECT_INFO */
|
||||
int DR4; /* window origin for GFX_OP_DRAWRECT_INFO */
|
||||
int num_cliprects; /* mulitpass with multiple cliprects? */
|
||||
struct drm_clip_rect __user *cliprects; /* pointer to userspace cliprects */
|
||||
} drm_i915_batchbuffer_t;
|
||||
|
||||
/* As above, but pass a pointer to userspace buffer which can be
|
||||
* validated by the kernel prior to sending to hardware.
|
||||
*/
|
||||
typedef struct _drm_i915_cmdbuffer {
|
||||
char __user *buf; /* pointer to userspace command buffer */
|
||||
int sz; /* nr bytes in buf */
|
||||
int DR1; /* hw flags for GFX_OP_DRAWRECT_INFO */
|
||||
int DR4; /* window origin for GFX_OP_DRAWRECT_INFO */
|
||||
int num_cliprects; /* mulitpass with multiple cliprects? */
|
||||
struct drm_clip_rect __user *cliprects; /* pointer to userspace cliprects */
|
||||
} drm_i915_cmdbuffer_t;
|
||||
|
||||
/* Userspace can request & wait on irq's:
|
||||
*/
|
||||
typedef struct drm_i915_irq_emit {
|
||||
int __user *irq_seq;
|
||||
} drm_i915_irq_emit_t;
|
||||
|
||||
typedef struct drm_i915_irq_wait {
|
||||
int irq_seq;
|
||||
} drm_i915_irq_wait_t;
|
||||
|
||||
/* Ioctl to query kernel params:
|
||||
*/
|
||||
#define I915_PARAM_IRQ_ACTIVE 1
|
||||
#define I915_PARAM_ALLOW_BATCHBUFFER 2
|
||||
#define I915_PARAM_LAST_DISPATCH 3
|
||||
#define I915_PARAM_CHIPSET_ID 4
|
||||
#define I915_PARAM_HAS_GEM 5
|
||||
#define I915_PARAM_NUM_FENCES_AVAIL 6
|
||||
#define I915_PARAM_HAS_OVERLAY 7
|
||||
#define I915_PARAM_HAS_PAGEFLIPPING 8
|
||||
#define I915_PARAM_HAS_EXECBUF2 9
|
||||
#define I915_PARAM_HAS_BSD 10
|
||||
#define I915_PARAM_HAS_BLT 11
|
||||
#define I915_PARAM_HAS_RELAXED_FENCING 12
|
||||
#define I915_PARAM_HAS_COHERENT_RINGS 13
|
||||
#define I915_PARAM_HAS_EXEC_CONSTANTS 14
|
||||
#define I915_PARAM_HAS_RELAXED_DELTA 15
|
||||
#define I915_PARAM_HAS_GEN7_SOL_RESET 16
|
||||
#define I915_PARAM_HAS_LLC 17
|
||||
#define I915_PARAM_HAS_ALIASING_PPGTT 18
|
||||
#define I915_PARAM_HAS_WAIT_TIMEOUT 19
|
||||
|
||||
typedef struct drm_i915_getparam {
|
||||
int param;
|
||||
int __user *value;
|
||||
} drm_i915_getparam_t;
|
||||
|
||||
/* Ioctl to set kernel params:
|
||||
*/
|
||||
#define I915_SETPARAM_USE_MI_BATCHBUFFER_START 1
|
||||
#define I915_SETPARAM_TEX_LRU_LOG_GRANULARITY 2
|
||||
#define I915_SETPARAM_ALLOW_BATCHBUFFER 3
|
||||
#define I915_SETPARAM_NUM_USED_FENCES 4
|
||||
|
||||
typedef struct drm_i915_setparam {
|
||||
int param;
|
||||
int value;
|
||||
} drm_i915_setparam_t;
|
||||
|
||||
/* A memory manager for regions of shared memory:
|
||||
*/
|
||||
#define I915_MEM_REGION_AGP 1
|
||||
|
||||
typedef struct drm_i915_mem_alloc {
|
||||
int region;
|
||||
int alignment;
|
||||
int size;
|
||||
int __user *region_offset; /* offset from start of fb or agp */
|
||||
} drm_i915_mem_alloc_t;
|
||||
|
||||
typedef struct drm_i915_mem_free {
|
||||
int region;
|
||||
int region_offset;
|
||||
} drm_i915_mem_free_t;
|
||||
|
||||
typedef struct drm_i915_mem_init_heap {
|
||||
int region;
|
||||
int size;
|
||||
int start;
|
||||
} drm_i915_mem_init_heap_t;
|
||||
|
||||
/* Allow memory manager to be torn down and re-initialized (eg on
|
||||
* rotate):
|
||||
*/
|
||||
typedef struct drm_i915_mem_destroy_heap {
|
||||
int region;
|
||||
} drm_i915_mem_destroy_heap_t;
|
||||
|
||||
/* Allow X server to configure which pipes to monitor for vblank signals
|
||||
*/
|
||||
#define DRM_I915_VBLANK_PIPE_A 1
|
||||
#define DRM_I915_VBLANK_PIPE_B 2
|
||||
|
||||
typedef struct drm_i915_vblank_pipe {
|
||||
int pipe;
|
||||
} drm_i915_vblank_pipe_t;
|
||||
|
||||
/* Schedule buffer swap at given vertical blank:
|
||||
*/
|
||||
typedef struct drm_i915_vblank_swap {
|
||||
drm_drawable_t drawable;
|
||||
enum drm_vblank_seq_type seqtype;
|
||||
unsigned int sequence;
|
||||
} drm_i915_vblank_swap_t;
|
||||
|
||||
typedef struct drm_i915_hws_addr {
|
||||
__u64 addr;
|
||||
} drm_i915_hws_addr_t;
|
||||
|
||||
struct drm_i915_gem_init {
|
||||
/**
|
||||
* Beginning offset in the GTT to be managed by the DRM memory
|
||||
* manager.
|
||||
*/
|
||||
__u64 gtt_start;
|
||||
/**
|
||||
* Ending offset in the GTT to be managed by the DRM memory
|
||||
* manager.
|
||||
*/
|
||||
__u64 gtt_end;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_create {
|
||||
/**
|
||||
* Requested size for the object.
|
||||
*
|
||||
* The (page-aligned) allocated size for the object will be returned.
|
||||
*/
|
||||
__u64 size;
|
||||
/**
|
||||
* Returned handle for the object.
|
||||
*
|
||||
* Object handles are nonzero.
|
||||
*/
|
||||
__u32 handle;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_pread {
|
||||
/** Handle for the object being read. */
|
||||
__u32 handle;
|
||||
__u32 pad;
|
||||
/** Offset into the object to read from */
|
||||
__u64 offset;
|
||||
/** Length of data to read */
|
||||
__u64 size;
|
||||
/**
|
||||
* Pointer to write the data into.
|
||||
*
|
||||
* This is a fixed-size type for 32/64 compatibility.
|
||||
*/
|
||||
__u64 data_ptr;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_pwrite {
|
||||
/** Handle for the object being written to. */
|
||||
__u32 handle;
|
||||
__u32 pad;
|
||||
/** Offset into the object to write to */
|
||||
__u64 offset;
|
||||
/** Length of data to write */
|
||||
__u64 size;
|
||||
/**
|
||||
* Pointer to read the data from.
|
||||
*
|
||||
* This is a fixed-size type for 32/64 compatibility.
|
||||
*/
|
||||
__u64 data_ptr;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_mmap {
|
||||
/** Handle for the object being mapped. */
|
||||
__u32 handle;
|
||||
__u32 pad;
|
||||
/** Offset in the object to map. */
|
||||
__u64 offset;
|
||||
/**
|
||||
* Length of data to map.
|
||||
*
|
||||
* The value will be page-aligned.
|
||||
*/
|
||||
__u64 size;
|
||||
/**
|
||||
* Returned pointer the data was mapped at.
|
||||
*
|
||||
* This is a fixed-size type for 32/64 compatibility.
|
||||
*/
|
||||
__u64 addr_ptr;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_mmap_gtt {
|
||||
/** Handle for the object being mapped. */
|
||||
__u32 handle;
|
||||
__u32 pad;
|
||||
/**
|
||||
* Fake offset to use for subsequent mmap call
|
||||
*
|
||||
* This is a fixed-size type for 32/64 compatibility.
|
||||
*/
|
||||
__u64 offset;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_set_domain {
|
||||
/** Handle for the object */
|
||||
__u32 handle;
|
||||
|
||||
/** New read domains */
|
||||
__u32 read_domains;
|
||||
|
||||
/** New write domain */
|
||||
__u32 write_domain;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_sw_finish {
|
||||
/** Handle for the object */
|
||||
__u32 handle;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_relocation_entry {
|
||||
/**
|
||||
* Handle of the buffer being pointed to by this relocation entry.
|
||||
*
|
||||
* It's appealing to make this be an index into the mm_validate_entry
|
||||
* list to refer to the buffer, but this allows the driver to create
|
||||
* a relocation list for state buffers and not re-write it per
|
||||
* exec using the buffer.
|
||||
*/
|
||||
__u32 target_handle;
|
||||
|
||||
/**
|
||||
* Value to be added to the offset of the target buffer to make up
|
||||
* the relocation entry.
|
||||
*/
|
||||
__u32 delta;
|
||||
|
||||
/** Offset in the buffer the relocation entry will be written into */
|
||||
__u64 offset;
|
||||
|
||||
/**
|
||||
* Offset value of the target buffer that the relocation entry was last
|
||||
* written as.
|
||||
*
|
||||
* If the buffer has the same offset as last time, we can skip syncing
|
||||
* and writing the relocation. This value is written back out by
|
||||
* the execbuffer ioctl when the relocation is written.
|
||||
*/
|
||||
__u64 presumed_offset;
|
||||
|
||||
/**
|
||||
* Target memory domains read by this operation.
|
||||
*/
|
||||
__u32 read_domains;
|
||||
|
||||
/**
|
||||
* Target memory domains written by this operation.
|
||||
*
|
||||
* Note that only one domain may be written by the whole
|
||||
* execbuffer operation, so that where there are conflicts,
|
||||
* the application will get -EINVAL back.
|
||||
*/
|
||||
__u32 write_domain;
|
||||
};
|
||||
|
||||
/** @{
|
||||
* Intel memory domains
|
||||
*
|
||||
* Most of these just align with the various caches in
|
||||
* the system and are used to flush and invalidate as
|
||||
* objects end up cached in different domains.
|
||||
*/
|
||||
/** CPU cache */
|
||||
#define I915_GEM_DOMAIN_CPU 0x00000001
|
||||
/** Render cache, used by 2D and 3D drawing */
|
||||
#define I915_GEM_DOMAIN_RENDER 0x00000002
|
||||
/** Sampler cache, used by texture engine */
|
||||
#define I915_GEM_DOMAIN_SAMPLER 0x00000004
|
||||
/** Command queue, used to load batch buffers */
|
||||
#define I915_GEM_DOMAIN_COMMAND 0x00000008
|
||||
/** Instruction cache, used by shader programs */
|
||||
#define I915_GEM_DOMAIN_INSTRUCTION 0x00000010
|
||||
/** Vertex address cache */
|
||||
#define I915_GEM_DOMAIN_VERTEX 0x00000020
|
||||
/** GTT domain - aperture and scanout */
|
||||
#define I915_GEM_DOMAIN_GTT 0x00000040
|
||||
/** @} */
|
||||
|
||||
struct drm_i915_gem_exec_object {
|
||||
/**
|
||||
* User's handle for a buffer to be bound into the GTT for this
|
||||
* operation.
|
||||
*/
|
||||
__u32 handle;
|
||||
|
||||
/** Number of relocations to be performed on this buffer */
|
||||
__u32 relocation_count;
|
||||
/**
|
||||
* Pointer to array of struct drm_i915_gem_relocation_entry containing
|
||||
* the relocations to be performed in this buffer.
|
||||
*/
|
||||
__u64 relocs_ptr;
|
||||
|
||||
/** Required alignment in graphics aperture */
|
||||
__u64 alignment;
|
||||
|
||||
/**
|
||||
* Returned value of the updated offset of the object, for future
|
||||
* presumed_offset writes.
|
||||
*/
|
||||
__u64 offset;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_execbuffer {
|
||||
/**
|
||||
* List of buffers to be validated with their relocations to be
|
||||
* performend on them.
|
||||
*
|
||||
* This is a pointer to an array of struct drm_i915_gem_validate_entry.
|
||||
*
|
||||
* These buffers must be listed in an order such that all relocations
|
||||
* a buffer is performing refer to buffers that have already appeared
|
||||
* in the validate list.
|
||||
*/
|
||||
__u64 buffers_ptr;
|
||||
__u32 buffer_count;
|
||||
|
||||
/** Offset in the batchbuffer to start execution from. */
|
||||
__u32 batch_start_offset;
|
||||
/** Bytes used in batchbuffer from batch_start_offset */
|
||||
__u32 batch_len;
|
||||
__u32 DR1;
|
||||
__u32 DR4;
|
||||
__u32 num_cliprects;
|
||||
/** This is a struct drm_clip_rect *cliprects */
|
||||
__u64 cliprects_ptr;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_exec_object2 {
|
||||
/**
|
||||
* User's handle for a buffer to be bound into the GTT for this
|
||||
* operation.
|
||||
*/
|
||||
__u32 handle;
|
||||
|
||||
/** Number of relocations to be performed on this buffer */
|
||||
__u32 relocation_count;
|
||||
/**
|
||||
* Pointer to array of struct drm_i915_gem_relocation_entry containing
|
||||
* the relocations to be performed in this buffer.
|
||||
*/
|
||||
__u64 relocs_ptr;
|
||||
|
||||
/** Required alignment in graphics aperture */
|
||||
__u64 alignment;
|
||||
|
||||
/**
|
||||
* Returned value of the updated offset of the object, for future
|
||||
* presumed_offset writes.
|
||||
*/
|
||||
__u64 offset;
|
||||
|
||||
#define EXEC_OBJECT_NEEDS_FENCE (1<<0)
|
||||
__u64 flags;
|
||||
__u64 rsvd1;
|
||||
__u64 rsvd2;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_execbuffer2 {
|
||||
/**
|
||||
* List of gem_exec_object2 structs
|
||||
*/
|
||||
__u64 buffers_ptr;
|
||||
__u32 buffer_count;
|
||||
|
||||
/** Offset in the batchbuffer to start execution from. */
|
||||
__u32 batch_start_offset;
|
||||
/** Bytes used in batchbuffer from batch_start_offset */
|
||||
__u32 batch_len;
|
||||
__u32 DR1;
|
||||
__u32 DR4;
|
||||
__u32 num_cliprects;
|
||||
/** This is a struct drm_clip_rect *cliprects */
|
||||
__u64 cliprects_ptr;
|
||||
#define I915_EXEC_RING_MASK (7<<0)
|
||||
#define I915_EXEC_DEFAULT (0<<0)
|
||||
#define I915_EXEC_RENDER (1<<0)
|
||||
#define I915_EXEC_BSD (2<<0)
|
||||
#define I915_EXEC_BLT (3<<0)
|
||||
|
||||
/* Used for switching the constants addressing mode on gen4+ RENDER ring.
|
||||
* Gen6+ only supports relative addressing to dynamic state (default) and
|
||||
* absolute addressing.
|
||||
*
|
||||
* These flags are ignored for the BSD and BLT rings.
|
||||
*/
|
||||
#define I915_EXEC_CONSTANTS_MASK (3<<6)
|
||||
#define I915_EXEC_CONSTANTS_REL_GENERAL (0<<6) /* default */
|
||||
#define I915_EXEC_CONSTANTS_ABSOLUTE (1<<6)
|
||||
#define I915_EXEC_CONSTANTS_REL_SURFACE (2<<6) /* gen4/5 only */
|
||||
__u64 flags;
|
||||
__u64 rsvd1; /* now used for context info */
|
||||
__u64 rsvd2;
|
||||
};
|
||||
|
||||
/** Resets the SO write offset registers for transform feedback on gen7. */
|
||||
#define I915_EXEC_GEN7_SOL_RESET (1<<8)
|
||||
|
||||
#define I915_EXEC_CONTEXT_ID_MASK (0xffffffff)
|
||||
#define i915_execbuffer2_set_context_id(eb2, context) \
|
||||
(eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK
|
||||
#define i915_execbuffer2_get_context_id(eb2) \
|
||||
((eb2).rsvd1 & I915_EXEC_CONTEXT_ID_MASK)
|
||||
|
||||
struct drm_i915_gem_pin {
|
||||
/** Handle of the buffer to be pinned. */
|
||||
__u32 handle;
|
||||
__u32 pad;
|
||||
|
||||
/** alignment required within the aperture */
|
||||
__u64 alignment;
|
||||
|
||||
/** Returned GTT offset of the buffer. */
|
||||
__u64 offset;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_unpin {
|
||||
/** Handle of the buffer to be unpinned. */
|
||||
__u32 handle;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_busy {
|
||||
/** Handle of the buffer to check for busy */
|
||||
__u32 handle;
|
||||
|
||||
/** Return busy status (1 if busy, 0 if idle) */
|
||||
__u32 busy;
|
||||
};
|
||||
|
||||
#define I915_TILING_NONE 0
|
||||
#define I915_TILING_X 1
|
||||
#define I915_TILING_Y 2
|
||||
|
||||
#define I915_BIT_6_SWIZZLE_NONE 0
|
||||
#define I915_BIT_6_SWIZZLE_9 1
|
||||
#define I915_BIT_6_SWIZZLE_9_10 2
|
||||
#define I915_BIT_6_SWIZZLE_9_11 3
|
||||
#define I915_BIT_6_SWIZZLE_9_10_11 4
|
||||
/* Not seen by userland */
|
||||
#define I915_BIT_6_SWIZZLE_UNKNOWN 5
|
||||
/* Seen by userland. */
|
||||
#define I915_BIT_6_SWIZZLE_9_17 6
|
||||
#define I915_BIT_6_SWIZZLE_9_10_17 7
|
||||
|
||||
struct drm_i915_gem_set_tiling {
|
||||
/** Handle of the buffer to have its tiling state updated */
|
||||
__u32 handle;
|
||||
|
||||
/**
|
||||
* Tiling mode for the object (I915_TILING_NONE, I915_TILING_X,
|
||||
* I915_TILING_Y).
|
||||
*
|
||||
* This value is to be set on request, and will be updated by the
|
||||
* kernel on successful return with the actual chosen tiling layout.
|
||||
*
|
||||
* The tiling mode may be demoted to I915_TILING_NONE when the system
|
||||
* has bit 6 swizzling that can't be managed correctly by GEM.
|
||||
*
|
||||
* Buffer contents become undefined when changing tiling_mode.
|
||||
*/
|
||||
__u32 tiling_mode;
|
||||
|
||||
/**
|
||||
* Stride in bytes for the object when in I915_TILING_X or
|
||||
* I915_TILING_Y.
|
||||
*/
|
||||
__u32 stride;
|
||||
|
||||
/**
|
||||
* Returned address bit 6 swizzling required for CPU access through
|
||||
* mmap mapping.
|
||||
*/
|
||||
__u32 swizzle_mode;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_get_tiling {
|
||||
/** Handle of the buffer to get tiling state for. */
|
||||
__u32 handle;
|
||||
|
||||
/**
|
||||
* Current tiling mode for the object (I915_TILING_NONE, I915_TILING_X,
|
||||
* I915_TILING_Y).
|
||||
*/
|
||||
__u32 tiling_mode;
|
||||
|
||||
/**
|
||||
* Returned address bit 6 swizzling required for CPU access through
|
||||
* mmap mapping.
|
||||
*/
|
||||
__u32 swizzle_mode;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_get_aperture {
|
||||
/** Total size of the aperture used by i915_gem_execbuffer, in bytes */
|
||||
__u64 aper_size;
|
||||
|
||||
/**
|
||||
* Available space in the aperture used by i915_gem_execbuffer, in
|
||||
* bytes
|
||||
*/
|
||||
__u64 aper_available_size;
|
||||
};
|
||||
|
||||
struct drm_i915_get_pipe_from_crtc_id {
|
||||
/** ID of CRTC being requested **/
|
||||
__u32 crtc_id;
|
||||
|
||||
/** pipe of requested CRTC **/
|
||||
__u32 pipe;
|
||||
};
|
||||
|
||||
#define I915_MADV_WILLNEED 0
|
||||
#define I915_MADV_DONTNEED 1
|
||||
#define __I915_MADV_PURGED 2 /* internal state */
|
||||
|
||||
struct drm_i915_gem_madvise {
|
||||
/** Handle of the buffer to change the backing store advice */
|
||||
__u32 handle;
|
||||
|
||||
/* Advice: either the buffer will be needed again in the near future,
|
||||
* or wont be and could be discarded under memory pressure.
|
||||
*/
|
||||
__u32 madv;
|
||||
|
||||
/** Whether the backing store still exists. */
|
||||
__u32 retained;
|
||||
};
|
||||
|
||||
/* flags */
|
||||
#define I915_OVERLAY_TYPE_MASK 0xff
|
||||
#define I915_OVERLAY_YUV_PLANAR 0x01
|
||||
#define I915_OVERLAY_YUV_PACKED 0x02
|
||||
#define I915_OVERLAY_RGB 0x03
|
||||
|
||||
#define I915_OVERLAY_DEPTH_MASK 0xff00
|
||||
#define I915_OVERLAY_RGB24 0x1000
|
||||
#define I915_OVERLAY_RGB16 0x2000
|
||||
#define I915_OVERLAY_RGB15 0x3000
|
||||
#define I915_OVERLAY_YUV422 0x0100
|
||||
#define I915_OVERLAY_YUV411 0x0200
|
||||
#define I915_OVERLAY_YUV420 0x0300
|
||||
#define I915_OVERLAY_YUV410 0x0400
|
||||
|
||||
#define I915_OVERLAY_SWAP_MASK 0xff0000
|
||||
#define I915_OVERLAY_NO_SWAP 0x000000
|
||||
#define I915_OVERLAY_UV_SWAP 0x010000
|
||||
#define I915_OVERLAY_Y_SWAP 0x020000
|
||||
#define I915_OVERLAY_Y_AND_UV_SWAP 0x030000
|
||||
|
||||
#define I915_OVERLAY_FLAGS_MASK 0xff000000
|
||||
#define I915_OVERLAY_ENABLE 0x01000000
|
||||
|
||||
struct drm_intel_overlay_put_image {
|
||||
/* various flags and src format description */
|
||||
__u32 flags;
|
||||
/* source picture description */
|
||||
__u32 bo_handle;
|
||||
/* stride values and offsets are in bytes, buffer relative */
|
||||
__u16 stride_Y; /* stride for packed formats */
|
||||
__u16 stride_UV;
|
||||
__u32 offset_Y; /* offset for packet formats */
|
||||
__u32 offset_U;
|
||||
__u32 offset_V;
|
||||
/* in pixels */
|
||||
__u16 src_width;
|
||||
__u16 src_height;
|
||||
/* to compensate the scaling factors for partially covered surfaces */
|
||||
__u16 src_scan_width;
|
||||
__u16 src_scan_height;
|
||||
/* output crtc description */
|
||||
__u32 crtc_id;
|
||||
__u16 dst_x;
|
||||
__u16 dst_y;
|
||||
__u16 dst_width;
|
||||
__u16 dst_height;
|
||||
};
|
||||
|
||||
/* flags */
|
||||
#define I915_OVERLAY_UPDATE_ATTRS (1<<0)
|
||||
#define I915_OVERLAY_UPDATE_GAMMA (1<<1)
|
||||
struct drm_intel_overlay_attrs {
|
||||
__u32 flags;
|
||||
__u32 color_key;
|
||||
__s32 brightness;
|
||||
__u32 contrast;
|
||||
__u32 saturation;
|
||||
__u32 gamma0;
|
||||
__u32 gamma1;
|
||||
__u32 gamma2;
|
||||
__u32 gamma3;
|
||||
__u32 gamma4;
|
||||
__u32 gamma5;
|
||||
};
|
||||
|
||||
/*
|
||||
* Intel sprite handling
|
||||
*
|
||||
* Color keying works with a min/mask/max tuple. Both source and destination
|
||||
* color keying is allowed.
|
||||
*
|
||||
* Source keying:
|
||||
* Sprite pixels within the min & max values, masked against the color channels
|
||||
* specified in the mask field, will be transparent. All other pixels will
|
||||
* be displayed on top of the primary plane. For RGB surfaces, only the min
|
||||
* and mask fields will be used; ranged compares are not allowed.
|
||||
*
|
||||
* Destination keying:
|
||||
* Primary plane pixels that match the min value, masked against the color
|
||||
* channels specified in the mask field, will be replaced by corresponding
|
||||
* pixels from the sprite plane.
|
||||
*
|
||||
* Note that source & destination keying are exclusive; only one can be
|
||||
* active on a given plane.
|
||||
*/
|
||||
|
||||
#define I915_SET_COLORKEY_NONE (1<<0) /* disable color key matching */
|
||||
#define I915_SET_COLORKEY_DESTINATION (1<<1)
|
||||
#define I915_SET_COLORKEY_SOURCE (1<<2)
|
||||
struct drm_intel_sprite_colorkey {
|
||||
__u32 plane_id;
|
||||
__u32 min_value;
|
||||
__u32 channel_mask;
|
||||
__u32 max_value;
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_wait {
|
||||
/** Handle of BO we shall wait on */
|
||||
__u32 bo_handle;
|
||||
__u32 flags;
|
||||
/** Number of nanoseconds to wait, Returns time remaining. */
|
||||
__s64 timeout_ns;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_context_create {
|
||||
/* output: id of new context*/
|
||||
__u32 ctx_id;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_context_destroy {
|
||||
__u32 ctx_id;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
#endif /* _I915_DRM_H_ */
|
||||
|
|
|
|||
|
|
@ -30,16 +30,10 @@ void intel_gmch_remove(void);
|
|||
bool intel_enable_gtt(void);
|
||||
|
||||
void intel_gtt_chipset_flush(void);
|
||||
void intel_gtt_unmap_memory(struct scatterlist *sg_list, int num_sg);
|
||||
void intel_gtt_clear_range(unsigned int first_entry, unsigned int num_entries);
|
||||
int intel_gtt_map_memory(struct page **pages, unsigned int num_entries,
|
||||
struct scatterlist **sg_list, int *num_sg);
|
||||
void intel_gtt_insert_sg_entries(struct scatterlist *sg_list,
|
||||
unsigned int sg_len,
|
||||
void intel_gtt_insert_sg_entries(struct sg_table *st,
|
||||
unsigned int pg_start,
|
||||
unsigned int flags);
|
||||
void intel_gtt_insert_pages(unsigned int first_entry, unsigned int num_entries,
|
||||
struct page **pages, unsigned int flags);
|
||||
void intel_gtt_clear_range(unsigned int first_entry, unsigned int num_entries);
|
||||
|
||||
/* Special gtt memory types */
|
||||
#define AGP_DCACHE_MEMORY 1
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#ifndef _TTM_BO_API_H_
|
||||
#define _TTM_BO_API_H_
|
||||
|
||||
#include "drm_hashtab.h"
|
||||
#include <drm/drm_hashtab.h>
|
||||
#include <linux/kref.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/wait.h>
|
||||
|
|
|
|||
|
|
@ -30,14 +30,14 @@
|
|||
#ifndef _TTM_BO_DRIVER_H_
|
||||
#define _TTM_BO_DRIVER_H_
|
||||
|
||||
#include "ttm/ttm_bo_api.h"
|
||||
#include "ttm/ttm_memory.h"
|
||||
#include "ttm/ttm_module.h"
|
||||
#include "drm_mm.h"
|
||||
#include "drm_global.h"
|
||||
#include "linux/workqueue.h"
|
||||
#include "linux/fs.h"
|
||||
#include "linux/spinlock.h"
|
||||
#include <ttm/ttm_bo_api.h>
|
||||
#include <ttm/ttm_memory.h>
|
||||
#include <ttm/ttm_module.h>
|
||||
#include <drm/drm_mm.h>
|
||||
#include <drm/drm_global.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
struct ttm_backend_func {
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#ifndef _TTM_EXECBUF_UTIL_H_
|
||||
#define _TTM_EXECBUF_UTIL_H_
|
||||
|
||||
#include "ttm/ttm_bo_api.h"
|
||||
#include <ttm/ttm_bo_api.h>
|
||||
#include <linux/list.h>
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
#ifndef _TTM_LOCK_H_
|
||||
#define _TTM_LOCK_H_
|
||||
|
||||
#include "ttm/ttm_object.h"
|
||||
#include <ttm/ttm_object.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/atomic.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#define _TTM_OBJECT_H_
|
||||
|
||||
#include <linux/list.h>
|
||||
#include "drm_hashtab.h"
|
||||
#include <drm/drm_hashtab.h>
|
||||
#include <linux/kref.h>
|
||||
#include <ttm/ttm_memory.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@
|
|||
#ifndef TTM_PAGE_ALLOC
|
||||
#define TTM_PAGE_ALLOC
|
||||
|
||||
#include "ttm_bo_driver.h"
|
||||
#include "ttm_memory.h"
|
||||
#include <drm/ttm/ttm_bo_driver.h>
|
||||
#include <drm/ttm/ttm_memory.h>
|
||||
|
||||
/**
|
||||
* Initialize pool allocator.
|
||||
|
|
|
|||
37
include/keys/asymmetric-parser.h
Normal file
37
include/keys/asymmetric-parser.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* Asymmetric public-key cryptography data parser
|
||||
*
|
||||
* See Documentation/crypto/asymmetric-keys.txt
|
||||
*
|
||||
* Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
|
||||
* Written by David Howells (dhowells@redhat.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public Licence
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the Licence, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef _KEYS_ASYMMETRIC_PARSER_H
|
||||
#define _KEYS_ASYMMETRIC_PARSER_H
|
||||
|
||||
/*
|
||||
* Key data parser. Called during key instantiation.
|
||||
*/
|
||||
struct asymmetric_key_parser {
|
||||
struct list_head link;
|
||||
struct module *owner;
|
||||
const char *name;
|
||||
|
||||
/* Attempt to parse a key from the data blob passed to add_key() or
|
||||
* keyctl_instantiate(). Should also generate a proposed description
|
||||
* that the caller can optionally use for the key.
|
||||
*
|
||||
* Return EBADMSG if not recognised.
|
||||
*/
|
||||
int (*parse)(struct key_preparsed_payload *prep);
|
||||
};
|
||||
|
||||
extern int register_asymmetric_key_parser(struct asymmetric_key_parser *);
|
||||
extern void unregister_asymmetric_key_parser(struct asymmetric_key_parser *);
|
||||
|
||||
#endif /* _KEYS_ASYMMETRIC_PARSER_H */
|
||||
55
include/keys/asymmetric-subtype.h
Normal file
55
include/keys/asymmetric-subtype.h
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
/* Asymmetric public-key cryptography key subtype
|
||||
*
|
||||
* See Documentation/security/asymmetric-keys.txt
|
||||
*
|
||||
* Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
|
||||
* Written by David Howells (dhowells@redhat.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public Licence
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the Licence, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef _KEYS_ASYMMETRIC_SUBTYPE_H
|
||||
#define _KEYS_ASYMMETRIC_SUBTYPE_H
|
||||
|
||||
#include <linux/seq_file.h>
|
||||
#include <keys/asymmetric-type.h>
|
||||
|
||||
struct public_key_signature;
|
||||
|
||||
/*
|
||||
* Keys of this type declare a subtype that indicates the handlers and
|
||||
* capabilities.
|
||||
*/
|
||||
struct asymmetric_key_subtype {
|
||||
struct module *owner;
|
||||
const char *name;
|
||||
unsigned short name_len; /* length of name */
|
||||
|
||||
/* Describe a key of this subtype for /proc/keys */
|
||||
void (*describe)(const struct key *key, struct seq_file *m);
|
||||
|
||||
/* Destroy a key of this subtype */
|
||||
void (*destroy)(void *payload);
|
||||
|
||||
/* Verify the signature on a key of this subtype (optional) */
|
||||
int (*verify_signature)(const struct key *key,
|
||||
const struct public_key_signature *sig);
|
||||
};
|
||||
|
||||
/**
|
||||
* asymmetric_key_subtype - Get the subtype from an asymmetric key
|
||||
* @key: The key of interest.
|
||||
*
|
||||
* Retrieves and returns the subtype pointer of the asymmetric key from the
|
||||
* type-specific data attached to the key.
|
||||
*/
|
||||
static inline
|
||||
struct asymmetric_key_subtype *asymmetric_key_subtype(const struct key *key)
|
||||
{
|
||||
return key->type_data.p[0];
|
||||
}
|
||||
|
||||
#endif /* _KEYS_ASYMMETRIC_SUBTYPE_H */
|
||||
25
include/keys/asymmetric-type.h
Normal file
25
include/keys/asymmetric-type.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* Asymmetric Public-key cryptography key type interface
|
||||
*
|
||||
* See Documentation/security/asymmetric-keys.txt
|
||||
*
|
||||
* Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
|
||||
* Written by David Howells (dhowells@redhat.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public Licence
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the Licence, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef _KEYS_ASYMMETRIC_TYPE_H
|
||||
#define _KEYS_ASYMMETRIC_TYPE_H
|
||||
|
||||
#include <linux/key-type.h>
|
||||
|
||||
extern struct key_type key_type_asymmetric;
|
||||
|
||||
/*
|
||||
* The payload is at the discretion of the subtype.
|
||||
*/
|
||||
|
||||
#endif /* _KEYS_ASYMMETRIC_TYPE_H */
|
||||
|
|
@ -35,8 +35,10 @@ struct user_key_payload {
|
|||
extern struct key_type key_type_user;
|
||||
extern struct key_type key_type_logon;
|
||||
|
||||
extern int user_instantiate(struct key *key, const void *data, size_t datalen);
|
||||
extern int user_update(struct key *key, const void *data, size_t datalen);
|
||||
struct key_preparsed_payload;
|
||||
|
||||
extern int user_instantiate(struct key *key, struct key_preparsed_payload *prep);
|
||||
extern int user_update(struct key *key, struct key_preparsed_payload *prep);
|
||||
extern int user_match(const struct key *key, const void *criterion);
|
||||
extern void user_revoke(struct key *key);
|
||||
extern void user_destroy(struct key *key);
|
||||
|
|
|
|||
|
|
@ -20,396 +20,12 @@ header-y += netfilter_ipv6/
|
|||
header-y += usb/
|
||||
header-y += wimax/
|
||||
|
||||
objhdr-y += version.h
|
||||
|
||||
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \
|
||||
$(srctree)/include/asm-$(SRCARCH)/a.out.h \
|
||||
$(INSTALL_HDR_PATH)/include/asm-*/a.out.h),)
|
||||
header-y += a.out.h
|
||||
$(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h),)
|
||||
endif
|
||||
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \
|
||||
$(srctree)/include/asm-$(SRCARCH)/kvm.h \
|
||||
$(INSTALL_HDR_PATH)/include/asm-*/kvm.h),)
|
||||
header-y += kvm.h
|
||||
$(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h),)
|
||||
endif
|
||||
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
|
||||
$(srctree)/include/asm-$(SRCARCH)/kvm_para.h \
|
||||
$(INSTALL_HDR_PATH)/include/asm-*/kvm_para.h),)
|
||||
header-y += kvm_para.h
|
||||
$(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h),)
|
||||
endif
|
||||
|
||||
header-y += acct.h
|
||||
header-y += adb.h
|
||||
header-y += adfs_fs.h
|
||||
header-y += affs_hardblocks.h
|
||||
header-y += agpgart.h
|
||||
header-y += aio_abi.h
|
||||
header-y += apm_bios.h
|
||||
header-y += arcfb.h
|
||||
header-y += atalk.h
|
||||
header-y += atm.h
|
||||
header-y += atm_eni.h
|
||||
header-y += atm_he.h
|
||||
header-y += atm_idt77105.h
|
||||
header-y += atm_nicstar.h
|
||||
header-y += atm_tcp.h
|
||||
header-y += atm_zatm.h
|
||||
header-y += atmapi.h
|
||||
header-y += atmarp.h
|
||||
header-y += atmbr2684.h
|
||||
header-y += atmclip.h
|
||||
header-y += atmdev.h
|
||||
header-y += atmioc.h
|
||||
header-y += atmlec.h
|
||||
header-y += atmmpc.h
|
||||
header-y += atmppp.h
|
||||
header-y += atmsap.h
|
||||
header-y += atmsvc.h
|
||||
header-y += audit.h
|
||||
header-y += auto_fs.h
|
||||
header-y += auto_fs4.h
|
||||
header-y += auxvec.h
|
||||
header-y += ax25.h
|
||||
header-y += b1lli.h
|
||||
header-y += baycom.h
|
||||
header-y += bfs_fs.h
|
||||
header-y += binfmts.h
|
||||
header-y += blk_types.h
|
||||
header-y += blkpg.h
|
||||
header-y += blktrace_api.h
|
||||
header-y += bpqether.h
|
||||
header-y += bsg.h
|
||||
header-y += can.h
|
||||
header-y += capability.h
|
||||
header-y += capi.h
|
||||
header-y += cciss_defs.h
|
||||
header-y += cciss_ioctl.h
|
||||
header-y += cdk.h
|
||||
header-y += cdrom.h
|
||||
header-y += cgroupstats.h
|
||||
header-y += chio.h
|
||||
header-y += cm4000_cs.h
|
||||
header-y += cn_proc.h
|
||||
header-y += coda.h
|
||||
header-y += coda_psdev.h
|
||||
header-y += coff.h
|
||||
header-y += comstats.h
|
||||
header-y += connector.h
|
||||
header-y += const.h
|
||||
header-y += cramfs_fs.h
|
||||
header-y += cuda.h
|
||||
header-y += cyclades.h
|
||||
header-y += cycx_cfm.h
|
||||
header-y += dcbnl.h
|
||||
header-y += dccp.h
|
||||
header-y += dlm.h
|
||||
header-y += dlm_device.h
|
||||
header-y += dlm_netlink.h
|
||||
header-y += dlm_plock.h
|
||||
header-y += dlmconstants.h
|
||||
header-y += dm-ioctl.h
|
||||
header-y += dm-log-userspace.h
|
||||
header-y += dn.h
|
||||
header-y += dqblk_xfs.h
|
||||
header-y += edd.h
|
||||
header-y += efs_fs_sb.h
|
||||
header-y += elf-em.h
|
||||
header-y += elf-fdpic.h
|
||||
header-y += elf.h
|
||||
header-y += elfcore.h
|
||||
header-y += errno.h
|
||||
header-y += errqueue.h
|
||||
header-y += ethtool.h
|
||||
header-y += eventpoll.h
|
||||
header-y += fadvise.h
|
||||
header-y += falloc.h
|
||||
header-y += fanotify.h
|
||||
header-y += fb.h
|
||||
header-y += fcntl.h
|
||||
header-y += fd.h
|
||||
header-y += fdreg.h
|
||||
header-y += fib_rules.h
|
||||
header-y += fiemap.h
|
||||
header-y += filter.h
|
||||
header-y += firewire-cdev.h
|
||||
header-y += firewire-constants.h
|
||||
header-y += flat.h
|
||||
header-y += fs.h
|
||||
header-y += fsl_hypervisor.h
|
||||
header-y += fuse.h
|
||||
header-y += futex.h
|
||||
header-y += gameport.h
|
||||
header-y += gen_stats.h
|
||||
header-y += generic_serial.h
|
||||
header-y += genetlink.h
|
||||
header-y += gfs2_ondisk.h
|
||||
header-y += gigaset_dev.h
|
||||
header-y += hdlc.h
|
||||
header-y += hdlcdrv.h
|
||||
header-y += hdreg.h
|
||||
header-y += hid.h
|
||||
header-y += hiddev.h
|
||||
header-y += hidraw.h
|
||||
header-y += hpet.h
|
||||
header-y += hysdn_if.h
|
||||
header-y += i2c-dev.h
|
||||
header-y += i2c.h
|
||||
header-y += i2o-dev.h
|
||||
header-y += i8k.h
|
||||
header-y += icmp.h
|
||||
header-y += icmpv6.h
|
||||
header-y += if.h
|
||||
header-y += if_addr.h
|
||||
header-y += if_addrlabel.h
|
||||
header-y += if_alg.h
|
||||
header-y += if_arcnet.h
|
||||
header-y += if_arp.h
|
||||
header-y += if_bonding.h
|
||||
header-y += if_bridge.h
|
||||
header-y += if_cablemodem.h
|
||||
header-y += if_eql.h
|
||||
header-y += if_ether.h
|
||||
header-y += if_fc.h
|
||||
header-y += if_fddi.h
|
||||
header-y += if_frad.h
|
||||
header-y += if_hippi.h
|
||||
header-y += if_infiniband.h
|
||||
header-y += if_link.h
|
||||
header-y += if_ltalk.h
|
||||
header-y += if_packet.h
|
||||
header-y += if_phonet.h
|
||||
header-y += if_plip.h
|
||||
header-y += if_ppp.h
|
||||
header-y += if_pppol2tp.h
|
||||
header-y += if_pppox.h
|
||||
header-y += if_slip.h
|
||||
header-y += if_team.h
|
||||
header-y += if_tun.h
|
||||
header-y += if_tunnel.h
|
||||
header-y += if_vlan.h
|
||||
header-y += if_x25.h
|
||||
header-y += igmp.h
|
||||
header-y += in.h
|
||||
header-y += in6.h
|
||||
header-y += in_route.h
|
||||
header-y += sock_diag.h
|
||||
header-y += inet_diag.h
|
||||
header-y += unix_diag.h
|
||||
header-y += inotify.h
|
||||
header-y += input.h
|
||||
header-y += ioctl.h
|
||||
header-y += ip.h
|
||||
header-y += ip6_tunnel.h
|
||||
header-y += ip_vs.h
|
||||
header-y += ipc.h
|
||||
header-y += ipmi.h
|
||||
header-y += ipmi_msgdefs.h
|
||||
header-y += ipsec.h
|
||||
header-y += ipv6.h
|
||||
header-y += ipv6_route.h
|
||||
header-y += ipx.h
|
||||
header-y += irda.h
|
||||
header-y += irqnr.h
|
||||
header-y += isdn.h
|
||||
header-y += isdn_divertif.h
|
||||
header-y += isdn_ppp.h
|
||||
header-y += isdnif.h
|
||||
header-y += iso_fs.h
|
||||
header-y += ivtv.h
|
||||
header-y += ivtvfb.h
|
||||
header-y += ixjuser.h
|
||||
header-y += jffs2.h
|
||||
header-y += joystick.h
|
||||
header-y += kd.h
|
||||
header-y += kdev_t.h
|
||||
header-y += kernel.h
|
||||
header-y += kernelcapi.h
|
||||
header-y += kernel-page-flags.h
|
||||
header-y += kexec.h
|
||||
header-y += keyboard.h
|
||||
header-y += keyctl.h
|
||||
header-y += l2tp.h
|
||||
header-y += limits.h
|
||||
header-y += llc.h
|
||||
header-y += loop.h
|
||||
header-y += lp.h
|
||||
header-y += magic.h
|
||||
header-y += major.h
|
||||
header-y += map_to_7segment.h
|
||||
header-y += matroxfb.h
|
||||
header-y += mdio.h
|
||||
header-y += media.h
|
||||
header-y += mei.h
|
||||
header-y += mempolicy.h
|
||||
header-y += meye.h
|
||||
header-y += mii.h
|
||||
header-y += minix_fs.h
|
||||
header-y += mman.h
|
||||
header-y += mmtimer.h
|
||||
header-y += mqueue.h
|
||||
header-y += mroute.h
|
||||
header-y += mroute6.h
|
||||
header-y += msdos_fs.h
|
||||
header-y += msg.h
|
||||
header-y += mtio.h
|
||||
header-y += n_r3964.h
|
||||
header-y += nbd.h
|
||||
header-y += ncp.h
|
||||
header-y += ncp_fs.h
|
||||
header-y += ncp_mount.h
|
||||
header-y += ncp_no.h
|
||||
header-y += neighbour.h
|
||||
header-y += net.h
|
||||
header-y += net_dropmon.h
|
||||
header-y += net_tstamp.h
|
||||
header-y += netdevice.h
|
||||
header-y += netfilter.h
|
||||
header-y += netfilter_arp.h
|
||||
header-y += netfilter_bridge.h
|
||||
header-y += netfilter_decnet.h
|
||||
header-y += netfilter_ipv4.h
|
||||
header-y += netfilter_ipv6.h
|
||||
header-y += netlink.h
|
||||
header-y += netrom.h
|
||||
header-y += nfc.h
|
||||
header-y += nfs.h
|
||||
header-y += nfs2.h
|
||||
header-y += nfs3.h
|
||||
header-y += nfs4.h
|
||||
header-y += nfs4_mount.h
|
||||
header-y += nfs_fs.h
|
||||
header-y += nfs_idmap.h
|
||||
header-y += nfs_mount.h
|
||||
header-y += nfsacl.h
|
||||
header-y += nl80211.h
|
||||
header-y += nubus.h
|
||||
header-y += nvram.h
|
||||
header-y += omap3isp.h
|
||||
header-y += omapfb.h
|
||||
header-y += oom.h
|
||||
header-y += param.h
|
||||
header-y += parport.h
|
||||
header-y += patchkey.h
|
||||
header-y += pci.h
|
||||
header-y += pci_regs.h
|
||||
header-y += perf_event.h
|
||||
header-y += personality.h
|
||||
header-y += pfkeyv2.h
|
||||
header-y += pg.h
|
||||
header-y += phantom.h
|
||||
header-y += phonet.h
|
||||
header-y += pkt_cls.h
|
||||
header-y += pkt_sched.h
|
||||
header-y += pktcdvd.h
|
||||
header-y += pmu.h
|
||||
header-y += poll.h
|
||||
header-y += posix_types.h
|
||||
header-y += ppdev.h
|
||||
header-y += ppp-comp.h
|
||||
header-y += ppp-ioctl.h
|
||||
header-y += ppp_defs.h
|
||||
header-y += pps.h
|
||||
header-y += prctl.h
|
||||
header-y += ptp_clock.h
|
||||
header-y += ptrace.h
|
||||
header-y += qnx4_fs.h
|
||||
header-y += qnxtypes.h
|
||||
header-y += quota.h
|
||||
header-y += radeonfb.h
|
||||
header-y += random.h
|
||||
header-y += raw.h
|
||||
header-y += rds.h
|
||||
header-y += reboot.h
|
||||
header-y += reiserfs_fs.h
|
||||
header-y += reiserfs_xattr.h
|
||||
header-y += resource.h
|
||||
header-y += rfkill.h
|
||||
header-y += romfs_fs.h
|
||||
header-y += rose.h
|
||||
header-y += route.h
|
||||
header-y += rtc.h
|
||||
header-y += rtnetlink.h
|
||||
header-y += scc.h
|
||||
header-y += sched.h
|
||||
header-y += screen_info.h
|
||||
header-y += sdla.h
|
||||
header-y += seccomp.h
|
||||
header-y += securebits.h
|
||||
header-y += selinux_netlink.h
|
||||
header-y += sem.h
|
||||
header-y += serial.h
|
||||
header-y += serial_core.h
|
||||
header-y += serial_reg.h
|
||||
header-y += serio.h
|
||||
header-y += shm.h
|
||||
header-y += signal.h
|
||||
header-y += signalfd.h
|
||||
header-y += snmp.h
|
||||
header-y += socket.h
|
||||
header-y += sockios.h
|
||||
header-y += som.h
|
||||
header-y += sonet.h
|
||||
header-y += sonypi.h
|
||||
header-y += sound.h
|
||||
header-y += soundcard.h
|
||||
header-y += stat.h
|
||||
header-y += stddef.h
|
||||
header-y += string.h
|
||||
header-y += suspend_ioctls.h
|
||||
header-y += swab.h
|
||||
header-y += synclink.h
|
||||
header-y += sysctl.h
|
||||
header-y += sysinfo.h
|
||||
header-y += taskstats.h
|
||||
header-y += tcp.h
|
||||
header-y += telephony.h
|
||||
header-y += termios.h
|
||||
header-y += time.h
|
||||
header-y += times.h
|
||||
header-y += timex.h
|
||||
header-y += tiocl.h
|
||||
header-y += tipc.h
|
||||
header-y += tipc_config.h
|
||||
header-y += toshiba.h
|
||||
header-y += tty.h
|
||||
header-y += types.h
|
||||
header-y += udf_fs_i.h
|
||||
header-y += udp.h
|
||||
header-y += uhid.h
|
||||
header-y += uinput.h
|
||||
header-y += uio.h
|
||||
header-y += ultrasound.h
|
||||
header-y += un.h
|
||||
header-y += unistd.h
|
||||
header-y += usbdevice_fs.h
|
||||
header-y += utime.h
|
||||
header-y += utsname.h
|
||||
header-y += uuid.h
|
||||
header-y += uvcvideo.h
|
||||
header-y += v4l2-common.h
|
||||
header-y += v4l2-dv-timings.h
|
||||
header-y += v4l2-mediabus.h
|
||||
header-y += v4l2-subdev.h
|
||||
header-y += veth.h
|
||||
header-y += vfio.h
|
||||
header-y += vhost.h
|
||||
header-y += videodev2.h
|
||||
header-y += virtio_9p.h
|
||||
header-y += virtio_balloon.h
|
||||
header-y += virtio_blk.h
|
||||
header-y += virtio_config.h
|
||||
header-y += virtio_console.h
|
||||
header-y += virtio_ids.h
|
||||
header-y += virtio_net.h
|
||||
header-y += virtio_pci.h
|
||||
header-y += virtio_ring.h
|
||||
header-y += virtio_rng.h
|
||||
header-y += vt.h
|
||||
header-y += wait.h
|
||||
header-y += wanrouter.h
|
||||
header-y += watchdog.h
|
||||
header-y += wimax.h
|
||||
header-y += wireless.h
|
||||
header-y += x25.h
|
||||
header-y += xattr.h
|
||||
header-y += xfrm.h
|
||||
|
|
|
|||
|
|
@ -1,278 +1,84 @@
|
|||
#ifndef __A_OUT_GNU_H__
|
||||
#define __A_OUT_GNU_H__
|
||||
|
||||
#define __GNU_EXEC_MACROS__
|
||||
|
||||
#ifndef __STRUCT_EXEC_OVERRIDE__
|
||||
|
||||
#include <asm/a.out.h>
|
||||
|
||||
#endif /* __STRUCT_EXEC_OVERRIDE__ */
|
||||
#include <uapi/linux/a.out.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/* these go in the N_MACHTYPE field */
|
||||
enum machine_type {
|
||||
#if defined (M_OLDSUN2)
|
||||
M__OLDSUN2 = M_OLDSUN2,
|
||||
#else
|
||||
M_OLDSUN2 = 0,
|
||||
#endif
|
||||
#if defined (M_68010)
|
||||
M__68010 = M_68010,
|
||||
#else
|
||||
M_68010 = 1,
|
||||
#endif
|
||||
#if defined (M_68020)
|
||||
M__68020 = M_68020,
|
||||
#else
|
||||
M_68020 = 2,
|
||||
#endif
|
||||
#if defined (M_SPARC)
|
||||
M__SPARC = M_SPARC,
|
||||
#else
|
||||
M_SPARC = 3,
|
||||
#endif
|
||||
/* skip a bunch so we don't run into any of sun's numbers */
|
||||
M_386 = 100,
|
||||
M_MIPS1 = 151, /* MIPS R3000/R3000 binary */
|
||||
M_MIPS2 = 152 /* MIPS R6000/R4000 binary */
|
||||
};
|
||||
|
||||
#if !defined (N_MAGIC)
|
||||
#define N_MAGIC(exec) ((exec).a_info & 0xffff)
|
||||
#endif
|
||||
#define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff))
|
||||
#define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff)
|
||||
#define N_SET_INFO(exec, magic, type, flags) \
|
||||
((exec).a_info = ((magic) & 0xffff) \
|
||||
| (((int)(type) & 0xff) << 16) \
|
||||
| (((flags) & 0xff) << 24))
|
||||
#define N_SET_MAGIC(exec, magic) \
|
||||
((exec).a_info = (((exec).a_info & 0xffff0000) | ((magic) & 0xffff)))
|
||||
|
||||
#define N_SET_MACHTYPE(exec, machtype) \
|
||||
((exec).a_info = \
|
||||
((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16))
|
||||
|
||||
#define N_SET_FLAGS(exec, flags) \
|
||||
((exec).a_info = \
|
||||
((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24))
|
||||
|
||||
/* Code indicating object file or impure executable. */
|
||||
#define OMAGIC 0407
|
||||
/* Code indicating pure executable. */
|
||||
#define NMAGIC 0410
|
||||
/* Code indicating demand-paged executable. */
|
||||
#define ZMAGIC 0413
|
||||
/* This indicates a demand-paged executable with the header in the text.
|
||||
The first page is unmapped to help trap NULL pointer references */
|
||||
#define QMAGIC 0314
|
||||
|
||||
/* Code indicating core file. */
|
||||
#define CMAGIC 0421
|
||||
|
||||
#if !defined (N_BADMAG)
|
||||
#define N_BADMAG(x) (N_MAGIC(x) != OMAGIC \
|
||||
&& N_MAGIC(x) != NMAGIC \
|
||||
&& N_MAGIC(x) != ZMAGIC \
|
||||
&& N_MAGIC(x) != QMAGIC)
|
||||
#endif
|
||||
|
||||
#define _N_HDROFF(x) (1024 - sizeof (struct exec))
|
||||
|
||||
#if !defined (N_TXTOFF)
|
||||
#define N_TXTOFF(x) \
|
||||
(N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) : \
|
||||
(N_MAGIC(x) == QMAGIC ? 0 : sizeof (struct exec)))
|
||||
#endif
|
||||
|
||||
#if !defined (N_DATOFF)
|
||||
#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text)
|
||||
#endif
|
||||
|
||||
#if !defined (N_TRELOFF)
|
||||
#define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
|
||||
#endif
|
||||
|
||||
#if !defined (N_DRELOFF)
|
||||
#define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x))
|
||||
#endif
|
||||
|
||||
#if !defined (N_SYMOFF)
|
||||
#define N_SYMOFF(x) (N_DRELOFF(x) + N_DRSIZE(x))
|
||||
#endif
|
||||
|
||||
#if !defined (N_STROFF)
|
||||
#define N_STROFF(x) (N_SYMOFF(x) + N_SYMSIZE(x))
|
||||
#endif
|
||||
|
||||
/* Address of text segment in memory after it is loaded. */
|
||||
#if !defined (N_TXTADDR)
|
||||
#define N_TXTADDR(x) (N_MAGIC(x) == QMAGIC ? PAGE_SIZE : 0)
|
||||
#endif
|
||||
|
||||
/* Address of data segment in memory after it is loaded.
|
||||
Note that it is up to you to define SEGMENT_SIZE
|
||||
on machines not listed here. */
|
||||
#if defined(vax) || defined(hp300) || defined(pyr)
|
||||
#define SEGMENT_SIZE page_size
|
||||
#endif
|
||||
#ifdef sony
|
||||
#define SEGMENT_SIZE 0x2000
|
||||
#endif /* Sony. */
|
||||
#ifdef is68k
|
||||
#define SEGMENT_SIZE 0x20000
|
||||
#endif
|
||||
#if defined(m68k) && defined(PORTAR)
|
||||
#define PAGE_SIZE 0x400
|
||||
#define SEGMENT_SIZE PAGE_SIZE
|
||||
#endif
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __KERNEL__
|
||||
#include <asm/page.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__mc68000__)
|
||||
#define SEGMENT_SIZE 1024
|
||||
#else
|
||||
#ifndef SEGMENT_SIZE
|
||||
#ifdef __KERNEL__
|
||||
#define SEGMENT_SIZE PAGE_SIZE
|
||||
#else
|
||||
#define SEGMENT_SIZE getpagesize()
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _N_SEGMENT_ROUND(x) ALIGN(x, SEGMENT_SIZE)
|
||||
|
||||
#define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text)
|
||||
|
||||
#ifndef N_DATADDR
|
||||
#define N_DATADDR(x) \
|
||||
(N_MAGIC(x)==OMAGIC? (_N_TXTENDADDR(x)) \
|
||||
: (_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))
|
||||
#endif
|
||||
|
||||
/* Address of bss segment in memory after it is loaded. */
|
||||
#if !defined (N_BSSADDR)
|
||||
#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data)
|
||||
#endif
|
||||
|
||||
#if !defined (N_NLIST_DECLARED)
|
||||
struct nlist {
|
||||
union {
|
||||
char *n_name;
|
||||
struct nlist *n_next;
|
||||
long n_strx;
|
||||
} n_un;
|
||||
unsigned char n_type;
|
||||
char n_other;
|
||||
short n_desc;
|
||||
unsigned long n_value;
|
||||
};
|
||||
#endif /* no N_NLIST_DECLARED. */
|
||||
|
||||
#if !defined (N_UNDF)
|
||||
#define N_UNDF 0
|
||||
#endif
|
||||
#if !defined (N_ABS)
|
||||
#define N_ABS 2
|
||||
#endif
|
||||
#if !defined (N_TEXT)
|
||||
#define N_TEXT 4
|
||||
#endif
|
||||
#if !defined (N_DATA)
|
||||
#define N_DATA 6
|
||||
#endif
|
||||
#if !defined (N_BSS)
|
||||
#define N_BSS 8
|
||||
#endif
|
||||
#if !defined (N_FN)
|
||||
#define N_FN 15
|
||||
#endif
|
||||
|
||||
#if !defined (N_EXT)
|
||||
#define N_EXT 1
|
||||
#endif
|
||||
#if !defined (N_TYPE)
|
||||
#define N_TYPE 036
|
||||
#endif
|
||||
#if !defined (N_STAB)
|
||||
#define N_STAB 0340
|
||||
#endif
|
||||
|
||||
/* The following type indicates the definition of a symbol as being
|
||||
an indirect reference to another symbol. The other symbol
|
||||
appears as an undefined reference, immediately following this symbol.
|
||||
|
||||
Indirection is asymmetrical. The other symbol's value will be used
|
||||
to satisfy requests for the indirect symbol, but not vice versa.
|
||||
If the other symbol does not have a definition, libraries will
|
||||
be searched to find a definition. */
|
||||
#define N_INDR 0xa
|
||||
|
||||
/* The following symbols refer to set elements.
|
||||
All the N_SET[ATDB] symbols with the same name form one set.
|
||||
Space is allocated for the set in the text section, and each set
|
||||
element's value is stored into one word of the space.
|
||||
The first word of the space is the length of the set (number of elements).
|
||||
|
||||
The address of the set is made into an N_SETV symbol
|
||||
whose name is the same as the name of the set.
|
||||
This symbol acts like a N_DATA global symbol
|
||||
in that it can satisfy undefined external references. */
|
||||
|
||||
/* These appear as input to LD, in a .o file. */
|
||||
#define N_SETA 0x14 /* Absolute set element symbol */
|
||||
#define N_SETT 0x16 /* Text set element symbol */
|
||||
#define N_SETD 0x18 /* Data set element symbol */
|
||||
#define N_SETB 0x1A /* Bss set element symbol */
|
||||
|
||||
/* This is output from LD. */
|
||||
#define N_SETV 0x1C /* Pointer to set vector in data area. */
|
||||
|
||||
#if !defined (N_RELOCATION_INFO_DECLARED)
|
||||
/* This structure describes a single relocation to be performed.
|
||||
The text-relocation section of the file is a vector of these structures,
|
||||
all of which apply to the text section.
|
||||
Likewise, the data-relocation section applies to the data section. */
|
||||
|
||||
struct relocation_info
|
||||
{
|
||||
/* Address (within segment) to be relocated. */
|
||||
int r_address;
|
||||
/* The meaning of r_symbolnum depends on r_extern. */
|
||||
unsigned int r_symbolnum:24;
|
||||
/* Nonzero means value is a pc-relative offset
|
||||
and it should be relocated for changes in its own address
|
||||
as well as for changes in the symbol or section specified. */
|
||||
unsigned int r_pcrel:1;
|
||||
/* Length (as exponent of 2) of the field to be relocated.
|
||||
Thus, a value of 2 indicates 1<<2 bytes. */
|
||||
unsigned int r_length:2;
|
||||
/* 1 => relocate with value of symbol.
|
||||
r_symbolnum is the index of the symbol
|
||||
in file's the symbol table.
|
||||
0 => relocate with the address of a segment.
|
||||
r_symbolnum is N_TEXT, N_DATA, N_BSS or N_ABS
|
||||
(the N_EXT bit may be set also, but signifies nothing). */
|
||||
unsigned int r_extern:1;
|
||||
/* Four bits that aren't used, but when writing an object file
|
||||
it is desirable to clear them. */
|
||||
#ifdef NS32K
|
||||
unsigned r_bsr:1;
|
||||
unsigned r_disp:1;
|
||||
unsigned r_pad:2;
|
||||
#else
|
||||
unsigned int r_pad:4;
|
||||
#endif
|
||||
};
|
||||
#endif /* no N_RELOCATION_INFO_DECLARED. */
|
||||
|
||||
#endif /*__ASSEMBLY__ */
|
||||
#endif /* __A_OUT_GNU_H__ */
|
||||
|
|
|
|||
|
|
@ -11,109 +11,11 @@
|
|||
* Copyright (C) 1995 - 1997 Marco van Wieringen - ELM Consultancy B.V.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_ACCT_H
|
||||
#define _LINUX_ACCT_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <uapi/linux/acct.h>
|
||||
|
||||
#include <asm/param.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
/*
|
||||
* comp_t is a 16-bit "floating" point number with a 3-bit base 8
|
||||
* exponent and a 13-bit fraction.
|
||||
* comp2_t is 24-bit with 5-bit base 2 exponent and 20 bit fraction
|
||||
* (leading 1 not stored).
|
||||
* See linux/kernel/acct.c for the specific encoding systems used.
|
||||
*/
|
||||
|
||||
typedef __u16 comp_t;
|
||||
typedef __u32 comp2_t;
|
||||
|
||||
/*
|
||||
* accounting file record
|
||||
*
|
||||
* This structure contains all of the information written out to the
|
||||
* process accounting file whenever a process exits.
|
||||
*/
|
||||
|
||||
#define ACCT_COMM 16
|
||||
|
||||
struct acct
|
||||
{
|
||||
char ac_flag; /* Flags */
|
||||
char ac_version; /* Always set to ACCT_VERSION */
|
||||
/* for binary compatibility back until 2.0 */
|
||||
__u16 ac_uid16; /* LSB of Real User ID */
|
||||
__u16 ac_gid16; /* LSB of Real Group ID */
|
||||
__u16 ac_tty; /* Control Terminal */
|
||||
__u32 ac_btime; /* Process Creation Time */
|
||||
comp_t ac_utime; /* User Time */
|
||||
comp_t ac_stime; /* System Time */
|
||||
comp_t ac_etime; /* Elapsed Time */
|
||||
comp_t ac_mem; /* Average Memory Usage */
|
||||
comp_t ac_io; /* Chars Transferred */
|
||||
comp_t ac_rw; /* Blocks Read or Written */
|
||||
comp_t ac_minflt; /* Minor Pagefaults */
|
||||
comp_t ac_majflt; /* Major Pagefaults */
|
||||
comp_t ac_swaps; /* Number of Swaps */
|
||||
/* m68k had no padding here. */
|
||||
#if !defined(CONFIG_M68K) || !defined(__KERNEL__)
|
||||
__u16 ac_ahz; /* AHZ */
|
||||
#endif
|
||||
__u32 ac_exitcode; /* Exitcode */
|
||||
char ac_comm[ACCT_COMM + 1]; /* Command Name */
|
||||
__u8 ac_etime_hi; /* Elapsed Time MSB */
|
||||
__u16 ac_etime_lo; /* Elapsed Time LSB */
|
||||
__u32 ac_uid; /* Real User ID */
|
||||
__u32 ac_gid; /* Real Group ID */
|
||||
};
|
||||
|
||||
struct acct_v3
|
||||
{
|
||||
char ac_flag; /* Flags */
|
||||
char ac_version; /* Always set to ACCT_VERSION */
|
||||
__u16 ac_tty; /* Control Terminal */
|
||||
__u32 ac_exitcode; /* Exitcode */
|
||||
__u32 ac_uid; /* Real User ID */
|
||||
__u32 ac_gid; /* Real Group ID */
|
||||
__u32 ac_pid; /* Process ID */
|
||||
__u32 ac_ppid; /* Parent Process ID */
|
||||
__u32 ac_btime; /* Process Creation Time */
|
||||
#ifdef __KERNEL__
|
||||
__u32 ac_etime; /* Elapsed Time */
|
||||
#else
|
||||
float ac_etime; /* Elapsed Time */
|
||||
#endif
|
||||
comp_t ac_utime; /* User Time */
|
||||
comp_t ac_stime; /* System Time */
|
||||
comp_t ac_mem; /* Average Memory Usage */
|
||||
comp_t ac_io; /* Chars Transferred */
|
||||
comp_t ac_rw; /* Blocks Read or Written */
|
||||
comp_t ac_minflt; /* Minor Pagefaults */
|
||||
comp_t ac_majflt; /* Major Pagefaults */
|
||||
comp_t ac_swaps; /* Number of Swaps */
|
||||
char ac_comm[ACCT_COMM]; /* Command Name */
|
||||
};
|
||||
|
||||
/*
|
||||
* accounting flags
|
||||
*/
|
||||
/* bit set when the process ... */
|
||||
#define AFORK 0x01 /* ... executed fork, but did not exec */
|
||||
#define ASU 0x02 /* ... used super-user privileges */
|
||||
#define ACOMPAT 0x04 /* ... used compatibility mode (VAX only not used) */
|
||||
#define ACORE 0x08 /* ... dumped core */
|
||||
#define AXSIG 0x10 /* ... was killed by a signal */
|
||||
|
||||
#ifdef __BIG_ENDIAN
|
||||
#define ACCT_BYTEORDER 0x80 /* accounting file is big endian */
|
||||
#else
|
||||
#define ACCT_BYTEORDER 0x00 /* accounting file is little endian */
|
||||
#endif
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
|
||||
#ifdef CONFIG_BSD_PROCESS_ACCT
|
||||
|
|
@ -163,12 +65,6 @@ typedef struct acct_v3 acct_t;
|
|||
typedef struct acct acct_t;
|
||||
#endif
|
||||
|
||||
#else
|
||||
#define ACCT_VERSION 2
|
||||
#define AHZ (HZ)
|
||||
#endif /* __KERNEL */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/jiffies.h>
|
||||
/*
|
||||
* Yet another set of HZ to *HZ helper functions.
|
||||
|
|
@ -210,6 +106,4 @@ static inline u64 nsec_to_AHZ(u64 x)
|
|||
return x;
|
||||
}
|
||||
|
||||
#endif /* __KERNEL */
|
||||
|
||||
#endif /* _LINUX_ACCT_H */
|
||||
|
|
|
|||
|
|
@ -138,9 +138,9 @@ void acpi_penalize_isa_irq(int irq, int active);
|
|||
void acpi_pci_irq_disable (struct pci_dev *dev);
|
||||
|
||||
struct acpi_pci_driver {
|
||||
struct acpi_pci_driver *next;
|
||||
int (*add)(acpi_handle handle);
|
||||
void (*remove)(acpi_handle handle);
|
||||
struct list_head node;
|
||||
int (*add)(struct acpi_pci_root *root);
|
||||
void (*remove)(struct acpi_pci_root *root);
|
||||
};
|
||||
|
||||
int acpi_pci_register_driver(struct acpi_pci_driver *driver);
|
||||
|
|
|
|||
|
|
@ -4,43 +4,8 @@
|
|||
#ifndef __ADB_H
|
||||
#define __ADB_H
|
||||
|
||||
/* ADB commands */
|
||||
#define ADB_BUSRESET 0
|
||||
#define ADB_FLUSH(id) (0x01 | ((id) << 4))
|
||||
#define ADB_WRITEREG(id, reg) (0x08 | (reg) | ((id) << 4))
|
||||
#define ADB_READREG(id, reg) (0x0C | (reg) | ((id) << 4))
|
||||
#include <uapi/linux/adb.h>
|
||||
|
||||
/* ADB default device IDs (upper 4 bits of ADB command byte) */
|
||||
#define ADB_DONGLE 1 /* "software execution control" devices */
|
||||
#define ADB_KEYBOARD 2
|
||||
#define ADB_MOUSE 3
|
||||
#define ADB_TABLET 4
|
||||
#define ADB_MODEM 5
|
||||
#define ADB_MISC 7 /* maybe a monitor */
|
||||
|
||||
#define ADB_RET_OK 0
|
||||
#define ADB_RET_TIMEOUT 3
|
||||
|
||||
/* The kind of ADB request. The controller may emulate some
|
||||
or all of those CUDA/PMU packet kinds */
|
||||
#define ADB_PACKET 0
|
||||
#define CUDA_PACKET 1
|
||||
#define ERROR_PACKET 2
|
||||
#define TIMER_PACKET 3
|
||||
#define POWER_PACKET 4
|
||||
#define MACIIC_PACKET 5
|
||||
#define PMU_PACKET 6
|
||||
#define ADB_QUERY 7
|
||||
|
||||
/* ADB queries */
|
||||
|
||||
/* ADB_QUERY_GETDEVINFO
|
||||
* Query ADB slot for device presence
|
||||
* data[2] = id, rep[0] = orig addr, rep[1] = handler_id
|
||||
*/
|
||||
#define ADB_QUERY_GETDEVINFO 1
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
struct adb_request {
|
||||
unsigned char data[32];
|
||||
|
|
@ -98,6 +63,4 @@ int adb_reset_bus(void);
|
|||
int adb_try_handler_change(int address, int new_id);
|
||||
int adb_get_infos(int address, int *original_address, int *handler_id);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __ADB_H */
|
||||
|
|
|
|||
|
|
@ -1,46 +1,8 @@
|
|||
#ifndef _ADFS_FS_H
|
||||
#define _ADFS_FS_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/magic.h>
|
||||
#include <uapi/linux/adfs_fs.h>
|
||||
|
||||
/*
|
||||
* Disc Record at disc address 0xc00
|
||||
*/
|
||||
struct adfs_discrecord {
|
||||
__u8 log2secsize;
|
||||
__u8 secspertrack;
|
||||
__u8 heads;
|
||||
__u8 density;
|
||||
__u8 idlen;
|
||||
__u8 log2bpmb;
|
||||
__u8 skew;
|
||||
__u8 bootoption;
|
||||
__u8 lowsector;
|
||||
__u8 nzones;
|
||||
__le16 zone_spare;
|
||||
__le32 root;
|
||||
__le32 disc_size;
|
||||
__le16 disc_id;
|
||||
__u8 disc_name[10];
|
||||
__le32 disc_type;
|
||||
__le32 disc_size_high;
|
||||
__u8 log2sharesize:4;
|
||||
__u8 unused40:4;
|
||||
__u8 big_flag:1;
|
||||
__u8 unused41:1;
|
||||
__u8 nzones_high;
|
||||
__le32 format_version;
|
||||
__le32 root_size;
|
||||
__u8 unused52[60 - 52];
|
||||
};
|
||||
|
||||
#define ADFS_DISCRECORD (0xc00)
|
||||
#define ADFS_DR_OFFSET (0x1c0)
|
||||
#define ADFS_DR_SIZE 60
|
||||
#define ADFS_DR_SIZE_BITS (ADFS_DR_SIZE << 3)
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/*
|
||||
* Calculate the boot block checksum on an ADFS drive. Note that this will
|
||||
* appear to be correct if the sector contains all zeros, so also check that
|
||||
|
|
@ -59,5 +21,3 @@ static inline int adfs_checkbblk(unsigned char *ptr)
|
|||
return (result & 0xff) != ptr[511];
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -23,94 +23,12 @@
|
|||
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _AGP_H
|
||||
#define _AGP_H 1
|
||||
|
||||
#define AGPIOC_BASE 'A'
|
||||
#define AGPIOC_INFO _IOR (AGPIOC_BASE, 0, struct agp_info*)
|
||||
#define AGPIOC_ACQUIRE _IO (AGPIOC_BASE, 1)
|
||||
#define AGPIOC_RELEASE _IO (AGPIOC_BASE, 2)
|
||||
#define AGPIOC_SETUP _IOW (AGPIOC_BASE, 3, struct agp_setup*)
|
||||
#define AGPIOC_RESERVE _IOW (AGPIOC_BASE, 4, struct agp_region*)
|
||||
#define AGPIOC_PROTECT _IOW (AGPIOC_BASE, 5, struct agp_region*)
|
||||
#define AGPIOC_ALLOCATE _IOWR(AGPIOC_BASE, 6, struct agp_allocate*)
|
||||
#define AGPIOC_DEALLOCATE _IOW (AGPIOC_BASE, 7, int)
|
||||
#define AGPIOC_BIND _IOW (AGPIOC_BASE, 8, struct agp_bind*)
|
||||
#define AGPIOC_UNBIND _IOW (AGPIOC_BASE, 9, struct agp_unbind*)
|
||||
#define AGPIOC_CHIPSET_FLUSH _IO (AGPIOC_BASE, 10)
|
||||
|
||||
#define AGP_DEVICE "/dev/agpgart"
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#include <linux/types.h>
|
||||
|
||||
struct agp_version {
|
||||
__u16 major;
|
||||
__u16 minor;
|
||||
};
|
||||
|
||||
typedef struct _agp_info {
|
||||
struct agp_version version; /* version of the driver */
|
||||
__u32 bridge_id; /* bridge vendor/device */
|
||||
__u32 agp_mode; /* mode info of bridge */
|
||||
unsigned long aper_base;/* base of aperture */
|
||||
size_t aper_size; /* size of aperture */
|
||||
size_t pg_total; /* max pages (swap + system) */
|
||||
size_t pg_system; /* max pages (system) */
|
||||
size_t pg_used; /* current pages used */
|
||||
} agp_info;
|
||||
|
||||
typedef struct _agp_setup {
|
||||
__u32 agp_mode; /* mode info of bridge */
|
||||
} agp_setup;
|
||||
|
||||
/*
|
||||
* The "prot" down below needs still a "sleep" flag somehow ...
|
||||
*/
|
||||
typedef struct _agp_segment {
|
||||
__kernel_off_t pg_start; /* starting page to populate */
|
||||
__kernel_size_t pg_count; /* number of pages */
|
||||
int prot; /* prot flags for mmap */
|
||||
} agp_segment;
|
||||
|
||||
typedef struct _agp_region {
|
||||
__kernel_pid_t pid; /* pid of process */
|
||||
__kernel_size_t seg_count; /* number of segments */
|
||||
struct _agp_segment *seg_list;
|
||||
} agp_region;
|
||||
|
||||
typedef struct _agp_allocate {
|
||||
int key; /* tag of allocation */
|
||||
__kernel_size_t pg_count;/* number of pages */
|
||||
__u32 type; /* 0 == normal, other devspec */
|
||||
__u32 physical; /* device specific (some devices
|
||||
* need a phys address of the
|
||||
* actual page behind the gatt
|
||||
* table) */
|
||||
} agp_allocate;
|
||||
|
||||
typedef struct _agp_bind {
|
||||
int key; /* tag of allocation */
|
||||
__kernel_off_t pg_start;/* starting page to populate */
|
||||
} agp_bind;
|
||||
|
||||
typedef struct _agp_unbind {
|
||||
int key; /* tag of allocation */
|
||||
__u32 priority; /* priority for paging out */
|
||||
} agp_unbind;
|
||||
|
||||
#else /* __KERNEL__ */
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/agp_backend.h>
|
||||
#include <uapi/linux/agpgart.h>
|
||||
|
||||
#define AGPGART_MINOR 175
|
||||
|
||||
|
|
@ -209,6 +127,4 @@ struct agp_front_data {
|
|||
bool backend_acquired;
|
||||
};
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _AGP_H */
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ enum alarmtimer_restart {
|
|||
|
||||
#define ALARMTIMER_STATE_INACTIVE 0x00
|
||||
#define ALARMTIMER_STATE_ENQUEUED 0x01
|
||||
#define ALARMTIMER_STATE_CALLBACK 0x02
|
||||
|
||||
/**
|
||||
* struct alarm - Alarm timer structure
|
||||
|
|
@ -35,6 +34,7 @@ enum alarmtimer_restart {
|
|||
*/
|
||||
struct alarm {
|
||||
struct timerqueue_node node;
|
||||
struct hrtimer timer;
|
||||
enum alarmtimer_restart (*function)(struct alarm *, ktime_t now);
|
||||
enum alarmtimer_type type;
|
||||
int state;
|
||||
|
|
@ -43,39 +43,12 @@ struct alarm {
|
|||
|
||||
void alarm_init(struct alarm *alarm, enum alarmtimer_type type,
|
||||
enum alarmtimer_restart (*function)(struct alarm *, ktime_t));
|
||||
void alarm_start(struct alarm *alarm, ktime_t start);
|
||||
int alarm_start(struct alarm *alarm, ktime_t start);
|
||||
int alarm_try_to_cancel(struct alarm *alarm);
|
||||
int alarm_cancel(struct alarm *alarm);
|
||||
|
||||
u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval);
|
||||
|
||||
/*
|
||||
* A alarmtimer is active, when it is enqueued into timerqueue or the
|
||||
* callback function is running.
|
||||
*/
|
||||
static inline int alarmtimer_active(const struct alarm *timer)
|
||||
{
|
||||
return timer->state != ALARMTIMER_STATE_INACTIVE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper function to check, whether the timer is on one of the queues
|
||||
*/
|
||||
static inline int alarmtimer_is_queued(struct alarm *timer)
|
||||
{
|
||||
return timer->state & ALARMTIMER_STATE_ENQUEUED;
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper function to check, whether the timer is running the callback
|
||||
* function
|
||||
*/
|
||||
static inline int alarmtimer_callback_running(struct alarm *timer)
|
||||
{
|
||||
return timer->state & ALARMTIMER_STATE_CALLBACK;
|
||||
}
|
||||
|
||||
|
||||
/* Provide way to access the rtc device being used by alarmtimers */
|
||||
struct rtc_device *alarmtimer_get_rtcdev(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -244,6 +244,7 @@ struct dma_chan;
|
|||
* indicates no delay and the device will be suspended immediately.
|
||||
* @rt: indicates the controller should run the message pump with realtime
|
||||
* priority to minimise the transfer latency on the bus.
|
||||
* @chipselects: list of <num_chipselects> chip select gpios
|
||||
*/
|
||||
struct pl022_ssp_controller {
|
||||
u16 bus_id;
|
||||
|
|
@ -254,6 +255,7 @@ struct pl022_ssp_controller {
|
|||
void *dma_tx_param;
|
||||
int autosuspend_delay;
|
||||
bool rt;
|
||||
int *chipselects;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -205,7 +205,6 @@ struct amba_pl011_data {
|
|||
void *dma_tx_param;
|
||||
void (*init) (void);
|
||||
void (*exit) (void);
|
||||
void (*reset) (void);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
#ifndef _LINUX_APM_H
|
||||
#define _LINUX_APM_H
|
||||
|
||||
/*
|
||||
* Include file for the interface to an APM BIOS
|
||||
* Copyright 1994-2001 Stephen Rothwell (sfr@canb.auug.org.au)
|
||||
|
|
@ -15,25 +12,11 @@
|
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*/
|
||||
#ifndef _LINUX_APM_H
|
||||
#define _LINUX_APM_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <uapi/linux/apm_bios.h>
|
||||
|
||||
typedef unsigned short apm_event_t;
|
||||
typedef unsigned short apm_eventinfo_t;
|
||||
|
||||
struct apm_bios_info {
|
||||
__u16 version;
|
||||
__u16 cseg;
|
||||
__u32 offset;
|
||||
__u16 cseg_16;
|
||||
__u16 dseg;
|
||||
__u16 flags;
|
||||
__u16 cseg_len;
|
||||
__u16 cseg_16_len;
|
||||
__u16 dseg_len;
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define APM_CS (GDT_ENTRY_APMBIOS_BASE * 8)
|
||||
#define APM_CS_16 (APM_CS + 8)
|
||||
|
|
@ -110,111 +93,9 @@ struct apm_info {
|
|||
*/
|
||||
extern struct apm_info apm_info;
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
/*
|
||||
* Power states
|
||||
*/
|
||||
#define APM_STATE_READY 0x0000
|
||||
#define APM_STATE_STANDBY 0x0001
|
||||
#define APM_STATE_SUSPEND 0x0002
|
||||
#define APM_STATE_OFF 0x0003
|
||||
#define APM_STATE_BUSY 0x0004
|
||||
#define APM_STATE_REJECT 0x0005
|
||||
#define APM_STATE_OEM_SYS 0x0020
|
||||
#define APM_STATE_OEM_DEV 0x0040
|
||||
|
||||
#define APM_STATE_DISABLE 0x0000
|
||||
#define APM_STATE_ENABLE 0x0001
|
||||
|
||||
#define APM_STATE_DISENGAGE 0x0000
|
||||
#define APM_STATE_ENGAGE 0x0001
|
||||
|
||||
/*
|
||||
* Events (results of Get PM Event)
|
||||
*/
|
||||
#define APM_SYS_STANDBY 0x0001
|
||||
#define APM_SYS_SUSPEND 0x0002
|
||||
#define APM_NORMAL_RESUME 0x0003
|
||||
#define APM_CRITICAL_RESUME 0x0004
|
||||
#define APM_LOW_BATTERY 0x0005
|
||||
#define APM_POWER_STATUS_CHANGE 0x0006
|
||||
#define APM_UPDATE_TIME 0x0007
|
||||
#define APM_CRITICAL_SUSPEND 0x0008
|
||||
#define APM_USER_STANDBY 0x0009
|
||||
#define APM_USER_SUSPEND 0x000a
|
||||
#define APM_STANDBY_RESUME 0x000b
|
||||
#define APM_CAPABILITY_CHANGE 0x000c
|
||||
|
||||
/*
|
||||
* Error codes
|
||||
*/
|
||||
#define APM_SUCCESS 0x00
|
||||
#define APM_DISABLED 0x01
|
||||
#define APM_CONNECTED 0x02
|
||||
#define APM_NOT_CONNECTED 0x03
|
||||
#define APM_16_CONNECTED 0x05
|
||||
#define APM_16_UNSUPPORTED 0x06
|
||||
#define APM_32_CONNECTED 0x07
|
||||
#define APM_32_UNSUPPORTED 0x08
|
||||
#define APM_BAD_DEVICE 0x09
|
||||
#define APM_BAD_PARAM 0x0a
|
||||
#define APM_NOT_ENGAGED 0x0b
|
||||
#define APM_BAD_FUNCTION 0x0c
|
||||
#define APM_RESUME_DISABLED 0x0d
|
||||
#define APM_NO_ERROR 0x53
|
||||
#define APM_BAD_STATE 0x60
|
||||
#define APM_NO_EVENTS 0x80
|
||||
#define APM_NOT_PRESENT 0x86
|
||||
|
||||
/*
|
||||
* APM Device IDs
|
||||
*/
|
||||
#define APM_DEVICE_BIOS 0x0000
|
||||
#define APM_DEVICE_ALL 0x0001
|
||||
#define APM_DEVICE_DISPLAY 0x0100
|
||||
#define APM_DEVICE_STORAGE 0x0200
|
||||
#define APM_DEVICE_PARALLEL 0x0300
|
||||
#define APM_DEVICE_SERIAL 0x0400
|
||||
#define APM_DEVICE_NETWORK 0x0500
|
||||
#define APM_DEVICE_PCMCIA 0x0600
|
||||
#define APM_DEVICE_BATTERY 0x8000
|
||||
#define APM_DEVICE_OEM 0xe000
|
||||
#define APM_DEVICE_OLD_ALL 0xffff
|
||||
#define APM_DEVICE_CLASS 0x00ff
|
||||
#define APM_DEVICE_MASK 0xff00
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/*
|
||||
* This is the "All Devices" ID communicated to the BIOS
|
||||
*/
|
||||
#define APM_DEVICE_BALL ((apm_info.connection_version > 0x0100) ? \
|
||||
APM_DEVICE_ALL : APM_DEVICE_OLD_ALL)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Battery status
|
||||
*/
|
||||
#define APM_MAX_BATTERIES 2
|
||||
|
||||
/*
|
||||
* APM defined capability bit flags
|
||||
*/
|
||||
#define APM_CAP_GLOBAL_STANDBY 0x0001
|
||||
#define APM_CAP_GLOBAL_SUSPEND 0x0002
|
||||
#define APM_CAP_RESUME_STANDBY_TIMER 0x0004 /* Timer resume from standby */
|
||||
#define APM_CAP_RESUME_SUSPEND_TIMER 0x0008 /* Timer resume from suspend */
|
||||
#define APM_CAP_RESUME_STANDBY_RING 0x0010 /* Resume on Ring fr standby */
|
||||
#define APM_CAP_RESUME_SUSPEND_RING 0x0020 /* Resume on Ring fr suspend */
|
||||
#define APM_CAP_RESUME_STANDBY_PCMCIA 0x0040 /* Resume on PCMCIA Ring */
|
||||
#define APM_CAP_RESUME_SUSPEND_PCMCIA 0x0080 /* Resume on PCMCIA Ring */
|
||||
|
||||
/*
|
||||
* ioctl operations
|
||||
*/
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
#define APM_IOC_STANDBY _IO('A', 1)
|
||||
#define APM_IOC_SUSPEND _IO('A', 2)
|
||||
|
||||
#endif /* LINUX_APM_H */
|
||||
|
|
|
|||
67
include/linux/asn1.h
Normal file
67
include/linux/asn1.h
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/* ASN.1 BER/DER/CER encoding definitions
|
||||
*
|
||||
* Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
|
||||
* Written by David Howells (dhowells@redhat.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public Licence
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the Licence, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_ASN1_H
|
||||
#define _LINUX_ASN1_H
|
||||
|
||||
/* Class */
|
||||
enum asn1_class {
|
||||
ASN1_UNIV = 0, /* Universal */
|
||||
ASN1_APPL = 1, /* Application */
|
||||
ASN1_CONT = 2, /* Context */
|
||||
ASN1_PRIV = 3 /* Private */
|
||||
};
|
||||
#define ASN1_CLASS_BITS 0xc0
|
||||
|
||||
|
||||
enum asn1_method {
|
||||
ASN1_PRIM = 0, /* Primitive */
|
||||
ASN1_CONS = 1 /* Constructed */
|
||||
};
|
||||
#define ASN1_CONS_BIT 0x20
|
||||
|
||||
/* Tag */
|
||||
enum asn1_tag {
|
||||
ASN1_EOC = 0, /* End Of Contents or N/A */
|
||||
ASN1_BOOL = 1, /* Boolean */
|
||||
ASN1_INT = 2, /* Integer */
|
||||
ASN1_BTS = 3, /* Bit String */
|
||||
ASN1_OTS = 4, /* Octet String */
|
||||
ASN1_NULL = 5, /* Null */
|
||||
ASN1_OID = 6, /* Object Identifier */
|
||||
ASN1_ODE = 7, /* Object Description */
|
||||
ASN1_EXT = 8, /* External */
|
||||
ASN1_REAL = 9, /* Real float */
|
||||
ASN1_ENUM = 10, /* Enumerated */
|
||||
ASN1_EPDV = 11, /* Embedded PDV */
|
||||
ASN1_UTF8STR = 12, /* UTF8 String */
|
||||
ASN1_RELOID = 13, /* Relative OID */
|
||||
/* 14 - Reserved */
|
||||
/* 15 - Reserved */
|
||||
ASN1_SEQ = 16, /* Sequence and Sequence of */
|
||||
ASN1_SET = 17, /* Set and Set of */
|
||||
ASN1_NUMSTR = 18, /* Numerical String */
|
||||
ASN1_PRNSTR = 19, /* Printable String */
|
||||
ASN1_TEXSTR = 20, /* T61 String / Teletext String */
|
||||
ASN1_VIDSTR = 21, /* Videotex String */
|
||||
ASN1_IA5STR = 22, /* IA5 String */
|
||||
ASN1_UNITIM = 23, /* Universal Time */
|
||||
ASN1_GENTIM = 24, /* General Time */
|
||||
ASN1_GRASTR = 25, /* Graphic String */
|
||||
ASN1_VISSTR = 26, /* Visible String */
|
||||
ASN1_GENSTR = 27, /* General String */
|
||||
ASN1_UNISTR = 28, /* Universal String */
|
||||
ASN1_CHRSTR = 29, /* Character String */
|
||||
ASN1_BMPSTR = 30, /* BMP String */
|
||||
ASN1_LONG_TAG = 31 /* Long form tag */
|
||||
};
|
||||
|
||||
#endif /* _LINUX_ASN1_H */
|
||||
87
include/linux/asn1_ber_bytecode.h
Normal file
87
include/linux/asn1_ber_bytecode.h
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
/* ASN.1 BER/DER/CER parsing state machine internal definitions
|
||||
*
|
||||
* Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
|
||||
* Written by David Howells (dhowells@redhat.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public Licence
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the Licence, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_ASN1_BER_BYTECODE_H
|
||||
#define _LINUX_ASN1_BER_BYTECODE_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/types.h>
|
||||
#endif
|
||||
#include <linux/asn1.h>
|
||||
|
||||
typedef int (*asn1_action_t)(void *context,
|
||||
size_t hdrlen, /* In case of ANY type */
|
||||
unsigned char tag, /* In case of ANY type */
|
||||
const void *value, size_t vlen);
|
||||
|
||||
struct asn1_decoder {
|
||||
const unsigned char *machine;
|
||||
size_t machlen;
|
||||
const asn1_action_t *actions;
|
||||
};
|
||||
|
||||
enum asn1_opcode {
|
||||
/* The tag-matching ops come first and the odd-numbered slots
|
||||
* are for OR_SKIP ops.
|
||||
*/
|
||||
#define ASN1_OP_MATCH__SKIP 0x01
|
||||
#define ASN1_OP_MATCH__ACT 0x02
|
||||
#define ASN1_OP_MATCH__JUMP 0x04
|
||||
#define ASN1_OP_MATCH__ANY 0x08
|
||||
#define ASN1_OP_MATCH__COND 0x10
|
||||
|
||||
ASN1_OP_MATCH = 0x00,
|
||||
ASN1_OP_MATCH_OR_SKIP = 0x01,
|
||||
ASN1_OP_MATCH_ACT = 0x02,
|
||||
ASN1_OP_MATCH_ACT_OR_SKIP = 0x03,
|
||||
ASN1_OP_MATCH_JUMP = 0x04,
|
||||
ASN1_OP_MATCH_JUMP_OR_SKIP = 0x05,
|
||||
ASN1_OP_MATCH_ANY = 0x08,
|
||||
ASN1_OP_MATCH_ANY_ACT = 0x0a,
|
||||
/* Everything before here matches unconditionally */
|
||||
|
||||
ASN1_OP_COND_MATCH_OR_SKIP = 0x11,
|
||||
ASN1_OP_COND_MATCH_ACT_OR_SKIP = 0x13,
|
||||
ASN1_OP_COND_MATCH_JUMP_OR_SKIP = 0x15,
|
||||
ASN1_OP_COND_MATCH_ANY = 0x18,
|
||||
ASN1_OP_COND_MATCH_ANY_ACT = 0x1a,
|
||||
|
||||
/* Everything before here will want a tag from the data */
|
||||
#define ASN1_OP__MATCHES_TAG ASN1_OP_COND_MATCH_ANY_ACT
|
||||
|
||||
/* These are here to help fill up space */
|
||||
ASN1_OP_COND_FAIL = 0x1b,
|
||||
ASN1_OP_COMPLETE = 0x1c,
|
||||
ASN1_OP_ACT = 0x1d,
|
||||
ASN1_OP_RETURN = 0x1e,
|
||||
|
||||
/* The following eight have bit 0 -> SET, 1 -> OF, 2 -> ACT */
|
||||
ASN1_OP_END_SEQ = 0x20,
|
||||
ASN1_OP_END_SET = 0x21,
|
||||
ASN1_OP_END_SEQ_OF = 0x22,
|
||||
ASN1_OP_END_SET_OF = 0x23,
|
||||
ASN1_OP_END_SEQ_ACT = 0x24,
|
||||
ASN1_OP_END_SET_ACT = 0x25,
|
||||
ASN1_OP_END_SEQ_OF_ACT = 0x26,
|
||||
ASN1_OP_END_SET_OF_ACT = 0x27,
|
||||
#define ASN1_OP_END__SET 0x01
|
||||
#define ASN1_OP_END__OF 0x02
|
||||
#define ASN1_OP_END__ACT 0x04
|
||||
|
||||
ASN1_OP__NR
|
||||
};
|
||||
|
||||
#define _tag(CLASS, CP, TAG) ((ASN1_##CLASS << 6) | (ASN1_##CP << 5) | ASN1_##TAG)
|
||||
#define _tagn(CLASS, CP, TAG) ((ASN1_##CLASS << 6) | (ASN1_##CP << 5) | TAG)
|
||||
#define _jump_target(N) (N)
|
||||
#define _action(N) (N)
|
||||
|
||||
#endif /* _LINUX_ASN1_BER_BYTECODE_H */
|
||||
24
include/linux/asn1_decoder.h
Normal file
24
include/linux/asn1_decoder.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/* ASN.1 decoder
|
||||
*
|
||||
* Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
|
||||
* Written by David Howells (dhowells@redhat.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public Licence
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the Licence, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_ASN1_DECODER_H
|
||||
#define _LINUX_ASN1_DECODER_H
|
||||
|
||||
#include <linux/asn1.h>
|
||||
|
||||
struct asn1_decoder;
|
||||
|
||||
extern int asn1_ber_decoder(const struct asn1_decoder *decoder,
|
||||
void *context,
|
||||
const unsigned char *data,
|
||||
size_t datalen);
|
||||
|
||||
#endif /* _LINUX_ASN1_DECODER_H */
|
||||
|
|
@ -77,6 +77,9 @@ enum {
|
|||
ATA_ID_EIDE_PIO_IORDY = 68,
|
||||
ATA_ID_ADDITIONAL_SUPP = 69,
|
||||
ATA_ID_QUEUE_DEPTH = 75,
|
||||
ATA_ID_SATA_CAPABILITY = 76,
|
||||
ATA_ID_SATA_CAPABILITY_2 = 77,
|
||||
ATA_ID_FEATURE_SUPP = 78,
|
||||
ATA_ID_MAJOR_VER = 80,
|
||||
ATA_ID_COMMAND_SET_1 = 82,
|
||||
ATA_ID_COMMAND_SET_2 = 83,
|
||||
|
|
@ -292,6 +295,13 @@ enum {
|
|||
|
||||
/* READ_LOG_EXT pages */
|
||||
ATA_LOG_SATA_NCQ = 0x10,
|
||||
ATA_LOG_SATA_ID_DEV_DATA = 0x30,
|
||||
ATA_LOG_SATA_SETTINGS = 0x08,
|
||||
ATA_LOG_DEVSLP_MDAT = 0x30,
|
||||
ATA_LOG_DEVSLP_MDAT_MASK = 0x1F,
|
||||
ATA_LOG_DEVSLP_DETO = 0x31,
|
||||
ATA_LOG_DEVSLP_VALID = 0x37,
|
||||
ATA_LOG_DEVSLP_VALID_MASK = 0x80,
|
||||
|
||||
/* READ/WRITE LONG (obsolete) */
|
||||
ATA_CMD_READ_LONG = 0x22,
|
||||
|
|
@ -345,6 +355,7 @@ enum {
|
|||
SATA_FPDMA_IN_ORDER = 0x04, /* FPDMA in-order data delivery */
|
||||
SATA_AN = 0x05, /* Asynchronous Notification */
|
||||
SATA_SSP = 0x06, /* Software Settings Preservation */
|
||||
SATA_DEVSLP = 0x09, /* Device Sleep */
|
||||
|
||||
/* feature values for SET_MAX */
|
||||
ATA_SET_MAX_ADDR = 0x00,
|
||||
|
|
@ -558,15 +569,17 @@ static inline int ata_is_data(u8 prot)
|
|||
#define ata_id_is_ata(id) (((id)[ATA_ID_CONFIG] & (1 << 15)) == 0)
|
||||
#define ata_id_has_lba(id) ((id)[ATA_ID_CAPABILITY] & (1 << 9))
|
||||
#define ata_id_has_dma(id) ((id)[ATA_ID_CAPABILITY] & (1 << 8))
|
||||
#define ata_id_has_ncq(id) ((id)[76] & (1 << 8))
|
||||
#define ata_id_has_ncq(id) ((id)[ATA_ID_SATA_CAPABILITY] & (1 << 8))
|
||||
#define ata_id_queue_depth(id) (((id)[ATA_ID_QUEUE_DEPTH] & 0x1f) + 1)
|
||||
#define ata_id_removeable(id) ((id)[ATA_ID_CONFIG] & (1 << 7))
|
||||
#define ata_id_has_atapi_AN(id) \
|
||||
( (((id)[76] != 0x0000) && ((id)[76] != 0xffff)) && \
|
||||
((id)[78] & (1 << 5)) )
|
||||
((((id)[ATA_ID_SATA_CAPABILITY] != 0x0000) && \
|
||||
((id)[ATA_ID_SATA_CAPABILITY] != 0xffff)) && \
|
||||
((id)[ATA_ID_FEATURE_SUPP] & (1 << 5)))
|
||||
#define ata_id_has_fpdma_aa(id) \
|
||||
( (((id)[76] != 0x0000) && ((id)[76] != 0xffff)) && \
|
||||
((id)[78] & (1 << 2)) )
|
||||
((((id)[ATA_ID_SATA_CAPABILITY] != 0x0000) && \
|
||||
((id)[ATA_ID_SATA_CAPABILITY] != 0xffff)) && \
|
||||
((id)[ATA_ID_FEATURE_SUPP] & (1 << 2)))
|
||||
#define ata_id_iordy_disable(id) ((id)[ATA_ID_CAPABILITY] & (1 << 10))
|
||||
#define ata_id_has_iordy(id) ((id)[ATA_ID_CAPABILITY] & (1 << 11))
|
||||
#define ata_id_u32(id,n) \
|
||||
|
|
@ -578,11 +591,12 @@ static inline int ata_is_data(u8 prot)
|
|||
((u64) (id)[(n) + 0]) )
|
||||
|
||||
#define ata_id_cdb_intr(id) (((id)[ATA_ID_CONFIG] & 0x60) == 0x20)
|
||||
#define ata_id_has_da(id) ((id)[77] & (1 << 4))
|
||||
#define ata_id_has_da(id) ((id)[ATA_ID_SATA_CAPABILITY_2] & (1 << 4))
|
||||
#define ata_id_has_devslp(id) ((id)[ATA_ID_FEATURE_SUPP] & (1 << 8))
|
||||
|
||||
static inline bool ata_id_has_hipm(const u16 *id)
|
||||
{
|
||||
u16 val = id[76];
|
||||
u16 val = id[ATA_ID_SATA_CAPABILITY];
|
||||
|
||||
if (val == 0 || val == 0xffff)
|
||||
return false;
|
||||
|
|
@ -592,7 +606,7 @@ static inline bool ata_id_has_hipm(const u16 *id)
|
|||
|
||||
static inline bool ata_id_has_dipm(const u16 *id)
|
||||
{
|
||||
u16 val = id[78];
|
||||
u16 val = id[ATA_ID_FEATURE_SUPP];
|
||||
|
||||
if (val == 0 || val == 0xffff)
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -1,49 +1,9 @@
|
|||
#ifndef __LINUX_ATALK_H__
|
||||
#define __LINUX_ATALK_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <linux/socket.h>
|
||||
|
||||
/*
|
||||
* AppleTalk networking structures
|
||||
*
|
||||
* The following are directly referenced from the University Of Michigan
|
||||
* netatalk for compatibility reasons.
|
||||
*/
|
||||
#define ATPORT_FIRST 1
|
||||
#define ATPORT_RESERVED 128
|
||||
#define ATPORT_LAST 254 /* 254 is only legal on localtalk */
|
||||
#define ATADDR_ANYNET (__u16)0
|
||||
#define ATADDR_ANYNODE (__u8)0
|
||||
#define ATADDR_ANYPORT (__u8)0
|
||||
#define ATADDR_BCAST (__u8)255
|
||||
#define DDP_MAXSZ 587
|
||||
#define DDP_MAXHOPS 15 /* 4 bits of hop counter */
|
||||
|
||||
#define SIOCATALKDIFADDR (SIOCPROTOPRIVATE + 0)
|
||||
|
||||
struct atalk_addr {
|
||||
__be16 s_net;
|
||||
__u8 s_node;
|
||||
};
|
||||
|
||||
struct sockaddr_at {
|
||||
__kernel_sa_family_t sat_family;
|
||||
__u8 sat_port;
|
||||
struct atalk_addr sat_addr;
|
||||
char sat_zero[8];
|
||||
};
|
||||
|
||||
struct atalk_netrange {
|
||||
__u8 nr_phase;
|
||||
__be16 nr_firstnet;
|
||||
__be16 nr_lastnet;
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <net/sock.h>
|
||||
#include <uapi/linux/atalk.h>
|
||||
|
||||
struct atalk_route {
|
||||
struct net_device *dev;
|
||||
|
|
@ -205,5 +165,4 @@ extern void atalk_proc_exit(void);
|
|||
#define atalk_proc_exit() do { } while(0)
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __LINUX_ATALK_H__ */
|
||||
|
|
|
|||
|
|
@ -1,242 +1,9 @@
|
|||
/* atm.h - general ATM declarations */
|
||||
|
||||
/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
|
||||
|
||||
|
||||
/*
|
||||
* WARNING: User-space programs should not #include <linux/atm.h> directly.
|
||||
* Instead, #include <atm.h>
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_ATM_H
|
||||
#define _LINUX_ATM_H
|
||||
|
||||
/*
|
||||
* BEGIN_xx and END_xx markers are used for automatic generation of
|
||||
* documentation. Do not change them.
|
||||
*/
|
||||
#include <uapi/linux/atm.h>
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/atmapi.h>
|
||||
#include <linux/atmsap.h>
|
||||
#include <linux/atmioc.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
|
||||
/* general ATM constants */
|
||||
#define ATM_CELL_SIZE 53 /* ATM cell size incl. header */
|
||||
#define ATM_CELL_PAYLOAD 48 /* ATM payload size */
|
||||
#define ATM_AAL0_SDU 52 /* AAL0 SDU size */
|
||||
#define ATM_MAX_AAL34_PDU 65535 /* maximum AAL3/4 PDU payload */
|
||||
#define ATM_AAL5_TRAILER 8 /* AAL5 trailer size */
|
||||
#define ATM_MAX_AAL5_PDU 65535 /* maximum AAL5 PDU payload */
|
||||
#define ATM_MAX_CDV 9999 /* maximum (default) CDV */
|
||||
#define ATM_NOT_RSV_VCI 32 /* first non-reserved VCI value */
|
||||
|
||||
#define ATM_MAX_VPI 255 /* maximum VPI at the UNI */
|
||||
#define ATM_MAX_VPI_NNI 4096 /* maximum VPI at the NNI */
|
||||
#define ATM_MAX_VCI 65535 /* maximum VCI */
|
||||
|
||||
|
||||
/* "protcol" values for the socket system call */
|
||||
#define ATM_NO_AAL 0 /* AAL not specified */
|
||||
#define ATM_AAL0 13 /* "raw" ATM cells */
|
||||
#define ATM_AAL1 1 /* AAL1 (CBR) */
|
||||
#define ATM_AAL2 2 /* AAL2 (VBR) */
|
||||
#define ATM_AAL34 3 /* AAL3/4 (data) */
|
||||
#define ATM_AAL5 5 /* AAL5 (data) */
|
||||
|
||||
/*
|
||||
* socket option name coding functions
|
||||
*
|
||||
* Note that __SO_ENCODE and __SO_LEVEL are somewhat a hack since the
|
||||
* << 22 only reserves 9 bits for the level. On some architectures
|
||||
* SOL_SOCKET is 0xFFFF, so that's a bit of a problem
|
||||
*/
|
||||
|
||||
#define __SO_ENCODE(l,n,t) ((((l) & 0x1FF) << 22) | ((n) << 16) | \
|
||||
sizeof(t))
|
||||
#define __SO_LEVEL_MATCH(c,m) (((c) >> 22) == ((m) & 0x1FF))
|
||||
#define __SO_NUMBER(c) (((c) >> 16) & 0x3f)
|
||||
#define __SO_SIZE(c) ((c) & 0x3fff)
|
||||
|
||||
/*
|
||||
* ATM layer
|
||||
*/
|
||||
|
||||
#define SO_SETCLP __SO_ENCODE(SOL_ATM,0,int)
|
||||
/* set CLP bit value - TODO */
|
||||
#define SO_CIRANGE __SO_ENCODE(SOL_ATM,1,struct atm_cirange)
|
||||
/* connection identifier range; socket must be
|
||||
bound or connected */
|
||||
#define SO_ATMQOS __SO_ENCODE(SOL_ATM,2,struct atm_qos)
|
||||
/* Quality of Service setting */
|
||||
#define SO_ATMSAP __SO_ENCODE(SOL_ATM,3,struct atm_sap)
|
||||
/* Service Access Point */
|
||||
#define SO_ATMPVC __SO_ENCODE(SOL_ATM,4,struct sockaddr_atmpvc)
|
||||
/* "PVC" address (also for SVCs); get only */
|
||||
#define SO_MULTIPOINT __SO_ENCODE(SOL_ATM, 5, int)
|
||||
/* make this vc a p2mp */
|
||||
|
||||
|
||||
/*
|
||||
* Note @@@: since the socket layers don't really distinguish the control and
|
||||
* the data plane but generally seems to be data plane-centric, any layer is
|
||||
* about equally wrong for the SAP. If you have a better idea about this,
|
||||
* please speak up ...
|
||||
*/
|
||||
|
||||
|
||||
/* ATM cell header (for AAL0) */
|
||||
|
||||
/* BEGIN_CH */
|
||||
#define ATM_HDR_GFC_MASK 0xf0000000
|
||||
#define ATM_HDR_GFC_SHIFT 28
|
||||
#define ATM_HDR_VPI_MASK 0x0ff00000
|
||||
#define ATM_HDR_VPI_SHIFT 20
|
||||
#define ATM_HDR_VCI_MASK 0x000ffff0
|
||||
#define ATM_HDR_VCI_SHIFT 4
|
||||
#define ATM_HDR_PTI_MASK 0x0000000e
|
||||
#define ATM_HDR_PTI_SHIFT 1
|
||||
#define ATM_HDR_CLP 0x00000001
|
||||
/* END_CH */
|
||||
|
||||
|
||||
/* PTI codings */
|
||||
|
||||
/* BEGIN_PTI */
|
||||
#define ATM_PTI_US0 0 /* user data cell, congestion not exp, SDU-type 0 */
|
||||
#define ATM_PTI_US1 1 /* user data cell, congestion not exp, SDU-type 1 */
|
||||
#define ATM_PTI_UCES0 2 /* user data cell, cong. experienced, SDU-type 0 */
|
||||
#define ATM_PTI_UCES1 3 /* user data cell, cong. experienced, SDU-type 1 */
|
||||
#define ATM_PTI_SEGF5 4 /* segment OAM F5 flow related cell */
|
||||
#define ATM_PTI_E2EF5 5 /* end-to-end OAM F5 flow related cell */
|
||||
#define ATM_PTI_RSV_RM 6 /* reserved for traffic control/resource mgmt */
|
||||
#define ATM_PTI_RSV 7 /* reserved */
|
||||
/* END_PTI */
|
||||
|
||||
|
||||
/*
|
||||
* The following items should stay in linux/atm.h, which should be linked to
|
||||
* netatm/atm.h
|
||||
*/
|
||||
|
||||
/* Traffic description */
|
||||
|
||||
#define ATM_NONE 0 /* no traffic */
|
||||
#define ATM_UBR 1
|
||||
#define ATM_CBR 2
|
||||
#define ATM_VBR 3
|
||||
#define ATM_ABR 4
|
||||
#define ATM_ANYCLASS 5 /* compatible with everything */
|
||||
|
||||
#define ATM_MAX_PCR -1 /* maximum available PCR */
|
||||
|
||||
struct atm_trafprm {
|
||||
unsigned char traffic_class; /* traffic class (ATM_UBR, ...) */
|
||||
int max_pcr; /* maximum PCR in cells per second */
|
||||
int pcr; /* desired PCR in cells per second */
|
||||
int min_pcr; /* minimum PCR in cells per second */
|
||||
int max_cdv; /* maximum CDV in microseconds */
|
||||
int max_sdu; /* maximum SDU in bytes */
|
||||
/* extra params for ABR */
|
||||
unsigned int icr; /* Initial Cell Rate (24-bit) */
|
||||
unsigned int tbe; /* Transient Buffer Exposure (24-bit) */
|
||||
unsigned int frtt : 24; /* Fixed Round Trip Time (24-bit) */
|
||||
unsigned int rif : 4; /* Rate Increment Factor (4-bit) */
|
||||
unsigned int rdf : 4; /* Rate Decrease Factor (4-bit) */
|
||||
unsigned int nrm_pres :1; /* nrm present bit */
|
||||
unsigned int trm_pres :1; /* rm present bit */
|
||||
unsigned int adtf_pres :1; /* adtf present bit */
|
||||
unsigned int cdf_pres :1; /* cdf present bit*/
|
||||
unsigned int nrm :3; /* Max # of Cells for each forward RM cell (3-bit) */
|
||||
unsigned int trm :3; /* Time between forward RM cells (3-bit) */
|
||||
unsigned int adtf :10; /* ACR Decrease Time Factor (10-bit) */
|
||||
unsigned int cdf :3; /* Cutoff Decrease Factor (3-bit) */
|
||||
unsigned int spare :9; /* spare bits */
|
||||
};
|
||||
|
||||
struct atm_qos {
|
||||
struct atm_trafprm txtp; /* parameters in TX direction */
|
||||
struct atm_trafprm rxtp __ATM_API_ALIGN;
|
||||
/* parameters in RX direction */
|
||||
unsigned char aal __ATM_API_ALIGN;
|
||||
};
|
||||
|
||||
/* PVC addressing */
|
||||
|
||||
#define ATM_ITF_ANY -1 /* "magic" PVC address values */
|
||||
#define ATM_VPI_ANY -1
|
||||
#define ATM_VCI_ANY -1
|
||||
#define ATM_VPI_UNSPEC -2
|
||||
#define ATM_VCI_UNSPEC -2
|
||||
|
||||
|
||||
struct sockaddr_atmpvc {
|
||||
unsigned short sap_family; /* address family, AF_ATMPVC */
|
||||
struct { /* PVC address */
|
||||
short itf; /* ATM interface */
|
||||
short vpi; /* VPI (only 8 bits at UNI) */
|
||||
int vci; /* VCI (only 16 bits at UNI) */
|
||||
} sap_addr __ATM_API_ALIGN; /* PVC address */
|
||||
};
|
||||
|
||||
/* SVC addressing */
|
||||
|
||||
#define ATM_ESA_LEN 20 /* ATM End System Address length */
|
||||
#define ATM_E164_LEN 12 /* maximum E.164 number length */
|
||||
|
||||
#define ATM_AFI_DCC 0x39 /* DCC ATM Format */
|
||||
#define ATM_AFI_ICD 0x47 /* ICD ATM Format */
|
||||
#define ATM_AFI_E164 0x45 /* E.164 ATM Format */
|
||||
#define ATM_AFI_LOCAL 0x49 /* Local ATM Format */
|
||||
|
||||
#define ATM_AFI_DCC_GROUP 0xBD /* DCC ATM Group Format */
|
||||
#define ATM_AFI_ICD_GROUP 0xC5 /* ICD ATM Group Format */
|
||||
#define ATM_AFI_E164_GROUP 0xC3 /* E.164 ATM Group Format */
|
||||
#define ATM_AFI_LOCAL_GROUP 0xC7 /* Local ATM Group Format */
|
||||
|
||||
#define ATM_LIJ_NONE 0 /* no leaf-initiated join */
|
||||
#define ATM_LIJ 1 /* request joining */
|
||||
#define ATM_LIJ_RPJ 2 /* set to root-prompted join */
|
||||
#define ATM_LIJ_NJ 3 /* set to network join */
|
||||
|
||||
|
||||
struct sockaddr_atmsvc {
|
||||
unsigned short sas_family; /* address family, AF_ATMSVC */
|
||||
struct { /* SVC address */
|
||||
unsigned char prv[ATM_ESA_LEN];/* private ATM address */
|
||||
char pub[ATM_E164_LEN+1]; /* public address (E.164) */
|
||||
/* unused addresses must be bzero'ed */
|
||||
char lij_type; /* role in LIJ call; one of ATM_LIJ* */
|
||||
__u32 lij_id; /* LIJ call identifier */
|
||||
} sas_addr __ATM_API_ALIGN; /* SVC address */
|
||||
};
|
||||
|
||||
|
||||
static __inline__ int atmsvc_addr_in_use(struct sockaddr_atmsvc addr)
|
||||
{
|
||||
return *addr.sas_addr.prv || *addr.sas_addr.pub;
|
||||
}
|
||||
|
||||
|
||||
static __inline__ int atmpvc_addr_in_use(struct sockaddr_atmpvc addr)
|
||||
{
|
||||
return addr.sap_addr.itf || addr.sap_addr.vpi || addr.sap_addr.vci;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Some stuff for linux/sockios.h
|
||||
*/
|
||||
|
||||
struct atmif_sioc {
|
||||
int number;
|
||||
int length;
|
||||
void __user *arg;
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#ifdef CONFIG_COMPAT
|
||||
#include <linux/compat.h>
|
||||
struct compat_atmif_sioc {
|
||||
|
|
@ -246,6 +13,3 @@ struct compat_atmif_sioc {
|
|||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef unsigned short atm_backend_t;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -3,62 +3,12 @@
|
|||
|
||||
/* Written 1997-2000 by Werner Almesberger, EPFL LRC/ICA */
|
||||
|
||||
|
||||
#ifndef LINUX_ATM_TCP_H
|
||||
#define LINUX_ATM_TCP_H
|
||||
|
||||
#include <linux/atmapi.h>
|
||||
#include <linux/atm.h>
|
||||
#include <linux/atmioc.h>
|
||||
#include <linux/types.h>
|
||||
#include <uapi/linux/atm_tcp.h>
|
||||
|
||||
|
||||
/*
|
||||
* All values in struct atmtcp_hdr are in network byte order
|
||||
*/
|
||||
|
||||
struct atmtcp_hdr {
|
||||
__u16 vpi;
|
||||
__u16 vci;
|
||||
__u32 length; /* ... of data part */
|
||||
};
|
||||
|
||||
/*
|
||||
* All values in struct atmtcp_command are in host byte order
|
||||
*/
|
||||
|
||||
#define ATMTCP_HDR_MAGIC (~0) /* this length indicates a command */
|
||||
#define ATMTCP_CTRL_OPEN 1 /* request/reply */
|
||||
#define ATMTCP_CTRL_CLOSE 2 /* request/reply */
|
||||
|
||||
struct atmtcp_control {
|
||||
struct atmtcp_hdr hdr; /* must be first */
|
||||
int type; /* message type; both directions */
|
||||
atm_kptr_t vcc; /* both directions */
|
||||
struct sockaddr_atmpvc addr; /* suggested value from kernel */
|
||||
struct atm_qos qos; /* both directions */
|
||||
int result; /* to kernel only */
|
||||
} __ATM_API_ALIGN;
|
||||
|
||||
/*
|
||||
* Field usage:
|
||||
* Messge type dir. hdr.v?i type addr qos vcc result
|
||||
* ----------- ---- ------- ---- ---- --- --- ------
|
||||
* OPEN K->D Y Y Y Y Y 0
|
||||
* OPEN D->K - Y Y Y Y Y
|
||||
* CLOSE K->D - - Y - Y 0
|
||||
* CLOSE D->K - - - - Y Y
|
||||
*/
|
||||
|
||||
#define SIOCSIFATMTCP _IO('a',ATMIOC_ITF) /* set ATMTCP mode */
|
||||
#define ATMTCP_CREATE _IO('a',ATMIOC_ITF+14) /* create persistent ATMTCP
|
||||
interface */
|
||||
#define ATMTCP_REMOVE _IO('a',ATMIOC_ITF+15) /* destroy persistent ATMTCP
|
||||
interface */
|
||||
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
struct atm_tcp_ops {
|
||||
int (*attach)(struct atm_vcc *vcc,int itf);
|
||||
int (*create_persistent)(int itf);
|
||||
|
|
@ -69,5 +19,3 @@ struct atm_tcp_ops {
|
|||
extern struct atm_tcp_ops atm_tcp_ops;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,218 +1,8 @@
|
|||
/* atmdev.h - ATM device driver declarations and various related items */
|
||||
|
||||
/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
|
||||
|
||||
|
||||
#ifndef LINUX_ATMDEV_H
|
||||
#define LINUX_ATMDEV_H
|
||||
|
||||
|
||||
#include <linux/atmapi.h>
|
||||
#include <linux/atm.h>
|
||||
#include <linux/atmioc.h>
|
||||
|
||||
|
||||
#define ESI_LEN 6
|
||||
|
||||
#define ATM_OC3_PCR (155520000/270*260/8/53)
|
||||
/* OC3 link rate: 155520000 bps
|
||||
SONET overhead: /270*260 (9 section, 1 path)
|
||||
bits per cell: /8/53
|
||||
max cell rate: 353207.547 cells/sec */
|
||||
#define ATM_25_PCR ((25600000/8-8000)/54)
|
||||
/* 25 Mbps ATM cell rate (59111) */
|
||||
#define ATM_OC12_PCR (622080000/1080*1040/8/53)
|
||||
/* OC12 link rate: 622080000 bps
|
||||
SONET overhead: /1080*1040
|
||||
bits per cell: /8/53
|
||||
max cell rate: 1412830.188 cells/sec */
|
||||
#define ATM_DS3_PCR (8000*12)
|
||||
/* DS3: 12 cells in a 125 usec time slot */
|
||||
|
||||
|
||||
#define __AAL_STAT_ITEMS \
|
||||
__HANDLE_ITEM(tx); /* TX okay */ \
|
||||
__HANDLE_ITEM(tx_err); /* TX errors */ \
|
||||
__HANDLE_ITEM(rx); /* RX okay */ \
|
||||
__HANDLE_ITEM(rx_err); /* RX errors */ \
|
||||
__HANDLE_ITEM(rx_drop); /* RX out of memory */
|
||||
|
||||
struct atm_aal_stats {
|
||||
#define __HANDLE_ITEM(i) int i
|
||||
__AAL_STAT_ITEMS
|
||||
#undef __HANDLE_ITEM
|
||||
};
|
||||
|
||||
|
||||
struct atm_dev_stats {
|
||||
struct atm_aal_stats aal0;
|
||||
struct atm_aal_stats aal34;
|
||||
struct atm_aal_stats aal5;
|
||||
} __ATM_API_ALIGN;
|
||||
|
||||
|
||||
#define ATM_GETLINKRATE _IOW('a',ATMIOC_ITF+1,struct atmif_sioc)
|
||||
/* get link rate */
|
||||
#define ATM_GETNAMES _IOW('a',ATMIOC_ITF+3,struct atm_iobuf)
|
||||
/* get interface names (numbers) */
|
||||
#define ATM_GETTYPE _IOW('a',ATMIOC_ITF+4,struct atmif_sioc)
|
||||
/* get interface type name */
|
||||
#define ATM_GETESI _IOW('a',ATMIOC_ITF+5,struct atmif_sioc)
|
||||
/* get interface ESI */
|
||||
#define ATM_GETADDR _IOW('a',ATMIOC_ITF+6,struct atmif_sioc)
|
||||
/* get itf's local ATM addr. list */
|
||||
#define ATM_RSTADDR _IOW('a',ATMIOC_ITF+7,struct atmif_sioc)
|
||||
/* reset itf's ATM address list */
|
||||
#define ATM_ADDADDR _IOW('a',ATMIOC_ITF+8,struct atmif_sioc)
|
||||
/* add a local ATM address */
|
||||
#define ATM_DELADDR _IOW('a',ATMIOC_ITF+9,struct atmif_sioc)
|
||||
/* remove a local ATM address */
|
||||
#define ATM_GETCIRANGE _IOW('a',ATMIOC_ITF+10,struct atmif_sioc)
|
||||
/* get connection identifier range */
|
||||
#define ATM_SETCIRANGE _IOW('a',ATMIOC_ITF+11,struct atmif_sioc)
|
||||
/* set connection identifier range */
|
||||
#define ATM_SETESI _IOW('a',ATMIOC_ITF+12,struct atmif_sioc)
|
||||
/* set interface ESI */
|
||||
#define ATM_SETESIF _IOW('a',ATMIOC_ITF+13,struct atmif_sioc)
|
||||
/* force interface ESI */
|
||||
#define ATM_ADDLECSADDR _IOW('a', ATMIOC_ITF+14, struct atmif_sioc)
|
||||
/* register a LECS address */
|
||||
#define ATM_DELLECSADDR _IOW('a', ATMIOC_ITF+15, struct atmif_sioc)
|
||||
/* unregister a LECS address */
|
||||
#define ATM_GETLECSADDR _IOW('a', ATMIOC_ITF+16, struct atmif_sioc)
|
||||
/* retrieve LECS address(es) */
|
||||
|
||||
#define ATM_GETSTAT _IOW('a',ATMIOC_SARCOM+0,struct atmif_sioc)
|
||||
/* get AAL layer statistics */
|
||||
#define ATM_GETSTATZ _IOW('a',ATMIOC_SARCOM+1,struct atmif_sioc)
|
||||
/* get AAL layer statistics and zero */
|
||||
#define ATM_GETLOOP _IOW('a',ATMIOC_SARCOM+2,struct atmif_sioc)
|
||||
/* get loopback mode */
|
||||
#define ATM_SETLOOP _IOW('a',ATMIOC_SARCOM+3,struct atmif_sioc)
|
||||
/* set loopback mode */
|
||||
#define ATM_QUERYLOOP _IOW('a',ATMIOC_SARCOM+4,struct atmif_sioc)
|
||||
/* query supported loopback modes */
|
||||
#define ATM_SETSC _IOW('a',ATMIOC_SPECIAL+1,int)
|
||||
/* enable or disable single-copy */
|
||||
#define ATM_SETBACKEND _IOW('a',ATMIOC_SPECIAL+2,atm_backend_t)
|
||||
/* set backend handler */
|
||||
#define ATM_NEWBACKENDIF _IOW('a',ATMIOC_SPECIAL+3,atm_backend_t)
|
||||
/* use backend to make new if */
|
||||
#define ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4,struct atm_iobuf)
|
||||
/* add party to p2mp call */
|
||||
#ifdef CONFIG_COMPAT
|
||||
/* It actually takes struct sockaddr_atmsvc, not struct atm_iobuf */
|
||||
#define COMPAT_ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4,struct compat_atm_iobuf)
|
||||
#endif
|
||||
#define ATM_DROPPARTY _IOW('a', ATMIOC_SPECIAL+5,int)
|
||||
/* drop party from p2mp call */
|
||||
|
||||
/*
|
||||
* These are backend handkers that can be set via the ATM_SETBACKEND call
|
||||
* above. In the future we may support dynamic loading of these - for now,
|
||||
* they're just being used to share the ATMIOC_BACKEND ioctls
|
||||
*/
|
||||
#define ATM_BACKEND_RAW 0
|
||||
#define ATM_BACKEND_PPP 1 /* PPPoATM - RFC2364 */
|
||||
#define ATM_BACKEND_BR2684 2 /* Bridged RFC1483/2684 */
|
||||
|
||||
/* for ATM_GETTYPE */
|
||||
#define ATM_ITFTYP_LEN 8 /* maximum length of interface type name */
|
||||
|
||||
/*
|
||||
* Loopback modes for ATM_{PHY,SAR}_{GET,SET}LOOP
|
||||
*/
|
||||
|
||||
/* Point of loopback CPU-->SAR-->PHY-->line--> ... */
|
||||
#define __ATM_LM_NONE 0 /* no loop back ^ ^ ^ ^ */
|
||||
#define __ATM_LM_AAL 1 /* loop back PDUs --' | | | */
|
||||
#define __ATM_LM_ATM 2 /* loop back ATM cells ---' | | */
|
||||
/* RESERVED 4 loop back on PHY side ---' */
|
||||
#define __ATM_LM_PHY 8 /* loop back bits (digital) ----' | */
|
||||
#define __ATM_LM_ANALOG 16 /* loop back the analog signal --------' */
|
||||
|
||||
/* Direction of loopback */
|
||||
#define __ATM_LM_MKLOC(n) ((n)) /* Local (i.e. loop TX to RX) */
|
||||
#define __ATM_LM_MKRMT(n) ((n) << 8) /* Remote (i.e. loop RX to TX) */
|
||||
|
||||
#define __ATM_LM_XTLOC(n) ((n) & 0xff)
|
||||
#define __ATM_LM_XTRMT(n) (((n) >> 8) & 0xff)
|
||||
|
||||
#define ATM_LM_NONE 0 /* no loopback */
|
||||
|
||||
#define ATM_LM_LOC_AAL __ATM_LM_MKLOC(__ATM_LM_AAL)
|
||||
#define ATM_LM_LOC_ATM __ATM_LM_MKLOC(__ATM_LM_ATM)
|
||||
#define ATM_LM_LOC_PHY __ATM_LM_MKLOC(__ATM_LM_PHY)
|
||||
#define ATM_LM_LOC_ANALOG __ATM_LM_MKLOC(__ATM_LM_ANALOG)
|
||||
|
||||
#define ATM_LM_RMT_AAL __ATM_LM_MKRMT(__ATM_LM_AAL)
|
||||
#define ATM_LM_RMT_ATM __ATM_LM_MKRMT(__ATM_LM_ATM)
|
||||
#define ATM_LM_RMT_PHY __ATM_LM_MKRMT(__ATM_LM_PHY)
|
||||
#define ATM_LM_RMT_ANALOG __ATM_LM_MKRMT(__ATM_LM_ANALOG)
|
||||
|
||||
/*
|
||||
* Note: ATM_LM_LOC_* and ATM_LM_RMT_* can be combined, provided that
|
||||
* __ATM_LM_XTLOC(x) <= __ATM_LM_XTRMT(x)
|
||||
*/
|
||||
|
||||
|
||||
struct atm_iobuf {
|
||||
int length;
|
||||
void __user *buffer;
|
||||
};
|
||||
|
||||
/* for ATM_GETCIRANGE / ATM_SETCIRANGE */
|
||||
|
||||
#define ATM_CI_MAX -1 /* use maximum range of VPI/VCI */
|
||||
|
||||
struct atm_cirange {
|
||||
signed char vpi_bits; /* 1..8, ATM_CI_MAX (-1) for maximum */
|
||||
signed char vci_bits; /* 1..16, ATM_CI_MAX (-1) for maximum */
|
||||
};
|
||||
|
||||
/* for ATM_SETSC; actually taken from the ATM_VF number space */
|
||||
|
||||
#define ATM_SC_RX 1024 /* enable RX single-copy */
|
||||
#define ATM_SC_TX 2048 /* enable TX single-copy */
|
||||
|
||||
#define ATM_BACKLOG_DEFAULT 32 /* if we get more, we're likely to time out
|
||||
anyway */
|
||||
|
||||
/* MF: change_qos (Modify) flags */
|
||||
|
||||
#define ATM_MF_IMMED 1 /* Block until change is effective */
|
||||
#define ATM_MF_INC_RSV 2 /* Change reservation on increase */
|
||||
#define ATM_MF_INC_SHP 4 /* Change shaping on increase */
|
||||
#define ATM_MF_DEC_RSV 8 /* Change reservation on decrease */
|
||||
#define ATM_MF_DEC_SHP 16 /* Change shaping on decrease */
|
||||
#define ATM_MF_BWD 32 /* Set the backward direction parameters */
|
||||
|
||||
#define ATM_MF_SET (ATM_MF_INC_RSV | ATM_MF_INC_SHP | ATM_MF_DEC_RSV | \
|
||||
ATM_MF_DEC_SHP | ATM_MF_BWD)
|
||||
|
||||
/*
|
||||
* ATM_VS_* are used to express VC state in a human-friendly way.
|
||||
*/
|
||||
|
||||
#define ATM_VS_IDLE 0 /* VC is not used */
|
||||
#define ATM_VS_CONNECTED 1 /* VC is connected */
|
||||
#define ATM_VS_CLOSING 2 /* VC is closing */
|
||||
#define ATM_VS_LISTEN 3 /* VC is listening for incoming setups */
|
||||
#define ATM_VS_INUSE 4 /* VC is in use (registered with atmsigd) */
|
||||
#define ATM_VS_BOUND 5 /* VC is bound */
|
||||
|
||||
#define ATM_VS2TXT_MAP \
|
||||
"IDLE", "CONNECTED", "CLOSING", "LISTEN", "INUSE", "BOUND"
|
||||
|
||||
#define ATM_VF2TXT_MAP \
|
||||
"ADDR", "READY", "PARTIAL", "REGIS", \
|
||||
"RELEASED", "HASQOS", "LISTEN", "META", \
|
||||
"256", "512", "1024", "2048", \
|
||||
"SESSION", "HASSAP", "BOUND", "CLOSE"
|
||||
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/wait.h> /* wait_queue_head_t */
|
||||
#include <linux/time.h> /* struct timeval */
|
||||
#include <linux/net.h>
|
||||
|
|
@ -221,6 +11,7 @@ struct atm_cirange {
|
|||
#include <linux/uio.h>
|
||||
#include <net/sock.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <uapi/linux/atmdev.h>
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#include <linux/proc_fs.h>
|
||||
|
|
@ -521,6 +312,4 @@ void deregister_atm_ioctl(struct atm_ioctl *);
|
|||
int register_atmdevice_notifier(struct notifier_block *nb);
|
||||
void unregister_atmdevice_notifier(struct notifier_block *nb);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
struct ssc_device {
|
||||
struct list_head list;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ struct atmel_tc {
|
|||
struct platform_device *pdev;
|
||||
struct resource *iomem;
|
||||
void __iomem *regs;
|
||||
struct atmel_tcb_config *tcb_config;
|
||||
const struct atmel_tcb_config *tcb_config;
|
||||
int irq[3];
|
||||
struct clk *clk[3];
|
||||
struct list_head node;
|
||||
|
|
|
|||
|
|
@ -86,6 +86,31 @@ static inline int atomic_dec_unless_positive(atomic_t *p)
|
|||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* atomic_dec_if_positive - decrement by 1 if old value positive
|
||||
* @v: pointer of type atomic_t
|
||||
*
|
||||
* The function returns the old value of *v minus 1, even if
|
||||
* the atomic variable, v, was not decremented.
|
||||
*/
|
||||
#ifndef atomic_dec_if_positive
|
||||
static inline int atomic_dec_if_positive(atomic_t *v)
|
||||
{
|
||||
int c, old, dec;
|
||||
c = atomic_read(v);
|
||||
for (;;) {
|
||||
dec = c - 1;
|
||||
if (unlikely(dec < 0))
|
||||
break;
|
||||
old = atomic_cmpxchg((v), c, dec);
|
||||
if (likely(old == c))
|
||||
break;
|
||||
c = old;
|
||||
}
|
||||
return dec;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ARCH_HAS_ATOMIC_OR
|
||||
static inline void atomic_or(int i, atomic_t *v)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,388 +20,11 @@
|
|||
* Written by Rickard E. (Rik) Faith <faith@redhat.com>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_AUDIT_H_
|
||||
#define _LINUX_AUDIT_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/elf-em.h>
|
||||
#include <linux/ptrace.h>
|
||||
|
||||
/* The netlink messages for the audit system is divided into blocks:
|
||||
* 1000 - 1099 are for commanding the audit system
|
||||
* 1100 - 1199 user space trusted application messages
|
||||
* 1200 - 1299 messages internal to the audit daemon
|
||||
* 1300 - 1399 audit event messages
|
||||
* 1400 - 1499 SE Linux use
|
||||
* 1500 - 1599 kernel LSPP events
|
||||
* 1600 - 1699 kernel crypto events
|
||||
* 1700 - 1799 kernel anomaly records
|
||||
* 1800 - 1899 kernel integrity events
|
||||
* 1900 - 1999 future kernel use
|
||||
* 2000 is for otherwise unclassified kernel audit messages (legacy)
|
||||
* 2001 - 2099 unused (kernel)
|
||||
* 2100 - 2199 user space anomaly records
|
||||
* 2200 - 2299 user space actions taken in response to anomalies
|
||||
* 2300 - 2399 user space generated LSPP events
|
||||
* 2400 - 2499 user space crypto events
|
||||
* 2500 - 2999 future user space (maybe integrity labels and related events)
|
||||
*
|
||||
* Messages from 1000-1199 are bi-directional. 1200-1299 & 2100 - 2999 are
|
||||
* exclusively user space. 1300-2099 is kernel --> user space
|
||||
* communication.
|
||||
*/
|
||||
#define AUDIT_GET 1000 /* Get status */
|
||||
#define AUDIT_SET 1001 /* Set status (enable/disable/auditd) */
|
||||
#define AUDIT_LIST 1002 /* List syscall rules -- deprecated */
|
||||
#define AUDIT_ADD 1003 /* Add syscall rule -- deprecated */
|
||||
#define AUDIT_DEL 1004 /* Delete syscall rule -- deprecated */
|
||||
#define AUDIT_USER 1005 /* Message from userspace -- deprecated */
|
||||
#define AUDIT_LOGIN 1006 /* Define the login id and information */
|
||||
#define AUDIT_WATCH_INS 1007 /* Insert file/dir watch entry */
|
||||
#define AUDIT_WATCH_REM 1008 /* Remove file/dir watch entry */
|
||||
#define AUDIT_WATCH_LIST 1009 /* List all file/dir watches */
|
||||
#define AUDIT_SIGNAL_INFO 1010 /* Get info about sender of signal to auditd */
|
||||
#define AUDIT_ADD_RULE 1011 /* Add syscall filtering rule */
|
||||
#define AUDIT_DEL_RULE 1012 /* Delete syscall filtering rule */
|
||||
#define AUDIT_LIST_RULES 1013 /* List syscall filtering rules */
|
||||
#define AUDIT_TRIM 1014 /* Trim junk from watched tree */
|
||||
#define AUDIT_MAKE_EQUIV 1015 /* Append to watched tree */
|
||||
#define AUDIT_TTY_GET 1016 /* Get TTY auditing status */
|
||||
#define AUDIT_TTY_SET 1017 /* Set TTY auditing status */
|
||||
|
||||
#define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */
|
||||
#define AUDIT_USER_AVC 1107 /* We filter this differently */
|
||||
#define AUDIT_USER_TTY 1124 /* Non-ICANON TTY input meaning */
|
||||
#define AUDIT_LAST_USER_MSG 1199
|
||||
#define AUDIT_FIRST_USER_MSG2 2100 /* More user space messages */
|
||||
#define AUDIT_LAST_USER_MSG2 2999
|
||||
|
||||
#define AUDIT_DAEMON_START 1200 /* Daemon startup record */
|
||||
#define AUDIT_DAEMON_END 1201 /* Daemon normal stop record */
|
||||
#define AUDIT_DAEMON_ABORT 1202 /* Daemon error stop record */
|
||||
#define AUDIT_DAEMON_CONFIG 1203 /* Daemon config change */
|
||||
|
||||
#define AUDIT_SYSCALL 1300 /* Syscall event */
|
||||
/* #define AUDIT_FS_WATCH 1301 * Deprecated */
|
||||
#define AUDIT_PATH 1302 /* Filename path information */
|
||||
#define AUDIT_IPC 1303 /* IPC record */
|
||||
#define AUDIT_SOCKETCALL 1304 /* sys_socketcall arguments */
|
||||
#define AUDIT_CONFIG_CHANGE 1305 /* Audit system configuration change */
|
||||
#define AUDIT_SOCKADDR 1306 /* sockaddr copied as syscall arg */
|
||||
#define AUDIT_CWD 1307 /* Current working directory */
|
||||
#define AUDIT_EXECVE 1309 /* execve arguments */
|
||||
#define AUDIT_IPC_SET_PERM 1311 /* IPC new permissions record type */
|
||||
#define AUDIT_MQ_OPEN 1312 /* POSIX MQ open record type */
|
||||
#define AUDIT_MQ_SENDRECV 1313 /* POSIX MQ send/receive record type */
|
||||
#define AUDIT_MQ_NOTIFY 1314 /* POSIX MQ notify record type */
|
||||
#define AUDIT_MQ_GETSETATTR 1315 /* POSIX MQ get/set attribute record type */
|
||||
#define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */
|
||||
#define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */
|
||||
#define AUDIT_OBJ_PID 1318 /* ptrace target */
|
||||
#define AUDIT_TTY 1319 /* Input on an administrative TTY */
|
||||
#define AUDIT_EOE 1320 /* End of multi-record event */
|
||||
#define AUDIT_BPRM_FCAPS 1321 /* Information about fcaps increasing perms */
|
||||
#define AUDIT_CAPSET 1322 /* Record showing argument to sys_capset */
|
||||
#define AUDIT_MMAP 1323 /* Record showing descriptor and flags in mmap */
|
||||
#define AUDIT_NETFILTER_PKT 1324 /* Packets traversing netfilter chains */
|
||||
#define AUDIT_NETFILTER_CFG 1325 /* Netfilter chain modifications */
|
||||
|
||||
#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */
|
||||
#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */
|
||||
#define AUDIT_AVC_PATH 1402 /* dentry, vfsmount pair from avc */
|
||||
#define AUDIT_MAC_POLICY_LOAD 1403 /* Policy file load */
|
||||
#define AUDIT_MAC_STATUS 1404 /* Changed enforcing,permissive,off */
|
||||
#define AUDIT_MAC_CONFIG_CHANGE 1405 /* Changes to booleans */
|
||||
#define AUDIT_MAC_UNLBL_ALLOW 1406 /* NetLabel: allow unlabeled traffic */
|
||||
#define AUDIT_MAC_CIPSOV4_ADD 1407 /* NetLabel: add CIPSOv4 DOI entry */
|
||||
#define AUDIT_MAC_CIPSOV4_DEL 1408 /* NetLabel: del CIPSOv4 DOI entry */
|
||||
#define AUDIT_MAC_MAP_ADD 1409 /* NetLabel: add LSM domain mapping */
|
||||
#define AUDIT_MAC_MAP_DEL 1410 /* NetLabel: del LSM domain mapping */
|
||||
#define AUDIT_MAC_IPSEC_ADDSA 1411 /* Not used */
|
||||
#define AUDIT_MAC_IPSEC_DELSA 1412 /* Not used */
|
||||
#define AUDIT_MAC_IPSEC_ADDSPD 1413 /* Not used */
|
||||
#define AUDIT_MAC_IPSEC_DELSPD 1414 /* Not used */
|
||||
#define AUDIT_MAC_IPSEC_EVENT 1415 /* Audit an IPSec event */
|
||||
#define AUDIT_MAC_UNLBL_STCADD 1416 /* NetLabel: add a static label */
|
||||
#define AUDIT_MAC_UNLBL_STCDEL 1417 /* NetLabel: del a static label */
|
||||
|
||||
#define AUDIT_FIRST_KERN_ANOM_MSG 1700
|
||||
#define AUDIT_LAST_KERN_ANOM_MSG 1799
|
||||
#define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */
|
||||
#define AUDIT_ANOM_ABEND 1701 /* Process ended abnormally */
|
||||
#define AUDIT_ANOM_LINK 1702 /* Suspicious use of file links */
|
||||
#define AUDIT_INTEGRITY_DATA 1800 /* Data integrity verification */
|
||||
#define AUDIT_INTEGRITY_METADATA 1801 /* Metadata integrity verification */
|
||||
#define AUDIT_INTEGRITY_STATUS 1802 /* Integrity enable status */
|
||||
#define AUDIT_INTEGRITY_HASH 1803 /* Integrity HASH type */
|
||||
#define AUDIT_INTEGRITY_PCR 1804 /* PCR invalidation msgs */
|
||||
#define AUDIT_INTEGRITY_RULE 1805 /* policy rule */
|
||||
|
||||
#define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */
|
||||
|
||||
/* Rule flags */
|
||||
#define AUDIT_FILTER_USER 0x00 /* Apply rule to user-generated messages */
|
||||
#define AUDIT_FILTER_TASK 0x01 /* Apply rule at task creation (not syscall) */
|
||||
#define AUDIT_FILTER_ENTRY 0x02 /* Apply rule at syscall entry */
|
||||
#define AUDIT_FILTER_WATCH 0x03 /* Apply rule to file system watches */
|
||||
#define AUDIT_FILTER_EXIT 0x04 /* Apply rule at syscall exit */
|
||||
#define AUDIT_FILTER_TYPE 0x05 /* Apply rule at audit_log_start */
|
||||
|
||||
#define AUDIT_NR_FILTERS 6
|
||||
|
||||
#define AUDIT_FILTER_PREPEND 0x10 /* Prepend to front of list */
|
||||
|
||||
/* Rule actions */
|
||||
#define AUDIT_NEVER 0 /* Do not build context if rule matches */
|
||||
#define AUDIT_POSSIBLE 1 /* Build context if rule matches */
|
||||
#define AUDIT_ALWAYS 2 /* Generate audit record if rule matches */
|
||||
|
||||
/* Rule structure sizes -- if these change, different AUDIT_ADD and
|
||||
* AUDIT_LIST commands must be implemented. */
|
||||
#define AUDIT_MAX_FIELDS 64
|
||||
#define AUDIT_MAX_KEY_LEN 256
|
||||
#define AUDIT_BITMASK_SIZE 64
|
||||
#define AUDIT_WORD(nr) ((__u32)((nr)/32))
|
||||
#define AUDIT_BIT(nr) (1 << ((nr) - AUDIT_WORD(nr)*32))
|
||||
|
||||
#define AUDIT_SYSCALL_CLASSES 16
|
||||
#define AUDIT_CLASS_DIR_WRITE 0
|
||||
#define AUDIT_CLASS_DIR_WRITE_32 1
|
||||
#define AUDIT_CLASS_CHATTR 2
|
||||
#define AUDIT_CLASS_CHATTR_32 3
|
||||
#define AUDIT_CLASS_READ 4
|
||||
#define AUDIT_CLASS_READ_32 5
|
||||
#define AUDIT_CLASS_WRITE 6
|
||||
#define AUDIT_CLASS_WRITE_32 7
|
||||
#define AUDIT_CLASS_SIGNAL 8
|
||||
#define AUDIT_CLASS_SIGNAL_32 9
|
||||
|
||||
/* This bitmask is used to validate user input. It represents all bits that
|
||||
* are currently used in an audit field constant understood by the kernel.
|
||||
* If you are adding a new #define AUDIT_<whatever>, please ensure that
|
||||
* AUDIT_UNUSED_BITS is updated if need be. */
|
||||
#define AUDIT_UNUSED_BITS 0x07FFFC00
|
||||
|
||||
/* AUDIT_FIELD_COMPARE rule list */
|
||||
#define AUDIT_COMPARE_UID_TO_OBJ_UID 1
|
||||
#define AUDIT_COMPARE_GID_TO_OBJ_GID 2
|
||||
#define AUDIT_COMPARE_EUID_TO_OBJ_UID 3
|
||||
#define AUDIT_COMPARE_EGID_TO_OBJ_GID 4
|
||||
#define AUDIT_COMPARE_AUID_TO_OBJ_UID 5
|
||||
#define AUDIT_COMPARE_SUID_TO_OBJ_UID 6
|
||||
#define AUDIT_COMPARE_SGID_TO_OBJ_GID 7
|
||||
#define AUDIT_COMPARE_FSUID_TO_OBJ_UID 8
|
||||
#define AUDIT_COMPARE_FSGID_TO_OBJ_GID 9
|
||||
|
||||
#define AUDIT_COMPARE_UID_TO_AUID 10
|
||||
#define AUDIT_COMPARE_UID_TO_EUID 11
|
||||
#define AUDIT_COMPARE_UID_TO_FSUID 12
|
||||
#define AUDIT_COMPARE_UID_TO_SUID 13
|
||||
|
||||
#define AUDIT_COMPARE_AUID_TO_FSUID 14
|
||||
#define AUDIT_COMPARE_AUID_TO_SUID 15
|
||||
#define AUDIT_COMPARE_AUID_TO_EUID 16
|
||||
|
||||
#define AUDIT_COMPARE_EUID_TO_SUID 17
|
||||
#define AUDIT_COMPARE_EUID_TO_FSUID 18
|
||||
|
||||
#define AUDIT_COMPARE_SUID_TO_FSUID 19
|
||||
|
||||
#define AUDIT_COMPARE_GID_TO_EGID 20
|
||||
#define AUDIT_COMPARE_GID_TO_FSGID 21
|
||||
#define AUDIT_COMPARE_GID_TO_SGID 22
|
||||
|
||||
#define AUDIT_COMPARE_EGID_TO_FSGID 23
|
||||
#define AUDIT_COMPARE_EGID_TO_SGID 24
|
||||
#define AUDIT_COMPARE_SGID_TO_FSGID 25
|
||||
|
||||
#define AUDIT_MAX_FIELD_COMPARE AUDIT_COMPARE_SGID_TO_FSGID
|
||||
|
||||
/* Rule fields */
|
||||
/* These are useful when checking the
|
||||
* task structure at task creation time
|
||||
* (AUDIT_PER_TASK). */
|
||||
#define AUDIT_PID 0
|
||||
#define AUDIT_UID 1
|
||||
#define AUDIT_EUID 2
|
||||
#define AUDIT_SUID 3
|
||||
#define AUDIT_FSUID 4
|
||||
#define AUDIT_GID 5
|
||||
#define AUDIT_EGID 6
|
||||
#define AUDIT_SGID 7
|
||||
#define AUDIT_FSGID 8
|
||||
#define AUDIT_LOGINUID 9
|
||||
#define AUDIT_PERS 10
|
||||
#define AUDIT_ARCH 11
|
||||
#define AUDIT_MSGTYPE 12
|
||||
#define AUDIT_SUBJ_USER 13 /* security label user */
|
||||
#define AUDIT_SUBJ_ROLE 14 /* security label role */
|
||||
#define AUDIT_SUBJ_TYPE 15 /* security label type */
|
||||
#define AUDIT_SUBJ_SEN 16 /* security label sensitivity label */
|
||||
#define AUDIT_SUBJ_CLR 17 /* security label clearance label */
|
||||
#define AUDIT_PPID 18
|
||||
#define AUDIT_OBJ_USER 19
|
||||
#define AUDIT_OBJ_ROLE 20
|
||||
#define AUDIT_OBJ_TYPE 21
|
||||
#define AUDIT_OBJ_LEV_LOW 22
|
||||
#define AUDIT_OBJ_LEV_HIGH 23
|
||||
|
||||
/* These are ONLY useful when checking
|
||||
* at syscall exit time (AUDIT_AT_EXIT). */
|
||||
#define AUDIT_DEVMAJOR 100
|
||||
#define AUDIT_DEVMINOR 101
|
||||
#define AUDIT_INODE 102
|
||||
#define AUDIT_EXIT 103
|
||||
#define AUDIT_SUCCESS 104 /* exit >= 0; value ignored */
|
||||
#define AUDIT_WATCH 105
|
||||
#define AUDIT_PERM 106
|
||||
#define AUDIT_DIR 107
|
||||
#define AUDIT_FILETYPE 108
|
||||
#define AUDIT_OBJ_UID 109
|
||||
#define AUDIT_OBJ_GID 110
|
||||
#define AUDIT_FIELD_COMPARE 111
|
||||
|
||||
#define AUDIT_ARG0 200
|
||||
#define AUDIT_ARG1 (AUDIT_ARG0+1)
|
||||
#define AUDIT_ARG2 (AUDIT_ARG0+2)
|
||||
#define AUDIT_ARG3 (AUDIT_ARG0+3)
|
||||
|
||||
#define AUDIT_FILTERKEY 210
|
||||
|
||||
#define AUDIT_NEGATE 0x80000000
|
||||
|
||||
/* These are the supported operators.
|
||||
* 4 2 1 8
|
||||
* = > < ?
|
||||
* ----------
|
||||
* 0 0 0 0 00 nonsense
|
||||
* 0 0 0 1 08 & bit mask
|
||||
* 0 0 1 0 10 <
|
||||
* 0 1 0 0 20 >
|
||||
* 0 1 1 0 30 !=
|
||||
* 1 0 0 0 40 =
|
||||
* 1 0 0 1 48 &= bit test
|
||||
* 1 0 1 0 50 <=
|
||||
* 1 1 0 0 60 >=
|
||||
* 1 1 1 1 78 all operators
|
||||
*/
|
||||
#define AUDIT_BIT_MASK 0x08000000
|
||||
#define AUDIT_LESS_THAN 0x10000000
|
||||
#define AUDIT_GREATER_THAN 0x20000000
|
||||
#define AUDIT_NOT_EQUAL 0x30000000
|
||||
#define AUDIT_EQUAL 0x40000000
|
||||
#define AUDIT_BIT_TEST (AUDIT_BIT_MASK|AUDIT_EQUAL)
|
||||
#define AUDIT_LESS_THAN_OR_EQUAL (AUDIT_LESS_THAN|AUDIT_EQUAL)
|
||||
#define AUDIT_GREATER_THAN_OR_EQUAL (AUDIT_GREATER_THAN|AUDIT_EQUAL)
|
||||
#define AUDIT_OPERATORS (AUDIT_EQUAL|AUDIT_NOT_EQUAL|AUDIT_BIT_MASK)
|
||||
|
||||
enum {
|
||||
Audit_equal,
|
||||
Audit_not_equal,
|
||||
Audit_bitmask,
|
||||
Audit_bittest,
|
||||
Audit_lt,
|
||||
Audit_gt,
|
||||
Audit_le,
|
||||
Audit_ge,
|
||||
Audit_bad
|
||||
};
|
||||
|
||||
/* Status symbols */
|
||||
/* Mask values */
|
||||
#define AUDIT_STATUS_ENABLED 0x0001
|
||||
#define AUDIT_STATUS_FAILURE 0x0002
|
||||
#define AUDIT_STATUS_PID 0x0004
|
||||
#define AUDIT_STATUS_RATE_LIMIT 0x0008
|
||||
#define AUDIT_STATUS_BACKLOG_LIMIT 0x0010
|
||||
/* Failure-to-log actions */
|
||||
#define AUDIT_FAIL_SILENT 0
|
||||
#define AUDIT_FAIL_PRINTK 1
|
||||
#define AUDIT_FAIL_PANIC 2
|
||||
|
||||
/* distinguish syscall tables */
|
||||
#define __AUDIT_ARCH_64BIT 0x80000000
|
||||
#define __AUDIT_ARCH_LE 0x40000000
|
||||
#define AUDIT_ARCH_ALPHA (EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
|
||||
#define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE)
|
||||
#define AUDIT_ARCH_ARMEB (EM_ARM)
|
||||
#define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE)
|
||||
#define AUDIT_ARCH_FRV (EM_FRV)
|
||||
#define AUDIT_ARCH_H8300 (EM_H8_300)
|
||||
#define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE)
|
||||
#define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
|
||||
#define AUDIT_ARCH_M32R (EM_M32R)
|
||||
#define AUDIT_ARCH_M68K (EM_68K)
|
||||
#define AUDIT_ARCH_MIPS (EM_MIPS)
|
||||
#define AUDIT_ARCH_MIPSEL (EM_MIPS|__AUDIT_ARCH_LE)
|
||||
#define AUDIT_ARCH_MIPS64 (EM_MIPS|__AUDIT_ARCH_64BIT)
|
||||
#define AUDIT_ARCH_MIPSEL64 (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
|
||||
#define AUDIT_ARCH_PARISC (EM_PARISC)
|
||||
#define AUDIT_ARCH_PARISC64 (EM_PARISC|__AUDIT_ARCH_64BIT)
|
||||
#define AUDIT_ARCH_PPC (EM_PPC)
|
||||
#define AUDIT_ARCH_PPC64 (EM_PPC64|__AUDIT_ARCH_64BIT)
|
||||
#define AUDIT_ARCH_S390 (EM_S390)
|
||||
#define AUDIT_ARCH_S390X (EM_S390|__AUDIT_ARCH_64BIT)
|
||||
#define AUDIT_ARCH_SH (EM_SH)
|
||||
#define AUDIT_ARCH_SHEL (EM_SH|__AUDIT_ARCH_LE)
|
||||
#define AUDIT_ARCH_SH64 (EM_SH|__AUDIT_ARCH_64BIT)
|
||||
#define AUDIT_ARCH_SHEL64 (EM_SH|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
|
||||
#define AUDIT_ARCH_SPARC (EM_SPARC)
|
||||
#define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT)
|
||||
#define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
|
||||
|
||||
#define AUDIT_PERM_EXEC 1
|
||||
#define AUDIT_PERM_WRITE 2
|
||||
#define AUDIT_PERM_READ 4
|
||||
#define AUDIT_PERM_ATTR 8
|
||||
|
||||
struct audit_status {
|
||||
__u32 mask; /* Bit mask for valid entries */
|
||||
__u32 enabled; /* 1 = enabled, 0 = disabled */
|
||||
__u32 failure; /* Failure-to-log action */
|
||||
__u32 pid; /* pid of auditd process */
|
||||
__u32 rate_limit; /* messages rate limit (per second) */
|
||||
__u32 backlog_limit; /* waiting messages limit */
|
||||
__u32 lost; /* messages lost */
|
||||
__u32 backlog; /* messages waiting in queue */
|
||||
};
|
||||
|
||||
struct audit_tty_status {
|
||||
__u32 enabled; /* 1 = enabled, 0 = disabled */
|
||||
};
|
||||
|
||||
/* audit_rule_data supports filter rules with both integer and string
|
||||
* fields. It corresponds with AUDIT_ADD_RULE, AUDIT_DEL_RULE and
|
||||
* AUDIT_LIST_RULES requests.
|
||||
*/
|
||||
struct audit_rule_data {
|
||||
__u32 flags; /* AUDIT_PER_{TASK,CALL}, AUDIT_PREPEND */
|
||||
__u32 action; /* AUDIT_NEVER, AUDIT_POSSIBLE, AUDIT_ALWAYS */
|
||||
__u32 field_count;
|
||||
__u32 mask[AUDIT_BITMASK_SIZE]; /* syscall(s) affected */
|
||||
__u32 fields[AUDIT_MAX_FIELDS];
|
||||
__u32 values[AUDIT_MAX_FIELDS];
|
||||
__u32 fieldflags[AUDIT_MAX_FIELDS];
|
||||
__u32 buflen; /* total length of string fields */
|
||||
char buf[0]; /* string fields buffer */
|
||||
};
|
||||
|
||||
/* audit_rule is supported to maintain backward compatibility with
|
||||
* userspace. It supports integer fields only and corresponds to
|
||||
* AUDIT_ADD, AUDIT_DEL and AUDIT_LIST requests.
|
||||
*/
|
||||
struct audit_rule { /* for AUDIT_LIST, AUDIT_ADD, and AUDIT_DEL */
|
||||
__u32 flags; /* AUDIT_PER_{TASK,CALL}, AUDIT_PREPEND */
|
||||
__u32 action; /* AUDIT_NEVER, AUDIT_POSSIBLE, AUDIT_ALWAYS */
|
||||
__u32 field_count;
|
||||
__u32 mask[AUDIT_BITMASK_SIZE];
|
||||
__u32 fields[AUDIT_MAX_FIELDS];
|
||||
__u32 values[AUDIT_MAX_FIELDS];
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/sched.h>
|
||||
#include <uapi/linux/audit.h>
|
||||
|
||||
struct audit_sig_info {
|
||||
uid_t uid;
|
||||
|
|
@ -442,6 +65,8 @@ struct audit_krule {
|
|||
struct audit_field {
|
||||
u32 type;
|
||||
u32 val;
|
||||
kuid_t uid;
|
||||
kgid_t gid;
|
||||
u32 op;
|
||||
char *lsm_str;
|
||||
void *lsm_rule;
|
||||
|
|
@ -450,6 +75,16 @@ struct audit_field {
|
|||
extern int __init audit_register_class(int class, unsigned *list);
|
||||
extern int audit_classify_syscall(int abi, unsigned syscall);
|
||||
extern int audit_classify_arch(int arch);
|
||||
|
||||
/* audit_names->type values */
|
||||
#define AUDIT_TYPE_UNKNOWN 0 /* we don't know yet */
|
||||
#define AUDIT_TYPE_NORMAL 1 /* a "normal" audit record */
|
||||
#define AUDIT_TYPE_PARENT 2 /* a parent audit record */
|
||||
#define AUDIT_TYPE_CHILD_DELETE 3 /* a child being deleted */
|
||||
#define AUDIT_TYPE_CHILD_CREATE 4 /* a child being created */
|
||||
|
||||
struct filename;
|
||||
|
||||
#ifdef CONFIG_AUDITSYSCALL
|
||||
/* These are defined in auditsc.c */
|
||||
/* Public API */
|
||||
|
|
@ -459,11 +94,14 @@ extern void __audit_syscall_entry(int arch,
|
|||
int major, unsigned long a0, unsigned long a1,
|
||||
unsigned long a2, unsigned long a3);
|
||||
extern void __audit_syscall_exit(int ret_success, long ret_value);
|
||||
extern void __audit_getname(const char *name);
|
||||
extern void audit_putname(const char *name);
|
||||
extern void __audit_inode(const char *name, const struct dentry *dentry);
|
||||
extern void __audit_inode_child(const struct dentry *dentry,
|
||||
const struct inode *parent);
|
||||
extern struct filename *__audit_reusename(const __user char *uptr);
|
||||
extern void __audit_getname(struct filename *name);
|
||||
extern void audit_putname(struct filename *name);
|
||||
extern void __audit_inode(struct filename *name, const struct dentry *dentry,
|
||||
unsigned int parent);
|
||||
extern void __audit_inode_child(const struct inode *parent,
|
||||
const struct dentry *dentry,
|
||||
const unsigned char type);
|
||||
extern void __audit_seccomp(unsigned long syscall, long signr, int code);
|
||||
extern void __audit_ptrace(struct task_struct *t);
|
||||
|
||||
|
|
@ -493,19 +131,27 @@ static inline void audit_syscall_exit(void *pt_regs)
|
|||
__audit_syscall_exit(success, return_code);
|
||||
}
|
||||
}
|
||||
static inline void audit_getname(const char *name)
|
||||
static inline struct filename *audit_reusename(const __user char *name)
|
||||
{
|
||||
if (unlikely(!audit_dummy_context()))
|
||||
return __audit_reusename(name);
|
||||
return NULL;
|
||||
}
|
||||
static inline void audit_getname(struct filename *name)
|
||||
{
|
||||
if (unlikely(!audit_dummy_context()))
|
||||
__audit_getname(name);
|
||||
}
|
||||
static inline void audit_inode(const char *name, const struct dentry *dentry) {
|
||||
static inline void audit_inode(struct filename *name, const struct dentry *dentry,
|
||||
unsigned int parent) {
|
||||
if (unlikely(!audit_dummy_context()))
|
||||
__audit_inode(name, dentry);
|
||||
__audit_inode(name, dentry, parent);
|
||||
}
|
||||
static inline void audit_inode_child(const struct dentry *dentry,
|
||||
const struct inode *parent) {
|
||||
static inline void audit_inode_child(const struct inode *parent,
|
||||
const struct dentry *dentry,
|
||||
const unsigned char type) {
|
||||
if (unlikely(!audit_dummy_context()))
|
||||
__audit_inode_child(dentry, parent);
|
||||
__audit_inode_child(parent, dentry, type);
|
||||
}
|
||||
void audit_core_dumps(long signr);
|
||||
|
||||
|
|
@ -525,10 +171,20 @@ static inline void audit_ptrace(struct task_struct *t)
|
|||
extern unsigned int audit_serial(void);
|
||||
extern int auditsc_get_stamp(struct audit_context *ctx,
|
||||
struct timespec *t, unsigned int *serial);
|
||||
extern int audit_set_loginuid(uid_t loginuid);
|
||||
#define audit_get_loginuid(t) ((t)->loginuid)
|
||||
#define audit_get_sessionid(t) ((t)->sessionid)
|
||||
extern int audit_set_loginuid(kuid_t loginuid);
|
||||
|
||||
static inline kuid_t audit_get_loginuid(struct task_struct *tsk)
|
||||
{
|
||||
return tsk->loginuid;
|
||||
}
|
||||
|
||||
static inline int audit_get_sessionid(struct task_struct *tsk)
|
||||
{
|
||||
return tsk->sessionid;
|
||||
}
|
||||
|
||||
extern void audit_log_task_context(struct audit_buffer *ab);
|
||||
extern void audit_log_task_info(struct audit_buffer *ab, struct task_struct *tsk);
|
||||
extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp);
|
||||
extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode);
|
||||
extern int __audit_bprm(struct linux_binprm *bprm);
|
||||
|
|
@ -623,37 +279,111 @@ static inline void audit_mmap_fd(int fd, int flags)
|
|||
extern int audit_n_rules;
|
||||
extern int audit_signals;
|
||||
#else /* CONFIG_AUDITSYSCALL */
|
||||
#define audit_alloc(t) ({ 0; })
|
||||
#define audit_free(t) do { ; } while (0)
|
||||
#define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0)
|
||||
#define audit_syscall_exit(r) do { ; } while (0)
|
||||
#define audit_dummy_context() 1
|
||||
#define audit_getname(n) do { ; } while (0)
|
||||
#define audit_putname(n) do { ; } while (0)
|
||||
#define __audit_inode(n,d) do { ; } while (0)
|
||||
#define __audit_inode_child(i,p) do { ; } while (0)
|
||||
#define audit_inode(n,d) do { (void)(d); } while (0)
|
||||
#define audit_inode_child(i,p) do { ; } while (0)
|
||||
#define audit_core_dumps(i) do { ; } while (0)
|
||||
#define audit_seccomp(i,s,c) do { ; } while (0)
|
||||
#define auditsc_get_stamp(c,t,s) (0)
|
||||
#define audit_get_loginuid(t) (-1)
|
||||
#define audit_get_sessionid(t) (-1)
|
||||
#define audit_log_task_context(b) do { ; } while (0)
|
||||
#define audit_ipc_obj(i) ((void)0)
|
||||
#define audit_ipc_set_perm(q,u,g,m) ((void)0)
|
||||
#define audit_bprm(p) ({ 0; })
|
||||
#define audit_socketcall(n,a) ((void)0)
|
||||
#define audit_fd_pair(n,a) ((void)0)
|
||||
#define audit_sockaddr(len, addr) ({ 0; })
|
||||
#define audit_mq_open(o,m,a) ((void)0)
|
||||
#define audit_mq_sendrecv(d,l,p,t) ((void)0)
|
||||
#define audit_mq_notify(d,n) ((void)0)
|
||||
#define audit_mq_getsetattr(d,s) ((void)0)
|
||||
#define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; })
|
||||
#define audit_log_capset(pid, ncr, ocr) ((void)0)
|
||||
#define audit_mmap_fd(fd, flags) ((void)0)
|
||||
#define audit_ptrace(t) ((void)0)
|
||||
static inline int audit_alloc(struct task_struct *task)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void audit_free(struct task_struct *task)
|
||||
{ }
|
||||
static inline void audit_syscall_entry(int arch, int major, unsigned long a0,
|
||||
unsigned long a1, unsigned long a2,
|
||||
unsigned long a3)
|
||||
{ }
|
||||
static inline void audit_syscall_exit(void *pt_regs)
|
||||
{ }
|
||||
static inline int audit_dummy_context(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
static inline struct filename *audit_reusename(const __user char *name)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
static inline void audit_getname(struct filename *name)
|
||||
{ }
|
||||
static inline void audit_putname(struct filename *name)
|
||||
{ }
|
||||
static inline void __audit_inode(struct filename *name,
|
||||
const struct dentry *dentry,
|
||||
unsigned int parent)
|
||||
{ }
|
||||
static inline void __audit_inode_child(const struct inode *parent,
|
||||
const struct dentry *dentry,
|
||||
const unsigned char type)
|
||||
{ }
|
||||
static inline void audit_inode(struct filename *name,
|
||||
const struct dentry *dentry,
|
||||
unsigned int parent)
|
||||
{ }
|
||||
static inline void audit_inode_child(const struct inode *parent,
|
||||
const struct dentry *dentry,
|
||||
const unsigned char type)
|
||||
{ }
|
||||
static inline void audit_core_dumps(long signr)
|
||||
{ }
|
||||
static inline void __audit_seccomp(unsigned long syscall, long signr, int code)
|
||||
{ }
|
||||
static inline void audit_seccomp(unsigned long syscall, long signr, int code)
|
||||
{ }
|
||||
static inline int auditsc_get_stamp(struct audit_context *ctx,
|
||||
struct timespec *t, unsigned int *serial)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline kuid_t audit_get_loginuid(struct task_struct *tsk)
|
||||
{
|
||||
return INVALID_UID;
|
||||
}
|
||||
static inline int audit_get_sessionid(struct task_struct *tsk)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
static inline void audit_log_task_context(struct audit_buffer *ab)
|
||||
{ }
|
||||
static inline void audit_log_task_info(struct audit_buffer *ab,
|
||||
struct task_struct *tsk)
|
||||
{ }
|
||||
static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
|
||||
{ }
|
||||
static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid,
|
||||
gid_t gid, umode_t mode)
|
||||
{ }
|
||||
static inline int audit_bprm(struct linux_binprm *bprm)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void audit_socketcall(int nargs, unsigned long *args)
|
||||
{ }
|
||||
static inline void audit_fd_pair(int fd1, int fd2)
|
||||
{ }
|
||||
static inline int audit_sockaddr(int len, void *addr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr)
|
||||
{ }
|
||||
static inline void audit_mq_sendrecv(mqd_t mqdes, size_t msg_len,
|
||||
unsigned int msg_prio,
|
||||
const struct timespec *abs_timeout)
|
||||
{ }
|
||||
static inline void audit_mq_notify(mqd_t mqdes,
|
||||
const struct sigevent *notification)
|
||||
{ }
|
||||
static inline void audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
|
||||
{ }
|
||||
static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm,
|
||||
const struct cred *new,
|
||||
const struct cred *old)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void audit_log_capset(pid_t pid, const struct cred *new,
|
||||
const struct cred *old)
|
||||
{ }
|
||||
static inline void audit_mmap_fd(int fd, int flags)
|
||||
{ }
|
||||
static inline void audit_ptrace(struct task_struct *t)
|
||||
{ }
|
||||
#define audit_n_rules 0
|
||||
#define audit_signals 0
|
||||
#endif /* CONFIG_AUDITSYSCALL */
|
||||
|
|
@ -677,7 +407,6 @@ extern void audit_log_n_hex(struct audit_buffer *ab,
|
|||
extern void audit_log_n_string(struct audit_buffer *ab,
|
||||
const char *buf,
|
||||
size_t n);
|
||||
#define audit_log_string(a,b) audit_log_n_string(a, b, strlen(b));
|
||||
extern void audit_log_n_untrustedstring(struct audit_buffer *ab,
|
||||
const char *string,
|
||||
size_t n);
|
||||
|
|
@ -694,34 +423,62 @@ extern void audit_log_lost(const char *message);
|
|||
#ifdef CONFIG_SECURITY
|
||||
extern void audit_log_secctx(struct audit_buffer *ab, u32 secid);
|
||||
#else
|
||||
#define audit_log_secctx(b,s) do { ; } while (0)
|
||||
static inline void audit_log_secctx(struct audit_buffer *ab, u32 secid)
|
||||
{ }
|
||||
#endif
|
||||
|
||||
extern int audit_update_lsm_rules(void);
|
||||
|
||||
/* Private API (for audit.c only) */
|
||||
extern int audit_filter_user(struct netlink_skb_parms *cb);
|
||||
extern int audit_filter_user(void);
|
||||
extern int audit_filter_type(int type);
|
||||
extern int audit_receive_filter(int type, int pid, int uid, int seq,
|
||||
void *data, size_t datasz, uid_t loginuid,
|
||||
extern int audit_receive_filter(int type, int pid, int seq,
|
||||
void *data, size_t datasz, kuid_t loginuid,
|
||||
u32 sessionid, u32 sid);
|
||||
extern int audit_enabled;
|
||||
#else
|
||||
#define audit_log(c,g,t,f,...) do { ; } while (0)
|
||||
#define audit_log_start(c,g,t) ({ NULL; })
|
||||
#define audit_log_vformat(b,f,a) do { ; } while (0)
|
||||
#define audit_log_format(b,f,...) do { ; } while (0)
|
||||
#define audit_log_end(b) do { ; } while (0)
|
||||
#define audit_log_n_hex(a,b,l) do { ; } while (0)
|
||||
#define audit_log_n_string(a,c,l) do { ; } while (0)
|
||||
#define audit_log_string(a,c) do { ; } while (0)
|
||||
#define audit_log_n_untrustedstring(a,n,s) do { ; } while (0)
|
||||
#define audit_log_untrustedstring(a,s) do { ; } while (0)
|
||||
#define audit_log_d_path(b, p, d) do { ; } while (0)
|
||||
#define audit_log_key(b, k) do { ; } while (0)
|
||||
#define audit_log_link_denied(o, l) do { ; } while (0)
|
||||
#define audit_log_secctx(b,s) do { ; } while (0)
|
||||
#else /* CONFIG_AUDIT */
|
||||
static inline __printf(4, 5)
|
||||
void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
|
||||
const char *fmt, ...)
|
||||
{ }
|
||||
static inline struct audit_buffer *audit_log_start(struct audit_context *ctx,
|
||||
gfp_t gfp_mask, int type)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
static inline __printf(2, 3)
|
||||
void audit_log_format(struct audit_buffer *ab, const char *fmt, ...)
|
||||
{ }
|
||||
static inline void audit_log_end(struct audit_buffer *ab)
|
||||
{ }
|
||||
static inline void audit_log_n_hex(struct audit_buffer *ab,
|
||||
const unsigned char *buf, size_t len)
|
||||
{ }
|
||||
static inline void audit_log_n_string(struct audit_buffer *ab,
|
||||
const char *buf, size_t n)
|
||||
{ }
|
||||
static inline void audit_log_n_untrustedstring(struct audit_buffer *ab,
|
||||
const char *string, size_t n)
|
||||
{ }
|
||||
static inline void audit_log_untrustedstring(struct audit_buffer *ab,
|
||||
const char *string)
|
||||
{ }
|
||||
static inline void audit_log_d_path(struct audit_buffer *ab,
|
||||
const char *prefix,
|
||||
const struct path *path)
|
||||
{ }
|
||||
static inline void audit_log_key(struct audit_buffer *ab, char *key)
|
||||
{ }
|
||||
static inline void audit_log_link_denied(const char *string,
|
||||
const struct path *link)
|
||||
{ }
|
||||
static inline void audit_log_secctx(struct audit_buffer *ab, u32 secid)
|
||||
{ }
|
||||
#define audit_enabled 0
|
||||
#endif
|
||||
#endif
|
||||
#endif /* CONFIG_AUDIT */
|
||||
static inline void audit_log_string(struct audit_buffer *ab, const char *buf)
|
||||
{
|
||||
audit_log_n_string(ab, buf, strlen(buf));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -10,77 +10,11 @@
|
|||
*
|
||||
* ----------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#ifndef _LINUX_AUTO_FS_H
|
||||
#define _LINUX_AUTO_FS_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/fs.h>
|
||||
#include <linux/limits.h>
|
||||
#include <linux/ioctl.h>
|
||||
#else
|
||||
#include <sys/ioctl.h>
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
/* This file describes autofs v3 */
|
||||
#define AUTOFS_PROTO_VERSION 3
|
||||
|
||||
/* Range of protocol versions defined */
|
||||
#define AUTOFS_MAX_PROTO_VERSION AUTOFS_PROTO_VERSION
|
||||
#define AUTOFS_MIN_PROTO_VERSION AUTOFS_PROTO_VERSION
|
||||
|
||||
/*
|
||||
* Architectures where both 32- and 64-bit binaries can be executed
|
||||
* on 64-bit kernels need this. This keeps the structure format
|
||||
* uniform, and makes sure the wait_queue_token isn't too big to be
|
||||
* passed back down to the kernel.
|
||||
*
|
||||
* This assumes that on these architectures:
|
||||
* mode 32 bit 64 bit
|
||||
* -------------------------
|
||||
* int 32 bit 32 bit
|
||||
* long 32 bit 64 bit
|
||||
*
|
||||
* If so, 32-bit user-space code should be backwards compatible.
|
||||
*/
|
||||
|
||||
#if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) \
|
||||
|| defined(__powerpc__) || defined(__s390__)
|
||||
typedef unsigned int autofs_wqt_t;
|
||||
#else
|
||||
typedef unsigned long autofs_wqt_t;
|
||||
#endif
|
||||
|
||||
/* Packet types */
|
||||
#define autofs_ptype_missing 0 /* Missing entry (mount request) */
|
||||
#define autofs_ptype_expire 1 /* Expire entry (umount request) */
|
||||
|
||||
struct autofs_packet_hdr {
|
||||
int proto_version; /* Protocol version */
|
||||
int type; /* Type of packet */
|
||||
};
|
||||
|
||||
struct autofs_packet_missing {
|
||||
struct autofs_packet_hdr hdr;
|
||||
autofs_wqt_t wait_queue_token;
|
||||
int len;
|
||||
char name[NAME_MAX+1];
|
||||
};
|
||||
|
||||
/* v3 expire (via ioctl) */
|
||||
struct autofs_packet_expire {
|
||||
struct autofs_packet_hdr hdr;
|
||||
int len;
|
||||
char name[NAME_MAX+1];
|
||||
};
|
||||
|
||||
#define AUTOFS_IOC_READY _IO(0x93,0x60)
|
||||
#define AUTOFS_IOC_FAIL _IO(0x93,0x61)
|
||||
#define AUTOFS_IOC_CATATONIC _IO(0x93,0x62)
|
||||
#define AUTOFS_IOC_PROTOVER _IOR(0x93,0x63,int)
|
||||
#define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,compat_ulong_t)
|
||||
#define AUTOFS_IOC_SETTIMEOUT _IOWR(0x93,0x64,unsigned long)
|
||||
#define AUTOFS_IOC_EXPIRE _IOR(0x93,0x65,struct autofs_packet_expire)
|
||||
|
||||
#include <uapi/linux/auto_fs.h>
|
||||
#endif /* _LINUX_AUTO_FS_H */
|
||||
|
|
|
|||
|
|
@ -1,39 +1,8 @@
|
|||
#ifndef _LINUX_AUXVEC_H
|
||||
#define _LINUX_AUXVEC_H
|
||||
|
||||
#include <asm/auxvec.h>
|
||||
#include <uapi/linux/auxvec.h>
|
||||
|
||||
/* Symbolic values for the entries in the auxiliary table
|
||||
put on the initial stack */
|
||||
#define AT_NULL 0 /* end of vector */
|
||||
#define AT_IGNORE 1 /* entry should be ignored */
|
||||
#define AT_EXECFD 2 /* file descriptor of program */
|
||||
#define AT_PHDR 3 /* program headers for program */
|
||||
#define AT_PHENT 4 /* size of program header entry */
|
||||
#define AT_PHNUM 5 /* number of program headers */
|
||||
#define AT_PAGESZ 6 /* system page size */
|
||||
#define AT_BASE 7 /* base address of interpreter */
|
||||
#define AT_FLAGS 8 /* flags */
|
||||
#define AT_ENTRY 9 /* entry point of program */
|
||||
#define AT_NOTELF 10 /* program is not ELF */
|
||||
#define AT_UID 11 /* real uid */
|
||||
#define AT_EUID 12 /* effective uid */
|
||||
#define AT_GID 13 /* real gid */
|
||||
#define AT_EGID 14 /* effective gid */
|
||||
#define AT_PLATFORM 15 /* string identifying CPU for optimizations */
|
||||
#define AT_HWCAP 16 /* arch dependent hints at CPU capabilities */
|
||||
#define AT_CLKTCK 17 /* frequency at which times() increments */
|
||||
/* AT_* values 18 through 22 are reserved */
|
||||
#define AT_SECURE 23 /* secure mode boolean */
|
||||
#define AT_BASE_PLATFORM 24 /* string identifying real platform, may
|
||||
* differ from AT_PLATFORM. */
|
||||
#define AT_RANDOM 25 /* address of 16 random bytes */
|
||||
|
||||
#define AT_EXECFN 31 /* filename of program */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#define AT_VECTOR_SIZE_BASE 19 /* NEW_AUX_ENT entries in auxiliary table */
|
||||
/* number of "#define AT_.*" above, minus {AT_NULL, AT_IGNORE, AT_NOTELF} */
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_AUXVEC_H */
|
||||
|
|
|
|||
|
|
@ -3,7 +3,20 @@
|
|||
|
||||
#include <linux/compiler.h>
|
||||
|
||||
unsigned bcd2bin(unsigned char val) __attribute_const__;
|
||||
unsigned char bin2bcd(unsigned val) __attribute_const__;
|
||||
#define bcd2bin(x) \
|
||||
(__builtin_constant_p((u8 )(x)) ? \
|
||||
const_bcd2bin(x) : \
|
||||
_bcd2bin(x))
|
||||
|
||||
#define bin2bcd(x) \
|
||||
(__builtin_constant_p((u8 )(x)) ? \
|
||||
const_bin2bcd(x) : \
|
||||
_bin2bcd(x))
|
||||
|
||||
#define const_bcd2bin(x) (((x) & 0x0f) + ((x) >> 4) * 10)
|
||||
#define const_bin2bcd(x) ((((x) / 10) << 4) + (x) % 10)
|
||||
|
||||
unsigned _bcd2bin(unsigned char val) __attribute_const__;
|
||||
unsigned char _bin2bcd(unsigned val) __attribute_const__;
|
||||
|
||||
#endif /* _BCD_H */
|
||||
|
|
|
|||
22
include/linux/bcm2835_timer.h
Normal file
22
include/linux/bcm2835_timer.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright 2012 Simon Arlott
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __BCM2835_TIMER_H
|
||||
#define __BCM2835_TIMER_H
|
||||
|
||||
#include <asm/mach/time.h>
|
||||
|
||||
extern struct sys_timer bcm2835_timer;
|
||||
|
||||
#endif
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#include <linux/bcma/bcma_driver_gmac_cmn.h>
|
||||
#include <linux/ssb/ssb.h> /* SPROM sharing */
|
||||
|
||||
#include "bcma_regs.h"
|
||||
#include <linux/bcma/bcma_regs.h>
|
||||
|
||||
struct bcma_device;
|
||||
struct bcma_bus;
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@
|
|||
#define BCMA_CC_CHIPST_4706_SFLASH_TYPE BIT(2) /* 0: 8b-p/ST-s flash, 1: 16b-p/Atmal-s flash */
|
||||
#define BCMA_CC_CHIPST_4706_MIPS_BENDIAN BIT(3) /* 0: little, 1: big endian */
|
||||
#define BCMA_CC_CHIPST_4706_PCIE1_DISABLE BIT(5) /* PCIE1 enable strap pin */
|
||||
#define BCMA_CC_CHIPST_5357_NAND_BOOT BIT(4) /* NAND boot, valid for CC rev 38 and/or BCM5357 */
|
||||
#define BCMA_CC_JCMD 0x0030 /* Rev >= 10 only */
|
||||
#define BCMA_CC_JCMD_START 0x80000000
|
||||
#define BCMA_CC_JCMD_BUSY 0x80000000
|
||||
|
|
@ -266,6 +267,29 @@
|
|||
#define BCMA_CC_SROM_CONTROL_SIZE_16K 0x00000004
|
||||
#define BCMA_CC_SROM_CONTROL_SIZE_SHIFT 1
|
||||
#define BCMA_CC_SROM_CONTROL_PRESENT 0x00000001
|
||||
/* Block 0x140 - 0x190 registers are chipset specific */
|
||||
#define BCMA_CC_4706_FLASHSCFG 0x18C /* Flash struct configuration */
|
||||
#define BCMA_CC_4706_FLASHSCFG_MASK 0x000000ff
|
||||
#define BCMA_CC_4706_FLASHSCFG_SF1 0x00000001 /* 2nd serial flash present */
|
||||
#define BCMA_CC_4706_FLASHSCFG_PF1 0x00000002 /* 2nd parallel flash present */
|
||||
#define BCMA_CC_4706_FLASHSCFG_SF1_TYPE 0x00000004 /* 2nd serial flash type : 0 : ST, 1 : Atmel */
|
||||
#define BCMA_CC_4706_FLASHSCFG_NF1 0x00000008 /* 2nd NAND flash present */
|
||||
#define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_MASK 0x000000f0
|
||||
#define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_4MB 0x00000010 /* 4MB */
|
||||
#define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_8MB 0x00000020 /* 8MB */
|
||||
#define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_16MB 0x00000030 /* 16MB */
|
||||
#define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_32MB 0x00000040 /* 32MB */
|
||||
#define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_64MB 0x00000050 /* 64MB */
|
||||
#define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_128MB 0x00000060 /* 128MB */
|
||||
#define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_256MB 0x00000070 /* 256MB */
|
||||
/* NAND flash registers for BCM4706 (corerev = 31) */
|
||||
#define BCMA_CC_NFLASH_CTL 0x01A0
|
||||
#define BCMA_CC_NFLASH_CTL_ERR 0x08000000
|
||||
#define BCMA_CC_NFLASH_CONF 0x01A4
|
||||
#define BCMA_CC_NFLASH_COL_ADDR 0x01A8
|
||||
#define BCMA_CC_NFLASH_ROW_ADDR 0x01AC
|
||||
#define BCMA_CC_NFLASH_DATA 0x01B0
|
||||
#define BCMA_CC_NFLASH_WAITCNT0 0x01B4
|
||||
/* 0x1E0 is defined as shared BCMA_CLKCTLST */
|
||||
#define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */
|
||||
#define BCMA_CC_UART0_DATA 0x0300
|
||||
|
|
@ -325,6 +349,60 @@
|
|||
#define BCMA_CC_PLLCTL_ADDR 0x0660
|
||||
#define BCMA_CC_PLLCTL_DATA 0x0664
|
||||
#define BCMA_CC_SPROM 0x0800 /* SPROM beginning */
|
||||
/* NAND flash MLC controller registers (corerev >= 38) */
|
||||
#define BCMA_CC_NAND_REVISION 0x0C00
|
||||
#define BCMA_CC_NAND_CMD_START 0x0C04
|
||||
#define BCMA_CC_NAND_CMD_ADDR_X 0x0C08
|
||||
#define BCMA_CC_NAND_CMD_ADDR 0x0C0C
|
||||
#define BCMA_CC_NAND_CMD_END_ADDR 0x0C10
|
||||
#define BCMA_CC_NAND_CS_NAND_SELECT 0x0C14
|
||||
#define BCMA_CC_NAND_CS_NAND_XOR 0x0C18
|
||||
#define BCMA_CC_NAND_SPARE_RD0 0x0C20
|
||||
#define BCMA_CC_NAND_SPARE_RD4 0x0C24
|
||||
#define BCMA_CC_NAND_SPARE_RD8 0x0C28
|
||||
#define BCMA_CC_NAND_SPARE_RD12 0x0C2C
|
||||
#define BCMA_CC_NAND_SPARE_WR0 0x0C30
|
||||
#define BCMA_CC_NAND_SPARE_WR4 0x0C34
|
||||
#define BCMA_CC_NAND_SPARE_WR8 0x0C38
|
||||
#define BCMA_CC_NAND_SPARE_WR12 0x0C3C
|
||||
#define BCMA_CC_NAND_ACC_CONTROL 0x0C40
|
||||
#define BCMA_CC_NAND_CONFIG 0x0C48
|
||||
#define BCMA_CC_NAND_TIMING_1 0x0C50
|
||||
#define BCMA_CC_NAND_TIMING_2 0x0C54
|
||||
#define BCMA_CC_NAND_SEMAPHORE 0x0C58
|
||||
#define BCMA_CC_NAND_DEVID 0x0C60
|
||||
#define BCMA_CC_NAND_DEVID_X 0x0C64
|
||||
#define BCMA_CC_NAND_BLOCK_LOCK_STATUS 0x0C68
|
||||
#define BCMA_CC_NAND_INTFC_STATUS 0x0C6C
|
||||
#define BCMA_CC_NAND_ECC_CORR_ADDR_X 0x0C70
|
||||
#define BCMA_CC_NAND_ECC_CORR_ADDR 0x0C74
|
||||
#define BCMA_CC_NAND_ECC_UNC_ADDR_X 0x0C78
|
||||
#define BCMA_CC_NAND_ECC_UNC_ADDR 0x0C7C
|
||||
#define BCMA_CC_NAND_READ_ERROR_COUNT 0x0C80
|
||||
#define BCMA_CC_NAND_CORR_STAT_THRESHOLD 0x0C84
|
||||
#define BCMA_CC_NAND_READ_ADDR_X 0x0C90
|
||||
#define BCMA_CC_NAND_READ_ADDR 0x0C94
|
||||
#define BCMA_CC_NAND_PAGE_PROGRAM_ADDR_X 0x0C98
|
||||
#define BCMA_CC_NAND_PAGE_PROGRAM_ADDR 0x0C9C
|
||||
#define BCMA_CC_NAND_COPY_BACK_ADDR_X 0x0CA0
|
||||
#define BCMA_CC_NAND_COPY_BACK_ADDR 0x0CA4
|
||||
#define BCMA_CC_NAND_BLOCK_ERASE_ADDR_X 0x0CA8
|
||||
#define BCMA_CC_NAND_BLOCK_ERASE_ADDR 0x0CAC
|
||||
#define BCMA_CC_NAND_INV_READ_ADDR_X 0x0CB0
|
||||
#define BCMA_CC_NAND_INV_READ_ADDR 0x0CB4
|
||||
#define BCMA_CC_NAND_BLK_WR_PROTECT 0x0CC0
|
||||
#define BCMA_CC_NAND_ACC_CONTROL_CS1 0x0CD0
|
||||
#define BCMA_CC_NAND_CONFIG_CS1 0x0CD4
|
||||
#define BCMA_CC_NAND_TIMING_1_CS1 0x0CD8
|
||||
#define BCMA_CC_NAND_TIMING_2_CS1 0x0CDC
|
||||
#define BCMA_CC_NAND_SPARE_RD16 0x0D30
|
||||
#define BCMA_CC_NAND_SPARE_RD20 0x0D34
|
||||
#define BCMA_CC_NAND_SPARE_RD24 0x0D38
|
||||
#define BCMA_CC_NAND_SPARE_RD28 0x0D3C
|
||||
#define BCMA_CC_NAND_CACHE_ADDR 0x0D40
|
||||
#define BCMA_CC_NAND_CACHE_DATA 0x0D44
|
||||
#define BCMA_CC_NAND_CTRL_CONFIG 0x0D48
|
||||
#define BCMA_CC_NAND_CTRL_STATUS 0x0D4C
|
||||
|
||||
/* Divider allocation in 4716/47162/5356 */
|
||||
#define BCMA_CC_PMU5_MAINPLL_CPU 1
|
||||
|
|
@ -415,6 +493,13 @@
|
|||
/* 4313 Chip specific ChipControl register bits */
|
||||
#define BCMA_CCTRL_4313_12MA_LED_DRIVE 0x00000007 /* 12 mA drive strengh for later 4313 */
|
||||
|
||||
/* BCM5357 ChipControl register bits */
|
||||
#define BCMA_CHIPCTL_5357_EXTPA BIT(14)
|
||||
#define BCMA_CHIPCTL_5357_ANT_MUX_2O3 BIT(15)
|
||||
#define BCMA_CHIPCTL_5357_NFLASH BIT(16)
|
||||
#define BCMA_CHIPCTL_5357_I2S_PINS_ENABLE BIT(18)
|
||||
#define BCMA_CHIPCTL_5357_I2CSPI_PINS_ENABLE BIT(19)
|
||||
|
||||
/* Data for the PMU, if available.
|
||||
* Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU)
|
||||
*/
|
||||
|
|
@ -430,6 +515,28 @@ struct bcma_pflash {
|
|||
u32 window_size;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_BCMA_SFLASH
|
||||
struct bcma_sflash {
|
||||
bool present;
|
||||
u32 window;
|
||||
u32 blocksize;
|
||||
u16 numblocks;
|
||||
u32 size;
|
||||
|
||||
struct mtd_info *mtd;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BCMA_NFLASH
|
||||
struct mtd_info;
|
||||
|
||||
struct bcma_nflash {
|
||||
bool present;
|
||||
|
||||
struct mtd_info *mtd;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct bcma_serial_port {
|
||||
void *regs;
|
||||
unsigned long clockspeed;
|
||||
|
|
@ -450,6 +557,12 @@ struct bcma_drv_cc {
|
|||
struct bcma_chipcommon_pmu pmu;
|
||||
#ifdef CONFIG_BCMA_DRIVER_MIPS
|
||||
struct bcma_pflash pflash;
|
||||
#ifdef CONFIG_BCMA_SFLASH
|
||||
struct bcma_sflash sflash;
|
||||
#endif
|
||||
#ifdef CONFIG_BCMA_NFLASH
|
||||
struct bcma_nflash nflash;
|
||||
#endif
|
||||
|
||||
int nr_serial_ports;
|
||||
struct bcma_serial_port serial_ports[4];
|
||||
|
|
|
|||
|
|
@ -11,11 +11,13 @@
|
|||
#define BCMA_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */
|
||||
#define BCMA_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */
|
||||
#define BCMA_CLKCTLST_EXTRESREQ 0x00000700 /* Mask of external resource requests */
|
||||
#define BCMA_CLKCTLST_EXTRESREQ_SHIFT 8
|
||||
#define BCMA_CLKCTLST_HAVEALP 0x00010000 /* ALP available */
|
||||
#define BCMA_CLKCTLST_HAVEHT 0x00020000 /* HT available */
|
||||
#define BCMA_CLKCTLST_BP_ON_ALP 0x00040000 /* RO: running on ALP clock */
|
||||
#define BCMA_CLKCTLST_BP_ON_HT 0x00080000 /* RO: running on HT clock */
|
||||
#define BCMA_CLKCTLST_EXTRESST 0x07000000 /* Mask of external resource status */
|
||||
#define BCMA_CLKCTLST_EXTRESST_SHIFT 24
|
||||
/* Is there any BCM4328 on BCMA bus? */
|
||||
#define BCMA_CLKCTLST_4328A0_HAVEHT 0x00010000 /* 4328a0 has reversed bits */
|
||||
#define BCMA_CLKCTLST_4328A0_HAVEALP 0x00020000 /* 4328a0 has reversed bits */
|
||||
|
|
@ -83,4 +85,6 @@
|
|||
* (2 ZettaBytes), high 32 bits
|
||||
*/
|
||||
|
||||
#define BCMA_SFLASH 0x1c000000
|
||||
|
||||
#endif /* LINUX_BCMA_REGS_H_ */
|
||||
|
|
|
|||
|
|
@ -1,24 +1,10 @@
|
|||
#ifndef _LINUX_BINFMTS_H
|
||||
#define _LINUX_BINFMTS_H
|
||||
|
||||
#include <linux/capability.h>
|
||||
|
||||
struct pt_regs;
|
||||
|
||||
/*
|
||||
* These are the maximum length and maximum number of strings passed to the
|
||||
* execve() system call. MAX_ARG_STRLEN is essentially random but serves to
|
||||
* prevent the kernel from being unduly impacted by misaddressed pointers.
|
||||
* MAX_ARG_STRINGS is chosen to fit in a signed 32-bit integer.
|
||||
*/
|
||||
#define MAX_ARG_STRLEN (PAGE_SIZE * 32)
|
||||
#define MAX_ARG_STRINGS 0x7FFFFFFF
|
||||
|
||||
/* sizeof(linux_binprm->buf) */
|
||||
#define BINPRM_BUF_SIZE 128
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/sched.h>
|
||||
#include <linux/unistd.h>
|
||||
#include <asm/exec.h>
|
||||
#include <uapi/linux/binfmts.h>
|
||||
|
||||
#define CORENAME_MAX_SIZE 128
|
||||
|
||||
|
|
@ -72,7 +58,7 @@ struct linux_binprm {
|
|||
|
||||
/* Function parameter for binfmt->coredump */
|
||||
struct coredump_params {
|
||||
long signr;
|
||||
siginfo_t *siginfo;
|
||||
struct pt_regs *regs;
|
||||
struct file *file;
|
||||
unsigned long limit;
|
||||
|
|
@ -132,9 +118,11 @@ extern int copy_strings_kernel(int argc, const char *const *argv,
|
|||
struct linux_binprm *bprm);
|
||||
extern int prepare_bprm_creds(struct linux_binprm *bprm);
|
||||
extern void install_exec_creds(struct linux_binprm *bprm);
|
||||
extern void do_coredump(long signr, int exit_code, struct pt_regs *regs);
|
||||
extern void set_binfmt(struct linux_binfmt *new);
|
||||
extern void free_bprm(struct linux_binprm *);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#ifdef __ARCH_WANT_KERNEL_EXECVE
|
||||
extern void ret_from_kernel_execve(struct pt_regs *normal) __noreturn;
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_BINFMTS_H */
|
||||
|
|
|
|||
|
|
@ -212,20 +212,41 @@ extern void bio_pair_release(struct bio_pair *dbio);
|
|||
extern struct bio_set *bioset_create(unsigned int, unsigned int);
|
||||
extern void bioset_free(struct bio_set *);
|
||||
|
||||
extern struct bio *bio_alloc(gfp_t, unsigned int);
|
||||
extern struct bio *bio_kmalloc(gfp_t, unsigned int);
|
||||
extern struct bio *bio_alloc_bioset(gfp_t, int, struct bio_set *);
|
||||
extern void bio_put(struct bio *);
|
||||
extern void bio_free(struct bio *, struct bio_set *);
|
||||
|
||||
extern void __bio_clone(struct bio *, struct bio *);
|
||||
extern struct bio *bio_clone_bioset(struct bio *, gfp_t, struct bio_set *bs);
|
||||
|
||||
extern struct bio_set *fs_bio_set;
|
||||
|
||||
static inline struct bio *bio_alloc(gfp_t gfp_mask, unsigned int nr_iovecs)
|
||||
{
|
||||
return bio_alloc_bioset(gfp_mask, nr_iovecs, fs_bio_set);
|
||||
}
|
||||
|
||||
static inline struct bio *bio_clone(struct bio *bio, gfp_t gfp_mask)
|
||||
{
|
||||
return bio_clone_bioset(bio, gfp_mask, fs_bio_set);
|
||||
}
|
||||
|
||||
static inline struct bio *bio_kmalloc(gfp_t gfp_mask, unsigned int nr_iovecs)
|
||||
{
|
||||
return bio_alloc_bioset(gfp_mask, nr_iovecs, NULL);
|
||||
}
|
||||
|
||||
static inline struct bio *bio_clone_kmalloc(struct bio *bio, gfp_t gfp_mask)
|
||||
{
|
||||
return bio_clone_bioset(bio, gfp_mask, NULL);
|
||||
|
||||
}
|
||||
|
||||
extern void bio_endio(struct bio *, int);
|
||||
struct request_queue;
|
||||
extern int bio_phys_segments(struct request_queue *, struct bio *);
|
||||
|
||||
extern void __bio_clone(struct bio *, struct bio *);
|
||||
extern struct bio *bio_clone(struct bio *, gfp_t);
|
||||
|
||||
extern void bio_init(struct bio *);
|
||||
extern void bio_reset(struct bio *);
|
||||
|
||||
extern int bio_add_page(struct bio *, struct page *, unsigned int,unsigned int);
|
||||
extern int bio_add_pc_page(struct request_queue *, struct bio *, struct page *,
|
||||
|
|
@ -304,8 +325,6 @@ struct biovec_slab {
|
|||
struct kmem_cache *slab;
|
||||
};
|
||||
|
||||
extern struct bio_set *fs_bio_set;
|
||||
|
||||
/*
|
||||
* a small number of entries is fine, not going to be performance critical.
|
||||
* basically we just need to survive
|
||||
|
|
@ -367,9 +386,31 @@ static inline char *__bio_kmap_irq(struct bio *bio, unsigned short idx,
|
|||
/*
|
||||
* Check whether this bio carries any data or not. A NULL bio is allowed.
|
||||
*/
|
||||
static inline int bio_has_data(struct bio *bio)
|
||||
static inline bool bio_has_data(struct bio *bio)
|
||||
{
|
||||
return bio && bio->bi_io_vec != NULL;
|
||||
if (bio && bio->bi_vcnt)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool bio_is_rw(struct bio *bio)
|
||||
{
|
||||
if (!bio_has_data(bio))
|
||||
return false;
|
||||
|
||||
if (bio->bi_rw & REQ_WRITE_SAME)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool bio_mergeable(struct bio *bio)
|
||||
{
|
||||
if (bio->bi_rw & REQ_NOMERGE_FLAGS)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -505,9 +546,8 @@ static inline struct bio *bio_list_get(struct bio_list *bl)
|
|||
|
||||
#define bio_integrity(bio) (bio->bi_integrity != NULL)
|
||||
|
||||
extern struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *, gfp_t, unsigned int, struct bio_set *);
|
||||
extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int);
|
||||
extern void bio_integrity_free(struct bio *, struct bio_set *);
|
||||
extern void bio_integrity_free(struct bio *);
|
||||
extern int bio_integrity_add_page(struct bio *, struct page *, unsigned int, unsigned int);
|
||||
extern int bio_integrity_enabled(struct bio *bio);
|
||||
extern int bio_integrity_set_tag(struct bio *, void *, unsigned int);
|
||||
|
|
@ -517,7 +557,7 @@ extern void bio_integrity_endio(struct bio *, int);
|
|||
extern void bio_integrity_advance(struct bio *, unsigned int);
|
||||
extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int);
|
||||
extern void bio_integrity_split(struct bio *, struct bio_pair *, int);
|
||||
extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t, struct bio_set *);
|
||||
extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t);
|
||||
extern int bioset_integrity_create(struct bio_set *, int);
|
||||
extern void bioset_integrity_free(struct bio_set *);
|
||||
extern void bio_integrity_init(void);
|
||||
|
|
@ -549,13 +589,13 @@ static inline int bio_integrity_prep(struct bio *bio)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline void bio_integrity_free(struct bio *bio, struct bio_set *bs)
|
||||
static inline void bio_integrity_free(struct bio *bio)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static inline int bio_integrity_clone(struct bio *bio, struct bio *bio_src,
|
||||
gfp_t gfp_mask, struct bio_set *bs)
|
||||
gfp_t gfp_mask)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,12 +59,6 @@ struct bio {
|
|||
unsigned int bi_seg_front_size;
|
||||
unsigned int bi_seg_back_size;
|
||||
|
||||
unsigned int bi_max_vecs; /* max bvl_vecs we can hold */
|
||||
|
||||
atomic_t bi_cnt; /* pin count */
|
||||
|
||||
struct bio_vec *bi_io_vec; /* the actual vec list */
|
||||
|
||||
bio_end_io_t *bi_end_io;
|
||||
|
||||
void *bi_private;
|
||||
|
|
@ -80,7 +74,17 @@ struct bio {
|
|||
struct bio_integrity_payload *bi_integrity; /* data integrity */
|
||||
#endif
|
||||
|
||||
bio_destructor_t *bi_destructor; /* destructor */
|
||||
/*
|
||||
* Everything starting with bi_max_vecs will be preserved by bio_reset()
|
||||
*/
|
||||
|
||||
unsigned int bi_max_vecs; /* max bvl_vecs we can hold */
|
||||
|
||||
atomic_t bi_cnt; /* pin count */
|
||||
|
||||
struct bio_vec *bi_io_vec; /* the actual vec list */
|
||||
|
||||
struct bio_set *bi_pool;
|
||||
|
||||
/*
|
||||
* We can inline a number of vecs at the end of the bio, to avoid
|
||||
|
|
@ -90,6 +94,8 @@ struct bio {
|
|||
struct bio_vec bi_inline_vecs[0];
|
||||
};
|
||||
|
||||
#define BIO_RESET_BYTES offsetof(struct bio, bi_max_vecs)
|
||||
|
||||
/*
|
||||
* bio flags
|
||||
*/
|
||||
|
|
@ -105,6 +111,13 @@ struct bio {
|
|||
#define BIO_FS_INTEGRITY 9 /* fs owns integrity data, not block layer */
|
||||
#define BIO_QUIET 10 /* Make BIO Quiet */
|
||||
#define BIO_MAPPED_INTEGRITY 11/* integrity metadata has been remapped */
|
||||
|
||||
/*
|
||||
* Flags starting here get preserved by bio_reset() - this includes
|
||||
* BIO_POOL_IDX()
|
||||
*/
|
||||
#define BIO_RESET_BITS 12
|
||||
|
||||
#define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag)))
|
||||
|
||||
/*
|
||||
|
|
@ -134,6 +147,7 @@ enum rq_flag_bits {
|
|||
__REQ_PRIO, /* boost priority in cfq */
|
||||
__REQ_DISCARD, /* request to discard sectors */
|
||||
__REQ_SECURE, /* secure discard (used with __REQ_DISCARD) */
|
||||
__REQ_WRITE_SAME, /* write same block many times */
|
||||
|
||||
__REQ_NOIDLE, /* don't anticipate more IO after this one */
|
||||
__REQ_FUA, /* forced unit access */
|
||||
|
|
@ -172,15 +186,21 @@ enum rq_flag_bits {
|
|||
#define REQ_META (1 << __REQ_META)
|
||||
#define REQ_PRIO (1 << __REQ_PRIO)
|
||||
#define REQ_DISCARD (1 << __REQ_DISCARD)
|
||||
#define REQ_WRITE_SAME (1 << __REQ_WRITE_SAME)
|
||||
#define REQ_NOIDLE (1 << __REQ_NOIDLE)
|
||||
|
||||
#define REQ_FAILFAST_MASK \
|
||||
(REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER)
|
||||
#define REQ_COMMON_MASK \
|
||||
(REQ_WRITE | REQ_FAILFAST_MASK | REQ_SYNC | REQ_META | REQ_PRIO | \
|
||||
REQ_DISCARD | REQ_NOIDLE | REQ_FLUSH | REQ_FUA | REQ_SECURE)
|
||||
REQ_DISCARD | REQ_WRITE_SAME | REQ_NOIDLE | REQ_FLUSH | REQ_FUA | \
|
||||
REQ_SECURE)
|
||||
#define REQ_CLONE_MASK REQ_COMMON_MASK
|
||||
|
||||
/* This mask is used for both bio and request merge checking */
|
||||
#define REQ_NOMERGE_FLAGS \
|
||||
(REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA)
|
||||
|
||||
#define REQ_RAHEAD (1 << __REQ_RAHEAD)
|
||||
#define REQ_THROTTLED (1 << __REQ_THROTTLED)
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue