Commit f557d482 authored by David Mosberger's avatar David Mosberger

ia64: Initial sync with 2.5.32.

parent 6f612626
......@@ -213,7 +213,7 @@ simeth_probe1(void)
memcpy(dev->dev_addr, mac_addr, sizeof(mac_addr));
dev->irq = ia64_alloc_irq();
dev->irq = ia64_alloc_vector();
/*
* attach the interrupt in the simulator, this does enable interrupts
......
......@@ -1076,7 +1076,7 @@ simrs_init (void)
if (state->type == PORT_UNKNOWN) continue;
if (!state->irq) {
state->irq = ia64_alloc_irq();
state->irq = ia64_alloc_vector();
ia64_ssc_connect_irq(KEYBOARD_INTR, state->irq);
}
......
......@@ -46,6 +46,7 @@
#include <linux/nfsd/syscall.h>
#include <linux/poll.h>
#include <linux/personality.h>
#include <linux/ptrace.h>
#include <linux/stat.h>
#include <linux/ipc.h>
......
......@@ -58,7 +58,7 @@ EXPORT_SYMBOL(clear_page);
#include <asm/processor.h>
# ifndef CONFIG_NUMA
EXPORT_SYMBOL(cpu_info);
EXPORT_SYMBOL(cpu_info__per_cpu);
# endif
EXPORT_SYMBOL(kernel_thread);
......
......@@ -58,9 +58,8 @@ extern char _end;
unsigned long __per_cpu_offset[NR_CPUS];
#endif
DECLARE_PER_CPU(struct cpuinfo_ia64, cpu_info);
unsigned long ia64_phys_stacked_size_p8;
DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info);
DEFINE_PER_CPU(unsigned long, ia64_phys_stacked_size_p8);
unsigned long ia64_cycles_per_usec;
struct ia64_boot_param *ia64_boot_param;
struct screen_info screen_info;
......@@ -564,11 +563,11 @@ cpu_init (void)
my_cpu_data = (void *) get_free_page(GFP_KERNEL);
memcpy(my_cpu_data, __phys_per_cpu_start, __per_cpu_end - __per_cpu_start);
__per_cpu_offset[cpu] = (char *) my_cpu_data - __per_cpu_start;
my_cpu_info = my_cpu_data + ((char *) &cpu_info - __per_cpu_start);
my_cpu_info = my_cpu_data + ((char *) &__get_cpu_var(cpu_info) - __per_cpu_start);
#else
my_cpu_data = __phys_per_cpu_start;
#endif
my_cpu_info = my_cpu_data + ((char *) &cpu_info - __per_cpu_start);
my_cpu_info = my_cpu_data + ((char *) &__get_cpu_var(cpu_info) - __per_cpu_start);
/*
* We can't pass "local_cpu_data" to identify_cpu() because we haven't called
......@@ -652,6 +651,6 @@ cpu_init (void)
num_phys_stacked = 96;
}
/* size of physical stacked register partition plus 8 bytes: */
ia64_phys_stacked_size_p8 = num_phys_stacked*8 + 8;
__get_cpu_var(ia64_phys_stacked_size_p8) = num_phys_stacked*8 + 8;
platform_cpu_init();
}
......@@ -72,7 +72,7 @@ static volatile struct call_data_struct *call_data;
#define IPI_CPU_STOP 1
/* This needs to be cacheline aligned because it is written to by *other* CPUs. */
static DECLARE_PER_CPU(__u64, ipi_operation) ____cacheline_aligned;
static DEFINE_PER_CPU(__u64, ipi_operation) ____cacheline_aligned;
static void
stop_this_cpu (void)
......
......@@ -41,7 +41,7 @@ struct ia64_ctx ia64_ctx = {
.max_ctx = ~0U
};
u8 ia64_need_tlb_flush __per_cpu_data;
DEFINE_PER_CPU(u8, ia64_need_tlb_flush);
/*
* Acquire the ia64_ctx.lock before calling this function!
......
......@@ -9,8 +9,8 @@
* "int" types were carefully placed so as to ensure proper operation
* of the macros.
*
* Copyright (C) 1998, 1999 Hewlett-Packard Co
* Copyright (C) 1998, 1999 David Mosberger-Tang <davidm@hpl.hp.com>
* Copyright (C) 1998, 1999, 2002 Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com>
*/
#include <linux/types.h>
......
......@@ -92,12 +92,12 @@
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \
do { \
preempt_count() -= IRQ_EXIT_OFFSET; \
if (!in_interrupt() && softirq_pending(smp_processor_id())) \
do_softirq(); \
preempt_enable_no_resched(); \
#define irq_exit() \
do { \
preempt_count() -= IRQ_EXIT_OFFSET; \
if (!in_interrupt() && local_softirq_pending()) \
do_softirq(); \
preempt_enable_no_resched(); \
} while (0)
#ifdef CONFIG_SMP
......
......@@ -90,6 +90,20 @@ ide_init_default_hwifs (void)
#endif
}
#define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id))
#define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id))
#define ide_check_region(from,extent) check_region((from), (extent))
#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
#define ide_release_region(from,extent) release_region((from), (extent))
/*
* The following are not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1)
#define ide_fix_driveid(id) do {} while (0)
#define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0)
#endif /* __KERNEL__ */
#endif /* __ASM_IA64_IDE_H */
......@@ -36,7 +36,7 @@ struct ia64_ctx {
};
extern struct ia64_ctx ia64_ctx;
extern u8 ia64_need_tlb_flush __per_cpu_data;
DECLARE_PER_CPU(u8, ia64_need_tlb_flush);
extern void wrap_mmu_context (struct mm_struct *mm);
......@@ -56,9 +56,9 @@ delayed_tlb_flush (void)
{
extern void __flush_tlb_all (void);
if (unlikely(ia64_need_tlb_flush)) {
if (unlikely(__get_cpu_var(ia64_need_tlb_flush))) {
__flush_tlb_all();
ia64_need_tlb_flush = 0;
__get_cpu_var(ia64_need_tlb_flush) = 0;
}
}
......
#ifndef _ASM_IA64_PERCPU_H
#define _ASM_IA64_PERCPU_H
#include <linux/config.h>
#include <linux/compiler.h>
/*
* Copyright (C) 2002 Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com>
......@@ -8,7 +11,7 @@
#ifdef __ASSEMBLY__
#define THIS_CPU(var) (var##__per_cpu) /* use this to mark accesses to per-CPU variables... */
#define THIS_CPU(var) (var##__per_cpu) /* use this to mark accesses to per-CPU variables... */
#else /* !__ASSEMBLY__ */
......@@ -22,8 +25,12 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
#endif
#define DECLARE_PER_CPU(type, name) extern __typeof__(type) name##__per_cpu
#define per_cpu(var, cpu) (*RELOC_HIDE(&var##__per_cpu, __per_cpu_offset[cpu]))
#define __get_cpu_var(var) (var##__per_cpu)
#ifdef CONFIG_SMP
# define per_cpu(var, cpu) (*RELOC_HIDE(&var##__per_cpu, __per_cpu_offset[cpu]))
#else
# define per_cpu(var, cpu) __get_cpu_var(var)
#endif
#endif /* !__ASSEMBLY__ */
......
......@@ -15,9 +15,6 @@
#include <linux/config.h>
#include <linux/percpu.h>
#include <linux/compiler.h>
#include <asm/ptrace.h>
#include <asm/kregs.h>
#include <asm/system.h>
......@@ -81,8 +78,10 @@
#ifndef __ASSEMBLY__
#include <linux/threads.h>
#include <linux/cache.h>
#include <linux/compiler.h>
#include <linux/percpu.h>
#include <linux/threads.h>
#include <asm/fpu.h>
#include <asm/offsets.h>
......
......@@ -368,8 +368,8 @@ extern void ia64_save_extra (struct task_struct *task);
extern void ia64_load_extra (struct task_struct *task);
#if defined(CONFIG_SMP) && defined(CONFIG_PERFMON)
extern int __per_cpu_data pfm_syst_wide;
# define PERFMON_IS_SYSWIDE() (this_cpu(pfm_syst_wide) != 0)
DECLARE_PER_CPU(int, pfm_syst_wide);
# define PERFMON_IS_SYSWIDE() (get_cpu_var(pfm_syst_wide) != 0)
#else
# define PERFMON_IS_SYSWIDE() (0)
#endif
......
......@@ -227,6 +227,11 @@
#define __NR_free_large_pages 1235
#define __NR_share_large_pages 1236
#define __NR_unshare_large_pages 1237
#define __NR_io_setup 1238
#define __NR_io_destroy 1239
#define __NR_io_getevents 1240
#define __NR_io_submit 1241
#define __NR_io_cancel 1242
#if !defined(__ASSEMBLY__) && !defined(ASSEMBLER)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment