Skip to content

Commit

Permalink
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Remove unused CONFIG_WANT_DEVICE_TREE
  [POWERPC] Cell RAS: Remove DEBUG, and add license and copyright
  [POWERPC] hvc_rtas_init() must be __init
  [POWERPC] free_property() must not be __init
  [POWERPC] vdso_do_func_patch{32,64}() must be __init
  [POWERPC] Remove generated files on make clean
  [POWERPC] Fix arch/ppc compilation - add typedef for pgtable_t
  [POWERPC] Wire up new timerfd syscalls
  [POWERPC] PS3: Update sys-manager button events
  [POWERPC] PS3: Sys-manager code cleanup
  [POWERPC] PS3: Use system reboot on restart
  [POWERPC] PS3: Fix bootwrapper hang bug
  [POWERPC] PS3: Fix reading pm interval in logical performance monitor
  [POWERPC] PS3: Fix setting bookmark in logical performance monitor
  [POWERPC] Fix DEBUG_PREEMPT warning when warning
  • Loading branch information
Linus Torvalds committed Feb 15, 2008
2 parents 4a0962a + d4eac75 commit b9e2229
Show file tree
Hide file tree
Showing 19 changed files with 76 additions and 54 deletions.
4 changes: 0 additions & 4 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,6 @@ config SECCOMP

If unsure, say Y. Only embedded should say N here.

config WANT_DEVICE_TREE
bool
default n

endmenu

config ISA_DMA_API
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ HOSTCFLAGS += -I$(src)/dtc-src/ -I$(src)/libfdt/
targets += dtc-src/dtc-parser.tab.c
targets += dtc-src/dtc-lexer.lex.c

clean-files += dtc-src/dtc-parser.tab.h

ifdef DTC_GENPARSER
BISON = bison
FLEX = flex
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/boot/ps3-hvcall.S
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
.macro STORE_REGS_5_2
lwz r11, 16(r1)
std r4, 0(r11)
lwz r11, 24(r1)
lwz r11, 20(r1)
std r5, 0(r11)
.endm

Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,5 @@ quiet_cmd_systbl_chk = CALL $<
PHONY += systbl_chk
systbl_chk: $(src)/systbl_chk.sh $(obj)/systbl_chk.i
$(call cmd,systbl_chk)

clean-files := vmlinux.lds
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ void show_regs(struct pt_regs * regs)
current, task_pid_nr(current), current->comm, task_thread_info(current));

#ifdef CONFIG_SMP
printk(" CPU: %d", smp_processor_id());
printk(" CPU: %d", raw_smp_processor_id());
#endif /* CONFIG_SMP */

