Rev 6082 | Rev 6934 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6082 | Rev 6588 | ||
---|---|---|---|
Line 361... | Line 361... | ||
361 | return 0; |
361 | return 0; |
362 | return __pte2cachemode_tbl[__pte2cm_idx(masked)]; |
362 | return __pte2cachemode_tbl[__pte2cm_idx(masked)]; |
363 | } |
363 | } |
364 | static inline pgprot_t pgprot_4k_2_large(pgprot_t pgprot) |
364 | static inline pgprot_t pgprot_4k_2_large(pgprot_t pgprot) |
365 | { |
365 | { |
- | 366 | pgprotval_t val = pgprot_val(pgprot); |
|
366 | pgprot_t new; |
367 | pgprot_t new; |
367 | unsigned long val; |
- | |
Line 368... | Line -... | ||
368 | - | ||
369 | val = pgprot_val(pgprot); |
368 | |
370 | pgprot_val(new) = (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) | |
369 | pgprot_val(new) = (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) | |
371 | ((val & _PAGE_PAT) << (_PAGE_BIT_PAT_LARGE - _PAGE_BIT_PAT)); |
370 | ((val & _PAGE_PAT) << (_PAGE_BIT_PAT_LARGE - _PAGE_BIT_PAT)); |
372 | return new; |
371 | return new; |
373 | } |
372 | } |
374 | static inline pgprot_t pgprot_large_2_4k(pgprot_t pgprot) |
373 | static inline pgprot_t pgprot_large_2_4k(pgprot_t pgprot) |
- | 374 | { |
|
375 | { |
375 | pgprotval_t val = pgprot_val(pgprot); |
376 | pgprot_t new; |
- | |
Line 377... | Line -... | ||
377 | unsigned long val; |
- | |
378 | 376 | pgprot_t new; |
|
379 | val = pgprot_val(pgprot); |
377 | |
380 | pgprot_val(new) = (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) | |
378 | pgprot_val(new) = (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) | |
381 | ((val & _PAGE_PAT_LARGE) >> |
379 | ((val & _PAGE_PAT_LARGE) >> |
382 | (_PAGE_BIT_PAT_LARGE - _PAGE_BIT_PAT)); |
380 | (_PAGE_BIT_PAT_LARGE - _PAGE_BIT_PAT)); |