Re: [PATCH v2 1/2] libfdt: add fdt_append_addrrange()

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



Hi David,

On 2/5/19 8:39 PM, David Gibson wrote:
> On Thu, Jan 24, 2019 at 07:20:48PM +0900, AKASHI Takahiro wrote:
>> This function will append an address range property using parent node's
>> "#address-cells" and "#size-cells" properties.
>>
>> It will be used in implementing kdump with kexec_file_load system call
>> at linux kernel for arm64 once it is merged into kernel tree.
>>
>> Signed-off-by: AKASHI Takahiro <takahiro.akashi@xxxxxxxxxx>
> 
> Sorry I've taken so long to look at this.
> 
>> ---
>>  libfdt/fdt_addresses.c | 43 ++++++++++++++++++++++++++++++++++++++++++
>>  libfdt/libfdt.h        | 37 ++++++++++++++++++++++++++++++++++++
>>  2 files changed, 80 insertions(+)
>>
>> diff --git a/libfdt/fdt_addresses.c b/libfdt/fdt_addresses.c
>> index f13a87dfa068..6f13a7bbb6a3 100644
>> --- a/libfdt/fdt_addresses.c
>> +++ b/libfdt/fdt_addresses.c
>> @@ -95,3 +95,46 @@ int fdt_size_cells(const void *fdt, int nodeoffset)
>>  		return 1;
>>  	return val;
>>  }
>> +
>> +static void cpu64_to_fdt_cells(uint8_t *prop, uint64_t val, int cells)
>> +{
>> +	fdt32_t val32;
>> +
>> +	while (cells) {
>> +		val32 = cpu_to_fdt32(val >> (32 * (--cells)));

< snip >

The line of code above led me to look at the libfdt version of cpu_to_fdt32().
If I am looking in the correct place, libfdt/libfdt_env.h, then I only see
a version for little endian systems.  Am I missing something, or does libfdt
assume little endian system and not support running on a big endian system?

-Frank



[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux