Commit c073cb6c authored by Anton Blanchard's avatar Anton Blanchard

ppc64: clean up some 2.4 - 2.5 differences

parent 4df1d044
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
* as published by the Free Software Foundation; either version * as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
#define __KERNEL__ 1
#include <asm/types.h> #include <asm/types.h>
#include <asm/page.h> #include <asm/page.h>
#include <stddef.h> #include <stddef.h>
...@@ -248,8 +247,3 @@ msChunks_alloc(unsigned long mem, unsigned long num_chunks, unsigned long chunk_ ...@@ -248,8 +247,3 @@ msChunks_alloc(unsigned long mem, unsigned long num_chunks, unsigned long chunk_
return mem; return mem;
} }
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <asm/iSeries/HvTypes.h> #include <asm/iSeries/HvTypes.h>
#include <asm/iSeries/mf.h> #include <asm/iSeries/mf.h>
#include <asm/iSeries/LparData.h> #include <asm/iSeries/LparData.h>
#include <asm/iSeries/HvCallPci.h>
//#include <asm/iSeries/iSeries_VpdInfo.h> //#include <asm/iSeries/iSeries_VpdInfo.h>
#include <asm/iSeries/iSeries_pci.h> #include <asm/iSeries/iSeries_pci.h>
#include "pci.h" #include "pci.h"
......
...@@ -287,7 +287,7 @@ lmb_alloc_base(unsigned long size, unsigned long align, unsigned long max_addr) ...@@ -287,7 +287,7 @@ lmb_alloc_base(unsigned long size, unsigned long align, unsigned long max_addr)
continue; continue;
if ( max_addr == LMB_ALLOC_ANYWHERE ) if ( max_addr == LMB_ALLOC_ANYWHERE )
base = _ALIGN_DOWN(lmbbase+lmbsize-size, align); base = _ALIGN_DOWN(lmbbase+lmbsize-size, align);
else if ( lmbbase < max_addr ) else if ( lmbbase < max_addr )
base = _ALIGN_DOWN(min(lmbbase+lmbsize,max_addr)-size, align); base = _ALIGN_DOWN(min(lmbbase+lmbsize,max_addr)-size, align);
else else
......
...@@ -215,6 +215,7 @@ void *traverse_all_pci_devices(traverse_func pre) ...@@ -215,6 +215,7 @@ void *traverse_all_pci_devices(traverse_func pre)
return NULL; return NULL;
} }
/* Traversal func that looks for a <busno,devfcn> value. /* Traversal func that looks for a <busno,devfcn> value.
* If found, the device_node is returned (thus terminating the traversal). * If found, the device_node is returned (thus terminating the traversal).
*/ */
...@@ -223,7 +224,6 @@ is_devfn_node(struct device_node *dn, void *data) ...@@ -223,7 +224,6 @@ is_devfn_node(struct device_node *dn, void *data)
{ {
int busno = ((unsigned long)data >> 8) & 0xff; int busno = ((unsigned long)data >> 8) & 0xff;
int devfn = ((unsigned long)data) & 0xff; int devfn = ((unsigned long)data) & 0xff;
return (devfn == dn->devfn && busno == dn->busno) ? dn : NULL; return (devfn == dn->devfn && busno == dn->busno) ? dn : NULL;
} }
...@@ -249,8 +249,9 @@ create_eads_node(struct device_node *other_eads) ...@@ -249,8 +249,9 @@ create_eads_node(struct device_node *other_eads)
*eads = *other_eads; *eads = *other_eads;
eads->devfn &= ~7; /* make it function zero */ eads->devfn &= ~7; /* make it function zero */
eads->tce_table = NULL; eads->tce_table = NULL;
/* NOTE: share properties. We could copy but for now this should suffice. /*
* The full_name is also incorrect...but seems harmless. * NOTE: share properties. We could copy but for now this should
* suffice. The full_name is also incorrect...but seems harmless.
*/ */
eads->child = NULL; eads->child = NULL;
eads->next = NULL; eads->next = NULL;
...@@ -285,21 +286,25 @@ struct device_node *fetch_dev_dn(struct pci_dev *dev) ...@@ -285,21 +286,25 @@ struct device_node *fetch_dev_dn(struct pci_dev *dev)
dev->sysdata = dn; dev->sysdata = dn;
/* ToDo: call some device init hook here */ /* ToDo: call some device init hook here */
} else { } else {
/* Now it is very possible that we can't find the device because it is /* Now it is very possible that we can't find the device
* not the zero'th device of a mutifunction device and we don't have * because it is not the zero'th device of a mutifunction
* permission to read the zero'th device. If this is the case, Linux * device and we don't have permission to read the zero'th
* would ordinarily skip all the other functions. * device. If this is the case, Linux would ordinarily skip
* all the other functions.
*/ */
if ((searchval & 0x7) == 0) { if ((searchval & 0x7) == 0) {
struct device_node *thisdevdn; struct device_node *thisdevdn;
/* Ok, we are looking for fn == 0. Let's check for other functions. */ /* Ok, we are looking for fn == 0. Let's check for other functions. */
thisdevdn = (struct device_node *)traverse_pci_devices(phb_dn, is_devfn_sub_node, NULL, (void *)searchval); thisdevdn = (struct device_node *)traverse_pci_devices(phb_dn, is_devfn_sub_node, NULL, (void *)searchval);
if (thisdevdn) { if (thisdevdn) {
/* Ah ha! There does exist a sub function. Now this isn't an exact /* Ah ha! There does exist a sub function.
* match for searchval, but in order to get Linux to believe the sub * Now this isn't an exact match for
* functions exist we will need to manufacture a fake device_node * searchval, but in order to get Linux to
* for this zero'th function. To keept this simple for now we only * believe the sub functions exist we will
* handle pci bridges and we just hand back the found node which * need to manufacture a fake device_node for
* this zero'th function. To keept this
* simple for now we only handle pci bridges
* and we just hand back the found node which
* isn't correct, but Linux won't care. * isn't correct, but Linux won't care.
*/ */
char *device_type = (char *)get_property(thisdevdn, "device_type", 0); char *device_type = (char *)get_property(thisdevdn, "device_type", 0);
...@@ -368,7 +373,6 @@ pci_fixup_bus_sysdata_list(struct list_head *bus_list) ...@@ -368,7 +373,6 @@ pci_fixup_bus_sysdata_list(struct list_head *bus_list)
} }
} }
/****************************************************************** /******************************************************************
* Fixup the bus->sysdata ptrs to point to the bus' device_node. * Fixup the bus->sysdata ptrs to point to the bus' device_node.
* This is done late in pcibios_init(). We do this mostly for * This is done late in pcibios_init(). We do this mostly for
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
* End Change Activity * End Change Activity
*/ */
#include <linux/config.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
......
...@@ -141,7 +141,7 @@ rtas_call(int token, int nargs, int nret, ...@@ -141,7 +141,7 @@ rtas_call(int token, int nargs, int nret,
rtas_args->rets = (rtas_arg_t *)&(rtas_args->args[nargs]); rtas_args->rets = (rtas_arg_t *)&(rtas_args->args[nargs]);
va_start(list, outputs); va_start(list, outputs);
for (i = 0; i < nargs; ++i) { for (i = 0; i < nargs; ++i) {
rtas_args->args[i] = (rtas_arg_t)LONG_LSW(va_arg(list, ulong)); rtas_args->args[i] = (rtas_arg_t)LONG_LSW(va_arg(list, ulong));
PPCDBG(PPCDBG_RTAS, "\tnarg[%d] = 0x%lx\n", i, rtas_args->args[i]); PPCDBG(PPCDBG_RTAS, "\tnarg[%d] = 0x%lx\n", i, rtas_args->args[i]);
} }
va_end(list); va_end(list);
...@@ -164,8 +164,8 @@ rtas_call(int token, int nargs, int nret, ...@@ -164,8 +164,8 @@ rtas_call(int token, int nargs, int nret,
spin_unlock_irqrestore(&rtas.lock, s); spin_unlock_irqrestore(&rtas.lock, s);
#endif #endif
ifppcdebug(PPCDBG_RTAS) { ifppcdebug(PPCDBG_RTAS) {
for(i=0; i < nret ;i++) for(i=0; i < nret ;i++)
udbg_printf("\tnret[%d] = 0x%lx\n", i, (ulong)rtas_args->rets[i]); udbg_printf("\tnret[%d] = 0x%lx\n", i, (ulong)rtas_args->rets[i]);
} }
if (nret > 1 && outputs != NULL) if (nret > 1 && outputs != NULL)
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/config.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
......
/* /*
* linux/arch/ppc/kernel/traps.c * linux/arch/ppc64/kernel/traps.c
* *
* Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
* *
......
...@@ -332,10 +332,10 @@ xmon(struct pt_regs *excp) ...@@ -332,10 +332,10 @@ xmon(struct pt_regs *excp)
cmd = cmds(excp); cmd = cmds(excp);
if (cmd == 's') { if (cmd == 's') {
xmon_trace[smp_processor_id()] = SSTEP; xmon_trace[smp_processor_id()] = SSTEP;
excp->msr |= 0x400; excp->msr |= MSR_SE;
} else if (at_breakpoint(excp->nip)) { } else if (at_breakpoint(excp->nip)) {
xmon_trace[smp_processor_id()] = BRSTEP; xmon_trace[smp_processor_id()] = BRSTEP;
excp->msr |= 0x400; excp->msr |= MSR_SE;
} else { } else {
xmon_trace[smp_processor_id()] = 0; xmon_trace[smp_processor_id()] = 0;
insert_bpts(); insert_bpts();
...@@ -450,7 +450,7 @@ xmon_bpt(struct pt_regs *regs) ...@@ -450,7 +450,7 @@ xmon_bpt(struct pt_regs *regs)
remove_bpts(); remove_bpts();
excprint(regs); excprint(regs);
xmon_trace[smp_processor_id()] = BRSTEP; xmon_trace[smp_processor_id()] = BRSTEP;
regs->msr |= 0x400; regs->msr |= MSR_SE;
} else { } else {
printf("Stopped at breakpoint %x (%lx %s)\n", (bp - bpts)+1, bp->address, bp->funcname); printf("Stopped at breakpoint %x (%lx %s)\n", (bp - bpts)+1, bp->address, bp->funcname);
xmon(regs); xmon(regs);
...@@ -480,7 +480,7 @@ xmon_dabr_match(struct pt_regs *regs) ...@@ -480,7 +480,7 @@ xmon_dabr_match(struct pt_regs *regs)
remove_bpts(); remove_bpts();
excprint(regs); excprint(regs);
xmon_trace[smp_processor_id()] = BRSTEP; xmon_trace[smp_processor_id()] = BRSTEP;
regs->msr |= 0x400; regs->msr |= MSR_SE;
} else { } else {
dabr.instr = regs->nip; dabr.instr = regs->nip;
xmon(regs); xmon(regs);
...@@ -496,7 +496,7 @@ xmon_iabr_match(struct pt_regs *regs) ...@@ -496,7 +496,7 @@ xmon_iabr_match(struct pt_regs *regs)
remove_bpts(); remove_bpts();
excprint(regs); excprint(regs);
xmon_trace[smp_processor_id()] = BRSTEP; xmon_trace[smp_processor_id()] = BRSTEP;
regs->msr |= 0x400; regs->msr |= MSR_SE;
} else { } else {
xmon(regs); xmon(regs);
} }
......
...@@ -17,10 +17,6 @@ ...@@ -17,10 +17,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _PPC_TYPES_H
#include <asm/types.h>
#endif
#ifndef _LPARDATA_H #ifndef _LPARDATA_H
#define _LPARDATA_H #define _LPARDATA_H
...@@ -40,7 +36,6 @@ ...@@ -40,7 +36,6 @@
#include <asm/iSeries/ItExtVpdPanel.h> #include <asm/iSeries/ItExtVpdPanel.h>
#include <asm/iSeries/ItLpQueue.h> #include <asm/iSeries/ItLpQueue.h>
#include <asm/iSeries/IoHriProcessorVpd.h> #include <asm/iSeries/IoHriProcessorVpd.h>
#include <asm/page.h>
extern struct LparMap xLparMap; extern struct LparMap xLparMap;
extern struct HvReleaseData hvReleaseData; extern struct HvReleaseData hvReleaseData;
......
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