lkml.org 
[lkml]   [2010]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/5] intel-agp: Switch to wbinvd_on_all_cpus
    Date
    From: Borislav Petkov <borislav.petkov@amd.com>

    Simplify if-statement while at it.

    Cc: Dave Jones <davej@redhat.com>
    Cc: David Airlie <airlied@linux.ie>
    Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
    ---
    drivers/char/agp/intel-agp.c | 14 +++-----------
    1 files changed, 3 insertions(+), 11 deletions(-)

    diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
    index 30c36ac..28660b4 100644
    --- a/drivers/char/agp/intel-agp.c
    +++ b/drivers/char/agp/intel-agp.c
    @@ -815,12 +815,6 @@ static void intel_i830_setup_flush(void)
    intel_i830_fini_flush();
    }

    -static void
    -do_wbinvd(void *null)
    -{
    - wbinvd();
    -}
    -
    /* The chipset_flush interface needs to get data that has already been
    * flushed out of the CPU all the way out to main memory, because the GPU
    * doesn't snoop those buffers.
    @@ -837,12 +831,10 @@ static void intel_i830_chipset_flush(struct agp_bridge_data *bridge)

    memset(pg, 0, 1024);

    - if (cpu_has_clflush) {
    + if (cpu_has_clflush)
    clflush_cache_range(pg, 1024);
    - } else {
    - if (on_each_cpu(do_wbinvd, NULL, 1) != 0)
    - printk(KERN_ERR "Timed out waiting for cache flush.\n");
    - }
    + else if (wbinvd_on_all_cpus() != 0)
    + printk(KERN_ERR "Timed out waiting for cache flush.\n");
    }

    /* The intel i830 automatically initializes the agp aperture during POST.
    --
    1.6.6


    \
     
     \ /
      Last update: 2010-01-22 16:05    [W:0.031 / U:180.900 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site