Commit Graph

1551 Commits

Author SHA1 Message Date
Paul Mackerras a5a971129c [POWERPC] Fix build failure on Cell when CONFIG_SPU_FS=y
Commit aed3a8c9bb introduced a
definition of notify_spus_active in .../cell/spu_syscalls.c, and
another definition under #ifndef MODULE in .../cell/spufs/sched.c.
The latter is not necessary and causes the build to fail when
CONFIG_SPU_FS=y, so this removes it.  It also removes the export
of do_notify_spus_active, which is unnecessary.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jeremy Kerr <jk@ozlabs.org>
2008-01-02 15:56:30 +11:00
Geoff Levand ec5d2dfe72 [POWERPC] PS3: Fix printing of os-area magic numbers
Fix a bug in the printing of the os-area magic numbers which assumed
that magic numbers were zero terminated strings.  The magic numbers
are represented in memory as integers.  If the os-area sections are
not initialized correctly they could contained random data that would
be printed to the display.  Also unify the handling of header and db
magic numbers and make both of type array of u8.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-28 15:07:52 +11:00
Bob Nelson aed3a8c9bb [POWERPC] Oprofile: Remove dependency on spufs module
This removes an OProfile dependency on the spufs module.  This
dependency was causing a problem for multiplatform systems that are
built with support for Oprofile on Cell but try to load the oprofile
module on a non-Cell system.

Signed-off-by: Bob Nelson <rrnelson@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Acked-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-28 15:07:52 +11:00
Michael Ellerman eb8dc843fc [POWERPC] Make PS3_SYS_MANAGER default y, not m
Currently it's impossible to build a ps3_defconfig which will reboot
without modules installed. This makes it all too easy to find yourself
with a PS3 that won't reboot.

This is because the system manager driver, which provides the reboot
mechanism, is only selectable if PS3_ADVANCED is set, else it defaults
to m. In ps3_defconfig PS3_ADVANCED is not set, therefore the system
manager is built as a module.

It would be desirable IMHO for the defconfig to produce a kernel that
boots and reboots, without needing modules to be installed.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-14 16:45:00 +11:00
Stephen Rothwell 88f0178e6e [POWERPC] iSeries: don't printk with HV spinlock held
Printk was observed to hang during module unload due to a limited
window of characters that may be sent to the hypervisor.  The window
only reexpands when we receive an ack from the HV and the spinlock here
prevents us from ever processing that ack.  This fixes it by dropping
the lock before doing the printk, then looping back to the top to
reacquire the lock.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-14 15:50:46 +11:00
Benjamin Herrenschmidt 6d98bda79b powerpc: Fix IDE legacy vs. native fixups
PowerMac and CHRP/BriQ platforms have quirks to switch some IDE
controllers from legacy mode to fully native mode. Those quirks
however will not work properly anymore due to a change to the
generic code to better handle legacy IDE resources.

This fixes it by moving those quirk to "early" quirks (so they
run before resources are probed for the devices) and clearing
all BARs after the conversion to force a reallocation of sane
values.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-12-10 07:39:54 -08:00
Paul Mackerras 8f51506164 Revert "[POWERPC] Fix RTAS os-term usage on kernel panic"
This reverts commit a2b51812a4.

It turns out that this change caused some machines to fail to come
back up when being rebooted, and generated an error in the hypervisor
error log on some machines.  The platform architecture (PAPR) is a
little unclear on exactly when the RTAS ibm,os-term function should be
called.  Until that is clarified I'm reverting this commit.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-03 09:39:45 +11:00
Anton Vorontsov ba3bdff54b [POWERPC] 83xx: MPC832x RDB - remove spidev stub, use mmc_spi
mmc_spi has hit the mainline, so we can start using it.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-11-20 15:39:54 -06:00
Kim Phillips 27f49807d7 [POWERPC] 8xxx: MDS board RTC fixes
Now the rtc class ds1374 driver has been added, remove the old rtc
driver hookup code, add rtc node to device trees, and turn on the
new driver in the defconfigs.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-11-20 15:39:54 -06:00
Paul Mackerras 072ef40e08 Merge branch 'for-2.6.24' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into merge 2007-11-20 18:40:23 +11:00
Jeremy Kerr c443acab2e [POWERPC] spufs: Fix context destroy vs /spu readdir race
We can currently cause an oops by repeatedly creating and destroying
contexts, while doing getdents() calls on the "/spu" directory.

This is due to the context's top-level dentry remaining hashed while
the context is being destroyed.

Fix this by unhashing the context's dentry with the
dentry->d_inode->i_mutex held. This way, we'll hit the check for
d_unhashed in dentry_readdir, and won't be included in the
list of subdirs for /spu.

test: spufs-testsuite:tests/01-spu_create/07-destroy-vs-readdir-race

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-20 16:10:20 +11:00
Linas Vepstas a2b51812a4 [POWERPC] Fix RTAS os-term usage on kernel panic
The rtas_os_term() routine was being called at the wrong time.
The actual rtas call "os-term" will not ever return, and so
calling it from the panic notifier is too early.  Instead,
call it from the machine_reset() call.

This splits the rtas_os_term() routine into two: one part to capture
the kernel panic message, invoked during the panic notifier, and
another part that is invoked during machine_reset().

Prior to this patch, the os-term call was never being made,
because panic_timeout was always non-zero.  Calling os-term
helps keep the hypervisor happy!  We have to keep the hypervisor
happy to avoid service, dump and error reporting problems.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-20 16:10:09 +11:00
Kim Phillips 29a50a8bd0 [POWERPC] 83xx: Handle mpc8360 rev. 2.1 RGMII timing erratum
If on a rev. 2.1, adjust UCC clock and data timing characteristics
as specified in the rev.2.1 erratum #2.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-11-19 22:14:48 -06:00
Kim Phillips d8ecbb93be [POWERPC] 83xx: mpc832x mds: Fix board PHY reset code
currently the board-level PHY reset code for the mpc832x MDS messes with
reset configuration words source settings which is plain wrong (it
looks like this board code was cut-n-pasted from the mpc8360 mds code,
which has the PHY reset bits in a different BCSR); this patch points
the PHY reset code to the proper mpc832x mds PHY reset bits in the BCSR.

Signed-off-by: Peter Van Ackeren <peter.vanackeren@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-11-19 22:03:16 -06:00
Cyrill Gorcunov 7ac33417ec [POWERPC] Fix potential NULL dereference
This patch does fix potential NULL pointer dereference that could take
place inside of strcmp() if of_get_property() call failed.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-11-19 22:03:00 -06:00
Paul Mackerras 92e21e79a8 Merge branch 'for-2.6.24' of master.kernel.org:/pub/scm/linux/kernel/git/olof/pasemi into merge 2007-11-20 13:54:46 +11:00
Olof Johansson de0c74e7f9 [POWERPC] pasemi: Don't reset mpic at boot
Due to an erratum, we don't want to reset the mpic at boot time. It can
sometimes cause problems with lost interrupts later on while running.

Signed-off-by: Olof Johansson <olof@lixom.net>
2007-11-19 19:27:17 -06:00
Paul Mackerras b22da92f2c Merge branch 'for-2.6.24' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into merge 2007-11-20 11:39:26 +11:00
Jon Loeliger ed08aff7bb [POWERPC] 4xx: Replace #includes of asm/of_platform.h with linux/of_platform.h.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-11-19 08:13:08 -06:00
Mark A. Greer 0961dbfbb8 [POWERPC] prpmc2800: Enable L2 cache
Turn on the L2 cache on the prpmc2800 platform.

Signed-off-by: Mark A. Greer <mgreer@mvista.com
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-19 15:11:30 +11:00
Stephen Rothwell 8693208254 [POWERPC] pSeries: make pseries_defconfig minus PCI build again
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-19 15:11:30 +11:00
Linas Vepstas 2c84b4076c [POWERPC] EEH: Make sure warning message is printed
Fix old buglet; a warning message should have been printed
when a hardware reset takes too long.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08 14:15:34 +11:00
Stephen Rothwell 7992344fde [POWERPC] iSeries: Fix ref counting in vio setup
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08 14:15:33 +11:00
Stephen Rothwell 18244cfbc3 [POWERPC] iSeries_init_IRQ non-PCI tidy
ppc_md.init_IRQ is not called if it is NULL, so we don't need an empty
routine in the non PCI case.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08 14:15:33 +11:00
Linas Vepstas b37ceefe7c [POWERPC] EEH: Avoid crash on null device
Bugfix: avoid crash if there's no PCI device for a given
openfirmware node.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08 14:15:32 +11:00
Linas Vepstas 2a50f144fc [POWERPC] EEH: Drivers that need reset trump others
Bugfix: if a driver controlling one part of a multi-function PCI card
has asked for a reset, honor that request above all others.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08 14:15:32 +11:00
Linas Vepstas 638799b335 [POWERPC] EEH: Clean up comments
Clean up commentary, remove dead code.

Signed-off-by Linas Vepstas <linas@austin.ibm.com>

Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08 14:15:32 +11:00
Tony Breeds e7bda183d4 [POWERPC] Fix build failure when CONFIG_VIRT_CPU_ACCOUNTING is not defined
Without this patch I get the following build failure
  CC      arch/powerpc/platforms/celleb/setup.o
