mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Question] x86,APIC: In apicdef.h dfr,svr,...... shouldn't be const?
@ 2009-09-01  5:48 Rakib Mullick
  2009-09-01  8:43 ` Cyrill Gorcunov
  2009-09-02  2:17 ` Maciej W. Rozycki
  0 siblings, 2 replies; 6+ messages in thread
From: Rakib Mullick @ 2009-09-01  5:48 UTC (permalink / raw)
  To: LKML, x86; +Cc: Ingo Molnar

Hello guys, Intel System programmers guide says - dfr, svr, esr - this
registers should be readonly. So shouldn't they use const? Or is it
anything else?

And apicdef.h also contains a style problem, checkpatch warns about
following style:

              u32	spurious_vector	:  8

Check patch wants as:

                         u32	spurious_vector:8

Shouldn't this issues be fixed?

Thanks,

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

* Re: [Question] x86,APIC: In apicdef.h dfr,svr,...... shouldn't be  const?
  2009-09-01  5:48 [Question] x86,APIC: In apicdef.h dfr,svr,...... shouldn't be const? Rakib Mullick
@ 2009-09-01  8:43 ` Cyrill Gorcunov
  2009-09-01 19:41   ` Cyrill Gorcunov
  2009-09-02  2:17 ` Maciej W. Rozycki
  1 sibling, 1 reply; 6+ messages in thread
From: Cyrill Gorcunov @ 2009-09-01  8:43 UTC (permalink / raw)
  To: Rakib Mullick; +Cc: LKML, x86, Ingo Molnar, Yinghai Lu

On 9/1/09, Rakib Mullick <rakib.mullick@gmail.com> wrote:
> Hello guys, Intel System programmers guide says - dfr, svr, esr - this
> registers should be readonly. So shouldn't they use const? Or is it
> anything else?

Hi Rakib, i dont have sources under my hands at moment, but iirc there
were situations we nees to poke esr register.

>
> And apicdef.h also contains a style problem, checkpatch warns about
> following style:
>
>               u32	spurious_vector	:  8
>
> Check patch wants as:
>
>                          u32	spurious_vector:8
>
> Shouldn't this issues be fixed?
>
> Thanks,
> --

i dont see reason why not ;)
though i wonder why we need this structure at all. We may have
extended amd entries.
Yinghai cced.

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

* Re: [Question] x86,APIC: In apicdef.h dfr,svr,...... shouldn't be const?
  2009-09-01  8:43 ` Cyrill Gorcunov
@ 2009-09-01 19:41   ` Cyrill Gorcunov
  0 siblings, 0 replies; 6+ messages in thread
From: Cyrill Gorcunov @ 2009-09-01 19:41 UTC (permalink / raw)
  To: Rakib Mullick, LKML, x86, Ingo Molnar, Yinghai Lu, Suresh Siddha

[Cyrill Gorcunov - Tue, Sep 01, 2009 at 12:43:06PM +0400]
| On 9/1/09, Rakib Mullick <rakib.mullick@gmail.com> wrote:
| > Hello guys, Intel System programmers guide says - dfr, svr, esr - this
| > registers should be readonly. So shouldn't they use const? Or is it
| > anything else?
| 
| Hi Rakib, i dont have sources under my hands at moment, but iirc there
| were situations we nees to poke esr register.
| 
| >
| > And apicdef.h also contains a style problem, checkpatch warns about
| > following style:
| >
| >               u32	spurious_vector	:  8
| >
| > Check patch wants as:
| >
| >                          u32	spurious_vector:8
| >
| > Shouldn't this issues be fixed?
| >
| > Thanks,
| > --
| 
| i dont see reason why not ;)
| though i wonder why we need this structure at all. We may have
| extended amd entries.
| Yinghai cced.
| 

Ingo, Yinghai, Suresh,

is there any particular reason we keep apicdef.h:struct local_apic at all?

Was there some plan on this structure usage in future? If take into
account amd extended registers this structure doesn't cover all
possible cases. And at moment we do poke apic registers via APIC_
macros mostly and it seems that is the more convenient
and flexible approach. The only thing I may imagine where we
could (possibly) use it in future is suspend/resume cases.

But perhaps I miss something?

	-- Cyrill

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

* Re: [Question] x86,APIC: In apicdef.h dfr,svr,...... shouldn't be const?
  2009-09-01  5:48 [Question] x86,APIC: In apicdef.h dfr,svr,...... shouldn't be const? Rakib Mullick
  2009-09-01  8:43 ` Cyrill Gorcunov
