diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/i8k.h | 46 | ||||
| -rw-r--r-- | include/linux/ntfs_fs.h | 12 | ||||
| -rw-r--r-- | include/linux/swap.h | 7 | ||||
| -rw-r--r-- | include/linux/tcp.h | 2 | ||||
| -rw-r--r-- | include/linux/timer.h | 2 |
5 files changed, 60 insertions, 9 deletions
diff --git a/include/linux/i8k.h b/include/linux/i8k.h new file mode 100644 index 000000000000..1e75f153e332 --- /dev/null +++ b/include/linux/i8k.h @@ -0,0 +1,46 @@ +/* + * i8k.h -- Linux driver for accessing the SMM BIOS on Dell I8000 laptops + * + * Copyright (C) 2001 Massimo Dal Zotto <dz@debian.org> + * + * 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, 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 _LINUX_I8K_H +#define _LINUX_I8K_H + +#define I8K_PROC "/proc/i8k" +#define I8K_PROC_FMT "1.0" + +#define I8K_BIOS_VERSION _IOR ('i', 0x80, 4) +#define I8K_MACHINE_ID _IOR ('i', 0x81, 16) +#define I8K_POWER_STATUS _IOR ('i', 0x82, sizeof(int)) +#define I8K_FN_STATUS _IOR ('i', 0x83, sizeof(int)) +#define I8K_GET_TEMP _IOR ('i', 0x84, sizeof(int)) +#define I8K_GET_SPEED _IOWR('i', 0x85, sizeof(int)) +#define I8K_GET_FAN _IOWR('i', 0x86, sizeof(int)) +#define I8K_SET_FAN _IOWR('i', 0x87, sizeof(int)*2) + +#define I8K_FAN_LEFT 1 +#define I8K_FAN_RIGHT 0 +#define I8K_FAN_OFF 0 +#define I8K_FAN_LOW 1 +#define I8K_FAN_HIGH 2 +#define I8K_FAN_MAX I8K_FAN_HIGH + +#define I8K_VOL_UP 0x01 +#define I8K_VOL_DOWN 0x02 +#define I8K_VOL_MUTE 0x03 + +#define I8K_AC 1 +#define I8K_BATTERY 0 + +#endif diff --git a/include/linux/ntfs_fs.h b/include/linux/ntfs_fs.h index c5170a7a2983..2bac6f57866f 100644 --- a/include/linux/ntfs_fs.h +++ b/include/linux/ntfs_fs.h @@ -10,12 +10,12 @@ * Attribute flags (16-bit). */ typedef enum { - ATTR_IS_COMPRESSED = cpu_to_le16(0x0001), - ATTR_COMPRESSION_MASK = cpu_to_le16(0x00ff), /* Compression method - * mask. Also, first - * illegal value. */ - ATTR_IS_ENCRYPTED = cpu_to_le16(0x4000), - ATTR_IS_SPARSE = cpu_to_le16(0x8000), + ATTR_IS_COMPRESSED = __constant_cpu_to_le16(0x0001), + ATTR_COMPRESSION_MASK = __constant_cpu_to_le16(0x00ff), + /* Compression method mask. Also, + * first illegal value. */ + ATTR_IS_ENCRYPTED = __constant_cpu_to_le16(0x4000), + ATTR_IS_SPARSE = __constant_cpu_to_le16(0x8000), } __attribute__ ((__packed__)) ATTR_FLAGS; /* diff --git a/include/linux/swap.h b/include/linux/swap.h index ffa8134438cc..ef563f855c00 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -79,6 +79,10 @@ struct swap_info_struct { }; extern int nr_swap_pages; + +/* Swap 50% full? Release swapcache more aggressively.. */ +#define vm_swap_full() (nr_swap_pages*2 < total_swap_pages) + extern unsigned int nr_free_pages(void); extern unsigned int nr_free_buffer_pages(void); extern int nr_active_pages; @@ -129,8 +133,7 @@ extern struct page * lookup_swap_cache(swp_entry_t); extern struct page * read_swap_cache_async(swp_entry_t); /* linux/mm/oom_kill.c */ -extern int out_of_memory(void); -extern void oom_kill(void); +extern void out_of_memory(void); /* linux/mm/swapfile.c */ extern int total_swap_pages; diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 3a5dda402f6f..b30e5d354b5a 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h @@ -110,7 +110,7 @@ enum { TCP_FLAG_RST = __constant_htonl(0x00040000), TCP_FLAG_SYN = __constant_htonl(0x00020000), TCP_FLAG_FIN = __constant_htonl(0x00010000), - TCP_RESERVED_BITS = __constant_htonl(0x0FC00000), + TCP_RESERVED_BITS = __constant_htonl(0x0F000000), TCP_DATA_OFFSET = __constant_htonl(0xF0000000) }; diff --git a/include/linux/timer.h b/include/linux/timer.h index e3249bf933a0..c4f01ada5975 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h @@ -59,6 +59,8 @@ static inline int timer_pending (const struct timer_list * timer) * 2. Because if the timer wrap changes in future you wont have to * alter your driver code. * + * time_after(a,b) returns true if the time a is after time b. + * * Do this with "<0" and ">=0" to only test the sign of the result. A * good compiler would generate better code (and a really good compiler * wouldn't care). Gcc is currently neither. |
