Re: [PATCH RFC 7/8] s390/jump-label: add arch_jump_label_transform_early()

From: Jeremy Fitzhardinge
Date: Fri Sep 30 2011 - 12:03:58 EST


On 09/30/2011 07:48 AM, Jan Glauber wrote:
> On Thu, 2011-09-29 at 16:26 -0700, Jeremy Fitzhardinge wrote:
>> From: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
>>
>> This allows jump-label entries to be modified early, in a pre-SMP
>> environment.
>>
>> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
>> Cc: Jan Glauber <jang@xxxxxxxxxxxxxxxxxx>
> Hi Jeremy,
>
> Your patch looks fine, if you can fix the minor compiler warnings
> below. Excluding stop_machine() on pre-SMP also looks safer too me.

Do you think there would be an actual problem, or are you just being
cautious?

It seems to me - in general - stop_machine could just be defined to be a
no-op (ie, just directly calls the callback) until enough SMP is
initialized for it to make sense, rather than having to make every user
work around it (if there's a chance they might call it early).

> CC arch/s390/kernel/jump_label.o
> arch/s390/kernel/jump_label.c: In function â__jump_label_transformâ:
> arch/s390/kernel/jump_label.c:41:2: error: ârcâ undeclared (first use in this function)
> arch/s390/kernel/jump_label.c:41:2: note: each undeclared identifier is reported only once for each function it appears in
> arch/s390/kernel/jump_label.c:41:2: warning: passing argument 1 of âprobe_kernel_writeâ makes pointer from integer without a cast [enabled by default]
> include/linux/uaccess.h:108:21: note: expected âvoid *â but argument is of type âjump_label_tâ
> arch/s390/kernel/jump_label.c:28:19: warning: unused variable âargsâ [-Wunused-variable]
> make[2]: *** [arch/s390/kernel/jump_label.o] Error 1
>
>

Like so?