mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 04:34:11 +08:00
ab519a011c
The Dynamic Logical Partitioning capabilities of the powerpc pseries platform allows for the addition and removal of resources (i.e. CPU's, memory, and PCI devices) from a partition. The removal of a resource involves removing the resource's node from the device tree and then returning the resource to firmware via the rtas set-indicator call. To add a resource, it is first obtained from firmware via the rtas set-indicator call and then a new device tree node is created using the ibm,configure-coinnector rtas call and added to the device tree. This patch provides the kernel DLPAR infrastructure in a new filed named dlpar.c. The functionality provided is for acquiring and releasing a resource from firmware and the parsing of information returned from the ibm,configure-connector rtas call. Additionally this exports the pSeries reconfiguration notifier chain so that it can be invoked when device tree updates are made. Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
31 lines
937 B
C
31 lines
937 B
C
#ifndef _PPC64_PSERIES_RECONFIG_H
|
|
#define _PPC64_PSERIES_RECONFIG_H
|
|
#ifdef __KERNEL__
|
|
|
|
#include <linux/notifier.h>
|
|
|
|
/*
|
|
* Use this API if your code needs to know about OF device nodes being
|
|
* added or removed on pSeries systems.
|
|
*/
|
|
|
|
#define PSERIES_RECONFIG_ADD 0x0001
|
|
#define PSERIES_RECONFIG_REMOVE 0x0002
|
|
#define PSERIES_DRCONF_MEM_ADD 0x0003
|
|
#define PSERIES_DRCONF_MEM_REMOVE 0x0004
|
|
|
|
#ifdef CONFIG_PPC_PSERIES
|
|
extern int pSeries_reconfig_notifier_register(struct notifier_block *);
|
|
extern void pSeries_reconfig_notifier_unregister(struct notifier_block *);
|
|
extern struct blocking_notifier_head pSeries_reconfig_chain;
|
|
#else /* !CONFIG_PPC_PSERIES */
|
|
static inline int pSeries_reconfig_notifier_register(struct notifier_block *nb)
|
|
{
|
|
return 0;
|
|
}
|
|
static inline void pSeries_reconfig_notifier_unregister(struct notifier_block *nb) { }
|
|
#endif /* CONFIG_PPC_PSERIES */
|
|
|
|
#endif /* __KERNEL__ */
|
|
#endif /* _PPC64_PSERIES_RECONFIG_H */
|