diff options
| author | James Simmons <jsimmons@kozmo.(none)> | 2003-04-09 16:15:57 -0700 |
|---|---|---|
| committer | James Simmons <jsimmons@kozmo.(none)> | 2003-04-09 16:15:57 -0700 |
| commit | 690271a6762ba5b5e6c3638c9e14ff3267b5d8de (patch) | |
| tree | ba49e65c772b4c07d56cc58a17cd92a56e92d647 /include/linux | |
| parent | a92f10301ee7b59b01c1dc63c6957ec242aa21aa (diff) | |
| parent | 5edf8b9a4208987e60e0f41aff0bcc298641c0ad (diff) | |
Merge kozmo.(none):/usr/src/linus-2.5
into kozmo.(none):/usr/src/fbdev-2.5
Diffstat (limited to 'include/linux')
37 files changed, 451 insertions, 365 deletions
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h index 4ef3f220c8bc..5bb80a3731ad 100644 --- a/include/linux/agp_backend.h +++ b/include/linux/agp_backend.h @@ -53,7 +53,7 @@ enum chipset_type { INTEL_I850, INTEL_I860, INTEL_460GX, - INTEL_I7505, + INTEL_E7505, VIA_GENERIC, SIS_GENERIC, AMD_GENERIC, diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index b5a2f676c4f8..ee3f66a5e60c 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -260,7 +260,6 @@ struct request_queue #define blk_queue_plugged(q) !list_empty(&(q)->plug_list) #define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags) -#define blk_queue_empty(q) elv_queue_empty(q) #define blk_fs_request(rq) ((rq)->flags & REQ_CMD) #define blk_pc_request(rq) ((rq)->flags & REQ_BLOCK_PC) #define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist) diff --git a/include/linux/compatmac.h b/include/linux/compatmac.h deleted file mode 100644 index 5ae68a6b58e7..000000000000 --- a/include/linux/compatmac.h +++ /dev/null @@ -1,160 +0,0 @@ - /* - * This header tries to allow you to write 2.3-compatible drivers, - * but (using this header) still allows you to run them on 2.2 and - * 2.0 kernels. - * - * Sometimes, a #define replaces a "construct" that older kernels - * had. For example, - * - * DECLARE_MUTEX(name); - * - * replaces the older - * - * struct semaphore name = MUTEX; - * - * This file then declares the DECLARE_MUTEX macro to compile into the - * older version. - * - * In some cases, a macro or function changes the number of arguments. - * In that case, there is nothing we can do except define an access - * macro that provides the same functionality on both versions of Linux. - * - * This is the case for example with the "get_user" macro 2.0 kernels use: - * - * a = get_user (b); - * - * while newer kernels use - * - * get_user (a,b); - * - * This is unfortunate. We therefore define "Get_user (a,b)" which looks - * almost the same as the 2.2+ construct, and translates into the - * appropriate sequence for earlier constructs. - * - * Supported by this file are the 2.0 kernels, 2.2 kernels, and the - * most recent 2.3 kernel. 2.3 support will be dropped as soon when 2.4 - * comes out. 2.0 support may someday be dropped. But then again, maybe - * not. - * - * I'll try to maintain this, provided that Linus agrees with the setup. - * Feel free to mail updates or suggestions. - * - * -- R.E.Wolff@BitWizard.nl - * - */ - -#ifndef COMPATMAC_H -#define COMPATMAC_H - -#include <linux/version.h> - -#if LINUX_VERSION_CODE < 0x020100 /* Less than 2.1.0 */ -#define TWO_ZERO -#else -#if LINUX_VERSION_CODE < 0x020200 /* less than 2.2.x */ -#warning "Please use a 2.2.x kernel. " -#else -#if LINUX_VERSION_CODE < 0x020300 /* less than 2.3.x */ -#define TWO_TWO -#else -#define TWO_THREE -#endif -#endif -#endif - -#ifdef TWO_ZERO - -/* Here is the section that makes the 2.2 compatible driver source - work for 2.0 too! We mostly try to adopt the "new thingies" from 2.2, - and provide for compatibility stuff here if possible. */ - -/* Some 200 days (on intel) */ -#define MAX_SCHEDULE_TIMEOUT ((long)(~0UL>>1)) - -#include <linux/bios32.h> - -#define Get_user(a,b) a = get_user(b) -#define Put_user(a,b) 0,put_user(a,b) -#define copy_to_user(a,b,c) memcpy_tofs(a,b,c) - -static inline int copy_from_user(void *to,const void *from, int c) -{ - memcpy_fromfs(to, from, c); - return 0; -} - -#define pci_present pcibios_present -#define pci_read_config_word pcibios_read_config_word -#define pci_read_config_dword pcibios_read_config_dword - -static inline unsigned char get_irq (unsigned char bus, unsigned char fn) -{ - unsigned char t; - pcibios_read_config_byte (bus, fn, PCI_INTERRUPT_LINE, &t); - return t; -} - -static inline void *ioremap(unsigned long base, long length) -{ - if (base < 0x100000) return (void *)base; - return vremap (base, length); -} - -#define my_iounmap(x, b) (((long)x<0x100000)?0:vfree ((void*)x)) - -#define tty_flip_buffer_push(tty) schedule_delayed_work(&tty->flip.work, 1) -#define signal_pending(current) (current->signal & ~current->blocked) -#define schedule_timeout(to) do {current->timeout = jiffies + (to);schedule ();} while (0) -#define time_after(t1,t2) (((long)t1-t2) > 0) - - -#define test_and_set_bit(nr, addr) set_bit(nr, addr) -#define test_and_clear_bit(nr, addr) clear_bit(nr, addr) - -/* Not yet implemented on 2.0 */ -#define ASYNC_SPD_SHI -1 -#define ASYNC_SPD_WARP -1 - - -/* Ugly hack: the driver_name doesn't exist in 2.0.x . So we define it - to the "name" field that does exist. As long as the assignments are - done in the right order, there is nothing to worry about. */ -#define driver_name name - -/* Should be in a header somewhere. They are in tty.h on 2.2 */ -#define TTY_HW_COOK_OUT 14 /* Flag to tell ntty what we can handle */ -#define TTY_HW_COOK_IN 15 /* in hardware - output and input */ - -/* The return type of a "close" routine. */ -#define INT void -#define NO_ERROR /* Nothing */ - -#else - -/* The 2.2.x compatibility section. */ -#include <asm/uaccess.h> - - -#define Get_user(a,b) get_user(a,b) -#define Put_user(a,b) put_user(a,b) -#define get_irq(pdev) pdev->irq - -#define INT int -#define NO_ERROR 0 - -#define my_iounmap(x,b) (iounmap((char *)(b))) - -#endif - -#ifndef TWO_THREE -/* These are new in 2.3. The source now uses 2.3 syntax, and here is - the compatibility define... */ -#define wait_queue_head_t struct wait_queue * -#define DECLARE_MUTEX(name) struct semaphore name = MUTEX -#define DECLARE_WAITQUEUE(wait, current) \ - struct wait_queue wait = { current, NULL } - -#endif - - -#endif diff --git a/include/linux/compiler.h b/include/linux/compiler.h index a28d0d51b851..4ef20f517d27 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -1,6 +1,14 @@ #ifndef __LINUX_COMPILER_H #define __LINUX_COMPILER_H +#ifdef __CHECKER__ + #define __user __attribute__((noderef, address_space(1))) + #define __kernel /* default address space */ +#else + #define __user + #define __kernel +#endif + #if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) #define inline __inline__ __attribute__((always_inline)) #define __inline__ __inline__ __attribute__((always_inline)) diff --git a/include/linux/dvb/audio.h b/include/linux/dvb/audio.h index d0ce5e27bcd5..58956c3bba52 100644 --- a/include/linux/dvb/audio.h +++ b/include/linux/dvb/audio.h @@ -47,10 +47,17 @@ typedef enum { typedef enum { AUDIO_STEREO, AUDIO_MONO_LEFT, - AUDIO_MONO_RIGHT, + AUDIO_MONO_RIGHT } audio_channel_select_t; +typedef struct audio_mixer { + unsigned int volume_left; + unsigned int volume_right; + // what else do we need? bass, pass-through, ... +} audio_mixer_t; + + typedef struct audio_status { int AV_sync_state; /* sync audio and video? */ int mute_state; /* audio is muted */ @@ -58,16 +65,10 @@ typedef struct audio_status { audio_stream_source_t stream_source; /* current stream source */ audio_channel_select_t channel_select; /* currently selected channel */ int bypass_mode; /* pass on audio data to */ + audio_mixer_t mixer_state; /* current mixer state */ } audio_status_t; /* separate decoder hardware */ -typedef struct audio_mixer { - unsigned int volume_left; - unsigned int volume_right; - // what else do we need? bass, pass-through, ... -} audio_mixer_t; - - typedef struct audio_karaoke{ /* if Vocal1 or Vocal2 are non-zero, they get mixed */ int vocal1; /* into left and right t at 70% each */ diff --git a/include/linux/dvb/ca.h b/include/linux/dvb/ca.h index a0bdd645c745..026e5c35c0ab 100644 --- a/include/linux/dvb/ca.h +++ b/include/linux/dvb/ca.h @@ -21,8 +21,8 @@ * */ -#ifndef _CA_H_ -#define _CA_H_ +#ifndef _DVBCA_H_ +#define _DVBCA_H_ /* slot interface types and info */ @@ -33,6 +33,7 @@ typedef struct ca_slot_info { #define CA_CI 1 /* CI high level interface */ #define CA_CI_LINK 2 /* CI link layer level interface */ #define CA_CI_PHYS 4 /* CI physical layer level interface */ +#define CA_DESCR 8 /* built-in descrambler */ #define CA_SC 128 /* simple smart card interface */ unsigned int flags; @@ -44,7 +45,7 @@ typedef struct ca_slot_info { /* descrambler types and info */ typedef struct ca_descr_info { - unsigned int num; /* number of available descramblers (keys) */ + unsigned int num; /* number of available descramblers (keys) */ unsigned int type; /* type of supported scrambling system */ #define CA_ECD 1 #define CA_NDS 2 @@ -59,19 +60,24 @@ typedef struct ca_caps { } ca_caps_t; /* a message to/from a CI-CAM */ -typedef struct ca_msg { - unsigned int index; +typedef struct ca_msg { + unsigned int index; unsigned int type; unsigned int length; unsigned char msg[256]; } ca_msg_t; typedef struct ca_descr { - unsigned int index; - unsigned int parity; + unsigned int index; + unsigned int parity; /* 0 == even, 1 == odd */ unsigned char cw[8]; } ca_descr_t; +typedef struct ca_pid { + unsigned int pid; + int index; /* -1 == disable*/ +} ca_pid_t; + #define CA_RESET _IO('o', 128) #define CA_GET_CAP _IOR('o', 129, ca_caps_t) #define CA_GET_SLOT_INFO _IOR('o', 130, ca_slot_info_t) @@ -79,6 +85,7 @@ typedef struct ca_descr { #define CA_GET_MSG _IOR('o', 132, ca_msg_t) #define CA_SEND_MSG _IOW('o', 133, ca_msg_t) #define CA_SET_DESCR _IOW('o', 134, ca_descr_t) +#define CA_SET_PID _IOW('o', 135, ca_pid_t) #endif diff --git a/include/linux/dvb/dmx.h b/include/linux/dvb/dmx.h index 38586a88ac3f..089b21734780 100644 --- a/include/linux/dvb/dmx.h +++ b/include/linux/dvb/dmx.h @@ -21,13 +21,14 @@ * */ -#ifndef _DMX_H_ -#define _DMX_H_ +#ifndef _DVBDMX_H_ +#define _DVBDMX_H_ #ifdef __KERNEL__ #include <linux/types.h> #else #include <stdint.h> +#include <time.h> #endif #define DMX_FILTER_SIZE 16 @@ -154,9 +155,15 @@ typedef enum { DMX_SOURCE_DVR0 = 16, DMX_SOURCE_DVR1, DMX_SOURCE_DVR2, - DMX_SOURCE_DVR3, + DMX_SOURCE_DVR3 } dmx_source_t; +struct dmx_stc { + unsigned int num; /* input : which STC? 0..N */ + unsigned int base; /* output: divisor for stc to get 90 kHz clock */ + uint64_t stc; /* output: stc in 'base'*90 kHz units */ +}; + #define DMX_START _IO('o',41) #define DMX_STOP _IO('o',42) @@ -164,9 +171,10 @@ typedef enum { #define DMX_SET_PES_FILTER _IOW('o',44,struct dmx_pes_filter_params) #define DMX_SET_BUFFER_SIZE _IO('o',45) #define DMX_GET_EVENT _IOR('o',46,struct dmx_event) -#define DMX_GET_PES_PIDS _IOR('o',47,uint16_t) +#define DMX_GET_PES_PIDS _IOR('o',47,uint16_t[5]) #define DMX_GET_CAPS _IOR('o',48,dmx_caps_t) #define DMX_SET_SOURCE _IOW('o',49,dmx_source_t) +#define DMX_GET_STC _IOWR('o',50,struct dmx_stc) -#endif /*_DMX_H_*/ +#endif /*_DVBDMX_H_*/ diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index 0256741c580b..8b17d6c2ea05 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h @@ -23,8 +23,8 @@ * */ -#ifndef _FRONTEND_H_ -#define _FRONTEND_H_ +#ifndef _DVBFRONTEND_H_ +#define _DVBFRONTEND_H_ #ifdef __KERNEL__ #include <linux/types.h> @@ -33,14 +33,14 @@ #endif -typedef enum { +typedef enum fe_type { FE_QPSK, FE_QAM, FE_OFDM } fe_type_t; -typedef enum { +typedef enum fe_caps { FE_IS_STUPID = 0, FE_CAN_INVERSION_AUTO = 0x1, FE_CAN_FEC_1_2 = 0x2, @@ -63,6 +63,8 @@ typedef enum { FE_CAN_BANDWIDTH_AUTO = 0x40000, FE_CAN_GUARD_INTERVAL_AUTO = 0x80000, FE_CAN_HIERARCHY_AUTO = 0x100000, + FE_CAN_RECOVER = 0x20000000, + FE_CAN_CLEAN_SETUP = 0x40000000, FE_CAN_MUTE_TS = 0x80000000 } fe_caps_t; @@ -99,25 +101,25 @@ struct dvb_diseqc_slave_reply { }; /* errorcode when no message was received */ -typedef enum { +typedef enum fe_sec_voltage { SEC_VOLTAGE_13, SEC_VOLTAGE_18 } fe_sec_voltage_t; -typedef enum { +typedef enum fe_sec_tone_mode { SEC_TONE_ON, SEC_TONE_OFF } fe_sec_tone_mode_t; -typedef enum { +typedef enum fe_sec_mini_cmd { SEC_MINI_A, SEC_MINI_B } fe_sec_mini_cmd_t; -typedef enum { +typedef enum fe_status { FE_HAS_SIGNAL = 0x01, /* found something above the noise level */ FE_HAS_CARRIER = 0x02, /* found a DVB signal */ FE_HAS_VITERBI = 0x04, /* FEC is stable */ @@ -125,17 +127,17 @@ typedef enum { FE_HAS_LOCK = 0x10, /* everything's working... */ FE_TIMEDOUT = 0x20, /* no lock within the last ~2 seconds */ FE_REINIT = 0x40 /* frontend was reinitialized, */ -} fe_status_t; /* application is recommned to reset */ +} fe_status_t; /* application is recommended to reset */ /* DiSEqC, tone and parameters */ -typedef enum { +typedef enum fe_spectral_inversion { INVERSION_OFF, INVERSION_ON, INVERSION_AUTO } fe_spectral_inversion_t; -typedef enum { +typedef enum fe_code_rate { FEC_NONE = 0, FEC_1_2, FEC_2_3, @@ -149,7 +151,7 @@ typedef enum { } fe_code_rate_t; -typedef enum { +typedef enum fe_modulation { QPSK, QAM_16, QAM_32, @@ -160,13 +162,13 @@ typedef enum { } fe_modulation_t; -typedef enum { +typedef enum fe_transmit_mode { TRANSMISSION_MODE_2K, TRANSMISSION_MODE_8K, TRANSMISSION_MODE_AUTO } fe_transmit_mode_t; -typedef enum { +typedef enum fe_bandwidth { BANDWIDTH_8_MHZ, BANDWIDTH_7_MHZ, BANDWIDTH_6_MHZ, @@ -174,7 +176,7 @@ typedef enum { } fe_bandwidth_t; -typedef enum { +typedef enum fe_guard_interval { GUARD_INTERVAL_1_32, GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, @@ -183,7 +185,7 @@ typedef enum { } fe_guard_interval_t; -typedef enum { +typedef enum fe_hierarchy { HIERARCHY_NONE, HIERARCHY_1, HIERARCHY_2, @@ -257,5 +259,5 @@ struct dvb_frontend_event { #define FE_GET_EVENT _IOR('o', 78, struct dvb_frontend_event) -#endif /*_FRONTEND_H_*/ +#endif /*_DVBFRONTEND_H_*/ diff --git a/include/linux/dvb/net.h b/include/linux/dvb/net.h index 419d44884b72..5bf03b81e668 100644 --- a/include/linux/dvb/net.h +++ b/include/linux/dvb/net.h @@ -39,6 +39,7 @@ struct dvb_net_if { #define NET_ADD_IF _IOWR('o', 52, struct dvb_net_if) #define NET_REMOVE_IF _IO('o', 53) +#define NET_GET_IF _IOWR('o', 54, struct dvb_net_if) #endif /*_DVBNET_H_*/ diff --git a/include/linux/dvb/osd.h b/include/linux/dvb/osd.h index 760ccff6c75c..0d8143960a19 100644 --- a/include/linux/dvb/osd.h +++ b/include/linux/dvb/osd.h @@ -25,83 +25,83 @@ #define _DVBOSD_H_ typedef enum { - // All functions return -2 on "not open" + // All functions return -2 on "not open" OSD_Close=1, // () - // Disables OSD and releases the buffers - // returns 0 on success - OSD_Open, // (x0,y0,x1,y1,BitPerPixel[2/4/8](color&0x0F),mix[0..15](color&0xF0)) - // Opens OSD with this size and bit depth - // returns 0 on success, -1 on DRAM allocation error, -2 on "already open" - OSD_Show, // () - // enables OSD mode - // returns 0 on success - OSD_Hide, // () - // disables OSD mode - // returns 0 on success - OSD_Clear, // () - // Sets all pixel to color 0 - // returns 0 on success - OSD_Fill, // (color) - // Sets all pixel to color <col> - // returns 0 on success - OSD_SetColor, // (color,R{x0},G{y0},B{x1},opacity{y1}) - // set palette entry <num> to <r,g,b>, <mix> and <trans> apply - // R,G,B: 0..255 - // R=Red, G=Green, B=Blue - // opacity=0: pixel opacity 0% (only video pixel shows) - // opacity=1..254: pixel opacity as specified in header - // opacity=255: pixel opacity 100% (only OSD pixel shows) - // returns 0 on success, -1 on error - OSD_SetPalette, // (firstcolor{color},lastcolor{x0},data) - // Set a number of entries in the palette - // sets the entries "firstcolor" through "lastcolor" from the array "data" - // data has 4 byte for each color: - // R,G,B, and a opacity value: 0->transparent, 1..254->mix, 255->pixel - OSD_SetTrans, // (transparency{color}) - // Sets transparency of mixed pixel (0..15) - // returns 0 on success - OSD_SetPixel, // (x0,y0,color) - // sets pixel <x>,<y> to color number <col> - // returns 0 on success, -1 on error - OSD_GetPixel, // (x0,y0) - // returns color number of pixel <x>,<y>, or -1 - OSD_SetRow, // (x0,y0,x1,data) - // fills pixels x0,y through x1,y with the content of data[] - // returns 0 on success, -1 on clipping all pixel (no pixel drawn) - OSD_SetBlock, // (x0,y0,x1,y1,increment{color},data) - // fills pixels x0,y0 through x1,y1 with the content of data[] - // inc contains the width of one line in the data block, - // inc<=0 uses blockwidth as linewidth - // returns 0 on success, -1 on clipping all pixel - OSD_FillRow, // (x0,y0,x1,color) - // fills pixels x0,y through x1,y with the color <col> - // returns 0 on success, -1 on clipping all pixel - OSD_FillBlock, // (x0,y0,x1,y1,color) - // fills pixels x0,y0 through x1,y1 with the color <col> - // returns 0 on success, -1 on clipping all pixel - OSD_Line, // (x0,y0,x1,y1,color) - // draw a line from x0,y0 to x1,y1 with the color <col> - // returns 0 on success - OSD_Query, // (x0,y0,x1,y1,xasp{color}}), yasp=11 - // fills parameters with the picture dimensions and the pixel aspect ratio - // returns 0 on success - OSD_Test, // () - // draws a test picture. for debugging purposes only - // returns 0 on success + // Disables OSD and releases the buffers + // returns 0 on success + OSD_Open, // (x0,y0,x1,y1,BitPerPixel[2/4/8](color&0x0F),mix[0..15](color&0xF0)) + // Opens OSD with this size and bit depth + // returns 0 on success, -1 on DRAM allocation error, -2 on "already open" + OSD_Show, // () + // enables OSD mode + // returns 0 on success + OSD_Hide, // () + // disables OSD mode + // returns 0 on success + OSD_Clear, // () + // Sets all pixel to color 0 + // returns 0 on success + OSD_Fill, // (color) + // Sets all pixel to color <col> + // returns 0 on success + OSD_SetColor, // (color,R{x0},G{y0},B{x1},opacity{y1}) + // set palette entry <num> to <r,g,b>, <mix> and <trans> apply + // R,G,B: 0..255 + // R=Red, G=Green, B=Blue + // opacity=0: pixel opacity 0% (only video pixel shows) + // opacity=1..254: pixel opacity as specified in header + // opacity=255: pixel opacity 100% (only OSD pixel shows) + // returns 0 on success, -1 on error + OSD_SetPalette, // (firstcolor{color},lastcolor{x0},data) + // Set a number of entries in the palette + // sets the entries "firstcolor" through "lastcolor" from the array "data" + // data has 4 byte for each color: + // R,G,B, and a opacity value: 0->transparent, 1..254->mix, 255->pixel + OSD_SetTrans, // (transparency{color}) + // Sets transparency of mixed pixel (0..15) + // returns 0 on success + OSD_SetPixel, // (x0,y0,color) + // sets pixel <x>,<y> to color number <col> + // returns 0 on success, -1 on error + OSD_GetPixel, // (x0,y0) + // returns color number of pixel <x>,<y>, or -1 + OSD_SetRow, // (x0,y0,x1,data) + // fills pixels x0,y through x1,y with the content of data[] + // returns 0 on success, -1 on clipping all pixel (no pixel drawn) + OSD_SetBlock, // (x0,y0,x1,y1,increment{color},data) + // fills pixels x0,y0 through x1,y1 with the content of data[] + // inc contains the width of one line in the data block, + // inc<=0 uses blockwidth as linewidth + // returns 0 on success, -1 on clipping all pixel + OSD_FillRow, // (x0,y0,x1,color) + // fills pixels x0,y through x1,y with the color <col> + // returns 0 on success, -1 on clipping all pixel + OSD_FillBlock, // (x0,y0,x1,y1,color) + // fills pixels x0,y0 through x1,y1 with the color <col> + // returns 0 on success, -1 on clipping all pixel + OSD_Line, // (x0,y0,x1,y1,color) + // draw a line from x0,y0 to x1,y1 with the color <col> + // returns 0 on success + OSD_Query, // (x0,y0,x1,y1,xasp{color}}), yasp=11 + // fills parameters with the picture dimensions and the pixel aspect ratio + // returns 0 on success + OSD_Test, // () + // draws a test picture. for debugging purposes only + // returns 0 on success // TODO: remove "test" in final version - OSD_Text, // (x0,y0,size,color,text) - OSD_SetWindow, // (x0) set window with number 0<x0<8 as current - OSD_MoveWindow, // move current window to (x0, y0) + OSD_Text, // (x0,y0,size,color,text) + OSD_SetWindow, // (x0) set window with number 0<x0<8 as current + OSD_MoveWindow, // move current window to (x0, y0) } OSD_Command; typedef struct osd_cmd_s { - OSD_Command cmd; - int x0; - int y0; - int x1; - int y1; - int color; - void *data; + OSD_Command cmd; + int x0; + int y0; + int x1; + int y1; + int color; + void *data; } osd_cmd_t; diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h index 8bcb009f5779..24353a7220b8 100644 --- a/include/linux/dvb/video.h +++ b/include/linux/dvb/video.h @@ -28,6 +28,7 @@ #include <linux/types.h> #else #include <stdint.h> +#include <time.h> #endif diff --git a/include/linux/fdreg.h b/include/linux/fdreg.h index 1d9026eed978..c2eeb63b72db 100644 --- a/include/linux/fdreg.h +++ b/include/linux/fdreg.h @@ -7,8 +7,12 @@ */ #ifdef FDPATCHES - #define FD_IOPORT fdc_state[fdc].address +#else +/* It would be a lot saner just to force fdc_state[fdc].address to always + be set ! FIXME */ +#define FD_IOPORT 0x3f0 +#endif /* Fd controller regs. S&C, about page 340 */ #define FD_STATUS (4 + FD_IOPORT ) @@ -23,16 +27,6 @@ /* Diskette Control Register (write)*/ #define FD_DCR (7 + FD_IOPORT ) -#else - -#define FD_STATUS 0x3f4 -#define FD_DATA 0x3f5 -#define FD_DOR 0x3f2 /* Digital Output Register */ -#define FD_DIR 0x3f7 /* Digital Input Register (read) */ -#define FD_DCR 0x3f7 /* Diskette Control Register (write)*/ - -#endif - /* Bits of main status register */ #define STATUS_BUSYMASK 0x0F /* drive busy mask */ #define STATUS_BUSY 0x10 /* FDC busy */ diff --git a/include/linux/fs.h b/include/linux/fs.h index af3852b4281d..5af89265c804 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -313,7 +313,7 @@ struct backing_dev_info; struct address_space { struct inode *host; /* owner: inode, block_device */ struct radix_tree_root page_tree; /* radix tree of all pages */ - rwlock_t page_lock; /* and rwlock protecting it */ + spinlock_t page_lock; /* and rwlock protecting it */ struct list_head clean_pages; /* list of clean pages */ struct list_head dirty_pages; /* list of dirty pages */ struct list_head locked_pages; /* list of locked pages */ @@ -321,8 +321,8 @@ struct address_space { unsigned long nrpages; /* number of total pages */ struct address_space_operations *a_ops; /* methods */ struct list_head i_mmap; /* list of private mappings */ - struct list_head i_mmap_shared; /* list of private mappings */ - struct semaphore i_shared_sem; /* and sem protecting it */ + struct list_head i_mmap_shared; /* list of shared mappings */ + struct semaphore i_shared_sem; /* protect both above lists */ unsigned long dirtied_when; /* jiffies of first page dirtying */ int gfp_mask; /* how to allocate the pages */ struct backing_dev_info *backing_dev_info; /* device readahead, etc */ @@ -705,10 +705,10 @@ typedef int (*read_actor_t)(read_descriptor_t *, struct page *, unsigned long, u struct file_operations { struct module *owner; loff_t (*llseek) (struct file *, loff_t, int); - ssize_t (*read) (struct file *, char *, size_t, loff_t *); - ssize_t (*aio_read) (struct kiocb *, char *, size_t, loff_t); - ssize_t (*write) (struct file *, const char *, size_t, loff_t *); - ssize_t (*aio_write) (struct kiocb *, const char *, size_t, loff_t); + ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); + ssize_t (*aio_read) (struct kiocb *, char __user *, size_t, loff_t); + ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); + ssize_t (*aio_write) (struct kiocb *, const char __user *, size_t, loff_t); int (*readdir) (struct file *, void *, filldir_t); unsigned int (*poll) (struct file *, struct poll_table_struct *); int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); @@ -738,7 +738,7 @@ struct inode_operations { int (*mknod) (struct inode *,struct dentry *,int,dev_t); int (*rename) (struct inode *, struct dentry *, struct inode *, struct dentry *); - int (*readlink) (struct dentry *, char *,int); + int (*readlink) (struct dentry *, char __user *,int); int (*follow_link) (struct dentry *, struct nameidata *); void (*truncate) (struct inode *); int (*permission) (struct inode *, int); @@ -1024,7 +1024,7 @@ extern int do_truncate(struct dentry *, loff_t start); extern struct file *filp_open(const char *, int, int); extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); extern int filp_close(struct file *, fl_owner_t id); -extern char * getname(const char *); +extern char * getname(const char __user *); /* fs/dcache.c */ extern void vfs_caches_init(unsigned long); diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h index aeceb6f1a7be..6b89e9c85f9b 100644 --- a/include/linux/hdlc.h +++ b/include/linux/hdlc.h @@ -1,12 +1,11 @@ /* * Generic HDLC support routines for Linux * - * Copyright (C) 1999-2002 Krzysztof Halasa <khc@pm.waw.pl> + * Copyright (C) 1999-2003 Krzysztof Halasa <khc@pm.waw.pl> * * 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. + * under the terms of version 2 of the GNU General Public License + * as published by the Free Software Foundation. */ #ifndef __HDLC_H @@ -52,7 +51,7 @@ #include <linux/hdlc/ioctl.h> #define HDLC_MAX_MTU 1500 /* Ethernet 1500 bytes */ -#define HDLC_MAX_MRU (HDLC_MAX_MTU + 10) /* max 10 bytes for FR */ +#define HDLC_MAX_MRU (HDLC_MAX_MTU + 10 + 14 + 4) /* for ETH+VLAN over FR */ #define MAXLEN_LMISTAT 20 /* max size of status enquiry frame */ @@ -145,17 +144,20 @@ typedef struct { typedef struct pvc_device_struct { - struct net_device netdev; /* PVC net device - must be first */ - struct net_device_stats stats; struct hdlc_device_struct *master; - struct pvc_device_struct *next; + struct net_device *main; + struct net_device *ether; /* bridged Ethernet interface */ + struct pvc_device_struct *next; /* Sorted in ascending DLCI order */ + int dlci; + int open_count; struct { - int active; - int new; - int deleted; - int fecn; - int becn; + unsigned int new: 1; + unsigned int active: 1; + unsigned int exist: 1; + unsigned int deleted: 1; + unsigned int fecn: 1; + unsigned int becn: 1; }state; }pvc_device; @@ -180,18 +182,20 @@ typedef struct hdlc_device_struct { void (*stop)(struct hdlc_device_struct *hdlc); void (*proto_detach)(struct hdlc_device_struct *hdlc); void (*netif_rx)(struct sk_buff *skb); + unsigned short (*type_trans)(struct sk_buff *skb, + struct net_device *dev); int proto; /* IF_PROTO_HDLC/CISCO/FR/etc. */ union { struct { fr_proto settings; pvc_device *first_pvc; - int pvc_count; + int dce_pvc_count; struct timer_list timer; int last_poll; int reliable; - int changed; + int dce_changed; int request; int fullrep_sent; u32 last_errors; /* last errors bit list */ @@ -226,6 +230,7 @@ typedef struct hdlc_device_struct { int hdlc_raw_ioctl(hdlc_device *hdlc, struct ifreq *ifr); +int hdlc_raw_eth_ioctl(hdlc_device *hdlc, struct ifreq *ifr); int hdlc_cisco_ioctl(hdlc_device *hdlc, struct ifreq *ifr); int hdlc_ppp_ioctl(hdlc_device *hdlc, struct ifreq *ifr); int hdlc_fr_ioctl(hdlc_device *hdlc, struct ifreq *ifr); @@ -254,15 +259,9 @@ static __inline__ hdlc_device* dev_to_hdlc(struct net_device *dev) } -static __inline__ struct net_device* pvc_to_dev(pvc_device *pvc) -{ - return &pvc->netdev; -} - - static __inline__ pvc_device* dev_to_pvc(struct net_device *dev) { - return (pvc_device*)dev; + return (pvc_device*)dev->priv; } @@ -272,19 +271,6 @@ static __inline__ const char *hdlc_to_name(hdlc_device *hdlc) } -static __inline__ const char *pvc_to_name(pvc_device *pvc) -{ - return pvc_to_dev(pvc)->name; -} - - -static __inline__ u16 netdev_dlci(struct net_device *dev) -{ - return ntohs(*(u16*)dev->dev_addr); -} - - - static __inline__ u16 q922_to_dlci(u8 *hdr) { return ((hdr[0] & 0xFC) << 2) | ((hdr[1] & 0xF0) >> 4); @@ -345,5 +331,15 @@ static __inline__ void hdlc_proto_detach(hdlc_device *hdlc) } +static __inline__ unsigned short hdlc_type_trans(struct sk_buff *skb, + struct net_device *dev) +{ + hdlc_device *hdlc = dev_to_hdlc(skb->dev); + if (hdlc->type_trans) + return hdlc->type_trans(skb, dev); + else + return __constant_htons(ETH_P_HDLC); +} + #endif /* __KERNEL */ #endif /* __HDLC_H */ diff --git a/include/linux/hdlc/ioctl.h b/include/linux/hdlc/ioctl.h index c35e1a35d847..78430ba3ea69 100644 --- a/include/linux/hdlc/ioctl.h +++ b/include/linux/hdlc/ioctl.h @@ -34,22 +34,15 @@ typedef struct { } fr_proto_pvc; /* for creating/deleting FR PVCs */ typedef struct { + unsigned int dlci; + char master[IFNAMSIZ]; /* Name of master FRAD device */ +}fr_proto_pvc_info; /* for returning PVC information only */ + +typedef struct { unsigned int interval; unsigned int timeout; } cisco_proto; /* PPP doesn't need any info now - supply length = 0 to ioctl */ -union hdlc_settings { - raw_hdlc_proto raw_hdlc; - cisco_proto cisco; - fr_proto fr; - fr_proto_pvc fr_pvc; -}; - -union line_settings { - sync_serial_settings sync; - te1_settings te1; -}; - #endif /* __HDLC_IOCTL_H__ */ diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h index 5b1c363f89cb..29e0e40b7167 100644 --- a/include/linux/hdreg.h +++ b/include/linux/hdreg.h @@ -355,7 +355,7 @@ typedef struct hd_drive_hob_hdr { #define SETFEATURES_DIS_MSN 0x31 /* Disable Media Status Notification */ #define SETFEATURES_DIS_RETRY 0x33 /* Disable Retry */ #define SETFEATURES_EN_AAM 0x42 /* Enable Automatic Acoustic Management */ -#define SETFEATURES_RW_LONG 0x44 /* Set Lenght of VS bytes */ +#define SETFEATURES_RW_LONG 0x44 /* Set Length of VS bytes */ #define SETFEATURES_SET_CACHE 0x54 /* Set Cache segments to SC Reg. Val */ #define SETFEATURES_DIS_RLA 0x55 /* Disable read look-ahead feature */ #define SETFEATURES_EN_RI 0x5D /* Enable release interrupt */ diff --git a/include/linux/if.h b/include/linux/if.h index 898cfdf1bb14..c4c72e790700 100644 --- a/include/linux/if.h +++ b/include/linux/if.h @@ -21,6 +21,8 @@ #include <linux/types.h> /* for "__kernel_caddr_t" et al */ #include <linux/socket.h> /* for "struct sockaddr" et al */ + +#define IFNAMSIZ 16 #include <linux/hdlc/ioctl.h> /* Standard interface flags (netdevice->flags). */ @@ -69,7 +71,11 @@ #define IF_PROTO_FR_ADD_PVC 0x2004 /* Create FR PVC */ #define IF_PROTO_FR_DEL_PVC 0x2005 /* Delete FR PVC */ #define IF_PROTO_X25 0x2006 /* X.25 */ - +#define IF_PROTO_HDLC_ETH 0x2007 /* raw HDLC, Ethernet emulation */ +#define IF_PROTO_FR_ADD_ETH_PVC 0x2008 /* Create FR Ethernet-bridged PVC */ +#define IF_PROTO_FR_DEL_ETH_PVC 0x2009 /* Delete FR Ethernet-bridged PVC */ +#define IF_PROTO_FR_PVC 0x200A /* for reading PVC status */ +#define IF_PROTO_FR_ETH_PVC 0x200B /* @@ -103,6 +109,7 @@ struct if_settings cisco_proto *cisco; fr_proto *fr; fr_proto_pvc *fr_pvc; + fr_proto_pvc_info *fr_pvc_info; /* interface settings */ sync_serial_settings *sync; @@ -120,7 +127,6 @@ struct if_settings struct ifreq { #define IFHWADDRLEN 6 -#define IFNAMSIZ 16 union { char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */ diff --git a/include/linux/irda.h b/include/linux/irda.h index bdf23baa5483..948488ece2a8 100644 --- a/include/linux/irda.h +++ b/include/linux/irda.h @@ -25,6 +25,8 @@ #ifndef KERNEL_IRDA_H #define KERNEL_IRDA_H +#include <linux/socket.h> /* only for sa_family_t */ + /* Hint bit positions for first hint byte */ #define HINT_PNP 0x01 #define HINT_PDA 0x02 diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 2cddeb1f450e..e00aec05a9b5 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h @@ -274,8 +274,9 @@ void buffer_assertion_failure(struct buffer_head *bh); #define __journal_expect(expr, why...) \ do { \ if (!(expr)) { \ - printk(KERN_ERR "EXT3-fs unexpected failure: %s;\n", # expr); \ - printk(KERN_ERR ## why); \ + printk(KERN_ERR \ + "EXT3-fs unexpected failure: %s;\n",# expr); \ + printk(KERN_ERR why); \ } \ } while (0) #define J_EXPECT(expr, why...) __journal_expect(expr, ## why) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index f7f83f129d9f..94d476e7d80f 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -104,6 +104,7 @@ static inline void console_verbose(void) extern void bust_spinlocks(int yes); extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ +extern int panic_on_oops; extern int tainted; extern const char *print_tainted(void); diff --git a/include/linux/mm.h b/include/linux/mm.h index c6c2eef39d62..5f4bf646e187 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -231,8 +231,8 @@ static inline void get_page(struct page *page) static inline void put_page(struct page *page) { if (PageCompound(page)) { + page = (struct page *)page->lru.next; if (put_page_testzero(page)) { - page = (struct page *)page->lru.next; if (page->lru.prev) { /* destructor? */ (*(void (*)(struct page *))page->lru.prev)(page); } else { diff --git a/include/linux/module.h b/include/linux/module.h index 30892e436401..657802c8af75 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -408,9 +408,9 @@ __attribute__((section(".gnu.linkonce.this_module"))) = { #endif /* MODULE */ #define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x) +#define SET_MODULE_OWNER(dev) ((dev)->owner = THIS_MODULE) /* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */ -#define SET_MODULE_OWNER(dev) ((dev)->owner = THIS_MODULE) struct obsolete_modparm { char name[64]; diff --git a/include/linux/mtd/compatmac.h b/include/linux/mtd/compatmac.h index 19e6d2f849d5..8b243674cf22 100644 --- a/include/linux/mtd/compatmac.h +++ b/include/linux/mtd/compatmac.h @@ -17,7 +17,6 @@ #ifndef __LINUX_MTD_COMPATMAC_H__ #define __LINUX_MTD_COMPATMAC_H__ -#include <linux/compatmac.h> #include <linux/types.h> /* used later in this header */ #include <linux/module.h> #ifndef LINUX_VERSION_CODE diff --git a/include/linux/namei.h b/include/linux/namei.h index 9d5b102f9e9e..16baf5cdb9c7 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h @@ -33,7 +33,7 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND}; #define LOOKUP_NOALT 32 -extern int FASTCALL(__user_walk(const char *, unsigned, struct nameidata *)); +extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *)); #define user_path_walk(name,nd) \ __user_walk(name, LOOKUP_FOLLOW, nd) #define user_path_walk_link(name,nd) \ diff --git a/include/linux/net.h b/include/linux/net.h index 55083c938298..6ba6e1038521 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -19,7 +19,6 @@ #define _LINUX_NET_H #include <linux/config.h> -#include <linux/socket.h> #include <linux/wait.h> struct poll_table_struct; @@ -88,6 +87,8 @@ struct socket { struct vm_area_struct; struct page; struct kiocb; +struct sockaddr; +struct msghdr; struct proto_ops { int family; @@ -136,6 +137,8 @@ struct net_proto_family { short encrypt_net; }; +struct iovec; + extern int sock_wake_async(struct socket *sk, int how, int band); extern int sock_register(struct net_proto_family *fam); extern int sock_unregister(int family); diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 69346c394563..30de192de7a9 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -1,6 +1,8 @@ #ifndef __LINUX_NETLINK_H #define __LINUX_NETLINK_H +#include <linux/socket.h> /* for sa_family_t */ + #define NETLINK_ROUTE 0 /* Routing/device hook */ #define NETLINK_SKIP 1 /* Reserved for ENskip */ #define NETLINK_USERSOCK 2 /* Reserved for user mode socket protocols */ diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 7c0d596db02f..de82796383bf 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h @@ -206,6 +206,10 @@ enum { NFSPROC4_CLNT_READ, NFSPROC4_CLNT_WRITE, NFSPROC4_CLNT_COMMIT, + NFSPROC4_CLNT_OPEN, + NFSPROC4_CLNT_OPEN_CONFIRM, + NFSPROC4_CLNT_CLOSE, + NFSPROC4_CLNT_SETATTR, }; #endif diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index bc44563921f7..3d7525998534 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -155,6 +155,13 @@ struct nfs_inode { wait_queue_head_t nfs_i_wait; +#ifdef CONFIG_NFS_V4 + /* NFSv4 state */ + struct nfs4_shareowner *ro_owner; + struct nfs4_shareowner *wo_owner; + struct nfs4_shareowner *rw_owner; +#endif /* CONFIG_NFS_V4*/ + struct inode vfs_inode; }; @@ -435,28 +442,75 @@ extern void * nfs_root_data(void); #define NFS_JUKEBOX_RETRY_TIME (5 * HZ) #ifdef CONFIG_NFS_V4 + +/* + * In a seqid-mutating op, this macro controls which error return + * values trigger incrementation of the seqid. + * + * from rfc 3010: + * The client MUST monotonically increment the sequence number for the + * CLOSE, LOCK, LOCKU, OPEN, OPEN_CONFIRM, and OPEN_DOWNGRADE + * operations. This is true even in the event that the previous + * operation that used the sequence number received an error. The only + * exception to this rule is if the previous operation received one of + * the following errors: NFSERR_STALE_CLIENTID, NFSERR_STALE_STATEID, + * NFSERR_BAD_STATEID, NFSERR_BAD_SEQID, NFSERR_BADXDR, + * NFSERR_RESOURCE, NFSERR_NOFILEHANDLE. + * + */ +#define seqid_mutating_err(err) \ +(((err) != NFSERR_STALE_CLIENTID) && \ + ((err) != NFSERR_STALE_STATEID) && \ + ((err) != NFSERR_BAD_STATEID) && \ + ((err) != NFSERR_BAD_SEQID) && \ + ((err) != NFSERR_BAD_XDR) && \ + ((err) != NFSERR_RESOURCE) && \ + ((err) != NFSERR_NOFILEHANDLE)) + struct nfs4_client { - atomic_t cl_count; /* refcount */ u64 cl_clientid; /* constant */ - nfs4_verifier cl_confirm; + nfs4_verifier cl_confirm; - /* - * Starts a list of lockowners, linked through lo_list. - */ - struct list_head cl_lockowners; /* protected by state_spinlock */ + u32 cl_lockowner_id; +}; + +/* +* The ->so_sema is held during all shareowner seqid-mutating operations: +* OPEN, OPEN_DOWNGRADE, and CLOSE. +* Its purpose is to properly serialize so_seqid, as mandated by +* the protocol. +*/ +struct nfs4_shareowner { + u32 so_id; /* 32-bit identifier, unique */ + struct semaphore so_sema; + u32 so_seqid; /* protected by so_sema */ + nfs4_stateid so_stateid; /* protected by so_sema */ + unsigned int so_flags; /* protected by so_sema */ }; + /* nfs4proc.c */ extern int nfs4_proc_renew(struct nfs_server *server); +extern int nfs4_do_close(struct inode *inode, struct nfs4_shareowner *sp); /* nfs4renewd.c */ extern int nfs4_init_renewd(struct nfs_server *server); -#endif /* CONFIG_NFS_V4 */ - -#ifdef CONFIG_NFS_V4 +/* nfs4state.c */ extern struct nfs4_client *nfs4_get_client(void); extern void nfs4_put_client(struct nfs4_client *clp); +extern struct nfs4_shareowner * nfs4_get_shareowner(struct inode *inode); +void nfs4_put_shareowner(struct inode *inode, struct nfs4_shareowner *sp); +extern int nfs4_set_inode_share(struct inode * inode, + struct nfs4_shareowner *sp, unsigned int flags); +extern void nfs4_increment_seqid(u32 status, struct nfs4_shareowner *sp); +extern int nfs4_test_shareowner(struct inode *inode, unsigned int open_flags); +struct nfs4_shareowner * nfs4_get_inode_share(struct inode * inode, unsigned int open_flags); + + + + + struct nfs4_mount_data; static inline int @@ -481,6 +535,7 @@ destroy_nfsv4_state(struct nfs_server *server) #else #define create_nfsv4_state(server, data) 0 #define destroy_nfsv4_state(server) do { } while (0) +#define nfs4_put_shareowner(inode, owner) do { } while (0) #endif #endif /* __KERNEL__ */ diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index cee23453bddc..816d447df238 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h @@ -36,6 +36,7 @@ struct nfs_server { struct nfs4_client * nfs4_state; /* all NFSv4 state starts here */ unsigned long lease_time; /* in jiffies */ unsigned long last_renewal; /* in jiffies */ + void *idmap; #endif }; diff --git a/include/linux/nfs_idmap.h b/include/linux/nfs_idmap.h new file mode 100644 index 000000000000..248adf707071 --- /dev/null +++ b/include/linux/nfs_idmap.h @@ -0,0 +1,69 @@ +/* + * include/linux/nfs_idmap.h + * + * UID and GID to name mapping for clients. + * + * Copyright (c) 2002 The Regents of the University of Michigan. + * All rights reserved. + * + * Marius Aamodt Eriksen <marius@umich.edu> + * + * 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. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, 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 DAMAGE. + */ + +#ifndef NFS_IDMAP_H +#define NFS_IDMAP_H + +/* XXX from bits/utmp.h */ +#define IDMAP_NAMESZ 128 + +#define IDMAP_TYPE_USER 0 +#define IDMAP_TYPE_GROUP 1 + +#define IDMAP_CONV_IDTONAME 0 +#define IDMAP_CONV_NAMETOID 1 + +#define IDMAP_STATUS_INVALIDMSG 0x01 +#define IDMAP_STATUS_AGAIN 0x02 +#define IDMAP_STATUS_LOOKUPFAIL 0x04 +#define IDMAP_STATUS_SUCCESS 0x08 + +struct idmap_msg { + u_int8_t im_type; + u_int8_t im_conv; + char im_name[IDMAP_NAMESZ]; + u_int32_t im_id; + u_int8_t im_status; +}; + +#ifdef __KERNEL__ +void *nfs_idmap_new(struct nfs_server *); +void nfs_idmap_delete(struct nfs_server *); +int nfs_idmap_id(struct nfs_server *, u_int8_t, char *, u_int, uid_t *); +int nfs_idmap_name(struct nfs_server *, u_int8_t, uid_t, char *, u_int *); +#endif /* __KERNEL__ */ + +#endif /* NFS_IDMAP_H */ diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 2b96e1e5aa97..3d46a2caaade 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -88,6 +88,67 @@ struct nfs_pathconf { }; /* + * Arguments to the open call. + */ +struct nfs_openargs { + struct nfs_fh * fh; + __u32 seqid; + __u32 share_access; + __u64 clientid; + __u32 id; + __u32 opentype; + __u32 createmode; + union { + struct iattr * attrs; /* UNCHECKED, GUARDED */ + nfs4_verifier verifier; /* EXCLUSIVE */ + } u; + struct qstr * name; + struct nfs4_getattr * f_getattr; + struct nfs4_getattr * d_getattr; + struct nfs_server * server; /* Needed for ID mapping */ +}; + +struct nfs_openres { + __u32 status; + nfs4_stateid stateid; + struct nfs_fh fh; + struct nfs4_change_info * cinfo; + __u32 rflags; + struct nfs4_getattr * f_getattr; + struct nfs4_getattr * d_getattr; + struct nfs_server * server; +}; + +/* + * Arguments to the open_confirm call. + */ +struct nfs_open_confirmargs { + struct nfs_fh * fh; + nfs4_stateid stateid; + __u32 seqid; +}; + +struct nfs_open_confirmres { + __u32 status; + nfs4_stateid stateid; +}; + +/* + * Arguments to the close call. + */ +struct nfs_closeargs { + struct nfs_fh * fh; + nfs4_stateid stateid; + __u32 seqid; +}; + +struct nfs_closeres { + __u32 status; + nfs4_stateid stateid; +}; + + +/* * Arguments to the read call. */ @@ -98,6 +159,7 @@ struct nfs_pathconf { struct nfs_readargs { struct nfs_fh * fh; + nfs4_stateid stateid; __u64 offset; __u32 count; unsigned int pgbase; @@ -120,6 +182,7 @@ struct nfs_readres { struct nfs_writeargs { struct nfs_fh * fh; + nfs4_stateid stateid; __u64 offset; __u32 count; enum nfs3_stable_how stable; @@ -182,6 +245,19 @@ struct nfs_renameargs { unsigned int tolen; }; +struct nfs_setattrargs { + struct nfs_fh * fh; + nfs4_stateid stateid; + struct iattr * iap; + struct nfs4_getattr * attr; + struct nfs_server * server; /* Needed for name mapping */ +}; + +struct nfs_setattrres { + struct nfs4_getattr * attr; + struct nfs_server * server; +}; + struct nfs_linkargs { struct nfs_fh * fromfh; struct nfs_fh * tofh; @@ -597,6 +673,7 @@ struct nfs_rpc_ops { void (*read_setup) (struct nfs_read_data *, unsigned int count); void (*write_setup) (struct nfs_write_data *, unsigned int count, int how); void (*commit_setup) (struct nfs_write_data *, u64 start, u32 len, int how); + int (*file_open) (struct inode *, struct file *); }; /* diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index efe51537c564..b4d254418509 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -83,7 +83,6 @@ struct page_state { unsigned long nr_dirty; /* Dirty writeable pages */ unsigned long nr_writeback; /* Pages under writeback */ unsigned long nr_page_table_pages;/* Pages used for pagetables */ - unsigned long nr_reverse_maps; /* includes PageDirect */ unsigned long nr_mapped; /* mapped into pagetables */ unsigned long nr_slab; /* In slab */ #define GET_PAGE_STATE_LAST nr_slab diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 7af1d1d055a6..9f97fb7c9cc1 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -1074,6 +1074,7 @@ #define PCI_DEVICE_ID_TTI_HPT374 0x0008 #define PCI_VENDOR_ID_VIA 0x1106 +#define PCI_DEVICE_ID_VIA_P4X600 0x0198 #define PCI_DEVICE_ID_VIA_8363_0 0x0305 #define PCI_DEVICE_ID_VIA_8371_0 0x0391 #define PCI_DEVICE_ID_VIA_8501_0 0x0501 @@ -1113,11 +1114,19 @@ #define PCI_DEVICE_ID_VIA_8653_0 0x3101 #define PCI_DEVICE_ID_VIA_8622 0x3102 #define PCI_DEVICE_ID_VIA_8233C_0 0x3109 -#define PCI_DEVICE_ID_VIA_8361 0x3112 +#define PCI_DEVICE_ID_VIA_8361 0x3112 +#define PCI_DEVICE_ID_VIA_KM266 0x3116 +#define PCI_DEVICE_ID_VIA_CLE266 0x3123 +#define PCI_DEVICE_ID_VIA_8753_0 0x3128 #define PCI_DEVICE_ID_VIA_8233A 0x3147 +#define PCI_DEVICE_ID_VIA_8752 0x3148 +#define PCI_DEVICE_ID_VIA_KN266 0x3156 #define PCI_DEVICE_ID_VIA_8754 0x3168 #define PCI_DEVICE_ID_VIA_8235 0x3177 +#define PCI_DEVICE_ID_VIA_P4N333 0x3178 #define PCI_DEVICE_ID_VIA_8377_0 0x3189 +#define PCI_DEVICE_ID_VIA_KM400 0x3205 +#define PCI_DEVICE_ID_VIA_P4M400 0x3209 #define PCI_DEVICE_ID_VIA_86C100A 0x6100 #define PCI_DEVICE_ID_VIA_8231 0x8231 #define PCI_DEVICE_ID_VIA_8231_4 0x8235 diff --git a/include/linux/scc.h b/include/linux/scc.h index c0f31c2caab0..4965e146b737 100644 --- a/include/linux/scc.h +++ b/include/linux/scc.h @@ -244,6 +244,9 @@ struct scc_channel { /* Timer */ struct timer_list tx_t; /* tx timer for this channel */ struct timer_list tx_wdog; /* tx watchdogs */ + + /* Channel lock */ + spinlock_t lock; /* Channel guard lock */ }; #endif /* defined(__KERNEL__) */ diff --git a/include/linux/sched.h b/include/linux/sched.h index f3b4c5891898..bbc51fac0cf6 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -686,7 +686,11 @@ static inline int thread_group_empty(task_t *p) extern void unhash_process(struct task_struct *p); -/* Protects ->fs, ->files, ->mm, and synchronises with wait4(). Nests inside tasklist_lock */ +/* Protects ->fs, ->files, ->mm, and synchronises with wait4(). + * Nests both inside and outside of read_lock(&tasklist_lock). + * It must not be nested with write_lock_irq(&tasklist_lock), + * neither inside nor outside. + */ static inline void task_lock(struct task_struct *p) { spin_lock(&p->alloc_lock); diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 29a5f877d0f3..79b779f29c9f 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -129,6 +129,7 @@ enum KERN_CADPID=54, /* int: PID of the process to notify on CAD */ KERN_PIDMAX=55, /* int: PID # limit */ KERN_CORE_PATTERN=56, /* string: pattern for core-file names */ + KERN_PANIC_ON_OOPS=57, /* int: whether we will panic on an oops */ }; @@ -678,8 +679,8 @@ extern void sysctl_init(void); typedef struct ctl_table ctl_table; typedef int ctl_handler (ctl_table *table, int *name, int nlen, - void *oldval, size_t *oldlenp, - void *newval, size_t newlen, + void __user *oldval, size_t __user *oldlenp, + void __user *newval, size_t newlen, void **context); typedef int proc_handler (ctl_table *ctl, int write, struct file * filp, @@ -706,8 +707,8 @@ extern int do_sysctl (int *name, int nlen, extern int do_sysctl_strategy (ctl_table *table, int *name, int nlen, - void *oldval, size_t *oldlenp, - void *newval, size_t newlen, void ** context); + void __user *oldval, size_t __user *oldlenp, + void __user *newval, size_t newlen, void ** context); extern ctl_handler sysctl_string; extern ctl_handler sysctl_intvec; diff --git a/include/linux/time.h b/include/linux/time.h index 7f5be084e342..4d7238025fe9 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -31,7 +31,7 @@ struct timezone { * Have the 32 bit jiffies value wrap 5 minutes after boot * so jiffies wrap bugs show up earlier. */ -#define INITIAL_JIFFIES ((unsigned int) (-300*HZ)) +#define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ)) /* * Change timeval to jiffies, trying to avoid the |
