nfs: disintegrate UAPI for nfs
This is to complete part of the Userspace API (UAPI) disintegration for which
the preparatory patches were pulled recently. After these patches, userspace
headers will be segregated into:
include/uapi/linux/.../foo.h
for the userspace interface stuff, and:
include/linux/.../foo.h
for the strictly kernel internal stuff.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
+9
-9
@@ -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__ */
|
||||
|
||||
+28
-32
@@ -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
|
||||
*/
|
||||
|
||||
+33
-27
@@ -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;
|
||||
|
||||
+12
-4
@@ -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 */
|
||||
|
||||
+120
-3
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -26,7 +26,13 @@ static inline void
|
||||
__mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *))
|
||||
{
|
||||
if (unlikely(atomic_xchg(count, 0) != 1))
|
||||
fail_fn(count);
|
||||
/*
|
||||
* We failed to acquire the lock, so mark it contended
|
||||
* to ensure that any waiting tasks are woken up by the
|
||||
* unlock slow path.
|
||||
*/
|
||||
if (likely(atomic_xchg(count, -1) != 1))
|
||||
fail_fn(count);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -43,7 +49,8 @@ static inline int
|
||||
__mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *))
|
||||
{
|
||||
if (unlikely(atomic_xchg(count, 0) != 1))
|
||||
return fail_fn(count);
|
||||
if (likely(atomic_xchg(count, -1) != 1))
|
||||
return fail_fn(count);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
+12
-10
@@ -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;
|
||||
|
||||
+25
-6
@@ -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>
|
||||
|
||||
@@ -118,7 +119,8 @@ enum drm_mode_status {
|
||||
.hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), \
|
||||
.htotal = (ht), .hskew = (hsk), .vdisplay = (vd), \
|
||||
.vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), \
|
||||
.vscan = (vs), .flags = (f), .vrefresh = 0
|
||||
.vscan = (vs), .flags = (f), .vrefresh = 0, \
|
||||
.base.type = DRM_MODE_OBJECT_MODE
|
||||
|
||||
#define CRTC_INTERLACE_HALVE_V 0x1 /* halve V values for interlacing */
|
||||
|
||||
@@ -166,8 +168,6 @@ struct drm_display_mode {
|
||||
int crtc_vsync_start;
|
||||
int crtc_vsync_end;
|
||||
int crtc_vtotal;
|
||||
int crtc_hadjusted;
|
||||
int crtc_vadjusted;
|
||||
|
||||
/* Driver private mode info */
|
||||
int private_size;
|
||||
@@ -216,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,
|
||||
@@ -245,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;
|
||||
@@ -360,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
|
||||
@@ -393,6 +405,8 @@ struct drm_crtc {
|
||||
*/
|
||||
struct drm_display_mode hwmode;
|
||||
|
||||
bool invert_dimensions;
|
||||
|
||||
int x, y;
|
||||
const struct drm_crtc_funcs *funcs;
|
||||
|
||||
@@ -594,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;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -863,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);
|
||||
@@ -921,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);
|
||||
@@ -1036,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,
|
||||
|
||||
+81
-16
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-174
@@ -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_ */
|
||||
|
||||
+1
-885
@@ -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.
|
||||
|
||||
+7
-11
@@ -20,21 +20,16 @@ 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),)
|
||||
$(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h),)
|
||||
header-y += 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),)
|
||||
$(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h),)
|
||||
header-y += 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),)
|
||||
$(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h),)
|
||||
header-y += kvm_para.h
|
||||
endif
|
||||
|
||||
@@ -84,7 +79,6 @@ 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
|
||||
@@ -93,7 +87,6 @@ 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
|
||||
@@ -140,7 +133,6 @@ 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
|
||||
@@ -195,6 +187,7 @@ header-y += in_route.h
|
||||
header-y += sock_diag.h
|
||||
header-y += inet_diag.h
|
||||
header-y += unix_diag.h
|
||||
header-y += packet_diag.h
|
||||
header-y += inotify.h
|
||||
header-y += input.h
|
||||
header-y += ioctl.h
|
||||
@@ -362,6 +355,7 @@ header-y += sysctl.h
|
||||
header-y += sysinfo.h
|
||||
header-y += taskstats.h
|
||||
header-y += tcp.h
|
||||
header-y += tcp_metrics.h
|
||||
header-y += telephony.h
|
||||
header-y += termios.h
|
||||
header-y += time.h
|
||||
@@ -372,6 +366,7 @@ header-y += tipc.h
|
||||
header-y += tipc_config.h
|
||||
header-y += toshiba.h
|
||||
header-y += tty.h
|
||||
header-y += tty_flags.h
|
||||
header-y += types.h
|
||||
header-y += udf_fs_i.h
|
||||
header-y += udp.h
|
||||
@@ -387,6 +382,7 @@ header-y += utsname.h
|
||||
header-y += uuid.h
|
||||
header-y += uvcvideo.h
|
||||
header-y += v4l2-common.h
|
||||
header-y += v4l2-controls.h
|
||||
header-y += v4l2-dv-timings.h
|
||||
header-y += v4l2-mediabus.h
|
||||
header-y += v4l2-subdev.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);
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+22
-8
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
+159
-55
@@ -442,6 +442,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;
|
||||
@@ -525,10 +527,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 +635,101 @@ 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 void audit_getname(const char *name)
|
||||
{ }
|
||||
static inline void audit_putname(const char *name)
|
||||
{ }
|
||||
static inline void __audit_inode(const char *name, const struct dentry *dentry)
|
||||
{ }
|
||||
static inline void __audit_inode_child(const struct dentry *dentry,
|
||||
const struct inode *parent)
|
||||
{ }
|
||||
static inline void audit_inode(const char *name, const struct dentry *dentry)
|
||||
{ }
|
||||
static inline void audit_inode_child(const struct dentry *dentry,
|
||||
const struct inode *parent)
|
||||
{ }
|
||||
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 +753,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 +769,63 @@ 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 /* CONFIG_AUDIT */
|
||||
static inline void audit_log_string(struct audit_buffer *ab, const char *buf)
|
||||
{
|
||||
audit_log_n_string(ab, buf, strlen(buf));
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+15
-2
@@ -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 */
|
||||
|
||||
@@ -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,26 @@ struct bcma_pflash {
|
||||
u32 window_size;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_BCMA_SFLASH
|
||||
struct bcma_sflash {
|
||||
bool present;
|
||||
u32 window;
|
||||
u32 blocksize;
|
||||
u16 numblocks;
|
||||
u32 size;
|
||||
};
|
||||
#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 +555,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_ */
|
||||
|
||||
@@ -72,7 +72,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,7 +132,6 @@ 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 *);
|
||||
|
||||
|
||||
+13
-1
@@ -601,7 +601,7 @@ static inline void blk_clear_rl_full(struct request_list *rl, bool sync)
|
||||
* it already be started by driver.
|
||||
*/
|
||||
#define RQ_NOMERGE_FLAGS \
|
||||
(REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA)
|
||||
(REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA | REQ_DISCARD)
|
||||
#define rq_mergeable(rq) \
|
||||
(!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \
|
||||
(((rq)->cmd_flags & REQ_DISCARD) || \
|
||||
@@ -894,6 +894,8 @@ extern void blk_queue_flush_queueable(struct request_queue *q, bool queueable);
|
||||
extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev);
|
||||
|
||||
extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *);
|
||||
extern int blk_bio_map_sg(struct request_queue *q, struct bio *bio,
|
||||
struct scatterlist *sglist);
|
||||
extern void blk_dump_rq_flags(struct request *, char *);
|
||||
extern long nr_blockdev_pages(void);
|
||||
|
||||
@@ -1139,6 +1141,16 @@ static inline int queue_limit_discard_alignment(struct queue_limits *lim, sector
|
||||
& (lim->discard_granularity - 1);
|
||||
}
|
||||
|
||||
static inline int bdev_discard_alignment(struct block_device *bdev)
|
||||
{
|
||||
struct request_queue *q = bdev_get_queue(bdev);
|
||||
|
||||
if (bdev != bdev->bd_contains)
|
||||
return bdev->bd_part->discard_alignment;
|
||||
|
||||
return q->limits.discard_alignment;
|
||||
}
|
||||
|
||||
static inline unsigned int queue_discard_zeroes_data(struct request_queue *q)
|
||||
{
|
||||
if (q->limits.max_discard_sectors && q->limits.discard_zeroes_data == 1)
|
||||
|
||||
@@ -1,292 +0,0 @@
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* cd1400.h -- cd1400 UART hardware info.
|
||||
*
|
||||
* Copyright (C) 1996-1998 Stallion Technologies
|
||||
* Copyright (C) 1994-1996 Greg Ungerer.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
#ifndef _CD1400_H
|
||||
#define _CD1400_H
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Define the number of async ports per cd1400 uart chip.
|
||||
*/
|
||||
#define CD1400_PORTS 4
|
||||
|
||||
/*
|
||||
* Define the cd1400 uarts internal FIFO sizes.
|
||||
*/
|
||||
#define CD1400_TXFIFOSIZE 12
|
||||
#define CD1400_RXFIFOSIZE 12
|
||||
|
||||
/*
|
||||
* Local RX FIFO thresh hold level. Also define the RTS thresh hold
|
||||
* based on the RX thresh hold.
|
||||
*/
|
||||
#define FIFO_RXTHRESHOLD 6
|
||||
#define FIFO_RTSTHRESHOLD 7
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Define the cd1400 register addresses. These are all the valid
|
||||
* registers with the cd1400. Some are global, some virtual, some
|
||||
* per port.
|
||||
*/
|
||||
#define GFRCR 0x40
|
||||
#define CAR 0x68
|
||||
#define GCR 0x4b
|
||||
#define SVRR 0x67
|
||||
#define RICR 0x44
|
||||
#define TICR 0x45
|
||||
#define MICR 0x46
|
||||
#define RIR 0x6b
|
||||
#define TIR 0x6a
|
||||
#define MIR 0x69
|
||||
#define PPR 0x7e
|
||||
|
||||
#define RIVR 0x43
|
||||
#define TIVR 0x42
|
||||
#define MIVR 0x41
|
||||
#define TDR 0x63
|
||||
#define RDSR 0x62
|
||||
#define MISR 0x4c
|
||||
#define EOSRR 0x60
|
||||
|
||||
#define LIVR 0x18
|
||||
#define CCR 0x05
|
||||
#define SRER 0x06
|
||||
#define COR1 0x08
|
||||
#define COR2 0x09
|
||||
#define COR3 0x0a
|
||||
#define COR4 0x1e
|
||||
#define COR5 0x1f
|
||||
#define CCSR 0x0b
|
||||
#define RDCR 0x0e
|
||||
#define SCHR1 0x1a
|
||||
#define SCHR2 0x1b
|
||||
#define SCHR3 0x1c
|
||||
#define SCHR4 0x1d
|
||||
#define SCRL 0x22
|
||||
#define SCRH 0x23
|
||||
#define LNC 0x24
|
||||
#define MCOR1 0x15
|
||||
#define MCOR2 0x16
|
||||
#define RTPR 0x21
|
||||
#define MSVR1 0x6c
|
||||
#define MSVR2 0x6d
|
||||
#define PSVR 0x6f
|
||||
#define RBPR 0x78
|
||||
#define RCOR 0x7c
|
||||
#define TBPR 0x72
|
||||
#define TCOR 0x76
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Define the set of baud rate clock divisors.
|
||||
*/
|
||||
#define CD1400_CLK0 8
|
||||
#define CD1400_CLK1 32
|
||||
#define CD1400_CLK2 128
|
||||
#define CD1400_CLK3 512
|
||||
#define CD1400_CLK4 2048
|
||||
|
||||
#define CD1400_NUMCLKS 5
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Define the clock pre-scalar value to be a 5 ms clock. This should be
|
||||
* OK for now. It would probably be better to make it 10 ms, but we
|
||||
* can't fit that divisor into 8 bits!
|
||||
*/
|
||||
#define PPR_SCALAR 244
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Define values used to set character size options.
|
||||
*/
|
||||
#define COR1_CHL5 0x00
|
||||
#define COR1_CHL6 0x01
|
||||
#define COR1_CHL7 0x02
|
||||
#define COR1_CHL8 0x03
|
||||
|
||||
/*
|
||||
* Define values used to set the number of stop bits.
|
||||
*/
|
||||
#define COR1_STOP1 0x00
|
||||
#define COR1_STOP15 0x04
|
||||
#define COR1_STOP2 0x08
|
||||
|
||||
/*
|
||||
* Define values used to set the parity scheme in use.
|
||||
*/
|
||||
#define COR1_PARNONE 0x00
|
||||
#define COR1_PARFORCE 0x20
|
||||
#define COR1_PARENB 0x40
|
||||
#define COR1_PARIGNORE 0x10
|
||||
|
||||
#define COR1_PARODD 0x80
|
||||
#define COR1_PAREVEN 0x00
|
||||
|
||||
#define COR2_IXM 0x80
|
||||
#define COR2_TXIBE 0x40
|
||||
#define COR2_ETC 0x20
|
||||
#define COR2_LLM 0x10
|
||||
#define COR2_RLM 0x08
|
||||
#define COR2_RTSAO 0x04
|
||||
#define COR2_CTSAE 0x02
|
||||
|
||||
#define COR3_SCDRNG 0x80
|
||||
#define COR3_SCD34 0x40
|
||||
#define COR3_FCT 0x20
|
||||
#define COR3_SCD12 0x10
|
||||
|
||||
/*
|
||||
* Define values used by COR4.
|
||||
*/
|
||||
#define COR4_BRKINT 0x08
|
||||
#define COR4_IGNBRK 0x18
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Define the modem control register values.
|
||||
* Note that the actual hardware is a little different to the conventional
|
||||
* pin names on the cd1400.
|
||||
*/
|
||||
#define MSVR1_DTR 0x01
|
||||
#define MSVR1_DSR 0x10
|
||||
#define MSVR1_RI 0x20
|
||||
#define MSVR1_CTS 0x40
|
||||
#define MSVR1_DCD 0x80
|
||||
|
||||
#define MSVR2_RTS 0x02
|
||||
#define MSVR2_DSR 0x10
|
||||
#define MSVR2_RI 0x20
|
||||
#define MSVR2_CTS 0x40
|
||||
#define MSVR2_DCD 0x80
|
||||
|
||||
#define MCOR1_DCD 0x80
|
||||
#define MCOR1_CTS 0x40
|
||||
#define MCOR1_RI 0x20
|
||||
#define MCOR1_DSR 0x10
|
||||
|
||||
#define MCOR2_DCD 0x80
|
||||
#define MCOR2_CTS 0x40
|
||||
#define MCOR2_RI 0x20
|
||||
#define MCOR2_DSR 0x10
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Define the bits used with the service (interrupt) enable register.
|
||||
*/
|
||||
#define SRER_NNDT 0x01
|
||||
#define SRER_TXEMPTY 0x02
|
||||
#define SRER_TXDATA 0x04
|
||||
#define SRER_RXDATA 0x10
|
||||
#define SRER_MODEM 0x80
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Define operational commands for the command register.
|
||||
*/
|
||||
#define CCR_RESET 0x80
|
||||
#define CCR_CORCHANGE 0x4e
|
||||
#define CCR_SENDCH 0x20
|
||||
#define CCR_CHANCTRL 0x10
|
||||
|
||||
#define CCR_TXENABLE (CCR_CHANCTRL | 0x08)
|
||||
#define CCR_TXDISABLE (CCR_CHANCTRL | 0x04)
|
||||
#define CCR_RXENABLE (CCR_CHANCTRL | 0x02)
|
||||
#define CCR_RXDISABLE (CCR_CHANCTRL | 0x01)
|
||||
|
||||
#define CCR_SENDSCHR1 (CCR_SENDCH | 0x01)
|
||||
#define CCR_SENDSCHR2 (CCR_SENDCH | 0x02)
|
||||
#define CCR_SENDSCHR3 (CCR_SENDCH | 0x03)
|
||||
#define CCR_SENDSCHR4 (CCR_SENDCH | 0x04)
|
||||
|
||||
#define CCR_RESETCHAN (CCR_RESET | 0x00)
|
||||
#define CCR_RESETFULL (CCR_RESET | 0x01)
|
||||
#define CCR_TXFLUSHFIFO (CCR_RESET | 0x02)
|
||||
|
||||
#define CCR_MAXWAIT 10000
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Define the valid acknowledgement types (for hw ack cycle).
|
||||
*/
|
||||
#define ACK_TYPMASK 0x07
|
||||
#define ACK_TYPTX 0x02
|
||||
#define ACK_TYPMDM 0x01
|
||||
#define ACK_TYPRXGOOD 0x03
|
||||
#define ACK_TYPRXBAD 0x07
|
||||
|
||||
#define SVRR_RX 0x01
|
||||
#define SVRR_TX 0x02
|
||||
#define SVRR_MDM 0x04
|
||||
|
||||
#define ST_OVERRUN 0x01
|
||||
#define ST_FRAMING 0x02
|
||||
#define ST_PARITY 0x04
|
||||
#define ST_BREAK 0x08
|
||||
#define ST_SCHAR1 0x10
|
||||
#define ST_SCHAR2 0x20
|
||||
#define ST_SCHAR3 0x30
|
||||
#define ST_SCHAR4 0x40
|
||||
#define ST_RANGE 0x70
|
||||
#define ST_SCHARMASK 0x70
|
||||
#define ST_TIMEOUT 0x80
|
||||
|
||||
#define MISR_DCD 0x80
|
||||
#define MISR_CTS 0x40
|
||||
#define MISR_RI 0x20
|
||||
#define MISR_DSR 0x10
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Defines for the CCSR status register.
|
||||
*/
|
||||
#define CCSR_RXENABLED 0x80
|
||||
#define CCSR_RXFLOWON 0x40
|
||||
#define CCSR_RXFLOWOFF 0x20
|
||||
#define CCSR_TXENABLED 0x08
|
||||
#define CCSR_TXFLOWON 0x04
|
||||
#define CCSR_TXFLOWOFF 0x02
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Define the embedded commands.
|
||||
*/
|
||||
#define ETC_CMD 0x00
|
||||
#define ETC_STARTBREAK 0x81
|
||||
#define ETC_DELAY 0x82
|
||||
#define ETC_STOPBREAK 0x83
|
||||
|
||||
/*****************************************************************************/
|
||||
#endif
|
||||
@@ -1,486 +0,0 @@
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* cdk.h -- CDK interface definitions.
|
||||
*
|
||||
* Copyright (C) 1996-1998 Stallion Technologies
|
||||
* Copyright (C) 1994-1996 Greg Ungerer.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
#ifndef _CDK_H
|
||||
#define _CDK_H
|
||||
/*****************************************************************************/
|
||||
|
||||
#pragma pack(2)
|
||||
|
||||
/*
|
||||
* The following set of definitions is used to communicate with the
|
||||
* shared memory interface of the Stallion intelligent multiport serial
|
||||
* boards. The definitions in this file are taken directly from the
|
||||
* document titled "Generic Stackable Interface, Downloader and
|
||||
* Communications Development Kit".
|
||||
*/
|
||||
|
||||
/*
|
||||
* Define the set of important shared memory addresses. These are
|
||||
* required to initialize the board and get things started. All of these
|
||||
* addresses are relative to the start of the shared memory.
|
||||
*/
|
||||
#define CDK_SIGADDR 0x200
|
||||
#define CDK_FEATADDR 0x280
|
||||
#define CDK_CDKADDR 0x300
|
||||
#define CDK_RDYADDR 0x262
|
||||
|
||||
#define CDK_ALIVEMARKER 13
|
||||
|
||||
/*
|
||||
* On hardware power up the ROMs located on the EasyConnection 8/64 will
|
||||
* fill out the following signature information into shared memory. This
|
||||
* way the host system can quickly determine that the board is present
|
||||
* and is operational.
|
||||
*/
|
||||
typedef struct cdkecpsig {
|
||||
unsigned long magic;
|
||||
unsigned short romver;
|
||||
unsigned short cputype;
|
||||
unsigned char panelid[8];
|
||||
} cdkecpsig_t;
|
||||
|
||||
#define ECP_MAGIC 0x21504345
|
||||
|
||||
/*
|
||||
* On hardware power up the ROMs located on the ONboard, Stallion and
|
||||
* Brumbys will fill out the following signature information into shared
|
||||
* memory. This way the host system can quickly determine that the board
|
||||
* is present and is operational.
|
||||
*/
|
||||
typedef struct cdkonbsig {
|
||||
unsigned short magic0;
|
||||
unsigned short magic1;
|
||||
unsigned short magic2;
|
||||
unsigned short magic3;
|
||||
unsigned short romver;
|
||||
unsigned short memoff;
|
||||
unsigned short memseg;
|
||||
unsigned short amask0;
|
||||
unsigned short pic;
|
||||
unsigned short status;
|
||||
unsigned short btype;
|
||||
unsigned short clkticks;
|
||||
unsigned short clkspeed;
|
||||
unsigned short amask1;
|
||||
unsigned short amask2;
|
||||
} cdkonbsig_t;
|
||||
|
||||
#define ONB_MAGIC0 0xf2a7
|
||||
#define ONB_MAGIC1 0xa149
|
||||
#define ONB_MAGIC2 0x6352
|
||||
#define ONB_MAGIC3 0xf121
|
||||
|
||||
/*
|
||||
* Define the feature area structure. The feature area is the set of
|
||||
* startup parameters used by the slave image when it starts executing.
|
||||
* They allow for the specification of buffer sizes, debug trace, etc.
|
||||
*/
|
||||
typedef struct cdkfeature {
|
||||
unsigned long debug;
|
||||
unsigned long banner;
|
||||
unsigned long etype;
|
||||
unsigned long nrdevs;
|
||||
unsigned long brdspec;
|
||||
unsigned long txrqsize;
|
||||
unsigned long rxrqsize;
|
||||
unsigned long flags;
|
||||
} cdkfeature_t;
|
||||
|
||||
#define ETYP_DDK 0
|
||||
#define ETYP_CDK 1
|
||||
|
||||
/*
|
||||
* Define the CDK header structure. This is the info that the slave
|
||||
* environment sets up after it has been downloaded and started. It
|
||||
* essentially provides a memory map for the shared memory interface.
|
||||
*/
|
||||
typedef struct cdkhdr {
|
||||
unsigned short command;
|
||||
unsigned short status;
|
||||
unsigned short port;
|
||||
unsigned short mode;
|
||||
unsigned long cmd_buf[14];
|
||||
unsigned short alive_cnt;
|
||||
unsigned short intrpt_mode;
|
||||
unsigned char intrpt_id[8];
|
||||
unsigned char ver_release;
|
||||
unsigned char ver_modification;
|
||||
unsigned char ver_fix;
|
||||
unsigned char deadman_restart;
|
||||
unsigned short deadman;
|
||||
unsigned short nrdevs;
|
||||
unsigned long memp;
|
||||
unsigned long hostp;
|
||||
unsigned long slavep;
|
||||
unsigned char hostreq;
|
||||
unsigned char slavereq;
|
||||
unsigned char cmd_reserved[30];
|
||||
} cdkhdr_t;
|
||||
|
||||
#define MODE_DDK 0
|
||||
#define MODE_CDK 1
|
||||
|
||||
#define IMD_INTR 0x0
|
||||
#define IMD_PPINTR 0x1
|
||||
#define IMD_POLL 0xff
|
||||
|
||||
/*
|
||||
* Define the memory mapping structure. This structure is pointed to by
|
||||
* the memp field in the stlcdkhdr struct. As many as these structures
|
||||
* as required are laid out in shared memory to define how the rest of
|
||||
* shared memory is divided up. There will be one for each port.
|
||||
*/
|
||||
typedef struct cdkmem {
|
||||
unsigned short dtype;
|
||||
unsigned long offset;
|
||||
} cdkmem_t;
|
||||
|
||||
#define TYP_UNDEFINED 0x0
|
||||
#define TYP_ASYNCTRL 0x1
|
||||
#define TYP_ASYNC 0x20
|
||||
#define TYP_PARALLEL 0x40
|
||||
#define TYP_SYNCX21 0x60
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Following is a set of defines and structures used to actually deal
|
||||
* with the serial ports on the board. Firstly is the set of commands
|
||||
* that can be applied to ports.
|
||||
*/
|
||||
#define ASYCMD (((unsigned long) 'a') << 8)
|
||||
|
||||
#define A_NULL (ASYCMD | 0)
|
||||
#define A_FLUSH (ASYCMD | 1)
|
||||
#define A_BREAK (ASYCMD | 2)
|
||||
#define A_GETPORT (ASYCMD | 3)
|
||||
#define A_SETPORT (ASYCMD | 4)
|
||||
#define A_SETPORTF (ASYCMD | 5)
|
||||
#define A_SETPORTFTX (ASYCMD | 6)
|
||||
#define A_SETPORTFRX (ASYCMD | 7)
|
||||
#define A_GETSIGNALS (ASYCMD | 8)
|
||||
#define A_SETSIGNALS (ASYCMD | 9)
|
||||
#define A_SETSIGNALSF (ASYCMD | 10)
|
||||
#define A_SETSIGNALSFTX (ASYCMD | 11)
|
||||
#define A_SETSIGNALSFRX (ASYCMD | 12)
|
||||
#define A_GETNOTIFY (ASYCMD | 13)
|
||||
#define A_SETNOTIFY (ASYCMD | 14)
|
||||
#define A_NOTIFY (ASYCMD | 15)
|
||||
#define A_PORTCTRL (ASYCMD | 16)
|
||||
#define A_GETSTATS (ASYCMD | 17)
|
||||
#define A_RQSTATE (ASYCMD | 18)
|
||||
#define A_FLOWSTATE (ASYCMD | 19)
|
||||
#define A_CLEARSTATS (ASYCMD | 20)
|
||||
|
||||
/*
|
||||
* Define those arguments used for simple commands.
|
||||
*/
|
||||
#define FLUSHRX 0x1
|
||||
#define FLUSHTX 0x2
|
||||
|
||||
#define BREAKON -1
|
||||
#define BREAKOFF -2
|
||||
|
||||
/*
|
||||
* Define the port setting structure, and all those defines that go along
|
||||
* with it. Basically this structure defines the characteristics of this
|
||||
* port: baud rate, chars, parity, input/output char cooking etc.
|
||||
*/
|
||||
typedef struct asyport {
|
||||
unsigned long baudout;
|
||||
unsigned long baudin;
|
||||
unsigned long iflag;
|
||||
unsigned long oflag;
|
||||
unsigned long lflag;
|
||||
unsigned long pflag;
|
||||
unsigned long flow;
|
||||
unsigned long spare1;
|
||||
unsigned short vtime;
|
||||
unsigned short vmin;
|
||||
unsigned short txlo;
|
||||
unsigned short txhi;
|
||||
unsigned short rxlo;
|
||||
unsigned short rxhi;
|
||||
unsigned short rxhog;
|
||||
unsigned short spare2;
|
||||
unsigned char csize;
|
||||
unsigned char stopbs;
|
||||
unsigned char parity;
|
||||
unsigned char stopin;
|
||||
unsigned char startin;
|
||||
unsigned char stopout;
|
||||
unsigned char startout;
|
||||
unsigned char parmark;
|
||||
unsigned char brkmark;
|
||||
unsigned char cc[11];
|
||||
} asyport_t;
|
||||
|
||||
#define PT_STOP1 0x0
|
||||
#define PT_STOP15 0x1
|
||||
#define PT_STOP2 0x2
|
||||
|
||||
#define PT_NOPARITY 0x0
|
||||
#define PT_ODDPARITY 0x1
|
||||
#define PT_EVENPARITY 0x2
|
||||
#define PT_MARKPARITY 0x3
|
||||
#define PT_SPACEPARITY 0x4
|
||||
|
||||
#define F_NONE 0x0
|
||||
#define F_IXON 0x1
|
||||
#define F_IXOFF 0x2
|
||||
#define F_IXANY 0x4
|
||||
#define F_IOXANY 0x8
|
||||
#define F_RTSFLOW 0x10
|
||||
#define F_CTSFLOW 0x20
|
||||
#define F_DTRFLOW 0x40
|
||||
#define F_DCDFLOW 0x80
|
||||
#define F_DSROFLOW 0x100
|
||||
#define F_DSRIFLOW 0x200
|
||||
|
||||
#define FI_NORX 0x1
|
||||
#define FI_RAW 0x2
|
||||
#define FI_ISTRIP 0x4
|
||||
#define FI_UCLC 0x8
|
||||
#define FI_INLCR 0x10
|
||||
#define FI_ICRNL 0x20
|
||||
#define FI_IGNCR 0x40
|
||||
#define FI_IGNBREAK 0x80
|
||||
#define FI_DSCRDBREAK 0x100
|
||||
#define FI_1MARKBREAK 0x200
|
||||
#define FI_2MARKBREAK 0x400
|
||||
#define FI_XCHNGBREAK 0x800
|
||||
#define FI_IGNRXERRS 0x1000
|
||||
#define FI_DSCDRXERRS 0x2000
|
||||
#define FI_1MARKRXERRS 0x4000
|
||||
#define FI_2MARKRXERRS 0x8000
|
||||
#define FI_XCHNGRXERRS 0x10000
|
||||
#define FI_DSCRDNULL 0x20000
|
||||
|
||||
#define FO_OLCUC 0x1
|
||||
#define FO_ONLCR 0x2
|
||||
#define FO_OOCRNL 0x4
|
||||
#define FO_ONOCR 0x8
|
||||
#define FO_ONLRET 0x10
|
||||
#define FO_ONL 0x20
|
||||
#define FO_OBS 0x40
|
||||
#define FO_OVT 0x80
|
||||
#define FO_OFF 0x100
|
||||
#define FO_OTAB1 0x200
|
||||
#define FO_OTAB2 0x400
|
||||
#define FO_OTAB3 0x800
|
||||
#define FO_OCR1 0x1000
|
||||
#define FO_OCR2 0x2000
|
||||
#define FO_OCR3 0x4000
|
||||
#define FO_OFILL 0x8000
|
||||
#define FO_ODELL 0x10000
|
||||
|
||||
#define P_RTSLOCK 0x1
|
||||
#define P_CTSLOCK 0x2
|
||||
#define P_MAPRTS 0x4
|
||||
#define P_MAPCTS 0x8
|
||||
#define P_LOOPBACK 0x10
|
||||
#define P_DTRFOLLOW 0x20
|
||||
#define P_FAKEDCD 0x40
|
||||
|
||||
#define P_RXIMIN 0x10000
|
||||
#define P_RXITIME 0x20000
|
||||
#define P_RXTHOLD 0x40000
|
||||
|
||||
/*
|
||||
* Define a structure to communicate serial port signal and data state
|
||||
* information.
|
||||
*/
|
||||
typedef struct asysigs {
|
||||
unsigned long data;
|
||||
unsigned long signal;
|
||||
unsigned long sigvalue;
|
||||
} asysigs_t;
|
||||
|
||||
#define DT_TXBUSY 0x1
|
||||
#define DT_TXEMPTY 0x2
|
||||
#define DT_TXLOW 0x4
|
||||
#define DT_TXHIGH 0x8
|
||||
#define DT_TXFULL 0x10
|
||||
#define DT_TXHOG 0x20
|
||||
#define DT_TXFLOWED 0x40
|
||||
#define DT_TXBREAK 0x80
|
||||
|
||||
#define DT_RXBUSY 0x100
|
||||
#define DT_RXEMPTY 0x200
|
||||
#define DT_RXLOW 0x400
|
||||
#define DT_RXHIGH 0x800
|
||||
#define DT_RXFULL 0x1000
|
||||
#define DT_RXHOG 0x2000
|
||||
#define DT_RXFLOWED 0x4000
|
||||
#define DT_RXBREAK 0x8000
|
||||
|
||||
#define SG_DTR 0x1
|
||||
#define SG_DCD 0x2
|
||||
#define SG_RTS 0x4
|
||||
#define SG_CTS 0x8
|
||||
#define SG_DSR 0x10
|
||||
#define SG_RI 0x20
|
||||
|
||||
/*
|
||||
* Define the notification setting structure. This is used to tell the
|
||||
* port what events we want to be informed about. Fields here use the
|
||||
* same defines as for the asysigs structure above.
|
||||
*/
|
||||
typedef struct asynotify {
|
||||
unsigned long ctrl;
|
||||
unsigned long data;
|
||||
unsigned long signal;
|
||||
unsigned long sigvalue;
|
||||
} asynotify_t;
|
||||
|
||||
/*
|
||||
* Define the port control structure. It is used to do fine grain
|
||||
* control operations on the port.
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned long rxctrl;
|
||||
unsigned long txctrl;
|
||||
char rximdch;
|
||||
char tximdch;
|
||||
char spare1;
|
||||
char spare2;
|
||||
} asyctrl_t;
|
||||
|
||||
#define CT_ENABLE 0x1
|
||||
#define CT_DISABLE 0x2
|
||||
#define CT_STOP 0x4
|
||||
#define CT_START 0x8
|
||||
#define CT_STARTFLOW 0x10
|
||||
#define CT_STOPFLOW 0x20
|
||||
#define CT_SENDCHR 0x40
|
||||
|
||||
/*
|
||||
* Define the stats structure kept for each port. This is a useful set
|
||||
* of data collected for each port on the slave. The A_GETSTATS command
|
||||
* is used to retrieve this data from the slave.
|
||||
*/
|
||||
typedef struct asystats {
|
||||
unsigned long opens;
|
||||
unsigned long txchars;
|
||||
unsigned long rxchars;
|
||||
unsigned long txringq;
|
||||
unsigned long rxringq;
|
||||
unsigned long txmsgs;
|
||||
unsigned long rxmsgs;
|
||||
unsigned long txflushes;
|
||||
unsigned long rxflushes;
|
||||
unsigned long overruns;
|
||||
unsigned long framing;
|
||||
unsigned long parity;
|
||||
unsigned long ringover;
|
||||
unsigned long lost;
|
||||
unsigned long rxstart;
|
||||
unsigned long rxstop;
|
||||
unsigned long txstart;
|
||||
unsigned long txstop;
|
||||
unsigned long dcdcnt;
|
||||
unsigned long dtrcnt;
|
||||
unsigned long ctscnt;
|
||||
unsigned long rtscnt;
|
||||
unsigned long dsrcnt;
|
||||
unsigned long ricnt;
|
||||
unsigned long txbreaks;
|
||||
unsigned long rxbreaks;
|
||||
unsigned long signals;
|
||||
unsigned long state;
|
||||
unsigned long hwid;
|
||||
} asystats_t;
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* All command and control communication with a device on the slave is
|
||||
* via a control block in shared memory. Each device has its own control
|
||||
* block, defined by the following structure. The control block allows
|
||||
* the host to open, close and control the device on the slave.
|
||||
*/
|
||||
typedef struct cdkctrl {
|
||||
unsigned char open;
|
||||
unsigned char close;
|
||||
unsigned long openarg;
|
||||
unsigned long closearg;
|
||||
unsigned long cmd;
|
||||
unsigned long status;
|
||||
unsigned long args[32];
|
||||
} cdkctrl_t;
|
||||
|
||||
/*
|
||||
* Each device on the slave passes data to and from the host via a ring
|
||||
* queue in shared memory. Define a ring queue structure to hold the
|
||||
* vital information about each ring queue. Two ring queues will be
|
||||
* allocated for each port, one for receive data and one for transmit
|
||||
* data.
|
||||
*/
|
||||
typedef struct cdkasyrq {
|
||||
unsigned long offset;
|
||||
unsigned short size;
|
||||
unsigned short head;
|
||||
unsigned short tail;
|
||||
} cdkasyrq_t;
|
||||
|
||||
/*
|
||||
* Each asynchronous port is defined in shared memory by the following
|
||||
* structure. It contains a control block to command a device, and also
|
||||
* the necessary data channel information as well.
|
||||
*/
|
||||
typedef struct cdkasy {
|
||||
cdkctrl_t ctrl;
|
||||
unsigned short notify;
|
||||
asynotify_t changed;
|
||||
unsigned short receive;
|
||||
cdkasyrq_t rxq;
|
||||
unsigned short transmit;
|
||||
cdkasyrq_t txq;
|
||||
} cdkasy_t;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Define the set of ioctls used by the driver to do special things
|
||||
* to the board. These include interrupting it, and initializing
|
||||
* the driver after board startup and shutdown.
|
||||
*/
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
#define STL_BINTR _IO('s',20)
|
||||
#define STL_BSTART _IO('s',21)
|
||||
#define STL_BSTOP _IO('s',22)
|
||||
#define STL_BRESET _IO('s',23)
|
||||
|
||||
/*
|
||||
* Define a set of ioctl extensions, used to get at special stuff.
|
||||
*/
|
||||
#define STL_GETPFLAG _IO('s',80)
|
||||
#define STL_SETPFLAG _IO('s',81)
|
||||
|
||||
/*****************************************************************************/
|
||||
#endif
|
||||
@@ -12,8 +12,8 @@
|
||||
#ifndef CEPH_FS_H
|
||||
#define CEPH_FS_H
|
||||
|
||||
#include "msgr.h"
|
||||
#include "rados.h"
|
||||
#include <linux/ceph/msgr.h>
|
||||
#include <linux/ceph/rados.h>
|
||||
|
||||
/*
|
||||
* subprotocol versions. when specific messages types or high-level
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef _FS_CEPH_DEBUGFS_H
|
||||
#define _FS_CEPH_DEBUGFS_H
|
||||
|
||||
#include "ceph_debug.h"
|
||||
#include "types.h"
|
||||
#include <linux/ceph/ceph_debug.h>
|
||||
#include <linux/ceph/types.h>
|
||||
|
||||
#define CEPH_DEFINE_SHOW_FUNC(name) \
|
||||
static int name##_open(struct inode *inode, struct file *file) \
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <linux/time.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#include "types.h"
|
||||
#include <linux/ceph/types.h>
|
||||
|
||||
/*
|
||||
* in all cases,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _FS_CEPH_LIBCEPH_H
|
||||
#define _FS_CEPH_LIBCEPH_H
|
||||
|
||||
#include "ceph_debug.h"
|
||||
#include <linux/ceph/ceph_debug.h>
|
||||
|
||||
#include <asm/unaligned.h>
|
||||
#include <linux/backing-dev.h>
|
||||
@@ -15,12 +15,12 @@
|
||||
#include <linux/writeback.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "messenger.h"
|
||||
#include "msgpool.h"
|
||||
#include "mon_client.h"
|
||||
#include "osd_client.h"
|
||||
#include "ceph_fs.h"
|
||||
#include <linux/ceph/types.h>
|
||||
#include <linux/ceph/messenger.h>
|
||||
#include <linux/ceph/msgpool.h>
|
||||
#include <linux/ceph/mon_client.h>
|
||||
#include <linux/ceph/osd_client.h>
|
||||
#include <linux/ceph/ceph_fs.h>
|
||||
|
||||
/*
|
||||
* mount options
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define _FS_CEPH_MDSMAP_H
|
||||
|
||||
#include <linux/bug.h>
|
||||
#include "types.h"
|
||||
#include <linux/ceph/types.h>
|
||||
|
||||
/*
|
||||
* mds map - describe servers in the mds cluster.
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
#include <linux/uio.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "buffer.h"
|
||||
#include <linux/ceph/types.h>
|
||||
#include <linux/ceph/buffer.h>
|
||||
|
||||
struct ceph_msg;
|
||||
struct ceph_connection;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <linux/kref.h>
|
||||
#include <linux/rbtree.h>
|
||||
|
||||
#include "messenger.h"
|
||||
#include <linux/ceph/messenger.h>
|
||||
|
||||
struct ceph_client;
|
||||
struct ceph_mount_args;
|
||||
@@ -71,7 +71,6 @@ struct ceph_mon_client {
|
||||
int cur_mon; /* last monitor i contacted */
|
||||
unsigned long sub_sent, sub_renew_after;
|
||||
struct ceph_connection con;
|
||||
bool have_fsid;
|
||||
|
||||
/* pending generic requests */
|
||||
struct rb_root generic_request_tree;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define _FS_CEPH_MSGPOOL
|
||||
|
||||
#include <linux/mempool.h>
|
||||
#include "messenger.h"
|
||||
#include <linux/ceph/messenger.h>
|
||||
|
||||
/*
|
||||
* we use memory pools for preallocating messages we may receive, to
|
||||
|
||||
@@ -207,7 +207,7 @@ extern void ceph_osdc_handle_reply(struct ceph_osd_client *osdc,
|
||||
extern void ceph_osdc_handle_map(struct ceph_osd_client *osdc,
|
||||
struct ceph_msg *msg);
|
||||
|
||||
extern void ceph_calc_raw_layout(struct ceph_osd_client *osdc,
|
||||
extern int ceph_calc_raw_layout(struct ceph_osd_client *osdc,
|
||||
struct ceph_file_layout *layout,
|
||||
u64 snapid,
|
||||
u64 off, u64 *plen, u64 *bno,
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#define _FS_CEPH_OSDMAP_H
|
||||
|
||||
#include <linux/rbtree.h>
|
||||
#include "types.h"
|
||||
#include "ceph_fs.h"
|
||||
#include <linux/ceph/types.h>
|
||||
#include <linux/ceph/ceph_fs.h>
|
||||
#include <linux/crush/crush.h>
|
||||
|
||||
/*
|
||||
@@ -109,9 +109,9 @@ extern struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
|
||||
extern void ceph_osdmap_destroy(struct ceph_osdmap *map);
|
||||
|
||||
/* calculate mapping of a file extent to an object */
|
||||
extern void ceph_calc_file_object_mapping(struct ceph_file_layout *layout,
|
||||
u64 off, u64 *plen,
|
||||
u64 *bno, u64 *oxoff, u64 *oxlen);
|
||||
extern int ceph_calc_file_object_mapping(struct ceph_file_layout *layout,
|
||||
u64 off, u64 *plen,
|
||||
u64 *bno, u64 *oxoff, u64 *oxlen);
|
||||
|
||||
/* calculate mapping of object to a placement group */
|
||||
extern int ceph_calc_object_layout(struct ceph_object_layout *ol,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* (Reliable Autonomic Distributed Object Store).
|
||||
*/
|
||||
|
||||
#include "msgr.h"
|
||||
#include <linux/ceph/msgr.h>
|
||||
|
||||
/*
|
||||
* osdmap encoding versions
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
#include <linux/fcntl.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
#include "ceph_fs.h"
|
||||
#include "ceph_frag.h"
|
||||
#include "ceph_hash.h"
|
||||
#include <linux/ceph/ceph_fs.h>
|
||||
#include <linux/ceph/ceph_frag.h>
|
||||
#include <linux/ceph/ceph_hash.h>
|
||||
|
||||
/*
|
||||
* Identify inodes by both their ino AND snapshot id (a u64).
|
||||
|
||||
+30
-10
@@ -17,6 +17,7 @@
|
||||
#include <linux/rwsem.h>
|
||||
#include <linux/idr.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/xattr.h>
|
||||
|
||||
#ifdef CONFIG_CGROUPS
|
||||
|
||||
@@ -45,17 +46,13 @@ extern const struct file_operations proc_cgroup_operations;
|
||||
|
||||
/* Define the enumeration of all builtin cgroup subsystems */
|
||||
#define SUBSYS(_x) _x ## _subsys_id,
|
||||
#define IS_SUBSYS_ENABLED(option) IS_ENABLED(option)
|
||||
enum cgroup_subsys_id {
|
||||
#include <linux/cgroup_subsys.h>
|
||||
CGROUP_BUILTIN_SUBSYS_COUNT
|
||||
CGROUP_SUBSYS_COUNT,
|
||||
};
|
||||
#undef IS_SUBSYS_ENABLED
|
||||
#undef SUBSYS
|
||||
/*
|
||||
* This define indicates the maximum number of subsystems that can be loaded
|
||||
* at once. We limit to this many since cgroupfs_root has subsys_bits to keep
|
||||
* track of all of them.
|
||||
*/
|
||||
#define CGROUP_SUBSYS_COUNT (BITS_PER_BYTE*sizeof(unsigned long))
|
||||
|
||||
/* Per-subsystem/per-cgroup state maintained by the system. */
|
||||
struct cgroup_subsys_state {
|
||||
@@ -216,6 +213,9 @@ struct cgroup {
|
||||
/* List of events which userspace want to receive */
|
||||
struct list_head event_list;
|
||||
spinlock_t event_list_lock;
|
||||
|
||||
/* directory xattrs */
|
||||
struct simple_xattrs xattrs;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -309,6 +309,9 @@ struct cftype {
|
||||
/* CFTYPE_* flags */
|
||||
unsigned int flags;
|
||||
|
||||
/* file xattrs */
|
||||
struct simple_xattrs xattrs;
|
||||
|
||||
int (*open)(struct inode *inode, struct file *file);
|
||||
ssize_t (*read)(struct cgroup *cgrp, struct cftype *cft,
|
||||
struct file *file,
|
||||
@@ -394,7 +397,7 @@ struct cftype {
|
||||
*/
|
||||
struct cftype_set {
|
||||
struct list_head node; /* chained at subsys->cftsets */
|
||||
const struct cftype *cfts;
|
||||
struct cftype *cfts;
|
||||
};
|
||||
|
||||
struct cgroup_scanner {
|
||||
@@ -406,8 +409,8 @@ struct cgroup_scanner {
|
||||
void *data;
|
||||
};
|
||||
|
||||
int cgroup_add_cftypes(struct cgroup_subsys *ss, const struct cftype *cfts);
|
||||
int cgroup_rm_cftypes(struct cgroup_subsys *ss, const struct cftype *cfts);
|
||||
int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts);
|
||||
int cgroup_rm_cftypes(struct cgroup_subsys *ss, struct cftype *cfts);
|
||||
|
||||
int cgroup_is_removed(const struct cgroup *cgrp);
|
||||
|
||||
@@ -496,6 +499,21 @@ struct cgroup_subsys {
|
||||
*/
|
||||
bool __DEPRECATED_clear_css_refs;
|
||||
|
||||
/*
|
||||
* If %false, this subsystem is properly hierarchical -
|
||||
* configuration, resource accounting and restriction on a parent
|
||||
* cgroup cover those of its children. If %true, hierarchy support
|
||||
* is broken in some ways - some subsystems ignore hierarchy
|
||||
* completely while others are only implemented half-way.
|
||||
*
|
||||
* It's now disallowed to create nested cgroups if the subsystem is
|
||||
* broken and cgroup core will emit a warning message on such
|
||||
* cases. Eventually, all subsystems will be made properly
|
||||
* hierarchical and this will go away.
|
||||
*/
|
||||
bool broken_hierarchy;
|
||||
bool warned_broken_hierarchy;
|
||||
|
||||
#define MAX_CGROUP_TYPE_NAMELEN 32
|
||||
const char *name;
|
||||
|
||||
@@ -521,7 +539,9 @@ struct cgroup_subsys {
|
||||
};
|
||||
|
||||
#define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys;
|
||||
#define IS_SUBSYS_ENABLED(option) IS_BUILTIN(option)
|
||||
#include <linux/cgroup_subsys.h>
|
||||
#undef IS_SUBSYS_ENABLED
|
||||
#undef SUBSYS
|
||||
|
||||
static inline struct cgroup_subsys_state *cgroup_subsys_state(
|
||||
|
||||
@@ -7,73 +7,73 @@
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef CONFIG_CPUSETS
|
||||
#if IS_SUBSYS_ENABLED(CONFIG_CPUSETS)
|
||||
SUBSYS(cpuset)
|
||||
#endif
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef CONFIG_CGROUP_DEBUG
|
||||
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_DEBUG)
|
||||
SUBSYS(debug)
|
||||
#endif
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef CONFIG_CGROUP_SCHED
|
||||
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_SCHED)
|
||||
SUBSYS(cpu_cgroup)
|
||||
#endif
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef CONFIG_CGROUP_CPUACCT
|
||||
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_CPUACCT)
|
||||
SUBSYS(cpuacct)
|
||||
#endif
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef CONFIG_MEMCG
|
||||
#if IS_SUBSYS_ENABLED(CONFIG_MEMCG)
|
||||
SUBSYS(mem_cgroup)
|
||||
#endif
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef CONFIG_CGROUP_DEVICE
|
||||
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_DEVICE)
|
||||
SUBSYS(devices)
|
||||
#endif
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef CONFIG_CGROUP_FREEZER
|
||||
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_FREEZER)
|
||||
SUBSYS(freezer)
|
||||
#endif
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef CONFIG_NET_CLS_CGROUP
|
||||
#if IS_SUBSYS_ENABLED(CONFIG_NET_CLS_CGROUP)
|
||||
SUBSYS(net_cls)
|
||||
#endif
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef CONFIG_BLK_CGROUP
|
||||
#if IS_SUBSYS_ENABLED(CONFIG_BLK_CGROUP)
|
||||
SUBSYS(blkio)
|
||||
#endif
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef CONFIG_CGROUP_PERF
|
||||
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_PERF)
|
||||
SUBSYS(perf)
|
||||
#endif
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef CONFIG_NETPRIO_CGROUP
|
||||
#if IS_SUBSYS_ENABLED(CONFIG_NETPRIO_CGROUP)
|
||||
SUBSYS(net_prio)
|
||||
#endif
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef CONFIG_CGROUP_HUGETLB
|
||||
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_HUGETLB)
|
||||
SUBSYS(hugetlb)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#define CLK_IGNORE_UNUSED BIT(3) /* do not gate even if unused */
|
||||
#define CLK_IS_ROOT BIT(4) /* root clk, has no parent */
|
||||
#define CLK_IS_BASIC BIT(5) /* Basic clk, can't do a to_clk_foo() */
|
||||
#define CLK_GET_RATE_NOCACHE BIT(6) /* do not use the cached clk rate */
|
||||
|
||||
struct clk_hw;
|
||||
|
||||
@@ -360,6 +361,11 @@ int of_clk_add_provider(struct device_node *np,
|
||||
void of_clk_del_provider(struct device_node *np);
|
||||
struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec,
|
||||
void *data);
|
||||
struct clk_onecell_data {
|
||||
struct clk **clks;
|
||||
unsigned int clk_num;
|
||||
};
|
||||
struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data);
|
||||
const char *of_clk_get_parent_name(struct device_node *np, int index);
|
||||
void of_clk_init(const struct of_device_id *matches);
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (C) 2010 Broadcom
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_CLK_BCM2835_H_
|
||||
#define __LINUX_CLK_BCM2835_H_
|
||||
|
||||
void __init bcm2835_init_clocks(void);
|
||||
|
||||
#endif
|
||||
@@ -97,6 +97,8 @@ struct clock_event_device {
|
||||
void (*broadcast)(const struct cpumask *mask);
|
||||
void (*set_mode)(enum clock_event_mode mode,
|
||||
struct clock_event_device *);
|
||||
void (*suspend)(struct clock_event_device *);
|
||||
void (*resume)(struct clock_event_device *);
|
||||
unsigned long min_delta_ticks;
|
||||
unsigned long max_delta_ticks;
|
||||
|
||||
@@ -156,6 +158,9 @@ clockevents_calc_mult_shift(struct clock_event_device *ce, u32 freq, u32 minsec)
|
||||
freq, minsec);
|
||||
}
|
||||
|
||||
extern void clockevents_suspend(void);
|
||||
extern void clockevents_resume(void);
|
||||
|
||||
#ifdef CONFIG_GENERIC_CLOCKEVENTS
|
||||
extern void clockevents_notify(unsigned long reason, void *arg);
|
||||
#else
|
||||
@@ -164,6 +169,9 @@ extern void clockevents_notify(unsigned long reason, void *arg);
|
||||
|
||||
#else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */
|
||||
|
||||
static inline void clockevents_suspend(void) {}
|
||||
static inline void clockevents_resume(void) {}
|
||||
|
||||
#define clockevents_notify(reason, arg) do { } while (0)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,8 +22,9 @@ extern int sysctl_extfrag_handler(struct ctl_table *table, int write,
|
||||
extern int fragmentation_index(struct zone *zone, unsigned int order);
|
||||
extern unsigned long try_to_compact_pages(struct zonelist *zonelist,
|
||||
int order, gfp_t gfp_mask, nodemask_t *mask,
|
||||
bool sync);
|
||||
bool sync, bool *contended, struct page **page);
|
||||
extern int compact_pgdat(pg_data_t *pgdat, int order);
|
||||
extern void reset_isolation_suitable(pg_data_t *pgdat);
|
||||
extern unsigned long compaction_suitable(struct zone *zone, int order);
|
||||
|
||||
/* Do not skip compaction more than 64 times */
|
||||
@@ -61,10 +62,20 @@ static inline bool compaction_deferred(struct zone *zone, int order)
|
||||
return zone->compact_considered < defer_limit;
|
||||
}
|
||||
|
||||
/* Returns true if restarting compaction after many failures */
|
||||
static inline bool compaction_restarting(struct zone *zone, int order)
|
||||
{
|
||||
if (order < zone->compact_order_failed)
|
||||
return false;
|
||||
|
||||
return zone->compact_defer_shift == COMPACT_MAX_DEFER_SHIFT &&
|
||||
zone->compact_considered >= 1UL << zone->compact_defer_shift;
|
||||
}
|
||||
|
||||
#else
|
||||
static inline unsigned long try_to_compact_pages(struct zonelist *zonelist,
|
||||
int order, gfp_t gfp_mask, nodemask_t *nodemask,
|
||||
bool sync)
|
||||
bool sync, bool *contended, struct page **page)
|
||||
{
|
||||
return COMPACT_CONTINUE;
|
||||
}
|
||||
@@ -74,6 +85,10 @@ static inline int compact_pgdat(pg_data_t *pgdat, int order)
|
||||
return COMPACT_CONTINUE;
|
||||
}
|
||||
|
||||
static inline void reset_isolation_suitable(pg_data_t *pgdat)
|
||||
{
|
||||
}
|
||||
|
||||
static inline unsigned long compaction_suitable(struct zone *zone, int order)
|
||||
{
|
||||
return COMPACT_SKIPPED;
|
||||
|
||||
@@ -160,11 +160,6 @@ struct compat_ustat {
|
||||
char f_fpack[6];
|
||||
};
|
||||
|
||||
typedef union compat_sigval {
|
||||
compat_int_t sival_int;
|
||||
compat_uptr_t sival_ptr;
|
||||
} compat_sigval_t;
|
||||
|
||||
#define COMPAT_SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 3)
|
||||
|
||||
typedef struct compat_sigevent {
|
||||
@@ -590,6 +585,9 @@ asmlinkage ssize_t compat_sys_process_vm_writev(compat_pid_t pid,
|
||||
unsigned long liovcnt, const struct compat_iovec __user *rvec,
|
||||
unsigned long riovcnt, unsigned long flags);
|
||||
|
||||
asmlinkage long compat_sys_sendfile(int out_fd, int in_fd,
|
||||
compat_off_t __user *offset, compat_size_t count);
|
||||
|
||||
#else
|
||||
|
||||
#define is_compat_task() (0)
|
||||
|
||||
@@ -49,6 +49,13 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if __GNUC_MINOR__ >= 6
|
||||
/*
|
||||
* Tell the optimizer that something else uses this function or variable.
|
||||
*/
|
||||
#define __visible __attribute__((externally_visible))
|
||||
#endif
|
||||
|
||||
#if __GNUC_MINOR__ > 0
|
||||
#define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
|
||||
#endif
|
||||
|
||||
@@ -278,6 +278,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
|
||||
# define __section(S) __attribute__ ((__section__(#S)))
|
||||
#endif
|
||||
|
||||
#ifndef __visible
|
||||
#define __visible
|
||||
#endif
|
||||
|
||||
/* Are two types/vars the same type (ignoring qualifiers)? */
|
||||
#ifndef __same_type
|
||||
# define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* comstats.h -- Serial Port Stats.
|
||||
*
|
||||
* Copyright (C) 1996-1998 Stallion Technologies
|
||||
* Copyright (C) 1994-1996 Greg Ungerer.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
#ifndef _COMSTATS_H
|
||||
#define _COMSTATS_H
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Serial port stats structure. The structure itself is UART
|
||||
* independent, but some fields may be UART/driver specific (for
|
||||
* example state).
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
unsigned long brd;
|
||||
unsigned long panel;
|
||||
unsigned long port;
|
||||
unsigned long hwid;
|
||||
unsigned long type;
|
||||
unsigned long txtotal;
|
||||
unsigned long rxtotal;
|
||||
unsigned long txbuffered;
|
||||
unsigned long rxbuffered;
|
||||
unsigned long rxoverrun;
|
||||
unsigned long rxparity;
|
||||
unsigned long rxframing;
|
||||
unsigned long rxlost;
|
||||
unsigned long txbreaks;
|
||||
unsigned long rxbreaks;
|
||||
unsigned long txxon;
|
||||
unsigned long txxoff;
|
||||
unsigned long rxxon;
|
||||
unsigned long rxxoff;
|
||||
unsigned long txctson;
|
||||
unsigned long txctsoff;
|
||||
unsigned long rxrtson;
|
||||
unsigned long rxrtsoff;
|
||||
unsigned long modem;
|
||||
unsigned long state;
|
||||
unsigned long flags;
|
||||
unsigned long ttystate;
|
||||
unsigned long cflags;
|
||||
unsigned long iflags;
|
||||
unsigned long oflags;
|
||||
unsigned long lflags;
|
||||
unsigned long signals;
|
||||
} comstats_t;
|
||||
|
||||
|
||||
/*
|
||||
* Board stats structure. Returns useful info about the board.
|
||||
*/
|
||||
|
||||
#define COM_MAXPANELS 8
|
||||
|
||||
typedef struct {
|
||||
unsigned long panel;
|
||||
unsigned long type;
|
||||
unsigned long hwid;
|
||||
unsigned long nrports;
|
||||
} companel_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned long brd;
|
||||
unsigned long type;
|
||||
unsigned long hwid;
|
||||
unsigned long state;
|
||||
unsigned long ioaddr;
|
||||
unsigned long ioaddr2;
|
||||
unsigned long memaddr;
|
||||
unsigned long irq;
|
||||
unsigned long nrpanels;
|
||||
unsigned long nrports;
|
||||
companel_t panels[COM_MAXPANELS];
|
||||
} combrd_t;
|
||||
|
||||
|
||||
/*
|
||||
* Define the ioctl operations for stats stuff.
|
||||
*/
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
#define COM_GETPORTSTATS _IO('c',30)
|
||||
#define COM_CLRPORTSTATS _IO('c',31)
|
||||
#define COM_GETBRDSTATS _IO('c',32)
|
||||
|
||||
|
||||
/*
|
||||
* Define the set of ioctls that give user level access to the
|
||||
* private port, panel and board structures. The argument required
|
||||
* will be driver dependent!
|
||||
*/
|
||||
#define COM_READPORT _IO('c',40)
|
||||
#define COM_READBOARD _IO('c',41)
|
||||
#define COM_READPANEL _IO('c',42)
|
||||
|
||||
/*****************************************************************************/
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user