Messages in this thread |  | | Subject | Re: [KEXEC][2.5.69] Re: Updated kexec diffs... | From | (Eric W. Biederman) | Date | 14 May 2003 06:50:18 -0600 |
| |
Andrew Morton <akpm@digeo.com> writes:
> ebiederm@xmission.com (Eric W. Biederman) wrote: > > > > And Andrew has it in 2.5.69-mm4 and is busy pestering me about compile > > errors. > > I'm like that.
And I appreciate it. This was mostly an observation there was something reminding me to get back and fix the issue.
> I've dropped out a lot of the NORET stuff. It generates warnings on all > other architectures, because their machine_restart, machine_halt and > machine_power_off definitions don't have necessary attributes and don't > have the while(1); at the end.
Yes there is a big const correctness type problem here.
First for machine_restart it is 100% correct. And at least sys_reboot assumes that machine_restart will not return, even before my patch.
And I don't know of a case where it makes sense for machine_halt and machine_power_off to return. Hence I deliberately made those cases the same. Especially as every real implementation I traced does not return. It is only the stupid cases like on x86 where we don't do anything that these routines actually return.
In the context of my patch stop_this_cpu needs to be marked noreturn. As long as the fundamental routines get marked I don't expect to see a lot of routines getting a while(1); I admit stop_apics also needs a while(1); but only because gcc cannot trace it.
And since this also generates warnings on other architectures it looks like someone (me) needs to go through the various architectures and add a bunch of noreturn attributes to the appropriate functions.
The basic question is for documenting and enforcing the noreturn dependency. Is it more of a help or a hindrance to use gcc noreturn tag?
And while I am pretty certain this is the correct thing to do I should break this out from the reboot_on_bsp patch. With the other architectures involved this is enough of a separate issue that a second set of patches is needed to maintain this cleanly.
Eric - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |