Project

General

Profile

Actions

Bug #14881

open

hat_getkpfnum is referenced but not documented

Added by Garrett D'Amore 2 months ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

This is an obsolete function, that largely exists for SVID compatibility.

It isn't documented, although some references to it exist in other pages.

We should probably remove it entirely. Nobody should be using it any more. (We should verify that none of the closed drivers have references to it -- historically this was found in some really old drivers.)


Related issues

Related to illumos gate - Bug #536: hat_getkpfnum needs to be removedResolvedGarrett D'Amore2010-12-17

Actions
Actions #1

Updated by Joshua M. Clulow 2 months ago

  • Related to Bug #536: hat_getkpfnum needs to be removed added
Actions #2

Updated by Joshua M. Clulow 2 months ago

I think you already removed the function in #536 ? Seems like it's just vestigial mentions in comments and manuals at this point:

$ rg hat_getkpfnum
uts/common/sys/ddi.h
163: * SVR4MP replacement for hat_getkpfnum()

uts/common/os/ddi.c
1202: * hat_getkpfnum.  The only major difference is

man/man9e/Intro.9e
128:class, \fBsegmap\fR(9E) and \fBhat_getkpfnum\fR(9F)

man/man9e/mmap.9e
127:\fBhat_getkpfnum\fR(9F) for the physical page in device memory containing the
131:\fBhat_getkpfnum\fR(9F) accepts a kernel virtual address as an argument. A
159:the value returned by \fBhat_getkpfnum\fR(9F), for the page at offset \fIoff\fR
167:\fIoff\fR is valid, \fBhat_getkpfnum\fR(9F) is called to obtain the page frame
212:         return (hat_getkpfnum (xsp->regp->csr + off));
251:.BR hat_getkpfnum (9F)
266:number may be obtained by calling \fBhat_getkpfnum\fR(9F) with the kernel
274:the call to \fBhat_getkpfnum\fR(9F).

man/man9f/Intro.9f
574:\fBhat_getkpfnum\fR  DKI only
Actions #3

Updated by Garrett D'Amore 2 months ago

I think you're right -- I forget stuff I did like a decade ago. So this ticket should just be to clean up the vestiges.

Actions #4

Updated by Garrett D'Amore 2 months ago

kvtoppid has a reference in the docs, but I also don't believe it has any callers or is documented. I'll file a ticket to remove it.

Actions #5

Updated by Garrett D'Amore 2 months ago

The API for mmap(9e) refers to this, and it looks kind of impossible to define it without referring to PFNs and hence to this function we no longer have.

No drivers except /dev/mem support mmap(9e).

Maybe we should just eliminate the details for how to implement this function, since we can't actually say today how to correctly implement it.

Actions

Also available in: Atom PDF