Skip to contentSkip to conversation

Reg. asm-sparc64/processor.h

DISCUSSION Shanti Katta 2 participants 4 messages May 23, 2002 – May 24, 2002

lore
Share & tools
lore
#0 lore raw

Hi,
I am trying to port User-mode-linux to Sparc64 architecture. I have the debian(sid) on my host system with custom built 2.4.18 kernel. When I try to generate some header file for UML that #included <asm-sparc64/processor.h> file, I was getting parse errors for u64 data types. When I changed all those U64 data-types to __u64 type, it fixed the error. So, I was just wondering, whether it is the right thing to do.

-Thanks in advance
-Shanti Katta

#1 lore raw

If you want the 'u64' type, define __KERNEL__. That is what every platform does, protect the types without underscores with a __KERNEL__ ifdef.

#2 lore raw
Quoted 4 lines · David S. Miller

If you want the 'u64' type, define __KERNEL__. That is what every platform does, protect the types without underscores with a __KERNEL__ ifdef.

Hi,
In asm-sparc64/processor.h (2.4.18), in thread_struct structure, there are 3 fields:

        u64 *user_cntd0, *user_cntd1;
        u64 kernel_cntd0, kernel_cntd1;
        u64 pcr_reg; 

which are defined without #ifdef __KERNEL__ . I guess, this is a bug, which needs fixing.

Thanks
-Regards
-Shanti Katta

#3 lore raw

From: Shanti Katta <[email protected]>
Date: 23 May 2002 19:24:35 -0400

Quoted 4 lines · David S. Miller

If you want the 'u64' type, define __KERNEL__. That is what every platform does, protect the types without underscores with a __KERNEL__ ifdef.

In asm-sparc64/processor.h (2.4.18), in thread_struct structure, there are 3 fields:

           u64 *user_cntd0, *user_cntd1;
           u64 kernel_cntd0, kernel_cntd1;
           u64 pcr_reg; 

which are defined without #ifdef __KERNEL__ . I guess, this is a bug, which needs fixing.

You shouldn't be including such kernel headers from userspace.