summaryrefslogtreecommitdiff
path: root/pci-arbiter/startup.c
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2021-03-16 16:47:15 +1100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-03-16 19:36:11 +0100
commitac1e123e56a2757cb3332e464fff6b23c36fdec1 (patch)
treeac9d54a57ac9feb2acc47bcfff9201fbe0e3bc53 /pci-arbiter/startup.c
parentb901dab073de26f9052a0c69872c1f3d4f15eea7 (diff)
machdev,rump,pci: Rework bootstrap
* libmachdev/trivfs_server.c (bootstrapped): Rename to bootstrapping. (trivfs_S_fsys_startup): Call fsys_startup on the bootstrap port. (essential_task): New function. (trivfs_S_fsys_init): Call fsys_init on the bootstrap port. Configure proc. Mark us as essential when bootstrapping even without a devnode. (arrange_shutdown_notification): Do not configure proc. (machdev_trivfs_init): Always get the bootstrap port from the kernel, leave it MACH_PORT_NULL if unavailable. Call fsys_getpriv on it if it is. * pci-arbiter/Makefile (SRCS): Remove startup.c. * pci-arbiter/startup.c: Delete file. * pci-arbiter/startup.h: Delete file. * pci-arbiter/main.c: Do not include "startup.h" (pci_device_shutdown): Do not try to lokup the dosync_handle. (pcifs_startup): Always create the pci_control_port right on the control port. (main): Call machdev_device_init after machdev_trivfs_init. Do not call arrange_shutdown_notification. * rumpdisk/main.c (netfs_server_name): Don't pretend to be the arbiter anymore (main): Call machdev_device_init after machdev_trivfs_init. Message-Id: <20210316054715.788725-1-damien@zamaudio.com>
Diffstat (limited to 'pci-arbiter/startup.c')
-rw-r--r--pci-arbiter/startup.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/pci-arbiter/startup.c b/pci-arbiter/startup.c
deleted file mode 100644
index 421c9e24..00000000
--- a/pci-arbiter/startup.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- Copyright (C) 2017 Free Software Foundation, Inc.
- Written by Michael I. Bushnell, p/BSG.
-
- This file is part of the GNU Hurd.
-
- The GNU Hurd is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- The GNU Hurd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with the GNU Hurd. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/* Startup and shutdown notifications management */
-
-#include "startup.h"
-
-#include <unistd.h>
-#include <hurd/paths.h>
-#include <hurd/startup.h>
-#include <hurd/netfs.h>
-
-struct port_class *pci_shutdown_notify_class;
-
-void
-arrange_shutdown_notification ()
-{
- error_t err;
- mach_port_t initport, notify;
- struct port_info *pi;
-
- pci_shutdown_notify_class = ports_create_class (0, 0);
-
- /* Arrange to get notified when the system goes down,
- but if we fail for some reason, just silently give up. No big deal. */
-
- err = ports_create_port (pci_shutdown_notify_class, netfs_port_bucket,
- sizeof (struct port_info), &pi);
- if (err)
- return;
-
- initport = file_name_lookup (_SERVERS_STARTUP, 0, 0);
- if (initport == MACH_PORT_NULL)
- return;
-
- notify = ports_get_send_right (pi);
- ports_port_deref (pi);
- startup_request_notification (initport, notify,
- MACH_MSG_TYPE_MAKE_SEND,
- program_invocation_short_name);
- mach_port_deallocate (mach_task_self (), notify);
- mach_port_deallocate (mach_task_self (), initport);
-}