Commit 5c27d0f1 authored by Linus Torvalds's avatar Linus Torvalds

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: (24 commits)
  sh: Update r7785rp defconfig.
  sh: mach-type updates.
  sh: Fix up r7780rp highlander CF access size.
  sh: Terminate .eh_frame in VDSO with a 4-byte 0.
  sh: Correct SUBARCH matching.
  sh: Decouple 4k and soft/hardirq stacks.
  sh: Fix optimized __copy_user() movca.l usage.
  sh: Clean up SR.RB Kconfig mess.
  sh: Kill off dead ipr_irq_demux().
  sh: Make SH7750 oprofile compile again.
  sh: Provide a __read_mostly section wrapper.
  sh: linker script tidying.
  sh: Move zero page param defs somewhere sensible.
  sh: Use generic SMP_CACHE_BYTES/L1_CACHE_ALIGN.
  sh: Kill off legacy embedded ramdisk section.
  sh: Fix up early mem cmdline parsing.
  sh: Enable USBF on MS7722SE.
  sh: Add resource of USBF for SH7722.
  maple: Fix maple bus compiler warning
  sh: fix zImage build with >=binutils-2.18
  ...
parents 468f8afd 352d2813
...@@ -168,7 +168,8 @@ export srctree objtree VPATH TOPDIR ...@@ -168,7 +168,8 @@ export srctree objtree VPATH TOPDIR
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
-e s/arm.*/arm/ -e s/sa110/arm/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \
-e s/s390x/s390/ -e s/parisc64/parisc/ \ -e s/s390x/s390/ -e s/parisc64/parisc/ \
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ ) -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
-e s/sh[234].*/sh/ )
# Cross compiling and selecting different set of gcc/bin-utils # Cross compiling and selecting different set of gcc/bin-utils
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
......
...@@ -182,9 +182,7 @@ config CPU_HAS_IPR_IRQ ...@@ -182,9 +182,7 @@ config CPU_HAS_IPR_IRQ
bool bool
config CPU_HAS_SR_RB config CPU_HAS_SR_RB
bool "CPU has SR.RB" bool
depends on CPU_SH3 || CPU_SH4
default y
help help
This will enable the use of SR.RB register bank usage. Processors This will enable the use of SR.RB register bank usage. Processors
that are lacking this bit must have another method in place for that are lacking this bit must have another method in place for
...@@ -291,9 +289,7 @@ config SH_DREAMCAST ...@@ -291,9 +289,7 @@ config SH_DREAMCAST
depends on CPU_SUBTYPE_SH7091 depends on CPU_SUBTYPE_SH7091
help help
Select Dreamcast if configuring for a SEGA Dreamcast. Select Dreamcast if configuring for a SEGA Dreamcast.
More information at More information at <http://www.linux-sh.org>
<http://www.m17n.org/linux-sh/dreamcast/>. There is a
Dreamcast project is at <http://linuxdc.sourceforge.net/>.
config SH_MPC1211 config SH_MPC1211
bool "Interface MPC1211" bool "Interface MPC1211"
......
...@@ -86,6 +86,14 @@ config 4KSTACKS ...@@ -86,6 +86,14 @@ config 4KSTACKS
on the VM subsystem for higher order allocations. This option on the VM subsystem for higher order allocations. This option
will also use IRQ stacks to compensate for the reduced stackspace. will also use IRQ stacks to compensate for the reduced stackspace.
config IRQSTACKS
bool "Use separate kernel stacks when processing interrupts"
depends on DEBUG_KERNEL
help
If you say Y here the kernel will use separate kernel stacks
for handling hard and soft interrupts. This can help avoid
overflowing the process kernel stacks.
config SH_KGDB config SH_KGDB
bool "Include KGDB kernel debugger" bool "Include KGDB kernel debugger"
select FRAME_POINTER select FRAME_POINTER
......
...@@ -66,7 +66,7 @@ cflags-y += $(isaflags-y) -ffreestanding ...@@ -66,7 +66,7 @@ cflags-y += $(isaflags-y) -ffreestanding
cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \ cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \
$(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g') $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
OBJCOPYFLAGS := -O binary -R .note -R .comment -R .stab -R .stabstr -S OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -R .stab -R .stabstr -S
# #
# arch/sh/defconfig doesn't reflect any real hardware, and as such should # arch/sh/defconfig doesn't reflect any real hardware, and as such should
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pata_platform.h> #include <linux/pata_platform.h>
#include <linux/types.h>
#include <net/ax88796.h>
#include <asm/machvec.h> #include <asm/machvec.h>
#include <asm/r7780rp.h> #include <asm/r7780rp.h>
#include <asm/clock.h> #include <asm/clock.h>
...@@ -136,11 +138,50 @@ static struct platform_device heartbeat_device = { ...@@ -136,11 +138,50 @@ static struct platform_device heartbeat_device = {
.resource = heartbeat_resources, .resource = heartbeat_resources,
}; };
static struct ax_plat_data ax88796_platdata = {
.flags = AXFLG_HAS_93CX6,
.wordlength = 2,
.dcr_val = 0x1,
.rcr_val = 0x40,
};
static struct resource ax88796_resources[] = {
{
#ifdef CONFIG_SH_R7780RP
.start = 0xa5800400,
.end = 0xa5800400 + (0x20 * 0x2) - 1,
#else
.start = 0xa4100400,
.end = 0xa4100400 + (0x20 * 0x2) - 1,
#endif
.flags = IORESOURCE_MEM,
},
{
.start = IRQ_AX88796,
.end = IRQ_AX88796,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device ax88796_device = {
.name = "ax88796",
.id = 0,
.dev = {
.platform_data = &ax88796_platdata,
},
.num_resources = ARRAY_SIZE(ax88796_resources),
.resource = ax88796_resources,
};
static struct platform_device *r7780rp_devices[] __initdata = { static struct platform_device *r7780rp_devices[] __initdata = {
&r8a66597_usb_host_device, &r8a66597_usb_host_device,
&m66592_usb_peripheral_device, &m66592_usb_peripheral_device,
&cf_ide_device, &cf_ide_device,
&heartbeat_device, &heartbeat_device,
&ax88796_device,
}; };
static int __init r7780rp_devices_setup(void) static int __init r7780rp_devices_setup(void)
...@@ -183,6 +224,34 @@ static void r7780rp_power_off(void) ...@@ -183,6 +224,34 @@ static void r7780rp_power_off(void)
ctrl_outw(0x0001, PA_POFF); ctrl_outw(0x0001, PA_POFF);
} }
static inline unsigned char is_ide_ioaddr(unsigned long addr)
{
return ((cf_ide_resources[0].start <= addr &&
addr <= cf_ide_resources[0].end) ||
(cf_ide_resources[1].start <= addr &&
addr <= cf_ide_resources[1].end));
}
void highlander_writeb(u8 b, void __iomem *addr)
{
unsigned long tmp = (unsigned long __force)addr;
if (is_ide_ioaddr(tmp))
ctrl_outw((u16)b, tmp);
else
ctrl_outb(b, tmp);
}
u8 highlander_readb(void __iomem *addr)
{
unsigned long tmp = (unsigned long __force)addr;
if (is_ide_ioaddr(tmp))
return ctrl_inw(tmp) & 0xff;
else
return ctrl_inb(tmp);
}
/* /*
* Initialize the board * Initialize the board
*/ */
...@@ -267,4 +336,6 @@ static struct sh_machine_vector mv_highlander __initmv = { ...@@ -267,4 +336,6 @@ static struct sh_machine_vector mv_highlander __initmv = {
.mv_setup = highlander_setup, .mv_setup = highlander_setup,
.mv_init_irq = highlander_init_irq, .mv_init_irq = highlander_init_irq,
.mv_irq_demux = highlander_irq_demux, .mv_irq_demux = highlander_irq_demux,
.mv_readb = highlander_readb,
.mv_writeb = highlander_writeb,
}; };
...@@ -103,8 +103,8 @@ static void __init se7722_setup(char **cmdline_p) ...@@ -103,8 +103,8 @@ static void __init se7722_setup(char **cmdline_p)
ctrl_outl(0x00051001, MSTPCR0); ctrl_outl(0x00051001, MSTPCR0);
ctrl_outl(0x00000000, MSTPCR1); ctrl_outl(0x00000000, MSTPCR1);
/* KEYSC, VOU, BEU, CEU, VEU, VPU, LCDC */ /* KEYSC, VOU, BEU, CEU, VEU, VPU, LCDC, USB */
ctrl_outl(0xffffbfC0, MSTPCR2); ctrl_outl(0xffffb7c0, MSTPCR2);
ctrl_outw(0x0000, PORT_PECR); /* PORT E 1 = IRQ5 ,E 0 = BS */ ctrl_outw(0x0000, PORT_PECR); /* PORT E 1 = IRQ5 ,E 0 = BS */
ctrl_outw(0x1000, PORT_PJCR); /* PORT J 1 = IRQ1,J 0 =IRQ0 */ ctrl_outw(0x1000, PORT_PJCR); /* PORT J 1 = IRQ1,J 0 =IRQ0 */
......
This diff is collapsed.
...@@ -114,7 +114,7 @@ static struct pci_err int_error[]={ ...@@ -114,7 +114,7 @@ static struct pci_err int_error[]={
{ INT_MWPDI, "MWPDI: PERR from target at data write"}, { INT_MWPDI, "MWPDI: PERR from target at data write"},
{ INT_MRDPEI, "MRDPEI: Master read data parity error"} { INT_MRDPEI, "MRDPEI: Master read data parity error"}
}; };
#define NUM_PCI_INT_ERRS (sizeof(int_error)/sizeof(struct pci_err)) #define NUM_PCI_INT_ERRS ARRAY_SIZE(int_error)
static struct pci_err aint_error[]={ static struct pci_err aint_error[]={
{ AINT_MBI, "MBI: Master broken"}, { AINT_MBI, "MBI: Master broken"},
...@@ -126,7 +126,7 @@ static struct pci_err aint_error[]={ ...@@ -126,7 +126,7 @@ static struct pci_err aint_error[]={
{ AINT_WDPE, "WDPE: Write data parity"} { AINT_WDPE, "WDPE: Write data parity"}
}; };
#define NUM_PCI_AINT_ERRS (sizeof(aint_error)/sizeof(struct pci_err)) #define NUM_PCI_AINT_ERRS ARRAY_SIZE(aint_error)
static void print_pci_errors(unsigned reg,struct pci_err *error,int num_errors) static void print_pci_errors(unsigned reg,struct pci_err *error,int num_errors)
{ {
......
...@@ -49,7 +49,6 @@ static void enable_ipr_irq(unsigned int irq) ...@@ -49,7 +49,6 @@ static void enable_ipr_irq(unsigned int irq)
* bits/4. This is to make it easier to read the value directly from the * bits/4. This is to make it easier to read the value directly from the
* datasheets. The IPR address is calculated using the ipr_offset table. * datasheets. The IPR address is calculated using the ipr_offset table.
*/ */
void register_ipr_controller(struct ipr_desc *desc) void register_ipr_controller(struct ipr_desc *desc)
{ {
int i; int i;
...@@ -71,12 +70,4 @@ void register_ipr_controller(struct ipr_desc *desc) ...@@ -71,12 +70,4 @@ void register_ipr_controller(struct ipr_desc *desc)
disable_ipr_irq(p->irq); disable_ipr_irq(p->irq);
} }
} }
EXPORT_SYMBOL(register_ipr_controller); EXPORT_SYMBOL(register_ipr_controller);
#if !defined(CONFIG_CPU_HAS_PINT_IRQ)
int ipr_irq_demux(int irq)
{
return irq;
}
#endif
...@@ -14,6 +14,32 @@ ...@@ -14,6 +14,32 @@
#include <asm/mmzone.h> #include <asm/mmzone.h>
#include <asm/sci.h> #include <asm/sci.h>
static struct resource usbf_resources[] = {
[0] = {
.name = "m66592_udc",
.start = 0xA4480000,
.end = 0xA44800FF,
.flags = IORESOURCE_MEM,
},
[1] = {
.name = "m66592_udc",
.start = 65,
.end = 65,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device usbf_device = {
.name = "m66592_udc",
.id = -1,
.dev = {
.dma_mask = NULL,
.coherent_dma_mask = 0xffffffff,
},
.num_resources = ARRAY_SIZE(usbf_resources),
.resource = usbf_resources,
};
static struct plat_sci_port sci_platform_data[] = { static struct plat_sci_port sci_platform_data[] = {
{ {
.mapbase = 0xffe00000, .mapbase = 0xffe00000,
...@@ -47,6 +73,7 @@ static struct platform_device sci_device = { ...@@ -47,6 +73,7 @@ static struct platform_device sci_device = {
}; };
static struct platform_device *sh7722_devices[] __initdata = { static struct platform_device *sh7722_devices[] __initdata = {
&usbf_device,
&sci_device, &sci_device,
}; };
......
...@@ -69,7 +69,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -69,7 +69,7 @@ int show_interrupts(struct seq_file *p, void *v)
} }
#endif #endif
#ifdef CONFIG_4KSTACKS #ifdef CONFIG_IRQSTACKS
/* /*
* per-CPU IRQ handling contexts (thread information and stack) * per-CPU IRQ handling contexts (thread information and stack)
*/ */
...@@ -85,7 +85,7 @@ static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly; ...@@ -85,7 +85,7 @@ static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly;
asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs) asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
{ {
struct pt_regs *old_regs = set_irq_regs(regs); struct pt_regs *old_regs = set_irq_regs(regs);
#ifdef CONFIG_4KSTACKS #ifdef CONFIG_IRQSTACKS
union irq_ctx *curctx, *irqctx; union irq_ctx *curctx, *irqctx;
#endif #endif
...@@ -109,7 +109,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs) ...@@ -109,7 +109,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
irq = irq_demux(evt2irq(irq)); irq = irq_demux(evt2irq(irq));
#ifdef CONFIG_4KSTACKS #ifdef CONFIG_IRQSTACKS
curctx = (union irq_ctx *)current_thread_info(); curctx = (union irq_ctx *)current_thread_info();
irqctx = hardirq_ctx[smp_processor_id()]; irqctx = hardirq_ctx[smp_processor_id()];
...@@ -157,7 +157,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs) ...@@ -157,7 +157,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
return 1; return 1;
} }
#ifdef CONFIG_4KSTACKS #ifdef CONFIG_IRQSTACKS
static char softirq_stack[NR_CPUS * THREAD_SIZE] static char softirq_stack[NR_CPUS * THREAD_SIZE]
__attribute__((__section__(".bss.page_aligned"))); __attribute__((__section__(".bss.page_aligned")));
......
...@@ -32,12 +32,6 @@ ...@@ -32,12 +32,6 @@
#include <asm/clock.h> #include <asm/clock.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
extern void * __rd_start, * __rd_end;
/*
* Machine setup..
*/
/* /*
* Initialize loops_per_jiffy as 10000000 (1000MIPS). * Initialize loops_per_jiffy as 10000000 (1000MIPS).
* This value will be used at the very early stage of serial setup. * This value will be used at the very early stage of serial setup.
...@@ -63,33 +57,25 @@ struct screen_info screen_info; ...@@ -63,33 +57,25 @@ struct screen_info screen_info;
extern int root_mountflags; extern int root_mountflags;
/*
* This is set up by the setup-routine at boot-time
*/
#define PARAM ((unsigned char *)empty_zero_page)
#define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000))
#define RAMDISK_FLAGS (*(unsigned long *) (PARAM+0x004))
#define ORIG_ROOT_DEV (*(unsigned long *) (PARAM+0x008))
#define LOADER_TYPE (*(unsigned long *) (PARAM+0x00c))
#define INITRD_START (*(unsigned long *) (PARAM+0x010))
#define INITRD_SIZE (*(unsigned long *) (PARAM+0x014))
/* ... */
#define COMMAND_LINE ((char *) (PARAM+0x100))
#define RAMDISK_IMAGE_START_MASK 0x07FF #define RAMDISK_IMAGE_START_MASK 0x07FF
#define RAMDISK_PROMPT_FLAG 0x8000 #define RAMDISK_PROMPT_FLAG 0x8000
#define RAMDISK_LOAD_FLAG 0x4000 #define RAMDISK_LOAD_FLAG 0x4000
static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, }; static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, };
static struct resource code_resource = { .name = "Kernel code", }; static struct resource code_resource = {
static struct resource data_resource = { .name = "Kernel data", }; .name = "Kernel code",
.flags = IORESOURCE_BUSY | IORESOURCE_MEM,
};
static struct resource data_resource = {
.name = "Kernel data",
.flags = IORESOURCE_BUSY | IORESOURCE_MEM,
};
unsigned long memory_start; unsigned long memory_start;
EXPORT_SYMBOL(memory_start); EXPORT_SYMBOL(memory_start);
unsigned long memory_end = 0;
unsigned long memory_end;
EXPORT_SYMBOL(memory_end); EXPORT_SYMBOL(memory_end);
static int __init early_parse_mem(char *p) static int __init early_parse_mem(char *p)
...@@ -195,14 +181,7 @@ void __init setup_bootmem_allocator(unsigned long free_pfn) ...@@ -195,14 +181,7 @@ void __init setup_bootmem_allocator(unsigned long free_pfn)
sparse_memory_present_with_active_regions(0); sparse_memory_present_with_active_regions(0);
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0); ROOT_DEV = Root_RAM0;
if (&__rd_start != &__rd_end) {
LOADER_TYPE = 1;
INITRD_START = PHYSADDR((unsigned long)&__rd_start) -
__MEMORY_START;
INITRD_SIZE = (unsigned long)&__rd_end -
(unsigned long)&__rd_start;
}
if (LOADER_TYPE && INITRD_START) { if (LOADER_TYPE && INITRD_START) {
if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) { if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
...@@ -265,7 +244,8 @@ void __init setup_arch(char **cmdline_p) ...@@ -265,7 +244,8 @@ void __init setup_arch(char **cmdline_p)
data_resource.end = virt_to_phys(_edata)-1; data_resource.end = virt_to_phys(_edata)-1;
memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START; memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START;
memory_end = memory_start + __MEMORY_SIZE; if (!memory_end)
memory_end = memory_start + __MEMORY_SIZE;
#ifdef CONFIG_CMDLINE_BOOL #ifdef CONFIG_CMDLINE_BOOL
strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line)); strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line));
......
/* $Id: vmlinux.lds.S,v 1.8 2003/05/16 17:18:14 lethal Exp $ /*
* ld script to make SuperH Linux kernel * ld script to make SuperH Linux kernel
* Written by Niibe Yutaka * Written by Niibe Yutaka
*/ */
...@@ -15,121 +15,124 @@ OUTPUT_ARCH(sh) ...@@ -15,121 +15,124 @@ OUTPUT_ARCH(sh)
ENTRY(_start) ENTRY(_start)
SECTIONS SECTIONS
{ {
. = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET; . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
_text = .; /* Text and read-only data */ _text = .; /* Text and read-only data */
text = .; /* Text and read-only data */
.empty_zero_page : { .empty_zero_page : {
*(.empty_zero_page) *(.empty_zero_page)
} = 0 } = 0
.text : {
*(.text.head) .text : {
TEXT_TEXT *(.text.head)
SCHED_TEXT TEXT_TEXT
LOCK_TEXT SCHED_TEXT
*(.fixup) LOCK_TEXT
*(.gnu.warning) KPROBES_TEXT
*(.fixup)
*(.gnu.warning)
} = 0x0009 } = 0x0009
. = ALIGN(16); /* Exception table */ . = ALIGN(16); /* Exception table */
__start___ex_table = .; __start___ex_table = .;
__ex_table : { *(__ex_table) } __ex_table : { *(__ex_table) }
__stop___ex_table = .; __stop___ex_table = .;
_etext = .; /* End of text section */
_etext = .; /* End of text section */ BUG_TABLE
NOTES
RO_DATA(PAGE_SIZE)
RODATA . = ALIGN(THREAD_SIZE);
.data : { /* Data */
*(.data.init_task)
BUG_TABLE . = ALIGN(L1_CACHE_BYTES);
*(.data.cacheline_aligned)
.data : { /* Data */ . = ALIGN(L1_CACHE_BYTES);
DATA_DATA *(.data.read_mostly)
/* Align the initial ramdisk image (INITRD) on page boundaries. */ . = ALIGN(PAGE_SIZE);
. = ALIGN(PAGE_SIZE); *(.data.page_aligned)
__rd_start = .;
*(.initrd)
. = ALIGN(PAGE_SIZE);
__rd_end = .;
CONSTRUCTORS __nosave_begin = .;
*(.data.nosave)
. = ALIGN(PAGE_SIZE);
__nosave_end = .;
DATA_DATA
CONSTRUCTORS
} }
. = ALIGN(PAGE_SIZE); _edata = .; /* End of data section */
.data.page_aligned : { *(.data.page_aligned) }
__nosave_begin = .;
.data_nosave : { *(.data.nosave) }
. = ALIGN(PAGE_SIZE);
__nosave_end = .;
PERCPU(PAGE_SIZE)
. = ALIGN(L1_CACHE_BYTES);
.data.cacheline_aligned : { *(.data.cacheline_aligned) }
_edata = .; /* End of data section */
. = ALIGN(THREAD_SIZE); /* init_task */
.data.init_task : { *(.data.init_task) }
. = ALIGN(PAGE_SIZE); /* Init code and data */
__init_begin = .;
_sinittext = .;
.init.text : { *(.init.text) }
_einittext = .;
.init.data : { *(.init.data) }
. = ALIGN(16);
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
__initcall_start = .;
.initcall.init : {
INITCALLS
}
__initcall_end = .;
__con_initcall_start = .;
.con_initcall.init : { *(.con_initcall.init) }
__con_initcall_end = .;
SECURITY_INIT
/* .exit.text is discarded at runtime, not link time, to deal with
references from .rodata */
.exit.text : { *(.exit.text) }
.exit.data : { *(.exit.data) }
#ifdef CONFIG_BLK_DEV_INITRD . = ALIGN(PAGE_SIZE); /* Init code and data */
. = ALIGN(PAGE_SIZE); __init_begin = .;
_sinittext = .;
.init.text : { *(.init.text) }
_einittext = .;
.init.data : { *(.init.data) }
. = ALIGN(16);
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
__initramfs_start = .; __initcall_start = .;
.init.ramfs : { *(.init.ramfs) } .initcall.init : {
__initramfs_end = .; INITCALLS
}
__initcall_end = .;
__con_initcall_start = .;
.con_initcall.init : { *(.con_initcall.init) }
__con_initcall_end = .;
SECURITY_INIT
#ifdef CONFIG_BLK_DEV_INITRD
. = ALIGN(PAGE_SIZE);
__initramfs_start = .;
.init.ramfs : { *(.init.ramfs) }
__initramfs_end = .;
#endif #endif
. = ALIGN(4);
__machvec_start = .;
.machvec.init : { *(.machvec.init) }
__machvec_end = .;
. = ALIGN(PAGE_SIZE);
.bss : {
__init_end = .;
__bss_start = .; /* BSS */
*(.bss.page_aligned)
*(.bss)
. = ALIGN(4); . = ALIGN(4);
_ebss = .; /* uClinux MTD sucks */ __machvec_start = .;
_end = . ; .machvec.init : { *(.machvec.init) }
} __machvec_end = .;
/* When something in the kernel is NOT compiled as a module, the PERCPU(PAGE_SIZE)
* module cleanup code and data are put into these segments. Both
* can then be thrown away, as cleanup code is never called unless /*
* it's a module. * .exit.text is discarded at runtime, not link time, to deal with
*/ * references from __bug_table
/DISCARD/ : { */
*(.exitcall.exit) .exit.text : { *(.exit.text) }
.exit.data : { *(.exit.data) }
. = ALIGN(PAGE_SIZE);
.bss : {
__init_end = .;
__bss_start = .; /* BSS */
*(.bss.page_aligned)
*(.bss)
*(COMMON)
. = ALIGN(4);
_ebss = .; /* uClinux MTD sucks */
_end = . ;
} }
STABS_DEBUG /*
* When something in the kernel is NOT compiled as a module, the
* module cleanup code and data are put into these segments. Both
* can then be thrown away, as cleanup code is never called unless
* it's a module.
*/
/DISCARD/ : {
*(.exitcall.exit)
}
DWARF_DEBUG STABS_DEBUG
DWARF_DEBUG
} }
...@@ -38,7 +38,10 @@ SECTIONS ...@@ -38,7 +38,10 @@ SECTIONS
.text : { *(.text) } :text =0x90909090 .text : { *(.text) } :text =0x90909090
.note : { *(.note.*) } :text :note .note : { *(.note.*) } :text :note
.eh_frame_hdr : { *(.eh_frame_hdr ) } :text :eh_frame_hdr .eh_frame_hdr : { *(.eh_frame_hdr ) } :text :eh_frame_hdr
.eh_frame : { KEEP (*(.eh_frame)) } :text .eh_frame : {
KEEP (*(.eh_frame))
LONG (0)
} :text
.dynamic : { *(.dynamic) } :text :dynamic .dynamic : { *(.dynamic) } :text :dynamic
.useless : { .useless : {
*(.got.plt) *(.got) *(.got.plt) *(.got)
......
...@@ -255,7 +255,11 @@ EX( mov.l @r5+,r8 ) ...@@ -255,7 +255,11 @@ EX( mov.l @r5+,r8 )
EX( mov.l @r5+,r9 ) EX( mov.l @r5+,r9 )
EX( mov.l @r5+,r10 ) EX( mov.l @r5+,r10 )
EX( mov.l @r5+,r11 ) EX( mov.l @r5+,r11 )
#ifdef CONFIG_CPU_SH4
EX( movca.l r0,@r4 ) EX( movca.l r0,@r4 )
#else
EX( mov.l r0,@r4 )
#endif
add #-32, r6 add #-32, r6
EX( mov.l r1,@(4,r4) ) EX( mov.l r1,@(4,r4) )
mov #32, r0 mov #32, r0
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/notifier.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -44,8 +43,6 @@ ...@@ -44,8 +43,6 @@
*/ */
#define NR_CNTRS 2 #define NR_CNTRS 2
extern const char *get_cpu_subtype(void);
struct op_counter_config { struct op_counter_config {
unsigned long enabled; unsigned long enabled;
unsigned long event; unsigned long event;
...@@ -111,17 +108,12 @@ static struct op_counter_config ctr[NR_CNTRS]; ...@@ -111,17 +108,12 @@ static struct op_counter_config ctr[NR_CNTRS];
* behavior. * behavior.
*/ */
static int sh7750_timer_notify(struct notifier_block *self, static int sh7750_timer_notify(struct pt_regs *regs)
unsigned long val, void *regs)
{ {
oprofile_add_sample((struct pt_regs *)regs, 0); oprofile_add_sample(regs, 0);
return 0; return 0;
} }
static struct notifier_block sh7750_timer_notifier = {
.notifier_call = sh7750_timer_notify,
};
static u64 sh7750_read_counter(int counter) static u64 sh7750_read_counter(int counter)
{ {
u32 hi, lo; u32 hi, lo;
...@@ -240,7 +232,7 @@ static int sh7750_perf_counter_start(void) ...@@ -240,7 +232,7 @@ static int sh7750_perf_counter_start(void)
ctrl_outw(pmcr | PMCR_ENABLE, PMCR2); ctrl_outw(pmcr | PMCR_ENABLE, PMCR2);
} }
return register_profile_notifier(&sh7750_timer_notifier); return register_timer_hook(sh7750_timer_notify);
} }
static void sh7750_perf_counter_stop(void) static void sh7750_perf_counter_stop(void)
...@@ -248,7 +240,7 @@ static void sh7750_perf_counter_stop(void) ...@@ -248,7 +240,7 @@ static void sh7750_perf_counter_stop(void)
ctrl_outw(ctrl_inw(PMCR1) & ~PMCR_PMEN, PMCR1); ctrl_outw(ctrl_inw(PMCR1) & ~PMCR_PMEN, PMCR1);
ctrl_outw(ctrl_inw(PMCR2) & ~PMCR_PMEN, PMCR2); ctrl_outw(ctrl_inw(PMCR2) & ~PMCR_PMEN, PMCR2);
unregister_profile_notifier(&sh7750_timer_notifier); unregister_timer_hook(sh7750_timer_notify);
} }
static struct oprofile_operations sh7750_perf_counter_ops = { static struct oprofile_operations sh7750_perf_counter_ops = {
...@@ -257,13 +249,13 @@ static struct oprofile_operations sh7750_perf_counter_ops = { ...@@ -257,13 +249,13 @@ static struct oprofile_operations sh7750_perf_counter_ops = {
.stop = sh7750_perf_counter_stop, .stop = sh7750_perf_counter_stop,
}; };
int __init oprofile_arch_init(struct oprofile_operations **ops) int __init oprofile_arch_init(struct oprofile_operations *ops)
{ {
if (!(current_cpu_data.flags & CPU_HAS_PERF_COUNTER)) if (!(current_cpu_data.flags & CPU_HAS_PERF_COUNTER))
return -ENODEV; return -ENODEV;
sh7750_perf_counter_ops.cpu_type = (char *)get_cpu_subtype(); ops = &sh7750_perf_counter_ops;
*ops = &sh7750_perf_counter_ops; ops->cpu_type = (char *)get_cpu_subtype(&current_cpu_data);
printk(KERN_INFO "oprofile: using SH-4 (%s) performance monitoring.\n", printk(KERN_INFO "oprofile: using SH-4 (%s) performance monitoring.\n",
sh7750_perf_counter_ops.cpu_type); sh7750_perf_counter_ops.cpu_type);
......
# #
# List of boards. # MACH_<xxx> CONFIG_<xxx>
# #
# #
# MACH_<xxx> CONFIG_<xxx> # List of board groups.
# #
SE SH_SOLUTION_ENGINE SE SH_SOLUTION_ENGINE
7751SE SH_7751_SOLUTION_ENGINE HIGHLANDER SH_HIGHLANDER
7722SE SH_7722_SOLUTION_ENGINE RTS7751R2D SH_RTS7751R2D
7343SE SH_7343_SOLUTION_ENGINE
#
# List of companion chips / MFDs.
#
HD64461 HD64461
HD64465 HD64465
#
# List of boards.
#
7206SE SH_7206_SOLUTION_ENGINE 7206SE SH_7206_SOLUTION_ENGINE
7343SE SH_7343_SOLUTION_ENGINE
7619SE SH_7619_SOLUTION_ENGINE 7619SE SH_7619_SOLUTION_ENGINE
7722SE SH_7722_SOLUTION_ENGINE
7751SE SH_7751_SOLUTION_ENGINE
7780SE SH_7780_SOLUTION_ENGINE 7780SE SH_7780_SOLUTION_ENGINE
7751SYSTEMH SH_7751_SYSTEMH 7751SYSTEMH SH_7751_SYSTEMH
HP6XX SH_HP6XX HP6XX SH_HP6XX
HD64461 HD64461
HD64465 HD64465
DREAMCAST SH_DREAMCAST DREAMCAST SH_DREAMCAST
MPC1211 SH_MPC1211 MPC1211 SH_MPC1211
SNAPGEAR SH_SECUREEDGE5410 SNAPGEAR SH_SECUREEDGE5410
HS7751RVOIP SH_HS7751RVOIP HS7751RVOIP SH_HS7751RVOIP
RTS7751R2D SH_RTS7751R2D
EDOSK7705 SH_EDOSK7705 EDOSK7705 SH_EDOSK7705
SH4202_MICRODEV SH_SH4202_MICRODEV SH4202_MICRODEV SH_SH4202_MICRODEV
SH03 SH_SH03 SH03 SH_SH03
...@@ -32,3 +41,7 @@ TITAN SH_TITAN ...@@ -32,3 +41,7 @@ TITAN SH_TITAN
SHMIN SH_SHMIN SHMIN SH_SHMIN
7710VOIPGW SH_7710VOIPGW 7710VOIPGW SH_7710VOIPGW
LBOXRE2 SH_LBOX_RE2 LBOXRE2 SH_LBOX_RE2
X3PROTO SH_X3PROTO
MAGICPANELR2 SH_MAGIC_PANEL_R2
R2D_PLUS RTS7751R2D_PLUS
R2D_1 RTS7751R2D_1
...@@ -601,8 +601,7 @@ static int match_maple_bus_driver(struct device *devptr, ...@@ -601,8 +601,7 @@ static int match_maple_bus_driver(struct device *devptr,
return 0; return 0;
} }
static int maple_bus_uevent(struct device *dev, char **envp, static int maple_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
int num_envp, char *buffer, int buffer_size)
{ {
return 0; return 0;
} }
......
...@@ -18,9 +18,8 @@ ...@@ -18,9 +18,8 @@
#define SH_CACHE_ASSOC 8 #define SH_CACHE_ASSOC 8
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
#define SMP_CACHE_BYTES L1_CACHE_BYTES
#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) #define __read_mostly __attribute__((__section__(".data.read_mostly")))
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
struct cache_info { struct cache_info {
......
...@@ -41,7 +41,7 @@ static inline int generic_irq_demux(int irq) ...@@ -41,7 +41,7 @@ static inline int generic_irq_demux(int irq)
#define irq_canonicalize(irq) (irq) #define irq_canonicalize(irq) (irq)
#define irq_demux(irq) sh_mv.mv_irq_demux(irq) #define irq_demux(irq) sh_mv.mv_irq_demux(irq)
#ifdef CONFIG_4KSTACKS #ifdef CONFIG_IRQSTACKS
extern void irq_ctx_init(int cpu); extern void irq_ctx_init(int cpu);
extern void irq_ctx_exit(int cpu); extern void irq_ctx_exit(int cpu);
# define __ARCH_HAS_DO_SOFTIRQ # define __ARCH_HAS_DO_SOFTIRQ
......
...@@ -128,7 +128,6 @@ typedef struct { unsigned long pgd; } pgd_t; ...@@ -128,7 +128,6 @@ typedef struct { unsigned long pgd; } pgd_t;
#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
#define phys_to_page(phys) (pfn_to_page(phys >> PAGE_SHIFT))
#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
/* PFN start number, because of __MEMORY_START */ /* PFN start number, because of __MEMORY_START */
......
...@@ -399,7 +399,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte) ...@@ -399,7 +399,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
#define pmd_bad(x) (pmd_val(x) & ~PAGE_MASK) #define pmd_bad(x) (pmd_val(x) & ~PAGE_MASK)
#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
#define pte_page(x) phys_to_page(pte_val(x)&PTE_PHYS_MASK) #define pte_page(x) pfn_to_page(pte_pfn(x))
/* /*
* The following only work if pte_present() is true. * The following only work if pte_present() is true.
......
...@@ -71,7 +71,7 @@ struct sh_cpuinfo { ...@@ -71,7 +71,7 @@ struct sh_cpuinfo {
struct cache_info scache; /* Secondary cache */ struct cache_info scache; /* Secondary cache */
unsigned long flags; unsigned long flags;
} __attribute__ ((aligned(SMP_CACHE_BYTES))); } __attribute__ ((aligned(L1_CACHE_BYTES)));
extern struct sh_cpuinfo cpu_data[]; extern struct sh_cpuinfo cpu_data[];
#define boot_cpu_data cpu_data[0] #define boot_cpu_data cpu_data[0]
......
...@@ -5,6 +5,20 @@ ...@@ -5,6 +5,20 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
/*
* This is set up by the setup-routine at boot-time
*/
#define PARAM ((unsigned char *)empty_zero_page)
#define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000))
#define RAMDISK_FLAGS (*(unsigned long *) (PARAM+0x004))
#define ORIG_ROOT_DEV (*(unsigned long *) (PARAM+0x008))
#define LOADER_TYPE (*(unsigned long *) (PARAM+0x00c))
#define INITRD_START (*(unsigned long *) (PARAM+0x010))
#define INITRD_SIZE (*(unsigned long *) (PARAM+0x014))
/* ... */
#define COMMAND_LINE ((char *) (PARAM+0x100))
int setup_early_printk(char *); int setup_early_printk(char *);
void sh_mv_setup(void); void sh_mv_setup(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment