lkml.org 
[lkml]   [2009]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 15/20] x86, ds: use single debug store cpu configuration
    Use a single configuration for all cpus.


    Reported-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
    ---
    arch/x86/kernel/ds.c | 7 5 + 2 - 0 !
    1 file changed, 5 insertions(+), 2 deletions(-)

    Index: b/arch/x86/kernel/ds.c
    ===================================================================
    --- a/arch/x86/kernel/ds.c
    +++ b/arch/x86/kernel/ds.c
    @@ -47,9 +47,8 @@ struct ds_configuration {
    /* Control bit-masks indexed by enum ds_feature: */
    unsigned long ctl[dsf_ctl_max];
    };
    -static DEFINE_PER_CPU(struct ds_configuration, ds_cfg_array);
    +static struct ds_configuration ds_cfg __read_mostly;

    -#define ds_cfg per_cpu(ds_cfg_array, smp_processor_id())

    /* Maximal size of a DS configuration: */
    #define MAX_SIZEOF_DS (12 * 8)
    @@ -1268,6 +1267,10 @@ ds_configure(const struct ds_configurati

    void __cpuinit ds_init_intel(struct cpuinfo_x86 *c)
    {
    + /* Only configure the first cpu. Others are identical. */
    + if (ds_cfg.name)
    + return;
    +
    switch (c->x86) {
    case 0x6:
    switch (c->x86_model) {
    --
    ---------------------------------------------------------------------
    Intel GmbH
    Dornacher Strasse 1
    85622 Feldkirchen/Muenchen Germany
    Sitz der Gesellschaft: Feldkirchen bei Muenchen
    Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
    Registergericht: Muenchen HRB 47456 Ust.-IdNr.
    VAT Registration No.: DE129385895
    Citibank Frankfurt (BLZ 502 109 00) 600119052

    This e-mail and any attachments may contain confidential material for
    the sole use of the intended recipient(s). Any review or distribution
    by others is strictly prohibited. If you are not the intended
    recipient, please contact the sender and delete all copies.
    \
     
     \ /
      Last update: 2009-04-03 16:57    [W:0.033 / U:0.024 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site