@ 2009-09-02  2:17 ` Maciej W. Rozycki
  2009-09-03 22:56   ` Rakib Mullick
  1 sibling, 1 reply; 6+ messages in thread
From: Maciej W. Rozycki @ 2009-09-02  2:17 UTC (permalink / raw)
  To: Rakib Mullick; +Cc: LKML, x86, Ingo Molnar

On Tue, 1 Sep 2009, Rakib Mullick wrote:

> Hello guys, Intel System programmers guide says - dfr, svr, esr - this
> registers should be readonly. So shouldn't they use const? Or is it
> anything else?

 All the three have meaningful semantics on writes at least on some 
versions of the APIC (they either have writable fields or trigger side 
effects on writes).  It looks like your documentation is wrong (not 
unheard of with Intel).

  Maciej

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

* Re: [Question] x86,APIC: In apicdef.h dfr,svr,...... shouldn't be  const?
  2009-09-02  2:17 ` Maciej W. Rozycki
@ 2009-09-03 22:56   ` Rakib Mullick
  2009-09-03 23:21     ` Maciej W. Rozycki
  0 siblings, 1 reply; 6+ messages in thread
From: Rakib Mullick @ 2009-09-03 22:56 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: LKML, x86, Ingo Molnar

On 9/2/09, Maciej W. Rozycki <macro@linux-mips.org> wrote:
>
>  All the three have meaningful semantics on writes at least on some
>  versions of the APIC (they either have writable fields or trigger side
>  effects on writes).  It looks like your documentation is wrong (not
>  unheard of with Intel).

Thanks, Maciej. If my documentation is wrong, then which documentation
should I follow? Isn't there any well defined document?
>
>
>   Maciej
>

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

* Re: [Question] x86,APIC: In apicdef.h dfr,svr,...... shouldn't be  const?
  2009-09-03 22:56   ` Rakib Mullick
@ 2009-09-03 23:21     ` Maciej W. Rozycki
  0 siblings, 0 replies; 6+ messages in thread
From: Maciej W. Rozycki @ 2009-09-03 23:21 UTC (permalink / raw)
  To: Rakib Mullick; +Cc: LKML, x86, Ingo Molnar

On Fri, 4 Sep 2009, Rakib Mullick wrote:

> >  All the three have meaningful semantics on writes at least on some
> >  versions of the APIC (they either have writable fields or trigger side
> >  effects on writes).  It looks like your documentation is wrong (not
> >  unheard of with Intel).
> 
> Thanks, Maciej. If my documentation is wrong, then which documentation
> should I follow? Isn't there any well defined document?

 You may have to track down an older revision of the document or that for 
an older CPU.  These registers may have changed as the architecture 
evolved and while Linux supports all the APIC versions, Intel may have 
omitted details for earlier implementations either deliberately or 
accidentally.

  Maciej

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

end of thread, other threads:[~2009-09-03 23:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-01  5:48 [Question] x86,APIC: In apicdef.h dfr,svr,...... shouldn't be const? Rakib Mullick
2009-09-01  8:43 ` Cyrill Gorcunov
2009-09-01 19:41   ` Cyrill Gorcunov
2009-09-02  2:17 ` Maciej W. Rozycki
2009-09-03 22:56   ` Rakib Mullick
2009-09-03 23:21     ` Maciej W. Rozycki

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

all inboxes | Powered by JetHome®