Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25078
b: refs/heads/master
c: 9c8680e
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Apr 2, 2006
1 parent a7db9f7 commit b717715
Show file tree
Hide file tree
Showing 80 changed files with 2,330 additions and 1,117 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b9ec4e109d7a342e83e1210e05797222e36555c3
refs/heads/master: 9c8680e2cfbb60d5075f8caaf9d98276120bcc78
31 changes: 16 additions & 15 deletions trunk/arch/powerpc/kernel/lparcfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <asm/prom.h>
#include <asm/vdso_datapage.h>

#define MODULE_VERS "1.6"
#define MODULE_VERS "1.7"
#define MODULE_NAME "lparcfg"

/* #define LPARCFG_DEBUG */
Expand Down Expand Up @@ -149,17 +149,17 @@ static void log_plpar_hcall_return(unsigned long rc, char *tag)
if (rc == 0) /* success, return */
return;
/* check for null tag ? */
if (rc == H_Hardware)
if (rc == H_HARDWARE)
printk(KERN_INFO
"plpar-hcall (%s) failed with hardware fault\n", tag);
else if (rc == H_Function)
else if (rc == H_FUNCTION)
printk(KERN_INFO
"plpar-hcall (%s) failed; function not allowed\n", tag);
else if (rc == H_Authority)
else if (rc == H_AUTHORITY)
printk(KERN_INFO
"plpar-hcall (%s) failed; not authorized to this function\n",
tag);
else if (rc == H_Parameter)
"plpar-hcall (%s) failed; not authorized to this"
" function\n", tag);
else if (rc == H_PARAMETER)
printk(KERN_INFO "plpar-hcall (%s) failed; Bad parameter(s)\n",
tag);
else
Expand Down Expand Up @@ -209,7 +209,7 @@ static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs)
unsigned long dummy;
rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy);

if (rc != H_Authority)
if (rc != H_AUTHORITY)
log_plpar_hcall_return(rc, "H_PIC");
}

Expand Down Expand Up @@ -242,7 +242,7 @@ static void parse_system_parameter_string(struct seq_file *m)
{
int call_status;

char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
unsigned char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
if (!local_buffer) {
printk(KERN_ERR "%s %s kmalloc failure at line %d \n",
__FILE__, __FUNCTION__, __LINE__);
Expand All @@ -254,7 +254,8 @@ static void parse_system_parameter_string(struct seq_file *m)
call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1,
NULL,
SPLPAR_CHARACTERISTICS_TOKEN,
__pa(rtas_data_buf));
__pa(rtas_data_buf),
RTAS_DATA_BUF_SIZE);
memcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH);
spin_unlock(&rtas_data_buf_lock);

Expand All @@ -275,7 +276,7 @@ static void parse_system_parameter_string(struct seq_file *m)
#ifdef LPARCFG_DEBUG
printk(KERN_INFO "success calling get-system-parameter \n");
#endif
splpar_strlen = local_buffer[0] * 16 + local_buffer[1];
splpar_strlen = local_buffer[0] * 256 + local_buffer[1];
local_buffer += 2; /* step over strlen value */

memset(workbuffer, 0, SPLPAR_MAXLENGTH);
Expand Down Expand Up @@ -529,13 +530,13 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf,
retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr,
*new_weight_ptr);

