~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/s390/kernel/topology.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#include <linux/smp.h>
18
18
#include <linux/cpuset.h>
19
19
#include <asm/delay.h>
20
 
#include <asm/s390_ext.h>
21
20
 
22
21
#define PTF_HORIZONTAL  (0UL)
23
22
#define PTF_VERTICAL    (1UL)
52
51
{
53
52
        cpumask_t mask;
54
53
 
55
 
        cpus_clear(mask);
 
54
        cpumask_clear(&mask);
56
55
        if (!topology_enabled || !MACHINE_HAS_TOPOLOGY) {
57
56
                cpumask_copy(&mask, cpumask_of(cpu));
58
57
                return mask;
59
58
        }
60
59
        while (info) {
61
 
                if (cpu_isset(cpu, info->mask)) {
 
60
                if (cpumask_test_cpu(cpu, &info->mask)) {
62
61
                        mask = info->mask;
63
62
                        break;
64
63
                }
65
64
                info = info->next;
66
65
        }
67
 
        if (cpus_empty(mask))
68
 
                mask = cpumask_of_cpu(cpu);
 
66
        if (cpumask_empty(&mask))
 
67
                cpumask_copy(&mask, cpumask_of(cpu));
69
68
        return mask;
70
69
}
71
70
 
85
84
                        if (cpu_logical_map(lcpu) != rcpu)
86
85
                                continue;
87
86
#ifdef CONFIG_SCHED_BOOK
88
 
                        cpu_set(lcpu, book->mask);
 
87
                        cpumask_set_cpu(lcpu, &book->mask);
89
88
                        cpu_book_id[lcpu] = book->id;
90
89
#endif
91
 
                        cpu_set(lcpu, core->mask);
 
90
                        cpumask_set_cpu(lcpu, &core->mask);
92
91
                        cpu_core_id[lcpu] = core->id;
93
92
                        smp_cpu_polarization[lcpu] = tl_cpu->pp;
94
93
                }
101
100
 
102
101
        info = &core_info;
103
102
        while (info) {
104
 
                cpus_clear(info->mask);
 
103
                cpumask_clear(&info->mask);
105
104
                info = info->next;
106
105
        }
107
106
#ifdef CONFIG_SCHED_BOOK
108
107
        info = &book_info;
109
108
        while (info) {
110
 
                cpus_clear(info->mask);
 
109
                cpumask_clear(&info->mask);
111
110
                info = info->next;
112
111
        }
113
112
#endif