Print this page
5255 uts shouldn't open-code ISP2
*** 21,30 ****
--- 21,31 ----
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+ #include <sys/sysmacros.h>
#include <sys/machsystm.h>
#include <sys/cpu.h>
#include <sys/intreg.h>
#include <sys/machcpuvar.h>
#include <vm/hat_sfmmu.h>
*** 96,106 ****
/*
* contig_mem_alloc() requires size to be a power of 2.
* Increase size to a power of 2 if necessary.
*/
! if ((size & (size - 1)) != 0) {
size = 1 << highbit(size);
}
mcpup->cpu_list = contig_mem_alloc(size);
--- 97,107 ----
/*
* contig_mem_alloc() requires size to be a power of 2.
* Increase size to a power of 2 if necessary.
*/
! if (!ISP2(size)) {
size = 1 << highbit(size);
}
mcpup->cpu_list = contig_mem_alloc(size);
*** 206,216 ****
/*
* contig_mem_alloc() requires size to be a power of 2.
* Increase size to a power of 2 if necessary.
*/
! if ((cpu_list_size & (cpu_list_size - 1)) != 0) {
cpu_list_size = 1 << highbit(cpu_list_size);
}
if (mcpup->cpu_list) {
contig_mem_free(mcpup->cpu_list, cpu_list_size);
--- 207,217 ----
/*
* contig_mem_alloc() requires size to be a power of 2.
* Increase size to a power of 2 if necessary.
*/
! if (!ISP2(cpu_list_size)) {
cpu_list_size = 1 << highbit(cpu_list_size);
}
if (mcpup->cpu_list) {
contig_mem_free(mcpup->cpu_list, cpu_list_size);