]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 31 Mar 2009 01:00:26 +0000 (18:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 31 Mar 2009 01:00:26 +0000 (18:00 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask:
  oprofile: Thou shalt not call __exit functions from __init functions
  cpumask: remove the now-obsoleted pcibus_to_cpumask(): generic
  cpumask: remove cpumask_t from core
  cpumask: convert rcutorture.c
  cpumask: use new cpumask_ functions in core code.
  cpumask: remove references to struct irqaction's mask field.
  cpumask: use mm_cpumask() wrapper: kernel/fork.c
  cpumask: use set_cpu_active in init/main.c
  cpumask: remove node_to_first_cpu
  cpumask: fix seq_bitmap_*() functions.
  cpumask: remove dangerous CPU_MASK_ALL_PTR, &CPU_MASK_ALL

69 files changed:
arch/cris/arch-v10/kernel/time.c
arch/cris/arch-v32/kernel/smp.c
arch/cris/arch-v32/kernel/time.c
arch/frv/kernel/irq-mb93091.c
arch/frv/kernel/irq-mb93093.c
arch/frv/kernel/irq-mb93493.c
arch/frv/kernel/time.c
arch/h8300/kernel/timer/itu.c
arch/h8300/kernel/timer/timer16.c
arch/h8300/kernel/timer/timer8.c
arch/h8300/kernel/timer/tpu.c
arch/ia64/include/asm/topology.h
arch/m32r/kernel/time.c
arch/mips/cobalt/irq.c
arch/mips/emma/markeins/irq.c
arch/mips/include/asm/mach-ip27/topology.h
arch/mips/jazz/irq.c
arch/mips/kernel/cevt-bcm1480.c
arch/mips/kernel/cevt-sb1250.c
arch/mips/kernel/i8253.c
arch/mips/kernel/i8259.c
arch/mips/lasat/interrupt.c
arch/mips/lemote/lm2e/irq.c
arch/mips/sgi-ip27/ip27-nmi.c
arch/mips/sgi-ip32/ip32-irq.c
arch/mips/sni/rm200.c
arch/mips/vr41xx/common/irq.c
arch/mn10300/kernel/time.c
arch/powerpc/include/asm/topology.h
arch/powerpc/platforms/85xx/mpc85xx_cds.c
arch/powerpc/platforms/8xx/m8xx_setup.c
arch/powerpc/platforms/chrp/setup.c
arch/powerpc/platforms/powermac/pic.c
arch/powerpc/platforms/powermac/smp.c
arch/powerpc/sysdev/cpm1.c
arch/sh/include/asm/topology.h
arch/sh/kernel/time_64.c
arch/sh/kernel/timers/timer-cmt.c
arch/sh/kernel/timers/timer-mtu2.c
arch/sh/kernel/timers/timer-tmu.c
arch/sparc/include/asm/topology_64.h
arch/sparc/kernel/irq_32.c
arch/sparc/kernel/sun4d_irq.c
arch/x86/include/asm/topology.h
arch/x86/kernel/irqinit_32.c
arch/x86/kernel/irqinit_64.c
arch/x86/kernel/mfgpt_32.c
arch/x86/kernel/setup.c
arch/x86/kernel/time_64.c
arch/x86/kernel/vmiclock_32.c
drivers/base/cpu.c
drivers/oprofile/buffer_sync.c
fs/seq_file.c
include/asm-generic/topology.h
include/linux/cpuset.h
include/linux/seq_file.h
init/main.c
kernel/cpu.c
kernel/fork.c
kernel/kmod.c
kernel/kthread.c
kernel/rcutorture.c
kernel/sched_cpupri.h
kernel/stop_machine.c
kernel/workqueue.c
mm/allocpercpu.c
mm/pdflush.c
mm/vmstat.c
net/sunrpc/svc.c

index c685ba4c33875c978abb599ce82c132ed3527f1e..2b73c7a5b6499a195a66badd8ef97b4d0c84b413 100644 (file)
@@ -261,7 +261,6 @@ timer_interrupt(int irq, void *dev_id)
 static struct irqaction irq2  = {
        .handler = timer_interrupt,
        .flags = IRQF_SHARED | IRQF_DISABLED,
-       .mask = CPU_MASK_NONE,
        .name = "timer",
 };
 
index 9dac17334640a9cf3eda77c0c0a22b53e817f0a1..f59a973c97ee31893595b2a6c6e2e7778ce15e10 100644 (file)
@@ -65,7 +65,6 @@ static int send_ipi(int vector, int wait, cpumask_t cpu_mask);
 static struct irqaction irq_ipi  = {
        .handler = crisv32_ipi_interrupt,
        .flags = IRQF_DISABLED,
-       .mask = CPU_MASK_NONE,
        .name = "ipi",
 };
 
index 3a13dd6e0a9a0d7e7eb40aaaff2ada62a2033239..65633d0dab860847b1367455b275a535448b6ee3 100644 (file)
@@ -267,7 +267,6 @@ timer_interrupt(int irq, void *dev_id)
 static struct irqaction irq_timer = {
        .handler = timer_interrupt,
        .flags = IRQF_SHARED | IRQF_DISABLED,
-       .mask = CPU_MASK_NONE,
        .name = "timer"
 };
 
index 9e38f99bbab89c7e0677e5da0f38f09d9d6590ea..4dd9adaf115a4de8083ce7bfde075e5f3ac82123 100644 (file)
@@ -109,28 +109,24 @@ static struct irqaction fpga_irq[4]  = {
        [0] = {
                .handler        = fpga_interrupt,
                .flags          = IRQF_DISABLED | IRQF_SHARED,
-               .mask           = CPU_MASK_NONE,
                .name           = "fpga.0",
                .dev_id         = (void *) 0x0028UL,
        },
        [1] = {
                .handler        = fpga_interrupt,
                .flags          = IRQF_DISABLED | IRQF_SHARED,
-               .mask           = CPU_MASK_NONE,
                .name           = "fpga.1",
                .dev_id         = (void *) 0x0050UL,
        },
        [2] = {
                .handler        = fpga_interrupt,
                .flags          = IRQF_DISABLED | IRQF_SHARED,
-               .mask           = CPU_MASK_NONE,
                .name           = "fpga.2",
                .dev_id         = (void *) 0x1c00UL,
        },
        [3] = {
                .handler        = fpga_interrupt,
                .flags          = IRQF_DISABLED | IRQF_SHARED,
-               .mask           = CPU_MASK_NONE,
                .name           = "fpga.3",
                .dev_id         = (void *) 0x6386UL,
        }
index 3c2752ca97754eb881d5fef6ceeeb576ee679df1..e45209031873e63de6e0202bbd3e831a29ff27bb 100644 (file)
@@ -108,7 +108,6 @@ static struct irqaction fpga_irq[1]  = {
        [0] = {
                .handler        = fpga_interrupt,
                .flags          = IRQF_DISABLED,
-               .mask           = CPU_MASK_NONE,
                .name           = "fpga.0",
                .dev_id         = (void *) 0x0700UL,
        }
index 7754c7338e4b42cfaeb4c3a76158665f3b05d275..ba55ecdfb245a5c201bf34583bcad836677ea26e 100644 (file)
@@ -120,14 +120,12 @@ static struct irqaction mb93493_irq[2]  = {
        [0] = {
                .handler        = mb93493_interrupt,
                .flags          = IRQF_DISABLED | IRQF_SHARED,
-               .mask           = CPU_MASK_NONE,
                .name           = "mb93493.0",
                .dev_id         = (void *) __addr_MB93493_IQSR(0),
        },
        [1] = {
                .handler        = mb93493_interrupt,
                .flags          = IRQF_DISABLED | IRQF_SHARED,
-               .mask           = CPU_MASK_NONE,
                .name           = "mb93493.1",
                .dev_id         = (void *) __addr_MB93493_IQSR(1),
        }
index 69f6a4ef5d61b35c67323a85485e1cebedff7a43..fb0ce75772256568bc2195ba08cbfb9a652def94 100644 (file)
@@ -45,7 +45,6 @@ static irqreturn_t timer_interrupt(int irq, void *dummy);
 static struct irqaction timer_irq  = {
        .handler = timer_interrupt,
        .flags = IRQF_DISABLED,
-       .mask = CPU_MASK_NONE,
        .name = "timer",
 };
 
index d1c926596b087ace1359ac7504303296e31f9b9b..4883ba7103a84d8b391a290fc64198949f2c3ca9 100644 (file)
@@ -60,7 +60,6 @@ static struct irqaction itu_irq = {
        .name           = "itu",
        .handler        = timer_interrupt,
        .flags          = IRQF_DISABLED | IRQF_TIMER,
-       .mask           = CPU_MASK_NONE,
 };
 
 static const int __initdata divide_rate[] = {1, 2, 4, 8};
index e14271b7211943b183b23dc7076c78cdd280ba9c..042dbb53f3fb372707ab7a533a884e7ccb6b8dd3 100644 (file)
@@ -55,7 +55,6 @@ static struct irqaction timer16_irq = {
        .name           = "timer-16",
        .handler        = timer_interrupt,
        .flags          = IRQF_DISABLED | IRQF_TIMER,
-       .mask           = CPU_MASK_NONE,
 };
 
 static const int __initdata divide_rate[] = {1, 2, 4, 8};
index 0556d7c7bea62c620377b82ca3b35f92d46f5712..38be0cabef0da0c4433d9d52924eef8f199e5b0b 100644 (file)
@@ -75,7 +75,6 @@ static struct irqaction timer8_irq = {
        .name           = "timer-8",
        .handler        = timer_interrupt,
        .flags          = IRQF_DISABLED | IRQF_TIMER,
-       .mask           = CPU_MASK_NONE,
 };
 
 static const int __initdata divide_rate[] = {8, 64, 8192};
index df7f453a9673c6cdddd0e4f5b24d6cca49be7ceb..ad383caae196c282583d57e54d6e467dca9fcc62 100644 (file)
@@ -65,7 +65,6 @@ static struct irqaction tpu_irq = {
        .name           = "tpu",
        .handler        = timer_interrupt,
        .flags          = IRQF_DISABLED | IRQF_TIMER,
-       .mask           = CPU_MASK_NONE,
 };
 
 const static int __initdata divide_rate[] = {
index 3193f4417e16c8ea919016f05aa904215f6eeae9..f260dcf215154078bf72752eb7991895a9b03fa8 100644 (file)
  */
 #define parent_node(nid) (nid)
 
-/*
- * Returns the number of the first CPU on Node 'node'.
- */
-#define node_to_first_cpu(node) (cpumask_first(cpumask_of_node(node)))
-
 /*
  * Determines the node for a given pci bus
  */
index 6ea017727cced935c638a876dc193e7ef4e3288e..cada3ba4b9902f23bb13620e726a2625897e5d8a 100644 (file)
@@ -230,7 +230,6 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
 static struct irqaction irq0 = {
        .handler = timer_interrupt,
        .flags = IRQF_DISABLED,
-       .mask = CPU_MASK_NONE,
        .name = "MFT2",
 };
 
index ac4fb912649d4e2397083864e06e62169f77a1d6..cb9bf820fe53b4640a7b72264be61deacf998fa7 100644 (file)
@@ -47,7 +47,6 @@ asmlinkage void plat_irq_dispatch(void)
 
 static struct irqaction cascade = {
        .handler        = no_action,
-       .mask           = CPU_MASK_NONE,
        .name           = "cascade",
 };
 
index 2bbc41a1623cae2a3972084af3ce8118b85adc93..43828ae796ec9d0d3276b50ffe5b8f0c29ea1b2f 100644 (file)
@@ -186,7 +186,6 @@ void emma2rh_gpio_irq_init(void)
 static struct irqaction irq_cascade = {
           .handler = no_action,
           .flags = 0,
-          .mask = CPU_MASK_NONE,
           .name = "cascade",
           .dev_id = NULL,
           .next = NULL,
index 55d481569a1f494e1c33a71fe22bbfb8b88f9af4..07547231e078dd3ecd35a988b3cd73bfc30c3683 100644 (file)
@@ -26,7 +26,6 @@ extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
 #define parent_node(node)      (node)
 #define node_to_cpumask(node)  (hub_data(node)->h_cpus)
 #define cpumask_of_node(node)  (&hub_data(node)->h_cpus)
-#define node_to_first_cpu(node)        (cpumask_first(cpumask_of_node(node)))
 struct pci_bus;
 extern int pcibus_to_node(struct pci_bus *);
 
index 03965cb1b2527e23fd60a003284f51279b42a758..d9b6a5b5399d25b3959921288e84b08074571965 100644 (file)
@@ -134,7 +134,6 @@ static irqreturn_t r4030_timer_interrupt(int irq, void *dev_id)
 static struct irqaction r4030_timer_irqaction = {
        .handler        = r4030_timer_interrupt,
        .flags          = IRQF_DISABLED,
-       .mask           = CPU_MASK_CPU0,
        .name           = "R4030 timer",
 };
 
index b820661678b0b948e7fb56e8332a28277df07a98..a5182a20769619dda6bc81a216f89e2059769052 100644 (file)
@@ -144,7 +144,6 @@ void __cpuinit sb1480_clockevent_init(void)
 
        action->handler = sibyte_counter_handler;
        action->flags   = IRQF_DISABLED | IRQF_PERCPU;
-       action->mask    = cpumask_of_cpu(cpu);
        action->name    = name;
        action->dev_id  = cd;
 
index a2eebaafda52c224ee385193bcb998984d9d790d..340f53e5c6b19cd686f2a45bd69dc3f139d581d1 100644 (file)
@@ -143,7 +143,6 @@ void __cpuinit sb1250_clockevent_init(void)
 
        action->handler = sibyte_counter_handler;
        action->flags   = IRQF_DISABLED | IRQF_PERCPU;
-       action->mask    = cpumask_of_cpu(cpu);
        action->name    = name;
        action->dev_id  = cd;
 
index f4d187825f96406612d16a6016ab8defcf997658..689719e34f085db04c1c09f8d18b89f1b9da91cd 100644 (file)
@@ -98,7 +98,6 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
 static struct irqaction irq0  = {
        .handler = timer_interrupt,
        .flags = IRQF_DISABLED | IRQF_NOBALANCING,
-       .mask = CPU_MASK_NONE,
        .name = "timer"
 };
 
@@ -121,7 +120,6 @@ void __init setup_pit_timer(void)
        cd->min_delta_ns = clockevent_delta2ns(0xF, cd);
        clockevents_register_device(cd);
 
-       irq0.mask = cpumask_of_cpu(cpu);
        setup_irq(0, &irq0);
 }
 
index 413bd1d37f5499171e4337b78ee62f387152d811..01c0885a8061569dffe59d31e7ec7aee97588773 100644 (file)
@@ -306,7 +306,6 @@ static void init_8259A(int auto_eoi)
  */
 static struct irqaction irq2 = {
        .handler = no_action,
-       .mask = CPU_MASK_NONE,
        .name = "cascade",
 };
 
index d1ac7a25c85613635cdc14dc7858ff44d921e099..1353fb135ed370969d9b2b7628a13cd041470542 100644 (file)
@@ -104,7 +104,6 @@ asmlinkage void plat_irq_dispatch(void)
 
 static struct irqaction cascade = {
        .handler        = no_action,
-       .mask           = CPU_MASK_NONE,
        .name           = "cascade",
 };
 
index 3e0b7beb1009b336c0eee30f2da22428d6196db2..1d0a09f3b832a69d4617f37222209fc1a569cc0b 100644 (file)
@@ -92,7 +92,6 @@ asmlinkage void plat_irq_dispatch(void)
 
 static struct irqaction cascade_irqaction = {
        .handler = no_action,
-       .mask = CPU_MASK_NONE,
        .name = "cascade",
 };
 
index a1f21d9421e86e7002f99946864118de9d5000dc..6c5a630566f93d77997839577fbc5386c5830c97 100644 (file)
@@ -219,7 +219,7 @@ cont_nmi_dump(void)
                if (i == 1000) {
                        for_each_online_node(node)
                                if (NODEPDA(node)->dump_count == 0) {
-                                       cpu = node_to_first_cpu(node);
+                                       cpu = cpumask_first(cpumask_of_node(node));
                                        for (n=0; n < CNODE_NUM_CPUS(node); cpu++, n++) {
                                                CPUMASK_SETB(nmied_cpus, cpu);
                                                /*
index 0aefc5319a036c938d2db3cff9989ac72b12fa3e..83a0b3c359daecee88c87223beef876d9b35aab9 100644 (file)
@@ -115,14 +115,12 @@ extern irqreturn_t crime_cpuerr_intr(int irq, void *dev_id);
 struct irqaction memerr_irq = {
        .handler = crime_memerr_intr,
        .flags = IRQF_DISABLED,
-       .mask = CPU_MASK_NONE,
        .name = "CRIME memory error",
 };
 
 struct irqaction cpuerr_irq = {
        .handler = crime_cpuerr_intr,
        .flags = IRQF_DISABLED,
-       .mask = CPU_MASK_NONE,
        .name = "CRIME CPU error",
 };
 
index b4352a0c815178f09a90e7561b5fc966fd64eba4..5e687819cbc2aec4aec85dbada30184a345a6551 100644 (file)
@@ -359,7 +359,8 @@ void sni_rm200_init_8259A(void)
  * IRQ2 is cascade interrupt to second interrupt controller
  */
 static struct irqaction sni_rm200_irq2 = {
-       no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL
+       .handler = no_action,
+       .name = "cascade",
 };
 
 static struct resource sni_rm200_pic1_resource = {
index 92dd1a0ca3523023a30d887067c9e280864cfce5..9cc389109b19f42ee82f5d09f69b8d3e8de27024 100644 (file)
@@ -32,7 +32,6 @@ static irq_cascade_t irq_cascade[NR_IRQS] __cacheline_aligned;
 
 static struct irqaction cascade_irqaction = {
        .handler        = no_action,
-       .mask           = CPU_MASK_NONE,
        .name           = "cascade",
 };
 
index e4606586f94ce5e08d35720ca8b4f7512db4aa34..395caf01b9099cc42c2b2e3b0148765df3de0ed9 100644 (file)
@@ -37,7 +37,6 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id);
 static struct irqaction timer_irq = {
        .handler        = timer_interrupt,
        .flags          = IRQF_DISABLED | IRQF_SHARED | IRQF_TIMER,
-       .mask           = CPU_MASK_NONE,
        .name           = "timer",
 };
 
index 375258559ae64fa26e09452c4e80ca978b2a3fe3..054a16d68082a852c460d96436e9f3b7bb3ce41c 100644 (file)
@@ -24,11 +24,6 @@ static inline cpumask_t node_to_cpumask(int node)
 
 #define cpumask_of_node(node) (&numa_cpumask_lookup_table[node])
 
-static inline int node_to_first_cpu(int node)
-{
-       return cpumask_first(cpumask_of_node(node));
-}
-
 int of_node_to_nid(struct device_node *device);
 
 struct pci_bus;
index 0a9e49104bdc42ccd506946e607dfa3361608768..458d91fba91d5f80ba7296c55752b0960eaca11d 100644 (file)
@@ -179,7 +179,6 @@ static irqreturn_t mpc85xx_8259_cascade_action(int irq, void *dev_id)
 static struct irqaction mpc85xxcds_8259_irqaction = {
        .handler = mpc85xx_8259_cascade_action,
        .flags = IRQF_SHARED,
-       .mask = CPU_MASK_NONE,
        .name = "8259 cascade",
 };
 #endif /* PPC_I8259 */
index 0d9f75c74f8cdf22e83f13ba342c45f5b12a0d66..385acfc48397b8f2d2577326b78b49bb68b100f1 100644 (file)
@@ -44,7 +44,6 @@ static irqreturn_t timebase_interrupt(int irq, void *dev)
 
 static struct irqaction tbint_irqaction = {
        .handler = timebase_interrupt,
-       .mask = CPU_MASK_NONE,
        .name = "tbint",
 };
 
index 272d79a8d2896ade7f8f36e22f2b6279077f6793..cd4ad9aea760d966505a977d9d92e5a7f1f33e38 100644 (file)
@@ -472,7 +472,6 @@ static void __init chrp_find_openpic(void)
 #if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_XMON)
 static struct irqaction xmon_irqaction = {
        .handler = xmon_irq,
-       .mask = CPU_MASK_NONE,
        .name = "XMON break",
 };
 #endif
index 6d149ae8ffa71c02928e3bdf52d9b6573e65283b..7039d8f1d3baa1dfdd73e2f9ac80a15fb1c9fb11 100644 (file)
@@ -266,7 +266,6 @@ static unsigned int pmac_pic_get_irq(void)
 static struct irqaction xmon_action = {
        .handler        = xmon_irq,
        .flags          = 0,
-       .mask           = CPU_MASK_NONE,
        .name           = "NMI - XMON"
 };
 #endif
@@ -274,7 +273,6 @@ static struct irqaction xmon_action = {
 static struct irqaction gatwick_cascade_action = {
        .handler        = gatwick_action,
        .flags          = IRQF_DISABLED,
-       .mask           = CPU_MASK_NONE,
        .name           = "cascade",
 };
 
index bd8817b00fa4a80f3d2ab4649e6ef917ec9db8aa..cf1dbe758890df60d441cfbd79421db63e40834f 100644 (file)
@@ -385,7 +385,6 @@ static void __init psurge_dual_sync_tb(int cpu_nr)
 static struct irqaction psurge_irqaction = {
        .handler = psurge_primary_intr,
        .flags = IRQF_DISABLED,
-       .mask = CPU_MASK_NONE,
        .name = "primary IPI",
 };
 
index 490473ce81030475fbfa6075a2c76612dcd48b0e..82424cd7e1287bcc009b81f2327b078229a6050f 100644 (file)
@@ -119,7 +119,6 @@ static irqreturn_t cpm_error_interrupt(int irq, void *dev)
 
 static struct irqaction cpm_error_irqaction = {
        .handler = cpm_error_interrupt,
-       .mask = CPU_MASK_NONE,
        .name = "error",
 };
 
index 066f0fba590e228e0467681dd8b1c4c5c22f6e36..a3f239545897ea5ed72b68714bfc1f8d2f9426c1 100644 (file)
@@ -33,7 +33,6 @@
 
 #define node_to_cpumask(node)  ((void)node, cpu_online_map)
 #define cpumask_of_node(node)  ((void)node, cpu_online_mask)
-#define node_to_first_cpu(node)        ((void)(node),0)
 
 #define pcibus_to_node(bus)    ((void)(bus), -1)
 #define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \
index 59d2a03e8b3c475763ff1d228e6177454f27fe1d..988c77c3723124507ca8f772c1139cefc0925140 100644 (file)
@@ -284,7 +284,6 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
 static struct irqaction irq0  = {
        .handler = timer_interrupt,
        .flags = IRQF_DISABLED,
-       .mask = CPU_MASK_NONE,
        .name = "timer",
 };
 
index c127293271e1f4072140e334697346bb0ab24779..9aa348658ae33905fe8b821bc3066d5e90a00d79 100644 (file)
@@ -109,7 +109,6 @@ static struct irqaction cmt_irq = {
        .name           = "timer",
        .handler        = cmt_timer_interrupt,
        .flags          = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
-       .mask           = CPU_MASK_NONE,
 };
 
 static void cmt_clk_init(struct clk *clk)
index 9a77ae86b403132a0483c964d2bf83af53794f72..9b0ef01264794f6c2a04054b06a906dcb547c2c0 100644 (file)
@@ -115,7 +115,6 @@ static struct irqaction mtu2_irq = {
        .name           = "timer",
        .handler        = mtu2_timer_interrupt,
        .flags          = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
-       .mask           = CPU_MASK_NONE,
 };
 
 static unsigned int divisors[] = { 1, 4, 16, 64, 1, 1, 256 };
index 10b5a6f17cc0a197341458412ba4d5bc906295ac..c5d3396f596012941853134d726244f504887939 100644 (file)
@@ -162,7 +162,6 @@ static struct irqaction tmu0_irq = {
        .name           = "periodic/oneshot timer",
        .handler        = tmu_timer_interrupt,
        .flags          = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
-       .mask           = CPU_MASK_NONE,
 };
 
 static void __init tmu_clk_init(struct clk *clk)
index 5bc0b8fd63744f477f7ade478e42922175649c28..2770f64fdc3b59edc23714d7afad0367d19ac822 100644 (file)
@@ -28,11 +28,6 @@ static inline cpumask_t node_to_cpumask(int node)
 #define node_to_cpumask_ptr_next(v, node)      \
                           v = &(numa_cpumask_lookup_table[node])
 
-static inline int node_to_first_cpu(int node)
-{
-       return cpumask_first(cpumask_of_node(node));
-}
-
 struct pci_bus;
 #ifdef CONFIG_PCI
 extern int pcibus_to_node(struct pci_bus *pbus);
index 44dd5ee64339219257a2457d85afd364f2526f58..ad800b80c718285e046d47d8c652c54aa22049da 100644 (file)
@@ -439,7 +439,6 @@ static int request_fast_irq(unsigned int irq,
        flush_cache_all();
 
        action->flags = irqflags;
-       cpus_clear(action->mask);
        action->name = devname;
        action->dev_id = NULL;
        action->next = NULL;
@@ -574,7 +573,6 @@ int request_irq(unsigned int irq,
 
        action->handler = handler;
        action->flags = irqflags;
-       cpus_clear(action->mask);
        action->name = devname;
        action->next = NULL;
        action->dev_id = dev_id;
index 3369fef5b4b3acd2749ddcbefd1befd37df2e15b..ab036a72de5a16460cdb8b548dbcf15bb2e04db6 100644 (file)
@@ -326,7 +326,6 @@ int sun4d_request_irq(unsigned int irq,
 
        action->handler = handler;
        action->flags = irqflags;
-       cpus_clear(action->mask);
        action->name = devname;
        action->next = NULL;
        action->dev_id = dev_id;
index 77cfb2cfb386d5b1a1727807b2a7c84ee8fc4c6c..744299c0b7749829a2af79dc76eb10f0fbfa6a55 100644 (file)
@@ -217,10 +217,6 @@ static inline cpumask_t node_to_cpumask(int node)
 {
        return cpu_online_map;
 }
-static inline int node_to_first_cpu(int node)
-{
-       return first_cpu(cpu_online_map);
-}
 
 static inline void setup_node_to_cpumask_map(void) { }
 
@@ -237,14 +233,6 @@ static inline void setup_node_to_cpumask_map(void) { }
 
 #include <asm-generic/topology.h>
 
-#ifdef CONFIG_NUMA
-/* Returns the number of the first CPU on Node 'node'. */
-static inline int node_to_first_cpu(int node)
-{
-       return cpumask_first(cpumask_of_node(node));
-}
-#endif
-
 extern cpumask_t cpu_coregroup_map(int cpu);
 extern const struct cpumask *cpu_coregroup_mask(int cpu);
 
index bc132610544829de0f38a12dd8461d73104b39a2..368b0a8836f902be69531754a72fb75e7b9a4e24 100644 (file)
@@ -50,7 +50,6 @@ static irqreturn_t math_error_irq(int cpl, void *dev_id)
  */
 static struct irqaction fpu_irq = {
        .handler = math_error_irq,
-       .mask = CPU_MASK_NONE,
        .name = "fpu",
 };
 
@@ -83,7 +82,6 @@ void __init init_ISA_irqs(void)
  */
 static struct irqaction irq2 = {
        .handler = no_action,
-       .mask = CPU_MASK_NONE,
        .name = "cascade",
 };
 
index c7a49e0ffbfbc0b4b2b0cd12b01d5294ca73745c..8cd10537fd46f7480b6db9807db276ada5b390af 100644 (file)
@@ -45,7 +45,6 @@
 
 static struct irqaction irq2 = {
        .handler = no_action,
-       .mask = CPU_MASK_NONE,
        .name = "cascade",
 };
 DEFINE_PER_CPU(vector_irq_t, vector_irq) = {
index 8815f3c7fec75e5d4a4d1cb17609ef0eed004515..846510b78a092324bfa7adc61ee72ee25e8792cc 100644 (file)
@@ -348,7 +348,6 @@ static irqreturn_t mfgpt_tick(int irq, void *dev_id)
 static struct irqaction mfgptirq  = {
        .handler = mfgpt_tick,
        .flags = IRQF_DISABLED | IRQF_NOBALANCING,
-       .mask = CPU_MASK_NONE,
        .name = "mfgpt-timer"
 };
 
index a0d26237d7cf141462a2d20941f8bd99d4195e57..b4158439bf634d254852cceab2c30d26f943f7ea 100644 (file)
@@ -1049,7 +1049,6 @@ void __init x86_quirk_trap_init(void)
 static struct irqaction irq0  = {
        .handler = timer_interrupt,
        .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL | IRQF_TIMER,
-       .mask = CPU_MASK_NONE,
        .name = "timer"
 };
 
index 241ec3923f611bf03cb266362409924daabf1f6f..5ba343e6184449775c51f21717ef985f8d7249d0 100644 (file)
@@ -116,7 +116,6 @@ unsigned long __init calibrate_cpu(void)
 static struct irqaction irq0 = {
        .handler        = timer_interrupt,
        .flags          = IRQF_DISABLED | IRQF_IRQPOLL | IRQF_NOBALANCING | IRQF_TIMER,
-       .mask           = CPU_MASK_NONE,
        .name           = "timer"
 };
 
@@ -125,7 +124,6 @@ void __init hpet_time_init(void)
        if (!hpet_enable())
                setup_pit_timer();
 
-       irq0.mask = cpumask_of_cpu(0);
        setup_irq(0, &irq0);
 }
 
index 33a788d5879c3186182201736330723fa3669164..d303369a7baddc48966443fff136f2266f010810 100644 (file)
@@ -202,7 +202,6 @@ static struct irqaction vmi_clock_action  = {
        .name           = "vmi-timer",
        .handler        = vmi_timer_interrupt,
        .flags          = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER,
-       .mask           = CPU_MASK_ALL,
 };
 
 static void __devinit vmi_time_init_clockevent(void)
index 5b257a57bc57ae60e369950b60126f3d43f43e04..e62a4ccea54d0c4a3dc6dcd84eb107e557bcb54c 100644 (file)
@@ -119,7 +119,7 @@ static ssize_t print_cpus_map(char *buf, const struct cpumask *map)
 #define        print_cpus_func(type) \
 static ssize_t print_cpus_##type(struct sysdev_class *class, char *buf)        \
 {                                                                      \
-       return print_cpus_map(buf, &cpu_##type##_map);                  \
+       return print_cpus_map(buf, cpu_##type##_mask);                  \
 }                                                                      \
 static struct sysdev_class_attribute attr_##type##_map =               \
        _SYSDEV_CLASS_ATTR(type, 0444, print_cpus_##type, NULL)
index c3ea5fa7d05a6db4079bebb99ecc865b89eefca5..2c9aa49e43cdf1a879214ac281bf705b84015f25 100644 (file)
@@ -574,7 +574,7 @@ int __init buffer_sync_init(void)
                return 0;
 }
 
-void __exit buffer_sync_cleanup(void)
+void buffer_sync_cleanup(void)
 {
        free_cpumask_var(marked_cpus);
 }
index a1a4cfe1921040d6044657e6c235e2f5d55f8292..7f40f30c55c5bdf31ecab91b9075b5d320e8ae0d 100644 (file)
@@ -513,7 +513,7 @@ int seq_bitmap(struct seq_file *m, const unsigned long *bits,
 }
 EXPORT_SYMBOL(seq_bitmap);
 
-int seq_bitmap_list(struct seq_file *m, unsigned long *bits,
+int seq_bitmap_list(struct seq_file *m, const unsigned long *bits,
                unsigned int nr_bits)
 {
        if (m->count < m->size) {
index 0e9e2bc0ee96e66d08beb37bb71933ab2ece7636..88bada2ebc4b1fb1bb980f96daa8409ac5933eb2 100644 (file)
 #ifndef cpumask_of_node
 #define cpumask_of_node(node)  ((void)node, cpu_online_mask)
 #endif
-#ifndef node_to_first_cpu
-#define node_to_first_cpu(node)        ((void)(node),0)
-#endif
 #ifndef pcibus_to_node
 #define pcibus_to_node(bus)    ((void)(bus), -1)
 #endif
 
-#ifndef pcibus_to_cpumask
-#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \
-                                       CPU_MASK_ALL : \
-                                       node_to_cpumask(pcibus_to_node(bus)) \
-                               )
-#endif
-
 #ifndef cpumask_of_pcibus
 #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ?            \
                                 cpu_all_mask :                         \
index 90c6074a36cab42c47df2ac8f6239cfe2ae0ddfe..2e0d79678debad2f0634e95b8dff71f0c88fb68d 100644 (file)
@@ -90,12 +90,12 @@ static inline void cpuset_init_smp(void) {}
 static inline void cpuset_cpus_allowed(struct task_struct *p,
                                       struct cpumask *mask)
 {
-       *mask = cpu_possible_map;
+       cpumask_copy(mask, cpu_possible_mask);
 }
 static inline void cpuset_cpus_allowed_locked(struct task_struct *p,
                                              struct cpumask *mask)
 {
-       *mask = cpu_possible_map;
+       cpumask_copy(mask, cpu_possible_mask);
 }
 
 static inline nodemask_t cpuset_mems_allowed(struct task_struct *p)
index f616f31576d719597cd91b25498fece72e24cc8d..004f3b3342c5d580664b73aab18a9229186c9ed9 100644 (file)
@@ -55,7 +55,7 @@ int seq_bitmap(struct seq_file *m, const unsigned long *bits,
                                   unsigned int nr_bits);
 static inline int seq_cpumask(struct seq_file *m, const struct cpumask *mask)
 {
-       return seq_bitmap(m, mask->bits, nr_cpu_ids);
+       return seq_bitmap(m, cpumask_bits(mask), nr_cpu_ids);
 }
 
 static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask)
@@ -63,12 +63,13 @@ static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask)
        return seq_bitmap(m, mask->bits, MAX_NUMNODES);
 }
 
-int seq_bitmap_list(struct seq_file *m, unsigned long *bits,
+int seq_bitmap_list(struct seq_file *m, const unsigned long *bits,
                unsigned int nr_bits);
 
-static inline int seq_cpumask_list(struct seq_file *m, cpumask_t *mask)
+static inline int seq_cpumask_list(struct seq_file *m,
+                                  const struct cpumask *mask)
 {
-       return seq_bitmap_list(m, mask->bits, NR_CPUS);
+       return seq_bitmap_list(m, cpumask_bits(mask), nr_cpu_ids);
 }
 
 static inline int seq_nodemask_list(struct seq_file *m, nodemask_t *mask)
index 6bf83afd654da44b5b52383a4697d4d98e0ff6fa..d6b388fbffa679bdb8cce29ddfd9042ca2841032 100644 (file)
@@ -407,8 +407,7 @@ static void __init smp_init(void)
         * Set up the current CPU as possible to migrate to.
         * The other ones will be done by cpu_up/cpu_down()
         */
-       cpu = smp_processor_id();
-       cpu_set(cpu, cpu_active_map);
+       set_cpu_active(smp_processor_id(), true);
 
        /* FIXME: This should be done in userspace --RR */
        for_each_present_cpu(cpu) {
@@ -842,7 +841,7 @@ static int __init kernel_init(void * unused)
        /*
         * init can run on any cpu.
         */
-       set_cpus_allowed_ptr(current, CPU_MASK_ALL_PTR);
+       set_cpus_allowed_ptr(current, cpu_all_mask);
        /*
         * Tell the world that we're going to be the grim
         * reaper of innocent orphaned children.
index 79e40f00dcb89b8b3b5dedb5cc1c7da507e6b322..395b6974dc8d56ccb2d91ede756069fe9b10c975 100644 (file)
@@ -281,7 +281,7 @@ int __ref cpu_down(unsigned int cpu)
                goto out;
        }
 
-       cpu_clear(cpu, cpu_active_map);
+       set_cpu_active(cpu, false);
 
        /*
         * Make sure the all cpus did the reschedule and are not
@@ -296,7 +296,7 @@ int __ref cpu_down(unsigned int cpu)
        err = _cpu_down(cpu, 0);
 
        if (cpu_online(cpu))
-               cpu_set(cpu, cpu_active_map);
+               set_cpu_active(cpu, true);
 
 out:
        cpu_maps_update_done();
@@ -333,7 +333,7 @@ static int __cpuinit _cpu_up(unsigned int cpu, int tasks_frozen)
                goto out_notify;
        BUG_ON(!cpu_online(cpu));
 
-       cpu_set(cpu, cpu_active_map);
+       set_cpu_active(cpu, true);
 
        /* Now call notifier in preparation. */
        raw_notifier_call_chain(&cpu_chain, CPU_ONLINE | mod, hcpu);
index 6715ebc3761de3ed10eeda84ff932e59ff8289c5..47c15840a3813ee3fcabe5f89d04bf73c08b66c2 100644 (file)
@@ -284,7 +284,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
        mm->free_area_cache = oldmm->mmap_base;
        mm->cached_hole_size = ~0UL;
        mm->map_count = 0;
-       cpus_clear(mm->cpu_vm_mask);
+       cpumask_clear(mm_cpumask(mm));
        mm->mm_rb = RB_ROOT;
        rb_link = &mm->mm_rb.rb_node;
        rb_parent = NULL;
index a27a5f64443dc5c9a27d04679171cf15dfc1eabf..f0c8f545180d13193960d3171a1e58272488e72f 100644 (file)
@@ -167,7 +167,7 @@ static int ____call_usermodehelper(void *data)
        }
 
        /* We can run anywhere, unlike our parent keventd(). */
-       set_cpus_allowed_ptr(current, CPU_MASK_ALL_PTR);
+       set_cpus_allowed_ptr(current, cpu_all_mask);
 
        /*
         * Our parent is keventd, which runs with elevated scheduling priority.
index 4fbc456f393d0b1fb328667d9e93cc214c39da06..84bbadd4d0213c1558ade617ab49695df0b1bd9f 100644 (file)
@@ -110,7 +110,7 @@ static void create_kthread(struct kthread_create_info *create)
                 */
                sched_setscheduler(create->result, SCHED_NORMAL, &param);
                set_user_nice(create->result, KTHREAD_NICE_LEVEL);
-               set_cpus_allowed_ptr(create->result, CPU_MASK_ALL_PTR);
+               set_cpus_allowed_ptr(create->result, cpu_all_mask);
        }
        complete(&create->done);
 }
@@ -240,7 +240,7 @@ int kthreadd(void *unused)
        set_task_comm(tsk, "kthreadd");
        ignore_signals(tsk);
        set_user_nice(tsk, KTHREAD_NICE_LEVEL);
-       set_cpus_allowed_ptr(tsk, CPU_MASK_ALL_PTR);
+       set_cpus_allowed_ptr(tsk, cpu_all_mask);
 
        current->flags |= PF_NOFREEZE | PF_FREEZER_NOSIG;
 
index 7c4142a79f0ab5a2ef80300b3d5be3188bdec8c7..9b4a975a4b4afc1f1eba22c1cb30d21aef844959 100644 (file)
@@ -126,6 +126,7 @@ static atomic_t n_rcu_torture_mberror;
 static atomic_t n_rcu_torture_error;
 static long n_rcu_torture_timers = 0;
 static struct list_head rcu_torture_removed;
+static cpumask_var_t shuffle_tmp_mask;
 
 static int stutter_pause_test = 0;
 
@@ -889,10 +890,9 @@ static int rcu_idle_cpu;   /* Force all torture tasks off this CPU */
  */
 static void rcu_torture_shuffle_tasks(void)
 {
-       cpumask_t tmp_mask;
        int i;
 
-       cpus_setall(tmp_mask);
+       cpumask_setall(shuffle_tmp_mask);
        get_online_cpus();
 
        /* No point in shuffling if there is only one online CPU (ex: UP) */
@@ -902,29 +902,29 @@ static void rcu_torture_shuffle_tasks(void)
        }
 
        if (rcu_idle_cpu != -1)
-               cpu_clear(rcu_idle_cpu, tmp_mask);
+               cpumask_clear_cpu(rcu_idle_cpu, shuffle_tmp_mask);
 
-       set_cpus_allowed_ptr(current, &tmp_mask);
+       set_cpus_allowed_ptr(current, shuffle_tmp_mask);
 
        if (reader_tasks) {
                for (i = 0; i < nrealreaders; i++)
                        if (reader_tasks[i])
                                set_cpus_allowed_ptr(reader_tasks[i],
-                                                    &tmp_mask);
+                                                    shuffle_tmp_mask);
        }
 
        if (fakewriter_tasks) {
                for (i = 0; i < nfakewriters; i++)
                        if (fakewriter_tasks[i])
                                set_cpus_allowed_ptr(fakewriter_tasks[i],
-                                                    &tmp_mask);
+                                                    shuffle_tmp_mask);
        }
 
        if (writer_task)
-               set_cpus_allowed_ptr(writer_task, &tmp_mask);
+               set_cpus_allowed_ptr(writer_task, shuffle_tmp_mask);
 
        if (stats_task)
-               set_cpus_allowed_ptr(stats_task, &tmp_mask);
+               set_cpus_allowed_ptr(stats_task, shuffle_tmp_mask);
 
        if (rcu_idle_cpu == -1)
                rcu_idle_cpu = num_online_cpus() - 1;
@@ -1012,6 +1012,7 @@ rcu_torture_cleanup(void)
        if (shuffler_task) {
                VERBOSE_PRINTK_STRING("Stopping rcu_torture_shuffle task");
                kthread_stop(shuffler_task);
+               free_cpumask_var(shuffle_tmp_mask);
        }
        shuffler_task = NULL;
 
@@ -1190,10 +1191,18 @@ rcu_torture_init(void)
        }
        if (test_no_idle_hz) {
                rcu_idle_cpu = num_online_cpus() - 1;
+
+               if (!alloc_cpumask_var(&shuffle_tmp_mask, GFP_KERNEL)) {
+                       firsterr = -ENOMEM;
+                       VERBOSE_PRINTK_ERRSTRING("Failed to alloc mask");
+                       goto unwind;
+               }
+
                /* Create the shuffler thread */
                shuffler_task = kthread_run(rcu_torture_shuffle, NULL,
                                          "rcu_torture_shuffle");
                if (IS_ERR(shuffler_task)) {
+                       free_cpumask_var(shuffle_tmp_mask);
                        firsterr = PTR_ERR(shuffler_task);
                        VERBOSE_PRINTK_ERRSTRING("Failed to create shuffler");
                        shuffler_task = NULL;
index 642a94ef8a0a7fb39f9b341eb292dfad9ab38762..9a7e859b8fbfdd753f09a4bc0949cf5345e2ae75 100644 (file)
@@ -25,7 +25,7 @@ struct cpupri {
 
 #ifdef CONFIG_SMP
 int  cpupri_find(struct cpupri *cp,
-                struct task_struct *p, cpumask_t *lowest_mask);
+                struct task_struct *p, struct cpumask *lowest_mask);
 void cpupri_set(struct cpupri *cp, int cpu, int pri);
 int cpupri_init(struct cpupri *cp, bool bootmem);
 void cpupri_cleanup(struct cpupri *cp);
index 74541ca49536fda5dab61d473f8ce9d6aa3f3254..912823e2a11b0afb0f4448e5163bb9e39c7fc8b8 100644 (file)
@@ -44,7 +44,7 @@ static DEFINE_MUTEX(setup_lock);
 static int refcount;
 static struct workqueue_struct *stop_machine_wq;
 static struct stop_machine_data active, idle;
-static const cpumask_t *active_cpus;
+static const struct cpumask *active_cpus;
 static void *stop_machine_work;
 
 static void set_state(enum stopmachine_state newstate)
index 1f0c509b40d34d944bea77e300e237ab9145439c..9aedd9fd825b7c332a4a2f53124b57040b013acd 100644 (file)
@@ -416,7 +416,7 @@ void flush_workqueue(struct workqueue_struct *wq)
        might_sleep();
        lock_map_acquire(&wq->lockdep_map);
        lock_map_release(&wq->lockdep_map);
-       for_each_cpu_mask_nr(cpu, *cpu_map)
+       for_each_cpu(cpu, cpu_map)
                flush_cpu_workqueue(per_cpu_ptr(wq->cpu_wq, cpu));
 }
 EXPORT_SYMBOL_GPL(flush_workqueue);
@@ -547,7 +547,7 @@ static void wait_on_work(struct work_struct *work)
        wq = cwq->wq;
        cpu_map = wq_cpu_map(wq);
 
-       for_each_cpu_mask_nr(cpu, *cpu_map)
+       for_each_cpu(cpu, cpu_map)
                wait_on_cpu_work(per_cpu_ptr(wq->cpu_wq, cpu), work);
 }
 
@@ -911,7 +911,7 @@ void destroy_workqueue(struct workqueue_struct *wq)
        list_del(&wq->list);
        spin_unlock(&workqueue_lock);
 
-       for_each_cpu_mask_nr(cpu, *cpu_map)
+       for_each_cpu(cpu, cpu_map)
                cleanup_workqueue_thread(per_cpu_ptr(wq->cpu_wq, cpu));
        cpu_maps_update_done();
 
index 1882923bc706071b79f823dd17b8f69d4fccf145..139d5b7b6621471ccb88c2ea3dd6b0fe66b15618 100644 (file)
@@ -143,7 +143,7 @@ void free_percpu(void *__pdata)
 {
        if (unlikely(!__pdata))
                return;
-       __percpu_depopulate_mask(__pdata, &cpu_possible_map);
+       __percpu_depopulate_mask(__pdata, cpu_possible_mask);
        kfree(__percpu_disguise(__pdata));
 }
 EXPORT_SYMBOL_GPL(free_percpu);
index 15de509b68fd657c7b9ecb0356cdadf9bc43b1ef..118905e3d7886f795875b376c70d23e4bfc4c038 100644 (file)
@@ -191,7 +191,7 @@ static int pdflush(void *dummy)
 
        /*
         * Some configs put our parent kthread in a limited cpuset,
-        * which kthread() overrides, forcing cpus_allowed == CPU_MASK_ALL.
+        * which kthread() overrides, forcing cpus_allowed == cpu_all_mask.
         * Our needs are more modest - cut back to our cpusets cpus_allowed.
         * This is needed as pdflush's are dynamically created and destroyed.
         * The boottime pdflush's are easily placed w/o these 2 lines.
index 91149746bb8d6c94ac036879bbe557551630a1e1..8cd81ea1ddc138cf60b93c19554a68cc645160df 100644 (file)
@@ -27,7 +27,7 @@ static void sum_vm_events(unsigned long *ret, const struct cpumask *cpumask)
 
        memset(ret, 0, NR_VM_EVENT_ITEMS * sizeof(unsigned long));
 
-       for_each_cpu_mask_nr(cpu, *cpumask) {
+       for_each_cpu(cpu, cpumask) {
                struct vm_event_state *this = &per_cpu(vm_event_states, cpu);
 
                for (i = 0; i < NR_VM_EVENT_ITEMS; i++)
index c51fed4d1af1d3b93ebfbbf9e2eaeaf4a76fb16f..bb507e2bb94d6fa4657508f29df558a54208928b 100644 (file)
@@ -312,7 +312,7 @@ svc_pool_map_set_cpumask(struct task_struct *task, unsigned int pidx)
        switch (m->mode) {
        case SVC_POOL_PERCPU:
        {
-               set_cpus_allowed_ptr(task, &cpumask_of_cpu(node));
+               set_cpus_allowed_ptr(task, cpumask_of(node));
                break;
        }
        case SVC_POOL_PERNODE: