Merge branch 'amd-iommu/2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu into core/iommu
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/lmb.h>
|
||||
#include <asm/bug.h>
|
||||
#include <asm/abs_addr.h>
|
||||
|
||||
@@ -90,11 +91,10 @@ static void dma_direct_unmap_sg(struct device *dev, struct scatterlist *sg,
|
||||
static int dma_direct_dma_supported(struct device *dev, u64 mask)
|
||||
{
|
||||
#ifdef CONFIG_PPC64
|
||||
/* Could be improved to check for memory though it better be
|
||||
* done via some global so platforms can set the limit in case
|
||||
/* Could be improved so platforms can set the limit in case
|
||||
* they have limited DMA windows
|
||||
*/
|
||||
return mask >= DMA_BIT_MASK(32);
|
||||
return mask >= (lmb_end_of_DRAM() - 1);
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
|
@@ -407,7 +407,8 @@ struct power_pmu mpc7450_pmu = {
|
||||
|
||||
static int init_mpc7450_pmu(void)
|
||||
{
|
||||
if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/7450"))
|
||||
if (!cur_cpu_spec->oprofile_cpu_type ||
|
||||
strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/7450"))
|
||||
return -ENODEV;
|
||||
|
||||
return register_power_pmu(&mpc7450_pmu);
|
||||
|
@@ -518,6 +518,8 @@ void hw_perf_disable(void)
|
||||
struct cpu_hw_counters *cpuhw;
|
||||
unsigned long flags;
|
||||
|
||||
if (!ppmu)
|
||||
return;
|
||||
local_irq_save(flags);
|
||||
cpuhw = &__get_cpu_var(cpu_hw_counters);
|
||||
|
||||
@@ -572,6 +574,8 @@ void hw_perf_enable(void)
|
||||
int n_lim;
|
||||
int idx;
|
||||
|
||||
if (!ppmu)
|
||||
return;
|
||||
local_irq_save(flags);
|
||||
cpuhw = &__get_cpu_var(cpu_hw_counters);
|
||||
if (!cpuhw->disabled) {
|
||||
@@ -737,6 +741,8 @@ int hw_perf_group_sched_in(struct perf_counter *group_leader,
|
||||
long i, n, n0;
|
||||
struct perf_counter *sub;
|
||||
|
||||
if (!ppmu)
|
||||
return 0;
|
||||
cpuhw = &__get_cpu_var(cpu_hw_counters);
|
||||
n0 = cpuhw->n_counters;
|
||||
n = collect_events(group_leader, ppmu->n_counter - n0,
|
||||
@@ -1281,6 +1287,8 @@ void hw_perf_counter_setup(int cpu)
|
||||
{
|
||||
struct cpu_hw_counters *cpuhw = &per_cpu(cpu_hw_counters, cpu);
|
||||
|
||||
if (!ppmu)
|
||||
return;
|
||||
memset(cpuhw, 0, sizeof(*cpuhw));
|
||||
cpuhw->mmcr[0] = MMCR0_FC;
|
||||
}
|
||||
|
@@ -606,7 +606,8 @@ static struct power_pmu power4_pmu = {
|
||||
|
||||
static int init_power4_pmu(void)
|
||||
{
|
||||
if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power4"))
|
||||
if (!cur_cpu_spec->oprofile_cpu_type ||
|
||||
strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power4"))
|
||||
return -ENODEV;
|
||||
|
||||
return register_power_pmu(&power4_pmu);
|
||||
|
@@ -678,8 +678,9 @@ static struct power_pmu power5p_pmu = {
|
||||
|
||||
static int init_power5p_pmu(void)
|
||||
{
|
||||
if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5+")
|
||||
&& strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5++"))
|
||||
if (!cur_cpu_spec->oprofile_cpu_type ||
|
||||
(strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5+")
|
||||
&& strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5++")))
|
||||
return -ENODEV;
|
||||
|
||||
return register_power_pmu(&power5p_pmu);
|
||||
|
@@ -618,7 +618,8 @@ static struct power_pmu power5_pmu = {
|
||||
|
||||
static int init_power5_pmu(void)
|
||||
{
|
||||
if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5"))
|
||||
if (!cur_cpu_spec->oprofile_cpu_type ||
|
||||
strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5"))
|
||||
return -ENODEV;
|
||||
|
||||
return register_power_pmu(&power5_pmu);
|
||||
|
@@ -537,7 +537,8 @@ static struct power_pmu power6_pmu = {
|
||||
|
||||
static int init_power6_pmu(void)
|
||||
{
|
||||
if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power6"))
|
||||
if (!cur_cpu_spec->oprofile_cpu_type ||
|
||||
strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power6"))
|
||||
return -ENODEV;
|
||||
|
||||
return register_power_pmu(&power6_pmu);
|
||||
|
@@ -366,7 +366,8 @@ static struct power_pmu power7_pmu = {
|
||||
|
||||
static int init_power7_pmu(void)
|
||||
{
|
||||
if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power7"))
|
||||
if (!cur_cpu_spec->oprofile_cpu_type ||
|
||||
strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power7"))
|
||||
return -ENODEV;
|
||||
|
||||
return register_power_pmu(&power7_pmu);
|
||||
|
@@ -488,8 +488,9 @@ static struct power_pmu ppc970_pmu = {
|
||||
|
||||
static int init_ppc970_pmu(void)
|
||||
{
|
||||
if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970")
|
||||
&& strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970MP"))
|
||||
if (!cur_cpu_spec->oprofile_cpu_type ||
|
||||
(strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970")
|
||||
&& strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970MP")))
|
||||
return -ENODEV;
|
||||
|
||||
return register_power_pmu(&ppc970_pmu);
|
||||
|
Reference in New Issue
Block a user