tree-wide: "<n>bit" → "<n>-bit"

In some places, "<n> bits" is used when more appropriate.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2023-07-02 11:10:12 +01:00
committed by Luca Boccassi
parent 221332ee13
commit da89046643
83 changed files with 221 additions and 224 deletions
+2 -2
View File
@@ -27,8 +27,8 @@ int sync_everything(void) {
}
const char *get_efi_arch(void) {
/* Detect EFI firmware architecture of the running system. On mixed mode systems, it could be 32bit
* while the kernel is running in 64bit. */
/* Detect EFI firmware architecture of the running system. On mixed mode systems, it could be 32-bit
* while the kernel is running in 64-bit. */
#ifdef __x86_64__
_cleanup_free_ char *platform_size = NULL;
+1 -1
View File
@@ -75,7 +75,7 @@ static EFI_STATUS pack_cpio_one(
*
* See: https://docs.kernel.org/driver-api/early-userspace/buffer-format.html */
if (contents_size > UINT32_MAX) /* cpio cannot deal with > 32bit file sizes */
if (contents_size > UINT32_MAX) /* cpio cannot deal with > 32-bit file sizes */
return EFI_LOAD_ERROR;
if (*inode_counter == UINT32_MAX) /* more than 2^32-1 inodes? yikes. cpio doesn't support that either */
+1 -1
View File
@@ -629,7 +629,7 @@ static bool handle_format_specifier(FormatContext *ctx, SpecifierContext *sp) {
/* Parses one item from the format specifier in ctx and put the info into sp. If we are done with
* this specifier returns true, otherwise this function should be called again. */
/* This implementation assumes 32bit ints. Also note that all types smaller than int are promoted to
/* This implementation assumes 32-bit ints. Also note that all types smaller than int are promoted to
* int in vararg functions, which is why we fetch only ints for any such types. The compiler would
* otherwise warn about fetching smaller types. */
assert_cc(sizeof(int) == 4);
+5 -5
View File
@@ -102,19 +102,19 @@ typedef void (*handover_f)(void *parent, EFI_SYSTEM_TABLE *table, BootParams *pa
static void linux_efi_handover(EFI_HANDLE parent, uintptr_t kernel, BootParams *params) {
assert(params);
kernel += (params->hdr.setup_sects + 1) * KERNEL_SECTOR_SIZE; /* 32bit entry address. */
kernel += (params->hdr.setup_sects + 1) * KERNEL_SECTOR_SIZE; /* 32-bit entry address. */
/* Old kernels needs this set, while newer ones seem to ignore this. */
params->hdr.code32_start = kernel;
#ifdef __x86_64__
kernel += KERNEL_SECTOR_SIZE; /* 64bit entry address. */
kernel += KERNEL_SECTOR_SIZE; /* 64-bit entry address. */
#endif
kernel += params->hdr.handover_offset; /* 32/64bit EFI handover address. */
kernel += params->hdr.handover_offset; /* 32/64-bit EFI handover address. */
/* Note in EFI mixed mode this now points to the correct 32bit handover entry point, allowing a 64bit
* kernel to be booted from a 32bit sd-stub. */
/* Note in EFI mixed mode this now points to the correct 32-bit handover entry point, allowing a 64-bit
* kernel to be booted from a 32-bit sd-stub. */
handover_f handover = (handover_f) kernel;
handover(parent, ST, params);
+1 -1
View File
@@ -171,7 +171,7 @@ static uint32_t get_compatibility_entry_address(const DosFileHeader *dos, const
static const char *sections[] = { ".compat", NULL };
/* The kernel may provide alternative PE entry points for different PE architectures. This allows
* booting a 64bit kernel on 32bit EFI that is otherwise running on a 64bit CPU. The locations of any
* booting a 64-bit kernel on 32-bit EFI that is otherwise running on a 64-bit CPU. The locations of any
* such compat entry points are located in a special PE section. */
locate_sections((const PeSectionHeader *) ((const uint8_t *) dos + section_table_offset(dos, pe)),
+1 -1
View File
@@ -91,7 +91,7 @@ static uint64_t ticks_freq(void) {
uint64_t ticks_end = ticks_read_arch();
if (ticks_end < ticks_start) /* Check for an overflow (which is not that unlikely, given on some
* archs the value is 32bit) */
* archs the value is 32-bit) */
return 0;
cache = (ticks_end - ticks_start) * 1000UL;
+4 -4
View File
@@ -147,16 +147,16 @@ static inline void strv_freep(char16_t ***p) {
EFI_STATUS open_directory(EFI_FILE *root_dir, const char16_t *path, EFI_FILE **ret);
/* Conversion between EFI_PHYSICAL_ADDRESS and pointers is not obvious. The former is always 64bit, even on
* 32bit archs. And gcc complains if we cast a pointer to an integer of a different size. Hence let's do the
/* Conversion between EFI_PHYSICAL_ADDRESS and pointers is not obvious. The former is always 64-bit, even on
* 32-bit archs. And gcc complains if we cast a pointer to an integer of a different size. Hence let's do the
* conversion indirectly: first into uintptr_t and then extended to EFI_PHYSICAL_ADDRESS. */
static inline EFI_PHYSICAL_ADDRESS POINTER_TO_PHYSICAL_ADDRESS(const void *p) {
return (EFI_PHYSICAL_ADDRESS) (uintptr_t) p;
}
static inline void *PHYSICAL_ADDRESS_TO_POINTER(EFI_PHYSICAL_ADDRESS addr) {
/* On 32bit systems the address might not be convertible (as pointers are 32bit but
* EFI_PHYSICAL_ADDRESS 64bit) */
/* On 32-bit systems the address might not be convertible (as pointers are 32-bit but
* EFI_PHYSICAL_ADDRESS 64-bit) */
assert(addr <= UINTPTR_MAX);
return (void *) (uintptr_t) addr;
}