aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-22 20:26:18 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-22 20:26:18 -0400
commitcdb7532f7be35c3675b1aed54d10e378014618b6 (patch)
tree925df597b70c4a1de629fec68f9e4ebd3fd9e803 /arch/sh
parent7992018d979460af59fbae8a48f9641305aea438 (diff)
parent31d106c68b1af88835a474556052d6efbfec99c5 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: sh: Fix dreamcast build for IRQ changes. sh: Fix clock multiplier on SH7722. sh: Wire up kdump crash kernel exec in die(). sh: sr.bl toggling around idle sleep. sh: disable genrtc support. fs: Kill sh dependency for binfmt_flat. sh: Disable psw support for R7785RP. sh: Fix page size alignment in __copy_user_page(). sh: Fix up various compile warnings for SE boards. sh: Wire up signalfd/timerfd/eventfd syscalls. sh: revert addition of page fault notifiers spelling fixes: arch/sh/ input: hp680_ts compile fixes. sh: landisk: Header cleanups. sh: landisk: rtc-rs5c313 support. sh: Kill off pmb slab cache destructor. sh: Fix up psw build rules for r7780rp. sh: Shut up compiler warnings in __do_page_fault().
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/boards/landisk/gio.c2
-rw-r--r--arch/sh/boards/landisk/setup.c6
-rw-r--r--arch/sh/boards/renesas/r7780rp/Makefile5
-rw-r--r--arch/sh/boards/snapgear/rtc.c2
-rw-r--r--arch/sh/boards/superh/microdev/io.c6
-rw-r--r--arch/sh/boards/superh/microdev/irq.c6
-rw-r--r--arch/sh/boards/superh/microdev/setup.c2
-rw-r--r--arch/sh/boards/unknown/setup.c2
-rw-r--r--arch/sh/drivers/dma/dma-api.c2
-rw-r--r--arch/sh/drivers/dma/dma-isa.c2
-rw-r--r--arch/sh/drivers/dma/dmabrg.c2
-rw-r--r--arch/sh/drivers/pci/ops-dreamcast.c2
-rw-r--r--arch/sh/drivers/pci/pci-st40.c6
-rw-r--r--arch/sh/drivers/pci/pci-st40.h2
-rw-r--r--arch/sh/drivers/superhyway/ops-sh4-202.c2
-rw-r--r--arch/sh/kernel/cf-enabler.c2
-rw-r--r--arch/sh/kernel/cpu/clock.c7
-rw-r--r--arch/sh/kernel/cpu/irq/maskreg.c2
-rw-r--r--arch/sh/kernel/cpu/sh4/fpu.c2
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh7750.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7722.c34
-rw-r--r--arch/sh/kernel/kgdb_stub.c4
-rw-r--r--arch/sh/kernel/process.c33
-rw-r--r--arch/sh/kernel/syscalls.S3
-rw-r--r--arch/sh/kernel/traps.c13
-rw-r--r--arch/sh/math-emu/math.c2
-rw-r--r--arch/sh/mm/copy_page.S1
-rw-r--r--arch/sh/mm/fault.c39
-rw-r--r--arch/sh/mm/init.c3
-rw-r--r--arch/sh/mm/pmb.c79
-rw-r--r--arch/sh/tools/mach-types5
31 files changed, 153 insertions, 127 deletions
diff --git a/arch/sh/boards/landisk/gio.c b/arch/sh/boards/landisk/gio.c
index 50d38be62f01..a37643d002b2 100644
--- a/arch/sh/boards/landisk/gio.c
+++ b/arch/sh/boards/landisk/gio.c
@@ -69,7 +69,7 @@ static int gio_ioctl(struct inode *inode, struct file *filp,
69 } 69 }
70 70
71 switch (cmd) { 71 switch (cmd) {
72 case GIODRV_IOCSGIOSETADDR: /* addres set */ 72 case GIODRV_IOCSGIOSETADDR: /* address set */
73 addr = data; 73 addr = data;
74 break; 74 break;
75 75
diff --git a/arch/sh/boards/landisk/setup.c b/arch/sh/boards/landisk/setup.c
index 4058b4f50d44..f953c7427769 100644
--- a/arch/sh/boards/landisk/setup.c
+++ b/arch/sh/boards/landisk/setup.c
@@ -44,8 +44,14 @@ static struct platform_device cf_ide_device = {
44 }, 44 },
45}; 45};
46 46
47static struct platform_device rtc_device = {
48 .name = "rs5c313",
49 .id = -1,
50};
51
47static struct platform_device *landisk_devices[] __initdata = { 52static struct platform_device *landisk_devices[] __initdata = {
48 &cf_ide_device, 53 &cf_ide_device,
54 &rtc_device,
49}; 55};
50 56
51static int __init landisk_devices_setup(void) 57static int __init landisk_devices_setup(void)
diff --git a/arch/sh/boards/renesas/r7780rp/Makefile b/arch/sh/boards/renesas/r7780rp/Makefile
index 609e5d50dde8..b1d20afb4eb3 100644
--- a/arch/sh/boards/renesas/r7780rp/Makefile
+++ b/arch/sh/boards/renesas/r7780rp/Makefile
@@ -3,5 +3,8 @@
3# 3#
4irqinit-y := irq-r7780rp.o 4irqinit-y := irq-r7780rp.o
5irqinit-$(CONFIG_SH_R7785RP) := irq-r7785rp.o 5irqinit-$(CONFIG_SH_R7785RP) := irq-r7785rp.o
6obj-y := setup.o irq.o $(irqinit-y)
7
8ifneq ($(CONFIG_SH_R7785RP),y)
6obj-$(CONFIG_PUSH_SWITCH) += psw.o 9obj-$(CONFIG_PUSH_SWITCH) += psw.o
7obj-y := setup.o irq.o $(irqinit-y) 10endif
diff --git a/arch/sh/boards/snapgear/rtc.c b/arch/sh/boards/snapgear/rtc.c
index 1659fdd6695a..edb3dd936cbb 100644
--- a/arch/sh/boards/snapgear/rtc.c
+++ b/arch/sh/boards/snapgear/rtc.c
@@ -108,7 +108,7 @@ static void ds1302_writebyte(unsigned int addr, unsigned int val)
108static void ds1302_reset(void) 108static void ds1302_reset(void)
109{ 109{
110 unsigned long flags; 110 unsigned long flags;
111 /* Hardware dependant reset/init */ 111 /* Hardware dependent reset/init */
112 local_irq_save(flags); 112 local_irq_save(flags);
113 set_dirp(get_dirp() | RTC_RESET | RTC_IODATA | RTC_SCLK); 113 set_dirp(get_dirp() | RTC_RESET | RTC_IODATA | RTC_SCLK);
114 set_dp(get_dp() & ~(RTC_RESET | RTC_IODATA | RTC_SCLK)); 114 set_dp(get_dp() & ~(RTC_RESET | RTC_IODATA | RTC_SCLK));
diff --git a/arch/sh/boards/superh/microdev/io.c b/arch/sh/boards/superh/microdev/io.c
index 83419bf4c834..b704e20d7e4d 100644
--- a/arch/sh/boards/superh/microdev/io.c
+++ b/arch/sh/boards/superh/microdev/io.c
@@ -198,12 +198,12 @@ void microdev_outb(unsigned char b, unsigned long port)
198 /* 198 /*
199 * There is a board feature with the current SH4-202 MicroDev in 199 * There is a board feature with the current SH4-202 MicroDev in
200 * that the 2 byte enables (nBE0 and nBE1) are tied together (and 200 * that the 2 byte enables (nBE0 and nBE1) are tied together (and
201 * to the Chip Select Line (Ethernet_CS)). Due to this conectivity, 201 * to the Chip Select Line (Ethernet_CS)). Due to this connectivity,
202 * it is not possible to safely perform 8-bit writes to the 202 * it is not possible to safely perform 8-bit writes to the
203 * Ethernet registers, as 16-bits will be consumed from the Data 203 * Ethernet registers, as 16-bits will be consumed from the Data
204 * lines (corrupting the other byte). Hence, this function is 204 * lines (corrupting the other byte). Hence, this function is
205 * written to impliment 16-bit read/modify/write for all byte-wide 205 * written to implement 16-bit read/modify/write for all byte-wide
206 * acceses. 206 * accesses.
207 * 207 *
208 * Note: there is no problem with byte READS (even or odd). 208 * Note: there is no problem with byte READS (even or odd).
209 * 209 *
diff --git a/arch/sh/boards/superh/microdev/irq.c b/arch/sh/boards/superh/microdev/irq.c
index 8c64baa30364..cc1cb04fa618 100644
--- a/arch/sh/boards/superh/microdev/irq.c
+++ b/arch/sh/boards/superh/microdev/irq.c
@@ -100,7 +100,7 @@ static void disable_microdev_irq(unsigned int irq)
100 100
101 fpgaIrq = fpgaIrqTable[irq].fpgaIrq; 101 fpgaIrq = fpgaIrqTable[irq].fpgaIrq;
102 102
103 /* disable interupts on the FPGA INTC register */ 103 /* disable interrupts on the FPGA INTC register */
104 ctrl_outl(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTDSB_REG); 104 ctrl_outl(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTDSB_REG);
105} 105}
106 106
@@ -125,7 +125,7 @@ static void enable_microdev_irq(unsigned int irq)
125 priorities |= MICRODEV_FPGA_INTPRI_LEVEL(fpgaIrq, pri); 125 priorities |= MICRODEV_FPGA_INTPRI_LEVEL(fpgaIrq, pri);
126 ctrl_outl(priorities, priorityReg); 126 ctrl_outl(priorities, priorityReg);
127 127
128 /* enable interupts on the FPGA INTC register */ 128 /* enable interrupts on the FPGA INTC register */
129 ctrl_outl(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTENB_REG); 129 ctrl_outl(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTENB_REG);
130} 130}
131 131
@@ -152,7 +152,7 @@ extern void __init init_microdev_irq(void)
152{ 152{
153 int i; 153 int i;
154 154
155 /* disable interupts on the FPGA INTC register */ 155 /* disable interrupts on the FPGA INTC register */
156 ctrl_outl(~0ul, MICRODEV_FPGA_INTDSB_REG); 156 ctrl_outl(~0ul, MICRODEV_FPGA_INTDSB_REG);
157 157
158 for (i = 0; i < NUM_EXTERNAL_IRQS; i++) 158 for (i = 0; i < NUM_EXTERNAL_IRQS; i++)
diff --git a/arch/sh/boards/superh/microdev/setup.c b/arch/sh/boards/superh/microdev/setup.c
index 031c814e6e76..6396cea1c896 100644
--- a/arch/sh/boards/superh/microdev/setup.c
+++ b/arch/sh/boards/superh/microdev/setup.c
@@ -349,7 +349,7 @@ static int __init smsc_superio_setup(void)
349 SMSC_WRITE_INDEXED(0x00, 0xc7); /* GP47 = nIOWOP */ 349 SMSC_WRITE_INDEXED(0x00, 0xc7); /* GP47 = nIOWOP */
350 SMSC_WRITE_INDEXED(0x08, 0xe8); /* GP20 = nIDE2_OE */ 350 SMSC_WRITE_INDEXED(0x08, 0xe8); /* GP20 = nIDE2_OE */
351 351
352 /* Exit the configuraton state */ 352 /* Exit the configuration state */
353 outb(SMSC_EXIT_CONFIG_KEY, SMSC_CONFIG_PORT_ADDR); 353 outb(SMSC_EXIT_CONFIG_KEY, SMSC_CONFIG_PORT_ADDR);
354 354
355 return 0; 355 return 0;
diff --git a/arch/sh/boards/unknown/setup.c b/arch/sh/boards/unknown/setup.c
index 1c941370a2e3..bee4612de59b 100644
--- a/arch/sh/boards/unknown/setup.c
+++ b/arch/sh/boards/unknown/setup.c
@@ -6,7 +6,7 @@
6 * May be copied or modified under the terms of the GNU General Public 6 * May be copied or modified under the terms of the GNU General Public
7 * License. See linux/COPYING for more information. 7 * License. See linux/COPYING for more information.
8 * 8 *
9 * Setup code for an unknown machine (internal peripherials only) 9 * Setup code for an unknown machine (internal peripherals only)
10 * 10 *
11 * This is the simplest of all boards, and serves only as a quick and dirty 11 * This is the simplest of all boards, and serves only as a quick and dirty
12 * method to start debugging a new board during bring-up until proper board 12 * method to start debugging a new board during bring-up until proper board
diff --git a/arch/sh/drivers/dma/dma-api.c b/arch/sh/drivers/dma/dma-api.c
index e062067edd24..8057a27a1bc6 100644
--- a/arch/sh/drivers/dma/dma-api.c
+++ b/arch/sh/drivers/dma/dma-api.c
@@ -115,7 +115,7 @@ static int search_cap(const char **haystack, const char *needle)
115/** 115/**
116 * request_dma_bycap - Allocate a DMA channel based on its capabilities 116 * request_dma_bycap - Allocate a DMA channel based on its capabilities
117 * @dmac: List of DMA controllers to search 117 * @dmac: List of DMA controllers to search
118 * @caps: List of capabilites 118 * @caps: List of capabilities
119 * 119 *
120 * Search all channels of all DMA controllers to find a channel which 120 * Search all channels of all DMA controllers to find a channel which
121 * matches the requested capabilities. The result is the channel 121 * matches the requested capabilities. The result is the channel
diff --git a/arch/sh/drivers/dma/dma-isa.c b/arch/sh/drivers/dma/dma-isa.c
index 05a74ffdb68d..5fb044b791c3 100644
--- a/arch/sh/drivers/dma/dma-isa.c
+++ b/arch/sh/drivers/dma/dma-isa.c
@@ -28,7 +28,7 @@
28 * NOTE: ops->xfer() is the preferred way of doing things. However, there 28 * NOTE: ops->xfer() is the preferred way of doing things. However, there
29 * are some users of the ISA DMA API that exist in common code that we 29 * are some users of the ISA DMA API that exist in common code that we
30 * don't necessarily want to go out of our way to break, so we still 30 * don't necessarily want to go out of our way to break, so we still
31 * allow for some compatability at that level. Any new code is strongly 31 * allow for some compatibility at that level. Any new code is strongly
32 * advised to run far away from the ISA DMA API and use the SH DMA API 32 * advised to run far away from the ISA DMA API and use the SH DMA API
33 * directly. 33 * directly.
34 */ 34 */
diff --git a/arch/sh/drivers/dma/dmabrg.c b/arch/sh/drivers/dma/dmabrg.c
index 9d0a29370f21..5e22689c2fcf 100644
--- a/arch/sh/drivers/dma/dmabrg.c
+++ b/arch/sh/drivers/dma/dmabrg.c
@@ -33,7 +33,7 @@
33 * 9 | HAC1/SSI1 | rec | half done | DMABRGI2 33 * 9 | HAC1/SSI1 | rec | half done | DMABRGI2
34 * 34 *
35 * all can be enabled/disabled in the DMABRGCR register, 35 * all can be enabled/disabled in the DMABRGCR register,
36 * as well as checked if they occured. 36 * as well as checked if they occurred.
37 * 37 *
38 * DMABRGI0 services USB DMA Address errors, but it still must be 38 * DMABRGI0 services USB DMA Address errors, but it still must be
39 * enabled/acked in the DMABRGCR register. USB-DMA complete indicator 39 * enabled/acked in the DMABRGCR register. USB-DMA complete indicator
diff --git a/arch/sh/drivers/pci/ops-dreamcast.c b/arch/sh/drivers/pci/ops-dreamcast.c
index 381306cf5425..e1284fc69361 100644
--- a/arch/sh/drivers/pci/ops-dreamcast.c
+++ b/arch/sh/drivers/pci/ops-dreamcast.c
@@ -57,7 +57,7 @@ struct pci_channel board_pci_channels[] = {
57 * 57 *
58 * Also, we could very easily support both Type 0 and Type 1 configurations 58 * Also, we could very easily support both Type 0 and Type 1 configurations
59 * here, but since it doesn't seem that there is any such implementation in 59 * here, but since it doesn't seem that there is any such implementation in
60 * existance, we don't bother. 60 * existence, we don't bother.
61 * 61 *
62 * I suppose if someone actually gets around to ripping the chip out of 62 * I suppose if someone actually gets around to ripping the chip out of
63 * the BBA and hanging some more devices off of it, then this might be 63 * the BBA and hanging some more devices off of it, then this might be
diff --git a/arch/sh/drivers/pci/pci-st40.c b/arch/sh/drivers/pci/pci-st40.c
index d67656a44b15..543417ff8314 100644
--- a/arch/sh/drivers/pci/pci-st40.c
+++ b/arch/sh/drivers/pci/pci-st40.c
@@ -292,7 +292,7 @@ int __init st40pci_init(unsigned memStart, unsigned memSize)
292 PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | 292 PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER |
293 PCI_COMMAND_IO); 293 PCI_COMMAND_IO);
294 294
295 /* Accesse to the 0xb0000000 -> 0xb6000000 area will go through to 0x10000000 -> 0x16000000 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. 296 * on the PCI bus. This allows a nice 1-1 bus to phys mapping.
297 */ 297 */
298 298
@@ -315,7 +315,7 @@ int __init st40pci_init(unsigned memStart, unsigned memSize)
315 ST40PCI_WRITE(CSR_MBAR0, 0); 315 ST40PCI_WRITE(CSR_MBAR0, 0);
316 ST40PCI_WRITE(LSR0, 0x0fff0001); 316 ST40PCI_WRITE(LSR0, 0x0fff0001);
317 317
318 /* ... and set up the initial incomming window to expose all of RAM */ 318 /* ... and set up the initial incoming window to expose all of RAM */
319 pci_set_rbar_region(7, memStart, memStart, memSize); 319 pci_set_rbar_region(7, memStart, memStart, memSize);
320 320
321 /* Maximise timeout values */ 321 /* Maximise timeout values */
@@ -473,7 +473,7 @@ static void pci_set_rbar_region(unsigned int region, unsigned long localAddr
473 473
474 mask = r2p2(regionSize) - 0x10000; 474 mask = r2p2(regionSize) - 0x10000;
475 475
476 /* Diable the region (in case currently in use, should never happen) */ 476 /* Disable the region (in case currently in use, should never happen) */
477 ST40PCI_WRITE_INDEXED(RSR, region, 0); 477 ST40PCI_WRITE_INDEXED(RSR, region, 0);
478 478
479 /* Start of local address space to publish */ 479 /* Start of local address space to publish */
diff --git a/arch/sh/drivers/pci/pci-st40.h b/arch/sh/drivers/pci/pci-st40.h
index d729e0c2d5fe..cf0d35bd135c 100644
--- a/arch/sh/drivers/pci/pci-st40.h
+++ b/arch/sh/drivers/pci/pci-st40.h
@@ -4,7 +4,7 @@
4 * May be copied or modified under the terms of the GNU General Public 4 * May be copied or modified under the terms of the GNU General Public
5 * License. See linux/COPYING for more information. 5 * License. See linux/COPYING for more information.
6 * 6 *
7 * Defintions for the ST40 PCI hardware. 7 * Definitions for the ST40 PCI hardware.
8 */ 8 */
9 9
10#ifndef __PCI_ST40_H__ 10#ifndef __PCI_ST40_H__
diff --git a/arch/sh/drivers/superhyway/ops-sh4-202.c b/arch/sh/drivers/superhyway/ops-sh4-202.c
index a55c98a9052b..3b14bf860db6 100644
--- a/arch/sh/drivers/superhyway/ops-sh4-202.c
+++ b/arch/sh/drivers/superhyway/ops-sh4-202.c
@@ -130,7 +130,7 @@ static int sh4202_read_vcr(unsigned long base, struct superhyway_vcr_info *vcr)
130 * Some modules (PBR and ePBR for instance) also appear to have 130 * Some modules (PBR and ePBR for instance) also appear to have
131 * VCRL/VCRH flipped in the documentation, but on the SH4-202 131 * VCRL/VCRH flipped in the documentation, but on the SH4-202
132 * itself it appears that these are all consistently mapped with 132 * itself it appears that these are all consistently mapped with
133 * VCRH preceeding VCRL. 133 * VCRH preceding VCRL.
134 * 134 *
135 * Do not trust the documentation, for it is evil. 135 * Do not trust the documentation, for it is evil.
136 */ 136 */
diff --git a/arch/sh/kernel/cf-enabler.c b/arch/sh/kernel/cf-enabler.c
index 0758d48147a0..849a9e191391 100644
--- a/arch/sh/kernel/cf-enabler.c
+++ b/arch/sh/kernel/cf-enabler.c
@@ -31,7 +31,7 @@
31 */ 31 */
32#if defined(CONFIG_CPU_SH4) 32#if defined(CONFIG_CPU_SH4)
33/* SH4 can't access PCMCIA interface through P2 area. 33/* SH4 can't access PCMCIA interface through P2 area.
34 * we must remap it with appropreate attribute bit of the page set. 34 * we must remap it with appropriate attribute bit of the page set.
35 * this part is based on Greg Banks' hd64465_ss.c implementation - Masahiro Abe */ 35 * this part is based on Greg Banks' hd64465_ss.c implementation - Masahiro Abe */
36 36
37#if defined(CONFIG_CF_AREA6) 37#if defined(CONFIG_CF_AREA6)
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c
index 014f318f5a05..63251549e9a8 100644
--- a/arch/sh/kernel/cpu/clock.c
+++ b/arch/sh/kernel/cpu/clock.c
@@ -278,6 +278,11 @@ arch_init_clk_ops(struct clk_ops **ops, int type)
278{ 278{
279} 279}
280 280
281void __init __attribute__ ((weak))
282arch_clk_init(void)
283{
284}
285
281static int show_clocks(char *buf, char **start, off_t off, 286static int show_clocks(char *buf, char **start, off_t off,
282 int len, int *eof, void *data) 287 int len, int *eof, void *data)
283{ 288{
@@ -314,6 +319,8 @@ int __init clk_init(void)
314 ret |= clk_register(clk); 319 ret |= clk_register(clk);
315 } 320 }
316 321
322 arch_clk_init();
323
317 /* Kick the child clocks.. */ 324 /* Kick the child clocks.. */
318 propagate_rate(&master_clk); 325 propagate_rate(&master_clk);
319 propagate_rate(&bus_clk); 326 propagate_rate(&bus_clk);
diff --git a/arch/sh/kernel/cpu/irq/maskreg.c b/arch/sh/kernel/cpu/irq/maskreg.c
index 492db31b3cab..978992e367a5 100644
--- a/arch/sh/kernel/cpu/irq/maskreg.c
+++ b/arch/sh/kernel/cpu/irq/maskreg.c
@@ -38,7 +38,7 @@ static struct hw_interrupt_type maskreg_irq_type = {
38 .end = end_maskreg_irq 38 .end = end_maskreg_irq
39}; 39};
40 40
41/* actual implementatin */ 41/* actual implementation */
42static unsigned int startup_maskreg_irq(unsigned int irq) 42static unsigned int startup_maskreg_irq(unsigned int irq)
43{ 43{
44 enable_maskreg_irq(irq); 44 enable_maskreg_irq(irq);
diff --git a/arch/sh/kernel/cpu/sh4/fpu.c b/arch/sh/kernel/cpu/sh4/fpu.c
index d61dd599169f..c5a4fc77fa06 100644
--- a/arch/sh/kernel/cpu/sh4/fpu.c
+++ b/arch/sh/kernel/cpu/sh4/fpu.c
@@ -138,7 +138,7 @@ restore_fpu(struct task_struct *tsk)
138/* 138/*
139 * Load the FPU with signalling NANS. This bit pattern we're using 139 * Load the FPU with signalling NANS. This bit pattern we're using
140 * has the property that no matter wether considered as single or as 140 * has the property that no matter wether considered as single or as
141 * double precission represents signaling NANS. 141 * double precision represents signaling NANS.
142 */ 142 */
143 143
144static void 144static void
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c
index 6f8f458912c7..03b14cf78ddf 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c
@@ -106,6 +106,7 @@ static struct ipr_data sh7750_ipr_map[] = {
106 { 38, 2, 8, 7 }, /* DMAC DMAE */ 106 { 38, 2, 8, 7 }, /* DMAC DMAE */
107}; 107};
108 108
109#ifdef CONFIG_CPU_SUBTYPE_SH7751
109static struct ipr_data sh7751_ipr_map[] = { 110static struct ipr_data sh7751_ipr_map[] = {
110 { 44, 2, 8, 7 }, /* DMAC DMTE4 */ 111 { 44, 2, 8, 7 }, /* DMAC DMTE4 */
111 { 45, 2, 8, 7 }, /* DMAC DMTE5 */ 112 { 45, 2, 8, 7 }, /* DMAC DMTE5 */
@@ -117,6 +118,7 @@ static struct ipr_data sh7751_ipr_map[] = {
117 /*{ 72, INTPRI00, 8, ? },*/ /* TMU3 TUNI */ 118 /*{ 72, INTPRI00, 8, ? },*/ /* TMU3 TUNI */
118 /*{ 76, INTPRI00, 12, ? },*/ /* TMU4 TUNI */ 119 /*{ 76, INTPRI00, 12, ? },*/ /* TMU4 TUNI */
119}; 120};
121#endif
120 122
121static unsigned long ipr_offsets[] = { 123static unsigned long ipr_offsets[] = {
122 0xffd00004UL, /* 0: IPRA */ 124 0xffd00004UL, /* 0: IPRA */
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
index 29090035bc5b..51b386d454de 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
@@ -17,7 +17,6 @@
17#include <asm/clock.h> 17#include <asm/clock.h>
18#include <asm/freq.h> 18#include <asm/freq.h>
19 19
20#define SH7722_PLL_FREQ (32000000/8)
21#define N (-1) 20#define N (-1)
22#define NM (-2) 21#define NM (-2)
23#define ROUND_NEAREST 0 22#define ROUND_NEAREST 0
@@ -141,28 +140,36 @@ static void adjust_clocks(int originate, int *l, unsigned long v[],
141*/ 140*/
142static int divisors2[] = { 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, 32, 40 }; 141static int divisors2[] = { 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, 32, 40 };
143 142
143static void master_clk_recalc(struct clk *clk)
144{
145 unsigned frqcr = ctrl_inl(FRQCR);
146
147 clk->rate = CONFIG_SH_PCLK_FREQ * (((frqcr >> 24) & 0x1f) + 1);
148}
149
144static void master_clk_init(struct clk *clk) 150static void master_clk_init(struct clk *clk)
145{ 151{
146 clk_set_rate(clk, clk_get_rate(clk)); 152 clk->parent = NULL;
153 clk->flags |= CLK_RATE_PROPAGATES;
154 clk->rate = CONFIG_SH_PCLK_FREQ;
155 master_clk_recalc(clk);
147} 156}
148 157
149static void master_clk_recalc(struct clk *clk) 158
159static void module_clk_recalc(struct clk *clk)
150{ 160{
151 unsigned long frqcr = ctrl_inl(FRQCR); 161 unsigned long frqcr = ctrl_inl(FRQCR);
152 162
153 clk->rate = CONFIG_SH_PCLK_FREQ * (1 + (frqcr >> 24 & 0xF)); 163 clk->rate = clk->parent->rate / (((frqcr >> 24) & 0x1f) + 1);
154} 164}
155 165
156static int master_clk_setrate(struct clk *clk, unsigned long rate, int id) 166static int master_clk_setrate(struct clk *clk, unsigned long rate, int id)
157{ 167{
158 int div = rate / SH7722_PLL_FREQ; 168 int div = rate / clk->rate;
159 int master_divs[] = { 2, 3, 4, 6, 8, 16 }; 169 int master_divs[] = { 2, 3, 4, 6, 8, 16 };
160 int index; 170 int index;
161 unsigned long frqcr; 171 unsigned long frqcr;
162 172
163 if (rate < SH7722_PLL_FREQ * 2)
164 return -EINVAL;
165
166 for (index = 1; index < ARRAY_SIZE(master_divs); index++) 173 for (index = 1; index < ARRAY_SIZE(master_divs); index++)
167 if (div >= master_divs[index - 1] && div < master_divs[index]) 174 if (div >= master_divs[index - 1] && div < master_divs[index])
168 break; 175 break;
@@ -185,6 +192,10 @@ static struct clk_ops sh7722_master_clk_ops = {
185 .set_rate = master_clk_setrate, 192 .set_rate = master_clk_setrate,
186}; 193};
187 194
195static struct clk_ops sh7722_module_clk_ops = {
196 .recalc = module_clk_recalc,
197};
198
188struct frqcr_context { 199struct frqcr_context {
189 unsigned mask; 200 unsigned mask;
190 unsigned shift; 201 unsigned shift;
@@ -489,7 +500,7 @@ static void sh7722_siu_recalc(struct clk *clk)
489 500
490 if (siu < 0) 501 if (siu < 0)
491 return /* siu */ ; 502 return /* siu */ ;
492 BUG_ON(siu > 1); 503 BUG_ON(siu > 2);
493 r = ctrl_inl(sh7722_siu_regs[siu]); 504 r = ctrl_inl(sh7722_siu_regs[siu]);
494 clk->rate = clk->parent->rate * 2 / divisors2[r & 0xF]; 505 clk->rate = clk->parent->rate * 2 / divisors2[r & 0xF];
495} 506}
@@ -571,7 +582,7 @@ static struct clk *sh7722_clocks[] = {
571 */ 582 */
572struct clk_ops *onchip_ops[] = { 583struct clk_ops *onchip_ops[] = {
573 &sh7722_master_clk_ops, 584 &sh7722_master_clk_ops,
574 &sh7722_frqcr_clk_ops, 585 &sh7722_module_clk_ops,
575 &sh7722_frqcr_clk_ops, 586 &sh7722_frqcr_clk_ops,
576 &sh7722_frqcr_clk_ops, 587 &sh7722_frqcr_clk_ops,
577}; 588};
@@ -583,7 +594,7 @@ arch_init_clk_ops(struct clk_ops **ops, int type)
583 *ops = onchip_ops[type]; 594 *ops = onchip_ops[type];
584} 595}
585 596
586int __init sh7722_clock_init(void) 597int __init arch_clk_init(void)
587{ 598{
588 struct clk *master; 599 struct clk *master;
589 int i; 600 int i;
@@ -597,4 +608,3 @@ int __init sh7722_clock_init(void)
597 clk_put(master); 608 clk_put(master);
598 return 0; 609 return 0;
599} 610}
600arch_initcall(sh7722_clock_init);
diff --git a/arch/sh/kernel/kgdb_stub.c b/arch/sh/kernel/kgdb_stub.c
index a5323364cbca..edd1ec214e6d 100644
--- a/arch/sh/kernel/kgdb_stub.c
+++ b/arch/sh/kernel/kgdb_stub.c
@@ -2,7 +2,7 @@
2 * May be copied or modified under the terms of the GNU General Public 2 * May be copied or modified under the terms of the GNU General Public
3 * License. See linux/COPYING for more information. 3 * License. See linux/COPYING for more information.
4 * 4 *
5 * Containes extracts from code by Glenn Engel, Jim Kingdon, 5 * Contains extracts from code by Glenn Engel, Jim Kingdon,
6 * David Grothe <dave@gcom.com>, Tigran Aivazian <tigran@sco.com>, 6 * David Grothe <dave@gcom.com>, Tigran Aivazian <tigran@sco.com>,
7 * Amit S. Kale <akale@veritas.com>, William Gatliff <bgat@open-widgets.com>, 7 * Amit S. Kale <akale@veritas.com>, William Gatliff <bgat@open-widgets.com>,
8 * Ben Lee, Steve Chamberlain and Benoit Miller <fulg@iname.com>. 8 * Ben Lee, Steve Chamberlain and Benoit Miller <fulg@iname.com>.
@@ -85,7 +85,7 @@
85 * 85 *
86 * Responses can be run-length encoded to save space. A '*' means that 86 * Responses can be run-length encoded to save space. A '*' means that
87 * the next character is an ASCII encoding giving a repeat count which 87 * the next character is an ASCII encoding giving a repeat count which
88 * stands for that many repititions of the character preceding the '*'. 88 * stands for that many repetitions of the character preceding the '*'.
89 * The encoding is n+29, yielding a printable character where n >=3 89 * The encoding is n+29, yielding a printable character where n >=3
90 * (which is where RLE starts to win). Don't use an n > 126. 90 * (which is where RLE starts to win). Don't use an n > 126.
91 * 91 *
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
index 6b4f5748d0be..a11e2aa73cbc 100644
--- a/arch/sh/kernel/process.c
+++ b/arch/sh/kernel/process.c
@@ -26,8 +26,6 @@
26static int hlt_counter; 26static int hlt_counter;
27int ubc_usercnt = 0; 27int ubc_usercnt = 0;
28 28
29#define HARD_IDLE_TIMEOUT (HZ / 3)
30
31void (*pm_idle)(void); 29void (*pm_idle)(void);
32void (*pm_power_off)(void); 30void (*pm_power_off)(void);
33EXPORT_SYMBOL(pm_power_off); 31EXPORT_SYMBOL(pm_power_off);
@@ -44,16 +42,39 @@ void enable_hlt(void)
44} 42}
45EXPORT_SYMBOL(enable_hlt); 43EXPORT_SYMBOL(enable_hlt);
46 44
45static int __init nohlt_setup(char *__unused)
46{
47 hlt_counter = 1;
48 return 1;
49}
50__setup("nohlt", nohlt_setup);
51
52static int __init hlt_setup(char *__unused)
53{
54 hlt_counter = 0;
55 return 1;
56}
57__setup("hlt", hlt_setup);
58
47void default_idle(void) 59void default_idle(void)
48{ 60{
49 if (!hlt_counter) 61 if (!hlt_counter) {
50 cpu_sleep(); 62 clear_thread_flag(TIF_POLLING_NRFLAG);
51 else 63 smp_mb__after_clear_bit();
52 cpu_relax(); 64 set_bl_bit();
65 while (!need_resched())
66 cpu_sleep();
67 clear_bl_bit();
68 set_thread_flag(TIF_POLLING_NRFLAG);
69 } else
70 while (!need_resched())
71 cpu_relax();
53} 72}
54 73
55void cpu_idle(void) 74void cpu_idle(void)
56{ 75{
76 set_thread_flag(TIF_POLLING_NRFLAG);
77
57 /* endless idle loop with no priority at all */ 78 /* endless idle loop with no priority at all */
58 while (1) { 79 while (1) {
59 void (*idle)(void) = pm_idle; 80 void (*idle)(void) = pm_idle;
diff --git a/arch/sh/kernel/syscalls.S b/arch/sh/kernel/syscalls.S
index 4357d1a6358f..7db1c2dc5992 100644
--- a/arch/sh/kernel/syscalls.S
+++ b/arch/sh/kernel/syscalls.S
@@ -355,3 +355,6 @@ ENTRY(sys_call_table)
355 .long sys_getcpu 355 .long sys_getcpu
356 .long sys_epoll_pwait 356 .long sys_epoll_pwait
357 .long sys_utimensat /* 320 */ 357 .long sys_utimensat /* 320 */
358 .long sys_signalfd
359 .long sys_timerfd
360 .long sys_eventfd
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c
index 3a197649cd83..5b75cb6f8f9b 100644
--- a/arch/sh/kernel/traps.c
+++ b/arch/sh/kernel/traps.c
@@ -21,6 +21,7 @@
21#include <linux/bug.h> 21#include <linux/bug.h>
22#include <linux/debug_locks.h> 22#include <linux/debug_locks.h>
23#include <linux/kdebug.h> 23#include <linux/kdebug.h>
24#include <linux/kexec.h>
24#include <linux/limits.h> 25#include <linux/limits.h>
25#include <asm/system.h> 26#include <asm/system.h>
26#include <asm/uaccess.h> 27#include <asm/uaccess.h>
@@ -101,6 +102,16 @@ void die(const char * str, struct pt_regs * regs, long err)
101 102
102 bust_spinlocks(0); 103 bust_spinlocks(0);
103 spin_unlock_irq(&die_lock); 104 spin_unlock_irq(&die_lock);
105
106 if (kexec_should_crash(current))
107 crash_kexec(regs);
108
109 if (in_interrupt())
110 panic("Fatal exception in interrupt");
111
112 if (panic_on_oops)
113 panic("Fatal exception");
114
104 do_exit(SIGSEGV); 115 do_exit(SIGSEGV);
105} 116}
106 117
@@ -513,7 +524,7 @@ static int handle_unaligned_access(u16 instruction, struct pt_regs *regs)
513 * misaligned data access 524 * misaligned data access
514 * access to >= 0x80000000 is user mode 525 * access to >= 0x80000000 is user mode
515 * Unfortuntaly we can't distinguish between instruction address error 526 * Unfortuntaly we can't distinguish between instruction address error
516 * and data address errors caused by read acceses. 527 * and data address errors caused by read accesses.
517 */ 528 */
518asmlinkage void do_address_error(struct pt_regs *regs, 529asmlinkage void do_address_error(struct pt_regs *regs,
519 unsigned long writeaccess, 530 unsigned long writeaccess,
diff --git a/arch/sh/math-emu/math.c b/arch/sh/math-emu/math.c
index 1efbac15ff4e..a38e1eed9e77 100644
--- a/arch/sh/math-emu/math.c
+++ b/arch/sh/math-emu/math.c
@@ -148,7 +148,7 @@ fmac(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n)
148 return 0; 148 return 0;
149} 149}
150 150
151// to process fmov's extention (odd n for DR access XD). 151// to process fmov's extension (odd n for DR access XD).
152#define FMOV_EXT(x) if(x&1) x+=16-1 152#define FMOV_EXT(x) if(x&1) x+=16-1
153 153
154static int 154static int
diff --git a/arch/sh/mm/copy_page.S b/arch/sh/mm/copy_page.S
index 397c94c97315..ae039f2da162 100644
--- a/arch/sh/mm/copy_page.S
+++ b/arch/sh/mm/copy_page.S
@@ -129,6 +129,7 @@ ENTRY(__copy_user_page)
129 rts 129 rts
130 nop 130 nop
131#endif 131#endif
132 .align 2
132.Lpsz: .long PAGE_SIZE 133.Lpsz: .long PAGE_SIZE
133/* 134/*
134 * __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n); 135 * __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n);
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c
index 9207da67ff8a..c878faa4ae46 100644
--- a/arch/sh/mm/fault.c
+++ b/arch/sh/mm/fault.c
@@ -15,43 +15,11 @@
15#include <linux/mm.h> 15#include <linux/mm.h>
16#include <linux/hardirq.h> 16#include <linux/hardirq.h>
17#include <linux/kprobes.h> 17#include <linux/kprobes.h>
18#include <linux/kdebug.h>
19#include <asm/system.h> 18#include <asm/system.h>
20#include <asm/mmu_context.h> 19#include <asm/mmu_context.h>
21#include <asm/tlbflush.h> 20#include <asm/tlbflush.h>
22#include <asm/kgdb.h> 21#include <asm/kgdb.h>
23 22
24#ifdef CONFIG_KPROBES
25ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain);
26
27/* Hook to register for page fault notifications */
28int register_page_fault_notifier(struct notifier_block *nb)
29{
30 return atomic_notifier_chain_register(&notify_page_fault_chain, nb);
31}
32
33int unregister_page_fault_notifier(struct notifier_block *nb)
34{
35 return atomic_notifier_chain_unregister(&notify_page_fault_chain, nb);
36}
37
38static inline int notify_page_fault(enum die_val val, struct pt_regs *regs,
39 int trap, int sig)
40{
41 struct die_args args = {
42 .regs = regs,
43 .trapnr = trap,
44 };
45 return atomic_notifier_call_chain(&notify_page_fault_chain, val, &args);
46}
47#else
48static inline int notify_page_fault(enum die_val val, struct pt_regs *regs,
49 int trap, int sig)
50{
51 return NOTIFY_DONE;
52}
53#endif
54
55/* 23/*
56 * This routine handles page faults. It determines the address, 24 * This routine handles page faults. It determines the address,
57 * and the problem, and then passes it off to one of the appropriate 25 * and the problem, and then passes it off to one of the appropriate
@@ -69,11 +37,6 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
69 siginfo_t info; 37 siginfo_t info;
70 38
71 trace_hardirqs_on(); 39 trace_hardirqs_on();
72
73 if (notify_page_fault(DIE_PAGE_FAULT, regs,
74 writeaccess, SIGSEGV) == NOTIFY_STOP)
75 return;
76
77 local_irq_enable(); 40 local_irq_enable();
78 41
79#ifdef CONFIG_SH_KGDB 42#ifdef CONFIG_SH_KGDB
@@ -285,7 +248,7 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
285 pte_t *pte; 248 pte_t *pte;
286 pte_t entry; 249 pte_t entry;
287 struct mm_struct *mm = current->mm; 250 struct mm_struct *mm = current->mm;
288 spinlock_t *ptl; 251 spinlock_t *ptl = NULL;
289 int ret = 1; 252 int ret = 1;
290 253
291#ifdef CONFIG_SH_KGDB 254#ifdef CONFIG_SH_KGDB
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 8fe223a890ed..e0e644ff3204 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -12,6 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/bootmem.h> 13#include <linux/bootmem.h>
14#include <linux/proc_fs.h> 14#include <linux/proc_fs.h>
15#include <linux/pagemap.h>
15#include <linux/percpu.h> 16#include <linux/percpu.h>
16#include <linux/io.h> 17#include <linux/io.h>
17#include <asm/mmu_context.h> 18#include <asm/mmu_context.h>
@@ -112,7 +113,7 @@ static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot)
112 * As a performance optimization, other platforms preserve the fixmap mapping 113 * As a performance optimization, other platforms preserve the fixmap mapping
113 * across a context switch, we don't presently do this, but this could be done 114 * across a context switch, we don't presently do this, but this could be done
114 * in a similar fashion as to the wired TLB interface that sh64 uses (by way 115 * in a similar fashion as to the wired TLB interface that sh64 uses (by way
115 * of the memorry mapped UTLB configuration) -- this unfortunately forces us to 116 * of the memory mapped UTLB configuration) -- this unfortunately forces us to
116 * give up a TLB entry for each mapping we want to preserve. While this may be 117 * give up a TLB entry for each mapping we want to preserve. While this may be
117 * viable for a small number of fixmaps, it's not particularly useful for 118 * viable for a small number of fixmaps, it's not particularly useful for
118 * everything and needs to be carefully evaluated. (ie, we may want this for 119 * everything and needs to be carefully evaluated. (ie, we may want this for
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c
index 02aae06527dc..b6a5a338145b 100644
--- a/arch/sh/mm/pmb.c
+++ b/arch/sh/mm/pmb.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * Privileged Space Mapping Buffer (PMB) Support. 4 * Privileged Space Mapping Buffer (PMB) Support.
5 * 5 *
6 * Copyright (C) 2005, 2006 Paul Mundt 6 * Copyright (C) 2005, 2006, 2007 Paul Mundt
7 * 7 *
8 * P1/P2 Section mapping definitions from map32.h, which was: 8 * P1/P2 Section mapping definitions from map32.h, which was:
9 * 9 *
@@ -68,6 +68,32 @@ static inline unsigned long mk_pmb_data(unsigned int entry)
68 return mk_pmb_entry(entry) | PMB_DATA; 68 return mk_pmb_entry(entry) | PMB_DATA;
69} 69}
70 70
71static DEFINE_SPINLOCK(pmb_list_lock);
72static struct pmb_entry *pmb_list;
73
74static inline void pmb_list_add(struct pmb_entry *pmbe)
75{
76 struct pmb_entry **p, *tmp;
77
78 p = &pmb_list;
79 while ((tmp = *p) != NULL)
80 p = &tmp->next;
81
82 pmbe->next = tmp;
83 *p = pmbe;
84}
85
86static inline void pmb_list_del(struct pmb_entry *pmbe)
87{
88 struct pmb_entry **p, *tmp;
89
90 for (p = &pmb_list; (tmp = *p); p = &tmp->next)
91 if (tmp == pmbe) {
92 *p = tmp->next;
93 return;
94 }
95}
96
71struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn, 97struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
72 unsigned long flags) 98 unsigned long flags)
73{ 99{
@@ -81,11 +107,19 @@ struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
81 pmbe->ppn = ppn; 107 pmbe->ppn = ppn;
82 pmbe->flags = flags; 108 pmbe->flags = flags;
83 109
110 spin_lock_irq(&pmb_list_lock);
111 pmb_list_add(pmbe);
112 spin_unlock_irq(&pmb_list_lock);
113
84 return pmbe; 114 return pmbe;
85} 115}
86 116
87void pmb_free(struct pmb_entry *pmbe) 117void pmb_free(struct pmb_entry *pmbe)
88{ 118{
119 spin_lock_irq(&pmb_list_lock);
120 pmb_list_del(pmbe);
121 spin_unlock_irq(&pmb_list_lock);
122
89 kmem_cache_free(pmb_cache, pmbe); 123 kmem_cache_free(pmb_cache, pmbe);
90} 124}
91 125
@@ -167,31 +201,6 @@ void clear_pmb_entry(struct pmb_entry *pmbe)
167 clear_bit(entry, &pmb_map); 201 clear_bit(entry, &pmb_map);
168} 202}
169 203
170static DEFINE_SPINLOCK(pmb_list_lock);
171static struct pmb_entry *pmb_list;
172
173static inline void pmb_list_add(struct pmb_entry *pmbe)
174{
175 struct pmb_entry **p, *tmp;
176
177 p = &pmb_list;
178 while ((tmp = *p) != NULL)
179 p = &tmp->next;
180
181 pmbe->next = tmp;
182 *p = pmbe;
183}
184
185static inline void pmb_list_del(struct pmb_entry *pmbe)
186{
187 struct pmb_entry **p, *tmp;
188
189 for (p = &pmb_list; (tmp = *p); p = &tmp->next)
190 if (tmp == pmbe) {
191 *p = tmp->next;
192 return;
193 }
194}
195 204
196static struct { 205static struct {
197 unsigned long size; 206 unsigned long size;
@@ -283,25 +292,14 @@ void pmb_unmap(unsigned long addr)
283 } while (pmbe); 292 } while (pmbe);
284} 293}
285 294
286static void pmb_cache_ctor(void *pmb, struct kmem_cache *cachep, unsigned long flags) 295static void pmb_cache_ctor(void *pmb, struct kmem_cache *cachep,
296 unsigned long flags)
287{ 297{
288 struct pmb_entry *pmbe = pmb; 298 struct pmb_entry *pmbe = pmb;
289 299
290 memset(pmb, 0, sizeof(struct pmb_entry)); 300 memset(pmb, 0, sizeof(struct pmb_entry));
291 301
292 spin_lock_irq(&pmb_list_lock);
293
294 pmbe->entry = PMB_NO_ENTRY; 302 pmbe->entry = PMB_NO_ENTRY;
295 pmb_list_add(pmbe);
296
297 spin_unlock_irq(&pmb_list_lock);
298}
299
300static void pmb_cache_dtor(void *pmb, struct kmem_cache *cachep, unsigned long flags)
301{
302 spin_lock_irq(&pmb_list_lock);
303 pmb_list_del(pmb);
304 spin_unlock_irq(&pmb_list_lock);
305} 303}
306 304
307static int __init pmb_init(void) 305static int __init pmb_init(void)
@@ -312,8 +310,7 @@ static int __init pmb_init(void)
312 BUG_ON(unlikely(nr_entries >= NR_PMB_ENTRIES)); 310 BUG_ON(unlikely(nr_entries >= NR_PMB_ENTRIES));
313 311
314 pmb_cache = kmem_cache_create("pmb", sizeof(struct pmb_entry), 0, 312 pmb_cache = kmem_cache_create("pmb", sizeof(struct pmb_entry), 0,
315 SLAB_PANIC, pmb_cache_ctor, 313 SLAB_PANIC, pmb_cache_ctor, NULL);
316 pmb_cache_dtor);
317 314
318 jump_to_P2(); 315 jump_to_P2();
319 316
diff --git a/arch/sh/tools/mach-types b/arch/sh/tools/mach-types
index 554f801db67b..fb40f188aff9 100644
--- a/arch/sh/tools/mach-types
+++ b/arch/sh/tools/mach-types
@@ -7,8 +7,11 @@
7# 7#
8SE SH_SOLUTION_ENGINE 8SE SH_SOLUTION_ENGINE
97751SE SH_7751_SOLUTION_ENGINE 97751SE SH_7751_SOLUTION_ENGINE
107722SE SH_7722_SOLUTION_ENGINE
107300SE SH_7300_SOLUTION_ENGINE 117300SE SH_7300_SOLUTION_ENGINE
117343SE SH_7343_SOLUTION_ENGINE 127343SE SH_7343_SOLUTION_ENGINE
137206SE SH_7206_SOLUTION_ENGINE
147619SE SH_7619_SOLUTION_ENGINE
127780SE SH_7780_SOLUTION_ENGINE 157780SE SH_7780_SOLUTION_ENGINE
1373180SE SH_73180_SOLUTION_ENGINE 1673180SE SH_73180_SOLUTION_ENGINE
147751SYSTEMH SH_7751_SYSTEMH 177751SYSTEMH SH_7751_SYSTEMH
@@ -31,5 +34,3 @@ R7785RP SH_R7785RP
31TITAN SH_TITAN 34TITAN SH_TITAN
32SHMIN SH_SHMIN 35SHMIN SH_SHMIN
337710VOIPGW SH_7710VOIPGW 367710VOIPGW SH_7710VOIPGW
347206SE SH_7206_SOLUTION_ENGINE
357619SE SH_7619_SOLUTION_ENGINE