summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:11:43 -0800
committerLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:11:43 -0800
commitdf0386374805089cbd09cc4a308e893be6738a93 (patch)
tree218ddf00b4d68ccbeab2a0cc8f1985d936369422 /include
parent87f504e5c78b910b0c1d6ffb89bc95e492322c84 (diff)
v2.4.9.2 -> v2.4.9.3
- Johannes Erdfelt, Oliver Neukum: USB printer driver race fix - John Byrne: fix stupid i386-SMP irq stack layout bug - Andreas Bombe, me: yenta IO window fix - Neil Brown: raid1 buffer state fix - David Miller, Paul Mackerras: fix up sparc and ppc respectively for kmap/kbd_rate - Matija Nalis: umsdos fixes, and make it possible to boot up with umsdos - Francois Romieu: fix bugs in dscc4 driver - Andy Grover: new PCI config space access functions (eventually for ACPI) - Albert Cranford: fix incorrect e2fsprog data from ver_linux script - Dave Jones: re-sync x86 setup code, fix macsonic kmalloc use - Johannes Erdfelt: remove obsolete plusb USB driver - Andries Brouwer: fix USB compact flash version info, add blksize ioctls
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/hw_irq.h4
-rw-r--r--include/asm-i386/msr.h84
-rw-r--r--include/asm-i386/system.h13
-rw-r--r--include/asm-i386/timex.h2
-rw-r--r--include/asm-ppc/keyboard.h3
-rw-r--r--include/asm-ppc/kmap_types.h4
-rw-r--r--include/asm-ppc/machdep.h15
-rw-r--r--include/asm-sparc/kmap_types.h2
-rw-r--r--include/linux/fs.h4
-rw-r--r--include/linux/pmu.h24
-rw-r--r--include/linux/skbuff.h2
11 files changed, 134 insertions, 23 deletions
diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h
index c99045972cf3..cdedca57e80c 100644
--- a/include/asm-i386/hw_irq.h
+++ b/include/asm-i386/hw_irq.h
@@ -130,7 +130,7 @@ asmlinkage void call_##x(void); \
__asm__( \
"\n"__ALIGN_STR"\n" \
SYMBOL_NAME_STR(x) ":\n\t" \
- "pushl $"#v"\n\t" \
+ "pushl $"#v"-256\n\t" \
SAVE_ALL \
SYMBOL_NAME_STR(call_##x)":\n\t" \
"call "SYMBOL_NAME_STR(smp_##x)"\n\t" \
@@ -143,7 +143,7 @@ asmlinkage void call_##x(void); \
__asm__( \
"\n"__ALIGN_STR"\n" \
SYMBOL_NAME_STR(x) ":\n\t" \
- "pushl $"#v"\n\t" \
+ "pushl $"#v"-256\n\t" \
SAVE_ALL \
"movl %esp,%eax\n\t" \
"pushl %eax\n\t" \
diff --git a/include/asm-i386/msr.h b/include/asm-i386/msr.h
index 72bf155e92ca..11bcb7f29e42 100644
--- a/include/asm-i386/msr.h
+++ b/include/asm-i386/msr.h
@@ -1,3 +1,6 @@
+#ifndef __ASM_MSR_H
+#define __ASM_MSR_H
+
/*
* Access to machine-specific registers (available on 586 and better only)
* Note: the rd* operations modify the parameters directly (without using
@@ -5,9 +8,9 @@
*/
#define rdmsr(msr,val1,val2) \
- __asm__ __volatile__("rdmsr" \
- : "=a" (val1), "=d" (val2) \
- : "c" (msr))
+ __asm__ __volatile__("rdmsr" \
+ : "=a" (val1), "=d" (val2) \
+ : "c" (msr))
#define wrmsr(msr,val1,val2) \
__asm__ __volatile__("wrmsr" \
@@ -18,10 +21,10 @@
__asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high))
#define rdtscl(low) \
- __asm__ __volatile__ ("rdtsc" : "=a" (low) : : "edx")
+ __asm__ __volatile__("rdtsc" : "=a" (low) : : "edx")
#define rdtscll(val) \
- __asm__ __volatile__ ("rdtsc" : "=A" (val))
+ __asm__ __volatile__("rdtsc" : "=A" (val))
#define write_tsc(val1,val2) wrmsr(0x10, val1, val2)
@@ -31,6 +34,71 @@
: "c" (counter))
/* symbolic names for some interesting MSRs */
-#define MSR_IA32_PLATFORM_ID 0x17
-#define MSR_IA32_UCODE_WRITE 0x79
-#define MSR_IA32_UCODE_REV 0x8B
+/* Intel defined MSRs. */
+#define MSR_IA32_P5_MC_ADDR 0
+#define MSR_IA32_P5_MC_TYPE 1
+#define MSR_IA32_PLATFORM_ID 0x17
+#define MSR_IA32_EBL_CR_POWERON 0x2a
+
+#define MSR_IA32_APICBASE 0x1b
+#define MSR_IA32_APICBASE_BSP (1<<8)
+#define MSR_IA32_APICBASE_ENABLE (1<<11)
+#define MSR_IA32_APICBASE_BASE (0xfffff<<12)
+
+#define MSR_IA32_UCODE_WRITE 0x79
+#define MSR_IA32_UCODE_REV 0x8b
+
+#define MSR_IA32_PERFCTR0 0xc1
+#define MSR_IA32_PERFCTR1 0xc2
+
+#define MSR_IA32_BBL_CR_CTL 0x119
+
+#define MSR_IA32_MCG_CAP 0x179
+#define MSR_IA32_MCG_STATUS 0x17a
+#define MSR_IA32_MCG_CTL 0x17b
+
+#define MSR_IA32_EVNTSEL0 0x186
+#define MSR_IA32_EVNTSEL1 0x187
+
+#define MSR_IA32_DEBUGCTLMSR 0x1d9
+#define MSR_IA32_LASTBRANCHFROMIP 0x1db
+#define MSR_IA32_LASTBRANCHTOIP 0x1dc
+#define MSR_IA32_LASTINTFROMIP 0x1dd
+#define MSR_IA32_LASTINTTOIP 0x1de
+
+#define MSR_IA32_MC0_CTL 0x400
+#define MSR_IA32_MC0_STATUS 0x401
+#define MSR_IA32_MC0_ADDR 0x402
+#define MSR_IA32_MC0_MISC 0x403
+
+/* AMD Defined MSRs */
+#define MSR_K6_EFER 0xC0000080
+#define MSR_K6_STAR 0xC0000081
+#define MSR_K6_WHCR 0xC0000082
+#define MSR_K6_UWCCR 0xC0000085
+#define MSR_K6_PSOR 0xC0000087
+#define MSR_K6_PFIR 0xC0000088
+
+#define MSR_K7_EVNTSEL0 0xC0010000
+#define MSR_K7_PERFCTR0 0xC0010004
+
+/* Centaur-Hauls/IDT defined MSRs. */
+#define MSR_IDT_FCR1 0x107
+#define MSR_IDT_FCR2 0x108
+#define MSR_IDT_FCR3 0x109
+#define MSR_IDT_FCR4 0x10a
+
+#define MSR_IDT_MCR0 0x110
+#define MSR_IDT_MCR1 0x111
+#define MSR_IDT_MCR2 0x112
+#define MSR_IDT_MCR3 0x113
+#define MSR_IDT_MCR4 0x114
+#define MSR_IDT_MCR5 0x115
+#define MSR_IDT_MCR6 0x116
+#define MSR_IDT_MCR7 0x117
+#define MSR_IDT_MCR_CTRL 0x120
+
+/* VIA Cyrix defined MSRs*/
+#define MSR_VIA_FCR 0x1107
+
+#endif /* __ASM_MSR_H */
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h
index 6f2f63a8e3d3..932aa29c5f49 100644
--- a/include/asm-i386/system.h
+++ b/include/asm-i386/system.h
@@ -110,10 +110,23 @@ static inline unsigned long _get_base(char * addr)
})
#define write_cr0(x) \
__asm__("movl %0,%%cr0": :"r" (x));
+
+#define read_cr4() ({ \
+ unsigned int __dummy; \
+ __asm__( \
+ "movl %%cr4,%0\n\t" \
+ :"=r" (__dummy)); \
+ __dummy; \
+})
+#define write_cr4(x) \
+ __asm__("movl %0,%%cr4": :"r" (x));
#define stts() write_cr0(8 | read_cr0())
#endif /* __KERNEL__ */
+#define wbinvd() \
+ __asm__ __volatile__ ("wbinvd": : :"memory");
+
static inline unsigned long get_limit(unsigned long segment)
{
unsigned long __limit;
diff --git a/include/asm-i386/timex.h b/include/asm-i386/timex.h
index 1cb3b96b471a..97099dd0d414 100644
--- a/include/asm-i386/timex.h
+++ b/include/asm-i386/timex.h
@@ -45,4 +45,6 @@ static inline cycles_t get_cycles (void)
#endif
}
+extern unsigned long cpu_khz;
+
#endif
diff --git a/include/asm-ppc/keyboard.h b/include/asm-ppc/keyboard.h
index 4cc11f04d47e..d8e414c84cb3 100644
--- a/include/asm-ppc/keyboard.h
+++ b/include/asm-ppc/keyboard.h
@@ -1,5 +1,5 @@
/*
- * BK Id: %F% %I% %G% %U% %#%
+ * BK Id: SCCS/s.keyboard.h 1.11 08/29/01 10:07:29 paulus
*/
/*
* linux/include/asm-ppc/keyboard.h
@@ -75,7 +75,6 @@ static inline void kbd_init_hw(void)
ppc_md.kbd_init_hw();
}
-#define kbd_rate (ppc_md.kbd_rate_fn)
#define kbd_sysrq_xlate (ppc_md.ppc_kbd_sysrq_xlate)
extern unsigned long SYSRQ_KEY;
diff --git a/include/asm-ppc/kmap_types.h b/include/asm-ppc/kmap_types.h
index b5243504f2ca..af0439610908 100644
--- a/include/asm-ppc/kmap_types.h
+++ b/include/asm-ppc/kmap_types.h
@@ -1,5 +1,5 @@
/*
- * BK Id: SCCS/s.kmap_types.h 1.6 05/17/01 18:14:24 cort
+ * BK Id: SCCS/s.kmap_types.h 1.9 08/29/01 14:03:05 paulus
*/
#ifdef __KERNEL__
#ifndef _ASM_KMAP_TYPES_H
@@ -10,6 +10,8 @@ enum km_type {
KM_BOUNCE_WRITE,
KM_SKB_DATA,
KM_SKB_DATA_SOFTIRQ,
+ KM_USER0,
+ KM_USER1,
KM_TYPE_NR
};
diff --git a/include/asm-ppc/machdep.h b/include/asm-ppc/machdep.h
index 2862d8c89c7b..5f3cb66dd81c 100644
--- a/include/asm-ppc/machdep.h
+++ b/include/asm-ppc/machdep.h
@@ -1,5 +1,5 @@
/*
- * BK Id: SCCS/s.machdep.h 1.19 08/18/01 18:16:33 paulus
+ * BK Id: SCCS/s.machdep.h 1.21 08/29/01 10:07:29 paulus
*/
#ifdef __KERNEL__
#ifndef _PPC_MACHDEP_H
@@ -14,7 +14,6 @@
struct pt_regs;
struct pci_bus;
struct pci_dev;
-struct kbd_repeat;
struct machdep_calls {
void (*setup_arch)(void);
@@ -61,7 +60,6 @@ struct machdep_calls {
char raw_mode);
char (*kbd_unexpected_up)(unsigned char keycode);
void (*kbd_leds)(unsigned char leds);
- int (*kbd_rate_fn)(struct kbd_repeat *rep);
void (*kbd_init_hw)(void);
#ifdef CONFIG_MAGIC_SYSRQ
unsigned char *ppc_kbd_sysrq_xlate;
@@ -74,6 +72,10 @@ struct machdep_calls {
/* Called after scanning the bus, before allocating resources */
void (*pcibios_fixup)(void);
+ /* Called after PPC generic resource fixup to perform
+ machine specific fixups */
+ void (*pcibios_fixup_resources)(struct pci_dev *);
+
/* Called for each PCI bus in the system when it's probed */
void (*pcibios_fixup_bus)(struct pci_bus *);
@@ -82,6 +84,13 @@ struct machdep_calls {
* Returns 0 to allow assignment/enabling of the device. */
int (*pcibios_enable_device_hook)(struct pci_dev *, int initial);
+ /* For interrupt routing */
+ unsigned char (*pci_swizzle)(struct pci_dev *, unsigned char *);
+ int (*pci_map_irq)(struct pci_dev *, unsigned char, unsigned char);
+
+ /* Called in indirect_* to avoid touching devices */
+ int (*pci_exclude_device)(unsigned char, unsigned char);
+
/* Called at then very end of pcibios_init() */
void (*pcibios_after_init)(void);
diff --git a/include/asm-sparc/kmap_types.h b/include/asm-sparc/kmap_types.h
index 3388fa5bcd3a..82af4b9e8379 100644
--- a/include/asm-sparc/kmap_types.h
+++ b/include/asm-sparc/kmap_types.h
@@ -6,6 +6,8 @@ enum km_type {
KM_BOUNCE_WRITE,
KM_SKB_DATA,
KM_SKB_DATA_SOFTIRQ,
+ KM_USER0,
+ KM_USER1,
KM_TYPE_NR
};
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 8d70498784f5..1a8efa4044ea 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -182,7 +182,9 @@ extern int leases_enable, dir_notify_enable, lease_break_time;
/* This was here just to show that the number is taken -
probably all these _IO(0x12,*) ioctls should be moved to blkpg.h. */
#endif
-
+/* A jump here: 108-111 have been used for various private purposes. */
+#define BLKBSZGET _IOR(0x12,112,sizeof(int))
+#define BLKBSZSET _IOW(0x12,113,sizeof(int))
#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */
#define FIBMAP _IO(0x00,1) /* bmap access */
diff --git a/include/linux/pmu.h b/include/linux/pmu.h
index cd1ac601af84..1186ebc301a8 100644
--- a/include/linux/pmu.h
+++ b/include/linux/pmu.h
@@ -7,6 +7,9 @@
*/
#include <linux/config.h>
+
+#define PMU_DRIVER_VERSION 2
+
/*
* PMU commands
*/
@@ -23,6 +26,7 @@
#define PMU_GET_VOLBUTTON 0x48 /* get volume up/down position */
#define PMU_PCEJECT 0x4c /* eject PC-card from slot */
#define PMU_BATTERY_STATE 0x6b /* report battery state etc. */
+#define PMU_SMART_BATTERY_STATE 0x6f /* report battery state (new way) */
#define PMU_SET_INTR_MASK 0x70 /* set PMU interrupt mask */
#define PMU_INT_ACK 0x78 /* read interrupt bits */
#define PMU_SHUTDOWN 0x7e /* turn power off */
@@ -32,6 +36,7 @@
#define PMU_GET_BRIGHTBUTTON 0xd9 /* report brightness up/down pos */
#define PMU_GET_COVER 0xdc /* report cover open/closed */
#define PMU_SYSTEM_READY 0xdf /* tell PMU we are awake */
+#define PMU_GET_VERSION 0xea /* read the PMU version */
/* Bits to use with the PMU_POWER_CTRL0 command */
#define PMU_POW0_ON 0x80 /* OR this to power ON the device */
@@ -46,16 +51,23 @@
#define PMU_POW_IRLED 0x04 /* IR led power (on wallstreet) */
#define PMU_POW_MEDIABAY 0x08 /* media bay power (wallstreet/lombard ?) */
-
/* Bits in PMU interrupt and interrupt mask bytes */
-#define PMU_INT_ADB_AUTO 0x04 /* ADB autopoll, when PMU_INT_ADB */
#define PMU_INT_PCEJECT 0x04 /* PC-card eject buttons */
#define PMU_INT_SNDBRT 0x08 /* sound/brightness up/down buttons */
#define PMU_INT_ADB 0x10 /* ADB autopoll or reply data */
-#define PMU_INT_BATTERY 0x20
-#define PMU_INT_WAKEUP 0x40
+#define PMU_INT_BATTERY 0x20 /* Battery state change */
+#define PMU_INT_ENVIRONMENT 0x40 /* Environment interrupts */
#define PMU_INT_TICK 0x80 /* 1-second tick interrupt */
+/* Other bits in PMU interrupt valid when PMU_INT_ADB is set */
+#define PMU_INT_ADB_AUTO 0x04 /* ADB autopoll, when PMU_INT_ADB */
+#define PMU_INT_WAITING_CHARGER 0x01 /* ??? */
+#define PMU_INT_AUTO_SRQ_POLL 0x02 /* ??? */
+
+/* Bits in the environement message (either obtained via PMU_GET_COVER,
+ * or via PMU_INT_ENVIRONMENT on core99 */
+#define PMU_ENV_LID_CLOSED 0x01 /* The lid is closed */
+
/* Kind of PMU (model) */
enum {
PMU_UNKNOWN,
@@ -99,6 +111,8 @@ enum {
#define PMU_IOC_GET_MODEL _IOR('B', 3, sizeof(__u32*))
/* out param: u32* has_adb: 0 or 1 */
#define PMU_IOC_HAS_ADB _IOR('B', 4, sizeof(__u32*))
+/* out param: u32* can_sleep: 0 or 1 */
+#define PMU_IOC_CAN_SLEEP _IOR('B', 5, sizeof(__u32*))
#ifdef __KERNEL__
@@ -160,7 +174,7 @@ struct pmu_sleep_notifier
#define SLEEP_LEVEL_NET 60 /* bmac */
#define SLEEP_LEVEL_ADB 50 /* ADB */
#define SLEEP_LEVEL_MISC 30 /* Anything */
-#define SLEEP_LEVEL_LAST 0 /* Anything */
+#define SLEEP_LEVEL_LAST 0 /* Reserved for apm_emu */
/* special register notifier functions */
int pmu_register_sleep_notifier(struct pmu_sleep_notifier* notifier);
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 09eee390b5bc..b2fc5595c04b 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1082,7 +1082,7 @@ skb_cow(struct sk_buff *skb, unsigned int headroom)
/**
* skb_linearize - convert paged skb to linear one
* @skb: buffer to linarize
- * @gfp_mask: allocation mode
+ * @gfp: allocation mode
*
* If there is no free memory -ENOMEM is returned, otherwise zero
* is returned and the old skb data released. */