lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 25 Jul 2016 08:22:58 -0500
From:	Rob Herring <robh@...nel.org>
To:	Max Filippov <jcmvbkbc@...il.com>
Cc:	Guenter Roeck <linux@...ck-us.net>,
	Chris Zankel <chris@...kel.net>,
	"linux-xtensa@...ux-xtensa.org" <linux-xtensa@...ux-xtensa.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Kefeng Wang <wangkefeng.wang@...wei.com>
Subject: Re: [PATCH -next] xtensa: Fix build error due to missing include file

On Mon, Jul 25, 2016 at 3:07 AM, Max Filippov <jcmvbkbc@...il.com> wrote:
> On Sun, Jul 24, 2016 at 7:27 PM, Guenter Roeck <linux@...ck-us.net> wrote:
>> On 07/24/2016 08:18 AM, Rob Herring wrote:
>>>
>>> On Sun, Jul 24, 2016 at 9:20 AM, Max Filippov <jcmvbkbc@...il.com> wrote:
>>>>
>>>> On Sun, Jul 24, 2016 at 9:00 AM, Guenter Roeck <linux@...ck-us.net>
>>>> wrote:
>>>>>
>>>>> On 07/23/2016 05:45 PM, Max Filippov wrote:
>>>>>>
>>>>>>
>>>>>> On Sun, Jul 24, 2016 at 3:24 AM, Guenter Roeck <linux@...ck-us.net>
>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>> Commit 69d99e6c0d621f ("xtensa: Remove unnecessary
>>>>>>> of_platform_populate
>>>>>>> with default match table") dropped various include files from
>>>>>>> arch/xtensa/kernel/setup.c. This results in the following build error.
>>>>>>>
>>>>>>> arch/xtensa/kernel/setup.c: In function ‘xtensa_dt_io_area’:
>>>>>>> arch/xtensa/kernel/setup.c:213:2: error:
>>>>>>>           implicit declaration of function ‘of_read_ulong’
>>>>>>>
>>>>>>> Fixes: 69d99e6c0d621f ("xtensa: Remove unnecessary
>>>>>>> of_platform_populate
>>>>>>> with default match table")
>>>>>>> Cc: Kefeng Wang <wangkefeng.wang@...wei.com>
>>>>>>> Cc: Rob Herring <robh@...nel.org>
>>>>>>> Signed-off-by: Guenter Roeck <linux@...ck-us.net>
>>>>>>> ---
>>>>>>> I would suggest to merge this patch into the commit causing the
>>>>>>> problem
>>>>>>> if possible.
>>>>>>>
>>>>>>>    arch/xtensa/kernel/setup.c | 1 +
>>>>>>>    1 file changed, 1 insertion(+)
>>>>>>
>>>>>>
>>>>>>
>>>>>> Acked-by: Max Filippov <jcmvbkbc@...il.com>
>>>>>>
>>>>>
>>>>> Heads up: xtensa images build after this patch, but the image that
>>>>> previously failed to build (generic_kc705_defconfig) doesn't boot,
>>>>> at least not with qemu. I don't know if this is caused by 69d99e6c0d621f
>>>>> or by some other patch.
>>>>
>>>>
>>>> It seems to be booting, but serial console is non-functional.
>>>> With commit 69d99e6c0d621f ("xtensa: Remove unnecessary
>>>> of_platform_populate
>>>> with default match table") I see the following message during boot:
>>>>
>>>> [    6.375284] of_serial fd050020.serial: clk or clock-frequency not
>>>> defined
>>>>
>>>> Reverting that commit fixes serial console for me.
>>>> Any suggestions on what might go wrong?
>>>
>>>
>>> Probably the init order changed somehow and deferred probe is not
>>> supported correctly.
>>>
>>
>> While the message is due to -EPROBE_DEFER (and there should really be no
>> message
>> in this case), I suspect that the underlying problem is that of_clk_init()
>> is
>> now called way too early, before the clock source is fully initialized.
>> Specifically, the call now happens before the message "clocksource: Switched
>> to clocksource ccount", which at least looks suspicious.
>>
>> If I move of_clk_init() back into xtensa_device_probe(), to be called as
>> device_initcall(), everything is fine.
>
> The problem is in the way the main clock on xtfpga platform is set up:
> it is done by updating corresponding OF node's clock-frequency attribute
> and that must happen before the of_clk_init call.
> Looks like it's time to create a clock provider for xtfpga boards, something
> like the one attached.

I don't think we should require a DT update to fix this. I think we
should revert all but the removing of of_platform_populate line for
now.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