svn commit: r290992 - projects/powernv/powerpc/powernv
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Tue Nov 17 16:18:46 UTC 2015
Author: nwhitehorn
Date: Tue Nov 17 16:18:44 2015
New Revision: 290992
URL: https://svnweb.freebsd.org/changeset/base/290992
Log:
Make sure we use OF_getencprop() instead of OF_getprop() before the rot
moves too far forward. We'll need endian safety on powernv at some point.
Sponsored by: FreeBSD Foundation
Modified:
projects/powernv/powerpc/powernv/opal_console.c
projects/powernv/powerpc/powernv/platform_powernv.c
Modified: projects/powernv/powerpc/powernv/opal_console.c
==============================================================================
--- projects/powernv/powerpc/powernv/opal_console.c Tue Nov 17 16:16:18 2015 (r290991)
+++ projects/powernv/powerpc/powernv/opal_console.c Tue Nov 17 16:18:44 2015 (r290992)
@@ -186,7 +186,7 @@ uart_opal_probe_node(struct uart_opal_so
return (ENXIO);
reg = -1;
- OF_getprop(node, "reg", ®, sizeof(reg));
+ OF_getencprop(node, "reg", ®, sizeof(reg));
if (reg == -1)
return (ENXIO);
sc->vtermid = reg;
Modified: projects/powernv/powerpc/powernv/platform_powernv.c
==============================================================================
--- projects/powernv/powerpc/powernv/platform_powernv.c Tue Nov 17 16:16:18 2015 (r290991)
+++ projects/powernv/powerpc/powernv/platform_powernv.c Tue Nov 17 16:18:44 2015 (r290992)
@@ -140,7 +140,7 @@ powernv_timebase_freq(platform_t plat, s
phandle = cpuref->cr_hwref;
- OF_getprop(phandle, "timebase-frequency", &ticks, sizeof(ticks));
+ OF_getencprop(phandle, "timebase-frequency", &ticks, sizeof(ticks));
if (ticks <= 0)
panic("Unable to determine timebase frequency!");
@@ -186,10 +186,10 @@ powernv_smp_first_cpu(platform_t plat, s
return (ENOENT);
cpuref->cr_hwref = cpu;
- res = OF_getprop(cpu, "ibm,ppc-interrupt-server#s", &cpuid,
+ res = OF_getencprop(cpu, "ibm,ppc-interrupt-server#s", &cpuid,
sizeof(cpuid));
if (res <= 0)
- res = OF_getprop(cpu, "reg", &cpuid, sizeof(cpuid));
+ res = OF_getencprop(cpu, "reg", &cpuid, sizeof(cpuid));
if (res <= 0)
cpuid = 0;
cpuref->cr_cpuid = cpuid;
@@ -208,7 +208,7 @@ powernv_smp_next_cpu(platform_t plat, st
res = OF_getproplen(cpuref->cr_hwref, "ibm,ppc-interrupt-server#s");
if (res > 0) {
cell_t interrupt_servers[res/sizeof(cell_t)];
- OF_getprop(cpuref->cr_hwref, "ibm,ppc-interrupt-server#s",
+ OF_getencprop(cpuref->cr_hwref, "ibm,ppc-interrupt-server#s",
interrupt_servers, res);
for (i = 0; i < res/sizeof(cell_t) - 1; i++) {
if (interrupt_servers[i] == cpuref->cr_cpuid) {
@@ -230,10 +230,10 @@ powernv_smp_next_cpu(platform_t plat, st
return (ENOENT);
cpuref->cr_hwref = cpu;
- res = OF_getprop(cpu, "ibm,ppc-interrupt-server#s", &cpuid,
+ res = OF_getencprop(cpu, "ibm,ppc-interrupt-server#s", &cpuid,
sizeof(cpuid));
if (res <= 0)
- res = OF_getprop(cpu, "reg", &cpuid, sizeof(cpuid));
+ res = OF_getencprop(cpu, "reg", &cpuid, sizeof(cpuid));
if (res <= 0)
cpuid = 0;
cpuref->cr_cpuid = cpuid;
More information about the svn-src-projects
mailing list