diff options
Diffstat (limited to 'arch/xtensa')
| -rw-r--r-- | arch/xtensa/kernel/irq.c | 15 | ||||
| -rw-r--r-- | arch/xtensa/mm/init.c | 2 | ||||
| -rw-r--r-- | arch/xtensa/mm/pgtable.c | 24 | ||||
| -rw-r--r-- | arch/xtensa/platform-iss/console.c | 4 |
4 files changed, 17 insertions, 28 deletions
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c index 4cbf6d91571f..51f9bed455fa 100644 --- a/arch/xtensa/kernel/irq.c +++ b/arch/xtensa/kernel/irq.c | |||
| @@ -83,9 +83,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
| 83 | 83 | ||
| 84 | if (i == 0) { | 84 | if (i == 0) { |
| 85 | seq_printf(p, " "); | 85 | seq_printf(p, " "); |
| 86 | for (j=0; j<NR_CPUS; j++) | 86 | for_each_online_cpu(j) |
| 87 | if (cpu_online(j)) | 87 | seq_printf(p, "CPU%d ",j); |
| 88 | seq_printf(p, "CPU%d ",j); | ||
| 89 | seq_putc(p, '\n'); | 88 | seq_putc(p, '\n'); |
| 90 | } | 89 | } |
| 91 | 90 | ||
| @@ -98,9 +97,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
| 98 | #ifndef CONFIG_SMP | 97 | #ifndef CONFIG_SMP |
| 99 | seq_printf(p, "%10u ", kstat_irqs(i)); | 98 | seq_printf(p, "%10u ", kstat_irqs(i)); |
| 100 | #else | 99 | #else |
| 101 | for (j = 0; j < NR_CPUS; j++) | 100 | for_each_online_cpu(j) |
| 102 | if (cpu_online(j)) | 101 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
| 103 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); | ||
| 104 | #endif | 102 | #endif |
| 105 | seq_printf(p, " %14s", irq_desc[i].handler->typename); | 103 | seq_printf(p, " %14s", irq_desc[i].handler->typename); |
| 106 | seq_printf(p, " %s", action->name); | 104 | seq_printf(p, " %s", action->name); |
| @@ -113,9 +111,8 @@ skip: | |||
| 113 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 111 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
| 114 | } else if (i == NR_IRQS) { | 112 | } else if (i == NR_IRQS) { |
| 115 | seq_printf(p, "NMI: "); | 113 | seq_printf(p, "NMI: "); |
| 116 | for (j = 0; j < NR_CPUS; j++) | 114 | for_each_online_cpu(j) |
| 117 | if (cpu_online(j)) | 115 | seq_printf(p, "%10u ", nmi_count(j)); |
| 118 | seq_printf(p, "%10u ", nmi_count(j)); | ||
| 119 | seq_putc(p, '\n'); | 116 | seq_putc(p, '\n'); |
| 120 | seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); | 117 | seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); |
| 121 | } | 118 | } |
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c index 5a91d6c9e66d..e1be4235f367 100644 --- a/arch/xtensa/mm/init.c +++ b/arch/xtensa/mm/init.c | |||
| @@ -272,7 +272,7 @@ free_reserved_mem(void *start, void *end) | |||
| 272 | { | 272 | { |
| 273 | for (; start < end; start += PAGE_SIZE) { | 273 | for (; start < end; start += PAGE_SIZE) { |
| 274 | ClearPageReserved(virt_to_page(start)); | 274 | ClearPageReserved(virt_to_page(start)); |
| 275 | set_page_count(virt_to_page(start), 1); | 275 | init_page_count(virt_to_page(start)); |
| 276 | free_page((unsigned long)start); | 276 | free_page((unsigned long)start); |
| 277 | totalram_pages++; | 277 | totalram_pages++; |
| 278 | } | 278 | } |
diff --git a/arch/xtensa/mm/pgtable.c b/arch/xtensa/mm/pgtable.c index e5e119c820e4..7d28914d11cb 100644 --- a/arch/xtensa/mm/pgtable.c +++ b/arch/xtensa/mm/pgtable.c | |||
| @@ -14,25 +14,21 @@ | |||
| 14 | 14 | ||
| 15 | pte_t* pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) | 15 | pte_t* pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) |
| 16 | { | 16 | { |
| 17 | pte_t *pte, p; | 17 | pte_t *pte = NULL, *p; |
| 18 | int color = ADDR_COLOR(address); | 18 | int color = ADDR_COLOR(address); |
| 19 | int i; | 19 | int i; |
| 20 | 20 | ||
| 21 | p = (pte_t*) __get_free_pages(GFP_KERNEL|__GFP_REPEAT, COLOR_ORDER); | 21 | p = (pte_t*) __get_free_pages(GFP_KERNEL|__GFP_REPEAT, COLOR_ORDER); |
| 22 | 22 | ||
| 23 | if (likely(p)) { | 23 | if (likely(p)) { |
| 24 | struct page *page; | 24 | split_page(virt_to_page(p), COLOR_ORDER); |
| 25 | |||
| 26 | for (i = 0; i < COLOR_SIZE; i++, p++) { | ||
| 27 | page = virt_to_page(pte); | ||
| 28 | |||
| 29 | set_page_count(page, 1); | ||
| 30 | ClearPageCompound(page); | ||
| 31 | 25 | ||
| 26 | for (i = 0; i < COLOR_SIZE; i++) { | ||
| 32 | if (ADDR_COLOR(p) == color) | 27 | if (ADDR_COLOR(p) == color) |
| 33 | pte = p; | 28 | pte = p; |
| 34 | else | 29 | else |
| 35 | free_page(p); | 30 | free_page(p); |
| 31 | p += PTRS_PER_PTE; | ||
| 36 | } | 32 | } |
| 37 | clear_page(pte); | 33 | clear_page(pte); |
| 38 | } | 34 | } |
| @@ -49,20 +45,20 @@ int flush; | |||
| 49 | 45 | ||
| 50 | struct page* pte_alloc_one(struct mm_struct *mm, unsigned long address) | 46 | struct page* pte_alloc_one(struct mm_struct *mm, unsigned long address) |
| 51 | { | 47 | { |
| 52 | struct page *page, p; | 48 | struct page *page = NULL, *p; |
| 53 | int color = ADDR_COLOR(address); | 49 | int color = ADDR_COLOR(address); |
| 54 | 50 | ||
| 55 | p = alloc_pages(GFP_KERNEL | __GFP_REPEAT, PTE_ORDER); | 51 | p = alloc_pages(GFP_KERNEL | __GFP_REPEAT, PTE_ORDER); |
| 56 | 52 | ||
| 57 | if (likely(p)) { | 53 | if (likely(p)) { |
| 58 | for (i = 0; i < PAGE_ORDER; i++) { | 54 | split_page(p, COLOR_ORDER); |
| 59 | set_page_count(p, 1); | ||
| 60 | ClearPageCompound(p); | ||
| 61 | 55 | ||
| 62 | if (PADDR_COLOR(page_address(pg)) == color) | 56 | for (i = 0; i < PAGE_ORDER; i++) { |
| 57 | if (PADDR_COLOR(page_address(p)) == color) | ||
| 63 | page = p; | 58 | page = p; |
| 64 | else | 59 | else |
| 65 | free_page(p); | 60 | __free_page(p); |
| 61 | p++; | ||
| 66 | } | 62 | } |
| 67 | clear_highpage(page); | 63 | clear_highpage(page); |
| 68 | } | 64 | } |
diff --git a/arch/xtensa/platform-iss/console.c b/arch/xtensa/platform-iss/console.c index 94fdfe474ac1..2a580efb58ec 100644 --- a/arch/xtensa/platform-iss/console.c +++ b/arch/xtensa/platform-iss/console.c | |||
| @@ -31,10 +31,6 @@ | |||
| 31 | #include <linux/tty.h> | 31 | #include <linux/tty.h> |
| 32 | #include <linux/tty_flip.h> | 32 | #include <linux/tty_flip.h> |
| 33 | 33 | ||
| 34 | #ifdef SERIAL_INLINE | ||
| 35 | #define _INLINE_ inline | ||
| 36 | #endif | ||
| 37 | |||
| 38 | #define SERIAL_MAX_NUM_LINES 1 | 34 | #define SERIAL_MAX_NUM_LINES 1 |
| 39 | #define SERIAL_TIMER_VALUE (20 * HZ) | 35 | #define SERIAL_TIMER_VALUE (20 * HZ) |
| 40 | 36 | ||