arch/powerpc/platforms/celleb/setup.c:151: error: 'generic_calibrate_decr' undeclared here (not in a function)

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08 14:15:31 +11:00
will schmidt aa39be09df [POWERPC] Include udbg.h when using udbg_printf
This fixes the error
	error: implicit declaration of function "udbg_printf"

We have a few spots where we reference udbg_printf() without #including
udbg.h.  These are within #ifdef DEBUG blocks, so unnoticed until we do
a #define DEBUG or #define DEBUG_LOW nearby.

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08 14:15:31 +11:00
Olof Johansson 4bfac36891 [POWERPC] Fix CONFIG_SMP=n build break
Fix two build errors on powerpc allyesconfig + CONFIG_SMP=n:

arch/powerpc/platforms/built-in.o: In function `cpu_affinity_set':
arch/powerpc/platforms/cell/spu_priv1_mmio.c:78: undefined reference to `.iic_get_target_id'
arch/powerpc/platforms/built-in.o: In function `iic_init_IRQ':
arch/powerpc/platforms/cell/interrupt.c:397: undefined reference to `.iic_setup_cpu'

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08 14:15:30 +11:00
Michael Ellerman 1db3e890ae [POWERPC] Read back MSI message in rtas_setup_msi_irqs() so restore works
There are plans afoot to use pci_restore_msi_state() to restore MSI
state after a device reset.  In order for this to work for the RTAS MSI
backend, we need to read back the MSI message from config space after
it has been setup by firmware.

This should be sufficient for restoring the MSI state after a device
reset, however we will need to revisit this for suspend to disk if that
is ever implemented on pseries.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08 14:15:29 +11:00
Paul Mackerras 786d3693f4 Merge branch 'for-2.6.24' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into merge 2007-10-23 22:20:51 +10:00
Linus Torvalds 8b0eaccab4 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Enable restart support for lite5200 board
  [POWERPC] Add restart support for mpc52xx based platforms
  [POWERPC] Update device tree binding for mpc5200 gpt
  [POWERPC] Add mpc52xx_find_and_map_path(), refactor utility functions
  [POWERPC] bestcomm: Restrict bus prefetch bugfix to original mpc5200 silicon.
2007-10-22 19:21:54 -07:00
Jens Axboe 58b053e4ce Update arch/ to use sg helpers
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-22 21:19:59 +02:00
Marian Balakowicz 9dda78b711 [POWERPC] Enable restart support for lite5200 board
Use the watchdog timer to implement board restart support.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-10-21 12:43:14 -06:00
Marian Balakowicz 86b92cdda9 [POWERPC] Add restart support for mpc52xx based platforms
Add common helper routines: mpc52xx_map_wdt() and mpc52xx_restart().

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-10-21 12:43:04 -06:00
Marian Balakowicz c5c01c9700 [POWERPC] Add mpc52xx_find_and_map_path(), refactor utility functions
Add helper routine mpc52xx_find_and_map_path(). Extract common code to
mpc52xx_map_node() and refactor mpc52xx_find_and_map().

Signed-off-by: Jan Wrobel <wrr@semihalf.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-10-21 12:42:47 -06:00
Matt LaPlante 01dd2fbf0d typo fixes
Most of these fixes were already submitted for old kernel versions, and were
approved, but for some reason they never made it into the releases.

Because this is a consolidation of a couple old missed patches, it touches both
Kconfigs and documentation texts.

Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20 01:34:40 +02:00
Jan Engelhardt 96de0e252c Convert files to UTF-8 and some cleanups
* Convert files to UTF-8.

  * Also correct some people's names
    (one example is Eißfeldt, which was found in a source file.
    Given that the author used an ß at all in a source file
    indicates that the real name has in fact a 'ß' and not an 'ss',
    which is commonly used as a substitute for 'ß' when limited to
    7bit.)

  * Correct town names (Goettingen -> Göttingen)

  * Update Eberhard Mönkeberg's address (http://lkml.org/lkml/2007/1/8/313)

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-19 23:21:04 +02:00
Josh Boyer 739253765e [POWERPC] 4xx: Enable EMAC on Bamboo board
Fix some device tree omissions that prevented the new EMAC driver from
setting up ethernet on the Bamboo board correctly and update the Bamboo
defconfig.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-10-19 16:18:35 -05:00
Josh Boyer b3af7a55da [POWERPC] 4xx: Enable EMAC for PPC405 Walnut board
This patch enables the ibm_newemac driver for the Walnut board.  It fixes the
device tree for the walnut board to order the MAL interrupts correctly and
adds the local-mac-address property to the EMAC node.  The bootwrapper is also
updated to extract the MAC address from the OpenBIOS offset where it is stored.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-10-19 16:18:33 -05:00
Valentine Barshak 1d5499b5ac [POWERPC] 4xx: Split early debug output and early boot console for 44x
Currently there's no way to enable early boot console on PowerPC 44x
not specifying uart's physical address in kernel config, which is used
for very early debug messages. This patch splits very early debug output
(which needs uart physical address in kernel config) and early boot console
(which searches for uarts in the device tree using find_legacy_serial_ports).
We enable early boot console for all 44x processors, while (dangerous)
early debug is user-selectable.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-10-19 16:18:18 -05:00
Valentine Barshak b7c1dfba0c [POWERPC] 4xx: Enable NEW EMAC support for Sequoia 440EPx.
This patch enables NEW EMAC support for PowerPC 440EPx Sequoia board.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-10-19 16:17:20 -05:00
Valentine Barshak 1f69dcfdae [POWERPC] 4xx: Add RGMII support for Sequoia 440EPx
This adds RGMII support to Sequoia DTS and sets correct phy-mode
for EMACs. According to Sequoia datasheet, both ethernet ports
are connected to RGMII interface, while ZMII is used only for MDIO.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-10-19 16:17:08 -05:00
Robert P. J. Day 3a4fa0a25d Fix misspellings of "system", "controller", "interrupt" and "necessary".
Fix the various misspellings of "system", controller", "interrupt" and
"[un]necessary".

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-19 23:10:43 +02:00
Jiri Slaby 1977f03272 remove asm/bitops.h includes
remove asm/bitops.h includes

