public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* struct exception_table_entry
@ 2009-04-09 15:05 Michal Simek
  2009-04-14 14:36 ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Michal Simek @ 2009-04-09 15:05 UTC (permalink / raw)
  To: Arnd Bergmann, Linux Kernel list

Hi Arnd,

I am doing some cleanup things in MB MMU kernel and I looked at
exception_table_entry structure.
Only alpha use different types among others. Some arch use only
different names and types int/long.
I think that this structure could be moved to any generic location ->
asm-generic/uaccess.h folder.

I think that this structure types should be acceptable for every archs?

#ifndef exception_table_entry
struct exception_table_entry {
    unsigned long insn;
    unsigned long fixup;
};
#endif

What do you think?

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng)
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: struct exception_table_entry
  2009-04-09 15:05 struct exception_table_entry Michal Simek
@ 2009-04-14 14:36 ` Arnd Bergmann
  2009-04-14 22:14   ` David Miller
  2009-04-15  6:21   ` Michal Simek
  0 siblings, 2 replies; 5+ messages in thread
From: Arnd Bergmann @ 2009-04-14 14:36 UTC (permalink / raw)
  To: michal.simek; +Cc: Linux Kernel list

On Thursday 09 April 2009, Michal Simek wrote:

> I am doing some cleanup things in MB MMU kernel and I looked at
> exception_table_entry structure.
> Only alpha use different types among others. Some arch use only
> different names and types int/long.
> I think that this structure could be moved to any generic location ->
> asm-generic/uaccess.h folder.
> 
> I think that this structure types should be acceptable for every archs?
> 
> #ifndef exception_table_entry
> struct exception_table_entry {
>     unsigned long insn;
>     unsigned long fixup;
> };
> #endif
> 
> What do you think?

Yes, sounds good to me. Have you tried using my generic version of
uaccess.h on microblaze? It already contains a definition like this,
though most of the header doesn't apply for MMU-based architectures.

I suppose it can be improved a bit, but should do the basic job.

	Arnd <><

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: struct exception_table_entry
  2009-04-14 14:36 ` Arnd Bergmann
@ 2009-04-14 22:14   ` David Miller
  2009-04-15  6:26     ` Michal Simek
  2009-04-15  6:21   ` Michal Simek
  1 sibling, 1 reply; 5+ messages in thread
From: David Miller @ 2009-04-14 22:14 UTC (permalink / raw)
  To: arnd; +Cc: michal.simek, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 14 Apr 2009 16:36:11 +0200

> On Thursday 09 April 2009, Michal Simek wrote:
> 
>> I am doing some cleanup things in MB MMU kernel and I looked at
>> exception_table_entry structure.
>> Only alpha use different types among others. Some arch use only
>> different names and types int/long.
>> I think that this structure could be moved to any generic location ->
>> asm-generic/uaccess.h folder.
>> 
>> I think that this structure types should be acceptable for every archs?
>> 
>> #ifndef exception_table_entry
>> struct exception_table_entry {
>>     unsigned long insn;
>>     unsigned long fixup;
>> };
>> #endif
>> 
>> What do you think?
> 
> Yes, sounds good to me. Have you tried using my generic version of
> uaccess.h on microblaze? It already contains a definition like this,
> though most of the header doesn't apply for MMU-based architectures.
> 
> I suppose it can be improved a bit, but should do the basic job.

Note that for space saving several 64-bit architectures use plain
"int" here when they know that all kernel addresses are in the low
32-bits of the address space.

sparc64 is one such architecture and I'd prefer if the size of these
tables does not bloat up when you guys try to make this thing generic.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: struct exception_table_entry
  2009-04-14 14:36 ` Arnd Bergmann
  2009-04-14 22:14   ` David Miller
@ 2009-04-15  6:21   ` Michal Simek
  1 sibling, 0 replies; 5+ messages in thread
From: Michal Simek @ 2009-04-15  6:21 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Linux Kernel list

Arnd Bergmann wrote:
> On Thursday 09 April 2009, Michal Simek wrote:
>
>   
>> I am doing some cleanup things in MB MMU kernel and I looked at
>> exception_table_entry structure.
>> Only alpha use different types among others. Some arch use only
>> different names and types int/long.
>> I think that this structure could be moved to any generic location ->
>> asm-generic/uaccess.h folder.
>>
>> I think that this structure types should be acceptable for every archs?
>>
>> #ifndef exception_table_entry
>> struct exception_table_entry {
>>     unsigned long insn;
>>     unsigned long fixup;
>> };
>> #endif
>>
>> What do you think?
>>     
>
> Yes, sounds good to me. Have you tried using my generic version of
> uaccess.h on microblaze? It already contains a definition like this,
> though most of the header doesn't apply for MMU-based architectures.
>   
I haven't had time to look at it but it is on my list.
> I suppose it can be improved a bit, but should do the basic job.
>   
yes of course. That was just my idea. Use it only for MMU kernels +
#ifndef for structure
doesn't work I think.

Thanks,
Michal
> 	Arnd <><
>   


-- 
Michal Simek, Ing. (M.Eng)
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: struct exception_table_entry
  2009-04-14 22:14   ` David Miller
@ 2009-04-15  6:26     ` Michal Simek
  0 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2009-04-15  6:26 UTC (permalink / raw)
  To: David Miller; +Cc: arnd, linux-kernel

David Miller wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Tue, 14 Apr 2009 16:36:11 +0200
>
>   
>> On Thursday 09 April 2009, Michal Simek wrote:
>>
>>     
>>> I am doing some cleanup things in MB MMU kernel and I looked at
>>> exception_table_entry structure.
>>> Only alpha use different types among others. Some arch use only
>>> different names and types int/long.
>>> I think that this structure could be moved to any generic location ->
>>> asm-generic/uaccess.h folder.
>>>
>>> I think that this structure types should be acceptable for every archs?
>>>
>>> #ifndef exception_table_entry
>>> struct exception_table_entry {
>>>     unsigned long insn;
>>>     unsigned long fixup;
>>> };
>>> #endif
>>>
>>> What do you think?
>>>       
>> Yes, sounds good to me. Have you tried using my generic version of
>> uaccess.h on microblaze? It already contains a definition like this,
>> though most of the header doesn't apply for MMU-based architectures.
>>
>> I suppose it can be improved a bit, but should do the basic job.
>>     
>
> Note that for space saving several 64-bit architectures use plain
> "int" here when they know that all kernel addresses are in the low
> 32-bits of the address space.
>   
Just one my note: use u32 instead of int.

Michal
> sparc64 is one such architecture and I'd prefer if the size of these
> tables does not bloat up when you guys try to make this thing generic.
>   


-- 
Michal Simek, Ing. (M.Eng)
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-04-15  6:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-09 15:05 struct exception_table_entry Michal Simek
2009-04-14 14:36 ` Arnd Bergmann
2009-04-14 22:14   ` David Miller
2009-04-15  6:26     ` Michal Simek
2009-04-15  6:21   ` Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox