linux-next: build failure after merge of the driver-core tree
Mark Brown
maintainerHi Greg,
After merging the driver-core tree, today's linux-next build () failed like this on a PowerPC defconfig:
HEAD is now at ceb98e684dec Merge remote-tracking branch 'driver-core/driver-core-next'
GEN /home/broonie/next/powerpc_ppc64_defconfig/Makefile
#
# configuration written to .config # /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c: In function 'elog_ack_store': /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c:84:2: error: implicit declaration of function 'sysfs_schedule_callback' [-Werror=implicit-function-declaration] sysfs_schedule_callback(&elog_obj->kobj, delay_release_kobj, ^ cc1: all warnings being treated as errors make[3]: *** [arch/powerpc/platforms/powernv/opal-elog.o] Error 1 make[3]: *** Waiting for unfinished jobs.... /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c: In function 'dump_ack_store': /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c:100:2: error: implicit declaration of function 'sysfs_schedule_callback' [-Werror=implicit-function-declaration] sysfs_schedule_callback(&dump_obj->kobj, delay_release_kobj, ^ cc1: all warnings being treated as errors
due to an interaction between d1ba277e7988908 (sysfs, driver-core: remove unused {sysfs|device}_schedule_callback_owner()) and 774fea1a38c6a5a8 (powerpc/powernv: Read OPAL error log and export it through sysfs) from the PowerPC tree.
I reverted 774fea1a38c6a5a8 for today.
Quoted 23 lines · Mark Brown
Hi Greg,
After merging the driver-core tree, today's linux-next build () failed like this on a PowerPC defconfig:
HEAD is now at
ceb98e684decMerge remote-tracking branch 'driver-core/driver-core-next'
GEN/home/broonie/next/powerpc_ppc64_defconfig/Makefile
## configuration written to .config # /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c: In function 'elog_ack_store': /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c:84:2: error: implicit declaration of function 'sysfs_schedule_callback' [-Werror=implicit-function-declaration] sysfs_schedule_callback(&elog_obj->kobj, delay_release_kobj, ^ cc1: all warnings being treated as errors make[3]: *** [arch/powerpc/platforms/powernv/opal-elog.o] Error 1 make[3]: *** Waiting for unfinished jobs.... /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c: In function 'dump_ack_store': /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c:100:2: error: implicit declaration of function 'sysfs_schedule_callback' [-Werror=implicit-function-declaration] sysfs_schedule_callback(&dump_obj->kobj, delay_release_kobj, ^ cc1: all warnings being treated as errors
Quoted 3 lines
due to an interaction between
d1ba277e7988908(sysfs, driver-core: remove unused {sysfs|device}_schedule_callback_owner()) and774fea1a38c6a5a8(powerpc/powernv: Read OPAL error log and export it through sysfs) from the PowerPC tree.I reverted
774fea1a38c6a5a8for today.
Sounds like the powerpc tree also needs to stop using this function :)
thanks,
greg k-h
Quoted 24 lines · Greg KH
Quoted 23 lines · Mark Brown
Hi Greg,
After merging the driver-core tree, today's linux-next build () failed like this on a PowerPC defconfig:
HEAD is now at
ceb98e684decMerge remote-tracking branch 'driver-core/driver-core-next'
GEN/home/broonie/next/powerpc_ppc64_defconfig/Makefile
## configuration written to .config # /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c: In function 'elog_ack_store': /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c:84:2: error: implicit declaration of function 'sysfs_schedule_callback' [-Werror=implicit-function-declaration] sysfs_schedule_callback(&elog_obj->kobj, delay_release_kobj, ^ cc1: all warnings being treated as errors make[3]: *** [arch/powerpc/platforms/powernv/opal-elog.o] Error 1 make[3]: *** Waiting for unfinished jobs.... /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c: In function 'dump_ack_store': /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c:100:2: error: implicit declaration of function 'sysfs_schedule_callback' [-Werror=implicit-function-declaration] sysfs_schedule_callback(&dump_obj->kobj, delay_release_kobj, ^ cc1: all warnings being treated as errors
Quoted 5 lines
Quoted 3 lines
due to an interaction between
d1ba277e7988908(sysfs, driver-core: remove unused {sysfs|device}_schedule_callback_owner()) and774fea1a38c6a5a8(powerpc/powernv: Read OPAL error log and export it through sysfs) from the PowerPC tree.I reverted
774fea1a38c6a5a8for today.Sounds like the powerpc tree also needs to stop using this function :)
powerpc -next is a never-rebase branch, so we are somewhat stuffed here.
How do you suggest we proceed ? I can't add a fix to powerpc-next to use the new function since it doesn't exist upstream yet. I would have to pull drivers-core-next in which I really don't want to do....
Can the removal of the function be delayed to -rc1 so we can properly do the fixup ? Or do you have the introduction of the new function in a topic branch I can pull in without the rest of drivers-core-next ?
Cheers,
Ben.
Mark Brown
maintainerQuoted 7 lines · Benjamin Herrenschmidt
How do you suggest we proceed ? I can't add a fix to powerpc-next to use the new function since it doesn't exist upstream yet. I would have to pull drivers-core-next in which I really don't want to do....
Can the removal of the function be delayed to -rc1 so we can properly do the fixup ? Or do you have the introduction of the new function in a topic branch I can pull in without the rest of drivers-core-next ?
The delay would have been my first suggestion - otherwise I'd not be surprised to see this coming up again. Perhaps change to tagging the APIs as deprecated for now (so any futher new users get flagged up) would help.
Quoted 6 lines · Mark Brown
Quoted 3 lines · Benjamin Herrenschmidt
How do you suggest we proceed ? I can't add a fix to powerpc-next to use the new function since it doesn't exist upstream yet. I would have to pull drivers-core-next in which I really don't want to do....
Quoted 8 lines
Quoted 3 lines
Can the removal of the function be delayed to -rc1 so we can properly do the fixup ? Or do you have the introduction of the new function in a topic branch I can pull in without the rest of drivers-core-next ?
The delay would have been my first suggestion - otherwise I'd not be surprised to see this coming up again. Perhaps change to tagging the APIs as deprecated for now (so any futher new users get flagged up) would help.
Either that or I can put a copy of the patch that introduces the new function in my tree as long as it's a single patch. The resulting conflict should resolve trivially and Linus should be fine if appropriate explanations are provided (though I would have preferred pulling in a topic branch).
Greg, how do you want to proceed ?
Cheers,
Ben.
Quoted 5 lines · Benjamin Herrenschmidt
Either that or I can put a copy of the patch that introduces the new function in my tree as long as it's a single patch. The resulting conflict should resolve trivially and Linus should be fine if appropriate explanations are provided (though I would have preferred pulling in a topic branch).
An alternative that I personally prefer to resolve conflicts like this is to pull driver-core-next into the broken tree and resolve it there. It's highly likely that the pending changes are gonna be included in the next merge window. If contaminating the merge history is a concern, it can live in a separate branch which is pulled into for-next.
Thanks.
Signature · 1 line
tejun
Quoted 7 lines · Tejun Heo
Quoted 5 lines · Benjamin Herrenschmidt
Either that or I can put a copy of the patch that introduces the new function in my tree as long as it's a single patch. The resulting conflict should resolve trivially and Linus should be fine if appropriate explanations are provided (though I would have preferred pulling in a topic branch).
Quoted 6 lines
An alternative that I personally prefer to resolve conflicts like this is to pull driver-core-next into the broken tree and resolve it there. It's highly likely that the pending changes are gonna be included in the next merge window. If contaminating the merge history is a concern, it can live in a separate branch which is pulled into for-next.
It's generally consider bad taste to pull entire trees into each other :-) I know Stephen isn't fan of it...
I'd rather have just that series (or even better, just the patches introducing the new function) in a topic branch, itself pulled into both driver-core-next and my tree.
Can you produce that ? (I need a non-rebase guarantee though).
Cheers,
Ben.
Hello,
Quoted 2 lines · Benjamin Herrenschmidt
It's generally consider bad taste to pull entire trees into each other :-) I know Stephen isn't fan of it...
I wouldn't say it's considered "generally" bad taste. For one-off changes, maybe. This was a rather large restructuring of the whole thing, so actually duplicating all the rather significant commits would be a lot worse.
Quoted 5 lines
I'd rather have just that series (or even better, just the patches introducing the new function) in a topic branch, itself pulled into both driver-core-next and my tree.
Can you produce that ? (I need a non-rebase guarantee though).
It's a series of rather complex patches. I really don't think duplicating them is a good idea. We can either resurrect the old API to kill it again or set up a merge branch which I don't think is too unusual in situations like this.
Thanks.
Signature · 1 line
tejun
Quoted 4 lines · Tejun Heo
It's a series of rather complex patches. I really don't think duplicating them is a good idea. We can either resurrect the old API to kill it again or set up a merge branch which I don't think is too unusual in situations like this.
Right, a topic branch that gets merged in both driver-core-next and powerpc-next.
Cheers,
Ben.
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 4 lines · Tejun Heo
It's a series of rather complex patches. I really don't think duplicating them is a good idea. We can either resurrect the old API to kill it again or set up a merge branch which I don't think is too unusual in situations like this.
Right, a topic branch that gets merged in both driver-core-next and powerpc-next.
Just want to make sure we agree ... ie, the offending commit is already in powerpc-next on my side and I can't really back it out (I could revert it though).
Cheers,
Ben.
Hello,
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 6 lines · Benjamin Herrenschmidt
Quoted 4 lines · Tejun Heo
It's a series of rather complex patches. I really don't think duplicating them is a good idea. We can either resurrect the old API to kill it again or set up a merge branch which I don't think is too unusual in situations like this.
Quoted 6 lines
Quoted 2 lines
Right, a topic branch that gets merged in both driver-core-next and powerpc-next.
Just want to make sure we agree ... ie, the offending commit is already in powerpc-next on my side and I can't really back it out (I could revert it though).
Hmmm... reverting may be an option too but I don't think fixing it retroactively in a new branch should be okay too.
Thanks.
Signature · 1 line
tejun
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 6 lines · Benjamin Herrenschmidt
Quoted 4 lines · Tejun Heo
It's a series of rather complex patches. I really don't think duplicating them is a good idea. We can either resurrect the old API to kill it again or set up a merge branch which I don't think is too unusual in situations like this.
Quoted 6 lines
Quoted 2 lines
Right, a topic branch that gets merged in both driver-core-next and powerpc-next.
Just want to make sure we agree ... ie, the offending commit is already in powerpc-next on my side and I can't really back it out (I could revert it though).
You can pull in driver-core-next into your tree if you want, it's not going to be reverted, and will be sent to Linus for 3.15-rc1, so you can base your work on it and fix up the api usage in your tree that way.
thanks,
greg k-h
Quoted 11 lines · Greg KH
Quoted 10 lines · Benjamin Herrenschmidt
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 4 lines · Tejun Heo
It's a series of rather complex patches. I really don't think duplicating them is a good idea. We can either resurrect the old API to kill it again or set up a merge branch which I don't think is too unusual in situations like this.
Right, a topic branch that gets merged in both driver-core-next and powerpc-next.
Quoted 7 lines
Quoted 3 lines
Just want to make sure we agree ... ie, the offending commit is already in powerpc-next on my side and I can't really back it out (I could revert it though).
You can pull in driver-core-next into your tree if you want, it's not going to be reverted, and will be sent to Linus for 3.15-rc1, so you can base your work on it and fix up the api usage in your tree that way.
It's messy. Stephen really doesn't like if we pull each other trees like that unless they are topic branches. He also doesn't like when we keep pulling Linus in.
For example I purposefully kept powerpc -next on top of rc2. You seem to regularly merge subsequent rc's into driver-core-next. So by pulling your tree I would bring a whole lot of stuff on top of mine, which is fine by git but makes histories more complicated and annoys Stephen.
I might still do it this time around, because the other solution for me is revert + re-apply with fixups on top of a separate branch itself derived from driver-core-next and send multiple pull requests to Linus, and that's messy too. The question is which one is more :-)
Cheers,
Ben.
Quoted 8 lines
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 16 lines · Benjamin Herrenschmidt
Quoted 15 lines · Greg KH
Quoted 13 lines · Benjamin Herrenschmidt
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 4 lines · Tejun Heo
It's a series of rather complex patches. I really don't think duplicating them is a good idea. We can either resurrect the old API to kill it again or set up a merge branch which I don't think is too unusual in situations like this.
Right, a topic branch that gets merged in both driver-core-next and powerpc-next.
Just want to make sure we agree ... ie, the offending commit is already in powerpc-next on my side and I can't really back it out (I could revert it though).
Quoted 7 lines
Quoted 3 lines
You can pull in driver-core-next into your tree if you want, it's not going to be reverted, and will be sent to Linus for 3.15-rc1, so you can base your work on it and fix up the api usage in your tree that way.
It's messy. Stephen really doesn't like if we pull each other trees like that unless they are topic branches. He also doesn't like when we keep pulling Linus in.
I only pull Linus in after a -rc in which I have merged patches with him for that "topic". Otherwise I end up with merge issues, and for testing reasons, I want those fixes from Linus and from me, in order to keep people from hitting the same already-fixes issues.
Quoted 9 lines
For example I purposefully kept powerpc -next on top of rc2. You seem to regularly merge subsequent rc's into driver-core-next. So by pulling your tree I would bring a whole lot of stuff on top of mine, which is fine by git but makes histories more complicated and annoys Stephen.
I might still do it this time around, because the other solution for me is revert + re-apply with fixups on top of a separate branch itself derived from driver-core-next and send multiple pull requests to Linus, and that's messy too. The question is which one is more :-)
Just take my tree, it's not a big deal, I'll merge first with Linus if you want and then everything is simple.
thanks,
greg k-h-
Quoted 2 lines · Greg KH
Just take my tree, it's not a big deal, I'll merge first with Linus if you want and then everything is simple.
Yup, I'll do that. Thanks.
Cheers,
Ben.
Hi Greg,
Quoted 11 lines · On Sat, 15 Mar 2014 05:29:42 +0000 Greg KH <[email protected]> wrote:
Quoted 4 lines · Benjamin Herrenschmidt
It's messy. Stephen really doesn't like if we pull each other trees like that unless they are topic branches. He also doesn't like when we keep pulling Linus in.
I only pull Linus in after a -rc in which I have merged patches with him for that "topic". Otherwise I end up with merge issues, and for testing reasons, I want those fixes from Linus and from me, in order to keep people from hitting the same already-fixes issues.
Maybe you should consider instead just merging the branch you asked Linus' to merge instead of back merging his whole -rc ... especially when the merge commit message is usually just something like "We want those fixes here for testing and development" which doesn't actually tell us anything very useful.
Your trees always have lots of back merges of Linus' tree in them and I don't know why Linus has not complained about it before now (or at least explained to you why we normally don't do that).
Quoted 1 line
Just take my tree, it's not a big deal,
Except, of course, you are completely discounting any testing that Ben has done on his tree that could be invalidated and/or complicated by pulling in so much more of Linus' tree at this point of the cycle. And it complicates the git history even more than just your trees already do.
/me is a bit cross after such a nice holiday in HobbitLand and may need to take deep breath :-(
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]
Quoted 21 lines · Stephen Rothwell
Hi Greg,
Quoted 11 lines · On Sat, 15 Mar 2014 05:29:42 +0000 Greg KH <[email protected]> wrote:
Quoted 4 lines · Benjamin Herrenschmidt
It's messy. Stephen really doesn't like if we pull each other trees like that unless they are topic branches. He also doesn't like when we keep pulling Linus in.
I only pull Linus in after a -rc in which I have merged patches with him for that "topic". Otherwise I end up with merge issues, and for testing reasons, I want those fixes from Linus and from me, in order to keep people from hitting the same already-fixes issues.
Maybe you should consider instead just merging the branch you asked Linus' to merge instead of back merging his whole -rc ... especially when the merge commit message is usually just something like "We want those fixes here for testing and development" which doesn't actually tell us anything very useful.
Quoted 3 lines
Your trees always have lots of back merges of Linus' tree in them and I don't know why Linus has not complained about it before now (or at least explained to you why we normally don't do that).
No, I don't like merging at "unknown" points in the tree, I only merge back at the -rc point as that is a "known good" version of Linus's tree.
And I only do the merge if I have patches that have been accepted in Linus's tree for that tree (usb, staging, tty, etc.) as almost always, if I don't, I get merge issues (as you find out all the time), and those bugfixes that go into Linus's tree, I want them in the -next branch as well so that the developers running those branches don't have the problems that those fixes resolved.
Quoted 6 lines
Quoted 1 line
Just take my tree, it's not a big deal,
Except, of course, you are completely discounting any testing that Ben has done on his tree that could be invalidated and/or complicated by pulling in so much more of Linus' tree at this point of the cycle. And it complicates the git history even more than just your trees already do.
If Ben's testing is somehow "invalidated" by moving to a newer -rc release, then when would that testing have ever happened? -rc merges should always be safe to do, otherwise you probably have problems in your code that Linus will later run into when you ask him to pull for -rc1.
thanks,
greg k-h
Hi Greg,
Quoted 24 lines · On Tue, 11 Mar 2014 18:50:21 -0700 Greg KH <[email protected]> wrote:
Quoted 22 lines · Mark Brown
After merging the driver-core tree, today's linux-next build () failed like this on a PowerPC defconfig:
HEAD is now at
ceb98e684decMerge remote-tracking branch 'driver-core/driver-core-next'
GEN/home/broonie/next/powerpc_ppc64_defconfig/Makefile
## configuration written to .config # /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c: In function 'elog_ack_store': /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c:84:2: error: implicit declaration of function 'sysfs_schedule_callback' [-Werror=implicit-function-declaration] sysfs_schedule_callback(&elog_obj->kobj, delay_release_kobj, ^ cc1: all warnings being treated as errors make[3]: *** [arch/powerpc/platforms/powernv/opal-elog.o] Error 1 make[3]: *** Waiting for unfinished jobs.... /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c: In function 'dump_ack_store': /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c:100:2: error: implicit declaration of function 'sysfs_schedule_callback' [-Werror=implicit-function-declaration] sysfs_schedule_callback(&dump_obj->kobj, delay_release_kobj, ^ cc1: all warnings being treated as errors
Quoted 5 lines
Quoted 3 lines
due to an interaction between
d1ba277e7988908(sysfs, driver-core: remove unused {sysfs|device}_schedule_callback_owner()) and774fea1a38c6a5a8(powerpc/powernv: Read OPAL error log and export it through sysfs) from the PowerPC tree.I reverted
774fea1a38c6a5a8for today.Sounds like the powerpc tree also needs to stop using this function :)
So, explain to us in detail why the old interface could not be maintained for a release, please. I thought we had become a bit more sophisticated about changing core APIs i.e. introduce the new API - fix up all the users - keep the old one around if possible for a release (or beyond -rc1) to catch the new users.
It may be that there is a good reason not to so this in this case, but it is not explained as far as I can see.
Alternatively, it looks as though there may be a fairly trivial transform from using the old interface to using the new one which could be applied as part of the merge of these two trees (in linux-next and then in Linus' tree during the merge window). Maybe you or Tejun should have explained that and provided a prototype for the merge fix up.
Greg, you are doing core infrastructure changes in your trees - you need to consider that new usages may be introduced while those changes are ongoing.
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]
Quoted 33 lines · Stephen Rothwell
Hi Greg,
Quoted 24 lines · On Tue, 11 Mar 2014 18:50:21 -0700 Greg KH <[email protected]> wrote:
Quoted 22 lines · Mark Brown
After merging the driver-core tree, today's linux-next build () failed like this on a PowerPC defconfig:
HEAD is now at
ceb98e684decMerge remote-tracking branch 'driver-core/driver-core-next'
GEN/home/broonie/next/powerpc_ppc64_defconfig/Makefile
## configuration written to .config # /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c: In function 'elog_ack_store': /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c:84:2: error: implicit declaration of function 'sysfs_schedule_callback' [-Werror=implicit-function-declaration] sysfs_schedule_callback(&elog_obj->kobj, delay_release_kobj, ^ cc1: all warnings being treated as errors make[3]: *** [arch/powerpc/platforms/powernv/opal-elog.o] Error 1 make[3]: *** Waiting for unfinished jobs.... /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c: In function 'dump_ack_store': /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c:100:2: error: implicit declaration of function 'sysfs_schedule_callback' [-Werror=implicit-function-declaration] sysfs_schedule_callback(&dump_obj->kobj, delay_release_kobj, ^ cc1: all warnings being treated as errorsQuoted 5 lines
Quoted 3 lines
due to an interaction between
d1ba277e7988908(sysfs, driver-core: remove unused {sysfs|device}_schedule_callback_owner()) and774fea1a38c6a5a8(powerpc/powernv: Read OPAL error log and export it through sysfs) from the PowerPC tree.I reverted
774fea1a38c6a5a8for today.Sounds like the powerpc tree also needs to stop using this function :)
Quoted 8 lines
So, explain to us in detail why the old interface could not be maintained for a release, please. I thought we had become a bit more sophisticated about changing core APIs i.e. introduce the new API - fix up all the users - keep the old one around if possible for a release (or beyond -rc1) to catch the new users.
It may be that there is a good reason not to so this in this case, but it is not explained as far as I can see.
There were only 3 (or 4), users of this api, and no new ones had been added in _years_, it's a very obscure thing, and odds are, it wouldn't ever be added again, especially as it was just removed entirely not being needed anymore. And I'd argue, it's something that you shouldn't have even been doing in the first place, so why a new user of it was added now is quite strange to me.
thanks,
greg k-h
Quoted 6 lines · Greg KH
There were only 3 (or 4), users of this api, and no new ones had been added in _years_, it's a very obscure thing, and odds are, it wouldn't ever be added again, especially as it was just removed entirely not being needed anymore. And I'd argue, it's something that you shouldn't have even been doing in the first place, so why a new user of it was added now is quite strange to me.
Actually that's a good question. Is there a better way for us than to use this API ? Essentially we use that because it's our understanding that it is what is needed for a sysfs file that can remove its parent directory from within a write() op.
We followed the driver "remove" implementation as an example.
The reason the opal elog and dump patches use it is that those two patches add sysfs interface that represent the error logs (and platform dumps but you can treat the latter as some kind of special case of error logs) from the service processor in sysfs.
So for each log we create a dir (kobject) which we populate with a few things like the log unique ID, raw data, etc.... and a file that can be used to "ack" the log with the service processor.
The latter has the effect of removing it. This is done by the collection daemon after it has confirmed that the error log has been stored to disk and properly flushed.
Is there a better interface ? Can we implement for example unlink() on the kobject itself ? IE. Do the ack by essentially having userspace rm the directory ? :-)
Now regarding the practicals of sorting out our trees, Stephen suggested that rather than doing anything on my side (heh, I like that !), you should revert the last patch of the series, the one removing the old API, in your tree.
It can then be re-applied later around rc1.
Cheers,
Ben.
Quoted 25 lines · Benjamin Herrenschmidt
Quoted 6 lines · Greg KH
There were only 3 (or 4), users of this api, and no new ones had been added in _years_, it's a very obscure thing, and odds are, it wouldn't ever be added again, especially as it was just removed entirely not being needed anymore. And I'd argue, it's something that you shouldn't have even been doing in the first place, so why a new user of it was added now is quite strange to me.
Actually that's a good question. Is there a better way for us than to use this API ? Essentially we use that because it's our understanding that it is what is needed for a sysfs file that can remove its parent directory from within a
write()op.We followed the driver "remove" implementation as an example.
The reason the opal elog and dump patches use it is that those two patches add sysfs interface that represent the error logs (and platform dumps but you can treat the latter as some kind of special case of error logs) from the service processor in sysfs.
So for each log we create a dir (kobject) which we populate with a few things like the log unique ID, raw data, etc.... and a file that can be used to "ack" the log with the service processor.
Quoted 7 lines
The latter has the effect of removing it. This is done by the collection daemon after it has confirmed that the error log has been stored to disk and properly flushed.
Is there a better interface ? Can we implement for example
unlink()on the kobject itself ? IE. Do the ack by essentially having userspace rm the directory ? :-)
No you can't, sorry.
And this seems like a huge abuse of sysfs, you better be using binary sysfs files for your log data...
Do you have a pointer to where you document this sysfs api in Documentation/ABI/ ?
Quoted 6 lines
Now regarding the practicals of sorting out our trees, Stephen suggested that rather than doing anything on my side (heh, I like that !), you should revert the last patch of the series, the one removing the old API, in your tree.
It can then be re-applied later around rc1.
I'll look to see if we can do that, let me dig it up out of my tree...
thanks,
greg k-h
Hello,
Quoted 8 lines · Greg KH
Quoted 6 lines
Now regarding the practicals of sorting out our trees, Stephen suggested that rather than doing anything on my side (heh, I like that !), you should revert the last patch of the series, the one removing the old API, in your tree.
It can then be re-applied later around rc1.
I'll look to see if we can do that, let me dig it up out of my tree...
I think this is being blown out of proportion. It was a rarely used API and converting to the new one is mostly trivial which can be easily done as a merge fix, which is what it is. Seriously, following protocols is beneficial upto certain point but we don't want DMV level beaurocracy in handling patches and there's something wrong when the first questions for merge conflict in devel branches which comes up are not "what's this change and what would it take to resolve it?" but those of strict adherences to protocol.
Can we please take a step back and look at what we're doing? This was a change of API which was used very obscure and haven't seen new users for years. It is well within the scope of normal (and efficient) patch routing to route it directly without separate staging release. It sure developed a conflict but there's nothing wrong to that. We don't even want to try to eliminate all the conflicts. That'd be a lot of extra effort for no actual gain and simply a stupid trade-off.
This is a merge conflict well with in the scope of what we can expect to happen with distributed development and this whole thing works as well as it does only because we can make *sensible* trade offs not only in code itself but also in how we resolve conflicts among different branches.
Thanks.
Signature · 1 line
tejun
Quoted 2 lines · Tejun Heo
I think this is being blown out of proportion. It was a rarely used API and converting to the new one is mostly trivial which can be
So, looked at the failed code. The only necessary change seems to be calling device_remove_file_self() in dump_ack_store() and then doing kobject_put() directly afterwards, which would have been completely fine as a merge fix patch.
Just to be clear, I'm not necessarily against reverting the removal of the API. The removal was based on the speculation that this isn't likely to cause trouble. The speculation was perfectly reasonable but being a speculation it failed, so we take actions to remedy that and we *do* want to do things that way. Reverting the removal can sure be one choice but the way that choice is being made here seems completely wrong to me. There's no technical evaluation whatsoever. I'd really hate to work in an environment where taking active trade off is discouraged replaced with blind policy enforcement.
Thanks.
Signature · 1 line
tejun
Quoted 8 lines · Tejun Heo
Quoted 2 lines · Tejun Heo
I think this is being blown out of proportion. It was a rarely used API and converting to the new one is mostly trivial which can be
So, looked at the failed code. The only necessary change seems to be calling
device_remove_file_self()indump_ack_store()and then doingkobject_put()directly afterwards, which would have been completely fine as a merge fix patch.
I had a quick look too and this seems correct (at least if my reading on howto use sysfs APIs is correct).
I'm happy to post a patch somewhere - I guess it's easiest if the removal waits for one linus merge things cycle and then I can get fix and removal in? I'm not too fussed.
Quoted 9 lines
Just to be clear, I'm not necessarily against reverting the removal of the API. The removal was based on the speculation that this isn't likely to cause trouble. The speculation was perfectly reasonable but being a speculation it failed, so we take actions to remedy that and we *do* want to do things that way. Reverting the removal can sure be one choice but the way that choice is being made here seems completely wrong to me. There's no technical evaluation whatsoever. I'd really hate to work in an environment where taking active trade off is discouraged replaced with blind policy enforcement.
I use an API and it changes/disappears - it's a gift I have :)
Quoted 4 lines · Tejun Heo
So, looked at the failed code. The only necessary change seems to be calling
device_remove_file_self()indump_ack_store()and then doingkobject_put()directly afterwards, which would have been completely fine as a merge fix patch.
Ok. Since there's no merge error, I'll have to tell Linus explicitly to apply it during the merge. I've never done that before but I suppose it's doable.
Quoted 9 lines
Just to be clear, I'm not necessarily against reverting the removal of the API. The removal was based on the speculation that this isn't likely to cause trouble. The speculation was perfectly reasonable but being a speculation it failed, so we take actions to remedy that and we *do* want to do things that way. Reverting the removal can sure be one choice but the way that choice is being made here seems completely wrong to me. There's no technical evaluation whatsoever. I'd really hate to work in an environment where taking active trade off is discouraged replaced with blind policy enforcement.
Sorry I don't understand. Reverting the removal until after -rc1 (or later in the merge window) is the easiest path from my perspective and ensure no bisection breakage but whatever Linus prefers works here.
I don't think it's a drastic action or anything like that. It can trivially be re-applied once the merge window has settled. But I'm happy to also just send Linus a "apply this as a merge fixup" patch if he's happy with the method (as I said, I've never done that before on something that doesn't have an actual merge conflict to begin with)
Cheers,
Ben.
Hello, Ben.
Quoted 9 lines · Benjamin Herrenschmidt
Quoted 4 lines · Tejun Heo
So, looked at the failed code. The only necessary change seems to be calling
device_remove_file_self()indump_ack_store()and then doingkobject_put()directly afterwards, which would have been completely fine as a merge fix patch.Ok. Since there's no merge error, I'll have to tell Linus explicitly to apply it during the merge. I've never done that before but I suppose it's doable.
Yeah, that should be fine. For the next tree, including the fix patch in a temp branch and pulling that into your for-next branch should work fine.
Quoted 3 lines
Sorry I don't understand. Reverting the removal until after -rc1 (or later in the merge window) is the easiest path from my perspective and ensure no bisection breakage but whatever Linus prefers works here.
Merge fix doesn't cause any bisection issue either (because it *is* a merge problem after all). It could be just my personal preference but I'd handle this one as merge fix. If we rever the removal of the interface, we'll probably need to mark it deprecated too as people tend to fork off their devel branches before or at rc1.
Quoted 5 lines
I don't think it's a drastic action or anything like that. It can trivially be re-applied once the merge window has settled. But I'm happy to also just send Linus a "apply this as a merge fixup" patch if he's happy with the method (as I said, I've never done that before on something that doesn't have an actual merge conflict to begin with)
Sure, either should work.
Thanks.
Signature · 1 line
tejun
Quoted 30 lines · Greg KH
Quoted 29 lines · Benjamin Herrenschmidt
Quoted 6 lines · Greg KH
There were only 3 (or 4), users of this api, and no new ones had been added in _years_, it's a very obscure thing, and odds are, it wouldn't ever be added again, especially as it was just removed entirely not being needed anymore. And I'd argue, it's something that you shouldn't have even been doing in the first place, so why a new user of it was added now is quite strange to me.
Actually that's a good question. Is there a better way for us than to use this API ? Essentially we use that because it's our understanding that it is what is needed for a sysfs file that can remove its parent directory from within a
write()op.We followed the driver "remove" implementation as an example.
The reason the opal elog and dump patches use it is that those two patches add sysfs interface that represent the error logs (and platform dumps but you can treat the latter as some kind of special case of error logs) from the service processor in sysfs.
So for each log we create a dir (kobject) which we populate with a few things like the log unique ID, raw data, etc.... and a file that can be used to "ack" the log with the service processor.
The latter has the effect of removing it. This is done by the collection daemon after it has confirmed that the error log has been stored to disk and properly flushed.
Quoted 8 lines
Quoted 3 lines
Is there a better interface ? Can we implement for example
unlink()on the kobject itself ? IE. Do the ack by essentially having userspace rm the directory ? :-)No you can't, sorry.
And this seems like a huge abuse of sysfs, you better be using binary sysfs files for your log data...
We are. It's a binary format we get from the service processor that we then parse in userspace.
Seeing as each of these log entries is a separate thing that can be retrieved and acknowledged to the service processor, it seemed fitting to have each of them exposed to userspace so that policy can be dictated there (acking them removes them from FSP and we have use cases for peeking at them)
If there's a better way, I'd be interested in hearing it - it appeared to be relatively good fit for sysfs (no sysadmin overhead, busybox has enough utility to semi-meaningfully poke at it).
Quoted 2 lines
Do you have a pointer to where you document this sysfs api in
Documentation/ABI/?
Yes:
- Documentation/ABI/stable/sysfs-firmware-opal-dump
- Documentation/ABI/stable/sysfs-firmware-opal-elog
Quoted 8 lines
Quoted 6 lines
Now regarding the practicals of sorting out our trees, Stephen suggested that rather than doing anything on my side (heh, I like that !), you should revert the last patch of the series, the one removing the old API, in your tree.
It can then be re-applied later around rc1.
I'll look to see if we can do that, let me dig it up out of my tree...
Thanks. The new API looks like it should work fine for us, I'll be sure to covert my API usage and let you know.
Quoted 7 lines · Greg KH
No you can't, sorry.
And this seems like a huge abuse of sysfs, you better be using binary sysfs files for your log data...
Do you have a pointer to where you document this sysfs api in
Documentation/ABI/?
Yes, the patch adds the documentation along with the facility, I've attached the doc file to this email.
This is a wrapper on top of firmware interfaces, in a way we are following ACPI precedent of exposing a bunch of things via sysfs, which also happen to be a simple and very convenient way of doing it.
The log itself is a binary attribute in PEL format (or SEL when we support that), we have a userspace parser.
Quoted 8 lines
Quoted 6 lines
Now regarding the practicals of sorting out our trees, Stephen suggested that rather than doing anything on my side (heh, I like that !), you should revert the last patch of the series, the one removing the old API, in your tree.
It can then be re-applied later around rc1.
I'll look to see if we can do that, let me dig it up out of my tree...
Thanks. That's how Stephen is fixing it up in -next at the moment.
Cheers,
Ben.
Quoted 8 lines
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
What: /sys/firmware/opal/elog
Date: Feb 2014
Contact: Stewart Smith <[email protected]>
Description:
This directory exposes error log entries retrieved through the OPAL firmware interface.
Each error log is identified by a unique ID and will exist until explicitly acknowledged to firmware.
Each log entry has a directory in /sys/firmware/opal/elog.
Log entries may be purged by the service processor before retrieved by firmware or retrieved/acknowledged by Linux if there is no room for more log entries.
In the event that Linux has retrieved the log entries but not explicitly acknowledged them to firmware and the service processor needs more room for log entries, the only remaining copy of a log message may be in Linux.
Typically, a user space daemon will monitor for new entries, read them out and acknowledge them.
The service processor may be able to store more log entries than firmware can, so after you acknowledge an event from Linux you may instantly get another one from the queue that was generated some time in the past.
The raw log format is a binary format. We currently do not parse this at all in kernel, leaving it up to user space to solve the problem. In future, we may do more parsing in kernel and add more files to make it easier for simple user space processes to extract more information.
For each log entry (directory), there are the following files:
id: An ASCII representation of the ID of the
error log, in hex - e.g. "0x01".
type: An ASCII representation of the type id and
description of the type of error log. Currently just "0x00 PEL" - platform error log. In the future there may be additional types.
raw: A read-only binary file that can be read
to get the raw log entry. These are <16kb, often just hundreds of bytes and "average" 2kb.
acknowledge: Writing 'ack' to this file will acknowledge
the error log to firmware (and in turn the service processor, if applicable). Shortly after acknowledging it, the log entry will be removed from sysfs. Reading this file will list the supported operations (curently just acknowledge).
Hi all,
Quoted 22 lines · On Wed, 12 Mar 2014 00:51:52 +0000 Mark Brown <[email protected]> wrote:
After merging the driver-core tree, today's linux-next build () failed like this on a PowerPC defconfig:
HEAD is now at
ceb98e684decMerge remote-tracking branch 'driver-core/driver-core-next'
GEN/home/broonie/next/powerpc_ppc64_defconfig/Makefile
## configuration written to .config # /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c: In function 'elog_ack_store': /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c:84:2: error: implicit declaration of function 'sysfs_schedule_callback' [-Werror=implicit-function-declaration] sysfs_schedule_callback(&elog_obj->kobj, delay_release_kobj, ^ cc1: all warnings being treated as errors make[3]: *** [arch/powerpc/platforms/powernv/opal-elog.o] Error 1 make[3]: *** Waiting for unfinished jobs.... /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c: In function 'dump_ack_store': /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c:100:2: error: implicit declaration of function 'sysfs_schedule_callback' [-Werror=implicit-function-declaration] sysfs_schedule_callback(&dump_obj->kobj, delay_release_kobj, ^ cc1: all warnings being treated as errors
Quoted 3 lines
due to an interaction between
d1ba277e7988908(sysfs, driver-core: remove unused {sysfs|device}_schedule_callback_owner()) and774fea1a38c6a5a8(powerpc/powernv: Read OPAL error log and export it through sysfs) from the PowerPC tree.I reverted
774fea1a38c6a5a8for today.
I instead reverted commit d1ba277e7988908 (sysfs, driver-core: remove unused {sysfs|device}_schedule_callback_owner()). I hope that will work as well.
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]