From 8ce0143b11cdc519b8e1fd94a262b654ef0bc3ab Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Tue, 19 Feb 2008 21:35:31 +0900 Subject: sh: pci io port base address code Adds a __get_pci_io_base() function which is used to match a port range against struct pci_channel. This allows us to detect if a port range is assigned to pci or happens to be legacy port io. While at it, remove unused cpu-specific cruft. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt --- arch/sh/kernel/io.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/sh/kernel') diff --git a/arch/sh/kernel/io.c b/arch/sh/kernel/io.c index 29cf4588fc0..59fb020718a 100644 --- a/arch/sh/kernel/io.c +++ b/arch/sh/kernel/io.c @@ -12,6 +12,7 @@ * for more details. */ #include +#include #include #include @@ -69,6 +70,10 @@ void __iomem *ioport_map(unsigned long port, unsigned int nr) if (ret) return ret; + ret = __get_pci_io_base(port, nr); + if (ret) + return ret; + return __ioport_map(port, nr); } EXPORT_SYMBOL(ioport_map); -- cgit v1.2.3 From 0bb34a6bf1f71d5ad2abfda582a2c2794957bc7b Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Mon, 20 Apr 2009 16:38:00 +0900 Subject: sh: pci: Consolidate pci_iomap() and use the generic I/O base. This consolidates the pci_iomap() definitions and reworks how the I/O port base is handled. PCI channels can register their own I/O map base, or if none is provided, the system-wide generic I/O base is used instead. Functionally nothing changes, while this allows us to kill off lots of I/O address special casing and lookups. Signed-off-by: Paul Mundt --- arch/sh/kernel/io.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'arch/sh/kernel') diff --git a/arch/sh/kernel/io.c b/arch/sh/kernel/io.c index 59fb020718a..4f85fffaa55 100644 --- a/arch/sh/kernel/io.c +++ b/arch/sh/kernel/io.c @@ -70,10 +70,6 @@ void __iomem *ioport_map(unsigned long port, unsigned int nr) if (ret) return ret; - ret = __get_pci_io_base(port, nr); - if (ret) - return ret; - return __ioport_map(port, nr); } EXPORT_SYMBOL(ioport_map); -- cgit v1.2.3 From bbe215c231ac809e42b037345c1fa8e8eb09b00a Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sat, 25 Apr 2009 22:11:07 -0400 Subject: sh: convert to use __HEAD and HEAD_TEXT macros. This has the consequence of changing the section name use for head code from ".text.head" to ".head.text". Since this commit changes all users in the architecture, this change should be harmless. Signed-off-by: Tim Abbott Cc: Paul Mundt Acked-by: Sam Ravnborg Signed-off-by: Linus Torvalds --- arch/sh/kernel/head_32.S | 3 ++- arch/sh/kernel/head_64.S | 5 ++++- arch/sh/kernel/vmlinux_32.lds.S | 2 +- arch/sh/kernel/vmlinux_64.lds.S | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) (limited to 'arch/sh/kernel') diff --git a/arch/sh/kernel/head_32.S b/arch/sh/kernel/head_32.S index 788605ff708..a78be74b8d3 100644 --- a/arch/sh/kernel/head_32.S +++ b/arch/sh/kernel/head_32.S @@ -10,6 +10,7 @@ * * Head.S contains the SH exception handlers and startup code. */ +#include #include #include @@ -40,7 +41,7 @@ ENTRY(empty_zero_page) 1: .skip PAGE_SIZE - empty_zero_page - 1b - .section .text.head, "ax" + __HEAD /* * Condition at the entry of _stext: diff --git a/arch/sh/kernel/head_64.S b/arch/sh/kernel/head_64.S index 7ccfb995a39..3ea765844c7 100644 --- a/arch/sh/kernel/head_64.S +++ b/arch/sh/kernel/head_64.S @@ -8,6 +8,9 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. */ + +#include + #include #include #include @@ -110,7 +113,7 @@ empty_bad_pte_table: fpu_in_use: .quad 0 - .section .text.head, "ax" + __HEAD .balign L1_CACHE_BYTES /* * Condition at the entry of __stext: diff --git a/arch/sh/kernel/vmlinux_32.lds.S b/arch/sh/kernel/vmlinux_32.lds.S index d0b2a715cd1..dd9b2ee1312 100644 --- a/arch/sh/kernel/vmlinux_32.lds.S +++ b/arch/sh/kernel/vmlinux_32.lds.S @@ -31,7 +31,7 @@ SECTIONS } = 0 .text : { - *(.text.head) + HEAD_TEXT TEXT_TEXT SCHED_TEXT LOCK_TEXT diff --git a/arch/sh/kernel/vmlinux_64.lds.S b/arch/sh/kernel/vmlinux_64.lds.S index 33fa4645140..69664460c68 100644 --- a/arch/sh/kernel/vmlinux_64.lds.S +++ b/arch/sh/kernel/vmlinux_64.lds.S @@ -42,7 +42,7 @@ SECTIONS } = 0 .text : C_PHYS(.text) { - *(.text.head) + HEAD_TEXT TEXT_TEXT *(.text64) *(.text..SHmedia32) -- cgit v1.2.3