[PATCH v3 1/2] arm64/mm: Allow __create_pgd_mapping() to propagate pgtable_alloc() errors
Kevin Brodsky
kevin.brodsky at arm.com
Thu Oct 16 23:59:03 PDT 2025
On 17/10/2025 07:24, Anshuman Khandual wrote:
>> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
>> index b8d37eb037fc..638cb4df31a9 100644
>> --- a/arch/arm64/mm/mmu.c
>> +++ b/arch/arm64/mm/mmu.c
>> @@ -49,6 +49,8 @@
>> #define NO_CONT_MAPPINGS BIT(1)
>> #define NO_EXEC_MAPPINGS BIT(2) /* assumes FEAT_HPDS is not used */
>>
>> +#define INVALID_PHYS_ADDR (-1ULL)
>> +
> Should this be defined as (~(phys_addr_t)0) instead ? Probably
> INVALID_PHYS_ADDR macro should be made generic as well as this
> is being used in multiple places. But that's besides the point
> here.
This patch is simply moving the definition higher in the file, so I
think it should leave it unchanged. Moving the definition to a generic
header (in a separate patch/series) would clearly be a good idea though.
- Kevin
> arch/arm64/mm/mmu.c #define INVALID_PHYS_ADDR (-1ULL)
> arch/s390/boot/vmem.c #define INVALID_PHYS_ADDR (~(phys_addr_t)0)
> drivers/vdpa/vdpa_user/iova_domain.h #define INVALID_PHYS_ADDR (~(phys_addr_t)0)
> kernel/dma/swiotlb.c #define INVALID_PHYS_ADDR (~(phys_addr_t)0)
More information about the linux-arm-kernel
mailing list