Hi Chris,
The following commits should bring the PRD support into the current vivid branch, using only pristine upstream changes:
d800ba1 powerpc/powernv: Move OPAL API definitions to opal-api.h d7cf83f powerpc/powernv: Move opal-api.h closer to the Skiboot version ed59190 powerpc/powernv: Add interfaces for flash device access 1cbb4a1 mtd: powernv: Add powernv flash MTD abstraction driver 48c0615 powerpc/powernv: Merge common platform device initialisation 594fcb9 powerpc/powernv: Expose OPAL APIs required by PRD interface 646b54f powerpc/powernv: Remove powernv RTAS support 0d7cd85 powerpc/powernv: Add opal-prd channel 7185795 powerpc/powernv: fix construction of opal PRD messages cdf2bc1 powerpc/include: Add opal-prd to installed uapi headers
(the last two are fixes that have hit mainline since the original merge)
However, we'll also need the changes in the actual merge commit to mainline:
commit df60f57684529a1dde4461cf84354453b440806a Merge: 605f302 b921e90 Author: Michael Ellerman <email address hidden> Date: Thu Mar 26 20:03:16 2015 +1100
Merge branch 'next-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc into test
Merge miscellaneous bits from benh. Fix a minor conflict with OpalMessageType changing names to opal_msg_type.
diff --cc arch/powerpc/include/asm/opal.h index 0ef0fd6,4ea21ea..c08de77 --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc/include/asm/opal.h @@@ -208,8 -946,10 +208,10 @@@ extern void hvc_opal_init_early(void) extern int opal_notifier_register(struct notifier_block *nb); extern int opal_notifier_unregister(struct notifier_block *nb);
-extern int opal_message_notifier_register(enum OpalMessageType msg_type, +extern int opal_message_notifier_register(enum opal_msg_type msg_type, struct notifier_block *nb); -extern int opal_message_notifier_unregister(enum OpalMessageType msg_type, ++extern int opal_message_notifier_unregister(enum opal_msg_type msg_type, + struct notifier_block *nb); extern void opal_notifier_enable(void); extern void opal_notifier_disable(void); extern void opal_notifier_update_evt(uint64_t evt_mask, uint64_t evt_val); diff --cc arch/powerpc/platforms/powernv/opal.c index 142a08a,8b3834a..d403b2b --- a/arch/powerpc/platforms/powernv/opal.c +++ b/arch/powerpc/platforms/powernv/opal.c @@@ -302,16 -305,11 +305,11 @@@ void opal_notifier_disable(void * Opal message notifier based on message type. Allow subscribers to get * notified for specific messgae type. */ -int opal_message_notifier_register(enum OpalMessageType msg_type, +int opal_message_notifier_register(enum opal_msg_type msg_type, struct notifier_block *nb) { - if (!nb) { - pr_warning("%s: Invalid argument (%p)\n", - __func__, nb); - return -EINVAL; - } - if (msg_type > OPAL_MSG_TYPE_MAX) { - pr_warning("%s: Invalid message type argument (%d)\n", + if (!nb || msg_type >= OPAL_MSG_TYPE_MAX) { + pr_warning("%s: Invalid arguments, msg_type:%d\n", __func__, msg_type); return -EINVAL; } @@@ -319,6 -318,13 +318,13 @@@ &opal_msg_notifier_head[msg_type], nb); }
-int opal_message_notifier_unregister(enum OpalMessageType msg_type, ++int opal_message_notifier_unregister(enum opal_msg_type msg_type, + struct notifier_block *nb) + { + return atomic_notifier_chain_unregister( + &opal_msg_notifier_head[msg_type], nb); + } + static void opal_message_do_notify(uint32_t msg_type, void *msg) { /* notify subscribers */
- but I'm not sure how you'd prefer to apply this diff from a merge.
Hi Chris,
The following commits should bring the PRD support into the current vivid branch, using only pristine upstream changes:
d800ba1 powerpc/powernv: Move OPAL API definitions to opal-api.h
d7cf83f powerpc/powernv: Move opal-api.h closer to the Skiboot version
ed59190 powerpc/powernv: Add interfaces for flash device access
1cbb4a1 mtd: powernv: Add powernv flash MTD abstraction driver
48c0615 powerpc/powernv: Merge common platform device initialisation
594fcb9 powerpc/powernv: Expose OPAL APIs required by PRD interface
646b54f powerpc/powernv: Remove powernv RTAS support
0d7cd85 powerpc/powernv: Add opal-prd channel
7185795 powerpc/powernv: fix construction of opal PRD messages
cdf2bc1 powerpc/include: Add opal-prd to installed uapi headers
(the last two are fixes that have hit mainline since the original merge)
However, we'll also need the changes in the actual merge commit to mainline:
commit df60f57684529a1 dde4461cf843544 53b440806a
Merge: 605f302 b921e90
Author: Michael Ellerman <email address hidden>
Date: Thu Mar 26 20:03:16 2015 +1100
Merge branch 'next-misc' of git://git. kernel. org/pub/ scm/linux/ kernel/ git/benh/ powerpc into test
Merge miscellaneous bits from benh. Fix a minor conflict with
OpalMessageType changing names to opal_msg_type.
diff --cc arch/powerpc/ include/ asm/opal. h 4ea21ea. .c08de77 powerpc/ include/ asm/opal. h powerpc/ include/ asm/opal. h init_early( void) register( struct notifier_block *nb); unregister( struct notifier_block *nb);
index 0ef0fd6,
--- a/arch/
+++ b/arch/
@@@ -208,8 -946,10 +208,10 @@@ extern void hvc_opal_
extern int opal_notifier_
extern int opal_notifier_
-extern int opal_message_ notifier_ register( enum OpalMessageType msg_type, notifier_ register( enum opal_msg_type msg_type, notifier_ unregister( enum OpalMessageType msg_type, notifier_ unregister( enum opal_msg_type msg_type, enable( void); disable( void); update_ evt(uint64_ t evt_mask, uint64_t evt_val); platforms/ powernv/ opal.c 8b3834a. .d403b2b powerpc/ platforms/ powernv/ opal.c powerpc/ platforms/ powernv/ opal.c disable( void notifier_ register( enum OpalMessageType msg_type, notifier_ register( enum opal_msg_type msg_type, opal_msg_ notifier_ head[msg_ type], nb);
+extern int opal_message_
struct notifier_block *nb);
-extern int opal_message_
++extern int opal_message_
+ struct notifier_block *nb);
extern void opal_notifier_
extern void opal_notifier_
extern void opal_notifier_
diff --cc arch/powerpc/
index 142a08a,
--- a/arch/
+++ b/arch/
@@@ -302,16 -305,11 +305,11 @@@ void opal_notifier_
* Opal message notifier based on message type. Allow subscribers to get
* notified for specific messgae type.
*/
-int opal_message_
+int opal_message_
struct notifier_block *nb)
{
- if (!nb) {
- pr_warning("%s: Invalid argument (%p)\n",
- __func__, nb);
- return -EINVAL;
- }
- if (msg_type > OPAL_MSG_TYPE_MAX) {
- pr_warning("%s: Invalid message type argument (%d)\n",
+ if (!nb || msg_type >= OPAL_MSG_TYPE_MAX) {
+ pr_warning("%s: Invalid arguments, msg_type:%d\n",
__func__, msg_type);
return -EINVAL;
}
@@@ -319,6 -318,13 +318,13 @@@
&
}
-int opal_message_ notifier_ unregister( enum OpalMessageType msg_type, notifier_ unregister( enum opal_msg_type msg_type, notifier_ chain_unregiste r( notifier_ head[msg_ type], nb); do_notify( uint32_ t msg_type, void *msg)
++int opal_message_
+ struct notifier_block *nb)
+ {
+ return atomic_
+ &opal_msg_
+ }
+
static void opal_message_
{
/* notify subscribers */
- but I'm not sure how you'd prefer to apply this diff from a merge.