if (retval == H_Success || retval == H_Constrained) {
if (retval == H_SUCCESS || retval == H_CONSTRAINED) {
retval = count;
} else if (retval == H_Busy) {
} else if (retval == H_BUSY) {
retval = -EBUSY;
} else if (retval == H_Hardware) {
} else if (retval == H_HARDWARE) {
retval = -EIO;
} else if (retval == H_Parameter) {
} else if (retval == H_PARAMETER) {
retval = -EINVAL;
} else {
printk(KERN_WARNING "%s: received unknown hv return code %ld",
Expand Down
12 changes: 6 additions & 6 deletions trunk/arch/powerpc/kernel/rtas.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,26 +578,26 @@ static void rtas_percpu_suspend_me(void *info)
* We use "waiting" to indicate our state. As long
* as it is >0, we are still trying to all join up.
* If it goes to 0, we have successfully joined up and
* one thread got H_Continue. If any error happens,
* one thread got H_CONTINUE. If any error happens,
* we set it to <0.
*/
local_irq_save(flags);
do {
rc = plpar_hcall_norets(H_JOIN);
smp_rmb();
} while (rc == H_Success && data->waiting > 0);
if (rc == H_Success)
} while (rc == H_SUCCESS && data->waiting > 0);
if (rc == H_SUCCESS)
goto out;

if (rc == H_Continue) {
if (rc == H_CONTINUE) {
data->waiting = 0;
data->args->args[data->args->nargs] =
rtas_call(ibm_suspend_me_token, 0, 1, NULL);
for_each_possible_cpu(i)
plpar_hcall_norets(H_PROD,i);
} else {
data->waiting = -EBUSY;
printk(KERN_ERR "Error on H_Join hypervisor call\n");
printk(KERN_ERR "Error on H_JOIN hypervisor call\n");
}

out:
Expand All @@ -624,7 +624,7 @@ static int rtas_ibm_suspend_me(struct rtas_args *args)
printk(KERN_ERR "Error doing global join\n");

/* Prod each CPU. This won't hurt, and will wake
* anyone we successfully put to sleep with H_Join
* anyone we successfully put to sleep with H_JOIN.
*/
for_each_possible_cpu(i)
plpar_hcall_norets(H_PROD, i);
Expand Down
6 changes: 0 additions & 6 deletions trunk/arch/powerpc/kernel/setup_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include <asm/kgdb.h>
#endif

extern void platform_init(void);
extern void bootx_init(unsigned long r4, unsigned long phys);

boot_infos_t *boot_infos;
Expand Down Expand Up @@ -138,12 +137,7 @@ void __init machine_init(unsigned long dt_ptr, unsigned long phys)
strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line));
#endif /* CONFIG_CMDLINE */

#ifdef CONFIG_PPC_MULTIPLATFORM
probe_machine();
#else
/* Base init based on machine type. Obsoloete, please kill ! */
platform_init();
#endif

#ifdef CONFIG_6xx
if (cpu_has_feature(CPU_FTR_CAN_DOZE) ||
Expand Down
10 changes: 4 additions & 6 deletions trunk/arch/powerpc/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,10 @@ void __init early_setup(unsigned long dt_ptr)
/*
* Initialize stab / SLB management except on iSeries
*/
if (!firmware_has_feature(FW_FEATURE_ISERIES)) {
if (cpu_has_feature(CPU_FTR_SLB))
slb_initialize();
else
stab_initialize(get_paca()->stab_real);
}
if (cpu_has_feature(CPU_FTR_SLB))
slb_initialize();
else if (!firmware_has_feature(FW_FEATURE_ISERIES))
stab_initialize(get_paca()->stab_real);

DBG(" <- early_setup()\n");
}
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/kernel/systbl.S
Original file line number Diff line number Diff line change
Expand Up @@ -322,3 +322,4 @@ SYSCALL(spu_create)
COMPAT_SYS(pselect6)
COMPAT_SYS(ppoll)
SYSCALL(unshare)
SYSCALL(splice)
9 changes: 3 additions & 6 deletions trunk/arch/powerpc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ void system_reset_exception(struct pt_regs *regs)
*/
static inline int check_io_access(struct pt_regs *regs)
{
#ifdef CONFIG_PPC_PMAC
#if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32)
unsigned long msr = regs->msr;
const struct exception_table_entry *entry;
unsigned int *nip = (unsigned int *)regs->nip;
Expand Down Expand Up @@ -261,7 +261,7 @@ static inline int check_io_access(struct pt_regs *regs)
return 1;
}
}
#endif /* CONFIG_PPC_PMAC */
#endif /* CONFIG_PPC_PMAC && CONFIG_PPC32 */
return 0;
}

Expand Down Expand Up @@ -308,17 +308,15 @@ platform_machine_check(struct pt_regs *regs)

