summaryrefslogtreecommitdiff
path: root/scripts/sysgen
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2016-07-07 16:31:32 -0500
committerInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>2016-07-08 23:04:41 +0000
commitc002401295443b6ba986726bb8d4b2c6609e65ea (patch)
treee41e36fb5aa574efee7a5486e1f77688facc1626 /scripts/sysgen
parent7bbf48bf5baec611798352c5b60137b3a365fe96 (diff)
sysgen: Cosmetic cleanup of memory pool generation code
Does renaming of variables and comments to conform to the "block set" and "quad-block" terminology now used by the kernel's memory pool code. (Note: This renaming also includes names of some variables generated by sysgen.) Change-Id: I8e04cb1ee9ca83daddb487b477da7dd2e1004fd8 Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Diffstat (limited to 'scripts/sysgen')
-rwxr-xr-xscripts/sysgen32
1 files changed, 16 insertions, 16 deletions
diff --git a/scripts/sysgen b/scripts/sysgen
index 475f29f23..ac003015f 100755
--- a/scripts/sysgen
+++ b/scripts/sysgen
@@ -654,20 +654,20 @@ def kernel_main_c_pools():
num_maximal_blocks = pool[3]
total_memory = max_block_size * num_maximal_blocks
buffer = "__" + pool[0] + "_buffer"
- frag_table = "fragtab_%#010x" % ident
+ frag_table = "block_sets_%#010x" % ident
# determine block sizes used by pool (including actual minimum size)
- frag_size_list = [max_block_size]
+ block_size_list = [max_block_size]
while (ident != 0): # loop forever
- min_block_size_actual = frag_size_list[len(frag_size_list) - 1]
+ min_block_size_actual = block_size_list[len(block_size_list) - 1]
min_block_size_proposed = min_block_size_actual / 4
if (min_block_size_proposed < min_block_size):
break
- frag_size_list.append(min_block_size_proposed)
- frag_levels = len(frag_size_list)
+ block_size_list.append(min_block_size_proposed)
+ frag_levels = len(block_size_list)
- # determine size of block status arrays,
+ # determine size of quad-block arrays,
# from the largest block size to the smallest block size
# - each array must be big enough to track the status of
# the entire memory pool buffer
@@ -676,26 +676,26 @@ def kernel_main_c_pools():
# in case the # of largest size blocks isn't a multiple of 4
# (i.e. it's final array entry may be partly unused)
- block_status_sizes = [(num_maximal_blocks + 3) / 4]
- block_status_size_to_use = num_maximal_blocks
+ quad_block_sizes = [(num_maximal_blocks + 3) / 4]
+ quad_block_size_to_use = num_maximal_blocks
for index in range(1, frag_levels):
- block_status_sizes.append(block_status_size_to_use)
- block_status_size_to_use *= 4
+ quad_block_sizes.append(quad_block_size_to_use)
+ quad_block_size_to_use *= 4
- # generate block status areas
+ # generate array of quad-blocks for each block set
for index in range(0, frag_levels):
kernel_main_c_out(
- "struct pool_quad_block blockstatus_%#010x_%d[%d];\n" %
- (ident, index, block_status_sizes[index]))
+ "struct pool_quad_block quad_blocks_%#010x_%d[%d];\n" %
+ (ident, index, quad_block_sizes[index]))
- # generate memory pool fragmentation descriptor
+ # generate array of block sets for memory pool
kernel_main_c_out("\nstruct pool_block_set %s[%d] =\n{\n" %
(frag_table, frag_levels))
for index in range(0, frag_levels):
- kernel_main_c_out(" { %d, %d, blockstatus_%#010x_%d},\n" %
- (frag_size_list[index], block_status_sizes[index],
+ kernel_main_c_out(" { %d, %d, quad_blocks_%#010x_%d},\n" %
+ (block_size_list[index], quad_block_sizes[index],
ident, index))
kernel_main_c_out("};\n")