Commit 3bee9df0 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Count resched interrupts
  [IA64] remove unused acpi_kbd_controller_present, acpi_legacy_devices
  [IA64] update sn2_defconfig
  [IA64] reformat pal.S to fit in 80 columns, fix typos
  [IA64] remove unused PAL_CALL_IC_OFF
  [IA64] - Allow IPIs in timer loop
  [IA64] move ioremap/ioremap_nocache under __KERNEL__
  [IA64] perfmon fix for global IRQ fix
parents 73ed9a86 9b3377f9
This diff is collapsed.
...@@ -64,9 +64,6 @@ EXPORT_SYMBOL(pm_idle); ...@@ -64,9 +64,6 @@ EXPORT_SYMBOL(pm_idle);
void (*pm_power_off) (void); void (*pm_power_off) (void);
EXPORT_SYMBOL(pm_power_off); EXPORT_SYMBOL(pm_power_off);
unsigned char acpi_kbd_controller_present = 1;
unsigned char acpi_legacy_devices;
unsigned int acpi_cpei_override; unsigned int acpi_cpei_override;
unsigned int acpi_cpei_phys_cpuid; unsigned int acpi_cpei_phys_cpuid;
...@@ -628,12 +625,6 @@ static int __init acpi_parse_fadt(unsigned long phys_addr, unsigned long size) ...@@ -628,12 +625,6 @@ static int __init acpi_parse_fadt(unsigned long phys_addr, unsigned long size)
fadt = (struct fadt_descriptor *)fadt_header; fadt = (struct fadt_descriptor *)fadt_header;
if (!(fadt->iapc_boot_arch & BAF_8042_KEYBOARD_CONTROLLER))
acpi_kbd_controller_present = 0;
if (fadt->iapc_boot_arch & BAF_LEGACY_DEVICES)
acpi_legacy_devices = 1;
acpi_register_gsi(fadt->sci_int, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW); acpi_register_gsi(fadt->sci_int, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW);
return 0; return 0;
} }
......
...@@ -180,7 +180,9 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs) ...@@ -180,7 +180,9 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs)
saved_tpr = ia64_getreg(_IA64_REG_CR_TPR); saved_tpr = ia64_getreg(_IA64_REG_CR_TPR);
ia64_srlz_d(); ia64_srlz_d();
while (vector != IA64_SPURIOUS_INT_VECTOR) { while (vector != IA64_SPURIOUS_INT_VECTOR) {
if (!IS_RESCHEDULE(vector)) { if (unlikely(IS_RESCHEDULE(vector)))
kstat_this_cpu.irqs[vector]++;
else {
ia64_setreg(_IA64_REG_CR_TPR, vector); ia64_setreg(_IA64_REG_CR_TPR, vector);
ia64_srlz_d(); ia64_srlz_d();
...@@ -225,7 +227,9 @@ void ia64_process_pending_intr(void) ...@@ -225,7 +227,9 @@ void ia64_process_pending_intr(void)
* Perform normal interrupt style processing * Perform normal interrupt style processing
*/ */
while (vector != IA64_SPURIOUS_INT_VECTOR) { while (vector != IA64_SPURIOUS_INT_VECTOR) {
if (!IS_RESCHEDULE(vector)) { if (unlikely(IS_RESCHEDULE(vector)))
kstat_this_cpu.irqs[vector]++;
else {
struct pt_regs *old_regs = set_irq_regs(NULL); struct pt_regs *old_regs = set_irq_regs(NULL);
ia64_setreg(_IA64_REG_CR_TPR, vector); ia64_setreg(_IA64_REG_CR_TPR, vector);
...@@ -258,11 +262,22 @@ void ia64_process_pending_intr(void) ...@@ -258,11 +262,22 @@ void ia64_process_pending_intr(void)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
extern irqreturn_t handle_IPI (int irq, void *dev_id); extern irqreturn_t handle_IPI (int irq, void *dev_id);
static irqreturn_t dummy_handler (int irq, void *dev_id)
{
BUG();
}
static struct irqaction ipi_irqaction = { static struct irqaction ipi_irqaction = {
.handler = handle_IPI, .handler = handle_IPI,
.flags = IRQF_DISABLED, .flags = IRQF_DISABLED,
.name = "IPI" .name = "IPI"
}; };
static struct irqaction resched_irqaction = {
.handler = dummy_handler,
.flags = SA_INTERRUPT,
.name = "resched"
};
#endif #endif
void void
...@@ -287,6 +302,7 @@ init_IRQ (void) ...@@ -287,6 +302,7 @@ init_IRQ (void)
register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL); register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
register_percpu_irq(IA64_IPI_VECTOR, &ipi_irqaction); register_percpu_irq(IA64_IPI_VECTOR, &ipi_irqaction);
register_percpu_irq(IA64_IPI_RESCHEDULE, &resched_irqaction);
#endif #endif
#ifdef CONFIG_PERFMON #ifdef CONFIG_PERFMON
pfm_init_percpu(); pfm_init_percpu();
......
...@@ -21,11 +21,12 @@ pal_entry_point: ...@@ -21,11 +21,12 @@ pal_entry_point:
.text .text
/* /*
* Set the PAL entry point address. This could be written in C code, but we do it here * Set the PAL entry point address. This could be written in C code, but we
* to keep it all in one module (besides, it's so trivial that it's * do it here to keep it all in one module (besides, it's so trivial that it's
* not a big deal). * not a big deal).
* *
* in0 Address of the PAL entry point (text address, NOT a function descriptor). * in0 Address of the PAL entry point (text address, NOT a function
* descriptor).
*/ */
GLOBAL_ENTRY(ia64_pal_handler_init) GLOBAL_ENTRY(ia64_pal_handler_init)
alloc r3=ar.pfs,1,0,0,0 alloc r3=ar.pfs,1,0,0,0
...@@ -36,9 +37,9 @@ GLOBAL_ENTRY(ia64_pal_handler_init) ...@@ -36,9 +37,9 @@ GLOBAL_ENTRY(ia64_pal_handler_init)
END(ia64_pal_handler_init) END(ia64_pal_handler_init)
/* /*
* Default PAL call handler. This needs to be coded in assembly because it uses * Default PAL call handler. This needs to be coded in assembly because it
* the static calling convention, i.e., the RSE may not be used and calls are * uses the static calling convention, i.e., the RSE may not be used and
* done via "br.cond" (not "br.call"). * calls are done via "br.cond" (not "br.call").
*/ */
GLOBAL_ENTRY(ia64_pal_default_handler) GLOBAL_ENTRY(ia64_pal_default_handler)
mov r8=-1 mov r8=-1
...@@ -50,12 +51,10 @@ END(ia64_pal_default_handler) ...@@ -50,12 +51,10 @@ END(ia64_pal_default_handler)
* *
* in0 Index of PAL service * in0 Index of PAL service
* in1 - in3 Remaining PAL arguments * in1 - in3 Remaining PAL arguments
* in4 1 ==> clear psr.ic, 0 ==> don't clear psr.ic
*
*/ */
GLOBAL_ENTRY(ia64_pal_call_static) GLOBAL_ENTRY(ia64_pal_call_static)
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(5) .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(4)
alloc loc1 = ar.pfs,5,5,0,0 alloc loc1 = ar.pfs,4,5,0,0
movl loc2 = pal_entry_point movl loc2 = pal_entry_point
1: { 1: {
mov r28 = in0 mov r28 = in0
...@@ -64,7 +63,6 @@ GLOBAL_ENTRY(ia64_pal_call_static) ...@@ -64,7 +63,6 @@ GLOBAL_ENTRY(ia64_pal_call_static)
} }
;; ;;
ld8 loc2 = [loc2] // loc2 <- entry point ld8 loc2 = [loc2] // loc2 <- entry point
tbit.nz p6,p7 = in4, 0
adds r8 = 1f-1b,r8 adds r8 = 1f-1b,r8
mov loc4=ar.rsc // save RSE configuration mov loc4=ar.rsc // save RSE configuration
;; ;;
...@@ -74,13 +72,11 @@ GLOBAL_ENTRY(ia64_pal_call_static) ...@@ -74,13 +72,11 @@ GLOBAL_ENTRY(ia64_pal_call_static)
.body .body
mov r30 = in2 mov r30 = in2
(p6) rsm psr.i | psr.ic
mov r31 = in3 mov r31 = in3
mov b7 = loc2 mov b7 = loc2
(p7) rsm psr.i rsm psr.i
;; ;;
(p6) srlz.i
mov rp = r8 mov rp = r8
br.cond.sptk.many b7 br.cond.sptk.many b7
1: mov psr.l = loc3 1: mov psr.l = loc3
...@@ -97,7 +93,7 @@ END(ia64_pal_call_static) ...@@ -97,7 +93,7 @@ END(ia64_pal_call_static)
* *
* Inputs: * Inputs:
* in0 Index of PAL service * in0 Index of PAL service
* in2 - in3 Remaning PAL arguments * in2 - in3 Remaining PAL arguments
*/ */
GLOBAL_ENTRY(ia64_pal_call_stacked) GLOBAL_ENTRY(ia64_pal_call_stacked)
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(4) .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(4)
...@@ -132,13 +128,13 @@ END(ia64_pal_call_stacked) ...@@ -132,13 +128,13 @@ END(ia64_pal_call_stacked)
* *
* Inputs: * Inputs:
* in0 Index of PAL service * in0 Index of PAL service
* in2 - in3 Remaning PAL arguments * in2 - in3 Remaining PAL arguments
* *
* PSR_LP, PSR_TB, PSR_ID, PSR_DA are never set by the kernel. * PSR_LP, PSR_TB, PSR_ID, PSR_DA are never set by the kernel.
* So we don't need to clear them. * So we don't need to clear them.
*/ */
#define PAL_PSR_BITS_TO_CLEAR \ #define PAL_PSR_BITS_TO_CLEAR \
(IA64_PSR_I | IA64_PSR_IT | IA64_PSR_DT | IA64_PSR_DB | IA64_PSR_RT | \ (IA64_PSR_I | IA64_PSR_IT | IA64_PSR_DT | IA64_PSR_DB | IA64_PSR_RT |\
IA64_PSR_DD | IA64_PSR_SS | IA64_PSR_RI | IA64_PSR_ED | \ IA64_PSR_DD | IA64_PSR_SS | IA64_PSR_RI | IA64_PSR_ED | \
IA64_PSR_DFL | IA64_PSR_DFH) IA64_PSR_DFL | IA64_PSR_DFH)
...@@ -178,7 +174,7 @@ GLOBAL_ENTRY(ia64_pal_call_phys_static) ...@@ -178,7 +174,7 @@ GLOBAL_ENTRY(ia64_pal_call_phys_static)
;; ;;
andcm r16=loc3,r16 // removes bits to clear from psr andcm r16=loc3,r16 // removes bits to clear from psr
br.call.sptk.many rp=ia64_switch_mode_phys br.call.sptk.many rp=ia64_switch_mode_phys
.ret1: mov rp = r8 // install return address (physical) mov rp = r8 // install return address (physical)
mov loc5 = r19 mov loc5 = r19
mov loc6 = r20 mov loc6 = r20
br.cond.sptk.many b7 br.cond.sptk.many b7
...@@ -188,7 +184,6 @@ GLOBAL_ENTRY(ia64_pal_call_phys_static) ...@@ -188,7 +184,6 @@ GLOBAL_ENTRY(ia64_pal_call_phys_static)
mov r19=loc5 mov r19=loc5
mov r20=loc6 mov r20=loc6
br.call.sptk.many rp=ia64_switch_mode_virt // return to virtual mode br.call.sptk.many rp=ia64_switch_mode_virt // return to virtual mode
.ret2:
mov psr.l = loc3 // restore init PSR mov psr.l = loc3 // restore init PSR
mov ar.pfs = loc1 mov ar.pfs = loc1
...@@ -204,7 +199,7 @@ END(ia64_pal_call_phys_static) ...@@ -204,7 +199,7 @@ END(ia64_pal_call_phys_static)
* *
* Inputs: * Inputs:
* in0 Index of PAL service * in0 Index of PAL service
* in2 - in3 Remaning PAL arguments * in2 - in3 Remaining PAL arguments
*/ */
GLOBAL_ENTRY(ia64_pal_call_phys_stacked) GLOBAL_ENTRY(ia64_pal_call_phys_stacked)
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(5) .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(5)
...@@ -257,10 +252,11 @@ GLOBAL_ENTRY(ia64_pal_call_phys_stacked) ...@@ -257,10 +252,11 @@ GLOBAL_ENTRY(ia64_pal_call_phys_stacked)
END(ia64_pal_call_phys_stacked) END(ia64_pal_call_phys_stacked)
/* /*
* Save scratch fp scratch regs which aren't saved in pt_regs already (fp10-fp15). * Save scratch fp scratch regs which aren't saved in pt_regs already
* (fp10-fp15).
* *
* NOTE: We need to do this since firmware (SAL and PAL) may use any of the scratch * NOTE: We need to do this since firmware (SAL and PAL) may use any of the
* regs fp-low partition. * scratch regs fp-low partition.
* *
* Inputs: * Inputs:
* in0 Address of stack storage for fp regs * in0 Address of stack storage for fp regs
......
...@@ -5558,12 +5558,13 @@ report_spurious2: ...@@ -5558,12 +5558,13 @@ report_spurious2:
} }
static irqreturn_t static irqreturn_t
pfm_interrupt_handler(int irq, void *arg, struct pt_regs *regs) pfm_interrupt_handler(int irq, void *arg)
{ {
unsigned long start_cycles, total_cycles; unsigned long start_cycles, total_cycles;
unsigned long min, max; unsigned long min, max;
int this_cpu; int this_cpu;
int ret; int ret;
struct pt_regs *regs = get_irq_regs();
this_cpu = get_cpu(); this_cpu = get_cpu();
if (likely(!pfm_alt_intr_handler)) { if (likely(!pfm_alt_intr_handler)) {
......
...@@ -84,6 +84,12 @@ timer_interrupt (int irq, void *dev_id) ...@@ -84,6 +84,12 @@ timer_interrupt (int irq, void *dev_id)
if (time_after(new_itm, ia64_get_itc())) if (time_after(new_itm, ia64_get_itc()))
break; break;
/*
* Allow IPIs to interrupt the timer loop.
*/
local_irq_enable();
local_irq_disable();
} }
do { do {
......
...@@ -65,7 +65,6 @@ extern void sn_timer_init(void); ...@@ -65,7 +65,6 @@ extern void sn_timer_init(void);
extern unsigned long last_time_offset; extern unsigned long last_time_offset;
extern void (*ia64_mark_idle) (int); extern void (*ia64_mark_idle) (int);
extern void snidle(int); extern void snidle(int);
extern unsigned char acpi_kbd_controller_present;
extern unsigned long long (*ia64_printk_clock)(void); extern unsigned long long (*ia64_printk_clock)(void);
unsigned long sn_rtc_cycles_per_second; unsigned long sn_rtc_cycles_per_second;
...@@ -452,17 +451,6 @@ void __init sn_setup(char **cmdline_p) ...@@ -452,17 +451,6 @@ void __init sn_setup(char **cmdline_p)
ia64_printk_clock = ia64_sn2_printk_clock; ia64_printk_clock = ia64_sn2_printk_clock;
/*
* Old PROMs do not provide an ACPI FADT. Disable legacy keyboard
* support here so we don't have to listen to failed keyboard probe
* messages.
*/
if (is_shub1() && version <= 0x0209 && acpi_kbd_controller_present) {
printk(KERN_INFO "Disabling legacy keyboard support as prom "
"is too old and doesn't provide FADT\n");
acpi_kbd_controller_present = 0;
}
printk("SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF); printk("SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF);
/* /*
......
...@@ -417,6 +417,8 @@ __writeq (unsigned long val, volatile void __iomem *addr) ...@@ -417,6 +417,8 @@ __writeq (unsigned long val, volatile void __iomem *addr)
# define outl_p outl # define outl_p outl
#endif #endif
# ifdef __KERNEL__
extern void __iomem * ioremap(unsigned long offset, unsigned long size); extern void __iomem * ioremap(unsigned long offset, unsigned long size);
extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size); extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size);
...@@ -430,8 +432,6 @@ iounmap (volatile void __iomem *addr) ...@@ -430,8 +432,6 @@ iounmap (volatile void __iomem *addr)
#define dmi_iounmap(x,l) iounmap(x) #define dmi_iounmap(x,l) iounmap(x)
#define dmi_alloc(l) kmalloc(l, GFP_ATOMIC) #define dmi_alloc(l) kmalloc(l, GFP_ATOMIC)
# ifdef __KERNEL__
/* /*
* String version of IO memory access ops: * String version of IO memory access ops:
*/ */
......
...@@ -764,7 +764,7 @@ struct ia64_pal_retval { ...@@ -764,7 +764,7 @@ struct ia64_pal_retval {
* (generally 0) MUST be passed. Reserved parameters are not optional * (generally 0) MUST be passed. Reserved parameters are not optional
* parameters. * parameters.
*/ */
extern struct ia64_pal_retval ia64_pal_call_static (u64, u64, u64, u64, u64); extern struct ia64_pal_retval ia64_pal_call_static (u64, u64, u64, u64);
extern struct ia64_pal_retval ia64_pal_call_stacked (u64, u64, u64, u64); extern struct ia64_pal_retval ia64_pal_call_stacked (u64, u64, u64, u64);
extern struct ia64_pal_retval ia64_pal_call_phys_static (u64, u64, u64, u64); extern struct ia64_pal_retval ia64_pal_call_phys_static (u64, u64, u64, u64);
extern struct ia64_pal_retval ia64_pal_call_phys_stacked (u64, u64, u64, u64); extern struct ia64_pal_retval ia64_pal_call_phys_stacked (u64, u64, u64, u64);
...@@ -774,14 +774,7 @@ extern void ia64_load_scratch_fpregs (struct ia64_fpreg *); ...@@ -774,14 +774,7 @@ extern void ia64_load_scratch_fpregs (struct ia64_fpreg *);
#define PAL_CALL(iprv,a0,a1,a2,a3) do { \ #define PAL_CALL(iprv,a0,a1,a2,a3) do { \
struct ia64_fpreg fr[6]; \ struct ia64_fpreg fr[6]; \
ia64_save_scratch_fpregs(fr); \ ia64_save_scratch_fpregs(fr); \
iprv = ia64_pal_call_static(a0, a1, a2, a3, 0); \ iprv = ia64_pal_call_static(a0, a1, a2, a3); \
ia64_load_scratch_fpregs(fr); \
} while (0)
#define PAL_CALL_IC_OFF(iprv,a0,a1,a2,a3) do { \
struct ia64_fpreg fr[6]; \
ia64_save_scratch_fpregs(fr); \
iprv = ia64_pal_call_static(a0, a1, a2, a3, 1); \
ia64_load_scratch_fpregs(fr); \ ia64_load_scratch_fpregs(fr); \
} while (0) } while (0)
......
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