git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
arch
/
powerpc
/
mm
/
hash_utils_64.c
diff --git
a/arch/powerpc/mm/hash_utils_64.c
b/arch/powerpc/mm/hash_utils_64.c
index
c006d90
..
e9d589e
100644
(file)
--- a/
arch/powerpc/mm/hash_utils_64.c
+++ b/
arch/powerpc/mm/hash_utils_64.c
@@
-167,18
+167,18
@@
int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
* normal insert callback here.
*/
#ifdef CONFIG_PPC_ISERIES
* normal insert callback here.
*/
#ifdef CONFIG_PPC_ISERIES
- if (
machine_is(iseries)
)
+ if (
_machine == PLATFORM_ISERIES_LPAR
)
ret = iSeries_hpte_insert(hpteg, va,
ret = iSeries_hpte_insert(hpteg, va,
-
paddr
,
+
__pa(vaddr)
,
tmp_mode,
HPTE_V_BOLTED,
psize);
else
#endif
#ifdef CONFIG_PPC_PSERIES
tmp_mode,
HPTE_V_BOLTED,
psize);
else
#endif
#ifdef CONFIG_PPC_PSERIES
- if (
machine_is(pseries) && firmware_has_feature(FW_FEATURE_LPAR)
)
+ if (
_machine & PLATFORM_LPAR
)
ret = pSeries_lpar_hpte_insert(hpteg, va,
ret = pSeries_lpar_hpte_insert(hpteg, va,
-
paddr
,
+
virt_to_abs(paddr)
,
tmp_mode,
HPTE_V_BOLTED,
psize);
tmp_mode,
HPTE_V_BOLTED,
psize);
@@
-186,7
+186,7
@@
int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
#endif
#ifdef CONFIG_PPC_MULTIPLATFORM
ret = native_hpte_insert(hpteg, va,
#endif
#ifdef CONFIG_PPC_MULTIPLATFORM
ret = native_hpte_insert(hpteg, va,
-
paddr
,
+
virt_to_abs(paddr)
,
tmp_mode, HPTE_V_BOLTED,
psize);
#endif
tmp_mode, HPTE_V_BOLTED,
psize);
#endif
@@
-295,7
+295,8
@@
static void __init htab_init_page_sizes(void)
* Not in the device-tree, let's fallback on known size
* list for 16M capable GP & GR
*/
* Not in the device-tree, let's fallback on known size
* list for 16M capable GP & GR
*/
- if (cpu_has_feature(CPU_FTR_16M_PAGE) && !machine_is(iseries))
+ if ((_machine != PLATFORM_ISERIES_LPAR) &&
+ cpu_has_feature(CPU_FTR_16M_PAGE))
memcpy(mmu_psize_defs, mmu_psize_defaults_gp,
sizeof(mmu_psize_defaults_gp));
found:
memcpy(mmu_psize_defs, mmu_psize_defaults_gp,
sizeof(mmu_psize_defaults_gp));
found:
@@
-391,7
+392,7
@@
static unsigned long __init htab_get_table_size(void)
#ifdef CONFIG_MEMORY_HOTPLUG
void create_section_mapping(unsigned long start, unsigned long end)
{
#ifdef CONFIG_MEMORY_HOTPLUG
void create_section_mapping(unsigned long start, unsigned long end)
{
- BUG_ON(htab_bolt_mapping(start, end,
__pa(start)
,
+ BUG_ON(htab_bolt_mapping(start, end,
start
,
_PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX,
mmu_linear_psize));
}
_PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX,
mmu_linear_psize));
}
@@
-421,7
+422,7
@@
void __init htab_initialize(void)
htab_hash_mask = pteg_count - 1;
htab_hash_mask = pteg_count - 1;
- if (
firmware_has_feature(FW_FEATURE_LPAR
)) {
+ if (
platform_is_lpar(
)) {
/* Using a hypervisor which owns the htab */
htab_address = NULL;
_SDR1 = 0;
/* Using a hypervisor which owns the htab */
htab_address = NULL;
_SDR1 = 0;
@@
-430,6
+431,7
@@
void __init htab_initialize(void)
* the absolute address space.
*/
table = lmb_alloc(htab_size_bytes, htab_size_bytes);
* the absolute address space.
*/
table = lmb_alloc(htab_size_bytes, htab_size_bytes);
+ BUG_ON(table == 0);
DBG("Hash table allocated at %lx, size: %lx\n", table,
htab_size_bytes);
DBG("Hash table allocated at %lx, size: %lx\n", table,
htab_size_bytes);
@@
-472,22
+474,21
@@
void __init htab_initialize(void)
if (dart_tablebase != 0 && dart_tablebase >= base
&& dart_tablebase < (base + size)) {
if (dart_tablebase != 0 && dart_tablebase >= base
&& dart_tablebase < (base + size)) {
- unsigned long dart_table_end = dart_tablebase + 16 * MB;
if (base != dart_tablebase)
BUG_ON(htab_bolt_mapping(base, dart_tablebase,
if (base != dart_tablebase)
BUG_ON(htab_bolt_mapping(base, dart_tablebase,
-
__pa(base)
, mode_rw,
- mmu_linear_psize));
- if ((base + size) >
dart_table_end
)
+
base
, mode_rw,
+
mmu_linear_psize));
+ if ((base + size) >
(dart_tablebase + 16*MB)
)
BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB,
BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB,
- base + size,
-
__pa(dart_table_end)
,
+
base + size,
+
dart_tablebase+16*MB
,
mode_rw,
mmu_linear_psize));
continue;
}
#endif /* CONFIG_U3_DART */
mode_rw,
mmu_linear_psize));
continue;
}
#endif /* CONFIG_U3_DART */
- BUG_ON(htab_bolt_mapping(base, base + size,
__pa(base)
,
- mode_rw, mmu_linear_psize));
+ BUG_ON(htab_bolt_mapping(base, base + size,
base
,
+
mode_rw, mmu_linear_psize));
}
/*
}
/*
@@
-504,8
+505,8
@@
void __init htab_initialize(void)
if (base + size >= tce_alloc_start)
tce_alloc_start = base + size + 1;
if (base + size >= tce_alloc_start)
tce_alloc_start = base + size + 1;
- BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end,
-
__pa(tce_alloc_start)
, mode_rw,
+ BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end,
+
tce_alloc_start
, mode_rw,
mmu_linear_psize));
}
mmu_linear_psize));
}
@@
-516,7
+517,7
@@
void __init htab_initialize(void)
void htab_initialize_secondary(void)
{
void htab_initialize_secondary(void)
{
- if (!
firmware_has_feature(FW_FEATURE_LPAR
))
+ if (!
platform_is_lpar(
))
mtspr(SPRN_SDR1, _SDR1);
}
mtspr(SPRN_SDR1, _SDR1);
}