diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-10-21 16:46:04 +0100 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-10-21 16:46:04 +0100 |
commit | 513b046c96cc2fbce730a3474f6f7ff0c4fdd05c (patch) | |
tree | e8006368b6f643067486f92405a404757807d6da /include/asm-i386 | |
parent | 82810b7b6cc7a74c68881a13b0eb66c7a6370fcc (diff) | |
parent | c7a3bd177f248d01ee18a01d22048c80e071c331 (diff) | |
download | kernel_samsung_aries-513b046c96cc2fbce730a3474f6f7ff0c4fdd05c.zip kernel_samsung_aries-513b046c96cc2fbce730a3474f6f7ff0c4fdd05c.tar.gz kernel_samsung_aries-513b046c96cc2fbce730a3474f6f7ff0c4fdd05c.tar.bz2 |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/asm-i386')
-rw-r--r-- | include/asm-i386/alternative-asm.i | 2 | ||||
-rw-r--r-- | include/asm-i386/apic.h | 4 | ||||
-rw-r--r-- | include/asm-i386/arch_hooks.h | 2 | ||||
-rw-r--r-- | include/asm-i386/floppy.h | 6 | ||||
-rw-r--r-- | include/asm-i386/frame.i | 1 | ||||
-rw-r--r-- | include/asm-i386/hpet.h | 2 | ||||
-rw-r--r-- | include/asm-i386/hw_irq.h | 8 | ||||
-rw-r--r-- | include/asm-i386/hypertransport.h | 42 | ||||
-rw-r--r-- | include/asm-i386/io.h | 27 | ||||
-rw-r--r-- | include/asm-i386/io_apic.h | 42 | ||||
-rw-r--r-- | include/asm-i386/irq_regs.h | 1 | ||||
-rw-r--r-- | include/asm-i386/mach-default/do_timer.h | 8 | ||||
-rw-r--r-- | include/asm-i386/mach-default/irq_vectors_limits.h | 5 | ||||
-rw-r--r-- | include/asm-i386/mach-visws/do_timer.h | 8 | ||||
-rw-r--r-- | include/asm-i386/mach-voyager/do_timer.h | 6 | ||||
-rw-r--r-- | include/asm-i386/msi.h | 23 | ||||
-rw-r--r-- | include/asm-i386/msidef.h | 47 | ||||
-rw-r--r-- | include/asm-i386/processor.h | 2 | ||||
-rw-r--r-- | include/asm-i386/smp.h | 5 | ||||
-rw-r--r-- | include/asm-i386/uaccess.h | 67 | ||||
-rw-r--r-- | include/asm-i386/unistd.h | 3 | ||||
-rw-r--r-- | include/asm-i386/vic.h | 2 | ||||
-rw-r--r-- | include/asm-i386/voyager.h | 164 |
23 files changed, 233 insertions, 244 deletions
diff --git a/include/asm-i386/alternative-asm.i b/include/asm-i386/alternative-asm.i index 6c47e3b..f051020 100644 --- a/include/asm-i386/alternative-asm.i +++ b/include/asm-i386/alternative-asm.i @@ -1,5 +1,3 @@ -#include <linux/config.h> - #ifdef CONFIG_SMP .macro LOCK_PREFIX 1: lock diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index 3a42b7d..b952957 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h @@ -98,7 +98,7 @@ extern void sync_Arb_IDs (void); extern void init_bsp_APIC (void); extern void setup_local_APIC (void); extern void init_apic_mappings (void); -extern void smp_local_timer_interrupt (struct pt_regs * regs); +extern void smp_local_timer_interrupt (void); extern void setup_boot_APIC_clock (void); extern void setup_secondary_APIC_clock (void); extern int APIC_init_uniprocessor (void); @@ -107,7 +107,7 @@ extern void enable_APIC_timer(void); extern void enable_NMI_through_LVT0 (void * dummy); -void smp_send_timer_broadcast_ipi(struct pt_regs *regs); +void smp_send_timer_broadcast_ipi(void); void switch_APIC_timer_to_ipi(void *cpumask); void switch_ipi_to_APIC_timer(void *cpumask); #define ARCH_APICTIMER_STOPS_ON_C3 1 diff --git a/include/asm-i386/arch_hooks.h b/include/asm-i386/arch_hooks.h index 238cf42..a8c1fca 100644 --- a/include/asm-i386/arch_hooks.h +++ b/include/asm-i386/arch_hooks.h @@ -14,7 +14,7 @@ extern void init_ISA_irqs(void); extern void apic_intr_init(void); extern void smp_intr_init(void); -extern irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs); +extern irqreturn_t timer_interrupt(int irq, void *dev_id); /* these are the defined hooks */ extern void intr_init_hook(void); diff --git a/include/asm-i386/floppy.h b/include/asm-i386/floppy.h index 359ead6..44ef2f5 100644 --- a/include/asm-i386/floppy.h +++ b/include/asm-i386/floppy.h @@ -51,7 +51,7 @@ static char *virtual_dma_addr; static int virtual_dma_mode; static int doing_pdma; -static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t floppy_hardint(int irq, void *dev_id) { register unsigned char st; @@ -63,7 +63,7 @@ static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) static int dma_wait=0; #endif if (!doing_pdma) - return floppy_interrupt(irq, dev_id, regs); + return floppy_interrupt(irq, dev_id); #ifdef TRACE_FLPY_INT if(!calls) @@ -106,7 +106,7 @@ static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) dma_wait=0; #endif doing_pdma = 0; - floppy_interrupt(irq, dev_id, regs); + floppy_interrupt(irq, dev_id); return IRQ_HANDLED; } #ifdef TRACE_FLPY_INT diff --git a/include/asm-i386/frame.i b/include/asm-i386/frame.i index 4d68ddc..0362025 100644 --- a/include/asm-i386/frame.i +++ b/include/asm-i386/frame.i @@ -1,4 +1,3 @@ -#include <linux/config.h> #include <asm/dwarf2.h> /* The annotation hides the frame from the unwinder and makes it look diff --git a/include/asm-i386/hpet.h b/include/asm-i386/hpet.h index af5d435..e47be9a 100644 --- a/include/asm-i386/hpet.h +++ b/include/asm-i386/hpet.h @@ -108,7 +108,7 @@ extern int hpet_set_alarm_time(unsigned char hrs, unsigned char min, unsigned ch extern int hpet_set_periodic_freq(unsigned long freq); extern int hpet_rtc_dropped_irq(void); extern int hpet_rtc_timer_init(void); -extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs); +extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id); #endif /* CONFIG_HPET_EMULATE_RTC */ #endif /* CONFIG_HPET_TIMER */ #endif /* _I386_HPET_H */ diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h index 87e5a35..0bedbdf 100644 --- a/include/asm-i386/hw_irq.h +++ b/include/asm-i386/hw_irq.h @@ -17,8 +17,6 @@ #include <asm/irq.h> #include <asm/sections.h> -struct hw_interrupt_type; - #define NMI_VECTOR 0x02 /* @@ -28,10 +26,6 @@ struct hw_interrupt_type; * Interrupt entry/exit code at both C and assembly level */ -extern u8 irq_vector[NR_IRQ_VECTORS]; -#define IO_APIC_VECTOR(irq) (irq_vector[irq]) -#define AUTO_ASSIGN -1 - extern void (*interrupt[NR_IRQS])(void); #ifdef CONFIG_SMP @@ -44,7 +38,7 @@ fastcall void call_function_interrupt(void); fastcall void apic_timer_interrupt(void); fastcall void error_interrupt(void); fastcall void spurious_interrupt(void); -fastcall void thermal_interrupt(struct pt_regs *); +fastcall void thermal_interrupt(void); #define platform_legacy_irq(irq) ((irq) < 16) #endif diff --git a/include/asm-i386/hypertransport.h b/include/asm-i386/hypertransport.h new file mode 100644 index 0000000..c16c6ff --- /dev/null +++ b/include/asm-i386/hypertransport.h @@ -0,0 +1,42 @@ +#ifndef ASM_HYPERTRANSPORT_H +#define ASM_HYPERTRANSPORT_H + +/* + * Constants for x86 Hypertransport Interrupts. + */ + +#define HT_IRQ_LOW_BASE 0xf8000000 + +#define HT_IRQ_LOW_VECTOR_SHIFT 16 +#define HT_IRQ_LOW_VECTOR_MASK 0x00ff0000 +#define HT_IRQ_LOW_VECTOR(v) (((v) << HT_IRQ_LOW_VECTOR_SHIFT) & HT_IRQ_LOW_VECTOR_MASK) + +#define HT_IRQ_LOW_DEST_ID_SHIFT 8 +#define HT_IRQ_LOW_DEST_ID_MASK 0x0000ff00 +#define HT_IRQ_LOW_DEST_ID(v) (((v) << HT_IRQ_LOW_DEST_ID_SHIFT) & HT_IRQ_LOW_DEST_ID_MASK) + +#define HT_IRQ_LOW_DM_PHYSICAL 0x0000000 +#define HT_IRQ_LOW_DM_LOGICAL 0x0000040 + +#define HT_IRQ_LOW_RQEOI_EDGE 0x0000000 +#define HT_IRQ_LOW_RQEOI_LEVEL 0x0000020 + + +#define HT_IRQ_LOW_MT_FIXED 0x0000000 +#define HT_IRQ_LOW_MT_ARBITRATED 0x0000004 +#define HT_IRQ_LOW_MT_SMI 0x0000008 +#define HT_IRQ_LOW_MT_NMI 0x000000c +#define HT_IRQ_LOW_MT_INIT 0x0000010 +#define HT_IRQ_LOW_MT_STARTUP 0x0000014 +#define HT_IRQ_LOW_MT_EXTINT 0x0000018 +#define HT_IRQ_LOW_MT_LINT1 0x000008c +#define HT_IRQ_LOW_MT_LINT0 0x0000098 + +#define HT_IRQ_LOW_IRQ_MASKED 0x0000001 + + +#define HT_IRQ_HIGH_DEST_ID_SHIFT 0 +#define HT_IRQ_HIGH_DEST_ID_MASK 0x00ffffff +#define HT_IRQ_HIGH_DEST_ID(v) ((((v) >> 8) << HT_IRQ_HIGH_DEST_ID_SHIFT) & HT_IRQ_HIGH_DEST_ID_MASK) + +#endif /* ASM_HYPERTRANSPORT_H */ diff --git a/include/asm-i386/io.h b/include/asm-i386/io.h index b3724fe..68df0dc3 100644 --- a/include/asm-i386/io.h +++ b/include/asm-i386/io.h @@ -224,33 +224,6 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(b),(c),(d)) -/** - * check_signature - find BIOS signatures - * @io_addr: mmio address to check - * @signature: signature block - * @length: length of signature - * - * Perform a signature comparison with the mmio address io_addr. This - * address should have been obtained by ioremap. - * Returns 1 on a match. - */ - -static inline int check_signature(volatile void __iomem * io_addr, - const unsigned char *signature, int length) -{ - int retval = 0; - do { - if (readb(io_addr) != *signature) - goto out; - io_addr++; - signature++; - length--; - } while (length); - retval = 1; -out: - return retval; -} - /* * Cache management * diff --git a/include/asm-i386/io_apic.h b/include/asm-i386/io_apic.h index 5d30927..276ea7e 100644 --- a/include/asm-i386/io_apic.h +++ b/include/asm-i386/io_apic.h @@ -12,46 +12,6 @@ #ifdef CONFIG_X86_IO_APIC -#ifdef CONFIG_PCI_MSI -static inline int use_pci_vector(void) {return 1;} -static inline void disable_edge_ioapic_vector(unsigned int vector) { } -static inline void mask_and_ack_level_ioapic_vector(unsigned int vector) { } -static inline void end_edge_ioapic_vector (unsigned int vector) { } -#define startup_level_ioapic startup_level_ioapic_vector -#define shutdown_level_ioapic mask_IO_APIC_vector -#define enable_level_ioapic unmask_IO_APIC_vector -#define disable_level_ioapic mask_IO_APIC_vector -#define mask_and_ack_level_ioapic mask_and_ack_level_ioapic_vector -#define end_level_ioapic end_level_ioapic_vector -#define set_ioapic_affinity set_ioapic_affinity_vector - -#define startup_edge_ioapic startup_edge_ioapic_vector -#define shutdown_edge_ioapic disable_edge_ioapic_vector -#define enable_edge_ioapic unmask_IO_APIC_vector -#define disable_edge_ioapic disable_edge_ioapic_vector -#define ack_edge_ioapic ack_edge_ioapic_vector -#define end_edge_ioapic end_edge_ioapic_vector -#else -static inline int use_pci_vector(void) {return 0;} -static inline void disable_edge_ioapic_irq(unsigned int irq) { } -static inline void mask_and_ack_level_ioapic_irq(unsigned int irq) { } -static inline void end_edge_ioapic_irq (unsigned int irq) { } -#define startup_level_ioapic startup_level_ioapic_irq -#define shutdown_level_ioapic mask_IO_APIC_irq -#define enable_level_ioapic unmask_IO_APIC_irq -#define disable_level_ioapic mask_IO_APIC_irq -#define mask_and_ack_level_ioapic mask_and_ack_level_ioapic_irq -#define end_level_ioapic end_level_ioapic_irq -#define set_ioapic_affinity set_ioapic_affinity_irq - -#define startup_edge_ioapic startup_edge_ioapic_irq -#define shutdown_edge_ioapic disable_edge_ioapic_irq -#define enable_edge_ioapic unmask_IO_APIC_irq -#define disable_edge_ioapic disable_edge_ioapic_irq -#define ack_edge_ioapic ack_edge_ioapic_irq -#define end_edge_ioapic end_edge_ioapic_irq -#endif - #define IO_APIC_BASE(idx) \ ((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + idx) \ + (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK))) @@ -219,6 +179,4 @@ extern int (*ioapic_renumber_irq)(int ioapic, int irq); static inline void disable_ioapic_setup(void) { } #endif -extern int assign_irq_vector(int irq); - #endif diff --git a/include/asm-i386/irq_regs.h b/include/asm-i386/irq_regs.h new file mode 100644 index 0000000..3dd9c0b --- /dev/null +++ b/include/asm-i386/irq_regs.h @@ -0,0 +1 @@ +#include <asm-generic/irq_regs.h> diff --git a/include/asm-i386/mach-default/do_timer.h b/include/asm-i386/mach-default/do_timer.h index 4182c34..7d606e3 100644 --- a/include/asm-i386/mach-default/do_timer.h +++ b/include/asm-i386/mach-default/do_timer.h @@ -14,11 +14,11 @@ * timer interrupt as a means of triggering reschedules etc. **/ -static inline void do_timer_interrupt_hook(struct pt_regs *regs) +static inline void do_timer_interrupt_hook(void) { do_timer(1); #ifndef CONFIG_SMP - update_process_times(user_mode_vm(regs)); + update_process_times(user_mode_vm(get_irq_regs())); #endif /* * In the SMP case we use the local APIC timer interrupt to do the @@ -26,10 +26,10 @@ static inline void do_timer_interrupt_hook(struct pt_regs *regs) * system, in that case we have to call the local interrupt handler. */ #ifndef CONFIG_X86_LOCAL_APIC - profile_tick(CPU_PROFILING, regs); + profile_tick(CPU_PROFILING); #else if (!using_apic_timer) - smp_local_timer_interrupt(regs); + smp_local_timer_interrupt(); #endif } diff --git a/include/asm-i386/mach-default/irq_vectors_limits.h b/include/asm-i386/mach-default/irq_vectors_limits.h index b330026..7f161e7 100644 --- a/include/asm-i386/mach-default/irq_vectors_limits.h +++ b/include/asm-i386/mach-default/irq_vectors_limits.h @@ -1,10 +1,6 @@ #ifndef _ASM_IRQ_VECTORS_LIMITS_H #define _ASM_IRQ_VECTORS_LIMITS_H -#ifdef CONFIG_PCI_MSI -#define NR_IRQS FIRST_SYSTEM_VECTOR -#define NR_IRQ_VECTORS NR_IRQS -#else #ifdef CONFIG_X86_IO_APIC #define NR_IRQS 224 # if (224 >= 32 * NR_CPUS) @@ -16,6 +12,5 @@ #define NR_IRQS 16 #define NR_IRQ_VECTORS NR_IRQS #endif -#endif #endif /* _ASM_IRQ_VECTORS_LIMITS_H */ diff --git a/include/asm-i386/mach-visws/do_timer.h b/include/asm-i386/mach-visws/do_timer.h index 8db618c..21cd696 100644 --- a/include/asm-i386/mach-visws/do_timer.h +++ b/include/asm-i386/mach-visws/do_timer.h @@ -4,14 +4,14 @@ #include <asm/i8259.h> #include "cobalt.h" -static inline void do_timer_interrupt_hook(struct pt_regs *regs) +static inline void do_timer_interrupt_hook(void) { /* Clear the interrupt */ co_cpu_write(CO_CPU_STAT,co_cpu_read(CO_CPU_STAT) & ~CO_STAT_TIMEINTR); do_timer(1); #ifndef CONFIG_SMP - update_process_times(user_mode_vm(regs)); + update_process_times(user_mode_vm(irq_regs)); #endif /* * In the SMP case we use the local APIC timer interrupt to do the @@ -19,10 +19,10 @@ static inline void do_timer_interrupt_hook(struct pt_regs *regs) * system, in that case we have to call the local interrupt handler. */ #ifndef CONFIG_X86_LOCAL_APIC - profile_tick(CPU_PROFILING, regs); + profile_tick(CPU_PROFILING); #else if (!using_apic_timer) - smp_local_timer_interrupt(regs); + smp_local_timer_interrupt(); #endif } diff --git a/include/asm-i386/mach-voyager/do_timer.h b/include/asm-i386/mach-voyager/do_timer.h index 099fe9f..04e69c1 100644 --- a/include/asm-i386/mach-voyager/do_timer.h +++ b/include/asm-i386/mach-voyager/do_timer.h @@ -1,14 +1,14 @@ /* defines for inline arch setup functions */ #include <asm/voyager.h> -static inline void do_timer_interrupt_hook(struct pt_regs *regs) +static inline void do_timer_interrupt_hook(void) { do_timer(1); #ifndef CONFIG_SMP - update_process_times(user_mode_vm(regs)); + update_process_times(user_mode_vm(irq_regs)); #endif - voyager_timer_interrupt(regs); + voyager_timer_interrupt(); } static inline int do_timer_overflow(int count) diff --git a/include/asm-i386/msi.h b/include/asm-i386/msi.h deleted file mode 100644 index b11c4b7..0000000 --- a/include/asm-i386/msi.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2003-2004 Intel - * Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com) - */ - -#ifndef ASM_MSI_H -#define ASM_MSI_H - -#include <asm/desc.h> -#include <mach_apic.h> - -#define LAST_DEVICE_VECTOR (FIRST_SYSTEM_VECTOR - 1) -#define MSI_TARGET_CPU_SHIFT 12 - -extern struct msi_ops msi_apic_ops; - -static inline int msi_arch_init(void) -{ - msi_register(&msi_apic_ops); - return 0; -} - -#endif /* ASM_MSI_H */ diff --git a/include/asm-i386/msidef.h b/include/asm-i386/msidef.h new file mode 100644 index 0000000..5b8acdd --- /dev/null +++ b/include/asm-i386/msidef.h @@ -0,0 +1,47 @@ +#ifndef ASM_MSIDEF_H +#define ASM_MSIDEF_H + +/* + * Constants for Intel APIC based MSI messages. + */ + +/* + * Shifts for MSI data + */ + +#define MSI_DATA_VECTOR_SHIFT 0 +#define MSI_DATA_VECTOR_MASK 0x000000ff +#define MSI_DATA_VECTOR(v) (((v) << MSI_DATA_VECTOR_SHIFT) & MSI_DATA_VECTOR_MASK) + +#define MSI_DATA_DELIVERY_MODE_SHIFT 8 +#define MSI_DATA_DELIVERY_FIXED (0 << MSI_DATA_DELIVERY_MODE_SHIFT) +#define MSI_DATA_DELIVERY_LOWPRI (1 << MSI_DATA_DELIVERY_MODE_SHIFT) + +#define MSI_DATA_LEVEL_SHIFT 14 +#define MSI_DATA_LEVEL_DEASSERT (0 << MSI_DATA_LEVEL_SHIFT) +#define MSI_DATA_LEVEL_ASSERT (1 << MSI_DATA_LEVEL_SHIFT) + +#define MSI_DATA_TRIGGER_SHIFT 15 +#define MSI_DATA_TRIGGER_EDGE (0 << MSI_DATA_TRIGGER_SHIFT) +#define MSI_DATA_TRIGGER_LEVEL (1 << MSI_DATA_TRIGGER_SHIFT) + +/* + * Shift/mask fields for msi address + */ + +#define MSI_ADDR_BASE_HI 0 +#define MSI_ADDR_BASE_LO 0xfee00000 + +#define MSI_ADDR_DEST_MODE_SHIFT 2 +#define MSI_ADDR_DEST_MODE_PHYSICAL (0 << MSI_ADDR_DEST_MODE_SHIFT) +#define MSI_ADDR_DEST_MODE_LOGICAL (1 << MSI_ADDR_DEST_MODE_SHIFT) + +#define MSI_ADDR_REDIRECTION_SHIFT 3 +#define MSI_ADDR_REDIRECTION_CPU (0 << MSI_ADDR_REDIRECTION_SHIFT) /* dedicated cpu */ +#define MSI_ADDR_REDIRECTION_LOWPRI (1 << MSI_ADDR_REDIRECTION_SHIFT) /* lowest priority */ + +#define MSI_ADDR_DEST_ID_SHIFT 12 +#define MSI_ADDR_DEST_ID_MASK 0x00ffff0 +#define MSI_ADDR_DEST_ID(dest) (((dest) << MSI_ADDR_DEST_ID_SHIFT) & MSI_ADDR_DEST_ID_MASK) + +#endif /* ASM_MSIDEF_H */ diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index 2277127..e0ddca9 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h @@ -306,6 +306,8 @@ static inline void __mwait(unsigned long eax, unsigned long ecx) : :"a" (eax), "c" (ecx)); } +extern void mwait_idle_with_hints(unsigned long eax, unsigned long ecx); + /* from system description table in BIOS. Mostly for MCA use, but others may find it useful. */ extern unsigned int machine_id; diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h index 6aa1206..bd59c15 100644 --- a/include/asm-i386/smp.h +++ b/include/asm-i386/smp.h @@ -46,8 +46,6 @@ extern u8 x86_cpu_to_apicid[]; #define cpu_physical_id(cpu) x86_cpu_to_apicid[cpu] -extern u8 apicid_2_node[]; - #ifdef CONFIG_HOTPLUG_CPU extern void cpu_exit_clear(void); extern void cpu_uninit(void); @@ -101,6 +99,9 @@ extern unsigned int num_processors; #endif #ifndef __ASSEMBLY__ + +extern u8 apicid_2_node[]; + #ifdef CONFIG_X86_LOCAL_APIC static __inline int logical_smp_processor_id(void) { diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h index 54d905e..eef5133 100644 --- a/include/asm-i386/uaccess.h +++ b/include/asm-i386/uaccess.h @@ -404,20 +404,6 @@ unsigned long __must_check __copy_from_user_ll_nocache_nozero(void *to, * anything, so this is accurate. */ -/** - * __copy_to_user: - Copy a block of data into user space, with less checking. - * @to: Destination address, in user space. - * @from: Source address, in kernel space. - * @n: Number of bytes to copy. - * - * Context: User context only. This function may sleep. - * - * Copy data from kernel space to user space. Caller must check - * the specified block with access_ok() before calling this function. - * - * Returns number of bytes that could not be copied. - * On success, this will be zero. - */ static __always_inline unsigned long __must_check __copy_to_user_inatomic(void __user *to, const void *from, unsigned long n) { @@ -439,35 +425,27 @@ __copy_to_user_inatomic(void __user *to, const void *from, unsigned long n) return __copy_to_user_ll(to, from, n); } -static __always_inline unsigned long __must_check -__copy_to_user(void __user *to, const void *from, unsigned long n) -{ - might_sleep(); - return __copy_to_user_inatomic(to, from, n); -} - /** - * __copy_from_user: - Copy a block of data from user space, with less checking. - * @to: Destination address, in kernel space. - * @from: Source address, in user space. + * __copy_to_user: - Copy a block of data into user space, with less checking. + * @to: Destination address, in user space. + * @from: Source address, in kernel space. * @n: Number of bytes to copy. * * Context: User context only. This function may sleep. * - * Copy data from user space to kernel space. Caller must check + * Copy data from kernel space to user space. Caller must check * the specified block with access_ok() before calling this function. * * Returns number of bytes that could not be copied. * On success, this will be zero. - * - * If some data could not be copied, this function will pad the copied - * data to the requested size using zero bytes. - * - * An alternate version - __copy_from_user_inatomic() - may be called from - * atomic context and will fail rather than sleep. In this case the - * uncopied bytes will *NOT* be padded with zeros. See fs/filemap.h - * for explanation of why this is needed. */ +static __always_inline unsigned long __must_check +__copy_to_user(void __user *to, const void *from, unsigned long n) +{ + might_sleep(); + return __copy_to_user_inatomic(to, from, n); +} + static __always_inline unsigned long __copy_from_user_inatomic(void *to, const void __user *from, unsigned long n) { @@ -493,6 +471,29 @@ __copy_from_user_inatomic(void *to, const void __user *from, unsigned long n) } return __copy_from_user_ll_nozero(to, from, n); } + +/** + * __copy_from_user: - Copy a block of data from user space, with less checking. + * @to: Destination address, in kernel space. + * @from: Source address, in user space. + * @n: Number of bytes to copy. + * + * Context: User context only. This function may sleep. + * + * Copy data from user space to kernel space. Caller must check + * the specified block with access_ok() before calling this function. + * + * Returns number of bytes that could not be copied. + * On success, this will be zero. + * + * If some data could not be copied, this function will pad the copied + * data to the requested size using zero bytes. + * + * An alternate version - __copy_from_user_inatomic() - may be called from + * atomic context and will fail rather than sleep. In this case the + * uncopied bytes will *NOT* be padded with zeros. See fs/filemap.h + * for explanation of why this is needed. + */ static __always_inline unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n) { diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index 3ca7ab9..beeeaf6 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h @@ -324,10 +324,11 @@ #define __NR_vmsplice 316 #define __NR_move_pages 317 #define __NR_getcpu 318 +#define __NR_epoll_pwait 319 #ifdef __KERNEL__ -#define NR_syscalls 319 +#define NR_syscalls 320 #include <linux/err.h> /* diff --git a/include/asm-i386/vic.h b/include/asm-i386/vic.h index 4abfcfb..53100f3 100644 --- a/include/asm-i386/vic.h +++ b/include/asm-i386/vic.h @@ -58,4 +58,4 @@ static const int VIC_CPI_Registers[] = #define VIC_BOOT_INTERRUPT_MASK 0xfe -extern void smp_vic_timer_interrupt(struct pt_regs *regs); +extern void smp_vic_timer_interrupt(void); diff --git a/include/asm-i386/voyager.h b/include/asm-i386/voyager.h index aaf432d..5b27838 100644 --- a/include/asm-i386/voyager.h +++ b/include/asm-i386/voyager.h @@ -118,33 +118,33 @@ typedef struct voyager_module { } voyager_module_t; typedef struct voyager_eeprom_hdr { - __u8 module_id[4] __attribute__((packed)); - __u8 version_id __attribute__((packed)); - __u8 config_id __attribute__((packed)); - __u16 boundry_id __attribute__((packed)); /* boundary scan id */ - __u16 ee_size __attribute__((packed)); /* size of EEPROM */ - __u8 assembly[11] __attribute__((packed)); /* assembly # */ - __u8 assembly_rev __attribute__((packed)); /* assembly rev */ - __u8 tracer[4] __attribute__((packed)); /* tracer number */ - __u16 assembly_cksum __attribute__((packed)); /* asm checksum */ - __u16 power_consump __attribute__((packed)); /* pwr requirements */ - __u16 num_asics __attribute__((packed)); /* number of asics */ - __u16 bist_time __attribute__((packed)); /* min. bist time */ - __u16 err_log_offset __attribute__((packed)); /* error log offset */ - __u16 scan_path_offset __attribute__((packed));/* scan path offset */ - __u16 cct_offset __attribute__((packed)); - __u16 log_length __attribute__((packed)); /* length of err log */ - __u16 xsum_end __attribute__((packed)); /* offset to end of + __u8 module_id[4]; + __u8 version_id; + __u8 config_id; + __u16 boundry_id; /* boundary scan id */ + __u16 ee_size; /* size of EEPROM */ + __u8 assembly[11]; /* assembly # */ + __u8 assembly_rev; /* assembly rev */ + __u8 tracer[4]; /* tracer number */ + __u16 assembly_cksum; /* asm checksum */ + __u16 power_consump; /* pwr requirements */ + __u16 num_asics; /* number of asics */ + __u16 bist_time; /* min. bist time */ + __u16 err_log_offset; /* error log offset */ + __u16 scan_path_offset;/* scan path offset */ + __u16 cct_offset; + __u16 log_length; /* length of err log */ + __u16 xsum_end; /* offset to end of checksum */ - __u8 reserved[4] __attribute__((packed)); - __u8 sflag __attribute__((packed)); /* starting sentinal */ - __u8 part_number[13] __attribute__((packed)); /* prom part number */ - __u8 version[10] __attribute__((packed)); /* version number */ - __u8 signature[8] __attribute__((packed)); - __u16 eeprom_chksum __attribute__((packed)); - __u32 data_stamp_offset __attribute__((packed)); - __u8 eflag __attribute__((packed)); /* ending sentinal */ -} voyager_eprom_hdr_t; + __u8 reserved[4]; + __u8 sflag; /* starting sentinal */ + __u8 part_number[13]; /* prom part number */ + __u8 version[10]; /* version number */ + __u8 signature[8]; + __u16 eeprom_chksum; + __u32 data_stamp_offset; + __u8 eflag ; /* ending sentinal */ +} __attribute__((packed)) voyager_eprom_hdr_t; @@ -155,30 +155,30 @@ typedef struct voyager_eeprom_hdr { * in the module EPROMs. We really only care about the IDs and * offsets */ typedef struct voyager_sp_table { - __u8 asic_id __attribute__((packed)); - __u8 bypass_flag __attribute__((packed)); - __u16 asic_data_offset __attribute__((packed)); - __u16 config_data_offset __attribute__((packed)); -} voyager_sp_table_t; + __u8 asic_id; + __u8 bypass_flag; + __u16 asic_data_offset; + __u16 config_data_offset; +} __attribute__((packed)) voyager_sp_table_t; typedef struct voyager_jtag_table { - __u8 icode[4] __attribute__((packed)); - __u8 runbist[4] __attribute__((packed)); - __u8 intest[4] __attribute__((packed)); - __u8 samp_preld[4] __attribute__((packed)); - __u8 ireg_len __attribute__((packed)); -} voyager_jtt_t; + __u8 icode[4]; + __u8 runbist[4]; + __u8 intest[4]; + __u8 samp_preld[4]; + __u8 ireg_len; +} __attribute__((packed)) voyager_jtt_t; typedef struct voyager_asic_data_table { - __u8 jtag_id[4] __attribute__((packed)); - __u16 length_bsr __attribute__((packed)); - __u16 length_bist_reg __attribute__((packed)); - __u32 bist_clk __attribute__((packed)); - __u16 subaddr_bits __attribute__((packed)); - __u16 seed_bits __attribute__((packed)); - __u16 sig_bits __attribute__((packed)); - __u16 jtag_offset __attribute__((packed)); -} voyager_at_t; + __u8 jtag_id[4]; + __u16 length_bsr; + __u16 length_bist_reg; + __u32 bist_clk; + __u16 subaddr_bits; + __u16 seed_bits; + __u16 sig_bits; + __u16 jtag_offset; +} __attribute__((packed)) voyager_at_t; /* Voyager Interrupt Controller (VIC) registers */ @@ -328,52 +328,52 @@ struct voyager_bios_info { #define NUMBER_OF_POS_REGS 8 typedef struct { - __u8 MC_Slot __attribute__((packed)); - __u8 POS_Values[NUMBER_OF_POS_REGS] __attribute__((packed)); -} MC_SlotInformation_t; + __u8 MC_Slot; + __u8 POS_Values[NUMBER_OF_POS_REGS]; +} __attribute__((packed)) MC_SlotInformation_t; struct QuadDescription { - __u8 Type __attribute__((packed)); /* for type 0 (DYADIC or MONADIC) all fields + __u8 Type; /* for type 0 (DYADIC or MONADIC) all fields * will be zero except for slot */ - __u8 StructureVersion __attribute__((packed)); - __u32 CPI_BaseAddress __attribute__((packed)); - __u32 LARC_BankSize __attribute__((packed)); - __u32 LocalMemoryStateBits __attribute__((packed)); - __u8 Slot __attribute__((packed)); /* Processor slots 1 - 4 */ -}; + __u8 StructureVersion; + __u32 CPI_BaseAddress; + __u32 LARC_BankSize; + __u32 LocalMemoryStateBits; + __u8 Slot; /* Processor slots 1 - 4 */ +} __attribute__((packed)); struct ProcBoardInfo { - __u8 Type __attribute__((packed)); - __u8 StructureVersion __attribute__((packed)); - __u8 NumberOfBoards __attribute__((packed)); - struct QuadDescription QuadData[MAX_PROCESSOR_BOARDS] __attribute__((packed)); -}; + __u8 Type; + __u8 StructureVersion; + __u8 NumberOfBoards; + struct QuadDescription QuadData[MAX_PROCESSOR_BOARDS]; +} __attribute__((packed)); struct CacheDescription { - __u8 Level __attribute__((packed)); - __u32 TotalSize __attribute__((packed)); - __u16 LineSize __attribute__((packed)); - __u8 Associativity __attribute__((packed)); - __u8 CacheType __attribute__((packed)); - __u8 WriteType __attribute__((packed)); - __u8 Number_CPUs_SharedBy __attribute__((packed)); - __u8 Shared_CPUs_Hardware_IDs[MAX_SHARED_CPUS] __attribute__((packed)); + __u8 Level; + __u32 TotalSize; + __u16 LineSize; + __u8 Associativity; + __u8 CacheType; + __u8 WriteType; + __u8 Number_CPUs_SharedBy; + __u8 Shared_CPUs_Hardware_IDs[MAX_SHARED_CPUS]; -}; +} __attribute__((packed)); struct CPU_Description { - __u8 CPU_HardwareId __attribute__((packed)); - char *FRU_String __attribute__((packed)); - __u8 NumberOfCacheLevels __attribute__((packed)); - struct CacheDescription CacheLevelData[MAX_CACHE_LEVELS] __attribute__((packed)); -}; + __u8 CPU_HardwareId; + char *FRU_String; + __u8 NumberOfCacheLevels; + struct CacheDescription CacheLevelData[MAX_CACHE_LEVELS]; +} __attribute__((packed)); struct CPU_Info { - __u8 Type __attribute__((packed)); - __u8 StructureVersion __attribute__((packed)); - __u8 NumberOf_CPUs __attribute__((packed)); - struct CPU_Description CPU_Data[MAX_CPUS] __attribute__((packed)); -}; + __u8 Type; + __u8 StructureVersion; + __u8 NumberOf_CPUs; + struct CPU_Description CPU_Data[MAX_CPUS]; +} __attribute__((packed)); /* @@ -505,8 +505,8 @@ extern int voyager_memory_detect(int region, __u32 *addr, __u32 *length); extern void voyager_smp_intr_init(void); extern __u8 voyager_extended_cmos_read(__u16 cmos_address); extern void voyager_smp_dump(void); -extern void voyager_timer_interrupt(struct pt_regs *regs); -extern void smp_local_timer_interrupt(struct pt_regs * regs); +extern void voyager_timer_interrupt(void); +extern void smp_local_timer_interrupt(void); extern void voyager_power_off(void); extern void smp_voyager_power_off(void *dummy); extern void voyager_restart(void); |