sync with OpenBSD -current
This commit is contained in:
parent
14e313b3c5
commit
d22f2a15f3
34 changed files with 352 additions and 240 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: conf.c,v 1.22 2023/03/06 17:20:06 miod Exp $ */
|
||||
/* $OpenBSD: conf.c,v 1.24 2024/06/12 02:50:25 jsg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
|
@ -100,7 +100,6 @@ cdev_decl(lpt);
|
|||
#include "ucom.h"
|
||||
#include "radio.h"
|
||||
#include "drm.h"
|
||||
cdev_decl(drm);
|
||||
|
||||
#include "wsdisplay.h"
|
||||
#include "wskbd.h"
|
||||
|
@ -237,6 +236,8 @@ struct cdevsw cdevsw[] =
|
|||
};
|
||||
int nchrdev = nitems(cdevsw);
|
||||
|
||||
int mem_no = 2; /* major device number of memory special file */
|
||||
|
||||
/*
|
||||
* Swapdev is a fake device implemented
|
||||
* in sw.c used only internally to get to swstrategy.
|
||||
|
@ -246,7 +247,7 @@ int nchrdev = nitems(cdevsw);
|
|||
* confuse, e.g. the hashing routines. Instead, /dev/drum is
|
||||
* provided as a character (raw) device.
|
||||
*/
|
||||
dev_t swapdev = makedev(BMAJ_SW, 0);
|
||||
dev_t swapdev = makedev(1, 0);
|
||||
|
||||
/*
|
||||
* Returns true if dev is /dev/mem or /dev/kmem.
|
||||
|
@ -254,8 +255,7 @@ dev_t swapdev = makedev(BMAJ_SW, 0);
|
|||
int
|
||||
iskmemdev(dev_t dev)
|
||||
{
|
||||
|
||||
return (major(dev) == CMAJ_MM && minor(dev) < 2);
|
||||
return (major(dev) == mem_no && minor(dev) < 2);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -264,14 +264,13 @@ iskmemdev(dev_t dev)
|
|||
int
|
||||
iszerodev(dev_t dev)
|
||||
{
|
||||
|
||||
return (major(dev) == CMAJ_MM && minor(dev) == 12);
|
||||
return (major(dev) == mem_no && minor(dev) == 12);
|
||||
}
|
||||
|
||||
dev_t
|
||||
getnulldev(void)
|
||||
{
|
||||
return makedev(CMAJ_MM, 2);
|
||||
return makedev(mem_no, 2);
|
||||
}
|
||||
|
||||
const int chrtoblktbl[] = {
|
||||
|
@ -348,8 +347,8 @@ dev_rawpart(struct device *dv)
|
|||
|
||||
switch (majdev) {
|
||||
/* add here any device you want to be checksummed on boot */
|
||||
case BMAJ_WD:
|
||||
case BMAJ_SD:
|
||||
case 0: /* wd */
|
||||
case 4: /* sd */
|
||||
return (MAKEDISKDEV(majdev, dv->dv_unit, RAW_PART));
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: cpu.c,v 1.118 2024/05/30 04:16:25 tb Exp $ */
|
||||
/* $OpenBSD: cpu.c,v 1.119 2024/06/11 15:44:55 kettenis Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
|
||||
|
@ -1802,6 +1802,10 @@ cpu_opp_mountroot(struct device *self)
|
|||
min = ot->ot_opp_hz_min;
|
||||
max = ot->ot_opp_hz_max;
|
||||
level_hz = clock_get_frequency(ci->ci_node, NULL);
|
||||
if (level_hz < min)
|
||||
level_hz = min;
|
||||
if (level_hz > max)
|
||||
level_hz = max;
|
||||
level = howmany(100 * (level_hz - min), (max - min));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: conf.h,v 1.4 2022/06/28 14:43:50 visa Exp $ */
|
||||
/* $OpenBSD: conf.h,v 1.5 2024/06/12 02:50:25 jsg Exp $ */
|
||||
/* $NetBSD: conf.h,v 1.2 1996/05/05 19:28:34 christos Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -58,43 +58,4 @@ cdev_decl(openprom);
|
|||
cdev_decl(apm);
|
||||
cdev_decl(acpiapm);
|
||||
|
||||
/*
|
||||
* These numbers have to be in sync with bdevsw/cdevsw.
|
||||
*/
|
||||
|
||||
#define BMAJ_WD 0
|
||||
#define BMAJ_SW 1
|
||||
#define BMAJ_SD 4
|
||||
#define BMAJ_ST 5
|
||||
|
||||
#define CMAJ_MM 2
|
||||
#define CMAJ_PTS 5
|
||||
#define CMAJ_PTC 6
|
||||
#define CMAJ_COM 8
|
||||
#define CMAJ_WSDISPLAY 12
|
||||
#define CMAJ_ST 14
|
||||
#define CMAJ_LPT 16
|
||||
#define CMAJ_CH 17
|
||||
#define CMAJ_UK 20
|
||||
#define CMAJ_BPF 23
|
||||
#define CMAJ_TUN 40
|
||||
#define CMAJ_AUDIO 42
|
||||
#define CMAJ_VIDEO 44
|
||||
#define CMAJ_BKTR 49
|
||||
#define CMAJ_MIDI 52
|
||||
#define CMAJ_USB 61
|
||||
#define CMAJ_UHID 62
|
||||
#define CMAJ_UGEN 63
|
||||
#define CMAJ_ULPT 64
|
||||
#define CMAJ_UCOM 66
|
||||
#define CMAJ_WSKBD 67
|
||||
#define CMAJ_WSMOUSE 68
|
||||
#ifdef USER_PCICONF
|
||||
#define CMAJ_PCI 72
|
||||
#endif
|
||||
#define CMAJ_RADIO 76
|
||||
#define CMAJ_DRM 87
|
||||
#define CMAJ_GPIO 88
|
||||
#define CMAJ_VSCSI 89
|
||||
|
||||
#endif /* _MACHINE_CONF_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue