Bug 71334

Summary: [mem] [patch] mem_range_attr_{set|get} are no longer kernel-callable
Product: Base System Reporter: Dan Lukes <dan>
Component: kernAssignee: Antoine Brodin <antoine>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.3-BETA2   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Makefile.diff none

Description Dan Lukes 2004-09-03 10:20:23 UTC
	The mem_range_attr_{set|get} functions has been moved from kernel
into separate module. After it, they are no longer avaiable for other kernel
modules

Fix: Make those functions kernel-callable again:



! int
  mem_range_attr_set(struct mem_range_desc *mrd, int *arg)
  {
        /* can we handle this? */
--- 51,57 ----
        return (0);
  }

! static int
  mem_range_attr_set(struct mem_range_desc *mrd, int *arg)
  {
        /* can we handle this? */--nVutA227qBYNLFbsMsUMOyqpBZgMqJfrrqs0xgdBy0ywjp5o
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

*** sys/dev/mem/memutil.c.ORIG  Wed Aug  4 20:30:31 2004
--- sys/dev/mem/memutil.c       Fri Sep  3 10:55:59 2004
***************
*** 36,42 ****
   * Implementation-neutral, kernel-callable functions for manipulating
   * memory range attributes.
   */
! int
  mem_range_attr_get(struct mem_range_desc *mrd, int *arg)
  {
        /* can we handle this? */
--- 36,42 ----
   * Implementation-neutral, kernel-callable functions for manipulating
   * memory range attributes.
   */
! static int
  mem_range_attr_get(struct mem_range_desc *mrd, int *arg)
  {
        /* can we handle this? */
***************
*** 51,57 ****
        return (0);
  }
How-To-Repeat: 
	Try to load any kernel-loadable module which use mem_range_attr_{set|get} 
function
Comment 1 Dan Lukes 2004-09-05 03:06:41 UTC
I'm sorry, but the attached patch is mistake. I attached another file 
that I want. The correct patch follows.

					Dan

-- 
Dan Lukes     tel: +420 2 21914205, fax: +420 2 21914206
root of  FIONet, KolejNET,  webmaster  of www.freebsd.cz
AKA: dan@obluda.cz, dan@freebsd.cz,dan@kolej.mff.cuni.cz
Comment 2 Antoine Brodin freebsd_committer freebsd_triage 2008-03-08 23:21:49 UTC
Responsible Changed
From-To: freebsd-bugs->antoine

Take.
Comment 3 Antoine Brodin freebsd_committer freebsd_triage 2008-03-10 19:59:28 UTC
State Changed
From-To: open->feedback

Asking for feedback: can you provide evidence that these 
2 functions are no longer callable? 
I can't reproduce this. (I built a kernel with "nodevice mem" 
and the drm module still works) 
As long as you "MODULE_DEPEND(foo, mem, 1, 1, 1);" in the 
calling module there should be no problem. 
You can also have a look at 
http://lists.freebsd.org/pipermail/freebsd-standards/2004-June/000619.html 
to know what EXPORT_SYMS must be used for. 
Thanks.
Comment 4 Dan Lukes 2008-03-10 22:08:35 UTC
Forty months past submission of the PR I remember no details that are 
not recorded here. Nor I have FreeBSD 5.3-BETA2 or something similar 
anywhere. It seems there is no such problem on 6.3-RELEASE.

I aprecitate your's interest but it's too late for such problem.

Let close it.

Thank you.

					Dan
Comment 5 Antoine Brodin freebsd_committer freebsd_triage 2008-03-10 22:15:15 UTC
State Changed
From-To: feedback->closed

Close at submitters request, it appears to be fixed.