[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 3/4] xen/ppc: Implement early serial printk on pseries


  • To: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 24 Jul 2023 09:38:43 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QTIIpgwVvHHIZYt3iPjkDifdMjpGToXo7N7VZ91BylM=; b=oVtz7GA8qkwgbPRQ0YTJBeXGRuK2kR9Z8ACl3s8Lreawn4/s+bFeldjaCOtZZFWIMU4NerfKgrNjNnZignfzVi6Ov6QHhCkR50659tqZNNtxDsWYFknRZ7FZfy+KRaoFh9caZHvstKBvs0I9om20VUEsrJdh3R1IMQuvkk/Ntj14dkzs7GLcSyCKCjlHI9y1vAiL5R3XWTZX0BPcy4JCNv7x1uytwSxNZJ3JROHh+Pf2YFJCm6g9DFDfnLcR0mdmHzf53SOySuqqC1uslgFFRMIyBYnyjzyqGdrgG/VHWYSvieSTaKDS4q6y84sRmpuqVNNXlFcHfXONnSnXmflnZA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fS1mpoLr3PUVmGwf/hCxdMpEJZ5wFikkVTvzx4g7lEK9wfhdWQfx0GoMBgz7hyXs14d48yj3vnFISP910VNjI9eJWAvVGVt+MlZ0FwLuI4wlafHsP+JOCamO/Lo7YdwSaTunU5MbQstvLxFGpEJv6JWnAW+Xo8gsZOOejDWdDJ7a4utKm8kKPOQzxYzg6mnPlnZfBt3PfMHJo5eicVBmxOOtNZi0Tk6mkyVTnyWUTToFKEPkapMzFf0fC1R9BswUIzdkM95pDpMBDvza8+I9ztoTkloIq8UqsdwHB4Q8LoETXfV2o0EGHqe4IndIIsohavUdpcIAU0O+u3MAE5HRiQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 24 Jul 2023 07:39:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 21.07.2023 18:53, Shawn Anastasio wrote:
> On 7/19/23 9:05 AM, Jan Beulich wrote:
>> On 18.07.2023 22:20, Shawn Anastasio wrote:
>>> +void __init boot_of_init(unsigned long vec)
>>> +{
>>> +    int bof_chosen;
>>> +
>>> +    of_vec = vec;
>>> +
>>> +    /* Get a handle to the default console */
>>> +    bof_chosen = of_finddevice("/chosen");
>>> +    of_getprop(bof_chosen, "stdout", &of_out, sizeof(of_out));
>>> +    of_out = be32_to_cpu(of_out);
>>
>> Can any of these fail, and hence lead to ...
> 
> These calls are allowed to fail, but their return value in those cases
> is well-defined (an invalid handle), so...
> 
>>
>>> +    early_printk_init(of_putchar);
>>
>> ... this better not getting invoked?
> 
> this being invoked is fine even in those cases. It will just result in
> the invalid handle being passed to of_write and the firmware will refuse
> to service the writes.

I assumed all this to be the case; the question was more towards "Wouldn't
it make sense to avoid installing the function pointer in such a case?"

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.