summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/a.out.h1
-rw-r--r--include/asm-arm/arch-sa1100/SA-1111.h52
-rw-r--r--include/asm-arm/arch-sa1100/adsbitsy.h14
-rw-r--r--include/asm-arm/arch-sa1100/assabet.h6
-rw-r--r--include/asm-arm/arch-sa1100/bitsy.h81
-rw-r--r--include/asm-arm/arch-sa1100/dma.h9
-rw-r--r--include/asm-arm/arch-sa1100/graphicsmaster.h66
-rw-r--r--include/asm-arm/arch-sa1100/h3600.h81
-rw-r--r--include/asm-arm/arch-sa1100/hardware.h12
-rw-r--r--include/asm-arm/arch-sa1100/irqs.h6
-rw-r--r--include/asm-arm/arch-sa1100/keyboard.h162
-rw-r--r--include/asm-arm/arch-sa1100/pangolin.h39
-rw-r--r--include/asm-arm/arch-sa1100/uncompress.h37
-rw-r--r--include/asm-arm/atomic.h4
-rw-r--r--include/asm-arm/cpu-multi32.h10
-rw-r--r--include/asm-arm/cpu-single.h10
-rw-r--r--include/asm-arm/hardirq.h1
-rw-r--r--include/asm-arm/hardware/pci_v3.h4
-rw-r--r--include/asm-arm/io.h23
-rw-r--r--include/asm-arm/mach/arch.h9
-rw-r--r--include/asm-arm/param.h3
-rw-r--r--include/asm-arm/pci.h26
-rw-r--r--include/asm-arm/pgtable.h2
-rw-r--r--include/asm-arm/processor.h7
-rw-r--r--include/asm-arm/setup.h4
-rw-r--r--include/asm-arm/signal.h22
-rw-r--r--include/asm-arm/uaccess.h80
-rw-r--r--include/asm-i386/system.h9
-rw-r--r--include/asm-s390/chandev.h4
-rw-r--r--include/asm-s390/current.h2
-rw-r--r--include/asm-s390/dasd.h1
-rw-r--r--include/asm-s390/debug.h1
-rw-r--r--include/asm-s390/gdb-stub.h8
-rw-r--r--include/asm-s390/lowcore.h16
-rw-r--r--include/asm-s390/pgalloc.h2
-rw-r--r--include/asm-s390/pgtable.h65
-rw-r--r--include/asm-s390/ptrace.h1
-rw-r--r--include/asm-s390/sigp.h27
-rw-r--r--include/asm-s390/smp.h9
-rw-r--r--include/asm-s390/softirq.h15
-rw-r--r--include/asm-s390/spinlock.h39
-rw-r--r--include/asm-s390/uaccess.h62
-rw-r--r--include/asm-s390/ucontext.h4
-rw-r--r--include/asm-s390/unistd.h2
-rw-r--r--include/asm-s390/vtoc.h129
-rw-r--r--include/asm-s390x/chandev.h4
-rw-r--r--include/asm-s390x/current.h2
-rw-r--r--include/asm-s390x/dasd.h1
-rw-r--r--include/asm-s390x/debug.h1
-rw-r--r--include/asm-s390x/lowcore.h18
-rw-r--r--include/asm-s390x/mathemu.h48
-rw-r--r--include/asm-s390x/page.h5
-rw-r--r--include/asm-s390x/param.h3
-rw-r--r--include/asm-s390x/pgtable.h66
-rw-r--r--include/asm-s390x/sigp.h25
-rw-r--r--include/asm-s390x/smp.h9
-rw-r--r--include/asm-s390x/softirq.h15
-rw-r--r--include/asm-s390x/spinlock.h43
-rw-r--r--include/asm-s390x/ucontext.h4
-rw-r--r--include/asm-s390x/unistd.h14
-rw-r--r--include/linux/b1lli.h6
-rw-r--r--include/linux/b1pcmcia.h6
-rw-r--r--include/linux/blkdev.h23
-rw-r--r--include/linux/console_struct.h2
-rw-r--r--include/linux/ext2_fs.h43
-rw-r--r--include/linux/fs.h1
-rw-r--r--include/linux/i2c-dev.h2
-rw-r--r--include/linux/i2c-elektor.h14
-rw-r--r--include/linux/i2c-id.h46
-rw-r--r--include/linux/i2c-proc.h396
-rw-r--r--include/linux/i2c.h23
-rw-r--r--include/linux/i2o-dev.h330
-rw-r--r--include/linux/i2o.h133
-rw-r--r--include/linux/pci_ids.h10
-rw-r--r--include/linux/sonypi.h9
-rw-r--r--include/linux/spinlock.h4
-rw-r--r--include/linux/udf_fs.h4
-rw-r--r--include/linux/udf_fs_sb.h6
-rw-r--r--include/linux/videodev.h12
-rw-r--r--include/pcmcia/cs_types.h7
-rw-r--r--include/pcmcia/ss.h5
81 files changed, 1558 insertions, 949 deletions
diff --git a/include/asm-arm/a.out.h b/include/asm-arm/a.out.h
index 91463a42b66d..3e5fe64c4394 100644
--- a/include/asm-arm/a.out.h
+++ b/include/asm-arm/a.out.h
@@ -1,6 +1,7 @@
#ifndef __ARM_A_OUT_H__
#define __ARM_A_OUT_H__
+#include <linux/personality.h>
#include <asm/types.h>
struct exec
diff --git a/include/asm-arm/arch-sa1100/SA-1111.h b/include/asm-arm/arch-sa1100/SA-1111.h
index 7e9d4c1e9e1e..be4f60fb48f2 100644
--- a/include/asm-arm/arch-sa1100/SA-1111.h
+++ b/include/asm-arm/arch-sa1100/SA-1111.h
@@ -42,15 +42,15 @@
* SKID ID Register
*/
-#define _SKCR _SA1111( 0x0000 )
-#define _SMCR _SA1111( 0x0004 )
-#define _SKID _SA1111( 0x0008 )
+#define _SBI_SKCR _SA1111( 0x0000 )
+#define _SBI_SMCR _SA1111( 0x0004 )
+#define _SBI_SKID _SA1111( 0x0008 )
#if LANGUAGE == C
-#define SKCR (*((volatile Word *) SA1111_p2v (_SKCR)))
-#define SMCR (*((volatile Word *) SA1111_p2v (_SMCR)))
-#define SKID (*((volatile Word *) SA1111_p2v (_SKID)))
+#define SBI_SKCR (*((volatile Word *) SA1111_p2v (_SBI_SKCR)))
+#define SBI_SMCR (*((volatile Word *) SA1111_p2v (_SBI_SMCR)))
+#define SBI_SKID (*((volatile Word *) SA1111_p2v (_SBI_SKID)))
#endif /* LANGUAGE == C */
@@ -66,6 +66,18 @@
#define SKCR_OPPC (1<<9)
#define SKCR_PLLTSTEN (1<<10)
#define SKCR_USBIOTSTEN (1<<11)
+/*
+ * Don't believe the specs! Take them, throw them outside. Leave them
+ * there for a week. Spit on them. Walk on them. Stamp on them.
+ * Pour gasoline over them and finally burn them. Now think about coding.
+ * - The October 1999 errata (278260-007) says its bit 13, 1 to enable.
+ * - The Feb 2001 errata (278260-010) says that the previous errata
+ * (278260-009) is wrong, and its bit actually 12, fixed in spec
+ * 278242-003.
+ * - The SA1111 manual (278242) says bit 12, but 0 to enable.
+ * - Reality is bit 13, 1 to enable.
+ * -- rmk
+ */
#define SKCR_OE_EN (1<<13)
#define SMCR_DTIM (1<<0)
@@ -131,6 +143,34 @@
#define SKPCR_PWMCLKEN (1<<8)
/*
+ * USB Host controller
+ */
+#define _USB_OHCI_OP_BASE _SA1111( 0x400 )
+#define _USB_STATUS _SA1111( 0x518 )
+#define _USB_RESET _SA1111( 0x51c )
+#define _USB_INTERRUPTEST _SA1111( 0x520 )
+
+#define _USB_EXTENT (_USB_INTERRUPTEST - _USB_OHCI_OP_BASE + 4)
+
+#if LANGUAGE == C
+
+#define USB_OHCI_OP_BASE (*((volatile Word *) SA1111_p2v (_USB_OHCI_OP_BASE)))
+#define USB_STATUS (*((volatile Word *) SA1111_p2v (_USB_STATUS)))
+#define USB_RESET (*((volatile Word *) SA1111_p2v (_USB_RESET)))
+#define USB_INTERRUPTEST (*((volatile Word *) SA1111_p2v (_USB_INTERRUPTEST)))
+
+#endif /* LANGUAGE == C */
+
+#define USB_RESET_FORCEIFRESET (1 << 0)
+#define USB_RESET_FORCEHCRESET (1 << 1)
+#define USB_RESET_CLKGENRESET (1 << 2)
+#define USB_RESET_SIMSCALEDOWN (1 << 3)
+#define USB_RESET_USBINTTEST (1 << 4)
+#define USB_RESET_SLEEPSTBYEN (1 << 5)
+#define USB_RESET_PWRSENSELOW (1 << 6)
+#define USB_RESET_PWRCTRLLOW (1 << 7)
+
+/*
* Serial Audio Controller
*
* Registers
diff --git a/include/asm-arm/arch-sa1100/adsbitsy.h b/include/asm-arm/arch-sa1100/adsbitsy.h
new file mode 100644
index 000000000000..cb82224c2ebd
--- /dev/null
+++ b/include/asm-arm/arch-sa1100/adsbitsy.h
@@ -0,0 +1,14 @@
+/*
+ * linux/include/asm-arm/arch-sa1100/adsbitsy.h
+ *
+ * Created 7/3/01 by Woojung <whuh@applieddata.net>
+ *
+ * This file contains the hardware specific definitions for the
+ * ADS Bitsy Board
+ */
+
+#ifndef __ASM_ARCH_HARDWARE_H
+#error "include <asm/hardware.h> instead"
+#endif
+
+#define SA1111_BASE (0x18000000)
diff --git a/include/asm-arm/arch-sa1100/assabet.h b/include/asm-arm/arch-sa1100/assabet.h
index 2992dad54f63..ae282d1ffd9a 100644
--- a/include/asm-arm/arch-sa1100/assabet.h
+++ b/include/asm-arm/arch-sa1100/assabet.h
@@ -38,7 +38,7 @@
#define BCR_DB1111 \
(BCR_SPK_OFF | BCR_QMUTE | BCR_LED_GREEN | BCR_LED_RED | \
BCR_RS232EN | BCR_LCD_12RGB | BCR_CF_BUS_OFF | BCR_STEREO_LB | \
- BCR_IRDA_MD1 | BCR_CF_RST)
+ BCR_IRDA_MD0 | BCR_CF_RST)
#define BCR_CF_PWR (1<<0) /* Compact Flash Power (1 = 3.3v, 0 = off) */
#define BCR_CF_RST (1<<1) /* Compact Flash Reset (1 = power up reset) */
@@ -183,6 +183,10 @@ extern unsigned long BCR_value;
#define NCR_A1VPP (1<<6)
#ifndef __ASSEMBLY__
+#ifdef CONFIG_ASSABET_NEPONSET
#define machine_has_neponset() ((SCR_value & SCR_SA1111) == 0)
+#else
+#define machine_has_neponset() (0)
+#endif
#endif
diff --git a/include/asm-arm/arch-sa1100/bitsy.h b/include/asm-arm/arch-sa1100/bitsy.h
deleted file mode 100644
index acd71eb7eade..000000000000
--- a/include/asm-arm/arch-sa1100/bitsy.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-*
-* Definitions for H3600 Handheld Computer
-*
-* Copyright 2000 Compaq Computer Corporation.
-*
-* Use consistent with the GNU GPL is permitted,
-* provided that this copyright notice is
-* preserved in its entirety in all copies and derived works.
-*
-* COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
-* AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
-* FITNESS FOR ANY PARTICULAR PURPOSE.
-*
-* Author: Jamey Hicks.
-*
-*/
-
-#ifndef _INCLUDE_BITSY_H_
-#define _INCLUDE_BITSY_H_
-
-#define GPIO_BITSY_NPOWER_BUTTON GPIO_GPIO (0)
-#define GPIO_BITSY_ACTION_BUTTON GPIO_GPIO (18)
-
-#define GPIO_BITSY_PCMCIA_CD0 GPIO_GPIO (17)
-#define GPIO_BITSY_PCMCIA_CD1 GPIO_GPIO (10)
-#define GPIO_BITSY_PCMCIA_IRQ0 GPIO_GPIO (21)
-#define GPIO_BITSY_PCMCIA_IRQ1 GPIO_GPIO (11)
-
-/* audio sample rate clock generator */
-#define GPIO_BITSY_CLK_SET0 GPIO_GPIO (12)
-#define GPIO_BITSY_CLK_SET1 GPIO_GPIO (13)
-
-/* UDA1341 L3 Interface */
-#define GPIO_BITSY_L3_DATA GPIO_GPIO (14)
-#define GPIO_BITSY_L3_CLOCK GPIO_GPIO (16)
-#define GPIO_BITSY_L3_MODE GPIO_GPIO (15)
-
-#define GPIO_BITSY_OPT_LOCK GPIO_GPIO (22)
-#define GPIO_BITSY_OPT_IRQ GPIO_GPIO (24)
-#define GPIO_BITSY_OPT_DET GPIO_GPIO (27)
-
-#define GPIO_BITSY_COM_DCD GPIO_GPIO (23)
-#define GPIO_BITSY_COM_CTS GPIO_GPIO (25)
-#define GPIO_BITSY_COM_RTS GPIO_GPIO (26)
-
-#define IRQ_GPIO_BITSY_NPOWER_BUTTON IRQ_GPIO0
-#define IRQ_GPIO_BITSY_ACTION_BUTTON IRQ_GPIO18
-#define IRQ_GPIO_BITSY_PCMCIA_CD0 IRQ_GPIO17
-#define IRQ_GPIO_BITSY_PCMCIA_CD1 IRQ_GPIO10
-#define IRQ_GPIO_BITSY_PCMCIA_IRQ0 IRQ_GPIO21
-#define IRQ_GPIO_BITSY_PCMCIA_IRQ1 IRQ_GPIO11
-#define IRQ_GPIO_BITSY_OPT_IRQ IRQ_GPIO24
-#define IRQ_GPIO_BITSY_OPT_DET IRQ_GPIO27
-#define IRQ_GPIO_BITSY_COM_DCD IRQ_GPIO23
-#define IRQ_GPIO_BITSY_COM_CTS IRQ_GPIO25
-
-#define EGPIO_BITSY_VPP_ON (1 << 0)
-#define EGPIO_BITSY_CARD_RESET (1 << 1) /* reset the attached pcmcia/compactflash card. active high. */
-#define EGPIO_BITSY_OPT_RESET (1 << 2) /* reset the attached option pack. active high. */
-#define EGPIO_BITSY_CODEC_NRESET (1 << 3) /* reset the onboard UDA1341. active low. */
-#define EGPIO_BITSY_OPT_NVRAM_ON (1 << 4) /* apply power to optionpack nvram, active high. */
-#define EGPIO_BITSY_OPT_ON (1 << 5) /* full power to option pack. active high. */
-#define EGPIO_BITSY_LCD_ON (1 << 6) /* enable 3.3V to LCD. active high. */
-#define EGPIO_BITSY_RS232_ON (1 << 7) /* UART3 transceiver force on. Active high. */
-#define EGPIO_BITSY_LCD_PCI (1 << 8) /* LCD control IC enable. active high. */
-#define EGPIO_BITSY_IR_ON (1 << 9) /* apply power to IR module. active high. */
-#define EGPIO_BITSY_AUD_AMP_ON (1 << 10) /* apply power to audio power amp. active high. */
-#define EGPIO_BITSY_AUD_PWR_ON (1 << 11) /* apply poewr to reset of audio circuit. active high. */
-#define EGPIO_BITSY_QMUTE (1 << 12) /* mute control for onboard UDA1341. active high. */
-#define EGPIO_BITSY_IR_FSEL (1 << 13) /* IR speed select: 1->fast, 0->slow */
-#define EGPIO_BITSY_LCD_5V_ON (1 << 14) /* enable 5V to LCD. active high. */
-#define EGPIO_BITSY_LVDD_ON (1 << 15) /* enable 9V and -6.5V to LCD. */
-
-#ifndef __ASSEMBLY__
-#define BITSY_EGPIO (*(volatile int *)0xf0000000)
-extern void clr_bitsy_egpio(unsigned long x);
-extern void set_bitsy_egpio(unsigned long x);
-#endif
-
-#endif
diff --git a/include/asm-arm/arch-sa1100/dma.h b/include/asm-arm/arch-sa1100/dma.h
index d44589428861..471c41021d73 100644
--- a/include/asm-arm/arch-sa1100/dma.h
+++ b/include/asm-arm/arch-sa1100/dma.h
@@ -109,8 +109,13 @@ extern int sa1111_check_dma_bug( dma_addr_t addr );
static inline void
__arch_adjust_zones(int node, unsigned long *size, unsigned long *holes)
{
- size[1] = size[0] - 256;
- size[0] = 256;
+ unsigned int sz = 256;
+
+ if (node != 0)
+ sz = 0;
+
+ size[1] = size[0] - sz;
+ size[0] = sz;
}
#define arch_adjust_zones(node,size,holes) __arch_adjust_zones(node,size,holes)
diff --git a/include/asm-arm/arch-sa1100/graphicsmaster.h b/include/asm-arm/arch-sa1100/graphicsmaster.h
new file mode 100644
index 000000000000..289bc255d5db
--- /dev/null
+++ b/include/asm-arm/arch-sa1100/graphicsmaster.h
@@ -0,0 +1,66 @@
+/*
+ * linux/include/asm-arm/arch-sa1100/graphicsmaster.h
+ *
+ * Created 2000/12/18 by Woojung Huh <whuh@applieddata.net>
+ *
+ * This file comes from graphicsclient.h of Nicolas Pitre <nico@cam.org>
+ *
+ * This file contains the hardware specific definitions for the
+ * ADS GraphicsMaster
+ */
+
+#ifndef __ASM_ARCH_HARDWARE_H
+#error "include <asm/hardware.h> instead"
+#endif
+
+#define ADS_CPLD_BASE (0x10000000)
+#define ADS_p2v( x ) ((x) - ADS_CPLD_BASE + 0xf0000000)
+#define ADS_v2p( x ) ((x) - 0xf0000000 + ADS_CPLD_BASE)
+
+
+#define _ADS_SW_SWITCHES 0x10060000 /* Software Switches */
+
+/* Extra IRQ Controller */
+#define _ADS_INT_ST1 0x10080000 /* IRQ Status #1 */
+#define _ADS_INT_ST2 0x10080004 /* IRQ Status #2 */
+#define _ADS_INT_EN1 0x10080008 /* IRQ Enable #1 */
+#define _ADS_INT_EN2 0x1008000c /* IRQ Enable #2 */
+#define _ADS_DCR 0x10080018 /* Discrete Control Reg */
+
+/* Discrete Controller (AVR:Atmel AT90LS8535) */
+#define _ADS_AVR_REG 0x10080018
+
+/* On-Board Ethernet */
+#define _ADS_ETHERNET 0x100e0000 /* Ethernet */
+
+/* On-Board Quad UART 16C554 */
+#define ADS_QUAD_UART1 0x10100000
+#define ADS_QUAD_UART2 0x10120000
+#define ADS_QUAD_UART3 0x10140000
+#define ADS_QUAD_UART4 0x10160000
+
+/* LEDs */
+#define ADS_LED0 GPIO_GPIO20 /* on-board Green */
+#define ADS_LED1 GPIO_GPIO25 /* on-board Yellow */
+#define ADS_LED2 GPIO_GPIO26 /* on-board Red */
+
+/* DCR */
+#define DCR_AVR_RESET 0x01
+#define DCR_SA1111_RESET 0x02
+#define DCR_BACKLITE_ON 0x04
+
+/* Virtual register addresses */
+
+#ifndef __ASSEMBLY__
+#define ADS_INT_ST1 (*((volatile u_char *) ADS_p2v(_ADS_INT_ST1)))
+#define ADS_INT_ST2 (*((volatile u_char *) ADS_p2v(_ADS_INT_ST2)))
+#define ADS_INT_EN1 (*((volatile u_char *) ADS_p2v(_ADS_INT_EN1)))
+#define ADS_INT_EN2 (*((volatile u_char *) ADS_p2v(_ADS_INT_EN2)))
+#define ADS_ETHERNET ((int) ADS_p2v(_ADS_ETHERNET))
+#define ADS_AVR_REG (*((volatile u_char *) ADS_p2v(_ADS_AVR_REG)))
+#define ADS_DCR (*((volatile u_char *) ADS_p2v(_ADS_DCR)))
+#endif
+
+#define SA1111_BASE (0x18000000)
+
+#include "SA-1111.h"
diff --git a/include/asm-arm/arch-sa1100/h3600.h b/include/asm-arm/arch-sa1100/h3600.h
new file mode 100644
index 000000000000..1ae5b77ed66c
--- /dev/null
+++ b/include/asm-arm/arch-sa1100/h3600.h
@@ -0,0 +1,81 @@
+/*
+*
+* Definitions for H3600 Handheld Computer
+*
+* Copyright 2000 Compaq Computer Corporation.
+*
+* Use consistent with the GNU GPL is permitted,
+* provided that this copyright notice is
+* preserved in its entirety in all copies and derived works.
+*
+* COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
+* AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
+* FITNESS FOR ANY PARTICULAR PURPOSE.
+*
+* Author: Jamey Hicks.
+*
+*/
+
+#ifndef _INCLUDE_H3600_H_
+#define _INCLUDE_H3600_H_
+
+#define GPIO_H3600_NPOWER_BUTTON GPIO_GPIO (0)
+#define GPIO_H3600_ACTION_BUTTON GPIO_GPIO (18)
+
+#define GPIO_H3600_PCMCIA_CD0 GPIO_GPIO (17)
+#define GPIO_H3600_PCMCIA_CD1 GPIO_GPIO (10)
+#define GPIO_H3600_PCMCIA_IRQ0 GPIO_GPIO (21)
+#define GPIO_H3600_PCMCIA_IRQ1 GPIO_GPIO (11)
+
+/* audio sample rate clock generator */
+#define GPIO_H3600_CLK_SET0 GPIO_GPIO (12)
+#define GPIO_H3600_CLK_SET1 GPIO_GPIO (13)
+
+/* UDA1341 L3 Interface */
+#define GPIO_H3600_L3_DATA GPIO_GPIO (14)
+#define GPIO_H3600_L3_CLOCK GPIO_GPIO (16)
+#define GPIO_H3600_L3_MODE GPIO_GPIO (15)
+
+#define GPIO_H3600_OPT_LOCK GPIO_GPIO (22)
+#define GPIO_H3600_OPT_IRQ GPIO_GPIO (24)
+#define GPIO_H3600_OPT_DET GPIO_GPIO (27)
+
+#define GPIO_H3600_COM_DCD GPIO_GPIO (23)
+#define GPIO_H3600_COM_CTS GPIO_GPIO (25)
+#define GPIO_H3600_COM_RTS GPIO_GPIO (26)
+
+#define IRQ_GPIO_H3600_NPOWER_BUTTON IRQ_GPIO0
+#define IRQ_GPIO_H3600_ACTION_BUTTON IRQ_GPIO18
+#define IRQ_GPIO_H3600_PCMCIA_CD0 IRQ_GPIO17
+#define IRQ_GPIO_H3600_PCMCIA_CD1 IRQ_GPIO10
+#define IRQ_GPIO_H3600_PCMCIA_IRQ0 IRQ_GPIO21
+#define IRQ_GPIO_H3600_PCMCIA_IRQ1 IRQ_GPIO11
+#define IRQ_GPIO_H3600_OPT_IRQ IRQ_GPIO24
+#define IRQ_GPIO_H3600_OPT_DET IRQ_GPIO27
+#define IRQ_GPIO_H3600_COM_DCD IRQ_GPIO23
+#define IRQ_GPIO_H3600_COM_CTS IRQ_GPIO25
+
+#define EGPIO_H3600_VPP_ON (1 << 0)
+#define EGPIO_H3600_CARD_RESET (1 << 1) /* reset the attached pcmcia/compactflash card. active high. */
+#define EGPIO_H3600_OPT_RESET (1 << 2) /* reset the attached option pack. active high. */
+#define EGPIO_H3600_CODEC_NRESET (1 << 3) /* reset the onboard UDA1341. active low. */
+#define EGPIO_H3600_OPT_NVRAM_ON (1 << 4) /* apply power to optionpack nvram, active high. */
+#define EGPIO_H3600_OPT_ON (1 << 5) /* full power to option pack. active high. */
+#define EGPIO_H3600_LCD_ON (1 << 6) /* enable 3.3V to LCD. active high. */
+#define EGPIO_H3600_RS232_ON (1 << 7) /* UART3 transceiver force on. Active high. */
+#define EGPIO_H3600_LCD_PCI (1 << 8) /* LCD control IC enable. active high. */
+#define EGPIO_H3600_IR_ON (1 << 9) /* apply power to IR module. active high. */
+#define EGPIO_H3600_AUD_AMP_ON (1 << 10) /* apply power to audio power amp. active high. */
+#define EGPIO_H3600_AUD_PWR_ON (1 << 11) /* apply poewr to reset of audio circuit. active high. */
+#define EGPIO_H3600_QMUTE (1 << 12) /* mute control for onboard UDA1341. active high. */
+#define EGPIO_H3600_IR_FSEL (1 << 13) /* IR speed select: 1->fast, 0->slow */
+#define EGPIO_H3600_LCD_5V_ON (1 << 14) /* enable 5V to LCD. active high. */
+#define EGPIO_H3600_LVDD_ON (1 << 15) /* enable 9V and -6.5V to LCD. */
+
+#ifndef __ASSEMBLY__
+#define H3600_EGPIO (*(volatile int *)0xf0000000)
+extern void clr_h3600_egpio(unsigned long x);
+extern void set_h3600_egpio(unsigned long x);
+#endif
+
+#endif
diff --git a/include/asm-arm/arch-sa1100/hardware.h b/include/asm-arm/arch-sa1100/hardware.h
index 801008b3e4bd..2ed692616b16 100644
--- a/include/asm-arm/arch-sa1100/hardware.h
+++ b/include/asm-arm/arch-sa1100/hardware.h
@@ -122,8 +122,8 @@ extern unsigned short get_cclk_frequency(void);
#include "empeg.h"
#endif
-#ifdef CONFIG_SA1100_BITSY
-#include "bitsy.h"
+#ifdef CONFIG_SA1100_H3600
+#include "h3600.h"
#endif
#ifdef CONFIG_SA1100_ITSY
@@ -154,6 +154,14 @@ extern unsigned short get_cclk_frequency(void);
#include "simpad.h"
#endif
+#if defined(CONFIG_SA1100_GRAPHICSMASTER)
+#include "graphicsmaster.h"
+#endif
+
+#if defined(CONFIG_SA1100_ADSBITSY)
+#include "adsbitsy.h"
+#endif
+
#ifdef CONFIG_SA1101
/*
diff --git a/include/asm-arm/arch-sa1100/irqs.h b/include/asm-arm/arch-sa1100/irqs.h
index f83cddd3c189..806efb138176 100644
--- a/include/asm-arm/arch-sa1100/irqs.h
+++ b/include/asm-arm/arch-sa1100/irqs.h
@@ -72,7 +72,7 @@
#define NR_IRQS (IRQ_GPIO27 + 1)
-#if defined(CONFIG_SA1100_GRAPHICSCLIENT)
+#if defined(CONFIG_SA1100_GRAPHICSCLIENT) || defined(CONFIG_SA1100_GRAPHICSMASTER)
#define ADS_EXT_IRQ(x) (IRQ_GPIO27 + 1 + (x))
#undef NR_IRQS
#define NR_IRQS (ADS_EXT_IRQ(15) + 1)
@@ -81,7 +81,11 @@
#if defined(CONFIG_SA1111)
+#if defined(CONFIG_SA1100_GRAPHICSMASTER)
+#define SA1111_IRQ(x) (ADS_EXT_IRQ(15) + 1 + 1 + (x))
+#else
#define SA1111_IRQ(x) (IRQ_GPIO27 + 1 + (x))
+#endif
#define GPAIN0 SA1111_IRQ(0)
#define GPAIN1 SA1111_IRQ(1)
diff --git a/include/asm-arm/arch-sa1100/keyboard.h b/include/asm-arm/arch-sa1100/keyboard.h
index 83e9c02ee786..90ff3e811915 100644
--- a/include/asm-arm/arch-sa1100/keyboard.h
+++ b/include/asm-arm/arch-sa1100/keyboard.h
@@ -8,11 +8,37 @@
#define _SA1100_KEYBOARD_H
#include <linux/config.h>
+#include <asm/mach-types.h>
+#include <asm/hardware.h>
+extern struct kbd_ops_struct *kbd_ops;
-// #ifdef CONFIG_SA1100_BRUTUS
-/* need fixing... */
-#if 0
+#define kbd_disable_irq() do { } while(0);
+#define kbd_enable_irq() do { } while(0);
+
+
+/*
+ * SA1111 keyboard driver
+ */
+extern void sa1111_kbd_init_hw(void);
+
+/*
+ * GraphicsClient keyboard driver
+ */
+extern void gc_kbd_init_hw(void);
+
+static inline void kbd_init_hw(void)
+{
+ if (machine_is_assabet() && machine_has_neponset())
+ sa1111_kbd_init_hw();
+
+ if (machine_is_graphicsclient())
+ gc_kbd_init_hw();
+}
+
+
+
+#if 0 /* Brutus needs fixing */
extern int Brutus_kbd_translate(unsigned char scancode, unsigned char *keycode,
char raw_mode);
@@ -34,7 +60,9 @@ extern unsigned char Brutus_kbd_sysrq_xlate[128];
#define SYSRQ_KEY 0x54
-#elif CONFIG_SA1100_GRAPHICSCLIENT
+#elif 0 // CONFIG_SA1100_GRAPHICSCLIENT
+extern int gc_kbd_setkeycode(unsigned int scancode, unsigned int keycode);
+extern int gc_kbd_getkeycode(unsigned int scancode);
extern int gc_kbd_translate(unsigned char scancode, unsigned char *keycode, char raw_mode);
extern void gc_kbd_leds(unsigned char leds);
extern void gc_kbd_init_hw(void);
@@ -42,137 +70,17 @@ extern void gc_kbd_enable_irq(void);
extern void gc_kbd_disable_irq(void);
extern unsigned char gc_kbd_sysrq_xlate[128];
-#define kbd_setkeycode(x...) (-ENOSYS)
-#define kbd_getkeycode(x...) (-ENOSYS)
+#define kbd_setkeycode(x...) gc_kbd_setkeycode //(-ENOSYS)
+#define kbd_getkeycode(x...) gc_kbd_getkeycode //(-ENOSYS)
#define kbd_translate gc_kbd_translate
#define kbd_unexpected_up(x...) (1)
#define kbd_leds gc_kbd_leds
#define kbd_init_hw gc_kbd_init_hw
#define kbd_enable_irq gc_kbd_enable_irq
#define kbd_disable_irq gc_kbd_disable_irq
-#define kbd_sysrq_xlate gc_kbd_sysrq_xlate
-
-#elif CONFIG_SA1100_BITSY
-
-#define kbd_setkeycode(x...) (-ENOSYS)
-#define kbd_getkeycode(x...) (-ENOSYS)
-#define kbd_translate(sc_,kc_,rm_) ((*(kc_)=(sc_)),1)
-#define kbd_unexpected_up(x...) (1)
-#define kbd_leds(x...) do { } while (0)
-#define kbd_init_hw(x...) do { } while (0)
-#define kbd_enable_irq(x...) do { } while (0)
-#define kbd_disable_irq(x...) do { } while (0)
-
-#elif 0 //defined(CONFIG_SA1111) /*@@@@@*/
-
-#define KEYBOARD_IRQ TPRXINT
-#define DISABLE_KBD_DURING_INTERRUPTS 0
+#define kbd_sysrq_xlate (1)
-/* redefine some macros */
-#ifdef KBD_DATA_REG
-#undef KBD_DATA_REG
#endif
-#ifdef KBD_STATUS_REG
-#undef KBD_STATUS_REG
-#endif
-#ifdef KBD_CNTL_REG
-#undef KBD_CNTL_REG
-#endif
-#define KBD_DATA_REG KBDDATA
-#define KBD_STATUS_REG KBDSTAT
-#define KBD_CNTL_REG KBDCR
-
-extern int sa1111_setkeycode(unsigned int scancode, unsigned int keycode);
-extern int sa1111_getkeycode(unsigned int scancode);
-extern int sa1111_translate(unsigned char scancode, unsigned char *keycode,
- char raw_mode);
-extern char sa1111_unexpected_up(unsigned char keycode);
-extern void sa1111_leds(unsigned char leds);
-extern void sa1111_init_hw(void);
-extern unsigned char sa1111_sysrq_xlate[128];
-
-#define kbd_setkeycode sa1111_setkeycode
-#define kbd_getkeycode sa1111_getkeycode
-#define kbd_translate sa1111_translate
-#define kbd_unexpected_up sa1111_unexpected_up
-#define kbd_leds sa1111_leds
-#define kbd_init_hw sa1111_init_hw
-#define kbd_sysrq_xlate sa1111_sysrq_xlate
-#define kbd_disable_irq(x...) do{;}while(0)
-#define kbd_enable_irq(x...) do{;}while(0)
-
-#define SYSRQ_KEY 0x54
-
-/* resource allocation */
-#define kbd_request_region()
-#define kbd_request_irq(handler) request_irq(KEYBOARD_IRQ, handler, 0, \
- "keyboard", NULL)
-
-/* How to access the keyboard macros on this platform. */
-#define kbd_read_input() (*KBDDATA & 0x00ff)
-#define kbd_read_status() (*KBDSTAT & 0x01ff)
-#define kbd_write_output(val) (*KBDDATA = (val))
-#define kbd_write_command(val) (*KBDCR = (val))
-
-/* Some stoneage hardware needs delays after some operations. */
-#define kbd_pause() do {;} while(0)
-
-/* bit definitions for some registers */
-#define KBD_CR_ENA (1<<3)
-
-#define KBD_STAT_RXB (1<<4)
-#define KBD_STAT_RXF (1<<5)
-#define KBD_STAT_TXB (1<<6)
-#define KBD_STAT_TXE (1<<7)
-#define KBD_STAT_STP (1<<8)
-
-/*
- * Machine specific bits for the PS/2 driver
- */
-
-#define AUX_IRQ MSRXINT
-
-#define aux_request_irq(hand, dev_id) \
- request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS/2 Mouse", dev_id)
-#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id)
-
-/* How to access the mouse macros on this platform. */
-#define mse_read_input() (*MSEDATA & 0x00ff)
-#define mse_read_status() (*MSESTAT & 0x01ff)
-#define mse_write_output(val) (*MSEDATA = (val))
-#define mse_write_command(val) (*MSECR = (val))
-
-/* bit definitions for some registers */
-#define MSE_CR_ENA (1<<3)
-
-#define MSE_STAT_RXB (1<<4)
-#define MSE_STAT_RXF (1<<5)
-#define MSE_STAT_TXB (1<<6)
-#define MSE_STAT_TXE (1<<7)
-#define MSE_STAT_STP (1<<8)
-
-
-#else
-
-/* dummy i.e. no real keyboard */
-#define kbd_setkeycode(x...) (-ENOSYS)
-#define kbd_getkeycode(x...) (-ENOSYS)
-#define kbd_translate(x...) (0)
-#define kbd_unexpected_up(x...) (1)
-#define kbd_leds(x...) do {;} while (0)
-#define kbd_init_hw(x...) do {;} while (0)
-#define kbd_enable_irq(x...) do {;} while (0)
-#define kbd_disable_irq(x...) do {;} while (0)
-
-#endif
-
-
-/* needed if MAGIC_SYSRQ is enabled for serial console */
-#ifndef SYSRQ_KEY
-#define SYSRQ_KEY ((unsigned char)(-1))
-#define kbd_sysrq_xlate ((unsigned char *)NULL)
-#endif
-
#endif /* _SA1100_KEYBOARD_H */
diff --git a/include/asm-arm/arch-sa1100/pangolin.h b/include/asm-arm/arch-sa1100/pangolin.h
index 4f7d0b7bfaf4..b261dd4437ae 100644
--- a/include/asm-arm/arch-sa1100/pangolin.h
+++ b/include/asm-arm/arch-sa1100/pangolin.h
@@ -11,6 +11,7 @@
#error "include <asm/hardware.h> instead"
#endif
+#ifndef CONFIG_SA1100_PANGOLIN_PCMCIA_IDE
/* GPIOs for which the generic definition doesn't say much */
#define GPIO_CF_BUS_ON GPIO_GPIO (3)
@@ -20,3 +21,41 @@
#define IRQ_GPIO_CF_IRQ IRQ_GPIO21
#define IRQ_GPIO_CF_CD IRQ_GPIO22
+
+#else
+/*
+ * These definitions are for PCMCIA/IDE card
+ *
+ * PSKTSEL = 0 ---> PCMCIA
+ * PCMCIA_RESET = GPIO_7 ( output )( 0: normal 1: reset )
+ * PCMCIA_IRQ = GPIO_24 ( input )
+ * PCMCIA_CD = GPIO_25 ( input )
+ *
+ * PSKTSEL = 1 ---> IDE port
+ * IDE_IRQ = GPIO_23 ( input )
+ *
+ * !!WARNING!!
+ * When the PCMCIA/IDE card is inserted, the CF slot
+ * should not have any card inserted!!
+ *
+ */
+
+#define GPIO_PCMCIA_RESET GPIO_GPIO (7)
+#define GPIO_PCMCIA_IRQ GPIO_GPIO (24)
+#define GPIO_PCMCIA_CD GPIO_GPIO (25)
+#define GPIO_IDE_IRQ GPIO_GPIO (8)
+
+#define IRQ_PCMCIA_IRQ IRQ_GPIO24
+#define IRQ_PCMCIA_CD IRQ_GPIO25
+#define IRQ_IDE_IRQ IRQ_GPIO8
+
+#endif
+
+/*
+ * On board LAN chip
+ */
+#define PANGOLIN_LAN_ADDR 0x32000000
+#define PANGOLIN_LAN_RESET GPIO_GPIO (8)
+#define PANGOLIN_LAN_IRQ GPIO_GPIO (26)
+#define PANGOLIN_IRQ_LAN_IRQ IRQ_GPIO26
+
diff --git a/include/asm-arm/arch-sa1100/uncompress.h b/include/asm-arm/arch-sa1100/uncompress.h
index fc1daa24eb50..c505e14156b5 100644
--- a/include/asm-arm/arch-sa1100/uncompress.h
+++ b/include/asm-arm/arch-sa1100/uncompress.h
@@ -3,23 +3,16 @@
*
* (C) 1999 Nicolas Pitre <nico@cam.org>
*
- * Reorganised to use machine_is_*() macros.
+ * Reorganised to be machine independent.
*/
#include "hardware.h"
-#include <asm/mach-types.h>
-
-/* Assabet's Status Control "Register" */
-unsigned long SCR_value;
-
-/* sa1100_setup() will perform any special initialization for UART, etc. */
-extern void sa1100_setup( int arch_id );
-#define arch_decomp_setup() sa1100_setup(arch_id)
-
/*
* The following code assumes the serial port has already been
- * initialized by the bootloader or such...
+ * initialized by the bootloader. We search for the first enabled
+ * port in the most probable order. If you didn't setup a port in
+ * your bootloader then nothing will appear (which might be desired).
*/
#define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
@@ -28,22 +21,15 @@ static void puts( const char *s )
{
unsigned long serial_port;
- if (machine_is_assabet()) {
- if( machine_has_neponset() )
- serial_port = _Ser3UTCR0;
- else
- serial_port = _Ser1UTCR0;
- } else if (machine_is_brutus()||machine_is_nanoengine() ||
- machine_is_pangolin() || machine_is_freebird() ||
- machine_is_pfs168() || machine_is_flexanet())
- serial_port = _Ser1UTCR0;
- else if (machine_is_empeg() || machine_is_bitsy() ||
- machine_is_victor() || machine_is_lart() ||
- machine_is_sherman() || machine_is_yopy() ||
- machine_is_huw_webpanel() || machine_is_itsy() )
+ do {
serial_port = _Ser3UTCR0;
- else
+ if (UART(UTCR3) & UTCR3_TXE) break;
+ serial_port = _Ser1UTCR0;
+ if (UART(UTCR3) & UTCR3_TXE) break;
+ serial_port = _Ser2UTCR0;
+ if (UART(UTCR3) & UTCR3_TXE) break;
return;
+ } while (0);
for (; *s; s++) {
/* wait for space in the UART's transmiter */
@@ -63,4 +49,5 @@ static void puts( const char *s )
/*
* Nothing to do for these
*/
+#define arch_decomp_setup()
#define arch_decomp_wdog()
diff --git a/include/asm-arm/atomic.h b/include/asm-arm/atomic.h
index ba1e5492811a..1e488f094596 100644
--- a/include/asm-arm/atomic.h
+++ b/include/asm-arm/atomic.h
@@ -22,11 +22,7 @@
#error SMP not supported
#endif
-#ifdef CONFIG_ARCH_CO285
typedef struct { volatile int counter; } atomic_t;
-#else
-typedef struct { int counter; } atomic_t;
-#endif
#define ATOMIC_INIT(i) { (i) }
diff --git a/include/asm-arm/cpu-multi32.h b/include/asm-arm/cpu-multi32.h
index 7f07bc8e55cd..5348bb4699b0 100644
--- a/include/asm-arm/cpu-multi32.h
+++ b/include/asm-arm/cpu-multi32.h
@@ -9,6 +9,7 @@
*/
#ifndef __ASSEMBLY__
+#include <asm/memory.h>
#include <asm/page.h>
/* forward-declare task_struct */
@@ -156,4 +157,13 @@ extern const struct processor sa110_processor_functions;
#define cpu_switch_mm(pgd,tsk) cpu_set_pgd(__virt_to_phys((unsigned long)(pgd)))
+#define cpu_get_pgd() \
+ ({ \
+ unsigned long pg; \
+ __asm__("mrc p15, 0, %0, c2, c0, 0" \
+ : "=r" (pg)); \
+ pg &= ~0x3fff; \
+ (pgd_t *)phys_to_virt(pg); \
+ })
+
#endif
diff --git a/include/asm-arm/cpu-single.h b/include/asm-arm/cpu-single.h
index 476115883f46..0c561b7037d9 100644
--- a/include/asm-arm/cpu-single.h
+++ b/include/asm-arm/cpu-single.h
@@ -51,6 +51,7 @@
#ifndef __ASSEMBLY__
+#include <asm/memory.h>
#include <asm/page.h>
/* forward declare task_struct */
@@ -86,4 +87,13 @@ extern volatile void cpu_reset(unsigned long addr);
#define cpu_switch_mm(pgd,tsk) cpu_set_pgd(__virt_to_phys((unsigned long)(pgd)))
+#define cpu_get_pgd() \
+ ({ \
+ unsigned long pg; \
+ __asm__("mrc p15, 0, %0, c2, c0, 0" \
+ : "=r" (pg)); \
+ pg &= ~0x3fff; \
+ (pgd_t *)phys_to_virt(pg); \
+ })
+
#endif
diff --git a/include/asm-arm/hardirq.h b/include/asm-arm/hardirq.h
index c3111a0a2e83..572e729095f8 100644
--- a/include/asm-arm/hardirq.h
+++ b/include/asm-arm/hardirq.h
@@ -2,6 +2,7 @@
#define __ASM_HARDIRQ_H
#include <linux/config.h>
+#include <linux/cache.h>
#include <linux/threads.h>
/* softirq.h is sensitive to the offsets of these fields */
diff --git a/include/asm-arm/hardware/pci_v3.h b/include/asm-arm/hardware/pci_v3.h
index 274dcf0773c5..4d497bdb9a97 100644
--- a/include/asm-arm/hardware/pci_v3.h
+++ b/include/asm-arm/hardware/pci_v3.h
@@ -102,6 +102,10 @@
/* PCI_CFG bits
*/
+#define V3_PCI_CFG_M_I2O_EN (1 << 15)
+#define V3_PCI_CFG_M_IO_REG_DIS (1 << 14)
+#define V3_PCI_CFG_M_IO_DIS (1 << 13)
+#define V3_PCI_CFG_M_EN3V (1 << 12)
#define V3_PCI_CFG_M_RETRY_EN (1 << 10)
#define V3_PCI_CFG_M_AD_LOW1 (1 << 9)
#define V3_PCI_CFG_M_AD_LOW0 (1 << 8)
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h
index 8d7520f0fdea..91e50dc218f0 100644
--- a/include/asm-arm/io.h
+++ b/include/asm-arm/io.h
@@ -72,18 +72,22 @@ extern void __raw_readsl(unsigned int addr, void *data, int longlen);
#include <asm/arch/io.h>
/*
- * IO definitions. We define {out,in,outs,ins}[bwl] if __io is
- * defined by the machine. Otherwise, these definitions are left
- * for the machine specific header files to pick up.
+ * IO definitions. We define {out,in,outs,ins}[bwl] if __io is defined
+ * by the machine. Otherwise, these definitions are left for the machine
+ * specific header files to pick up.
+ *
+ * Note that we prevent GCC re-ordering or caching values in expressions
+ * by introducing sequence points into the in*() definitions. Note that
+ * __raw_* do not guarantee this behaviour.
*/
#ifdef __io
#define outb(v,p) __raw_writeb(v,__io(p))
#define outw(v,p) __raw_writew(v,__io(p))
#define outl(v,p) __raw_writel(v,__io(p))
-#define inb(p) __raw_readb(__io(p))
-#define inw(p) __raw_readw(__io(p))
-#define inl(p) __raw_readl(__io(p))
+#define inb(p) ({ unsigned int __v = __raw_readb(__io(p)); __v; })
+#define inw(p) ({ unsigned int __v = __raw_readw(__io(p)); __v; })
+#define inl(p) ({ unsigned int __v = __raw_readl(__io(p)); __v; })
#define outsb(p,d,l) __raw_writesb(__io(p),d,l)
#define outsw(p,d,l) __raw_writesw(__io(p),d,l)
@@ -168,9 +172,10 @@ extern void __readwrite_bug(const char *fn);
*/
#ifdef __mem_pci
-#define readb(addr) __raw_readb(__mem_pci(addr))
-#define readw(addr) __raw_readw(__mem_pci(addr))
-#define readl(addr) __raw_readl(__mem_pci(addr))
+#define readb(addr) ({ unsigned int __v = __raw_readb(__mem_pci(addr)); __v; })
+#define readw(addr) ({ unsigned int __v = __raw_readw(__mem_pci(addr)); __v; })
+#define readl(addr) ({ unsigned int __v = __raw_readl(__mem_pci(addr)); __v; })
+
#define writeb(val,addr) __raw_writeb(val,__mem_pci(addr))
#define writew(val,addr) __raw_writew(val,__mem_pci(addr))
#define writel(val,addr) __raw_writel(val,__mem_pci(addr))
diff --git a/include/asm-arm/mach/arch.h b/include/asm-arm/mach/arch.h
index 5f47b7ee7105..9e15e251e5de 100644
--- a/include/asm-arm/mach/arch.h
+++ b/include/asm-arm/mach/arch.h
@@ -27,7 +27,8 @@ struct machine_desc {
unsigned int nr; /* architecture number */
unsigned int phys_ram; /* start of physical ram */
unsigned int phys_io; /* start of physical io */
- unsigned int virt_io; /* start of virtual io */
+ unsigned int io_pg_offst; /* byte offset for io
+ * page tabe entry */
const char *name; /* architecture name */
unsigned int param_offset; /* parameter page */
@@ -59,9 +60,9 @@ const struct machine_desc __mach_desc_##_type \
#define MAINTAINER(n)
#define BOOT_MEM(_pram,_pio,_vio) \
- phys_ram: _pram, \
- phys_io: _pio, \
- virt_io: _vio,
+ phys_ram: _pram, \
+ phys_io: _pio, \
+ io_pg_offst: ((_vio)>>18)&0xfffc,
#define BOOT_PARAMS(_params) \
param_offset: _params,
diff --git a/include/asm-arm/param.h b/include/asm-arm/param.h
index e8d174722b2f..67af57ce2ec6 100644
--- a/include/asm-arm/param.h
+++ b/include/asm-arm/param.h
@@ -16,6 +16,9 @@
#ifndef HZ
#define HZ 100
#endif
+#if defined(__KERNEL__) && (HZ == 100)
+#define hz_to_std(a) (a)
+#endif
#ifndef NGROUPS
#define NGROUPS 32
diff --git a/include/asm-arm/pci.h b/include/asm-arm/pci.h
index 2875af468575..8689bba52128 100644
--- a/include/asm-arm/pci.h
+++ b/include/asm-arm/pci.h
@@ -44,7 +44,6 @@ pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr,
consistent_free(vaddr, size, dma_handle);
}
-#if !defined(CONFIG_SA1111)
/* Map a single buffer of the indicated size for DMA in streaming mode.
* The 32-bit bus address to use is returned.
*
@@ -54,6 +53,17 @@ pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr,
static inline dma_addr_t
pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
{
+#ifdef CONFIG_SA1111
+ extern dma_addr_t sa1111_map_single(struct pci_dev *, void *, size_t, int);
+
+ /*
+ * for SA1111 these functions are "magic" and relocate buffers. We
+ * only need to do these if hwdev is non-null; otherwise we expect
+ * the buffer to already be suitable for DMA.
+ */
+ if (hwdev != NULL)
+ return sa1111_map_single(hwdev, ptr, size, direction);
+#endif
consistent_sync(ptr, size, direction);
return virt_to_bus(ptr);
}
@@ -68,16 +78,14 @@ pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
static inline void
pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, size_t size, int direction)
{
+#ifdef CONFIG_SA1111
+ extern void sa1111_unmap_single(struct pci_dev *, dma_addr_t, size_t, int);
+
+ if (hwdev != NULL)
+ sa1111_unmap_single(hwdev, dma_addr, size, direction);
+#endif
/* nothing to do */
}
-#else
-/* for SA1111 these functions are "magic" and relocate buffers */
-extern dma_addr_t pci_map_single(struct pci_dev *hwdev,
- void *ptr, size_t size, int direction);
-extern void pci_unmap_single(struct pci_dev *hwdev,
- dma_addr_t dma_addr,
- size_t size, int direction);
-#endif
/* Map a set of buffers described by scatterlist in streaming
* mode for DMA. This is the scather-gather version of the
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h
index 12d7ae55a7b6..418f738bd958 100644
--- a/include/asm-arm/pgtable.h
+++ b/include/asm-arm/pgtable.h
@@ -175,6 +175,8 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
#include <asm-generic/pgtable.h>
+extern void pgtable_cache_init(void);
+
#endif /* !__ASSEMBLY__ */
#endif /* _ASMARM_PGTABLE_H */
diff --git a/include/asm-arm/processor.h b/include/asm-arm/processor.h
index cd4a06d7c49f..aa0148d9054f 100644
--- a/include/asm-arm/processor.h
+++ b/include/asm-arm/processor.h
@@ -68,6 +68,13 @@ struct thread_struct {
EXTRA_THREAD_STRUCT
};
+#define INIT_MMAP { \
+ vm_mm: &init_mm, \
+ vm_page_prot: PAGE_SHARED, \
+ vm_flags: VM_READ | VM_WRITE | VM_EXEC, \
+ vm_avl_height: 1, \
+}
+
#define INIT_THREAD { \
refcount: ATOMIC_INIT(1), \
EXTRA_THREAD_STRUCT_INIT \
diff --git a/include/asm-arm/setup.h b/include/asm-arm/setup.h
index 2e27fe9ca212..e0650ed3f8ab 100644
--- a/include/asm-arm/setup.h
+++ b/include/asm-arm/setup.h
@@ -126,7 +126,7 @@ struct tag_videotext {
struct tag_ramdisk {
u32 flags; /* bit 0 = load, bit 1 = prompt */
- u32 size; /* decompressed ramdisk size */
+ u32 size; /* decompressed ramdisk size in _kilo_ bytes */
u32 start; /* starting block of floppy-based RAM disk image */
};
@@ -135,7 +135,7 @@ struct tag_ramdisk {
struct tag_initrd {
u32 start; /* physical start address */
- u32 size; /* size of compressed ramdisk image */
+ u32 size; /* size of compressed ramdisk image in bytes */
};
/* board serial number. "64 bits should be enough for everybody" */
diff --git a/include/asm-arm/signal.h b/include/asm-arm/signal.h
index afca084cb856..1bc7f174eee2 100644
--- a/include/asm-arm/signal.h
+++ b/include/asm-arm/signal.h
@@ -75,13 +75,16 @@ typedef unsigned long sigset_t;
/*
* SA_FLAGS values:
*
- * SA_ONSTACK is not currently supported, but will allow sigaltstack(2).
- * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
- * SA_RESTART flag to get restarting signals (which were the default long ago)
- * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
- * SA_RESETHAND clears the handler when the signal is delivered.
- * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
- * SA_NODEFER prevents the current signal from being masked in the handler.
+ * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
+ * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
+ * SA_SIGINFO deliver the signal with SIGINFO structs
+ * SA_THIRTYTWO delivers the signal in 32-bit mode, even if the task
+ * is running in 26-bit.
+ * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)).
+ * SA_RESTART flag to get restarting signals (which were the default long ago)
+ * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
+ * SA_NODEFER prevents the current signal from being masked in the handler.
+ * SA_RESETHAND clears the handler when the signal is delivered.
*
* SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
* Unix names RESETHAND and NODEFER respectively.
@@ -89,6 +92,8 @@ typedef unsigned long sigset_t;
#define SA_NOCLDSTOP 0x00000001
#define SA_NOCLDWAIT 0x00000002 /* not supported yet */
#define SA_SIGINFO 0x00000004
+#define SA_THIRTYTWO 0x02000000
+#define SA_RESTORER 0x04000000
#define SA_ONSTACK 0x08000000
#define SA_RESTART 0x10000000
#define SA_NODEFER 0x40000000
@@ -98,9 +103,6 @@ typedef unsigned long sigset_t;
#define SA_ONESHOT SA_RESETHAND
#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
-#define SA_RESTORER 0x04000000
-#define SA_THIRTYTWO 0x02000000 /* deliver signal in 32-bit mode even if
- task is running 26 bits. */
/*
* sigaltstack controls
diff --git a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h
index 1fac1a34f62a..98a9dfba2760 100644
--- a/include/asm-arm/uaccess.h
+++ b/include/asm-arm/uaccess.h
@@ -63,11 +63,81 @@ static inline int verify_area(int type, const void * addr, unsigned long size)
* error occurs, and leave it unchanged on success. Note that these
* versions are void (ie, don't return a value as such).
*/
-#define get_user(x,p) __get_user_check((x),(p),sizeof(*(p)))
+
+extern int __get_user_1(void *);
+extern int __get_user_2(void *);
+extern int __get_user_4(void *);
+extern int __get_user_8(void *);
+extern int __get_user_bad(void);
+
+#define __get_user_x(__r1,__p,__e,__s,__i...) \
+ __asm__ __volatile__ ("bl __get_user_" #__s \
+ : "=&r" (__e), "=r" (__r1) \
+ : "0" (__p) \
+ : __i)
+
+#define get_user(x,p) \
+ ({ \
+ const register typeof(*(p)) *__p asm("r0") = (p); \
+ register typeof(*(p)) __r1 asm("r1"); \
+ register int __e asm("r0"); \
+ switch (sizeof(*(p))) { \
+ case 1: \
+ __get_user_x(__r1, __p, __e, 1, "lr"); \
+ break; \
+ case 2: \
+ __get_user_x(__r1, __p, __e, 2, "r2", "lr"); \
+ break; \
+ case 4: \
+ __get_user_x(__r1, __p, __e, 4, "lr"); \
+ break; \
+ case 8: \
+ __get_user_x(__r1, __p, __e, 8, "lr"); \
+ break; \
+ default: __e = __get_user_bad(); break; \
+ } \
+ x = __r1; \
+ __e; \
+ })
+
#define __get_user(x,p) __get_user_nocheck((x),(p),sizeof(*(p)))
#define __get_user_error(x,p,e) __get_user_nocheck_error((x),(p),sizeof(*(p)),(e))
-#define put_user(x,p) __put_user_check((__typeof(*(p)))(x),(p),sizeof(*(p)))
+extern int __put_user_1(void *, unsigned int);
+extern int __put_user_2(void *, unsigned int);
+extern int __put_user_4(void *, unsigned int);
+extern int __put_user_8(void *, unsigned long long);
+extern int __put_user_bad(void);
+
+#define __put_user_x(__r1,__p,__e,__s,__i...) \
+ __asm__ __volatile__ ("bl __put_user_" #__s \
+ : "=&r" (__e) \
+ : "0" (__p), "r" (__r1) \
+ : __i)
+
+#define put_user(x,p) \
+ ({ \
+ const register typeof(*(p)) *__p asm("r0") = (p); \
+ const register typeof(*(p)) __r1 asm("r1") = (x); \
+ register int __e asm("r0"); \
+ switch (sizeof(*(p))) { \
+ case 1: \
+ __put_user_x(__r1, __p, __e, 1, "r2", "lr"); \
+ break; \
+ case 2: \
+ __put_user_x(__r1, __p, __e, 2, "r2", "lr"); \
+ break; \
+ case 4: \
+ __put_user_x(__r1, __p, __e, 4, "r2", "lr"); \
+ break; \
+ case 8: \
+ __put_user_x(__r1, __p, __e, 8, "ip", "lr"); \
+ break; \
+ default: __e = __put_user_bad(); break; \
+ } \
+ __e; \
+ })
+
#define __put_user(x,p) __put_user_nocheck((__typeof(*(p)))(x),(p),sizeof(*(p)))
#define __put_user_error(x,p,e) __put_user_nocheck_error((x),(p),sizeof(*(p)),(e))
@@ -142,6 +212,7 @@ static inline long strnlen_user(const char *s, long n)
/*
* These are the work horses of the get/put_user functions
*/
+#if 0
#define __get_user_check(x,ptr,size) \
({ \
long __gu_err = -EFAULT, __gu_val = 0; \
@@ -153,6 +224,7 @@ static inline long strnlen_user(const char *s, long n)
(x) = (__typeof__(*(ptr)))__gu_val; \
__gu_err; \
})
+#endif
#define __get_user_nocheck(x,ptr,size) \
({ \
@@ -195,8 +267,6 @@ static inline long strnlen_user(const char *s, long n)
(void) 0; \
})
-extern long __get_user_bad(void);
-
#define __get_user_size(x,ptr,size,retval) \
do { \
switch (size) { \
@@ -207,8 +277,6 @@ do { \
} \
} while (0)
-extern long __put_user_bad(void);
-
#define __put_user_size(x,ptr,size,retval) \
do { \
switch (size) { \
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h
index 932aa29c5f49..481f324e36dd 100644
--- a/include/asm-i386/system.h
+++ b/include/asm-i386/system.h
@@ -281,10 +281,19 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
* I expect future Intel CPU's to have a weaker ordering,
* but I'd also expect them to finally get their act together
* and add some real memory barriers if so.
+ *
+ * Some non intel clones support out of order store. wmb() ceases to be a
+ * nop for these.
*/
+
#define mb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory")
#define rmb() mb()
+
+#ifdef CONFIG_X86_OOSTORE
+#define wmb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory")
+#else
#define wmb() __asm__ __volatile__ ("": : :"memory")
+#endif
#ifdef CONFIG_SMP
#define smp_mb() mb()
diff --git a/include/asm-s390/chandev.h b/include/asm-s390/chandev.h
index 26dc6d6ebba9..a9d658f732c5 100644
--- a/include/asm-s390/chandev.h
+++ b/include/asm-s390/chandev.h
@@ -139,6 +139,10 @@ chandev_msck_status prevstatus,chandev_msck_status newstatus);
* not operational the previous status is sent in the prevstatus variable.
* This can be used in cases when the default handling isn't quite adequete
* e.g. if a ssch is needed to reinitialize long running channel programs.
+ *
+ * This returns the number of devices found or -ENOMEM if the code didn't
+ * have enough memory to allocate the chandev control block
+ * or -EPERM if a duplicate entry is found.
*/
int chandev_register_and_probe(chandev_probefunc probefunc,
chandev_shutdownfunc shutdownfunc,
diff --git a/include/asm-s390/current.h b/include/asm-s390/current.h
index fbc9f101febf..a9f548b67b95 100644
--- a/include/asm-s390/current.h
+++ b/include/asm-s390/current.h
@@ -19,7 +19,7 @@ static inline struct task_struct * get_current(void)
{
struct task_struct *current;
__asm__("lhi %0,-8192\n\t"
- "nr %0,15"
+ "al %0,0xc40"
: "=&r" (current) : : "cc" );
return current;
}
diff --git a/include/asm-s390/dasd.h b/include/asm-s390/dasd.h
index f9ee1d530e48..5627e8133bda 100644
--- a/include/asm-s390/dasd.h
+++ b/include/asm-s390/dasd.h
@@ -36,6 +36,7 @@ typedef struct dasd_profile_info_t {
unsigned int dasd_io_time2[32]; /* histogram of time from start to irq */
unsigned int dasd_io_time2ps[32]; /* histogram of time from start to irq */
unsigned int dasd_io_time3[32]; /* histogram of time from irq to end */
+ unsigned int dasd_io_nr_req[32]; /* histogram of # of requests in chanq */
} dasd_profile_info_t;
/*
diff --git a/include/asm-s390/debug.h b/include/asm-s390/debug.h
index 9be9863c8160..4c228a8dc4fd 100644
--- a/include/asm-s390/debug.h
+++ b/include/asm-s390/debug.h
@@ -44,6 +44,7 @@ struct __debug_entry{
#define DEBUG_MAX_LEVEL 6 /* debug levels range from 0 to 6 */
#define DEBUG_OFF_LEVEL -1 /* level where debug is switched off */
+#define DEBUG_FLUSH_ALL -1 /* parameter to flush all areas */
#define DEBUG_MAX_VIEWS 10 /* max number of views in proc fs */
#define DEBUG_MAX_PROCF_LEN 16 /* max length for a proc file name */
#define DEBUG_DEFAULT_LEVEL 3 /* initial debug level */
diff --git a/include/asm-s390/gdb-stub.h b/include/asm-s390/gdb-stub.h
index fa68800f4d47..e97c80b76bba 100644
--- a/include/asm-s390/gdb-stub.h
+++ b/include/asm-s390/gdb-stub.h
@@ -10,9 +10,13 @@
#define __S390_GDB_STUB__
#include <linux/config.h>
#if CONFIG_REMOTE_DEBUG
-#include <asm/s390-gdbregs.h>
#include <asm/ptrace.h>
extern int gdb_stub_initialised;
-extern void gdb_stub_handle_exception(gdb_pt_regs *regs,int sigval);
+extern void gdb_stub_handle_exception(struct gdb_pt_regs *regs,int sigval);
+struct net_device;
+struct net_device *gdb_dev;
+void gdb_do_timers(void);
+extern int putDebugChar(char c); /* write a single character */
+extern char getDebugChar(void); /* read and return a single char */
#endif
#endif
diff --git a/include/asm-s390/lowcore.h b/include/asm-s390/lowcore.h
index 4eec0a973b49..7a1507a97dbf 100644
--- a/include/asm-s390/lowcore.h
+++ b/include/asm-s390/lowcore.h
@@ -41,7 +41,7 @@
#define __LC_SAVE_AREA 0xC00
#define __LC_KERNEL_STACK 0xC40
-#define __LC_KERNEL_LEVEL 0xC44
+#define __LC_ASYNC_STACK 0xC44
#define __LC_CPUID 0xC60
#define __LC_CPUADDR 0xC68
#define __LC_IPLDEV 0xC7C
@@ -86,6 +86,12 @@
#include <asm/atomic.h>
#include <asm/sigp.h>
+void restart_int_handler(void);
+void ext_int_handler(void);
+void system_call(void);
+void pgm_check_handler(void);
+void mcck_int_handler(void);
+void io_int_handler(void);
struct _lowcore
{
@@ -107,7 +113,7 @@ struct _lowcore
__u16 cpu_addr; /* 0x084 */
__u16 ext_int_code; /* 0x086 */
__u16 svc_ilc; /* 0x088 */
- __u16 scv_code; /* 0x08a */
+ __u16 svc_code; /* 0x08a */
__u16 pgm_ilc; /* 0x08c */
__u16 pgm_code; /* 0x08e */
__u32 trans_exc_code; /* 0x090 */
@@ -147,7 +153,7 @@ struct _lowcore
/* System info area */
__u32 save_area[16]; /* 0xc00 */
__u32 kernel_stack; /* 0xc40 */
- __u32 kernel_level; /* 0xc44 */
+ __u32 async_stack; /* 0xc44 */
/* entry.S sensitive area start */
__u8 pad10[0xc60-0xc48]; /* 0xc5c */
struct cpuinfo_S390 cpu_data; /* 0xc60 */
@@ -157,9 +163,7 @@ struct _lowcore
/* SMP info area: defined by DJB */
__u64 jiffy_timer_cc; /* 0xc80 */
atomic_t ext_call_fast; /* 0xc88 */
- atomic_t ext_call_queue; /* 0xc8c */
- atomic_t ext_call_count; /* 0xc90 */
- __u8 pad11[0xe00-0xc94]; /* 0xc94 */
+ __u8 pad11[0xe00-0xc8c]; /* 0xc8c */
/* 0xe00 is used as indicator for dump tools */
/* whether the kernel died with panic() or not */
diff --git a/include/asm-s390/pgalloc.h b/include/asm-s390/pgalloc.h
index 417a03c28823..1f3a006759c7 100644
--- a/include/asm-s390/pgalloc.h
+++ b/include/asm-s390/pgalloc.h
@@ -84,6 +84,8 @@ extern __inline__ void free_pgd_slow(pgd_t *pgd)
#define pmd_alloc_one_fast(mm, address) ({ BUG(); ((pmd_t *)1); })
#define pmd_alloc_one(mm,address) ({ BUG(); ((pmd_t *)2); })
#define pmd_free(x) do { } while (0)
+#define pmd_free_slow(x) do { } while (0)
+#define pmd_free_fast(x) do { } while (0)
#define pgd_populate(mm, pmd, pte) BUG()
extern inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pte_t *pte)
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h
index bf316297a0ca..eac4173c4531 100644
--- a/include/asm-s390/pgtable.h
+++ b/include/asm-s390/pgtable.h
@@ -58,13 +58,6 @@ extern char empty_zero_page[PAGE_SIZE];
#endif /* !__ASSEMBLY__ */
/*
- * Certain architectures need to do special things when PTEs
- * within a page table are directly modified. Thus, the following
- * hook is made available.
- */
-#define set_pte(pteptr, pteval) ((*(pteptr)) = (pteval))
-
-/*
* PMD_SHIFT determines the size of the area a second-level page
* table can map
*/
@@ -162,6 +155,7 @@ extern char empty_zero_page[PAGE_SIZE];
/* Bits in the page table entry */
#define _PAGE_PRESENT 0x001 /* Software */
+#define _PAGE_MKCLEAR 0x002 /* Software */
#define _PAGE_RO 0x200 /* HW read-only */
#define _PAGE_INVALID 0x400 /* HW invalid */
@@ -226,6 +220,25 @@ extern char empty_zero_page[PAGE_SIZE];
#define __S111 PAGE_SHARED
/*
+ * Certain architectures need to do special things when PTEs
+ * within a page table are directly modified. Thus, the following
+ * hook is made available.
+ */
+extern inline void set_pte(pte_t *pteptr, pte_t pteval)
+{
+ if ((pte_val(pteval) & (_PAGE_MKCLEAR|_PAGE_INVALID))
+ == _PAGE_MKCLEAR)
+ {
+ pte_val(pteval) &= ~_PAGE_MKCLEAR;
+
+ asm volatile ("sske %0,%1"
+ : : "d" (0), "a" (pte_val(pteval)));
+ }
+
+ *pteptr = pteval;
+}
+
+/*
* Permanent address of a page.
*/
#define page_address(page) ((page)->virtual)
@@ -323,23 +336,22 @@ extern inline pte_t pte_mkwrite(pte_t pte)
extern inline pte_t pte_mkclean(pte_t pte)
{
- /* We can't clear the changed bit atomically. The iske/and/sske
- * sequence has a race condition with the page referenced bit.
- * At the moment pte_mkclean is always followed by a pte_mkold.
- * So its safe to ignore the problem for now. Hope this will
- * never change ... */
- asm volatile ("sske %0,%1"
- : : "d" (0), "a" (pte_val(pte)));
+ /* The only user of pte_mkclean is the fork() code.
+ We must *not* clear the *physical* page dirty bit
+ just because fork() wants to clear the dirty bit in
+ *one* of the page's mappings. So we just do nothing. */
return pte;
}
extern inline pte_t pte_mkdirty(pte_t pte)
{
- /* We can't set the changed bit atomically either. For now we
+ /* We can't set the changed bit atomically. For now we
* set (!) the page referenced bit. */
asm volatile ("sske %0,%1"
: : "d" (_PAGE_CHANGED|_PAGE_REFERENCED),
"a" (pte_val(pte)));
+
+ pte_val(pte) &= ~_PAGE_MKCLEAR;
return pte;
}
@@ -411,7 +423,23 @@ extern inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
pte_val(__pte) = physpage + pgprot_val(pgprot);
return __pte;
}
-#define mk_pte(page,pgprot) mk_pte_phys(__pa(((page)-mem_map)<<PAGE_SHIFT),pgprot)
+
+#define mk_pte(pg, pgprot) \
+({ \
+ struct page *__page = (pg); \
+ unsigned long __physpage = __pa((__page-mem_map) << PAGE_SHIFT); \
+ pte_t __pte = mk_pte_phys(__physpage, (pgprot)); \
+ \
+ if (__page != ZERO_PAGE(__physpage)) { \
+ int __users = page_count(__page); \
+ __users -= !!__page->buffers + !!__page->mapping; \
+ \
+ if (__users == 1) \
+ pte_val(__pte) |= _PAGE_MKCLEAR; \
+ } \
+ \
+ __pte; \
+})
#define pte_page(x) (mem_map+(unsigned long)((pte_val(x) >> PAGE_SHIFT)))
@@ -473,5 +501,10 @@ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
#define PageSkip(page) (0)
#define kern_addr_valid(addr) (1)
+/*
+ * No page table caches to initialise
+ */
+#define pgtable_cache_init() do { } while (0)
+
#endif /* _S390_PAGE_H */
diff --git a/include/asm-s390/ptrace.h b/include/asm-s390/ptrace.h
index 68c37d338f6c..ac6129aa5a0a 100644
--- a/include/asm-s390/ptrace.h
+++ b/include/asm-s390/ptrace.h
@@ -191,6 +191,7 @@ struct gdb_pt_regs
__u32 trap;
__u32 crs[16];
s390_fp_regs fp_regs;
+ __u32 old_ilc;
};
#endif
diff --git a/include/asm-s390/sigp.h b/include/asm-s390/sigp.h
index d284922bc70b..9a6022b50126 100644
--- a/include/asm-s390/sigp.h
+++ b/include/asm-s390/sigp.h
@@ -62,35 +62,10 @@ typedef enum
ec_restart,
ec_halt,
ec_power_off,
- ec_ptlb,
+ ec_call_function,
ec_bit_last
} ec_bit_sig;
-/* Signals which come with a parameter area, synchronous */
-typedef enum
-{
- ec_callback_async,
- ec_callback_sync
-} ec_cmd_sig;
-
-/* state information for synchronous signals */
-typedef enum
-{
- ec_pending,
- ec_executing,
- ec_done
-} ec_state;
-
-/* header for the queuing of signals with a parameter area */
-typedef struct ec_ext_call
-{
- ec_cmd_sig cmd;
- atomic_t status;
- struct ec_ext_call *next;
- void (*func)(void *info);
- void *info;
-} ec_ext_call;
-
/*
* Signal processor
*/
diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h
index 447681e367dd..e3e74ae4a188 100644
--- a/include/asm-s390/smp.h
+++ b/include/asm-s390/smp.h
@@ -26,6 +26,8 @@ typedef struct
__u16 cpu;
} sigp_info;
+extern unsigned long cpu_online_map;
+
#define NO_PROC_ID 0xFF /* No processor magic marker */
/*
@@ -64,12 +66,5 @@ extern __inline__ __u16 hard_smp_processor_id(void)
void smp_local_timer_interrupt(struct pt_regs * regs);
-sigp_ccode smp_ext_call(int cpu, void (*cb)(void *info), void *info, int wait);
-void smp_ext_call_others(void (*cb)(void *info), void *info, int wait);
-sigp_ccode smp_ext_bitcall(int cpu, ec_bit_sig sig);
-void smp_ext_bitcall_others(ec_bit_sig sig);
-
-int smp_signal_others(sigp_order_code order_code,__u32 parameter,
- int spin,sigp_info *info);
#endif
#endif
diff --git a/include/asm-s390/softirq.h b/include/asm-s390/softirq.h
index 6374feb28e07..b82aac30db21 100644
--- a/include/asm-s390/softirq.h
+++ b/include/asm-s390/softirq.h
@@ -18,22 +18,25 @@
#include <asm/lowcore.h>
#define __cpu_bh_enable(cpu) \
- do { barrier(); local_bh_count(cpu)--; } while (0)
+ do { barrier(); local_bh_count(cpu)--; } while (0)
#define cpu_bh_disable(cpu) \
- do { local_bh_count(cpu)++; barrier(); } while (0)
+ do { local_bh_count(cpu)++; barrier(); } while (0)
#define local_bh_disable() cpu_bh_disable(smp_processor_id())
#define __local_bh_enable() __cpu_bh_enable(smp_processor_id())
#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
+extern void do_call_softirq(void);
+
#define local_bh_enable() \
do { \
- unsigned int *ptr = &local_bh_count(smp_processor_id()); \
- barrier(); \
- if (!--*ptr) \
+ unsigned int *ptr = &local_bh_count(smp_processor_id()); \
+ barrier(); \
+ if (!--*ptr) \
if (softirq_pending(smp_processor_id())) \
- do_softirq(); \
+ /* Use the async. stack for softirq */ \
+ do_call_softirq(); \
} while (0)
#endif /* __ASM_SOFTIRQ_H */
diff --git a/include/asm-s390/spinlock.h b/include/asm-s390/spinlock.h
index adf251e795a7..48bd752be6ba 100644
--- a/include/asm-s390/spinlock.h
+++ b/include/asm-s390/spinlock.h
@@ -32,20 +32,19 @@ extern inline void spin_lock(spinlock_t *lp)
__asm__ __volatile(" bras 1,1f\n"
"0: diag 0,0,68\n"
"1: slr 0,0\n"
- " cs 0,1,%1\n"
+ " cs 0,1,0(%0)\n"
" jl 0b\n"
- : "=m" (lp->lock)
- : "0" (lp->lock) : "0", "1", "cc" );
+ : : "a" (&lp->lock) : "0", "1", "cc", "memory" );
}
extern inline int spin_trylock(spinlock_t *lp)
{
unsigned long result;
- __asm__ __volatile(" slr %1,%1\n"
+ __asm__ __volatile(" slr %0,%0\n"
" basr 1,0\n"
- "0: cs %1,1,%0"
- : "=m" (lp->lock), "=&d" (result)
- : "0" (lp->lock) : "1", "cc" );
+ "0: cs %0,1,0(%1)"
+ : "=&d" (result)
+ : "a" (&lp->lock) : "1", "cc", "memory" );
return !result;
}
@@ -53,7 +52,7 @@ extern inline void spin_unlock(spinlock_t *lp)
{
__asm__ __volatile(" xc 0(4,%0),0(%0)\n"
" bcr 15,0"
- : /* no output */ : "a" (lp) : "memory", "cc" );
+ : : "a" (&lp->lock) : "memory", "cc" );
}
/*
@@ -76,24 +75,24 @@ typedef struct {
#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0)
#define read_lock(rw) \
- asm volatile(" l 2,%0\n" \
+ asm volatile(" l 2,0(%0)\n" \
" j 1f\n" \
"0: diag 0,0,68\n" \
- "1: la 2,0(2)\n" /* clear high (=write) bit */ \
- " la 3,1(2)\n" /* one more reader */ \
- " cs 2,3,%0\n" /* try to write new value */ \
+ "1: la 2,0(2)\n" /* clear high (=write) bit */ \
+ " la 3,1(2)\n" /* one more reader */ \
+ " cs 2,3,0(%0)\n" /* try to write new value */ \
" jl 0b" \
- : "+m" ((rw)->lock) : : "2", "3", "cc" );
+ : : "a" (&(rw)->lock) : "2", "3", "cc", "memory" );
#define read_unlock(rw) \
- asm volatile(" l 2,%0\n" \
+ asm volatile(" l 2,0(%0)\n" \
" j 1f\n" \
"0: diag 0,0,68\n" \
"1: lr 3,2\n" \
" ahi 3,-1\n" /* one less reader */ \
- " cs 2,3,%0\n" \
+ " cs 2,3,0(%0)\n" \
" jl 0b" \
- : "+m" ((rw)->lock) : : "2", "3", "cc" );
+ : : "a" (&(rw)->lock) : "2", "3", "cc", "memory" );
#define write_lock(rw) \
asm volatile(" lhi 3,1\n" \
@@ -101,9 +100,9 @@ typedef struct {
" j 1f\n" \
"0: diag 0,0,68\n" \
"1: slr 2,2\n" /* old lock value must be 0 */ \
- " cs 2,3,%0\n" \
+ " cs 2,3,0(%0)\n" \
" jl 0b" \
- : "+m" ((rw)->lock) : : "2", "3", "cc" );
+ : : "a" (&(rw)->lock) : "2", "3", "cc", "memory" );
#define write_unlock(rw) \
asm volatile(" slr 3,3\n" /* new lock value = 0 */ \
@@ -111,8 +110,8 @@ typedef struct {
"0: diag 0,0,68\n" \
"1: lhi 2,1\n" \
" sll 2,31\n" /* old lock value must be 0x80000000 */ \
- " cs 2,3,%0\n" \
+ " cs 2,3,0(%0)\n" \
" jl 0b" \
- : "+m" ((rw)->lock) : : "2", "3", "cc" );
+ : : "a" (&(rw)->lock) : "2", "3", "cc", "memory" );
#endif /* __ASM_SPINLOCK_H */
diff --git a/include/asm-s390/uaccess.h b/include/asm-s390/uaccess.h
index d8bf6be498f2..ae5390d7f1d0 100644
--- a/include/asm-s390/uaccess.h
+++ b/include/asm-s390/uaccess.h
@@ -78,6 +78,35 @@ extern unsigned long search_exception_table(unsigned long);
* use the right size if we just have the right pointer type.
*/
+extern inline int __put_user_asm_8(__u64 x, void *ptr)
+{
+ int err;
+
+ __asm__ __volatile__ ( " sr %1,%1\n"
+ " la 2,%2\n"
+ " la 4,%0\n"
+ " sacf 512\n"
+ "0: mvc 0(8,4),0(2)\n"
+ " sacf 0\n"
+ "1:\n"
+ ".section .fixup,\"ax\"\n"
+ "2: sacf 0\n"
+ " lhi %1,%h3\n"
+ " bras 4,3f\n"
+ " .long 1b\n"
+ "3: l 4,0(4)\n"
+ " br 4\n"
+ ".previous\n"
+ ".section __ex_table,\"a\"\n"
+ " .align 4\n"
+ " .long 0b,2b\n"
+ ".previous"
+ : "=m" (*((__u32*) ptr)), "=&d" (err)
+ : "m" (x), "K" (-EFAULT)
+ : "cc", "2", "4" );
+ return err;
+}
+
extern inline int __put_user_asm_4(__u32 x, void *ptr)
{
int err;
@@ -179,6 +208,9 @@ extern inline int __put_user_asm_1(__u8 x, void *ptr)
case 4: \
__pu_err = __put_user_asm_4((__u32) x,(ptr));\
break; \
+ case 8: \
+ __pu_err = __put_user_asm_8((__u64) x,(ptr));\
+ break; \
default: \
__pu_err = __put_user_bad(); \
break; \
@@ -200,6 +232,31 @@ extern inline int __put_user_asm_1(__u8 x, void *ptr)
extern int __put_user_bad(void);
+#define __get_user_asm_8(x, ptr, err) \
+({ \
+ __asm__ __volatile__ ( " sr %1,%1\n" \
+ " la 2,%0\n" \
+ " la 4,%2\n" \
+ " sacf 512\n" \
+ "0: mvc 0(8,2),0(4)\n" \
+ " sacf 0\n" \
+ "1:\n" \
+ ".section .fixup,\"ax\"\n" \
+ "2: sacf 0\n" \
+ " lhi %1,%h3\n" \
+ " bras 4,3f\n" \
+ " .long 1b\n" \
+ "3: l 4,0(4)\n" \
+ " br 4\n" \
+ ".previous\n" \
+ ".section __ex_table,\"a\"\n" \
+ " .align 4\n" \
+ " .long 0b,2b\n" \
+ ".previous" \
+ : "=m" (x) , "=&d" (err) \
+ : "m" (*(const __u64*)(ptr)),"K" (-EFAULT) \
+ : "cc", "2", "4" ); \
+})
#define __get_user_asm_4(x, ptr, err) \
({ \
@@ -290,6 +347,9 @@ extern int __put_user_bad(void);
case 4: \
__get_user_asm_4(x,ptr,__gu_err); \
break; \
+ case 8: \
+ __get_user_asm_8(x,ptr,__gu_err); \
+ break; \
default: \
(x) = 0; \
__gu_err = __get_user_bad(); \
@@ -372,7 +432,7 @@ __copy_from_user_asm(void* to, const void* from, long n)
"0: mvcle 2,4,0\n"
" jo 0b\n"
" sacf 0\n"
- " lr %0,3\n"
+ " lr %0,5\n"
".section __ex_table,\"a\"\n"
" .align 4\n"
" .long 0b,__copy_from_user_fixup\n"
diff --git a/include/asm-s390/ucontext.h b/include/asm-s390/ucontext.h
index d4e39ae77de9..d69bec0b03f5 100644
--- a/include/asm-s390/ucontext.h
+++ b/include/asm-s390/ucontext.h
@@ -13,10 +13,8 @@ struct ucontext {
unsigned long uc_flags;
struct ucontext *uc_link;
stack_t uc_stack;
+ _sigregs uc_mcontext;
sigset_t uc_sigmask; /* mask last for extensibility */
- struct sigcontext *sc; /* Added for pthread support */
};
-
-
#endif /* !_ASM_S390_UCONTEXT_H */
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h
index b223e049063e..2c5a01426b1f 100644
--- a/include/asm-s390/unistd.h
+++ b/include/asm-s390/unistd.h
@@ -178,6 +178,8 @@
#define __NR_capset 185
#define __NR_sigaltstack 186
#define __NR_sendfile 187
+#define __NR_getpmsg 188
+#define __NR_putpmsg 189
#define __NR_vfork 190
#define __NR_ugetrlimit 191 /* SuS compliant getrlimit */
#define __NR_mmap2 192
diff --git a/include/asm-s390/vtoc.h b/include/asm-s390/vtoc.h
index 4a7927896ed5..f3310604374e 100644
--- a/include/asm-s390/vtoc.h
+++ b/include/asm-s390/vtoc.h
@@ -39,135 +39,6 @@
#define VTOC_ERROR "VTOC error:"
-enum failure {unable_to_open,
- unable_to_seek,
- unable_to_write,
- unable_to_read};
-
-unsigned char ASCtoEBC[256] =
-{
- /*00 NL SH SX EX ET NQ AK BL */
- 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F,
- /*08 BS HT LF VT FF CR SO SI */
- 0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
- /*10 DL D1 D2 D3 D4 NK SN EB */
- 0x10, 0x11, 0x12, 0x13, 0x3C, 0x15, 0x32, 0x26,
- /*18 CN EM SB EC FS GS RS US */
- 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F,
- /*20 SP ! " # $ % & ' */
- 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D,
- /*28 ( ) * + , - . / */
- 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61,
- /*30 0 1 2 3 4 5 6 7 */
- 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
- /*38 8 9 : ; < = > ? */
- 0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F,
- /*40 @ A B C D E F G */
- 0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7,
- /*48 H I J K L M N O */
- 0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6,
- /*50 P Q R S T U V W */
- 0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6,
- /*58 X Y Z [ \ ] ^ _ */
- 0xE7, 0xE8, 0xE9, 0xAD, 0xE0, 0xBD, 0x5F, 0x6D,
- /*60 ` a b c d e f g */
- 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
- /*68 h i j k l m n o */
- 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96,
- /*70 p q r s t u v w */
- 0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
- /*78 x y z { | } ~ DL */
- 0xA7, 0xA8, 0xA9, 0xC0, 0x4F, 0xD0, 0xA1, 0x07,
- 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
- 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
- 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
- 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
- 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
- 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
- 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
- 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
- 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
- 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
- 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
- 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
- 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
- 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
- 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
- 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0xFF
-};
-
-
-unsigned char EBCtoASC[256] =
-{
- /* 0x00 NUL SOH STX ETX *SEL HT *RNL DEL */
- 0x00, 0x01, 0x02, 0x03, 0x07, 0x09, 0x07, 0x7F,
- /* 0x08 -GE -SPS -RPT VT FF CR SO SI */
- 0x07, 0x07, 0x07, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
- /* 0x10 DLE DC1 DC2 DC3 -RES -NL BS -POC
- -ENP ->LF */
- 0x10, 0x11, 0x12, 0x13, 0x07, 0x0A, 0x08, 0x07,
- /* 0x18 CAN EM -UBS -CU1 -IFS -IGS -IRS -ITB
- -IUS */
- 0x18, 0x19, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
- /* 0x20 -DS -SOS FS -WUS -BYP LF ETB ESC
- -INP */
- 0x07, 0x07, 0x1C, 0x07, 0x07, 0x0A, 0x17, 0x1B,
- /* 0x28 -SA -SFE -SM -CSP -MFA ENQ ACK BEL
- -SW */
- 0x07, 0x07, 0x07, 0x07, 0x07, 0x05, 0x06, 0x07,
- /* 0x30 ---- ---- SYN -IR -PP -TRN -NBS EOT */
- 0x07, 0x07, 0x16, 0x07, 0x07, 0x07, 0x07, 0x04,
- /* 0x38 -SBS -IT -RFF -CU3 DC4 NAK ---- SUB */
- 0x07, 0x07, 0x07, 0x07, 0x14, 0x15, 0x07, 0x1A,
- /* 0x40 SP RSP ä ---- */
- 0x20, 0xFF, 0x83, 0x84, 0x85, 0xA0, 0x07, 0x86,
- /* 0x48 . < ( + | */
- 0x87, 0xA4, 0x9B, 0x2E, 0x3C, 0x28, 0x2B, 0x7C,
- /* 0x50 & ---- */
- 0x26, 0x82, 0x88, 0x89, 0x8A, 0xA1, 0x8C, 0x07,
- /* 0x58 ß ! $ * ) ; */
- 0x8D, 0xE1, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0xAA,
- /* 0x60 - / ---- Ä ---- ---- ---- */
- 0x2D, 0x2F, 0x07, 0x8E, 0x07, 0x07, 0x07, 0x8F,
- /* 0x68 ---- , % _ > ? */
- 0x80, 0xA5, 0x07, 0x2C, 0x25, 0x5F, 0x3E, 0x3F,
- /* 0x70 ---- ---- ---- ---- ---- ---- ---- */
- 0x07, 0x90, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
- /* 0x78 * ` : # @ ' = " */
- 0x70, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22,
- /* 0x80 * a b c d e f g */
- 0x07, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
- /* 0x88 h i ---- ---- ---- */
- 0x68, 0x69, 0xAE, 0xAF, 0x07, 0x07, 0x07, 0xF1,
- /* 0x90 ° j k l m n o p */
- 0xF8, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70,
- /* 0x98 q r ---- ---- */
- 0x71, 0x72, 0xA6, 0xA7, 0x91, 0x07, 0x92, 0x07,
- /* 0xA0 ~ s t u v w x */
- 0xE6, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
- /* 0xA8 y z ---- ---- ---- ---- */
- 0x79, 0x7A, 0xAD, 0xAB, 0x07, 0x07, 0x07, 0x07,
- /* 0xB0 ^ ---- § ---- */
- 0x5E, 0x9C, 0x9D, 0xFA, 0x07, 0x07, 0x07, 0xAC,
- /* 0xB8 ---- [ ] ---- ---- ---- ---- */
- 0xAB, 0x07, 0x5B, 0x5D, 0x07, 0x07, 0x07, 0x07,
- /* 0xC0 { A B C D E F G */
- 0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
- /* 0xC8 H I ---- ö ---- */
- 0x48, 0x49, 0x07, 0x93, 0x94, 0x95, 0xA2, 0x07,
- /* 0xD0 } J K L M N O P */
- 0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50,
- /* 0xD8 Q R ---- ü */
- 0x51, 0x52, 0x07, 0x96, 0x81, 0x97, 0xA3, 0x98,
- /* 0xE0 \ S T U V W X */
- 0x5C, 0xF6, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
- /* 0xE8 Y Z ---- Ö ---- ---- ---- */
- 0x59, 0x5A, 0xFD, 0x07, 0x99, 0x07, 0x07, 0x07,
- /* 0xF0 0 1 2 3 4 5 6 7 */
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
- /* 0xF8 8 9 ---- ---- Ü ---- ---- ---- */
- 0x38, 0x39, 0x07, 0x07, 0x9A, 0x07, 0x07, 0x07
-};
typedef struct ttr
{
diff --git a/include/asm-s390x/chandev.h b/include/asm-s390x/chandev.h
index 26dc6d6ebba9..a9d658f732c5 100644
--- a/include/asm-s390x/chandev.h
+++ b/include/asm-s390x/chandev.h
@@ -139,6 +139,10 @@ chandev_msck_status prevstatus,chandev_msck_status newstatus);
* not operational the previous status is sent in the prevstatus variable.
* This can be used in cases when the default handling isn't quite adequete
* e.g. if a ssch is needed to reinitialize long running channel programs.
+ *
+ * This returns the number of devices found or -ENOMEM if the code didn't
+ * have enough memory to allocate the chandev control block
+ * or -EPERM if a duplicate entry is found.
*/
int chandev_register_and_probe(chandev_probefunc probefunc,
chandev_shutdownfunc shutdownfunc,
diff --git a/include/asm-s390x/current.h b/include/asm-s390x/current.h
index e7307c4f0f31..ad6a6fe50ae2 100644
--- a/include/asm-s390x/current.h
+++ b/include/asm-s390x/current.h
@@ -19,7 +19,7 @@ static inline struct task_struct * get_current(void)
{
struct task_struct *current;
__asm__("lghi %0,-16384\n\t"
- "ngr %0,15"
+ "alg %0,0xd40"
: "=&r" (current) : : "cc" );
return current;
}
diff --git a/include/asm-s390x/dasd.h b/include/asm-s390x/dasd.h
index f9ee1d530e48..5627e8133bda 100644
--- a/include/asm-s390x/dasd.h
+++ b/include/asm-s390x/dasd.h
@@ -36,6 +36,7 @@ typedef struct dasd_profile_info_t {
unsigned int dasd_io_time2[32]; /* histogram of time from start to irq */
unsigned int dasd_io_time2ps[32]; /* histogram of time from start to irq */
unsigned int dasd_io_time3[32]; /* histogram of time from irq to end */
+ unsigned int dasd_io_nr_req[32]; /* histogram of # of requests in chanq */
} dasd_profile_info_t;
/*
diff --git a/include/asm-s390x/debug.h b/include/asm-s390x/debug.h
index 9be9863c8160..4c228a8dc4fd 100644
--- a/include/asm-s390x/debug.h
+++ b/include/asm-s390x/debug.h
@@ -44,6 +44,7 @@ struct __debug_entry{
#define DEBUG_MAX_LEVEL 6 /* debug levels range from 0 to 6 */
#define DEBUG_OFF_LEVEL -1 /* level where debug is switched off */
+#define DEBUG_FLUSH_ALL -1 /* parameter to flush all areas */
#define DEBUG_MAX_VIEWS 10 /* max number of views in proc fs */
#define DEBUG_MAX_PROCF_LEN 16 /* max length for a proc file name */
#define DEBUG_DEFAULT_LEVEL 3 /* initial debug level */
diff --git a/include/asm-s390x/lowcore.h b/include/asm-s390x/lowcore.h
index 1594560ae6ab..443b28e68b83 100644
--- a/include/asm-s390x/lowcore.h
+++ b/include/asm-s390x/lowcore.h
@@ -1,3 +1,4 @@
+
/*
* include/asm-s390/lowcore.h
*
@@ -39,7 +40,7 @@
#define __LC_SAVE_AREA 0xC00
#define __LC_KERNEL_STACK 0xD40
-#define __LC_KERNEL_LEVEL 0xD48
+#define __LC_ASYNC_STACK 0xD48
#define __LC_CPUID 0xD90
#define __LC_CPUADDR 0xD98
#define __LC_IPLDEV 0xDB8
@@ -85,6 +86,12 @@
#include <asm/atomic.h>
#include <asm/sigp.h>
+void restart_int_handler(void);
+void ext_int_handler(void);
+void system_call(void);
+void pgm_check_handler(void);
+void mcck_int_handler(void);
+void io_int_handler(void);
struct _lowcore
{
@@ -96,7 +103,7 @@ struct _lowcore
__u16 cpu_addr; /* 0x084 */
__u16 ext_int_code; /* 0x086 */
__u16 svc_ilc; /* 0x088 */
- __u16 scv_code; /* 0x08a */
+ __u16 svc_code; /* 0x08a */
__u16 pgm_ilc; /* 0x08c */
__u16 pgm_code; /* 0x08e */
__u32 data_exc_code; /* 0x090 */
@@ -142,7 +149,7 @@ struct _lowcore
__u64 save_area[16]; /* 0xc00 */
__u8 pad9[0xd40-0xc80]; /* 0xc80 */
__u64 kernel_stack; /* 0xd40 */
- __u64 kernel_level; /* 0xd48 */
+ __u64 async_stack; /* 0xd48 */
/* entry.S sensitive area start */
__u8 pad10[0xd80-0xd50]; /* 0xd64 */
struct cpuinfo_S390 cpu_data; /* 0xd80 */
@@ -153,10 +160,7 @@ struct _lowcore
/* SMP info area: defined by DJB */
__u64 jiffy_timer_cc; /* 0xdc0 */
__u64 ext_call_fast; /* 0xdc8 */
- __u64 ext_call_queue; /* 0xdd0 */
- __u64 ext_call_count; /* 0xdd8 */
-
- __u8 pad12[0xe00-0xde0]; /* 0xde0 */
+ __u8 pad12[0xe00-0xdd0]; /* 0xdd0 */
/* 0xe00 is used as indicator for dump tools */
/* whether the kernel died with panic() or not */
diff --git a/include/asm-s390x/mathemu.h b/include/asm-s390x/mathemu.h
deleted file mode 100644
index c78d97b43243..000000000000
--- a/include/asm-s390x/mathemu.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * arch/s390/kernel/mathemu.h
- * IEEE floating point emulation.
- *
- * S390 version
- * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
- * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
- */
-
-#ifndef __MATHEMU__
-#define __MATHEMU__
-
-extern int math_emu_b3(__u8 *, struct pt_regs *);
-extern int math_emu_ed(__u8 *, struct pt_regs *);
-extern void math_emu_ldr(__u8 *);
-extern void math_emu_ler(__u8 *);
-extern void math_emu_std(__u8 *, struct pt_regs *);
-extern void math_emu_ld(__u8 *, struct pt_regs *);
-extern void math_emu_ste(__u8 *, struct pt_regs *);
-extern void math_emu_le(__u8 *, struct pt_regs *);
-extern int math_emu_lfpc(__u8 *, struct pt_regs *);
-extern int math_emu_stfpc(__u8 *, struct pt_regs *);
-extern int math_emu_srnm(__u8 *, struct pt_regs *);
-
-
-extern __u64 __adddf3(__u64,__u64);
-extern __u64 __subdf3(__u64,__u64);
-extern __u64 __muldf3(__u64,__u64);
-extern __u64 __divdf3(__u64,__u64);
-extern long __cmpdf2(__u64,__u64);
-extern __u64 __negdf2(__u64);
-extern __u64 __absdf2(__u64);
-extern __u32 __addsf3(__u32,__u32);
-extern __u32 __subsf3(__u32,__u32);
-extern __u32 __mulsf3(__u32,__u32);
-extern __u32 __divsf3(__u32,__u32);
-extern __u32 __negsf2(__u32);
-extern __u32 __abssf2(__u32);
-extern long __cmpsf2(__u32,__u32);
-extern __u32 __truncdfsf2(__u64);
-extern __u32 __fixsfsi(__u32);
-extern __u32 __fixdfsi(__u64);
-extern __u64 __floatsidf(__u32);
-extern __u32 __floatsisf(__u32);
-extern __u64 __extendsfdf2(__u32);
-
-#endif /* __MATHEMU__ */
-
diff --git a/include/asm-s390x/page.h b/include/asm-s390x/page.h
index afad87da7b1f..6f8b67118cb4 100644
--- a/include/asm-s390x/page.h
+++ b/include/asm-s390x/page.h
@@ -110,11 +110,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
/* to align the pointer to the (next) page boundary */
#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
-/*
- *
- *
- */
-
#define __PAGE_OFFSET 0x0UL
#define PAGE_OFFSET 0x0UL
#define __pa(x) (unsigned long)(x)
diff --git a/include/asm-s390x/param.h b/include/asm-s390x/param.h
index fc5aec78c2a2..f2e0cc0a4dcc 100644
--- a/include/asm-s390x/param.h
+++ b/include/asm-s390x/param.h
@@ -11,6 +11,9 @@
#ifndef HZ
#define HZ 100
+#ifdef __KERNEL__
+#define hz_to_std(a) (a)
+#endif
#endif
#define EXEC_PAGESIZE 4096
diff --git a/include/asm-s390x/pgtable.h b/include/asm-s390x/pgtable.h
index 21937e571f5b..1bc4b2f36e3d 100644
--- a/include/asm-s390x/pgtable.h
+++ b/include/asm-s390x/pgtable.h
@@ -54,13 +54,6 @@ extern char empty_zero_page[PAGE_SIZE];
#endif /* !__ASSEMBLY__ */
/*
- * Certain architectures need to do special things when PTEs
- * within a page table are directly modified. Thus, the following
- * hook is made available.
- */
-#define set_pte(pteptr, pteval) ((*(pteptr)) = (pteval))
-
-/*
* PMD_SHIFT determines the size of the area a second-level page
* table can map
*/
@@ -164,6 +157,7 @@ extern char empty_zero_page[PAGE_SIZE];
/* Bits in the page table entry */
#define _PAGE_PRESENT 0x001 /* Software */
+#define _PAGE_MKCLEAR 0x002 /* Software */
#define _PAGE_RO 0x200 /* HW read-only */
#define _PAGE_INVALID 0x400 /* HW invalid */
@@ -180,7 +174,8 @@ extern char empty_zero_page[PAGE_SIZE];
*/
#define _REGION_THIRD 0x4
#define _REGION_THIRD_LEN 0x3
-#define _REGION_TABLE (_REGION_THIRD|_REGION_THIRD_LEN|0x40)
+#define _REGION_TABLE (_REGION_THIRD|_REGION_THIRD_LEN|0x40|0x100)
+#define _KERN_REGION_TABLE (_REGION_THIRD|_REGION_THIRD_LEN)
/* Bits in the storage key */
#define _PAGE_CHANGED 0x02 /* HW changed bit */
@@ -220,6 +215,25 @@ extern char empty_zero_page[PAGE_SIZE];
#define __S111 PAGE_SHARED
/*
+ * Certain architectures need to do special things when PTEs
+ * within a page table are directly modified. Thus, the following
+ * hook is made available.
+ */
+extern inline void set_pte(pte_t *pteptr, pte_t pteval)
+{
+ if ((pte_val(pteval) & (_PAGE_MKCLEAR|_PAGE_INVALID))
+ == _PAGE_MKCLEAR)
+ {
+ pte_val(pteval) &= ~_PAGE_MKCLEAR;
+
+ asm volatile ("sske %0,%1"
+ : : "d" (0), "a" (pte_val(pteval)));
+ }
+
+ *pteptr = pteval;
+}
+
+/*
* Permanent address of a page.
*/
#define page_address(page) ((page)->virtual)
@@ -341,13 +355,10 @@ extern inline pte_t pte_mkwrite(pte_t pte)
extern inline pte_t pte_mkclean(pte_t pte)
{
- /* We can't clear the changed bit atomically. The iske/and/sske
- * sequence has a race condition with the page referenced bit.
- * At the moment pte_mkclean is always followed by a pte_mkold.
- * So its safe to ignore the problem for now. Hope this will
- * never change ... */
- asm volatile ("sske %0,%1"
- : : "d" (0), "a" (pte_val(pte)));
+ /* The only user of pte_mkclean is the fork() code.
+ We must *not* clear the *physical* page dirty bit
+ just because fork() wants to clear the dirty bit in
+ *one* of the page's mappings. So we just do nothing. */
return pte;
}
@@ -358,6 +369,8 @@ extern inline pte_t pte_mkdirty(pte_t pte)
asm volatile ("sske %0,%1"
: : "d" (_PAGE_CHANGED|_PAGE_REFERENCED),
"a" (pte_val(pte)));
+
+ pte_val(pte) &= ~_PAGE_MKCLEAR;
return pte;
}
@@ -429,7 +442,23 @@ extern inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
pte_val(__pte) = physpage + pgprot_val(pgprot);
return __pte;
}
-#define mk_pte(page,pgprot) mk_pte_phys(__pa(((page)-mem_map)<<PAGE_SHIFT),pgprot)
+
+#define mk_pte(pg, pgprot) \
+({ \
+ struct page *__page = (pg); \
+ unsigned long __physpage = __pa((__page-mem_map) << PAGE_SHIFT); \
+ pte_t __pte = mk_pte_phys(__physpage, (pgprot)); \
+ \
+ if (__page != ZERO_PAGE(__physpage)) { \
+ int __users = page_count(__page); \
+ __users -= !!__page->buffers + !!__page->mapping; \
+ \
+ if (__users == 1) \
+ pte_val(__pte) |= _PAGE_MKCLEAR; \
+ } \
+ \
+ __pte; \
+})
#define pte_page(x) (mem_map+(unsigned long)((pte_val(x) >> PAGE_SHIFT)))
@@ -492,5 +521,10 @@ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
#define PageSkip(page) (0)
#define kern_addr_valid(addr) (1)
+/*
+ * No page table caches to initialise
+ */
+#define pgtable_cache_init() do { } while (0)
+
#endif /* _S390_PAGE_H */
diff --git a/include/asm-s390x/sigp.h b/include/asm-s390x/sigp.h
index d6a12e84d28e..a53b5fee864d 100644
--- a/include/asm-s390x/sigp.h
+++ b/include/asm-s390x/sigp.h
@@ -62,33 +62,10 @@ typedef enum
ec_restart,
ec_halt,
ec_power_off,
+ ec_call_function,
ec_bit_last
} ec_bit_sig;
-/* Signals which come with a parameter area */
-typedef enum
-{
- ec_callback_sync,
- ec_callback_async
-} ec_cmd_sig;
-
-/* state information for signals */
-typedef enum
-{
- ec_pending,
- ec_executing,
- ec_done
-} ec_state;
-
-/* header for the queuing of callbacks */
-typedef struct ec_ext_call
-{
- ec_cmd_sig cmd;
- atomic_t status;
- struct ec_ext_call *next;
- void (*func)(void *info);
- void *info;
-} ec_ext_call;
/*
* Signal processor
diff --git a/include/asm-s390x/smp.h b/include/asm-s390x/smp.h
index 447681e367dd..e3e74ae4a188 100644
--- a/include/asm-s390x/smp.h
+++ b/include/asm-s390x/smp.h
@@ -26,6 +26,8 @@ typedef struct
__u16 cpu;
} sigp_info;
+extern unsigned long cpu_online_map;
+
#define NO_PROC_ID 0xFF /* No processor magic marker */
/*
@@ -64,12 +66,5 @@ extern __inline__ __u16 hard_smp_processor_id(void)
void smp_local_timer_interrupt(struct pt_regs * regs);
-sigp_ccode smp_ext_call(int cpu, void (*cb)(void *info), void *info, int wait);
-void smp_ext_call_others(void (*cb)(void *info), void *info, int wait);
-sigp_ccode smp_ext_bitcall(int cpu, ec_bit_sig sig);
-void smp_ext_bitcall_others(ec_bit_sig sig);
-
-int smp_signal_others(sigp_order_code order_code,__u32 parameter,
- int spin,sigp_info *info);
#endif
#endif
diff --git a/include/asm-s390x/softirq.h b/include/asm-s390x/softirq.h
index 6374feb28e07..b82aac30db21 100644
--- a/include/asm-s390x/softirq.h
+++ b/include/asm-s390x/softirq.h
@@ -18,22 +18,25 @@
#include <asm/lowcore.h>
#define __cpu_bh_enable(cpu) \
- do { barrier(); local_bh_count(cpu)--; } while (0)
+ do { barrier(); local_bh_count(cpu)--; } while (0)
#define cpu_bh_disable(cpu) \
- do { local_bh_count(cpu)++; barrier(); } while (0)
+ do { local_bh_count(cpu)++; barrier(); } while (0)
#define local_bh_disable() cpu_bh_disable(smp_processor_id())
#define __local_bh_enable() __cpu_bh_enable(smp_processor_id())
#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
+extern void do_call_softirq(void);
+
#define local_bh_enable() \
do { \
- unsigned int *ptr = &local_bh_count(smp_processor_id()); \
- barrier(); \
- if (!--*ptr) \
+ unsigned int *ptr = &local_bh_count(smp_processor_id()); \
+ barrier(); \
+ if (!--*ptr) \
if (softirq_pending(smp_processor_id())) \
- do_softirq(); \
+ /* Use the async. stack for softirq */ \
+ do_call_softirq(); \
} while (0)
#endif /* __ASM_SOFTIRQ_H */
diff --git a/include/asm-s390x/spinlock.h b/include/asm-s390x/spinlock.h
index da46da82ec7b..b0dc918b395c 100644
--- a/include/asm-s390x/spinlock.h
+++ b/include/asm-s390x/spinlock.h
@@ -32,20 +32,19 @@ extern inline void spin_lock(spinlock_t *lp)
__asm__ __volatile(" bras 1,1f\n"
"0: # diag 0,0,68\n"
"1: slr 0,0\n"
- " cs 0,1,%1\n"
+ " cs 0,1,0(%0)\n"
" jl 0b\n"
- : "=m" (lp->lock)
- : "0" (lp->lock) : "0", "1", "cc" );
+ : : "a" (&lp->lock) : "0", "1", "cc", "memory" );
}
extern inline int spin_trylock(spinlock_t *lp)
{
unsigned int result;
- __asm__ __volatile(" slr %1,%1\n"
+ __asm__ __volatile(" slr %0,%0\n"
" basr 1,0\n"
- "0: cs %1,1,%0"
- : "=m" (lp->lock), "=&d" (result)
- : "0" (lp->lock) : "1", "cc" );
+ "0: cs %0,1,0(%1)"
+ : "=&d" (result)
+ : "a" (&lp->lock) : "1", "cc", "memory" );
return !result;
}
@@ -53,7 +52,7 @@ extern inline void spin_unlock(spinlock_t *lp)
{
__asm__ __volatile(" xc 0(4,%0),0(%0)\n"
" bcr 15,0"
- : /* no output */ : "a" (lp) : "memory", "cc" );
+ : : "a" (&lp->lock) : "memory", "cc" );
}
/*
@@ -76,46 +75,42 @@ typedef struct {
#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0)
#define read_lock(rw) \
- asm volatile(" la 1,%0\n" \
- " lg 2,0(1)\n" \
+ asm volatile(" lg 2,0(%0)\n" \
" j 1f\n" \
"0: # diag 0,0,68\n" \
"1: nihh 2,0x7fff\n" /* clear high (=write) bit */ \
" la 3,1(2)\n" /* one more reader */ \
- " csg 2,3,0(1)\n" /* try to write new value */ \
+ " csg 2,3,0(%0)\n" /* try to write new value */ \
" jl 0b" \
- : "+m" ((rw)->lock) : : "1", "2", "3", "cc" );
+ : : "a" (&(rw)->lock) : "2", "3", "cc", "memory" );
#define read_unlock(rw) \
- asm volatile(" la 1,%0\n" \
- " lg 2,0(1)\n" \
+ asm volatile(" lg 2,0(%0)\n" \
" j 1f\n" \
"0: # diag 0,0,68\n" \
"1: lgr 3,2\n" \
" bctgr 3,0\n" /* one less reader */ \
- " csg 2,3,0(1)\n" \
+ " csg 2,3,0(%0)\n" \
" jl 0b" \
- : "+m" ((rw)->lock) : : "1", "2", "3", "cc" );
+ : : "a" (&(rw)->lock) : "2", "3", "cc", "memory" );
#define write_lock(rw) \
- asm volatile(" la 1,%0\n" \
- " llihh 3,0x8000\n" /* new lock value = 0x80...0 */ \
+ asm volatile(" llihh 3,0x8000\n" /* new lock value = 0x80...0 */ \
" j 1f\n" \
"0: # diag 0,0,68\n" \
"1: slgr 2,2\n" /* old lock value must be 0 */ \
- " csg 2,3,0(1)\n" \
+ " csg 2,3,0(%0)\n" \
" jl 0b" \
- : "+m" ((rw)->lock) : : "1", "2", "3", "cc" );
+ : : "a" (&(rw)->lock) : "2", "3", "cc", "memory" );
#define write_unlock(rw) \
- asm volatile(" la 1,%0\n" \
- " slgr 3,3\n" /* new lock value = 0 */ \
+ asm volatile(" slgr 3,3\n" /* new lock value = 0 */ \
" j 1f\n" \
"0: # diag 0,0,68\n" \
"1: llihh 2,0x8000\n" /* old lock value must be 0x8..0 */\
- " csg 2,3,0(1)\n" \
+ " csg 2,3,0(%0)\n" \
" jl 0b" \
- : "+m" ((rw)->lock) : : "1", "2", "3", "cc" );
+ : : "a" (&(rw)->lock) : "2", "3", "cc", "memory" );
#endif /* __ASM_SPINLOCK_H */
diff --git a/include/asm-s390x/ucontext.h b/include/asm-s390x/ucontext.h
index d4e39ae77de9..d69bec0b03f5 100644
--- a/include/asm-s390x/ucontext.h
+++ b/include/asm-s390x/ucontext.h
@@ -13,10 +13,8 @@ struct ucontext {
unsigned long uc_flags;
struct ucontext *uc_link;
stack_t uc_stack;
+ _sigregs uc_mcontext;
sigset_t uc_sigmask; /* mask last for extensibility */
- struct sigcontext *sc; /* Added for pthread support */
};
-
-
#endif /* !_ASM_S390_UCONTEXT_H */
diff --git a/include/asm-s390x/unistd.h b/include/asm-s390x/unistd.h
index 34b72ab5b1a3..eeec47819b0b 100644
--- a/include/asm-s390x/unistd.h
+++ b/include/asm-s390x/unistd.h
@@ -154,6 +154,8 @@
#define __NR_capset 185
#define __NR_sigaltstack 186
#define __NR_sendfile 187
+#define __NR_getpmsg 188
+#define __NR_putpmsg 189
#define __NR_vfork 190
#define __NR_getrlimit 191 /* SuS compliant getrlimit */
#define __NR_lchown 198
@@ -199,7 +201,7 @@ type name(void) { \
long __res; \
__asm__ __volatile__ ( \
" svc %b1\n" \
- " lr %0,2" \
+ " lgr %0,2" \
: "=d" (__res) \
: "i" (__NR_##name) \
: _svc_clobber ); \
@@ -212,7 +214,7 @@ type name(type1 arg1) { \
long __res; \
__asm__ __volatile__ ( \
" svc %b1\n" \
- " lr %0,2" \
+ " lgr %0,2" \
: "=d" (__res) \
: "i" (__NR_##name), \
"d" (__arg1) \
@@ -227,7 +229,7 @@ type name(type1 arg1, type2 arg2) { \
long __res; \
__asm__ __volatile__ ( \
" svc %b1\n" \
- " lr %0,2" \
+ " lgr %0,2" \
: "=d" (__res) \
: "i" (__NR_##name), \
"d" (__arg1), \
@@ -244,7 +246,7 @@ type name(type1 arg1, type2 arg2, type3 arg3) { \
long __res; \
__asm__ __volatile__ ( \
" svc %b1\n" \
- " lr %0,2" \
+ " lgr %0,2" \
: "=d" (__res) \
: "i" (__NR_##name), \
"d" (__arg1), \
@@ -264,7 +266,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \
long __res; \
__asm__ __volatile__ ( \
" svc %b1\n" \
- " lr %0,2" \
+ " lgr %0,2" \
: "=d" (__res) \
: "i" (__NR_##name), \
"d" (__arg1), \
@@ -287,7 +289,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \
long __res; \
__asm__ __volatile__ ( \
" svc %b1\n" \
- " lr %0,2" \
+ " lgr %0,2" \
: "=d" (__res) \
: "i" (__NR_##name), \
"d" (__arg1), \
diff --git a/include/linux/b1lli.h b/include/linux/b1lli.h
index cf40d7e6b7a1..24ec4670a033 100644
--- a/include/linux/b1lli.h
+++ b/include/linux/b1lli.h
@@ -1,10 +1,12 @@
-/*
- * $Id: b1lli.h,v 1.8.8.2 2001/05/17 20:41:52 kai Exp $
+/* $Id: b1lli.h,v 1.8.8.3 2001/09/23 22:25:05 kai Exp $
*
* ISDN lowlevel-module for AVM B1-card.
*
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
*
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
*/
#ifndef _B1LLI_H_
diff --git a/include/linux/b1pcmcia.h b/include/linux/b1pcmcia.h
index b73e4ddbeaa0..12a867c6061e 100644
--- a/include/linux/b1pcmcia.h
+++ b/include/linux/b1pcmcia.h
@@ -1,11 +1,13 @@
-/*
- * $Id: b1pcmcia.h,v 1.1.8.1 2001/05/17 20:41:52 kai Exp $
+/* $Id: b1pcmcia.h,v 1.1.8.2 2001/09/23 22:25:05 kai Exp $
*
* Exported functions of module b1pcmcia to be called by
* avm_cs card services module.
*
* Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
*/
#ifndef _B1PCMCIA_H_
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 86ea92ae5a94..7168cbdf37f6 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -203,4 +203,27 @@ static inline int get_hardsect_size(kdev_t dev)
#define blk_finished_io(nsects) do { } while (0)
#define blk_started_io(nsects) do { } while (0)
+static inline unsigned int blksize_bits(unsigned int size)
+{
+ unsigned int bits = 8;
+ do {
+ bits++;
+ size >>= 1;
+ } while (size > 256);
+ return bits;
+}
+
+static inline unsigned int block_size(kdev_t dev)
+{
+ int retval = BLOCK_SIZE;
+ int major = MAJOR(dev);
+
+ if (blksize_size[major]) {
+ int minor = MINOR(dev);
+ if (blksize_size[major][minor])
+ retval = blksize_size[major][minor];
+ }
+ return retval;
+}
+
#endif
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h
index 4dc4750ac2eb..bbf34f3aa21f 100644
--- a/include/linux/console_struct.h
+++ b/include/linux/console_struct.h
@@ -68,7 +68,7 @@ struct vc_data {
unsigned char vc_utf : 1; /* Unicode UTF-8 encoding */
unsigned char vc_utf_count;
int vc_utf_char;
- unsigned int vc_tab_stop[5]; /* Tab stops. 160 columns. */
+ unsigned int vc_tab_stop[8]; /* Tab stops. 256 columns. */
unsigned char vc_palette[16*3]; /* Colour palette for VGA+ */
unsigned short * vc_translate;
unsigned char vc_G0_charset;
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h
index 79d82d2ac6d8..03112a82fadb 100644
--- a/include/linux/ext2_fs.h
+++ b/include/linux/ext2_fs.h
@@ -558,14 +558,15 @@ extern struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb,
unsigned int block_group,
struct buffer_head ** bh);
-/* bitmap.c */
-extern unsigned long ext2_count_free (struct buffer_head *, unsigned);
-
/* dir.c */
-
-/* file.c */
-extern int ext2_read (struct inode *, struct file *, char *, int);
-extern int ext2_write (struct inode *, struct file *, char *, int);
+extern int ext2_add_link (struct dentry *, struct inode *);
+extern ino_t ext2_inode_by_name(struct inode *, struct dentry *);
+extern int ext2_make_empty(struct inode *, struct inode *);
+extern struct ext2_dir_entry_2 * ext2_find_entry (struct inode *,struct dentry *, struct page **);
+extern int ext2_delete_entry (struct ext2_dir_entry_2 *, struct page *);
+extern int ext2_empty_dir (struct inode *);
+extern struct ext2_dir_entry_2 * ext2_dotdot (struct inode *, struct page **);
+extern void ext2_set_link(struct inode *, struct ext2_dir_entry_2 *, struct page *, struct inode *);
/* fsync.c */
extern int ext2_sync_file (struct file *, struct dentry *, int);
@@ -576,26 +577,21 @@ extern struct inode * ext2_new_inode (const struct inode *, int);
extern void ext2_free_inode (struct inode *);
extern unsigned long ext2_count_free_inodes (struct super_block *);
extern void ext2_check_inodes_bitmap (struct super_block *);
+extern unsigned long ext2_count_free (struct buffer_head *, unsigned);
/* inode.c */
-
-extern struct buffer_head * ext2_getblk (struct inode *, long, int, int *);
-extern struct buffer_head * ext2_bread (struct inode *, int, int, int *);
-
extern void ext2_read_inode (struct inode *);
extern void ext2_write_inode (struct inode *, int);
extern void ext2_put_inode (struct inode *);
extern void ext2_delete_inode (struct inode *);
extern int ext2_sync_inode (struct inode *);
extern void ext2_discard_prealloc (struct inode *);
+extern void ext2_truncate (struct inode *);
/* ioctl.c */
extern int ext2_ioctl (struct inode *, struct file *, unsigned int,
unsigned long);
-/* namei.c */
-extern struct inode_operations ext2_dir_inode_operations;
-
/* super.c */
extern void ext2_error (struct super_block *, const char *, const char *, ...)
__attribute__ ((format (printf, 3, 4)));
@@ -611,33 +607,26 @@ extern int ext2_remount (struct super_block *, int *, char *);
extern struct super_block * ext2_read_super (struct super_block *,void *,int);
extern int ext2_statfs (struct super_block *, struct statfs *);
-/* truncate.c */
-extern void ext2_truncate (struct inode *);
-
/*
* Inodes and files operations
*/
/* dir.c */
extern struct file_operations ext2_dir_operations;
-extern int ext2_add_link (struct dentry *, struct inode *);
-extern ino_t ext2_inode_by_name(struct inode *, struct dentry *);
-extern int ext2_make_empty(struct inode *, struct inode *);
-extern struct ext2_dir_entry_2 * ext2_find_entry (struct inode *,struct dentry *, struct page **);
-extern int ext2_delete_entry (struct ext2_dir_entry_2 *, struct page *);
-extern int ext2_empty_dir (struct inode *);
-extern struct ext2_dir_entry_2 * ext2_dotdot (struct inode *, struct page **);
-extern void ext2_set_link(struct inode *, struct ext2_dir_entry_2 *, struct page *, struct inode *);
/* file.c */
extern struct inode_operations ext2_file_inode_operations;
extern struct file_operations ext2_file_operations;
+/* inode.c */
+extern struct address_space_operations ext2_aops;
+
+/* namei.c */
+extern struct inode_operations ext2_dir_inode_operations;
+
/* symlink.c */
extern struct inode_operations ext2_fast_symlink_inode_operations;
-extern struct address_space_operations ext2_aops;
-
#endif /* __KERNEL__ */
#endif /* _LINUX_EXT2_FS_H */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index d1327ef61f97..73c5e08eac09 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -604,6 +604,7 @@ extern struct file_lock *posix_test_lock(struct file *, struct file_lock *);
extern int posix_lock_file(struct file *, struct file_lock *, unsigned int);
extern void posix_block_lock(struct file_lock *, struct file_lock *);
extern void posix_unblock_lock(struct file_lock *);
+extern int posix_locks_deadlock(struct file_lock *, struct file_lock *);
extern int __get_lease(struct inode *inode, unsigned int flags);
extern time_t lease_get_mtime(struct inode *);
extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h
index 9c2d23ecb602..7134c8b8a18e 100644
--- a/include/linux/i2c-dev.h
+++ b/include/linux/i2c-dev.h
@@ -19,7 +19,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: i2c-dev.h,v 1.8 2000/08/12 16:37:15 mds Exp $ */
+/* $Id: i2c-dev.h,v 1.9 2001/08/15 03:04:58 mds Exp $ */
#ifndef I2C_DEV_H
#define I2C_DEV_H
diff --git a/include/linux/i2c-elektor.h b/include/linux/i2c-elektor.h
index f2d8155b28e9..7c9213175892 100644
--- a/include/linux/i2c-elektor.h
+++ b/include/linux/i2c-elektor.h
@@ -22,22 +22,26 @@
/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
Frodo Looijaard <frodol@dds.nl> */
-/* $Id: i2c-elektor.h,v 1.4 2000/01/18 23:54:07 frodo Exp $ */
+/* $Id: i2c-elektor.h,v 1.5 2001/06/05 01:46:33 mds Exp $ */
#ifndef I2C_PCF_ELEKTOR_H
#define I2C_PCF_ELEKTOR_H 1
/*
- * This struct contains the hw-dependent functions of PCF8584 adapters to
- * manipulate the registers, and to init any hw-specific features.
- */
+ * This struct contains the hw-dependent functions of PCF8584 adapters to
+ * manipulate the registers, and to init any hw-specific features.
+ * vdovikin: removed: this module in real supports only one device,
+ * due to missing arguments in some functions, called from the algo-pcf module.
+ * Sometimes it's need to be rewriten -
+ * but for now just remove this for simpler reading */
+/*
struct i2c_pcf_isa {
int pi_base;
int pi_irq;
int pi_clock;
int pi_own;
};
-
+*/
#endif /* PCF_ELEKTOR_H */
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index b0f62dd14386..74f4f23c1b09 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -20,7 +20,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* ------------------------------------------------------------------------- */
-/* $Id: i2c-id.h,v 1.25 2000/10/12 07:27:29 simon Exp $ */
+/* $Id: i2c-id.h,v 1.35 2001/08/12 17:22:20 mds Exp $ */
#ifndef I2C_ID_H
#define I2C_ID_H
@@ -65,7 +65,7 @@
#define I2C_DRIVERID_BT829 19 /* pc to tv encoder */
#define I2C_DRIVERID_TDA9850 20 /* audio mixer */
#define I2C_DRIVERID_TDA9855 21 /* audio mixer */
-#define I2C_DRIVERID_SAA7110 22 /* */
+#define I2C_DRIVERID_SAA7110 22 /* video decoder */
#define I2C_DRIVERID_MGATVO 23 /* Matrox TVOut */
#define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */
#define I2C_DRIVERID_PCF8583 25 /* real time clock */
@@ -84,7 +84,12 @@
#define I2C_DRIVERID_VES1820 37 /* VLSI DVB-C decoder */
#define I2C_DRIVERID_SAA7113 38 /* video decoder */
#define I2C_DRIVERID_TDA8444 39 /* octuple 6-bit DAC */
-
+#define I2C_DRIVERID_BT819 40 /* video decoder */
+#define I2C_DRIVERID_BT856 41 /* video encoder */
+#define I2C_DRIVERID_VPX32XX 42 /* video decoder+vbi/vtxt */
+#define I2C_DRIVERID_DRP3510 43 /* ADR decoder (Astra Radio) */
+#define I2C_DRIVERID_SP5055 44 /* Satellite tuner */
+#define I2C_DRIVERID_STV0030 45 /* Multipurpose switch */
#define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */
#define I2C_DRIVERID_EXP1 0xF1
@@ -94,6 +99,35 @@
#define I2C_DRIVERID_I2CDEV 900
#define I2C_DRIVERID_I2CPROC 901
+/* IDs -- Use DRIVERIDs 1000-1999 for sensors.
+ These were originally in sensors.h in the lm_sensors package */
+#define I2C_DRIVERID_LM78 1002
+#define I2C_DRIVERID_LM75 1003
+#define I2C_DRIVERID_GL518 1004
+#define I2C_DRIVERID_EEPROM 1005
+#define I2C_DRIVERID_W83781D 1006
+#define I2C_DRIVERID_LM80 1007
+#define I2C_DRIVERID_ADM1021 1008
+#define I2C_DRIVERID_ADM9240 1009
+#define I2C_DRIVERID_LTC1710 1010
+#define I2C_DRIVERID_SIS5595 1011
+#define I2C_DRIVERID_ICSPLL 1012
+#define I2C_DRIVERID_BT869 1013
+#define I2C_DRIVERID_MAXILIFE 1014
+#define I2C_DRIVERID_MATORB 1015
+#define I2C_DRIVERID_GL520 1016
+#define I2C_DRIVERID_THMC50 1017
+#define I2C_DRIVERID_DDCMON 1018
+#define I2C_DRIVERID_VIA686A 1019
+#define I2C_DRIVERID_ADM1025 1020
+#define I2C_DRIVERID_LM87 1021
+#define I2C_DRIVERID_PCF8574 1022
+#define I2C_DRIVERID_MTP008 1023
+#define I2C_DRIVERID_DS1621 1024
+#define I2C_DRIVERID_ADM1024 1025
+#define I2C_DRIVERID_IT87 1026
+#define I2C_DRIVERID_CH700X 1027 /* single driver for CH7003-7009 digital pc to tv encoders */
+
/*
* ---- Adapter types ----------------------------------------------------
*
@@ -109,7 +143,6 @@
#define I2C_ALGO_ISA 0x050000 /* lm_sensors ISA pseudo-adapter */
#define I2C_ALGO_SAA7146 0x060000 /* SAA 7146 video decoder bus */
#define I2C_ALGO_ACB 0x070000 /* ACCESS.bus algorithm */
-#define I2C_ALGO_IIC 0x080000 /* ITE IIC bus */
#define I2C_ALGO_EC 0x100000 /* ACPI embedded controller */
@@ -140,8 +173,10 @@
#define I2C_HW_B_G400 0x09 /* Matrox G400 */
#define I2C_HW_B_I810 0x0a /* Intel I810 */
#define I2C_HW_B_VOO 0x0b /* 3dfx Voodoo 3 / Banshee */
+#define I2C_HW_B_PPORT 0x0c /* Primitive parallel port adapter */
#define I2C_HW_B_RIVA 0x10 /* Riva based graphics cards */
#define I2C_HW_B_IOC 0x11 /* IOC bit-wiggling */
+#define I2C_HW_B_TSUNA 0x12 /* DEC Tsunami chipset */
/* --- PCF 8584 based algorithms */
#define I2C_HW_P_LP 0x00 /* Parallel port interface */
@@ -154,9 +189,6 @@
/* --- MPC8xx PowerPC adapters */
#define I2C_HW_MPC8XX_EPON 0x00 /* Eponymous MPC8xx I2C adapter */
-/* --- ITE based algorithms */
-#define I2C_HW_I_IIC 0x00 /* controller on the ITE */
-
/* --- SMBus only adapters */
#define I2C_HW_SMBUS_PIIX4 0x00
#define I2C_HW_SMBUS_ALI15X3 0x01
diff --git a/include/linux/i2c-proc.h b/include/linux/i2c-proc.h
new file mode 100644
index 000000000000..364cfe77d4d6
--- /dev/null
+++ b/include/linux/i2c-proc.h
@@ -0,0 +1,396 @@
+/*
+ sensors.h - Part of lm_sensors, Linux kernel modules for hardware
+ monitoring
+ Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>
+
+ 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 SENSORS_SENSORS_H
+#define SENSORS_SENSORS_H
+
+#ifdef __KERNEL__
+
+/* Next two must be included before sysctl.h can be included, in 2.0 kernels */
+#include <linux/types.h>
+#include <linux/fs.h>
+#include <linux/sysctl.h>
+
+/* The type of callback functions used in sensors_{proc,sysctl}_real */
+typedef void (*i2c_real_callback) (struct i2c_client * client,
+ int operation, int ctl_name,
+ int *nrels_mag, long *results);
+
+/* Values for the operation field in the above function type */
+#define SENSORS_PROC_REAL_INFO 1
+#define SENSORS_PROC_REAL_READ 2
+#define SENSORS_PROC_REAL_WRITE 3
+
+/* These funcion reads or writes a 'real' value (encoded by the combination
+ of an integer and a magnitude, the last is the power of ten the value
+ should be divided with) to a /proc/sys directory. To use these functions,
+ you must (before registering the ctl_table) set the extra2 field to the
+ client, and the extra1 field to a function of the form:
+ void func(struct i2c_client *client, int operation, int ctl_name,
+ int *nrels_mag, long *results)
+ This last function can be called for three values of operation. If
+ operation equals SENSORS_PROC_REAL_INFO, the magnitude should be returned
+ in nrels_mag. If operation equals SENSORS_PROC_REAL_READ, values should
+ be read into results. nrels_mag should return the number of elements
+ read; the maximum number is put in it on entry. Finally, if operation
+ equals SENSORS_PROC_REAL_WRITE, the values in results should be
+ written to the chip. nrels_mag contains on entry the number of elements
+ found.
+ In all cases, client points to the client we wish to interact with,
+ and ctl_name is the SYSCTL id of the file we are accessing. */
+extern int i2c_sysctl_real(ctl_table * table, int *name, int nlen,
+ void *oldval, size_t * oldlenp,
+ void *newval, size_t newlen,
+ void **context);
+extern int i2c_proc_real(ctl_table * ctl, int write, struct file *filp,
+ void *buffer, size_t * lenp);
+
+
+
+/* These rather complex functions must be called when you want to add or
+ delete an entry in /proc/sys/dev/sensors/chips (not yet implemented). It
+ also creates a new directory within /proc/sys/dev/sensors/.
+ ctl_template should be a template of the newly created directory. It is
+ copied in memory. The extra2 field of each file is set to point to client.
+ If any driver wants subdirectories within the newly created directory,
+ these functions must be updated! */
+extern int i2c_register_entry(struct i2c_client *client,
+ const char *prefix,
+ ctl_table * ctl_template,
+ struct module *controlling_mod);
+
+extern void i2c_deregister_entry(int id);
+
+
+/* A structure containing detect information.
+ Force variables overrule all other variables; they force a detection on
+ that place. If a specific chip is given, the module blindly assumes this
+ chip type is present; if a general force (kind == 0) is given, the module
+ will still try to figure out what type of chip is present. This is useful
+ if for some reasons the detect for SMBus or ISA address space filled
+ fails.
+ probe: insmod parameter. Initialize this list with SENSORS_I2C_END values.
+ A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for
+ the ISA bus, -1 for any I2C bus), the second is the address.
+ kind: The kind of chip. 0 equals any chip.
+*/
+struct i2c_force_data {
+ unsigned short *force;
+ unsigned short kind;
+};
+
+/* A structure containing the detect information.
+ normal_i2c: filled in by the module writer. Terminated by SENSORS_I2C_END.
+ A list of I2C addresses which should normally be examined.
+ normal_i2c_range: filled in by the module writer. Terminated by
+ SENSORS_I2C_END
+ A list of pairs of I2C addresses, each pair being an inclusive range of
+ addresses which should normally be examined.
+ normal_isa: filled in by the module writer. Terminated by SENSORS_ISA_END.
+ A list of ISA addresses which should normally be examined.
+ normal_isa_range: filled in by the module writer. Terminated by
+ SENSORS_ISA_END
+ A list of triples. The first two elements are ISA addresses, being an
+ range of addresses which should normally be examined. The third is the
+ modulo parameter: only addresses which are 0 module this value relative
+ to the first address of the range are actually considered.
+ probe: insmod parameter. Initialize this list with SENSORS_I2C_END values.
+ A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for
+ the ISA bus, -1 for any I2C bus), the second is the address. These
+ addresses are also probed, as if they were in the 'normal' list.
+ probe_range: insmod parameter. Initialize this list with SENSORS_I2C_END
+ values.
+ A list of triples. The first value is a bus number (SENSORS_ISA_BUS for
+ the ISA bus, -1 for any I2C bus), the second and third are addresses.
+ These form an inclusive range of addresses that are also probed, as
+ if they were in the 'normal' list.
+ ignore: insmod parameter. Initialize this list with SENSORS_I2C_END values.
+ A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for
+ the ISA bus, -1 for any I2C bus), the second is the I2C address. These
+ addresses are never probed. This parameter overrules 'normal' and
+ 'probe', but not the 'force' lists.
+ ignore_range: insmod parameter. Initialize this list with SENSORS_I2C_END
+ values.
+ A list of triples. The first value is a bus number (SENSORS_ISA_BUS for
+ the ISA bus, -1 for any I2C bus), the second and third are addresses.
+ These form an inclusive range of I2C addresses that are never probed.
+ This parameter overrules 'normal' and 'probe', but not the 'force' lists.
+ force_data: insmod parameters. A list, ending with an element of which
+ the force field is NULL.
+*/
+struct i2c_address_data {
+ unsigned short *normal_i2c;
+ unsigned short *normal_i2c_range;
+ unsigned int *normal_isa;
+ unsigned int *normal_isa_range;
+ unsigned short *probe;
+ unsigned short *probe_range;
+ unsigned short *ignore;
+ unsigned short *ignore_range;
+ struct i2c_force_data *forces;
+};
+
+/* Internal numbers to terminate lists */
+#define SENSORS_I2C_END 0xfffe
+#define SENSORS_ISA_END 0xfffefffe
+
+/* The numbers to use to set an ISA or I2C bus address */
+#define SENSORS_ISA_BUS 9191
+#define SENSORS_ANY_I2C_BUS 0xffff
+
+/* The length of the option lists */
+#define SENSORS_MAX_OPTS 48
+
+/* Default fill of many variables */
+#define SENSORS_DEFAULTS {SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END}
+
+/* This is ugly. We need to evaluate SENSORS_MAX_OPTS before it is
+ stringified */
+#define SENSORS_MODPARM_AUX1(x) "1-" #x "h"
+#define SENSORS_MODPARM_AUX(x) SENSORS_MODPARM_AUX1(x)
+#define SENSORS_MODPARM SENSORS_MODPARM_AUX(SENSORS_MAX_OPTS)
+
+/* SENSORS_MODULE_PARM creates a module parameter, and puts it in the
+ module header */
+#define SENSORS_MODULE_PARM(var,desc) \
+ static unsigned short var[SENSORS_MAX_OPTS] = SENSORS_DEFAULTS; \
+ MODULE_PARM(var,SENSORS_MODPARM); \
+ MODULE_PARM_DESC(var,desc)
+
+/* SENSORS_MODULE_PARM creates a 'force_*' module parameter, and puts it in
+ the module header */
+#define SENSORS_MODULE_PARM_FORCE(name) \
+ SENSORS_MODULE_PARM(force_ ## name, \
+ "List of adapter,address pairs which are unquestionably" \
+ " assumed to contain a `" # name "' chip")
+
+
+/* This defines several insmod variables, and the addr_data structure */
+#define SENSORS_INSMOD \
+ SENSORS_MODULE_PARM(probe, \
+ "List of adapter,address pairs to scan additionally"); \
+ SENSORS_MODULE_PARM(probe_range, \
+ "List of adapter,start-addr,end-addr triples to scan " \
+ "additionally"); \
+ SENSORS_MODULE_PARM(ignore, \
+ "List of adapter,address pairs not to scan"); \
+ SENSORS_MODULE_PARM(ignore_range, \
+ "List of adapter,start-addr,end-addr triples not to " \
+ "scan"); \
+ static struct i2c_address_data addr_data = \
+ {normal_i2c, normal_i2c_range, \
+ normal_isa, normal_isa_range, \
+ probe, probe_range, \
+ ignore, ignore_range, \
+ forces}
+
+/* The following functions create an enum with the chip names as elements.
+ The first element of the enum is any_chip. These are the only macros
+ a module will want to use. */
+
+#define SENSORS_INSMOD_0 \
+ enum chips { any_chip }; \
+ SENSORS_MODULE_PARM(force, \
+ "List of adapter,address pairs to boldly assume " \
+ "to be present"); \
+ static struct i2c_force_data forces[] = {{force,any_chip},{NULL}}; \
+ SENSORS_INSMOD
+
+#define SENSORS_INSMOD_1(chip1) \
+ enum chips { any_chip, chip1 }; \
+ SENSORS_MODULE_PARM(force, \
+ "List of adapter,address pairs to boldly assume " \
+ "to be present"); \
+ SENSORS_MODULE_PARM_FORCE(chip1); \
+ static struct i2c_force_data forces[] = {{force,any_chip},\
+ {force_ ## chip1,chip1}, \
+ {NULL}}; \
+ SENSORS_INSMOD
+
+#define SENSORS_INSMOD_2(chip1,chip2) \
+ enum chips { any_chip, chip1, chip2 }; \
+ SENSORS_MODULE_PARM(force, \
+ "List of adapter,address pairs to boldly assume " \
+ "to be present"); \
+ SENSORS_MODULE_PARM_FORCE(chip1); \
+ SENSORS_MODULE_PARM_FORCE(chip2); \
+ static struct i2c_force_data forces[] = {{force,any_chip}, \
+ {force_ ## chip1,chip1}, \
+ {force_ ## chip2,chip2}, \
+ {NULL}}; \
+ SENSORS_INSMOD
+
+#define SENSORS_INSMOD_3(chip1,chip2,chip3) \
+ enum chips { any_chip, chip1, chip2, chip3 }; \
+ SENSORS_MODULE_PARM(force, \
+ "List of adapter,address pairs to boldly assume " \
+ "to be present"); \
+ SENSORS_MODULE_PARM_FORCE(chip1); \
+ SENSORS_MODULE_PARM_FORCE(chip2); \
+ SENSORS_MODULE_PARM_FORCE(chip3); \
+ static struct i2c_force_data forces[] = {{force,any_chip}, \
+ {force_ ## chip1,chip1}, \
+ {force_ ## chip2,chip2}, \
+ {force_ ## chip3,chip3}, \
+ {NULL}}; \
+ SENSORS_INSMOD
+
+#define SENSORS_INSMOD_4(chip1,chip2,chip3,chip4) \
+ enum chips { any_chip, chip1, chip2, chip3, chip4 }; \
+ SENSORS_MODULE_PARM(force, \
+ "List of adapter,address pairs to boldly assume " \
+ "to be present"); \
+ SENSORS_MODULE_PARM_FORCE(chip1); \
+ SENSORS_MODULE_PARM_FORCE(chip2); \
+ SENSORS_MODULE_PARM_FORCE(chip3); \
+ SENSORS_MODULE_PARM_FORCE(chip4); \
+ static struct i2c_force_data forces[] = {{force,any_chip}, \
+ {force_ ## chip1,chip1}, \
+ {force_ ## chip2,chip2}, \
+ {force_ ## chip3,chip3}, \
+ {force_ ## chip4,chip4}, \
+ {NULL}}; \
+ SENSORS_INSMOD
+
+#define SENSORS_INSMOD_5(chip1,chip2,chip3,chip4,chip5) \
+ enum chips { any_chip, chip1, chip2, chip3, chip4, chip5 }; \
+ SENSORS_MODULE_PARM(force, \
+ "List of adapter,address pairs to boldly assume " \
+ "to be present"); \
+ SENSORS_MODULE_PARM_FORCE(chip1); \
+ SENSORS_MODULE_PARM_FORCE(chip2); \
+ SENSORS_MODULE_PARM_FORCE(chip3); \
+ SENSORS_MODULE_PARM_FORCE(chip4); \
+ SENSORS_MODULE_PARM_FORCE(chip5); \
+ static struct i2c_force_data forces[] = {{force,any_chip}, \
+ {force_ ## chip1,chip1}, \
+ {force_ ## chip2,chip2}, \
+ {force_ ## chip3,chip3}, \
+ {force_ ## chip4,chip4}, \
+ {force_ ## chip5,chip5}, \
+ {NULL}}; \
+ SENSORS_INSMOD
+
+#define SENSORS_INSMOD_6(chip1,chip2,chip3,chip4,chip5,chip6) \
+ enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6 }; \
+ SENSORS_MODULE_PARM(force, \
+ "List of adapter,address pairs to boldly assume " \
+ "to be present"); \
+ SENSORS_MODULE_PARM_FORCE(chip1); \
+ SENSORS_MODULE_PARM_FORCE(chip2); \
+ SENSORS_MODULE_PARM_FORCE(chip3); \
+ SENSORS_MODULE_PARM_FORCE(chip4); \
+ SENSORS_MODULE_PARM_FORCE(chip5); \
+ SENSORS_MODULE_PARM_FORCE(chip6); \
+ static struct i2c_force_data forces[] = {{force,any_chip}, \
+ {force_ ## chip1,chip1}, \
+ {force_ ## chip2,chip2}, \
+ {force_ ## chip3,chip3}, \
+ {force_ ## chip4,chip4}, \
+ {force_ ## chip5,chip5}, \
+ {force_ ## chip6,chip6}, \
+ {NULL}}; \
+ SENSORS_INSMOD
+
+#define SENSORS_INSMOD_7(chip1,chip2,chip3,chip4,chip5,chip6,chip7) \
+ enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, chip7 }; \
+ SENSORS_MODULE_PARM(force, \
+ "List of adapter,address pairs to boldly assume " \
+ "to be present"); \
+ SENSORS_MODULE_PARM_FORCE(chip1); \
+ SENSORS_MODULE_PARM_FORCE(chip2); \
+ SENSORS_MODULE_PARM_FORCE(chip3); \
+ SENSORS_MODULE_PARM_FORCE(chip4); \
+ SENSORS_MODULE_PARM_FORCE(chip5); \
+ SENSORS_MODULE_PARM_FORCE(chip6); \
+ SENSORS_MODULE_PARM_FORCE(chip7); \
+ static struct i2c_force_data forces[] = {{force,any_chip}, \
+ {force_ ## chip1,chip1}, \
+ {force_ ## chip2,chip2}, \
+ {force_ ## chip3,chip3}, \
+ {force_ ## chip4,chip4}, \
+ {force_ ## chip5,chip5}, \
+ {force_ ## chip6,chip6}, \
+ {force_ ## chip7,chip7}, \
+ {NULL}}; \
+ SENSORS_INSMOD
+
+typedef int i2c_found_addr_proc(struct i2c_adapter *adapter,
+ int addr, unsigned short flags,
+ int kind);
+
+/* Detect function. It iterates over all possible addresses itself. For
+ SMBus addresses, it will only call found_proc if some client is connected
+ to the SMBus (unless a 'force' matched); for ISA detections, this is not
+ done. */
+extern int i2c_detect(struct i2c_adapter *adapter,
+ struct i2c_address_data *address_data,
+ i2c_found_addr_proc * found_proc);
+
+
+/* This macro is used to scale user-input to sensible values in almost all
+ chip drivers. */
+extern inline int SENSORS_LIMIT(long value, long low, long high)
+{
+ if (value < low)
+ return low;
+ else if (value > high)
+ return high;
+ else
+ return value;
+}
+
+#endif /* def __KERNEL__ */
+
+
+/* The maximum length of the prefix */
+#define SENSORS_PREFIX_MAX 20
+
+/* Sysctl IDs */
+#ifdef DEV_HWMON
+#define DEV_SENSORS DEV_HWMON
+#else /* ndef DEV_HWMOM */
+#define DEV_SENSORS 2 /* The id of the lm_sensors directory within the
+ dev table */
+#endif /* def DEV_HWMON */
+
+#define SENSORS_CHIPS 1
+struct i2c_chips_data {
+ int sysctl_id;
+ char name[SENSORS_PREFIX_MAX + 13];
+};
+
+#endif /* def SENSORS_SENSORS_H */
+
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 546c573a45d3..256a7da0d845 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -23,11 +23,14 @@
/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and
Frodo Looijaard <frodol@dds.nl> */
-/* $Id: i2c.h,v 1.42 2000/09/06 20:14:06 frodo Exp $ */
+/* $Id: i2c.h,v 1.46 2001/08/31 00:04:07 phil Exp $ */
#ifndef I2C_H
#define I2C_H
+#define I2C_DATE "20010830"
+#define I2C_VERSION "2.6.1"
+
#include <linux/i2c-id.h> /* id values of adapters et. al. */
#include <linux/types.h>
@@ -202,7 +205,7 @@ struct i2c_algorithm {
char name[32]; /* textual description */
unsigned int id;
- /* If a adapter algorithm can't to I2C-level access, set master_xfer
+ /* If an adapter algorithm can't to I2C-level access, set master_xfer
to NULL. If an adapter algorithm can do SMBus access, set
smbus_xfer. If set to NULL, the SMBus protocol is simulated
using common I2C messages */
@@ -344,7 +347,7 @@ extern int i2c_release_client(struct i2c_client *);
you can cheat by simply not registering. Not recommended, of course! */
extern int i2c_check_addr (struct i2c_adapter *adapter, int addr);
-/* Detect function. It itterates over all possible addresses itself.
+/* Detect function. It iterates over all possible addresses itself.
* It will only call found_proc if some client is connected at the
* specific address (unless a 'force' matched);
*/
@@ -360,7 +363,7 @@ extern int i2c_probe(struct i2c_adapter *adapter,
extern int i2c_control(struct i2c_client *,unsigned int, unsigned long);
/* This call returns a unique low identifier for each registered adapter,
- * or -1 if the adapter was not regisitered.
+ * or -1 if the adapter was not registered.
*/
extern int i2c_adapter_id(struct i2c_adapter *adap);
@@ -454,8 +457,9 @@ union i2c_smbus_data {
* corresponding header files.
*/
/* -> bit-adapter specific ioctls */
-#define I2C_RETRIES 0x0701 /* number times a device address should */
- /* be polled when not acknowledging */
+#define I2C_RETRIES 0x0701 /* number of times a device address */
+ /* should be polled when not */
+ /* acknowledging */
#define I2C_TIMEOUT 0x0702 /* set timeout - call with int */
@@ -549,5 +553,12 @@ union i2c_smbus_data {
ignore, ignore_range, \
force}
+/* Detect whether we are on the isa bus. If this returns true, all i2c
+ access will fail! */
+#define i2c_is_isa_client(clientptr) \
+ ((clientptr)->adapter->algo->id == I2C_ALGO_ISA)
+#define i2c_is_isa_adapter(adapptr) \
+ ((adapptr)->algo->id == I2C_ALGO_ISA)
+
#endif /* def __KERNEL__ */
#endif /* I2C_H */
diff --git a/include/linux/i2o-dev.h b/include/linux/i2o-dev.h
index 5ac8d9cef46e..cd4eb5ac5a9b 100644
--- a/include/linux/i2o-dev.h
+++ b/include/linux/i2o-dev.h
@@ -34,11 +34,11 @@
#define I2OLCTGET _IOWR(I2O_MAGIC_NUMBER,2,struct i2o_cmd_hrtlct)
#define I2OPARMSET _IOWR(I2O_MAGIC_NUMBER,3,struct i2o_cmd_psetget)
#define I2OPARMGET _IOWR(I2O_MAGIC_NUMBER,4,struct i2o_cmd_psetget)
-#define I2OSWDL _IOWR(I2O_MAGIC_NUMBER,5,struct i2o_sw_xfer)
-#define I2OSWUL _IOWR(I2O_MAGIC_NUMBER,6,struct i2o_sw_xfer)
+#define I2OSWDL _IOWR(I2O_MAGIC_NUMBER,5,struct i2o_sw_xfer)
+#define I2OSWUL _IOWR(I2O_MAGIC_NUMBER,6,struct i2o_sw_xfer)
#define I2OSWDEL _IOWR(I2O_MAGIC_NUMBER,7,struct i2o_sw_xfer)
#define I2OVALIDATE _IOR(I2O_MAGIC_NUMBER,8,u32)
-#define I2OHTML _IOWR(I2O_MAGIC_NUMBER,9,struct i2o_html)
+#define I2OHTML _IOWR(I2O_MAGIC_NUMBER,9,struct i2o_html)
#define I2OEVTREG _IOW(I2O_MAGIC_NUMBER,10,struct i2o_evt_id)
#define I2OEVTGET _IOR(I2O_MAGIC_NUMBER,11,struct i2o_evt_info)
@@ -68,7 +68,7 @@ struct i2o_sw_xfer
void *buf; /* Pointer to software buffer */
unsigned int *swlen; /* Length of software data */
unsigned int *maxfrag; /* Maximum fragment count */
- unsigned int *curfrag; /* Current fragment count */
+ unsigned int *curfrag; /* Current fragment count */
};
struct i2o_html
@@ -98,7 +98,7 @@ struct i2o_evt_info
{
struct i2o_evt_id id;
unsigned char evt_data[I2O_EVT_DATA_SIZE];
- unsigned int data_size;
+ unsigned int data_size;
};
struct i2o_evt_get
@@ -119,8 +119,8 @@ struct i2o_evt_get
#define I2O_BUS_PCI 4
#define I2O_BUS_PCMCIA 5
#define I2O_BUS_NUBUS 6
-#define I2O_BUS_CARDBUS 7
-#define I2O_BUS_UNKNOWN 0x80
+#define I2O_BUS_CARDBUS 7
+#define I2O_BUS_UNKNOWN 0x80
#ifndef __KERNEL__
@@ -130,127 +130,139 @@ typedef unsigned int u32;
#endif /* __KERNEL__ */
-typedef struct _i2o_pci_bus {
- u8 PciFunctionNumber;
- u8 PciDeviceNumber;
- u8 PciBusNumber;
- u8 reserved;
- u16 PciVendorID;
- u16 PciDeviceID;
+typedef struct _i2o_pci_bus
+{
+ u8 PciFunctionNumber;
+ u8 PciDeviceNumber;
+ u8 PciBusNumber;
+ u8 reserved;
+ u16 PciVendorID;
+ u16 PciDeviceID;
} i2o_pci_bus;
-typedef struct _i2o_local_bus {
- u16 LbBaseIOPort;
- u16 reserved;
- u32 LbBaseMemoryAddress;
+typedef struct _i2o_local_bus
+{
+ u16 LbBaseIOPort;
+ u16 reserved;
+ u32 LbBaseMemoryAddress;
} i2o_local_bus;
-typedef struct _i2o_isa_bus {
- u16 IsaBaseIOPort;
- u8 CSN;
- u8 reserved;
- u32 IsaBaseMemoryAddress;
+typedef struct _i2o_isa_bus
+{
+ u16 IsaBaseIOPort;
+ u8 CSN;
+ u8 reserved;
+ u32 IsaBaseMemoryAddress;
} i2o_isa_bus;
-typedef struct _i2o_eisa_bus_info {
- u16 EisaBaseIOPort;
- u8 reserved;
- u8 EisaSlotNumber;
- u32 EisaBaseMemoryAddress;
+typedef struct _i2o_eisa_bus_info
+{
+ u16 EisaBaseIOPort;
+ u8 reserved;
+ u8 EisaSlotNumber;
+ u32 EisaBaseMemoryAddress;
} i2o_eisa_bus;
-typedef struct _i2o_mca_bus {
- u16 McaBaseIOPort;
- u8 reserved;
- u8 McaSlotNumber;
- u32 McaBaseMemoryAddress;
+typedef struct _i2o_mca_bus
+{
+ u16 McaBaseIOPort;
+ u8 reserved;
+ u8 McaSlotNumber;
+ u32 McaBaseMemoryAddress;
} i2o_mca_bus;
-typedef struct _i2o_other_bus {
+typedef struct _i2o_other_bus
+{
u16 BaseIOPort;
u16 reserved;
u32 BaseMemoryAddress;
} i2o_other_bus;
-typedef struct _i2o_hrt_entry {
- u32 adapter_id;
- u32 parent_tid:12;
- u32 state:4;
- u32 bus_num:8;
- u32 bus_type:8;
- union {
- i2o_pci_bus pci_bus;
- i2o_local_bus local_bus;
- i2o_isa_bus isa_bus;
- i2o_eisa_bus eisa_bus;
- i2o_mca_bus mca_bus;
- i2o_other_bus other_bus;
+typedef struct _i2o_hrt_entry
+{
+ u32 adapter_id;
+ u32 parent_tid:12;
+ u32 tate:4;
+ u32 bus_num:8;
+ u32 bus_type:8;
+ union
+ {
+ i2o_pci_bus pci_bus;
+ i2o_local_bus local_bus;
+ i2o_isa_bus isa_bus;
+ i2o_eisa_bus eisa_bus;
+ i2o_mca_bus mca_bus;
+ i2o_other_bus other_bus;
} bus;
} i2o_hrt_entry;
-typedef struct _i2o_hrt {
- u16 num_entries;
- u8 entry_len;
- u8 hrt_version;
- u32 change_ind;
+typedef struct _i2o_hrt
+{
+ u16 num_entries;
+ u8 entry_len;
+ u8 hrt_version;
+ u32 change_ind;
i2o_hrt_entry hrt_entry[1];
} i2o_hrt;
-typedef struct _i2o_lct_entry {
- u32 entry_size:16;
- u32 tid:12;
- u32 reserved:4;
- u32 change_ind;
- u32 device_flags;
- u32 class_id:12;
- u32 version:4;
- u32 vendor_id:16;
- u32 sub_class;
- u32 user_tid:12;
- u32 parent_tid:12;
- u32 bios_info:8;
- u8 identity_tag[8];
- u32 event_capabilities;
+typedef struct _i2o_lct_entry
+{
+ u32 entry_size:16;
+ u32 tid:12;
+ u32 reserved:4;
+ u32 change_ind;
+ u32 device_flags;
+ u32 class_id:12;
+ u32 version:4;
+ u32 vendor_id:16;
+ u32 sub_class;
+ u32 user_tid:12;
+ u32 parent_tid:12;
+ u32 bios_info:8;
+ u8 identity_tag[8];
+ u32 event_capabilities;
} i2o_lct_entry;
-typedef struct _i2o_lct {
- u32 table_size:16;
- u32 boot_tid:12;
- u32 lct_ver:4;
- u32 iop_flags;
- u32 change_ind;
+typedef struct _i2o_lct
+{
+ u32 table_size:16;
+ u32 boot_tid:12;
+ u32 lct_ver:4;
+ u32 iop_flags;
+ u32 change_ind;
i2o_lct_entry lct_entry[1];
} i2o_lct;
-typedef struct _i2o_status_block {
- u16 org_id;
- u16 reserved;
- u16 iop_id:12;
- u16 reserved1:4;
- u16 host_unit_id;
- u16 segment_number:12;
- u16 i2o_version:4;
- u8 iop_state;
- u8 msg_type;
- u16 inbound_frame_size;
- u8 init_code;
- u8 reserved2;
- u32 max_inbound_frames;
- u32 cur_inbound_frames;
- u32 max_outbound_frames;
- char product_id[24];
- u32 expected_lct_size;
- u32 iop_capabilities;
- u32 desired_mem_size;
- u32 current_mem_size;
- u32 current_mem_base;
- u32 desired_io_size;
- u32 current_io_size;
- u32 current_io_base;
- u32 reserved3:24;
- u32 cmd_status:8;
+typedef struct _i2o_status_block
+{
+ u16 org_id;
+ u16 reserved;
+ u16 iop_id:12;
+ u16 reserved1:4;
+ u16 host_unit_id;
+ u16 segment_number:12;
+ u16 i2o_version:4;
+ u8 iop_state;
+ u8 msg_type;
+ u16 inbound_frame_size;
+ u8 init_code;
+ u8 reserved2;
+ u32 max_inbound_frames;
+ u32 cur_inbound_frames;
+ u32 max_outbound_frames;
+ char product_id[24];
+ u32 expected_lct_size;
+ u32 iop_capabilities;
+ u32 desired_mem_size;
+ u32 current_mem_size;
+ u32 current_mem_base;
+ u32 desired_io_size;
+ u32 current_io_size;
+ u32 current_io_base;
+ u32 reserved3:24;
+ u32 cmd_status:8;
} i2o_status_block;
-
+
/* Event indicator mask flags */
#define I2O_EVT_IND_STATE_CHANGE 0x80000000
#define I2O_EVT_IND_GENERAL_WARNING 0x40000000
@@ -269,7 +281,7 @@ typedef struct _i2o_status_block {
#define I2O_EVT_IND_EXEC_ADAPTER_FAULT 0x00000004
#define I2O_EVT_IND_EXEC_POWER_FAIL 0x00000008
#define I2O_EVT_IND_EXEC_RESET_PENDING 0x00000010
-#define I2O_EVT_IND_EXEC_RESET_IMMINENT 0x00000020
+#define I2O_EVT_IND_EXEC_RESET_IMMINENT 0x00000020
#define I2O_EVT_IND_EXEC_HW_FAIL 0x00000040
#define I2O_EVT_IND_EXEC_XCT_CHANGE 0x00000080
#define I2O_EVT_IND_EXEC_NEW_LCT_ENTRY 0x00000100
@@ -280,14 +292,14 @@ typedef struct _i2o_status_block {
#define I2O_EVT_IND_BSA_VOLUME_LOAD 0x00000001
#define I2O_EVT_IND_BSA_VOLUME_UNLOAD 0x00000002
#define I2O_EVT_IND_BSA_VOLUME_UNLOAD_REQ 0x00000004
-#define I2O_EVT_IND_BSA_CAPACITY_CHANGE 0x00000008
+#define I2O_EVT_IND_BSA_CAPACITY_CHANGE 0x00000008
#define I2O_EVT_IND_BSA_SCSI_SMART 0x00000010
/* Event data for generic events */
#define I2O_EVT_STATE_CHANGE_NORMAL 0x00
#define I2O_EVT_STATE_CHANGE_SUSPENDED 0x01
#define I2O_EVT_STATE_CHANGE_RESTART 0x02
-#define I2O_EVT_STATE_CHANGE_NA_RECOVER 0x03
+#define I2O_EVT_STATE_CHANGE_NA_RECOVER 0x03
#define I2O_EVT_STATE_CHANGE_NA_NO_RECOVER 0x04
#define I2O_EVT_STATE_CHANGE_QUIESCE_REQUEST 0x05
#define I2O_EVT_STATE_CHANGE_FAILED 0x10
@@ -295,7 +307,7 @@ typedef struct _i2o_status_block {
#define I2O_EVT_GEN_WARNING_NORMAL 0x00
#define I2O_EVT_GEN_WARNING_ERROR_THRESHOLD 0x01
-#define I2O_EVT_GEN_WARNING_MEDIA_FAULT 0x02
+#define I2O_EVT_GEN_WARNING_MEDIA_FAULT 0x02
#define I2O_EVT_CAPABILITY_OTHER 0x01
#define I2O_EVT_CAPABILITY_CHANGED 0x02
@@ -309,89 +321,89 @@ typedef struct _i2o_status_block {
/* Class ID and Code Assignments
* (LCT.ClassID.Version field)
*/
-#define I2O_CLASS_VERSION_10 0x00
-#define I2O_CLASS_VERSION_11 0x01
+#define I2O_CLASS_VERSION_10 0x00
+#define I2O_CLASS_VERSION_11 0x01
/* Class code names
* (from v1.5 Table 6-1 Class Code Assignments.)
*/
-
-#define I2O_CLASS_EXECUTIVE 0x000
-#define I2O_CLASS_DDM 0x001
-#define I2O_CLASS_RANDOM_BLOCK_STORAGE 0x010
-#define I2O_CLASS_SEQUENTIAL_STORAGE 0x011
-#define I2O_CLASS_LAN 0x020
-#define I2O_CLASS_WAN 0x030
-#define I2O_CLASS_FIBRE_CHANNEL_PORT 0x040
-#define I2O_CLASS_FIBRE_CHANNEL_PERIPHERAL 0x041
-#define I2O_CLASS_SCSI_PERIPHERAL 0x051
-#define I2O_CLASS_ATE_PORT 0x060
-#define I2O_CLASS_ATE_PERIPHERAL 0x061
-#define I2O_CLASS_FLOPPY_CONTROLLER 0x070
-#define I2O_CLASS_FLOPPY_DEVICE 0x071
-#define I2O_CLASS_BUS_ADAPTER_PORT 0x080
-#define I2O_CLASS_PEER_TRANSPORT_AGENT 0x090
-#define I2O_CLASS_PEER_TRANSPORT 0x091
+
+#define I2O_CLASS_EXECUTIVE 0x000
+#define I2O_CLASS_DDM 0x001
+#define I2O_CLASS_RANDOM_BLOCK_STORAGE 0x010
+#define I2O_CLASS_SEQUENTIAL_STORAGE 0x011
+#define I2O_CLASS_LAN 0x020
+#define I2O_CLASS_WAN 0x030
+#define I2O_CLASS_FIBRE_CHANNEL_PORT 0x040
+#define I2O_CLASS_FIBRE_CHANNEL_PERIPHERAL 0x041
+#define I2O_CLASS_SCSI_PERIPHERAL 0x051
+#define I2O_CLASS_ATE_PORT 0x060
+#define I2O_CLASS_ATE_PERIPHERAL 0x061
+#define I2O_CLASS_FLOPPY_CONTROLLER 0x070
+#define I2O_CLASS_FLOPPY_DEVICE 0x071
+#define I2O_CLASS_BUS_ADAPTER_PORT 0x080
+#define I2O_CLASS_PEER_TRANSPORT_AGENT 0x090
+#define I2O_CLASS_PEER_TRANSPORT 0x091
/*
* Rest of 0x092 - 0x09f reserved for peer-to-peer classes
*/
-
-#define I2O_CLASS_MATCH_ANYCLASS 0xffffffff
+
+#define I2O_CLASS_MATCH_ANYCLASS 0xffffffff
/*
* Subclasses
*/
-#define I2O_SUBCLASS_i960 0x001
-#define I2O_SUBCLASS_HDM 0x020
-#define I2O_SUBCLASS_ISM 0x021
-
+#define I2O_SUBCLASS_i960 0x001
+#define I2O_SUBCLASS_HDM 0x020
+#define I2O_SUBCLASS_ISM 0x021
+
/* Operation functions */
-#define I2O_PARAMS_FIELD_GET 0x0001
-#define I2O_PARAMS_LIST_GET 0x0002
-#define I2O_PARAMS_MORE_GET 0x0003
-#define I2O_PARAMS_SIZE_GET 0x0004
-#define I2O_PARAMS_TABLE_GET 0x0005
-#define I2O_PARAMS_FIELD_SET 0x0006
-#define I2O_PARAMS_LIST_SET 0x0007
-#define I2O_PARAMS_ROW_ADD 0x0008
-#define I2O_PARAMS_ROW_DELETE 0x0009
-#define I2O_PARAMS_TABLE_CLEAR 0x000A
+#define I2O_PARAMS_FIELD_GET 0x0001
+#define I2O_PARAMS_LIST_GET 0x0002
+#define I2O_PARAMS_MORE_GET 0x0003
+#define I2O_PARAMS_SIZE_GET 0x0004
+#define I2O_PARAMS_TABLE_GET 0x0005
+#define I2O_PARAMS_FIELD_SET 0x0006
+#define I2O_PARAMS_LIST_SET 0x0007
+#define I2O_PARAMS_ROW_ADD 0x0008
+#define I2O_PARAMS_ROW_DELETE 0x0009
+#define I2O_PARAMS_TABLE_CLEAR 0x000A
/*
* I2O serial number conventions / formats
* (circa v1.5)
*/
-#define I2O_SNFORMAT_UNKNOWN 0
-#define I2O_SNFORMAT_BINARY 1
-#define I2O_SNFORMAT_ASCII 2
-#define I2O_SNFORMAT_UNICODE 3
-#define I2O_SNFORMAT_LAN48_MAC 4
-#define I2O_SNFORMAT_WAN 5
+#define I2O_SNFORMAT_UNKNOWN 0
+#define I2O_SNFORMAT_BINARY 1
+#define I2O_SNFORMAT_ASCII 2
+#define I2O_SNFORMAT_UNICODE 3
+#define I2O_SNFORMAT_LAN48_MAC 4
+#define I2O_SNFORMAT_WAN 5
/*
* Plus new in v2.0 (Yellowstone pdf doc)
*/
-#define I2O_SNFORMAT_LAN64_MAC 6
-#define I2O_SNFORMAT_DDM 7
-#define I2O_SNFORMAT_IEEE_REG64 8
-#define I2O_SNFORMAT_IEEE_REG128 9
-#define I2O_SNFORMAT_UNKNOWN2 0xff
+#define I2O_SNFORMAT_LAN64_MAC 6
+#define I2O_SNFORMAT_DDM 7
+#define I2O_SNFORMAT_IEEE_REG64 8
+#define I2O_SNFORMAT_IEEE_REG128 9
+#define I2O_SNFORMAT_UNKNOWN2 0xff
/*
* I2O Get Status State values
*/
-#define ADAPTER_STATE_INITIALIZING 0x01
-#define ADAPTER_STATE_RESET 0x02
-#define ADAPTER_STATE_HOLD 0x04
-#define ADAPTER_STATE_READY 0x05
-#define ADAPTER_STATE_OPERATIONAL 0x08
-#define ADAPTER_STATE_FAILED 0x10
-#define ADAPTER_STATE_FAULTED 0x11
-
+#define ADAPTER_STATE_INITIALIZING 0x01
+#define ADAPTER_STATE_RESET 0x02
+#define ADAPTER_STATE_HOLD 0x04
+#define ADAPTER_STATE_READY 0x05
+#define ADAPTER_STATE_OPERATIONAL 0x08
+#define ADAPTER_STATE_FAILED 0x10
+#define ADAPTER_STATE_FAULTED 0x11
+
#endif /* _I2O_DEV_H */
diff --git a/include/linux/i2o.h b/include/linux/i2o.h
index 3ece9cee16bb..6fdec1eca6ca 100644
--- a/include/linux/i2o.h
+++ b/include/linux/i2o.h
@@ -17,24 +17,24 @@
#ifndef _I2O_H
#define _I2O_H
-#ifdef __KERNEL__ /* This file to be included by kernel only */
+
+#ifdef __KERNEL__ /* This file to be included by kernel only */
#include <linux/i2o-dev.h>
-/* How many different OSM's are we allowing */
+/* How many different OSM's are we allowing */
#define MAX_I2O_MODULES 64
/* How many OSMs can register themselves for device status updates? */
#define I2O_MAX_MANAGERS 4
-#include <asm/semaphore.h> /* Needed for MUTEX init macros */
+#include <asm/semaphore.h> /* Needed for MUTEX init macros */
#include <linux/config.h>
#include <linux/notifier.h>
-#include <linux/ioport.h>
#include <asm/atomic.h>
/*
- * message structures
+ * Message structures
*/
struct i2o_message
{
@@ -43,7 +43,7 @@ struct i2o_message
u16 size;
u32 target_tid:12;
u32 init_tid:12;
- u32 function:8;
+ u32 function:8;
u32 initiator_context;
/* List follows */
};
@@ -54,18 +54,19 @@ struct i2o_message
*/
struct i2o_device
{
- i2o_lct_entry lct_data; /* Device LCT information */
- u32 flags;
- int i2oversion; /* I2O version supported. Actually there
- * should be high and low version */
+ i2o_lct_entry lct_data; /* Device LCT information */
+ u32 flags;
+ int i2oversion; /* I2O version supported. Actually
+ * there should be high and low
+ * version */
- struct proc_dir_entry* proc_entry; /* /proc dir */
+ struct proc_dir_entry *proc_entry; /* /proc dir */
/* Primary user */
struct i2o_handler *owner;
/* Management users */
- struct i2o_handler *managers[I2O_MAX_MANAGERS];
+ struct i2o_handler *managers[I2O_MAX_MANAGERS];
int num_managers;
struct i2o_controller *controller; /* Controlling IOP */
@@ -76,24 +77,23 @@ struct i2o_device
/*
* Resource data for each PCI I2O controller
- */
+ */
struct i2o_pci
{
- struct pci_dev *pdev; /* PCI device */
- int irq;
- int queue_buggy:1; /* Don't send a lot of messages */
- int short_req:1; /* Use small block sizes */
- int dpt:1; /* Don't quiesce */
+ int irq;
+ int queue_buggy:1; /* Don't send a lot of messages */
+ int short_req:1; /* Use small block sizes */
+ int dpt:1; /* Don't quiesce */
#ifdef CONFIG_MTRR
- int mtrr_reg0;
- int mtrr_reg1;
+ int mtrr_reg0;
+ int mtrr_reg1;
#endif
};
/*
* Transport types supported by I2O stack
*/
-#define I2O_TYPE_PCI 0x01 /* PCI I2O controller */
+#define I2O_TYPE_PCI 0x01 /* PCI I2O controller */
/*
@@ -101,6 +101,8 @@ struct i2o_pci
*/
struct i2o_controller
{
+ struct pci_dev *pdev; /* PCI device */
+
char name[16];
int unit;
int type;
@@ -126,35 +128,35 @@ struct i2o_controller
u32 mem_offset; /* MFA offset */
u32 mem_phys; /* MFA physical */
-
+
int battery:1; /* Has a battery backup */
int io_alloc:1; /* An I/O resource was allocated */
int mem_alloc:1; /* A memory resource was allocated */
-
+
struct resource io_resource; /* I/O resource allocated to the IOP */
struct resource mem_resource; /* Mem resource allocated to the IOP */
- struct proc_dir_entry* proc_entry; /* /proc dir */
+ struct proc_dir_entry *proc_entry; /* /proc dir */
- union
- { /* Bus information */
+ union { /* Bus information */
struct i2o_pci pci;
} bus;
/* Bus specific destructor */
- void (*destructor)(struct i2o_controller *);
+ void (*destructor)(struct i2o_controller *);
/* Bus specific attach/detach */
- int (*bind)(struct i2o_controller *, struct i2o_device *);
+ int (*bind)(struct i2o_controller *, struct i2o_device *);
/* Bus specific initiator */
int (*unbind)(struct i2o_controller *, struct i2o_device *);
/* Bus specific enable/disable */
- void (*bus_enable)(struct i2o_controller *c);
- void (*bus_disable)(struct i2o_controller *c);
+ void (*bus_enable)(struct i2o_controller *);
+ void (*bus_disable)(struct i2o_controller *);
- void *page_frame; /* Message buffers */
+ void *page_frame; /* Message buffers */
+ dma_addr_t page_frame_map; /* Cache map */
};
/*
@@ -169,7 +171,8 @@ struct i2o_controller
struct i2o_handler
{
/* Message reply handler */
- void (*reply)(struct i2o_handler *, struct i2o_controller *, struct i2o_message *);
+ void (*reply)(struct i2o_handler *, struct i2o_controller *,
+ struct i2o_message *);
/* New device notification handler */
void (*new_dev_notify)(struct i2o_controller *, struct i2o_device *);
@@ -181,7 +184,7 @@ struct i2o_handler
void (*reboot_notify)(void);
char *name; /* OSM name */
- int context; /* Low 8 bits of the transaction info */
+ int context; /* Low 8 bits of the transaction info */
u32 class; /* I2O classes that this driver handles */
/* User data follows */
};
@@ -201,12 +204,12 @@ struct i2o_core_func_table
{
int (*install)(struct i2o_controller *);
int (*activate)(struct i2o_controller *);
- struct i2o_controller* (*find)(int);
+ struct i2o_controller *(*find)(int);
void (*unlock)(struct i2o_controller *);
- void (*run_queue)(struct i2o_controller *c);
+ void (*run_queue)(struct i2o_controller * c);
int (*delete)(struct i2o_controller *);
};
-#endif // MODULE
+#endif /* MODULE */
/*
* I2O System table entry
@@ -222,9 +225,9 @@ struct i2o_sys_tbl_entry
u32 iop_id:12;
u32 reserved2:20;
u16 seg_num:12;
- u16 i2o_version:4;
- u8 iop_state;
- u8 msg_type;
+ u16 i2o_version:4;
+ u8 iop_state;
+ u8 msg_type;
u16 frame_size;
u16 reserved3;
u32 last_changed;
@@ -235,14 +238,14 @@ struct i2o_sys_tbl_entry
struct i2o_sys_tbl
{
- u8 num_entries;
- u8 version;
- u16 reserved1;
+ u8 num_entries;
+ u8 version;
+ u16 reserved1;
u32 change_ind;
u32 reserved2;
u32 reserved3;
struct i2o_sys_tbl_entry iops[0];
-};
+};
/*
* Messenger inlines
@@ -265,9 +268,9 @@ static inline u32 I2O_REPLY_READ32(struct i2o_controller *c)
static inline void I2O_REPLY_WRITE32(struct i2o_controller *c, u32 Val)
{
- *c->reply_port= Val;
+ *c->reply_port = Val;
}
-
+
static inline u32 I2O_IRQ_READ32(struct i2o_controller *c)
{
@@ -283,13 +286,13 @@ static inline void I2O_IRQ_WRITE32(struct i2o_controller *c, u32 Val)
static inline void i2o_post_message(struct i2o_controller *c, u32 m)
{
/* The second line isnt spurious - thats forcing PCI posting */
- I2O_POST_WRITE32(c,m);
+ I2O_POST_WRITE32(c, m);
(void) I2O_IRQ_READ32(c);
}
static inline void i2o_flush_reply(struct i2o_controller *c, u32 m)
{
- I2O_REPLY_WRITE32(c,m);
+ I2O_REPLY_WRITE32(c, m);
}
extern struct i2o_controller *i2o_find_controller(int);
@@ -304,23 +307,27 @@ extern int i2o_remove_handler(struct i2o_handler *);
extern int i2o_claim_device(struct i2o_device *, struct i2o_handler *);
extern int i2o_release_device(struct i2o_device *, struct i2o_handler *);
extern int i2o_device_notify_on(struct i2o_device *, struct i2o_handler *);
-extern int i2o_device_notify_off(struct i2o_device *, struct i2o_handler *);
+extern int i2o_device_notify_off(struct i2o_device *,
+ struct i2o_handler *);
extern int i2o_post_this(struct i2o_controller *, u32 *, int);
extern int i2o_post_wait(struct i2o_controller *, u32 *, int, int);
-extern int i2o_post_wait_mem(struct i2o_controller *, u32 *, int, int, void *, void *);
-
-extern int i2o_query_scalar(struct i2o_controller *, int, int, int, void *, int);
-extern int i2o_set_scalar(struct i2o_controller *, int, int, int, void *, int);
-extern int i2o_query_table(int, struct i2o_controller *, int, int, int, void *,
- int, void *, int);
-extern int i2o_clear_table(struct i2o_controller *, int, int);
-extern int i2o_row_add_table(struct i2o_controller *, int, int, int, void *,
- int);
-extern int i2o_issue_params(int, struct i2o_controller *, int, void *,
- int, void *, int);
-
-extern int i2o_event_register(struct i2o_controller *, u32, u32, u32, u32);
+extern int i2o_post_wait_mem(struct i2o_controller *, u32 *, int, int,
+ void *, void *);
+
+extern int i2o_query_scalar(struct i2o_controller *, int, int, int, void *,
+ int);
+extern int i2o_set_scalar(struct i2o_controller *, int, int, int, void *,
+ int);
+extern int i2o_query_table(int, struct i2o_controller *, int, int, int,
+ void *, int, void *, int);
+extern int i2o_clear_table(struct i2o_controller *, int, int);
+extern int i2o_row_add_table(struct i2o_controller *, int, int, int,
+ void *, int);
+extern int i2o_issue_params(int, struct i2o_controller *, int, void *, int,
+ void *, int);
+
+extern int i2o_event_register(struct i2o_controller *, u32, u32, u32, u32);
extern int i2o_event_ack(struct i2o_controller *, u32 *);
extern void i2o_report_status(const char *, const char *, u32 *);
@@ -339,7 +346,7 @@ extern int i2o_delete_controller(struct i2o_controller *);
/*
* Executive Class
- */
+ */
#define I2O_CMD_ADAPTER_ASSIGN 0xB3
#define I2O_CMD_ADAPTER_READ 0xB2
#define I2O_CMD_ADAPTER_RELEASE 0xB5
@@ -524,7 +531,7 @@ extern int i2o_delete_controller(struct i2o_controller *);
#define I2O_CLAIM_MANAGEMENT 0x02000000
#define I2O_CLAIM_AUTHORIZED 0x03000000
#define I2O_CLAIM_SECONDARY 0x04000000
-
+
/* Message header defines for VersionOffset */
#define I2OVER15 0x0001
#define I2OVER20 0x0002
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index bc3d02f4d249..f39bcabdf7c0 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1594,6 +1594,16 @@
#define PCI_DEVICE_ID_INTEL_82801BA_9 0x244b
#define PCI_DEVICE_ID_INTEL_82801BA_10 0x244c
#define PCI_DEVICE_ID_INTEL_82801BA_11 0x244e
+#define PCI_DEVICE_ID_INTEL_82801CA_0 0x2480
+#define PCI_DEVICE_ID_INTEL_82801CA_2 0x2482
+#define PCI_DEVICE_ID_INTEL_82801CA_3 0x2483
+#define PCI_DEVICE_ID_INTEL_82801CA_4 0x2484
+#define PCI_DEVICE_ID_INTEL_82801CA_5 0x2485
+#define PCI_DEVICE_ID_INTEL_82801CA_6 0x2486
+#define PCI_DEVICE_ID_INTEL_82801CA_7 0x2487
+#define PCI_DEVICE_ID_INTEL_82801CA_10 0x248a
+#define PCI_DEVICE_ID_INTEL_82801CA_11 0x248b
+#define PCI_DEVICE_ID_INTEL_82801CA_12 0x248c
#define PCI_DEVICE_ID_INTEL_82810_MC1 0x7120
#define PCI_DEVICE_ID_INTEL_82810_IG1 0x7121
#define PCI_DEVICE_ID_INTEL_82810_MC3 0x7122
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h
index 29a0c691883c..48aab6f712a3 100644
--- a/include/linux/sonypi.h
+++ b/include/linux/sonypi.h
@@ -67,9 +67,12 @@
#define SONYPI_EVENT_FNKEY_S 29
#define SONYPI_EVENT_FNKEY_B 30
#define SONYPI_EVENT_BLUETOOTH_PRESSED 31
-#define SONYPI_EVENT_PKEY_P1 32
-#define SONYPI_EVENT_PKEY_P2 33
-#define SONYPI_EVENT_PKEY_P3 34
+#define SONYPI_EVENT_PKEY_P1 32
+#define SONYPI_EVENT_PKEY_P2 33
+#define SONYPI_EVENT_PKEY_P3 34
+#define SONYPI_EVENT_BACK_PRESSED 35
+#define SONYPI_EVENT_LID_CLOSED 36
+#define SONYPI_EVENT_LID_OPENED 37
/* brightness etc. ioctls */
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index 059329c7759e..440ba7df43ec 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -30,6 +30,10 @@
#define write_unlock_irqrestore(lock, flags) do { write_unlock(lock); local_irq_restore(flags); } while (0)
#define write_unlock_irq(lock) do { write_unlock(lock); local_irq_enable(); } while (0)
#define write_unlock_bh(lock) do { write_unlock(lock); local_bh_enable(); } while (0)
+#define spin_trylock_bh(lock) ({ int __r; local_bh_disable();\
+ __r = spin_trylock(lock); \
+ if (!__r) local_bh_enable(); \
+ __r; })
#ifdef CONFIG_SMP
#include <asm/spinlock.h>
diff --git a/include/linux/udf_fs.h b/include/linux/udf_fs.h
index 736d617f0a68..c2a0b4b23948 100644
--- a/include/linux/udf_fs.h
+++ b/include/linux/udf_fs.h
@@ -37,8 +37,8 @@
#define UDF_PREALLOCATE
#define UDF_DEFAULT_PREALLOC_BLOCKS 8
-#define UDFFS_DATE "2001/06/13"
-#define UDFFS_VERSION "0.9.4.1"
+#define UDFFS_DATE "2001/10/10"
+#define UDFFS_VERSION "0.9.5"
#if !defined(UDFFS_RW)
diff --git a/include/linux/udf_fs_sb.h b/include/linux/udf_fs_sb.h
index c07d6678708d..fdb078d9dbc6 100644
--- a/include/linux/udf_fs_sb.h
+++ b/include/linux/udf_fs_sb.h
@@ -18,10 +18,6 @@
#if !defined(_LINUX_UDF_FS_SB_H)
#define _LINUX_UDF_FS_SB_H
-#ifndef LINUX_VERSION_CODE
-#include <linux/version.h>
-#endif
-
#pragma pack(1)
#define UDF_MAX_BLOCK_LOADED 8
@@ -89,7 +85,7 @@ struct udf_sb_info
__u16 s_partition;
/* Sector headers */
- __u32 s_session;
+ __s32 s_session;
__u32 s_anchor[4];
__u32 s_lastblock;
diff --git a/include/linux/videodev.h b/include/linux/videodev.h
index 007639810d75..9ae491f509d5 100644
--- a/include/linux/videodev.h
+++ b/include/linux/videodev.h
@@ -185,7 +185,7 @@ struct video_capture
{
__u32 x,y; /* Offsets into image */
__u32 width, height; /* Area to capture */
- __u16 decimation; /* Decimation divder */
+ __u16 decimation; /* Decimation divider */
__u16 flags; /* Flags for capture */
#define VIDEO_CAPTURE_ODD 0 /* Temporal */
#define VIDEO_CAPTURE_EVEN 1
@@ -378,14 +378,4 @@ struct video_code
#define VID_HARDWARE_MEYE 32 /* Sony Vaio MotionEye cameras */
#define VID_HARDWARE_CPIA2 33
-/*
- * Initialiser list
- */
-
-struct video_init
-{
- char *name;
- int (*init)(struct video_init *);
-};
-
#endif
diff --git a/include/pcmcia/cs_types.h b/include/pcmcia/cs_types.h
index f6382c4ba696..3a0f7476dbb3 100644
--- a/include/pcmcia/cs_types.h
+++ b/include/pcmcia/cs_types.h
@@ -36,8 +36,13 @@
#include <sys/types.h>
#endif
-typedef u_short socket_t;
+#ifdef __arm__
+typedef u_int ioaddr_t;
+#else
typedef u_short ioaddr_t;
+#endif
+
+typedef u_short socket_t;
typedef u_int event_t;
typedef u_char cisdata_t;
typedef u_short page_t;
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h
index 02f3b8e87253..17c534cfc50c 100644
--- a/include/pcmcia/ss.h
+++ b/include/pcmcia/ss.h
@@ -30,6 +30,8 @@
#ifndef _LINUX_SS_H
#define _LINUX_SS_H
+#include <pcmcia/cs_types.h>
+
/* Definitions for card status flags for GetStatus */
#define SS_WRPROT 0x0001
#define SS_CARDLOCK 0x0002
@@ -52,6 +54,7 @@ typedef struct socket_cap_t {
u_int features;
u_int irq_mask;
u_int map_size;
+ ioaddr_t io_offset;
u_char pci_irq;
struct pci_dev *cb_dev;
struct bus_operations *bus;
@@ -101,7 +104,7 @@ typedef struct pccard_io_map {
u_char map;
u_char flags;
u_short speed;
- u_short start, stop;
+ ioaddr_t start, stop;
} pccard_io_map;
typedef struct pccard_mem_map {