~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to arch/mips/pnx8550/common/int.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
        PNX8550_GIC_REQ(irq_nr) = (1<<26 | 1<<16) | (1<<28) | gic_prio[irq_nr];
115
115
}
116
116
 
117
 
static inline void mask_irq(unsigned int irq_nr)
 
117
static inline void mask_irq(struct irq_data *d)
118
118
{
 
119
        unsigned int irq_nr = d->irq;
 
120
 
119
121
        if ((PNX8550_INT_CP0_MIN <= irq_nr) && (irq_nr <= PNX8550_INT_CP0_MAX)) {
120
122
                modify_cp0_intmask(1 << irq_nr, 0);
121
123
        } else if ((PNX8550_INT_GIC_MIN <= irq_nr) &&
129
131
        }
130
132
}
131
133
 
132
 
static inline void unmask_irq(unsigned int irq_nr)
 
134
static inline void unmask_irq(struct irq_data *d)
133
135
{
 
136
        unsigned int irq_nr = d->irq;
 
137
 
134
138
        if ((PNX8550_INT_CP0_MIN <= irq_nr) && (irq_nr <= PNX8550_INT_CP0_MAX)) {
135
139
                modify_cp0_intmask(0, 1 << irq_nr);
136
140
        } else if ((PNX8550_INT_GIC_MIN <= irq_nr) &&
157
161
 
158
162
static struct irq_chip level_irq_type = {
159
163
        .name =         "PNX Level IRQ",
160
 
        .ack =          mask_irq,
161
 
        .mask =         mask_irq,
162
 
        .mask_ack =     mask_irq,
163
 
        .unmask =       unmask_irq,
 
164
        .irq_mask =     mask_irq,
 
165
        .irq_unmask =   unmask_irq,
164
166
};
165
167
 
166
168
static struct irqaction gic_action = {
180
182
        int i;
181
183
        int configPR;
182
184
 
183
 
        for (i = 0; i < PNX8550_INT_CP0_TOTINT; i++) {
184
 
                set_irq_chip_and_handler(i, &level_irq_type, handle_level_irq);
185
 
                mask_irq(i);    /* mask the irq just in case  */
186
 
        }
 
185
        for (i = 0; i < PNX8550_INT_CP0_TOTINT; i++)
 
186
                irq_set_chip_and_handler(i, &level_irq_type, handle_level_irq);
187
187
 
188
188
        /* init of GIC/IPC interrupts */
189
189
        /* should be done before cp0 since cp0 init enables the GIC int */
206
206
                /* mask/priority is still 0 so we will not get any
207
207
                 * interrupts until it is unmasked */
208
208
 
209
 
                set_irq_chip_and_handler(i, &level_irq_type, handle_level_irq);
 
209
                irq_set_chip_and_handler(i, &level_irq_type, handle_level_irq);
210
210
        }
211
211
 
212
212
        /* Priority level 0 */
215
215
        /* Set int vector table address */
216
216
        PNX8550_GIC_VECTOR_0 = PNX8550_GIC_VECTOR_1 = 0;
217
217
 
218
 
        set_irq_chip_and_handler(MIPS_CPU_GIC_IRQ, &level_irq_type,
 
218
        irq_set_chip_and_handler(MIPS_CPU_GIC_IRQ, &level_irq_type,
219
219
                                 handle_level_irq);
220
220
        setup_irq(MIPS_CPU_GIC_IRQ, &gic_action);
221
221
 
222
222
        /* init of Timer interrupts */
223
223
        for (i = PNX8550_INT_TIMER_MIN; i <= PNX8550_INT_TIMER_MAX; i++)
224
 
                set_irq_chip_and_handler(i, &level_irq_type, handle_level_irq);
 
224
                irq_set_chip_and_handler(i, &level_irq_type, handle_level_irq);
225
225
 
226
226
        /* Stop Timer 1-3 */
227
227
        configPR = read_c0_config7();
228
228
        configPR |= 0x00000038;
229
229
        write_c0_config7(configPR);
230
230
 
231
 
        set_irq_chip_and_handler(MIPS_CPU_TIMER_IRQ, &level_irq_type,
 
231
        irq_set_chip_and_handler(MIPS_CPU_TIMER_IRQ, &level_irq_type,
232
232
                                 handle_level_irq);
233
233
        setup_irq(MIPS_CPU_TIMER_IRQ, &timer_action);
234
234
}