From 783cbd59fcf086a9aaf603271823fb4ca71f0c55 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic 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 --- 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 #include #include -#include #include #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); } x-daemon?id=ea0d3215a63eabac93203ffd62b85566e6a30860'>diff
AgeCommit message (Expand)Author
2022-04-14daemon: Support systemd-style socket activation....* nix/nix-daemon/guix-daemon.cc (SD_LISTEN_FDS_START): New macro. (systemd_activation_sockets): New function. (main): Use it. Remove obsolete 'printMsg' call. * doc/guix.texi (Invoking guix-daemon): Document socket activation. Ludovic Courtès
2021-04-03daemon: Remove dead code....Reported by Noisytoot on #guix. * nix/nix-daemon/shared.hh (showManPage): Remove. * nix/nix-daemon/nix-daemon.cc (printHelp, programId): Remove. Ludovic Courtès
2021-03-17daemon: Correctly handle '--discover' with no value....Previously, we'd get: $ guix-daemon --discover error: basic_string::_M_construct null not valid * nix/nix-daemon/guix-daemon.cc (parse_opt): Change second argument to 'settings.set' to properly handle case where ARG is NULL. Ludovic Courtès
2020-11-29Use substitute servers on the local network....* guix/scripts/discover.scm: New file. * Makefile.am (MODULES): Add it. * nix/nix-daemon/guix-daemon.cc (options): Add "discover" option, (parse-opt): parse it, (main): start "guix discover" process when the option is set. * guix/scripts/substitute.scm (%local-substitute-urls): New variable, (substitute-urls): add it. * gnu/services/base.scm (<guix-configuration>): Add "discover?" field, (guix-shepherd-service): honor it. * doc/guix.texi (Invoking guix-daemon): Document "discover" option, (Base Services): ditto. Mathieu Othacehe