Bug 17373 - 'sparc_cpu_model' inconsistently available for sparc32 and sparc64
'sparc_cpu_model' inconsistently available for sparc32 and sparc64
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
sparc Linux
medium Severity medium
: ---
: ---
Assigned To: David Miller
Depends On:
  Show dependency treegraph
Reported: 2000-09-08 22:47 EDT by Paul Kronenwetter
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-09-16 18:00:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Paul Kronenwetter 2000-09-08 22:47:23 EDT
When compiling sane-1.0.3 for sparc (32) one of the source files (sanei/sanei_ab306.c) includes asm/io.h, which in turn includes 
asm-sparc/io.h.  One of the inlines in asm-sparc/io.h is mapioaddr and it references sparc_cpu_model.  This reference is *not* contained within 
an #ifdef __KERNEL__/#endif pair.  However, in asm-sparc/system.h, the definition of sparc_cpu_model *is* protected by #ifdef __KERNEL__ 
and is thus, unavailable for asm-sparc/io.h to use.

Under sparc64, the sparc_cpu_model definition is *not* protected, so things work fine for folks who are fortunate enough to have Ultras!

The definitions should be consistent, either protect under sparc64 or un-protect in sparc32.

Comment 1 David Miller 2000-09-16 21:59:17 EDT
Any program using asm/io.h in userland programs on Sparc needs to be fixed.
Nothing which happens in that header file is appropriate for userland at all,
I/O is done via mmap() of a device and the macros in io.h on Sparc would
not work outside of the kernel.

I'll fix the kernel headers, but SANE needs to be fixed here instead. 
Comment 2 Paul Kronenwetter 2000-09-16 23:38:59 EDT
I think SANE will be fine once the declarations are straightened out.  I don't
believe that SANE actually uses "bad" stuff from the file, but we'll see after
the fix.


Note You need to log in before you can comment on or make changes to this bug.