~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to arch/sparc/include/asm/tsb.h

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
        sub     TSB, 0x8, TSB;   \
134
134
        TSB_STORE(TSB, TAG);
135
135
 
136
 
#define KTSB_LOAD_QUAD(TSB, REG) \
137
 
        ldda            [TSB] ASI_NUCLEUS_QUAD_LDD, REG;
138
 
 
139
 
#define KTSB_STORE(ADDR, VAL) \
140
 
        stxa            VAL, [ADDR] ASI_N;
141
 
 
142
 
#define KTSB_LOCK_TAG(TSB, REG1, REG2)  \
143
 
99:     lduwa   [TSB] ASI_N, REG1;      \
144
 
        sethi   %hi(TSB_TAG_LOCK_HIGH), REG2;\
145
 
        andcc   REG1, REG2, %g0;        \
146
 
        bne,pn  %icc, 99b;              \
147
 
         nop;                           \
148
 
        casa    [TSB] ASI_N, REG1, REG2;\
149
 
        cmp     REG1, REG2;             \
150
 
        bne,pn  %icc, 99b;              \
151
 
         nop;                           \
152
 
 
153
 
#define KTSB_WRITE(TSB, TTE, TAG) \
154
 
        add     TSB, 0x8, TSB;   \
155
 
        stxa    TTE, [TSB] ASI_N;     \
156
 
        sub     TSB, 0x8, TSB;   \
157
 
        stxa    TAG, [TSB] ASI_N;
158
 
 
159
136
        /* Do a kernel page table walk.  Leaves physical PTE pointer in
160
137
         * REG1.  Jumps to FAIL_LABEL on early page table walk termination.
161
138
         * VADDR will not be clobbered, but REG2 will.
239
216
        (KERNEL_TSB_SIZE_BYTES / 16)
240
217
#define KERNEL_TSB4M_NENTRIES   4096
241
218
 
 
219
#define KTSB_PHYS_SHIFT         15
 
220
 
242
221
        /* Do a kernel TSB lookup at tl>0 on VADDR+TAG, branch to OK_LABEL
243
222
         * on TSB hit.  REG1, REG2, REG3, and REG4 are used as temporaries
244
223
         * and the found TTE will be left in REG1.  REG3 and REG4 must
247
226
         * VADDR and TAG will be preserved and not clobbered by this macro.
248
227
         */
249
228
#define KERN_TSB_LOOKUP_TL1(VADDR, TAG, REG1, REG2, REG3, REG4, OK_LABEL) \
250
 
        sethi           %hi(swapper_tsb), REG1; \
 
229
661:    sethi           %hi(swapper_tsb), REG1;                 \
251
230
        or              REG1, %lo(swapper_tsb), REG1; \
 
231
        .section        .swapper_tsb_phys_patch, "ax"; \
 
232
        .word           661b; \
 
233
        .previous; \
 
234
661:    nop; \
 
235
        .section        .tsb_ldquad_phys_patch, "ax"; \
 
236
        .word           661b; \
 
237
        sllx            REG1, KTSB_PHYS_SHIFT, REG1; \
 
238
        sllx            REG1, KTSB_PHYS_SHIFT, REG1; \
 
239
        .previous; \
252
240
        srlx            VADDR, PAGE_SHIFT, REG2; \
253
241
        and             REG2, (KERNEL_TSB_NENTRIES - 1), REG2; \
254
242
        sllx            REG2, 4, REG2; \
255
243
        add             REG1, REG2, REG2; \
256
 
        KTSB_LOAD_QUAD(REG2, REG3); \
 
244
        TSB_LOAD_QUAD(REG2, REG3); \
257
245
        cmp             REG3, TAG; \
258
246
        be,a,pt         %xcc, OK_LABEL; \
259
247
         mov            REG4, REG1;
263
251
         * we can make use of that for the index computation.
264
252
         */
265
253
#define KERN_TSB4M_LOOKUP_TL1(TAG, REG1, REG2, REG3, REG4, OK_LABEL) \
266
 
        sethi           %hi(swapper_4m_tsb), REG1; \
 
254
661:    sethi           %hi(swapper_4m_tsb), REG1;           \
267
255
        or              REG1, %lo(swapper_4m_tsb), REG1; \
 
256
        .section        .swapper_4m_tsb_phys_patch, "ax"; \
 
257
        .word           661b; \
 
258
        .previous; \
 
259
661:    nop; \
 
260
        .section        .tsb_ldquad_phys_patch, "ax"; \
 
261
        .word           661b; \
 
262
        sllx            REG1, KTSB_PHYS_SHIFT, REG1; \
 
263
        sllx            REG1, KTSB_PHYS_SHIFT, REG1; \
 
264
        .previous; \
268
265
        and             TAG, (KERNEL_TSB4M_NENTRIES - 1), REG2; \
269
266
        sllx            REG2, 4, REG2; \
270
267
        add             REG1, REG2, REG2; \
271
 
        KTSB_LOAD_QUAD(REG2, REG3); \
 
268
        TSB_LOAD_QUAD(REG2, REG3); \
272
269
        cmp             REG3, TAG; \
273
270
        be,a,pt         %xcc, OK_LABEL; \
274
271
         mov            REG4, REG1;