diff options
author | Siarhei Siamashka <siarhei.siamashka@nokia.com> | 2010-02-07 07:33:52 +0200 |
---|---|---|
committer | Siarhei Siamashka <siarhei.siamashka@gmail.com> | 2010-02-13 17:44:49 +0200 |
commit | cf1f034fef34478c528bedf1e59be443fa72429c (patch) | |
tree | 6211ad54fcfd018262c8f247d3bbec70d5e9adf1 | |
parent | 865c37d57421f6888151486ae1a2ec986a7cd9d2 (diff) |
ARM: Remove any use of environment variables for cpu features detection
Old code assumed that all ARMv7 processors support NEON instructions
unless overrided by environment variable ARM_TRUST_HWCAP. This causes
X server to die with SIGILL if NEON support is disabled in the kernel
configuration. Additionally, ARMv7 processors lacking NEON unit are
going to become available eventually.
The problem was reported by user bearsh at irc.freenode.net #gentoo-embedded
-rw-r--r-- | pixman/pixman-cpu.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/pixman/pixman-cpu.c b/pixman/pixman-cpu.c index 5d5469bb..d727ddb1 100644 --- a/pixman/pixman-cpu.c +++ b/pixman/pixman-cpu.c @@ -253,8 +253,6 @@ pixman_arm_read_auxv () if (aux.a_type == AT_HWCAP) { uint32_t hwcap = aux.a_un.a_val; - if (getenv ("ARM_FORCE_HWCAP")) - hwcap = strtoul (getenv ("ARM_FORCE_HWCAP"), NULL, 0); /* hardcode these values to avoid depending on specific * versions of the hwcap header, e.g. HWCAP_NEON */ @@ -266,8 +264,6 @@ pixman_arm_read_auxv () else if (aux.a_type == AT_PLATFORM) { const char *plat = (const char*) aux.a_un.a_val; - if (getenv ("ARM_FORCE_PLATFORM")) - plat = getenv ("ARM_FORCE_PLATFORM"); if (strncmp (plat, "v7l", 3) == 0) { arm_has_v7 = TRUE; @@ -280,12 +276,6 @@ pixman_arm_read_auxv () } } close (fd); - - /* if we don't have 2.6.29, we have to do this hack; set - * the env var to trust HWCAP. - */ - if (!getenv ("ARM_TRUST_HWCAP") && arm_has_v7) - arm_has_neon = TRUE; } arm_tests_initialized = TRUE; |