void machine_check_exception(struct pt_regs *regs)
{
#ifdef CONFIG_PPC64
int recover = 0;
unsigned long reason = get_mc_reason(regs);

/* See if any machine dependent calls */
if (ppc_md.machine_check_exception)
recover = ppc_md.machine_check_exception(regs);

if (recover)
return;
#else
unsigned long reason = get_mc_reason(regs);

if (user_mode(regs)) {
regs->msr |= MSR_RI;
Expand Down Expand Up @@ -462,7 +460,6 @@ void machine_check_exception(struct pt_regs *regs)
* additional info, e.g. bus error registers.
*/
platform_machine_check(regs);
#endif /* CONFIG_PPC64 */

if (debugger_fault_handler(regs))
return;
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/powerpc/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address,

/* When running in the kernel we expect faults to occur only to
* addresses in user space. All other faults represent errors in the
* kernel and should generate an OOPS. Unfortunatly, in the case of an
* erroneous fault occuring in a code path which already holds mmap_sem
* kernel and should generate an OOPS. Unfortunately, in the case of an
* erroneous fault occurring in a code path which already holds mmap_sem
* we will deadlock attempting to validate the fault against the
* address space. Luckily the kernel only validly references user
* space from well defined areas of code, which are listed in the
* exceptions table.
*
* As the vast majority of faults will be valid we will only perform
* the source reference check when there is a possibilty of a deadlock.
* the source reference check when there is a possibility of a deadlock.
* Attempt to lock the address space, if we cannot we then validate the
* source. If this is invalid we can skip the address space check,
* thus avoiding the deadlock.
Expand Down
40 changes: 20 additions & 20 deletions trunk/arch/powerpc/platforms/83xx/mpc834x_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,25 +158,25 @@ static int __init mpc834x_rtc_hookup(void)
late_initcall(mpc834x_rtc_hookup);
#endif

void __init platform_init(void)
/*
* Called very early, MMU is off, device-tree isn't unflattened
*/
static int __init mpc834x_sys_probe(void)
{
/* setup the PowerPC module struct */
ppc_md.setup_arch = mpc834x_sys_setup_arch;

ppc_md.init_IRQ = mpc834x_sys_init_IRQ;
ppc_md.get_irq = ipic_get_irq;

ppc_md.restart = mpc83xx_restart;

ppc_md.time_init = mpc83xx_time_init;
ppc_md.set_rtc_time = NULL;
ppc_md.get_rtc_time = NULL;
ppc_md.calibrate_decr = generic_calibrate_decr;

ppc_md.progress = udbg_progress;

if (ppc_md.progress)
ppc_md.progress("mpc834x_sys_init(): exit", 0);

return;
/* We always match for now, eventually we should look at the flat
dev tree to ensure this is the board we are suppose to run on
*/
return 1;
}

define_machine(mpc834x_sys) {
.name = "MPC834x SYS",
.probe = mpc834x_sys_probe,
.setup_arch = mpc834x_sys_setup_arch,
.init_IRQ = mpc834x_sys_init_IRQ,
.get_irq = ipic_get_irq,
.restart = mpc83xx_restart,
.time_init = mpc83xx_time_init,
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
};
40 changes: 20 additions & 20 deletions trunk/arch/powerpc/platforms/85xx/mpc85xx_ads.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,25 +220,25 @@ void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
}

void __init platform_init(void)
/*
* Called very early, device-tree isn't unflattened
*/
static int __init mpc85xx_ads_probe(void)
{
ppc_md.setup_arch = mpc85xx_ads_setup_arch;
ppc_md.show_cpuinfo = mpc85xx_ads_show_cpuinfo;

ppc_md.init_IRQ = mpc85xx_ads_pic_init;
ppc_md.get_irq = mpic_get_irq;

ppc_md.restart = mpc85xx_restart;
ppc_md.power_off = NULL;
ppc_md.halt = NULL;

ppc_md.time_init = NULL;
ppc_md.set_rtc_time = NULL;
ppc_md.get_rtc_time = NULL;
ppc_md.calibrate_decr = generic_calibrate_decr;

ppc_md.progress = udbg_progress;

if (ppc_md.progress)
ppc_md.progress("mpc85xx_ads platform_init(): exit", 0);
/* We always match for now, eventually we should look at the flat
dev tree to ensure this is the board we are suppose to run on
*/
return 1;
}

define_machine(mpc85xx_ads) {
.name = "MPC85xx ADS",
.probe = mpc85xx_ads_probe,
.setup_arch = mpc85xx_ads_setup_arch,
.init_IRQ = mpc85xx_ads_pic_init,
.show_cpuinfo = mpc85xx_ads_show_cpuinfo,
.get_irq = mpic_get_irq,
.restart = mpc85xx_restart,
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
};
1 change: 1 addition & 0 deletions trunk/arch/powerpc/platforms/cell/spu_callbacks.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ void *spu_syscall_table[] = {
[__NR_pselect6] sys_ni_syscall, /* sys_pselect */
[__NR_ppoll] sys_ni_syscall, /* sys_ppoll */
[__NR_unshare] sys_unshare,
[__NR_splice] sys_splice,
};

long spu_sys_callback(struct spu_syscall_block *s)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/platforms/cell/spufs/run.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <linux/ptrace.h>

#include <asm/spu.h>
#include <asm/unistd.h>

#include "spufs.h"

Expand Down
Loading

0 comments on commit b717715

Please sign in to comment.