Bug 17373

Summary: 'sparc_cpu_model' inconsistently available for sparc32 and sparc64
Product: [Retired] Red Hat Linux Reporter: Paul Kronenwetter <kronenpj>
Component: kernelAssignee: David Miller <davem>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: sparc   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-09-16 22:00:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paul Kronenwetter 2000-09-09 02:47:23 UTC
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.

Thanks!
-Paul
kronenpj.com

Comment 1 David Miller 2000-09-17 01:59:17 UTC
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-17 03:38:59 UTC
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.

Thanks!