diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2020-10-19 12:51:57 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2020-10-19 13:11:40 -0400 |
commit | 5e2140511c1ad9ccd731438b74d61b62111da1e6 (patch) | |
tree | a4ff748ad26e121b88469b5d921001ef1382be8f /gnu/packages/patches/sunxi-tools-remove-sys-io.patch | |
parent | 9e3a5ee417ea7fe9721be8804ff047e80c4f22ed (diff) | |
parent | 353bdae32f72b720c7ddd706576ccc40e2b43f95 (diff) | |
download | guix-5e2140511c1ad9ccd731438b74d61b62111da1e6.tar.gz guix-5e2140511c1ad9ccd731438b74d61b62111da1e6.zip |
Merge branch 'staging'
Conflicts:
gnu/packages/admin.scm
gnu/packages/commencement.scm
gnu/packages/gdb.scm
gnu/packages/llvm.scm
gnu/packages/package-management.scm
gnu/packages/tls.scm
Diffstat (limited to 'gnu/packages/patches/sunxi-tools-remove-sys-io.patch')
-rw-r--r-- | gnu/packages/patches/sunxi-tools-remove-sys-io.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/gnu/packages/patches/sunxi-tools-remove-sys-io.patch b/gnu/packages/patches/sunxi-tools-remove-sys-io.patch new file mode 100644 index 0000000000..fc1e5ea28d --- /dev/null +++ b/gnu/packages/patches/sunxi-tools-remove-sys-io.patch @@ -0,0 +1,52 @@ +From 783cbd59fcf086a9aaf603271823fb4ca71f0c55 Mon Sep 17 00:00:00 2001 +From: Danny Milosavljevic <dannym@scratchpost.org> +Date: Thu, 8 Oct 2020 23:01:05 +0200 +Subject: [PATCH] meminfo: Replace sys/io.h by direct register accesses. +See: https://github.com/linux-sunxi/sunxi-tools/pull/144 + +Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> +--- + meminfo.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/meminfo.c b/meminfo.c +index 0b0ff23..3b3a5df 100644 +--- a/meminfo.c ++++ b/meminfo.c +@@ -22,7 +22,6 @@ + #include <sys/mman.h> + #include <stdint.h> + #include <errno.h> +-#include <sys/io.h> + #include <stdbool.h> + + #include "common.h" +@@ -74,24 +73,24 @@ static enum sunxi_soc_version soc_version; + unsigned int + sunxi_io_read(void *base, int offset) + { +- return inl((unsigned long) (base + offset)); ++ return *(volatile unsigned int*) (base + offset); + } + + void + sunxi_io_write(void *base, int offset, unsigned int value) + { +- outl(value, (unsigned long) (base + offset)); ++ *(volatile unsigned int*) (base + offset) = value; + } + + void + sunxi_io_mask(void *base, int offset, unsigned int value, unsigned int mask) + { +- unsigned int tmp = inl((unsigned long) (base + offset)); ++ unsigned int tmp = sunxi_io_read(base, offset); + + tmp &= ~mask; + tmp |= value & mask; + +- outl(tmp, (unsigned long) (base + offset)); ++ sunxi_io_write(base, offset, tmp); + } + + |