diff options
| author | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-11-21 19:09:06 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-11-21 19:09:06 -0800 |
| commit | 63a845597f2cb2fe0e8e2f55e56382f0af43c173 (patch) | |
| tree | 25cb6c249f8621d465956ed9d50f04c9626c7cf2 /include/linux | |
| parent | 0b32ad59d5af2d37b98fa18cd2059ca8610188ac (diff) | |
| parent | dccb90df2d3fa9e4ac08b7e91f9e900273bbedef (diff) | |
Merge http://linux-acpi.bkbits.net/linux-acpi
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/cpufreq.h | 22 | ||||
| -rw-r--r-- | include/linux/interrupt.h | 2 | ||||
| -rw-r--r-- | include/linux/meye.h | 4 | ||||
| -rw-r--r-- | include/linux/netfilter_bridge.h | 7 | ||||
| -rw-r--r-- | include/linux/nfs_xdr.h | 4 | ||||
| -rw-r--r-- | include/linux/pci.h | 4 | ||||
| -rw-r--r-- | include/linux/sonypi.h | 8 | ||||
| -rw-r--r-- | include/linux/sunrpc/xdr.h | 87 |
8 files changed, 123 insertions, 15 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index a5aa299cf92c..a8f8d2a31936 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -5,7 +5,7 @@ * (C) 2002 Dominik Brodowski <linux@brodo.de> * * - * $Id: cpufreq.h,v 1.27 2002/10/08 14:54:23 db Exp $ + * $Id: cpufreq.h,v 1.29 2002/11/11 15:35:47 db Exp $ * * 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 @@ -104,7 +104,7 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div, u_int mu * CPUFREQ DRIVER INTERFACE * *********************************************************************/ -typedef void (*cpufreq_policy_t) (struct cpufreq_policy *policy); +typedef int (*cpufreq_policy_t) (struct cpufreq_policy *policy); struct cpufreq_driver { /* needed by all drivers */ @@ -116,7 +116,7 @@ struct cpufreq_driver { #endif /* 2.4. compatible API */ #ifdef CONFIG_CPU_FREQ_24_API - unsigned int cpu_min_freq; + unsigned int cpu_min_freq[NR_CPUS]; unsigned int cpu_cur_freq[NR_CPUS]; #endif }; @@ -205,19 +205,19 @@ enum { CPU_NR_FREQ = 3, }; -#define CTL_CPU_VARS_SPEED_MAX { \ +#define CTL_CPU_VARS_SPEED_MAX(cpunr) { \ .ctl_name = CPU_NR_FREQ_MAX, \ - .data = &cpu_max_freq, \ + .data = &cpu_max_freq[cpunr], \ .procname = "speed-max", \ - .maxlen = sizeof(cpu_max_freq),\ + .maxlen = sizeof(cpu_max_freq[cpunr]),\ .mode = 0444, \ .proc_handler = proc_dointvec, } -#define CTL_CPU_VARS_SPEED_MIN { \ +#define CTL_CPU_VARS_SPEED_MIN(cpunr) { \ .ctl_name = CPU_NR_FREQ_MIN, \ - .data = &cpu_min_freq, \ + .data = &cpu_min_freq[cpunr], \ .procname = "speed-min", \ - .maxlen = sizeof(cpu_min_freq),\ + .maxlen = sizeof(cpu_min_freq[cpunr]),\ .mode = 0444, \ .proc_handler = proc_dointvec, } @@ -230,8 +230,8 @@ enum { .extra1 = (void*) (cpunr), } #define CTL_TABLE_CPU_VARS(cpunr) static ctl_table ctl_cpu_vars_##cpunr[] = {\ - CTL_CPU_VARS_SPEED_MAX, \ - CTL_CPU_VARS_SPEED_MIN, \ + CTL_CPU_VARS_SPEED_MAX(cpunr), \ + CTL_CPU_VARS_SPEED_MIN(cpunr), \ CTL_CPU_VARS_SPEED(cpunr), \ { .ctl_name = 0, }, } diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 21023d2807e8..7a0681b9e880 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -3,11 +3,13 @@ #define _LINUX_INTERRUPT_H #include <linux/config.h> +#include <linux/linkage.h> #include <linux/bitops.h> #include <asm/atomic.h> #include <asm/hardirq.h> #include <asm/ptrace.h> #include <asm/softirq.h> +#include <asm/system.h> struct irqaction { void (*handler)(int, void *, struct pt_regs *); diff --git a/include/linux/meye.h b/include/linux/meye.h index b6146960823a..367cfeb69528 100644 --- a/include/linux/meye.h +++ b/include/linux/meye.h @@ -1,7 +1,9 @@ /* * Motion Eye video4linux driver for Sony Vaio PictureBook * - * Copyright (C) 2001 Stelian Pop <stelian.pop@fr.alcove.com>, Alcôve + * Copyright (C) 2001-2002 Stelian Pop <stelian@popies.net> + * + * Copyright (C) 2001-2002 Alcôve <www.alcove.com> * * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com> * diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index b9063ac5a2c5..0f07bda8a7cf 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h @@ -6,7 +6,9 @@ #include <linux/config.h> #include <linux/netfilter.h> +#if defined(__KERNEL__) && defined(CONFIG_NETFILTER) #include <asm/atomic.h> +#endif /* Bridge Hooks */ /* After promisc drops, checksum checks. */ @@ -23,6 +25,8 @@ #define NF_BR_BROUTING 5 #define NF_BR_NUMHOOKS 6 +#ifdef __KERNEL__ + #define BRNF_PKT_TYPE 0x01 #define BRNF_BRIDGED_DNAT 0x02 #define BRNF_DONT_TAKE_PARENT 0x04 @@ -38,6 +42,7 @@ enum nf_br_hook_priorities { NF_BR_PRI_LAST = INT_MAX, }; +#ifdef CONFIG_NETFILTER static inline struct nf_bridge_info *nf_bridge_alloc(struct sk_buff *skb) { @@ -57,5 +62,7 @@ struct bridge_skb_cb { __u32 ipv4; } daddr; }; +#endif /* CONFIG_NETFILTER */ +#endif /* __KERNEL__ */ #endif diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 6c82048e2acf..970ffa785f78 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -398,6 +398,7 @@ struct nfs4_lookup { }; struct nfs4_open { + struct nfs4_client * op_client_state; /* request */ u32 op_share_access; /* request */ u32 op_opentype; /* request */ u32 op_createmode; /* request */ @@ -472,6 +473,7 @@ struct nfs4_setclientid { char sc_netid[4]; /* request */ char sc_uaddr[24]; /* request */ u32 sc_cb_ident; /* request */ + struct nfs4_client * sc_state; /* response */ }; struct nfs4_write { @@ -504,8 +506,10 @@ struct nfs4_op { struct nfs4_readlink readlink; struct nfs4_remove remove; struct nfs4_rename rename; + struct nfs4_client * renew; struct nfs4_setattr setattr; struct nfs4_setclientid setclientid; + struct nfs4_client * setclientid_confirm; struct nfs4_write write; } u; }; diff --git a/include/linux/pci.h b/include/linux/pci.h index 3fa04d5f93f8..30c4a9dbc855 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -601,8 +601,8 @@ int pci_enable_wake(struct pci_dev *dev, u32 state, int enable); /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ -void pbus_assign_resources(struct pci_bus *bus); -void pbus_size_bridges(struct pci_bus *bus); +void pci_bus_assign_resources(struct pci_bus *bus); +void pci_bus_size_bridges(struct pci_bus *bus); int pci_claim_resource(struct pci_dev *, int); void pci_assign_unassigned_resources(void); void pdev_enable_device(struct pci_dev *); diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index 8828b98b3029..7581d3fd846d 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h @@ -1,7 +1,9 @@ /* * Sony Programmable I/O Control Device driver for VAIO * - * Copyright (C) 2001 Stelian Pop <stelian.pop@fr.alcove.com>, Alcôve + * Copyright (C) 2001-2002 Stelian Pop <stelian@popies.net> + * + * Copyright (C) 2001-2002 Alcôve <www.alcove.com> * * Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au> * @@ -85,6 +87,10 @@ #define SONYPI_EVENT_JOGDIAL_VFAST_UP 47 #define SONYPI_EVENT_JOGDIAL_VFAST_DOWN_PRESSED 48 #define SONYPI_EVENT_JOGDIAL_VFAST_UP_PRESSED 49 +#define SONYPI_EVENT_ZOOM_PRESSED 50 +#define SONYPI_EVENT_THUMBPHRASE_PRESSED 51 +#define SONYPI_EVENT_MEYE_FACE 52 +#define SONYPI_EVENT_MEYE_OPPOSITE 53 /* get/set brightness */ #define SONYPI_IOCGBRT _IOR('v', 0, __u8) diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 0233988f40b4..74c5260b2343 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h @@ -155,6 +155,93 @@ typedef size_t (*skb_read_actor_t)(skb_reader_t *desc, void *to, size_t len); extern void xdr_partial_copy_from_skb(struct xdr_buf *, unsigned int, skb_reader_t *, skb_read_actor_t); +/* + * Provide some simple tools for XDR buffer overflow-checking etc. + */ +struct xdr_stream { + uint32_t *p; /* start of available buffer */ + struct xdr_buf *buf; /* XDR buffer to read/write */ + + uint32_t *end; /* end of available buffer space */ + struct iovec *iov; /* pointer to the current iovec */ +}; + +/* + * Initialize an xdr_stream for encoding data. + * + * Note: at the moment the RPC client only passes the length of our + * scratch buffer in the xdr_buf's header iovec. Previously this + * meant we needed to call xdr_adjust_iovec() after encoding the + * data. With the new scheme, the xdr_stream manages the details + * of the buffer length, and takes care of adjusting the iovec + * length for us. + */ +static inline void +xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p) +{ + struct iovec *iov = buf->head; + + xdr->buf = buf; + xdr->iov = iov; + xdr->end = (uint32_t *)((char *)iov->iov_base + iov->iov_len); + buf->len = iov->iov_len = (char *)p - (char *)iov->iov_base; + xdr->p = p; +} + +/* + * Check that we have enough buffer space to encode 'nbytes' more + * bytes of data. If so, update the total xdr_buf length, and + * adjust the length of the current iovec. + */ +static inline uint32_t * +xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes) +{ + uint32_t *p = xdr->p; + uint32_t *q; + + /* align nbytes on the next 32-bit boundary */ + nbytes += 3; + nbytes &= ~3; + q = p + (nbytes >> 2); + if (unlikely(q > xdr->end || q < p)) + return NULL; + xdr->p = q; + xdr->iov->iov_len += nbytes; + xdr->buf->len += nbytes; + return p; +} + +/* + * Initialize an xdr_stream for decoding data. + */ +static inline void +xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p) +{ + struct iovec *iov = buf->head; + xdr->buf = buf; + xdr->iov = iov; + xdr->p = p; + xdr->end = (uint32_t *)((char *)iov->iov_base + iov->iov_len); +} + +/* + * Check if the input buffer is long enough to enable us to decode + * 'nbytes' more bytes of data starting at the current position. + * If so return the current pointer, then update the current + * position. + */ +static inline uint32_t * +xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes) +{ + uint32_t *p = xdr->p; + uint32_t *q = p + XDR_QUADLEN(nbytes); + + if (unlikely(q > xdr->end || q < p)) + return NULL; + xdr->p = q; + return p; +} + #endif /* __KERNEL__ */ #endif /* _SUNRPC_XDR_H_ */ |
