j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: blueswirl Date: 2007-05-05 20:34:01 +0200 (Sat, 05 May 2007) New Revision: 141
Modified: openbios-devel/drivers/iommu.c Log: More obviously alarming return values for find_pte
Modified: openbios-devel/drivers/iommu.c =================================================================== --- openbios-devel/drivers/iommu.c 2007-05-05 18:32:35 UTC (rev 140) +++ openbios-devel/drivers/iommu.c 2007-05-05 18:34:01 UTC (rev 141) @@ -124,12 +124,12 @@ p = mem_zalloc(&cmem, SRMMU_PTRS_PER_PMD * sizeof(int), SRMMU_PTRS_PER_PMD * sizeof(int)); if (p == 0) - return 1; + return -1; pte = SRMMU_ET_PTD | ((va2pa((unsigned long)p)) >> 4); l1[(va >> SRMMU_PGDIR_SHIFT) & (SRMMU_PTRS_PER_PGD - 1)] = pte; /* barrier() */ } else { - return 1; + return -1; } }
@@ -141,11 +141,11 @@ p = mem_zalloc(&cmem, SRMMU_PTRS_PER_PTE * sizeof(void *), SRMMU_PTRS_PER_PTE * sizeof(void *)); if (p == 0) - return 2; + return -2; pte = SRMMU_ET_PTD | ((va2pa((unsigned int)p)) >> 4); *(uint32_t *)pa2va(pa) = pte; } else { - return 2; + return -2; } }