Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4489 → Rev 4490

/trunk/kernel/genarch/src/mm/asid.c
65,7 → 65,7
#include <adt/list.h>
#include <debug.h>
 
static count_t asids_allocated = 0;
static size_t asids_allocated = 0;
 
/** Allocate free address space identifier.
*
120,7 → 120,7
* of TLB entries (e.g. TSB on sparc64), the
* cache must be invalidated as well.
*/
as_invalidate_translation_cache(as, 0, (count_t) -1);
as_invalidate_translation_cache(as, 0, (size_t) -1);
/*
* Get the system rid of the stolen ASID.
/trunk/kernel/genarch/src/mm/page_ht.c
51,8 → 51,8
#include <adt/hash_table.h>
#include <align.h>
 
static index_t hash(unative_t key[]);
static bool compare(unative_t key[], count_t keys, link_t *item);
static size_t hash(unative_t key[]);
static bool compare(unative_t key[], size_t keys, link_t *item);
static void remove_callback(link_t *item);
 
static void ht_mapping_insert(as_t *as, uintptr_t page, uintptr_t frame,
93,11 → 93,11
*
* @return Index into page hash table.
*/
index_t hash(unative_t key[])
size_t hash(unative_t key[])
{
as_t *as = (as_t *) key[KEY_AS];
uintptr_t page = (uintptr_t) key[KEY_PAGE];
index_t index;
size_t index;
/*
* Virtual page addresses have roughly the same probability
124,7 → 124,7
*
* @return true on match, false otherwise.
*/
bool compare(unative_t key[], count_t keys, link_t *item)
bool compare(unative_t key[], size_t keys, link_t *item)
{
pte_t *t;
 
/trunk/kernel/genarch/src/ofw/ebus.c
49,7 → 49,7
{
ofw_tree_property_t *prop;
ofw_ebus_range_t *range;
count_t ranges;
size_t ranges;
 
prop = ofw_tree_getprop(node, "ranges");
if (!prop)
91,7 → 91,7
return false;
 
ofw_ebus_intr_map_t *intr_map = prop->value;
count_t count = prop->size / sizeof(ofw_ebus_intr_map_t);
size_t count = prop->size / sizeof(ofw_ebus_intr_map_t);
ASSERT(count);
/trunk/kernel/genarch/src/ofw/fhc.c
46,7 → 46,7
{
ofw_tree_property_t *prop;
ofw_fhc_range_t *range;
count_t ranges;
size_t ranges;
 
prop = ofw_tree_getprop(node, "ranges");
if (!prop)
88,7 → 88,7
ofw_tree_property_t *prop;
ofw_central_range_t *range;
count_t ranges;
size_t ranges;
prop = ofw_tree_getprop(node, "ranges");
if (!prop)
/trunk/kernel/genarch/src/ofw/ofw_tree.c
247,7 → 247,8
{
char buf[NAME_BUF_LEN + 1];
ofw_tree_node_t *node = ofw_root;
index_t i, j;
size_t i;
size_t j;
if (path[0] != '/')
return NULL;
/trunk/kernel/genarch/src/ofw/pci.c
54,7 → 54,7
{
ofw_tree_property_t *prop;
ofw_pci_range_t *range;
count_t ranges;
size_t ranges;
 
prop = ofw_tree_getprop(node, "ranges");
if (!prop) {
97,7 → 97,7
ofw_tree_property_t *prop;
ofw_pci_reg_t *assigned_address;
count_t assigned_addresses;
size_t assigned_addresses;
prop = ofw_tree_getprop(node, "assigned-addresses");
if (!prop)
/trunk/kernel/genarch/src/ofw/sbus.c
43,7 → 43,7
{
ofw_tree_property_t *prop;
ofw_sbus_range_t *range;
count_t ranges;
size_t ranges;
/*
* The SBUS support is very rudimentary in that we simply assume
/trunk/kernel/genarch/src/acpi/madt.c
62,11 → 62,11
struct madt_l_apic *madt_l_apic_entries = NULL;
struct madt_io_apic *madt_io_apic_entries = NULL;
 
index_t madt_l_apic_entry_index = 0;
index_t madt_io_apic_entry_index = 0;
count_t madt_l_apic_entry_cnt = 0;
count_t madt_io_apic_entry_cnt = 0;
count_t cpu_count = 0;
size_t madt_l_apic_entry_index = 0;
size_t madt_io_apic_entry_index = 0;
size_t madt_l_apic_entry_cnt = 0;
size_t madt_io_apic_entry_cnt = 0;
size_t cpu_count = 0;
 
struct madt_apic_header * * madt_entries_index = NULL;
unsigned int madt_entries_index_cnt = 0;
86,10 → 86,10
/*
* ACPI MADT Implementation of SMP configuration interface.
*/
static count_t madt_cpu_count(void);
static bool madt_cpu_enabled(index_t i);
static bool madt_cpu_bootstrap(index_t i);
static uint8_t madt_cpu_apic_id(index_t i);
static size_t madt_cpu_count(void);
static bool madt_cpu_enabled(size_t i);
static bool madt_cpu_bootstrap(size_t i);
static uint8_t madt_cpu_apic_id(size_t i);
static int madt_irq_to_pin(unsigned int irq);
 
struct smp_config_operations madt_config_operations = {
100,12 → 100,12
.irq_to_pin = madt_irq_to_pin
};
 
count_t madt_cpu_count(void)
size_t madt_cpu_count(void)
{
return madt_l_apic_entry_cnt;
}
 
bool madt_cpu_enabled(index_t i)
bool madt_cpu_enabled(size_t i)
{
ASSERT(i < madt_l_apic_entry_cnt);
return ((struct madt_l_apic *) madt_entries_index[madt_l_apic_entry_index + i])->flags & 0x1;
112,13 → 112,13
 
}
 
bool madt_cpu_bootstrap(index_t i)
bool madt_cpu_bootstrap(size_t i)
{
ASSERT(i < madt_l_apic_entry_cnt);
return ((struct madt_l_apic *) madt_entries_index[madt_l_apic_entry_index + i])->apic_id == l_apic_id();
}
 
uint8_t madt_cpu_apic_id(index_t i)
uint8_t madt_cpu_apic_id(size_t i)
{
ASSERT(i < madt_l_apic_entry_cnt);
return ((struct madt_l_apic *) madt_entries_index[madt_l_apic_entry_index + i])->apic_id;