Commit 3fc464c8 authored by Anton Blanchard's avatar Anton Blanchard

Merge samba.org:/scratch/anton/linux-2.5

into samba.org:/scratch/anton/export
parents edad54dc cc9e36c0
......@@ -237,7 +237,7 @@ fix_alignment(struct pt_regs *regs)
dsisr = regs->dsisr;
/* Power4 doesn't set DSISR for an alignment interrupt */
if (__is_processor(PV_POWER4) || __is_processor(PV_POWER4p)) {
if (!cpu_alignexc_sets_dsisr()) {
unsigned int real_instr;
if (__get_user(real_instr, (unsigned int *)regs->nip))
return 0;
......
......@@ -261,8 +261,9 @@ chrp_progress(char *s, unsigned short hex)
struct device_node *root;
int width, *p;
char *os;
static int display_character, set_indicator;
static int display_character;
static int max_width;
static spinlock_t progress_lock = SPIN_LOCK_UNLOCKED;
if (!rtas.base)
return;
......@@ -276,16 +277,10 @@ chrp_progress(char *s, unsigned short hex)
else
max_width = 0x10;
display_character = rtas_token("display-character");
set_indicator = rtas_token("set-indicator");
}
if (display_character == RTAS_UNKNOWN_SERVICE) {
/* use hex display */
if (set_indicator == RTAS_UNKNOWN_SERVICE)
return;
rtas_call(set_indicator, 3, 1, NULL, 6, 0, hex);
return;
}
spin_lock(&progress_lock);
rtas_call(display_character, 1, 1, NULL, '\r');
width = max_width;
......@@ -306,6 +301,8 @@ chrp_progress(char *s, unsigned short hex)
/* Blank to end of line. */
while ( width-- > 0 )
rtas_call(display_character, 1, 1, NULL, ' ' );
spin_unlock(&progress_lock);
}
extern void setup_default_decr(void);
......
......@@ -50,6 +50,7 @@
#include <linux/cdrom.h>
#include <linux/loop.h>
#include <linux/auto_fs.h>
#include <linux/auto_fs4.h>
#include <linux/devfs_fs.h>
#include <linux/tty.h>
#include <linux/vt_kern.h>
......@@ -4159,6 +4160,7 @@ COMPATIBLE_IOCTL(AUTOFS_IOC_FAIL),
COMPATIBLE_IOCTL(AUTOFS_IOC_CATATONIC),
COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER),
COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE),
COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE_MULTI),
/* DEVFS */
COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV),
COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK),
......
......@@ -111,7 +111,6 @@ unsigned int openpic_vec_spurious;
* data has probably been corrupted and we're going to panic or deadlock later
* anyway --Troy
*/
extern unsigned long* _get_SP(void);
#define check_arg_irq(irq) \
if (irq < open_pic_irq_offset || irq >= (NumSources+open_pic_irq_offset)){ \
printk(KERN_ERR "open_pic.c:%d: illegal irq %d\n", __LINE__, irq); \
......
......@@ -110,29 +110,6 @@ long plpar_put_term_char(unsigned long termno,
lbuf[0], lbuf[1], &dummy, &dummy, &dummy);
}
long plpar_eoi(unsigned long xirr)
{
return plpar_hcall_norets(H_EOI, xirr);
}
long plpar_cppr(unsigned long cppr)
{
return plpar_hcall_norets(H_CPPR, cppr);
}
long plpar_ipi(unsigned long servernum,
unsigned long mfrr)
{
return plpar_hcall_norets(H_IPI, servernum, mfrr);
}
long plpar_xirr(unsigned long *xirr_ret)
{
unsigned long dummy;
return plpar_hcall(H_XIRR, 0, 0, 0, 0,
xirr_ret, &dummy, &dummy);
}
static void tce_build_pSeriesLP(struct TceTable *tbl, long tcenum,
unsigned long uaddr, int direction )
{
......@@ -180,66 +157,6 @@ static void tce_free_one_pSeriesLP(struct TceTable *tbl, long tcenum)
}
/* PowerPC Interrupts for lpar. */
/* NOTE: this typedef is duplicated (for now) from xics.c! */
typedef struct {
int (*xirr_info_get)(int cpu);
void (*xirr_info_set)(int cpu, int val);
void (*cppr_info)(int cpu, u8 val);
void (*qirr_info)(int cpu, u8 val);
} xics_ops;
static int pSeriesLP_xirr_info_get(int n_cpu)
{
unsigned long lpar_rc;
unsigned long return_value;
lpar_rc = plpar_xirr(&return_value);
if (lpar_rc != H_Success) {
panic(" bad return code xirr - rc = %lx \n", lpar_rc);
}
return ((int)(return_value));
}
static void pSeriesLP_xirr_info_set(int n_cpu, int value)
{
unsigned long lpar_rc;
unsigned long val64 = value & 0xffffffff;
lpar_rc = plpar_eoi(val64);
if (lpar_rc != H_Success) {
panic(" bad return code EOI - rc = %ld, value=%lx \n", lpar_rc, val64);
}
}
static void pSeriesLP_cppr_info(int n_cpu, u8 value)
{
unsigned long lpar_rc;
lpar_rc = plpar_cppr(value);
if (lpar_rc != H_Success) {
panic(" bad return code cppr - rc = %lx \n", lpar_rc);
}
}
static void pSeriesLP_qirr_info(int n_cpu , u8 value)
{
unsigned long lpar_rc;
lpar_rc = plpar_ipi(n_cpu, value);
if (lpar_rc != H_Success) {
panic(" bad return code qirr -ipi - rc = %lx \n", lpar_rc);
}
}
xics_ops pSeriesLP_ops = {
pSeriesLP_xirr_info_get,
pSeriesLP_xirr_info_set,
pSeriesLP_cppr_info,
pSeriesLP_qirr_info
};
/* end TAI-LPAR */
int vtermno; /* virtual terminal# for udbg */
static void udbg_putcLP(unsigned char c)
......
......@@ -533,8 +533,6 @@ static void show_tsk_stack(struct task_struct *p, unsigned long sp)
} while (count++ < 32);
}
extern unsigned long *_get_SP(void);
void dump_stack(void)
{
show_tsk_stack(current, (unsigned long)_get_SP());
......
......@@ -47,8 +47,9 @@
#include <asm/ppcdebug.h>
#include "open_pic.h"
#include <asm/machdep.h>
#include <asm/xics.h>
int smp_threads_ready = 0;
int smp_threads_ready;
unsigned long cache_decay_ticks;
/* initialised so it doesn't end up in bss */
......@@ -64,18 +65,6 @@ extern int cpu_idle(void *unused);
void smp_call_function_interrupt(void);
void smp_message_pass(int target, int msg, unsigned long data, int wait);
void xics_setup_cpu(void);
void xics_cause_IPI(int cpu);
/*
* XICS only has a single IPI, so encode the messages per CPU
*/
struct xics_ipi_struct {
volatile unsigned long value;
} ____cacheline_aligned;
struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned;
#define smp_message_pass(t,m,d,w) smp_ops->message_pass((t),(m),(d),(w))
static inline void set_tb(unsigned int upper, unsigned int lower)
......
This diff is collapsed.
......@@ -469,12 +469,10 @@ insert_bpts()
}
}
if (!__is_processor(PV_POWER4) && !__is_processor(PV_POWER4p)) {
if (dabr.enabled)
set_dabr(dabr.address);
if (iabr.enabled)
set_iabr(iabr.address);
}
if (cpu_has_dabr() && dabr.enabled)
set_dabr(dabr.address);
if (cpu_has_iabr() && iabr.enabled)
set_iabr(iabr.address);
}
static void
......@@ -486,10 +484,11 @@ remove_bpts()
if (naca->platform != PLATFORM_PSERIES)
return;
if (!__is_processor(PV_POWER4) && !__is_processor(PV_POWER4p)) {
if (cpu_has_dabr())
set_dabr(0);
if (cpu_has_iabr())
set_iabr(0);
}
bp = bpts;
for (i = 0; i < NBPTS; ++i, ++bp) {
......@@ -778,8 +777,8 @@ bpt_cmds(void)
cmd = inchar();
switch (cmd) {
case 'd': /* bd - hardware data breakpoint */
if (__is_processor(PV_POWER4) || __is_processor(PV_POWER4p)) {
printf("Not implemented on POWER4\n");
if (cpu_has_dabr()) {
printf("Not implemented on this cpu\n");
break;
}
mode = 7;
......@@ -798,7 +797,7 @@ bpt_cmds(void)
dabr.address = (dabr.address & ~7) | mode;
break;
case 'i': /* bi - hardware instr breakpoint */
if (__is_processor(PV_POWER4) || __is_processor(PV_POWER4p)) {
if (cpu_has_iabr()) {
printf("Not implemented on POWER4\n");
break;
}
......
......@@ -595,6 +595,8 @@ GLUE(GLUE(.LT,NAME),_procname_end):
asm volatile("mfasr %0" : "=r" (rval)); rval;})
#ifndef __ASSEMBLY__
extern unsigned long *_get_SP(void);
extern int have_of;
struct task_struct;
......@@ -740,6 +742,15 @@ static inline void prefetchw(const void *x)
#define cpu_has_noexecute() (processor_type() == PV_POWER4 || \
processor_type() == PV_POWER4p)
/* XXX we have to call HV to set when in LPAR */
#define cpu_has_dabr() (1)
#define cpu_has_iabr() (processor_type() != PV_POWER4 && \
processor_type() != PV_POWER4p)
#define cpu_alignexc_sets_dsisr() (processor_type() != PV_POWER4 && \
processor_type() != PV_POWER4p)
#endif /* ASSEMBLY */
#endif /* __ASM_PPC64_PROCESSOR_H */
......@@ -12,7 +12,17 @@
#ifndef _PPC64_KERNEL_XICS_H
#define _PPC64_KERNEL_XICS_H
#include <linux/cache.h>
void xics_init_IRQ(void);
int xics_get_irq(struct pt_regs *);
void xics_setup_cpu(void);
void xics_cause_IPI(int cpu);
struct xics_ipi_struct {
volatile unsigned long value;
} ____cacheline_aligned;
extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned;
#endif /* _PPC64_KERNEL_XICS_H */
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