diff options
| author | Andi Kleen <ak@muc.de> | 2003-10-25 17:17:34 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-10-25 17:17:34 -0800 |
| commit | 7c382efaffd7974039c1e0026f6af02c0bca2fe2 (patch) | |
| tree | c664da4603cead6058807408fccaa19c975b1d33 /include | |
| parent | 69c1d1bffa81dbfb72dde7287cc2e9300538258c (diff) | |
[PATCH] Essential x86-64 updates
The most important part is that it makes x86-64 compile again.
Without that 2.6 users won't be very happy.
It also works around a bug that allowed every user program to reboot the
system on B stepping K8.
Also update to match some recent i386 fixes.
Full ChangeLog:
- Add acpi_pic_set_level_irq to make ACPI compile again
- Work around compat mode K8 bug in IRET exception handling
- Increase exception stack. The old 1k stack was too easy
to overflow (from Jim Paradis, changed by me)
- Replace safe_smp_processor_id with cpuid (needed for above)
- When there is only one node always enable fake_node mode
- Merge with i386 (NTP gettimeofday monoticity fix, irq nr_vectors change)
- Fix compile problem for UP kernels in time/cpufreq
- Set all nodes online at bootup
- Define node_to_cpumask correctly
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-x86_64/hw_irq.h | 4 | ||||
| -rw-r--r-- | include/asm-x86_64/irq.h | 1 | ||||
| -rw-r--r-- | include/asm-x86_64/pci.h | 2 | ||||
| -rw-r--r-- | include/asm-x86_64/processor.h | 4 | ||||
| -rw-r--r-- | include/asm-x86_64/smp.h | 10 | ||||
| -rw-r--r-- | include/asm-x86_64/topology.h | 4 |
6 files changed, 11 insertions, 14 deletions
diff --git a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h index aa7037368274..e1423be20796 100644 --- a/include/asm-x86_64/hw_irq.h +++ b/include/asm-x86_64/hw_irq.h @@ -76,8 +76,8 @@ struct hw_interrupt_type; #ifndef __ASSEMBLY__ -extern int irq_vector[NR_IRQS]; -#define IO_APIC_VECTOR(irq) irq_vector[irq] +extern u8 irq_vector[NR_IRQ_VECTORS]; +#define IO_APIC_VECTOR(irq) ((int)irq_vector[irq]) /* * Various low-level irq details needed by irq.c, process.c, diff --git a/include/asm-x86_64/irq.h b/include/asm-x86_64/irq.h index 7415660ffb69..f7512e095d3d 100644 --- a/include/asm-x86_64/irq.h +++ b/include/asm-x86_64/irq.h @@ -22,6 +22,7 @@ * the usable vector space is 0x20-0xff (224 vectors) */ #define NR_IRQS 224 +#define NR_IRQ_VECTORS NR_IRQS static __inline__ int irq_canonicalize(int irq) { diff --git a/include/asm-x86_64/pci.h b/include/asm-x86_64/pci.h index b072364de2bd..b64f5bd97a2d 100644 --- a/include/asm-x86_64/pci.h +++ b/include/asm-x86_64/pci.h @@ -24,6 +24,8 @@ extern unsigned long pci_mem_start; #define PCIBIOS_MIN_IO 0x1000 #define PCIBIOS_MIN_MEM (pci_mem_start) +#define PCIBIOS_MIN_CARDBUS_IO 0x4000 + void pcibios_config_init(void); struct pci_bus * pcibios_scan_root(int bus); extern int (*pci_config_read)(int seg, int bus, int dev, int fn, int reg, int len, u32 *value); diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index 805b7c03dbbc..f468b68e3839 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h @@ -263,8 +263,8 @@ struct thread_struct { #define DOUBLEFAULT_STACK 2 #define NMI_STACK 3 #define N_EXCEPTION_STACKS 3 /* hw limit: 7 */ -#define EXCEPTION_STKSZ 1024 -#define EXCEPTION_STK_ORDER 0 +#define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER) +#define EXCEPTION_STACK_ORDER 0 #define start_thread(regs,new_rip,new_rsp) do { \ asm volatile("movl %0,%%fs; movl %0,%%es; movl %0,%%ds": :"r" (0)); \ diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h index ba4e4ad1a189..8f425a3acdf6 100644 --- a/include/asm-x86_64/smp.h +++ b/include/asm-x86_64/smp.h @@ -74,15 +74,7 @@ extern __inline int hard_smp_processor_id(void) return GET_APIC_ID(*(unsigned int *)(APIC_BASE+APIC_ID)); } -extern int slow_smp_processor_id(void); - -extern inline int safe_smp_processor_id(void) -{ - if (disable_apic) - return slow_smp_processor_id(); - else - return hard_smp_processor_id(); -} +#define safe_smp_processor_id() (cpuid_ebx(1) >> 24) #define cpu_online(cpu) cpu_isset(cpu, cpu_online_map) #endif /* !ASSEMBLY */ diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h index d4548e5ed6dc..1a614e8c0b18 100644 --- a/include/asm-x86_64/topology.h +++ b/include/asm-x86_64/topology.h @@ -10,13 +10,15 @@ /* Map the K8 CPU local memory controllers to a simple 1:1 CPU:NODE topology */ extern int fake_node; +/* This is actually a cpumask_t, but doesn't matter because we don't have + >BITS_PER_LONG CPUs */ extern unsigned long cpu_online_map; #define cpu_to_node(cpu) (fake_node ? 0 : (cpu)) #define memblk_to_node(memblk) (fake_node ? 0 : (memblk)) #define parent_node(node) (node) #define node_to_first_cpu(node) (fake_node ? 0 : (node)) -#define node_to_cpu_mask(node) (fake_node ? cpu_online_map : (1UL << (node))) +#define node_to_cpumask(node) (fake_node ? cpu_online_map : (1UL << (node))) #define node_to_memblk(node) (node) static inline unsigned long pcibus_to_cpumask(int bus) |