for (i = 0; i < 32; i++) {
Expand Down
12 changes: 6 additions & 6 deletions arch/powerpc/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,9 @@ static unsigned long __init find_function32(struct lib32_elfinfo *lib,
return sym->st_value - VDSO32_LBASE;
}

static int vdso_do_func_patch32(struct lib32_elfinfo *v32,
struct lib64_elfinfo *v64,
const char *orig, const char *fix)
static int __init vdso_do_func_patch32(struct lib32_elfinfo *v32,
struct lib64_elfinfo *v64,
const char *orig, const char *fix)
{
Elf32_Sym *sym32_gen, *sym32_fix;

Expand Down Expand Up @@ -433,9 +433,9 @@ static unsigned long __init find_function64(struct lib64_elfinfo *lib,
#endif
}

static int vdso_do_func_patch64(struct lib32_elfinfo *v32,
struct lib64_elfinfo *v64,
const char *orig, const char *fix)
static int __init vdso_do_func_patch64(struct lib32_elfinfo *v32,
struct lib64_elfinfo *v64,
const char *orig, const char *fix)
{
Elf64_Sym *sym64_gen, *sym64_fix;

Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/platforms/512x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ config MPC5121_ADS
bool "Freescale MPC5121E ADS"
depends on PPC_MULTIPLATFORM && PPC32
select DEFAULT_UIMAGE
select WANT_DEVICE_TREE
select PPC_MPC5121
help
This option enables support for the MPC5121E ADS board.
Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/platforms/52xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ config PPC_MPC5200_SIMPLE
bool "Generic support for simple MPC5200 based boards"
depends on PPC_MPC52xx
select DEFAULT_UIMAGE
select WANT_DEVICE_TREE
help
This option enables support for a simple MPC52xx based boards which
do not need a custom platform specific setup. Such boards are
Expand All @@ -35,7 +34,6 @@ config PPC_LITE5200
bool "Freescale Lite5200 Eval Board"
depends on PPC_MPC52xx
select DEFAULT_UIMAGE
select WANT_DEVICE_TREE

config PPC_MPC5200_BUGFIX
bool "MPC5200 (L25R) bugfix support"
Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/platforms/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ config PPC_MULTIPLATFORM
config PPC_82xx
bool "Freescale 82xx"
depends on 6xx
select WANT_DEVICE_TREE

config PPC_83xx
bool "Freescale 83xx"
depends on 6xx
select FSL_SOC
select MPC83xx
select IPIC
select WANT_DEVICE_TREE
select FSL_EMB_PERFMON

config PPC_86xx
Expand Down
4 changes: 0 additions & 4 deletions arch/powerpc/platforms/Kconfig.cputype
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,22 @@ config PPC_85xx
bool "Freescale 85xx"
select E500
select FSL_SOC
select WANT_DEVICE_TREE
select MPC85xx

config PPC_8xx
bool "Freescale 8xx"
select FSL_SOC
select 8xx
select WANT_DEVICE_TREE
select PPC_LIB_RHEAP

config 40x
bool "AMCC 40x"
select PPC_DCR_NATIVE
select WANT_DEVICE_TREE
select PPC_UDBG_16550

config 44x
bool "AMCC 44x"
select PPC_DCR_NATIVE
select WANT_DEVICE_TREE
select PPC_UDBG_16550

config E200
Expand Down
11 changes: 10 additions & 1 deletion arch/powerpc/platforms/cell/ras.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#define DEBUG
/*
* Copyright 2006-2008, IBM Corporation.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/

#undef DEBUG

#include <linux/types.h>
#include <linux/kernel.h>
Expand Down
4 changes: 0 additions & 4 deletions arch/powerpc/platforms/embedded6xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ config STORCENTER
select MPIC
select FSL_SOC
select PPC_UDBG_16550 if SERIAL_8250
select WANT_DEVICE_TREE
select MPC10X_OPENPIC
select MPC10X_BRIDGE
help
Expand All @@ -37,7 +36,6 @@ config MPC7448HPC2
select TSI108_BRIDGE
select DEFAULT_UIMAGE
select PPC_UDBG_16550
select WANT_DEVICE_TREE
select TSI108_BRIDGE
help
Select MPC7448HPC2 if configuring for Freescale MPC7448HPC2 (Taiga)
Expand All @@ -48,7 +46,6 @@ config PPC_HOLLY
depends on EMBEDDED6xx
select TSI108_BRIDGE
select PPC_UDBG_16550
select WANT_DEVICE_TREE
select TSI108_BRIDGE
help
Select PPC_HOLLY if configuring for an IBM 750GX/CL Eval
Expand All @@ -59,7 +56,6 @@ config PPC_PRPMC2800
depends on EMBEDDED6xx
select MV64X60
select NOT_COHERENT_CACHE
select WANT_DEVICE_TREE
help
This option enables support for the Motorola PrPMC2800 board

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/iseries/vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static struct property *new_property(const char *name, int length,
return np;
}

static void __init free_property(struct property *np)
static void free_property(struct property *np)
{
kfree(np);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/hvc_rtas.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static struct hv_ops hvc_rtas_get_put_ops = {
.put_chars = hvc_rtas_write_console,
};

static int hvc_rtas_init(void)
static int __init hvc_rtas_init(void)
{
struct hvc_struct *hp;

Expand Down
22 changes: 12 additions & 10 deletions drivers/ps3/ps3-lpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
*
* @pm_control: Shadow of the processor's pm_control register.
* @pm_start_stop: Shadow of the processor's pm_start_stop register.
* @pm_interval: Shadow of the processor's pm_interval register.
* @group_control: Shadow of the processor's group_control register.
* @debug_bus_control: Shadow of the processor's debug_bus_control register.
*
Expand All @@ -91,7 +90,6 @@
struct ps3_lpm_shadow_regs {
u64 pm_control;
u64 pm_start_stop;
u64 pm_interval;
u64 group_control;
u64 debug_bus_control;
};
Expand Down Expand Up @@ -181,9 +179,9 @@ void ps3_set_bookmark(u64 bookmark)
* includes cycles before the call.
*/

asm volatile("or 29, 29, 29;"); /* db10cyc */
asm volatile("nop;nop;nop;nop;nop;nop;nop;nop;nop;");
mtspr(SPRN_BKMK, bookmark);
asm volatile("or 29, 29, 29;"); /* db10cyc */
asm volatile("nop;nop;nop;nop;nop;nop;nop;nop;nop;");
}
EXPORT_SYMBOL_GPL(ps3_set_bookmark);

Expand Down Expand Up @@ -408,7 +406,14 @@ u32 ps3_read_pm(u32 cpu, enum pm_reg_name reg)
case pm_start_stop:
return lpm_priv->shadow.pm_start_stop;
case pm_interval:
return lpm_priv->shadow.pm_interval;
result = lv1_set_lpm_interval(lpm_priv->lpm_id, 0, 0, &val);
if (result) {
val = 0;
dev_dbg(sbd_core(), "%s:%u: lv1 set_inteval failed: "
"reg %u, %s\n", __func__, __LINE__, reg,
ps3_result(result));
}
return (u32)val;
case group_control:
return lpm_priv->shadow.group_control;
case debug_bus_control:
Expand Down Expand Up @@ -475,10 +480,8 @@ void ps3_write_pm(u32 cpu, enum pm_reg_name reg, u32 val)
lpm_priv->shadow.pm_control = val;
break;
case pm_interval:
if (val != lpm_priv->shadow.pm_interval)
result = lv1_set_lpm_interval(lpm_priv->lpm_id, val,
PS3_WRITE_PM_MASK, &dummy);
lpm_priv->shadow.pm_interval = val;
result = lv1_set_lpm_interval(lpm_priv->lpm_id, val,
PS3_WRITE_PM_MASK, &dummy);
break;
case pm_start_stop:
if (val != lpm_priv->shadow.pm_start_stop)
Expand Down Expand Up @@ -1140,7 +1143,6 @@ int ps3_lpm_open(enum ps3_lpm_tb_type tb_type, void *tb_cache,

lpm_priv->shadow.pm_control = PS3_LPM_SHADOW_REG_INIT;
lpm_priv->shadow.pm_start_stop = PS3_LPM_SHADOW_REG_INIT;
lpm_priv->shadow.pm_interval = PS3_LPM_SHADOW_REG_INIT;
lpm_priv->shadow.group_control = PS3_LPM_SHADOW_REG_INIT;
lpm_priv->shadow.debug_bus_control = PS3_LPM_SHADOW_REG_INIT;

Expand Down
44 changes: 31 additions & 13 deletions drivers/ps3/ps3-sys-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@

#include "vuart.h"

MODULE_AUTHOR("Sony Corporation");
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("PS3 System Manager");

/**
* ps3_sys_manager - PS3 system manager driver.
*
Expand Down Expand Up @@ -142,9 +138,11 @@ enum ps3_sys_manager_attr {

/**
* enum ps3_sys_manager_event - External event type, reported by system manager.
* @PS3_SM_EVENT_POWER_PRESSED: payload.value not used.
* @PS3_SM_EVENT_POWER_PRESSED: payload.value =
* enum ps3_sys_manager_button_event.
* @PS3_SM_EVENT_POWER_RELEASED: payload.value = time pressed in millisec.
* @PS3_SM_EVENT_RESET_PRESSED: payload.value not used.
* @PS3_SM_EVENT_RESET_PRESSED: payload.value =
* enum ps3_sys_manager_button_event.
* @PS3_SM_EVENT_RESET_RELEASED: payload.value = time pressed in millisec.
* @PS3_SM_EVENT_THERMAL_ALERT: payload.value = thermal zone id.
* @PS3_SM_EVENT_THERMAL_CLEARED: payload.value = thermal zone id.
Expand All @@ -161,6 +159,17 @@ enum ps3_sys_manager_event {
/* no info on controller events */
};

/**
* enum ps3_sys_manager_button_event - Button event payload values.
* @PS3_SM_BUTTON_EVENT_HARD: Hardware generated event.
* @PS3_SM_BUTTON_EVENT_SOFT: Software generated event.
*/

enum ps3_sys_manager_button_event {
PS3_SM_BUTTON_EVENT_HARD = 0,
PS3_SM_BUTTON_EVENT_SOFT = 1,
};

/**
* enum ps3_sys_manager_next_op - Operation to perform after lpar is destroyed.
*/
Expand All @@ -181,15 +190,17 @@ enum ps3_sys_manager_next_op {
* @PS3_SM_WAKE_P_O_R: Power on reset.
*
* Additional wakeup sources when specifying PS3_SM_NEXT_OP_SYS_SHUTDOWN.
* System will always wake from the PS3_SM_WAKE_DEFAULT sources.
* The system will always wake from the PS3_SM_WAKE_DEFAULT sources.
* Sources listed here are the only ones available to guests in the
* other-os lpar.
*/

enum ps3_sys_manager_wake_source {
/* version 3 */
PS3_SM_WAKE_DEFAULT = 0,
PS3_SM_WAKE_RTC = 0x00000040,
PS3_SM_WAKE_RTC_ERROR = 0x00000080,
PS3_SM_WAKE_P_O_R = 0x10000000,
PS3_SM_WAKE_P_O_R = 0x80000000,
};

/**
Expand Down Expand Up @@ -418,8 +429,10 @@ static int ps3_sys_manager_handle_event(struct ps3_system_bus_device *dev)

switch (event.type) {
case PS3_SM_EVENT_POWER_PRESSED:
dev_dbg(&dev->core, "%s:%d: POWER_PRESSED\n",
__func__, __LINE__);
dev_dbg(&dev->core, "%s:%d: POWER_PRESSED (%s)\n",
__func__, __LINE__,
(event.value == PS3_SM_BUTTON_EVENT_SOFT ? "soft"
: "hard"));
ps3_sm_force_power_off = 1;
/*
* A memory barrier is use here to sync memory since
Expand All @@ -434,8 +447,10 @@ static int ps3_sys_manager_handle_event(struct ps3_system_bus_device *dev)
__func__, __LINE__, event.value);
break;
case PS3_SM_EVENT_RESET_PRESSED:
dev_dbg(&dev->core, "%s:%d: RESET_PRESSED\n",
__func__, __LINE__);
dev_dbg(&dev->core, "%s:%d: RESET_PRESSED (%s)\n",
__func__, __LINE__,
(event.value == PS3_SM_BUTTON_EVENT_SOFT ? "soft"
: "hard"));
ps3_sm_force_power_off = 0;
/*
* A memory barrier is use here to sync memory since
Expand Down Expand Up @@ -622,7 +637,7 @@ static void ps3_sys_manager_final_restart(struct ps3_system_bus_device *dev)
ps3_vuart_cancel_async(dev);

ps3_sys_manager_send_attr(dev, 0);
ps3_sys_manager_send_next_op(dev, PS3_SM_NEXT_OP_LPAR_REBOOT,
ps3_sys_manager_send_next_op(dev, PS3_SM_NEXT_OP_SYS_REBOOT,
PS3_SM_WAKE_DEFAULT);
ps3_sys_manager_send_request_shutdown(dev);

Expand Down Expand Up @@ -699,4 +714,7 @@ static int __init ps3_sys_manager_init(void)
module_init(ps3_sys_manager_init);
/* Module remove not supported. */

MODULE_AUTHOR("Sony Corporation");
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("PS3 System Manager");
MODULE_ALIAS(PS3_MODULE_ALIAS_SYSTEM_MANAGER);
4 changes: 3 additions & 1 deletion include/asm-powerpc/systbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,10 @@ SYSCALL_SPU(getcpu)
COMPAT_SYS(epoll_pwait)
COMPAT_SYS_SPU(utimensat)
COMPAT_SYS_SPU(signalfd)
SYSCALL(ni_syscall)
SYSCALL_SPU(timerfd_create)
SYSCALL_SPU(eventfd)
COMPAT_SYS_SPU(sync_file_range2)
COMPAT_SYS(fallocate)
SYSCALL(subpage_prot)
COMPAT_SYS_SPU(timerfd_settime)
COMPAT_SYS_SPU(timerfd_gettime)
Loading

0 comments on commit b9e2229

Please sign in to comment.