diff options
author | Paul Nasrat <pnasrat@redhat.com> | 2007-04-27 11:21:07 +0000 |
---|---|---|
committer | Paul Nasrat <pnasrat@redhat.com> | 2007-04-27 11:21:07 +0000 |
commit | 1e75e457e001d4ba6fd1c46adce852a99276bc11 (patch) | |
tree | e68a16911ac3cbc515d94d4ad100f456bd16c85d /loader2/hardware.c | |
parent | 69fdf4d7e19ec209b8f9e4e6b0c680dbe286dcee (diff) | |
download | anaconda-1e75e457e001d4ba6fd1c46adce852a99276bc11.tar.gz anaconda-1e75e457e001d4ba6fd1c46adce852a99276bc11.tar.xz anaconda-1e75e457e001d4ba6fd1c46adce852a99276bc11.zip |
Load spufs module on cell (#237725) and remove spufs hack as we should do the
right thing now.
Diffstat (limited to 'loader2/hardware.c')
-rw-r--r-- | loader2/hardware.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/loader2/hardware.c b/loader2/hardware.c index b22d124b1..72d8ce3cc 100644 --- a/loader2/hardware.c +++ b/loader2/hardware.c @@ -318,3 +318,27 @@ void dasdSetup(moduleList modLoaded, moduleDeps modDeps, #endif } +void spufsSetup(moduleList modLoaded, moduleDeps modDeps, + moduleInfoSet modInfo) { +#if !defined(__powerpc__) + return; +#else + FILE *fd; + fd = fopen("/proc/cpuinfo", "r"); + if(fd) { + char buf[1024]; + while (fgets(buf, 1024, f) != NULL) { + if(!strncmp(buf, "cpu\t\t:", 5)) { + if(strstr(buf, "Cell")) { + mlLoadModule("spufs", modLoaded, modDeps, modInfo, NULL); + break; + } + } + } + fclose(fd); + return; + } else { + return; + } +#endif +} |