including asm/bitops directly may cause compile errors. don't include it
and include linux/bitops instead. next patch will deny including asm header
directly.

Cc: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 11:53:41 -07:00
Serge E. Hallyn b460cbc581 pid namespaces: define is_global_init() and is_container_init()
is_init() is an ambiguous name for the pid==1 check.  Split it into
is_global_init() and is_container_init().

A cgroup init has it's tsk->pid == 1.

A global init also has it's tsk->pid == 1 and it's active pid namespace
is the init_pid_ns.  But rather than check the active pid namespace,
compare the task structure with 'init_pid_ns.child_reaper', which is
initialized during boot to the /sbin/init process and never changes.

Changelog:

	2.6.22-rc4-mm2-pidns1:
	- Use 'init_pid_ns.child_reaper' to determine if a given task is the
	  global init (/sbin/init) process. This would improve performance
	  and remove dependence on the task_pid().

	2.6.21-mm2-pidns2:

	- [Sukadev Bhattiprolu] Changed is_container_init() calls in {powerpc,
	  ppc,avr32}/traps.c for the _exception() call to is_global_init().
	  This way, we kill only the cgroup if the cgroup's init has a
	  bug rather than force a kernel panic.

[akpm@linux-foundation.org: fix comment]
[sukadev@us.ibm.com: Use is_global_init() in arch/m32r/mm/fault.c]
[bunk@stusta.de: kernel/pid.c: remove unused exports]
[sukadev@us.ibm.com: Fix capability.c to work with threaded init]
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Acked-by: Pavel Emelianov <xemul@openvz.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Herbert Poetzel <herbert@13thfloor.at>
Cc: Kirill Korotaev <dev@sw.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 11:53:37 -07:00
Rafael J. Wysocki e6c5eb9541 PM: Rework struct platform_suspend_ops
There is no reason why the .prepare() and .finish() methods in 'struct
platform_suspend_ops' should take any arguments, since architectures don't use
these methods' argument in any practically meaningful way (ie.  either the
target system sleep state is conveyed to the platform by .set_target(), or
there is only one suspend state supported and it is indicated to the PM core
by .valid(), or .prepare() and .finish() aren't defined at all).   There also
is no reason why .finish() should return any result.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 14:37:18 -07:00
Rafael J. Wysocki 26398a70ea PM: Rename struct pm_ops and related things
The name of 'struct pm_ops' suggests that it is related to the power
management in general, but in fact it is only related to suspend.   Moreover,
its name should indicate what this structure is used for, so it seems
reasonable to change it to 'struct platform_suspend_ops'.   In that case, the
name of the global variable of this type used by the PM core and the names of
related functions should be changed accordingly.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 14:37:18 -07:00
Rafael J. Wysocki 95d9ffbe01 PM: Move definition of struct pm_ops to suspend.h
Move the definition of 'struct pm_ops' and related functions from <linux/pm.h>
to <linux/suspend.h> .

There are, at least, the following reasons to do that:
* 'struct pm_ops' is specifically related to suspend and not to the power
  management in general.
* As long as 'struct pm_ops' is defined in <linux/pm.h>, any modification of it
  causes the entire kernel to be recompiled, which is unnecessary and annoying.
* Some suspend-related features are already defined in <linux/suspend.h>, so it
  is logical to move the definition of 'struct pm_ops' into there.
* 'struct hibernation_ops', being the hibernation-related counterpart of
  'struct pm_ops', is defined in <linux/suspend.h> .

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 14:37:18 -07:00