aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig2
-rw-r--r--arch/arm/mach-netx/xc.c6
-rw-r--r--arch/arm/mach-pxa/time.c23
-rw-r--r--arch/arm/plat-omap/fb.c2
-rw-r--r--arch/frv/mm/init.c2
-rw-r--r--arch/ia64/hp/sim/boot/fw-emu.c2
-rw-r--r--arch/ia64/ia32/ia32priv.h1
-rw-r--r--arch/ia64/kernel/.gitignore1
-rw-r--r--arch/ia64/kernel/acpi.c8
-rw-r--r--arch/ia64/kernel/efi.c5
-rw-r--r--arch/ia64/kernel/iosapic.c18
-rw-r--r--arch/ia64/kernel/irq.c6
-rw-r--r--arch/ia64/kernel/mca.c2
-rw-r--r--arch/ia64/kernel/palinfo.c91
-rw-r--r--arch/ia64/kernel/patch.c3
-rw-r--r--arch/ia64/kernel/perfmon.c4
-rw-r--r--arch/ia64/mm/contig.c74
-rw-r--r--arch/ia64/sn/kernel/irq.c8
-rw-r--r--arch/ia64/sn/kernel/xpc_main.c12
-rw-r--r--arch/mips/Kconfig13
-rw-r--r--arch/mips/au1000/mtx-1/Makefile2
-rw-r--r--arch/mips/au1000/mtx-1/platform.c9
-rw-r--r--arch/mips/au1000/pb1200/Makefile2
-rw-r--r--arch/mips/au1000/pb1200/board_setup.c6
-rw-r--r--arch/mips/au1000/pb1200/irqmap.c100
-rw-r--r--arch/mips/basler/excite/excite_setup.c2
-rw-r--r--arch/mips/jazz/irq.c27
-rw-r--r--arch/mips/kernel/Makefile4
-rw-r--r--arch/mips/kernel/cevt-bcm1480.c149
-rw-r--r--arch/mips/kernel/cevt-sb1250.c148
-rw-r--r--arch/mips/kernel/csrc-bcm1480.c54
-rw-r--r--arch/mips/kernel/csrc-sb1250.c70
-rw-r--r--arch/mips/kernel/i8253.c25
-rw-r--r--arch/mips/kernel/time.c73
-rw-r--r--arch/mips/qemu/q-irq.c1
-rw-r--r--arch/mips/sgi-ip27/ip27-timer.c4
-rw-r--r--arch/mips/sgi-ip32/ip32-platform.c2
-rw-r--r--arch/mips/sibyte/Kconfig14
-rw-r--r--arch/mips/sibyte/bcm1480/irq.c16
-rw-r--r--arch/mips/sibyte/bcm1480/time.c159
-rw-r--r--arch/mips/sibyte/sb1250/irq.c14
-rw-r--r--arch/mips/sibyte/sb1250/time.c191
-rw-r--r--arch/mips/sni/time.c5
-rw-r--r--arch/powerpc/kernel/process.c2
-rw-r--r--arch/powerpc/kernel/time.c25
-rw-r--r--arch/s390/kernel/early.c4
-rw-r--r--arch/s390/kernel/process.c8
-rw-r--r--arch/s390/kernel/smp.c6
-rw-r--r--arch/s390/kernel/time.c6
-rw-r--r--arch/s390/kernel/vtime.c8
-rw-r--r--arch/sh/Kconfig18
-rw-r--r--arch/sh/Kconfig.debug11
-rw-r--r--arch/sh/Makefile2
-rw-r--r--arch/sh/boards/renesas/hs7751rvoip/irq.c1
-rw-r--r--arch/sh/boards/renesas/hs7751rvoip/setup.c19
-rw-r--r--arch/sh/boards/renesas/r7780rp/setup.c71
-rw-r--r--arch/sh/boards/renesas/sh7710voipgw/setup.c1
-rw-r--r--arch/sh/boards/se/7206/irq.c1
-rw-r--r--arch/sh/boards/se/770x/setup.c1
-rw-r--r--arch/sh/boards/se/7722/setup.c12
-rw-r--r--arch/sh/boards/se/7780/setup.c8
-rw-r--r--arch/sh/boards/snapgear/Makefile3
-rw-r--r--arch/sh/boards/snapgear/rtc.c309
-rw-r--r--arch/sh/boards/snapgear/setup.c16
-rw-r--r--arch/sh/boot/Makefile2
-rw-r--r--arch/sh/cchips/hd6446x/Makefile2
-rw-r--r--arch/sh/cchips/voyagergx/Makefile1
-rw-r--r--arch/sh/configs/r7785rp_defconfig299
-rw-r--r--arch/sh/drivers/pci/Makefile1
-rw-r--r--arch/sh/drivers/pci/pci-st40.c488
-rw-r--r--arch/sh/drivers/pci/pci-st40.h136
-rw-r--r--arch/sh/kernel/Makefile3
-rw-r--r--arch/sh/kernel/cpu/irq/ipr.c9
-rw-r--r--arch/sh/kernel/cpu/sh3/ex.S2
-rw-r--r--arch/sh/kernel/cpu/sh4/probe.c8
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7722.c27
-rw-r--r--arch/sh/kernel/irq.c9
-rw-r--r--arch/sh/kernel/kgdb_stub.c9
-rw-r--r--arch/sh/kernel/setup.c47
-rw-r--r--arch/sh/kernel/sh_ksyms.c2
-rw-r--r--arch/sh/kernel/vmlinux.lds.S201
-rw-r--r--arch/sh/kernel/vsyscall/vsyscall.lds.S5
-rw-r--r--arch/sh/lib/Makefile2
-rw-r--r--arch/sh/mm/Kconfig21
-rw-r--r--arch/sh/mm/Makefile2
-rw-r--r--arch/sh/mm/clear_page.S45
-rw-r--r--arch/sh/mm/copy_page.S65
-rw-r--r--arch/sh/mm/pg-sh4.c75
-rw-r--r--arch/sh/oprofile/Makefile1
-rw-r--r--arch/sh/oprofile/op_model_sh7750.c22
-rw-r--r--arch/sh/tools/mach-types29
-rw-r--r--arch/sh64/configs/cayman_defconfig140
-rw-r--r--arch/sh64/configs/harp_defconfig105
-rw-r--r--arch/sh64/configs/sim_defconfig68
-rw-r--r--arch/sh64/kernel/process.c10
-rw-r--r--arch/sh64/kernel/traps.c5
-rw-r--r--arch/sparc/kernel/irq.c1
-rw-r--r--arch/sparc64/kernel/ds.c1
-rw-r--r--arch/sparc64/kernel/module.c1
-rw-r--r--arch/sparc64/kernel/sys_sparc32.c1
-rw-r--r--arch/sparc64/kernel/sys_sunos32.c1
-rw-r--r--arch/sparc64/kernel/time.c2
-rw-r--r--arch/um/Makefile7
-rw-r--r--arch/um/Makefile-i3864
-rw-r--r--arch/um/drivers/ubd_kern.c2
-rw-r--r--arch/x86/boot/pmjump.S8
-rw-r--r--arch/x86/ia32/ia32entry.S19
-rw-r--r--arch/x86/ia32/ptrace32.c10
-rw-r--r--arch/x86/kernel/cpu/mtrr/main.c6
-rw-r--r--arch/x86/kernel/kprobes_32.c7
-rw-r--r--arch/x86/kernel/kprobes_64.c7
-rw-r--r--arch/x86/kernel/nmi_32.c4
-rw-r--r--arch/x86/kernel/traps_32.c2
-rw-r--r--arch/x86/kernel/traps_64.c2
-rw-r--r--arch/x86/lguest/boot.c69
-rw-r--r--arch/x86/mm/fault_32.c5
-rw-r--r--arch/x86/mm/fault_64.c5
117 files changed, 1459 insertions, 2438 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a0cdaafa115b..a7e9fea978a6 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1040,6 +1040,8 @@ source "drivers/power/Kconfig"
1040 1040
1041source "drivers/hwmon/Kconfig" 1041source "drivers/hwmon/Kconfig"
1042 1042
1043source "drivers/watchdog/Kconfig"
1044
1043source "drivers/ssb/Kconfig" 1045source "drivers/ssb/Kconfig"
1044 1046
1045#source "drivers/l3/Kconfig" 1047#source "drivers/l3/Kconfig"
diff --git a/arch/arm/mach-netx/xc.c b/arch/arm/mach-netx/xc.c
index bd5184fe177c..ca9c5b61283a 100644
--- a/arch/arm/mach-netx/xc.c
+++ b/arch/arm/mach-netx/xc.c
@@ -190,15 +190,15 @@ struct xc *request_xc(int xcno, struct device *dev)
190 goto exit; 190 goto exit;
191 191
192 if (!request_mem_region 192 if (!request_mem_region
193 (NETX_PA_XPEC(xcno), XPEC_MEM_SIZE, kobject_name(dev->kobj))) 193 (NETX_PA_XPEC(xcno), XPEC_MEM_SIZE, kobject_name(&dev->kobj)))
194 goto exit_free; 194 goto exit_free;
195 195
196 if (!request_mem_region 196 if (!request_mem_region
197 (NETX_PA_XMAC(xcno), XMAC_MEM_SIZE, kobject_name(dev->kobj))) 197 (NETX_PA_XMAC(xcno), XMAC_MEM_SIZE, kobject_name(&dev->kobj)))
198 goto exit_release_1; 198 goto exit_release_1;
199 199
200 if (!request_mem_region 200 if (!request_mem_region
201 (SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE, kobject_name(dev->kobj))) 201 (SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE, kobject_name(&dev->kobj)))
202 goto exit_release_2; 202 goto exit_release_2;
203 203
204 x->xpec_base = (void * __iomem)io_p2v(NETX_PA_XPEC(xcno)); 204 x->xpec_base = (void * __iomem)io_p2v(NETX_PA_XPEC(xcno));
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index a2d45d742ce4..fbfa1920353d 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -68,6 +68,7 @@ pxa_ost0_interrupt(int irq, void *dev_id)
68 if (c->mode == CLOCK_EVT_MODE_ONESHOT) { 68 if (c->mode == CLOCK_EVT_MODE_ONESHOT) {
69 /* Disarm the compare/match, signal the event. */ 69 /* Disarm the compare/match, signal the event. */
70 OIER &= ~OIER_E0; 70 OIER &= ~OIER_E0;
71 OSSR = OSSR_M0;
71 c->event_handler(c); 72 c->event_handler(c);
72 } else if (c->mode == CLOCK_EVT_MODE_PERIODIC) { 73 } else if (c->mode == CLOCK_EVT_MODE_PERIODIC) {
73 /* Call the event handler as many times as necessary 74 /* Call the event handler as many times as necessary
@@ -100,9 +101,9 @@ pxa_ost0_interrupt(int irq, void *dev_id)
100 * anything that might put us "very close". 101 * anything that might put us "very close".
101 */ 102 */
102#define MIN_OSCR_DELTA 16 103#define MIN_OSCR_DELTA 16
103 do { 104 do {
104 OSSR = OSSR_M0; 105 OSSR = OSSR_M0;
105 next_match = (OSMR0 += LATCH); 106 next_match = (OSMR0 += LATCH);
106 c->event_handler(c); 107 c->event_handler(c);
107 } while (((signed long)(next_match - OSCR) <= MIN_OSCR_DELTA) 108 } while (((signed long)(next_match - OSCR) <= MIN_OSCR_DELTA)
108 && (c->mode == CLOCK_EVT_MODE_PERIODIC)); 109 && (c->mode == CLOCK_EVT_MODE_PERIODIC));
@@ -114,14 +115,16 @@ pxa_ost0_interrupt(int irq, void *dev_id)
114static int 115static int
115pxa_osmr0_set_next_event(unsigned long delta, struct clock_event_device *dev) 116pxa_osmr0_set_next_event(unsigned long delta, struct clock_event_device *dev)
116{ 117{
117 unsigned long irqflags; 118 unsigned long flags, next, oscr;
118 119
119 raw_local_irq_save(irqflags); 120 raw_local_irq_save(flags);
120 OSMR0 = OSCR + delta;
121 OSSR = OSSR_M0;
122 OIER |= OIER_E0; 121 OIER |= OIER_E0;
123 raw_local_irq_restore(irqflags); 122 next = OSCR + delta;
124 return 0; 123 OSMR0 = next;
124 oscr = OSCR;
125 raw_local_irq_restore(flags);
126
127 return (signed)(next - oscr) <= MIN_OSCR_DELTA ? -ETIME : 0;
125} 128}
126 129
127static void 130static void
@@ -132,15 +135,16 @@ pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev)
132 switch (mode) { 135 switch (mode) {
133 case CLOCK_EVT_MODE_PERIODIC: 136 case CLOCK_EVT_MODE_PERIODIC:
134 raw_local_irq_save(irqflags); 137 raw_local_irq_save(irqflags);
135 OSMR0 = OSCR + LATCH;
136 OSSR = OSSR_M0; 138 OSSR = OSSR_M0;
137 OIER |= OIER_E0; 139 OIER |= OIER_E0;
140 OSMR0 = OSCR + LATCH;
138 raw_local_irq_restore(irqflags); 141 raw_local_irq_restore(irqflags);
139 break; 142 break;
140 143
141 case CLOCK_EVT_MODE_ONESHOT: 144 case CLOCK_EVT_MODE_ONESHOT:
142 raw_local_irq_save(irqflags); 145 raw_local_irq_save(irqflags);
143 OIER &= ~OIER_E0; 146 OIER &= ~OIER_E0;
147 OSSR = OSSR_M0;
144 raw_local_irq_restore(irqflags); 148 raw_local_irq_restore(irqflags);
145 break; 149 break;
146 150
@@ -149,6 +153,7 @@ pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev)
149 /* initializing, released, or preparing for suspend */ 153 /* initializing, released, or preparing for suspend */
150 raw_local_irq_save(irqflags); 154 raw_local_irq_save(irqflags);
151 OIER &= ~OIER_E0; 155 OIER &= ~OIER_E0;
156 OSSR = OSSR_M0;
152 raw_local_irq_restore(irqflags); 157 raw_local_irq_restore(irqflags);
153 break; 158 break;
154 159
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c
index 4493bcff5172..ee40c1a0b83d 100644
--- a/arch/arm/plat-omap/fb.c
+++ b/arch/arm/plat-omap/fb.c
@@ -171,7 +171,7 @@ static int check_fbmem_region(int region_idx, struct omapfb_mem_region *rg,
171 * Called from map_io. We need to call to this early enough so that we 171 * Called from map_io. We need to call to this early enough so that we
172 * can reserve the fixed SDRAM regions before VM could get hold of them. 172 * can reserve the fixed SDRAM regions before VM could get hold of them.
173 */ 173 */
174void omapfb_reserve_sdram(void) 174void __init omapfb_reserve_sdram(void)
175{ 175{
176 struct bootmem_data *bdata; 176 struct bootmem_data *bdata;
177 unsigned long sdram_start, sdram_size; 177 unsigned long sdram_start, sdram_size;
diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c
index 4103c2c487f3..b841ecfd5d5a 100644
--- a/arch/frv/mm/init.c
+++ b/arch/frv/mm/init.c
@@ -197,7 +197,7 @@ void __init mem_init(void)
197/* 197/*
198 * free the memory that was only required for initialisation 198 * free the memory that was only required for initialisation
199 */ 199 */
200void __init free_initmem(void) 200void free_initmem(void)
201{ 201{
202#if defined(CONFIG_RAMKERNEL) && !defined(CONFIG_PROTECT_KERNEL) 202#if defined(CONFIG_RAMKERNEL) && !defined(CONFIG_PROTECT_KERNEL)
203 unsigned long start, end, addr; 203 unsigned long start, end, addr;
diff --git a/arch/ia64/hp/sim/boot/fw-emu.c b/arch/ia64/hp/sim/boot/fw-emu.c
index 1189d035d316..bf6d9d8c802f 100644
--- a/arch/ia64/hp/sim/boot/fw-emu.c
+++ b/arch/ia64/hp/sim/boot/fw-emu.c
@@ -285,7 +285,7 @@ sys_fw_init (const char *args, int arglen)
285 } 285 }
286 cmd_line[arglen] = '\0'; 286 cmd_line[arglen] = '\0';
287 287
288 memset(efi_systab, 0, sizeof(efi_systab)); 288 memset(efi_systab, 0, sizeof(*efi_systab));
289 efi_systab->hdr.signature = EFI_SYSTEM_TABLE_SIGNATURE; 289 efi_systab->hdr.signature = EFI_SYSTEM_TABLE_SIGNATURE;
290 efi_systab->hdr.revision = ((1 << 16) | 00); 290 efi_systab->hdr.revision = ((1 << 16) | 00);
291 efi_systab->hdr.headersize = sizeof(efi_systab->hdr); 291 efi_systab->hdr.headersize = sizeof(efi_systab->hdr);
diff --git a/arch/ia64/ia32/ia32priv.h b/arch/ia64/ia32/ia32priv.h
index 466bbcb138b2..c5c872b250da 100644
--- a/arch/ia64/ia32/ia32priv.h
+++ b/arch/ia64/ia32/ia32priv.h
@@ -290,7 +290,6 @@ struct old_linux32_dirent {
290#define _ASM_IA64_ELF_H /* Don't include elf.h */ 290#define _ASM_IA64_ELF_H /* Don't include elf.h */
291 291
292#include <linux/sched.h> 292#include <linux/sched.h>
293#include <asm/processor.h>
294 293
295/* 294/*
296 * This is used to ensure we don't load something for the wrong architecture. 295 * This is used to ensure we don't load something for the wrong architecture.
diff --git a/arch/ia64/kernel/.gitignore b/arch/ia64/kernel/.gitignore
new file mode 100644
index 000000000000..98307759a3b8
--- /dev/null
+++ b/arch/ia64/kernel/.gitignore
@@ -0,0 +1 @@
gate.lds
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 3d45d24a9d61..897e2083a3b1 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -678,9 +678,11 @@ int __init acpi_boot_init(void)
678 /* I/O APIC */ 678 /* I/O APIC */
679 679
680 if (acpi_table_parse_madt 680 if (acpi_table_parse_madt
681 (ACPI_MADT_TYPE_IO_SAPIC, acpi_parse_iosapic, NR_IOSAPICS) < 1) 681 (ACPI_MADT_TYPE_IO_SAPIC, acpi_parse_iosapic, NR_IOSAPICS) < 1) {
682 printk(KERN_ERR PREFIX 682 if (!ia64_platform_is("sn2"))
683 "Error parsing MADT - no IOSAPIC entries\n"); 683 printk(KERN_ERR PREFIX
684 "Error parsing MADT - no IOSAPIC entries\n");
685 }
684 686
685 /* System-Level Interrupt Routing */ 687 /* System-Level Interrupt Routing */
686 688
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 6216eba2e38f..5181bf551f3c 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -218,9 +218,10 @@ efi_gettimeofday (struct timespec *ts)
218{ 218{
219 efi_time_t tm; 219 efi_time_t tm;
220 220
221 memset(ts, 0, sizeof(ts)); 221 if ((*efi.get_time)(&tm, NULL) != EFI_SUCCESS) {
222 if ((*efi.get_time)(&tm, NULL) != EFI_SUCCESS) 222 memset(ts, 0, sizeof(*ts));
223 return; 223 return;
224 }
224 225
225 ts->tv_sec = mktime(tm.year, tm.month, tm.day, tm.hour, tm.minute, tm.second); 226 ts->tv_sec = mktime(tm.year, tm.month, tm.day, tm.hour, tm.minute, tm.second);
226 ts->tv_nsec = tm.nanosecond; 227 ts->tv_nsec = tm.nanosecond;
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index cfe4654838f4..274a59383043 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -748,6 +748,15 @@ skip_numa_setup:
748#endif 748#endif
749} 749}
750 750
751static inline unsigned char choose_dmode(void)
752{
753#ifdef CONFIG_SMP
754 if (smp_int_redirect & SMP_IRQ_REDIRECTION)
755 return IOSAPIC_LOWEST_PRIORITY;
756#endif
757 return IOSAPIC_FIXED;
758}
759
751/* 760/*
752 * ACPI can describe IOSAPIC interrupts via static tables and namespace 761 * ACPI can describe IOSAPIC interrupts via static tables and namespace
753 * methods. This provides an interface to register those interrupts and 762 * methods. This provides an interface to register those interrupts and
@@ -762,6 +771,7 @@ iosapic_register_intr (unsigned int gsi,
762 unsigned long flags; 771 unsigned long flags;
763 struct iosapic_rte_info *rte; 772 struct iosapic_rte_info *rte;
764 u32 low32; 773 u32 low32;
774 unsigned char dmode;
765 775
766 /* 776 /*
767 * If this GSI has already been registered (i.e., it's a 777 * If this GSI has already been registered (i.e., it's a
@@ -791,8 +801,8 @@ iosapic_register_intr (unsigned int gsi,
791 801
792 spin_lock(&irq_desc[irq].lock); 802 spin_lock(&irq_desc[irq].lock);
793 dest = get_target_cpu(gsi, irq); 803 dest = get_target_cpu(gsi, irq);
794 err = register_intr(gsi, irq, IOSAPIC_LOWEST_PRIORITY, 804 dmode = choose_dmode();
795 polarity, trigger); 805 err = register_intr(gsi, irq, dmode, polarity, trigger);
796 if (err < 0) { 806 if (err < 0) {
797 spin_unlock(&irq_desc[irq].lock); 807 spin_unlock(&irq_desc[irq].lock);
798 irq = err; 808 irq = err;
@@ -961,10 +971,12 @@ iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi,
961{ 971{
962 int vector, irq; 972 int vector, irq;
963 unsigned int dest = cpu_physical_id(smp_processor_id()); 973 unsigned int dest = cpu_physical_id(smp_processor_id());
974 unsigned char dmode;
964 975
965 irq = vector = isa_irq_to_vector(isa_irq); 976 irq = vector = isa_irq_to_vector(isa_irq);
966 BUG_ON(bind_irq_vector(irq, vector, CPU_MASK_ALL)); 977 BUG_ON(bind_irq_vector(irq, vector, CPU_MASK_ALL));
967 register_intr(gsi, irq, IOSAPIC_LOWEST_PRIORITY, polarity, trigger); 978 dmode = choose_dmode();
979 register_intr(gsi, irq, dmode, polarity, trigger);
968 980
969 DBG("ISA: IRQ %u -> GSI %u (%s,%s) -> CPU %d (0x%04x) vector %d\n", 981 DBG("ISA: IRQ %u -> GSI %u (%s,%s) -> CPU %d (0x%04x) vector %d\n",
970 isa_irq, gsi, trigger == IOSAPIC_EDGE ? "edge" : "level", 982 isa_irq, gsi, trigger == IOSAPIC_EDGE ? "edge" : "level",
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
index 44be1c952b7c..6dee579f205f 100644
--- a/arch/ia64/kernel/irq.c
+++ b/arch/ia64/kernel/irq.c
@@ -61,9 +61,11 @@ int show_interrupts(struct seq_file *p, void *v)
61 unsigned long flags; 61 unsigned long flags;
62 62
63 if (i == 0) { 63 if (i == 0) {
64 seq_printf(p, " "); 64 char cpuname[16];
65 seq_printf(p, " ");
65 for_each_online_cpu(j) { 66 for_each_online_cpu(j) {
66 seq_printf(p, "CPU%d ",j); 67 snprintf(cpuname, 10, "CPU%d", j);
68 seq_printf(p, "%10s ", cpuname);
67 } 69 }
68 seq_putc(p, '\n'); 70 seq_putc(p, '\n');
69 } 71 }
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index cc87025e8f54..10b48cd15a87 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -571,7 +571,7 @@ out:
571 * Outputs 571 * Outputs
572 * None 572 * None
573 */ 573 */
574static void __init 574void
575ia64_mca_register_cpev (int cpev) 575ia64_mca_register_cpev (int cpev)
576{ 576{
577 /* Register the CPE interrupt vector with SAL */ 577 /* Register the CPE interrupt vector with SAL */
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c
index 6ef6ffb943a0..396004e8cd14 100644
--- a/arch/ia64/kernel/palinfo.c
+++ b/arch/ia64/kernel/palinfo.c
@@ -470,7 +470,7 @@ register_info(char *page)
470 return p - page; 470 return p - page;
471} 471}
472 472
473static const char *proc_features[]={ 473static char *proc_features_0[]={ /* Feature set 0 */
474 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, 474 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
475 NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL, 475 NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,
476 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, 476 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
@@ -502,25 +502,92 @@ static const char *proc_features[]={
502 "Enable BERR promotion" 502 "Enable BERR promotion"
503}; 503};
504 504
505static char *proc_features_16[]={ /* Feature set 16 */
506 "Disable ETM",
507 "Enable ETM",
508 "Enable MCA on half-way timer",
509 "Enable snoop WC",
510 NULL,
511 "Enable Fast Deferral",
512 "Disable MCA on memory aliasing",
513 "Enable RSB",
514 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
515 "DP system processor",
516 "Low Voltage",
517 "HT supported",
518 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
519 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
520 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
521 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
522 NULL, NULL, NULL, NULL, NULL
523};
524
525static char **proc_features[]={
526 proc_features_0,
527 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
528 NULL, NULL, NULL, NULL,
529 proc_features_16,
530 NULL, NULL, NULL, NULL,
531};
532
533static char *
534feature_set_info(char *page, u64 avail, u64 status, u64 control, u64 set)
535{
536 char *p = page;
537 char **vf, **v;
538 int i;
539
540 vf = v = proc_features[set];
541 for(i=0; i < 64; i++, avail >>=1, status >>=1, control >>=1) {
542
543 if (!(control)) /* No remaining bits set */
544 break;
545 if (!(avail & 0x1)) /* Print only bits that are available */
546 continue;
547 if (vf)
548 v = vf + i;
549 if ( v && *v ) {
550 p += sprintf(p, "%-40s : %s %s\n", *v,
551 avail & 0x1 ? (status & 0x1 ?
552 "On " : "Off"): "",
553 avail & 0x1 ? (control & 0x1 ?
554 "Ctrl" : "NoCtrl"): "");
555 } else {
556 p += sprintf(p, "Feature set %2ld bit %2d\t\t\t"
557 " : %s %s\n",
558 set, i,
559 avail & 0x1 ? (status & 0x1 ?
560 "On " : "Off"): "",
561 avail & 0x1 ? (control & 0x1 ?
562 "Ctrl" : "NoCtrl"): "");
563 }
564 }
565 return p;
566}
505 567
506static int 568static int
507processor_info(char *page) 569processor_info(char *page)
508{ 570{
509 char *p = page; 571 char *p = page;
510 const char **v = proc_features; 572 u64 avail=1, status=1, control=1, feature_set=0;
511 u64 avail=1, status=1, control=1;
512 int i;
513 s64 ret; 573 s64 ret;
514 574
515 if ((ret=ia64_pal_proc_get_features(&avail, &status, &control)) != 0) return 0; 575 do {
576 ret = ia64_pal_proc_get_features(&avail, &status, &control,
577 feature_set);
578 if (ret < 0) {
579 return p - page;
580 }
581 if (ret == 1) {
582 feature_set++;
583 continue;
584 }
585
586 p = feature_set_info(p, avail, status, control, feature_set);
587
588 feature_set++;
589 } while(1);
516 590
517 for(i=0; i < 64; i++, v++,avail >>=1, status >>=1, control >>=1) {
518 if ( ! *v ) continue;
519 p += sprintf(p, "%-40s : %s%s %s\n", *v,
520 avail & 0x1 ? "" : "NotImpl",
521 avail & 0x1 ? (status & 0x1 ? "On" : "Off"): "",
522 avail & 0x1 ? (control & 0x1 ? "Ctrl" : "NoCtrl"): "");
523 }
524 return p - page; 591 return p - page;
525} 592}
526 593
diff --git a/arch/ia64/kernel/patch.c b/arch/ia64/kernel/patch.c
index e796e29f8e15..2cb9425e0421 100644
--- a/arch/ia64/kernel/patch.c
+++ b/arch/ia64/kernel/patch.c
@@ -129,9 +129,6 @@ ia64_patch_mckinley_e9 (unsigned long start, unsigned long end)
129 first_time = 0; 129 first_time = 0;
130 if (need_workaround) 130 if (need_workaround)
131 printk(KERN_INFO "Leaving McKinley Errata 9 workaround enabled\n"); 131 printk(KERN_INFO "Leaving McKinley Errata 9 workaround enabled\n");
132 else
133 printk(KERN_INFO "McKinley Errata 9 workaround not needed; "
134 "disabling it\n");
135 } 132 }
136 if (need_workaround) 133 if (need_workaround)
137 return; 134 return;
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 59169bf7145f..73e7c2e40b54 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -558,7 +558,7 @@ static ctl_table pfm_sysctl_dir[] = {
558 { 558 {
559 .ctl_name = CTL_UNNUMBERED, 559 .ctl_name = CTL_UNNUMBERED,
560 .procname = "perfmon", 560 .procname = "perfmon",
561 .mode = 0755, 561 .mode = 0555,
562 .child = pfm_ctl_table, 562 .child = pfm_ctl_table,
563 }, 563 },
564 {} 564 {}
@@ -567,7 +567,7 @@ static ctl_table pfm_sysctl_root[] = {
567 { 567 {
568 .ctl_name = CTL_KERN, 568 .ctl_name = CTL_KERN,
569 .procname = "kernel", 569 .procname = "kernel",
570 .mode = 0755, 570 .mode = 0555,
571 .child = pfm_sysctl_dir, 571 .child = pfm_sysctl_dir,
572 }, 572 },
573 {} 573 {}
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
index d3c538be466c..7e9c275ea148 100644
--- a/arch/ia64/mm/contig.c
+++ b/arch/ia64/mm/contig.c
@@ -146,6 +146,46 @@ find_bootmap_location (unsigned long start, unsigned long end, void *arg)
146 return 0; 146 return 0;
147} 147}
148 148
149#ifdef CONFIG_SMP
150static void *cpu_data;
151/**
152 * per_cpu_init - setup per-cpu variables
153 *
154 * Allocate and setup per-cpu data areas.
155 */
156void * __cpuinit
157per_cpu_init (void)
158{
159 int cpu;
160 static int first_time=1;
161
162 /*
163 * get_free_pages() cannot be used before cpu_init() done. BSP
164 * allocates "NR_CPUS" pages for all CPUs to avoid that AP calls
165 * get_zeroed_page().
166 */
167 if (first_time) {
168 first_time=0;
169 for (cpu = 0; cpu < NR_CPUS; cpu++) {
170 memcpy(cpu_data, __phys_per_cpu_start, __per_cpu_end - __per_cpu_start);
171 __per_cpu_offset[cpu] = (char *) cpu_data - __per_cpu_start;
172 cpu_data += PERCPU_PAGE_SIZE;
173 per_cpu(local_per_cpu_offset, cpu) = __per_cpu_offset[cpu];
174 }
175 }
176 return __per_cpu_start + __per_cpu_offset[smp_processor_id()];
177}
178
179static inline void
180alloc_per_cpu_data(void)
181{
182 cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS,
183 PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS));
184}
185#else
186#define alloc_per_cpu_data() do { } while (0)
187#endif /* CONFIG_SMP */
188
149/** 189/**
150 * find_memory - setup memory map 190 * find_memory - setup memory map
151 * 191 *
@@ -182,41 +222,9 @@ find_memory (void)
182 222
183 find_initrd(); 223 find_initrd();
184 224
225 alloc_per_cpu_data();
185} 226}
186 227
187#ifdef CONFIG_SMP
188/**
189 * per_cpu_init - setup per-cpu variables
190 *
191 * Allocate and setup per-cpu data areas.
192 */
193void * __cpuinit
194per_cpu_init (void)
195{
196 void *cpu_data;
197 int cpu;
198 static int first_time=1;
199
200 /*
201 * get_free_pages() cannot be used before cpu_init() done. BSP
202 * allocates "NR_CPUS" pages for all CPUs to avoid that AP calls
203 * get_zeroed_page().
204 */
205 if (first_time) {
206 first_time=0;
207 cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS,
208 PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS));
209 for (cpu = 0; cpu < NR_CPUS; cpu++) {
210 memcpy(cpu_data, __phys_per_cpu_start, __per_cpu_end - __per_cpu_start);
211 __per_cpu_offset[cpu] = (char *) cpu_data - __per_cpu_start;
212 cpu_data += PERCPU_PAGE_SIZE;
213 per_cpu(local_per_cpu_offset, cpu) = __per_cpu_offset[cpu];
214 }
215 }
216 return __per_cpu_start + __per_cpu_offset[smp_processor_id()];
217}
218#endif /* CONFIG_SMP */
219
220static int 228static int
221count_pages (u64 start, u64 end, void *arg) 229count_pages (u64 start, u64 end, void *arg)
222{ 230{
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c
index 0f9b12683bf3..53351c3cd7b1 100644
--- a/arch/ia64/sn/kernel/irq.c
+++ b/arch/ia64/sn/kernel/irq.c
@@ -5,7 +5,7 @@
5 * License. See the file "COPYING" in the main directory of this archive 5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details. 6 * for more details.
7 * 7 *
8 * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. 8 * Copyright (c) 2000-2007 Silicon Graphics, Inc. All Rights Reserved.
9 */ 9 */
10 10
11#include <linux/irq.h> 11#include <linux/irq.h>
@@ -85,12 +85,18 @@ static void sn_shutdown_irq(unsigned int irq)
85{ 85{
86} 86}
87 87
88extern void ia64_mca_register_cpev(int);
89
88static void sn_disable_irq(unsigned int irq) 90static void sn_disable_irq(unsigned int irq)
89{ 91{
92 if (irq == local_vector_to_irq(IA64_CPE_VECTOR))
93 ia64_mca_register_cpev(0);
90} 94}
91 95
92static void sn_enable_irq(unsigned int irq) 96static void sn_enable_irq(unsigned int irq)
93{ 97{
98 if (irq == local_vector_to_irq(IA64_CPE_VECTOR))
99 ia64_mca_register_cpev(irq);
94} 100}
95 101
96static void sn_ack_irq(unsigned int irq) 102static void sn_ack_irq(unsigned int irq)
diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c
index e336e1692a73..81785b78bc1e 100644
--- a/arch/ia64/sn/kernel/xpc_main.c
+++ b/arch/ia64/sn/kernel/xpc_main.c
@@ -3,7 +3,7 @@
3 * License. See the file "COPYING" in the main directory of this archive 3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details. 4 * for more details.
5 * 5 *
6 * Copyright (c) 2004-2006 Silicon Graphics, Inc. All Rights Reserved. 6 * Copyright (c) 2004-2007 Silicon Graphics, Inc. All Rights Reserved.
7 */ 7 */
8 8
9 9
@@ -257,7 +257,9 @@ xpc_hb_checker(void *ignore)
257 257
258 set_cpus_allowed(current, cpumask_of_cpu(XPC_HB_CHECK_CPU)); 258 set_cpus_allowed(current, cpumask_of_cpu(XPC_HB_CHECK_CPU));
259 259
260 /* set our heartbeating to other partitions into motion */
260 xpc_hb_check_timeout = jiffies + (xpc_hb_check_interval * HZ); 261 xpc_hb_check_timeout = jiffies + (xpc_hb_check_interval * HZ);
262 xpc_hb_beater(0);
261 263
262 while (!(volatile int) xpc_exiting) { 264 while (!(volatile int) xpc_exiting) {
263 265
@@ -1338,16 +1340,8 @@ xpc_init(void)
1338 dev_warn(xpc_part, "can't register die notifier\n"); 1340 dev_warn(xpc_part, "can't register die notifier\n");
1339 } 1341 }
1340 1342
1341
1342 /*
1343 * Set the beating to other partitions into motion. This is
1344 * the last requirement for other partitions' discovery to
1345 * initiate communications with us.
1346 */
1347 init_timer(&xpc_hb_timer); 1343 init_timer(&xpc_hb_timer);
1348 xpc_hb_timer.function = xpc_hb_beater; 1344 xpc_hb_timer.function = xpc_hb_beater;
1349 xpc_hb_beater(0);
1350
1351 1345
1352 /* 1346 /*
1353 * The real work-horse behind xpc. This processes incoming 1347 * The real work-horse behind xpc. This processes incoming
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 97da953eb5d0..2c7d6c240b73 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -546,6 +546,7 @@ config SIBYTE_BIGSUR
546 select SWAP_IO_SPACE 546 select SWAP_IO_SPACE
547 select SYS_HAS_CPU_SB1 547 select SYS_HAS_CPU_SB1
548 select SYS_SUPPORTS_BIG_ENDIAN 548 select SYS_SUPPORTS_BIG_ENDIAN
549 select SYS_SUPPORTS_HIGHMEM
549 select SYS_SUPPORTS_LITTLE_ENDIAN 550 select SYS_SUPPORTS_LITTLE_ENDIAN
550 551
551config SNI_RM 552config SNI_RM
@@ -733,15 +734,27 @@ config ARCH_MAY_HAVE_PC_FDC
733config BOOT_RAW 734config BOOT_RAW
734 bool 735 bool
735 736
737config CEVT_BCM1480
738 bool
739
736config CEVT_GT641XX 740config CEVT_GT641XX
737 bool 741 bool
738 742
739config CEVT_R4K 743config CEVT_R4K
740 bool 744 bool
741 745
746config CEVT_SB1250
747 bool
748
742config CEVT_TXX9 749config CEVT_TXX9
743 bool 750 bool
744 751
752config CSRC_BCM1480
753 bool
754
755config CSRC_SB1250
756 bool
757
745config CFE 758config CFE
746 bool 759 bool
747 760
diff --git a/arch/mips/au1000/mtx-1/Makefile b/arch/mips/au1000/mtx-1/Makefile
index afa7007d67f7..85a90941de4f 100644
--- a/arch/mips/au1000/mtx-1/Makefile
+++ b/arch/mips/au1000/mtx-1/Makefile
@@ -9,3 +9,5 @@
9 9
10lib-y := init.o board_setup.o irqmap.o 10lib-y := init.o board_setup.o irqmap.o
11obj-y := platform.o 11obj-y := platform.o
12
13EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/au1000/mtx-1/platform.c b/arch/mips/au1000/mtx-1/platform.c
index 01ebff677978..49c0fb409fea 100644
--- a/arch/mips/au1000/mtx-1/platform.c
+++ b/arch/mips/au1000/mtx-1/platform.c
@@ -34,15 +34,6 @@ static struct resource mtx1_wdt_res[] = {
34 } 34 }
35}; 35};
36 36
37static struct resource mtx1_sys_btn[] = {
38 [0] = {
39 .start = 7,
40 .end = 7,
41 .name = "mtx1-sys-btn-gpio",
42 .flags = IORESOURCE_IRQ,
43 }
44};
45
46static struct platform_device mtx1_wdt = { 37static struct platform_device mtx1_wdt = {
47 .name = "mtx1-wdt", 38 .name = "mtx1-wdt",
48 .id = 0, 39 .id = 0,
diff --git a/arch/mips/au1000/pb1200/Makefile b/arch/mips/au1000/pb1200/Makefile
index 22b673cf55af..970b1b1d5cda 100644
--- a/arch/mips/au1000/pb1200/Makefile
+++ b/arch/mips/au1000/pb1200/Makefile
@@ -3,3 +3,5 @@
3# 3#
4 4
5lib-y := init.o board_setup.o irqmap.o 5lib-y := init.o board_setup.o irqmap.o
6
7EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/au1000/pb1200/board_setup.c b/arch/mips/au1000/pb1200/board_setup.c
index 5dbc9868f598..b98bebfa87c6 100644
--- a/arch/mips/au1000/pb1200/board_setup.c
+++ b/arch/mips/au1000/pb1200/board_setup.c
@@ -68,9 +68,11 @@ void board_reset(void)
68void __init board_setup(void) 68void __init board_setup(void)
69{ 69{
70 char *argptr = NULL; 70 char *argptr = NULL;
71 u32 pin_func;
72 71
73#if 0 72#if 0
73 {
74 u32 pin_func;
75
74 /* Enable PSC1 SYNC for AC97. Normaly done in audio driver, 76 /* Enable PSC1 SYNC for AC97. Normaly done in audio driver,
75 * but it is board specific code, so put it here. 77 * but it is board specific code, so put it here.
76 */ 78 */
@@ -81,11 +83,13 @@ void __init board_setup(void)
81 83
82 au_writel(0, (u32)bcsr|0x10); /* turn off pcmcia power */ 84 au_writel(0, (u32)bcsr|0x10); /* turn off pcmcia power */
83 au_sync(); 85 au_sync();
86 }
84#endif 87#endif
85 88
86#if defined(CONFIG_I2C_AU1550) 89#if defined(CONFIG_I2C_AU1550)
87 { 90 {
88 u32 freq0, clksrc; 91 u32 freq0, clksrc;
92 u32 pin_func;
89 93
90 /* Select SMBUS in CPLD */ 94 /* Select SMBUS in CPLD */
91 bcsr->resets &= ~(BCSR_RESETS_PCS0MUX); 95 bcsr->resets &= ~(BCSR_RESETS_PCS0MUX);
diff --git a/arch/mips/au1000/pb1200/irqmap.c b/arch/mips/au1000/pb1200/irqmap.c
index bdf00e2a35e4..c096be4ed4e7 100644
--- a/arch/mips/au1000/pb1200/irqmap.c
+++ b/arch/mips/au1000/pb1200/irqmap.c
@@ -94,51 +94,41 @@ inline void pb1200_disable_irq(unsigned int irq_nr)
94 bcsr->intclr = 1<<(irq_nr - PB1200_INT_BEGIN); 94 bcsr->intclr = 1<<(irq_nr - PB1200_INT_BEGIN);
95} 95}
96 96
97static unsigned int pb1200_startup_irq( unsigned int irq_nr ) 97static unsigned int pb1200_setup_cascade(void)
98{ 98{
99 if (++pb1200_cascade_en == 1) 99 int err;
100 { 100
101 request_irq(AU1000_GPIO_7, &pb1200_cascade_handler, 101 err = request_irq(AU1000_GPIO_7, &pb1200_cascade_handler,
102 0, "Pb1200 Cascade", (void *)&pb1200_cascade_handler ); 102 0, "Pb1200 Cascade", &pb1200_cascade_handler);
103#ifdef CONFIG_MIPS_PB1200 103 if (err)
104 /* We have a problem with CPLD rev3. Enable a workaround */ 104 return err;
105 if( ((bcsr->whoami & BCSR_WHOAMI_CPLD)>>4) <= 3) 105
106 {
107 printk("\nWARNING!!!\n");
108 printk("\nWARNING!!!\n");
109 printk("\nWARNING!!!\n");
110 printk("\nWARNING!!!\n");
111 printk("\nWARNING!!!\n");
112 printk("\nWARNING!!!\n");
113 printk("Pb1200 must be at CPLD rev4. Please have Pb1200\n");
114 printk("updated to latest revision. This software will not\n");
115 printk("work on anything less than CPLD rev4\n");
116 printk("\nWARNING!!!\n");
117 printk("\nWARNING!!!\n");
118 printk("\nWARNING!!!\n");
119 printk("\nWARNING!!!\n");
120 printk("\nWARNING!!!\n");
121 printk("\nWARNING!!!\n");
122 while(1);
123 }
124#endif
125 }
126 pb1200_enable_irq(irq_nr);
127 return 0; 106 return 0;
128} 107}
129 108
130static void pb1200_shutdown_irq( unsigned int irq_nr ) 109static unsigned int pb1200_startup_irq(unsigned int irq)
131{ 110{
132 pb1200_disable_irq(irq_nr); 111 if (++pb1200_cascade_en == 1) {
133 if (--pb1200_cascade_en == 0) 112 int res;
134 { 113
135 free_irq(AU1000_GPIO_7, &pb1200_cascade_handler ); 114 res = pb1200_setup_cascade();
115 if (res)
116 return res;
136 } 117 }
137 return; 118
119 pb1200_enable_irq(irq);
120
121 return 0;
138} 122}
139 123
140static struct irq_chip external_irq_type = 124static void pb1200_shutdown_irq(unsigned int irq)
141{ 125{
126 pb1200_disable_irq(irq);
127 if (--pb1200_cascade_en == 0)
128 free_irq(AU1000_GPIO_7, &pb1200_cascade_handler);
129}
130
131static struct irq_chip external_irq_type = {
142#ifdef CONFIG_MIPS_PB1200 132#ifdef CONFIG_MIPS_PB1200
143 .name = "Pb1200 Ext", 133 .name = "Pb1200 Ext",
144#endif 134#endif
@@ -155,16 +145,38 @@ static struct irq_chip external_irq_type =
155 145
156void _board_init_irq(void) 146void _board_init_irq(void)
157{ 147{
158 int irq_nr; 148 unsigned int irq;
159 149
160 for (irq_nr = PB1200_INT_BEGIN; irq_nr <= PB1200_INT_END; irq_nr++) 150#ifdef CONFIG_MIPS_PB1200
161 { 151 /* We have a problem with CPLD rev3. Enable a workaround */
162 set_irq_chip_and_handler(irq_nr, &external_irq_type, 152 if (((bcsr->whoami & BCSR_WHOAMI_CPLD) >> 4) <= 3) {
153 printk("\nWARNING!!!\n");
154 printk("\nWARNING!!!\n");
155 printk("\nWARNING!!!\n");
156 printk("\nWARNING!!!\n");
157 printk("\nWARNING!!!\n");
158 printk("\nWARNING!!!\n");
159 printk("Pb1200 must be at CPLD rev4. Please have Pb1200\n");
160 printk("updated to latest revision. This software will not\n");
161 printk("work on anything less than CPLD rev4\n");
162 printk("\nWARNING!!!\n");
163 printk("\nWARNING!!!\n");
164 printk("\nWARNING!!!\n");
165 printk("\nWARNING!!!\n");
166 printk("\nWARNING!!!\n");
167 printk("\nWARNING!!!\n");
168 panic("Game over. Your score is 0.");
169 }
170#endif
171
172 for (irq = PB1200_INT_BEGIN; irq <= PB1200_INT_END; irq++) {
173 set_irq_chip_and_handler(irq, &external_irq_type,
163 handle_level_irq); 174 handle_level_irq);
164 pb1200_disable_irq(irq_nr); 175 pb1200_disable_irq(irq);
165 } 176 }
166 177
167 /* GPIO_7 can not be hooked here, so it is hooked upon first 178 /*
168 request of any source attached to the cascade */ 179 * GPIO_7 can not be hooked here, so it is hooked upon first
180 * request of any source attached to the cascade
181 */
169} 182}
170
diff --git a/arch/mips/basler/excite/excite_setup.c b/arch/mips/basler/excite/excite_setup.c
index 24378b9223f9..6dd8f0d46d09 100644
--- a/arch/mips/basler/excite/excite_setup.c
+++ b/arch/mips/basler/excite/excite_setup.c
@@ -77,7 +77,7 @@ int titan_irqflags;
77void __init plat_time_init(void) 77void __init plat_time_init(void)
78{ 78{
79 const u32 modebit5 = ocd_readl(0x00e4); 79 const u32 modebit5 = ocd_readl(0x00e4);
80 unsigned int mult = ((modebit5 >> 11) & 0x1f) + 2, 80 unsigned int mult = ((modebit5 >> 11) & 0x1f) + 2;
81 unsigned int div = ((modebit5 >> 16) & 0x1f) + 2; 81 unsigned int div = ((modebit5 >> 16) & 0x1f) + 2;
82 82
83 if (div == 33) 83 if (div == 33)
diff --git a/arch/mips/jazz/irq.c b/arch/mips/jazz/irq.c
index ae25b480723e..d7f8a782aae4 100644
--- a/arch/mips/jazz/irq.c
+++ b/arch/mips/jazz/irq.c
@@ -97,9 +97,10 @@ asmlinkage void plat_irq_dispatch(void)
97 if (pending & IE_IRQ4) { 97 if (pending & IE_IRQ4) {
98 r4030_read_reg32(JAZZ_TIMER_REGISTER); 98 r4030_read_reg32(JAZZ_TIMER_REGISTER);
99 do_IRQ(JAZZ_TIMER_IRQ); 99 do_IRQ(JAZZ_TIMER_IRQ);
100 } else if (pending & IE_IRQ2) 100 } else if (pending & IE_IRQ2) {
101 do_IRQ(r4030_read_reg32(JAZZ_EISA_IRQ_ACK)); 101 irq = *(volatile u8 *)JAZZ_EISA_IRQ_ACK;
102 else if (pending & IE_IRQ1) { 102 do_IRQ(irq);
103 } else if (pending & IE_IRQ1) {
103 irq = *(volatile u8 *)JAZZ_IO_IRQ_SOURCE >> 2; 104 irq = *(volatile u8 *)JAZZ_IO_IRQ_SOURCE >> 2;
104 if (likely(irq > 0)) 105 if (likely(irq > 0))
105 do_IRQ(irq + JAZZ_IRQ_START - 1); 106 do_IRQ(irq + JAZZ_IRQ_START - 1);
@@ -117,16 +118,16 @@ static void r4030_set_mode(enum clock_event_mode mode,
117struct clock_event_device r4030_clockevent = { 118struct clock_event_device r4030_clockevent = {
118 .name = "r4030", 119 .name = "r4030",
119 .features = CLOCK_EVT_FEAT_PERIODIC, 120 .features = CLOCK_EVT_FEAT_PERIODIC,
120 .rating = 100, 121 .rating = 300,
121 .irq = JAZZ_TIMER_IRQ, 122 .irq = JAZZ_TIMER_IRQ,
122 .cpumask = CPU_MASK_CPU0,
123 .set_mode = r4030_set_mode, 123 .set_mode = r4030_set_mode,
124}; 124};
125 125
126static irqreturn_t r4030_timer_interrupt(int irq, void *dev_id) 126static irqreturn_t r4030_timer_interrupt(int irq, void *dev_id)
127{ 127{
128 r4030_clockevent.event_handler(&r4030_clockevent); 128 struct clock_event_device *cd = dev_id;
129 129
130 cd->event_handler(cd);
130 return IRQ_HANDLED; 131 return IRQ_HANDLED;
131} 132}
132 133
@@ -134,15 +135,22 @@ static struct irqaction r4030_timer_irqaction = {
134 .handler = r4030_timer_interrupt, 135 .handler = r4030_timer_interrupt,
135 .flags = IRQF_DISABLED, 136 .flags = IRQF_DISABLED,
136 .mask = CPU_MASK_CPU0, 137 .mask = CPU_MASK_CPU0,
137 .name = "timer", 138 .name = "R4030 timer",
138}; 139};
139 140
140void __init plat_time_init(void) 141void __init plat_time_init(void)
141{ 142{
142 struct irqaction *irq = &r4030_timer_irqaction; 143 struct clock_event_device *cd = &r4030_clockevent;
144 struct irqaction *action = &r4030_timer_irqaction;
145 unsigned int cpu = smp_processor_id();
143 146
144 BUG_ON(HZ != 100); 147 BUG_ON(HZ != 100);
145 148
149 cd->cpumask = cpumask_of_cpu(cpu);
150 clockevents_register_device(cd);
151 action->dev_id = cd;
152 setup_irq(JAZZ_TIMER_IRQ, action);
153
146 /* 154 /*
147 * Set clock to 100Hz. 155 * Set clock to 100Hz.
148 * 156 *
@@ -150,8 +158,5 @@ void __init plat_time_init(void)
150 * a programmable 4-bit divider. This makes it fairly inflexible. 158 * a programmable 4-bit divider. This makes it fairly inflexible.
151 */ 159 */
152 r4030_write_reg32(JAZZ_TIMER_INTERVAL, 9); 160 r4030_write_reg32(JAZZ_TIMER_INTERVAL, 9);
153 setup_irq(JAZZ_TIMER_IRQ, irq);
154
155 clockevents_register_device(&r4030_clockevent);
156 setup_pit_timer(); 161 setup_pit_timer();
157} 162}
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index 3196509a28d5..b551535b7e48 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -8,9 +8,13 @@ obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \
8 ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \ 8 ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \
9 time.o topology.o traps.o unaligned.o 9 time.o topology.o traps.o unaligned.o
10 10
11obj-$(CONFIG_CEVT_BCM1480) += cevt-bcm1480.o
11obj-$(CONFIG_CEVT_R4K) += cevt-r4k.o 12obj-$(CONFIG_CEVT_R4K) += cevt-r4k.o
12obj-$(CONFIG_CEVT_GT641XX) += cevt-gt641xx.o 13obj-$(CONFIG_CEVT_GT641XX) += cevt-gt641xx.o
14obj-$(CONFIG_CEVT_SB1250) += cevt-sb1250.o
13obj-$(CONFIG_CEVT_TXX9) += cevt-txx9.o 15obj-$(CONFIG_CEVT_TXX9) += cevt-txx9.o
16obj-$(CONFIG_CSRC_BCM1480) += csrc-bcm1480.o
17obj-$(CONFIG_CSRC_SB1250) += csrc-sb1250.o
14 18
15binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \ 19binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \
16 irix5sys.o sysirix.o 20 irix5sys.o sysirix.o
diff --git a/arch/mips/kernel/cevt-bcm1480.c b/arch/mips/kernel/cevt-bcm1480.c
new file mode 100644
index 000000000000..21e6d63eb4d1
--- /dev/null
+++ b/arch/mips/kernel/cevt-bcm1480.c
@@ -0,0 +1,149 @@
1/*
2 * Copyright (C) 2000,2001,2004 Broadcom Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18#include <linux/clockchips.h>
19#include <linux/interrupt.h>
20#include <linux/percpu.h>
21
22#include <asm/addrspace.h>
23#include <asm/io.h>
24#include <asm/time.h>
25
26#include <asm/sibyte/bcm1480_regs.h>
27#include <asm/sibyte/sb1250_regs.h>
28#include <asm/sibyte/bcm1480_int.h>
29#include <asm/sibyte/bcm1480_scd.h>
30
31#include <asm/sibyte/sb1250.h>
32
33#define IMR_IP2_VAL K_BCM1480_INT_MAP_I0
34#define IMR_IP3_VAL K_BCM1480_INT_MAP_I1
35#define IMR_IP4_VAL K_BCM1480_INT_MAP_I2
36
37/*
38 * The general purpose timer ticks at 1MHz independent if
39 * the rest of the system
40 */
41static void sibyte_set_mode(enum clock_event_mode mode,
42 struct clock_event_device *evt)
43{
44 unsigned int cpu = smp_processor_id();
45 void __iomem *cfg, *init;
46
47 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
48 init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
49
50 switch (mode) {
51 case CLOCK_EVT_MODE_PERIODIC:
52 __raw_writeq(0, cfg);
53 __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, init);
54 __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
55 cfg);
56 break;
57
58 case CLOCK_EVT_MODE_ONESHOT:
59 /* Stop the timer until we actually program a shot */
60 case CLOCK_EVT_MODE_SHUTDOWN:
61 __raw_writeq(0, cfg);
62 break;
63
64 case CLOCK_EVT_MODE_UNUSED: /* shuddup gcc */
65 case CLOCK_EVT_MODE_RESUME:
66 ;
67 }
68}
69
70static int sibyte_next_event(unsigned long delta, struct clock_event_device *cd)
71{
72 unsigned int cpu = smp_processor_id();
73 void __iomem *cfg, *init;
74
75 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
76 init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
77
78 __raw_writeq(delta - 1, init);
79 __raw_writeq(M_SCD_TIMER_ENABLE, cfg);
80
81 return 0;
82}
83
84static irqreturn_t sibyte_counter_handler(int irq, void *dev_id)
85{
86 unsigned int cpu = smp_processor_id();
87 struct clock_event_device *cd = dev_id;
88 void __iomem *cfg;
89 unsigned long tmode;
90
91 if (cd->mode == CLOCK_EVT_MODE_PERIODIC)
92 tmode = M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS;
93 else
94 tmode = 0;
95
96 /* ACK interrupt */
97 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
98 ____raw_writeq(tmode, cfg);
99
100 cd->event_handler(cd);
101
102 return IRQ_HANDLED;
103}
104
105static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent);
106static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction);
107static DEFINE_PER_CPU(char [18], sibyte_hpt_name);
108
109void __cpuinit sb1480_clockevent_init(void)
110{
111 unsigned int cpu = smp_processor_id();
112 unsigned int irq = K_BCM1480_INT_TIMER_0 + cpu;
113 struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu);
114 struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu);
115 unsigned char *name = per_cpu(sibyte_hpt_name, cpu);
116
117 BUG_ON(cpu > 3); /* Only have 4 general purpose timers */
118
119 sprintf(name, "bcm1480-counter-%d", cpu);
120 cd->name = name;
121 cd->features = CLOCK_EVT_FEAT_PERIODIC |
122 CLOCK_EVT_FEAT_ONESHOT;
123 clockevent_set_clock(cd, V_SCD_TIMER_FREQ);
124 cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd);
125 cd->min_delta_ns = clockevent_delta2ns(1, cd);
126 cd->rating = 200;
127 cd->irq = irq;
128 cd->cpumask = cpumask_of_cpu(cpu);
129 cd->set_next_event = sibyte_next_event;
130 cd->set_mode = sibyte_set_mode;
131 clockevents_register_device(cd);
132
133 bcm1480_mask_irq(cpu, irq);
134
135 /*
136 * Map the timer interrupt to IP[4] of this cpu
137 */
138 __raw_writeq(IMR_IP4_VAL,
139 IOADDR(A_BCM1480_IMR_REGISTER(cpu,
140 R_BCM1480_IMR_INTERRUPT_MAP_BASE_H) + (irq << 3)));
141
142 bcm1480_unmask_irq(cpu, irq);
143
144 action->handler = sibyte_counter_handler;
145 action->flags = IRQF_DISABLED | IRQF_PERCPU;
146 action->name = name;
147 action->dev_id = cd;
148 setup_irq(irq, action);
149}
diff --git a/arch/mips/kernel/cevt-sb1250.c b/arch/mips/kernel/cevt-sb1250.c
new file mode 100644
index 000000000000..e2029d0fc39b
--- /dev/null
+++ b/arch/mips/kernel/cevt-sb1250.c
@@ -0,0 +1,148 @@
1/*
2 * Copyright (C) 2000, 2001 Broadcom Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18#include <linux/clockchips.h>
19#include <linux/interrupt.h>
20#include <linux/percpu.h>
21
22#include <asm/addrspace.h>
23#include <asm/io.h>
24#include <asm/time.h>
25
26#include <asm/sibyte/sb1250.h>
27#include <asm/sibyte/sb1250_regs.h>
28#include <asm/sibyte/sb1250_int.h>
29#include <asm/sibyte/sb1250_scd.h>
30
31#define IMR_IP2_VAL K_INT_MAP_I0
32#define IMR_IP3_VAL K_INT_MAP_I1
33#define IMR_IP4_VAL K_INT_MAP_I2
34
35/*
36 * The general purpose timer ticks at 1MHz independent if
37 * the rest of the system
38 */
39static void sibyte_set_mode(enum clock_event_mode mode,
40 struct clock_event_device *evt)
41{
42 unsigned int cpu = smp_processor_id();
43 void __iomem *cfg, *init;
44
45 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
46 init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
47
48 switch (mode) {
49 case CLOCK_EVT_MODE_PERIODIC:
50 __raw_writeq(0, cfg);
51 __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, init);
52 __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
53 cfg);
54 break;
55
56 case CLOCK_EVT_MODE_ONESHOT:
57 /* Stop the timer until we actually program a shot */
58 case CLOCK_EVT_MODE_SHUTDOWN:
59 __raw_writeq(0, cfg);
60 break;
61
62 case CLOCK_EVT_MODE_UNUSED: /* shuddup gcc */
63 case CLOCK_EVT_MODE_RESUME:
64 ;
65 }
66}
67
68static int sibyte_next_event(unsigned long delta, struct clock_event_device *cd)
69{
70 unsigned int cpu = smp_processor_id();
71 void __iomem *cfg, *init;
72
73 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
74 init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
75
76 __raw_writeq(delta - 1, init);
77 __raw_writeq(M_SCD_TIMER_ENABLE, cfg);
78
79 return 0;
80}
81
82static irqreturn_t sibyte_counter_handler(int irq, void *dev_id)
83{
84 unsigned int cpu = smp_processor_id();
85 struct clock_event_device *cd = dev_id;
86 void __iomem *cfg;
87 unsigned long tmode;
88
89 if (cd->mode == CLOCK_EVT_MODE_PERIODIC)
90 tmode = M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS;
91 else
92 tmode = 0;
93
94 /* ACK interrupt */
95 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
96 ____raw_writeq(tmode, cfg);
97
98 cd->event_handler(cd);
99
100 return IRQ_HANDLED;
101}
102
103static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent);
104static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction);
105static DEFINE_PER_CPU(char [18], sibyte_hpt_name);
106
107void __cpuinit sb1250_clockevent_init(void)
108{
109 unsigned int cpu = smp_processor_id();
110 unsigned int irq = K_INT_TIMER_0 + cpu;
111 struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu);
112 struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu);
113 unsigned char *name = per_cpu(sibyte_hpt_name, cpu);
114
115 /* Only have 4 general purpose timers, and we use last one as hpt */
116 BUG_ON(cpu > 2);
117
118 sprintf(name, "sb1250-counter-%d", cpu);
119 cd->name = name;
120 cd->features = CLOCK_EVT_FEAT_PERIODIC |
121 CLOCK_EVT_FEAT_ONESHOT;
122 clockevent_set_clock(cd, V_SCD_TIMER_FREQ);
123 cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd);
124 cd->min_delta_ns = clockevent_delta2ns(1, cd);
125 cd->rating = 200;
126 cd->irq = irq;
127 cd->cpumask = cpumask_of_cpu(cpu);
128 cd->set_next_event = sibyte_next_event;
129 cd->set_mode = sibyte_set_mode;
130 clockevents_register_device(cd);
131
132 sb1250_mask_irq(cpu, irq);
133
134 /*
135 * Map the timer interrupt to IP[4] of this cpu
136 */
137 __raw_writeq(IMR_IP4_VAL,
138 IOADDR(A_IMR_REGISTER(cpu, R_IMR_INTERRUPT_MAP_BASE) +
139 (irq << 3)));
140
141 sb1250_unmask_irq(cpu, irq);
142
143 action->handler = sibyte_counter_handler;
144 action->flags = IRQF_DISABLED | IRQF_PERCPU;
145 action->name = name;
146 action->dev_id = cd;
147 setup_irq(irq, action);
148}
diff --git a/arch/mips/kernel/csrc-bcm1480.c b/arch/mips/kernel/csrc-bcm1480.c
new file mode 100644
index 000000000000..868745e7184b
--- /dev/null
+++ b/arch/mips/kernel/csrc-bcm1480.c
@@ -0,0 +1,54 @@
1/*
2 * Copyright (C) 2000,2001,2004 Broadcom Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18#include <linux/clocksource.h>
19
20#include <asm/addrspace.h>
21#include <asm/io.h>
22#include <asm/time.h>
23
24#include <asm/sibyte/bcm1480_regs.h>
25#include <asm/sibyte/sb1250_regs.h>
26#include <asm/sibyte/bcm1480_int.h>
27#include <asm/sibyte/bcm1480_scd.h>
28
29#include <asm/sibyte/sb1250.h>
30
31static cycle_t bcm1480_hpt_read(void)
32{
33 return (cycle_t) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT));
34}
35
36struct clocksource bcm1480_clocksource = {
37 .name = "zbbus-cycles",
38 .rating = 200,
39 .read = bcm1480_hpt_read,
40 .mask = CLOCKSOURCE_MASK(64),
41 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
42};
43
44void __init sb1480_clocksource_init(void)
45{
46 struct clocksource *cs = &bcm1480_clocksource;
47 unsigned int plldiv;
48 unsigned long zbbus;
49
50 plldiv = G_BCM1480_SYS_PLL_DIV(__raw_readq(IOADDR(A_SCD_SYSTEM_CFG)));
51 zbbus = ((plldiv >> 1) * 50000000) + ((plldiv & 1) * 25000000);
52 clocksource_set_clock(cs, zbbus);
53 clocksource_register(cs);
54}
diff --git a/arch/mips/kernel/csrc-sb1250.c b/arch/mips/kernel/csrc-sb1250.c
new file mode 100644
index 000000000000..ebb16e668877
--- /dev/null
+++ b/arch/mips/kernel/csrc-sb1250.c
@@ -0,0 +1,70 @@
1/*
2 * Copyright (C) 2000, 2001 Broadcom Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18#include <linux/clocksource.h>
19
20#include <asm/addrspace.h>
21#include <asm/io.h>
22#include <asm/time.h>
23
24#include <asm/sibyte/sb1250.h>
25#include <asm/sibyte/sb1250_regs.h>
26#include <asm/sibyte/sb1250_int.h>
27#include <asm/sibyte/sb1250_scd.h>
28
29#define SB1250_HPT_NUM 3
30#define SB1250_HPT_VALUE M_SCD_TIMER_CNT /* max value */
31
32/*
33 * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over
34 * again.
35 */
36static cycle_t sb1250_hpt_read(void)
37{
38 unsigned int count;
39
40 count = G_SCD_TIMER_CNT(__raw_readq(IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, R_SCD_TIMER_CNT))));
41
42 return SB1250_HPT_VALUE - count;
43}
44
45struct clocksource bcm1250_clocksource = {
46 .name = "MIPS",
47 .rating = 200,
48 .read = sb1250_hpt_read,
49 .mask = CLOCKSOURCE_MASK(23),
50 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
51};
52
53void __init sb1250_clocksource_init(void)
54{
55 struct clocksource *cs = &bcm1250_clocksource;
56
57 /* Setup hpt using timer #3 but do not enable irq for it */
58 __raw_writeq(0,
59 IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
60 R_SCD_TIMER_CFG)));
61 __raw_writeq(SB1250_HPT_VALUE,
62 IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
63 R_SCD_TIMER_INIT)));
64 __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
65 IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
66 R_SCD_TIMER_CFG)));
67
68 clocksource_set_clock(cs, V_SCD_TIMER_FREQ);
69 clocksource_register(cs);
70}
diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/i8253.c
index 5d9830df3595..c2d497ceffdd 100644
--- a/arch/mips/kernel/i8253.c
+++ b/arch/mips/kernel/i8253.c
@@ -12,8 +12,9 @@
12#include <asm/delay.h> 12#include <asm/delay.h>
13#include <asm/i8253.h> 13#include <asm/i8253.h>
14#include <asm/io.h> 14#include <asm/io.h>
15#include <asm/time.h>
15 16
16static DEFINE_SPINLOCK(i8253_lock); 17DEFINE_SPINLOCK(i8253_lock);
17 18
18/* 19/*
19 * Initialize the PIT timer. 20 * Initialize the PIT timer.
@@ -87,11 +88,10 @@ struct clock_event_device pit_clockevent = {
87 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 88 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
88 .set_mode = init_pit_timer, 89 .set_mode = init_pit_timer,
89 .set_next_event = pit_next_event, 90 .set_next_event = pit_next_event,
90 .shift = 32,
91 .irq = 0, 91 .irq = 0,
92}; 92};
93 93
94irqreturn_t timer_interrupt(int irq, void *dev_id) 94static irqreturn_t timer_interrupt(int irq, void *dev_id)
95{ 95{
96 pit_clockevent.event_handler(&pit_clockevent); 96 pit_clockevent.event_handler(&pit_clockevent);
97 97
@@ -111,19 +111,20 @@ static struct irqaction irq0 = {
111 */ 111 */
112void __init setup_pit_timer(void) 112void __init setup_pit_timer(void)
113{ 113{
114 struct clock_event_device *cd = &pit_clockevent;
115 unsigned int cpu = smp_processor_id();
116
114 /* 117 /*
115 * Start pit with the boot cpu mask and make it global after the 118 * Start pit with the boot cpu mask and make it global after the
116 * IO_APIC has been initialized. 119 * IO_APIC has been initialized.
117 */ 120 */
118 pit_clockevent.cpumask = cpumask_of_cpu(0); 121 cd->cpumask = cpumask_of_cpu(cpu);
119 pit_clockevent.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, 32); 122 clockevent_set_clock(cd, CLOCK_TICK_RATE);
120 pit_clockevent.max_delta_ns = 123 cd->max_delta_ns = clockevent_delta2ns(0x7FFF, cd);
121 clockevent_delta2ns(0x7FFF, &pit_clockevent); 124 cd->min_delta_ns = clockevent_delta2ns(0xF, cd);
122 pit_clockevent.min_delta_ns = 125 clockevents_register_device(cd);
123 clockevent_delta2ns(0xF, &pit_clockevent); 126
124 clockevents_register_device(&pit_clockevent); 127 irq0.mask = cpumask_of_cpu(cpu);
125
126 irq0.mask = cpumask_of_cpu(0);
127 setup_irq(0, &irq0); 128 setup_irq(0, &irq0);
128} 129}
129 130
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
index 27228f583dae..3284b9b4ecac 100644
--- a/arch/mips/kernel/time.c
+++ b/arch/mips/kernel/time.c
@@ -3,8 +3,7 @@
3 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net 3 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
4 * Copyright (c) 2003, 2004 Maciej W. Rozycki 4 * Copyright (c) 2003, 2004 Maciej W. Rozycki
5 * 5 *
6 * Common time service routines for MIPS machines. See 6 * Common time service routines for MIPS machines.
7 * Documentation/mips/time.README.
8 * 7 *
9 * This program is free software; you can redistribute it and/or modify it 8 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the 9 * under the terms of the GNU General Public License as published by the
@@ -18,28 +17,17 @@
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
20#include <linux/param.h> 19#include <linux/param.h>
21#include <linux/profile.h>
22#include <linux/time.h> 20#include <linux/time.h>
23#include <linux/timex.h> 21#include <linux/timex.h>
24#include <linux/smp.h> 22#include <linux/smp.h>
25#include <linux/kernel_stat.h>
26#include <linux/spinlock.h> 23#include <linux/spinlock.h>
27#include <linux/interrupt.h>
28#include <linux/module.h> 24#include <linux/module.h>
29#include <linux/kallsyms.h>
30 25
31#include <asm/bootinfo.h>
32#include <asm/cache.h>
33#include <asm/compiler.h>
34#include <asm/cpu.h>
35#include <asm/cpu-features.h> 26#include <asm/cpu-features.h>
36#include <asm/div64.h> 27#include <asm/div64.h>
37#include <asm/sections.h>
38#include <asm/smtc_ipi.h> 28#include <asm/smtc_ipi.h>
39#include <asm/time.h> 29#include <asm/time.h>
40 30
41#include <irq.h>
42
43/* 31/*
44 * forward reference 32 * forward reference
45 */ 33 */
@@ -63,14 +51,6 @@ int update_persistent_clock(struct timespec now)
63} 51}
64 52
65/* 53/*
66 * Null high precision timer functions for systems lacking one.
67 */
68static cycle_t null_hpt_read(void)
69{
70 return 0;
71}
72
73/*
74 * High precision timer functions for a R4k-compatible timer. 54 * High precision timer functions for a R4k-compatible timer.
75 */ 55 */
76static cycle_t c0_hpt_read(void) 56static cycle_t c0_hpt_read(void)
@@ -80,22 +60,6 @@ static cycle_t c0_hpt_read(void)
80 60
81int (*mips_timer_state)(void); 61int (*mips_timer_state)(void);
82 62
83/*
84 * local_timer_interrupt() does profiling and process accounting
85 * on a per-CPU basis.
86 *
87 * In UP mode, it is invoked from the (global) timer_interrupt.
88 *
89 * In SMP mode, it might invoked by per-CPU timer interrupt, or
90 * a broadcasted inter-processor interrupt which itself is triggered
91 * by the global timer interrupt.
92 */
93void local_timer_interrupt(int irq, void *dev_id)
94{
95 profile_tick(CPU_PROFILING);
96 update_process_times(user_mode(get_irq_regs()));
97}
98
99int null_perf_irq(void) 63int null_perf_irq(void)
100{ 64{
101 return 0; 65 return 0;
@@ -120,6 +84,13 @@ EXPORT_SYMBOL(perf_irq);
120 84
121unsigned int mips_hpt_frequency; 85unsigned int mips_hpt_frequency;
122 86
87static struct clocksource clocksource_mips = {
88 .name = "MIPS",
89 .read = c0_hpt_read,
90 .mask = CLOCKSOURCE_MASK(32),
91 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
92};
93
123static unsigned int __init calibrate_hpt(void) 94static unsigned int __init calibrate_hpt(void)
124{ 95{
125 cycle_t frequency, hpt_start, hpt_end, hpt_count, hz; 96 cycle_t frequency, hpt_start, hpt_end, hpt_count, hz;
@@ -162,12 +133,6 @@ static unsigned int __init calibrate_hpt(void)
162 return frequency >> log_2_loops; 133 return frequency >> log_2_loops;
163} 134}
164 135
165struct clocksource clocksource_mips = {
166 .name = "MIPS",
167 .mask = CLOCKSOURCE_MASK(32),
168 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
169};
170
171void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock) 136void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock)
172{ 137{
173 u64 temp; 138 u64 temp;
@@ -203,9 +168,6 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd,
203 168
204static void __init init_mips_clocksource(void) 169static void __init init_mips_clocksource(void)
205{ 170{
206 if (!mips_hpt_frequency || clocksource_mips.read == null_hpt_read)
207 return;
208
209 /* Calclate a somewhat reasonable rating value */ 171 /* Calclate a somewhat reasonable rating value */
210 clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; 172 clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000;
211 173
@@ -227,7 +189,7 @@ void __init __weak plat_time_init(void)
227 * setup_irq calls and each clock_event_device should use its own 189 * setup_irq calls and each clock_event_device should use its own
228 * struct irqrequest. 190 * struct irqrequest.
229 */ 191 */
230void __init plat_timer_setup(struct irqaction *irq) 192void __init plat_timer_setup(void)
231{ 193{
232 BUG(); 194 BUG();
233} 195}
@@ -236,21 +198,8 @@ void __init time_init(void)
236{ 198{
237 plat_time_init(); 199 plat_time_init();
238 200
239 /* Choose appropriate high precision timer routines. */ 201 if (cpu_has_counter && (mips_hpt_frequency || mips_timer_state)) {
240 if (!cpu_has_counter && !clocksource_mips.read)
241 /* No high precision timer -- sorry. */
242 clocksource_mips.read = null_hpt_read;
243 else if (!mips_hpt_frequency && !mips_timer_state) {
244 /* A high precision timer of unknown frequency. */
245 if (!clocksource_mips.read)
246 /* No external high precision timer -- use R4k. */
247 clocksource_mips.read = c0_hpt_read;
248 } else {
249 /* We know counter frequency. Or we can get it. */ 202 /* We know counter frequency. Or we can get it. */
250 if (!clocksource_mips.read) {
251 /* No external high precision timer -- use R4k. */
252 clocksource_mips.read = c0_hpt_read;
253 }
254 if (!mips_hpt_frequency) 203 if (!mips_hpt_frequency)
255 mips_hpt_frequency = calibrate_hpt(); 204 mips_hpt_frequency = calibrate_hpt();
256 205
@@ -258,8 +207,8 @@ void __init time_init(void)
258 printk("Using %u.%03u MHz high precision timer.\n", 207 printk("Using %u.%03u MHz high precision timer.\n",
259 ((mips_hpt_frequency + 500) / 1000) / 1000, 208 ((mips_hpt_frequency + 500) / 1000) / 1000,
260 ((mips_hpt_frequency + 500) / 1000) % 1000); 209 ((mips_hpt_frequency + 500) / 1000) % 1000);
210 init_mips_clocksource();
261 } 211 }
262 212
263 init_mips_clocksource();
264 mips_clockevent_init(); 213 mips_clockevent_init();
265} 214}
diff --git a/arch/mips/qemu/q-irq.c b/arch/mips/qemu/q-irq.c
index 4681757460a1..11f984767880 100644
--- a/arch/mips/qemu/q-irq.c
+++ b/arch/mips/qemu/q-irq.c
@@ -1,4 +1,5 @@
1#include <linux/init.h> 1#include <linux/init.h>
2#include <linux/interrupt.h>
2#include <linux/linkage.h> 3#include <linux/linkage.h>
3 4
4#include <asm/i8259.h> 5#include <asm/i8259.h>
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
index dc59c3b708ed..08d45369be45 100644
--- a/arch/mips/sgi-ip27/ip27-timer.c
+++ b/arch/mips/sgi-ip27/ip27-timer.c
@@ -131,7 +131,7 @@ static struct irq_chip rt_irq_type = {
131static int rt_next_event(unsigned long delta, struct clock_event_device *evt) 131static int rt_next_event(unsigned long delta, struct clock_event_device *evt)
132{ 132{
133 unsigned int cpu = smp_processor_id(); 133 unsigned int cpu = smp_processor_id();
134 int slice putoslice(cpu); 134 int slice = cputoslice(cpu);
135 unsigned long cnt; 135 unsigned long cnt;
136 136
137 cnt = LOCAL_HUB_L(PI_RT_COUNT); 137 cnt = LOCAL_HUB_L(PI_RT_COUNT);
@@ -169,7 +169,7 @@ static irqreturn_t hub_rt_counter_handler(int irq, void *dev_id)
169 /* 169 /*
170 * Ack 170 * Ack
171 */ 171 */
172 LOCAL_HUB_S(PI_RT_PEND_A + PI_COUNT_OFFSET * slice, cnt); 172 LOCAL_HUB_S(PI_RT_PEND_A + PI_COUNT_OFFSET * slice, 0);
173 cd->event_handler(cd); 173 cd->event_handler(cd);
174 174
175 return IRQ_HANDLED; 175 return IRQ_HANDLED;
diff --git a/arch/mips/sgi-ip32/ip32-platform.c b/arch/mips/sgi-ip32/ip32-platform.c
index 7309e48d163d..77febd68fcd4 100644
--- a/arch/mips/sgi-ip32/ip32-platform.c
+++ b/arch/mips/sgi-ip32/ip32-platform.c
@@ -42,7 +42,7 @@ static struct platform_device uart8250_device = {
42static int __init uart8250_init(void) 42static int __init uart8250_init(void)
43{ 43{
44 uart8250_data[0].membase = (void __iomem *) &mace->isa.serial1; 44 uart8250_data[0].membase = (void __iomem *) &mace->isa.serial1;
45 uart8250_data[1].membase = (void __iomem *) &mace->isa.serial1; 45 uart8250_data[1].membase = (void __iomem *) &mace->isa.serial2;
46 46
47 return platform_device_register(&uart8250_device); 47 return platform_device_register(&uart8250_device);
48} 48}
diff --git a/arch/mips/sibyte/Kconfig b/arch/mips/sibyte/Kconfig
index e8fb880272bd..366b19d33f77 100644
--- a/arch/mips/sibyte/Kconfig
+++ b/arch/mips/sibyte/Kconfig
@@ -1,5 +1,7 @@
1config SIBYTE_SB1250 1config SIBYTE_SB1250
2 bool 2 bool
3 select CEVT_SB1250
4 select CSRC_SB1250
3 select HW_HAS_PCI 5 select HW_HAS_PCI
4 select IRQ_CPU 6 select IRQ_CPU
5 select SIBYTE_ENABLE_LDT_IF_PCI 7 select SIBYTE_ENABLE_LDT_IF_PCI
@@ -9,6 +11,8 @@ config SIBYTE_SB1250
9 11
10config SIBYTE_BCM1120 12config SIBYTE_BCM1120
11 bool 13 bool
14 select CEVT_SB1250
15 select CSRC_SB1250
12 select IRQ_CPU 16 select IRQ_CPU
13 select SIBYTE_BCM112X 17 select SIBYTE_BCM112X
14 select SIBYTE_HAS_ZBUS_PROFILING 18 select SIBYTE_HAS_ZBUS_PROFILING
@@ -16,6 +20,8 @@ config SIBYTE_BCM1120
16 20
17config SIBYTE_BCM1125 21config SIBYTE_BCM1125
18 bool 22 bool
23 select CEVT_SB1250
24 select CSRC_SB1250
19 select HW_HAS_PCI 25 select HW_HAS_PCI
20 select IRQ_CPU 26 select IRQ_CPU
21 select SIBYTE_BCM112X 27 select SIBYTE_BCM112X
@@ -24,6 +30,8 @@ config SIBYTE_BCM1125
24 30
25config SIBYTE_BCM1125H 31config SIBYTE_BCM1125H
26 bool 32 bool
33 select CEVT_SB1250
34 select CSRC_SB1250
27 select HW_HAS_PCI 35 select HW_HAS_PCI
28 select IRQ_CPU 36 select IRQ_CPU
29 select SIBYTE_BCM112X 37 select SIBYTE_BCM112X
@@ -33,12 +41,16 @@ config SIBYTE_BCM1125H
33 41
34config SIBYTE_BCM112X 42config SIBYTE_BCM112X
35 bool 43 bool
44 select CEVT_SB1250
45 select CSRC_SB1250
36 select IRQ_CPU 46 select IRQ_CPU
37 select SIBYTE_SB1xxx_SOC 47 select SIBYTE_SB1xxx_SOC
38 select SIBYTE_HAS_ZBUS_PROFILING 48 select SIBYTE_HAS_ZBUS_PROFILING
39 49
40config SIBYTE_BCM1x80 50config SIBYTE_BCM1x80
41 bool 51 bool
52 select CEVT_BCM1480
53 select CSRC_BCM1480
42 select HW_HAS_PCI 54 select HW_HAS_PCI
43 select IRQ_CPU 55 select IRQ_CPU
44 select SIBYTE_HAS_ZBUS_PROFILING 56 select SIBYTE_HAS_ZBUS_PROFILING
@@ -47,6 +59,8 @@ config SIBYTE_BCM1x80
47 59
48config SIBYTE_BCM1x55 60config SIBYTE_BCM1x55
49 bool 61 bool
62 select CEVT_BCM1480
63 select CSRC_BCM1480
50 select HW_HAS_PCI 64 select HW_HAS_PCI
51 select IRQ_CPU 65 select IRQ_CPU
52 select SIBYTE_SB1xxx_SOC 66 select SIBYTE_SB1xxx_SOC
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c
index 61790c4bfb60..e28d626255a3 100644
--- a/arch/mips/sibyte/bcm1480/irq.c
+++ b/arch/mips/sibyte/bcm1480/irq.c
@@ -265,21 +265,6 @@ void __init init_bcm1480_irqs(void)
265 } 265 }
266} 266}
267 267
268
269static irqreturn_t bcm1480_dummy_handler(int irq, void *dev_id)
270{
271 return IRQ_NONE;
272}
273
274static struct irqaction bcm1480_dummy_action = {
275 .handler = bcm1480_dummy_handler,
276 .flags = 0,
277 .mask = CPU_MASK_NONE,
278 .name = "bcm1480-private",
279 .next = NULL,
280 .dev_id = 0
281};
282
283/* 268/*
284 * init_IRQ is called early in the boot sequence from init/main.c. It 269 * init_IRQ is called early in the boot sequence from init/main.c. It
285 * is responsible for setting up the interrupt mapper and installing the 270 * is responsible for setting up the interrupt mapper and installing the
@@ -308,7 +293,6 @@ static struct irqaction bcm1480_dummy_action = {
308 293
309void __init arch_init_irq(void) 294void __init arch_init_irq(void)
310{ 295{
311
312 unsigned int i, cpu; 296 unsigned int i, cpu;
313 u64 tmp; 297 u64 tmp;
314 unsigned int imask = STATUSF_IP4 | STATUSF_IP3 | STATUSF_IP2 | 298 unsigned int imask = STATUSF_IP4 | STATUSF_IP3 | STATUSF_IP2 |
diff --git a/arch/mips/sibyte/bcm1480/time.c b/arch/mips/sibyte/bcm1480/time.c
index bbf19bfabccb..1680a68952ae 100644
--- a/arch/mips/sibyte/bcm1480/time.c
+++ b/arch/mips/sibyte/bcm1480/time.c
@@ -15,163 +15,10 @@
15 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */ 17 */
18#include <linux/clockchips.h> 18#include <linux/init.h>
19#include <linux/interrupt.h>
20#include <linux/irq.h>
21#include <linux/percpu.h>
22#include <linux/spinlock.h>
23 19
24#include <asm/addrspace.h> 20extern void sb1480_clockevent_init(void);
25#include <asm/time.h> 21extern void sb1480_clocksource_init(void);
26#include <asm/io.h>
27
28#include <asm/sibyte/bcm1480_regs.h>
29#include <asm/sibyte/sb1250_regs.h>
30#include <asm/sibyte/bcm1480_int.h>
31#include <asm/sibyte/bcm1480_scd.h>
32
33#include <asm/sibyte/sb1250.h>
34
35
36#define IMR_IP2_VAL K_BCM1480_INT_MAP_I0
37#define IMR_IP3_VAL K_BCM1480_INT_MAP_I1
38#define IMR_IP4_VAL K_BCM1480_INT_MAP_I2
39
40/*
41 * The general purpose timer ticks at 1MHz independent if
42 * the rest of the system
43 */
44static void sibyte_set_mode(enum clock_event_mode mode,
45 struct clock_event_device *evt)
46{
47 unsigned int cpu = smp_processor_id();
48 void __iomem *timer_cfg, *timer_init;
49
50 timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
51 timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
52
53 switch (mode) {
54 case CLOCK_EVT_MODE_PERIODIC:
55 __raw_writeq(0, timer_cfg);
56 __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, timer_init);
57 __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
58 timer_cfg);
59 break;
60
61 case CLOCK_EVT_MODE_ONESHOT:
62 /* Stop the timer until we actually program a shot */
63 case CLOCK_EVT_MODE_SHUTDOWN:
64 __raw_writeq(0, timer_cfg);
65 break;
66
67 case CLOCK_EVT_MODE_UNUSED: /* shuddup gcc */
68 case CLOCK_EVT_MODE_RESUME:
69 ;
70 }
71}
72
73static int sibyte_next_event(unsigned long delta, struct clock_event_device *cd)
74{
75 unsigned int cpu = smp_processor_id();
76 void __iomem *timer_init;
77 unsigned int cnt;
78 int res;
79
80 timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
81 cnt = __raw_readq(timer_init);
82 cnt += delta;
83 __raw_writeq(cnt, timer_init);
84 res = ((long)(__raw_readq(timer_init) - cnt ) > 0) ? -ETIME : 0;
85
86 return res;
87}
88
89static irqreturn_t sibyte_counter_handler(int irq, void *dev_id)
90{
91 unsigned int cpu = smp_processor_id();
92 struct clock_event_device *cd = dev_id;
93 void __iomem *timer_cfg;
94
95 timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
96
97 /* Reset the timer */
98 __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
99 timer_cfg);
100 cd->event_handler(cd);
101
102 return IRQ_HANDLED;
103}
104
105static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent);
106static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction);
107static DEFINE_PER_CPU(char [18], sibyte_hpt_name);
108
109void __cpuinit sb1480_clockevent_init(void)
110{
111 unsigned int cpu = smp_processor_id();
112 unsigned int irq = K_BCM1480_INT_TIMER_0 + cpu;
113 struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu);
114 struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu);
115 unsigned char *name = per_cpu(sibyte_hpt_name, cpu);
116
117 BUG_ON(cpu > 3); /* Only have 4 general purpose timers */
118
119 sprintf(name, "bcm1480-counter %d", cpu);
120 cd->name = name;
121 cd->features = CLOCK_EVT_FEAT_PERIODIC |
122 CLOCK_EVT_FEAT_ONESHOT;
123 clockevent_set_clock(cd, V_SCD_TIMER_FREQ);
124 cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd);
125 cd->min_delta_ns = clockevent_delta2ns(1, cd);
126 cd->rating = 200;
127 cd->irq = irq;
128 cd->cpumask = cpumask_of_cpu(cpu);
129 cd->set_next_event = sibyte_next_event;
130 cd->set_mode = sibyte_set_mode;
131 clockevents_register_device(cd);
132
133 bcm1480_mask_irq(cpu, irq);
134
135 /*
136 * Map timer interrupt to IP[4] of this cpu
137 */
138 __raw_writeq(IMR_IP4_VAL,
139 IOADDR(A_BCM1480_IMR_REGISTER(cpu,
140 R_BCM1480_IMR_INTERRUPT_MAP_BASE_H) + (irq << 3)));
141
142 bcm1480_unmask_irq(cpu, irq);
143
144 action->handler = sibyte_counter_handler;
145 action->flags = IRQF_DISABLED | IRQF_PERCPU;
146 action->name = name;
147 action->dev_id = cd;
148 setup_irq(irq, action);
149}
150
151static cycle_t bcm1480_hpt_read(void)
152{
153 return (cycle_t) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT));
154}
155
156struct clocksource bcm1480_clocksource = {
157 .name = "zbbus-cycles",
158 .rating = 200,
159 .read = bcm1480_hpt_read,
160 .mask = CLOCKSOURCE_MASK(64),
161 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
162};
163
164void __init sb1480_clocksource_init(void)
165{
166 struct clocksource *cs = &bcm1480_clocksource;
167 unsigned int plldiv;
168 unsigned long zbbus;
169
170 plldiv = G_BCM1480_SYS_PLL_DIV(__raw_readq(IOADDR(A_SCD_SYSTEM_CFG)));
171 zbbus = ((plldiv >> 1) * 50000000) + ((plldiv & 1) * 25000000);
172 clocksource_set_clock(cs, zbbus);
173 clocksource_register(cs);
174}
175 22
176void __init plat_time_init(void) 23void __init plat_time_init(void)
177{ 24{
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c
index 52d18fc91f32..eac9065ffe0c 100644
--- a/arch/mips/sibyte/sb1250/irq.c
+++ b/arch/mips/sibyte/sb1250/irq.c
@@ -236,20 +236,6 @@ void __init init_sb1250_irqs(void)
236} 236}
237 237
238 238
239static irqreturn_t sb1250_dummy_handler(int irq, void *dev_id)
240{
241 return IRQ_NONE;
242}
243
244static struct irqaction sb1250_dummy_action = {
245 .handler = sb1250_dummy_handler,
246 .flags = 0,
247 .mask = CPU_MASK_NONE,
248 .name = "sb1250-private",
249 .next = NULL,
250 .dev_id = 0
251};
252
253/* 239/*
254 * arch_init_irq is called early in the boot sequence from init/main.c via 240 * arch_init_irq is called early in the boot sequence from init/main.c via
255 * init_IRQ. It is responsible for setting up the interrupt mapper and 241 * init_IRQ. It is responsible for setting up the interrupt mapper and
diff --git a/arch/mips/sibyte/sb1250/time.c b/arch/mips/sibyte/sb1250/time.c
index 95ad34e3fbac..68337bf7a5aa 100644
--- a/arch/mips/sibyte/sb1250/time.c
+++ b/arch/mips/sibyte/sb1250/time.c
@@ -15,195 +15,10 @@
15 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */ 17 */
18#include <linux/init.h>
18 19
19/* 20extern void sb1250_clocksource_init(void);
20 * These are routines to set up and handle interrupts from the 21extern void sb1250_clockevent_init(void);
21 * sb1250 general purpose timer 0. We're using the timer as a
22 * system clock, so we set it up to run at 100 Hz. On every
23 * interrupt, we update our idea of what the time of day is,
24 * then call do_timer() in the architecture-independent kernel
25 * code to do general bookkeeping (e.g. update jiffies, run
26 * bottom halves, etc.)
27 */
28#include <linux/clockchips.h>
29#include <linux/interrupt.h>
30#include <linux/sched.h>
31#include <linux/spinlock.h>
32#include <linux/kernel_stat.h>
33
34#include <asm/irq.h>
35#include <asm/addrspace.h>
36#include <asm/time.h>
37#include <asm/io.h>
38
39#include <asm/sibyte/sb1250.h>
40#include <asm/sibyte/sb1250_regs.h>
41#include <asm/sibyte/sb1250_int.h>
42#include <asm/sibyte/sb1250_scd.h>
43
44
45#define IMR_IP2_VAL K_INT_MAP_I0
46#define IMR_IP3_VAL K_INT_MAP_I1
47#define IMR_IP4_VAL K_INT_MAP_I2
48
49#define SB1250_HPT_NUM 3
50#define SB1250_HPT_VALUE M_SCD_TIMER_CNT /* max value */
51
52
53/*
54 * The general purpose timer ticks at 1 Mhz independent if
55 * the rest of the system
56 */
57static void sibyte_set_mode(enum clock_event_mode mode,
58 struct clock_event_device *evt)
59{
60 unsigned int cpu = smp_processor_id();
61 void __iomem *timer_cfg, *timer_init;
62
63 timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
64 timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
65
66 switch(mode) {
67 case CLOCK_EVT_MODE_PERIODIC:
68 __raw_writeq(0, timer_cfg);
69 __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, timer_init);
70 __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
71 timer_cfg);
72 break;
73
74 case CLOCK_EVT_MODE_ONESHOT:
75 /* Stop the timer until we actually program a shot */
76 case CLOCK_EVT_MODE_SHUTDOWN:
77 __raw_writeq(0, timer_cfg);
78 break;
79
80 case CLOCK_EVT_MODE_UNUSED: /* shuddup gcc */
81 case CLOCK_EVT_MODE_RESUME:
82 ;
83 }
84}
85
86static int
87sibyte_next_event(unsigned long delta, struct clock_event_device *evt)
88{
89 unsigned int cpu = smp_processor_id();
90 void __iomem *timer_cfg, *timer_init;
91
92 timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
93 timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
94
95 __raw_writeq(0, timer_cfg);
96 __raw_writeq(delta, timer_init);
97 __raw_writeq(M_SCD_TIMER_ENABLE, timer_cfg);
98
99 return 0;
100}
101
102static irqreturn_t sibyte_counter_handler(int irq, void *dev_id)
103{
104 unsigned int cpu = smp_processor_id();
105 struct clock_event_device *cd = dev_id;
106
107 /* ACK interrupt */
108 ____raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
109 IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)));
110
111 cd->event_handler(cd);
112
113 return IRQ_HANDLED;
114}
115
116static struct irqaction sibyte_irqaction = {
117 .handler = sibyte_counter_handler,
118 .flags = IRQF_DISABLED | IRQF_PERCPU,
119 .name = "timer",
120};
121
122static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent);
123static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction);
124static DEFINE_PER_CPU(char [18], sibyte_hpt_name);
125
126void __cpuinit sb1250_clockevent_init(void)
127{
128 unsigned int cpu = smp_processor_id();
129 unsigned int irq = K_INT_TIMER_0 + cpu;
130 struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu);
131 struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu);
132 unsigned char *name = per_cpu(sibyte_hpt_name, cpu);
133
134 /* Only have 4 general purpose timers, and we use last one as hpt */
135 BUG_ON(cpu > 2);
136
137 sprintf(name, "bcm1480-counter %d", cpu);
138 cd->name = name;
139 cd->features = CLOCK_EVT_FEAT_PERIODIC |
140 CLOCK_EVT_FEAT_ONESHOT;
141 clockevent_set_clock(cd, V_SCD_TIMER_FREQ);
142 cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd);
143 cd->min_delta_ns = clockevent_delta2ns(1, cd);
144 cd->rating = 200;
145 cd->irq = irq;
146 cd->cpumask = cpumask_of_cpu(cpu);
147 cd->set_next_event = sibyte_next_event;
148 cd->set_mode = sibyte_set_mode;
149 clockevents_register_device(cd);
150
151 sb1250_mask_irq(cpu, irq);
152
153 /* Map the timer interrupt to ip[4] of this cpu */
154 __raw_writeq(IMR_IP4_VAL,
155 IOADDR(A_IMR_REGISTER(cpu, R_IMR_INTERRUPT_MAP_BASE) +
156 (irq << 3)));
157 cd->cpumask = cpumask_of_cpu(0);
158
159 sb1250_unmask_irq(cpu, irq);
160
161 action->handler = sibyte_counter_handler;
162 action->flags = IRQF_DISABLED | IRQF_PERCPU;
163 action->name = name;
164 action->dev_id = cd;
165 setup_irq(irq, &sibyte_irqaction);
166}
167
168/*
169 * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over
170 * again.
171 */
172static cycle_t sb1250_hpt_read(void)
173{
174 unsigned int count;
175
176 count = G_SCD_TIMER_CNT(__raw_readq(IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, R_SCD_TIMER_CNT))));
177
178 return SB1250_HPT_VALUE - count;
179}
180
181struct clocksource bcm1250_clocksource = {
182 .name = "MIPS",
183 .rating = 200,
184 .read = sb1250_hpt_read,
185 .mask = CLOCKSOURCE_MASK(23),
186 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
187};
188
189void __init sb1250_clocksource_init(void)
190{
191 struct clocksource *cs = &bcm1250_clocksource;
192
193 /* Setup hpt using timer #3 but do not enable irq for it */
194 __raw_writeq(0,
195 IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
196 R_SCD_TIMER_CFG)));
197 __raw_writeq(SB1250_HPT_VALUE,
198 IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
199 R_SCD_TIMER_INIT)));
200 __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
201 IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
202 R_SCD_TIMER_CFG)));
203
204 clocksource_set_clock(cs, V_SCD_TIMER_FREQ);
205 clocksource_register(cs);
206}
207 22
208void __init plat_time_init(void) 23void __init plat_time_init(void)
209{ 24{
diff --git a/arch/mips/sni/time.c b/arch/mips/sni/time.c
index 60bc62ef0935..6f339af08d22 100644
--- a/arch/mips/sni/time.c
+++ b/arch/mips/sni/time.c
@@ -1,6 +1,7 @@
1#include <linux/types.h> 1#include <linux/types.h>
2#include <linux/interrupt.h> 2#include <linux/interrupt.h>
3#include <linux/time.h> 3#include <linux/time.h>
4#include <linux/clockchips.h>
4 5
5#include <asm/i8253.h> 6#include <asm/i8253.h>
6#include <asm/sni.h> 7#include <asm/sni.h>
@@ -80,7 +81,7 @@ static void __init sni_a20r_timer_setup(void)
80 unsigned int cpu = smp_processor_id(); 81 unsigned int cpu = smp_processor_id();
81 82
82 cd->cpumask = cpumask_of_cpu(cpu); 83 cd->cpumask = cpumask_of_cpu(cpu);
83 84 clockevents_register_device(cd);
84 action->dev_id = cd; 85 action->dev_id = cd;
85 setup_irq(SNI_A20R_IRQ_TIMER, &a20r_irqaction); 86 setup_irq(SNI_A20R_IRQ_TIMER, &a20r_irqaction);
86} 87}
@@ -169,8 +170,6 @@ void __init plat_time_init(void)
169 170
170 mips_hpt_frequency = r4k_tick * HZ; 171 mips_hpt_frequency = r4k_tick * HZ;
171 172
172 setup_pit_timer();
173
174 switch (sni_brd_type) { 173 switch (sni_brd_type) {
175 case SNI_BRD_10: 174 case SNI_BRD_10:
176 case SNI_BRD_10NEW: 175 case SNI_BRD_10NEW:
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index b9d88374f14f..41e13f4cc6e3 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -350,7 +350,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
350 local_irq_save(flags); 350 local_irq_save(flags);
351 351
352 account_system_vtime(current); 352 account_system_vtime(current);
353 account_process_vtime(current); 353 account_process_tick(current, 0);
354 calculate_steal_time(); 354 calculate_steal_time();
355 355
356 last = _switch(old_thread, new_thread); 356 last = _switch(old_thread, new_thread);
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 99ebcd3884d2..4beb6329dfb7 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -259,7 +259,7 @@ void account_system_vtime(struct task_struct *tsk)
259 * user and system time records. 259 * user and system time records.
260 * Must be called with interrupts disabled. 260 * Must be called with interrupts disabled.
261 */ 261 */
262void account_process_vtime(struct task_struct *tsk) 262void account_process_tick(struct task_struct *tsk, int user_tick)
263{ 263{
264 cputime_t utime, utimescaled; 264 cputime_t utime, utimescaled;
265 265
@@ -274,18 +274,6 @@ void account_process_vtime(struct task_struct *tsk)
274 account_user_time_scaled(tsk, utimescaled); 274 account_user_time_scaled(tsk, utimescaled);
275} 275}
276 276
277static void account_process_time(struct pt_regs *regs)
278{
279 int cpu = smp_processor_id();
280
281 account_process_vtime(current);
282 run_local_timers();
283 if (rcu_pending(cpu))
284 rcu_check_callbacks(cpu, user_mode(regs));
285 scheduler_tick();
286 run_posix_cpu_timers(current);
287}
288
289/* 277/*
290 * Stuff for accounting stolen time. 278 * Stuff for accounting stolen time.
291 */ 279 */
@@ -375,7 +363,6 @@ static void snapshot_purr(void)
375 363
376#else /* ! CONFIG_VIRT_CPU_ACCOUNTING */ 364#else /* ! CONFIG_VIRT_CPU_ACCOUNTING */
377#define calc_cputime_factors() 365#define calc_cputime_factors()
378#define account_process_time(regs) update_process_times(user_mode(regs))
379#define calculate_steal_time() do { } while (0) 366#define calculate_steal_time() do { } while (0)
380#endif 367#endif
381 368
@@ -599,16 +586,6 @@ void timer_interrupt(struct pt_regs * regs)
599 get_lppaca()->int_dword.fields.decr_int = 0; 586 get_lppaca()->int_dword.fields.decr_int = 0;
600#endif 587#endif
601 588
602 /*
603 * We cannot disable the decrementer, so in the period
604 * between this cpu's being marked offline in cpu_online_map
605 * and calling stop-self, it is taking timer interrupts.
606 * Avoid calling into the scheduler rebalancing code if this
607 * is the case.
608 */
609 if (!cpu_is_offline(cpu))
610 account_process_time(regs);
611
612 if (evt->event_handler) 589 if (evt->event_handler)
613 evt->event_handler(evt); 590 evt->event_handler(evt);
614 591
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index e6289ee74ecd..8bf4ae1150be 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -200,11 +200,13 @@ static noinline __init void find_memory_chunks(unsigned long memsize)
200 cc = __tprot(addr); 200 cc = __tprot(addr);
201 while (cc == old_cc) { 201 while (cc == old_cc) {
202 addr += CHUNK_INCR; 202 addr += CHUNK_INCR;
203 cc = __tprot(addr); 203 if (addr >= memsize)
204 break;
204#ifndef CONFIG_64BIT 205#ifndef CONFIG_64BIT
205 if (addr == ADDR2G) 206 if (addr == ADDR2G)
206 break; 207 break;
207#endif 208#endif
209 cc = __tprot(addr);
208 } 210 }
209 211
210 if (old_addr != addr && 212 if (old_addr != addr &&
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 96492cf2d491..29f7884b4ffa 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -92,6 +92,7 @@ EXPORT_SYMBOL(unregister_idle_notifier);
92 92
93void do_monitor_call(struct pt_regs *regs, long interruption_code) 93void do_monitor_call(struct pt_regs *regs, long interruption_code)
94{ 94{
95#ifdef CONFIG_SMP
95 struct s390_idle_data *idle; 96 struct s390_idle_data *idle;
96 97
97 idle = &__get_cpu_var(s390_idle); 98 idle = &__get_cpu_var(s390_idle);
@@ -99,7 +100,7 @@ void do_monitor_call(struct pt_regs *regs, long interruption_code)
99 idle->idle_time += get_clock() - idle->idle_enter; 100 idle->idle_time += get_clock() - idle->idle_enter;
100 idle->in_idle = 0; 101 idle->in_idle = 0;
101 spin_unlock(&idle->lock); 102 spin_unlock(&idle->lock);
102 103#endif
103 /* disable monitor call class 0 */ 104 /* disable monitor call class 0 */
104 __ctl_clear_bit(8, 15); 105 __ctl_clear_bit(8, 15);
105 106
@@ -114,7 +115,9 @@ extern void s390_handle_mcck(void);
114static void default_idle(void) 115static void default_idle(void)
115{ 116{
116 int cpu, rc; 117 int cpu, rc;
118#ifdef CONFIG_SMP
117 struct s390_idle_data *idle; 119 struct s390_idle_data *idle;
120#endif
118 121
119 /* CPU is going idle. */ 122 /* CPU is going idle. */
120 cpu = smp_processor_id(); 123 cpu = smp_processor_id();
@@ -151,13 +154,14 @@ static void default_idle(void)
151 s390_handle_mcck(); 154 s390_handle_mcck();
152 return; 155 return;
153 } 156 }
154 157#ifdef CONFIG_SMP
155 idle = &__get_cpu_var(s390_idle); 158 idle = &__get_cpu_var(s390_idle);
156 spin_lock(&idle->lock); 159 spin_lock(&idle->lock);
157 idle->idle_count++; 160 idle->idle_count++;
158 idle->in_idle = 1; 161 idle->in_idle = 1;
159 idle->idle_enter = get_clock(); 162 idle->idle_enter = get_clock();
160 spin_unlock(&idle->lock); 163 spin_unlock(&idle->lock);
164#endif
161 trace_hardirqs_on(); 165 trace_hardirqs_on();
162 /* Wait for external, I/O or machine check interrupt. */ 166 /* Wait for external, I/O or machine check interrupt. */
163 __load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT | 167 __load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 1d97fe1c0e53..b05ae8584258 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -788,14 +788,14 @@ static ssize_t show_idle_time(struct sys_device *dev, char *buf)
788 } 788 }
789 new_time = idle->idle_time; 789 new_time = idle->idle_time;
790 spin_unlock_irq(&idle->lock); 790 spin_unlock_irq(&idle->lock);
791 return sprintf(buf, "%llu us\n", new_time >> 12); 791 return sprintf(buf, "%llu\n", new_time >> 12);
792} 792}
793static SYSDEV_ATTR(idle_time, 0444, show_idle_time, NULL); 793static SYSDEV_ATTR(idle_time_us, 0444, show_idle_time, NULL);
794 794
795static struct attribute *cpu_attrs[] = { 795static struct attribute *cpu_attrs[] = {
796 &attr_capability.attr, 796 &attr_capability.attr,
797 &attr_idle_count.attr, 797 &attr_idle_count.attr,
798 &attr_idle_time.attr, 798 &attr_idle_time_us.attr,
799 NULL, 799 NULL,
800}; 800};
801 801
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 48dae49bc1ec..22b800ce2126 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -145,12 +145,8 @@ void account_ticks(u64 time)
145 do_timer(ticks); 145 do_timer(ticks);
146#endif 146#endif
147 147
148#ifdef CONFIG_VIRT_CPU_ACCOUNTING
149 account_tick_vtime(current);
150#else
151 while (ticks--) 148 while (ticks--)
152 update_process_times(user_mode(get_irq_regs())); 149 update_process_times(user_mode(get_irq_regs()));
153#endif
154 150
155 s390_do_profile(); 151 s390_do_profile();
156} 152}
@@ -307,7 +303,7 @@ static cycle_t read_tod_clock(void)
307 303
308static struct clocksource clocksource_tod = { 304static struct clocksource clocksource_tod = {
309 .name = "tod", 305 .name = "tod",
310 .rating = 100, 306 .rating = 400,
311 .read = read_tod_clock, 307 .read = read_tod_clock,
312 .mask = -1ULL, 308 .mask = -1ULL,
313 .mult = 1000, 309 .mult = 1000,
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index 84ff78de6bac..c5f05b3fb2c3 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -32,7 +32,7 @@ static DEFINE_PER_CPU(struct vtimer_queue, virt_cpu_timer);
32 * Update process times based on virtual cpu times stored by entry.S 32 * Update process times based on virtual cpu times stored by entry.S
33 * to the lowcore fields user_timer, system_timer & steal_clock. 33 * to the lowcore fields user_timer, system_timer & steal_clock.
34 */ 34 */
35void account_tick_vtime(struct task_struct *tsk) 35void account_process_tick(struct task_struct *tsk, int user_tick)
36{ 36{
37 cputime_t cputime; 37 cputime_t cputime;
38 __u64 timer, clock; 38 __u64 timer, clock;
@@ -64,12 +64,6 @@ void account_tick_vtime(struct task_struct *tsk)
64 S390_lowcore.steal_clock -= cputime << 12; 64 S390_lowcore.steal_clock -= cputime << 12;
65 account_steal_time(tsk, cputime); 65 account_steal_time(tsk, cputime);
66 } 66 }
67
68 run_local_timers();
69 if (rcu_pending(smp_processor_id()))
70 rcu_check_callbacks(smp_processor_id(), rcu_user_flag);
71 scheduler_tick();
72 run_posix_cpu_timers(tsk);
73} 67}
74 68
75/* 69/*
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 247f8a65e733..496d635f89b2 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -182,9 +182,7 @@ config CPU_HAS_IPR_IRQ
182 bool 182 bool
183 183
184config CPU_HAS_SR_RB 184config CPU_HAS_SR_RB
185 bool "CPU has SR.RB" 185 bool
186 depends on CPU_SH3 || CPU_SH4
187 default y
188 help 186 help
189 This will enable the use of SR.RB register bank usage. Processors 187 This will enable the use of SR.RB register bank usage. Processors
190 that are lacking this bit must have another method in place for 188 that are lacking this bit must have another method in place for
@@ -213,10 +211,12 @@ config SH_SOLUTION_ENGINE
213 bool "SolutionEngine" 211 bool "SolutionEngine"
214 select SOLUTION_ENGINE 212 select SOLUTION_ENGINE
215 select CPU_HAS_IPR_IRQ 213 select CPU_HAS_IPR_IRQ
216 depends on CPU_SUBTYPE_SH7709 || CPU_SUBTYPE_SH7750 214 depends on CPU_SUBTYPE_SH7705 || CPU_SUBTYPE_SH7709 || CPU_SUBTYPE_SH7710 || \
215 CPU_SUBTYPE_SH7712 || CPU_SUBTYPE_SH7750 || CPU_SUBTYPE_SH7750S || \
216 CPU_SUBTYPE_SH7750R
217 help 217 help
218 Select SolutionEngine if configuring for a Hitachi SH7709 218 Select SolutionEngine if configuring for a Hitachi SH7705, SH7709,
219 or SH7750 evaluation board. 219 SH7710, SH7712, SH7750, SH7750S or SH7750R evaluation board.
220 220
221config SH_7206_SOLUTION_ENGINE 221config SH_7206_SOLUTION_ENGINE
222 bool "SolutionEngine7206" 222 bool "SolutionEngine7206"
@@ -291,9 +291,7 @@ config SH_DREAMCAST
291 depends on CPU_SUBTYPE_SH7091 291 depends on CPU_SUBTYPE_SH7091
292 help 292 help
293 Select Dreamcast if configuring for a SEGA Dreamcast. 293 Select Dreamcast if configuring for a SEGA Dreamcast.
294 More information at 294 More information at <http://www.linux-sh.org>
295 <http://www.m17n.org/linux-sh/dreamcast/>. There is a
296 Dreamcast project is at <http://linuxdc.sourceforge.net/>.
297 295
298config SH_MPC1211 296config SH_MPC1211
299 bool "Interface MPC1211" 297 bool "Interface MPC1211"
@@ -607,7 +605,7 @@ config BOOT_LINK_OFFSET
607 605
608config UBC_WAKEUP 606config UBC_WAKEUP
609 bool "Wakeup UBC on startup" 607 bool "Wakeup UBC on startup"
610 depends on CPU_SH4 608 depends on CPU_SH4 && !CPU_SH4A
611 help 609 help
612 Selecting this option will wakeup the User Break Controller (UBC) on 610 Selecting this option will wakeup the User Break Controller (UBC) on
613 startup. Although the UBC is left in an awake state when the processor 611 startup. Although the UBC is left in an awake state when the processor
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index b507b501f0cf..722da6851f56 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -86,6 +86,14 @@ config 4KSTACKS
86 on the VM subsystem for higher order allocations. This option 86 on the VM subsystem for higher order allocations. This option
87 will also use IRQ stacks to compensate for the reduced stackspace. 87 will also use IRQ stacks to compensate for the reduced stackspace.
88 88
89config IRQSTACKS
90 bool "Use separate kernel stacks when processing interrupts"
91 depends on DEBUG_KERNEL
92 help
93 If you say Y here the kernel will use separate kernel stacks
94 for handling hard and soft interrupts. This can help avoid
95 overflowing the process kernel stacks.
96
89config SH_KGDB 97config SH_KGDB
90 bool "Include KGDB kernel debugger" 98 bool "Include KGDB kernel debugger"
91 select FRAME_POINTER 99 select FRAME_POINTER
@@ -116,12 +124,13 @@ config KGDB_NMI
116 124
117config SH_KGDB_CONSOLE 125config SH_KGDB_CONSOLE
118 bool "Console messages through GDB" 126 bool "Console messages through GDB"
119 depends on !SERIAL_SH_SCI_CONSOLE 127 depends on !SERIAL_SH_SCI_CONSOLE && SERIAL_SH_SCI=y
120 select SERIAL_CORE_CONSOLE 128 select SERIAL_CORE_CONSOLE
121 default n 129 default n
122 130
123config KGDB_SYSRQ 131config KGDB_SYSRQ
124 bool "Allow SysRq 'G' to enter KGDB" 132 bool "Allow SysRq 'G' to enter KGDB"
133 depends on MAGIC_SYSRQ
125 default y 134 default y
126 135
127comment "Serial port setup" 136comment "Serial port setup"
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 408342b175c8..e189fae8b60c 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -66,7 +66,7 @@ cflags-y += $(isaflags-y) -ffreestanding
66cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \ 66cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \
67 $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g') 67 $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
68 68
69OBJCOPYFLAGS := -O binary -R .note -R .comment -R .stab -R .stabstr -S 69OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -R .stab -R .stabstr -S
70 70
71# 71#
72# arch/sh/defconfig doesn't reflect any real hardware, and as such should 72# arch/sh/defconfig doesn't reflect any real hardware, and as such should
diff --git a/arch/sh/boards/renesas/hs7751rvoip/irq.c b/arch/sh/boards/renesas/hs7751rvoip/irq.c
index 943f93aa6052..e55c6686b21f 100644
--- a/arch/sh/boards/renesas/hs7751rvoip/irq.c
+++ b/arch/sh/boards/renesas/hs7751rvoip/irq.c
@@ -12,6 +12,7 @@
12 12
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/irq.h> 14#include <linux/irq.h>
15#include <linux/interrupt.h>
15#include <asm/io.h> 16#include <asm/io.h>
16#include <asm/irq.h> 17#include <asm/irq.h>
17#include <asm/hs7751rvoip.h> 18#include <asm/hs7751rvoip.h>
diff --git a/arch/sh/boards/renesas/hs7751rvoip/setup.c b/arch/sh/boards/renesas/hs7751rvoip/setup.c
index fa5fa3920222..c05625975f2c 100644
--- a/arch/sh/boards/renesas/hs7751rvoip/setup.c
+++ b/arch/sh/boards/renesas/hs7751rvoip/setup.c
@@ -15,20 +15,6 @@
15#include <asm/io.h> 15#include <asm/io.h>
16#include <asm/machvec.h> 16#include <asm/machvec.h>
17 17
18static struct ipr_data hs77501rvoip_ipr_map[] = {
19#if defined(CONFIG_HS7751RVOIP_CODEC)
20 { DMTE0_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY },
21 { DMTE1_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY },
22#endif
23};
24
25static void __init hs7751rvoip_init_irq(void)
26{
27 make_ipr_irq(hs77501rvoip_ipr_map, ARRAY_SIZE(hs77501rvoip_ipr_map));
28
29 init_hs7751rvoip_IRQ();
30}
31
32static void hs7751rvoip_power_off(void) 18static void hs7751rvoip_power_off(void)
33{ 19{
34 ctrl_outw(ctrl_inw(PA_OUTPORTR) & 0xffdf, PA_OUTPORTR); 20 ctrl_outw(ctrl_inw(PA_OUTPORTR) & 0xffdf, PA_OUTPORTR);
@@ -75,14 +61,13 @@ static int __init hs7751rvoip_cf_init(void)
75 61
76 return 0; 62 return 0;
77} 63}
64device_initcall(hs7751rvoip_cf_init);
78 65
79/* 66/*
80 * Initialize the board 67 * Initialize the board
81 */ 68 */
82static void __init hs7751rvoip_setup(char **cmdline_p) 69static void __init hs7751rvoip_setup(char **cmdline_p)
83{ 70{
84 device_initcall(hs7751rvoip_cf_init);
85
86 ctrl_outb(0xf0, PA_OUTPORTR); 71 ctrl_outb(0xf0, PA_OUTPORTR);
87 pm_power_off = hs7751rvoip_power_off; 72 pm_power_off = hs7751rvoip_power_off;
88 73
@@ -115,6 +100,6 @@ static struct sh_machine_vector mv_hs7751rvoip __initmv = {
115 .mv_outsw = hs7751rvoip_outsw, 100 .mv_outsw = hs7751rvoip_outsw,
116 .mv_outsl = hs7751rvoip_outsl, 101 .mv_outsl = hs7751rvoip_outsl,
117 102
118 .mv_init_irq = hs7751rvoip_init_irq, 103 .mv_init_irq = init_hs7751rvoip_IRQ,
119 .mv_ioport_map = hs7751rvoip_ioport_map, 104 .mv_ioport_map = hs7751rvoip_ioport_map,
120}; 105};
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c
index afe9de73666a..0fdc0bc19145 100644
--- a/arch/sh/boards/renesas/r7780rp/setup.c
+++ b/arch/sh/boards/renesas/r7780rp/setup.c
@@ -16,6 +16,8 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/pata_platform.h> 18#include <linux/pata_platform.h>
19#include <linux/types.h>
20#include <net/ax88796.h>
19#include <asm/machvec.h> 21#include <asm/machvec.h>
20#include <asm/r7780rp.h> 22#include <asm/r7780rp.h>
21#include <asm/clock.h> 23#include <asm/clock.h>
@@ -136,11 +138,50 @@ static struct platform_device heartbeat_device = {
136 .resource = heartbeat_resources, 138 .resource = heartbeat_resources,
137}; 139};
138 140
141static struct ax_plat_data ax88796_platdata = {
142 .flags = AXFLG_HAS_93CX6,
143 .wordlength = 2,
144 .dcr_val = 0x1,
145 .rcr_val = 0x40,
146};
147
148static struct resource ax88796_resources[] = {
149 {
150#ifdef CONFIG_SH_R7780RP
151 .start = 0xa5800400,
152 .end = 0xa5800400 + (0x20 * 0x2) - 1,
153#else
154 .start = 0xa4100400,
155 .end = 0xa4100400 + (0x20 * 0x2) - 1,
156#endif
157 .flags = IORESOURCE_MEM,
158 },
159 {
160 .start = IRQ_AX88796,
161 .end = IRQ_AX88796,
162 .flags = IORESOURCE_IRQ,
163 },
164};
165
166static struct platform_device ax88796_device = {
167 .name = "ax88796",
168 .id = 0,
169
170 .dev = {
171 .platform_data = &ax88796_platdata,
172 },
173
174 .num_resources = ARRAY_SIZE(ax88796_resources),
175 .resource = ax88796_resources,
176};
177
178
139static struct platform_device *r7780rp_devices[] __initdata = { 179static struct platform_device *r7780rp_devices[] __initdata = {
140 &r8a66597_usb_host_device, 180 &r8a66597_usb_host_device,
141 &m66592_usb_peripheral_device, 181 &m66592_usb_peripheral_device,
142 &cf_ide_device, 182 &cf_ide_device,
143 &heartbeat_device, 183 &heartbeat_device,
184 &ax88796_device,
144}; 185};
145 186
146static int __init r7780rp_devices_setup(void) 187static int __init r7780rp_devices_setup(void)
@@ -183,6 +224,34 @@ static void r7780rp_power_off(void)
183 ctrl_outw(0x0001, PA_POFF); 224 ctrl_outw(0x0001, PA_POFF);
184} 225}
185 226
227static inline unsigned char is_ide_ioaddr(unsigned long addr)
228{
229 return ((cf_ide_resources[0].start <= addr &&
230 addr <= cf_ide_resources[0].end) ||
231 (cf_ide_resources[1].start <= addr &&
232 addr <= cf_ide_resources[1].end));
233}
234
235void highlander_writeb(u8 b, void __iomem *addr)
236{
237 unsigned long tmp = (unsigned long __force)addr;
238
239 if (is_ide_ioaddr(tmp))
240 ctrl_outw((u16)b, tmp);
241 else
242 ctrl_outb(b, tmp);
243}
244
245u8 highlander_readb(void __iomem *addr)
246{
247 unsigned long tmp = (unsigned long __force)addr;
248
249 if (is_ide_ioaddr(tmp))
250 return ctrl_inw(tmp) & 0xff;
251 else
252 return ctrl_inb(tmp);
253}
254
186/* 255/*
187 * Initialize the board 256 * Initialize the board
188 */ 257 */
@@ -267,4 +336,6 @@ static struct sh_machine_vector mv_highlander __initmv = {
267 .mv_setup = highlander_setup, 336 .mv_setup = highlander_setup,
268 .mv_init_irq = highlander_init_irq, 337 .mv_init_irq = highlander_init_irq,
269 .mv_irq_demux = highlander_irq_demux, 338 .mv_irq_demux = highlander_irq_demux,
339 .mv_readb = highlander_readb,
340 .mv_writeb = highlander_writeb,
270}; 341};
diff --git a/arch/sh/boards/renesas/sh7710voipgw/setup.c b/arch/sh/boards/renesas/sh7710voipgw/setup.c
index 2dce8bd97f90..0d56fd83bcba 100644
--- a/arch/sh/boards/renesas/sh7710voipgw/setup.c
+++ b/arch/sh/boards/renesas/sh7710voipgw/setup.c
@@ -11,7 +11,6 @@
11#include <asm/machvec.h> 11#include <asm/machvec.h>
12#include <asm/irq.h> 12#include <asm/irq.h>
13#include <asm/io.h> 13#include <asm/io.h>
14#include <asm/irq.h>
15 14
16static struct ipr_data sh7710voipgw_ipr_map[] = { 15static struct ipr_data sh7710voipgw_ipr_map[] = {
17 { TIMER2_IRQ, TIMER2_IPR_ADDR, TIMER2_IPR_POS, TIMER2_PRIORITY }, 16 { TIMER2_IRQ, TIMER2_IPR_ADDR, TIMER2_IPR_POS, TIMER2_PRIORITY },
diff --git a/arch/sh/boards/se/7206/irq.c b/arch/sh/boards/se/7206/irq.c
index 27da88486f73..9d5bfc77d0de 100644
--- a/arch/sh/boards/se/7206/irq.c
+++ b/arch/sh/boards/se/7206/irq.c
@@ -9,7 +9,6 @@
9#include <linux/init.h> 9#include <linux/init.h>
10#include <linux/irq.h> 10#include <linux/irq.h>
11#include <linux/io.h> 11#include <linux/io.h>
12#include <linux/irq.h>
13#include <linux/interrupt.h> 12#include <linux/interrupt.h>
14#include <asm/se7206.h> 13#include <asm/se7206.h>
15 14
diff --git a/arch/sh/boards/se/770x/setup.c b/arch/sh/boards/se/770x/setup.c
index d07a3368f546..318bc8a3969c 100644
--- a/arch/sh/boards/se/770x/setup.c
+++ b/arch/sh/boards/se/770x/setup.c
@@ -94,6 +94,7 @@ static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 };
94static struct heartbeat_data heartbeat_data = { 94static struct heartbeat_data heartbeat_data = {
95 .bit_pos = heartbeat_bit_pos, 95 .bit_pos = heartbeat_bit_pos,
96 .nr_bits = ARRAY_SIZE(heartbeat_bit_pos), 96 .nr_bits = ARRAY_SIZE(heartbeat_bit_pos),
97 .regsize = 16,
97}; 98};
98 99
99static struct resource heartbeat_resources[] = { 100static struct resource heartbeat_resources[] = {
diff --git a/arch/sh/boards/se/7722/setup.c b/arch/sh/boards/se/7722/setup.c
index 03b63457e178..eb97dca5b736 100644
--- a/arch/sh/boards/se/7722/setup.c
+++ b/arch/sh/boards/se/7722/setup.c
@@ -16,8 +16,13 @@
16#include <asm/machvec.h> 16#include <asm/machvec.h>
17#include <asm/se7722.h> 17#include <asm/se7722.h>
18#include <asm/io.h> 18#include <asm/io.h>
19#include <asm/heartbeat.h>
19 20
20/* Heartbeat */ 21/* Heartbeat */
22static struct heartbeat_data heartbeat_data = {
23 .regsize = 16,
24};
25
21static struct resource heartbeat_resources[] = { 26static struct resource heartbeat_resources[] = {
22 [0] = { 27 [0] = {
23 .start = PA_LED, 28 .start = PA_LED,
@@ -29,6 +34,9 @@ static struct resource heartbeat_resources[] = {
29static struct platform_device heartbeat_device = { 34static struct platform_device heartbeat_device = {
30 .name = "heartbeat", 35 .name = "heartbeat",
31 .id = -1, 36 .id = -1,
37 .dev = {
38 .platform_data = &heartbeat_data,
39 },
32 .num_resources = ARRAY_SIZE(heartbeat_resources), 40 .num_resources = ARRAY_SIZE(heartbeat_resources),
33 .resource = heartbeat_resources, 41 .resource = heartbeat_resources,
34}; 42};
@@ -103,8 +111,8 @@ static void __init se7722_setup(char **cmdline_p)
103 111
104 ctrl_outl(0x00051001, MSTPCR0); 112 ctrl_outl(0x00051001, MSTPCR0);
105 ctrl_outl(0x00000000, MSTPCR1); 113 ctrl_outl(0x00000000, MSTPCR1);
106 /* KEYSC, VOU, BEU, CEU, VEU, VPU, LCDC */ 114 /* KEYSC, VOU, BEU, CEU, VEU, VPU, LCDC, USB */
107 ctrl_outl(0xffffbfC0, MSTPCR2); 115 ctrl_outl(0xffffb7c0, MSTPCR2);
108 116
109 ctrl_outw(0x0000, PORT_PECR); /* PORT E 1 = IRQ5 ,E 0 = BS */ 117 ctrl_outw(0x0000, PORT_PECR); /* PORT E 1 = IRQ5 ,E 0 = BS */
110 ctrl_outw(0x1000, PORT_PJCR); /* PORT J 1 = IRQ1,J 0 =IRQ0 */ 118 ctrl_outw(0x1000, PORT_PJCR); /* PORT J 1 = IRQ1,J 0 =IRQ0 */
diff --git a/arch/sh/boards/se/7780/setup.c b/arch/sh/boards/se/7780/setup.c
index 76e53b26a808..0f08ab3b2bec 100644
--- a/arch/sh/boards/se/7780/setup.c
+++ b/arch/sh/boards/se/7780/setup.c
@@ -14,8 +14,13 @@
14#include <asm/machvec.h> 14#include <asm/machvec.h>
15#include <asm/se7780.h> 15#include <asm/se7780.h>
16#include <asm/io.h> 16#include <asm/io.h>
17#include <asm/heartbeat.h>
17 18
18/* Heartbeat */ 19/* Heartbeat */
20static struct heartbeat_data heartbeat_data = {
21 .regsize = 16,
22};
23
19static struct resource heartbeat_resources[] = { 24static struct resource heartbeat_resources[] = {
20 [0] = { 25 [0] = {
21 .start = PA_LED, 26 .start = PA_LED,
@@ -27,6 +32,9 @@ static struct resource heartbeat_resources[] = {
27static struct platform_device heartbeat_device = { 32static struct platform_device heartbeat_device = {
28 .name = "heartbeat", 33 .name = "heartbeat",
29 .id = -1, 34 .id = -1,
35 .dev = {
36 .platform_data = &heartbeat_data,
37 },
30 .num_resources = ARRAY_SIZE(heartbeat_resources), 38 .num_resources = ARRAY_SIZE(heartbeat_resources),
31 .resource = heartbeat_resources, 39 .resource = heartbeat_resources,
32}; 40};
diff --git a/arch/sh/boards/snapgear/Makefile b/arch/sh/boards/snapgear/Makefile
index 59fc976bfc2f..d2d2f4b6a502 100644
--- a/arch/sh/boards/snapgear/Makefile
+++ b/arch/sh/boards/snapgear/Makefile
@@ -2,5 +2,4 @@
2# Makefile for the SnapGear specific parts of the kernel 2# Makefile for the SnapGear specific parts of the kernel
3# 3#
4 4
5obj-y := setup.o io.o rtc.o 5obj-y := setup.o io.o
6
diff --git a/arch/sh/boards/snapgear/rtc.c b/arch/sh/boards/snapgear/rtc.c
deleted file mode 100644
index edb3dd936cbb..000000000000
--- a/arch/sh/boards/snapgear/rtc.c
+++ /dev/null
@@ -1,309 +0,0 @@
1/****************************************************************************/
2/*
3 * linux/arch/sh/boards/snapgear/rtc.c -- Secureedge5410 RTC code
4 *
5 * Copyright (C) 2002 David McCullough <davidm@snapgear.com>
6 * Copyright (C) 2003 Paul Mundt <lethal@linux-sh.org>
7 *
8 * The SecureEdge5410 can have one of 2 real time clocks, the SH
9 * built in version or the preferred external DS1302. Here we work out
10 * each to see what we have and then run with it.
11 */
12/****************************************************************************/
13
14#include <linux/init.h>
15#include <linux/kernel.h>
16#include <linux/sched.h>
17#include <linux/time.h>
18#include <linux/rtc.h>
19#include <linux/mc146818rtc.h>
20#include <asm/io.h>
21
22static int use_ds1302;
23
24/****************************************************************************/
25/*
26 * we need to implement a DS1302 driver here that can operate in
27 * conjunction with the builtin rtc driver which is already quite friendly
28 */
29/*****************************************************************************/
30
31#define RTC_CMD_READ 0x81 /* Read command */
32#define RTC_CMD_WRITE 0x80 /* Write command */
33
34#define RTC_ADDR_YEAR 0x06 /* Address of year register */
35#define RTC_ADDR_DAY 0x05 /* Address of day of week register */
36#define RTC_ADDR_MON 0x04 /* Address of month register */
37#define RTC_ADDR_DATE 0x03 /* Address of day of month register */
38#define RTC_ADDR_HOUR 0x02 /* Address of hour register */
39#define RTC_ADDR_MIN 0x01 /* Address of minute register */
40#define RTC_ADDR_SEC 0x00 /* Address of second register */
41
42#define RTC_RESET 0x1000
43#define RTC_IODATA 0x0800
44#define RTC_SCLK 0x0400
45
46#define set_dirp(x)
47#define get_dirp(x) 0
48#define set_dp(x) SECUREEDGE_WRITE_IOPORT(x, 0x1c00)
49#define get_dp(x) SECUREEDGE_READ_IOPORT()
50
51static void ds1302_sendbits(unsigned int val)
52{
53 int i;
54
55 for (i = 8; (i); i--, val >>= 1) {
56 set_dp((get_dp() & ~RTC_IODATA) | ((val & 0x1) ? RTC_IODATA : 0));
57 set_dp(get_dp() | RTC_SCLK); // clock high
58 set_dp(get_dp() & ~RTC_SCLK); // clock low
59 }
60}
61
62static unsigned int ds1302_recvbits(void)
63{
64 unsigned int val;
65 int i;
66
67 for (i = 0, val = 0; (i < 8); i++) {
68 val |= (((get_dp() & RTC_IODATA) ? 1 : 0) << i);
69 set_dp(get_dp() | RTC_SCLK); // clock high
70 set_dp(get_dp() & ~RTC_SCLK); // clock low
71 }
72 return(val);
73}
74
75static unsigned int ds1302_readbyte(unsigned int addr)
76{
77 unsigned int val;
78 unsigned long flags;
79
80 local_irq_save(flags);
81 set_dirp(get_dirp() | RTC_RESET | RTC_IODATA | RTC_SCLK);
82 set_dp(get_dp() & ~(RTC_RESET | RTC_IODATA | RTC_SCLK));
83
84 set_dp(get_dp() | RTC_RESET);
85 ds1302_sendbits(((addr & 0x3f) << 1) | RTC_CMD_READ);
86 set_dirp(get_dirp() & ~RTC_IODATA);
87 val = ds1302_recvbits();
88 set_dp(get_dp() & ~RTC_RESET);
89 local_irq_restore(flags);
90
91 return(val);
92}
93
94static void ds1302_writebyte(unsigned int addr, unsigned int val)
95{
96 unsigned long flags;
97
98 local_irq_save(flags);
99 set_dirp(get_dirp() | RTC_RESET | RTC_IODATA | RTC_SCLK);
100 set_dp(get_dp() & ~(RTC_RESET | RTC_IODATA | RTC_SCLK));
101 set_dp(get_dp() | RTC_RESET);
102 ds1302_sendbits(((addr & 0x3f) << 1) | RTC_CMD_WRITE);
103 ds1302_sendbits(val);
104 set_dp(get_dp() & ~RTC_RESET);
105 local_irq_restore(flags);
106}
107
108static void ds1302_reset(void)
109{
110 unsigned long flags;
111 /* Hardware dependent reset/init */
112 local_irq_save(flags);
113 set_dirp(get_dirp() | RTC_RESET | RTC_IODATA | RTC_SCLK);
114 set_dp(get_dp() & ~(RTC_RESET | RTC_IODATA | RTC_SCLK));
115 local_irq_restore(flags);
116}
117
118/*****************************************************************************/
119
120static inline int bcd2int(int val)
121{
122 return((((val & 0xf0) >> 4) * 10) + (val & 0xf));
123}
124
125static inline int int2bcd(int val)
126{
127 return(((val / 10) << 4) + (val % 10));
128}
129
130/*****************************************************************************/
131/*
132 * Write and Read some RAM in the DS1302, if it works assume it's there
133 * Otherwise use the SH4 internal RTC
134 */
135
136void snapgear_rtc_gettimeofday(struct timespec *);
137int snapgear_rtc_settimeofday(const time_t);
138
139void __init secureedge5410_rtc_init(void)
140{
141 unsigned char *test = "snapgear";
142 int i;
143
144 ds1302_reset();
145
146 use_ds1302 = 1;
147
148 for (i = 0; test[i]; i++)
149 ds1302_writebyte(32 + i, test[i]);
150
151 for (i = 0; test[i]; i++)
152 if (ds1302_readbyte(32 + i) != test[i]) {
153 use_ds1302 = 0;
154 break;
155 }
156
157 if (use_ds1302) {
158 rtc_sh_get_time = snapgear_rtc_gettimeofday;
159 rtc_sh_set_time = snapgear_rtc_settimeofday;
160 }
161
162 printk("SnapGear RTC: using %s rtc.\n", use_ds1302 ? "ds1302" : "internal");
163}
164
165/****************************************************************************/
166/*
167 * our generic interface that chooses the correct code to use
168 */
169
170void snapgear_rtc_gettimeofday(struct timespec *ts)
171{
172 unsigned int sec, min, hr, day, mon, yr;
173
174 if (!use_ds1302)
175 return;
176
177 sec = bcd2int(ds1302_readbyte(RTC_ADDR_SEC));
178 min = bcd2int(ds1302_readbyte(RTC_ADDR_MIN));
179 hr = bcd2int(ds1302_readbyte(RTC_ADDR_HOUR));
180 day = bcd2int(ds1302_readbyte(RTC_ADDR_DATE));
181 mon = bcd2int(ds1302_readbyte(RTC_ADDR_MON));
182 yr = bcd2int(ds1302_readbyte(RTC_ADDR_YEAR));
183
184bad_time:
185 if (yr > 99 || mon < 1 || mon > 12 || day > 31 || day < 1 ||
186 hr > 23 || min > 59 || sec > 59) {
187 printk(KERN_ERR
188 "SnapGear RTC: invalid value, resetting to 1 Jan 2000\n");
189 ds1302_writebyte(RTC_ADDR_MIN, min = 0);
190 ds1302_writebyte(RTC_ADDR_HOUR, hr = 0);
191 ds1302_writebyte(RTC_ADDR_DAY, 7);
192 ds1302_writebyte(RTC_ADDR_DATE, day = 1);
193 ds1302_writebyte(RTC_ADDR_MON, mon = 1);
194 ds1302_writebyte(RTC_ADDR_YEAR, yr = 0);
195 ds1302_writebyte(RTC_ADDR_SEC, sec = 0);
196 }
197
198 ts->tv_sec = mktime(2000 + yr, mon, day, hr, min, sec);
199 if (ts->tv_sec < 0) {
200#if 0
201 printk("BAD TIME %d %d %d %d %d %d\n", yr, mon, day, hr, min, sec);
202#endif
203 yr = 100;
204 goto bad_time;
205 }
206 ts->tv_nsec = 0;
207}
208
209int snapgear_rtc_settimeofday(const time_t secs)
210{
211 int retval = 0;
212 int real_seconds, real_minutes, cmos_minutes;
213 unsigned long nowtime;
214
215 if (!use_ds1302)
216 return 0;
217
218/*
219 * This is called direct from the kernel timer handling code.
220 * It is supposed to synchronize the kernel clock to the RTC.
221 */
222
223 nowtime = secs;
224
225 /* STOP RTC */
226 ds1302_writebyte(RTC_ADDR_SEC, ds1302_readbyte(RTC_ADDR_SEC) | 0x80);
227
228 cmos_minutes = bcd2int(ds1302_readbyte(RTC_ADDR_MIN));
229
230 /*
231 * since we're only adjusting minutes and seconds,
232 * don't interfere with hour overflow. This avoids
233 * messing with unknown time zones but requires your
234 * RTC not to be off by more than 15 minutes
235 */
236 real_seconds = nowtime % 60;
237 real_minutes = nowtime / 60;
238 if (((abs(real_minutes - cmos_minutes) + 15)/30) & 1)
239 real_minutes += 30; /* correct for half hour time zone */
240 real_minutes %= 60;
241
242 if (abs(real_minutes - cmos_minutes) < 30) {
243 ds1302_writebyte(RTC_ADDR_MIN, int2bcd(real_minutes));
244 ds1302_writebyte(RTC_ADDR_SEC, int2bcd(real_seconds));
245 } else {
246 printk(KERN_WARNING
247 "SnapGear RTC: can't update from %d to %d\n",
248 cmos_minutes, real_minutes);
249 retval = -1;
250 }
251
252 /* START RTC */
253 ds1302_writebyte(RTC_ADDR_SEC, ds1302_readbyte(RTC_ADDR_SEC) & ~0x80);
254 return(0);
255}
256
257unsigned char secureedge5410_cmos_read(int addr)
258{
259 unsigned char val = 0;
260
261 if (!use_ds1302)
262 return(__CMOS_READ(addr, w));
263
264 switch(addr) {
265 case RTC_SECONDS: val = ds1302_readbyte(RTC_ADDR_SEC); break;
266 case RTC_SECONDS_ALARM: break;
267 case RTC_MINUTES: val = ds1302_readbyte(RTC_ADDR_MIN); break;
268 case RTC_MINUTES_ALARM: break;
269 case RTC_HOURS: val = ds1302_readbyte(RTC_ADDR_HOUR); break;
270 case RTC_HOURS_ALARM: break;
271 case RTC_DAY_OF_WEEK: val = ds1302_readbyte(RTC_ADDR_DAY); break;
272 case RTC_DAY_OF_MONTH: val = ds1302_readbyte(RTC_ADDR_DATE); break;
273 case RTC_MONTH: val = ds1302_readbyte(RTC_ADDR_MON); break;
274 case RTC_YEAR: val = ds1302_readbyte(RTC_ADDR_YEAR); break;
275 case RTC_REG_A: /* RTC_FREQ_SELECT */ break;
276 case RTC_REG_B: /* RTC_CONTROL */ break;
277 case RTC_REG_C: /* RTC_INTR_FLAGS */ break;
278 case RTC_REG_D: val = RTC_VRT /* RTC_VALID */; break;
279 default: break;
280 }
281
282 return(val);
283}
284
285void secureedge5410_cmos_write(unsigned char val, int addr)
286{
287 if (!use_ds1302) {
288 __CMOS_WRITE(val, addr, w);
289 return;
290 }
291
292 switch(addr) {
293 case RTC_SECONDS: ds1302_writebyte(RTC_ADDR_SEC, val); break;
294 case RTC_SECONDS_ALARM: break;
295 case RTC_MINUTES: ds1302_writebyte(RTC_ADDR_MIN, val); break;
296 case RTC_MINUTES_ALARM: break;
297 case RTC_HOURS: ds1302_writebyte(RTC_ADDR_HOUR, val); break;
298 case RTC_HOURS_ALARM: break;
299 case RTC_DAY_OF_WEEK: ds1302_writebyte(RTC_ADDR_DAY, val); break;
300 case RTC_DAY_OF_MONTH: ds1302_writebyte(RTC_ADDR_DATE, val); break;
301 case RTC_MONTH: ds1302_writebyte(RTC_ADDR_MON, val); break;
302 case RTC_YEAR: ds1302_writebyte(RTC_ADDR_YEAR, val); break;
303 case RTC_REG_A: /* RTC_FREQ_SELECT */ break;
304 case RTC_REG_B: /* RTC_CONTROL */ break;
305 case RTC_REG_C: /* RTC_INTR_FLAGS */ break;
306 case RTC_REG_D: /* RTC_VALID */ break;
307 default: break;
308 }
309}
diff --git a/arch/sh/boards/snapgear/setup.c b/arch/sh/boards/snapgear/setup.c
index 2b594f600002..7022483f98e8 100644
--- a/arch/sh/boards/snapgear/setup.c
+++ b/arch/sh/boards/snapgear/setup.c
@@ -22,20 +22,15 @@
22#include <asm/snapgear.h> 22#include <asm/snapgear.h>
23#include <asm/irq.h> 23#include <asm/irq.h>
24#include <asm/io.h> 24#include <asm/io.h>
25#include <asm/rtc.h>
26#include <asm/cpu/timer.h> 25#include <asm/cpu/timer.h>
27 26
28extern void secureedge5410_rtc_init(void);
29extern void pcibios_init(void);
30
31/****************************************************************************/
32/* 27/*
33 * EraseConfig handling functions 28 * EraseConfig handling functions
34 */ 29 */
35 30
36static irqreturn_t eraseconfig_interrupt(int irq, void *dev_id) 31static irqreturn_t eraseconfig_interrupt(int irq, void *dev_id)
37{ 32{
38 volatile char dummy __attribute__((unused)) = * (volatile char *) 0xb8000000; 33 (void)ctrl_inb(0xb8000000); /* dummy read */
39 34
40 printk("SnapGear: erase switch interrupt!\n"); 35 printk("SnapGear: erase switch interrupt!\n");
41 36
@@ -76,19 +71,10 @@ static void __init init_snapgear_IRQ(void)
76} 71}
77 72
78/* 73/*
79 * Initialize the board
80 */
81static void __init snapgear_setup(char **cmdline_p)
82{
83 board_time_init = secureedge5410_rtc_init;
84}
85
86/*
87 * The Machine Vector 74 * The Machine Vector
88 */ 75 */
89static struct sh_machine_vector mv_snapgear __initmv = { 76static struct sh_machine_vector mv_snapgear __initmv = {
90 .mv_name = "SnapGear SecureEdge5410", 77 .mv_name = "SnapGear SecureEdge5410",
91 .mv_setup = snapgear_setup,
92 .mv_nr_irqs = 72, 78 .mv_nr_irqs = 72,
93 79
94 .mv_inb = snapgear_inb, 80 .mv_inb = snapgear_inb,
diff --git a/arch/sh/boot/Makefile b/arch/sh/boot/Makefile
index 4c5ffdcd55b6..1b0f5be01d10 100644
--- a/arch/sh/boot/Makefile
+++ b/arch/sh/boot/Makefile
@@ -39,7 +39,7 @@ KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%8x" \
39 39
40quiet_cmd_uimage = UIMAGE $@ 40quiet_cmd_uimage = UIMAGE $@
41 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel \ 41 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel \
42 -C gzip -a $(KERNEL_LOAD) -e $(KERNEL_LOAD) \ 42 -C none -a $(KERNEL_LOAD) -e $(KERNEL_LOAD) \
43 -n 'Linux-$(KERNELRELEASE)' -d $< $@ 43 -n 'Linux-$(KERNELRELEASE)' -d $< $@
44 44
45$(obj)/uImage: $(obj)/zImage FORCE 45$(obj)/uImage: $(obj)/zImage FORCE
diff --git a/arch/sh/cchips/hd6446x/Makefile b/arch/sh/cchips/hd6446x/Makefile
index a106dd9db986..f7de4076e242 100644
--- a/arch/sh/cchips/hd6446x/Makefile
+++ b/arch/sh/cchips/hd6446x/Makefile
@@ -1,2 +1,4 @@
1obj-$(CONFIG_HD64461) += hd64461.o 1obj-$(CONFIG_HD64461) += hd64461.o
2obj-$(CONFIG_HD64465) += hd64465/ 2obj-$(CONFIG_HD64465) += hd64465/
3
4EXTRA_CFLAGS += -Werror
diff --git a/arch/sh/cchips/voyagergx/Makefile b/arch/sh/cchips/voyagergx/Makefile
index 085de72fd327..f73963cb3744 100644
--- a/arch/sh/cchips/voyagergx/Makefile
+++ b/arch/sh/cchips/voyagergx/Makefile
@@ -6,3 +6,4 @@ obj-y := irq.o setup.o
6 6
7obj-$(CONFIG_USB_OHCI_HCD) += consistent.o 7obj-$(CONFIG_USB_OHCI_HCD) += consistent.o
8 8
9EXTRA_CFLAGS += -Werror
diff --git a/arch/sh/configs/r7785rp_defconfig b/arch/sh/configs/r7785rp_defconfig
index 5c29338532da..158e03f0b1ef 100644
--- a/arch/sh/configs/r7785rp_defconfig
+++ b/arch/sh/configs/r7785rp_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc4 3# Linux kernel version: 2.6.24-rc1
4# Thu Jul 12 12:33:15 2007 4# Fri Nov 2 14:30:49 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
@@ -13,39 +13,40 @@ CONFIG_GENERIC_IRQ_PROBE=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
14CONFIG_GENERIC_TIME=y 14CONFIG_GENERIC_TIME=y
15CONFIG_GENERIC_CLOCKEVENTS=y 15CONFIG_GENERIC_CLOCKEVENTS=y
16CONFIG_SYS_SUPPORTS_NUMA=y
16CONFIG_SYS_SUPPORTS_PCI=y 17CONFIG_SYS_SUPPORTS_PCI=y
17CONFIG_STACKTRACE_SUPPORT=y 18CONFIG_STACKTRACE_SUPPORT=y
18CONFIG_LOCKDEP_SUPPORT=y 19CONFIG_LOCKDEP_SUPPORT=y
19# CONFIG_ARCH_HAS_ILOG2_U32 is not set 20# CONFIG_ARCH_HAS_ILOG2_U32 is not set
20# CONFIG_ARCH_HAS_ILOG2_U64 is not set 21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
22CONFIG_ARCH_NO_VIRT_TO_BUS=y
21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
22 24
23# 25#
24# Code maturity level options 26# General setup
25# 27#
26CONFIG_EXPERIMENTAL=y 28CONFIG_EXPERIMENTAL=y
27CONFIG_BROKEN_ON_SMP=y 29CONFIG_BROKEN_ON_SMP=y
28CONFIG_LOCK_KERNEL=y 30CONFIG_LOCK_KERNEL=y
29CONFIG_INIT_ENV_ARG_LIMIT=32 31CONFIG_INIT_ENV_ARG_LIMIT=32
30
31#
32# General setup
33#
34CONFIG_LOCALVERSION="" 32CONFIG_LOCALVERSION=""
35CONFIG_LOCALVERSION_AUTO=y 33CONFIG_LOCALVERSION_AUTO=y
36CONFIG_SWAP=y 34CONFIG_SWAP=y
37CONFIG_SYSVIPC=y 35CONFIG_SYSVIPC=y
38# CONFIG_IPC_NS is not set
39CONFIG_SYSVIPC_SYSCTL=y 36CONFIG_SYSVIPC_SYSCTL=y
40# CONFIG_POSIX_MQUEUE is not set 37# CONFIG_POSIX_MQUEUE is not set
41CONFIG_BSD_PROCESS_ACCT=y 38CONFIG_BSD_PROCESS_ACCT=y
42# CONFIG_BSD_PROCESS_ACCT_V3 is not set 39# CONFIG_BSD_PROCESS_ACCT_V3 is not set
43# CONFIG_TASKSTATS is not set 40# CONFIG_TASKSTATS is not set
44# CONFIG_UTS_NS is not set 41# CONFIG_USER_NS is not set
45# CONFIG_AUDIT is not set 42# CONFIG_AUDIT is not set
46CONFIG_IKCONFIG=y 43CONFIG_IKCONFIG=y
47CONFIG_IKCONFIG_PROC=y 44CONFIG_IKCONFIG_PROC=y
48CONFIG_LOG_BUF_SHIFT=14 45CONFIG_LOG_BUF_SHIFT=14
46# CONFIG_CGROUPS is not set
47CONFIG_FAIR_GROUP_SCHED=y
48CONFIG_FAIR_USER_SCHED=y
49# CONFIG_FAIR_CGROUP_SCHED is not set
49# CONFIG_SYSFS_DEPRECATED is not set 50# CONFIG_SYSFS_DEPRECATED is not set
50# CONFIG_RELAY is not set 51# CONFIG_RELAY is not set
51# CONFIG_BLK_DEV_INITRD is not set 52# CONFIG_BLK_DEV_INITRD is not set
@@ -66,7 +67,6 @@ CONFIG_BASE_FULL=y
66CONFIG_ANON_INODES=y 67CONFIG_ANON_INODES=y
67# CONFIG_EPOLL is not set 68# CONFIG_EPOLL is not set
68CONFIG_SIGNALFD=y 69CONFIG_SIGNALFD=y
69CONFIG_TIMERFD=y
70CONFIG_EVENTFD=y 70CONFIG_EVENTFD=y
71CONFIG_SHMEM=y 71CONFIG_SHMEM=y
72CONFIG_VM_EVENT_COUNTERS=y 72CONFIG_VM_EVENT_COUNTERS=y
@@ -75,24 +75,17 @@ CONFIG_SLAB=y
75# CONFIG_SLOB is not set 75# CONFIG_SLOB is not set
76# CONFIG_TINY_SHMEM is not set 76# CONFIG_TINY_SHMEM is not set
77CONFIG_BASE_SMALL=0 77CONFIG_BASE_SMALL=0
78
79#
80# Loadable module support
81#
82CONFIG_MODULES=y 78CONFIG_MODULES=y
83CONFIG_MODULE_UNLOAD=y 79CONFIG_MODULE_UNLOAD=y
84# CONFIG_MODULE_FORCE_UNLOAD is not set 80# CONFIG_MODULE_FORCE_UNLOAD is not set
85# CONFIG_MODVERSIONS is not set 81# CONFIG_MODVERSIONS is not set
86# CONFIG_MODULE_SRCVERSION_ALL is not set 82# CONFIG_MODULE_SRCVERSION_ALL is not set
87CONFIG_KMOD=y 83CONFIG_KMOD=y
88
89#
90# Block layer
91#
92CONFIG_BLOCK=y 84CONFIG_BLOCK=y
93# CONFIG_LBD is not set 85# CONFIG_LBD is not set
94# CONFIG_BLK_DEV_IO_TRACE is not set 86# CONFIG_BLK_DEV_IO_TRACE is not set
95# CONFIG_LSF is not set 87# CONFIG_LSF is not set
88# CONFIG_BLK_DEV_BSG is not set
96 89
97# 90#
98# IO Schedulers 91# IO Schedulers
@@ -115,7 +108,6 @@ CONFIG_CPU_SH4A=y
115CONFIG_CPU_SHX2=y 108CONFIG_CPU_SHX2=y
116# CONFIG_CPU_SUBTYPE_SH7619 is not set 109# CONFIG_CPU_SUBTYPE_SH7619 is not set
117# CONFIG_CPU_SUBTYPE_SH7206 is not set 110# CONFIG_CPU_SUBTYPE_SH7206 is not set
118# CONFIG_CPU_SUBTYPE_SH7300 is not set
119# CONFIG_CPU_SUBTYPE_SH7705 is not set 111# CONFIG_CPU_SUBTYPE_SH7705 is not set
120# CONFIG_CPU_SUBTYPE_SH7706 is not set 112# CONFIG_CPU_SUBTYPE_SH7706 is not set
121# CONFIG_CPU_SUBTYPE_SH7707 is not set 113# CONFIG_CPU_SUBTYPE_SH7707 is not set
@@ -123,6 +115,7 @@ CONFIG_CPU_SHX2=y
123# CONFIG_CPU_SUBTYPE_SH7709 is not set 115# CONFIG_CPU_SUBTYPE_SH7709 is not set
124# CONFIG_CPU_SUBTYPE_SH7710 is not set 116# CONFIG_CPU_SUBTYPE_SH7710 is not set
125# CONFIG_CPU_SUBTYPE_SH7712 is not set 117# CONFIG_CPU_SUBTYPE_SH7712 is not set
118# CONFIG_CPU_SUBTYPE_SH7720 is not set
126# CONFIG_CPU_SUBTYPE_SH7750 is not set 119# CONFIG_CPU_SUBTYPE_SH7750 is not set
127# CONFIG_CPU_SUBTYPE_SH7091 is not set 120# CONFIG_CPU_SUBTYPE_SH7091 is not set
128# CONFIG_CPU_SUBTYPE_SH7750R is not set 121# CONFIG_CPU_SUBTYPE_SH7750R is not set
@@ -137,7 +130,6 @@ CONFIG_CPU_SHX2=y
137# CONFIG_CPU_SUBTYPE_SH7780 is not set 130# CONFIG_CPU_SUBTYPE_SH7780 is not set
138CONFIG_CPU_SUBTYPE_SH7785=y 131CONFIG_CPU_SUBTYPE_SH7785=y
139# CONFIG_CPU_SUBTYPE_SHX3 is not set 132# CONFIG_CPU_SUBTYPE_SHX3 is not set
140# CONFIG_CPU_SUBTYPE_SH73180 is not set
141# CONFIG_CPU_SUBTYPE_SH7343 is not set 133# CONFIG_CPU_SUBTYPE_SH7343 is not set
142# CONFIG_CPU_SUBTYPE_SH7722 is not set 134# CONFIG_CPU_SUBTYPE_SH7722 is not set
143 135
@@ -149,15 +141,17 @@ CONFIG_MMU=y
149CONFIG_PAGE_OFFSET=0x80000000 141CONFIG_PAGE_OFFSET=0x80000000
150CONFIG_MEMORY_START=0x08000000 142CONFIG_MEMORY_START=0x08000000
151CONFIG_MEMORY_SIZE=0x08000000 143CONFIG_MEMORY_SIZE=0x08000000
152CONFIG_32BIT=y 144# CONFIG_32BIT is not set
153# CONFIG_X2TLB is not set 145# CONFIG_X2TLB is not set
154CONFIG_VSYSCALL=y 146CONFIG_VSYSCALL=y
147# CONFIG_NUMA is not set
155CONFIG_ARCH_FLATMEM_ENABLE=y 148CONFIG_ARCH_FLATMEM_ENABLE=y
156CONFIG_ARCH_SPARSEMEM_ENABLE=y 149CONFIG_ARCH_SPARSEMEM_ENABLE=y
157CONFIG_ARCH_SPARSEMEM_DEFAULT=y 150CONFIG_ARCH_SPARSEMEM_DEFAULT=y
158CONFIG_MAX_ACTIVE_REGIONS=1 151CONFIG_MAX_ACTIVE_REGIONS=2
159CONFIG_ARCH_POPULATES_NODE_MAP=y 152CONFIG_ARCH_POPULATES_NODE_MAP=y
160CONFIG_ARCH_SELECT_MEMORY_MODEL=y 153CONFIG_ARCH_SELECT_MEMORY_MODEL=y
154CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
161CONFIG_PAGE_SIZE_4KB=y 155CONFIG_PAGE_SIZE_4KB=y
162# CONFIG_PAGE_SIZE_8KB is not set 156# CONFIG_PAGE_SIZE_8KB is not set
163# CONFIG_PAGE_SIZE_64KB is not set 157# CONFIG_PAGE_SIZE_64KB is not set
@@ -167,12 +161,14 @@ CONFIG_HUGETLB_PAGE_SIZE_1MB=y
167# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set 161# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set
168# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set 162# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set
169CONFIG_SELECT_MEMORY_MODEL=y 163CONFIG_SELECT_MEMORY_MODEL=y
170CONFIG_FLATMEM_MANUAL=y 164# CONFIG_FLATMEM_MANUAL is not set
171# CONFIG_DISCONTIGMEM_MANUAL is not set 165# CONFIG_DISCONTIGMEM_MANUAL is not set
172# CONFIG_SPARSEMEM_MANUAL is not set 166CONFIG_SPARSEMEM_MANUAL=y
173CONFIG_FLATMEM=y 167CONFIG_SPARSEMEM=y
174CONFIG_FLAT_NODE_MEM_MAP=y 168CONFIG_HAVE_MEMORY_PRESENT=y
175CONFIG_SPARSEMEM_STATIC=y 169CONFIG_SPARSEMEM_STATIC=y
170# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
171# CONFIG_MEMORY_HOTPLUG is not set
176CONFIG_SPLIT_PTLOCK_CPUS=4 172CONFIG_SPLIT_PTLOCK_CPUS=4
177# CONFIG_RESOURCES_64BIT is not set 173# CONFIG_RESOURCES_64BIT is not set
178CONFIG_ZONE_DMA_FLAG=0 174CONFIG_ZONE_DMA_FLAG=0
@@ -182,7 +178,9 @@ CONFIG_NR_QUICK=2
182# Cache configuration 178# Cache configuration
183# 179#
184# CONFIG_SH_DIRECT_MAPPED is not set 180# CONFIG_SH_DIRECT_MAPPED is not set
185# CONFIG_SH_WRITETHROUGH is not set 181CONFIG_CACHE_WRITEBACK=y
182# CONFIG_CACHE_WRITETHROUGH is not set
183# CONFIG_CACHE_OFF is not set
186 184
187# 185#
188# Processor features 186# Processor features
@@ -190,12 +188,11 @@ CONFIG_NR_QUICK=2
190CONFIG_CPU_LITTLE_ENDIAN=y 188CONFIG_CPU_LITTLE_ENDIAN=y
191# CONFIG_CPU_BIG_ENDIAN is not set 189# CONFIG_CPU_BIG_ENDIAN is not set
192CONFIG_SH_FPU=y 190CONFIG_SH_FPU=y
193# CONFIG_SH_DSP is not set
194CONFIG_SH_STORE_QUEUES=y 191CONFIG_SH_STORE_QUEUES=y
195CONFIG_CPU_HAS_INTEVT=y 192CONFIG_CPU_HAS_INTEVT=y
196CONFIG_CPU_HAS_INTC2_IRQ=y
197CONFIG_CPU_HAS_SR_RB=y 193CONFIG_CPU_HAS_SR_RB=y
198CONFIG_CPU_HAS_PTEA=y 194CONFIG_CPU_HAS_PTEA=y
195CONFIG_CPU_HAS_FPU=y
199 196
200# 197#
201# Board support 198# Board support
@@ -214,6 +211,7 @@ CONFIG_SH_PCLK_FREQ=50000000
214# CONFIG_TICK_ONESHOT is not set 211# CONFIG_TICK_ONESHOT is not set
215# CONFIG_NO_HZ is not set 212# CONFIG_NO_HZ is not set
216# CONFIG_HIGH_RES_TIMERS is not set 213# CONFIG_HIGH_RES_TIMERS is not set
214CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
217 215
218# 216#
219# CPU Frequency scaling 217# CPU Frequency scaling
@@ -249,6 +247,7 @@ CONFIG_KEXEC=y
249# CONFIG_PREEMPT_VOLUNTARY is not set 247# CONFIG_PREEMPT_VOLUNTARY is not set
250CONFIG_PREEMPT=y 248CONFIG_PREEMPT=y
251CONFIG_PREEMPT_BKL=y 249CONFIG_PREEMPT_BKL=y
250CONFIG_GUSA=y
252 251
253# 252#
254# Boot options 253# Boot options
@@ -268,10 +267,6 @@ CONFIG_PCI_AUTO=y
268CONFIG_PCI_AUTO_UPDATE_RESOURCES=y 267CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
269# CONFIG_ARCH_SUPPORTS_MSI is not set 268# CONFIG_ARCH_SUPPORTS_MSI is not set
270# CONFIG_PCI_DEBUG is not set 269# CONFIG_PCI_DEBUG is not set
271
272#
273# PCCARD (PCMCIA/CardBus) support
274#
275# CONFIG_PCCARD is not set 270# CONFIG_PCCARD is not set
276# CONFIG_HOTPLUG_PCI is not set 271# CONFIG_HOTPLUG_PCI is not set
277 272
@@ -322,6 +317,7 @@ CONFIG_IP_PNP_DHCP=y
322CONFIG_INET_XFRM_MODE_TRANSPORT=y 317CONFIG_INET_XFRM_MODE_TRANSPORT=y
323CONFIG_INET_XFRM_MODE_TUNNEL=y 318CONFIG_INET_XFRM_MODE_TUNNEL=y
324CONFIG_INET_XFRM_MODE_BEET=y 319CONFIG_INET_XFRM_MODE_BEET=y
320# CONFIG_INET_LRO is not set
325CONFIG_INET_DIAG=y 321CONFIG_INET_DIAG=y
326CONFIG_INET_TCP_DIAG=y 322CONFIG_INET_TCP_DIAG=y
327# CONFIG_TCP_CONG_ADVANCED is not set 323# CONFIG_TCP_CONG_ADVANCED is not set
@@ -348,10 +344,6 @@ CONFIG_LLC=m
348# CONFIG_LAPB is not set 344# CONFIG_LAPB is not set
349# CONFIG_ECONET is not set 345# CONFIG_ECONET is not set
350# CONFIG_WAN_ROUTER is not set 346# CONFIG_WAN_ROUTER is not set
351
352#
353# QoS and/or fair queueing
354#
355# CONFIG_NET_SCHED is not set 347# CONFIG_NET_SCHED is not set
356 348
357# 349#
@@ -371,6 +363,7 @@ CONFIG_WIRELESS_EXT=y
371# CONFIG_MAC80211 is not set 363# CONFIG_MAC80211 is not set
372# CONFIG_IEEE80211 is not set 364# CONFIG_IEEE80211 is not set
373# CONFIG_RFKILL is not set 365# CONFIG_RFKILL is not set
366# CONFIG_NET_9P is not set
374 367
375# 368#
376# Device Drivers 369# Device Drivers
@@ -379,33 +372,17 @@ CONFIG_WIRELESS_EXT=y
379# 372#
380# Generic Driver Options 373# Generic Driver Options
381# 374#
375CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
382CONFIG_STANDALONE=y 376CONFIG_STANDALONE=y
383CONFIG_PREVENT_FIRMWARE_BUILD=y 377CONFIG_PREVENT_FIRMWARE_BUILD=y
384CONFIG_FW_LOADER=m 378CONFIG_FW_LOADER=m
385# CONFIG_DEBUG_DRIVER is not set 379# CONFIG_DEBUG_DRIVER is not set
386# CONFIG_DEBUG_DEVRES is not set 380# CONFIG_DEBUG_DEVRES is not set
387# CONFIG_SYS_HYPERVISOR is not set 381# CONFIG_SYS_HYPERVISOR is not set
388
389#
390# Connector - unified userspace <-> kernelspace linker
391#
392# CONFIG_CONNECTOR is not set 382# CONFIG_CONNECTOR is not set
393# CONFIG_MTD is not set 383# CONFIG_MTD is not set
394
395#
396# Parallel port support
397#
398# CONFIG_PARPORT is not set 384# CONFIG_PARPORT is not set
399 385CONFIG_BLK_DEV=y
400#
401# Plug and Play support
402#
403# CONFIG_PNPACPI is not set
404
405#
406# Block devices
407#
408# CONFIG_BLK_CPQ_DA is not set
409# CONFIG_BLK_CPQ_CISS_DA is not set 386# CONFIG_BLK_CPQ_CISS_DA is not set
410# CONFIG_BLK_DEV_DAC960 is not set 387# CONFIG_BLK_DEV_DAC960 is not set
411# CONFIG_BLK_DEV_UMEM is not set 388# CONFIG_BLK_DEV_UMEM is not set
@@ -419,14 +396,11 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
419CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 396CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
420# CONFIG_CDROM_PKTCDVD is not set 397# CONFIG_CDROM_PKTCDVD is not set
421# CONFIG_ATA_OVER_ETH is not set 398# CONFIG_ATA_OVER_ETH is not set
422 399CONFIG_MISC_DEVICES=y
423#
424# Misc devices
425#
426# CONFIG_PHANTOM is not set 400# CONFIG_PHANTOM is not set
401CONFIG_EEPROM_93CX6=y
427# CONFIG_SGI_IOC4 is not set 402# CONFIG_SGI_IOC4 is not set
428# CONFIG_TIFM_CORE is not set 403# CONFIG_TIFM_CORE is not set
429# CONFIG_BLINK is not set
430# CONFIG_IDE is not set 404# CONFIG_IDE is not set
431 405
432# 406#
@@ -434,6 +408,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
434# 408#
435# CONFIG_RAID_ATTRS is not set 409# CONFIG_RAID_ATTRS is not set
436CONFIG_SCSI=y 410CONFIG_SCSI=y
411CONFIG_SCSI_DMA=y
437# CONFIG_SCSI_TGT is not set 412# CONFIG_SCSI_TGT is not set
438# CONFIG_SCSI_NETLINK is not set 413# CONFIG_SCSI_NETLINK is not set
439CONFIG_SCSI_PROC_FS=y 414CONFIG_SCSI_PROC_FS=y
@@ -463,12 +438,9 @@ CONFIG_SCSI_WAIT_SCAN=m
463# CONFIG_SCSI_SPI_ATTRS is not set 438# CONFIG_SCSI_SPI_ATTRS is not set
464# CONFIG_SCSI_FC_ATTRS is not set 439# CONFIG_SCSI_FC_ATTRS is not set
465# CONFIG_SCSI_ISCSI_ATTRS is not set 440# CONFIG_SCSI_ISCSI_ATTRS is not set
466# CONFIG_SCSI_SAS_ATTRS is not set
467# CONFIG_SCSI_SAS_LIBSAS is not set 441# CONFIG_SCSI_SAS_LIBSAS is not set
468 442# CONFIG_SCSI_SRP_ATTRS is not set
469# 443CONFIG_SCSI_LOWLEVEL=y
470# SCSI low-level drivers
471#
472# CONFIG_ISCSI_TCP is not set 444# CONFIG_ISCSI_TCP is not set
473# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 445# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
474# CONFIG_SCSI_3W_9XXX is not set 446# CONFIG_SCSI_3W_9XXX is not set
@@ -478,7 +450,6 @@ CONFIG_SCSI_WAIT_SCAN=m
478# CONFIG_SCSI_AIC7XXX_OLD is not set 450# CONFIG_SCSI_AIC7XXX_OLD is not set
479# CONFIG_SCSI_AIC79XX is not set 451# CONFIG_SCSI_AIC79XX is not set
480# CONFIG_SCSI_AIC94XX is not set 452# CONFIG_SCSI_AIC94XX is not set
481# CONFIG_SCSI_DPT_I2O is not set
482# CONFIG_SCSI_ARCMSR is not set 453# CONFIG_SCSI_ARCMSR is not set
483# CONFIG_MEGARAID_NEWGEN is not set 454# CONFIG_MEGARAID_NEWGEN is not set
484# CONFIG_MEGARAID_LEGACY is not set 455# CONFIG_MEGARAID_LEGACY is not set
@@ -543,6 +514,7 @@ CONFIG_SATA_SIL=y
543# CONFIG_PATA_OLDPIIX is not set 514# CONFIG_PATA_OLDPIIX is not set
544# CONFIG_PATA_NETCELL is not set 515# CONFIG_PATA_NETCELL is not set
545# CONFIG_PATA_NS87410 is not set 516# CONFIG_PATA_NS87410 is not set
517# CONFIG_PATA_NS87415 is not set
546# CONFIG_PATA_OPTI is not set 518# CONFIG_PATA_OPTI is not set
547# CONFIG_PATA_OPTIDMA is not set 519# CONFIG_PATA_OPTIDMA is not set
548# CONFIG_PATA_PDC_OLD is not set 520# CONFIG_PATA_PDC_OLD is not set
@@ -556,45 +528,26 @@ CONFIG_SATA_SIL=y
556# CONFIG_PATA_VIA is not set 528# CONFIG_PATA_VIA is not set
557# CONFIG_PATA_WINBOND is not set 529# CONFIG_PATA_WINBOND is not set
558CONFIG_PATA_PLATFORM=y 530CONFIG_PATA_PLATFORM=y
559
560#
561# Multi-device support (RAID and LVM)
562#
563# CONFIG_MD is not set 531# CONFIG_MD is not set
564
565#
566# Fusion MPT device support
567#
568# CONFIG_FUSION is not set 532# CONFIG_FUSION is not set
569# CONFIG_FUSION_SPI is not set
570# CONFIG_FUSION_FC is not set
571# CONFIG_FUSION_SAS is not set
572 533
573# 534#
574# IEEE 1394 (FireWire) support 535# IEEE 1394 (FireWire) support
575# 536#
576# CONFIG_FIREWIRE is not set 537# CONFIG_FIREWIRE is not set
577# CONFIG_IEEE1394 is not set 538# CONFIG_IEEE1394 is not set
578
579#
580# I2O device support
581#
582# CONFIG_I2O is not set 539# CONFIG_I2O is not set
583
584#
585# Network device support
586#
587CONFIG_NETDEVICES=y 540CONFIG_NETDEVICES=y
541# CONFIG_NETDEVICES_MULTIQUEUE is not set
588# CONFIG_DUMMY is not set 542# CONFIG_DUMMY is not set
589# CONFIG_BONDING is not set 543# CONFIG_BONDING is not set
544# CONFIG_MACVLAN is not set
590# CONFIG_EQUALIZER is not set 545# CONFIG_EQUALIZER is not set
591# CONFIG_TUN is not set 546# CONFIG_TUN is not set
547# CONFIG_VETH is not set
548# CONFIG_IP1000 is not set
592# CONFIG_ARCNET is not set 549# CONFIG_ARCNET is not set
593# CONFIG_PHYLIB is not set 550# CONFIG_PHYLIB is not set
594
595#
596# Ethernet (10 or 100Mbit)
597#
598CONFIG_NET_ETHERNET=y 551CONFIG_NET_ETHERNET=y
599CONFIG_MII=y 552CONFIG_MII=y
600# CONFIG_STNIC is not set 553# CONFIG_STNIC is not set
@@ -603,17 +556,20 @@ CONFIG_MII=y
603# CONFIG_CASSINI is not set 556# CONFIG_CASSINI is not set
604# CONFIG_NET_VENDOR_3COM is not set 557# CONFIG_NET_VENDOR_3COM is not set
605# CONFIG_SMC91X is not set 558# CONFIG_SMC91X is not set
606 559# CONFIG_SMC911X is not set
607#
608# Tulip family network device support
609#
610# CONFIG_NET_TULIP is not set 560# CONFIG_NET_TULIP is not set
611# CONFIG_HP100 is not set 561# CONFIG_HP100 is not set
562# CONFIG_IBM_NEW_EMAC_ZMII is not set
563# CONFIG_IBM_NEW_EMAC_RGMII is not set
564# CONFIG_IBM_NEW_EMAC_TAH is not set
565# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
612# CONFIG_NET_PCI is not set 566# CONFIG_NET_PCI is not set
567# CONFIG_B44 is not set
613CONFIG_NETDEV_1000=y 568CONFIG_NETDEV_1000=y
614# CONFIG_ACENIC is not set 569# CONFIG_ACENIC is not set
615# CONFIG_DL2K is not set 570# CONFIG_DL2K is not set
616# CONFIG_E1000 is not set 571# CONFIG_E1000 is not set
572# CONFIG_E1000E is not set
617# CONFIG_NS83820 is not set 573# CONFIG_NS83820 is not set
618# CONFIG_HAMACHI is not set 574# CONFIG_HAMACHI is not set
619# CONFIG_YELLOWFIN is not set 575# CONFIG_YELLOWFIN is not set
@@ -631,11 +587,14 @@ CONFIG_R8169=y
631CONFIG_NETDEV_10000=y 587CONFIG_NETDEV_10000=y
632# CONFIG_CHELSIO_T1 is not set 588# CONFIG_CHELSIO_T1 is not set
633# CONFIG_CHELSIO_T3 is not set 589# CONFIG_CHELSIO_T3 is not set
590# CONFIG_IXGBE is not set
634# CONFIG_IXGB is not set 591# CONFIG_IXGB is not set
635# CONFIG_S2IO is not set 592# CONFIG_S2IO is not set
636# CONFIG_MYRI10GE is not set 593# CONFIG_MYRI10GE is not set
637# CONFIG_NETXEN_NIC is not set 594# CONFIG_NETXEN_NIC is not set
595# CONFIG_NIU is not set
638# CONFIG_MLX4_CORE is not set 596# CONFIG_MLX4_CORE is not set
597# CONFIG_TEHUTI is not set
639# CONFIG_TR is not set 598# CONFIG_TR is not set
640 599
641# 600#
@@ -653,15 +612,7 @@ CONFIG_NETDEV_10000=y
653# CONFIG_NETCONSOLE is not set 612# CONFIG_NETCONSOLE is not set
654# CONFIG_NETPOLL is not set 613# CONFIG_NETPOLL is not set
655# CONFIG_NET_POLL_CONTROLLER is not set 614# CONFIG_NET_POLL_CONTROLLER is not set
656
657#
658# ISDN subsystem
659#
660# CONFIG_ISDN is not set 615# CONFIG_ISDN is not set
661
662#
663# Telephony Support
664#
665# CONFIG_PHONE is not set 616# CONFIG_PHONE is not set
666 617
667# 618#
@@ -669,6 +620,7 @@ CONFIG_NETDEV_10000=y
669# 620#
670CONFIG_INPUT=y 621CONFIG_INPUT=y
671# CONFIG_INPUT_FF_MEMLESS is not set 622# CONFIG_INPUT_FF_MEMLESS is not set
623# CONFIG_INPUT_POLLDEV is not set
672 624
673# 625#
674# Userland interfaces 626# Userland interfaces
@@ -678,7 +630,6 @@ CONFIG_INPUT_MOUSEDEV=y
678CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 630CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
679CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 631CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
680# CONFIG_INPUT_JOYDEV is not set 632# CONFIG_INPUT_JOYDEV is not set
681# CONFIG_INPUT_TSDEV is not set
682# CONFIG_INPUT_EVDEV is not set 633# CONFIG_INPUT_EVDEV is not set
683# CONFIG_INPUT_EVBUG is not set 634# CONFIG_INPUT_EVBUG is not set
684 635
@@ -732,21 +683,11 @@ CONFIG_SERIAL_CORE_CONSOLE=y
732CONFIG_UNIX98_PTYS=y 683CONFIG_UNIX98_PTYS=y
733CONFIG_LEGACY_PTYS=y 684CONFIG_LEGACY_PTYS=y
734CONFIG_LEGACY_PTY_COUNT=256 685CONFIG_LEGACY_PTY_COUNT=256
735
736#
737# IPMI
738#
739# CONFIG_IPMI_HANDLER is not set 686# CONFIG_IPMI_HANDLER is not set
740# CONFIG_WATCHDOG is not set
741CONFIG_HW_RANDOM=y 687CONFIG_HW_RANDOM=y
742# CONFIG_R3964 is not set 688# CONFIG_R3964 is not set
743# CONFIG_APPLICOM is not set 689# CONFIG_APPLICOM is not set
744# CONFIG_DRM is not set
745# CONFIG_RAW_DRIVER is not set 690# CONFIG_RAW_DRIVER is not set
746
747#
748# TPM devices
749#
750# CONFIG_TCG_TPM is not set 691# CONFIG_TCG_TPM is not set
751CONFIG_DEVPORT=y 692CONFIG_DEVPORT=y
752# CONFIG_I2C is not set 693# CONFIG_I2C is not set
@@ -756,21 +697,31 @@ CONFIG_DEVPORT=y
756# 697#
757# CONFIG_SPI is not set 698# CONFIG_SPI is not set
758# CONFIG_SPI_MASTER is not set 699# CONFIG_SPI_MASTER is not set
759
760#
761# Dallas's 1-wire bus
762#
763# CONFIG_W1 is not set 700# CONFIG_W1 is not set
701# CONFIG_POWER_SUPPLY is not set
764CONFIG_HWMON=y 702CONFIG_HWMON=y
765# CONFIG_HWMON_VID is not set 703# CONFIG_HWMON_VID is not set
766# CONFIG_SENSORS_ABITUGURU is not set
767# CONFIG_SENSORS_F71805F is not set 704# CONFIG_SENSORS_F71805F is not set
705# CONFIG_SENSORS_F71882FG is not set
706# CONFIG_SENSORS_IT87 is not set
707# CONFIG_SENSORS_PC87360 is not set
768# CONFIG_SENSORS_PC87427 is not set 708# CONFIG_SENSORS_PC87427 is not set
709# CONFIG_SENSORS_SIS5595 is not set
769# CONFIG_SENSORS_SMSC47M1 is not set 710# CONFIG_SENSORS_SMSC47M1 is not set
770# CONFIG_SENSORS_SMSC47B397 is not set 711# CONFIG_SENSORS_SMSC47B397 is not set
712# CONFIG_SENSORS_VIA686A is not set
771# CONFIG_SENSORS_VT1211 is not set 713# CONFIG_SENSORS_VT1211 is not set
714# CONFIG_SENSORS_VT8231 is not set
772# CONFIG_SENSORS_W83627HF is not set 715# CONFIG_SENSORS_W83627HF is not set
716# CONFIG_SENSORS_W83627EHF is not set
773# CONFIG_HWMON_DEBUG_CHIP is not set 717# CONFIG_HWMON_DEBUG_CHIP is not set
718# CONFIG_WATCHDOG is not set
719
720#
721# Sonics Silicon Backplane
722#
723CONFIG_SSB_POSSIBLE=y
724# CONFIG_SSB is not set
774 725
775# 726#
776# Multifunction device drivers 727# Multifunction device drivers
@@ -787,19 +738,16 @@ CONFIG_HWMON=y
787# 738#
788# Graphics support 739# Graphics support
789# 740#
790# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 741# CONFIG_DRM is not set
791
792#
793# Display device support
794#
795# CONFIG_DISPLAY_SUPPORT is not set
796# CONFIG_VGASTATE is not set 742# CONFIG_VGASTATE is not set
743# CONFIG_VIDEO_OUTPUT_CONTROL is not set
797CONFIG_FB=y 744CONFIG_FB=y
798# CONFIG_FIRMWARE_EDID is not set 745# CONFIG_FIRMWARE_EDID is not set
799# CONFIG_FB_DDC is not set 746# CONFIG_FB_DDC is not set
800# CONFIG_FB_CFB_FILLRECT is not set 747# CONFIG_FB_CFB_FILLRECT is not set
801# CONFIG_FB_CFB_COPYAREA is not set 748# CONFIG_FB_CFB_COPYAREA is not set
802# CONFIG_FB_CFB_IMAGEBLIT is not set 749# CONFIG_FB_CFB_IMAGEBLIT is not set
750# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
803# CONFIG_FB_SYS_FILLRECT is not set 751# CONFIG_FB_SYS_FILLRECT is not set
804# CONFIG_FB_SYS_COPYAREA is not set 752# CONFIG_FB_SYS_COPYAREA is not set
805# CONFIG_FB_SYS_IMAGEBLIT is not set 753# CONFIG_FB_SYS_IMAGEBLIT is not set
@@ -819,7 +767,6 @@ CONFIG_FB_DEFERRED_IO=y
819# CONFIG_FB_CYBER2000 is not set 767# CONFIG_FB_CYBER2000 is not set
820# CONFIG_FB_ASILIANT is not set 768# CONFIG_FB_ASILIANT is not set
821# CONFIG_FB_IMSTT is not set 769# CONFIG_FB_IMSTT is not set
822# CONFIG_FB_EPSON1355 is not set
823# CONFIG_FB_S1D13XXX is not set 770# CONFIG_FB_S1D13XXX is not set
824# CONFIG_FB_NVIDIA is not set 771# CONFIG_FB_NVIDIA is not set
825# CONFIG_FB_RIVA is not set 772# CONFIG_FB_RIVA is not set
@@ -839,6 +786,12 @@ CONFIG_FB_DEFERRED_IO=y
839# CONFIG_FB_ARK is not set 786# CONFIG_FB_ARK is not set
840# CONFIG_FB_PM3 is not set 787# CONFIG_FB_PM3 is not set
841# CONFIG_FB_VIRTUAL is not set 788# CONFIG_FB_VIRTUAL is not set
789# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
790
791#
792# Display device support
793#
794# CONFIG_DISPLAY_SUPPORT is not set
842# CONFIG_LOGO is not set 795# CONFIG_LOGO is not set
843 796
844# 797#
@@ -855,20 +808,14 @@ CONFIG_SOUND=m
855# Open Sound System 808# Open Sound System
856# 809#
857CONFIG_SOUND_PRIME=m 810CONFIG_SOUND_PRIME=m
858# CONFIG_OSS_OBSOLETE is not set
859# CONFIG_SOUND_TRIDENT is not set 811# CONFIG_SOUND_TRIDENT is not set
860# CONFIG_SOUND_MSNDCLAS is not set 812# CONFIG_SOUND_MSNDCLAS is not set
861# CONFIG_SOUND_MSNDPIN is not set 813# CONFIG_SOUND_MSNDPIN is not set
862 814CONFIG_HID_SUPPORT=y
863#
864# HID Devices
865#
866CONFIG_HID=y 815CONFIG_HID=y
867# CONFIG_HID_DEBUG is not set 816# CONFIG_HID_DEBUG is not set
868 817# CONFIG_HIDRAW is not set
869# 818CONFIG_USB_SUPPORT=y
870# USB support
871#
872CONFIG_USB_ARCH_HAS_HCD=y 819CONFIG_USB_ARCH_HAS_HCD=y
873CONFIG_USB_ARCH_HAS_OHCI=y 820CONFIG_USB_ARCH_HAS_OHCI=y
874CONFIG_USB_ARCH_HAS_EHCI=y 821CONFIG_USB_ARCH_HAS_EHCI=y
@@ -883,32 +830,8 @@ CONFIG_USB_ARCH_HAS_EHCI=y
883# 830#
884# CONFIG_USB_GADGET is not set 831# CONFIG_USB_GADGET is not set
885# CONFIG_MMC is not set 832# CONFIG_MMC is not set
886
887#
888# LED devices
889#
890# CONFIG_NEW_LEDS is not set 833# CONFIG_NEW_LEDS is not set
891
892#
893# LED drivers
894#
895
896#
897# LED Triggers
898#
899
900#
901# InfiniBand support
902#
903# CONFIG_INFINIBAND is not set 834# CONFIG_INFINIBAND is not set
904
905#
906# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
907#
908
909#
910# Real Time Clock
911#
912CONFIG_RTC_LIB=y 835CONFIG_RTC_LIB=y
913CONFIG_RTC_CLASS=y 836CONFIG_RTC_CLASS=y
914CONFIG_RTC_HCTOSYS=y 837CONFIG_RTC_HCTOSYS=y
@@ -925,10 +848,6 @@ CONFIG_RTC_INTF_DEV=y
925# CONFIG_RTC_DRV_TEST is not set 848# CONFIG_RTC_DRV_TEST is not set
926 849
927# 850#
928# I2C RTC drivers
929#
930
931#
932# SPI RTC drivers 851# SPI RTC drivers
933# 852#
934 853
@@ -936,8 +855,10 @@ CONFIG_RTC_INTF_DEV=y
936# Platform RTC drivers 855# Platform RTC drivers
937# 856#
938# CONFIG_RTC_DRV_DS1553 is not set 857# CONFIG_RTC_DRV_DS1553 is not set
858# CONFIG_RTC_DRV_STK17TA8 is not set
939# CONFIG_RTC_DRV_DS1742 is not set 859# CONFIG_RTC_DRV_DS1742 is not set
940# CONFIG_RTC_DRV_M48T86 is not set 860# CONFIG_RTC_DRV_M48T86 is not set
861# CONFIG_RTC_DRV_M48T59 is not set
941# CONFIG_RTC_DRV_V3020 is not set 862# CONFIG_RTC_DRV_V3020 is not set
942 863
943# 864#
@@ -946,17 +867,9 @@ CONFIG_RTC_INTF_DEV=y
946CONFIG_RTC_DRV_SH=y 867CONFIG_RTC_DRV_SH=y
947 868
948# 869#
949# DMA Engine support 870# Userspace I/O
950#
951# CONFIG_DMA_ENGINE is not set
952
953#
954# DMA Clients
955#
956
957#
958# DMA Devices
959# 871#
872# CONFIG_UIO is not set
960 873
961# 874#
962# File systems 875# File systems
@@ -1017,7 +930,6 @@ CONFIG_TMPFS=y
1017# CONFIG_TMPFS_POSIX_ACL is not set 930# CONFIG_TMPFS_POSIX_ACL is not set
1018CONFIG_HUGETLBFS=y 931CONFIG_HUGETLBFS=y
1019CONFIG_HUGETLB_PAGE=y 932CONFIG_HUGETLB_PAGE=y
1020CONFIG_RAMFS=y
1021CONFIG_CONFIGFS_FS=m 933CONFIG_CONFIGFS_FS=m
1022 934
1023# 935#
@@ -1036,10 +948,7 @@ CONFIG_CONFIGFS_FS=m
1036# CONFIG_QNX4FS_FS is not set 948# CONFIG_QNX4FS_FS is not set
1037# CONFIG_SYSV_FS is not set 949# CONFIG_SYSV_FS is not set
1038# CONFIG_UFS_FS is not set 950# CONFIG_UFS_FS is not set
1039 951CONFIG_NETWORK_FILESYSTEMS=y
1040#
1041# Network File Systems
1042#
1043CONFIG_NFS_FS=y 952CONFIG_NFS_FS=y
1044CONFIG_NFS_V3=y 953CONFIG_NFS_V3=y
1045# CONFIG_NFS_V3_ACL is not set 954# CONFIG_NFS_V3_ACL is not set
@@ -1065,17 +974,12 @@ CONFIG_RPCSEC_GSS_KRB5=y
1065# CONFIG_NCP_FS is not set 974# CONFIG_NCP_FS is not set
1066# CONFIG_CODA_FS is not set 975# CONFIG_CODA_FS is not set
1067# CONFIG_AFS_FS is not set 976# CONFIG_AFS_FS is not set
1068# CONFIG_9P_FS is not set
1069 977
1070# 978#
1071# Partition Types 979# Partition Types
1072# 980#
1073# CONFIG_PARTITION_ADVANCED is not set 981# CONFIG_PARTITION_ADVANCED is not set
1074CONFIG_MSDOS_PARTITION=y 982CONFIG_MSDOS_PARTITION=y
1075
1076#
1077# Native Language Support
1078#
1079CONFIG_NLS=y 983CONFIG_NLS=y
1080CONFIG_NLS_DEFAULT="iso8859-1" 984CONFIG_NLS_DEFAULT="iso8859-1"
1081CONFIG_NLS_CODEPAGE_437=y 985CONFIG_NLS_CODEPAGE_437=y
@@ -1116,23 +1020,18 @@ CONFIG_NLS_ISO8859_1=y
1116# CONFIG_NLS_KOI8_R is not set 1020# CONFIG_NLS_KOI8_R is not set
1117# CONFIG_NLS_KOI8_U is not set 1021# CONFIG_NLS_KOI8_U is not set
1118# CONFIG_NLS_UTF8 is not set 1022# CONFIG_NLS_UTF8 is not set
1119
1120#
1121# Distributed Lock Manager
1122#
1123# CONFIG_DLM is not set 1023# CONFIG_DLM is not set
1124 1024CONFIG_INSTRUMENTATION=y
1125#
1126# Profiling support
1127#
1128CONFIG_PROFILING=y 1025CONFIG_PROFILING=y
1129CONFIG_OPROFILE=m 1026CONFIG_OPROFILE=m
1027# CONFIG_MARKERS is not set
1130 1028
1131# 1029#
1132# Kernel hacking 1030# Kernel hacking
1133# 1031#
1134CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1032CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1135# CONFIG_PRINTK_TIME is not set 1033# CONFIG_PRINTK_TIME is not set
1034CONFIG_ENABLE_WARN_DEPRECATED=y
1136CONFIG_ENABLE_MUST_CHECK=y 1035CONFIG_ENABLE_MUST_CHECK=y
1137CONFIG_MAGIC_SYSRQ=y 1036CONFIG_MAGIC_SYSRQ=y
1138# CONFIG_UNUSED_SYMBOLS is not set 1037# CONFIG_UNUSED_SYMBOLS is not set
@@ -1141,6 +1040,7 @@ CONFIG_DEBUG_FS=y
1141CONFIG_DEBUG_KERNEL=y 1040CONFIG_DEBUG_KERNEL=y
1142# CONFIG_DEBUG_SHIRQ is not set 1041# CONFIG_DEBUG_SHIRQ is not set
1143# CONFIG_DETECT_SOFTLOCKUP is not set 1042# CONFIG_DETECT_SOFTLOCKUP is not set
1043CONFIG_SCHED_DEBUG=y
1144# CONFIG_SCHEDSTATS is not set 1044# CONFIG_SCHEDSTATS is not set
1145# CONFIG_TIMER_STATS is not set 1045# CONFIG_TIMER_STATS is not set
1146# CONFIG_DEBUG_SLAB is not set 1046# CONFIG_DEBUG_SLAB is not set
@@ -1150,6 +1050,7 @@ CONFIG_DEBUG_MUTEXES=y
1150CONFIG_DEBUG_LOCK_ALLOC=y 1050CONFIG_DEBUG_LOCK_ALLOC=y
1151# CONFIG_PROVE_LOCKING is not set 1051# CONFIG_PROVE_LOCKING is not set
1152CONFIG_LOCKDEP=y 1052CONFIG_LOCKDEP=y
1053# CONFIG_LOCK_STAT is not set
1153# CONFIG_DEBUG_LOCKDEP is not set 1054# CONFIG_DEBUG_LOCKDEP is not set
1154# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1055# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1155CONFIG_DEBUG_LOCKING_API_SELFTESTS=y 1056CONFIG_DEBUG_LOCKING_API_SELFTESTS=y
@@ -1159,17 +1060,21 @@ CONFIG_DEBUG_BUGVERBOSE=y
1159CONFIG_DEBUG_INFO=y 1060CONFIG_DEBUG_INFO=y
1160# CONFIG_DEBUG_VM is not set 1061# CONFIG_DEBUG_VM is not set
1161# CONFIG_DEBUG_LIST is not set 1062# CONFIG_DEBUG_LIST is not set
1063# CONFIG_DEBUG_SG is not set
1162CONFIG_FRAME_POINTER=y 1064CONFIG_FRAME_POINTER=y
1163CONFIG_FORCED_INLINING=y 1065CONFIG_FORCED_INLINING=y
1066# CONFIG_BOOT_PRINTK_DELAY is not set
1164# CONFIG_RCU_TORTURE_TEST is not set 1067# CONFIG_RCU_TORTURE_TEST is not set
1165# CONFIG_FAULT_INJECTION is not set 1068# CONFIG_FAULT_INJECTION is not set
1069# CONFIG_SAMPLES is not set
1166CONFIG_SH_STANDARD_BIOS=y 1070CONFIG_SH_STANDARD_BIOS=y
1167# CONFIG_EARLY_SCIF_CONSOLE is not set 1071# CONFIG_EARLY_SCIF_CONSOLE is not set
1168CONFIG_EARLY_PRINTK=y 1072CONFIG_EARLY_PRINTK=y
1169# CONFIG_DEBUG_BOOTMEM is not set 1073# CONFIG_DEBUG_BOOTMEM is not set
1170CONFIG_DEBUG_STACKOVERFLOW=y 1074CONFIG_DEBUG_STACKOVERFLOW=y
1171CONFIG_DEBUG_STACK_USAGE=y 1075CONFIG_DEBUG_STACK_USAGE=y
1172# CONFIG_4KSTACKS is not set 1076CONFIG_4KSTACKS=y
1077# CONFIG_IRQSTACKS is not set
1173# CONFIG_SH_KGDB is not set 1078# CONFIG_SH_KGDB is not set
1174 1079
1175# 1080#
@@ -1177,10 +1082,7 @@ CONFIG_DEBUG_STACK_USAGE=y
1177# 1082#
1178# CONFIG_KEYS is not set 1083# CONFIG_KEYS is not set
1179# CONFIG_SECURITY is not set 1084# CONFIG_SECURITY is not set
1180 1085# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1181#
1182# Cryptographic options
1183#
1184CONFIG_CRYPTO=y 1086CONFIG_CRYPTO=y
1185CONFIG_CRYPTO_ALGAPI=y 1087CONFIG_CRYPTO_ALGAPI=y
1186CONFIG_CRYPTO_BLKCIPHER=y 1088CONFIG_CRYPTO_BLKCIPHER=y
@@ -1201,6 +1103,7 @@ CONFIG_CRYPTO_ECB=m
1201CONFIG_CRYPTO_CBC=y 1103CONFIG_CRYPTO_CBC=y
1202CONFIG_CRYPTO_PCBC=m 1104CONFIG_CRYPTO_PCBC=m
1203# CONFIG_CRYPTO_LRW is not set 1105# CONFIG_CRYPTO_LRW is not set
1106# CONFIG_CRYPTO_XTS is not set
1204# CONFIG_CRYPTO_CRYPTD is not set 1107# CONFIG_CRYPTO_CRYPTD is not set
1205CONFIG_CRYPTO_DES=y 1108CONFIG_CRYPTO_DES=y
1206# CONFIG_CRYPTO_FCRYPT is not set 1109# CONFIG_CRYPTO_FCRYPT is not set
@@ -1214,15 +1117,14 @@ CONFIG_CRYPTO_DES=y
1214# CONFIG_CRYPTO_ARC4 is not set 1117# CONFIG_CRYPTO_ARC4 is not set
1215# CONFIG_CRYPTO_KHAZAD is not set 1118# CONFIG_CRYPTO_KHAZAD is not set
1216# CONFIG_CRYPTO_ANUBIS is not set 1119# CONFIG_CRYPTO_ANUBIS is not set
1120# CONFIG_CRYPTO_SEED is not set
1217# CONFIG_CRYPTO_DEFLATE is not set 1121# CONFIG_CRYPTO_DEFLATE is not set
1218# CONFIG_CRYPTO_MICHAEL_MIC is not set 1122# CONFIG_CRYPTO_MICHAEL_MIC is not set
1219# CONFIG_CRYPTO_CRC32C is not set 1123# CONFIG_CRYPTO_CRC32C is not set
1220# CONFIG_CRYPTO_CAMELLIA is not set 1124# CONFIG_CRYPTO_CAMELLIA is not set
1221# CONFIG_CRYPTO_TEST is not set 1125# CONFIG_CRYPTO_TEST is not set
1222 1126# CONFIG_CRYPTO_AUTHENC is not set
1223# 1127CONFIG_CRYPTO_HW=y
1224# Hardware crypto devices
1225#
1226 1128
1227# 1129#
1228# Library routines 1130# Library routines
@@ -1232,6 +1134,7 @@ CONFIG_BITREVERSE=y
1232# CONFIG_CRC16 is not set 1134# CONFIG_CRC16 is not set
1233# CONFIG_CRC_ITU_T is not set 1135# CONFIG_CRC_ITU_T is not set
1234CONFIG_CRC32=y 1136CONFIG_CRC32=y
1137# CONFIG_CRC7 is not set
1235# CONFIG_LIBCRC32C is not set 1138# CONFIG_LIBCRC32C is not set
1236CONFIG_HAS_IOMEM=y 1139CONFIG_HAS_IOMEM=y
1237CONFIG_HAS_IOPORT=y 1140CONFIG_HAS_IOPORT=y
diff --git a/arch/sh/drivers/pci/Makefile b/arch/sh/drivers/pci/Makefile
index 2f65ac72f48a..fba6b5ba0b3a 100644
--- a/arch/sh/drivers/pci/Makefile
+++ b/arch/sh/drivers/pci/Makefile
@@ -5,7 +5,6 @@
5obj-y += pci.o 5obj-y += pci.o
6obj-$(CONFIG_PCI_AUTO) += pci-auto.o 6obj-$(CONFIG_PCI_AUTO) += pci-auto.o
7 7
8obj-$(CONFIG_CPU_SUBTYPE_ST40STB1) += pci-st40.o
9obj-$(CONFIG_CPU_SUBTYPE_SH7751) += pci-sh7751.o ops-sh4.o 8obj-$(CONFIG_CPU_SUBTYPE_SH7751) += pci-sh7751.o ops-sh4.o
10obj-$(CONFIG_CPU_SUBTYPE_SH7751R) += pci-sh7751.o ops-sh4.o 9obj-$(CONFIG_CPU_SUBTYPE_SH7751R) += pci-sh7751.o ops-sh4.o
11obj-$(CONFIG_CPU_SUBTYPE_SH7780) += pci-sh7780.o ops-sh4.o 10obj-$(CONFIG_CPU_SUBTYPE_SH7780) += pci-sh7780.o ops-sh4.o
diff --git a/arch/sh/drivers/pci/pci-st40.c b/arch/sh/drivers/pci/pci-st40.c
deleted file mode 100644
index 1502a14386b6..000000000000
--- a/arch/sh/drivers/pci/pci-st40.c
+++ /dev/null
@@ -1,488 +0,0 @@
1/*
2 * Copyright (C) 2001 David J. Mckay (david.mckay@st.com)
3 *
4 * May be copied or modified under the terms of the GNU General Public
5 * License. See linux/COPYING for more information.
6 *
7 * Support functions for the ST40 PCI hardware.
8 */
9
10#include <linux/kernel.h>
11#include <linux/smp.h>
12#include <linux/init.h>
13#include <linux/errno.h>
14#include <linux/pci.h>
15#include <linux/delay.h>
16#include <linux/types.h>
17#include <asm/pci.h>
18#include <linux/irq.h>
19#include <linux/interrupt.h> /* irqreturn_t */
20
21#include "pci-st40.h"
22
23/* This is in P2 of course */
24#define ST40PCI_BASE_ADDRESS (0xb0000000)
25#define ST40PCI_MEM_ADDRESS (ST40PCI_BASE_ADDRESS+0x0)
26#define ST40PCI_IO_ADDRESS (ST40PCI_BASE_ADDRESS+0x06000000)
27#define ST40PCI_REG_ADDRESS (ST40PCI_BASE_ADDRESS+0x07000000)
28
29#define ST40PCI_REG(x) (ST40PCI_REG_ADDRESS+(ST40PCI_##x))
30#define ST40PCI_REG_INDEXED(reg, index) \
31 (ST40PCI_REG(reg##0) + \
32 ((ST40PCI_REG(reg##1) - ST40PCI_REG(reg##0))*index))
33
34#define ST40PCI_WRITE(reg,val) writel((val),ST40PCI_REG(reg))
35#define ST40PCI_WRITE_SHORT(reg,val) writew((val),ST40PCI_REG(reg))
36#define ST40PCI_WRITE_BYTE(reg,val) writeb((val),ST40PCI_REG(reg))
37#define ST40PCI_WRITE_INDEXED(reg, index, val) \
38 writel((val), ST40PCI_REG_INDEXED(reg, index));
39
40#define ST40PCI_READ(reg) readl(ST40PCI_REG(reg))
41#define ST40PCI_READ_SHORT(reg) readw(ST40PCI_REG(reg))
42#define ST40PCI_READ_BYTE(reg) readb(ST40PCI_REG(reg))
43
44#define ST40PCI_SERR_IRQ 64
45#define ST40PCI_ERR_IRQ 65
46
47
48/* Macros to extract PLL params */
49#define PLL_MDIV(reg) ( ((unsigned)reg) & 0xff )
50#define PLL_NDIV(reg) ( (((unsigned)reg)>>8) & 0xff )
51#define PLL_PDIV(reg) ( (((unsigned)reg)>>16) & 0x3 )
52#define PLL_SETUP(reg) ( (((unsigned)reg)>>19) & 0x1ff )
53
54/* Build up the appropriate settings */
55#define PLL_SET(mdiv,ndiv,pdiv,setup) \
56( ((mdiv)&0xff) | (((ndiv)&0xff)<<8) | (((pdiv)&3)<<16)| (((setup)&0x1ff)<<19))
57
58#define PLLPCICR (0xbb040000+0x10)
59
60#define PLLPCICR_POWERON (1<<28)
61#define PLLPCICR_OUT_EN (1<<29)
62#define PLLPCICR_LOCKSELECT (1<<30)
63#define PLLPCICR_LOCK (1<<31)
64
65
66#define PLL_25MHZ 0x793c8512
67#define PLL_33MHZ PLL_SET(18,88,3,295)
68
69static void pci_set_rbar_region(unsigned int region, unsigned long localAddr,
70 unsigned long pciOffset, unsigned long regionSize);
71
72static __init void SetPCIPLL(void)
73{
74 {
75 /* Lets play with the PLL values */
76 unsigned long pll1cr1;
77 unsigned long mdiv, ndiv, pdiv;
78 unsigned long muxcr;
79 unsigned int muxcr_ratios[4] = { 8, 16, 21, 1 };
80 unsigned int freq;
81
82#define CLKGENA 0xbb040000
83#define CLKGENA_PLL2_MUXCR CLKGENA + 0x48
84 pll1cr1 = ctrl_inl(PLLPCICR);
85 printk("PLL1CR1 %08lx\n", pll1cr1);
86 mdiv = PLL_MDIV(pll1cr1);
87 ndiv = PLL_NDIV(pll1cr1);
88 pdiv = PLL_PDIV(pll1cr1);
89 printk("mdiv %02lx ndiv %02lx pdiv %02lx\n", mdiv, ndiv, pdiv);
90 freq = ((2*27*ndiv)/mdiv) / (1 << pdiv);
91 printk("PLL freq %dMHz\n", freq);
92 muxcr = ctrl_inl(CLKGENA_PLL2_MUXCR);
93 printk("PCI freq %dMhz\n", freq / muxcr_ratios[muxcr & 3]);
94 }
95}
96
97
98struct pci_err {
99 unsigned mask;
100 const char *error_string;
101};
102
103static struct pci_err int_error[]={
104 { INT_MNLTDIM,"MNLTDIM: Master non-lock transfer"},
105 { INT_TTADI, "TTADI: Illegal byte enable in I/O transfer"},
106 { INT_TMTO, "TMTO: Target memory read/write timeout"},
107 { INT_MDEI, "MDEI: Master function disable error"},
108 { INT_APEDI, "APEDI: Address parity error"},
109 { INT_SDI, "SDI: SERR detected"},
110 { INT_DPEITW, "DPEITW: Data parity error target write"},
111 { INT_PEDITR, "PEDITR: PERR detected"},
112 { INT_TADIM, "TADIM: Target abort detected"},
113 { INT_MADIM, "MADIM: Master abort detected"},
114 { INT_MWPDI, "MWPDI: PERR from target at data write"},
115 { INT_MRDPEI, "MRDPEI: Master read data parity error"}
116};
117#define NUM_PCI_INT_ERRS (sizeof(int_error)/sizeof(struct pci_err))
118
119static struct pci_err aint_error[]={
120 { AINT_MBI, "MBI: Master broken"},
121 { AINT_TBTOI, "TBTOI: Target bus timeout"},
122 { AINT_MBTOI, "MBTOI: Master bus timeout"},
123 { AINT_TAI, "TAI: Target abort"},
124 { AINT_MAI, "MAI: Master abort"},
125 { AINT_RDPEI, "RDPEI: Read data parity"},
126 { AINT_WDPE, "WDPE: Write data parity"}
127};
128
129#define NUM_PCI_AINT_ERRS (sizeof(aint_error)/sizeof(struct pci_err))
130
131static void print_pci_errors(unsigned reg,struct pci_err *error,int num_errors)
132{
133 int i;
134
135 for(i=0;i<num_errors;i++) {
136 if(reg & error[i].mask) {
137 printk("%s\n",error[i].error_string);
138 }
139 }
140
141}
142
143
144static char * pci_commands[16]={
145 "Int Ack",
146 "Special Cycle",
147 "I/O Read",
148 "I/O Write",
149 "Reserved",
150 "Reserved",
151 "Memory Read",
152 "Memory Write",
153 "Reserved",
154 "Reserved",
155 "Configuration Read",
156 "Configuration Write",
157 "Memory Read Multiple",
158 "Dual Address Cycle",
159 "Memory Read Line",
160 "Memory Write-and-Invalidate"
161};
162
163static irqreturn_t st40_pci_irq(int irq, void *dev_instance)
164{
165 unsigned pci_int, pci_air, pci_cir, pci_aint;
166 static int count=0;
167
168
169 pci_int = ST40PCI_READ(INT);pci_aint = ST40PCI_READ(AINT);
170 pci_cir = ST40PCI_READ(CIR);pci_air = ST40PCI_READ(AIR);
171
172 /* Reset state to stop multiple interrupts */
173 ST40PCI_WRITE(INT, ~0); ST40PCI_WRITE(AINT, ~0);
174
175
176 if(++count>1) return IRQ_HANDLED;
177
178 printk("** PCI ERROR **\n");
179
180 if(pci_int) {
181 printk("** INT register status\n");
182 print_pci_errors(pci_int,int_error,NUM_PCI_INT_ERRS);
183 }
184
185 if(pci_aint) {
186 printk("** AINT register status\n");
187 print_pci_errors(pci_aint,aint_error,NUM_PCI_AINT_ERRS);
188 }
189
190 printk("** Address and command info\n");
191
192 printk("** Command %s : Address 0x%x\n",
193 pci_commands[pci_cir&0xf],pci_air);
194
195 if(pci_cir&CIR_PIOTEM) {
196 printk("CIR_PIOTEM:PIO transfer error for master\n");
197 }
198 if(pci_cir&CIR_RWTET) {
199 printk("CIR_RWTET:Read/Write transfer error for target\n");
200 }
201
202 return IRQ_HANDLED;
203}
204
205
206/* Rounds a number UP to the nearest power of two. Used for
207 * sizing the PCI window.
208 */
209static u32 r2p2(u32 num)
210{
211 int i = 31;
212 u32 tmp = num;
213
214 if (num == 0)
215 return 0;
216
217 do {
218 if (tmp & (1 << 31))
219 break;
220 i--;
221 tmp <<= 1;
222 } while (i >= 0);
223
224 tmp = 1 << i;
225 /* If the original number isn't a power of 2, round it up */
226 if (tmp != num)
227 tmp <<= 1;
228
229 return tmp;
230}
231
232static void __init pci_fixup_ide_bases(struct pci_dev *d)
233{
234 int i;
235
236 /*
237 * PCI IDE controllers use non-standard I/O port decoding, respect it.
238 */
239 if ((d->class >> 8) != PCI_CLASS_STORAGE_IDE)
240 return;
241 printk("PCI: IDE base address fixup for %s\n", pci_name(d));
242 for(i=0; i<4; i++) {
243 struct resource *r = &d->resource[i];
244 if ((r->start & ~0x80) == 0x374) {
245 r->start |= 2;
246 r->end = r->start;
247 }
248 }
249}
250DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases);
251
252int __init st40pci_init(unsigned memStart, unsigned memSize)
253{
254 u32 lsr0;
255
256 SetPCIPLL();
257
258 /* Initialises the ST40 pci subsystem, performing a reset, then programming
259 * up the address space decoders appropriately
260 */
261
262 /* Should reset core here as well methink */
263
264 ST40PCI_WRITE(CR, CR_LOCK_MASK | CR_SOFT_RESET);
265
266 /* Loop while core resets */
267 while (ST40PCI_READ(CR) & CR_SOFT_RESET);
268
269 /* Switch off interrupts */
270 ST40PCI_WRITE(INTM, 0);
271 ST40PCI_WRITE(AINT, 0);
272
273 /* Now, lets reset all the cards on the bus with extreme prejudice */
274 ST40PCI_WRITE(CR, CR_LOCK_MASK | CR_RSTCTL);
275 udelay(250);
276
277 /* Set bus active, take it out of reset */
278 ST40PCI_WRITE(CR, CR_LOCK_MASK | CR_BMAM | CR_CFINT | CR_PFCS | CR_PFE);
279
280 /* The PCI spec says that no access must be made to the bus until 1 second
281 * after reset. This seem ludicrously long, but some delay is needed here
282 */
283 mdelay(1000);
284
285 /* Switch off interrupts */
286 ST40PCI_WRITE(INTM, 0);
287 ST40PCI_WRITE(AINT, 0);
288
289 /* Allow it to be a master */
290
291 ST40PCI_WRITE_SHORT(CSR_CMD,
292 PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER |
293 PCI_COMMAND_IO);
294
295 /* Access to the 0xb0000000 -> 0xb6000000 area will go through to 0x10000000 -> 0x16000000
296 * on the PCI bus. This allows a nice 1-1 bus to phys mapping.
297 */
298
299
300 ST40PCI_WRITE(MBR, 0x10000000);
301 /* Always set the max size 128M (actually, it is only 96MB wide) */
302 ST40PCI_WRITE(MBMR, 0x07ff0000);
303
304 /* I/O addresses are mapped at 0xb6000000 -> 0xb7000000. These are changed to 0, to
305 * allow cards that have legacy io such as vga to function correctly. This gives a
306 * maximum of 64K of io/space as only the bottom 16 bits of the address are copied
307 * over to the bus when the transaction is made. 64K of io space is more than enough
308 */
309 ST40PCI_WRITE(IOBR, 0x0);
310 /* Set up the 64K window */
311 ST40PCI_WRITE(IOBMR, 0x0);
312
313 /* Now we set up the mbars so the PCI bus can see the local memory */
314 /* Expose a 256M window starting at PCI address 0... */
315 ST40PCI_WRITE(CSR_MBAR0, 0);
316 ST40PCI_WRITE(LSR0, 0x0fff0001);
317
318 /* ... and set up the initial incoming window to expose all of RAM */
319 pci_set_rbar_region(7, memStart, memStart, memSize);
320
321 /* Maximise timeout values */
322 ST40PCI_WRITE_BYTE(CSR_TRDY, 0xff);
323 ST40PCI_WRITE_BYTE(CSR_RETRY, 0xff);
324 ST40PCI_WRITE_BYTE(CSR_MIT, 0xff);
325
326 ST40PCI_WRITE_BYTE(PERF,PERF_MASTER_WRITE_POSTING);
327
328 return 1;
329}
330
331char * __devinit pcibios_setup(char *str)
332{
333 return str;
334}
335
336
337#define SET_CONFIG_BITS(bus,devfn,where)\
338 (((bus) << 16) | ((devfn) << 8) | ((where) & ~3) | (bus!=0))
339
340#define CONFIG_CMD(bus, devfn, where) SET_CONFIG_BITS(bus->number,devfn,where)
341
342
343static int CheckForMasterAbort(void)
344{
345 if (ST40PCI_READ(INT) & INT_MADIM) {
346 /* Should we clear config space version as well ??? */
347 ST40PCI_WRITE(INT, INT_MADIM);
348 ST40PCI_WRITE_SHORT(CSR_STATUS, 0);
349 return 1;
350 }
351
352 return 0;
353}
354
355/* Write to config register */
356static int st40pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * val)
357{
358 ST40PCI_WRITE(PAR, CONFIG_CMD(bus, devfn, where));
359 switch (size) {
360 case 1:
361 *val = (u8)ST40PCI_READ_BYTE(PDR + (where & 3));
362 break;
363 case 2:
364 *val = (u16)ST40PCI_READ_SHORT(PDR + (where & 2));
365 break;
366 case 4:
367 *val = ST40PCI_READ(PDR);
368 break;
369 }
370
371 if (CheckForMasterAbort()){
372 switch (size) {
373 case 1:
374 *val = (u8)0xff;
375 break;
376 case 2:
377 *val = (u16)0xffff;
378 break;
379 case 4:
380 *val = 0xffffffff;
381 break;
382 }
383 }
384
385 return PCIBIOS_SUCCESSFUL;
386}
387
388static int st40pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val)
389{
390 ST40PCI_WRITE(PAR, CONFIG_CMD(bus, devfn, where));
391
392 switch (size) {
393 case 1:
394 ST40PCI_WRITE_BYTE(PDR + (where & 3), (u8)val);
395 break;
396 case 2:
397 ST40PCI_WRITE_SHORT(PDR + (where & 2), (u16)val);
398 break;
399 case 4:
400 ST40PCI_WRITE(PDR, val);
401 break;
402 }
403
404 CheckForMasterAbort();
405
406 return PCIBIOS_SUCCESSFUL;
407}
408
409struct pci_ops st40pci_config_ops = {
410 .read = st40pci_read,
411 .write = st40pci_write,
412};
413
414
415/* Everything hangs off this */
416static struct pci_bus *pci_root_bus;
417
418static int __init pcibios_init(void)
419{
420 extern unsigned long memory_start, memory_end;
421
422 printk(KERN_ALERT "pci-st40.c: pcibios_init\n");
423
424 if (sh_mv.mv_init_pci != NULL) {
425 sh_mv.mv_init_pci();
426 }
427
428 /* The pci subsytem needs to know where memory is and how much
429 * of it there is. I've simply made these globals. A better mechanism
430 * is probably needed.
431 */
432 st40pci_init(PHYSADDR(memory_start),
433 PHYSADDR(memory_end) - PHYSADDR(memory_start));
434
435 if (request_irq(ST40PCI_ERR_IRQ, st40_pci_irq,
436 IRQF_DISABLED, "st40pci", NULL)) {
437 printk(KERN_ERR "st40pci: Cannot hook interrupt\n");
438 return -EIO;
439 }
440
441 /* Enable the PCI interrupts on the device */
442 ST40PCI_WRITE(INTM, ~0);
443 ST40PCI_WRITE(AINT, ~0);
444
445 /* Map the io address apprioately */
446#ifdef CONFIG_HD64465
447 hd64465_port_map(PCIBIOS_MIN_IO, (64 * 1024) - PCIBIOS_MIN_IO + 1,
448 ST40_IO_ADDR + PCIBIOS_MIN_IO, 0);
449#endif
450
451 /* ok, do the scan man */
452 pci_root_bus = pci_scan_bus(0, &st40pci_config_ops, NULL);
453 pci_assign_unassigned_resources();
454
455 return 0;
456}
457subsys_initcall(pcibios_init);
458
459/*
460 * Publish a region of local address space over the PCI bus
461 * to other devices.
462 */
463static void pci_set_rbar_region(unsigned int region, unsigned long localAddr,
464 unsigned long pciOffset, unsigned long regionSize)
465{
466 unsigned long mask;
467
468 if (region > 7)
469 return;
470
471 if (regionSize > (512 * 1024 * 1024))
472 return;
473
474 mask = r2p2(regionSize) - 0x10000;
475
476 /* Disable the region (in case currently in use, should never happen) */
477 ST40PCI_WRITE_INDEXED(RSR, region, 0);
478
479 /* Start of local address space to publish */
480 ST40PCI_WRITE_INDEXED(RLAR, region, PHYSADDR(localAddr) );
481
482 /* Start of region in PCI address space as an offset from MBAR0 */
483 ST40PCI_WRITE_INDEXED(RBAR, region, pciOffset);
484
485 /* Size of region */
486 ST40PCI_WRITE_INDEXED(RSR, region, mask | 1);
487}
488
diff --git a/arch/sh/drivers/pci/pci-st40.h b/arch/sh/drivers/pci/pci-st40.h
deleted file mode 100644
index cf0d35bd135c..000000000000
--- a/arch/sh/drivers/pci/pci-st40.h
+++ /dev/null
@@ -1,136 +0,0 @@
1/*
2 * Copyright (C) 2001 David J. Mckay (david.mckay@st.com)
3 *
4 * May be copied or modified under the terms of the GNU General Public
5 * License. See linux/COPYING for more information.
6 *
7 * Definitions for the ST40 PCI hardware.
8 */
9
10#ifndef __PCI_ST40_H__
11#define __PCI_ST40_H__
12
13#define ST40PCI_VCR_STATUS 0x00
14
15#define ST40PCI_VCR_VERSION 0x08
16
17#define ST40PCI_CR 0x10
18
19#define CR_SOFT_RESET (1<<12)
20#define CR_PFCS (1<<11)
21#define CR_PFE (1<<9)
22#define CR_BMAM (1<<6)
23#define CR_HOST (1<<5)
24#define CR_CLKEN (1<<4)
25#define CR_SOCS (1<<3)
26#define CR_IOCS (1<<2)
27#define CR_RSTCTL (1<<1)
28#define CR_CFINT (1<<0)
29#define CR_LOCK_MASK 0x5a000000
30
31
32#define ST40PCI_LSR0 0X14
33#define ST40PCI_LAR0 0x1c
34
35#define ST40PCI_INT 0x24
36#define INT_MNLTDIM (1<<15)
37#define INT_TTADI (1<<14)
38#define INT_TMTO (1<<9)
39#define INT_MDEI (1<<8)
40#define INT_APEDI (1<<7)
41#define INT_SDI (1<<6)
42#define INT_DPEITW (1<<5)
43#define INT_PEDITR (1<<4)
44#define INT_TADIM (1<<3)
45#define INT_MADIM (1<<2)
46#define INT_MWPDI (1<<1)
47#define INT_MRDPEI (1<<0)
48
49
50#define ST40PCI_INTM 0x28
51#define ST40PCI_AIR 0x2c
52
53#define ST40PCI_CIR 0x30
54#define CIR_PIOTEM (1<<31)
55#define CIR_RWTET (1<<26)
56
57#define ST40PCI_AINT 0x40
58#define AINT_MBI (1<<13)
59#define AINT_TBTOI (1<<12)
60#define AINT_MBTOI (1<<11)
61#define AINT_TAI (1<<3)
62#define AINT_MAI (1<<2)
63#define AINT_RDPEI (1<<1)
64#define AINT_WDPE (1<<0)
65
66#define ST40PCI_AINTM 0x44
67#define ST40PCI_BMIR 0x48
68#define ST40PCI_PAR 0x4c
69#define ST40PCI_MBR 0x50
70#define ST40PCI_IOBR 0x54
71#define ST40PCI_PINT 0x58
72#define ST40PCI_PINTM 0x5c
73#define ST40PCI_MBMR 0x70
74#define ST40PCI_IOBMR 0x74
75#define ST40PCI_PDR 0x78
76
77/* H8 specific registers start here */
78#define ST40PCI_WCBAR 0x7c
79#define ST40PCI_LOCCFG_UNLOCK 0x34
80
81#define ST40PCI_RBAR0 0x100
82#define ST40PCI_RSR0 0x104
83#define ST40PCI_RLAR0 0x108
84
85#define ST40PCI_RBAR1 0x110
86#define ST40PCI_RSR1 0x114
87#define ST40PCI_RLAR1 0x118
88
89
90#define ST40PCI_RBAR2 0x120
91#define ST40PCI_RSR2 0x124
92#define ST40PCI_RLAR2 0x128
93
94#define ST40PCI_RBAR3 0x130
95#define ST40PCI_RSR3 0x134
96#define ST40PCI_RLAR3 0x138
97
98#define ST40PCI_RBAR4 0x140
99#define ST40PCI_RSR4 0x144
100#define ST40PCI_RLAR4 0x148
101
102#define ST40PCI_RBAR5 0x150
103#define ST40PCI_RSR5 0x154
104#define ST40PCI_RLAR5 0x158
105
106#define ST40PCI_RBAR6 0x160
107#define ST40PCI_RSR6 0x164
108#define ST40PCI_RLAR6 0x168
109
110#define ST40PCI_RBAR7 0x170
111#define ST40PCI_RSR7 0x174
112#define ST40PCI_RLAR7 0x178
113
114
115#define ST40PCI_RBAR(n) (0x100+(0x10*(n)))
116#define ST40PCI_RSR(n) (0x104+(0x10*(n)))
117#define ST40PCI_RLAR(n) (0x108+(0x10*(n)))
118
119#define ST40PCI_PERF 0x80
120#define PERF_MASTER_WRITE_POSTING (1<<4)
121/* H8 specific registers end here */
122
123
124/* These are configs space registers */
125#define ST40PCI_CSR_VID 0x10000
126#define ST40PCI_CSR_DID 0x10002
127#define ST40PCI_CSR_CMD 0x10004
128#define ST40PCI_CSR_STATUS 0x10006
129#define ST40PCI_CSR_MBAR0 0x10010
130#define ST40PCI_CSR_TRDY 0x10040
131#define ST40PCI_CSR_RETRY 0x10041
132#define ST40PCI_CSR_MIT 0x1000d
133
134#define ST40_IO_ADDR 0xb6000000
135
136#endif /* __PCI_ST40_H__ */
diff --git a/arch/sh/kernel/Makefile b/arch/sh/kernel/Makefile
index 1f141a8ba17c..4b81d9c47b00 100644
--- a/arch/sh/kernel/Makefile
+++ b/arch/sh/kernel/Makefile
@@ -10,7 +10,6 @@ obj-y := debugtraps.o io.o io_generic.o irq.o machvec.o process.o ptrace.o \
10 10
11obj-y += cpu/ timers/ 11obj-y += cpu/ timers/
12obj-$(CONFIG_VSYSCALL) += vsyscall/ 12obj-$(CONFIG_VSYSCALL) += vsyscall/
13
14obj-$(CONFIG_SMP) += smp.o 13obj-$(CONFIG_SMP) += smp.o
15obj-$(CONFIG_CF_ENABLER) += cf-enabler.o 14obj-$(CONFIG_CF_ENABLER) += cf-enabler.o
16obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o 15obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o
@@ -22,3 +21,5 @@ obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
22obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 21obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
23obj-$(CONFIG_PM) += pm.o 22obj-$(CONFIG_PM) += pm.o
24obj-$(CONFIG_STACKTRACE) += stacktrace.o 23obj-$(CONFIG_STACKTRACE) += stacktrace.o
24
25EXTRA_CFLAGS += -Werror
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c
index 5da325414880..56ea7b269b59 100644
--- a/arch/sh/kernel/cpu/irq/ipr.c
+++ b/arch/sh/kernel/cpu/irq/ipr.c
@@ -49,7 +49,6 @@ static void enable_ipr_irq(unsigned int irq)
49 * bits/4. This is to make it easier to read the value directly from the 49 * bits/4. This is to make it easier to read the value directly from the
50 * datasheets. The IPR address is calculated using the ipr_offset table. 50 * datasheets. The IPR address is calculated using the ipr_offset table.
51 */ 51 */
52
53void register_ipr_controller(struct ipr_desc *desc) 52void register_ipr_controller(struct ipr_desc *desc)
54{ 53{
55 int i; 54 int i;
@@ -71,12 +70,4 @@ void register_ipr_controller(struct ipr_desc *desc)
71 disable_ipr_irq(p->irq); 70 disable_ipr_irq(p->irq);
72 } 71 }
73} 72}
74
75EXPORT_SYMBOL(register_ipr_controller); 73EXPORT_SYMBOL(register_ipr_controller);
76
77#if !defined(CONFIG_CPU_HAS_PINT_IRQ)
78int ipr_irq_demux(int irq)
79{
80 return irq;
81}
82#endif
diff --git a/arch/sh/kernel/cpu/sh3/ex.S b/arch/sh/kernel/cpu/sh3/ex.S
index 2b2a9e02fb75..b6abf38d3a8d 100644
--- a/arch/sh/kernel/cpu/sh3/ex.S
+++ b/arch/sh/kernel/cpu/sh3/ex.S
@@ -46,7 +46,7 @@ ENTRY(exception_handling_table)
46 .long exception_error ! illegal_slot_instruction (filled by trap_init) /*1A0*/ 46 .long exception_error ! illegal_slot_instruction (filled by trap_init) /*1A0*/
47ENTRY(nmi_slot) 47ENTRY(nmi_slot)
48#if defined (CONFIG_KGDB_NMI) 48#if defined (CONFIG_KGDB_NMI)
49 .long debug_enter /* 1C0 */ ! Allow trap to debugger 49 .long kgdb_handle_exception /* 1C0 */ ! Allow trap to debugger
50#else 50#else
51 .long exception_none /* 1C0 */ ! Not implemented yet 51 .long exception_none /* 1C0 */ ! Not implemented yet
52#endif 52#endif
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c
index 21375d777e99..bc9c28a69bf1 100644
--- a/arch/sh/kernel/cpu/sh4/probe.c
+++ b/arch/sh/kernel/cpu/sh4/probe.c
@@ -139,14 +139,6 @@ int __init detect_cpu_and_cache_system(void)
139 boot_cpu_data.flags |= CPU_HAS_FPU | CPU_HAS_PERF_COUNTER | 139 boot_cpu_data.flags |= CPU_HAS_FPU | CPU_HAS_PERF_COUNTER |
140 CPU_HAS_LLSC; 140 CPU_HAS_LLSC;
141 break; 141 break;
142 case 0x8000:
143 boot_cpu_data.type = CPU_ST40RA;
144 boot_cpu_data.flags |= CPU_HAS_FPU;
145 break;
146 case 0x8100:
147 boot_cpu_data.type = CPU_ST40GX1;
148 boot_cpu_data.flags |= CPU_HAS_FPU;
149 break;
150 case 0x700: 142 case 0x700:
151 boot_cpu_data.type = CPU_SH4_501; 143 boot_cpu_data.type = CPU_SH4_501;
152 boot_cpu_data.icache.ways = 2; 144 boot_cpu_data.icache.ways = 2;
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index 55f66104431d..b9c6547c4a90 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -14,6 +14,32 @@
14#include <asm/mmzone.h> 14#include <asm/mmzone.h>
15#include <asm/sci.h> 15#include <asm/sci.h>
16 16
17static struct resource usbf_resources[] = {
18 [0] = {
19 .name = "m66592_udc",
20 .start = 0xA4480000,
21 .end = 0xA44800FF,
22 .flags = IORESOURCE_MEM,
23 },
24 [1] = {
25 .name = "m66592_udc",
26 .start = 65,
27 .end = 65,
28 .flags = IORESOURCE_IRQ,
29 },
30};
31
32static struct platform_device usbf_device = {
33 .name = "m66592_udc",
34 .id = -1,
35 .dev = {
36 .dma_mask = NULL,
37 .coherent_dma_mask = 0xffffffff,
38 },
39 .num_resources = ARRAY_SIZE(usbf_resources),
40 .resource = usbf_resources,
41};
42
17static struct plat_sci_port sci_platform_data[] = { 43static struct plat_sci_port sci_platform_data[] = {
18 { 44 {
19 .mapbase = 0xffe00000, 45 .mapbase = 0xffe00000,
@@ -47,6 +73,7 @@ static struct platform_device sci_device = {
47}; 73};
48 74
49static struct platform_device *sh7722_devices[] __initdata = { 75static struct platform_device *sh7722_devices[] __initdata = {
76 &usbf_device,
50 &sci_device, 77 &sci_device,
51}; 78};
52 79
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
index 4b49d03ffbd2..0586bc62ad96 100644
--- a/arch/sh/kernel/irq.c
+++ b/arch/sh/kernel/irq.c
@@ -11,7 +11,6 @@
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/kernel_stat.h> 12#include <linux/kernel_stat.h>
13#include <linux/seq_file.h> 13#include <linux/seq_file.h>
14#include <linux/irq.h>
15#include <asm/processor.h> 14#include <asm/processor.h>
16#include <asm/machvec.h> 15#include <asm/machvec.h>
17#include <asm/uaccess.h> 16#include <asm/uaccess.h>
@@ -69,7 +68,7 @@ unlock:
69} 68}
70#endif 69#endif
71 70
72#ifdef CONFIG_4KSTACKS 71#ifdef CONFIG_IRQSTACKS
73/* 72/*
74 * per-CPU IRQ handling contexts (thread information and stack) 73 * per-CPU IRQ handling contexts (thread information and stack)
75 */ 74 */
@@ -85,7 +84,7 @@ static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly;
85asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs) 84asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
86{ 85{
87 struct pt_regs *old_regs = set_irq_regs(regs); 86 struct pt_regs *old_regs = set_irq_regs(regs);
88#ifdef CONFIG_4KSTACKS 87#ifdef CONFIG_IRQSTACKS
89 union irq_ctx *curctx, *irqctx; 88 union irq_ctx *curctx, *irqctx;
90#endif 89#endif
91 90
@@ -109,7 +108,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
109 108
110 irq = irq_demux(evt2irq(irq)); 109 irq = irq_demux(evt2irq(irq));
111 110
112#ifdef CONFIG_4KSTACKS 111#ifdef CONFIG_IRQSTACKS
113 curctx = (union irq_ctx *)current_thread_info(); 112 curctx = (union irq_ctx *)current_thread_info();
114 irqctx = hardirq_ctx[smp_processor_id()]; 113 irqctx = hardirq_ctx[smp_processor_id()];
115 114
@@ -157,7 +156,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
157 return 1; 156 return 1;
158} 157}
159 158
160#ifdef CONFIG_4KSTACKS 159#ifdef CONFIG_IRQSTACKS
161static char softirq_stack[NR_CPUS * THREAD_SIZE] 160static char softirq_stack[NR_CPUS * THREAD_SIZE]
162 __attribute__((__section__(".bss.page_aligned"))); 161 __attribute__((__section__(".bss.page_aligned")));
163 162
diff --git a/arch/sh/kernel/kgdb_stub.c b/arch/sh/kernel/kgdb_stub.c
index 2fdc700dfd6e..d453c3a1c79f 100644
--- a/arch/sh/kernel/kgdb_stub.c
+++ b/arch/sh/kernel/kgdb_stub.c
@@ -102,6 +102,7 @@
102#include <linux/init.h> 102#include <linux/init.h>
103#include <linux/console.h> 103#include <linux/console.h>
104#include <linux/sysrq.h> 104#include <linux/sysrq.h>
105#include <linux/module.h>
105#include <asm/system.h> 106#include <asm/system.h>
106#include <asm/cacheflush.h> 107#include <asm/cacheflush.h>
107#include <asm/current.h> 108#include <asm/current.h>
@@ -116,7 +117,9 @@ kgdb_debug_hook_t *kgdb_debug_hook;
116kgdb_bus_error_hook_t *kgdb_bus_err_hook; 117kgdb_bus_error_hook_t *kgdb_bus_err_hook;
117 118
118int (*kgdb_getchar)(void); 119int (*kgdb_getchar)(void);
120EXPORT_SYMBOL_GPL(kgdb_getchar);
119void (*kgdb_putchar)(int); 121void (*kgdb_putchar)(int);
122EXPORT_SYMBOL_GPL(kgdb_putchar);
120 123
121static void put_debug_char(int c) 124static void put_debug_char(int c)
122{ 125{
@@ -136,7 +139,7 @@ static int get_debug_char(void)
136#define NUMREGBYTES (MAXREG*4) 139#define NUMREGBYTES (MAXREG*4)
137#define OUTBUFMAX (NUMREGBYTES*2+512) 140#define OUTBUFMAX (NUMREGBYTES*2+512)
138 141
139enum regs { 142enum {
140 R0 = 0, R1, R2, R3, R4, R5, R6, R7, 143 R0 = 0, R1, R2, R3, R4, R5, R6, R7,
141 R8, R9, R10, R11, R12, R13, R14, R15, 144 R8, R9, R10, R11, R12, R13, R14, R15,
142 PC, PR, GBR, VBR, MACH, MACL, SR, 145 PC, PR, GBR, VBR, MACH, MACL, SR,
@@ -176,9 +179,13 @@ int kgdb_nofault; /* Boolean to ignore bus errs (i.e. in GDB) */
176 179
177/* SCI/UART settings, used in kgdb_console_setup() */ 180/* SCI/UART settings, used in kgdb_console_setup() */
178int kgdb_portnum = CONFIG_KGDB_DEFPORT; 181int kgdb_portnum = CONFIG_KGDB_DEFPORT;
182EXPORT_SYMBOL_GPL(kgdb_portnum);
179int kgdb_baud = CONFIG_KGDB_DEFBAUD; 183int kgdb_baud = CONFIG_KGDB_DEFBAUD;
184EXPORT_SYMBOL_GPL(kgdb_baud);
180char kgdb_parity = CONFIG_KGDB_DEFPARITY; 185char kgdb_parity = CONFIG_KGDB_DEFPARITY;
186EXPORT_SYMBOL_GPL(kgdb_parity);
181char kgdb_bits = CONFIG_KGDB_DEFBITS; 187char kgdb_bits = CONFIG_KGDB_DEFBITS;
188EXPORT_SYMBOL_GPL(kgdb_bits);
182 189
183/* Jump buffer for setjmp/longjmp */ 190/* Jump buffer for setjmp/longjmp */
184static jmp_buf rem_com_env; 191static jmp_buf rem_com_env;
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index b749403f6b38..4156aac8c27d 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -32,12 +32,6 @@
32#include <asm/clock.h> 32#include <asm/clock.h>
33#include <asm/mmu_context.h> 33#include <asm/mmu_context.h>
34 34
35extern void * __rd_start, * __rd_end;
36
37/*
38 * Machine setup..
39 */
40
41/* 35/*
42 * Initialize loops_per_jiffy as 10000000 (1000MIPS). 36 * Initialize loops_per_jiffy as 10000000 (1000MIPS).
43 * This value will be used at the very early stage of serial setup. 37 * This value will be used at the very early stage of serial setup.
@@ -63,33 +57,25 @@ struct screen_info screen_info;
63 57
64extern int root_mountflags; 58extern int root_mountflags;
65 59
66/*
67 * This is set up by the setup-routine at boot-time
68 */
69#define PARAM ((unsigned char *)empty_zero_page)
70
71#define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000))
72#define RAMDISK_FLAGS (*(unsigned long *) (PARAM+0x004))
73#define ORIG_ROOT_DEV (*(unsigned long *) (PARAM+0x008))
74#define LOADER_TYPE (*(unsigned long *) (PARAM+0x00c))
75#define INITRD_START (*(unsigned long *) (PARAM+0x010))
76#define INITRD_SIZE (*(unsigned long *) (PARAM+0x014))
77/* ... */
78#define COMMAND_LINE ((char *) (PARAM+0x100))
79
80#define RAMDISK_IMAGE_START_MASK 0x07FF 60#define RAMDISK_IMAGE_START_MASK 0x07FF
81#define RAMDISK_PROMPT_FLAG 0x8000 61#define RAMDISK_PROMPT_FLAG 0x8000
82#define RAMDISK_LOAD_FLAG 0x4000 62#define RAMDISK_LOAD_FLAG 0x4000
83 63
84static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, }; 64static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, };
85 65
86static struct resource code_resource = { .name = "Kernel code", }; 66static struct resource code_resource = {
87static struct resource data_resource = { .name = "Kernel data", }; 67 .name = "Kernel code",
68 .flags = IORESOURCE_BUSY | IORESOURCE_MEM,
69};
70
71static struct resource data_resource = {
72 .name = "Kernel data",
73 .flags = IORESOURCE_BUSY | IORESOURCE_MEM,
74};
88 75
89unsigned long memory_start; 76unsigned long memory_start;
90EXPORT_SYMBOL(memory_start); 77EXPORT_SYMBOL(memory_start);
91 78unsigned long memory_end = 0;
92unsigned long memory_end;
93EXPORT_SYMBOL(memory_end); 79EXPORT_SYMBOL(memory_end);
94 80
95static int __init early_parse_mem(char *p) 81static int __init early_parse_mem(char *p)
@@ -195,14 +181,7 @@ void __init setup_bootmem_allocator(unsigned long free_pfn)
195 sparse_memory_present_with_active_regions(0); 181 sparse_memory_present_with_active_regions(0);
196 182
197#ifdef CONFIG_BLK_DEV_INITRD 183#ifdef CONFIG_BLK_DEV_INITRD
198 ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0); 184 ROOT_DEV = Root_RAM0;
199 if (&__rd_start != &__rd_end) {
200 LOADER_TYPE = 1;
201 INITRD_START = PHYSADDR((unsigned long)&__rd_start) -
202 __MEMORY_START;
203 INITRD_SIZE = (unsigned long)&__rd_end -
204 (unsigned long)&__rd_start;
205 }
206 185
207 if (LOADER_TYPE && INITRD_START) { 186 if (LOADER_TYPE && INITRD_START) {
208 if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) { 187 if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
@@ -265,7 +244,8 @@ void __init setup_arch(char **cmdline_p)
265 data_resource.end = virt_to_phys(_edata)-1; 244 data_resource.end = virt_to_phys(_edata)-1;
266 245
267 memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START; 246 memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START;
268 memory_end = memory_start + __MEMORY_SIZE; 247 if (!memory_end)
248 memory_end = memory_start + __MEMORY_SIZE;
269 249
270#ifdef CONFIG_CMDLINE_BOOL 250#ifdef CONFIG_CMDLINE_BOOL
271 strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line)); 251 strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line));
@@ -323,7 +303,6 @@ static const char *cpu_name[] = {
323 [CPU_SH7750S] = "SH7750S", [CPU_SH7750R] = "SH7750R", 303 [CPU_SH7750S] = "SH7750S", [CPU_SH7750R] = "SH7750R",
324 [CPU_SH7751] = "SH7751", [CPU_SH7751R] = "SH7751R", 304 [CPU_SH7751] = "SH7751", [CPU_SH7751R] = "SH7751R",
325 [CPU_SH7760] = "SH7760", 305 [CPU_SH7760] = "SH7760",
326 [CPU_ST40RA] = "ST40RA", [CPU_ST40GX1] = "ST40GX1",
327 [CPU_SH4_202] = "SH4-202", [CPU_SH4_501] = "SH4-501", 306 [CPU_SH4_202] = "SH4-202", [CPU_SH4_501] = "SH4-501",
328 [CPU_SH7770] = "SH7770", [CPU_SH7780] = "SH7780", 307 [CPU_SH7770] = "SH7770", [CPU_SH7780] = "SH7780",
329 [CPU_SH7781] = "SH7781", [CPU_SH7343] = "SH7343", 308 [CPU_SH7781] = "SH7781", [CPU_SH7343] = "SH7343",
diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c
index 548e4285b375..e1a6de9088b5 100644
--- a/arch/sh/kernel/sh_ksyms.c
+++ b/arch/sh/kernel/sh_ksyms.c
@@ -106,7 +106,6 @@ DECLARE_EXPORT(__movmem);
106DECLARE_EXPORT(__movstr); 106DECLARE_EXPORT(__movstr);
107#endif 107#endif
108 108
109#ifdef CONFIG_CPU_SH4
110#if __GNUC__ == 4 109#if __GNUC__ == 4
111DECLARE_EXPORT(__movmem_i4_even); 110DECLARE_EXPORT(__movmem_i4_even);
112DECLARE_EXPORT(__movmem_i4_odd); 111DECLARE_EXPORT(__movmem_i4_odd);
@@ -126,7 +125,6 @@ DECLARE_EXPORT(__movstr_i4_even);
126DECLARE_EXPORT(__movstr_i4_odd); 125DECLARE_EXPORT(__movstr_i4_odd);
127DECLARE_EXPORT(__movstrSI12_i4); 126DECLARE_EXPORT(__movstrSI12_i4);
128#endif /* __GNUC__ == 4 */ 127#endif /* __GNUC__ == 4 */
129#endif
130 128
131#if !defined(CONFIG_CACHE_OFF) && (defined(CONFIG_CPU_SH4) || \ 129#if !defined(CONFIG_CACHE_OFF) && (defined(CONFIG_CPU_SH4) || \
132 defined(CONFIG_SH7705_CACHE_32KB)) 130 defined(CONFIG_SH7705_CACHE_32KB))
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S
index 6d5abba2ee27..0956fb3681a3 100644
--- a/arch/sh/kernel/vmlinux.lds.S
+++ b/arch/sh/kernel/vmlinux.lds.S
@@ -1,4 +1,4 @@
1/* $Id: vmlinux.lds.S,v 1.8 2003/05/16 17:18:14 lethal Exp $ 1/*
2 * ld script to make SuperH Linux kernel 2 * ld script to make SuperH Linux kernel
3 * Written by Niibe Yutaka 3 * Written by Niibe Yutaka
4 */ 4 */
@@ -15,121 +15,124 @@ OUTPUT_ARCH(sh)
15ENTRY(_start) 15ENTRY(_start)
16SECTIONS 16SECTIONS
17{ 17{
18 . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET; 18 . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
19 _text = .; /* Text and read-only data */ 19 _text = .; /* Text and read-only data */
20 text = .; /* Text and read-only data */ 20
21 .empty_zero_page : { 21 .empty_zero_page : {
22 *(.empty_zero_page) 22 *(.empty_zero_page)
23 } = 0 23 } = 0
24 .text : { 24
25 *(.text.head) 25 .text : {
26 TEXT_TEXT 26 *(.text.head)
27 SCHED_TEXT 27 TEXT_TEXT
28 LOCK_TEXT 28 SCHED_TEXT
29 *(.fixup) 29 LOCK_TEXT
30 *(.gnu.warning) 30 KPROBES_TEXT
31 *(.fixup)
32 *(.gnu.warning)
31 } = 0x0009 33 } = 0x0009
32 34
33 . = ALIGN(16); /* Exception table */ 35 . = ALIGN(16); /* Exception table */
34 __start___ex_table = .; 36 __start___ex_table = .;
35 __ex_table : { *(__ex_table) } 37 __ex_table : { *(__ex_table) }
36 __stop___ex_table = .; 38 __stop___ex_table = .;
39
40 _etext = .; /* End of text section */
37 41
38 _etext = .; /* End of text section */ 42 BUG_TABLE
43 NOTES
44 RO_DATA(PAGE_SIZE)
39 45
40 RODATA 46 . = ALIGN(THREAD_SIZE);
47 .data : { /* Data */
48 *(.data.init_task)
41 49
42 BUG_TABLE 50 . = ALIGN(L1_CACHE_BYTES);
51 *(.data.cacheline_aligned)
43 52
44 .data : { /* Data */ 53 . = ALIGN(L1_CACHE_BYTES);
45 DATA_DATA 54 *(.data.read_mostly)
46 55
47 /* Align the initial ramdisk image (INITRD) on page boundaries. */ 56 . = ALIGN(PAGE_SIZE);
48 . = ALIGN(PAGE_SIZE); 57 *(.data.page_aligned)
49 __rd_start = .;
50 *(.initrd)
51 . = ALIGN(PAGE_SIZE);
52 __rd_end = .;
53 58
54 CONSTRUCTORS 59 __nosave_begin = .;
60 *(.data.nosave)
61 . = ALIGN(PAGE_SIZE);
62 __nosave_end = .;
63
64 DATA_DATA
65 CONSTRUCTORS
55 } 66 }
56 67
57 . = ALIGN(PAGE_SIZE); 68 _edata = .; /* End of data section */
58 .data.page_aligned : { *(.data.page_aligned) }
59 __nosave_begin = .;
60 .data_nosave : { *(.data.nosave) }
61 . = ALIGN(PAGE_SIZE);
62 __nosave_end = .;
63
64 PERCPU(PAGE_SIZE)
65
66 . = ALIGN(L1_CACHE_BYTES);
67 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
68
69 _edata = .; /* End of data section */
70
71 . = ALIGN(THREAD_SIZE); /* init_task */
72 .data.init_task : { *(.data.init_task) }
73
74 . = ALIGN(PAGE_SIZE); /* Init code and data */
75 __init_begin = .;
76 _sinittext = .;
77 .init.text : { *(.init.text) }
78 _einittext = .;
79 .init.data : { *(.init.data) }
80 . = ALIGN(16);
81 __setup_start = .;
82 .init.setup : { *(.init.setup) }
83 __setup_end = .;
84 __initcall_start = .;
85 .initcall.init : {
86 INITCALLS
87 }
88 __initcall_end = .;
89 __con_initcall_start = .;
90 .con_initcall.init : { *(.con_initcall.init) }
91 __con_initcall_end = .;
92 SECURITY_INIT
93
94 /* .exit.text is discarded at runtime, not link time, to deal with
95 references from .rodata */
96 .exit.text : { *(.exit.text) }
97 .exit.data : { *(.exit.data) }
98 69
99#ifdef CONFIG_BLK_DEV_INITRD 70 . = ALIGN(PAGE_SIZE); /* Init code and data */
100 . = ALIGN(PAGE_SIZE); 71 __init_begin = .;
72 _sinittext = .;
73 .init.text : { *(.init.text) }
74 _einittext = .;
75 .init.data : { *(.init.data) }
76
77 . = ALIGN(16);
78 __setup_start = .;
79 .init.setup : { *(.init.setup) }
80 __setup_end = .;
101 81
102 __initramfs_start = .; 82 __initcall_start = .;
103 .init.ramfs : { *(.init.ramfs) } 83 .initcall.init : {
104 __initramfs_end = .; 84 INITCALLS
85 }
86 __initcall_end = .;
87 __con_initcall_start = .;
88 .con_initcall.init : { *(.con_initcall.init) }
89 __con_initcall_end = .;
90
91 SECURITY_INIT
92
93#ifdef CONFIG_BLK_DEV_INITRD
94 . = ALIGN(PAGE_SIZE);
95 __initramfs_start = .;
96 .init.ramfs : { *(.init.ramfs) }
97 __initramfs_end = .;
105#endif 98#endif
106 99
107 . = ALIGN(4);
108 __machvec_start = .;
109 .machvec.init : { *(.machvec.init) }
110 __machvec_end = .;
111
112 . = ALIGN(PAGE_SIZE);
113 .bss : {
114 __init_end = .;
115 __bss_start = .; /* BSS */
116 *(.bss.page_aligned)
117 *(.bss)
118 . = ALIGN(4); 100 . = ALIGN(4);
119 _ebss = .; /* uClinux MTD sucks */ 101 __machvec_start = .;
120 _end = . ; 102 .machvec.init : { *(.machvec.init) }
121 } 103 __machvec_end = .;
122 104
123 /* When something in the kernel is NOT compiled as a module, the 105 PERCPU(PAGE_SIZE)
124 * module cleanup code and data are put into these segments. Both 106
125 * can then be thrown away, as cleanup code is never called unless 107 /*
126 * it's a module. 108 * .exit.text is discarded at runtime, not link time, to deal with
127 */ 109 * references from __bug_table
128 /DISCARD/ : { 110 */
129 *(.exitcall.exit) 111 .exit.text : { *(.exit.text) }
112 .exit.data : { *(.exit.data) }
113
114 . = ALIGN(PAGE_SIZE);
115 .bss : {
116 __init_end = .;
117 __bss_start = .; /* BSS */
118 *(.bss.page_aligned)
119 *(.bss)
120 *(COMMON)
121 . = ALIGN(4);
122 _ebss = .; /* uClinux MTD sucks */
123 _end = . ;
130 } 124 }
131 125
132 STABS_DEBUG 126 /*
127 * When something in the kernel is NOT compiled as a module, the
128 * module cleanup code and data are put into these segments. Both
129 * can then be thrown away, as cleanup code is never called unless
130 * it's a module.
131 */
132 /DISCARD/ : {
133 *(.exitcall.exit)
134 }
133 135
134 DWARF_DEBUG 136 STABS_DEBUG
137 DWARF_DEBUG
135} 138}
diff --git a/arch/sh/kernel/vsyscall/vsyscall.lds.S b/arch/sh/kernel/vsyscall/vsyscall.lds.S
index c9bf2af35d35..6d59ee7c23dd 100644
--- a/arch/sh/kernel/vsyscall/vsyscall.lds.S
+++ b/arch/sh/kernel/vsyscall/vsyscall.lds.S
@@ -38,7 +38,10 @@ SECTIONS
38 .text : { *(.text) } :text =0x90909090 38 .text : { *(.text) } :text =0x90909090
39 .note : { *(.note.*) } :text :note 39 .note : { *(.note.*) } :text :note
40 .eh_frame_hdr : { *(.eh_frame_hdr ) } :text :eh_frame_hdr 40 .eh_frame_hdr : { *(.eh_frame_hdr ) } :text :eh_frame_hdr
41 .eh_frame : { KEEP (*(.eh_frame)) } :text 41 .eh_frame : {
42 KEEP (*(.eh_frame))
43 LONG (0)
44 } :text
42 .dynamic : { *(.dynamic) } :text :dynamic 45 .dynamic : { *(.dynamic) } :text :dynamic
43 .useless : { 46 .useless : {
44 *(.got.plt) *(.got) 47 *(.got.plt) *(.got)
diff --git a/arch/sh/lib/Makefile b/arch/sh/lib/Makefile
index e23dd1a3fccd..9dc7b6985052 100644
--- a/arch/sh/lib/Makefile
+++ b/arch/sh/lib/Makefile
@@ -9,3 +9,5 @@ memcpy-y := memcpy.o
9memcpy-$(CONFIG_CPU_SH4) := memcpy-sh4.o 9memcpy-$(CONFIG_CPU_SH4) := memcpy-sh4.o
10 10
11lib-y += $(memcpy-y) 11lib-y += $(memcpy-y)
12
13EXTRA_CFLAGS += -Werror
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig
index cf446bbab5b0..1265f204f7d1 100644
--- a/arch/sh/mm/Kconfig
+++ b/arch/sh/mm/Kconfig
@@ -17,7 +17,7 @@ config CPU_SH4
17 bool 17 bool
18 select CPU_HAS_INTEVT 18 select CPU_HAS_INTEVT
19 select CPU_HAS_SR_RB 19 select CPU_HAS_SR_RB
20 select CPU_HAS_PTEA if (!CPU_SUBTYPE_ST40 && !CPU_SH4A) || CPU_SHX2 20 select CPU_HAS_PTEA if !CPU_SH4A || CPU_SHX2
21 select CPU_HAS_FPU if !CPU_SH4AL_DSP 21 select CPU_HAS_FPU if !CPU_SH4AL_DSP
22 22
23config CPU_SH4A 23config CPU_SH4A
@@ -29,10 +29,6 @@ config CPU_SH4AL_DSP
29 select CPU_SH4A 29 select CPU_SH4A
30 select CPU_HAS_DSP 30 select CPU_HAS_DSP
31 31
32config CPU_SUBTYPE_ST40
33 bool
34 select CPU_SH4
35
36config CPU_SHX2 32config CPU_SHX2
37 bool 33 bool
38 34
@@ -152,21 +148,6 @@ config CPU_SUBTYPE_SH4_202
152 bool "Support SH4-202 processor" 148 bool "Support SH4-202 processor"
153 select CPU_SH4 149 select CPU_SH4
154 150
155# ST40 Processor Support
156
157config CPU_SUBTYPE_ST40STB1
158 bool "Support ST40STB1/ST40RA processors"
159 select CPU_SUBTYPE_ST40
160 help
161 Select ST40STB1 if you have a ST40RA CPU.
162 This was previously called the ST40STB1, hence the option name.
163
164config CPU_SUBTYPE_ST40GX1
165 bool "Support ST40GX1 processor"
166 select CPU_SUBTYPE_ST40
167 help
168 Select ST40GX1 if you have a ST40GX1 CPU.
169
170# SH-4A Processor Support 151# SH-4A Processor Support
171 152
172config CPU_SUBTYPE_SH7770 153config CPU_SUBTYPE_SH7770
diff --git a/arch/sh/mm/Makefile b/arch/sh/mm/Makefile
index ee30fb44dfe1..aa44607f072d 100644
--- a/arch/sh/mm/Makefile
+++ b/arch/sh/mm/Makefile
@@ -33,3 +33,5 @@ endif
33obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o 33obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
34obj-$(CONFIG_32BIT) += pmb.o 34obj-$(CONFIG_32BIT) += pmb.o
35obj-$(CONFIG_NUMA) += numa.o 35obj-$(CONFIG_NUMA) += numa.o
36
37EXTRA_CFLAGS += -Werror
diff --git a/arch/sh/mm/clear_page.S b/arch/sh/mm/clear_page.S
index 8a706131e521..7a7c81ee3f01 100644
--- a/arch/sh/mm/clear_page.S
+++ b/arch/sh/mm/clear_page.S
@@ -150,48 +150,3 @@ ENTRY(__clear_user)
150 .long 8b, .Lbad_clear_user 150 .long 8b, .Lbad_clear_user
151 .long 9b, .Lbad_clear_user 151 .long 9b, .Lbad_clear_user
152.previous 152.previous
153
154#if defined(CONFIG_CPU_SH4)
155/*
156 * __clear_user_page
157 * @to: P3 address (with same color)
158 * @orig_to: P1 address
159 *
160 * void __clear_user_page(void *to, void *orig_to)
161 */
162
163/*
164 * r0 --- scratch
165 * r4 --- to
166 * r5 --- orig_to
167 * r6 --- to + PAGE_SIZE
168 */
169ENTRY(__clear_user_page)
170 mov.l .Lpsz,r0
171 mov r4,r6
172 add r0,r6
173 mov #0,r0
174 !
1751: ocbi @r5
176 add #32,r5
177 movca.l r0,@r4
178 mov r4,r1
179 add #32,r4
180 mov.l r0,@-r4
181 mov.l r0,@-r4
182 mov.l r0,@-r4
183 mov.l r0,@-r4
184 mov.l r0,@-r4
185 mov.l r0,@-r4
186 mov.l r0,@-r4
187 add #28,r4
188 cmp/eq r6,r4
189 bf/s 1b
190 ocbwb @r1
191 !
192 rts
193 nop
194.Lpsz: .long PAGE_SIZE
195
196#endif
197
diff --git a/arch/sh/mm/copy_page.S b/arch/sh/mm/copy_page.S
index a81dbdb05596..40685018b952 100644
--- a/arch/sh/mm/copy_page.S
+++ b/arch/sh/mm/copy_page.S
@@ -68,67 +68,6 @@ ENTRY(copy_page_slow)
68 rts 68 rts
69 nop 69 nop
70 70
71#if defined(CONFIG_CPU_SH4)
72/*
73 * __copy_user_page
74 * @to: P1 address (with same color)
75 * @from: P1 address
76 * @orig_to: P1 address
77 *
78 * void __copy_user_page(void *to, void *from, void *orig_to)
79 */
80
81/*
82 * r0, r1, r2, r3, r4, r5, r6, r7 --- scratch
83 * r8 --- from + PAGE_SIZE
84 * r9 --- orig_to
85 * r10 --- to
86 * r11 --- from
87 */
88ENTRY(__copy_user_page)
89 mov.l r8,@-r15
90 mov.l r9,@-r15
91 mov.l r10,@-r15
92 mov.l r11,@-r15
93 mov r4,r10
94 mov r5,r11
95 mov r6,r9
96 mov r5,r8
97 mov.l .Lpsz,r0
98 add r0,r8
99 !
1001: ocbi @r9
101 add #32,r9
102 mov.l @r11+,r0
103 mov.l @r11+,r1
104 mov.l @r11+,r2
105 mov.l @r11+,r3
106 mov.l @r11+,r4
107 mov.l @r11+,r5
108 mov.l @r11+,r6
109 mov.l @r11+,r7
110 movca.l r0,@r10
111 mov r10,r0
112 add #32,r10
113 mov.l r7,@-r10
114 mov.l r6,@-r10
115 mov.l r5,@-r10
116 mov.l r4,@-r10
117 mov.l r3,@-r10
118 mov.l r2,@-r10
119 mov.l r1,@-r10
120 ocbwb @r0
121 cmp/eq r11,r8
122 bf/s 1b
123 add #28,r10
124 !
125 mov.l @r15+,r11
126 mov.l @r15+,r10
127 mov.l @r15+,r9
128 mov.l @r15+,r8
129 rts
130 nop
131#endif
132 .align 2 71 .align 2
133.Lpsz: .long PAGE_SIZE 72.Lpsz: .long PAGE_SIZE
134/* 73/*
@@ -255,7 +194,11 @@ EX( mov.l @r5+,r8 )
255EX( mov.l @r5+,r9 ) 194EX( mov.l @r5+,r9 )
256EX( mov.l @r5+,r10 ) 195EX( mov.l @r5+,r10 )
257EX( mov.l @r5+,r11 ) 196EX( mov.l @r5+,r11 )
197#ifdef CONFIG_CPU_SH4
258EX( movca.l r0,@r4 ) 198EX( movca.l r0,@r4 )
199#else
200EX( mov.l r0,@r4 )
201#endif
259 add #-32, r6 202 add #-32, r6
260EX( mov.l r1,@(4,r4) ) 203EX( mov.l r1,@(4,r4) )
261 mov #32, r0 204 mov #32, r0
diff --git a/arch/sh/mm/pg-sh4.c b/arch/sh/mm/pg-sh4.c
index 25f5c6f6821d..8c7a9ca79879 100644
--- a/arch/sh/mm/pg-sh4.c
+++ b/arch/sh/mm/pg-sh4.c
@@ -9,6 +9,8 @@
9#include <linux/mm.h> 9#include <linux/mm.h>
10#include <linux/mutex.h> 10#include <linux/mutex.h>
11#include <linux/fs.h> 11#include <linux/fs.h>
12#include <linux/highmem.h>
13#include <linux/module.h>
12#include <asm/mmu_context.h> 14#include <asm/mmu_context.h>
13#include <asm/cacheflush.h> 15#include <asm/cacheflush.h>
14 16
@@ -50,34 +52,61 @@ static inline void kunmap_coherent(struct page *page)
50void clear_user_page(void *to, unsigned long address, struct page *page) 52void clear_user_page(void *to, unsigned long address, struct page *page)
51{ 53{
52 __set_bit(PG_mapped, &page->flags); 54 __set_bit(PG_mapped, &page->flags);
53 if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) 55
54 clear_page(to); 56 clear_page(to);
55 else { 57 if ((((address & PAGE_MASK) ^ (unsigned long)to) & CACHE_ALIAS))
56 void *vto = kmap_coherent(page, address); 58 __flush_wback_region(to, PAGE_SIZE);
57 __clear_user_page(vto, to);
58 kunmap_coherent(vto);
59 }
60} 59}
61 60
62/* 61void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
63 * copy_user_page 62 unsigned long vaddr, void *dst, const void *src,
64 * @to: P1 address 63 unsigned long len)
65 * @from: P1 address
66 * @address: U0 address to be mapped
67 * @page: page (virt_to_page(to))
68 */
69void copy_user_page(void *to, void *from, unsigned long address,
70 struct page *page)
71{ 64{
65 void *vto;
66
72 __set_bit(PG_mapped, &page->flags); 67 __set_bit(PG_mapped, &page->flags);
73 if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) 68
74 copy_page(to, from); 69 vto = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
75 else { 70 memcpy(vto, src, len);
76 void *vfrom = kmap_coherent(page, address); 71 kunmap_coherent(vto);
77 __copy_user_page(vfrom, from, to); 72
78 kunmap_coherent(vfrom); 73 if (vma->vm_flags & VM_EXEC)
79 } 74 flush_cache_page(vma, vaddr, page_to_pfn(page));
75}
76
77void copy_from_user_page(struct vm_area_struct *vma, struct page *page,
78 unsigned long vaddr, void *dst, const void *src,
79 unsigned long len)
80{
81 void *vfrom;
82
83 __set_bit(PG_mapped, &page->flags);
84
85 vfrom = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
86 memcpy(dst, vfrom, len);
87 kunmap_coherent(vfrom);
88}
89
90void copy_user_highpage(struct page *to, struct page *from,
91 unsigned long vaddr, struct vm_area_struct *vma)
92{
93 void *vfrom, *vto;
94
95 __set_bit(PG_mapped, &to->flags);
96
97 vto = kmap_atomic(to, KM_USER1);
98 vfrom = kmap_coherent(from, vaddr);
99 copy_page(vto, vfrom);
100 kunmap_coherent(vfrom);
101
102 if (((vaddr ^ (unsigned long)vto) & CACHE_ALIAS))
103 __flush_wback_region(vto, PAGE_SIZE);
104
105 kunmap_atomic(vto, KM_USER1);
106 /* Make sure this page is cleared on other CPU's too before using it */
107 smp_wmb();
80} 108}
109EXPORT_SYMBOL(copy_user_highpage);
81 110
82/* 111/*
83 * For SH-4, we have our own implementation for ptep_get_and_clear 112 * For SH-4, we have our own implementation for ptep_get_and_clear
diff --git a/arch/sh/oprofile/Makefile b/arch/sh/oprofile/Makefile
index 1f25d9bb7538..2efc2e79fd29 100644
--- a/arch/sh/oprofile/Makefile
+++ b/arch/sh/oprofile/Makefile
@@ -15,3 +15,4 @@ profdrvr-$(CONFIG_CPU_SUBTYPE_SH7091) := op_model_sh7750.o
15 15
16oprofile-y := $(DRIVER_OBJS) $(profdrvr-y) 16oprofile-y := $(DRIVER_OBJS) $(profdrvr-y)
17 17
18EXTRA_CFLAGS += -Werror
diff --git a/arch/sh/oprofile/op_model_sh7750.c b/arch/sh/oprofile/op_model_sh7750.c
index ebee7e24ede9..6b9a98e07004 100644
--- a/arch/sh/oprofile/op_model_sh7750.c
+++ b/arch/sh/oprofile/op_model_sh7750.c
@@ -16,7 +16,6 @@
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/fs.h> 18#include <linux/fs.h>
19#include <linux/notifier.h>
20#include <asm/uaccess.h> 19#include <asm/uaccess.h>
21#include <asm/io.h> 20#include <asm/io.h>
22 21
@@ -44,8 +43,6 @@
44 */ 43 */
45#define NR_CNTRS 2 44#define NR_CNTRS 2
46 45
47extern const char *get_cpu_subtype(void);
48
49struct op_counter_config { 46struct op_counter_config {
50 unsigned long enabled; 47 unsigned long enabled;
51 unsigned long event; 48 unsigned long event;
@@ -111,17 +108,12 @@ static struct op_counter_config ctr[NR_CNTRS];
111 * behavior. 108 * behavior.
112 */ 109 */
113 110
114static int sh7750_timer_notify(struct notifier_block *self, 111static int sh7750_timer_notify(struct pt_regs *regs)
115 unsigned long val, void *regs)
116{ 112{
117 oprofile_add_sample((struct pt_regs *)regs, 0); 113 oprofile_add_sample(regs, 0);
118 return 0; 114 return 0;
119} 115}
120 116
121static struct notifier_block sh7750_timer_notifier = {
122 .notifier_call = sh7750_timer_notify,
123};
124
125static u64 sh7750_read_counter(int counter) 117static u64 sh7750_read_counter(int counter)
126{ 118{
127 u32 hi, lo; 119 u32 hi, lo;
@@ -240,7 +232,7 @@ static int sh7750_perf_counter_start(void)
240 ctrl_outw(pmcr | PMCR_ENABLE, PMCR2); 232 ctrl_outw(pmcr | PMCR_ENABLE, PMCR2);
241 } 233 }
242 234
243 return register_profile_notifier(&sh7750_timer_notifier); 235 return register_timer_hook(sh7750_timer_notify);
244} 236}
245 237
246static void sh7750_perf_counter_stop(void) 238static void sh7750_perf_counter_stop(void)
@@ -248,7 +240,7 @@ static void sh7750_perf_counter_stop(void)
248 ctrl_outw(ctrl_inw(PMCR1) & ~PMCR_PMEN, PMCR1); 240 ctrl_outw(ctrl_inw(PMCR1) & ~PMCR_PMEN, PMCR1);
249 ctrl_outw(ctrl_inw(PMCR2) & ~PMCR_PMEN, PMCR2); 241 ctrl_outw(ctrl_inw(PMCR2) & ~PMCR_PMEN, PMCR2);
250 242
251 unregister_profile_notifier(&sh7750_timer_notifier); 243 unregister_timer_hook(sh7750_timer_notify);
252} 244}
253 245
254static struct oprofile_operations sh7750_perf_counter_ops = { 246static struct oprofile_operations sh7750_perf_counter_ops = {
@@ -257,13 +249,13 @@ static struct oprofile_operations sh7750_perf_counter_ops = {
257 .stop = sh7750_perf_counter_stop, 249 .stop = sh7750_perf_counter_stop,
258}; 250};
259 251
260int __init oprofile_arch_init(struct oprofile_operations **ops) 252int __init oprofile_arch_init(struct oprofile_operations *ops)
261{ 253{
262 if (!(current_cpu_data.flags & CPU_HAS_PERF_COUNTER)) 254 if (!(current_cpu_data.flags & CPU_HAS_PERF_COUNTER))
263 return -ENODEV; 255 return -ENODEV;
264 256
265 sh7750_perf_counter_ops.cpu_type = (char *)get_cpu_subtype(); 257 ops = &sh7750_perf_counter_ops;
266 *ops = &sh7750_perf_counter_ops; 258 ops->cpu_type = (char *)get_cpu_subtype(&current_cpu_data);
267 259
268 printk(KERN_INFO "oprofile: using SH-4 (%s) performance monitoring.\n", 260 printk(KERN_INFO "oprofile: using SH-4 (%s) performance monitoring.\n",
269 sh7750_perf_counter_ops.cpu_type); 261 sh7750_perf_counter_ops.cpu_type);
diff --git a/arch/sh/tools/mach-types b/arch/sh/tools/mach-types
index 439bfe3d29af..ff071693325c 100644
--- a/arch/sh/tools/mach-types
+++ b/arch/sh/tools/mach-types
@@ -1,26 +1,35 @@
1# 1#
2# List of boards. 2# MACH_<xxx> CONFIG_<xxx>
3# 3#
4 4
5# 5#
6# MACH_<xxx> CONFIG_<xxx> 6# List of board groups.
7# 7#
8SE SH_SOLUTION_ENGINE 8SE SH_SOLUTION_ENGINE
97751SE SH_7751_SOLUTION_ENGINE 9HIGHLANDER SH_HIGHLANDER
107722SE SH_7722_SOLUTION_ENGINE 10RTS7751R2D SH_RTS7751R2D
117343SE SH_7343_SOLUTION_ENGINE 11
12#
13# List of companion chips / MFDs.
14#
15HD64461 HD64461
16HD64465 HD64465
17
18#
19# List of boards.
20#
127206SE SH_7206_SOLUTION_ENGINE 217206SE SH_7206_SOLUTION_ENGINE
227343SE SH_7343_SOLUTION_ENGINE
137619SE SH_7619_SOLUTION_ENGINE 237619SE SH_7619_SOLUTION_ENGINE
247722SE SH_7722_SOLUTION_ENGINE
257751SE SH_7751_SOLUTION_ENGINE
147780SE SH_7780_SOLUTION_ENGINE 267780SE SH_7780_SOLUTION_ENGINE
157751SYSTEMH SH_7751_SYSTEMH 277751SYSTEMH SH_7751_SYSTEMH
16HP6XX SH_HP6XX 28HP6XX SH_HP6XX
17HD64461 HD64461
18HD64465 HD64465
19DREAMCAST SH_DREAMCAST 29DREAMCAST SH_DREAMCAST
20MPC1211 SH_MPC1211 30MPC1211 SH_MPC1211
21SNAPGEAR SH_SECUREEDGE5410 31SNAPGEAR SH_SECUREEDGE5410
22HS7751RVOIP SH_HS7751RVOIP 32HS7751RVOIP SH_HS7751RVOIP
23RTS7751R2D SH_RTS7751R2D
24EDOSK7705 SH_EDOSK7705 33EDOSK7705 SH_EDOSK7705
25SH4202_MICRODEV SH_SH4202_MICRODEV 34SH4202_MICRODEV SH_SH4202_MICRODEV
26SH03 SH_SH03 35SH03 SH_SH03
@@ -32,3 +41,7 @@ TITAN SH_TITAN
32SHMIN SH_SHMIN 41SHMIN SH_SHMIN
337710VOIPGW SH_7710VOIPGW 427710VOIPGW SH_7710VOIPGW
34LBOXRE2 SH_LBOX_RE2 43LBOXRE2 SH_LBOX_RE2
44X3PROTO SH_X3PROTO
45MAGICPANELR2 SH_MAGIC_PANEL_R2
46R2D_PLUS RTS7751R2D_PLUS
47R2D_1 RTS7751R2D_1
diff --git a/arch/sh64/configs/cayman_defconfig b/arch/sh64/configs/cayman_defconfig
index 91b59118c1b1..75552bb01405 100644
--- a/arch/sh64/configs/cayman_defconfig
+++ b/arch/sh64/configs/cayman_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.23-rc8 3# Linux kernel version: 2.6.24-rc1
4# Tue Oct 9 15:37:16 2007 4# Fri Nov 2 14:35:27 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH64=y 7CONFIG_SUPERH64=y
@@ -36,6 +36,10 @@ CONFIG_POSIX_MQUEUE=y
36# CONFIG_AUDIT is not set 36# CONFIG_AUDIT is not set
37# CONFIG_IKCONFIG is not set 37# CONFIG_IKCONFIG is not set
38CONFIG_LOG_BUF_SHIFT=14 38CONFIG_LOG_BUF_SHIFT=14
39# CONFIG_CGROUPS is not set
40CONFIG_FAIR_GROUP_SCHED=y
41CONFIG_FAIR_USER_SCHED=y
42# CONFIG_FAIR_CGROUP_SCHED is not set
39CONFIG_SYSFS_DEPRECATED=y 43CONFIG_SYSFS_DEPRECATED=y
40# CONFIG_RELAY is not set 44# CONFIG_RELAY is not set
41# CONFIG_BLK_DEV_INITRD is not set 45# CONFIG_BLK_DEV_INITRD is not set
@@ -148,6 +152,7 @@ CONFIG_FLATMEM_MANUAL=y
148CONFIG_FLATMEM=y 152CONFIG_FLATMEM=y
149CONFIG_FLAT_NODE_MEM_MAP=y 153CONFIG_FLAT_NODE_MEM_MAP=y
150# CONFIG_SPARSEMEM_STATIC is not set 154# CONFIG_SPARSEMEM_STATIC is not set
155# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
151CONFIG_SPLIT_PTLOCK_CPUS=4 156CONFIG_SPLIT_PTLOCK_CPUS=4
152# CONFIG_RESOURCES_64BIT is not set 157# CONFIG_RESOURCES_64BIT is not set
153CONFIG_ZONE_DMA_FLAG=0 158CONFIG_ZONE_DMA_FLAG=0
@@ -160,10 +165,6 @@ CONFIG_PCI=y
160CONFIG_SH_PCIDMA_NONCOHERENT=y 165CONFIG_SH_PCIDMA_NONCOHERENT=y
161# CONFIG_ARCH_SUPPORTS_MSI is not set 166# CONFIG_ARCH_SUPPORTS_MSI is not set
162# CONFIG_PCI_DEBUG is not set 167# CONFIG_PCI_DEBUG is not set
163
164#
165# PCCARD (PCMCIA/CardBus) support
166#
167# CONFIG_PCCARD is not set 168# CONFIG_PCCARD is not set
168# CONFIG_HOTPLUG_PCI is not set 169# CONFIG_HOTPLUG_PCI is not set
169 170
@@ -209,6 +210,7 @@ CONFIG_IP_PNP=y
209CONFIG_INET_XFRM_MODE_TRANSPORT=y 210CONFIG_INET_XFRM_MODE_TRANSPORT=y
210CONFIG_INET_XFRM_MODE_TUNNEL=y 211CONFIG_INET_XFRM_MODE_TUNNEL=y
211CONFIG_INET_XFRM_MODE_BEET=y 212CONFIG_INET_XFRM_MODE_BEET=y
213# CONFIG_INET_LRO is not set
212CONFIG_INET_DIAG=y 214CONFIG_INET_DIAG=y
213CONFIG_INET_TCP_DIAG=y 215CONFIG_INET_TCP_DIAG=y
214# CONFIG_TCP_CONG_ADVANCED is not set 216# CONFIG_TCP_CONG_ADVANCED is not set
@@ -234,10 +236,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
234# CONFIG_LAPB is not set 236# CONFIG_LAPB is not set
235# CONFIG_ECONET is not set 237# CONFIG_ECONET is not set
236# CONFIG_WAN_ROUTER is not set 238# CONFIG_WAN_ROUTER is not set
237
238#
239# QoS and/or fair queueing
240#
241# CONFIG_NET_SCHED is not set 239# CONFIG_NET_SCHED is not set
242 240
243# 241#
@@ -266,6 +264,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
266# 264#
267# Generic Driver Options 265# Generic Driver Options
268# 266#
267CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
269CONFIG_STANDALONE=y 268CONFIG_STANDALONE=y
270CONFIG_PREVENT_FIRMWARE_BUILD=y 269CONFIG_PREVENT_FIRMWARE_BUILD=y
271# CONFIG_FW_LOADER is not set 270# CONFIG_FW_LOADER is not set
@@ -333,6 +332,7 @@ CONFIG_SCSI_SPI_ATTRS=y
333# CONFIG_SCSI_FC_ATTRS is not set 332# CONFIG_SCSI_FC_ATTRS is not set
334# CONFIG_SCSI_ISCSI_ATTRS is not set 333# CONFIG_SCSI_ISCSI_ATTRS is not set
335# CONFIG_SCSI_SAS_LIBSAS is not set 334# CONFIG_SCSI_SAS_LIBSAS is not set
335# CONFIG_SCSI_SRP_ATTRS is not set
336CONFIG_SCSI_LOWLEVEL=y 336CONFIG_SCSI_LOWLEVEL=y
337# CONFIG_ISCSI_TCP is not set 337# CONFIG_ISCSI_TCP is not set
338# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 338# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
@@ -370,14 +370,7 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y
370# CONFIG_SCSI_SRP is not set 370# CONFIG_SCSI_SRP is not set
371# CONFIG_ATA is not set 371# CONFIG_ATA is not set
372# CONFIG_MD is not set 372# CONFIG_MD is not set
373
374#
375# Fusion MPT device support
376#
377# CONFIG_FUSION is not set 373# CONFIG_FUSION is not set
378# CONFIG_FUSION_SPI is not set
379# CONFIG_FUSION_FC is not set
380# CONFIG_FUSION_SAS is not set
381 374
382# 375#
383# IEEE 1394 (FireWire) support 376# IEEE 1394 (FireWire) support
@@ -392,6 +385,8 @@ CONFIG_NETDEVICES=y
392# CONFIG_MACVLAN is not set 385# CONFIG_MACVLAN is not set
393# CONFIG_EQUALIZER is not set 386# CONFIG_EQUALIZER is not set
394# CONFIG_TUN is not set 387# CONFIG_TUN is not set
388# CONFIG_VETH is not set
389# CONFIG_IP1000 is not set
395# CONFIG_ARCNET is not set 390# CONFIG_ARCNET is not set
396# CONFIG_PHYLIB is not set 391# CONFIG_PHYLIB is not set
397CONFIG_NET_ETHERNET=y 392CONFIG_NET_ETHERNET=y
@@ -402,6 +397,7 @@ CONFIG_NET_ETHERNET=y
402# CONFIG_CASSINI is not set 397# CONFIG_CASSINI is not set
403# CONFIG_NET_VENDOR_3COM is not set 398# CONFIG_NET_VENDOR_3COM is not set
404# CONFIG_SMC91X is not set 399# CONFIG_SMC91X is not set
400# CONFIG_SMC911X is not set
405CONFIG_NET_TULIP=y 401CONFIG_NET_TULIP=y
406# CONFIG_DE2104X is not set 402# CONFIG_DE2104X is not set
407CONFIG_TULIP=y 403CONFIG_TULIP=y
@@ -413,13 +409,16 @@ CONFIG_TULIP=y
413# CONFIG_DM9102 is not set 409# CONFIG_DM9102 is not set
414# CONFIG_ULI526X is not set 410# CONFIG_ULI526X is not set
415# CONFIG_HP100 is not set 411# CONFIG_HP100 is not set
412# CONFIG_IBM_NEW_EMAC_ZMII is not set
413# CONFIG_IBM_NEW_EMAC_RGMII is not set
414# CONFIG_IBM_NEW_EMAC_TAH is not set
415# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
416CONFIG_NET_PCI=y 416CONFIG_NET_PCI=y
417# CONFIG_PCNET32 is not set 417# CONFIG_PCNET32 is not set
418# CONFIG_AMD8111_ETH is not set 418# CONFIG_AMD8111_ETH is not set
419# CONFIG_ADAPTEC_STARFIRE is not set 419# CONFIG_ADAPTEC_STARFIRE is not set
420# CONFIG_B44 is not set 420# CONFIG_B44 is not set
421# CONFIG_FORCEDETH is not set 421# CONFIG_FORCEDETH is not set
422# CONFIG_DGRS is not set
423# CONFIG_EEPRO100 is not set 422# CONFIG_EEPRO100 is not set
424# CONFIG_E100 is not set 423# CONFIG_E100 is not set
425# CONFIG_FEALNX is not set 424# CONFIG_FEALNX is not set
@@ -437,6 +436,7 @@ CONFIG_NETDEV_1000=y
437# CONFIG_ACENIC is not set 436# CONFIG_ACENIC is not set
438# CONFIG_DL2K is not set 437# CONFIG_DL2K is not set
439# CONFIG_E1000 is not set 438# CONFIG_E1000 is not set
439# CONFIG_E1000E is not set
440# CONFIG_NS83820 is not set 440# CONFIG_NS83820 is not set
441# CONFIG_HAMACHI is not set 441# CONFIG_HAMACHI is not set
442# CONFIG_YELLOWFIN is not set 442# CONFIG_YELLOWFIN is not set
@@ -453,11 +453,14 @@ CONFIG_NETDEV_1000=y
453CONFIG_NETDEV_10000=y 453CONFIG_NETDEV_10000=y
454# CONFIG_CHELSIO_T1 is not set 454# CONFIG_CHELSIO_T1 is not set
455# CONFIG_CHELSIO_T3 is not set 455# CONFIG_CHELSIO_T3 is not set
456# CONFIG_IXGBE is not set
456# CONFIG_IXGB is not set 457# CONFIG_IXGB is not set
457# CONFIG_S2IO is not set 458# CONFIG_S2IO is not set
458# CONFIG_MYRI10GE is not set 459# CONFIG_MYRI10GE is not set
459# CONFIG_NETXEN_NIC is not set 460# CONFIG_NETXEN_NIC is not set
461# CONFIG_NIU is not set
460# CONFIG_MLX4_CORE is not set 462# CONFIG_MLX4_CORE is not set
463# CONFIG_TEHUTI is not set
461# CONFIG_TR is not set 464# CONFIG_TR is not set
462 465
463# 466#
@@ -493,7 +496,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
493CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 496CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
494CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 497CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
495# CONFIG_INPUT_JOYDEV is not set 498# CONFIG_INPUT_JOYDEV is not set
496# CONFIG_INPUT_TSDEV is not set
497# CONFIG_INPUT_EVDEV is not set 499# CONFIG_INPUT_EVDEV is not set
498# CONFIG_INPUT_EVBUG is not set 500# CONFIG_INPUT_EVBUG is not set
499 501
@@ -561,23 +563,9 @@ CONFIG_UNIX98_PTYS=y
561CONFIG_LEGACY_PTYS=y 563CONFIG_LEGACY_PTYS=y
562CONFIG_LEGACY_PTY_COUNT=256 564CONFIG_LEGACY_PTY_COUNT=256
563# CONFIG_IPMI_HANDLER is not set 565# CONFIG_IPMI_HANDLER is not set
564CONFIG_WATCHDOG=y
565# CONFIG_WATCHDOG_NOWAYOUT is not set
566
567#
568# Watchdog Device Drivers
569#
570# CONFIG_SOFT_WATCHDOG is not set
571
572#
573# PCI-based Watchdog Cards
574#
575# CONFIG_PCIPCWATCHDOG is not set
576# CONFIG_WDTPCI is not set
577CONFIG_HW_RANDOM=y 566CONFIG_HW_RANDOM=y
578# CONFIG_R3964 is not set 567# CONFIG_R3964 is not set
579# CONFIG_APPLICOM is not set 568# CONFIG_APPLICOM is not set
580# CONFIG_DRM is not set
581# CONFIG_RAW_DRIVER is not set 569# CONFIG_RAW_DRIVER is not set
582# CONFIG_TCG_TPM is not set 570# CONFIG_TCG_TPM is not set
583CONFIG_DEVPORT=y 571CONFIG_DEVPORT=y
@@ -644,8 +632,6 @@ CONFIG_I2C_BOARDINFO=y
644# CONFIG_POWER_SUPPLY is not set 632# CONFIG_POWER_SUPPLY is not set
645CONFIG_HWMON=y 633CONFIG_HWMON=y
646# CONFIG_HWMON_VID is not set 634# CONFIG_HWMON_VID is not set
647# CONFIG_SENSORS_ABITUGURU is not set
648# CONFIG_SENSORS_ABITUGURU3 is not set
649# CONFIG_SENSORS_AD7418 is not set 635# CONFIG_SENSORS_AD7418 is not set
650# CONFIG_SENSORS_ADM1021 is not set 636# CONFIG_SENSORS_ADM1021 is not set
651# CONFIG_SENSORS_ADM1025 is not set 637# CONFIG_SENSORS_ADM1025 is not set
@@ -653,12 +639,12 @@ CONFIG_HWMON=y
653# CONFIG_SENSORS_ADM1029 is not set 639# CONFIG_SENSORS_ADM1029 is not set
654# CONFIG_SENSORS_ADM1031 is not set 640# CONFIG_SENSORS_ADM1031 is not set
655# CONFIG_SENSORS_ADM9240 is not set 641# CONFIG_SENSORS_ADM9240 is not set
656# CONFIG_SENSORS_ASB100 is not set 642# CONFIG_SENSORS_ADT7470 is not set
657# CONFIG_SENSORS_ATXP1 is not set 643# CONFIG_SENSORS_ATXP1 is not set
658# CONFIG_SENSORS_DS1621 is not set 644# CONFIG_SENSORS_DS1621 is not set
659# CONFIG_SENSORS_F71805F is not set 645# CONFIG_SENSORS_F71805F is not set
660# CONFIG_SENSORS_FSCHER is not set 646# CONFIG_SENSORS_F71882FG is not set
661# CONFIG_SENSORS_FSCPOS is not set 647# CONFIG_SENSORS_F75375S is not set
662# CONFIG_SENSORS_GL518SM is not set 648# CONFIG_SENSORS_GL518SM is not set
663# CONFIG_SENSORS_GL520SM is not set 649# CONFIG_SENSORS_GL520SM is not set
664# CONFIG_SENSORS_IT87 is not set 650# CONFIG_SENSORS_IT87 is not set
@@ -694,6 +680,25 @@ CONFIG_HWMON=y
694# CONFIG_SENSORS_W83627HF is not set 680# CONFIG_SENSORS_W83627HF is not set
695# CONFIG_SENSORS_W83627EHF is not set 681# CONFIG_SENSORS_W83627EHF is not set
696# CONFIG_HWMON_DEBUG_CHIP is not set 682# CONFIG_HWMON_DEBUG_CHIP is not set
683CONFIG_WATCHDOG=y
684# CONFIG_WATCHDOG_NOWAYOUT is not set
685
686#
687# Watchdog Device Drivers
688#
689# CONFIG_SOFT_WATCHDOG is not set
690
691#
692# PCI-based Watchdog Cards
693#
694# CONFIG_PCIPCWATCHDOG is not set
695# CONFIG_WDTPCI is not set
696
697#
698# Sonics Silicon Backplane
699#
700CONFIG_SSB_POSSIBLE=y
701# CONFIG_SSB is not set
697 702
698# 703#
699# Multifunction device drivers 704# Multifunction device drivers
@@ -713,11 +718,11 @@ CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
713# CONFIG_VIDEO_VIVI is not set 718# CONFIG_VIDEO_VIVI is not set
714# CONFIG_VIDEO_SAA5246A is not set 719# CONFIG_VIDEO_SAA5246A is not set
715# CONFIG_VIDEO_SAA5249 is not set 720# CONFIG_VIDEO_SAA5249 is not set
716# CONFIG_TUNER_TEA5761 is not set
717# CONFIG_VIDEO_SAA7134 is not set 721# CONFIG_VIDEO_SAA7134 is not set
718# CONFIG_VIDEO_HEXIUM_ORION is not set 722# CONFIG_VIDEO_HEXIUM_ORION is not set
719# CONFIG_VIDEO_HEXIUM_GEMINI is not set 723# CONFIG_VIDEO_HEXIUM_GEMINI is not set
720# CONFIG_VIDEO_CX88 is not set 724# CONFIG_VIDEO_CX88 is not set
725# CONFIG_VIDEO_CX23885 is not set
721# CONFIG_VIDEO_CAFE_CCIC is not set 726# CONFIG_VIDEO_CAFE_CCIC is not set
722# CONFIG_RADIO_ADAPTERS is not set 727# CONFIG_RADIO_ADAPTERS is not set
723CONFIG_DVB_CORE=y 728CONFIG_DVB_CORE=y
@@ -796,6 +801,7 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
796# CONFIG_DVB_OR51132 is not set 801# CONFIG_DVB_OR51132 is not set
797# CONFIG_DVB_BCM3510 is not set 802# CONFIG_DVB_BCM3510 is not set
798# CONFIG_DVB_LGDT330X is not set 803# CONFIG_DVB_LGDT330X is not set
804# CONFIG_DVB_S5H1409 is not set
799 805
800# 806#
801# Tuners/PLL support 807# Tuners/PLL support
@@ -805,6 +811,9 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
805# CONFIG_DVB_TDA827X is not set 811# CONFIG_DVB_TDA827X is not set
806# CONFIG_DVB_TUNER_QT1010 is not set 812# CONFIG_DVB_TUNER_QT1010 is not set
807# CONFIG_DVB_TUNER_MT2060 is not set 813# CONFIG_DVB_TUNER_MT2060 is not set
814# CONFIG_DVB_TUNER_MT2266 is not set
815# CONFIG_DVB_TUNER_MT2131 is not set
816# CONFIG_DVB_TUNER_DIB0070 is not set
808 817
809# 818#
810# Miscellaneous devices 819# Miscellaneous devices
@@ -817,12 +826,7 @@ CONFIG_DAB=y
817# 826#
818# Graphics support 827# Graphics support
819# 828#
820# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 829# CONFIG_DRM is not set
821
822#
823# Display device support
824#
825# CONFIG_DISPLAY_SUPPORT is not set
826# CONFIG_VGASTATE is not set 830# CONFIG_VGASTATE is not set
827CONFIG_VIDEO_OUTPUT_CONTROL=y 831CONFIG_VIDEO_OUTPUT_CONTROL=y
828CONFIG_FB=y 832CONFIG_FB=y
@@ -831,6 +835,7 @@ CONFIG_FIRMWARE_EDID=y
831CONFIG_FB_CFB_FILLRECT=y 835CONFIG_FB_CFB_FILLRECT=y
832CONFIG_FB_CFB_COPYAREA=y 836CONFIG_FB_CFB_COPYAREA=y
833CONFIG_FB_CFB_IMAGEBLIT=y 837CONFIG_FB_CFB_IMAGEBLIT=y
838# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
834# CONFIG_FB_SYS_FILLRECT is not set 839# CONFIG_FB_SYS_FILLRECT is not set
835# CONFIG_FB_SYS_COPYAREA is not set 840# CONFIG_FB_SYS_COPYAREA is not set
836# CONFIG_FB_SYS_IMAGEBLIT is not set 841# CONFIG_FB_SYS_IMAGEBLIT is not set
@@ -869,6 +874,12 @@ CONFIG_FB_KYRO=y
869# CONFIG_FB_ARK is not set 874# CONFIG_FB_ARK is not set
870# CONFIG_FB_PM3 is not set 875# CONFIG_FB_PM3 is not set
871# CONFIG_FB_VIRTUAL is not set 876# CONFIG_FB_VIRTUAL is not set
877# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
878
879#
880# Display device support
881#
882# CONFIG_DISPLAY_SUPPORT is not set
872 883
873# 884#
874# Console display driver support 885# Console display driver support
@@ -903,6 +914,7 @@ CONFIG_LOGO_SUPERH_CLUT224=y
903CONFIG_HID_SUPPORT=y 914CONFIG_HID_SUPPORT=y
904CONFIG_HID=y 915CONFIG_HID=y
905# CONFIG_HID_DEBUG is not set 916# CONFIG_HID_DEBUG is not set
917# CONFIG_HIDRAW is not set
906CONFIG_USB_SUPPORT=y 918CONFIG_USB_SUPPORT=y
907CONFIG_USB_ARCH_HAS_HCD=y 919CONFIG_USB_ARCH_HAS_HCD=y
908CONFIG_USB_ARCH_HAS_OHCI=y 920CONFIG_USB_ARCH_HAS_OHCI=y
@@ -923,19 +935,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
923# CONFIG_RTC_CLASS is not set 935# CONFIG_RTC_CLASS is not set
924 936
925# 937#
926# DMA Engine support
927#
928# CONFIG_DMA_ENGINE is not set
929
930#
931# DMA Clients
932#
933
934#
935# DMA Devices
936#
937
938#
939# Userspace I/O 938# Userspace I/O
940# 939#
941# CONFIG_UIO is not set 940# CONFIG_UIO is not set
@@ -994,7 +993,6 @@ CONFIG_TMPFS=y
994# CONFIG_TMPFS_POSIX_ACL is not set 993# CONFIG_TMPFS_POSIX_ACL is not set
995CONFIG_HUGETLBFS=y 994CONFIG_HUGETLBFS=y
996CONFIG_HUGETLB_PAGE=y 995CONFIG_HUGETLB_PAGE=y
997CONFIG_RAMFS=y
998# CONFIG_CONFIGFS_FS is not set 996# CONFIG_CONFIGFS_FS is not set
999 997
1000# 998#
@@ -1013,10 +1011,7 @@ CONFIG_RAMFS=y
1013# CONFIG_QNX4FS_FS is not set 1011# CONFIG_QNX4FS_FS is not set
1014# CONFIG_SYSV_FS is not set 1012# CONFIG_SYSV_FS is not set
1015# CONFIG_UFS_FS is not set 1013# CONFIG_UFS_FS is not set
1016 1014CONFIG_NETWORK_FILESYSTEMS=y
1017#
1018# Network File Systems
1019#
1020CONFIG_NFS_FS=y 1015CONFIG_NFS_FS=y
1021CONFIG_NFS_V3=y 1016CONFIG_NFS_V3=y
1022# CONFIG_NFS_V3_ACL is not set 1017# CONFIG_NFS_V3_ACL is not set
@@ -1058,26 +1053,17 @@ CONFIG_MSDOS_PARTITION=y
1058# CONFIG_KARMA_PARTITION is not set 1053# CONFIG_KARMA_PARTITION is not set
1059# CONFIG_EFI_PARTITION is not set 1054# CONFIG_EFI_PARTITION is not set
1060# CONFIG_SYSV68_PARTITION is not set 1055# CONFIG_SYSV68_PARTITION is not set
1061
1062#
1063# Native Language Support
1064#
1065# CONFIG_NLS is not set 1056# CONFIG_NLS is not set
1066
1067#
1068# Distributed Lock Manager
1069#
1070# CONFIG_DLM is not set 1057# CONFIG_DLM is not set
1071 1058CONFIG_INSTRUMENTATION=y
1072#
1073# Profiling support
1074#
1075# CONFIG_PROFILING is not set 1059# CONFIG_PROFILING is not set
1060# CONFIG_MARKERS is not set
1076 1061
1077# 1062#
1078# Kernel hacking 1063# Kernel hacking
1079# 1064#
1080# CONFIG_PRINTK_TIME is not set 1065# CONFIG_PRINTK_TIME is not set
1066CONFIG_ENABLE_WARN_DEPRECATED=y
1081CONFIG_ENABLE_MUST_CHECK=y 1067CONFIG_ENABLE_MUST_CHECK=y
1082CONFIG_MAGIC_SYSRQ=y 1068CONFIG_MAGIC_SYSRQ=y
1083# CONFIG_UNUSED_SYMBOLS is not set 1069# CONFIG_UNUSED_SYMBOLS is not set
@@ -1101,10 +1087,13 @@ CONFIG_DEBUG_BUGVERBOSE=y
1101# CONFIG_DEBUG_INFO is not set 1087# CONFIG_DEBUG_INFO is not set
1102# CONFIG_DEBUG_VM is not set 1088# CONFIG_DEBUG_VM is not set
1103# CONFIG_DEBUG_LIST is not set 1089# CONFIG_DEBUG_LIST is not set
1090# CONFIG_DEBUG_SG is not set
1104CONFIG_FRAME_POINTER=y 1091CONFIG_FRAME_POINTER=y
1105CONFIG_FORCED_INLINING=y 1092CONFIG_FORCED_INLINING=y
1093# CONFIG_BOOT_PRINTK_DELAY is not set
1106# CONFIG_RCU_TORTURE_TEST is not set 1094# CONFIG_RCU_TORTURE_TEST is not set
1107# CONFIG_FAULT_INJECTION is not set 1095# CONFIG_FAULT_INJECTION is not set
1096# CONFIG_SAMPLES is not set
1108# CONFIG_EARLY_PRINTK is not set 1097# CONFIG_EARLY_PRINTK is not set
1109CONFIG_SH64_PROC_TLB=y 1098CONFIG_SH64_PROC_TLB=y
1110CONFIG_SH64_PROC_ASIDS=y 1099CONFIG_SH64_PROC_ASIDS=y
@@ -1118,6 +1107,7 @@ CONFIG_SH64_SR_WATCH=y
1118# 1107#
1119# CONFIG_KEYS is not set 1108# CONFIG_KEYS is not set
1120# CONFIG_SECURITY is not set 1109# CONFIG_SECURITY is not set
1110# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1121# CONFIG_CRYPTO is not set 1111# CONFIG_CRYPTO is not set
1122 1112
1123# 1113#
diff --git a/arch/sh64/configs/harp_defconfig b/arch/sh64/configs/harp_defconfig
index e4b84b51baf8..ba302cd0c285 100644
--- a/arch/sh64/configs/harp_defconfig
+++ b/arch/sh64/configs/harp_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.23-rc8 3# Linux kernel version: 2.6.24-rc1
4# Mon Oct 1 18:01:38 2007 4# Fri Nov 2 14:35:57 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH64=y 7CONFIG_SUPERH64=y
@@ -36,6 +36,10 @@ CONFIG_POSIX_MQUEUE=y
36# CONFIG_AUDIT is not set 36# CONFIG_AUDIT is not set
37# CONFIG_IKCONFIG is not set 37# CONFIG_IKCONFIG is not set
38CONFIG_LOG_BUF_SHIFT=14 38CONFIG_LOG_BUF_SHIFT=14
39# CONFIG_CGROUPS is not set
40CONFIG_FAIR_GROUP_SCHED=y
41CONFIG_FAIR_USER_SCHED=y
42# CONFIG_FAIR_CGROUP_SCHED is not set
39CONFIG_SYSFS_DEPRECATED=y 43CONFIG_SYSFS_DEPRECATED=y
40# CONFIG_RELAY is not set 44# CONFIG_RELAY is not set
41# CONFIG_BLK_DEV_INITRD is not set 45# CONFIG_BLK_DEV_INITRD is not set
@@ -141,6 +145,7 @@ CONFIG_FLATMEM_MANUAL=y
141CONFIG_FLATMEM=y 145CONFIG_FLATMEM=y
142CONFIG_FLAT_NODE_MEM_MAP=y 146CONFIG_FLAT_NODE_MEM_MAP=y
143# CONFIG_SPARSEMEM_STATIC is not set 147# CONFIG_SPARSEMEM_STATIC is not set
148# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
144CONFIG_SPLIT_PTLOCK_CPUS=4 149CONFIG_SPLIT_PTLOCK_CPUS=4
145# CONFIG_RESOURCES_64BIT is not set 150# CONFIG_RESOURCES_64BIT is not set
146CONFIG_ZONE_DMA_FLAG=0 151CONFIG_ZONE_DMA_FLAG=0
@@ -150,10 +155,6 @@ CONFIG_NR_QUICK=1
150# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 155# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
151# 156#
152# CONFIG_ARCH_SUPPORTS_MSI is not set 157# CONFIG_ARCH_SUPPORTS_MSI is not set
153
154#
155# PCCARD (PCMCIA/CardBus) support
156#
157# CONFIG_PCCARD is not set 158# CONFIG_PCCARD is not set
158 159
159# 160#
@@ -198,6 +199,7 @@ CONFIG_IP_PNP=y
198CONFIG_INET_XFRM_MODE_TRANSPORT=y 199CONFIG_INET_XFRM_MODE_TRANSPORT=y
199CONFIG_INET_XFRM_MODE_TUNNEL=y 200CONFIG_INET_XFRM_MODE_TUNNEL=y
200CONFIG_INET_XFRM_MODE_BEET=y 201CONFIG_INET_XFRM_MODE_BEET=y
202# CONFIG_INET_LRO is not set
201CONFIG_INET_DIAG=y 203CONFIG_INET_DIAG=y
202CONFIG_INET_TCP_DIAG=y 204CONFIG_INET_TCP_DIAG=y
203# CONFIG_TCP_CONG_ADVANCED is not set 205# CONFIG_TCP_CONG_ADVANCED is not set
@@ -223,10 +225,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
223# CONFIG_LAPB is not set 225# CONFIG_LAPB is not set
224# CONFIG_ECONET is not set 226# CONFIG_ECONET is not set
225# CONFIG_WAN_ROUTER is not set 227# CONFIG_WAN_ROUTER is not set
226
227#
228# QoS and/or fair queueing
229#
230# CONFIG_NET_SCHED is not set 228# CONFIG_NET_SCHED is not set
231 229
232# 230#
@@ -255,6 +253,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
255# 253#
256# Generic Driver Options 254# Generic Driver Options
257# 255#
256CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
258CONFIG_STANDALONE=y 257CONFIG_STANDALONE=y
259CONFIG_PREVENT_FIRMWARE_BUILD=y 258CONFIG_PREVENT_FIRMWARE_BUILD=y
260# CONFIG_FW_LOADER is not set 259# CONFIG_FW_LOADER is not set
@@ -314,6 +313,7 @@ CONFIG_SCSI_SPI_ATTRS=y
314# CONFIG_SCSI_FC_ATTRS is not set 313# CONFIG_SCSI_FC_ATTRS is not set
315# CONFIG_SCSI_ISCSI_ATTRS is not set 314# CONFIG_SCSI_ISCSI_ATTRS is not set
316# CONFIG_SCSI_SAS_LIBSAS is not set 315# CONFIG_SCSI_SAS_LIBSAS is not set
316# CONFIG_SCSI_SRP_ATTRS is not set
317CONFIG_SCSI_LOWLEVEL=y 317CONFIG_SCSI_LOWLEVEL=y
318# CONFIG_ISCSI_TCP is not set 318# CONFIG_ISCSI_TCP is not set
319# CONFIG_SCSI_DEBUG is not set 319# CONFIG_SCSI_DEBUG is not set
@@ -326,11 +326,18 @@ CONFIG_NETDEVICES=y
326# CONFIG_MACVLAN is not set 326# CONFIG_MACVLAN is not set
327# CONFIG_EQUALIZER is not set 327# CONFIG_EQUALIZER is not set
328# CONFIG_TUN is not set 328# CONFIG_TUN is not set
329# CONFIG_VETH is not set
329# CONFIG_PHYLIB is not set 330# CONFIG_PHYLIB is not set
330CONFIG_NET_ETHERNET=y 331CONFIG_NET_ETHERNET=y
331# CONFIG_MII is not set 332# CONFIG_MII is not set
332# CONFIG_STNIC is not set 333# CONFIG_STNIC is not set
333# CONFIG_SMC91X is not set 334# CONFIG_SMC91X is not set
335# CONFIG_SMC911X is not set
336# CONFIG_IBM_NEW_EMAC_ZMII is not set
337# CONFIG_IBM_NEW_EMAC_RGMII is not set
338# CONFIG_IBM_NEW_EMAC_TAH is not set
339# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
340# CONFIG_B44 is not set
334CONFIG_NETDEV_1000=y 341CONFIG_NETDEV_1000=y
335CONFIG_NETDEV_10000=y 342CONFIG_NETDEV_10000=y
336 343
@@ -364,7 +371,6 @@ CONFIG_INPUT_MOUSEDEV=y
364CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 371CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
365CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 372CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
366# CONFIG_INPUT_JOYDEV is not set 373# CONFIG_INPUT_JOYDEV is not set
367# CONFIG_INPUT_TSDEV is not set
368# CONFIG_INPUT_EVDEV is not set 374# CONFIG_INPUT_EVDEV is not set
369# CONFIG_INPUT_EVBUG is not set 375# CONFIG_INPUT_EVBUG is not set
370 376
@@ -410,13 +416,6 @@ CONFIG_UNIX98_PTYS=y
410CONFIG_LEGACY_PTYS=y 416CONFIG_LEGACY_PTYS=y
411CONFIG_LEGACY_PTY_COUNT=256 417CONFIG_LEGACY_PTY_COUNT=256
412# CONFIG_IPMI_HANDLER is not set 418# CONFIG_IPMI_HANDLER is not set
413CONFIG_WATCHDOG=y
414# CONFIG_WATCHDOG_NOWAYOUT is not set
415
416#
417# Watchdog Device Drivers
418#
419# CONFIG_SOFT_WATCHDOG is not set
420CONFIG_HW_RANDOM=y 419CONFIG_HW_RANDOM=y
421# CONFIG_R3964 is not set 420# CONFIG_R3964 is not set
422# CONFIG_RAW_DRIVER is not set 421# CONFIG_RAW_DRIVER is not set
@@ -432,9 +431,8 @@ CONFIG_HW_RANDOM=y
432# CONFIG_POWER_SUPPLY is not set 431# CONFIG_POWER_SUPPLY is not set
433CONFIG_HWMON=y 432CONFIG_HWMON=y
434# CONFIG_HWMON_VID is not set 433# CONFIG_HWMON_VID is not set
435# CONFIG_SENSORS_ABITUGURU is not set
436# CONFIG_SENSORS_ABITUGURU3 is not set
437# CONFIG_SENSORS_F71805F is not set 434# CONFIG_SENSORS_F71805F is not set
435# CONFIG_SENSORS_F71882FG is not set
438# CONFIG_SENSORS_IT87 is not set 436# CONFIG_SENSORS_IT87 is not set
439# CONFIG_SENSORS_PC87360 is not set 437# CONFIG_SENSORS_PC87360 is not set
440# CONFIG_SENSORS_PC87427 is not set 438# CONFIG_SENSORS_PC87427 is not set
@@ -444,6 +442,19 @@ CONFIG_HWMON=y
444# CONFIG_SENSORS_W83627HF is not set 442# CONFIG_SENSORS_W83627HF is not set
445# CONFIG_SENSORS_W83627EHF is not set 443# CONFIG_SENSORS_W83627EHF is not set
446# CONFIG_HWMON_DEBUG_CHIP is not set 444# CONFIG_HWMON_DEBUG_CHIP is not set
445CONFIG_WATCHDOG=y
446# CONFIG_WATCHDOG_NOWAYOUT is not set
447
448#
449# Watchdog Device Drivers
450#
451# CONFIG_SOFT_WATCHDOG is not set
452
453#
454# Sonics Silicon Backplane
455#
456CONFIG_SSB_POSSIBLE=y
457# CONFIG_SSB is not set
447 458
448# 459#
449# Multifunction device drivers 460# Multifunction device drivers
@@ -460,12 +471,6 @@ CONFIG_DAB=y
460# 471#
461# Graphics support 472# Graphics support
462# 473#
463# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
464
465#
466# Display device support
467#
468# CONFIG_DISPLAY_SUPPORT is not set
469# CONFIG_VGASTATE is not set 474# CONFIG_VGASTATE is not set
470CONFIG_VIDEO_OUTPUT_CONTROL=y 475CONFIG_VIDEO_OUTPUT_CONTROL=y
471CONFIG_FB=y 476CONFIG_FB=y
@@ -474,6 +479,7 @@ CONFIG_FIRMWARE_EDID=y
474# CONFIG_FB_CFB_FILLRECT is not set 479# CONFIG_FB_CFB_FILLRECT is not set
475# CONFIG_FB_CFB_COPYAREA is not set 480# CONFIG_FB_CFB_COPYAREA is not set
476# CONFIG_FB_CFB_IMAGEBLIT is not set 481# CONFIG_FB_CFB_IMAGEBLIT is not set
482# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
477# CONFIG_FB_SYS_FILLRECT is not set 483# CONFIG_FB_SYS_FILLRECT is not set
478# CONFIG_FB_SYS_COPYAREA is not set 484# CONFIG_FB_SYS_COPYAREA is not set
479# CONFIG_FB_SYS_IMAGEBLIT is not set 485# CONFIG_FB_SYS_IMAGEBLIT is not set
@@ -490,6 +496,12 @@ CONFIG_FB_MODE_HELPERS=y
490# 496#
491# CONFIG_FB_S1D13XXX is not set 497# CONFIG_FB_S1D13XXX is not set
492# CONFIG_FB_VIRTUAL is not set 498# CONFIG_FB_VIRTUAL is not set
499# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
500
501#
502# Display device support
503#
504# CONFIG_DISPLAY_SUPPORT is not set
493 505
494# 506#
495# Console display driver support 507# Console display driver support
@@ -524,6 +536,7 @@ CONFIG_LOGO_SUPERH_CLUT224=y
524CONFIG_HID_SUPPORT=y 536CONFIG_HID_SUPPORT=y
525CONFIG_HID=y 537CONFIG_HID=y
526# CONFIG_HID_DEBUG is not set 538# CONFIG_HID_DEBUG is not set
539# CONFIG_HIDRAW is not set
527CONFIG_USB_SUPPORT=y 540CONFIG_USB_SUPPORT=y
528CONFIG_USB_ARCH_HAS_HCD=y 541CONFIG_USB_ARCH_HAS_HCD=y
529# CONFIG_USB_ARCH_HAS_OHCI is not set 542# CONFIG_USB_ARCH_HAS_OHCI is not set
@@ -543,19 +556,6 @@ CONFIG_USB_ARCH_HAS_HCD=y
543# CONFIG_RTC_CLASS is not set 556# CONFIG_RTC_CLASS is not set
544 557
545# 558#
546# DMA Engine support
547#
548# CONFIG_DMA_ENGINE is not set
549
550#
551# DMA Clients
552#
553
554#
555# DMA Devices
556#
557
558#
559# Userspace I/O 559# Userspace I/O
560# 560#
561# CONFIG_UIO is not set 561# CONFIG_UIO is not set
@@ -614,7 +614,6 @@ CONFIG_TMPFS=y
614# CONFIG_TMPFS_POSIX_ACL is not set 614# CONFIG_TMPFS_POSIX_ACL is not set
615CONFIG_HUGETLBFS=y 615CONFIG_HUGETLBFS=y
616CONFIG_HUGETLB_PAGE=y 616CONFIG_HUGETLB_PAGE=y
617CONFIG_RAMFS=y
618# CONFIG_CONFIGFS_FS is not set 617# CONFIG_CONFIGFS_FS is not set
619 618
620# 619#
@@ -633,10 +632,7 @@ CONFIG_RAMFS=y
633# CONFIG_QNX4FS_FS is not set 632# CONFIG_QNX4FS_FS is not set
634# CONFIG_SYSV_FS is not set 633# CONFIG_SYSV_FS is not set
635# CONFIG_UFS_FS is not set 634# CONFIG_UFS_FS is not set
636 635CONFIG_NETWORK_FILESYSTEMS=y
637#
638# Network File Systems
639#
640CONFIG_NFS_FS=y 636CONFIG_NFS_FS=y
641CONFIG_NFS_V3=y 637CONFIG_NFS_V3=y
642# CONFIG_NFS_V3_ACL is not set 638# CONFIG_NFS_V3_ACL is not set
@@ -678,26 +674,17 @@ CONFIG_MSDOS_PARTITION=y
678# CONFIG_KARMA_PARTITION is not set 674# CONFIG_KARMA_PARTITION is not set
679# CONFIG_EFI_PARTITION is not set 675# CONFIG_EFI_PARTITION is not set
680# CONFIG_SYSV68_PARTITION is not set 676# CONFIG_SYSV68_PARTITION is not set
681
682#
683# Native Language Support
684#
685# CONFIG_NLS is not set 677# CONFIG_NLS is not set
686
687#
688# Distributed Lock Manager
689#
690# CONFIG_DLM is not set 678# CONFIG_DLM is not set
691 679CONFIG_INSTRUMENTATION=y
692#
693# Profiling support
694#
695# CONFIG_PROFILING is not set 680# CONFIG_PROFILING is not set
681# CONFIG_MARKERS is not set
696 682
697# 683#
698# Kernel hacking 684# Kernel hacking
699# 685#
700# CONFIG_PRINTK_TIME is not set 686# CONFIG_PRINTK_TIME is not set
687CONFIG_ENABLE_WARN_DEPRECATED=y
701CONFIG_ENABLE_MUST_CHECK=y 688CONFIG_ENABLE_MUST_CHECK=y
702CONFIG_MAGIC_SYSRQ=y 689CONFIG_MAGIC_SYSRQ=y
703# CONFIG_UNUSED_SYMBOLS is not set 690# CONFIG_UNUSED_SYMBOLS is not set
@@ -721,16 +708,17 @@ CONFIG_DEBUG_BUGVERBOSE=y
721# CONFIG_DEBUG_INFO is not set 708# CONFIG_DEBUG_INFO is not set
722# CONFIG_DEBUG_VM is not set 709# CONFIG_DEBUG_VM is not set
723# CONFIG_DEBUG_LIST is not set 710# CONFIG_DEBUG_LIST is not set
711# CONFIG_DEBUG_SG is not set
724CONFIG_FRAME_POINTER=y 712CONFIG_FRAME_POINTER=y
725CONFIG_FORCED_INLINING=y 713CONFIG_FORCED_INLINING=y
714# CONFIG_BOOT_PRINTK_DELAY is not set
726# CONFIG_FAULT_INJECTION is not set 715# CONFIG_FAULT_INJECTION is not set
716# CONFIG_SAMPLES is not set
727# CONFIG_EARLY_PRINTK is not set 717# CONFIG_EARLY_PRINTK is not set
728# CONFIG_DEBUG_KERNEL_WITH_GDB_STUB is not set
729CONFIG_SH64_PROC_TLB=y 718CONFIG_SH64_PROC_TLB=y
730CONFIG_SH64_PROC_ASIDS=y 719CONFIG_SH64_PROC_ASIDS=y
731CONFIG_SH64_SR_WATCH=y 720CONFIG_SH64_SR_WATCH=y
732# CONFIG_POOR_MANS_STRACE is not set 721# CONFIG_POOR_MANS_STRACE is not set
733# CONFIG_SH_ALPHANUMERIC is not set
734# CONFIG_SH_NO_BSS_INIT is not set 722# CONFIG_SH_NO_BSS_INIT is not set
735 723
736# 724#
@@ -738,6 +726,7 @@ CONFIG_SH64_SR_WATCH=y
738# 726#
739# CONFIG_KEYS is not set 727# CONFIG_KEYS is not set
740# CONFIG_SECURITY is not set 728# CONFIG_SECURITY is not set
729# CONFIG_SECURITY_FILE_CAPABILITIES is not set
741# CONFIG_CRYPTO is not set 730# CONFIG_CRYPTO is not set
742 731
743# 732#
diff --git a/arch/sh64/configs/sim_defconfig b/arch/sh64/configs/sim_defconfig
index f83bae659dc3..18476cc522c3 100644
--- a/arch/sh64/configs/sim_defconfig
+++ b/arch/sh64/configs/sim_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.23-rc8 3# Linux kernel version: 2.6.24-rc1
4# Mon Oct 1 17:50:35 2007 4# Fri Nov 2 14:36:08 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH64=y 7CONFIG_SUPERH64=y
@@ -33,6 +33,10 @@ CONFIG_SWAP=y
33# CONFIG_USER_NS is not set 33# CONFIG_USER_NS is not set
34# CONFIG_IKCONFIG is not set 34# CONFIG_IKCONFIG is not set
35CONFIG_LOG_BUF_SHIFT=14 35CONFIG_LOG_BUF_SHIFT=14
36# CONFIG_CGROUPS is not set
37CONFIG_FAIR_GROUP_SCHED=y
38CONFIG_FAIR_USER_SCHED=y
39# CONFIG_FAIR_CGROUP_SCHED is not set
36CONFIG_SYSFS_DEPRECATED=y 40CONFIG_SYSFS_DEPRECATED=y
37# CONFIG_RELAY is not set 41# CONFIG_RELAY is not set
38# CONFIG_BLK_DEV_INITRD is not set 42# CONFIG_BLK_DEV_INITRD is not set
@@ -138,6 +142,7 @@ CONFIG_FLATMEM_MANUAL=y
138CONFIG_FLATMEM=y 142CONFIG_FLATMEM=y
139CONFIG_FLAT_NODE_MEM_MAP=y 143CONFIG_FLAT_NODE_MEM_MAP=y
140# CONFIG_SPARSEMEM_STATIC is not set 144# CONFIG_SPARSEMEM_STATIC is not set
145# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
141CONFIG_SPLIT_PTLOCK_CPUS=4 146CONFIG_SPLIT_PTLOCK_CPUS=4
142# CONFIG_RESOURCES_64BIT is not set 147# CONFIG_RESOURCES_64BIT is not set
143CONFIG_ZONE_DMA_FLAG=0 148CONFIG_ZONE_DMA_FLAG=0
@@ -147,10 +152,6 @@ CONFIG_NR_QUICK=1
147# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 152# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
148# 153#
149# CONFIG_ARCH_SUPPORTS_MSI is not set 154# CONFIG_ARCH_SUPPORTS_MSI is not set
150
151#
152# PCCARD (PCMCIA/CardBus) support
153#
154# CONFIG_PCCARD is not set 155# CONFIG_PCCARD is not set
155 156
156# 157#
@@ -171,6 +172,7 @@ CONFIG_BINFMT_ELF=y
171# 172#
172# Generic Driver Options 173# Generic Driver Options
173# 174#
175CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
174CONFIG_STANDALONE=y 176CONFIG_STANDALONE=y
175CONFIG_PREVENT_FIRMWARE_BUILD=y 177CONFIG_PREVENT_FIRMWARE_BUILD=y
176# CONFIG_FW_LOADER is not set 178# CONFIG_FW_LOADER is not set
@@ -217,6 +219,7 @@ CONFIG_SCSI_MULTI_LUN=y
217CONFIG_SCSI_SPI_ATTRS=y 219CONFIG_SCSI_SPI_ATTRS=y
218# CONFIG_SCSI_FC_ATTRS is not set 220# CONFIG_SCSI_FC_ATTRS is not set
219# CONFIG_SCSI_SAS_LIBSAS is not set 221# CONFIG_SCSI_SAS_LIBSAS is not set
222# CONFIG_SCSI_SRP_ATTRS is not set
220CONFIG_SCSI_LOWLEVEL=y 223CONFIG_SCSI_LOWLEVEL=y
221# CONFIG_SCSI_DEBUG is not set 224# CONFIG_SCSI_DEBUG is not set
222# CONFIG_ATA is not set 225# CONFIG_ATA is not set
@@ -238,7 +241,6 @@ CONFIG_INPUT_MOUSEDEV=y
238CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 241CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
239CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 242CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
240# CONFIG_INPUT_JOYDEV is not set 243# CONFIG_INPUT_JOYDEV is not set
241# CONFIG_INPUT_TSDEV is not set
242# CONFIG_INPUT_EVDEV is not set 244# CONFIG_INPUT_EVDEV is not set
243# CONFIG_INPUT_EVBUG is not set 245# CONFIG_INPUT_EVBUG is not set
244 246
@@ -283,7 +285,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
283CONFIG_UNIX98_PTYS=y 285CONFIG_UNIX98_PTYS=y
284# CONFIG_LEGACY_PTYS is not set 286# CONFIG_LEGACY_PTYS is not set
285# CONFIG_IPMI_HANDLER is not set 287# CONFIG_IPMI_HANDLER is not set
286# CONFIG_WATCHDOG is not set
287# CONFIG_HW_RANDOM is not set 288# CONFIG_HW_RANDOM is not set
288# CONFIG_R3964 is not set 289# CONFIG_R3964 is not set
289# CONFIG_RAW_DRIVER is not set 290# CONFIG_RAW_DRIVER is not set
@@ -298,6 +299,13 @@ CONFIG_UNIX98_PTYS=y
298# CONFIG_W1 is not set 299# CONFIG_W1 is not set
299# CONFIG_POWER_SUPPLY is not set 300# CONFIG_POWER_SUPPLY is not set
300# CONFIG_HWMON is not set 301# CONFIG_HWMON is not set
302# CONFIG_WATCHDOG is not set
303
304#
305# Sonics Silicon Backplane
306#
307CONFIG_SSB_POSSIBLE=y
308# CONFIG_SSB is not set
301 309
302# 310#
303# Multifunction device drivers 311# Multifunction device drivers
@@ -313,12 +321,6 @@ CONFIG_DAB=y
313# 321#
314# Graphics support 322# Graphics support
315# 323#
316# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
317
318#
319# Display device support
320#
321# CONFIG_DISPLAY_SUPPORT is not set
322# CONFIG_VGASTATE is not set 324# CONFIG_VGASTATE is not set
323CONFIG_VIDEO_OUTPUT_CONTROL=y 325CONFIG_VIDEO_OUTPUT_CONTROL=y
324CONFIG_FB=y 326CONFIG_FB=y
@@ -327,6 +329,7 @@ CONFIG_FIRMWARE_EDID=y
327# CONFIG_FB_CFB_FILLRECT is not set 329# CONFIG_FB_CFB_FILLRECT is not set
328# CONFIG_FB_CFB_COPYAREA is not set 330# CONFIG_FB_CFB_COPYAREA is not set
329# CONFIG_FB_CFB_IMAGEBLIT is not set 331# CONFIG_FB_CFB_IMAGEBLIT is not set
332# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
330# CONFIG_FB_SYS_FILLRECT is not set 333# CONFIG_FB_SYS_FILLRECT is not set
331# CONFIG_FB_SYS_COPYAREA is not set 334# CONFIG_FB_SYS_COPYAREA is not set
332# CONFIG_FB_SYS_IMAGEBLIT is not set 335# CONFIG_FB_SYS_IMAGEBLIT is not set
@@ -343,6 +346,12 @@ CONFIG_FB_MODE_HELPERS=y
343# 346#
344# CONFIG_FB_S1D13XXX is not set 347# CONFIG_FB_S1D13XXX is not set
345# CONFIG_FB_VIRTUAL is not set 348# CONFIG_FB_VIRTUAL is not set
349# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
350
351#
352# Display device support
353#
354# CONFIG_DISPLAY_SUPPORT is not set
346 355
347# 356#
348# Console display driver support 357# Console display driver support
@@ -381,19 +390,6 @@ CONFIG_LOGO_SUPERH_CLUT224=y
381# CONFIG_RTC_CLASS is not set 390# CONFIG_RTC_CLASS is not set
382 391
383# 392#
384# DMA Engine support
385#
386# CONFIG_DMA_ENGINE is not set
387
388#
389# DMA Clients
390#
391
392#
393# DMA Devices
394#
395
396#
397# Userspace I/O 393# Userspace I/O
398# 394#
399# CONFIG_UIO is not set 395# CONFIG_UIO is not set
@@ -451,7 +447,6 @@ CONFIG_TMPFS=y
451# CONFIG_TMPFS_POSIX_ACL is not set 447# CONFIG_TMPFS_POSIX_ACL is not set
452CONFIG_HUGETLBFS=y 448CONFIG_HUGETLBFS=y
453CONFIG_HUGETLB_PAGE=y 449CONFIG_HUGETLB_PAGE=y
454CONFIG_RAMFS=y
455# CONFIG_CONFIGFS_FS is not set 450# CONFIG_CONFIGFS_FS is not set
456 451
457# 452#
@@ -492,22 +487,17 @@ CONFIG_MSDOS_PARTITION=y
492# CONFIG_KARMA_PARTITION is not set 487# CONFIG_KARMA_PARTITION is not set
493# CONFIG_EFI_PARTITION is not set 488# CONFIG_EFI_PARTITION is not set
494# CONFIG_SYSV68_PARTITION is not set 489# CONFIG_SYSV68_PARTITION is not set
495
496#
497# Native Language Support
498#
499# CONFIG_NLS is not set 490# CONFIG_NLS is not set
500 491CONFIG_INSTRUMENTATION=y
501#
502# Profiling support
503#
504CONFIG_PROFILING=y 492CONFIG_PROFILING=y
505# CONFIG_OPROFILE is not set 493# CONFIG_OPROFILE is not set
494# CONFIG_MARKERS is not set
506 495
507# 496#
508# Kernel hacking 497# Kernel hacking
509# 498#
510# CONFIG_PRINTK_TIME is not set 499# CONFIG_PRINTK_TIME is not set
500CONFIG_ENABLE_WARN_DEPRECATED=y
511CONFIG_ENABLE_MUST_CHECK=y 501CONFIG_ENABLE_MUST_CHECK=y
512CONFIG_MAGIC_SYSRQ=y 502CONFIG_MAGIC_SYSRQ=y
513# CONFIG_UNUSED_SYMBOLS is not set 503# CONFIG_UNUSED_SYMBOLS is not set
@@ -531,16 +521,17 @@ CONFIG_DEBUG_BUGVERBOSE=y
531# CONFIG_DEBUG_INFO is not set 521# CONFIG_DEBUG_INFO is not set
532# CONFIG_DEBUG_VM is not set 522# CONFIG_DEBUG_VM is not set
533# CONFIG_DEBUG_LIST is not set 523# CONFIG_DEBUG_LIST is not set
524# CONFIG_DEBUG_SG is not set
534CONFIG_FRAME_POINTER=y 525CONFIG_FRAME_POINTER=y
535CONFIG_FORCED_INLINING=y 526CONFIG_FORCED_INLINING=y
527# CONFIG_BOOT_PRINTK_DELAY is not set
536# CONFIG_FAULT_INJECTION is not set 528# CONFIG_FAULT_INJECTION is not set
529# CONFIG_SAMPLES is not set
537# CONFIG_EARLY_PRINTK is not set 530# CONFIG_EARLY_PRINTK is not set
538# CONFIG_DEBUG_KERNEL_WITH_GDB_STUB is not set
539CONFIG_SH64_PROC_TLB=y 531CONFIG_SH64_PROC_TLB=y
540CONFIG_SH64_PROC_ASIDS=y 532CONFIG_SH64_PROC_ASIDS=y
541CONFIG_SH64_SR_WATCH=y 533CONFIG_SH64_SR_WATCH=y
542# CONFIG_POOR_MANS_STRACE is not set 534# CONFIG_POOR_MANS_STRACE is not set
543# CONFIG_SH_ALPHANUMERIC is not set
544CONFIG_SH_NO_BSS_INIT=y 535CONFIG_SH_NO_BSS_INIT=y
545 536
546# 537#
@@ -548,6 +539,7 @@ CONFIG_SH_NO_BSS_INIT=y
548# 539#
549# CONFIG_KEYS is not set 540# CONFIG_KEYS is not set
550# CONFIG_SECURITY is not set 541# CONFIG_SECURITY is not set
542# CONFIG_SECURITY_FILE_CAPABILITIES is not set
551# CONFIG_CRYPTO is not set 543# CONFIG_CRYPTO is not set
552 544
553# 545#
diff --git a/arch/sh64/kernel/process.c b/arch/sh64/kernel/process.c
index ceb9458abda4..0761af4d2a42 100644
--- a/arch/sh64/kernel/process.c
+++ b/arch/sh64/kernel/process.c
@@ -26,6 +26,7 @@
26#include <linux/reboot.h> 26#include <linux/reboot.h>
27#include <linux/init.h> 27#include <linux/init.h>
28#include <linux/module.h> 28#include <linux/module.h>
29#include <linux/proc_fs.h>
29#include <asm/uaccess.h> 30#include <asm/uaccess.h>
30#include <asm/pgtable.h> 31#include <asm/pgtable.h>
31 32
@@ -656,9 +657,6 @@ unsigned long get_wchan(struct task_struct *p)
656 */ 657 */
657 658
658#if defined(CONFIG_SH64_PROC_ASIDS) 659#if defined(CONFIG_SH64_PROC_ASIDS)
659#include <linux/init.h>
660#include <linux/proc_fs.h>
661
662static int 660static int
663asids_proc_info(char *buf, char **start, off_t fpos, int length, int *eof, void *data) 661asids_proc_info(char *buf, char **start, off_t fpos, int length, int *eof, void *data)
664{ 662{
@@ -686,10 +684,8 @@ asids_proc_info(char *buf, char **start, off_t fpos, int length, int *eof, void
686 684
687static int __init register_proc_asids(void) 685static int __init register_proc_asids(void)
688{ 686{
689 create_proc_read_entry("asids", 0, NULL, asids_proc_info, NULL); 687 create_proc_read_entry("asids", 0, NULL, asids_proc_info, NULL);
690 return 0; 688 return 0;
691} 689}
692
693__initcall(register_proc_asids); 690__initcall(register_proc_asids);
694#endif 691#endif
695
diff --git a/arch/sh64/kernel/traps.c b/arch/sh64/kernel/traps.c
index c03101fab467..f32df3831f45 100644
--- a/arch/sh64/kernel/traps.c
+++ b/arch/sh64/kernel/traps.c
@@ -30,7 +30,6 @@
30#include <linux/interrupt.h> 30#include <linux/interrupt.h>
31#include <linux/sysctl.h> 31#include <linux/sysctl.h>
32#include <linux/module.h> 32#include <linux/module.h>
33
34#include <asm/system.h> 33#include <asm/system.h>
35#include <asm/uaccess.h> 34#include <asm/uaccess.h>
36#include <asm/io.h> 35#include <asm/io.h>
@@ -242,9 +241,6 @@ DO_ERROR(12, SIGILL, "reserved instruction", reserved_inst, current)
242 241
243#endif /* CONFIG_SH64_ID2815_WORKAROUND */ 242#endif /* CONFIG_SH64_ID2815_WORKAROUND */
244 243
245
246#include <asm/system.h>
247
248/* Called with interrupts disabled */ 244/* Called with interrupts disabled */
249asmlinkage void do_exception_error(unsigned long ex, struct pt_regs *regs) 245asmlinkage void do_exception_error(unsigned long ex, struct pt_regs *regs)
250{ 246{
@@ -984,4 +980,3 @@ asmlinkage void do_debug_interrupt(unsigned long code, struct pt_regs *regs)
984 /* Clear all DEBUGINT causes */ 980 /* Clear all DEBUGINT causes */
985 poke_real_address_q(DM_EXP_CAUSE_PHY, 0x0); 981 poke_real_address_q(DM_EXP_CAUSE_PHY, 0x0);
986} 982}
987
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index e1e24f31aa54..01a6756ba371 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -18,7 +18,6 @@
18#include <linux/linkage.h> 18#include <linux/linkage.h>
19#include <linux/kernel_stat.h> 19#include <linux/kernel_stat.h>
20#include <linux/signal.h> 20#include <linux/signal.h>
21#include <linux/sched.h>
22#include <linux/interrupt.h> 21#include <linux/interrupt.h>
23#include <linux/slab.h> 22#include <linux/slab.h>
24#include <linux/random.h> 23#include <linux/random.h>
diff --git a/arch/sparc64/kernel/ds.c b/arch/sparc64/kernel/ds.c
index 9f472a79d37e..eeb5a2fc788d 100644
--- a/arch/sparc64/kernel/ds.c
+++ b/arch/sparc64/kernel/ds.c
@@ -6,7 +6,6 @@
6#include <linux/kernel.h> 6#include <linux/kernel.h>
7#include <linux/module.h> 7#include <linux/module.h>
8#include <linux/types.h> 8#include <linux/types.h>
9#include <linux/module.h>
10#include <linux/string.h> 9#include <linux/string.h>
11#include <linux/slab.h> 10#include <linux/slab.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
diff --git a/arch/sparc64/kernel/module.c b/arch/sparc64/kernel/module.c
index 579871527699..158484bf5999 100644
--- a/arch/sparc64/kernel/module.c
+++ b/arch/sparc64/kernel/module.c
@@ -11,7 +11,6 @@
11#include <linux/fs.h> 11#include <linux/fs.h>
12#include <linux/string.h> 12#include <linux/string.h>
13#include <linux/slab.h> 13#include <linux/slab.h>
14#include <linux/vmalloc.h>
15#include <linux/mm.h> 14#include <linux/mm.h>
16 15
17#include <asm/processor.h> 16#include <asm/processor.h>
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
index 78caff926737..98c468803ce3 100644
--- a/arch/sparc64/kernel/sys_sparc32.c
+++ b/arch/sparc64/kernel/sys_sparc32.c
@@ -51,7 +51,6 @@
51#include <linux/vfs.h> 51#include <linux/vfs.h>
52#include <linux/netfilter_ipv4/ip_tables.h> 52#include <linux/netfilter_ipv4/ip_tables.h>
53#include <linux/ptrace.h> 53#include <linux/ptrace.h>
54#include <linux/highuid.h>
55 54
56#include <asm/types.h> 55#include <asm/types.h>
57#include <asm/uaccess.h> 56#include <asm/uaccess.h>
diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c
index 170d6ca8de6f..cfc22d3fe54c 100644
--- a/arch/sparc64/kernel/sys_sunos32.c
+++ b/arch/sparc64/kernel/sys_sunos32.c
@@ -57,7 +57,6 @@
57#include <linux/personality.h> 57#include <linux/personality.h>
58 58
59/* For SOCKET_I */ 59/* For SOCKET_I */
60#include <linux/socket.h>
61#include <net/sock.h> 60#include <net/sock.h>
62#include <net/compat.h> 61#include <net/compat.h>
63 62
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index a2cf955294c1..4352ee4d8dac 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -28,7 +28,6 @@
28#include <linux/jiffies.h> 28#include <linux/jiffies.h>
29#include <linux/cpufreq.h> 29#include <linux/cpufreq.h>
30#include <linux/percpu.h> 30#include <linux/percpu.h>
31#include <linux/profile.h>
32#include <linux/miscdevice.h> 31#include <linux/miscdevice.h>
33#include <linux/rtc.h> 32#include <linux/rtc.h>
34#include <linux/kernel_stat.h> 33#include <linux/kernel_stat.h>
@@ -47,7 +46,6 @@
47#include <asm/sections.h> 46#include <asm/sections.h>
48#include <asm/cpudata.h> 47#include <asm/cpudata.h>
49#include <asm/uaccess.h> 48#include <asm/uaccess.h>
50#include <asm/prom.h>
51#include <asm/irq_regs.h> 49#include <asm/irq_regs.h>
52 50
53DEFINE_SPINLOCK(mostek_lock); 51DEFINE_SPINLOCK(mostek_lock);
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 82c2ac48040d..768a5d14b755 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -70,9 +70,12 @@ include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
70# in KBUILD_CFLAGS. Otherwise, it would cause ld to complain about the two different 70# in KBUILD_CFLAGS. Otherwise, it would cause ld to complain about the two different
71# errnos. 71# errnos.
72# These apply to kernelspace only. 72# These apply to kernelspace only.
73#
74# strip leading and trailing whitespace to make the USER_CFLAGS removal of these
75# defines more robust
73 76
74KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ 77KERNEL_DEFINES = $(strip -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \
75 -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES) 78 -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES))
76KBUILD_CFLAGS += $(KERNEL_DEFINES) 79KBUILD_CFLAGS += $(KERNEL_DEFINES)
77KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,) 80KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,)
78 81
diff --git a/arch/um/Makefile-i386 b/arch/um/Makefile-i386
index b01dfb00e5f8..67290117d909 100644
--- a/arch/um/Makefile-i386
+++ b/arch/um/Makefile-i386
@@ -22,8 +22,8 @@ export LDFLAGS HOSTCFLAGS HOSTLDFLAGS UML_OBJCOPYFLAGS
22endif 22endif
23endif 23endif
24 24
25CFLAGS += -DCONFIG_X86_32 25KBUILD_CFLAGS += -DCONFIG_X86_32
26AFLAGS += -DCONFIG_X86_32 26KBUILD_AFLAGS += -DCONFIG_X86_32
27CONFIG_X86_32 := y 27CONFIG_X86_32 := y
28export CONFIG_X86_32 28export CONFIG_X86_32
29 29
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index e184b44b1011..7e6cdde62ead 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -705,7 +705,7 @@ static int ubd_add(int n, char **error_out)
705 ubd_dev->size = ROUND_BLOCK(ubd_dev->size); 705 ubd_dev->size = ROUND_BLOCK(ubd_dev->size);
706 706
707 INIT_LIST_HEAD(&ubd_dev->restart); 707 INIT_LIST_HEAD(&ubd_dev->restart);
708 sg_init_table(&ubd_dev->sg, MAX_SG); 708 sg_init_table(ubd_dev->sg, MAX_SG);
709 709
710 err = -ENOMEM; 710 err = -ENOMEM;
711 ubd_dev->queue = blk_init_queue(do_ubd_request, &ubd_dev->lock); 711 ubd_dev->queue = blk_init_queue(do_ubd_request, &ubd_dev->lock);
diff --git a/arch/x86/boot/pmjump.S b/arch/x86/boot/pmjump.S
index 2e559233725a..fa6bed1fac14 100644
--- a/arch/x86/boot/pmjump.S
+++ b/arch/x86/boot/pmjump.S
@@ -28,17 +28,19 @@
28 * void protected_mode_jump(u32 entrypoint, u32 bootparams); 28 * void protected_mode_jump(u32 entrypoint, u32 bootparams);
29 */ 29 */
30protected_mode_jump: 30protected_mode_jump:
31 xorl %ebx, %ebx # Flag to indicate this is a boot
32 movl %edx, %esi # Pointer to boot_params table 31 movl %edx, %esi # Pointer to boot_params table
33 movl %eax, 2f # Patch ljmpl instruction 32 movl %eax, 2f # Patch ljmpl instruction
34 jmp 1f # Short jump to flush instruction q.
35 33
361:
37 movw $__BOOT_DS, %cx 34 movw $__BOOT_DS, %cx
35 xorl %ebx, %ebx # Per the 32-bit boot protocol
36 xorl %ebp, %ebp # Per the 32-bit boot protocol
37 xorl %edi, %edi # Per the 32-bit boot protocol
38 38
39 movl %cr0, %edx 39 movl %cr0, %edx
40 orb $1, %dl # Protected mode (PE) bit 40 orb $1, %dl # Protected mode (PE) bit
41 movl %edx, %cr0 41 movl %edx, %cr0
42 jmp 1f # Short jump to serialize on 386/486
431:
42 44
43 movw %cx, %ds 45 movw %cx, %ds
44 movw %cx, %es 46 movw %cx, %es
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index 18b231810908..df588f0f76e1 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -159,20 +159,16 @@ sysenter_do_call:
159 159
160sysenter_tracesys: 160sysenter_tracesys:
161 CFI_RESTORE_STATE 161 CFI_RESTORE_STATE
162 xchgl %r9d,%ebp
162 SAVE_REST 163 SAVE_REST
163 CLEAR_RREGS 164 CLEAR_RREGS
165 movq %r9,R9(%rsp)
164 movq $-ENOSYS,RAX(%rsp) /* really needed? */ 166 movq $-ENOSYS,RAX(%rsp) /* really needed? */
165 movq %rsp,%rdi /* &pt_regs -> arg1 */ 167 movq %rsp,%rdi /* &pt_regs -> arg1 */
166 call syscall_trace_enter 168 call syscall_trace_enter
167 LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */ 169 LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
168 RESTORE_REST 170 RESTORE_REST
169 movl %ebp, %ebp 171 xchgl %ebp,%r9d
170 /* no need to do an access_ok check here because rbp has been
171 32bit zero extended */
1721: movl (%rbp),%r9d
173 .section __ex_table,"a"
174 .quad 1b,ia32_badarg
175 .previous
176 jmp sysenter_do_call 172 jmp sysenter_do_call
177 CFI_ENDPROC 173 CFI_ENDPROC
178ENDPROC(ia32_sysenter_target) 174ENDPROC(ia32_sysenter_target)
@@ -262,20 +258,17 @@ cstar_do_call:
262 258
263cstar_tracesys: 259cstar_tracesys:
264 CFI_RESTORE_STATE 260 CFI_RESTORE_STATE
261 xchgl %r9d,%ebp
265 SAVE_REST 262 SAVE_REST
266 CLEAR_RREGS 263 CLEAR_RREGS
264 movq %r9,R9(%rsp)
267 movq $-ENOSYS,RAX(%rsp) /* really needed? */ 265 movq $-ENOSYS,RAX(%rsp) /* really needed? */
268 movq %rsp,%rdi /* &pt_regs -> arg1 */ 266 movq %rsp,%rdi /* &pt_regs -> arg1 */
269 call syscall_trace_enter 267 call syscall_trace_enter
270 LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */ 268 LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
271 RESTORE_REST 269 RESTORE_REST
270 xchgl %ebp,%r9d
272 movl RSP-ARGOFFSET(%rsp), %r8d 271 movl RSP-ARGOFFSET(%rsp), %r8d
273 /* no need to do an access_ok check here because r8 has been
274 32bit zero extended */
2751: movl (%r8),%r9d
276 .section __ex_table,"a"
277 .quad 1b,ia32_badarg
278 .previous
279 jmp cstar_do_call 272 jmp cstar_do_call
280END(ia32_cstar_target) 273END(ia32_cstar_target)
281 274
diff --git a/arch/x86/ia32/ptrace32.c b/arch/x86/ia32/ptrace32.c
index f52770ef0ee3..4a233ad6269c 100644
--- a/arch/x86/ia32/ptrace32.c
+++ b/arch/x86/ia32/ptrace32.c
@@ -228,8 +228,6 @@ static long ptrace32_siginfo(unsigned request, u32 pid, u32 addr, u32 data)
228 return ret; 228 return ret;
229} 229}
230 230
231#define COMPAT_GDT_ENTRY_TLS_MIN 6
232
233asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data) 231asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data)
234{ 232{
235 struct task_struct *child; 233 struct task_struct *child;
@@ -248,6 +246,8 @@ asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data)
248 case PTRACE_SYSCALL: 246 case PTRACE_SYSCALL:
249 case PTRACE_OLDSETOPTIONS: 247 case PTRACE_OLDSETOPTIONS:
250 case PTRACE_SETOPTIONS: 248 case PTRACE_SETOPTIONS:
249 case PTRACE_SET_THREAD_AREA:
250 case PTRACE_GET_THREAD_AREA:
251 return sys_ptrace(request, pid, addr, data); 251 return sys_ptrace(request, pid, addr, data);
252 252
253 default: 253 default:
@@ -271,12 +271,6 @@ asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data)
271 case PTRACE_SETSIGINFO: 271 case PTRACE_SETSIGINFO:
272 case PTRACE_GETSIGINFO: 272 case PTRACE_GETSIGINFO:
273 return ptrace32_siginfo(request, pid, addr, data); 273 return ptrace32_siginfo(request, pid, addr, data);
274
275 case PTRACE_SET_THREAD_AREA:
276 case PTRACE_GET_THREAD_AREA:
277 return sys_ptrace(request, pid,
278 addr + GDT_ENTRY_TLS_MIN - COMPAT_GDT_ENTRY_TLS_MIN,
279 data);
280 } 274 }
281 275
282 child = ptrace_get_task_struct(pid); 276 child = ptrace_get_task_struct(pid);
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
index 9abbdf7562c5..3b20613325dc 100644
--- a/arch/x86/kernel/cpu/mtrr/main.c
+++ b/arch/x86/kernel/cpu/mtrr/main.c
@@ -139,13 +139,12 @@ struct set_mtrr_data {
139 mtrr_type smp_type; 139 mtrr_type smp_type;
140}; 140};
141 141
142#ifdef CONFIG_SMP
143
144static void ipi_handler(void *info) 142static void ipi_handler(void *info)
145/* [SUMMARY] Synchronisation handler. Executed by "other" CPUs. 143/* [SUMMARY] Synchronisation handler. Executed by "other" CPUs.
146 [RETURNS] Nothing. 144 [RETURNS] Nothing.
147*/ 145*/
148{ 146{
147#ifdef CONFIG_SMP
149 struct set_mtrr_data *data = info; 148 struct set_mtrr_data *data = info;
150 unsigned long flags; 149 unsigned long flags;
151 150
@@ -168,9 +167,8 @@ static void ipi_handler(void *info)
168 167
169 atomic_dec(&data->count); 168 atomic_dec(&data->count);
170 local_irq_restore(flags); 169 local_irq_restore(flags);
171}
172
173#endif 170#endif
171}
174 172
175static inline int types_compatible(mtrr_type type1, mtrr_type type2) { 173static inline int types_compatible(mtrr_type type1, mtrr_type type2) {
176 return type1 == MTRR_TYPE_UNCACHABLE || 174 return type1 == MTRR_TYPE_UNCACHABLE ||
diff --git a/arch/x86/kernel/kprobes_32.c b/arch/x86/kernel/kprobes_32.c
index 90f778c04b3f..d87a523070d1 100644
--- a/arch/x86/kernel/kprobes_32.c
+++ b/arch/x86/kernel/kprobes_32.c
@@ -564,12 +564,7 @@ static int __kprobes post_kprobe_handler(struct pt_regs *regs)
564 564
565 resume_execution(cur, regs, kcb); 565 resume_execution(cur, regs, kcb);
566 regs->eflags |= kcb->kprobe_saved_eflags; 566 regs->eflags |= kcb->kprobe_saved_eflags;
567#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT 567 trace_hardirqs_fixup_flags(regs->eflags);
568 if (raw_irqs_disabled_flags(regs->eflags))
569 trace_hardirqs_off();
570 else
571 trace_hardirqs_on();
572#endif
573 568
574 /*Restore back the original saved kprobes variables and continue. */ 569 /*Restore back the original saved kprobes variables and continue. */
575 if (kcb->kprobe_status == KPROBE_REENTER) { 570 if (kcb->kprobe_status == KPROBE_REENTER) {
diff --git a/arch/x86/kernel/kprobes_64.c b/arch/x86/kernel/kprobes_64.c
index 681b801c5e26..3db3611933d8 100644
--- a/arch/x86/kernel/kprobes_64.c
+++ b/arch/x86/kernel/kprobes_64.c
@@ -551,12 +551,7 @@ int __kprobes post_kprobe_handler(struct pt_regs *regs)
551 551
552 resume_execution(cur, regs, kcb); 552 resume_execution(cur, regs, kcb);
553 regs->eflags |= kcb->kprobe_saved_rflags; 553 regs->eflags |= kcb->kprobe_saved_rflags;
554#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT 554 trace_hardirqs_fixup_flags(regs->eflags);
555 if (raw_irqs_disabled_flags(regs->eflags))
556 trace_hardirqs_off();
557 else
558 trace_hardirqs_on();
559#endif
560 555
561 /* Restore the original saved kprobes variables and continue. */ 556 /* Restore the original saved kprobes variables and continue. */
562 if (kcb->kprobe_status == KPROBE_REENTER) { 557 if (kcb->kprobe_status == KPROBE_REENTER) {
diff --git a/arch/x86/kernel/nmi_32.c b/arch/x86/kernel/nmi_32.c
index f803ed0ed1c4..600fd404e440 100644
--- a/arch/x86/kernel/nmi_32.c
+++ b/arch/x86/kernel/nmi_32.c
@@ -51,13 +51,13 @@ static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu);
51 51
52static int endflag __initdata = 0; 52static int endflag __initdata = 0;
53 53
54#ifdef CONFIG_SMP
55/* The performance counters used by NMI_LOCAL_APIC don't trigger when 54/* The performance counters used by NMI_LOCAL_APIC don't trigger when
56 * the CPU is idle. To make sure the NMI watchdog really ticks on all 55 * the CPU is idle. To make sure the NMI watchdog really ticks on all
57 * CPUs during the test make them busy. 56 * CPUs during the test make them busy.
58 */ 57 */
59static __init void nmi_cpu_busy(void *data) 58static __init void nmi_cpu_busy(void *data)
60{ 59{
60#ifdef CONFIG_SMP
61 local_irq_enable_in_hardirq(); 61 local_irq_enable_in_hardirq();
62 /* Intentionally don't use cpu_relax here. This is 62 /* Intentionally don't use cpu_relax here. This is
63 to make sure that the performance counter really ticks, 63 to make sure that the performance counter really ticks,
@@ -67,8 +67,8 @@ static __init void nmi_cpu_busy(void *data)
67 care if they get somewhat less cycles. */ 67 care if they get somewhat less cycles. */
68 while (endflag == 0) 68 while (endflag == 0)
69 mb(); 69 mb();
70}
71#endif 70#endif
71}
72 72
73static int __init check_nmi_watchdog(void) 73static int __init check_nmi_watchdog(void)
74{ 74{
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c
index cc9acace7e23..298d13ed3ab3 100644
--- a/arch/x86/kernel/traps_32.c
+++ b/arch/x86/kernel/traps_32.c
@@ -789,6 +789,8 @@ void restart_nmi(void)
789#ifdef CONFIG_KPROBES 789#ifdef CONFIG_KPROBES
790fastcall void __kprobes do_int3(struct pt_regs *regs, long error_code) 790fastcall void __kprobes do_int3(struct pt_regs *regs, long error_code)
791{ 791{
792 trace_hardirqs_fixup();
793
792 if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) 794 if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP)
793 == NOTIFY_STOP) 795 == NOTIFY_STOP)
794 return; 796 return;
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c
index d0c2bc7ab2ec..4a6bd4965f56 100644
--- a/arch/x86/kernel/traps_64.c
+++ b/arch/x86/kernel/traps_64.c
@@ -807,6 +807,8 @@ asmlinkage __kprobes void default_do_nmi(struct pt_regs *regs)
807/* runs on IST stack. */ 807/* runs on IST stack. */
808asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code) 808asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code)
809{ 809{
810 trace_hardirqs_fixup();
811
810 if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) == NOTIFY_STOP) { 812 if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) == NOTIFY_STOP) {
811 return; 813 return;
812 } 814 }
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index a55b0902f9d3..92c56117eae5 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -93,38 +93,7 @@ struct lguest_data lguest_data = {
93}; 93};
94static cycle_t clock_base; 94static cycle_t clock_base;
95 95
96/*G:035 Notice the lazy_hcall() above, rather than hcall(). This is our first 96/*G:037 async_hcall() is pretty simple: I'm quite proud of it really. We have a
97 * real optimization trick!
98 *
99 * When lazy_mode is set, it means we're allowed to defer all hypercalls and do
100 * them as a batch when lazy_mode is eventually turned off. Because hypercalls
101 * are reasonably expensive, batching them up makes sense. For example, a
102 * large munmap might update dozens of page table entries: that code calls
103 * paravirt_enter_lazy_mmu(), does the dozen updates, then calls
104 * lguest_leave_lazy_mode().
105 *
106 * So, when we're in lazy mode, we call async_hypercall() to store the call for
107 * future processing. When lazy mode is turned off we issue a hypercall to
108 * flush the stored calls.
109 */
110static void lguest_leave_lazy_mode(void)
111{
112 paravirt_leave_lazy(paravirt_get_lazy_mode());
113 hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0);
114}
115
116static void lazy_hcall(unsigned long call,
117 unsigned long arg1,
118 unsigned long arg2,
119 unsigned long arg3)
120{
121 if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE)
122 hcall(call, arg1, arg2, arg3);
123 else
124 async_hcall(call, arg1, arg2, arg3);
125}
126
127/* async_hcall() is pretty simple: I'm quite proud of it really. We have a
128 * ring buffer of stored hypercalls which the Host will run though next time we 97 * ring buffer of stored hypercalls which the Host will run though next time we
129 * do a normal hypercall. Each entry in the ring has 4 slots for the hypercall 98 * do a normal hypercall. Each entry in the ring has 4 slots for the hypercall
130 * arguments, and a "hcall_status" word which is 0 if the call is ready to go, 99 * arguments, and a "hcall_status" word which is 0 if the call is ready to go,
@@ -134,8 +103,8 @@ static void lazy_hcall(unsigned long call,
134 * full and we just make the hypercall directly. This has the nice side 103 * full and we just make the hypercall directly. This has the nice side
135 * effect of causing the Host to run all the stored calls in the ring buffer 104 * effect of causing the Host to run all the stored calls in the ring buffer
136 * which empties it for next time! */ 105 * which empties it for next time! */
137void async_hcall(unsigned long call, 106static void async_hcall(unsigned long call, unsigned long arg1,
138 unsigned long arg1, unsigned long arg2, unsigned long arg3) 107 unsigned long arg2, unsigned long arg3)
139{ 108{
140 /* Note: This code assumes we're uniprocessor. */ 109 /* Note: This code assumes we're uniprocessor. */
141 static unsigned int next_call; 110 static unsigned int next_call;
@@ -161,7 +130,37 @@ void async_hcall(unsigned long call,
161 } 130 }
162 local_irq_restore(flags); 131 local_irq_restore(flags);
163} 132}
164/*:*/ 133
134/*G:035 Notice the lazy_hcall() above, rather than hcall(). This is our first
135 * real optimization trick!
136 *
137 * When lazy_mode is set, it means we're allowed to defer all hypercalls and do
138 * them as a batch when lazy_mode is eventually turned off. Because hypercalls
139 * are reasonably expensive, batching them up makes sense. For example, a
140 * large munmap might update dozens of page table entries: that code calls
141 * paravirt_enter_lazy_mmu(), does the dozen updates, then calls
142 * lguest_leave_lazy_mode().
143 *
144 * So, when we're in lazy mode, we call async_hcall() to store the call for
145 * future processing. */
146static void lazy_hcall(unsigned long call,
147 unsigned long arg1,
148 unsigned long arg2,
149 unsigned long arg3)
150{
151 if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE)
152 hcall(call, arg1, arg2, arg3);
153 else
154 async_hcall(call, arg1, arg2, arg3);
155}
156
157/* When lazy mode is turned off reset the per-cpu lazy mode variable and then
158 * issue a hypercall to flush any stored calls. */
159static void lguest_leave_lazy_mode(void)
160{
161 paravirt_leave_lazy(paravirt_get_lazy_mode());
162 hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0);
163}
165 164
166/*G:033 165/*G:033
167 * After that diversion we return to our first native-instruction 166 * After that diversion we return to our first native-instruction
diff --git a/arch/x86/mm/fault_32.c b/arch/x86/mm/fault_32.c
index 33563ee8eb0f..a2273d44aa27 100644
--- a/arch/x86/mm/fault_32.c
+++ b/arch/x86/mm/fault_32.c
@@ -303,6 +303,11 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs,
303 int write, si_code; 303 int write, si_code;
304 int fault; 304 int fault;
305 305
306 /*
307 * We can fault from pretty much anywhere, with unknown IRQ state.
308 */
309 trace_hardirqs_fixup();
310
306 /* get the address */ 311 /* get the address */
307 address = read_cr2(); 312 address = read_cr2();
308 313
diff --git a/arch/x86/mm/fault_64.c b/arch/x86/mm/fault_64.c
index 644b4f7ece10..0e26230669ca 100644
--- a/arch/x86/mm/fault_64.c
+++ b/arch/x86/mm/fault_64.c
@@ -304,6 +304,11 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
304 unsigned long flags; 304 unsigned long flags;
305 siginfo_t info; 305 siginfo_t info;
306 306
307 /*
308 * We can fault from pretty much anywhere, with unknown IRQ state.
309 */
310 trace_hardirqs_fixup();
311
307 tsk = current; 312 tsk = current;
308 mm = tsk->mm; 313 mm = tsk->mm;
309 prefetchw(&mm->mmap_sem); 314 prefetchw(&mm->mmap_sem);