diff options
Diffstat (limited to 'include')
258 files changed, 2989 insertions, 1281 deletions
diff --git a/include/asm-alpha/mman.h b/include/asm-alpha/mman.h index 5f24c755f577..90d7c35d2867 100644 --- a/include/asm-alpha/mman.h +++ b/include/asm-alpha/mman.h @@ -49,7 +49,6 @@ #define MADV_DOFORK 11 /* do inherit across fork */ /* compatibility flags */ -#define MAP_ANON MAP_ANONYMOUS #define MAP_FILE 0 #endif /* __ALPHA_MMAN_H__ */ diff --git a/include/asm-alpha/percpu.h b/include/asm-alpha/percpu.h index 48348fe34c19..651ebb141b24 100644 --- a/include/asm-alpha/percpu.h +++ b/include/asm-alpha/percpu.h @@ -1,6 +1,20 @@ #ifndef __ALPHA_PERCPU_H #define __ALPHA_PERCPU_H +/* + * Increase the per cpu area for Alpha so that + * modules using percpu area can load. + */ +#ifdef CONFIG_MODULES +# define PERCPU_MODULE_RESERVE 8192 +#else +# define PERCPU_MODULE_RESERVE 0 +#endif + +#define PERCPU_ENOUGH_ROOM \ + (ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \ + PERCPU_MODULE_RESERVE) + #include <asm-generic/percpu.h> #endif /* __ALPHA_PERCPU_H */ diff --git a/include/asm-alpha/termios.h b/include/asm-alpha/termios.h index 1cfd27f0ad73..39e492c3bfa3 100644 --- a/include/asm-alpha/termios.h +++ b/include/asm-alpha/termios.h @@ -66,24 +66,6 @@ struct termio { #define _VEOL2 6 #define _VSWTC 7 -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ /* eof=^D eol=\0 eol2=\0 erase=del werase=^W kill=^U reprint=^R sxtc=\0 diff --git a/include/asm-arm/arch-at91rm9200/gpio.h b/include/asm-arm/arch-at91rm9200/gpio.h index a011d27876a2..e09d6528fadf 100644 --- a/include/asm-arm/arch-at91rm9200/gpio.h +++ b/include/asm-arm/arch-at91rm9200/gpio.h @@ -179,6 +179,7 @@ #ifndef __ASSEMBLY__ /* setup setup routines, called from board init or driver probe() */ +extern int __init_or_module at91_set_GPIO_periph(unsigned pin, int use_pullup); extern int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup); extern int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup); extern int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup); @@ -193,7 +194,50 @@ extern int at91_get_gpio_value(unsigned pin); /* callable only from core power-management code */ extern void at91_gpio_suspend(void); extern void at91_gpio_resume(void); -#endif -#endif +/*-------------------------------------------------------------------------*/ + +/* wrappers for "new style" GPIO calls. the old AT91-specfic ones should + * eventually be removed (along with this errno.h inclusion), and the + * gpio request/free calls should probably be implemented. + */ + +#include <asm/errno.h> + +static inline int gpio_request(unsigned gpio, const char *label) +{ + return 0; +} + +static inline void gpio_free(unsigned gpio) +{ +} + +extern int gpio_direction_input(unsigned gpio); +extern int gpio_direction_output(unsigned gpio); +static inline int gpio_get_value(unsigned gpio) +{ + return at91_get_gpio_value(gpio); +} + +static inline void gpio_set_value(unsigned gpio, int value) +{ + at91_set_gpio_value(gpio, value); +} + +#include <asm-generic/gpio.h> /* cansleep wrappers */ + +static inline int gpio_to_irq(unsigned gpio) +{ + return gpio; +} + +static inline int irq_to_gpio(unsigned irq) +{ + return irq; +} + +#endif /* __ASSEMBLY__ */ + +#endif diff --git a/include/asm-arm/arch-imx/spi_imx.h b/include/asm-arm/arch-imx/spi_imx.h new file mode 100644 index 000000000000..2165449e976e --- /dev/null +++ b/include/asm-arm/arch-imx/spi_imx.h @@ -0,0 +1,72 @@ +/* + * include/asm-arm/arch-imx/spi_imx.h + * + * Copyright (C) 2006 SWAPP + * Andrea Paterniani <a.paterniani@swapp-eng.it> + * + * Initial version inspired by: + * linux-2.6.17-rc3-mm1/include/asm-arm/arch-pxa/pxa2xx_spi.h + * + * 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 SPI_IMX_H_ +#define SPI_IMX_H_ + + +/*-------------------------------------------------------------------------*/ +/** + * struct spi_imx_master - device.platform_data for SPI controller devices. + * @num_chipselect: chipselects are used to distinguish individual + * SPI slaves, and are numbered from zero to num_chipselects - 1. + * each slave has a chipselect signal, but it's common that not + * every chipselect is connected to a slave. + * @enable_dma: if true enables DMA driven transfers. +*/ +struct spi_imx_master { + u8 num_chipselect; + u8 enable_dma:1; +}; +/*-------------------------------------------------------------------------*/ + + +/*-------------------------------------------------------------------------*/ +/** + * struct spi_imx_chip - spi_board_info.controller_data for SPI + * slave devices, copied to spi_device.controller_data. + * @enable_loopback : used for test purpouse to internally connect RX and TX + * sections. + * @enable_dma : enables dma transfer (provided that controller driver has + * dma enabled too). + * @ins_ss_pulse : enable /SS pulse insertion between SPI burst. + * @bclk_wait : number of bclk waits between each bits_per_word SPI burst. + * @cs_control : function pointer to board-specific function to assert/deassert + * I/O port to control HW generation of devices chip-select. +*/ +struct spi_imx_chip { + u8 enable_loopback:1; + u8 enable_dma:1; + u8 ins_ss_pulse:1; + u16 bclk_wait:15; + void (*cs_control)(u32 control); +}; + +/* Chip-select state */ +#define SPI_CS_ASSERT (1 << 0) +#define SPI_CS_DEASSERT (1 << 1) +/*-------------------------------------------------------------------------*/ + + +#endif /* SPI_IMX_H_*/ diff --git a/include/asm-arm/arch-omap/gpio.h b/include/asm-arm/arch-omap/gpio.h index f486b72070ea..3762a6ae6a7f 100644 --- a/include/asm-arm/arch-omap/gpio.h +++ b/include/asm-arm/arch-omap/gpio.h @@ -76,4 +76,70 @@ extern void omap_set_gpio_direction(int gpio, int is_input); extern void omap_set_gpio_dataout(int gpio, int enable); extern int omap_get_gpio_datain(int gpio); +/*-------------------------------------------------------------------------*/ + +/* wrappers for "new style" GPIO calls. the old OMAP-specfic ones should + * eventually be removed (along with this errno.h inclusion), and maybe + * gpios should put MPUIOs last too. + */ + +#include <asm/errno.h> + +static inline int gpio_request(unsigned gpio, const char *label) +{ + return omap_request_gpio(gpio); +} + +static inline void gpio_free(unsigned gpio) +{ + omap_free_gpio(gpio); +} + +static inline int __gpio_set_direction(unsigned gpio, int is_input) +{ + if (cpu_class_is_omap2()) { + if (gpio > OMAP_MAX_GPIO_LINES) + return -EINVAL; + } else { + if (gpio > (OMAP_MAX_GPIO_LINES + 16 /* MPUIO */)) + return -EINVAL; + } + omap_set_gpio_direction(gpio, is_input); + return 0; +} + +static inline int gpio_direction_input(unsigned gpio) +{ + return __gpio_set_direction(gpio, 1); +} + +static inline int gpio_direction_output(unsigned gpio) +{ + return __gpio_set_direction(gpio, 0); +} + +static inline int gpio_get_value(unsigned gpio) +{ + return omap_get_gpio_datain(gpio); +} + +static inline void gpio_set_value(unsigned gpio, int value) +{ + omap_set_gpio_dataout(gpio, value); +} + +#include <asm-generic/gpio.h> /* cansleep wrappers */ + +static inline int gpio_to_irq(unsigned gpio) +{ + return OMAP_GPIO_IRQ(gpio); +} + +static inline int irq_to_gpio(unsigned irq) +{ + if (cpu_class_is_omap1() && (irq < (IH_MPUIO_BASE + 16))) + return (irq - IH_MPUIO_BASE) + OMAP_MAX_GPIO_LINES; + return irq - IH_GPIO_BASE; +} + #endif diff --git a/include/asm-arm/arch-pxa/gpio.h b/include/asm-arm/arch-pxa/gpio.h new file mode 100644 index 000000000000..e67c23821017 --- /dev/null +++ b/include/asm-arm/arch-pxa/gpio.h @@ -0,0 +1,72 @@ +/* + * linux/include/asm-arm/arch-pxa/gpio.h + * + * PXA GPIO wrappers for arch-neutral GPIO calls + * + * Written by Philipp Zabel <philipp.zabel@gmail.com> + * + * 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 __ASM_ARCH_PXA_GPIO_H +#define __ASM_ARCH_PXA_GPIO_H + +#include <asm/arch/pxa-regs.h> +#include <asm/arch/irqs.h> +#include <asm/arch/hardware.h> + +#include <asm/errno.h> + +static inline int gpio_request(unsigned gpio, const char *label) +{ + return 0; +} + +static inline void gpio_free(unsigned gpio) +{ + return; +} + +static inline int gpio_direction_input(unsigned gpio) +{ + if (gpio > PXA_LAST_GPIO) + return -EINVAL; + pxa_gpio_mode(gpio | GPIO_IN); +} + +static inline int gpio_direction_output(unsigned gpio) +{ + if (gpio > PXA_LAST_GPIO) + return -EINVAL; + pxa_gpio_mode(gpio | GPIO_OUT); +} + +/* REVISIT these macros are correct, but suffer code explosion + * for non-constant parameters. Provide out-line versions too. + */ +#define gpio_get_value(gpio) \ + (GPLR(gpio) & GPIO_bit(gpio)) + +#define gpio_set_value(gpio,value) \ + ((value) ? (GPSR(gpio) = GPIO_bit(gpio)):(GPCR(gpio) = GPIO_bit(gpio))) + +#include <asm-generic/gpio.h> /* cansleep wrappers */ + +#define gpio_to_irq(gpio) IRQ_GPIO(gpio) +#define irq_to_gpio(irq) IRQ_TO_GPIO(irq) + + +#endif diff --git a/include/asm-arm/arch-s3c2410/gpio.h b/include/asm-arm/arch-s3c2410/gpio.h new file mode 100644 index 000000000000..67b8b9ab22e9 --- /dev/null +++ b/include/asm-arm/arch-s3c2410/gpio.h @@ -0,0 +1,65 @@ +/* + * linux/include/asm-arm/arch-pxa/gpio.h + * + * S3C2400 GPIO wrappers for arch-neutral GPIO calls + * + * Written by Philipp Zabel <philipp.zabel@gmail.com> + * + * 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 __ASM_ARCH_PXA_GPIO_H +#define __ASM_ARCH_PXA_GPIO_H + +#include <asm/arch/pxa-regs.h> +#include <asm/arch/irqs.h> +#include <asm/arch/hardware.h> + +#include <asm/errno.h> + +static inline int gpio_request(unsigned gpio, const char *label) +{ + return 0; +} + +static inline void gpio_free(unsigned gpio) +{ + return; +} + +static inline int gpio_direction_input(unsigned gpio) +{ + s3c2410_gpio_cfgpin(gpio, S3C2410_GPIO_INPUT); + return 0; +} + +static inline int gpio_direction_output(unsigned gpio) +{ + s3c2410_gpio_cfgpin(gpio, S3C2410_GPIO_OUTPUT); + return 0; +} + +#define gpio_get_value(gpio) s3c2410_gpio_getpin(gpio) +#define gpio_set_value(gpio,value) s3c2410_gpio_setpin(gpio, value) + +#include <asm-generic/gpio.h> /* cansleep wrappers */ + +/* FIXME or maybe s3c2400_gpio_getirq() ... */ +#define gpio_to_irq(gpio) s3c2410_gpio_getirq(gpio) + +/* FIXME implement irq_to_gpio() */ + +#endif diff --git a/include/asm-arm/arch-sa1100/gpio.h b/include/asm-arm/arch-sa1100/gpio.h new file mode 100644 index 000000000000..a331fe3f6e48 --- /dev/null +++ b/include/asm-arm/arch-sa1100/gpio.h @@ -0,0 +1,81 @@ +/* + * linux/include/asm-arm/arch-pxa/gpio.h + * + * SA1100 GPIO wrappers for arch-neutral GPIO calls + * + * Written by Philipp Zabel <philipp.zabel@gmail.com> + * + * 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 __ASM_ARCH_SA1100_GPIO_H +#define __ASM_ARCH_SA1100_GPIO_H + +#include <asm/arch/SA-1100.h> +#include <asm/arch/irqs.h> +#include <asm/arch/hardware.h> + +#include <asm/errno.h> + +static inline int gpio_request(unsigned gpio, const char *label) +{ + return 0; +} + +static inline void gpio_free(unsigned gpio) +{ + return; +} + +static inline int gpio_direction_input(unsigned gpio) +{ + if (gpio > GPIO_MAX) + return -EINVAL; + GPDR = (GPDR_In << gpio) 0 +} + +static inline int gpio_direction_output(unsigned gpio) +{ + if (gpio > GPIO_MAX) + return -EINVAL; + GPDR = (GPDR_Out << gpio) 0 +} + +#define gpio_get_value(gpio) \ + (GPLR & GPIO_GPIO(gpio)) + +#define gpio_set_value(gpio,value) \ + ((value) ? (GPSR = GPIO_GPIO(gpio)) : (GPCR(gpio) = GPIO_GPIO(gpio))) + +#include <asm-generic/gpio.h> /* cansleep wrappers */ + +static inline unsigned gpio_to_irq(unsigned gpio) +{ + if (gpio < 11) + return IRQ_GPIO0 + gpio; + else + return IRQ_GPIO11 - 11 + gpio; +} + +static inline unsigned irq_to_gpio(unsigned irq) +{ + if (irq < IRQ_GPIO11_27) + return irq - IRQ_GPIO0; + else + return irq - IRQ_GPIO11 + 11; +} + +#endif diff --git a/include/asm-arm/gpio.h b/include/asm-arm/gpio.h new file mode 100644 index 000000000000..fff4f800ee42 --- /dev/null +++ b/include/asm-arm/gpio.h @@ -0,0 +1,7 @@ +#ifndef _ARCH_ARM_GPIO_H +#define _ARCH_ARM_GPIO_H + +/* not all ARM platforms necessarily support this API ... */ +#include <asm/arch/gpio.h> + +#endif /* _ARCH_ARM_GPIO_H */ diff --git a/include/asm-arm/hardware/gpio_keys.h b/include/asm-arm/hardware/gpio_keys.h new file mode 100644 index 000000000000..2b217c7b9312 --- /dev/null +++ b/include/asm-arm/hardware/gpio_keys.h @@ -0,0 +1,17 @@ +#ifndef _GPIO_KEYS_H +#define _GPIO_KEYS_H + +struct gpio_keys_button { + /* Configuration parameters */ + int keycode; + int gpio; + int active_low; + char *desc; +}; + +struct gpio_keys_platform_data { + struct gpio_keys_button *buttons; + int nbuttons; +}; + +#endif diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index 861092fbaa53..800ba5254daf 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h @@ -85,7 +85,6 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock) * Write locks are easy - we just set bit 31. When unlocking, we can * just write zero since the lock is exclusively held. */ -#define rwlock_is_locked(x) (*((volatile unsigned int *)(x)) != 0) static inline void __raw_write_lock(raw_rwlock_t *rw) { diff --git a/include/asm-arm/termios.h b/include/asm-arm/termios.h index 7b8f5e8ae063..329c324c4040 100644 --- a/include/asm-arm/termios.h +++ b/include/asm-arm/termios.h @@ -49,24 +49,6 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ /* diff --git a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h index 5f420a0149f1..c92df958802e 100644 --- a/include/asm-arm/uaccess.h +++ b/include/asm-arm/uaccess.h @@ -76,10 +76,10 @@ static inline void set_fs(mm_segment_t fs) /* We use 33-bit arithmetic here... */ #define __range_ok(addr,size) ({ \ - unsigned long flag, sum; \ + unsigned long flag, roksum; \ __chk_user_ptr(addr); \ __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \ - : "=&r" (flag), "=&r" (sum) \ + : "=&r" (flag), "=&r" (roksum) \ : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ : "cc"); \ flag; }) diff --git a/include/asm-arm26/termios.h b/include/asm-arm26/termios.h index 7b8f5e8ae063..329c324c4040 100644 --- a/include/asm-arm26/termios.h +++ b/include/asm-arm26/termios.h @@ -49,24 +49,6 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ /* diff --git a/include/asm-arm26/uaccess-asm.h b/include/asm-arm26/uaccess-asm.h index 19f798e338c9..ade76ec02995 100644 --- a/include/asm-arm26/uaccess-asm.h +++ b/include/asm-arm26/uaccess-asm.h @@ -34,9 +34,9 @@ static inline void set_fs (mm_segment_t fs) } #define __range_ok(addr,size) ({ \ - unsigned long flag, sum; \ + unsigned long flag, roksum; \ __asm__ __volatile__("subs %1, %0, %3; cmpcs %1, %2; movcs %0, #0" \ - : "=&r" (flag), "=&r" (sum) \ + : "=&r" (flag), "=&r" (roksum) \ : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ : "cc"); \ flag; }) diff --git a/include/asm-avr32/termios.h b/include/asm-avr32/termios.h index 615bc0639e5c..0152aba35154 100644 --- a/include/asm-avr32/termios.h +++ b/include/asm-avr32/termios.h @@ -46,24 +46,6 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ /* intr=^C quit=^\ erase=del kill=^U eof=^D vtime=\0 vmin=\1 sxtc=\0 diff --git a/include/asm-cris/semaphore-helper.h b/include/asm-cris/semaphore-helper.h index a8e1e6cb7cd0..27bfeca1b981 100644 --- a/include/asm-cris/semaphore-helper.h +++ b/include/asm-cris/semaphore-helper.h @@ -30,8 +30,7 @@ static inline int waking_non_zero(struct semaphore *sem) unsigned long flags; int ret = 0; - local_save_flags(flags); - local_irq_disable(); + local_irq_save(flags); if (read(&sem->waking) > 0) { dec(&sem->waking); ret = 1; @@ -46,8 +45,7 @@ static inline int waking_non_zero_interruptible(struct semaphore *sem, int ret = 0; unsigned long flags; - local_save_flags(flags); - local_irq_disable(); + local_irq_save(flags); if (read(&sem->waking) > 0) { dec(&sem->waking); ret = 1; @@ -64,8 +62,7 @@ static inline int waking_non_zero_trylock(struct semaphore *sem) int ret = 1; unsigned long flags; - local_save_flags(flags); - local_irq_disable(); + local_irq_save(flags); if (read(&sem->waking) <= 0) inc(&sem->count); else { diff --git a/include/asm-cris/system.h b/include/asm-cris/system.h index b869f6161aaa..fea0e8d57cb5 100644 --- a/include/asm-cris/system.h +++ b/include/asm-cris/system.h @@ -44,8 +44,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz /* since Etrax doesn't have any atomic xchg instructions, we need to disable irq's (if enabled) and do it with move.d's */ unsigned long flags,temp; - local_save_flags(flags); /* save flags, including irq enable bit */ - local_irq_disable(); /* shut off irq's */ + local_irq_save(flags); /* save flags, including irq enable bit and shut off irqs */ switch (size) { case 1: *((unsigned char *)&temp) = x; diff --git a/include/asm-cris/termios.h b/include/asm-cris/termios.h index 5ce1023c5d7b..c9dbd4d43368 100644 --- a/include/asm-cris/termios.h +++ b/include/asm-cris/termios.h @@ -40,24 +40,6 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_BT 15 /* bluetooth */ - #ifdef __KERNEL__ /* intr=^C quit=^\ erase=del kill=^U diff --git a/include/asm-frv/termios.h b/include/asm-frv/termios.h index 8840cf95e8dd..a62fb5872375 100644 --- a/include/asm-frv/termios.h +++ b/include/asm-frv/termios.h @@ -51,24 +51,6 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ #include <asm-generic/termios.h> #endif diff --git a/include/asm-generic/dma-mapping-broken.h b/include/asm-generic/dma-mapping-broken.h index a7f1a55ce6b0..29413d3d4605 100644 --- a/include/asm-generic/dma-mapping-broken.h +++ b/include/asm-generic/dma-mapping-broken.h @@ -3,7 +3,6 @@ /* This is used for archs that do not support DMA */ - static inline void * dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag) @@ -19,4 +18,7 @@ dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, BUG(); } +#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) +#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) + #endif /* _ASM_GENERIC_DMA_MAPPING_H */ diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h new file mode 100644 index 000000000000..2d0aab1d8611 --- /dev/null +++ b/include/asm-generic/gpio.h @@ -0,0 +1,25 @@ +#ifndef _ASM_GENERIC_GPIO_H +#define _ASM_GENERIC_GPIO_H + +/* platforms that don't directly support access to GPIOs through I2C, SPI, + * or other blocking infrastructure can use these wrappers. + */ + +static inline int gpio_cansleep(unsigned gpio) +{ + return 0; +} + +static inline int gpio_get_value_cansleep(unsigned gpio) +{ + might_sleep(); + return gpio_get_value(gpio); +} + +static inline void gpio_set_value_cansleep(unsigned gpio, int value) +{ + might_sleep(); + gpio_set_value(gpio, value); +} + +#endif /* _ASM_GENERIC_GPIO_H */ diff --git a/include/asm-generic/memory_model.h b/include/asm-generic/memory_model.h index 8078cbd2c016..30d8d33491dd 100644 --- a/include/asm-generic/memory_model.h +++ b/include/asm-generic/memory_model.h @@ -54,7 +54,7 @@ #define __page_to_pfn(pg) \ ({ struct page *__pg = (pg); \ int __sec = page_to_section(__pg); \ - __pg - __section_mem_map_addr(__nr_to_section(__sec)); \ + (unsigned long)(__pg - __section_mem_map_addr(__nr_to_section(__sec))); \ }) #define __pfn_to_page(pfn) \ diff --git a/include/asm-generic/mman.h b/include/asm-generic/mman.h index 3b41d2bb70da..5e3dde2ee5ad 100644 --- a/include/asm-generic/mman.h +++ b/include/asm-generic/mman.h @@ -36,7 +36,6 @@ #define MADV_DOFORK 11 /* do inherit across fork */ /* compatibility flags */ -#define MAP_ANON MAP_ANONYMOUS #define MAP_FILE 0 #endif diff --git a/include/asm-h8300/termios.h b/include/asm-h8300/termios.h index e2319f992af2..fb2925d08c49 100644 --- a/include/asm-h8300/termios.h +++ b/include/asm-h8300/termios.h @@ -49,24 +49,6 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ /* diff --git a/include/asm-i386/atomic.h b/include/asm-i386/atomic.h index c57441bb2905..4dd272331361 100644 --- a/include/asm-i386/atomic.h +++ b/include/asm-i386/atomic.h @@ -211,12 +211,12 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v) #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) /** - * atomic_add_unless - add unless the number is a given value + * atomic_add_unless - add unless the number is already a given value * @v: pointer of type atomic_t * @a: the amount to add to v... * @u: ...unless v is equal to u. * - * Atomically adds @a to @v, so long as it was not @u. + * Atomically adds @a to @v, so long as @v was not already @u. * Returns non-zero if @v was not @u, and zero otherwise. */ #define atomic_add_unless(v, a, u) \ diff --git a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h index 1c780fa1e762..273b50629357 100644 --- a/include/asm-i386/bitops.h +++ b/include/asm-i386/bitops.h @@ -371,7 +371,7 @@ static inline unsigned long ffz(unsigned long word) * * This is defined the same way as * the libc and compiler builtin ffs routines, therefore - * differs in spirit from the above ffz (man ffs). + * differs in spirit from the above ffz() (man ffs). */ static inline int ffs(int x) { @@ -388,7 +388,7 @@ static inline int ffs(int x) * fls - find last bit set * @x: the word to search * - * This is defined the same way as ffs. + * This is defined the same way as ffs(). */ static inline int fls(int x) { diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h index 67659dbaf120..76316275d6f9 100644 --- a/include/asm-i386/setup.h +++ b/include/asm-i386/setup.h @@ -6,7 +6,7 @@ #ifndef _i386_SETUP_H #define _i386_SETUP_H -#define COMMAND_LINE_SIZE 256 +#define COMMAND_LINE_SIZE 2048 #ifdef __KERNEL__ #include <linux/pfn.h> diff --git a/include/asm-i386/termios.h b/include/asm-i386/termios.h index 03f548536d6b..7c99678a8f86 100644 --- a/include/asm-i386/termios.h +++ b/include/asm-i386/termios.h @@ -39,24 +39,6 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ #include <linux/module.h> diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h index eef5133b9ce2..70829ae3ad52 100644 --- a/include/asm-i386/uaccess.h +++ b/include/asm-i386/uaccess.h @@ -54,10 +54,10 @@ extern struct movsl_mask { * This needs 33-bit arithmetic. We have a carry... */ #define __range_ok(addr,size) ({ \ - unsigned long flag,sum; \ + unsigned long flag,roksum; \ __chk_user_ptr(addr); \ asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \ - :"=&r" (flag), "=r" (sum) \ + :"=&r" (flag), "=r" (roksum) \ :"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \ flag; }) diff --git a/include/asm-ia64/setup.h b/include/asm-ia64/setup.h index ea29b57affcb..4399a44355b3 100644 --- a/include/asm-ia64/setup.h +++ b/include/asm-ia64/setup.h @@ -1,6 +1,6 @@ #ifndef __IA64_SETUP_H #define __IA64_SETUP_H -#define COMMAND_LINE_SIZE 512 +#define COMMAND_LINE_SIZE 2048 #endif diff --git a/include/asm-ia64/termios.h b/include/asm-ia64/termios.h index 42c95693240c..08750c2d3607 100644 --- a/include/asm-ia64/termios.h +++ b/include/asm-ia64/termios.h @@ -46,24 +46,6 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS msgs */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ - # ifdef __KERNEL__ /* intr=^C quit=^\ erase=del kill=^U diff --git a/include/asm-m32r/a.out.h b/include/asm-m32r/a.out.h index 4619ba5c372e..9a4a5d20160a 100644 --- a/include/asm-m32r/a.out.h +++ b/include/asm-m32r/a.out.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_A_OUT_H #define _ASM_M32R_A_OUT_H -/* orig : i386 2.4.18 */ - struct exec { unsigned long a_info; /* Use macros N_MAGIC, etc for access */ diff --git a/include/asm-m32r/addrspace.h b/include/asm-m32r/addrspace.h index 06a83dc94648..81782c122da4 100644 --- a/include/asm-m32r/addrspace.h +++ b/include/asm-m32r/addrspace.h @@ -1,4 +1,3 @@ -/* $Id$ */ /* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive diff --git a/include/asm-m32r/bugs.h b/include/asm-m32r/bugs.h index 9a56f661bdb3..f77214eff136 100644 --- a/include/asm-m32r/bugs.h +++ b/include/asm-m32r/bugs.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_BUGS_H #define _ASM_M32R_BUGS_H -/* $Id$ */ - /* * This is included by init/main.c to check for architecture-dependent bugs. * diff --git a/include/asm-m32r/byteorder.h b/include/asm-m32r/byteorder.h index 3c0b9a2e03bc..10b2c1d11614 100644 --- a/include/asm-m32r/byteorder.h +++ b/include/asm-m32r/byteorder.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_BYTEORDER_H #define _ASM_M32R_BYTEORDER_H -/* $Id$ */ - #include <asm/types.h> #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) diff --git a/include/asm-m32r/cache.h b/include/asm-m32r/cache.h index 9c2b2d9998bc..40b3ee98193d 100644 --- a/include/asm-m32r/cache.h +++ b/include/asm-m32r/cache.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_CACHE_H #define _ASM_M32R_CACHE_H -/* $Id$ */ - /* L1 cache line size */ #define L1_CACHE_SHIFT 4 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) diff --git a/include/asm-m32r/cacheflush.h b/include/asm-m32r/cacheflush.h index 56961a9511b2..78587c958146 100644 --- a/include/asm-m32r/cacheflush.h +++ b/include/asm-m32r/cacheflush.h @@ -67,4 +67,3 @@ do { \ memcpy(dst, src, len) #endif /* _ASM_M32R_CACHEFLUSH_H */ - diff --git a/include/asm-m32r/current.h b/include/asm-m32r/current.h index c19d927ff22d..7859d864f2c2 100644 --- a/include/asm-m32r/current.h +++ b/include/asm-m32r/current.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_CURRENT_H #define _ASM_M32R_CURRENT_H -/* $Id$ */ - #include <linux/thread_info.h> struct task_struct; @@ -15,4 +13,3 @@ static __inline__ struct task_struct *get_current(void) #define current (get_current()) #endif /* _ASM_M32R_CURRENT_H */ - diff --git a/include/asm-m32r/delay.h b/include/asm-m32r/delay.h index f285eaee7d27..164448d23850 100644 --- a/include/asm-m32r/delay.h +++ b/include/asm-m32r/delay.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_DELAY_H #define _ASM_M32R_DELAY_H -/* $Id$ */ - /* * Copyright (C) 1993 Linus Torvalds * diff --git a/include/asm-m32r/dma.h b/include/asm-m32r/dma.h index 7263b013b67e..52f6a22dd232 100644 --- a/include/asm-m32r/dma.h +++ b/include/asm-m32r/dma.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_DMA_H #define _ASM_M32R_DMA_H -/* $Id$ */ - #include <asm/io.h> /* diff --git a/include/asm-m32r/errno.h b/include/asm-m32r/errno.h index 7a98520194a7..777149262aad 100644 --- a/include/asm-m32r/errno.h +++ b/include/asm-m32r/errno.h @@ -1,9 +1,6 @@ #ifndef _ASM_M32R_ERRNO_H #define _ASM_M32R_ERRNO_H -/* $Id$ */ - #include <asm-generic/errno.h> #endif /* _ASM_M32R_ERRNO_H */ - diff --git a/include/asm-m32r/ide.h b/include/asm-m32r/ide.h index c82ebe8f250d..4672a49e8760 100644 --- a/include/asm-m32r/ide.h +++ b/include/asm-m32r/ide.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_IDE_H #define _ASM_M32R_IDE_H -/* $Id$ */ - /* * linux/include/asm-m32r/ide.h * @@ -15,6 +13,7 @@ #ifdef __KERNEL__ +#include <asm/m32r.h> #ifndef MAX_HWIFS # ifdef CONFIG_BLK_DEV_IDEPCI @@ -24,9 +23,6 @@ # endif #endif -#include <asm/m32r.h> - - #define IDE_ARCH_OBSOLETE_DEFAULTS static __inline__ int ide_default_irq(unsigned long base) diff --git a/include/asm-m32r/ioctls.h b/include/asm-m32r/ioctls.h index b3508292246a..d23cfc45738a 100644 --- a/include/asm-m32r/ioctls.h +++ b/include/asm-m32r/ioctls.h @@ -1,10 +1,6 @@ #ifndef __ARCH_M32R_IOCTLS_H__ #define __ARCH_M32R_IOCTLS_H__ -/* $Id$ */ - -/* orig : i386 2.5.67 */ - #include <asm/ioctl.h> /* 0x54 is just a magic number to make these relatively unique ('T') */ @@ -85,4 +81,3 @@ #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ #endif /* __ARCH_M32R_IOCTLS_H__ */ - diff --git a/include/asm-m32r/ipcbuf.h b/include/asm-m32r/ipcbuf.h index 7c77fb0b1467..8d2d7c8ffdb0 100644 --- a/include/asm-m32r/ipcbuf.h +++ b/include/asm-m32r/ipcbuf.h @@ -1,10 +1,6 @@ #ifndef _ASM_M32R_IPCBUF_H #define _ASM_M32R_IPCBUF_H -/* $Id$ */ - -/* orig : i386 2.4.18 */ - /* * The ipc64_perm structure for m32r architecture. * Note extra padding because this structure is passed back and forth diff --git a/include/asm-m32r/kmap_types.h b/include/asm-m32r/kmap_types.h index 0524d89edb0f..fa94dc6410ea 100644 --- a/include/asm-m32r/kmap_types.h +++ b/include/asm-m32r/kmap_types.h @@ -1,9 +1,6 @@ #ifndef __M32R_KMAP_TYPES_H #define __M32R_KMAP_TYPES_H -/* Dummy header just to define km_type. */ - - #ifdef CONFIG_DEBUG_HIGHMEM # define D(n) __KM_FENCE_##n , #else @@ -30,4 +27,3 @@ D(13) KM_TYPE_NR #undef D #endif /* __M32R_KMAP_TYPES_H */ - diff --git a/include/asm-m32r/m32104ut/m32104ut_pld.h b/include/asm-m32r/m32104ut/m32104ut_pld.h index cbdbc5891445..2dc89d68b6d9 100644 --- a/include/asm-m32r/m32104ut/m32104ut_pld.h +++ b/include/asm-m32r/m32104ut/m32104ut_pld.h @@ -1,3 +1,6 @@ +#ifndef _M32104UT_M32104UT_PLD_H +#define _M32104UT_M32104UT_PLD_H + /* * include/asm-m32r/m32104ut/m32104ut_pld.h * @@ -12,10 +15,6 @@ * this archive for more details. */ -#ifndef _M32104UT_M32104UT_PLD_H -#define _M32104UT_M32104UT_PLD_H - - #if defined(CONFIG_PLAT_M32104UT) #define PLD_PLAT_BASE 0x02c00000 #else @@ -35,7 +34,7 @@ #define __reg8 #define __reg16 #define __reg32 -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLY__ */ /* CFC */ #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) @@ -159,4 +158,4 @@ #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) -#endif /* _M32104UT_M32104UT_PLD_H */ +#endif /* _M32104UT_M32104UT_PLD_H */ diff --git a/include/asm-m32r/m32700ut/m32700ut_lan.h b/include/asm-m32r/m32700ut/m32700ut_lan.h index f1e47ae1f891..aae810a4fb2c 100644 --- a/include/asm-m32r/m32700ut/m32700ut_lan.h +++ b/include/asm-m32r/m32700ut/m32700ut_lan.h @@ -1,3 +1,6 @@ +#ifndef _M32700UT_M32700UT_LAN_H +#define _M32700UT_M32700UT_LAN_H + /* * include/asm-m32r/m32700ut/m32700ut_lan.h * @@ -8,14 +11,8 @@ * This file is subject to the terms and conditions of the GNU General * Public License. See the file "COPYING" in the main directory of * this archive for more details. - * - * $Id$ */ -#ifndef _M32700UT_M32700UT_LAN_H -#define _M32700UT_M32700UT_LAN_H - - #ifndef __ASSEMBLY__ /* * C functions use non-cache address. @@ -23,7 +20,7 @@ #define M32700UT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */) #else #define M32700UT_LAN_BASE (0x10000000 + NONCACHE_OFFSET) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLY__ */ /* ICU * ICUISTS: status register @@ -103,4 +100,4 @@ #define PLDI2CSTS_BB 0x00000010 #define PLDI2CSTS_NOACK 0x00000001 /* 0:ack, 1:noack */ -#endif /* _M32700UT_M32700UT_LAN_H */ +#endif /* _M32700UT_M32700UT_LAN_H */ diff --git a/include/asm-m32r/m32700ut/m32700ut_lcd.h b/include/asm-m32r/m32700ut/m32700ut_lcd.h index e41c4aa48b4c..4c2489079788 100644 --- a/include/asm-m32r/m32700ut/m32700ut_lcd.h +++ b/include/asm-m32r/m32700ut/m32700ut_lcd.h @@ -1,3 +1,6 @@ +#ifndef _M32700UT_M32700UT_LCD_H +#define _M32700UT_M32700UT_LCD_H + /* * include/asm-m32r/m32700ut/m32700ut_lcd.h * @@ -8,14 +11,8 @@ * This file is subject to the terms and conditions of the GNU General * Public License. See the file "COPYING" in the main directory of * this archive for more details. - * - * $Id$ */ -#ifndef _M32700UT_M32700UT_LCD_H -#define _M32700UT_M32700UT_LCD_H - - #ifndef __ASSEMBLY__ /* * C functions use non-cache address. @@ -23,7 +20,7 @@ #define M32700UT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */) #else #define M32700UT_LCD_BASE (0x10000000 + NONCACHE_OFFSET) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLY__ */ /* * ICU @@ -55,4 +52,4 @@ #define M32700UT_LCD_ICUCR19 __reg16(M32700UT_LCD_BASE + 0x300036) #define M32700UT_LCD_ICUCR21 __reg16(M32700UT_LCD_BASE + 0x30003a) -#endif /* _M32700UT_M32700UT_LCD_H */ +#endif /* _M32700UT_M32700UT_LCD_H */ diff --git a/include/asm-m32r/m32700ut/m32700ut_pld.h b/include/asm-m32r/m32700ut/m32700ut_pld.h index a48c22c978ca..d39121279a1a 100644 --- a/include/asm-m32r/m32700ut/m32700ut_pld.h +++ b/include/asm-m32r/m32700ut/m32700ut_pld.h @@ -1,3 +1,6 @@ +#ifndef _M32700UT_M32700UT_PLD_H +#define _M32700UT_M32700UT_PLD_H + /* * include/asm-m32r/m32700ut/m32700ut_pld.h * @@ -8,14 +11,8 @@ * This file is subject to the terms and conditions of the GNU General * Public License. See the file "COPYING" in the main directory of * this archive for more details. - * - * $Id$ */ -#ifndef _M32700UT_M32700UT_PLD_H -#define _M32700UT_M32700UT_PLD_H - - #if defined(CONFIG_PLAT_M32700UT_Alpha) #define PLD_PLAT_BASE 0x08c00000 #elif defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_USRV) @@ -37,7 +34,7 @@ #define __reg8 #define __reg16 #define __reg32 -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLY__ */ /* CFC */ #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) @@ -261,4 +258,4 @@ #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) -#endif /* _M32700UT_M32700UT_PLD.H */ +#endif /* _M32700UT_M32700UT_PLD.H */ diff --git a/include/asm-m32r/mappi2/mappi2_pld.h b/include/asm-m32r/mappi2/mappi2_pld.h index 56a2b12f2bfc..2624c9db7255 100644 --- a/include/asm-m32r/mappi2/mappi2_pld.h +++ b/include/asm-m32r/mappi2/mappi2_pld.h @@ -1,18 +1,17 @@ +#ifndef _MAPPI2_PLD_H +#define _MAPPI2_PLD_H + /* * include/asm-m32r/mappi2/mappi2_pld.h * * Definitions for Extended IO Logic on MAPPI2 board. - * based on m32700ut_pld.h by + * based on m32700ut_pld.h * * This file is subject to the terms and conditions of the GNU General * Public License. See the file "COPYING" in the main directory of * this archive for more details. - * */ -#ifndef _MAPPI2_PLD_H -#define _MAPPI2_PLD_H - #ifndef __ASSEMBLY__ /* FIXME: * Some C functions use non-cache address, so can't define non-cache address. @@ -26,7 +25,7 @@ #define __reg8 #define __reg16 #define __reg32 -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLY__ */ /* CFC */ #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) @@ -148,4 +147,4 @@ #endif -#endif /* _MAPPI2_PLD.H */ +#endif /* _MAPPI2_PLD.H */ diff --git a/include/asm-m32r/mappi3/mappi3_pld.h b/include/asm-m32r/mappi3/mappi3_pld.h index 92f10defaef8..451c40ee70af 100644 --- a/include/asm-m32r/mappi3/mappi3_pld.h +++ b/include/asm-m32r/mappi3/mappi3_pld.h @@ -1,3 +1,6 @@ +#ifndef _MAPPI3_PLD_H +#define _MAPPI3_PLD_H + /* * include/asm-m32r/mappi3/mappi3_pld.h * @@ -7,12 +10,8 @@ * This file is subject to the terms and conditions of the GNU General * Public License. See the file "COPYING" in the main directory of * this archive for more details. - * */ -#ifndef _MAPPI3_PLD_H -#define _MAPPI3_PLD_H - #ifndef __ASSEMBLY__ /* FIXME: * Some C functions use non-cache address, so can't define non-cache address. @@ -26,7 +25,7 @@ #define __reg8 #define __reg16 #define __reg32 -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLY__ */ /* CFC */ #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) @@ -140,4 +139,4 @@ /* Reset Control */ #define PLD_REBOOT __reg16(PLD_BASE + 0x38000) -#endif /* _MAPPI3_PLD.H */ +#endif /* _MAPPI3_PLD.H */ diff --git a/include/asm-m32r/mc146818rtc.h b/include/asm-m32r/mc146818rtc.h index 755601d053cc..aa1b7bf84f51 100644 --- a/include/asm-m32r/mc146818rtc.h +++ b/include/asm-m32r/mc146818rtc.h @@ -7,7 +7,6 @@ #include <asm/io.h> #ifndef RTC_PORT -// #define RTC_PORT(x) (0x70 + (x)) #define RTC_PORT(x) ((x)) #define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */ #endif @@ -26,7 +25,5 @@ outb_p((val),RTC_PORT(1)); \ }) #define RTC_IRQ 8 -#if 0 -#endif #endif /* _ASM_MC146818RTC_H */ diff --git a/include/asm-m32r/mman.h b/include/asm-m32r/mman.h index 695a860c024f..516a8973b130 100644 --- a/include/asm-m32r/mman.h +++ b/include/asm-m32r/mman.h @@ -3,8 +3,6 @@ #include <asm-generic/mman.h> -/* orig : i386 2.6.0-test6 */ - #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ diff --git a/include/asm-m32r/mmu.h b/include/asm-m32r/mmu.h index cf3f6d78ac66..d9bd724479cf 100644 --- a/include/asm-m32r/mmu.h +++ b/include/asm-m32r/mmu.h @@ -1,13 +1,14 @@ #ifndef _ASM_M32R_MMU_H #define _ASM_M32R_MMU_H - #if !defined(CONFIG_MMU) + typedef struct { struct vm_list_struct *vmlist; unsigned long end_brk; } mm_context_t; -#else + +#else /* CONFIG_MMU */ /* Default "unsigned long" context */ #ifndef CONFIG_SMP @@ -16,5 +17,6 @@ typedef unsigned long mm_context_t; typedef unsigned long mm_context_t[NR_CPUS]; #endif -#endif /* CONFIG_MMU */ -#endif /* _ASM_M32R_MMU_H */ +#endif /* CONFIG_MMU */ + +#endif /* _ASM_M32R_MMU_H */ diff --git a/include/asm-m32r/mmu_context.h b/include/asm-m32r/mmu_context.h index 542302eb6bcb..1f40d4a0acf1 100644 --- a/include/asm-m32r/mmu_context.h +++ b/include/asm-m32r/mmu_context.h @@ -1,9 +1,7 @@ #ifndef _ASM_M32R_MMU_CONTEXT_H #define _ASM_M32R_MMU_CONTEXT_H - #ifdef __KERNEL__ - #include <asm/m32r.h> #define MMU_CONTEXT_ASID_MASK (0x000000FF) @@ -11,7 +9,6 @@ #define MMU_CONTEXT_FIRST_VERSION (0x00000100) #define NO_CONTEXT (0x00000000) - #ifndef __ASSEMBLY__ #include <asm/atomic.h> @@ -147,7 +144,7 @@ static inline void switch_mm(struct mm_struct *prev, #define activate_mm(prev, next) \ switch_mm((prev), (next), NULL) -#else +#else /* not CONFIG_MMU */ #define get_mmu_context(mm) do { } while (0) #define init_new_context(tsk,mm) (0) #define destroy_context(mm) do { } while (0) @@ -158,11 +155,9 @@ static inline void switch_mm(struct mm_struct *prev, #define deactivate_mm(mm,tsk) do { } while (0) #define activate_mm(prev,next) do { } while (0) #define enter_lazy_tlb(mm,tsk) do { } while (0) -#endif /* CONFIG_MMU */ - +#endif /* not CONFIG_MMU */ #endif /* not __ASSEMBLY__ */ #endif /* __KERNEL__ */ - #endif /* _ASM_M32R_MMU_CONTEXT_H */ diff --git a/include/asm-m32r/module.h b/include/asm-m32r/module.h index 3f2541c92a7b..eb73ee011215 100644 --- a/include/asm-m32r/module.h +++ b/include/asm-m32r/module.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_MODULE_H #define _ASM_M32R_MODULE_H -/* $Id$ */ - struct mod_arch_specific { }; #define Elf_Shdr Elf32_Shdr @@ -10,4 +8,3 @@ struct mod_arch_specific { }; #define Elf_Ehdr Elf32_Ehdr #endif /* _ASM_M32R_MODULE_H */ - diff --git a/include/asm-m32r/msgbuf.h b/include/asm-m32r/msgbuf.h index 852ff52af4c2..0d5a877b813e 100644 --- a/include/asm-m32r/msgbuf.h +++ b/include/asm-m32r/msgbuf.h @@ -1,10 +1,6 @@ #ifndef _ASM_M32R_MSGBUF_H #define _ASM_M32R_MSGBUF_H -/* $Id$ */ - -/* orig : i386 2.4.18 */ - /* * The msqid64_ds structure for m32r architecture. * Note extra padding because this structure is passed back and forth diff --git a/include/asm-m32r/namei.h b/include/asm-m32r/namei.h index 7172d3d2e260..210f8056b805 100644 --- a/include/asm-m32r/namei.h +++ b/include/asm-m32r/namei.h @@ -1,10 +1,6 @@ #ifndef _ASM_M32R_NAMEI_H #define _ASM_M32R_NAMEI_H -/* $Id$ */ - -/* orig : i386 2.4.18 */ - /* * linux/include/asm-m32r/namei.h * diff --git a/include/asm-m32r/opsput/opsput_lan.h b/include/asm-m32r/opsput/opsput_lan.h index f53e10187c03..a5f18dd1ab20 100644 --- a/include/asm-m32r/opsput/opsput_lan.h +++ b/include/asm-m32r/opsput/opsput_lan.h @@ -1,3 +1,6 @@ +#ifndef _OPSPUT_OPSPUT_LAN_H +#define _OPSPUT_OPSPUT_LAN_H + /* * include/asm-m32r/opsput/opsput_lan.h * @@ -8,14 +11,8 @@ * This file is subject to the terms and conditions of the GNU General * Public License. See the file "COPYING" in the main directory of * this archive for more details. - * - * $Id: opsput_lan.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $ */ -#ifndef _OPSPUT_OPSPUT_LAN_H -#define _OPSPUT_OPSPUT_LAN_H - - #ifndef __ASSEMBLY__ /* * C functions use non-cache address. @@ -23,7 +20,7 @@ #define OPSPUT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */) #else #define OPSPUT_LAN_BASE (0x10000000 + NONCACHE_OFFSET) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLY__ */ /* ICU * ICUISTS: status register @@ -52,4 +49,4 @@ #define OPSPUT_LAN_ICUCR1 __reg16(OPSPUT_LAN_BASE + 0xc0010) #define OPSPUT_LAN_ICUCR3 __reg16(OPSPUT_LAN_BASE + 0xc0014) -#endif /* _OPSPUT_OPSPUT_LAN_H */ +#endif /* _OPSPUT_OPSPUT_LAN_H */ diff --git a/include/asm-m32r/opsput/opsput_lcd.h b/include/asm-m32r/opsput/opsput_lcd.h index 99f296e1b61b..369c9f0832a6 100644 --- a/include/asm-m32r/opsput/opsput_lcd.h +++ b/include/asm-m32r/opsput/opsput_lcd.h @@ -1,3 +1,6 @@ +#ifndef _OPSPUT_OPSPUT_LCD_H +#define _OPSPUT_OPSPUT_LCD_H + /* * include/asm-m32r/opsput/opsput_lcd.h * @@ -8,14 +11,8 @@ * This file is subject to the terms and conditions of the GNU General * Public License. See the file "COPYING" in the main directory of * this archive for more details. - * - * $Id: opsput_lcd.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $ */ -#ifndef _OPSPUT_OPSPUT_LCD_H -#define _OPSPUT_OPSPUT_LCD_H - - #ifndef __ASSEMBLY__ /* * C functions use non-cache address. @@ -23,7 +20,7 @@ #define OPSPUT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */) #else #define OPSPUT_LCD_BASE (0x10000000 + NONCACHE_OFFSET) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLY__ */ /* * ICU @@ -55,4 +52,4 @@ #define OPSPUT_LCD_ICUCR19 __reg16(OPSPUT_LCD_BASE + 0x300036) #define OPSPUT_LCD_ICUCR21 __reg16(OPSPUT_LCD_BASE + 0x30003a) -#endif /* _OPSPUT_OPSPUT_LCD_H */ +#endif /* _OPSPUT_OPSPUT_LCD_H */ diff --git a/include/asm-m32r/opsput/opsput_pld.h b/include/asm-m32r/opsput/opsput_pld.h index a8d6452076f1..3f11ea1aac2d 100644 --- a/include/asm-m32r/opsput/opsput_pld.h +++ b/include/asm-m32r/opsput/opsput_pld.h @@ -1,3 +1,6 @@ +#ifndef _OPSPUT_OPSPUT_PLD_H +#define _OPSPUT_OPSPUT_PLD_H + /* * include/asm-m32r/opsput/opsput_pld.h * @@ -8,14 +11,8 @@ * This file is subject to the terms and conditions of the GNU General * Public License. See the file "COPYING" in the main directory of * this archive for more details. - * - * $Id: opsput_pld.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $ */ -#ifndef _OPSPUT_OPSPUT_PLD_H -#define _OPSPUT_OPSPUT_PLD_H - - #define PLD_PLAT_BASE 0x1cc00000 #ifndef __ASSEMBLY__ @@ -31,7 +28,7 @@ #define __reg8 #define __reg16 #define __reg32 -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLY__ */ /* CFC */ #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) @@ -255,4 +252,4 @@ #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) -#endif /* _OPSPUT_OPSPUT_PLD.H */ +#endif /* _OPSPUT_OPSPUT_PLD.H */ diff --git a/include/asm-m32r/page.h b/include/asm-m32r/page.h index 404a4c24007b..6f6ecf7d14a3 100644 --- a/include/asm-m32r/page.h +++ b/include/asm-m32r/page.h @@ -1,7 +1,6 @@ #ifndef _ASM_M32R_PAGE_H #define _ASM_M32R_PAGE_H - /* PAGE_SHIFT determines the page size */ #define PAGE_SHIFT 12 #define PAGE_SIZE (1UL << PAGE_SHIFT) @@ -57,9 +56,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; * and CONFIG_HIGHMEM64G options in the kernel configuration. */ - -/* This handles the memory map.. */ - #define __MEMORY_START CONFIG_MEMORY_START #define __MEMORY_SIZE CONFIG_MEMORY_SIZE @@ -92,4 +88,3 @@ typedef struct { unsigned long pgprot; } pgprot_t; #endif /* __KERNEL__ */ #endif /* _ASM_M32R_PAGE_H */ - diff --git a/include/asm-m32r/param.h b/include/asm-m32r/param.h index 750b938ccb52..3e14026e39cd 100644 --- a/include/asm-m32r/param.h +++ b/include/asm-m32r/param.h @@ -1,10 +1,6 @@ #ifndef _ASM_M32R_PARAM_H #define _ASM_M32R_PARAM_H -/* $Id$ */ - -/* orig : i386 2.5.67 */ - #ifdef __KERNEL__ # define HZ 100 /* Internal kernel timer frequency */ # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ diff --git a/include/asm-m32r/pci.h b/include/asm-m32r/pci.h index 00d7b6f39a33..fe785d167db6 100644 --- a/include/asm-m32r/pci.h +++ b/include/asm-m32r/pci.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_PCI_H #define _ASM_M32R_PCI_H -/* $Id$ */ - #include <asm-generic/pci.h> #define PCI_DMA_BUS_IS_PHYS (1) diff --git a/include/asm-m32r/pgalloc.h b/include/asm-m32r/pgalloc.h index e09a86c3cadf..943ba63c1ebc 100644 --- a/include/asm-m32r/pgalloc.h +++ b/include/asm-m32r/pgalloc.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_PGALLOC_H #define _ASM_M32R_PGALLOC_H -/* $Id$ */ - #include <linux/mm.h> #include <asm/io.h> @@ -74,4 +72,3 @@ static __inline__ void pte_free(struct page *pte) #define check_pgt_cache() do { } while (0) #endif /* _ASM_M32R_PGALLOC_H */ - diff --git a/include/asm-m32r/pgtable-2level.h b/include/asm-m32r/pgtable-2level.h index 84152760e0b5..750925726a10 100644 --- a/include/asm-m32r/pgtable-2level.h +++ b/include/asm-m32r/pgtable-2level.h @@ -1,9 +1,7 @@ #ifndef _ASM_M32R_PGTABLE_2LEVEL_H #define _ASM_M32R_PGTABLE_2LEVEL_H - #ifdef __KERNEL__ - /* * traditional M32R two-level paging structure: */ @@ -77,5 +75,4 @@ static inline pmd_t *pmd_offset(pgd_t * dir, unsigned long address) #define pgoff_to_pte(off) ((pte_t) { (((off) & 0xef) << 2) | (((off) >> 7) << 10) | _PAGE_FILE }) #endif /* __KERNEL__ */ - #endif /* _ASM_M32R_PGTABLE_2LEVEL_H */ diff --git a/include/asm-m32r/posix_types.h b/include/asm-m32r/posix_types.h index 47e7e85a3dc3..1caac65d208f 100644 --- a/include/asm-m32r/posix_types.h +++ b/include/asm-m32r/posix_types.h @@ -1,10 +1,6 @@ #ifndef _ASM_M32R_POSIX_TYPES_H #define _ASM_M32R_POSIX_TYPES_H -/* $Id$ */ - -/* orig : i386, sh 2.4.18 */ - /* * This file is generally used by user-level software, so you need to * be a little careful about namespace pollution etc. Also, we cannot diff --git a/include/asm-m32r/rtc.h b/include/asm-m32r/rtc.h index 6b2b837c5978..0340633f3f4d 100644 --- a/include/asm-m32r/rtc.h +++ b/include/asm-m32r/rtc.h @@ -1,10 +1,6 @@ -/* $Id: rtc.h,v 1.1.1.1 2004/03/25 04:29:22 hitoshiy Exp $ */ - #ifndef __RTC_H__ #define __RTC_H__ - - /* Dallas DS1302 clock/calendar register numbers. */ # define RTC_SECONDS 0 # define RTC_MINUTES 1 diff --git a/include/asm-m32r/scatterlist.h b/include/asm-m32r/scatterlist.h index 09a10e43bf0f..c2de96cb69ed 100644 --- a/include/asm-m32r/scatterlist.h +++ b/include/asm-m32r/scatterlist.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_SCATTERLIST_H #define _ASM_M32R_SCATTERLIST_H -/* $Id$ */ - struct scatterlist { char * address; /* Location data is to be transferred to, NULL for * highmem page */ diff --git a/include/asm-m32r/sections.h b/include/asm-m32r/sections.h index 6b969e53b806..5e5d21c4908a 100644 --- a/include/asm-m32r/sections.h +++ b/include/asm-m32r/sections.h @@ -5,4 +5,3 @@ #include <asm-generic/sections.h> #endif /* _M32R_SECTIONS_H */ - diff --git a/include/asm-m32r/segment.h b/include/asm-m32r/segment.h index e45db68e6c2d..42b11aeb3249 100644 --- a/include/asm-m32r/segment.h +++ b/include/asm-m32r/segment.h @@ -1,10 +1,6 @@ #ifndef _ASM_M32R_SEGMENT_H #define _ASM_M32R_SEGMENT_H -/* $Id$ */ - -/* orig : i386 (2.4.18) */ - #define __KERNEL_CS 0x10 #define __KERNEL_DS 0x18 diff --git a/include/asm-m32r/sembuf.h b/include/asm-m32r/sembuf.h index e69018e6ff71..c9873d6890e2 100644 --- a/include/asm-m32r/sembuf.h +++ b/include/asm-m32r/sembuf.h @@ -1,10 +1,6 @@ #ifndef _ASM_M32R_SEMBUF_H #define _ASM_M32R_SEMBUF_H -/* $Id$ */ - -/* orig : i386 2.4.18 */ - /* * The semid64_ds structure for m32r architecture. * Note extra padding because this structure is passed back and forth diff --git a/include/asm-m32r/setup.h b/include/asm-m32r/setup.h index 6a0b32202d4e..c637ab992394 100644 --- a/include/asm-m32r/setup.h +++ b/include/asm-m32r/setup.h @@ -1,3 +1,6 @@ +#ifndef _ASM_M32R_SETUP_H +#define _ASM_M32R_SETUP_H + /* * This is set up by the setup-routine at boot-time */ @@ -32,3 +35,4 @@ extern unsigned long memory_end; #endif /* __KERNEL__ */ +#endif /* _ASM_M32R_SETUP_H */ diff --git a/include/asm-m32r/shmbuf.h b/include/asm-m32r/shmbuf.h index b84e897fa87b..b0cdf0aa7d65 100644 --- a/include/asm-m32r/shmbuf.h +++ b/include/asm-m32r/shmbuf.h @@ -1,10 +1,6 @@ #ifndef _ASM_M32R_SHMBUF_H #define _ASM_M32R_SHMBUF_H -/* $Id$ */ - -/* orig : i386 2.4.18 */ - /* * The shmid64_ds structure for M32R architecture. * Note extra padding because this structure is passed back and forth diff --git a/include/asm-m32r/shmparam.h b/include/asm-m32r/shmparam.h index db0019ba955d..35986d81a528 100644 --- a/include/asm-m32r/shmparam.h +++ b/include/asm-m32r/shmparam.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_SHMPARAM_H #define _ASM_M32R_SHMPARAM_H -/* $Id$ */ - #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ #endif /* _ASM_M32R_SHMPARAM_H */ diff --git a/include/asm-m32r/sigcontext.h b/include/asm-m32r/sigcontext.h index 62537dc4dec9..da4a9c36d09b 100644 --- a/include/asm-m32r/sigcontext.h +++ b/include/asm-m32r/sigcontext.h @@ -1,9 +1,6 @@ #ifndef _ASM_M32R_SIGCONTEXT_H #define _ASM_M32R_SIGCONTEXT_H -/* $Id$ */ - - struct sigcontext { /* CPU registers */ /* Saved main processor registers. */ diff --git a/include/asm-m32r/siginfo.h b/include/asm-m32r/siginfo.h index 482202f2e77f..7d9cd9ebfd0e 100644 --- a/include/asm-m32r/siginfo.h +++ b/include/asm-m32r/siginfo.h @@ -1,8 +1,6 @@ #ifndef _M32R_SIGINFO_H #define _M32R_SIGINFO_H -/* $Id$ */ - #include <asm-generic/siginfo.h> #endif /* _M32R_SIGINFO_H */ diff --git a/include/asm-m32r/signal.h b/include/asm-m32r/signal.h index 65423bed32b1..937258686ba5 100644 --- a/include/asm-m32r/signal.h +++ b/include/asm-m32r/signal.h @@ -1,10 +1,6 @@ #ifndef _ASM_M32R_SIGNAL_H #define _ASM_M32R_SIGNAL_H -/* $Id$ */ - -/* orig : i386 2.4.18 */ - #include <linux/types.h> #include <linux/time.h> #include <linux/compiler.h> diff --git a/include/asm-m32r/smp.h b/include/asm-m32r/smp.h index 650d2558c304..abd937ac5239 100644 --- a/include/asm-m32r/smp.h +++ b/include/asm-m32r/smp.h @@ -1,9 +1,6 @@ #ifndef _ASM_M32R_SMP_H #define _ASM_M32R_SMP_H -/* $Id$ */ - - #ifdef CONFIG_SMP #ifndef __ASSEMBLY__ diff --git a/include/asm-m32r/sockios.h b/include/asm-m32r/sockios.h index 147a118442ac..f89962e231fe 100644 --- a/include/asm-m32r/sockios.h +++ b/include/asm-m32r/sockios.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_SOCKIOS_H #define _ASM_M32R_SOCKIOS_H -/* $Id$ */ - /* Socket-level I/O control calls. */ #define FIOSETOWN 0x8901 #define SIOCSPGRP 0x8902 diff --git a/include/asm-m32r/spinlock_types.h b/include/asm-m32r/spinlock_types.h index 7e9941c45f40..83f52105c0e4 100644 --- a/include/asm-m32r/spinlock_types.h +++ b/include/asm-m32r/spinlock_types.h @@ -20,4 +20,4 @@ typedef struct { #define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } -#endif +#endif /* _ASM_M32R_SPINLOCK_TYPES_H */ diff --git a/include/asm-m32r/stat.h b/include/asm-m32r/stat.h index 05748fef4c8e..da4518f82d6d 100644 --- a/include/asm-m32r/stat.h +++ b/include/asm-m32r/stat.h @@ -1,10 +1,6 @@ #ifndef _ASM_M32R_STAT_H #define _ASM_M32R_STAT_H -/* $Id$ */ - -/* orig : i386 2.4.18 */ - #include <asm/byteorder.h> struct __old_kernel_stat { diff --git a/include/asm-m32r/string.h b/include/asm-m32r/string.h index cb54bcc2e677..e61e2b0bfc1f 100644 --- a/include/asm-m32r/string.h +++ b/include/asm-m32r/string.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_STRING_H #define _ASM_M32R_STRING_H -/* $Id$ */ - #define __HAVE_ARCH_STRLEN extern size_t strlen(const char * s); diff --git a/include/asm-m32r/syscall.h b/include/asm-m32r/syscall.h index d8d4b2c7a7d4..25f316f2b78d 100644 --- a/include/asm-m32r/syscall.h +++ b/include/asm-m32r/syscall.h @@ -1,11 +1,8 @@ #ifndef _ASM_M32R_SYSCALL_H #define _ASM_M32R_SYSCALL_H -/* $Id$ */ - /* Definitions for the system call vector. */ #define SYSCALL_VECTOR "2" #define SYSCALL_VECTOR_ADDRESS "0xa0" #endif /* _ASM_M32R_SYSCALL_H */ - diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 4ce0619f6989..99ee09889ff7 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h @@ -339,4 +339,4 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) #define arch_align_stack(x) (x) -#endif /* _ASM_M32R_SYSTEM_H */ +#endif /* _ASM_M32R_SYSTEM_H */ diff --git a/include/asm-m32r/termbits.h b/include/asm-m32r/termbits.h index faf2bd0504c1..e402641dfbad 100644 --- a/include/asm-m32r/termbits.h +++ b/include/asm-m32r/termbits.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_TERMBITS_H #define _ASM_M32R_TERMBITS_H -/* $Id$ */ - #include <linux/posix_types.h> typedef unsigned char cc_t; @@ -184,4 +182,4 @@ struct ktermios { #define TCSADRAIN 1 #define TCSAFLUSH 2 -#endif /* _ASM_M32R_TERMBITS_H */ +#endif /* _ASM_M32R_TERMBITS_H */ diff --git a/include/asm-m32r/termios.h b/include/asm-m32r/termios.h index fc99d2e178d8..4943dd8db44d 100644 --- a/include/asm-m32r/termios.h +++ b/include/asm-m32r/termios.h @@ -1,8 +1,6 @@ #ifndef _M32R_TERMIOS_H #define _M32R_TERMIOS_H -/* orig : i386 2.6.0-test5 */ - #include <asm/termbits.h> #include <asm/ioctls.h> @@ -41,24 +39,6 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ #include <linux/module.h> diff --git a/include/asm-m32r/timex.h b/include/asm-m32r/timex.h index 019441c1d7a0..bb9fe4feb12d 100644 --- a/include/asm-m32r/timex.h +++ b/include/asm-m32r/timex.h @@ -1,15 +1,12 @@ #ifndef _ASM_M32R_TIMEX_H #define _ASM_M32R_TIMEX_H -/* $Id$ */ - /* * linux/include/asm-m32r/timex.h * * m32r architecture timex specifications */ - #define CLOCK_TICK_RATE (CONFIG_BUS_CLOCK / CONFIG_TIMER_DIVIDE) #define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */ diff --git a/include/asm-m32r/tlbflush.h b/include/asm-m32r/tlbflush.h index ae4494960593..3d37ac002bcc 100644 --- a/include/asm-m32r/tlbflush.h +++ b/include/asm-m32r/tlbflush.h @@ -98,4 +98,3 @@ static __inline__ void __flush_tlb_all(void) extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); #endif /* _ASM_M32R_TLBFLUSH_H */ - diff --git a/include/asm-m32r/types.h b/include/asm-m32r/types.h index fcf24c64c3ba..27d3eb539c50 100644 --- a/include/asm-m32r/types.h +++ b/include/asm-m32r/types.h @@ -3,10 +3,6 @@ #ifndef __ASSEMBLY__ -/* $Id$ */ - -/* orig : i386 2.4.18 */ - typedef unsigned short umode_t; /* @@ -59,4 +55,4 @@ typedef u64 dma64_addr_t; #endif /* __KERNEL__ */ -#endif /* _ASM_M32R_TYPES_H */ +#endif /* _ASM_M32R_TYPES_H */ diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h index 26e978c7e3b4..bd8c83765a5c 100644 --- a/include/asm-m32r/uaccess.h +++ b/include/asm-m32r/uaccess.h @@ -68,7 +68,7 @@ static inline void set_fs(mm_segment_t s) * This needs 33-bit arithmetic. We have a carry... */ #define __range_ok(addr,size) ({ \ - unsigned long flag, sum; \ + unsigned long flag, roksum; \ __chk_user_ptr(addr); \ asm ( \ " cmpu %1, %1 ; clear cbit\n" \ @@ -76,7 +76,7 @@ static inline void set_fs(mm_segment_t s) " subx %0, %0\n" \ " cmpu %4, %1\n" \ " subx %0, %5\n" \ - : "=&r" (flag), "=r" (sum) \ + : "=&r" (flag), "=r" (roksum) \ : "1" (addr), "r" ((int)(size)), \ "r" (current_thread_info()->addr_limit.seg), "r" (0) \ : "cbit" ); \ diff --git a/include/asm-m32r/ucontext.h b/include/asm-m32r/ucontext.h index 2de709a5c53c..09324741eec3 100644 --- a/include/asm-m32r/ucontext.h +++ b/include/asm-m32r/ucontext.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_UCONTEXT_H #define _ASM_M32R_UCONTEXT_H -/* orig : i386 2.4.18 */ - struct ucontext { unsigned long uc_flags; struct ucontext *uc_link; diff --git a/include/asm-m32r/unaligned.h b/include/asm-m32r/unaligned.h index 3aef9ac8d3aa..fccc180c3913 100644 --- a/include/asm-m32r/unaligned.h +++ b/include/asm-m32r/unaligned.h @@ -1,10 +1,6 @@ #ifndef _ASM_M32R_UNALIGNED_H #define _ASM_M32R_UNALIGNED_H -/* $Id$ */ - -/* orig : generic 2.4.18 */ - /* * For the benefit of those who are trying to port Linux to another * architecture, here are some C-language equivalents. @@ -12,7 +8,6 @@ #include <asm/string.h> - #define get_unaligned(ptr) \ ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) @@ -21,5 +16,4 @@ memmove((ptr), &__tmp, sizeof(*(ptr))); \ (void)0; }) - -#endif /* _ASM_M32R_UNALIGNED_H */ +#endif /* _ASM_M32R_UNALIGNED_H */ diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h index 5b66bd3c6ed6..cbbd53762ea6 100644 --- a/include/asm-m32r/unistd.h +++ b/include/asm-m32r/unistd.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_UNISTD_H #define _ASM_M32R_UNISTD_H -/* $Id$ */ - /* * This file contains the system call numbers. */ diff --git a/include/asm-m32r/user.h b/include/asm-m32r/user.h index 1ad4ded8483b..035258d713d0 100644 --- a/include/asm-m32r/user.h +++ b/include/asm-m32r/user.h @@ -1,12 +1,6 @@ #ifndef _ASM_M32R_USER_H #define _ASM_M32R_USER_H -/* $Id$ */ - -/* orig : sh 2.4.18 - * mod : remove fpu registers - */ - #include <linux/types.h> #include <asm/ptrace.h> #include <asm/page.h> diff --git a/include/asm-m32r/vga.h b/include/asm-m32r/vga.h index 533163447cc9..a1b63061c06f 100644 --- a/include/asm-m32r/vga.h +++ b/include/asm-m32r/vga.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_VGA_H #define _ASM_M32R_VGA_H -/* $Id$ */ - /* * Access to VGA videoram * @@ -19,4 +17,4 @@ #define vga_readb(x) (*(x)) #define vga_writeb(x,y) (*(y) = (x)) -#endif /* _ASM_M32R_VGA_H */ +#endif /* _ASM_M32R_VGA_H */ diff --git a/include/asm-m32r/xor.h b/include/asm-m32r/xor.h index fd960dc9bf76..6d525259df3e 100644 --- a/include/asm-m32r/xor.h +++ b/include/asm-m32r/xor.h @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_XOR_H #define _ASM_M32R_XOR_H -/* $Id$ */ - #include <asm-generic/xor.h> #endif /* _ASM_M32R_XOR_H */ diff --git a/include/asm-m68k/math-emu.h b/include/asm-m68k/math-emu.h index 7ac6259b68df..ddfab96403cb 100644 --- a/include/asm-m68k/math-emu.h +++ b/include/asm-m68k/math-emu.h @@ -226,6 +226,21 @@ extern unsigned int fp_debugprint; .previous .endm +/* work around binutils idiocy */ +old_gas=-1 +.irp gas_ident.x .x +old_gas=old_gas+1 +.endr +.if !old_gas +.irp m b,w,l +.macro getuser.\m src,dest,label,addr + getuser .\m,\src,\dest,\label,\addr +.endm +.macro putuser.\m src,dest,label,addr + putuser .\m,\src,\dest,\label,\addr +.endm +.endr +.endif .macro movestack nr,arg1,arg2,arg3,arg4,arg5 .if \nr diff --git a/include/asm-m68k/termios.h b/include/asm-m68k/termios.h index 857f0c9a9120..00edabd76168 100644 --- a/include/asm-m68k/termios.h +++ b/include/asm-m68k/termios.h @@ -49,24 +49,6 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ /* diff --git a/include/asm-m68k/user.h b/include/asm-m68k/user.h index d7c0b109bd45..8c56ccab4849 100644 --- a/include/asm-m68k/user.h +++ b/include/asm-m68k/user.h @@ -1,8 +1,6 @@ #ifndef _M68K_USER_H #define _M68K_USER_H -#include <asm/page.h> - /* Core file format: The core file is written in such a way that gdb can understand it and provide useful information to the user (under linux we use the 'trad-core' bfd). There are quite a number of diff --git a/include/asm-mips/atomic.h b/include/asm-mips/atomic.h index c1a2409bb52a..8578869a8bcf 100644 --- a/include/asm-mips/atomic.h +++ b/include/asm-mips/atomic.h @@ -69,7 +69,10 @@ static __inline__ void atomic_add(int i, atomic_t * v) "1: ll %0, %1 # atomic_add \n" " addu %0, %2 \n" " sc %0, %1 \n" - " beqz %0, 1b \n" + " beqz %0, 2f \n" + " .subsection 2 \n" + "2: b 1b \n" + " .previous \n" " .set mips0 \n" : "=&r" (temp), "=m" (v->counter) : "Ir" (i), "m" (v->counter)); @@ -111,7 +114,10 @@ static __inline__ void atomic_sub(int i, atomic_t * v) "1: ll %0, %1 # atomic_sub \n" " subu %0, %2 \n" " sc %0, %1 \n" - " beqz %0, 1b \n" + " beqz %0, 2f \n" + " .subsection 2 \n" + "2: b 1b \n" + " .previous \n" " .set mips0 \n" : "=&r" (temp), "=m" (v->counter) : "Ir" (i), "m" (v->counter)); @@ -155,8 +161,11 @@ static __inline__ int atomic_add_return(int i, atomic_t * v) "1: ll %1, %2 # atomic_add_return \n" " addu %0, %1, %3 \n" " sc %0, %2 \n" - " beqz %0, 1b \n" + " beqz %0, 2f \n" " addu %0, %1, %3 \n" + " .subsection 2 \n" + "2: b 1b \n" + " .previous \n" " .set mips0 \n" : "=&r" (result), "=&r" (temp), "=m" (v->counter) : "Ir" (i), "m" (v->counter) @@ -204,8 +213,11 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v) "1: ll %1, %2 # atomic_sub_return \n" " subu %0, %1, %3 \n" " sc %0, %2 \n" - " beqz %0, 1b \n" + " beqz %0, 2f \n" " subu %0, %1, %3 \n" + " .subsection 2 \n" + "2: b 1b \n" + " .previous \n" " .set mips0 \n" : "=&r" (result), "=&r" (temp), "=m" (v->counter) : "Ir" (i), "m" (v->counter) @@ -267,10 +279,13 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) " bltz %0, 1f \n" " sc %0, %2 \n" " .set noreorder \n" - " beqz %0, 1b \n" + " beqz %0, 2f \n" " subu %0, %1, %3 \n" " .set reorder \n" "1: \n" + " .subsection 2 \n" + "2: b 1b \n" + " .previous \n" " .set mips0 \n" : "=&r" (result), "=&r" (temp), "=m" (v->counter) : "Ir" (i), "m" (v->counter) @@ -429,7 +444,10 @@ static __inline__ void atomic64_add(long i, atomic64_t * v) "1: lld %0, %1 # atomic64_add \n" " addu %0, %2 \n" " scd %0, %1 \n" - " beqz %0, 1b \n" + " beqz %0, 2f \n" + " .subsection 2 \n" + "2: b 1b \n" + " .previous \n" " .set mips0 \n" : "=&r" (temp), "=m" (v->counter) : "Ir" (i), "m" (v->counter)); @@ -471,7 +489,10 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v) "1: lld %0, %1 # atomic64_sub \n" " subu %0, %2 \n" " scd %0, %1 \n" - " beqz %0, 1b \n" + " beqz %0, 2f \n" + " .subsection 2 \n" + "2: b 1b \n" + " .previous \n" " .set mips0 \n" : "=&r" (temp), "=m" (v->counter) : "Ir" (i), "m" (v->counter)); @@ -515,8 +536,11 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v) "1: lld %1, %2 # atomic64_add_return \n" " addu %0, %1, %3 \n" " scd %0, %2 \n" - " beqz %0, 1b \n" + " beqz %0, 2f \n" " addu %0, %1, %3 \n" + " .subsection 2 \n" + "2: b 1b \n" + " .previous \n" " .set mips0 \n" : "=&r" (result), "=&r" (temp), "=m" (v->counter) : "Ir" (i), "m" (v->counter) @@ -564,8 +588,11 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v) "1: lld %1, %2 # atomic64_sub_return \n" " subu %0, %1, %3 \n" " scd %0, %2 \n" - " beqz %0, 1b \n" + " beqz %0, 2f \n" " subu %0, %1, %3 \n" + " .subsection 2 \n" + "2: b 1b \n" + " .previous \n" " .set mips0 \n" : "=&r" (result), "=&r" (temp), "=m" (v->counter) : "Ir" (i), "m" (v->counter) @@ -627,10 +654,13 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v) " bltz %0, 1f \n" " scd %0, %2 \n" " .set noreorder \n" - " beqz %0, 1b \n" + " beqz %0, 2f \n" " dsubu %0, %1, %3 \n" " .set reorder \n" "1: \n" + " .subsection 2 \n" + "2: b 1b \n" + " .previous \n" " .set mips0 \n" : "=&r" (result), "=&r" (temp), "=m" (v->counter) : "Ir" (i), "m" (v->counter) diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index 06445de1324b..06c08228a525 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h @@ -68,7 +68,10 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr) "1: " __LL "%0, %1 # set_bit \n" " or %0, %2 \n" " " __SC "%0, %1 \n" - " beqz %0, 1b \n" + " beqz %0, 2f \n" + " .subsection 2 \n" + "2: b 1b \n" + " .previous \n" " .set mips0 \n" : "=&r" (temp), "=m" (*m) : "ir" (1UL << (nr & SZLONG_MASK)), "m" (*m)); @@ -116,7 +119,10 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr) "1: " __LL "%0, %1 # clear_bit \n" " and %0, %2 \n" " " __SC "%0, %1 \n" - " beqz %0, 1b \n" + " beqz %0, 2f \n" + " .subsection 2 \n" + "2: b 1b \n" + " .previous \n" " .set mips0 \n" : "=&r" (temp), "=m" (*m) : "ir" (~(1UL << (nr & SZLONG_MASK))), "m" (*m)); @@ -166,7 +172,10 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr) "1: " __LL "%0, %1 # change_bit \n" " xor %0, %2 \n" " " __SC "%0, %1 \n" - " beqz %0, 1b \n" + " beqz %0, 2f \n" + " .subsection 2 \n" + "2: b 1b \n" + " .previous \n" " .set mips0 \n" : "=&r" (temp), "=m" (*m) : "ir" (1UL << (nr & SZLONG_MASK)), "m" (*m)); @@ -222,8 +231,12 @@ static inline int test_and_set_bit(unsigned long nr, "1: " __LL "%0, %1 # test_and_set_bit \n" " or %2, %0, %3 \n" " " __SC "%2, %1 \n" - " beqz %2, 1b \n" + " beqz %2, 2f \n" " and %2, %0, %3 \n" + " .subsection 2 \n" + "2: b 1b \n" + " nop \n" + " .previous \n" " .set pop \n" : "=&r" (temp), "=m" (*m), "=&r" (res) : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m) @@ -290,8 +303,12 @@ static inline int test_and_clear_bit(unsigned long nr, " or %2, %0, %3 \n" " xor %2, %3 \n" " " __SC "%2, %1 \n" - " beqz %2, 1b \n" + " beqz %2, 2f \n" " and %2, %0, %3 \n" + " .subsection 2 \n" + "2: b 1b \n" + " nop \n" + " .previous \n" " .set pop \n" : "=&r" (temp), "=m" (*m), "=&r" (res) : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m) @@ -356,8 +373,12 @@ static inline int test_and_change_bit(unsigned long nr, "1: " __LL "%0, %1 # test_and_change_bit \n" " xor %2, %0, %3 \n" " " __SC "\t%2, %1 \n" - " beqz %2, 1b \n" + " beqz %2, 2f \n" " and %2, %0, %3 \n" + " .subsection 2 \n" + "2: b 1b \n" + " nop \n" + " .previous \n" " .set pop \n" : "=&r" (temp), "=m" (*m), "=&r" (res) : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m) diff --git a/include/asm-mips/compat-signal.h b/include/asm-mips/compat-signal.h new file mode 100644 index 000000000000..672077084aa1 --- /dev/null +++ b/include/asm-mips/compat-signal.h @@ -0,0 +1,55 @@ +#ifndef __ASM_COMPAT_SIGNAL_H +#define __ASM_COMPAT_SIGNAL_H + +#include <linux/bug.h> +#include <linux/compat.h> +#include <linux/compiler.h> + +static inline int __copy_conv_sigset_to_user(compat_sigset_t __user *d, + const sigset_t *s) +{ + int err; + + BUG_ON(sizeof(*d) != sizeof(*s)); + BUG_ON(_NSIG_WORDS != 2); + + err = __put_user(s->sig[0], &d->sig[0]); + err |= __put_user(s->sig[0] >> 32, &d->sig[1]); + err |= __put_user(s->sig[1], &d->sig[2]); + err |= __put_user(s->sig[1] >> 32, &d->sig[3]); + + return err; +} + +static inline int __copy_conv_sigset_from_user(sigset_t *d, + const compat_sigset_t __user *s) +{ + int err; + union sigset_u { + sigset_t s; + compat_sigset_t c; + } *u = (union sigset_u *) d; + + BUG_ON(sizeof(*d) != sizeof(*s)); + BUG_ON(_NSIG_WORDS != 2); + + if (unlikely(!access_ok(VERIFY_READ, d, sizeof(*d)))) + return -EFAULT; + +#ifdef CONFIG_CPU_BIG_ENDIAN + err = __get_user(u->c.sig[1], &s->sig[0]); + err |= __get_user(u->c.sig[0], &s->sig[1]); + err |= __get_user(u->c.sig[3], &s->sig[2]); + err |= __get_user(u->c.sig[2], &s->sig[3]); +#endif +#ifdef CONFIG_CPU_LITTLE_ENDIAN + err = __get_user(u->c.sig[0], &s->sig[0]); + err |= __get_user(u->c.sig[1], &s->sig[1]); + err |= __get_user(u->c.sig[2], &s->sig[2]); + err |= __get_user(u->c.sig[3], &s->sig[3]); +#endif + + return err; +} + +#endif /* __ASM_COMPAT_SIGNAL_H */ diff --git a/include/asm-mips/dma-mapping.h b/include/asm-mips/dma-mapping.h index 236d1a467cc7..230b3f1b69b1 100644 --- a/include/asm-mips/dma-mapping.h +++ b/include/asm-mips/dma-mapping.h @@ -68,6 +68,7 @@ extern int dma_is_consistent(struct device *dev, dma_addr_t dma_addr); extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, enum dma_data_direction direction); +#if 0 #define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY extern int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, @@ -75,5 +76,6 @@ extern int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, extern void dma_release_declared_memory(struct device *dev); extern void * dma_mark_declared_memory_occupied(struct device *dev, dma_addr_t device_addr, size_t size); +#endif #endif /* _ASM_DMA_MAPPING_H */ diff --git a/include/asm-mips/mach-generic/dma-coherence.h b/include/asm-mips/mach-generic/dma-coherence.h new file mode 100644 index 000000000000..df71822fd27b --- /dev/null +++ b/include/asm-mips/mach-generic/dma-coherence.h @@ -0,0 +1,43 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> + * + */ +#ifndef __ASM_MACH_GENERIC_DMA_COHERENCE_H +#define __ASM_MACH_GENERIC_DMA_COHERENCE_H + +struct device; + +static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) +{ + return virt_to_phys(addr); +} + +static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page) +{ + return page_to_phys(page); +} + +static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) +{ + return dma_addr; +} + +static void plat_unmap_dma_mem(dma_addr_t dma_addr) +{ +} + +static inline int plat_device_is_coherent(struct device *dev) +{ +#ifdef CONFIG_DMA_COHERENT + return 1; +#endif +#ifdef CONFIG_DMA_NONCOHERENT + return 0; +#endif +} + +#endif /* __ASM_MACH_GENERIC_DMA_COHERENCE_H */ diff --git a/include/asm-mips/mach-generic/kmalloc.h b/include/asm-mips/mach-generic/kmalloc.h index 410ab5f6c563..b8e6deba352f 100644 --- a/include/asm-mips/mach-generic/kmalloc.h +++ b/include/asm-mips/mach-generic/kmalloc.h @@ -5,6 +5,7 @@ #ifndef CONFIG_DMA_COHERENT /* * Total overkill for most systems but need as a safe default. + * Set this one if any device in the system might do non-coherent DMA. */ #define ARCH_KMALLOC_MINALIGN 128 #endif diff --git a/include/asm-mips/mach-ip27/dma-coherence.h b/include/asm-mips/mach-ip27/dma-coherence.h new file mode 100644 index 000000000000..659816e200d4 --- /dev/null +++ b/include/asm-mips/mach-ip27/dma-coherence.h @@ -0,0 +1,49 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> + * + */ +#ifndef __ASM_MACH_IP27_DMA_COHERENCE_H +#define __ASM_MACH_IP27_DMA_COHERENCE_H + +#include <asm/pci/bridge.h> + +#define pdev_to_baddr(pdev, addr) \ + (BRIDGE_CONTROLLER(pdev->bus)->baddr + (addr)) +#define dev_to_baddr(dev, addr) \ + pdev_to_baddr(to_pci_dev(dev), (addr)) + +struct device; + +static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) +{ + dma_addr_t pa = dev_to_baddr(dev, virt_to_phys(addr)); + + return pa; +} + +static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page) +{ + dma_addr_t pa = dev_to_baddr(dev, page_to_phys(page)); + + return pa; +} + +static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) +{ + return dma_addr & (0xffUL << 56); +} + +static void plat_unmap_dma_mem(dma_addr_t dma_addr) +{ +} + +static inline int plat_device_is_coherent(struct device *dev) +{ + return 1; /* IP27 non-cohernet mode is unsupported */ +} + +#endif /* __ASM_MACH_IP27_DMA_COHERENCE_H */ diff --git a/include/asm-mips/mach-ip32/dma-coherence.h b/include/asm-mips/mach-ip32/dma-coherence.h new file mode 100644 index 000000000000..950be17bbb86 --- /dev/null +++ b/include/asm-mips/mach-ip32/dma-coherence.h @@ -0,0 +1,71 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> + * + */ +#ifndef __ASM_MACH_IP35_DMA_COHERENCE_H +#define __ASM_MACH_IP35_DMA_COHERENCE_H + +#include <asm/ip32/crime.h> + +struct device; + +/* + * Few notes. + * 1. CPU sees memory as two chunks: 0-256M@0x0, and the rest @0x40000000+256M + * 2. PCI sees memory as one big chunk @0x0 (or we could use 0x40000000 for + * native-endian) + * 3. All other devices see memory as one big chunk at 0x40000000 + * 4. Non-PCI devices will pass NULL as struct device* + * + * Thus we translate differently, depending on device. + */ + +#define RAM_OFFSET_MASK 0x3fffffffUL + +static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) +{ + dma_addr_t pa = virt_to_phys(addr) & RAM_OFFSET_MASK; + + if (dev == NULL) + pa += CRIME_HI_MEM_BASE; + + return pa; +} + +static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page) +{ + dma_addr_t pa; + + pa = page_to_phys(page) & RAM_OFFSET_MASK; + + if (dev == NULL) + pa += CRIME_HI_MEM_BASE; + + return pa; +} + +/* This is almost certainly wrong but it's what dma-ip32.c used to use */ +static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) +{ + unsigned long addr = dma_addr & RAM_OFFSET_MASK; + + if (dma_addr >= 256*1024*1024) + addr += CRIME_HI_MEM_BASE; + + return addr; +} + +static void plat_unmap_dma_mem(dma_addr_t dma_addr) +{ +} + +static inline int plat_device_is_coherent(struct device *dev) +{ + return 0; /* IP32 is non-cohernet */ +} + +#endif /* __ASM_MACH_IP35_DMA_COHERENCE_H */ diff --git a/include/asm-mips/mach-jazz/dma-coherence.h b/include/asm-mips/mach-jazz/dma-coherence.h new file mode 100644 index 000000000000..d66979a124a8 --- /dev/null +++ b/include/asm-mips/mach-jazz/dma-coherence.h @@ -0,0 +1,40 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> + */ +#ifndef __ASM_MACH_JAZZ_DMA_COHERENCE_H +#define __ASM_MACH_JAZZ_DMA_COHERENCE_H + +#include <asm/jazzdma.h> + +struct device; + +static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) +{ + return vdma_alloc(virt_to_phys(addr), size); +} + +static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page) +{ + return vdma_alloc(page_to_phys(page), PAGE_SIZE); +} + +static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) +{ + return vdma_log2phys(dma_addr); +} + +static void plat_unmap_dma_mem(dma_addr_t dma_addr) +{ + vdma_free(dma_addr); +} + +static inline int plat_device_is_coherent(struct device *dev) +{ + return 0; +} + +#endif /* __ASM_MACH_JAZZ_DMA_COHERENCE_H */ diff --git a/include/asm-mips/mips_mt.h b/include/asm-mips/mips_mt.h index c31a312b9783..fdfff0b8ce42 100644 --- a/include/asm-mips/mips_mt.h +++ b/include/asm-mips/mips_mt.h @@ -12,4 +12,7 @@ extern unsigned long mt_fpemul_threshold; extern void mips_mt_regdump(unsigned long previous_mvpcontrol_value); extern void mips_mt_set_cpuoptions(void); +struct class; +extern struct class *mt_class; + #endif /* __ASM_MIPS_MT_H */ diff --git a/include/asm-mips/mman.h b/include/asm-mips/mman.h index 046cf686bee7..e4d6f1fb1cf7 100644 --- a/include/asm-mips/mman.h +++ b/include/asm-mips/mman.h @@ -72,7 +72,6 @@ #define MADV_DOFORK 11 /* do inherit across fork */ /* compatibility flags */ -#define MAP_ANON MAP_ANONYMOUS #define MAP_FILE 0 #endif /* _ASM_MMAN_H */ diff --git a/include/asm-mips/sigcontext.h b/include/asm-mips/sigcontext.h index cefa657dd04a..3c175a7e4345 100644 --- a/include/asm-mips/sigcontext.h +++ b/include/asm-mips/sigcontext.h @@ -19,7 +19,7 @@ */ struct sigcontext { unsigned int sc_regmask; /* Unused */ - unsigned int sc_status; + unsigned int sc_status; /* Unused */ unsigned long long sc_pc; unsigned long long sc_regs[32]; unsigned long long sc_fpregs[32]; @@ -76,7 +76,7 @@ struct sigcontext { struct sigcontext32 { __u32 sc_regmask; /* Unused */ - __u32 sc_status; + __u32 sc_status; /* Unused */ __u64 sc_pc; __u64 sc_regs[32]; __u64 sc_fpregs[32]; diff --git a/include/asm-mips/spinlock.h b/include/asm-mips/spinlock.h index fc3217fc1118..f1755d28a36a 100644 --- a/include/asm-mips/spinlock.h +++ b/include/asm-mips/spinlock.h @@ -3,7 +3,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 1999, 2000, 06 by Ralf Baechle + * Copyright (C) 1999, 2000, 06 Ralf Baechle (ralf@linux-mips.org) * Copyright (C) 1999, 2000 Silicon Graphics, Inc. */ #ifndef _ASM_SPINLOCK_H @@ -49,11 +49,18 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock) __asm__ __volatile__( " .set noreorder # __raw_spin_lock \n" "1: ll %1, %2 \n" - " bnez %1, 1b \n" + " bnez %1, 2f \n" " li %1, 1 \n" " sc %1, %0 \n" - " beqz %1, 1b \n" + " beqz %1, 2f \n" " nop \n" + " .subsection 2 \n" + "2: ll %1, %2 \n" + " bnez %1, 2b \n" + " li %1, 1 \n" + " b 1b \n" + " nop \n" + " .previous \n" " .set reorder \n" : "=m" (lock->lock), "=&r" (tmp) : "m" (lock->lock) @@ -99,8 +106,12 @@ static inline unsigned int __raw_spin_trylock(raw_spinlock_t *lock) "1: ll %0, %3 \n" " ori %2, %0, 1 \n" " sc %2, %1 \n" - " beqz %2, 1b \n" + " beqz %2, 2f \n" " andi %2, %0, 1 \n" + " .subsection 2 \n" + "2: b 1b \n" + " nop \n" + " .previous \n" " .set reorder" : "=&r" (temp), "=m" (lock->lock), "=&r" (res) : "m" (lock->lock) @@ -154,11 +165,18 @@ static inline void __raw_read_lock(raw_rwlock_t *rw) __asm__ __volatile__( " .set noreorder # __raw_read_lock \n" "1: ll %1, %2 \n" - " bltz %1, 1b \n" + " bltz %1, 2f \n" " addu %1, 1 \n" " sc %1, %0 \n" " beqz %1, 1b \n" " nop \n" + " .subsection 2 \n" + "2: ll %1, %2 \n" + " bltz %1, 2b \n" + " addu %1, 1 \n" + " b 1b \n" + " nop \n" + " .previous \n" " .set reorder \n" : "=m" (rw->lock), "=&r" (tmp) : "m" (rw->lock) @@ -192,8 +210,12 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw) "1: ll %1, %2 \n" " sub %1, 1 \n" " sc %1, %0 \n" - " beqz %1, 1b \n" + " beqz %1, 2f \n" + " nop \n" + " .subsection 2 \n" + "2: b 1b \n" " nop \n" + " .previous \n" " .set reorder \n" : "=m" (rw->lock), "=&r" (tmp) : "m" (rw->lock) @@ -222,11 +244,18 @@ static inline void __raw_write_lock(raw_rwlock_t *rw) __asm__ __volatile__( " .set noreorder # __raw_write_lock \n" "1: ll %1, %2 \n" - " bnez %1, 1b \n" + " bnez %1, 2f \n" " lui %1, 0x8000 \n" " sc %1, %0 \n" - " beqz %1, 1b \n" + " beqz %1, 2f \n" + " nop \n" + " .subsection 2 \n" + "2: ll %1, %2 \n" + " bnez %1, 2b \n" + " lui %1, 0x8000 \n" + " b 1b \n" " nop \n" + " .previous \n" " .set reorder \n" : "=m" (rw->lock), "=&r" (tmp) : "m" (rw->lock) @@ -322,12 +351,15 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw) " bnez %1, 2f \n" " lui %1, 0x8000 \n" " sc %1, %0 \n" - " beqz %1, 1b \n" - " nop \n" + " beqz %1, 3f \n" + " li %2, 1 \n" + "2: \n" __WEAK_ORDERING_MB - " li %2, 1 \n" + " .subsection 2 \n" + "3: b 1b \n" + " li %2, 0 \n" + " .previous \n" " .set reorder \n" - "2: \n" : "=m" (rw->lock), "=&r" (tmp), "=&r" (ret) : "m" (rw->lock) : "memory"); diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index 5e1289c85ed9..597a3743f6a1 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h @@ -110,7 +110,10 @@ static inline unsigned long __xchg_u32(volatile int * m, unsigned int val) " move %2, %z4 \n" " .set mips3 \n" " sc %2, %1 \n" - " beqz %2, 1b \n" + " beqz %2, 2f \n" + " .subsection 2 \n" + "2: b 1b \n" + " .previous \n" " .set mips0 \n" : "=&r" (retval), "=m" (*m), "=&r" (dummy) : "R" (*m), "Jr" (val) @@ -155,7 +158,10 @@ static inline __u64 __xchg_u64(volatile __u64 * m, __u64 val) "1: lld %0, %3 # xchg_u64 \n" " move %2, %z4 \n" " scd %2, %1 \n" - " beqz %2, 1b \n" + " beqz %2, 2f \n" + " .subsection 2 \n" + "2: b 1b \n" + " .previous \n" " .set mips0 \n" : "=&r" (retval), "=m" (*m), "=&r" (dummy) : "R" (*m), "Jr" (val) @@ -232,8 +238,11 @@ static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old, " move $1, %z4 \n" " .set mips3 \n" " sc $1, %1 \n" - " beqz $1, 1b \n" + " beqz $1, 3f \n" "2: \n" + " .subsection 2 \n" + "3: b 1b \n" + " .previous \n" " .set pop \n" : "=&r" (retval), "=R" (*m) : "R" (*m), "Jr" (old), "Jr" (new) @@ -283,8 +292,11 @@ static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old, " bne %0, %z3, 2f \n" " move $1, %z4 \n" " scd $1, %1 \n" - " beqz $1, 1b \n" + " beqz $1, 3f \n" "2: \n" + " .subsection 2 \n" + "3: b 1b \n" + " .previous \n" " .set pop \n" : "=&r" (retval), "=R" (*m) : "R" (*m), "Jr" (old), "Jr" (new) diff --git a/include/asm-mips/termios.h b/include/asm-mips/termios.h index 4906204d34fe..2ce07f4be369 100644 --- a/include/asm-mips/termios.h +++ b/include/asm-mips/termios.h @@ -87,24 +87,6 @@ struct termio { #define TIOCM_OUT2 0x4000 #define TIOCM_LOOP 0x8000 -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved fo Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ #include <linux/string.h> diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h index c12ebc53ef31..3eff8d8fe28a 100644 --- a/include/asm-mips/uaccess.h +++ b/include/asm-mips/uaccess.h @@ -265,12 +265,14 @@ do { \ */ #define __get_user_asm_ll32(val, addr) \ { \ - unsigned long long __gu_tmp; \ + union { \ + unsigned long long l; \ + __typeof__(*(addr)) t; \ + } __gu_tmp; \ \ __asm__ __volatile__( \ "1: lw %1, (%3) \n" \ "2: lw %D1, 4(%3) \n" \ - " move %0, $0 \n" \ "3: .section .fixup,\"ax\" \n" \ "4: li %0, %4 \n" \ " move %1, $0 \n" \ @@ -281,9 +283,10 @@ do { \ " " __UA_ADDR " 1b, 4b \n" \ " " __UA_ADDR " 2b, 4b \n" \ " .previous \n" \ - : "=r" (__gu_err), "=&r" (__gu_tmp) \ + : "=r" (__gu_err), "=&r" (__gu_tmp.l) \ : "0" (0), "r" (addr), "i" (-EFAULT)); \ - (val) = (__typeof__(*(addr))) __gu_tmp; \ + \ + (val) = __gu_tmp.t; \ } /* diff --git a/include/asm-parisc/mman.h b/include/asm-parisc/mman.h index 0ef15ee0f17e..defe752cc996 100644 --- a/include/asm-parisc/mman.h +++ b/include/asm-parisc/mman.h @@ -55,7 +55,6 @@ #define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */ /* compatibility flags */ -#define MAP_ANON MAP_ANONYMOUS #define MAP_FILE 0 #define MAP_VARIABLE 0 diff --git a/include/asm-parisc/termios.h b/include/asm-parisc/termios.h index 6965e8f6c3e1..5345b3420475 100644 --- a/include/asm-parisc/termios.h +++ b/include/asm-parisc/termios.h @@ -39,24 +39,6 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ /* intr=^C quit=^\ erase=del kill=^U diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild index 703970fb0ec0..4869513b872f 100644 --- a/include/asm-powerpc/Kbuild +++ b/include/asm-powerpc/Kbuild @@ -23,6 +23,7 @@ header-y += linkage.h header-y += resource.h header-y += sigcontext.h header-y += statfs.h +header-y += ps3fb.h unifdef-y += a.out.h unifdef-y += asm-compat.h diff --git a/include/asm-powerpc/cell-pmu.h b/include/asm-powerpc/cell-pmu.h index e8c2ebd3ddda..35b95773746c 100644 --- a/include/asm-powerpc/cell-pmu.h +++ b/include/asm-powerpc/cell-pmu.h @@ -53,6 +53,11 @@ #define CBE_PM_CTR_POLARITY 0x01000000 #define CBE_PM_CTR_COUNT_CYCLES 0x00800000 #define CBE_PM_CTR_ENABLE 0x00400000 +#define PM07_CTR_INPUT_MUX(x) (((x) & 0x3F) << 26) +#define PM07_CTR_INPUT_CONTROL(x) (((x) & 1) << 25) +#define PM07_CTR_POLARITY(x) (((x) & 1) << 24) +#define PM07_CTR_COUNT_CYCLES(x) (((x) & 1) << 23) +#define PM07_CTR_ENABLE(x) (((x) & 1) << 22) /* Macros for the pm_status register. */ #define CBE_PM_CTR_OVERFLOW_INTR(ctr) (1 << (31 - ((ctr) & 7))) @@ -89,8 +94,7 @@ extern void cbe_read_trace_buffer(u32 cpu, u64 *buf); extern void cbe_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask); extern void cbe_disable_pm_interrupts(u32 cpu); -extern u32 cbe_query_pm_interrupts(u32 cpu); -extern u32 cbe_clear_pm_interrupts(u32 cpu); +extern u32 cbe_get_and_clear_pm_interrupts(u32 cpu); extern void cbe_sync_irq(int node); /* Utility functions, macros */ @@ -103,11 +107,4 @@ extern u32 cbe_get_hw_thread_id(int cpu); #define CBE_COUNT_PROBLEM_MODE 2 #define CBE_COUNT_ALL_MODES 3 -/* Macros for the pm07_control registers. */ -#define PM07_CTR_INPUT_MUX(x) (((x) & 0x3F) << 26) -#define PM07_CTR_INPUT_CONTROL(x) (((x) & 1) << 25) -#define PM07_CTR_POLARITY(x) (((x) & 1) << 24) -#define PM07_CTR_COUNT_CYCLES(x) (((x) & 1) << 23) -#define PM07_CTR_ENABLE(x) (((x) & 1) << 22) - #endif /* __ASM_CELL_PMU_H__ */ diff --git a/include/asm-powerpc/floppy.h b/include/asm-powerpc/floppy.h index fd242a22331c..a0f14eea1da5 100644 --- a/include/asm-powerpc/floppy.h +++ b/include/asm-powerpc/floppy.h @@ -17,28 +17,115 @@ #define fd_outb(value,port) outb_p(value,port) #define fd_enable_dma() enable_dma(FLOPPY_DMA) -#define fd_disable_dma() disable_dma(FLOPPY_DMA) -#define fd_request_dma() request_dma(FLOPPY_DMA, "floppy") -#define fd_free_dma() free_dma(FLOPPY_DMA) +#define fd_disable_dma() fd_ops->_disable_dma(FLOPPY_DMA) +#define fd_free_dma() fd_ops->_free_dma(FLOPPY_DMA) #define fd_clear_dma_ff() clear_dma_ff(FLOPPY_DMA) #define fd_set_dma_mode(mode) set_dma_mode(FLOPPY_DMA, mode) #define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA, count) +#define fd_get_dma_residue() fd_ops->_get_dma_residue(FLOPPY_DMA) #define fd_enable_irq() enable_irq(FLOPPY_IRQ) #define fd_disable_irq() disable_irq(FLOPPY_IRQ) #define fd_cacheflush(addr,size) /* nothing */ -#define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt, \ - IRQF_DISABLED, "floppy", NULL) #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); -#ifdef CONFIG_PCI - #include <linux/pci.h> #include <asm/ppc-pci.h> /* for ppc64_isabridge_dev */ -#define fd_dma_setup(addr,size,mode,io) powerpc_fd_dma_setup(addr,size,mode,io) +#define fd_dma_setup(addr,size,mode,io) fd_ops->_dma_setup(addr,size,mode,io) + +static int fd_request_dma(void); + +struct fd_dma_ops { + void (*_disable_dma)(unsigned int dmanr); + void (*_free_dma)(unsigned int dmanr); + int (*_get_dma_residue)(unsigned int dummy); + int (*_dma_setup)(char *addr, unsigned long size, int mode, int io); +}; + +static int virtual_dma_count; +static int virtual_dma_residue; +static char *virtual_dma_addr; +static int virtual_dma_mode; +static int doing_vdma; +static struct fd_dma_ops *fd_ops; + +static irqreturn_t floppy_hardint(int irq, void *dev_id) +{ + unsigned char st; + int lcount; + char *lptr; + + if (!doing_vdma) + return floppy_interrupt(irq, dev_id); + + + st = 1; + for (lcount=virtual_dma_count, lptr=virtual_dma_addr; + lcount; lcount--, lptr++) { + st=inb(virtual_dma_port+4) & 0xa0 ; + if (st != 0xa0) + break; + if (virtual_dma_mode) + outb_p(*lptr, virtual_dma_port+5); + else + *lptr = inb_p(virtual_dma_port+5); + } + virtual_dma_count = lcount; + virtual_dma_addr = lptr; + st = inb(virtual_dma_port+4); + + if (st == 0x20) + return IRQ_HANDLED; + if (!(st & 0x20)) { + virtual_dma_residue += virtual_dma_count; + virtual_dma_count=0; + doing_vdma = 0; + floppy_interrupt(irq, dev_id); + return IRQ_HANDLED; + } + return IRQ_HANDLED; +} -static __inline__ int powerpc_fd_dma_setup(char *addr, unsigned long size, - int mode, int io) +static void vdma_disable_dma(unsigned int dummy) +{ + doing_vdma = 0; + virtual_dma_residue += virtual_dma_count; + virtual_dma_count=0; +} + +static void vdma_nop(unsigned int dummy) +{ +} + + +static int vdma_get_dma_residue(unsigned int dummy) +{ + return virtual_dma_count + virtual_dma_residue; +} + + +static int fd_request_irq(void) +{ + if (can_use_virtual_dma) + return request_irq(FLOPPY_IRQ, floppy_hardint, + IRQF_DISABLED, "floppy", NULL); + else + return request_irq(FLOPPY_IRQ, floppy_interrupt, + IRQF_DISABLED, "floppy", NULL); +} + +static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io) +{ + doing_vdma = 1; + virtual_dma_port = io; + virtual_dma_mode = (mode == DMA_MODE_WRITE); + virtual_dma_addr = addr; + virtual_dma_count = size; + virtual_dma_residue = 0; + return 0; +} + +static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) { static unsigned long prev_size; static dma_addr_t bus_addr = 0; @@ -46,6 +133,7 @@ static __inline__ int powerpc_fd_dma_setup(char *addr, unsigned long size, static int prev_dir; int dir; + doing_vdma = 0; dir = (mode == DMA_MODE_READ) ? PCI_DMA_FROMDEVICE : PCI_DMA_TODEVICE; if (bus_addr @@ -74,11 +162,32 @@ static __inline__ int powerpc_fd_dma_setup(char *addr, unsigned long size, return 0; } -#endif /* CONFIG_PCI */ +static struct fd_dma_ops real_dma_ops = +{ + ._disable_dma = disable_dma, + ._free_dma = free_dma, + ._get_dma_residue = get_dma_residue, + ._dma_setup = hard_dma_setup +}; + +static struct fd_dma_ops virt_dma_ops = +{ + ._disable_dma = vdma_disable_dma, + ._free_dma = vdma_nop, + ._get_dma_residue = vdma_get_dma_residue, + ._dma_setup = vdma_dma_setup +}; -__inline__ void virtual_dma_init(void) +static int fd_request_dma() { - /* Nothing to do on PowerPC */ + if (can_use_virtual_dma & 1) { + fd_ops = &virt_dma_ops; + return 0; + } + else { + fd_ops = &real_dma_ops; + return request_dma(FLOPPY_DMA, "floppy"); + } } static int FDC1 = 0x3f0; diff --git a/include/asm-powerpc/ps3.h b/include/asm-powerpc/ps3.h index 4f5a1e01fdac..e5982ad46576 100644 --- a/include/asm-powerpc/ps3.h +++ b/include/asm-powerpc/ps3.h @@ -388,4 +388,13 @@ struct ps3_vuart_port_device { int ps3_vuart_port_device_register(struct ps3_vuart_port_device *dev); +struct ps3_prealloc { + const char *name; + void *address; + unsigned long size; + unsigned long align; +}; + +extern struct ps3_prealloc ps3fb_videomemory; + #endif diff --git a/include/asm-powerpc/ps3av.h b/include/asm-powerpc/ps3av.h new file mode 100644 index 000000000000..43e90ea96136 --- /dev/null +++ b/include/asm-powerpc/ps3av.h @@ -0,0 +1,738 @@ +/* + * Copyright (C) 2006 Sony Computer Entertainment Inc. + * Copyright 2006, 2007 Sony Corporation + * + * 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; version 2 of the License. + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +#ifndef _ASM_POWERPC_PS3AV_H_ +#define _ASM_POWERPC_PS3AV_H_ + +#include <linux/mutex.h> + +/** command for ioctl() **/ +#define PS3AV_VERSION 0x205 /* version of ps3av command */ + +#define PS3AV_CID_AV_INIT 0x00000001 +#define PS3AV_CID_AV_FIN 0x00000002 +#define PS3AV_CID_AV_GET_HW_CONF 0x00000003 +#define PS3AV_CID_AV_GET_MONITOR_INFO 0x00000004 +#define PS3AV_CID_AV_ENABLE_EVENT 0x00000006 +#define PS3AV_CID_AV_DISABLE_EVENT 0x00000007 +#define PS3AV_CID_AV_TV_MUTE 0x0000000a + +#define PS3AV_CID_AV_VIDEO_CS 0x00010001 +#define PS3AV_CID_AV_VIDEO_MUTE 0x00010002 +#define PS3AV_CID_AV_VIDEO_DISABLE_SIG 0x00010003 +#define PS3AV_CID_AV_AUDIO_PARAM 0x00020001 +#define PS3AV_CID_AV_AUDIO_MUTE 0x00020002 +#define PS3AV_CID_AV_HDMI_MODE 0x00040001 + +#define PS3AV_CID_VIDEO_INIT 0x01000001 +#define PS3AV_CID_VIDEO_MODE 0x01000002 +#define PS3AV_CID_VIDEO_FORMAT 0x01000004 +#define PS3AV_CID_VIDEO_PITCH 0x01000005 + +#define PS3AV_CID_AUDIO_INIT 0x02000001 +#define PS3AV_CID_AUDIO_MODE 0x02000002 +#define PS3AV_CID_AUDIO_MUTE 0x02000003 +#define PS3AV_CID_AUDIO_ACTIVE 0x02000004 +#define PS3AV_CID_AUDIO_INACTIVE 0x02000005 +#define PS3AV_CID_AUDIO_SPDIF_BIT 0x02000006 +#define PS3AV_CID_AUDIO_CTRL 0x02000007 + +#define PS3AV_CID_EVENT_UNPLUGGED 0x10000001 +#define PS3AV_CID_EVENT_PLUGGED 0x10000002 +#define PS3AV_CID_EVENT_HDCP_DONE 0x10000003 +#define PS3AV_CID_EVENT_HDCP_FAIL 0x10000004 +#define PS3AV_CID_EVENT_HDCP_AUTH 0x10000005 +#define PS3AV_CID_EVENT_HDCP_ERROR 0x10000006 + +#define PS3AV_CID_AVB_PARAM 0x04000001 + +/* max backend ports */ +#define PS3AV_HDMI_MAX 2 /* HDMI_0 HDMI_1 */ +#define PS3AV_AVMULTI_MAX 1 /* AVMULTI_0 */ +#define PS3AV_AV_PORT_MAX (PS3AV_HDMI_MAX + PS3AV_AVMULTI_MAX) +#define PS3AV_OPT_PORT_MAX 1 /* SPDIF0 */ +#define PS3AV_HEAD_MAX 2 /* HEAD_A HEAD_B */ + +/* num of pkt for PS3AV_CID_AVB_PARAM */ +#define PS3AV_AVB_NUM_VIDEO PS3AV_HEAD_MAX +#define PS3AV_AVB_NUM_AUDIO 0 /* not supported */ +#define PS3AV_AVB_NUM_AV_VIDEO PS3AV_AV_PORT_MAX +#define PS3AV_AVB_NUM_AV_AUDIO PS3AV_HDMI_MAX + +#define PS3AV_MUTE_PORT_MAX 1 /* num of ports in mute pkt */ + +/* event_bit */ +#define PS3AV_CMD_EVENT_BIT_UNPLUGGED (1 << 0) +#define PS3AV_CMD_EVENT_BIT_PLUGGED (1 << 1) +#define PS3AV_CMD_EVENT_BIT_HDCP_DONE (1 << 2) +#define PS3AV_CMD_EVENT_BIT_HDCP_FAIL (1 << 3) +#define PS3AV_CMD_EVENT_BIT_HDCP_REAUTH (1 << 4) +#define PS3AV_CMD_EVENT_BIT_HDCP_TOPOLOGY (1 << 5) + +/* common params */ +/* mute */ +#define PS3AV_CMD_MUTE_OFF 0x0000 +#define PS3AV_CMD_MUTE_ON 0x0001 +/* avport */ +#define PS3AV_CMD_AVPORT_HDMI_0 0x0000 +#define PS3AV_CMD_AVPORT_HDMI_1 0x0001 +#define PS3AV_CMD_AVPORT_AVMULTI_0 0x0010 +#define PS3AV_CMD_AVPORT_SPDIF_0 0x0020 +#define PS3AV_CMD_AVPORT_SPDIF_1 0x0021 + +/* for av backend */ +/* av_mclk */ +#define PS3AV_CMD_AV_MCLK_128 0x0000 +#define PS3AV_CMD_AV_MCLK_256 0x0001 +#define PS3AV_CMD_AV_MCLK_512 0x0003 +/* av_inputlen */ +#define PS3AV_CMD_AV_INPUTLEN_16 0x02 +#define PS3AV_CMD_AV_INPUTLEN_20 0x0a +#define PS3AV_CMD_AV_INPUTLEN_24 0x0b +/* alayout */ +#define PS3AV_CMD_AV_LAYOUT_32 (1 << 0) +#define PS3AV_CMD_AV_LAYOUT_44 (1 << 1) +#define PS3AV_CMD_AV_LAYOUT_48 (1 << 2) +#define PS3AV_CMD_AV_LAYOUT_88 (1 << 3) +#define PS3AV_CMD_AV_LAYOUT_96 (1 << 4) +#define PS3AV_CMD_AV_LAYOUT_176 (1 << 5) +#define PS3AV_CMD_AV_LAYOUT_192 (1 << 6) +/* hdmi_mode */ +#define PS3AV_CMD_AV_HDMI_MODE_NORMAL 0xff +#define PS3AV_CMD_AV_HDMI_HDCP_OFF 0x01 +#define PS3AV_CMD_AV_HDMI_EDID_PASS 0x80 +#define PS3AV_CMD_AV_HDMI_DVI 0x40 + +/* for video module */ +/* video_head */ +#define PS3AV_CMD_VIDEO_HEAD_A 0x0000 +#define PS3AV_CMD_VIDEO_HEAD_B 0x0001 +/* video_cs_out video_cs_in */ +#define PS3AV_CMD_VIDEO_CS_NONE 0x0000 +#define PS3AV_CMD_VIDEO_CS_RGB_8 0x0001 +#define PS3AV_CMD_VIDEO_CS_YUV444_8 0x0002 +#define PS3AV_CMD_VIDEO_CS_YUV422_8 0x0003 +#define PS3AV_CMD_VIDEO_CS_XVYCC_8 0x0004 +#define PS3AV_CMD_VIDEO_CS_RGB_10 0x0005 +#define PS3AV_CMD_VIDEO_CS_YUV444_10 0x0006 +#define PS3AV_CMD_VIDEO_CS_YUV422_10 0x0007 +#define PS3AV_CMD_VIDEO_CS_XVYCC_10 0x0008 +#define PS3AV_CMD_VIDEO_CS_RGB_12 0x0009 +#define PS3AV_CMD_VIDEO_CS_YUV444_12 0x000a +#define PS3AV_CMD_VIDEO_CS_YUV422_12 0x000b +#define PS3AV_CMD_VIDEO_CS_XVYCC_12 0x000c +/* video_vid */ +#define PS3AV_CMD_VIDEO_VID_NONE 0x0000 +#define PS3AV_CMD_VIDEO_VID_480I 0x0001 +#define PS3AV_CMD_VIDEO_VID_576I 0x0003 +#define PS3AV_CMD_VIDEO_VID_480P 0x0005 +#define PS3AV_CMD_VIDEO_VID_576P 0x0006 +#define PS3AV_CMD_VIDEO_VID_1080I_60HZ 0x0007 +#define PS3AV_CMD_VIDEO_VID_1080I_50HZ 0x0008 +#define PS3AV_CMD_VIDEO_VID_720P_60HZ 0x0009 +#define PS3AV_CMD_VIDEO_VID_720P_50HZ 0x000a +#define PS3AV_CMD_VIDEO_VID_1080P_60HZ 0x000b +#define PS3AV_CMD_VIDEO_VID_1080P_50HZ 0x000c +#define PS3AV_CMD_VIDEO_VID_WXGA 0x000d +#define PS3AV_CMD_VIDEO_VID_SXGA 0x000e +#define PS3AV_CMD_VIDEO_VID_WUXGA 0x000f +#define PS3AV_CMD_VIDEO_VID_480I_A 0x0010 +/* video_format */ +#define PS3AV_CMD_VIDEO_FORMAT_BLACK 0x0000 +#define PS3AV_CMD_VIDEO_FORMAT_ARGB_8BIT 0x0007 +/* video_order */ +#define PS3AV_CMD_VIDEO_ORDER_RGB 0x0000 +#define PS3AV_CMD_VIDEO_ORDER_BGR 0x0001 +/* video_fmt */ +#define PS3AV_CMD_VIDEO_FMT_X8R8G8B8 0x0000 +/* video_out_format */ +#define PS3AV_CMD_VIDEO_OUT_FORMAT_RGB_12BIT 0x0000 +/* video_sync */ +#define PS3AV_CMD_VIDEO_SYNC_VSYNC 0x0001 +#define PS3AV_CMD_VIDEO_SYNC_CSYNC 0x0004 +#define PS3AV_CMD_VIDEO_SYNC_HSYNC 0x0010 + +/* for audio module */ +/* num_of_ch */ +#define PS3AV_CMD_AUDIO_NUM_OF_CH_2 0x0000 +#define PS3AV_CMD_AUDIO_NUM_OF_CH_3 0x0001 +#define PS3AV_CMD_AUDIO_NUM_OF_CH_4 0x0002 +#define PS3AV_CMD_AUDIO_NUM_OF_CH_5 0x0003 +#define PS3AV_CMD_AUDIO_NUM_OF_CH_6 0x0004 +#define PS3AV_CMD_AUDIO_NUM_OF_CH_7 0x0005 +#define PS3AV_CMD_AUDIO_NUM_OF_CH_8 0x0006 +/* audio_fs */ +#define PS3AV_CMD_AUDIO_FS_32K 0x0001 +#define PS3AV_CMD_AUDIO_FS_44K 0x0002 +#define PS3AV_CMD_AUDIO_FS_48K 0x0003 +#define PS3AV_CMD_AUDIO_FS_88K 0x0004 +#define PS3AV_CMD_AUDIO_FS_96K 0x0005 +#define PS3AV_CMD_AUDIO_FS_176K 0x0006 +#define PS3AV_CMD_AUDIO_FS_192K 0x0007 +/* audio_word_bits */ +#define PS3AV_CMD_AUDIO_WORD_BITS_16 0x0001 +#define PS3AV_CMD_AUDIO_WORD_BITS_20 0x0002 +#define PS3AV_CMD_AUDIO_WORD_BITS_24 0x0003 +/* audio_format */ +#define PS3AV_CMD_AUDIO_FORMAT_PCM 0x0001 +#define PS3AV_CMD_AUDIO_FORMAT_BITSTREAM 0x00ff +/* audio_source */ +#define PS3AV_CMD_AUDIO_SOURCE_SERIAL 0x0000 +#define PS3AV_CMD_AUDIO_SOURCE_SPDIF 0x0001 +/* audio_swap */ +#define PS3AV_CMD_AUDIO_SWAP_0 0x0000 +#define PS3AV_CMD_AUDIO_SWAP_1 0x0000 +/* audio_map */ +#define PS3AV_CMD_AUDIO_MAP_OUTPUT_0 0x0000 +#define PS3AV_CMD_AUDIO_MAP_OUTPUT_1 0x0001 +#define PS3AV_CMD_AUDIO_MAP_OUTPUT_2 0x0002 +#define PS3AV_CMD_AUDIO_MAP_OUTPUT_3 0x0003 +/* audio_layout */ +#define PS3AV_CMD_AUDIO_LAYOUT_2CH 0x0000 +#define PS3AV_CMD_AUDIO_LAYOUT_6CH 0x000b /* LREClr */ +#define PS3AV_CMD_AUDIO_LAYOUT_8CH 0x001f /* LREClrXY */ +/* audio_downmix */ +#define PS3AV_CMD_AUDIO_DOWNMIX_PERMITTED 0x0000 +#define PS3AV_CMD_AUDIO_DOWNMIX_PROHIBITED 0x0001 + +/* audio_port */ +#define PS3AV_CMD_AUDIO_PORT_HDMI_0 ( 1 << 0 ) +#define PS3AV_CMD_AUDIO_PORT_HDMI_1 ( 1 << 1 ) +#define PS3AV_CMD_AUDIO_PORT_AVMULTI_0 ( 1 << 10 ) +#define PS3AV_CMD_AUDIO_PORT_SPDIF_0 ( 1 << 20 ) +#define PS3AV_CMD_AUDIO_PORT_SPDIF_1 ( 1 << 21 ) + +/* audio_ctrl_id */ +#define PS3AV_CMD_AUDIO_CTRL_ID_DAC_RESET 0x0000 +#define PS3AV_CMD_AUDIO_CTRL_ID_DAC_DE_EMPHASIS 0x0001 +#define PS3AV_CMD_AUDIO_CTRL_ID_AVCLK 0x0002 +/* audio_ctrl_data[0] reset */ +#define PS3AV_CMD_AUDIO_CTRL_RESET_NEGATE 0x0000 +#define PS3AV_CMD_AUDIO_CTRL_RESET_ASSERT 0x0001 +/* audio_ctrl_data[0] de-emphasis */ +#define PS3AV_CMD_AUDIO_CTRL_DE_EMPHASIS_OFF 0x0000 +#define PS3AV_CMD_AUDIO_CTRL_DE_EMPHASIS_ON 0x0001 +/* audio_ctrl_data[0] avclk */ +#define PS3AV_CMD_AUDIO_CTRL_AVCLK_22 0x0000 +#define PS3AV_CMD_AUDIO_CTRL_AVCLK_18 0x0001 + +/* av_vid */ +/* do not use these params directly, use vid_video2av */ +#define PS3AV_CMD_AV_VID_480I 0x0000 +#define PS3AV_CMD_AV_VID_480P 0x0001 +#define PS3AV_CMD_AV_VID_720P_60HZ 0x0002 +#define PS3AV_CMD_AV_VID_1080I_60HZ 0x0003 +#define PS3AV_CMD_AV_VID_1080P_60HZ 0x0004 +#define PS3AV_CMD_AV_VID_576I 0x0005 +#define PS3AV_CMD_AV_VID_576P 0x0006 +#define PS3AV_CMD_AV_VID_720P_50HZ 0x0007 +#define PS3AV_CMD_AV_VID_1080I_50HZ 0x0008 +#define PS3AV_CMD_AV_VID_1080P_50HZ 0x0009 +#define PS3AV_CMD_AV_VID_WXGA 0x000a +#define PS3AV_CMD_AV_VID_SXGA 0x000b +#define PS3AV_CMD_AV_VID_WUXGA 0x000c +/* av_cs_out av_cs_in */ +/* use cs_video2av() */ +#define PS3AV_CMD_AV_CS_RGB_8 0x0000 +#define PS3AV_CMD_AV_CS_YUV444_8 0x0001 +#define PS3AV_CMD_AV_CS_YUV422_8 0x0002 +#define PS3AV_CMD_AV_CS_XVYCC_8 0x0003 +#define PS3AV_CMD_AV_CS_RGB_10 0x0004 +#define PS3AV_CMD_AV_CS_YUV444_10 0x0005 +#define PS3AV_CMD_AV_CS_YUV422_10 0x0006 +#define PS3AV_CMD_AV_CS_XVYCC_10 0x0007 +#define PS3AV_CMD_AV_CS_RGB_12 0x0008 +#define PS3AV_CMD_AV_CS_YUV444_12 0x0009 +#define PS3AV_CMD_AV_CS_YUV422_12 0x000a +#define PS3AV_CMD_AV_CS_XVYCC_12 0x000b +#define PS3AV_CMD_AV_CS_8 0x0000 +#define PS3AV_CMD_AV_CS_10 0x0001 +#define PS3AV_CMD_AV_CS_12 0x0002 +/* dither */ +#define PS3AV_CMD_AV_DITHER_OFF 0x0000 +#define PS3AV_CMD_AV_DITHER_ON 0x0001 +#define PS3AV_CMD_AV_DITHER_8BIT 0x0000 +#define PS3AV_CMD_AV_DITHER_10BIT 0x0002 +#define PS3AV_CMD_AV_DITHER_12BIT 0x0004 +/* super_white */ +#define PS3AV_CMD_AV_SUPER_WHITE_OFF 0x0000 +#define PS3AV_CMD_AV_SUPER_WHITE_ON 0x0001 +/* aspect */ +#define PS3AV_CMD_AV_ASPECT_16_9 0x0000 +#define PS3AV_CMD_AV_ASPECT_4_3 0x0001 +/* video_cs_cnv() */ +#define PS3AV_CMD_VIDEO_CS_RGB 0x0001 +#define PS3AV_CMD_VIDEO_CS_YUV422 0x0002 +#define PS3AV_CMD_VIDEO_CS_YUV444 0x0003 + +/* for automode */ +#define PS3AV_RESBIT_720x480P 0x0003 /* 0x0001 | 0x0002 */ +#define PS3AV_RESBIT_720x576P 0x0003 /* 0x0001 | 0x0002 */ +#define PS3AV_RESBIT_1280x720P 0x0004 +#define PS3AV_RESBIT_1920x1080I 0x0008 +#define PS3AV_RESBIT_1920x1080P 0x4000 +#define PS3AV_RES_MASK_60 (PS3AV_RESBIT_720x480P \ + | PS3AV_RESBIT_1280x720P \ + | PS3AV_RESBIT_1920x1080I \ + | PS3AV_RESBIT_1920x1080P) +#define PS3AV_RES_MASK_50 (PS3AV_RESBIT_720x576P \ + | PS3AV_RESBIT_1280x720P \ + | PS3AV_RESBIT_1920x1080I \ + | PS3AV_RESBIT_1920x1080P) + +#define PS3AV_MONITOR_TYPE_HDMI 1 /* HDMI */ +#define PS3AV_MONITOR_TYPE_DVI 2 /* DVI */ +#define PS3AV_DEFAULT_HDMI_VID_REG_60 PS3AV_CMD_VIDEO_VID_480P +#define PS3AV_DEFAULT_AVMULTI_VID_REG_60 PS3AV_CMD_VIDEO_VID_480I +#define PS3AV_DEFAULT_HDMI_VID_REG_50 PS3AV_CMD_VIDEO_VID_576P +#define PS3AV_DEFAULT_AVMULTI_VID_REG_50 PS3AV_CMD_VIDEO_VID_576I +#define PS3AV_DEFAULT_DVI_VID PS3AV_CMD_VIDEO_VID_480P + +#define PS3AV_REGION_60 0x01 +#define PS3AV_REGION_50 0x02 +#define PS3AV_REGION_RGB 0x10 + +#define get_status(buf) (((__u32 *)buf)[2]) +#define PS3AV_HDR_SIZE 4 /* version + size */ + +/* for video mode */ +#define PS3AV_MODE_MASK 0x000F +#define PS3AV_MODE_HDCP_OFF 0x1000 /* Retail PS3 product doesn't support this */ +#define PS3AV_MODE_DITHER 0x0800 +#define PS3AV_MODE_FULL 0x0080 +#define PS3AV_MODE_DVI 0x0040 +#define PS3AV_MODE_RGB 0x0020 + + +/** command packet structure **/ +struct ps3av_send_hdr { + u16 version; + u16 size; /* size of command packet */ + u32 cid; /* command id */ +}; + +struct ps3av_reply_hdr { + u16 version; + u16 size; + u32 cid; + u32 status; +}; + +/* backend: initialization */ +struct ps3av_pkt_av_init { + struct ps3av_send_hdr send_hdr; + u32 event_bit; +}; + +/* backend: finalize */ +struct ps3av_pkt_av_fin { + struct ps3av_send_hdr send_hdr; + /* recv */ + u32 reserved; +}; + +/* backend: get port */ +struct ps3av_pkt_av_get_hw_conf { + struct ps3av_send_hdr send_hdr; + /* recv */ + u32 status; + u16 num_of_hdmi; /* out: number of hdmi */ + u16 num_of_avmulti; /* out: number of avmulti */ + u16 num_of_spdif; /* out: number of hdmi */ + u16 reserved; +}; + +/* backend: get monitor info */ +struct ps3av_info_resolution { + u32 res_bits; + u32 native; +}; + +struct ps3av_info_cs { + u8 rgb; + u8 yuv444; + u8 yuv422; + u8 reserved; +}; + +struct ps3av_info_color { + u16 red_x; + u16 red_y; + u16 green_x; + u16 green_y; + u16 blue_x; + u16 blue_y; + u16 white_x; + u16 white_y; + u32 gamma; +}; + +struct ps3av_info_audio { + u8 type; + u8 max_num_of_ch; + u8 fs; + u8 sbit; +}; + +struct ps3av_info_monitor { + u8 avport; + u8 monitor_id[10]; + u8 monitor_type; + u8 monitor_name[16]; + struct ps3av_info_resolution res_60; + struct ps3av_info_resolution res_50; + struct ps3av_info_resolution res_other; + struct ps3av_info_resolution res_vesa; + struct ps3av_info_cs cs; + struct ps3av_info_color color; + u8 supported_ai; + u8 speaker_info; + u8 num_of_audio_block; + struct ps3av_info_audio audio[0]; /* 0 or more audio blocks */ + u8 reserved[169]; +} __attribute__ ((packed)); + +struct ps3av_pkt_av_get_monitor_info { + struct ps3av_send_hdr send_hdr; + u16 avport; /* in: avport */ + u16 reserved; + /* recv */ + struct ps3av_info_monitor info; /* out: monitor info */ +}; + +/* backend: enable/disable event */ +struct ps3av_pkt_av_event { + struct ps3av_send_hdr send_hdr; + u32 event_bit; /* in */ +}; + +/* backend: video cs param */ +struct ps3av_pkt_av_video_cs { + struct ps3av_send_hdr send_hdr; + u16 avport; /* in: avport */ + u16 av_vid; /* in: video resolution */ + u16 av_cs_out; /* in: output color space */ + u16 av_cs_in; /* in: input color space */ + u8 dither; /* in: dither bit length */ + u8 bitlen_out; /* in: bit length */ + u8 super_white; /* in: super white */ + u8 aspect; /* in: aspect ratio */ +}; + +/* backend: video mute */ +struct ps3av_av_mute { + u16 avport; /* in: avport */ + u16 mute; /* in: mute on/off */ +}; + +struct ps3av_pkt_av_video_mute { + struct ps3av_send_hdr send_hdr; + struct ps3av_av_mute mute[PS3AV_MUTE_PORT_MAX]; +}; + +/* backend: video disable signal */ +struct ps3av_pkt_av_video_disable_sig { + struct ps3av_send_hdr send_hdr; + u16 avport; /* in: avport */ + u16 reserved; +}; + +/* backend: audio param */ +struct ps3av_audio_info_frame { + struct pb1_bit { + u8 ct:4; + u8 rsv:1; + u8 cc:3; + } pb1; + struct pb2_bit { + u8 rsv:3; + u8 sf:3; + u8 ss:2; + } pb2; + u8 pb3; + u8 pb4; + struct pb5_bit { + u8 dm:1; + u8 lsv:4; + u8 rsv:3; + } pb5; +}; + +struct ps3av_pkt_av_audio_param { + struct ps3av_send_hdr send_hdr; + u16 avport; /* in: avport */ + u16 reserved; + u8 mclk; /* in: audio mclk */ + u8 ns[3]; /* in: audio ns val */ + u8 enable; /* in: audio enable */ + u8 swaplr; /* in: audio swap */ + u8 fifomap; /* in: audio fifomap */ + u8 inputctrl; /* in: audio input ctrl */ + u8 inputlen; /* in: sample bit size */ + u8 layout; /* in: speaker layout param */ + struct ps3av_audio_info_frame info; /* in: info */ + u8 chstat[5]; /* in: ch stat */ +}; + +/* backend: audio_mute */ +struct ps3av_pkt_av_audio_mute { + struct ps3av_send_hdr send_hdr; + struct ps3av_av_mute mute[PS3AV_MUTE_PORT_MAX]; +}; + +/* backend: hdmi_mode */ +struct ps3av_pkt_av_hdmi_mode { + struct ps3av_send_hdr send_hdr; + u8 mode; /* in: hdmi_mode */ + u8 reserved0; + u8 reserved1; + u8 reserved2; +}; + +/* backend: tv_mute */ +struct ps3av_pkt_av_tv_mute { + struct ps3av_send_hdr send_hdr; + u16 avport; /* in: avport HDMI only */ + u16 mute; /* in: mute */ +}; + +/* video: initialize */ +struct ps3av_pkt_video_init { + struct ps3av_send_hdr send_hdr; + /* recv */ + u32 reserved; +}; + +/* video: mode setting */ +struct ps3av_pkt_video_mode { + struct ps3av_send_hdr send_hdr; + u32 video_head; /* in: head */ + u32 reserved; + u32 video_vid; /* in: video resolution */ + u16 reserved1; + u16 width; /* in: width in pixel */ + u16 reserved2; + u16 height; /* in: height in pixel */ + u32 pitch; /* in: line size in byte */ + u32 video_out_format; /* in: out format */ + u32 video_format; /* in: input frame buffer format */ + u8 reserved3; + u8 reserved4; + u16 video_order; /* in: input RGB order */ + u32 reserved5; +}; + +/* video: format */ +struct ps3av_pkt_video_format { + struct ps3av_send_hdr send_hdr; + u32 video_head; /* in: head */ + u32 video_format; /* in: frame buffer format */ + u16 reserved; + u16 video_order; /* in: input RGB order */ +}; + +/* video: pitch */ +struct ps3av_pkt_video_pitch { + u16 version; + u16 size; /* size of command packet */ + u32 cid; /* command id */ + u32 video_head; /* in: head */ + u32 pitch; /* in: line size in byte */ +}; + +/* audio: initialize */ +struct ps3av_pkt_audio_init { + struct ps3av_send_hdr send_hdr; + /* recv */ + u32 reserved; +}; + +/* audio: mode setting */ +struct ps3av_pkt_audio_mode { + struct ps3av_send_hdr send_hdr; + u8 avport; /* in: avport */ + u8 reserved0[3]; + u32 mask; /* in: mask */ + u32 audio_num_of_ch; /* in: number of ch */ + u32 audio_fs; /* in: sampling freq */ + u32 audio_word_bits; /* in: sample bit size */ + u32 audio_format; /* in: audio output format */ + u32 audio_source; /* in: audio source */ + u8 audio_enable[4]; /* in: audio enable */ + u8 audio_swap[4]; /* in: audio swap */ + u8 audio_map[4]; /* in: audio map */ + u32 audio_layout; /* in: speaker layout */ + u32 audio_downmix; /* in: audio downmix permission */ + u32 audio_downmix_level; + u8 audio_cs_info[8]; /* in: IEC channel status */ +}; + +/* audio: mute */ +struct ps3av_audio_mute { + u8 avport; /* in: opt_port optical */ + u8 reserved[3]; + u32 mute; /* in: mute */ +}; + +struct ps3av_pkt_audio_mute { + struct ps3av_send_hdr send_hdr; + struct ps3av_audio_mute mute[PS3AV_OPT_PORT_MAX]; +}; + +/* audio: active/inactive */ +struct ps3av_pkt_audio_active { + struct ps3av_send_hdr send_hdr; + u32 audio_port; /* in: audio active/inactive port */ +}; + +/* audio: SPDIF user bit */ +struct ps3av_pkt_audio_spdif_bit { + u16 version; + u16 size; /* size of command packet */ + u32 cid; /* command id */ + u8 avport; /* in: avport SPDIF only */ + u8 reserved[3]; + u32 audio_port; /* in: SPDIF only */ + u32 spdif_bit_data[12]; /* in: user bit data */ +}; + +/* audio: audio control */ +struct ps3av_pkt_audio_ctrl { + u16 version; + u16 size; /* size of command packet */ + u32 cid; /* command id */ + u32 audio_ctrl_id; /* in: control id */ + u32 audio_ctrl_data[4]; /* in: control data */ +}; + +/* avb:param */ +#define PS3AV_PKT_AVB_PARAM_MAX_BUF_SIZE \ + (PS3AV_AVB_NUM_VIDEO*sizeof(struct ps3av_pkt_video_mode) + \ + PS3AV_AVB_NUM_AUDIO*sizeof(struct ps3av_pkt_audio_mode) + \ + PS3AV_AVB_NUM_AV_VIDEO*sizeof(struct ps3av_pkt_av_video_cs) + \ + PS3AV_AVB_NUM_AV_AUDIO*sizeof(struct ps3av_pkt_av_audio_param)) + +struct ps3av_pkt_avb_param { + struct ps3av_send_hdr send_hdr; + u16 num_of_video_pkt; + u16 num_of_audio_pkt; + u16 num_of_av_video_pkt; + u16 num_of_av_audio_pkt; + /* + * The actual buffer layout depends on the fields above: + * + * struct ps3av_pkt_video_mode video[num_of_video_pkt]; + * struct ps3av_pkt_audio_mode audio[num_of_audio_pkt]; + * struct ps3av_pkt_av_video_cs av_video[num_of_av_video_pkt]; + * struct ps3av_pkt_av_audio_param av_audio[num_of_av_audio_pkt]; + */ + u8 buf[PS3AV_PKT_AVB_PARAM_MAX_BUF_SIZE]; +}; + +struct ps3av { + int available; + struct semaphore sem; + struct semaphore ping; + struct semaphore pong; + struct mutex mutex; + int open_count; + struct ps3_vuart_port_device *dev; + + int region; + struct ps3av_pkt_av_get_hw_conf av_hw_conf; + u32 av_port[PS3AV_AV_PORT_MAX + PS3AV_OPT_PORT_MAX]; + u32 opt_port[PS3AV_OPT_PORT_MAX]; + u32 head[PS3AV_HEAD_MAX]; + u32 audio_port; + int ps3av_mode; + int ps3av_mode_old; +}; + +/** command status **/ +#define PS3AV_STATUS_SUCCESS 0x0000 /* success */ +#define PS3AV_STATUS_RECEIVE_VUART_ERROR 0x0001 /* receive vuart error */ +#define PS3AV_STATUS_SYSCON_COMMUNICATE_FAIL 0x0002 /* syscon communication error */ +#define PS3AV_STATUS_INVALID_COMMAND 0x0003 /* obsolete invalid CID */ +#define PS3AV_STATUS_INVALID_PORT 0x0004 /* invalid port number */ +#define PS3AV_STATUS_INVALID_VID 0x0005 /* invalid video format */ +#define PS3AV_STATUS_INVALID_COLOR_SPACE 0x0006 /* invalid video colose space */ +#define PS3AV_STATUS_INVALID_FS 0x0007 /* invalid audio sampling freq */ +#define PS3AV_STATUS_INVALID_AUDIO_CH 0x0008 /* invalid audio channel number */ +#define PS3AV_STATUS_UNSUPPORTED_VERSION 0x0009 /* version mismatch */ +#define PS3AV_STATUS_INVALID_SAMPLE_SIZE 0x000a /* invalid audio sample bit size */ +#define PS3AV_STATUS_FAILURE 0x000b /* other failures */ +#define PS3AV_STATUS_UNSUPPORTED_COMMAND 0x000c /* unsupported cid */ +#define PS3AV_STATUS_BUFFER_OVERFLOW 0x000d /* write buffer overflow */ +#define PS3AV_STATUS_INVALID_VIDEO_PARAM 0x000e /* invalid video param */ +#define PS3AV_STATUS_NO_SEL 0x000f /* not exist selector */ +#define PS3AV_STATUS_INVALID_AV_PARAM 0x0010 /* invalid backend param */ +#define PS3AV_STATUS_INVALID_AUDIO_PARAM 0x0011 /* invalid audio param */ +#define PS3AV_STATUS_UNSUPPORTED_HDMI_MODE 0x0012 /* unsupported hdmi mode */ +#define PS3AV_STATUS_NO_SYNC_HEAD 0x0013 /* sync head failed */ + +extern void ps3av_set_hdr(u32, u16, struct ps3av_send_hdr *); +extern int ps3av_do_pkt(u32, u16, size_t, struct ps3av_send_hdr *); + +extern int ps3av_cmd_init(void); +extern int ps3av_cmd_fin(void); +extern int ps3av_cmd_av_video_mute(int, u32 *, u32); +extern int ps3av_cmd_av_video_disable_sig(u32); +extern int ps3av_cmd_av_tv_mute(u32, u32); +extern int ps3av_cmd_enable_event(void); +extern int ps3av_cmd_av_hdmi_mode(u8); +extern u32 ps3av_cmd_set_av_video_cs(void *, u32, int, int, int, u32); +extern u32 ps3av_cmd_set_video_mode(void *, u32, int, int, u32); +extern int ps3av_cmd_video_format_black(u32, u32, u32); +extern int ps3av_cmd_av_audio_mute(int, u32 *, u32); +extern u32 ps3av_cmd_set_av_audio_param(void *, u32, + const struct ps3av_pkt_audio_mode *, + u32); +extern void ps3av_cmd_set_audio_mode(struct ps3av_pkt_audio_mode *, u32, u32, + u32, u32, u32, u32); +extern int ps3av_cmd_audio_mode(struct ps3av_pkt_audio_mode *); +extern int ps3av_cmd_audio_mute(int, u32 *, u32); +extern int ps3av_cmd_audio_active(int, u32); +extern int ps3av_cmd_avb_param(struct ps3av_pkt_avb_param *, u32); +extern int ps3av_cmd_av_get_hw_conf(struct ps3av_pkt_av_get_hw_conf *); +#ifdef PS3AV_DEBUG +extern void ps3av_cmd_av_hw_conf_dump(const struct ps3av_pkt_av_get_hw_conf *); +extern void ps3av_cmd_av_monitor_info_dump(const struct ps3av_pkt_av_get_monitor_info *); +#else +static inline void ps3av_cmd_av_hw_conf_dump(const struct ps3av_pkt_av_get_hw_conf *hw_conf) {} +static inline void ps3av_cmd_av_monitor_info_dump(const struct ps3av_pkt_av_get_monitor_info *monitor_info) {} +#endif +extern int ps3av_cmd_video_get_monitor_info(struct ps3av_pkt_av_get_monitor_info *, + u32); + +extern int ps3av_vuart_write(struct ps3_vuart_port_device *dev, + const void *buf, unsigned long size); +extern int ps3av_vuart_read(struct ps3_vuart_port_device *dev, void *buf, + unsigned long size, int timeout); + +extern int ps3av_set_video_mode(u32, int); +extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32); +extern int ps3av_set_mode(u32, int); +extern int ps3av_get_mode(void); +extern int ps3av_get_scanmode(int); +extern int ps3av_get_refresh_rate(int); +extern int ps3av_video_mode2res(u32, u32 *, u32 *); +extern int ps3av_video_mute(int); +extern int ps3av_audio_mute(int); +extern int ps3av_dev_open(void); +extern int ps3av_dev_close(void); + +#endif /* _ASM_POWERPC_PS3AV_H_ */ diff --git a/include/asm-powerpc/ps3fb.h b/include/asm-powerpc/ps3fb.h new file mode 100644 index 000000000000..ad81cf431964 --- /dev/null +++ b/include/asm-powerpc/ps3fb.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2006 Sony Computer Entertainment Inc. + * Copyright 2006, 2007 Sony Corporation + * + * 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; version 2 of the License. + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef _ASM_POWERPC_PS3FB_H_ +#define _ASM_POWERPC_PS3FB_H_ + +#include <linux/ioctl.h> + +/* ioctl */ +#define PS3FB_IOCTL_SETMODE _IOW('r', 1, int) /* set video mode */ +#define PS3FB_IOCTL_GETMODE _IOR('r', 2, int) /* get video mode */ +#define PS3FB_IOCTL_SCREENINFO _IOR('r', 3, int) /* get screen info */ +#define PS3FB_IOCTL_ON _IO('r', 4) /* use IOCTL_FSEL */ +#define PS3FB_IOCTL_OFF _IO('r', 5) /* return to normal-flip */ +#define PS3FB_IOCTL_FSEL _IOW('r', 6, int) /* blit and flip request */ + +#ifndef FBIO_WAITFORVSYNC +#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) /* wait for vsync */ +#endif + +struct ps3fb_ioctl_res { + __u32 xres; /* frame buffer x_size */ + __u32 yres; /* frame buffer y_size */ + __u32 xoff; /* margine x */ + __u32 yoff; /* margine y */ + __u32 num_frames; /* num of frame buffers */ +}; + +#ifdef __KERNEL__ + +#ifdef CONFIG_FB_PS3 +extern void ps3fb_flip_ctl(int on); +extern void ps3fb_cleanup(void); +#else +static inline void ps3fb_flip_ctl(int on) {} +static inline void ps3fb_cleanup(void) {} +#endif + +#endif /* __KERNEL__ */ + +#endif /* _ASM_POWERPC_PS3FB_H_ */ diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index b634e16575f2..0f9f2dd24a79 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h @@ -129,7 +129,6 @@ struct spu { struct spu_runqueue *rq; unsigned long long timestamp; pid_t pid; - int prio; int class_0_pending; spinlock_t register_lock; diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h index 97b435484177..418e5c7e972c 100644 --- a/include/asm-powerpc/systbl.h +++ b/include/asm-powerpc/systbl.h @@ -305,3 +305,4 @@ SYSCALL_SPU(faccessat) COMPAT_SYS_SPU(get_robust_list) COMPAT_SYS_SPU(set_robust_list) COMPAT_SYS(move_pages) +SYSCALL_SPU(getcpu) diff --git a/include/asm-powerpc/termios.h b/include/asm-powerpc/termios.h index 7f80a019b6a0..2c14fea07c8a 100644 --- a/include/asm-powerpc/termios.h +++ b/include/asm-powerpc/termios.h @@ -71,24 +71,6 @@ struct termio { #define _VEOL2 8 #define _VSWTC 9 -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" diff --git a/include/asm-powerpc/ucc_slow.h b/include/asm-powerpc/ucc_slow.h index ca93bc99237e..1babad99c719 100644 --- a/include/asm-powerpc/ucc_slow.h +++ b/include/asm-powerpc/ucc_slow.h @@ -150,7 +150,7 @@ struct ucc_slow_info { int ucc_num; enum qe_clock rx_clock; enum qe_clock tx_clock; - struct ucc_slow *us_regs; + struct ucc_slow *regs; int irq; u16 uccm_mask; int data_mem_part; diff --git a/include/asm-powerpc/udbg.h b/include/asm-powerpc/udbg.h index 4cbc313aa02a..d03d8557f706 100644 --- a/include/asm-powerpc/udbg.h +++ b/include/asm-powerpc/udbg.h @@ -46,6 +46,7 @@ extern void __init udbg_init_iseries(void); extern void __init udbg_init_rtas_panel(void); extern void __init udbg_init_rtas_console(void); extern void __init udbg_init_debug_beat(void); +extern void __init udbg_init_btext(void); #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_UDBG_H */ diff --git a/include/asm-powerpc/vdso.h b/include/asm-powerpc/vdso.h index b9f9118b1607..26fc449bd989 100644 --- a/include/asm-powerpc/vdso.h +++ b/include/asm-powerpc/vdso.h @@ -18,16 +18,11 @@ #ifndef __ASSEMBLY__ -extern unsigned int vdso64_pages; -extern unsigned int vdso32_pages; - /* Offsets relative to thread->vdso_base */ extern unsigned long vdso64_rt_sigtramp; extern unsigned long vdso32_sigtramp; extern unsigned long vdso32_rt_sigtramp; -extern void vdso_init(void); - #else /* __ASSEMBLY__ */ #ifdef __VDSO64__ diff --git a/include/asm-ppc/ibm4xx.h b/include/asm-ppc/ibm4xx.h index 7a64ede53bb6..92fd02d7b177 100644 --- a/include/asm-ppc/ibm4xx.h +++ b/include/asm-ppc/ibm4xx.h @@ -109,6 +109,10 @@ void ppc4xx_init(unsigned long r3, unsigned long r4, unsigned long r5, #include <platforms/4xx/ocotea.h> #endif +#if defined(CONFIG_TAISHAN) +#include <platforms/4xx/taishan.h> +#endif + #ifndef __ASSEMBLY__ #ifdef CONFIG_40x /* diff --git a/include/asm-s390/ccwdev.h b/include/asm-s390/ccwdev.h index 58c70acffc73..cfc81533b9ba 100644 --- a/include/asm-s390/ccwdev.h +++ b/include/asm-s390/ccwdev.h @@ -110,7 +110,9 @@ extern void ccw_driver_unregister (struct ccw_driver *driver); struct ccw1; +extern int ccw_device_set_options_mask(struct ccw_device *, unsigned long); extern int ccw_device_set_options(struct ccw_device *, unsigned long); +extern void ccw_device_clear_options(struct ccw_device *, unsigned long); /* Allow for i/o completion notification after primary interrupt status. */ #define CCWDEV_EARLY_NOTIFICATION 0x0001 diff --git a/include/asm-s390/io.h b/include/asm-s390/io.h index a4c2d550dad4..b7ff6afc3caa 100644 --- a/include/asm-s390/io.h +++ b/include/asm-s390/io.h @@ -13,13 +13,10 @@ #ifdef __KERNEL__ -#include <linux/vmalloc.h> #include <asm/page.h> #define IO_SPACE_LIMIT 0xffffffff -#define __io_virt(x) ((void *)(PAGE_OFFSET | (unsigned long)(x))) - /* * Change virtual addresses to physical addresses and vv. * These are pretty trivial @@ -38,75 +35,9 @@ static inline unsigned long virt_to_phys(volatile void * address) static inline void * phys_to_virt(unsigned long address) { - return __io_virt(address); -} - -extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); - -static inline void * ioremap (unsigned long offset, unsigned long size) -{ - return __ioremap(offset, size, 0); -} - -/* - * This one maps high address device memory and turns off caching for that area. - * it's useful if some control registers are in such an area and write combining - * or read caching is not desirable: - */ -static inline void * ioremap_nocache (unsigned long offset, unsigned long size) -{ - return __ioremap(offset, size, 0); + return (void *) address; } -extern void iounmap(void *addr); - -/* - * IO bus memory addresses are also 1:1 with the physical address - */ -#define virt_to_bus virt_to_phys -#define bus_to_virt phys_to_virt - -/* - * readX/writeX() are used to access memory mapped devices. On some - * architectures the memory mapped IO stuff needs to be accessed - * differently. - */ - -#define readb(addr) (*(volatile unsigned char *) __io_virt(addr)) -#define readw(addr) (*(volatile unsigned short *) __io_virt(addr)) -#define readl(addr) (*(volatile unsigned int *) __io_virt(addr)) -#define readq(addr) (*(volatile unsigned long long *) __io_virt(addr)) - -#define readb_relaxed(addr) readb(addr) -#define readw_relaxed(addr) readw(addr) -#define readl_relaxed(addr) readl(addr) -#define readq_relaxed(addr) readq(addr) -#define __raw_readb readb -#define __raw_readw readw -#define __raw_readl readl -#define __raw_readq readq - -#define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b)) -#define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b)) -#define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) -#define writeq(b,addr) (*(volatile unsigned long long *) __io_virt(addr) = (b)) -#define __raw_writeb writeb -#define __raw_writew writew -#define __raw_writel writel -#define __raw_writeq writeq - -#define memset_io(a,b,c) memset(__io_virt(a),(b),(c)) -#define memcpy_fromio(a,b,c) memcpy((a),__io_virt(b),(c)) -#define memcpy_toio(a,b,c) memcpy(__io_virt(a),(b),(c)) - -#define inb_p(addr) readb(addr) -#define inb(addr) readb(addr) - -#define outb(x,addr) ((void) writeb(x,addr)) -#define outb_p(x,addr) outb(x,addr) - -#define mmiowb() do { } while (0) - /* * Convert a physical pointer to a virtual kernel pointer for /dev/mem * access diff --git a/include/asm-s390/termios.h b/include/asm-s390/termios.h index 62b23caf370e..a3480e25eb4b 100644 --- a/include/asm-s390/termios.h +++ b/include/asm-s390/termios.h @@ -47,24 +47,6 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ /* intr=^C quit=^\ erase=del kill=^U diff --git a/include/asm-sh/termios.h b/include/asm-sh/termios.h index 44edfd471443..e7c8f86ef890 100644 --- a/include/asm-sh/termios.h +++ b/include/asm-sh/termios.h @@ -39,24 +39,6 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ /* intr=^C quit=^\ erase=del kill=^U diff --git a/include/asm-sh64/termios.h b/include/asm-sh64/termios.h index 4a9c7fb411bc..dc44e6ed3a7c 100644 --- a/include/asm-sh64/termios.h +++ b/include/asm-sh64/termios.h @@ -50,24 +50,6 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IR - http://www.cs.uit.no/~dagb/irda/irda.html */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ /* intr=^C quit=^\ erase=del kill=^U diff --git a/include/asm-sparc/io.h b/include/asm-sparc/io.h index cab0b851b8b1..c23e74a0eaa8 100644 --- a/include/asm-sparc/io.h +++ b/include/asm-sparc/io.h @@ -256,6 +256,35 @@ extern void iounmap(volatile void __iomem *addr); #define iowrite16(val,X) writew(val,X) #define iowrite32(val,X) writel(val,X) +static inline void ioread8_rep(void __iomem *port, void *buf, unsigned long count) +{ + insb((unsigned long __force)port, buf, count); +} +static inline void ioread16_rep(void __iomem *port, void *buf, unsigned long count) +{ + insw((unsigned long __force)port, buf, count); +} + +static inline void ioread32_rep(void __iomem *port, void *buf, unsigned long count) +{ + insl((unsigned long __force)port, buf, count); +} + +static inline void iowrite8_rep(void __iomem *port, const void *buf, unsigned long count) +{ + outsb((unsigned long __force)port, buf, count); +} + +static inline void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count) +{ + outsw((unsigned long __force)port, buf, count); +} + +static inline void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count) +{ + outsl((unsigned long __force)port, buf, count); +} + /* Create a virtual mapping cookie for an IO port range */ extern void __iomem *ioport_map(unsigned long port, unsigned int nr); extern void ioport_unmap(void __iomem *); diff --git a/include/asm-sparc/termios.h b/include/asm-sparc/termios.h index d05f83c80989..d767f206ab33 100644 --- a/include/asm-sparc/termios.h +++ b/include/asm-sparc/termios.h @@ -45,24 +45,6 @@ struct winsize { unsigned short ws_ypixel; }; -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ #include <linux/module.h> diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h index 905e59b4a737..5d233b42fe13 100644 --- a/include/asm-sparc64/irq.h +++ b/include/asm-sparc64/irq.h @@ -46,6 +46,10 @@ extern void irq_install_pre_handler(int virt_irq, #define irq_canonicalize(irq) (irq) extern unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap); extern unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino); +extern unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p, + unsigned int msi_devino_start, + unsigned int msi_devino_end); +extern void sun4v_destroy_msi(unsigned int virt_irq); extern unsigned int sbus_build_irq(void *sbus, unsigned int ino); static __inline__ void set_softint(unsigned long bits) diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h index dcfa7629358c..7a246d8a1828 100644 --- a/include/asm-sparc64/pbm.h +++ b/include/asm-sparc64/pbm.h @@ -11,6 +11,7 @@ #include <linux/pci.h> #include <linux/ioport.h> #include <linux/spinlock.h> +#include <linux/msi.h> #include <asm/io.h> #include <asm/page.h> @@ -177,6 +178,24 @@ struct pci_pbm_info { int is_66mhz_capable; int all_devs_66mhz; +#ifdef CONFIG_PCI_MSI + /* MSI info. */ + u32 msiq_num; + u32 msiq_ent_count; + u32 msiq_first; + u32 msiq_first_devino; + u32 msi_num; + u32 msi_first; + u32 msi_data_mask; + u32 msix_data_width; + u64 msi32_start; + u64 msi64_start; + u32 msi32_len; + u32 msi64_len; + void *msi_queues; + unsigned long *msi_bitmap; +#endif /* !(CONFIG_PCI_MSI) */ + /* This PBM's streaming buffer. */ struct pci_strbuf stc; @@ -213,6 +232,12 @@ struct pci_controller_info { void (*base_address_update)(struct pci_dev *, int); void (*resource_adjust)(struct pci_dev *, struct resource *, struct resource *); +#ifdef CONFIG_PCI_MSI + int (*setup_msi_irq)(unsigned int *virt_irq_p, struct pci_dev *pdev, + struct msi_desc *entry); + void (*teardown_msi_irq)(unsigned int virt_irq, struct pci_dev *pdev); +#endif + /* Now things for the actual PCI bus probes. */ struct pci_ops *pci_ops; unsigned int pci_first_busno; @@ -231,6 +256,9 @@ struct pcidev_cookie { int num_prom_regs; struct linux_prom_pci_registers prom_assignments[PROMREG_MAX]; int num_prom_assignments; +#ifdef CONFIG_PCI_MSI + unsigned int msi_num; +#endif }; /* Currently these are the same across all PCI controllers diff --git a/include/asm-sparc64/setup.h b/include/asm-sparc64/setup.h index b356ee2cda92..5053df3cec40 100644 --- a/include/asm-sparc64/setup.h +++ b/include/asm-sparc64/setup.h @@ -5,6 +5,6 @@ #ifndef _SPARC64_SETUP_H #define _SPARC64_SETUP_H -#define COMMAND_LINE_SIZE 256 +#define COMMAND_LINE_SIZE 2048 #endif /* _SPARC64_SETUP_H */ diff --git a/include/asm-sparc64/termios.h b/include/asm-sparc64/termios.h index ee26a071c677..f05d390993d5 100644 --- a/include/asm-sparc64/termios.h +++ b/include/asm-sparc64/termios.h @@ -45,24 +45,6 @@ struct winsize { unsigned short ws_ypixel; }; -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ #include <linux/module.h> diff --git a/include/asm-um/elf-ppc.h b/include/asm-um/elf-ppc.h index 99711134e477..d3b90b7ac3e9 100644 --- a/include/asm-um/elf-ppc.h +++ b/include/asm-um/elf-ppc.h @@ -11,7 +11,7 @@ extern long elf_aux_hwcap; #define elf_check_arch(x) (1) -#ifdef CONFIG_64_BIT +#ifdef CONFIG_64BIT #define ELF_CLASS ELFCLASS64 #else #define ELF_CLASS ELFCLASS32 diff --git a/include/asm-um/processor-x86_64.h b/include/asm-um/processor-x86_64.h index 10609af376c0..31c2d4d685bd 100644 --- a/include/asm-um/processor-x86_64.h +++ b/include/asm-um/processor-x86_64.h @@ -13,6 +13,7 @@ struct arch_thread { unsigned long debugregs[8]; int debugregs_seq; + unsigned long fs; struct faultinfo faultinfo; }; @@ -25,8 +26,9 @@ extern inline void rep_nop(void) #define cpu_relax() rep_nop() #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ - .debugregs_seq = 0, \ - .faultinfo = { 0, 0, 0 } } + .debugregs_seq = 0, \ + .fs = 0, \ + .faultinfo = { 0, 0, 0 } } static inline void arch_flush_thread(struct arch_thread *thread) { diff --git a/include/asm-um/ptrace-x86_64.h b/include/asm-um/ptrace-x86_64.h index 03b4af4ac09a..bf61d17de3f7 100644 --- a/include/asm-um/ptrace-x86_64.h +++ b/include/asm-um/ptrace-x86_64.h @@ -81,9 +81,10 @@ static inline void arch_switch_to_tt(struct task_struct *from, { } -static inline void arch_switch_to_skas(struct task_struct *from, - struct task_struct *to) -{ -} +extern void arch_switch_to_skas(struct task_struct *from, + struct task_struct *to); + +extern long arch_prctl_skas(struct task_struct *task, int code, + unsigned long __user *addr); #endif diff --git a/include/asm-v850/termios.h b/include/asm-v850/termios.h index 79e97b59806e..c2c2b1d58776 100644 --- a/include/asm-v850/termios.h +++ b/include/asm-v850/termios.h @@ -39,24 +39,6 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ /* intr=^C quit=^\ erase=del kill=^U diff --git a/include/asm-x86_64/bootsetup.h b/include/asm-x86_64/bootsetup.h index b829f7b534be..7b1c3ad155fd 100644 --- a/include/asm-x86_64/bootsetup.h +++ b/include/asm-x86_64/bootsetup.h @@ -31,7 +31,7 @@ extern char x86_boot_params[BOOT_PARAM_SIZE]; #define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF)) #define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF)) #define EDD_BUF ((struct edd_info *) (PARAM+EDDBUF)) -#define COMMAND_LINE saved_command_line +#define COMMAND_LINE boot_command_line #define RAMDISK_IMAGE_START_MASK 0x07FF #define RAMDISK_PROMPT_FLAG 0x8000 diff --git a/include/asm-x86_64/setup.h b/include/asm-x86_64/setup.h index 985d4e3c79da..eaeff73d6c10 100644 --- a/include/asm-x86_64/setup.h +++ b/include/asm-x86_64/setup.h @@ -1,6 +1,6 @@ #ifndef _x8664_SETUP_H #define _x8664_SETUP_H -#define COMMAND_LINE_SIZE 256 +#define COMMAND_LINE_SIZE 2048 #endif diff --git a/include/asm-x86_64/termios.h b/include/asm-x86_64/termios.h index 443b225537f0..35ee59b78329 100644 --- a/include/asm-x86_64/termios.h +++ b/include/asm-x86_64/termios.h @@ -39,24 +39,6 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ /* intr=^C quit=^\ erase=del kill=^U diff --git a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h index c0eac519840b..8079e29c14fd 100644 --- a/include/asm-x86_64/uaccess.h +++ b/include/asm-x86_64/uaccess.h @@ -37,11 +37,11 @@ * Uhhuh, this needs 65-bit arithmetic. We have a carry.. */ #define __range_not_ok(addr,size) ({ \ - unsigned long flag,sum; \ + unsigned long flag,roksum; \ __chk_user_ptr(addr); \ asm("# range_ok\n\r" \ "addq %3,%1 ; sbbq %0,%0 ; cmpq %1,%4 ; sbbq $0,%0" \ - :"=&r" (flag), "=r" (sum) \ + :"=&r" (flag), "=r" (roksum) \ :"1" (addr),"g" ((long)(size)),"g" (current_thread_info()->addr_limit.seg)); \ flag; }) diff --git a/include/asm-xtensa/mman.h b/include/asm-xtensa/mman.h index ba394cbb4807..9b92620c8a1e 100644 --- a/include/asm-xtensa/mman.h +++ b/include/asm-xtensa/mman.h @@ -79,7 +79,6 @@ #define MADV_DOFORK 11 /* do inherit across fork */ /* compatibility flags */ -#define MAP_ANON MAP_ANONYMOUS #define MAP_FILE 0 #endif /* _XTENSA_MMAN_H */ diff --git a/include/asm-xtensa/termios.h b/include/asm-xtensa/termios.h index 83c6aed1d115..f14b42c8dac0 100644 --- a/include/asm-xtensa/termios.h +++ b/include/asm-xtensa/termios.h @@ -52,25 +52,6 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -/* Line disciplines */ - -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ -#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 -#define N_HCI 15 /* Bluetooth HCI UART */ - #ifdef __KERNEL__ /* intr=^C quit=^\ erase=del kill=^U diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 683513e310de..e81e301a4d71 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild @@ -156,7 +156,6 @@ header-y += video_encoder.h header-y += videotext.h header-y += vt.h header-y += wireless.h -header-y += xattr.h header-y += x25.h unifdef-y += acct.h @@ -324,6 +323,7 @@ unifdef-y += tty.h unifdef-y += types.h unifdef-y += udf_fs_i.h unifdef-y += udp.h +unifdef-y += ufs_fs.h unifdef-y += uinput.h unifdef-y += uio.h unifdef-y += unistd.h @@ -336,6 +336,7 @@ unifdef-y += wait.h unifdef-y += wanrouter.h unifdef-y += watchdog.h unifdef-y += wireless.h +unifdef-y += xattr.h unifdef-y += xfrm.h objhdr-y += version.h diff --git a/include/linux/atalk.h b/include/linux/atalk.h index 75b8baca08f3..d12984ddaa9f 100644 --- a/include/linux/atalk.h +++ b/include/linux/atalk.h @@ -182,7 +182,7 @@ extern rwlock_t atalk_interfaces_lock; extern struct atalk_route atrtr_default; -extern struct file_operations atalk_seq_arp_fops; +extern const struct file_operations atalk_seq_arp_fops; extern int sysctl_aarp_expiry_time; extern int sysctl_aarp_tick_time; diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 36a6eacefe20..83dcd8c0e974 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -82,7 +82,6 @@ struct cfq_io_context { unsigned long last_end_request; sector_t last_request_pos; - unsigned long last_queue; unsigned long ttime_total; unsigned long ttime_samples; diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 5d9fb0e94156..dd27b1c7227f 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h @@ -34,6 +34,7 @@ enum bh_state_bits { BH_Write_EIO, /* I/O error on write */ BH_Ordered, /* ordered write */ BH_Eopnotsupp, /* operation not supported (barrier) */ + BH_Unwritten, /* Buffer is allocated on disk but not written */ BH_PrivateStart,/* not a state bit, but the first bit available * for private allocation by other entities @@ -126,6 +127,7 @@ BUFFER_FNS(Boundary, boundary) BUFFER_FNS(Write_EIO, write_io_error) BUFFER_FNS(Ordered, ordered) BUFFER_FNS(Eopnotsupp, eopnotsupp) +BUFFER_FNS(Unwritten, unwritten) #define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK) #define touch_buffer(bh) mark_page_accessed(bh->b_page) @@ -172,12 +174,14 @@ struct super_block *freeze_bdev(struct block_device *); void thaw_bdev(struct block_device *, struct super_block *); int fsync_super(struct super_block *); int fsync_no_super(struct block_device *); -struct buffer_head *__find_get_block(struct block_device *, sector_t, int); -struct buffer_head * __getblk(struct block_device *, sector_t, int); +struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block, + unsigned size); +struct buffer_head *__getblk(struct block_device *bdev, sector_t block, + unsigned size); void __brelse(struct buffer_head *); void __bforget(struct buffer_head *); -void __breadahead(struct block_device *, sector_t block, int size); -struct buffer_head *__bread(struct block_device *, sector_t block, int size); +void __breadahead(struct block_device *, sector_t block, unsigned int size); +struct buffer_head *__bread(struct block_device *, sector_t block, unsigned size); struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); void free_buffer_head(struct buffer_head * bh); void FASTCALL(unlock_buffer(struct buffer_head *bh)); diff --git a/include/linux/byteorder/Kbuild b/include/linux/byteorder/Kbuild index 56499ab9e32e..79bedddfd9ca 100644 --- a/include/linux/byteorder/Kbuild +++ b/include/linux/byteorder/Kbuild @@ -1,7 +1,5 @@ header-y += big_endian.h header-y += little_endian.h -header-y += pdp_endian.h unifdef-y += generic.h -unifdef-y += swabb.h unifdef-y += swab.h diff --git a/include/linux/byteorder/pdp_endian.h b/include/linux/byteorder/pdp_endian.h deleted file mode 100644 index 618631cbc6e3..000000000000 --- a/include/linux/byteorder/pdp_endian.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef _LINUX_BYTEORDER_PDP_ENDIAN_H -#define _LINUX_BYTEORDER_PDP_ENDIAN_H - -/* - * Could have been named NUXI-endian, but we use the same name as in glibc. - * hopefully only the PDP and its evolutions (old VAXen in compatibility mode) - * should ever use this braindead byteorder. - * This file *should* work, but has not been tested. - * - * little-endian is 1234; big-endian is 4321; nuxi/pdp-endian is 3412 - * - * I thought vaxen were NUXI-endian, but was told they were correct-endian - * (little-endian), though indeed there existed NUXI-endian machines - * (DEC PDP-11 and old VAXen in compatibility mode). - * This makes this file a bit useless, but as a proof-of-concept. - * - * But what does a __u64 look like: is it 34127856 or 78563412 ??? - * I don't dare imagine! Hence, no 64-bit byteorder support yet. - * Hopefully, there 64-bit pdp-endian support shouldn't ever be required. - * - */ - -#ifndef __PDP_ENDIAN -#define __PDP_ENDIAN 3412 -#endif -#ifndef __PDP_ENDIAN_BITFIELD -#define __PDP_ENDIAN_BITFIELD -#endif - -#include <linux/byteorder/swab.h> -#include <linux/byteorder/swabb.h> - -#define __constant_htonl(x) ___constant_swahb32((x)) -#define __constant_ntohl(x) ___constant_swahb32((x)) -#define __constant_htons(x) ___constant_swab16((x)) -#define __constant_ntohs(x) ___constant_swab16((x)) -#define __constant_cpu_to_le64(x) I DON'T KNOW -#define __constant_le64_to_cpu(x) I DON'T KNOW -#define __constant_cpu_to_le32(x) ___constant_swahw32((x)) -#define __constant_le32_to_cpu(x) ___constant_swahw32((x)) -#define __constant_cpu_to_le16(x) ((__u16)(x) -#define __constant_le16_to_cpu(x) ((__u16)(x) -#define __constant_cpu_to_be64(x) I DON'T KNOW -#define __constant_be64_to_cpu(x) I DON'T KNOW -#define __constant_cpu_to_be32(x) ___constant_swahb32((x)) -#define __constant_be32_to_cpu(x) ___constant_swahb32((x)) -#define __constant_cpu_to_be16(x) ___constant_swab16((x)) -#define __constant_be16_to_cpu(x) ___constant_swab16((x)) -#define __cpu_to_le64(x) I DON'T KNOW -#define __le64_to_cpu(x) I DON'T KNOW -#define __cpu_to_le32(x) ___swahw32((x)) -#define __le32_to_cpu(x) ___swahw32((x)) -#define __cpu_to_le16(x) ((__u16)(x) -#define __le16_to_cpu(x) ((__u16)(x) -#define __cpu_to_be64(x) I DON'T KNOW -#define __be64_to_cpu(x) I DON'T KNOW -#define __cpu_to_be32(x) __swahb32((x)) -#define __be32_to_cpu(x) __swahb32((x)) -#define __cpu_to_be16(x) __swab16((x)) -#define __be16_to_cpu(x) __swab16((x)) -#define __cpu_to_le64p(x) I DON'T KNOW -#define __le64_to_cpup(x) I DON'T KNOW -#define __cpu_to_le32p(x) ___swahw32p((x)) -#define __le32_to_cpup(x) ___swahw32p((x)) -#define __cpu_to_le16p(x) (*(__u16*)(x)) -#define __le16_to_cpup(x) (*(__u16*)(x)) -#define __cpu_to_be64p(x) I DON'T KNOW -#define __be64_to_cpup(x) I DON'T KNOW -#define __cpu_to_be32p(x) __swahb32p((x)) -#define __be32_to_cpup(x) __swahb32p((x)) -#define __cpu_to_be16p(x) __swab16p((x)) -#define __be16_to_cpup(x) __swab16p((x)) -#define __cpu_to_le64s(x) I DON'T KNOW -#define __le64_to_cpus(x) I DON'T KNOW -#define __cpu_to_le32s(x) ___swahw32s((x)) -#define __le32_to_cpus(x) ___swahw32s((x)) -#define __cpu_to_le16s(x) do {} while (0) -#define __le16_to_cpus(x) do {} while (0) -#define __cpu_to_be64s(x) I DON'T KNOW -#define __be64_to_cpus(x) I DON'T KNOW -#define __cpu_to_be32s(x) __swahb32s((x)) -#define __be32_to_cpus(x) __swahb32s((x)) -#define __cpu_to_be16s(x) __swab16s((x)) -#define __be16_to_cpus(x) __swab16s((x)) - -#include <linux/byteorder/generic.h> - -#endif /* _LINUX_BYTEORDER_PDP_ENDIAN_H */ diff --git a/include/linux/byteorder/swabb.h b/include/linux/byteorder/swabb.h index ae5e5f914bf4..8c780c7d779e 100644 --- a/include/linux/byteorder/swabb.h +++ b/include/linux/byteorder/swabb.h @@ -25,6 +25,8 @@ * */ +#include <linux/types.h> + #define ___swahw32(x) \ ({ \ __u32 __x = (x); \ @@ -77,19 +79,14 @@ /* * Allow constant folding */ -#if defined(__GNUC__) && defined(__OPTIMIZE__) -# define __swahw32(x) \ +#define __swahw32(x) \ (__builtin_constant_p((__u32)(x)) ? \ ___swahw32((x)) : \ __fswahw32((x))) -# define __swahb32(x) \ +#define __swahb32(x) \ (__builtin_constant_p((__u32)(x)) ? \ ___swahb32((x)) : \ __fswahb32((x))) -#else -# define __swahw32(x) __fswahw32(x) -# define __swahb32(x) __fswahb32(x) -#endif /* OPTIMIZE */ static inline __u32 __fswahw32(__u32 x) @@ -128,13 +125,11 @@ static inline void __swahb32s(__u32 *addr) */ #endif /* __BYTEORDER_HAS_U64__ */ -#if defined(__KERNEL__) #define swahw32 __swahw32 #define swahb32 __swahb32 #define swahw32p __swahw32p #define swahb32p __swahb32p #define swahw32s __swahw32s #define swahb32s __swahb32s -#endif #endif /* _LINUX_BYTEORDER_SWABB_H */ diff --git a/include/linux/cfag12864b.h b/include/linux/cfag12864b.h new file mode 100644 index 000000000000..0bc45e69da5a --- /dev/null +++ b/include/linux/cfag12864b.h @@ -0,0 +1,77 @@ +/* + * Filename: cfag12864b.h + * Version: 0.1.0 + * Description: cfag12864b LCD driver header + * License: GPLv2 + * + * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> + * Date: 2006-10-12 + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef _CFAG12864B_H_ +#define _CFAG12864B_H_ + +#define CFAG12864B_WIDTH (128) +#define CFAG12864B_HEIGHT (64) +#define CFAG12864B_CONTROLLERS (2) +#define CFAG12864B_PAGES (8) +#define CFAG12864B_ADDRESSES (64) +#define CFAG12864B_SIZE ((CFAG12864B_CONTROLLERS) * \ + (CFAG12864B_PAGES) * \ + (CFAG12864B_ADDRESSES)) + +/* + * The driver will blit this buffer to the LCD + * + * Its size is CFAG12864B_SIZE. + */ +extern unsigned char * cfag12864b_buffer; + +/* + * Get the refresh rate of the LCD + * + * Returns the refresh rate (hertzs). + */ +extern unsigned int cfag12864b_getrate(void); + +/* + * Enable refreshing + * + * Returns 0 if successful (anyone was using it), + * or != 0 if failed (someone is using it). + */ +extern unsigned char cfag12864b_enable(void); + +/* + * Disable refreshing + * + * You should call this only when you finish using the LCD. + */ +extern void cfag12864b_disable(void); + +/* + * Is enabled refreshing? (is anyone using the module?) + * + * Returns 0 if refreshing is not enabled (anyone is using it), + * or != 0 if refreshing is enabled (someone is using it). + * + * Useful for buffer read-only modules. + */ +extern unsigned char cfag12864b_isenabled(void); + +#endif /* _CFAG12864B_H_ */ + diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h index 4c2632a8d31b..e4ac016ad272 100644 --- a/include/linux/coda_linux.h +++ b/include/linux/coda_linux.h @@ -23,9 +23,9 @@ #include <linux/coda_fs_i.h> /* operations */ -extern struct inode_operations coda_dir_inode_operations; -extern struct inode_operations coda_file_inode_operations; -extern struct inode_operations coda_ioctl_inode_operations; +extern const struct inode_operations coda_dir_inode_operations; +extern const struct inode_operations coda_file_inode_operations; +extern const struct inode_operations coda_ioctl_inode_operations; extern const struct address_space_operations coda_file_aops; extern const struct address_space_operations coda_symlink_aops; diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 6e1c44a935d4..9008eabb9c3d 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -27,6 +27,13 @@ #define __inline__ __inline__ __attribute__((always_inline)) #define __inline __inline __attribute__((always_inline)) #define __deprecated __attribute__((deprecated)) +#define __packed __attribute__((packed)) +#define __weak __attribute__((weak)) +#define __naked __attribute__((naked)) +#define __noreturn __attribute__((noreturn)) +#define __pure __attribute__((pure)) +#define __aligned(x) __attribute__((aligned(x))) +#define __printf(a,b) __attribute__((format(printf,a,b))) #define noinline __attribute__((noinline)) #define __attribute_pure__ __attribute__((pure)) #define __attribute_const__ __attribute__((__const__)) diff --git a/include/linux/console.h b/include/linux/console.h index 7d0420274de0..de25ee3b7919 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -21,6 +21,7 @@ struct vc_data; struct console_font_op; struct console_font; struct module; +struct tty_struct; /* * this is what the terminal answers to a ESC-Z or csi0c query. @@ -132,6 +133,9 @@ static inline void resume_console(void) {} int mda_console_init(void); void prom_con_init(void); +void vcs_make_sysfs(struct tty_struct *tty); +void vcs_remove_sysfs(struct tty_struct *tty); + /* Some debug stub to catch some of the obvious races in the VT code */ #if 1 #define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress) diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index ed6c0fee1ac7..a86162b26c0d 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h @@ -11,6 +11,7 @@ #include <linux/wait.h> #include <linux/vt.h> +#include <linux/workqueue.h> struct vt_struct; @@ -103,6 +104,7 @@ struct vc_data { struct vc { struct vc_data *d; + struct work_struct SAK_work; /* might add scrmem, vt_struct, kbd at some time, to have everything in one place - the disadvantage @@ -110,6 +112,7 @@ struct vc { }; extern struct vc vc_cons [MAX_NR_CONSOLES]; +extern void vc_SAK(struct work_struct *work); #define CUR_DEF 0 #define CUR_NONE 1 diff --git a/include/linux/cpu.h b/include/linux/cpu.h index bfb520212d71..769ddc6df492 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -49,10 +49,20 @@ struct notifier_block; #ifdef CONFIG_SMP /* Need to know about CPUs going up/down? */ -extern int register_cpu_notifier(struct notifier_block *nb); #ifdef CONFIG_HOTPLUG_CPU +extern int register_cpu_notifier(struct notifier_block *nb); extern void unregister_cpu_notifier(struct notifier_block *nb); #else + +#ifndef MODULE +extern int register_cpu_notifier(struct notifier_block *nb); +#else +static inline int register_cpu_notifier(struct notifier_block *nb) +{ + return 0; +} +#endif + static inline void unregister_cpu_notifier(struct notifier_block *nb) { } diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index fd404416f31c..826b15e914e2 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h @@ -55,7 +55,7 @@ extern int cpuset_excl_nodes_overlap(const struct task_struct *p); extern int cpuset_memory_pressure_enabled; extern void __cpuset_memory_pressure_bump(void); -extern struct file_operations proc_cpuset_operations; +extern const struct file_operations proc_cpuset_operations; extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); extern void cpuset_lock(void); diff --git a/include/linux/dn.h b/include/linux/dn.h index 10b6a6fd5837..02bba040fcfb 100644 --- a/include/linux/dn.h +++ b/include/linux/dn.h @@ -113,7 +113,7 @@ struct accessdata_dn * DECnet logical link information structure */ struct linkinfo_dn { - __le16 idn_segsize; /* Segment size for link */ + __u16 idn_segsize; /* Segment size for link */ __u8 idn_linkstate; /* Logical link state */ }; diff --git a/include/linux/efs_fs.h b/include/linux/efs_fs.h index 278ef4495819..dfed8009ebff 100644 --- a/include/linux/efs_fs.h +++ b/include/linux/efs_fs.h @@ -36,7 +36,7 @@ static inline struct efs_sb_info *SUPER_INFO(struct super_block *sb) struct statfs; -extern struct inode_operations efs_dir_inode_operations; +extern const struct inode_operations efs_dir_inode_operations; extern const struct file_operations efs_dir_operations; extern const struct address_space_operations efs_symlink_aops; diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 11cca1bdc0c7..4eb18ac510ae 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h @@ -868,16 +868,16 @@ do { \ extern const struct file_operations ext3_dir_operations; /* file.c */ -extern struct inode_operations ext3_file_inode_operations; +extern const struct inode_operations ext3_file_inode_operations; extern const struct file_operations ext3_file_operations; /* namei.c */ -extern struct inode_operations ext3_dir_inode_operations; -extern struct inode_operations ext3_special_inode_operations; +extern const struct inode_operations ext3_dir_inode_operations; +extern const struct inode_operations ext3_special_inode_operations; /* symlink.c */ -extern struct inode_operations ext3_symlink_inode_operations; -extern struct inode_operations ext3_fast_symlink_inode_operations; +extern const struct inode_operations ext3_symlink_inode_operations; +extern const struct inode_operations ext3_fast_symlink_inode_operations; #endif /* __KERNEL__ */ diff --git a/include/linux/ext4_fs.h b/include/linux/ext4_fs.h index 498503ee613d..54c576d414c3 100644 --- a/include/linux/ext4_fs.h +++ b/include/linux/ext4_fs.h @@ -955,16 +955,16 @@ do { \ extern const struct file_operations ext4_dir_operations; /* file.c */ -extern struct inode_operations ext4_file_inode_operations; +extern const struct inode_operations ext4_file_inode_operations; extern const struct file_operations ext4_file_operations; /* namei.c */ -extern struct inode_operations ext4_dir_inode_operations; -extern struct inode_operations ext4_special_inode_operations; +extern const struct inode_operations ext4_dir_inode_operations; +extern const struct inode_operations ext4_special_inode_operations; /* symlink.c */ -extern struct inode_operations ext4_symlink_inode_operations; -extern struct inode_operations ext4_fast_symlink_inode_operations; +extern const struct inode_operations ext4_symlink_inode_operations; +extern const struct inode_operations ext4_fast_symlink_inode_operations; /* extents.c */ extern int ext4_ext_tree_init(handle_t *handle, struct inode *); diff --git a/include/linux/fb.h b/include/linux/fb.h index 64177ec9a019..a78e25683f82 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -49,6 +49,13 @@ #define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */ #define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */ #define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */ +#define FB_AUX_TEXT_SVGA_GROUP 8 /* 8-15: SVGA tileblit compatible modes */ +#define FB_AUX_TEXT_SVGA_MASK 7 /* lower three bits says step */ +#define FB_AUX_TEXT_SVGA_STEP2 8 /* SVGA text mode: text, attr */ +#define FB_AUX_TEXT_SVGA_STEP4 9 /* SVGA text mode: text, attr, 2 reserved bytes */ +#define FB_AUX_TEXT_SVGA_STEP8 10 /* SVGA text mode: text, attr, 6 reserved bytes */ +#define FB_AUX_TEXT_SVGA_STEP16 11 /* SVGA text mode: text, attr, 14 reserved bytes */ +#define FB_AUX_TEXT_SVGA_LAST 15 /* reserved up to 15 */ #define FB_AUX_VGA_PLANES_VGA4 0 /* 16 color planes (EGA/VGA) */ #define FB_AUX_VGA_PLANES_CFB4 1 /* CFB4 in planes (VGA) */ @@ -945,25 +952,26 @@ extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter); /* drivers/video/modedb.c */ #define VESA_MODEDB_SIZE 34 extern void fb_var_to_videomode(struct fb_videomode *mode, - struct fb_var_screeninfo *var); + const struct fb_var_screeninfo *var); extern void fb_videomode_to_var(struct fb_var_screeninfo *var, - struct fb_videomode *mode); -extern int fb_mode_is_equal(struct fb_videomode *mode1, - struct fb_videomode *mode2); -extern int fb_add_videomode(struct fb_videomode *mode, struct list_head *head); -extern void fb_delete_videomode(struct fb_videomode *mode, + const struct fb_videomode *mode); +extern int fb_mode_is_equal(const struct fb_videomode *mode1, + const struct fb_videomode *mode2); +extern int fb_add_videomode(const struct fb_videomode *mode, + struct list_head *head); +extern void fb_delete_videomode(const struct fb_videomode *mode, struct list_head *head); -extern struct fb_videomode *fb_match_mode(struct fb_var_screeninfo *var, - struct list_head *head); -extern struct fb_videomode *fb_find_best_mode(struct fb_var_screeninfo *var, - struct list_head *head); -extern struct fb_videomode *fb_find_nearest_mode(struct fb_videomode *mode, - struct list_head *head); +extern const struct fb_videomode *fb_match_mode(const struct fb_var_screeninfo *var, + struct list_head *head); +extern const struct fb_videomode *fb_find_best_mode(const struct fb_var_screeninfo *var, + struct list_head *head); +extern const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode, + struct list_head *head); extern void fb_destroy_modelist(struct list_head *head); -extern void fb_videomode_to_modelist(struct fb_videomode *modedb, int num, +extern void fb_videomode_to_modelist(const struct fb_videomode *modedb, int num, struct list_head *head); -extern struct fb_videomode *fb_find_best_display(struct fb_monspecs *specs, - struct list_head *head); +extern const struct fb_videomode *fb_find_best_display(const struct fb_monspecs *specs, + struct list_head *head); /* drivers/video/fbcmap.c */ extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); diff --git a/include/linux/fs.h b/include/linux/fs.h index 1410e5330c8d..86ec3f4a7da6 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -169,6 +169,7 @@ extern int dir_notify_enable; #define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \ ((inode)->i_flags & (S_SYNC|S_DIRSYNC))) #define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) +#define IS_NOATIME(inode) __IS_FLG(inode, MS_RDONLY|MS_NOATIME) #define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA) #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) @@ -550,7 +551,7 @@ struct inode { spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ struct mutex i_mutex; struct rw_semaphore i_alloc_sem; - struct inode_operations *i_op; + const struct inode_operations *i_op; const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ struct super_block *i_sb; struct file_lock *i_flock; @@ -906,7 +907,7 @@ struct super_block { unsigned char s_dirt; unsigned long long s_maxbytes; /* Max file size */ struct file_system_type *s_type; - struct super_operations *s_op; + const struct super_operations *s_op; struct dquot_operations *dq_op; struct quotactl_ops *s_qcop; struct export_operations *s_export_op; @@ -1382,7 +1383,7 @@ struct super_block *sget(struct file_system_type *type, int (*set)(struct super_block *,void *), void *data); extern int get_sb_pseudo(struct file_system_type *, char *, - struct super_operations *ops, unsigned long, + const struct super_operations *ops, unsigned long, struct vfsmount *mnt); extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); int __put_super(struct super_block *sb); @@ -1572,12 +1573,18 @@ extern int invalidate_partition(struct gendisk *, int); extern int invalidate_inodes(struct super_block *); unsigned long invalidate_mapping_pages(struct address_space *mapping, pgoff_t start, pgoff_t end); -unsigned long invalidate_inode_pages(struct address_space *mapping); + +static inline unsigned long __deprecated +invalidate_inode_pages(struct address_space *mapping) +{ + return invalidate_mapping_pages(mapping, 0, ~0UL); +} + static inline void invalidate_remote_inode(struct inode *inode) { if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) - invalidate_inode_pages(inode->i_mapping); + invalidate_mapping_pages(inode->i_mapping, 0, -1); } extern int invalidate_inode_pages2(struct address_space *mapping); extern int invalidate_inode_pages2_range(struct address_space *mapping, @@ -1681,7 +1688,6 @@ extern struct inode *new_inode(struct super_block *); extern int __remove_suid(struct dentry *, int); extern int should_remove_suid(struct dentry *); extern int remove_suid(struct dentry *); -extern void remove_dquot_ref(struct super_block *, int, struct list_head *); extern void __insert_inode_hash(struct inode *, unsigned long hashval); extern void remove_inode_hash(struct inode *); @@ -1822,7 +1828,7 @@ extern void page_put_link(struct dentry *, struct nameidata *, void *); extern int __page_symlink(struct inode *inode, const char *symname, int len, gfp_t gfp_mask); extern int page_symlink(struct inode *inode, const char *symname, int len); -extern struct inode_operations page_symlink_inode_operations; +extern const struct inode_operations page_symlink_inode_operations; extern int generic_readlink(struct dentry *, char __user *, int); extern void generic_fillattr(struct inode *, struct kstat *); extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); @@ -1867,7 +1873,7 @@ extern int simple_commit_write(struct file *file, struct page *page, extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); extern const struct file_operations simple_dir_operations; -extern struct inode_operations simple_dir_inode_operations; +extern const struct inode_operations simple_dir_inode_operations; struct tree_descr { char *name; const struct file_operations *ops; int mode; }; struct dentry *d_alloc_name(struct dentry *, const char *); extern int simple_fill_super(struct super_block *, int, struct tree_descr *); diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 0a022b2f63fc..2c65da7cabb2 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -20,7 +20,11 @@ enum { LINUX_EXTENDED_PARTITION = 0x85, WIN98_EXTENDED_PARTITION = 0x0f, + SUN_WHOLE_DISK = DOS_EXTENDED_PARTITION, + LINUX_SWAP_PARTITION = 0x82, + LINUX_DATA_PARTITION = 0x83, + LINUX_LVM_PARTITION = 0x8e, LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */ SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION, @@ -400,10 +404,14 @@ struct unixware_disklabel { #ifdef __KERNEL__ +#define ADDPART_FLAG_NONE 0 +#define ADDPART_FLAG_RAID 1 +#define ADDPART_FLAG_WHOLEDISK 2 + char *disk_name (struct gendisk *hd, int part, char *buf); extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); -extern void add_partition(struct gendisk *, int, sector_t, sector_t); +extern void add_partition(struct gendisk *, int, sector_t, sector_t, int); extern void delete_partition(struct gendisk *, int); extern struct gendisk *alloc_disk_node(int minors, int node_id); diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 063799ea6be0..2a7d15bcde46 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -85,8 +85,10 @@ struct vm_area_struct; static inline enum zone_type gfp_zone(gfp_t flags) { +#ifdef CONFIG_ZONE_DMA if (flags & __GFP_DMA) return ZONE_DMA; +#endif #ifdef CONFIG_ZONE_DMA32 if (flags & __GFP_DMA32) return ZONE_DMA32; diff --git a/include/linux/gigaset_dev.h b/include/linux/gigaset_dev.h index 70ad09c8ad1e..5dc4a316ca37 100644 --- a/include/linux/gigaset_dev.h +++ b/include/linux/gigaset_dev.h @@ -9,8 +9,6 @@ * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * ===================================================================== - * Version: $Id: gigaset_dev.h,v 1.4.4.4 2005/11/21 22:28:09 hjlipp Exp $ - * ===================================================================== */ #ifndef GIGASET_INTERFACE_H diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 6e7ec4c76178..9c21dc793d7b 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h @@ -232,7 +232,6 @@ #define I2C_HW_SMBUS_PIIX4 0x040000 #define I2C_HW_SMBUS_ALI15X3 0x040001 #define I2C_HW_SMBUS_VIA2 0x040002 -#define I2C_HW_SMBUS_VOODOO3 0x040003 #define I2C_HW_SMBUS_I801 0x040004 #define I2C_HW_SMBUS_AMD756 0x040005 #define I2C_HW_SMBUS_SIS5595 0x040006 @@ -248,13 +247,11 @@ #define I2C_HW_SMBUS_OV519 0x040010 /* OV519 USB 1.1 webcam IC */ #define I2C_HW_SMBUS_OVFX2 0x040011 /* Cypress/OmniVision FX2 webcam */ #define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ +#define I2C_HW_SMBUS_ALI1563 0x040013 /* --- ISA pseudo-adapter */ #define I2C_HW_ISA 0x050000 -/* --- IPMI pseudo-adapter */ -#define I2C_HW_IPMI 0x0b0000 - /* --- IPMB adapter */ #define I2C_HW_IPMB 0x0c0000 diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 71e50d3e492f..9428092017e3 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -125,7 +125,12 @@ struct i2c_driver { * it must be freed here. */ int (*detach_client)(struct i2c_client *); - + + /* driver model interfaces that don't relate to enumeration */ + void (*shutdown)(struct i2c_client *); + int (*suspend)(struct i2c_client *, pm_message_t mesg); + int (*resume)(struct i2c_client *); + /* a ioctl like command that can be used to perform specific functions * with the device. */ diff --git a/include/linux/init.h b/include/linux/init.h index 5a593a1dec1e..e290a010e3f2 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -67,7 +67,8 @@ extern initcall_t __con_initcall_start[], __con_initcall_end[]; extern initcall_t __security_initcall_start[], __security_initcall_end[]; /* Defined in init/main.c */ -extern char saved_command_line[]; +extern char __initdata boot_command_line[]; +extern char *saved_command_line; extern unsigned int reset_devices; /* used by init/main.c */ @@ -164,7 +165,7 @@ struct obs_kernel_param { #define early_param(str, fn) \ __setup_param(str, fn, fn, 1) -/* Relies on saved_command_line being set */ +/* Relies on boot_command_line being set */ void __init parse_early_param(void); #endif /* __ASSEMBLY__ */ @@ -172,7 +173,7 @@ void __init parse_early_param(void); * module_init() - driver initialization entry point * @x: function to be run at kernel boot time or module insertion * - * module_init() will either be called during do_initcalls (if + * module_init() will either be called during do_initcalls() (if * builtin) or at module insertion time (if a module). There can only * be one per module. */ diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 6383d2d83bb0..a2d95ff50e9b 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -66,7 +66,7 @@ .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ .rlim = INIT_RLIMITS, \ .pgrp = 1, \ - .tty_old_pgrp = 0, \ + .tty_old_pgrp = NULL, \ { .__session = 1}, \ } diff --git a/include/linux/io.h b/include/linux/io.h index 9e419ebfc98b..c244a0cc9319 100644 --- a/include/linux/io.h +++ b/include/linux/io.h @@ -43,12 +43,6 @@ void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset, unsigned long size); void devm_iounmap(struct device *dev, void __iomem *addr); -void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); -void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); -void __iomem * const * pcim_iomap_table(struct pci_dev *pdev); - -int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name); - /** * check_signature - find BIOS signatures * @io_addr: mmio address to check diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 63fb18dcac30..9ddf25c21538 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -92,11 +92,6 @@ extern int cond_resched(void); (__x < 0) ? -__x : __x; \ }) -#define labs(x) ({ \ - long __x = (x); \ - (__x < 0) ? -__x : __x; \ - }) - extern struct atomic_notifier_head panic_notifier_list; extern long (*panic_blink)(long time); NORET_TYPE void panic(const char * fmt, ...) @@ -139,7 +134,8 @@ extern unsigned long long memparse(char *ptr, char **retptr); extern int core_kernel_text(unsigned long addr); extern int __kernel_text_address(unsigned long addr); extern int kernel_text_address(unsigned long addr); -extern int session_of_pgrp(int pgrp); +struct pid; +extern struct pid *session_of_pgrp(struct pid *pgrp); extern void dump_thread(struct pt_regs *regs, struct user *dump); @@ -176,6 +172,7 @@ static inline void console_verbose(void) } extern void bust_spinlocks(int yes); +extern void wake_up_klogd(void); extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ extern int panic_timeout; extern int panic_on_oops; @@ -200,6 +197,7 @@ extern enum system_states { #define TAINT_FORCED_RMMOD (1<<3) #define TAINT_MACHINE_CHECK (1<<4) #define TAINT_BAD_PAGE (1<<5) +#define TAINT_USER (1<<6) extern void dump_stack(void); @@ -312,6 +310,9 @@ static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * (void)__tmp; \ }) +struct sysinfo; +extern int do_sysinfo(struct sysinfo *info); + #endif /* __KERNEL__ */ #define SI_LOAD_SHIFT 16 diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 48eccd865bd8..404f4464cb1a 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h @@ -74,7 +74,7 @@ static inline void kfifo_reset(struct kfifo *fifo) * @buffer: the data to be added. * @len: the length of the data to be added. * - * This function copies at most 'len' bytes from the 'buffer' into + * This function copies at most @len bytes from the @buffer into * the FIFO depending on the free space, and returns the number of * bytes copied. */ @@ -99,8 +99,8 @@ static inline unsigned int kfifo_put(struct kfifo *fifo, * @buffer: where the data must be copied. * @len: the size of the destination buffer. * - * This function copies at most 'len' bytes from the FIFO into the - * 'buffer' and returns the number of copied bytes. + * This function copies at most @len bytes from the FIFO into the + * @buffer and returns the number of copied bytes. */ static inline unsigned int kfifo_get(struct kfifo *fifo, unsigned char *buffer, unsigned int len) diff --git a/include/linux/ks0108.h b/include/linux/ks0108.h new file mode 100644 index 000000000000..8047d4b17bf1 --- /dev/null +++ b/include/linux/ks0108.h @@ -0,0 +1,46 @@ +/* + * Filename: ks0108.h + * Version: 0.1.0 + * Description: ks0108 LCD Controller driver header + * License: GPLv2 + * + * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> + * Date: 2006-10-31 + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef _KS0108_H_ +#define _KS0108_H_ + +/* Write a byte to the data port */ +extern void ks0108_writedata(unsigned char byte); + +/* Write a byte to the control port */ +extern void ks0108_writecontrol(unsigned char byte); + +/* Set the controller's current display state (0..1) */ +extern void ks0108_displaystate(unsigned char state); + +/* Set the controller's current startline (0..63) */ +extern void ks0108_startline(unsigned char startline); + +/* Set the controller's current address (0..63) */ +extern void ks0108_address(unsigned char address); + +/* Set the controller's current page (0..7) */ +extern void ks0108_page(unsigned char page); + +#endif /* _KS0108_H_ */ diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 611f17f79eef..7444a6326231 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h @@ -163,7 +163,7 @@ static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs) * @add1: addend1 * @add2: addend2 * - * Returns the sum of addend1 and addend2 + * Returns the sum of @add1 and @add2. */ static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) { @@ -189,7 +189,7 @@ static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) * @kt: addend * @nsec: the scalar nsec value to add * - * Returns the sum of kt and nsec in ktime_t format + * Returns the sum of @kt and @nsec in ktime_t format */ extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec); @@ -246,7 +246,7 @@ static inline struct timeval ktime_to_timeval(const ktime_t kt) * ktime_to_ns - convert a ktime_t variable to scalar nanoseconds * @kt: the ktime_t variable to convert * - * Returns the scalar nanoseconds representation of kt + * Returns the scalar nanoseconds representation of @kt */ static inline s64 ktime_to_ns(const ktime_t kt) { diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 1be148f0fce4..f3604593fb76 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h @@ -11,7 +11,7 @@ #include <asm/types.h> #include <linux/ioctl.h> -#define KVM_API_VERSION 2 +#define KVM_API_VERSION 3 /* * Architectural interrupt line count, and the size of the bitmap needed @@ -65,6 +65,8 @@ struct kvm_run { __u8 ready_for_interrupt_injection; __u8 if_flag; __u16 padding2; + + /* in (pre_kvm_run), out (post_kvm_run) */ __u64 cr8; __u64 apic_base; @@ -185,6 +187,7 @@ struct kvm_translation { __u8 valid; __u8 writeable; __u8 usermode; + __u8 pad[5]; }; /* for KVM_INTERRUPT */ diff --git a/include/linux/list.h b/include/linux/list.h index 611059d633f4..f9d71eab05ee 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -161,7 +161,7 @@ static inline void __list_del(struct list_head * prev, struct list_head * next) /** * list_del - deletes entry from list. * @entry: the element to delete from the list. - * Note: list_empty on entry does not return true after this, the entry is + * Note: list_empty() on entry does not return true after this, the entry is * in an undefined state. */ #ifndef CONFIG_DEBUG_LIST @@ -179,7 +179,7 @@ extern void list_del(struct list_head *entry); * list_del_rcu - deletes entry from list without re-initialization * @entry: the element to delete from the list. * - * Note: list_empty on entry does not return true after this, + * Note: list_empty() on entry does not return true after this, * the entry is in an undefined state. It is useful for RCU based * lockfree traversal. * @@ -209,7 +209,8 @@ static inline void list_del_rcu(struct list_head *entry) * list_replace - replace old entry by new one * @old : the element to be replaced * @new : the new element to insert - * Note: if 'old' was empty, it will be overwritten. + * + * If @old was empty, it will be overwritten. */ static inline void list_replace(struct list_head *old, struct list_head *new) @@ -360,6 +361,62 @@ static inline void list_splice_init(struct list_head *list, } /** + * list_splice_init_rcu - splice an RCU-protected list into an existing list. + * @list: the RCU-protected list to splice + * @head: the place in the list to splice the first list into + * @sync: function to sync: synchronize_rcu(), synchronize_sched(), ... + * + * @head can be RCU-read traversed concurrently with this function. + * + * Note that this function blocks. + * + * Important note: the caller must take whatever action is necessary to + * prevent any other updates to @head. In principle, it is possible + * to modify the list as soon as sync() begins execution. + * If this sort of thing becomes necessary, an alternative version + * based on call_rcu() could be created. But only if -really- + * needed -- there is no shortage of RCU API members. + */ +static inline void list_splice_init_rcu(struct list_head *list, + struct list_head *head, + void (*sync)(void)) +{ + struct list_head *first = list->next; + struct list_head *last = list->prev; + struct list_head *at = head->next; + + if (list_empty(head)) + return; + + /* "first" and "last" tracking list, so initialize it. */ + + INIT_LIST_HEAD(list); + + /* + * At this point, the list body still points to the source list. + * Wait for any readers to finish using the list before splicing + * the list body into the new list. Any new readers will see + * an empty list. + */ + + sync(); + + /* + * Readers are finished with the source list, so perform splice. + * The order is important if the new list is global and accessible + * to concurrent RCU readers. Note that RCU readers are not + * permitted to traverse the prev pointers without excluding + * this function. + */ + + last->next = at; + smp_wmb(); + head->next = first; + first->prev = head; + at->prev = last; +} + +/** * list_entry - get the struct for this entry * @ptr: the &struct list_head pointer. * @type: the type of the struct this is embedded in. @@ -432,12 +489,12 @@ static inline void list_splice_init(struct list_head *list, pos = list_entry(pos->member.prev, typeof(*pos), member)) /** - * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue + * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue() * @pos: the type * to use as a start point * @head: the head of the list * @member: the name of the list_struct within the struct. * - * Prepares a pos entry for use as a start point in list_for_each_entry_continue. + * Prepares a pos entry for use as a start point in list_for_each_entry_continue(). */ #define list_prepare_entry(pos, head, member) \ ((pos) ? : list_entry(head, typeof(*pos), member)) diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index ea097dddc44f..06fe93a3e916 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h @@ -8,6 +8,8 @@ #ifndef __LINUX_LOCKDEP_H #define __LINUX_LOCKDEP_H +struct task_struct; + #ifdef CONFIG_LOCKDEP #include <linux/linkage.h> @@ -132,6 +134,7 @@ struct lock_list { struct list_head entry; struct lock_class *class; struct stack_trace trace; + int distance; }; /* diff --git a/include/linux/magic.h b/include/linux/magic.h index b78bbf42135a..b32c8a97fcec 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h @@ -18,6 +18,7 @@ #define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ #define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */ #define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */ +#define MINIX3_SUPER_MAGIC 0x4d5a /* minix V3 fs */ #define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ #define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */ diff --git a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h index 432b2fa24929..bdc01127dced 100644 --- a/include/linux/mc146818rtc.h +++ b/include/linux/mc146818rtc.h @@ -18,6 +18,16 @@ #ifdef __KERNEL__ #include <linux/spinlock.h> /* spinlock_t */ extern spinlock_t rtc_lock; /* serialize CMOS RAM access */ + +/* Some RTCs extend the mc146818 register set to support alarms of more + * than 24 hours in the future; or dates that include a century code. + * This platform_data structure can pass this information to the driver. + */ +struct cmos_rtc_board_info { + u8 rtc_day_alarm; /* zero, or register index */ + u8 rtc_mon_alarm; /* zero, or register index */ + u8 rtc_century; /* zero, or register index */ +}; #endif /********************************************************************** diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h index 916e8f72c63d..9850d513ff60 100644 --- a/include/linux/minix_fs.h +++ b/include/linux/minix_fs.h @@ -25,7 +25,6 @@ #define MINIX_ERROR_FS 0x0002 /* fs has errors. */ #define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode))) -#define MINIX2_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix2_inode))) /* * This is the original minix inode layout on disk. @@ -75,9 +74,33 @@ struct minix_super_block { __u32 s_zones; }; +/* + * V3 minix super-block data on disk + */ +struct minix3_super_block { + __u16 s_ninodes; + __u16 s_nzones; + __u16 s_pad0; + __u16 s_imap_blocks; + __u16 s_zmap_blocks; + __u16 s_firstdatazone; + __u16 s_log_zone_size; + __u16 s_pad1; + __u32 s_max_size; + __u32 s_zones; + __u16 s_magic; + __u16 s_pad2; + __u16 s_blocksize; + __u8 s_disk_version; +}; + struct minix_dir_entry { __u16 inode; char name[0]; }; +struct minix3_dir_entry { + __u32 inode; + char name[0]; +}; #endif diff --git a/include/linux/mm.h b/include/linux/mm.h index bb793a4c8e9e..a0eec16eb0bd 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -437,15 +437,15 @@ static inline compound_page_dtor *get_compound_page_dtor(struct page *page) /* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */ #ifdef NODE_NOT_IN_PAGEFLAGS #define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT) +#define ZONEID_PGOFF ((SECTIONS_PGOFF < ZONES_PGOFF)? \ + SECTIONS_PGOFF : ZONES_PGOFF) #else #define ZONEID_SHIFT (NODES_SHIFT + ZONES_SHIFT) +#define ZONEID_PGOFF ((NODES_PGOFF < ZONES_PGOFF)? \ + NODES_PGOFF : ZONES_PGOFF) #endif -#if ZONES_WIDTH > 0 -#define ZONEID_PGSHIFT ZONES_PGSHIFT -#else -#define ZONEID_PGSHIFT NODES_PGOFF -#endif +#define ZONEID_PGSHIFT (ZONEID_PGOFF * (ZONEID_SHIFT != 0)) #if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED @@ -471,7 +471,6 @@ static inline enum zone_type page_zonenum(struct page *page) */ static inline int page_zone_id(struct page *page) { - BUILD_BUG_ON(ZONEID_PGSHIFT == 0 && ZONEID_MASK); return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK; } @@ -638,6 +637,7 @@ static inline int page_mapped(struct page *page) */ #define NOPFN_SIGBUS ((unsigned long) -1) #define NOPFN_OOM ((unsigned long) -2) +#define NOPFN_REFAULT ((unsigned long) -3) /* * Different kinds of faults, as returned by handle_mm_fault(). @@ -786,6 +786,7 @@ extern int try_to_release_page(struct page * page, gfp_t gfp_mask); extern void do_invalidatepage(struct page *page, unsigned long offset); int __set_page_dirty_nobuffers(struct page *page); +int __set_page_dirty_no_writeback(struct page *page); int redirty_page_for_writepage(struct writeback_control *wbc, struct page *page); int FASTCALL(set_page_dirty(struct page *page)); @@ -1124,6 +1125,8 @@ unsigned long vmalloc_to_pfn(void *addr); int remap_pfn_range(struct vm_area_struct *, unsigned long addr, unsigned long pfn, unsigned long size, pgprot_t); int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *); +int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr, + unsigned long pfn); struct page *follow_page(struct vm_area_struct *, unsigned long address, unsigned int foll_flags); diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index 3b6723dfaff3..895bc4e93039 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h @@ -1,30 +1,29 @@ - static inline void add_page_to_active_list(struct zone *zone, struct page *page) { list_add(&page->lru, &zone->active_list); - zone->nr_active++; + __inc_zone_state(zone, NR_ACTIVE); } static inline void add_page_to_inactive_list(struct zone *zone, struct page *page) { list_add(&page->lru, &zone->inactive_list); - zone->nr_inactive++; + __inc_zone_state(zone, NR_INACTIVE); } static inline void del_page_from_active_list(struct zone *zone, struct page *page) { list_del(&page->lru); - zone->nr_active--; + __dec_zone_state(zone, NR_ACTIVE); } static inline void del_page_from_inactive_list(struct zone *zone, struct page *page) { list_del(&page->lru); - zone->nr_inactive--; + __dec_zone_state(zone, NR_INACTIVE); } static inline void @@ -33,9 +32,9 @@ del_page_from_lru(struct zone *zone, struct page *page) list_del(&page->lru); if (PageActive(page)) { __ClearPageActive(page); - zone->nr_active--; + __dec_zone_state(zone, NR_ACTIVE); } else { - zone->nr_inactive--; + __dec_zone_state(zone, NR_INACTIVE); } } diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index b262f47961fb..ee9e3143df4f 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -47,15 +47,20 @@ struct zone_padding { #endif enum zone_stat_item { + /* First 128 byte cacheline (assuming 64 bit words) */ + NR_FREE_PAGES, + NR_INACTIVE, + NR_ACTIVE, NR_ANON_PAGES, /* Mapped anonymous pages */ NR_FILE_MAPPED, /* pagecache pages mapped into pagetables. only modified from process context */ NR_FILE_PAGES, - NR_SLAB_RECLAIMABLE, - NR_SLAB_UNRECLAIMABLE, - NR_PAGETABLE, /* used for pagetables */ NR_FILE_DIRTY, NR_WRITEBACK, + /* Second 128 byte cacheline */ + NR_SLAB_RECLAIMABLE, + NR_SLAB_UNRECLAIMABLE, + NR_PAGETABLE, /* used for pagetables */ NR_UNSTABLE_NFS, /* NFS unstable pages */ NR_BOUNCE, NR_VMSCAN_WRITE, @@ -91,6 +96,7 @@ struct per_cpu_pageset { #endif enum zone_type { +#ifdef CONFIG_ZONE_DMA /* * ZONE_DMA is used when there are devices that are not able * to do DMA to all of addressable memory (ZONE_NORMAL). Then we @@ -111,6 +117,7 @@ enum zone_type { * <16M. */ ZONE_DMA, +#endif #ifdef CONFIG_ZONE_DMA32 /* * x86_64 needs two ZONE_DMAs because it supports devices that are @@ -147,15 +154,30 @@ enum zone_type { * match the requested limits. See gfp_zone() in include/linux/gfp.h */ -#if !defined(CONFIG_ZONE_DMA32) && !defined(CONFIG_HIGHMEM) +/* + * Count the active zones. Note that the use of defined(X) outside + * #if and family is not necessarily defined so ensure we cannot use + * it later. Use __ZONE_COUNT to work out how many shift bits we need. + */ +#define __ZONE_COUNT ( \ + defined(CONFIG_ZONE_DMA) \ + + defined(CONFIG_ZONE_DMA32) \ + + 1 \ + + defined(CONFIG_HIGHMEM) \ +) +#if __ZONE_COUNT < 2 +#define ZONES_SHIFT 0 +#elif __ZONE_COUNT <= 2 #define ZONES_SHIFT 1 -#else +#elif __ZONE_COUNT <= 4 #define ZONES_SHIFT 2 +#else +#error ZONES_SHIFT -- too many zones configured adjust calculation #endif +#undef __ZONE_COUNT struct zone { /* Fields commonly accessed by the page allocator */ - unsigned long free_pages; unsigned long pages_min, pages_low, pages_high; /* * We don't know if the memory that we're going to allocate will be freeable @@ -197,8 +219,6 @@ struct zone { struct list_head inactive_list; unsigned long nr_scan_active; unsigned long nr_scan_inactive; - unsigned long nr_active; - unsigned long nr_inactive; unsigned long pages_scanned; /* since last reclaim */ int all_unreclaimable; /* All pages pinned */ @@ -442,8 +462,6 @@ typedef struct pglist_data { #include <linux/memory_hotplug.h> -void __get_zone_counts(unsigned long *active, unsigned long *inactive, - unsigned long *free, struct pglist_data *pgdat); void get_zone_counts(unsigned long *active, unsigned long *inactive, unsigned long *free); void build_all_zonelists(void); @@ -523,7 +541,11 @@ static inline int is_dma32(struct zone *zone) static inline int is_dma(struct zone *zone) { +#ifdef CONFIG_ZONE_DMA return zone == zone->zone_pgdat->node_zones + ZONE_DMA; +#else + return 0; +#endif } /* These two functions are used to setup the per zone pages min values */ diff --git a/include/linux/mount.h b/include/linux/mount.h index 1b7e178b0d84..dab69afee2fa 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h @@ -43,9 +43,8 @@ struct vfsmount { struct super_block *mnt_sb; /* pointer to superblock */ struct list_head mnt_mounts; /* list of children, anchored here */ struct list_head mnt_child; /* and going through their mnt_child */ - atomic_t mnt_count; int mnt_flags; - int mnt_expiry_mark; /* true if marked for expiry */ + /* 4 bytes hole on 64bits arches */ char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ struct list_head mnt_list; struct list_head mnt_expire; /* link in fs-specific expiry list */ @@ -54,6 +53,13 @@ struct vfsmount { struct list_head mnt_slave; /* slave list entry */ struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ struct mnt_namespace *mnt_ns; /* containing namespace */ + /* + * We put mnt_count & mnt_expiry_mark at the end of struct vfsmount + * to let these frequently modified fields in a separate cache line + * (so that reads of mnt_flags wont ping-pong on SMP machines) + */ + atomic_t mnt_count; + int mnt_expiry_mark; /* true if marked for expiry */ int mnt_pinned; }; diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 24a9ef1506b6..fa253fa73aa3 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h @@ -234,7 +234,7 @@ struct msdos_sb_info { struct fat_mount_options options; struct nls_table *nls_disk; /* Codepage used on disk */ struct nls_table *nls_io; /* Charset used for input and display */ - void *dir_ops; /* Opaque; default directory operations */ + const void *dir_ops; /* Opaque; default directory operations */ int dir_per_block; /* dir entries per block */ int dir_per_block_bits; /* log2(dir_per_block) */ @@ -399,7 +399,7 @@ extern int fat_count_free_clusters(struct super_block *sb); extern int fat_generic_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); extern const struct file_operations fat_file_operations; -extern struct inode_operations fat_file_inode_operations; +extern const struct inode_operations fat_file_inode_operations; extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); extern void fat_truncate(struct inode *inode); extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, @@ -413,7 +413,7 @@ extern struct inode *fat_build_inode(struct super_block *sb, struct msdos_dir_entry *de, loff_t i_pos); extern int fat_sync_inode(struct inode *inode); extern int fat_fill_super(struct super_block *sb, void *data, int silent, - struct inode_operations *fs_dir_inode_ops, int isvfat); + const struct inode_operations *fs_dir_inode_ops, int isvfat); extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, struct inode *i2); diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h index 0ea7f89e613c..83e39eb054d3 100644 --- a/include/linux/ncp_fs.h +++ b/include/linux/ncp_fs.h @@ -204,7 +204,7 @@ void ncp_update_inode(struct inode *, struct ncp_entry_info *); void ncp_update_inode2(struct inode *, struct ncp_entry_info *); /* linux/fs/ncpfs/dir.c */ -extern struct inode_operations ncp_dir_inode_operations; +extern const struct inode_operations ncp_dir_inode_operations; extern const struct file_operations ncp_dir_operations; int ncp_conn_logged_in(struct super_block *); int ncp_date_dos2unix(__le16 time, __le16 date); @@ -226,7 +226,7 @@ void ncp_lock_server(struct ncp_server *server); void ncp_unlock_server(struct ncp_server *server); /* linux/fs/ncpfs/file.c */ -extern struct inode_operations ncp_file_inode_operations; +extern const struct inode_operations ncp_file_inode_operations; extern const struct file_operations ncp_file_operations; int ncp_make_open(struct inode *, int); diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index d4c4c5120bc0..70d3b4f1e48d 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h @@ -172,8 +172,8 @@ struct nf_logger { /* Function to register/unregister log function. */ int nf_log_register(int pf, struct nf_logger *logger); -int nf_log_unregister_pf(int pf); -void nf_log_unregister_logger(struct nf_logger *logger); +void nf_log_unregister(struct nf_logger *logger); +void nf_log_unregister_pf(int pf); /* Calls the registered backend logging function */ void nf_log_packet(int pf, diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h index 33581c13d947..da9274e6bf12 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack.h +++ b/include/linux/netfilter_ipv4/ip_conntrack.h @@ -301,6 +301,12 @@ extern unsigned int ip_conntrack_htable_size; extern int ip_conntrack_checksum; #define CONNTRACK_STAT_INC(count) (__get_cpu_var(ip_conntrack_stat).count++) +#define CONNTRACK_STAT_INC_ATOMIC(count) \ +do { \ + local_bh_disable(); \ + __get_cpu_var(ip_conntrack_stat).count++; \ + local_bh_enable(); \ +} while (0) #ifdef CONFIG_IP_NF_CONNTRACK_EVENTS #include <linux/notifier.h> diff --git a/include/linux/netlink.h b/include/linux/netlink.h index b3b9b609ee89..2a20f488ac1b 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -23,6 +23,7 @@ #define NETLINK_GENERIC 16 /* leave room for NETLINK_DM (DM Events) */ #define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */ +#define NETLINK_ECRYPTFS 19 #define MAX_LINKS 32 diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index c5d4084773e8..ed0f2eac8f50 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -331,9 +331,9 @@ static inline void nfs_fattr_init(struct nfs_fattr *fattr) /* * linux/fs/nfs/file.c */ -extern struct inode_operations nfs_file_inode_operations; +extern const struct inode_operations nfs_file_inode_operations; #ifdef CONFIG_NFS_V3 -extern struct inode_operations nfs3_file_inode_operations; +extern const struct inode_operations nfs3_file_inode_operations; #endif /* CONFIG_NFS_V3 */ extern const struct file_operations nfs_file_operations; extern const struct address_space_operations nfs_file_aops; @@ -380,9 +380,9 @@ extern ssize_t nfs_file_direct_write(struct kiocb *iocb, /* * linux/fs/nfs/dir.c */ -extern struct inode_operations nfs_dir_inode_operations; +extern const struct inode_operations nfs_dir_inode_operations; #ifdef CONFIG_NFS_V3 -extern struct inode_operations nfs3_dir_inode_operations; +extern const struct inode_operations nfs3_dir_inode_operations; #endif /* CONFIG_NFS_V3 */ extern const struct file_operations nfs_dir_operations; extern struct dentry_operations nfs_dentry_operations; @@ -392,7 +392,7 @@ extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_ /* * linux/fs/nfs/symlink.c */ -extern struct inode_operations nfs_symlink_inode_operations; +extern const struct inode_operations nfs_symlink_inode_operations; /* * linux/fs/nfs/sysctl.c @@ -409,8 +409,8 @@ extern void nfs_unregister_sysctl(void); * linux/fs/nfs/namespace.c */ extern struct list_head nfs_automount_list; -extern struct inode_operations nfs_mountpoint_inode_operations; -extern struct inode_operations nfs_referral_inode_operations; +extern const struct inode_operations nfs_mountpoint_inode_operations; +extern const struct inode_operations nfs_referral_inode_operations; extern int nfs_mountpoint_expiry_timeout; extern void nfs_release_automount_timer(void); diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 9ee9da5e1cc9..30d7116d601e 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -767,8 +767,8 @@ struct nfs_access_entry; struct nfs_rpc_ops { int version; /* Protocol version */ struct dentry_operations *dentry_ops; - struct inode_operations *dir_inode_ops; - struct inode_operations *file_inode_ops; + const struct inode_operations *dir_inode_ops; + const struct inode_operations *file_inode_ops; int (*getroot) (struct nfs_server *, struct nfs_fh *, struct nfs_fsinfo *); diff --git a/include/linux/nfsd/const.h b/include/linux/nfsd/const.h index f0cc77790527..323f8cfa060a 100644 --- a/include/linux/nfsd/const.h +++ b/include/linux/nfsd/const.h @@ -30,10 +30,6 @@ #include <linux/sunrpc/msg_prot.h> -#ifndef NFS_SUPER_MAGIC -# define NFS_SUPER_MAGIC 0x6969 -#endif - /* * Largest number of bytes we need to allocate for an NFS * call or reply. Used to control buffer sizes. We use diff --git a/include/linux/pci.h b/include/linux/pci.h index 9e3042e7e1cc..98c8765a488e 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -840,6 +840,11 @@ enum pci_fixup_pass { void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); +void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); +void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); +void __iomem * const * pcim_iomap_table(struct pci_dev *pdev); +int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name); + extern int pci_pci_problems; #define PCIPCI_FAIL 1 /* No PCI PCI DMA */ #define PCIPCI_TRITON 2 diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index e67b68ca235a..182a96f77c84 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -369,6 +369,7 @@ #define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a #define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380 #define PCI_DEVICE_ID_ATI_IXP600_SRAID 0x4381 +#define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c #define PCI_VENDOR_ID_VLSI 0x1004 @@ -959,6 +960,7 @@ #define PCI_DEVICE_ID_PLX_R753 0x1152 #define PCI_DEVICE_ID_PLX_OLITEC 0x1187 #define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196 +#define PCI_DEVICE_ID_PLX_9030 0x9030 #define PCI_DEVICE_ID_PLX_9050 0x9050 #define PCI_DEVICE_ID_PLX_9080 0x9080 #define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001 @@ -1696,6 +1698,8 @@ #define PCI_VENDOR_ID_ELECTRONICDESIGNGMBH 0x12f8 #define PCI_DEVICE_ID_LML_33R10 0x8a02 +#define PCI_VENDOR_ID_ESDGMBH 0x12fe +#define PCI_DEVICE_ID_ESDGMBH_CPCIASIO4 0x0111 #define PCI_VENDOR_ID_SIIG 0x131f #define PCI_SUBVENDOR_ID_SIIG 0x131f @@ -1811,6 +1815,9 @@ #define PCI_DEVICE_ID_MOXA_C168 0x1680 #define PCI_DEVICE_ID_MOXA_CP168U 0x1681 #define PCI_DEVICE_ID_MOXA_CP168EL 0x1682 +#define PCI_DEVICE_ID_MOXA_CP204J 0x2040 +#define PCI_DEVICE_ID_MOXA_C218 0x2180 +#define PCI_DEVICE_ID_MOXA_C320 0x3200 #define PCI_VENDOR_ID_CCD 0x1397 #define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 @@ -1991,6 +1998,10 @@ #define PCI_VENDOR_ID_CHELSIO 0x1425 +#define PCI_SUBVENDOR_ID_PERLE 0x155f +#define PCI_SUBDEVICE_ID_PCI_RAS4 0xf001 +#define PCI_SUBDEVICE_ID_PCI_RAS8 0xf010 + #define PCI_VENDOR_ID_SYBA 0x1592 #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 diff --git a/include/linux/phonedev.h b/include/linux/phonedev.h index a0e31adf3abe..4269de99e320 100644 --- a/include/linux/phonedev.h +++ b/include/linux/phonedev.h @@ -9,7 +9,7 @@ struct phone_device { struct phone_device *next; - struct file_operations *f_op; + const struct file_operations *f_op; int (*open) (struct phone_device *, struct file *); int board; /* Device private index */ int minor; diff --git a/include/linux/pid.h b/include/linux/pid.h index 4dec047b1837..2ac27f9997dd 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h @@ -105,20 +105,6 @@ static inline pid_t pid_nr(struct pid *pid) return nr; } - -#define do_each_task_pid(who, type, task) \ - do { \ - struct hlist_node *pos___; \ - struct pid *pid___ = find_pid(who); \ - if (pid___ != NULL) \ - hlist_for_each_entry_rcu((task), pos___, \ - &pid___->tasks[type], pids[type].node) { - -#define while_each_task_pid(who, type, task) \ - } \ - } while (0) - - #define do_each_pid_task(pid, type, task) \ do { \ struct hlist_node *pos___; \ diff --git a/include/linux/pnp.h b/include/linux/pnp.h index ab8a8dd8d64c..9a5226f0f169 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h @@ -352,6 +352,8 @@ struct pnp_protocol { (dev) = protocol_to_pnp_dev((dev)->protocol_list.next)) +extern struct bus_type pnp_bus_type; + #if defined(CONFIG_PNP) /* device management */ diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 87dec8fe6de9..2e132473cbe5 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -55,8 +55,8 @@ struct proc_dir_entry { uid_t uid; gid_t gid; loff_t size; - struct inode_operations * proc_iops; - const struct file_operations * proc_fops; + const struct inode_operations *proc_iops; + const struct file_operations *proc_fops; get_info_t *get_info; struct module *owner; struct proc_dir_entry *next, *parent, *subdir; diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h index 0c7ac444fd35..19bc9b8b6191 100644 --- a/include/linux/qnx4_fs.h +++ b/include/linux/qnx4_fs.h @@ -116,8 +116,8 @@ extern unsigned long qnx4_block_map(struct inode *inode, long iblock); extern struct buffer_head *qnx4_bread(struct inode *, int, int); -extern struct inode_operations qnx4_file_inode_operations; -extern struct inode_operations qnx4_dir_inode_operations; +extern const struct inode_operations qnx4_file_inode_operations; +extern const struct inode_operations qnx4_dir_inode_operations; extern const struct file_operations qnx4_file_operations; extern const struct file_operations qnx4_dir_operations; extern int qnx4_is_free(struct super_block *sb, long block); diff --git a/include/linux/quota.h b/include/linux/quota.h index b8fbf26eb885..77db80a953d6 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h @@ -132,6 +132,7 @@ struct if_dqinfo { #ifdef __KERNEL__ #include <linux/spinlock.h> +#include <linux/rwsem.h> #include <linux/mutex.h> #include <linux/dqblk_xfs.h> diff --git a/include/linux/random.h b/include/linux/random.h index 01ad71033d65..36f125c0c603 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -63,7 +63,7 @@ extern u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport); #ifndef MODULE -extern struct file_operations random_fops, urandom_fops; +extern const struct file_operations random_fops, urandom_fops; #endif unsigned int get_random_int(void); diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index c3fc6caaad3f..965d5b3ea9eb 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h @@ -1949,9 +1949,9 @@ int reiserfs_global_version_in_proc(char *buffer, char **start, off_t offset, #endif /* dir.c */ -extern struct inode_operations reiserfs_dir_inode_operations; -extern struct inode_operations reiserfs_symlink_inode_operations; -extern struct inode_operations reiserfs_special_inode_operations; +extern const struct inode_operations reiserfs_dir_inode_operations; +extern const struct inode_operations reiserfs_symlink_inode_operations; +extern const struct inode_operations reiserfs_special_inode_operations; extern const struct file_operations reiserfs_dir_operations; /* tail_conversion.c */ @@ -1963,7 +1963,7 @@ int indirect2direct(struct reiserfs_transaction_handle *, struct inode *, void reiserfs_unmap_buffer(struct buffer_head *); /* file.c */ -extern struct inode_operations reiserfs_file_inode_operations; +extern const struct inode_operations reiserfs_file_inode_operations; extern const struct file_operations reiserfs_file_operations; extern const struct address_space_operations reiserfs_address_space_operations; diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 966c35851b2e..66a96814d614 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h @@ -2,7 +2,10 @@ File: linux/reiserfs_xattr.h */ -#include <linux/xattr.h> +#ifndef _LINUX_REISERFS_XATTR_H +#define _LINUX_REISERFS_XATTR_H + +#include <linux/types.h> /* Magic value in header */ #define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */ @@ -13,7 +16,18 @@ struct reiserfs_xattr_header { }; #ifdef __KERNEL__ + #include <linux/init.h> +#include <linux/list.h> +#include <linux/rwsem.h> +#include <linux/reiserfs_fs_i.h> +#include <linux/reiserfs_fs.h> + +struct inode; +struct dentry; +struct iattr; +struct super_block; +struct nameidata; struct reiserfs_xattr_handler { char *prefix; @@ -49,9 +63,7 @@ int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int); extern struct reiserfs_xattr_handler user_handler; extern struct reiserfs_xattr_handler trusted_handler; -#ifdef CONFIG_REISERFS_FS_SECURITY extern struct reiserfs_xattr_handler security_handler; -#endif int reiserfs_xattr_register_handlers(void) __init; void reiserfs_xattr_unregister_handlers(void); @@ -137,6 +149,8 @@ static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags) static inline void reiserfs_init_xattr_rwsem(struct inode *inode) { } -#endif +#endif /* CONFIG_REISERFS_FS_XATTR */ + +#endif /* __KERNEL__ */ -#endif /* __KERNEL__ */ +#endif /* _LINUX_REISERFS_XATTR_H */ diff --git a/include/linux/relay.h b/include/linux/relay.h index c6a48bfc8b14..759a0f97bec2 100644 --- a/include/linux/relay.h +++ b/include/linux/relay.h @@ -24,7 +24,7 @@ /* * Tracks changes to rchan/rchan_buf structs */ -#define RELAYFS_CHANNEL_VERSION 6 +#define RELAYFS_CHANNEL_VERSION 7 /* * Per-cpu relay channel buffer @@ -64,6 +64,10 @@ struct rchan void *private_data; /* for user-defined data */ size_t last_toobig; /* tried to log event > subbuf size */ struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ + int is_global; /* One global buffer ? */ + struct list_head list; /* for channel list */ + struct dentry *parent; /* parent dentry passed to open */ + char base_filename[NAME_MAX]; /* saved base filename */ }; /* @@ -162,7 +166,8 @@ struct rchan *relay_open(const char *base_filename, struct dentry *parent, size_t subbuf_size, size_t n_subbufs, - struct rchan_callbacks *cb); + struct rchan_callbacks *cb, + void *private_data); extern void relay_close(struct rchan *chan); extern void relay_flush(struct rchan *chan); extern void relay_subbufs_consumed(struct rchan *chan, diff --git a/include/linux/rio.h b/include/linux/rio.h index d93857056cb9..68e3f6853fa6 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h @@ -25,6 +25,7 @@ #define RIO_ANY_DESTID 0xff #define RIO_NO_HOPCOUNT -1 +#define RIO_INVALID_DESTID 0xffff #define RIO_MAX_MPORT_RESOURCES 16 #define RIO_MAX_DEV_RESOURCES 16 diff --git a/include/linux/sched.h b/include/linux/sched.h index 446373535190..5053dc01fad4 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -436,7 +436,7 @@ struct signal_struct { /* job control IDs */ pid_t pgrp; - pid_t tty_old_pgrp; + struct pid *tty_old_pgrp; union { pid_t session __deprecated; @@ -1013,8 +1013,10 @@ struct task_struct { * to a stack based synchronous wait) if its doing sync IO. */ wait_queue_t *io_wait; +#ifdef CONFIG_TASK_XACCT /* i/o counters(bytes read/written, #syscalls */ u64 rchar, wchar, syscr, syscw; +#endif struct task_io_accounting ioac; #if defined(CONFIG_TASK_XACCT) u64 acct_rss_mem1; /* accumulated rss usage */ @@ -1327,14 +1329,11 @@ extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); extern int kill_pgrp(struct pid *pid, int sig, int priv); extern int kill_pid(struct pid *pid, int sig, int priv); -extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); -extern int kill_pg_info(int, struct siginfo *, pid_t); extern void do_notify_parent(struct task_struct *, int); extern void force_sig(int, struct task_struct *); extern void force_sig_specific(int, struct task_struct *); extern int send_sig(int, struct task_struct *, int); extern void zap_other_threads(struct task_struct *p); -extern int kill_pg(pid_t, int, int); extern int kill_proc(pid_t, int, int); extern struct sigqueue *sigqueue_alloc(void); extern void sigqueue_free(struct sigqueue *); @@ -1649,6 +1648,44 @@ extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); extern void normalize_rt_tasks(void); +#ifdef CONFIG_TASK_XACCT +static inline void add_rchar(struct task_struct *tsk, ssize_t amt) +{ + tsk->rchar += amt; +} + +static inline void add_wchar(struct task_struct *tsk, ssize_t amt) +{ + tsk->wchar += amt; +} + +static inline void inc_syscr(struct task_struct *tsk) +{ + tsk->syscr++; +} + +static inline void inc_syscw(struct task_struct *tsk) +{ + tsk->syscw++; +} +#else +static inline void add_rchar(struct task_struct *tsk, ssize_t amt) +{ +} + +static inline void add_wchar(struct task_struct *tsk, ssize_t amt) +{ +} + +static inline void inc_syscr(struct task_struct *tsk) +{ +} + +static inline void inc_syscw(struct task_struct *tsk) +{ +} +#endif + #endif /* __KERNEL__ */ #endif diff --git a/include/linux/security.h b/include/linux/security.h index 83cdefae9931..7f88d97575fd 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -492,7 +492,7 @@ struct request_sock; * Note that the fown_struct, @fown, is never outside the context of a * struct file, so the file structure (and associated security information) * can always be obtained: - * (struct file *)((long)fown - offsetof(struct file,f_owner)); + * container_of(fown, struct file, f_owner) * @tsk contains the structure of task receiving signal. * @fown contains the file owner information. * @sig is the signal that will be sent. When 0, kernel sends SIGIO. @@ -2130,7 +2130,7 @@ extern int mod_reg_security (const char *name, struct security_operations *ops); extern int mod_unreg_security (const char *name, struct security_operations *ops); extern struct dentry *securityfs_create_file(const char *name, mode_t mode, struct dentry *parent, void *data, - struct file_operations *fops); + const struct file_operations *fops); extern struct dentry *securityfs_create_dir(const char *name, struct dentry *parent); extern void securityfs_remove(struct dentry *dentry); diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 4b463e66ddea..5e4364644ed1 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h @@ -19,7 +19,9 @@ struct cache_sizes { size_t cs_size; struct kmem_cache *cs_cachep; +#ifdef CONFIG_ZONE_DMA struct kmem_cache *cs_dmacachep; +#endif }; extern struct cache_sizes malloc_sizes[]; @@ -39,9 +41,12 @@ static inline void *kmalloc(size_t size, gfp_t flags) __you_cannot_kmalloc_that_much(); } found: - return kmem_cache_alloc((flags & GFP_DMA) ? - malloc_sizes[i].cs_dmacachep : - malloc_sizes[i].cs_cachep, flags); +#ifdef CONFIG_ZONE_DMA + if (flags & GFP_DMA) + return kmem_cache_alloc(malloc_sizes[i].cs_dmacachep, + flags); +#endif + return kmem_cache_alloc(malloc_sizes[i].cs_cachep, flags); } return __kmalloc(size, flags); } @@ -62,9 +67,12 @@ static inline void *kzalloc(size_t size, gfp_t flags) __you_cannot_kzalloc_that_much(); } found: - return kmem_cache_zalloc((flags & GFP_DMA) ? - malloc_sizes[i].cs_dmacachep : - malloc_sizes[i].cs_cachep, flags); +#ifdef CONFIG_ZONE_DMA + if (flags & GFP_DMA) + return kmem_cache_zalloc(malloc_sizes[i].cs_dmacachep, + flags); +#endif + return kmem_cache_zalloc(malloc_sizes[i].cs_cachep, flags); } return __kzalloc(size, flags); } @@ -88,9 +96,13 @@ static inline void *kmalloc_node(size_t size, gfp_t flags, int node) __you_cannot_kmalloc_that_much(); } found: - return kmem_cache_alloc_node((flags & GFP_DMA) ? - malloc_sizes[i].cs_dmacachep : - malloc_sizes[i].cs_cachep, flags, node); +#ifdef CONFIG_ZONE_DMA + if (flags & GFP_DMA) + return kmem_cache_alloc_node(malloc_sizes[i].cs_dmacachep, + flags, node); +#endif + return kmem_cache_alloc_node(malloc_sizes[i].cs_cachep, + flags, node); } return __kmalloc_node(size, flags, node); } diff --git a/include/linux/socket.h b/include/linux/socket.h index fcd35a210e7f..28157a36e6cc 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -16,7 +16,7 @@ struct __kernel_sockaddr_storage { /* _SS_MAXSIZE value minus size of ss_family */ } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) +#ifdef __KERNEL__ #include <asm/socket.h> /* arch-dependent defines */ #include <linux/sockios.h> /* the SIOCxxx I/O controls */ diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index adb3dafd33e9..3387e44dfd13 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h @@ -5,9 +5,17 @@ * * It's OK if the min/max values are zero. */ +enum ads7846_filter { + ADS7846_FILTER_OK, + ADS7846_FILTER_REPEAT, + ADS7846_FILTER_IGNORE, +}; + struct ads7846_platform_data { u16 model; /* 7843, 7845, 7846. */ u16 vref_delay_usecs; /* 0 for external vref; etc */ + int keep_vref_on:1; /* set to keep vref on for differential + * measurements as well */ u16 x_plate_ohms; u16 y_plate_ohms; @@ -21,5 +29,9 @@ struct ads7846_platform_data { u16 debounce_rep; /* additional consecutive good readings * required after the first two */ int (*get_pendown_state)(void); + int (*filter_init) (struct ads7846_platform_data *pdata, + void **filter_data); + int (*filter) (void *filter_data, int data_idx, int *val); + void (*filter_cleanup)(void *filter_data); }; diff --git a/include/linux/spi/eeprom.h b/include/linux/spi/eeprom.h new file mode 100644 index 000000000000..1085212c446e --- /dev/null +++ b/include/linux/spi/eeprom.h @@ -0,0 +1,22 @@ +#ifndef __LINUX_SPI_EEPROM_H +#define __LINUX_SPI_EEPROM_H + +/* + * Put one of these structures in platform_data for SPI EEPROMS handled + * by the "at25" driver. On SPI, most EEPROMS understand the same core + * command set. If you need to support EEPROMs that don't yet fit, add + * flags to support those protocol options. These values all come from + * the chip datasheets. + */ +struct spi_eeprom { + u32 byte_len; + char name[10]; + u16 page_size; /* for writes */ + u16 flags; +#define EE_ADDR1 0x0001 /* 8 bit addrs */ +#define EE_ADDR2 0x0002 /* 16 bit addrs */ +#define EE_ADDR3 0x0004 /* 24 bit addrs */ +#define EE_READONLY 0x0008 /* disallow writes */ +}; + +#endif /* __LINUX_SPI_EEPROM_H */ diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 176f6e36dbfa..4f0f8c2e58a5 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -114,6 +114,17 @@ static inline void spi_set_ctldata(struct spi_device *spi, void *state) spi->controller_state = state; } +/* device driver data */ + +static inline void spi_set_drvdata(struct spi_device *spi, void *data) +{ + dev_set_drvdata(&spi->dev, data); +} + +static inline void *spi_get_drvdata(struct spi_device *spi) +{ + return dev_get_drvdata(&spi->dev); +} struct spi_message; @@ -137,13 +148,11 @@ extern int spi_register_driver(struct spi_driver *sdrv); static inline void spi_unregister_driver(struct spi_driver *sdrv) { - if (!sdrv) - return; - driver_unregister(&sdrv->driver); + if (sdrv) + driver_unregister(&sdrv->driver); } - /** * struct spi_master - interface to SPI master controller * @cdev: class interface to this driver @@ -154,7 +163,8 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) * each slave has a chipselect signal, but it's common that not * every chipselect is connected to a slave. * @setup: updates the device mode and clocking records used by a - * device's SPI controller; protocol code may call this. + * device's SPI controller; protocol code may call this. This + * must fail if an unrecognized or unsupported mode is requested. * @transfer: adds a message to the controller's transfer queue. * @cleanup: frees controller-specific state * @@ -211,7 +221,7 @@ struct spi_master { struct spi_message *mesg); /* called on release() to free memory provided by spi_master */ - void (*cleanup)(const struct spi_device *spi); + void (*cleanup)(struct spi_device *spi); }; static inline void *spi_master_get_devdata(struct spi_master *master) @@ -296,6 +306,16 @@ extern struct spi_master *spi_busnum_to_master(u16 busnum); * shifting out three bytes with word size of sixteen or twenty bits; * the former uses two bytes per word, the latter uses four bytes.) * + * In-memory data values are always in native CPU byte order, translated + * from the wire byte order (big-endian except with SPI_LSB_FIRST). So + * for example when bits_per_word is sixteen, buffers are 2N bytes long + * and hold N sixteen bit words in CPU byte order. + * + * When the word size of the SPI transfer is not a power-of-two multiple + * of eight bits, those in-memory words include extra bits. In-memory + * words are always seen by protocol drivers as right-justified, so the + * undefined (rx) or unused (tx) bits are always the most significant bits. + * * All SPI transfers start with the relevant chipselect active. Normally * it stays selected until after the last transfer in a message. Drivers * can affect the chipselect signal using cs_change: @@ -453,6 +473,11 @@ static inline void spi_message_free(struct spi_message *m) * changes those settings, and must be called from a context that can sleep. * The changes take effect the next time the device is selected and data * is transferred to or from it. + * + * Note that this call wil fail if the protocol driver specifies an option + * that the underlying controller or its driver does not support. For + * example, not all hardware supports wire transfers using nine bit words, + * LSB-first wire encoding, or active-high chipselects. */ static inline int spi_setup(struct spi_device *spi) diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h index 16ce178f54d7..2e8c048b9b80 100644 --- a/include/linux/spi/spi_bitbang.h +++ b/include/linux/spi/spi_bitbang.h @@ -55,7 +55,7 @@ struct spi_bitbang { * methods, if you like. */ extern int spi_bitbang_setup(struct spi_device *spi); -extern void spi_bitbang_cleanup(const struct spi_device *spi); +extern void spi_bitbang_cleanup(struct spi_device *spi); extern int spi_bitbang_transfer(struct spi_device *spi, struct spi_message *m); extern int spi_bitbang_setup_transfer(struct spi_device *spi, struct spi_transfer *t); diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 94b767d64275..61fef376ed2e 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h @@ -228,15 +228,30 @@ do { \ # define read_unlock_irq(lock) _read_unlock_irq(lock) # define write_unlock_irq(lock) _write_unlock_irq(lock) #else -# define spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock) -# define read_unlock(lock) __raw_read_unlock(&(lock)->raw_lock) -# define write_unlock(lock) __raw_write_unlock(&(lock)->raw_lock) -# define spin_unlock_irq(lock) \ - do { __raw_spin_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) -# define read_unlock_irq(lock) \ - do { __raw_read_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) -# define write_unlock_irq(lock) \ - do { __raw_write_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) +# define spin_unlock(lock) \ + do {__raw_spin_unlock(&(lock)->raw_lock); __release(lock); } while (0) +# define read_unlock(lock) \ + do {__raw_read_unlock(&(lock)->raw_lock); __release(lock); } while (0) +# define write_unlock(lock) \ + do {__raw_write_unlock(&(lock)->raw_lock); __release(lock); } while (0) +# define spin_unlock_irq(lock) \ +do { \ + __raw_spin_unlock(&(lock)->raw_lock); \ + __release(lock); \ + local_irq_enable(); \ +} while (0) +# define read_unlock_irq(lock) \ +do { \ + __raw_read_unlock(&(lock)->raw_lock); \ + __release(lock); \ + local_irq_enable(); \ +} while (0) +# define write_unlock_irq(lock) \ +do { \ + __raw_write_unlock(&(lock)->raw_lock); \ + __release(lock); \ + local_irq_enable(); \ +} while (0) #endif #define spin_unlock_irqrestore(lock, flags) \ diff --git a/include/linux/stat.h b/include/linux/stat.h index 679ef0d70b6b..4f8539ccff6c 100644 --- a/include/linux/stat.h +++ b/include/linux/stat.h @@ -7,7 +7,7 @@ #endif -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) +#ifdef __KERNEL__ #define S_IFMT 00170000 #define S_IFSOCK 0140000 diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 64f3d60c72af..83b3c7b433aa 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -11,6 +11,7 @@ #define SUNRPC_SVC_H #include <linux/in.h> +#include <linux/in6.h> #include <linux/sunrpc/types.h> #include <linux/sunrpc/xdr.h> #include <linux/sunrpc/auth.h> @@ -191,7 +192,13 @@ static inline void svc_putu32(struct kvec *iov, __be32 val) iov->iov_len += sizeof(__be32); } - +union svc_addr_u { + struct in_addr addr; +#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) + struct in6_addr addr6; +#endif +}; + /* * The context of a single thread, including the request currently being * processed. @@ -200,8 +207,8 @@ struct svc_rqst { struct list_head rq_list; /* idle list */ struct list_head rq_all; /* all threads list */ struct svc_sock * rq_sock; /* socket */ - struct sockaddr_in rq_addr; /* peer address */ - int rq_addrlen; + struct sockaddr_storage rq_addr; /* peer address */ + size_t rq_addrlen; struct svc_serv * rq_server; /* RPC service definition */ struct svc_pool * rq_pool; /* thread pool */ @@ -227,8 +234,8 @@ struct svc_rqst { unsigned short rq_secure : 1; /* secure port */ - - __be32 rq_daddr; /* dest addr of request - reply from here */ + union svc_addr_u rq_daddr; /* dest addr of request + * - reply from here */ void * rq_argp; /* decoded arguments */ void * rq_resp; /* xdr'd results */ @@ -256,6 +263,24 @@ struct svc_rqst { }; /* + * Rigorous type checking on sockaddr type conversions + */ +static inline struct sockaddr_in *svc_addr_in(struct svc_rqst *rqst) +{ + return (struct sockaddr_in *) &rqst->rq_addr; +} + +static inline struct sockaddr_in6 *svc_addr_in6(struct svc_rqst *rqst) +{ + return (struct sockaddr_in6 *) &rqst->rq_addr; +} + +static inline struct sockaddr *svc_addr(struct svc_rqst *rqst) +{ + return (struct sockaddr *) &rqst->rq_addr; +} + +/* * Check buffer bounds after decoding arguments */ static inline int @@ -292,9 +317,10 @@ static inline void svc_free_res_pages(struct svc_rqst *rqstp) struct svc_deferred_req { u32 prot; /* protocol (UDP or TCP) */ - struct sockaddr_in addr; - struct svc_sock *svsk; /* where reply must go */ - __be32 daddr; /* where reply must come from */ + struct svc_sock *svsk; + struct sockaddr_storage addr; /* where reply must go */ + size_t addrlen; + union svc_addr_u daddr; /* where reply must come from */ struct cache_deferred_req handle; int argslen; __be32 args[0]; @@ -368,5 +394,8 @@ int svc_register(struct svc_serv *, int, unsigned short); void svc_wake_up(struct svc_serv *); void svc_reserve(struct svc_rqst *rqstp, int space); struct svc_pool * svc_pool_for_cpu(struct svc_serv *serv, int cpu); +char * svc_print_addr(struct svc_rqst *, char *, size_t); + +#define RPC_MAX_ADDRBUFLEN (63U) #endif /* SUNRPC_SVC_H */ diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index db312a1e2eeb..cccea0a0feb4 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h @@ -57,12 +57,15 @@ struct svc_sock { /* cache of various info for TCP sockets */ void *sk_info_authunix; + + struct sockaddr_storage sk_remote; /* remote peer's address */ + int sk_remotelen; /* length of address */ }; /* * Function prototypes. */ -int svc_makesock(struct svc_serv *, int, unsigned short); +int svc_makesock(struct svc_serv *, int, unsigned short, int flags); void svc_close_socket(struct svc_sock *); int svc_recv(struct svc_rqst *, long); int svc_send(struct svc_rqst *); @@ -74,4 +77,11 @@ int svc_addsock(struct svc_serv *serv, char *name_return, int *proto); +/* + * svc_makesock socket characteristics + */ +#define SVC_SOCK_DEFAULTS (0U) +#define SVC_SOCK_ANONYMOUS (1U << 0) /* don't register with pmap */ +#define SVC_SOCK_TEMPORARY (1U << 1) /* flag socket as temporary */ + #endif /* SUNRPC_SVCSOCK_H */ diff --git a/include/linux/svga.h b/include/linux/svga.h new file mode 100644 index 000000000000..eadb981bb37c --- /dev/null +++ b/include/linux/svga.h @@ -0,0 +1,124 @@ +#ifndef _LINUX_SVGA_H +#define _LINUX_SVGA_H + +#ifdef __KERNEL__ + +#include <linux/pci.h> +#include <video/vga.h> + +/* Terminator for register set */ + +#define VGA_REGSET_END_VAL 0xFF +#define VGA_REGSET_END {VGA_REGSET_END_VAL, 0, 0} + +struct vga_regset { + u8 regnum; + u8 lowbit; + u8 highbit; +}; + +/* ------------------------------------------------------------------------- */ + +#define SVGA_FORMAT_END_VAL 0xFFFF +#define SVGA_FORMAT_END {SVGA_FORMAT_END_VAL, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, 0, 0, 0, 0, 0, 0} + +struct svga_fb_format { + /* var part */ + u32 bits_per_pixel; + struct fb_bitfield red; + struct fb_bitfield green; + struct fb_bitfield blue; + struct fb_bitfield transp; + u32 nonstd; + /* fix part */ + u32 type; + u32 type_aux; + u32 visual; + u32 xpanstep; + u32 xresstep; +}; + +struct svga_timing_regs { + const struct vga_regset *h_total_regs; + const struct vga_regset *h_display_regs; + const struct vga_regset *h_blank_start_regs; + const struct vga_regset *h_blank_end_regs; + const struct vga_regset *h_sync_start_regs; + const struct vga_regset *h_sync_end_regs; + + const struct vga_regset *v_total_regs; + const struct vga_regset *v_display_regs; + const struct vga_regset *v_blank_start_regs; + const struct vga_regset *v_blank_end_regs; + const struct vga_regset *v_sync_start_regs; + const struct vga_regset *v_sync_end_regs; +}; + +struct svga_pll { + u16 m_min; + u16 m_max; + u16 n_min; + u16 n_max; + u16 r_min; + u16 r_max; /* r_max < 32 */ + u32 f_vco_min; + u32 f_vco_max; + u32 f_base; +}; + + +/* Write a value to the attribute register */ + +static inline void svga_wattr(u8 index, u8 data) +{ + inb(0x3DA); + outb(index, 0x3C0); + outb(data, 0x3C0); +} + +/* Write a value to a sequence register with a mask */ + +static inline void svga_wseq_mask(u8 index, u8 data, u8 mask) +{ + vga_wseq(NULL, index, (data & mask) | (vga_rseq(NULL, index) & ~mask)); +} + +/* Write a value to a CRT register with a mask */ + +static inline void svga_wcrt_mask(u8 index, u8 data, u8 mask) +{ + vga_wcrt(NULL, index, (data & mask) | (vga_rcrt(NULL, index) & ~mask)); +} + +static inline int svga_primary_device(struct pci_dev *dev) +{ + u16 flags; + pci_read_config_word(dev, PCI_COMMAND, &flags); + return (flags & PCI_COMMAND_IO); +} + + +void svga_wcrt_multi(const struct vga_regset *regset, u32 value); +void svga_wseq_multi(const struct vga_regset *regset, u32 value); + +void svga_set_default_gfx_regs(void); +void svga_set_default_atc_regs(void); +void svga_set_default_seq_regs(void); +void svga_set_default_crt_regs(void); +void svga_set_textmode_vga_regs(void); + +void svga_settile(struct fb_info *info, struct fb_tilemap *map); +void svga_tilecopy(struct fb_info *info, struct fb_tilearea *area); +void svga_tilefill(struct fb_info *info, struct fb_tilerect *rect); +void svga_tileblit(struct fb_info *info, struct fb_tileblit *blit); +void svga_tilecursor(struct fb_info *info, struct fb_tilecursor *cursor); + +int svga_compute_pll(const struct svga_pll *pll, u32 f_wanted, u16 *m, u16 *n, u16 *r, int node); +int svga_check_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, int node); +void svga_set_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, u32 hmul, u32 hdiv, u32 vmul, u32 vdiv, u32 hborder, int node); + +int svga_match_format(const struct svga_fb_format *frm, struct fb_var_screeninfo *var, struct fb_fix_screeninfo *fix); + +#endif /* __KERNEL__ */ +#endif /* _LINUX_SVGA_H */ + diff --git a/include/linux/swap.h b/include/linux/swap.h index 5423559a44a6..006868881346 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -170,11 +170,13 @@ extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct * extern unsigned long totalram_pages; extern unsigned long totalreserve_pages; extern long nr_swap_pages; -extern unsigned int nr_free_pages(void); -extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat); extern unsigned int nr_free_buffer_pages(void); extern unsigned int nr_free_pagecache_pages(void); +/* Definition of global_page_state not available yet */ +#define nr_free_pages() global_page_state(NR_FREE_PAGES) + + /* linux/mm/swap.c */ extern void FASTCALL(lru_cache_add(struct page *)); extern void FASTCALL(lru_cache_add_active(struct page *)); diff --git a/include/linux/time.h b/include/linux/time.h index a5b739967b74..55cee172d723 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -46,7 +46,7 @@ static inline int timespec_equal(struct timespec *a, struct timespec *b) * lhs == rhs: return 0 * lhs > rhs: return >0 */ -static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs) +static inline int timespec_compare(const struct timespec *lhs, const struct timespec *rhs) { if (lhs->tv_sec < rhs->tv_sec) return -1; @@ -55,7 +55,7 @@ static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs) return lhs->tv_nsec - rhs->tv_nsec; } -static inline int timeval_compare(struct timeval *lhs, struct timeval *rhs) +static inline int timeval_compare(const struct timeval *lhs, const struct timeval *rhs) { if (lhs->tv_sec < rhs->tv_sec) return -1; diff --git a/include/linux/timex.h b/include/linux/timex.h index db501dc23c29..9a24e500c311 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h @@ -255,10 +255,10 @@ struct time_interpolator { u8 jitter; /* if set compensate for fluctuations */ u32 nsec_per_cyc; /* set by register_time_interpolator() */ void *addr; /* address of counter or function */ - u64 mask; /* mask the valid bits of the counter */ + cycles_t mask; /* mask the valid bits of the counter */ unsigned long offset; /* nsec offset at last update of interpolator */ u64 last_counter; /* counter value in units of the counter at last update */ - u64 last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */ + cycles_t last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */ u64 frequency; /* frequency in counts/second */ long drift; /* drift in parts-per-million (or -1) */ unsigned long skips; /* skips forward */ diff --git a/include/linux/toshiba.h b/include/linux/toshiba.h index 916e5e3a699b..6a7c4edf0e13 100644 --- a/include/linux/toshiba.h +++ b/include/linux/toshiba.h @@ -33,4 +33,6 @@ typedef struct { unsigned int edi __attribute__ ((packed)); } SMMRegisters; +int tosh_smm(SMMRegisters *regs); + #endif diff --git a/include/linux/tty.h b/include/linux/tty.h index 65cbcf22c31e..dee72b9a20fb 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -24,7 +24,27 @@ #define NR_PTYS CONFIG_LEGACY_PTY_COUNT /* Number of legacy ptys */ #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ -#define NR_LDISCS 16 +#define NR_LDISCS 17 + +/* line disciplines */ +#define N_TTY 0 +#define N_SLIP 1 +#define N_MOUSE 2 +#define N_PPP 3 +#define N_STRIP 4 +#define N_AX25 5 +#define N_X25 6 /* X.25 async */ +#define N_6PACK 7 +#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ +#define N_R3964 9 /* Reserved for Simatic R3964 module */ +#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ +#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ +#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */ + /* cards about SMS messages */ +#define N_HDLC 13 /* synchronous HDLC */ +#define N_SYNC_PPP 14 /* synchronous PPP */ +#define N_HCI 15 /* Bluetooth HCI UART */ +#define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */ /* * This character is the same as _POSIX_VDISABLE: it cannot be used as @@ -177,8 +197,8 @@ struct tty_struct { struct mutex termios_mutex; struct ktermios *termios, *termios_locked; char name[64]; - int pgrp; - int session; + struct pid *pgrp; + struct pid *session; unsigned long flags; int count; struct winsize winsize; @@ -283,7 +303,7 @@ extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, int buflen); extern void tty_write_message(struct tty_struct *tty, char *msg); -extern int is_orphaned_pgrp(int pgrp); +extern int is_current_pgrp_orphaned(void); extern int is_ignored(int sig); extern int tty_signal(int sig, struct tty_struct *tty); extern void tty_hangup(struct tty_struct * tty); @@ -291,6 +311,7 @@ extern void tty_vhangup(struct tty_struct * tty); extern void tty_unhangup(struct file *filp); extern int tty_hung_up_p(struct file * filp); extern void do_SAK(struct tty_struct *tty); +extern void __do_SAK(struct tty_struct *tty); extern void disassociate_ctty(int priv); extern void tty_flip_buffer_push(struct tty_struct *tty); extern speed_t tty_get_baud_rate(struct tty_struct *tty); @@ -312,7 +333,6 @@ extern int tty_ioctl(struct inode *inode, struct file *file, unsigned int cmd, extern dev_t tty_devnum(struct tty_struct *tty); extern void proc_clear_tty(struct task_struct *p); -extern void __proc_set_tty(struct task_struct *tsk, struct tty_struct *tty); extern void proc_set_tty(struct task_struct *tsk, struct tty_struct *tty); extern struct tty_struct *get_current_tty(void); diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index d3a4f994a5dc..dc2e9fe69418 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h @@ -40,13 +40,16 @@ typedef __u64 __fs64; typedef __u32 __fs32; typedef __u16 __fs16; #else +#include <asm/div64.h> typedef __u64 __bitwise __fs64; typedef __u32 __bitwise __fs32; typedef __u16 __bitwise __fs16; #endif +#ifdef __KERNEL__ #include <linux/ufs_fs_i.h> #include <linux/ufs_fs_sb.h> +#endif #define UFS_BBLOCK 0 #define UFS_BBSIZE 8192 @@ -261,17 +264,10 @@ typedef __u16 __bitwise __fs16; */ #define ufs_inotocg(x) ((x) / uspi->s_ipg) #define ufs_inotocgoff(x) ((x) % uspi->s_ipg) -#define ufs_inotofsba(x) (ufs_cgimin(ufs_inotocg(x)) + ufs_inotocgoff(x) / uspi->s_inopf) +#define ufs_inotofsba(x) (((u64)ufs_cgimin(ufs_inotocg(x))) + ufs_inotocgoff(x) / uspi->s_inopf) #define ufs_inotofsbo(x) ((x) % uspi->s_inopf) /* - * Give cylinder group number for a file system block. - * Give cylinder group block number for a file system block. - */ -#define ufs_dtog(d) ((d) / uspi->s_fpg) -#define ufs_dtogd(d) ((d) % uspi->s_fpg) - -/* * Compute the cylinder and rotational position of a cyl block addr. */ #define ufs_cbtocylno(bno) \ @@ -303,7 +299,7 @@ typedef __u16 __bitwise __fs16; #define UFS_MAXMNTLEN 512 #define UFS2_MAXMNTLEN 468 #define UFS2_MAXVOLLEN 32 -/* #define UFS_MAXCSBUFS 31 */ +#define UFS_MAXCSBUFS 31 #define UFS_LINK_MAX 32000 /* #define UFS2_NOCSPTRS ((128 / sizeof(void *)) - 4) @@ -721,6 +717,7 @@ struct ufs_cg_private_info { __u32 c_nclusterblks; /* number of clusters this cg */ }; + struct ufs_sb_private_info { struct ufs_buffer_head s_ubh; /* buffer containing super block */ struct ufs_csum_core cs_total; @@ -754,7 +751,7 @@ struct ufs_sb_private_info { __u32 s_npsect; /* # sectors/track including spares */ __u32 s_interleave; /* hardware sector interleave */ __u32 s_trackskew; /* sector 0 skew, per track */ - __u32 s_csaddr; /* blk addr of cyl grp summary area */ + __u64 s_csaddr; /* blk addr of cyl grp summary area */ __u32 s_cssize; /* size of cyl grp summary area */ __u32 s_cgsize; /* cylinder group size */ __u32 s_ntrak; /* tracks per cylinder */ @@ -950,17 +947,17 @@ struct ufs_super_block_third { #ifdef __KERNEL__ /* balloc.c */ -extern void ufs_free_fragments (struct inode *, unsigned, unsigned); -extern void ufs_free_blocks (struct inode *, unsigned, unsigned); -extern unsigned ufs_new_fragments(struct inode *, __fs32 *, unsigned, unsigned, - unsigned, int *, struct page *); +extern void ufs_free_fragments (struct inode *, u64, unsigned); +extern void ufs_free_blocks (struct inode *, u64, unsigned); +extern u64 ufs_new_fragments(struct inode *, void *, u64, u64, + unsigned, int *, struct page *); /* cylinder.c */ extern struct ufs_cg_private_info * ufs_load_cylinder (struct super_block *, unsigned); extern void ufs_put_cylinder (struct super_block *, unsigned); /* dir.c */ -extern struct inode_operations ufs_dir_inode_operations; +extern const struct inode_operations ufs_dir_inode_operations; extern int ufs_add_link (struct dentry *, struct inode *); extern ino_t ufs_inode_by_name(struct inode *, struct dentry *); extern int ufs_make_empty(struct inode *, struct inode *); @@ -972,7 +969,7 @@ extern void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de, struct page *page, struct inode *inode); /* file.c */ -extern struct inode_operations ufs_file_inode_operations; +extern const struct inode_operations ufs_file_inode_operations; extern const struct file_operations ufs_file_operations; extern const struct address_space_operations ufs_aops; @@ -999,7 +996,7 @@ extern void ufs_error (struct super_block *, const char *, const char *, ...) __ extern void ufs_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); /* symlink.c */ -extern struct inode_operations ufs_fast_symlink_inode_operations; +extern const struct inode_operations ufs_fast_symlink_inode_operations; /* truncate.c */ extern int ufs_truncate (struct inode *, loff_t); @@ -1014,6 +1011,22 @@ static inline struct ufs_inode_info *UFS_I(struct inode *inode) return container_of(inode, struct ufs_inode_info, vfs_inode); } +/* + * Give cylinder group number for a file system block. + * Give cylinder group block number for a file system block. + */ +/* #define ufs_dtog(d) ((d) / uspi->s_fpg) */ +static inline u64 ufs_dtog(struct ufs_sb_private_info * uspi, u64 b) +{ + do_div(b, uspi->s_fpg); + return b; +} +/* #define ufs_dtogd(d) ((d) % uspi->s_fpg) */ +static inline u32 ufs_dtogd(struct ufs_sb_private_info * uspi, u64 b) +{ + return do_div(b, uspi->s_fpg); +} + #endif /* __KERNEL__ */ #endif /* __LINUX_UFS_FS_H */ diff --git a/include/linux/ufs_fs_i.h b/include/linux/ufs_fs_i.h index f50ce3b0cd52..6496caa82f9e 100644 --- a/include/linux/ufs_fs_i.h +++ b/include/linux/ufs_fs_i.h @@ -20,13 +20,12 @@ struct ufs_inode_info { __fs64 u2_i_data[15]; } i_u1; __u32 i_flags; - __u32 i_gen; __u32 i_shadow; __u32 i_unused1; __u32 i_unused2; __u32 i_oeftflag; __u16 i_osync; - __u32 i_lastfrag; + __u64 i_lastfrag; __u32 i_dir_start_lookup; struct inode vfs_inode; }; diff --git a/include/linux/ufs_fs_sb.h b/include/linux/ufs_fs_sb.h index 8ff13c160f3d..e114c93fc578 100644 --- a/include/linux/ufs_fs_sb.h +++ b/include/linux/ufs_fs_sb.h @@ -21,7 +21,6 @@ struct ufs_sb_private_info; struct ufs_cg_private_info; struct ufs_csum; -#define UFS_MAXCSBUFS 31 struct ufs_sb_info { struct ufs_sb_private_info * s_uspi; diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 5e9803ed17fc..acb1f105870c 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h @@ -3,20 +3,15 @@ #include <linux/types.h> #include <linux/percpu.h> +#include <linux/mm.h> #include <linux/mmzone.h> #include <asm/atomic.h> -#ifdef CONFIG_VM_EVENT_COUNTERS -/* - * Light weight per cpu counter implementation. - * - * Counters should only be incremented. You need to set EMBEDDED - * to disable VM_EVENT_COUNTERS. Things like procps (vmstat, - * top, etc) use /proc/vmstat and depend on these counters. - * - * Counters are handled completely inline. On many platforms the code - * generated will simply be the increment of a global address. - */ +#ifdef CONFIG_ZONE_DMA +#define DMA_ZONE(xx) xx##_DMA, +#else +#define DMA_ZONE(xx) +#endif #ifdef CONFIG_ZONE_DMA32 #define DMA32_ZONE(xx) xx##_DMA32, @@ -30,7 +25,7 @@ #define HIGHMEM_ZONE(xx) #endif -#define FOR_ALL_ZONES(xx) xx##_DMA, DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) +#define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, FOR_ALL_ZONES(PGALLOC), @@ -45,6 +40,17 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, NR_VM_EVENT_ITEMS }; +#ifdef CONFIG_VM_EVENT_COUNTERS +/* + * Light weight per cpu counter implementation. + * + * Counters should only be incremented and no critical kernel component + * should rely on the counter values. + * + * Counters are handled completely inline. On many platforms the code + * generated will simply be the increment of a global address. + */ + struct vm_event_state { unsigned long event[NR_VM_EVENT_ITEMS]; }; @@ -85,17 +91,30 @@ static inline void vm_events_fold_cpu(int cpu) #else /* Disable counters */ -#define get_cpu_vm_events(e) 0L -#define count_vm_event(e) do { } while (0) -#define count_vm_events(e,d) do { } while (0) -#define __count_vm_event(e) do { } while (0) -#define __count_vm_events(e,d) do { } while (0) -#define vm_events_fold_cpu(x) do { } while (0) +static inline void count_vm_event(enum vm_event_item item) +{ +} +static inline void count_vm_events(enum vm_event_item item, long delta) +{ +} +static inline void __count_vm_event(enum vm_event_item item) +{ +} +static inline void __count_vm_events(enum vm_event_item item, long delta) +{ +} +static inline void all_vm_events(unsigned long *ret) +{ +} +static inline void vm_events_fold_cpu(int cpu) +{ +} #endif /* CONFIG_VM_EVENT_COUNTERS */ #define __count_zone_vm_events(item, zone, delta) \ - __count_vm_events(item##_DMA + zone_idx(zone), delta) + __count_vm_events(item##_NORMAL - ZONE_NORMAL + \ + zone_idx(zone), delta) /* * Zone based page accounting with per cpu differentials. @@ -142,14 +161,16 @@ static inline unsigned long node_page_state(int node, struct zone *zones = NODE_DATA(node)->node_zones; return +#ifdef CONFIG_ZONE_DMA + zone_page_state(&zones[ZONE_DMA], item) + +#endif #ifdef CONFIG_ZONE_DMA32 zone_page_state(&zones[ZONE_DMA32], item) + #endif - zone_page_state(&zones[ZONE_NORMAL], item) + #ifdef CONFIG_HIGHMEM zone_page_state(&zones[ZONE_HIGHMEM], item) + #endif - zone_page_state(&zones[ZONE_DMA], item); + zone_page_state(&zones[ZONE_NORMAL], item); } extern void zone_statistics(struct zonelist *, struct zone *); @@ -186,6 +207,9 @@ void inc_zone_page_state(struct page *, enum zone_stat_item); void dec_zone_page_state(struct page *, enum zone_stat_item); extern void inc_zone_state(struct zone *, enum zone_stat_item); +extern void __inc_zone_state(struct zone *, enum zone_stat_item); +extern void dec_zone_state(struct zone *, enum zone_stat_item); +extern void __dec_zone_state(struct zone *, enum zone_stat_item); void refresh_cpu_vm_stats(int); void refresh_vm_stats(void); @@ -214,6 +238,12 @@ static inline void __inc_zone_page_state(struct page *page, __inc_zone_state(page_zone(page), item); } +static inline void __dec_zone_state(struct zone *zone, enum zone_stat_item item) +{ + atomic_long_dec(&zone->vm_stat[item]); + atomic_long_dec(&vm_stat[item]); +} + static inline void __dec_zone_page_state(struct page *page, enum zone_stat_item item) { diff --git a/include/linux/xattr.h b/include/linux/xattr.h index 0e7f1e20ea45..def131a5ac70 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h @@ -13,6 +13,10 @@ #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */ #define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */ +#ifdef __KERNEL__ + +#include <linux/types.h> + /* Namespaces */ #define XATTR_OS2_PREFIX "os2." #define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1) @@ -29,6 +33,8 @@ #define XATTR_USER_PREFIX "user." #define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1) +struct inode; +struct dentry; struct xattr_handler { char *prefix; @@ -50,4 +56,6 @@ ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_siz int generic_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags); int generic_removexattr(struct dentry *dentry, const char *name); +#endif /* __KERNEL__ */ + #endif /* _LINUX_XATTR_H */ diff --git a/include/net/ax25.h b/include/net/ax25.h index 5ae10dd2e32e..47ff2f46e908 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h @@ -377,7 +377,7 @@ extern int ax25_check_iframes_acked(ax25_cb *, unsigned short); /* ax25_route.c */ extern void ax25_rt_device_down(struct net_device *); extern int ax25_rt_ioctl(unsigned int, void __user *); -extern struct file_operations ax25_route_fops; +extern const struct file_operations ax25_route_fops; extern ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev); extern int ax25_rt_autobind(ax25_cb *, ax25_address *); extern struct sk_buff *ax25_rt_build_path(struct sk_buff *, ax25_address *, ax25_address *, ax25_digi *); @@ -430,7 +430,7 @@ extern unsigned long ax25_display_timer(struct timer_list *); extern int ax25_uid_policy; extern ax25_uid_assoc *ax25_findbyuid(uid_t); extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); -extern struct file_operations ax25_uid_fops; +extern const struct file_operations ax25_uid_fops; extern void ax25_uid_free(void); /* sysctl_net_ax25.c */ diff --git a/include/net/dn_route.h b/include/net/dn_route.h index 76f957e258b0..a566944c4962 100644 --- a/include/net/dn_route.h +++ b/include/net/dn_route.h @@ -68,9 +68,10 @@ extern void dn_rt_cache_flush(int delay); struct dn_route { union { struct dst_entry dst; - struct dn_route *rt_next; } u; + struct flowi fl; + __le16 rt_saddr; __le16 rt_daddr; __le16 rt_gateway; @@ -80,8 +81,6 @@ struct dn_route { unsigned rt_flags; unsigned rt_type; - - struct flowi fl; }; extern void dn_route_init(void); diff --git a/include/net/dst.h b/include/net/dst.h index 62b7e7598e9a..e12a8ce0b9b3 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -37,9 +37,7 @@ struct sk_buff; struct dst_entry { - struct dst_entry *next; - atomic_t __refcnt; /* client references */ - int __use; + struct rcu_head rcu_head; struct dst_entry *child; struct net_device *dev; short error; @@ -50,7 +48,6 @@ struct dst_entry #define DST_NOPOLICY 4 #define DST_NOHASH 8 #define DST_BALANCED 0x10 - unsigned long lastuse; unsigned long expires; unsigned short header_len; /* more space at head required */ @@ -75,8 +72,16 @@ struct dst_entry #endif struct dst_ops *ops; - struct rcu_head rcu_head; + unsigned long lastuse; + atomic_t __refcnt; /* client references */ + int __use; + union { + struct dst_entry *next; + struct rtable *rt_next; + struct rt6_info *rt6_next; + struct dn_route *dn_next; + }; char info[0]; }; diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 7be4f4e3a0f2..9eda572a2a65 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h @@ -83,7 +83,6 @@ struct rt6_info { union { struct dst_entry dst; - struct rt6_info *next; } u; struct inet6_dev *rt6i_idev; diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 68ec27490c20..0e690e34c00b 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h @@ -257,6 +257,12 @@ extern int nf_conntrack_max; DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); #define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++) +#define NF_CT_STAT_INC_ATOMIC(count) \ +do { \ + local_bh_disable(); \ + __get_cpu_var(nf_conntrack_stat).count++; \ + local_bh_enable(); \ +} while (0) /* no helper, no nat */ #define NF_CT_F_BASIC 0 diff --git a/include/net/netfilter/nf_conntrack_expect.h b/include/net/netfilter/nf_conntrack_expect.h index 41bcc9eb4206..173c7c1eff23 100644 --- a/include/net/netfilter/nf_conntrack_expect.h +++ b/include/net/netfilter/nf_conntrack_expect.h @@ -8,7 +8,7 @@ extern struct list_head nf_conntrack_expect_list; extern struct kmem_cache *nf_conntrack_expect_cachep; -extern struct file_operations exp_file_ops; +extern const struct file_operations exp_file_ops; struct nf_conntrack_expect { diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h index 664ddcffe00d..eb575cbd4c95 100644 --- a/include/net/netfilter/nf_conntrack_l3proto.h +++ b/include/net/netfilter/nf_conntrack_l3proto.h @@ -89,7 +89,7 @@ extern struct nf_conntrack_l3proto *nf_ct_l3protos[AF_MAX]; /* Protocol registration. */ extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); -extern int nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); +extern void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); extern struct nf_conntrack_l3proto * nf_ct_l3proto_find_get(u_int16_t l3proto); @@ -106,7 +106,7 @@ __nf_ct_l3proto_find(u_int16_t l3proto) { if (unlikely(l3proto >= AF_MAX)) return &nf_conntrack_l3proto_generic; - return nf_ct_l3protos[l3proto]; + return rcu_dereference(nf_ct_l3protos[l3proto]); } #endif /*_NF_CONNTRACK_L3PROTO_H*/ diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h index fc8af08ff542..8415182ec126 100644 --- a/include/net/netfilter/nf_conntrack_l4proto.h +++ b/include/net/netfilter/nf_conntrack_l4proto.h @@ -109,7 +109,7 @@ extern void nf_ct_l4proto_put(struct nf_conntrack_l4proto *p); /* Protocol registration. */ extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto); -extern int nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto); +extern void nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto); /* Generic netlink helpers */ extern int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb, diff --git a/include/net/netrom.h b/include/net/netrom.h index e0ca112024a3..f06852bba62a 100644 --- a/include/net/netrom.h +++ b/include/net/netrom.h @@ -215,8 +215,8 @@ extern struct net_device *nr_dev_get(ax25_address *); extern int nr_rt_ioctl(unsigned int, void __user *); extern void nr_link_failed(ax25_cb *, int); extern int nr_route_frame(struct sk_buff *, ax25_cb *); -extern struct file_operations nr_nodes_fops; -extern struct file_operations nr_neigh_fops; +extern const struct file_operations nr_nodes_fops; +extern const struct file_operations nr_neigh_fops; extern void nr_rt_free(void); /* nr_subr.c */ diff --git a/include/net/rose.h b/include/net/rose.h index 4c05a88b921b..a4047d3cf5dd 100644 --- a/include/net/rose.h +++ b/include/net/rose.h @@ -189,9 +189,9 @@ extern void rose_enquiry_response(struct sock *); /* rose_route.c */ extern struct rose_neigh rose_loopback_neigh; -extern struct file_operations rose_neigh_fops; -extern struct file_operations rose_nodes_fops; -extern struct file_operations rose_routes_fops; +extern const struct file_operations rose_neigh_fops; +extern const struct file_operations rose_nodes_fops; +extern const struct file_operations rose_routes_fops; extern void rose_add_loopback_neigh(void); extern int __must_check rose_add_loopback_node(rose_address *); diff --git a/include/net/route.h b/include/net/route.h index 1440bdb5a27d..749e4dfe5ff3 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -53,9 +53,11 @@ struct rtable union { struct dst_entry dst; - struct rtable *rt_next; } u; + /* Cache lookup keys */ + struct flowi fl; + struct in_device *idev; unsigned rt_flags; @@ -69,9 +71,6 @@ struct rtable /* Info on neighbour */ __be32 rt_gateway; - /* Cache lookup keys */ - struct flowi fl; - /* Miscellaneous cached information */ __be32 rt_spec_dst; /* RFC1122 specific destination */ struct inet_peer *peer; /* long-living peer info */ diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 16924cb772c9..92a1fc46ea59 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -946,14 +946,14 @@ extern int xfrm_state_mtu(struct xfrm_state *x, int mtu); extern int xfrm_init_state(struct xfrm_state *x); extern int xfrm4_rcv(struct sk_buff *skb); extern int xfrm4_output(struct sk_buff *skb); -extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); -extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler); +extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler, unsigned short family); +extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler, unsigned short family); extern int xfrm6_rcv_spi(struct sk_buff *skb, __be32 spi); extern int xfrm6_rcv(struct sk_buff **pskb); extern int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr, xfrm_address_t *saddr, u8 proto); -extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler); -extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler); +extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler, unsigned short family); +extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler, unsigned short family); extern __be32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr); extern void xfrm6_tunnel_free_spi(xfrm_address_t *saddr); extern __be32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr); diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 0c775fceb675..ad0182ef7809 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -323,12 +323,20 @@ struct sas_ha_event { struct sas_ha_struct *ha; }; +enum sas_ha_state { + SAS_HA_REGISTERED, + SAS_HA_UNREGISTERED +}; + struct sas_ha_struct { /* private: */ spinlock_t event_lock; struct sas_ha_event ha_events[HA_NUM_EVENTS]; unsigned long pending; + enum sas_ha_state state; + spinlock_t state_lock; + struct scsi_core core; /* public: */ @@ -553,15 +561,15 @@ struct sas_task { #define SAS_TASK_STATE_PENDING 1 #define SAS_TASK_STATE_DONE 2 #define SAS_TASK_STATE_ABORTED 4 -#define SAS_TASK_INITIATOR_ABORTED 8 +#define SAS_TASK_NEED_DEV_RESET 8 +#define SAS_TASK_AT_INITIATOR 16 static inline struct sas_task *sas_alloc_task(gfp_t flags) { extern struct kmem_cache *sas_task_cache; - struct sas_task *task = kmem_cache_alloc(sas_task_cache, flags); + struct sas_task *task = kmem_cache_zalloc(sas_task_cache, flags); if (task) { - memset(task, 0, sizeof(*task)); INIT_LIST_HEAD(&task->list); spin_lock_init(&task->task_state_lock); task->task_state_flags = SAS_TASK_STATE_PENDING; @@ -613,6 +621,9 @@ struct sas_domain_function_template { extern int sas_register_ha(struct sas_ha_struct *); extern int sas_unregister_ha(struct sas_ha_struct *); +int sas_set_phy_speed(struct sas_phy *phy, + struct sas_phy_linkrates *rates); +int sas_phy_enable(struct sas_phy *phy, int enabled); int sas_phy_reset(struct sas_phy *phy, int hard_reset); extern int sas_queuecommand(struct scsi_cmnd *, void (*scsi_done)(struct scsi_cmnd *)); @@ -646,6 +657,9 @@ void sas_unregister_dev(struct domain_device *); void sas_init_dev(struct domain_device *); -void sas_task_abort(struct work_struct *); +void sas_task_abort(struct sas_task *); +int __sas_task_abort(struct sas_task *); +int sas_eh_device_reset_handler(struct scsi_cmnd *cmd); +int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd); #endif /* _SASLIB_H_ */ diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 59633a82de47..9aedc19820b0 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h @@ -54,6 +54,7 @@ struct sas_identify { struct sas_phy { struct device dev; int number; + int enabled; /* phy identification */ struct sas_identify identify; @@ -163,6 +164,7 @@ struct sas_function_template { int (*get_enclosure_identifier)(struct sas_rphy *, u64 *); int (*get_bay_identifier)(struct sas_rphy *); int (*phy_reset)(struct sas_phy *, int); + int (*phy_enable)(struct sas_phy *, int); int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *); }; @@ -180,6 +182,7 @@ extern struct sas_rphy *sas_end_device_alloc(struct sas_port *); extern struct sas_rphy *sas_expander_alloc(struct sas_port *, enum sas_device_type); void sas_rphy_free(struct sas_rphy *); extern int sas_rphy_add(struct sas_rphy *); +extern void sas_rphy_remove(struct sas_rphy *); extern void sas_rphy_delete(struct sas_rphy *); extern int scsi_is_sas_rphy(const struct device *); diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h index da180f738477..286e9628ed8b 100644 --- a/include/scsi/scsi_transport_spi.h +++ b/include/scsi/scsi_transport_spi.h @@ -85,6 +85,7 @@ struct spi_host_attrs { #define spi_pcomp_en(x) (((struct spi_transport_attrs *)&(x)->starget_data)->pcomp_en) #define spi_hold_mcs(x) (((struct spi_transport_attrs *)&(x)->starget_data)->hold_mcs) #define spi_initial_dv(x) (((struct spi_transport_attrs *)&(x)->starget_data)->initial_dv) +#define spi_dv_pending(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_pending) #define spi_support_sync(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_sync) #define spi_support_wide(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_wide) diff --git a/include/sound/pcm.h b/include/sound/pcm.h index ee6bc2d06803..deff5a92efa6 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -447,7 +447,7 @@ struct snd_pcm_notify { * Registering */ -extern struct file_operations snd_pcm_f_ops[2]; +extern const struct file_operations snd_pcm_f_ops[2]; int snd_pcm_new(struct snd_card *card, char *id, int device, int playback_count, int capture_count, diff --git a/include/video/neomagic.h b/include/video/neomagic.h index 78b1f15a538f..a9e118a1cd16 100644 --- a/include/video/neomagic.h +++ b/include/video/neomagic.h @@ -140,7 +140,8 @@ typedef volatile struct { struct neofb_par { struct vgastate state; - atomic_t ref_count; + struct mutex open_lock; + unsigned int ref_count; unsigned char MiscOutReg; /* Misc */ unsigned char CRTC[25]; /* Crtc Controller */ diff --git a/include/video/s3blit.h b/include/video/s3blit.h deleted file mode 100644 index b1db63187b4e..000000000000 --- a/include/video/s3blit.h +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef _VIDEO_S3BLIT_H -#define _VIDEO_S3BLIT_H - -/* s3 commands */ -#define S3_BITBLT 0xc011 -#define S3_TWOPOINTLINE 0x2811 -#define S3_FILLEDRECT 0x40b1 - -#define S3_FIFO_EMPTY 0x0400 -#define S3_HDW_BUSY 0x0200 - -/* Enhanced register mapping (MMIO mode) */ - -#define S3_READ_SEL 0xbee8 /* offset f */ -#define S3_MULT_MISC 0xbee8 /* offset e */ -#define S3_ERR_TERM 0x92e8 -#define S3_FRGD_COLOR 0xa6e8 -#define S3_BKGD_COLOR 0xa2e8 -#define S3_PIXEL_CNTL 0xbee8 /* offset a */ -#define S3_FRGD_MIX 0xbae8 -#define S3_BKGD_MIX 0xb6e8 -#define S3_CUR_Y 0x82e8 -#define S3_CUR_X 0x86e8 -#define S3_DESTY_AXSTP 0x8ae8 -#define S3_DESTX_DIASTP 0x8ee8 -#define S3_MIN_AXIS_PCNT 0xbee8 /* offset 0 */ -#define S3_MAJ_AXIS_PCNT 0x96e8 -#define S3_CMD 0x9ae8 -#define S3_GP_STAT 0x9ae8 -#define S3_ADVFUNC_CNTL 0x4ae8 -#define S3_WRT_MASK 0xaae8 -#define S3_RD_MASK 0xaee8 - -/* Enhanced register mapping (Packed MMIO mode, write only) */ -#define S3_ALT_CURXY 0x8100 -#define S3_ALT_CURXY2 0x8104 -#define S3_ALT_STEP 0x8108 -#define S3_ALT_STEP2 0x810c -#define S3_ALT_ERR 0x8110 -#define S3_ALT_CMD 0x8118 -#define S3_ALT_MIX 0x8134 -#define S3_ALT_PCNT 0x8148 -#define S3_ALT_PAT 0x8168 - -/* Drawing modes */ -#define S3_NOTCUR 0x0000 -#define S3_LOGICALZERO 0x0001 -#define S3_LOGICALONE 0x0002 -#define S3_LEAVEASIS 0x0003 -#define S3_NOTNEW 0x0004 -#define S3_CURXORNEW 0x0005 -#define S3_NOT_CURXORNEW 0x0006 -#define S3_NEW 0x0007 -#define S3_NOTCURORNOTNEW 0x0008 -#define S3_CURORNOTNEW 0x0009 -#define S3_NOTCURORNEW 0x000a -#define S3_CURORNEW 0x000b -#define S3_CURANDNEW 0x000c -#define S3_NOTCURANDNEW 0x000d -#define S3_CURANDNOTNEW 0x000e -#define S3_NOTCURANDNOTNEW 0x000f - -#define S3_CRTC_ADR 0x03d4 -#define S3_CRTC_DATA 0x03d5 - -#define S3_REG_LOCK2 0x39 -#define S3_HGC_MODE 0x45 - -#define S3_HWGC_ORGX_H 0x46 -#define S3_HWGC_ORGX_L 0x47 -#define S3_HWGC_ORGY_H 0x48 -#define S3_HWGC_ORGY_L 0x49 -#define S3_HWGC_DX 0x4e -#define S3_HWGC_DY 0x4f - - -#define S3_LAW_CTL 0x58 - -#endif /* _VIDEO_S3BLIT_H */ |