From mboxrd@z Thu Jan 1 00:00:00 1970 From: grygorii.strashko@linaro.org (Grygorii.Strashko@linaro.org) Date: Thu, 09 Apr 2015 19:15:23 +0300 Subject: [PATCH 2/6] ARM: keystone2: move update of the phys-to-virt constants into generic code In-Reply-To: <20150409154917.GY12732@n2100.arm.linux.org.uk> References: <20150408094438.GM12732@n2100.arm.linux.org.uk> <552541B1.2000501@linaro.org> <20150408175959.GO12732@n2100.arm.linux.org.uk> <552691E2.2050000@linaro.org> <20150409154917.GY12732@n2100.arm.linux.org.uk> Message-ID: <5526A59B.8000607@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 04/09/2015 06:49 PM, Russell King - ARM Linux wrote: > On Thu, Apr 09, 2015 at 05:51:14PM +0300, Grygorii.Strashko at linaro.org wrote: >> @@ -1401,14 +1401,15 @@ void __init early_paging_init(const struct machine_desc *mdesc) >> pgtables_remap *lpae_pgtables_remap; >> unsigned long pa_pgd; >> unsigned int cr; >> - long long offset; >> + phys_addr_t new_phys_offset; >> + phys_addr_t old_phys_offset = PHYS_OFFSET; >> void *boot_data; >> >> if (!mdesc->pv_fixup) >> return; >> >> - offset = mdesc->pv_fixup(); >> - if (offset == 0) >> + new_phys_offset = mdesc->pv_fixup(); >> + if (new_phys_offset == 0) > > "0" is a special magic value here. The advantage of the delta approach > is that "0" is obviously equivalent to "no change". > can "-1" be used? -- regards, -grygorii