diff options
| author | Nathan Scott <nathans@bruce> | 2006-01-11 21:34:47 -0500 |
|---|---|---|
| committer | Nathan Scott <nathans@bruce> | 2006-01-11 21:34:47 -0500 |
| commit | ddae9c2ea79449beb00027cf77fca6dc489f2d15 (patch) | |
| tree | 047c2d7c8d6cbb0721f017514e1d83a20e278d43 | |
| parent | 0d1335b3106687d87fcfa0e4d90f2a961bd7e1db (diff) | |
| parent | a4fc7ab1d065a9dd89ed0e74439ef87d4a16e980 (diff) | |
Merge HEAD from oss.sgi.com:/oss/git/linux-2.6.git
65 files changed, 406 insertions, 267 deletions
diff --git a/Documentation/cpusets.txt b/Documentation/cpusets.txt index 9e49b1c35729..990998ee10b6 100644 --- a/Documentation/cpusets.txt +++ b/Documentation/cpusets.txt | |||
| @@ -135,7 +135,7 @@ Cpusets extends these two mechanisms as follows: | |||
| 135 | The implementation of cpusets requires a few, simple hooks | 135 | The implementation of cpusets requires a few, simple hooks |
| 136 | into the rest of the kernel, none in performance critical paths: | 136 | into the rest of the kernel, none in performance critical paths: |
| 137 | 137 | ||
| 138 | - in main/init.c, to initialize the root cpuset at system boot. | 138 | - in init/main.c, to initialize the root cpuset at system boot. |
| 139 | - in fork and exit, to attach and detach a task from its cpuset. | 139 | - in fork and exit, to attach and detach a task from its cpuset. |
| 140 | - in sched_setaffinity, to mask the requested CPUs by what's | 140 | - in sched_setaffinity, to mask the requested CPUs by what's |
| 141 | allowed in that tasks cpuset. | 141 | allowed in that tasks cpuset. |
| @@ -146,7 +146,7 @@ into the rest of the kernel, none in performance critical paths: | |||
| 146 | and related changes in both sched.c and arch/ia64/kernel/domain.c | 146 | and related changes in both sched.c and arch/ia64/kernel/domain.c |
| 147 | - in the mbind and set_mempolicy system calls, to mask the requested | 147 | - in the mbind and set_mempolicy system calls, to mask the requested |
| 148 | Memory Nodes by what's allowed in that tasks cpuset. | 148 | Memory Nodes by what's allowed in that tasks cpuset. |
| 149 | - in page_alloc, to restrict memory to allowed nodes. | 149 | - in page_alloc.c, to restrict memory to allowed nodes. |
| 150 | - in vmscan.c, to restrict page recovery to the current cpuset. | 150 | - in vmscan.c, to restrict page recovery to the current cpuset. |
| 151 | 151 | ||
| 152 | In addition a new file system, of type "cpuset" may be mounted, | 152 | In addition a new file system, of type "cpuset" may be mounted, |
diff --git a/Documentation/laptop-mode.txt b/Documentation/laptop-mode.txt index dc4e810afdcd..f42e4c089356 100644 --- a/Documentation/laptop-mode.txt +++ b/Documentation/laptop-mode.txt | |||
| @@ -3,7 +3,7 @@ How to conserve battery power using laptop-mode | |||
| 3 | 3 | ||
| 4 | Document Author: Bart Samwel (bart@samwel.tk) | 4 | Document Author: Bart Samwel (bart@samwel.tk) |
| 5 | Date created: January 2, 2004 | 5 | Date created: January 2, 2004 |
| 6 | Last modified: July 10, 2004 | 6 | Last modified: December 06, 2004 |
| 7 | 7 | ||
| 8 | Introduction | 8 | Introduction |
| 9 | ------------ | 9 | ------------ |
| @@ -33,7 +33,7 @@ or anything. Simply install all the files included in this document, and | |||
| 33 | laptop mode will automatically be started when you're on battery. For | 33 | laptop mode will automatically be started when you're on battery. For |
| 34 | your convenience, a tarball containing an installer can be downloaded at: | 34 | your convenience, a tarball containing an installer can be downloaded at: |
| 35 | 35 | ||
| 36 | http://www.xs4all.nl/~bsamwel/laptop_mode/tools | 36 | http://www.xs4all.nl/~bsamwel/laptop_mode/tools/ |
| 37 | 37 | ||
| 38 | To configure laptop mode, you need to edit the configuration file, which is | 38 | To configure laptop mode, you need to edit the configuration file, which is |
| 39 | located in /etc/default/laptop-mode on Debian-based systems, or in | 39 | located in /etc/default/laptop-mode on Debian-based systems, or in |
| @@ -912,7 +912,7 @@ void usage() | |||
| 912 | exit(0); | 912 | exit(0); |
| 913 | } | 913 | } |
| 914 | 914 | ||
| 915 | int main(int ac, char **av) | 915 | int main(int argc, char **argv) |
| 916 | { | 916 | { |
| 917 | int fd; | 917 | int fd; |
| 918 | char *disk = 0; | 918 | char *disk = 0; |
diff --git a/MAINTAINERS b/MAINTAINERS index 090e10b65b09..b6416a293ec9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -2487,7 +2487,7 @@ P: Paul Mundt | |||
| 2487 | M: lethal@linux-sh.org | 2487 | M: lethal@linux-sh.org |
| 2488 | P: Kazumoto Kojima | 2488 | P: Kazumoto Kojima |
| 2489 | M: kkojima@rr.iij4u.or.jp | 2489 | M: kkojima@rr.iij4u.or.jp |
| 2490 | L: linux-sh@m17n.org | 2490 | L: linuxsh-dev@lists.sourceforge.net |
| 2491 | W: http://www.linux-sh.org | 2491 | W: http://www.linux-sh.org |
| 2492 | W: http://www.m17n.org/linux-sh/ | 2492 | W: http://www.m17n.org/linux-sh/ |
| 2493 | W: http://www.rr.iij4u.or.jp/~kkojima/linux-sh4.html | 2493 | W: http://www.rr.iij4u.or.jp/~kkojima/linux-sh4.html |
diff --git a/arch/i386/boot/Makefile b/arch/i386/boot/Makefile index 0fea75dd4e31..f136752563b1 100644 --- a/arch/i386/boot/Makefile +++ b/arch/i386/boot/Makefile | |||
| @@ -101,4 +101,4 @@ zlilo: $(BOOTIMAGE) | |||
| 101 | if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi | 101 | if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi |
| 102 | 102 | ||
| 103 | install: | 103 | install: |
| 104 | sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)" | 104 | sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)" |
diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c index e8a53552b13d..d0cadb33b54c 100644 --- a/arch/i386/mm/pageattr.c +++ b/arch/i386/mm/pageattr.c | |||
| @@ -224,7 +224,7 @@ void kernel_map_pages(struct page *page, int numpages, int enable) | |||
| 224 | return; | 224 | return; |
| 225 | if (!enable) | 225 | if (!enable) |
| 226 | mutex_debug_check_no_locks_freed(page_address(page), | 226 | mutex_debug_check_no_locks_freed(page_address(page), |
| 227 | page_address(page+numpages)); | 227 | numpages * PAGE_SIZE); |
| 228 | 228 | ||
| 229 | /* the return value is ignored - the calls cannot fail, | 229 | /* the return value is ignored - the calls cannot fail, |
| 230 | * large pages are disabled at boot time. | 230 | * large pages are disabled at boot time. |
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index a065349aee37..d8a4ca021aac 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c | |||
| @@ -29,9 +29,9 @@ | |||
| 29 | #include <asm/processor.h> | 29 | #include <asm/processor.h> |
| 30 | #include <asm/sections.h> | 30 | #include <asm/sections.h> |
| 31 | 31 | ||
| 32 | int split_tlb; | 32 | int split_tlb __read_mostly; |
| 33 | int dcache_stride; | 33 | int dcache_stride __read_mostly; |
| 34 | int icache_stride; | 34 | int icache_stride __read_mostly; |
| 35 | EXPORT_SYMBOL(dcache_stride); | 35 | EXPORT_SYMBOL(dcache_stride); |
| 36 | 36 | ||
| 37 | 37 | ||
| @@ -45,29 +45,29 @@ DEFINE_SPINLOCK(pa_tlb_lock); | |||
| 45 | EXPORT_SYMBOL(pa_tlb_lock); | 45 | EXPORT_SYMBOL(pa_tlb_lock); |
| 46 | #endif | 46 | #endif |
| 47 | 47 | ||
| 48 | struct pdc_cache_info cache_info; | 48 | struct pdc_cache_info cache_info __read_mostly; |
| 49 | #ifndef CONFIG_PA20 | 49 | #ifndef CONFIG_PA20 |
| 50 | static struct pdc_btlb_info btlb_info; | 50 | static struct pdc_btlb_info btlb_info __read_mostly; |
| 51 | #endif | 51 | #endif |
| 52 | 52 | ||
| 53 | #ifdef CONFIG_SMP | 53 | #ifdef CONFIG_SMP |
| 54 | void | 54 | void |
| 55 | flush_data_cache(void) | 55 | flush_data_cache(void) |
| 56 | { | 56 | { |
| 57 | on_each_cpu((void (*)(void *))flush_data_cache_local, NULL, 1, 1); | 57 | on_each_cpu(flush_data_cache_local, NULL, 1, 1); |
| 58 | } | 58 | } |
| 59 | void | 59 | void |
| 60 | flush_instruction_cache(void) | 60 | flush_instruction_cache(void) |
| 61 | { | 61 | { |
| 62 | on_each_cpu((void (*)(void *))flush_instruction_cache_local, NULL, 1, 1); | 62 | on_each_cpu(flush_instruction_cache_local, NULL, 1, 1); |
| 63 | } | 63 | } |
| 64 | #endif | 64 | #endif |
| 65 | 65 | ||
| 66 | void | 66 | void |
| 67 | flush_cache_all_local(void) | 67 | flush_cache_all_local(void) |
| 68 | { | 68 | { |
| 69 | flush_instruction_cache_local(); | 69 | flush_instruction_cache_local(NULL); |
| 70 | flush_data_cache_local(); | 70 | flush_data_cache_local(NULL); |
| 71 | } | 71 | } |
| 72 | EXPORT_SYMBOL(flush_cache_all_local); | 72 | EXPORT_SYMBOL(flush_cache_all_local); |
| 73 | 73 | ||
| @@ -332,7 +332,7 @@ void clear_user_page_asm(void *page, unsigned long vaddr) | |||
| 332 | } | 332 | } |
| 333 | 333 | ||
| 334 | #define FLUSH_THRESHOLD 0x80000 /* 0.5MB */ | 334 | #define FLUSH_THRESHOLD 0x80000 /* 0.5MB */ |
| 335 | int parisc_cache_flush_threshold = FLUSH_THRESHOLD; | 335 | int parisc_cache_flush_threshold __read_mostly = FLUSH_THRESHOLD; |
| 336 | 336 | ||
| 337 | void parisc_setup_cache_timing(void) | 337 | void parisc_setup_cache_timing(void) |
| 338 | { | 338 | { |
diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c index d016d672ec2b..1eaa0d37f677 100644 --- a/arch/parisc/kernel/drivers.c +++ b/arch/parisc/kernel/drivers.c | |||
| @@ -39,7 +39,7 @@ | |||
| 39 | #include <asm/parisc-device.h> | 39 | #include <asm/parisc-device.h> |
| 40 | 40 | ||
| 41 | /* See comments in include/asm-parisc/pci.h */ | 41 | /* See comments in include/asm-parisc/pci.h */ |
| 42 | struct hppa_dma_ops *hppa_dma_ops; | 42 | struct hppa_dma_ops *hppa_dma_ops __read_mostly; |
| 43 | EXPORT_SYMBOL(hppa_dma_ops); | 43 | EXPORT_SYMBOL(hppa_dma_ops); |
| 44 | 44 | ||
| 45 | static struct device root = { | 45 | static struct device root = { |
| @@ -515,8 +515,13 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path) | |||
| 515 | (iodc_data[5] << 8) | iodc_data[6]; | 515 | (iodc_data[5] << 8) | iodc_data[6]; |
| 516 | dev->hpa.name = parisc_pathname(dev); | 516 | dev->hpa.name = parisc_pathname(dev); |
| 517 | dev->hpa.start = hpa; | 517 | dev->hpa.start = hpa; |
| 518 | if (hpa == 0xf4000000 || hpa == 0xf6000000 || | 518 | /* This is awkward. The STI spec says that gfx devices may occupy |
| 519 | hpa == 0xf8000000 || hpa == 0xfa000000) { | 519 | * 32MB or 64MB. Unfortunately, we don't know how to tell whether |
| 520 | * it's the former or the latter. Assumptions either way can hurt us. | ||
| 521 | */ | ||
| 522 | if (hpa == 0xf4000000 || hpa == 0xf8000000) { | ||
| 523 | dev->hpa.end = hpa + 0x03ffffff; | ||
| 524 | } else if (hpa == 0xf6000000 || hpa == 0xfa000000) { | ||
| 520 | dev->hpa.end = hpa + 0x01ffffff; | 525 | dev->hpa.end = hpa + 0x01ffffff; |
| 521 | } else { | 526 | } else { |
| 522 | dev->hpa.end = hpa + 0xfff; | 527 | dev->hpa.end = hpa + 0xfff; |
| @@ -834,7 +839,7 @@ static void print_parisc_device(struct parisc_device *dev) | |||
| 834 | 839 | ||
| 835 | if (dev->num_addrs) { | 840 | if (dev->num_addrs) { |
| 836 | int k; | 841 | int k; |
| 837 | printk(", additional addresses: "); | 842 | printk(", additional addresses: "); |
| 838 | for (k = 0; k < dev->num_addrs; k++) | 843 | for (k = 0; k < dev->num_addrs; k++) |
| 839 | printk("0x%lx ", dev->addr[k]); | 844 | printk("0x%lx ", dev->addr[k]); |
| 840 | } | 845 | } |
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index 553f8fe03224..2dc06b8e1817 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c | |||
| @@ -80,7 +80,7 @@ static unsigned long pdc_result2[32] __attribute__ ((aligned (8))); | |||
| 80 | 80 | ||
| 81 | /* Firmware needs to be initially set to narrow to determine the | 81 | /* Firmware needs to be initially set to narrow to determine the |
| 82 | * actual firmware width. */ | 82 | * actual firmware width. */ |
| 83 | int parisc_narrow_firmware = 1; | 83 | int parisc_narrow_firmware __read_mostly = 1; |
| 84 | #endif | 84 | #endif |
| 85 | 85 | ||
| 86 | /* On most currently-supported platforms, IODC I/O calls are 32-bit calls | 86 | /* On most currently-supported platforms, IODC I/O calls are 32-bit calls |
diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c index 2071b5bba15c..3058bffd8a2c 100644 --- a/arch/parisc/kernel/hardware.c +++ b/arch/parisc/kernel/hardware.c | |||
| @@ -551,6 +551,7 @@ static struct hp_hardware hp_hardware_list[] __initdata = { | |||
| 551 | {HPHW_BCPORT, 0x804, 0x0000C, 0x10, "REO I/O BC Merced Port"}, | 551 | {HPHW_BCPORT, 0x804, 0x0000C, 0x10, "REO I/O BC Merced Port"}, |
| 552 | {HPHW_BCPORT, 0x782, 0x0000C, 0x00, "REO I/O BC Ropes Port"}, | 552 | {HPHW_BCPORT, 0x782, 0x0000C, 0x00, "REO I/O BC Ropes Port"}, |
| 553 | {HPHW_BCPORT, 0x784, 0x0000C, 0x00, "Pluto I/O BC Ropes Port"}, | 553 | {HPHW_BCPORT, 0x784, 0x0000C, 0x00, "Pluto I/O BC Ropes Port"}, |
| 554 | {HPHW_BRIDGE, 0x05D, 0x0000A, 0x00, "SummitHawk Dino PCI Bridge"}, | ||
| 554 | {HPHW_BRIDGE, 0x680, 0x0000A, 0x00, "Dino PCI Bridge"}, | 555 | {HPHW_BRIDGE, 0x680, 0x0000A, 0x00, "Dino PCI Bridge"}, |
| 555 | {HPHW_BRIDGE, 0x682, 0x0000A, 0x00, "Cujo PCI Bridge"}, | 556 | {HPHW_BRIDGE, 0x682, 0x0000A, 0x00, "Cujo PCI Bridge"}, |
| 556 | {HPHW_BRIDGE, 0x782, 0x0000A, 0x00, "Elroy PCI Bridge"}, | 557 | {HPHW_BRIDGE, 0x782, 0x0000A, 0x00, "Elroy PCI Bridge"}, |
diff --git a/arch/parisc/kernel/inventory.c b/arch/parisc/kernel/inventory.c index 8f563871e83c..4e847ba53180 100644 --- a/arch/parisc/kernel/inventory.c +++ b/arch/parisc/kernel/inventory.c | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | */ | 38 | */ |
| 39 | #undef DEBUG_PAT | 39 | #undef DEBUG_PAT |
| 40 | 40 | ||
| 41 | int pdc_type = PDC_TYPE_ILLEGAL; | 41 | int pdc_type __read_mostly = PDC_TYPE_ILLEGAL; |
| 42 | 42 | ||
| 43 | void __init setup_pdc(void) | 43 | void __init setup_pdc(void) |
| 44 | { | 44 | { |
| @@ -120,8 +120,8 @@ set_pmem_entry(physmem_range_t *pmem_ptr, unsigned long start, | |||
| 120 | * pdc info is bad in this case). | 120 | * pdc info is bad in this case). |
| 121 | */ | 121 | */ |
| 122 | 122 | ||
| 123 | if ( ((start & (PAGE_SIZE - 1)) != 0) | 123 | if (unlikely( ((start & (PAGE_SIZE - 1)) != 0) |
| 124 | || ((pages4k & ((1UL << PDC_PAGE_ADJ_SHIFT) - 1)) != 0) ) { | 124 | || ((pages4k & ((1UL << PDC_PAGE_ADJ_SHIFT) - 1)) != 0) )) { |
| 125 | 125 | ||
| 126 | panic("Memory range doesn't align with page size!\n"); | 126 | panic("Memory range doesn't align with page size!\n"); |
| 127 | } | 127 | } |
diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c index f94a02ef3d95..a6caf1073085 100644 --- a/arch/parisc/kernel/pci-dma.c +++ b/arch/parisc/kernel/pci-dma.c | |||
| @@ -33,10 +33,10 @@ | |||
| 33 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
| 34 | #include <asm/tlbflush.h> /* for purge_tlb_*() macros */ | 34 | #include <asm/tlbflush.h> /* for purge_tlb_*() macros */ |
| 35 | 35 | ||
| 36 | static struct proc_dir_entry * proc_gsc_root = NULL; | 36 | static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL; |
| 37 | static int pcxl_proc_info(char *buffer, char **start, off_t offset, int length); | 37 | static int pcxl_proc_info(char *buffer, char **start, off_t offset, int length); |
| 38 | static unsigned long pcxl_used_bytes = 0; | 38 | static unsigned long pcxl_used_bytes __read_mostly = 0; |
| 39 | static unsigned long pcxl_used_pages = 0; | 39 | static unsigned long pcxl_used_pages __read_mostly = 0; |
| 40 | 40 | ||
| 41 | extern unsigned long pcxl_dma_start; /* Start of pcxl dma mapping area */ | 41 | extern unsigned long pcxl_dma_start; /* Start of pcxl dma mapping area */ |
| 42 | static spinlock_t pcxl_res_lock; | 42 | static spinlock_t pcxl_res_lock; |
diff --git a/arch/parisc/kernel/pdc_chassis.c b/arch/parisc/kernel/pdc_chassis.c index 52004ae28d20..2a01fe1bdc98 100644 --- a/arch/parisc/kernel/pdc_chassis.c +++ b/arch/parisc/kernel/pdc_chassis.c | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
| 31 | #include <linux/reboot.h> | 31 | #include <linux/reboot.h> |
| 32 | #include <linux/notifier.h> | 32 | #include <linux/notifier.h> |
| 33 | #include <linux/cache.h> | ||
| 33 | 34 | ||
| 34 | #include <asm/pdc_chassis.h> | 35 | #include <asm/pdc_chassis.h> |
| 35 | #include <asm/processor.h> | 36 | #include <asm/processor.h> |
| @@ -38,8 +39,8 @@ | |||
| 38 | 39 | ||
| 39 | 40 | ||
| 40 | #ifdef CONFIG_PDC_CHASSIS | 41 | #ifdef CONFIG_PDC_CHASSIS |
| 41 | static int pdc_chassis_old = 0; | 42 | static int pdc_chassis_old __read_mostly = 0; |
| 42 | static unsigned int pdc_chassis_enabled = 1; | 43 | static unsigned int pdc_chassis_enabled __read_mostly = 1; |
| 43 | 44 | ||
| 44 | 45 | ||
| 45 | /** | 46 | /** |
| @@ -132,7 +133,7 @@ void __init parisc_pdc_chassis_init(void) | |||
| 132 | { | 133 | { |
| 133 | #ifdef CONFIG_PDC_CHASSIS | 134 | #ifdef CONFIG_PDC_CHASSIS |
| 134 | int handle = 0; | 135 | int handle = 0; |
| 135 | if (pdc_chassis_enabled) { | 136 | if (likely(pdc_chassis_enabled)) { |
| 136 | DPRINTK(KERN_DEBUG "%s: parisc_pdc_chassis_init()\n", __FILE__); | 137 | DPRINTK(KERN_DEBUG "%s: parisc_pdc_chassis_init()\n", __FILE__); |
| 137 | 138 | ||
| 138 | /* Let see if we have something to handle... */ | 139 | /* Let see if we have something to handle... */ |
| @@ -142,7 +143,7 @@ void __init parisc_pdc_chassis_init(void) | |||
| 142 | printk(KERN_INFO "Enabling PDC_PAT chassis codes support.\n"); | 143 | printk(KERN_INFO "Enabling PDC_PAT chassis codes support.\n"); |
| 143 | handle = 1; | 144 | handle = 1; |
| 144 | } | 145 | } |
| 145 | else if (pdc_chassis_old) { | 146 | else if (unlikely(pdc_chassis_old)) { |
| 146 | printk(KERN_INFO "Enabling old style chassis LED panel support.\n"); | 147 | printk(KERN_INFO "Enabling old style chassis LED panel support.\n"); |
| 147 | handle = 1; | 148 | handle = 1; |
| 148 | } | 149 | } |
| @@ -178,7 +179,7 @@ int pdc_chassis_send_status(int message) | |||
| 178 | /* Maybe we should do that in an other way ? */ | 179 | /* Maybe we should do that in an other way ? */ |
| 179 | int retval = 0; | 180 | int retval = 0; |
| 180 | #ifdef CONFIG_PDC_CHASSIS | 181 | #ifdef CONFIG_PDC_CHASSIS |
| 181 | if (pdc_chassis_enabled) { | 182 | if (likely(pdc_chassis_enabled)) { |
| 182 | 183 | ||
| 183 | DPRINTK(KERN_DEBUG "%s: pdc_chassis_send_status(%d)\n", __FILE__, message); | 184 | DPRINTK(KERN_DEBUG "%s: pdc_chassis_send_status(%d)\n", __FILE__, message); |
| 184 | 185 | ||
| @@ -214,7 +215,7 @@ int pdc_chassis_send_status(int message) | |||
| 214 | } | 215 | } |
| 215 | } else retval = -1; | 216 | } else retval = -1; |
| 216 | #else | 217 | #else |
| 217 | if (pdc_chassis_old) { | 218 | if (unlikely(pdc_chassis_old)) { |
| 218 | switch (message) { | 219 | switch (message) { |
| 219 | case PDC_CHASSIS_DIRECT_BSTART: | 220 | case PDC_CHASSIS_DIRECT_BSTART: |
| 220 | case PDC_CHASSIS_DIRECT_BCOMPLETE: | 221 | case PDC_CHASSIS_DIRECT_BCOMPLETE: |
diff --git a/arch/parisc/kernel/perf.c b/arch/parisc/kernel/perf.c index f6fec62b6a2f..79dcbcccecb8 100644 --- a/arch/parisc/kernel/perf.c +++ b/arch/parisc/kernel/perf.c | |||
| @@ -66,10 +66,10 @@ struct rdr_tbl_ent { | |||
| 66 | uint8_t write_control; | 66 | uint8_t write_control; |
| 67 | }; | 67 | }; |
| 68 | 68 | ||
| 69 | static int perf_processor_interface = UNKNOWN_INTF; | 69 | static int perf_processor_interface __read_mostly = UNKNOWN_INTF; |
| 70 | static int perf_enabled = 0; | 70 | static int perf_enabled __read_mostly = 0; |
| 71 | static spinlock_t perf_lock; | 71 | static spinlock_t perf_lock; |
| 72 | struct parisc_device *cpu_device = NULL; | 72 | struct parisc_device *cpu_device __read_mostly = NULL; |
| 73 | 73 | ||
| 74 | /* RDRs to write for PCX-W */ | 74 | /* RDRs to write for PCX-W */ |
| 75 | static int perf_rdrs_W[] = | 75 | static int perf_rdrs_W[] = |
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index fee4f1f09adc..4eb70a40ec7e 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
| @@ -54,7 +54,7 @@ | |||
| 54 | #include <asm/uaccess.h> | 54 | #include <asm/uaccess.h> |
| 55 | #include <asm/unwind.h> | 55 | #include <asm/unwind.h> |
| 56 | 56 | ||
| 57 | static int hlt_counter; | 57 | static int hlt_counter __read_mostly; |
| 58 | 58 | ||
| 59 | /* | 59 | /* |
| 60 | * Power off function, if any | 60 | * Power off function, if any |
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c index 4f5bbcf1f5a4..6df9f62cecb5 100644 --- a/arch/parisc/kernel/processor.c +++ b/arch/parisc/kernel/processor.c | |||
| @@ -44,10 +44,10 @@ | |||
| 44 | #include <asm/irq.h> /* for struct irq_region */ | 44 | #include <asm/irq.h> /* for struct irq_region */ |
| 45 | #include <asm/parisc-device.h> | 45 | #include <asm/parisc-device.h> |
| 46 | 46 | ||
| 47 | struct system_cpuinfo_parisc boot_cpu_data; | 47 | struct system_cpuinfo_parisc boot_cpu_data __read_mostly; |
| 48 | EXPORT_SYMBOL(boot_cpu_data); | 48 | EXPORT_SYMBOL(boot_cpu_data); |
| 49 | 49 | ||
| 50 | struct cpuinfo_parisc cpu_data[NR_CPUS]; | 50 | struct cpuinfo_parisc cpu_data[NR_CPUS] __read_mostly; |
| 51 | 51 | ||
| 52 | /* | 52 | /* |
| 53 | ** PARISC CPU driver - claim "device" and initialize CPU data structures. | 53 | ** PARISC CPU driver - claim "device" and initialize CPU data structures. |
| @@ -378,12 +378,12 @@ show_cpuinfo (struct seq_file *m, void *v) | |||
| 378 | return 0; | 378 | return 0; |
| 379 | } | 379 | } |
| 380 | 380 | ||
| 381 | static struct parisc_device_id processor_tbl[] = { | 381 | static struct parisc_device_id processor_tbl[] __read_mostly = { |
| 382 | { HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID }, | 382 | { HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID }, |
| 383 | { 0, } | 383 | { 0, } |
| 384 | }; | 384 | }; |
| 385 | 385 | ||
| 386 | static struct parisc_driver cpu_driver = { | 386 | static struct parisc_driver cpu_driver __read_mostly = { |
| 387 | .name = "CPU", | 387 | .name = "CPU", |
| 388 | .id_table = processor_tbl, | 388 | .id_table = processor_tbl, |
| 389 | .probe = processor_probe | 389 | .probe = processor_probe |
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c index 73e9c34b0948..4a36ec3f6ac1 100644 --- a/arch/parisc/kernel/setup.c +++ b/arch/parisc/kernel/setup.c | |||
| @@ -46,15 +46,15 @@ | |||
| 46 | #include <asm/io.h> | 46 | #include <asm/io.h> |
| 47 | #include <asm/setup.h> | 47 | #include <asm/setup.h> |
| 48 | 48 | ||
| 49 | char command_line[COMMAND_LINE_SIZE]; | 49 | char command_line[COMMAND_LINE_SIZE] __read_mostly; |
| 50 | 50 | ||
| 51 | /* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */ | 51 | /* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */ |
| 52 | struct proc_dir_entry * proc_runway_root = NULL; | 52 | struct proc_dir_entry * proc_runway_root __read_mostly = NULL; |
| 53 | struct proc_dir_entry * proc_gsc_root = NULL; | 53 | struct proc_dir_entry * proc_gsc_root __read_mostly = NULL; |
| 54 | struct proc_dir_entry * proc_mckinley_root = NULL; | 54 | struct proc_dir_entry * proc_mckinley_root __read_mostly = NULL; |
| 55 | 55 | ||
| 56 | #if !defined(CONFIG_PA20) && (defined(CONFIG_IOMMU_CCIO) || defined(CONFIG_IOMMU_SBA)) | 56 | #if !defined(CONFIG_PA20) && (defined(CONFIG_IOMMU_CCIO) || defined(CONFIG_IOMMU_SBA)) |
| 57 | int parisc_bus_is_phys = 1; /* Assume no IOMMU is present */ | 57 | int parisc_bus_is_phys __read_mostly = 1; /* Assume no IOMMU is present */ |
| 58 | EXPORT_SYMBOL(parisc_bus_is_phys); | 58 | EXPORT_SYMBOL(parisc_bus_is_phys); |
| 59 | #endif | 59 | #endif |
| 60 | 60 | ||
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index ce89da0f654d..17f23c26f1ca 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
| @@ -39,7 +39,7 @@ | |||
| 39 | #include <asm/atomic.h> | 39 | #include <asm/atomic.h> |
| 40 | #include <asm/current.h> | 40 | #include <asm/current.h> |
| 41 | #include <asm/delay.h> | 41 | #include <asm/delay.h> |
| 42 | #include <asm/pgalloc.h> /* for flush_tlb_all() proto/macro */ | 42 | #include <asm/tlbflush.h> |
| 43 | 43 | ||
| 44 | #include <asm/io.h> | 44 | #include <asm/io.h> |
| 45 | #include <asm/irq.h> /* for CPU_IRQ_REGION and friends */ | 45 | #include <asm/irq.h> /* for CPU_IRQ_REGION and friends */ |
| @@ -58,9 +58,9 @@ DEFINE_SPINLOCK(smp_lock); | |||
| 58 | 58 | ||
| 59 | volatile struct task_struct *smp_init_current_idle_task; | 59 | volatile struct task_struct *smp_init_current_idle_task; |
| 60 | 60 | ||
| 61 | static volatile int cpu_now_booting = 0; /* track which CPU is booting */ | 61 | static volatile int cpu_now_booting __read_mostly = 0; /* track which CPU is booting */ |
| 62 | 62 | ||
| 63 | static int parisc_max_cpus = 1; | 63 | static int parisc_max_cpus __read_mostly = 1; |
| 64 | 64 | ||
| 65 | /* online cpus are ones that we've managed to bring up completely | 65 | /* online cpus are ones that we've managed to bring up completely |
| 66 | * possible cpus are all valid cpu | 66 | * possible cpus are all valid cpu |
| @@ -71,8 +71,8 @@ static int parisc_max_cpus = 1; | |||
| 71 | * empty in the beginning. | 71 | * empty in the beginning. |
| 72 | */ | 72 | */ |
| 73 | 73 | ||
| 74 | cpumask_t cpu_online_map = CPU_MASK_NONE; /* Bitmap of online CPUs */ | 74 | cpumask_t cpu_online_map __read_mostly = CPU_MASK_NONE; /* Bitmap of online CPUs */ |
| 75 | cpumask_t cpu_possible_map = CPU_MASK_ALL; /* Bitmap of Present CPUs */ | 75 | cpumask_t cpu_possible_map __read_mostly = CPU_MASK_ALL; /* Bitmap of Present CPUs */ |
| 76 | 76 | ||
| 77 | EXPORT_SYMBOL(cpu_online_map); | 77 | EXPORT_SYMBOL(cpu_online_map); |
| 78 | EXPORT_SYMBOL(cpu_possible_map); | 78 | EXPORT_SYMBOL(cpu_possible_map); |
| @@ -406,12 +406,10 @@ EXPORT_SYMBOL(smp_call_function); | |||
| 406 | * as we want to ensure all TLB's flushed before proceeding. | 406 | * as we want to ensure all TLB's flushed before proceeding. |
| 407 | */ | 407 | */ |
| 408 | 408 | ||
| 409 | extern void flush_tlb_all_local(void); | ||
| 410 | |||
| 411 | void | 409 | void |
| 412 | smp_flush_tlb_all(void) | 410 | smp_flush_tlb_all(void) |
| 413 | { | 411 | { |
| 414 | on_each_cpu((void (*)(void *))flush_tlb_all_local, NULL, 1, 1); | 412 | on_each_cpu(flush_tlb_all_local, NULL, 1, 1); |
| 415 | } | 413 | } |
| 416 | 414 | ||
| 417 | 415 | ||
| @@ -487,7 +485,7 @@ void __init smp_callin(void) | |||
| 487 | #endif | 485 | #endif |
| 488 | 486 | ||
| 489 | flush_cache_all_local(); /* start with known state */ | 487 | flush_cache_all_local(); /* start with known state */ |
| 490 | flush_tlb_all_local(); | 488 | flush_tlb_all_local(NULL); |
| 491 | 489 | ||
| 492 | local_irq_enable(); /* Interrupts have been off until now */ | 490 | local_irq_enable(); /* Interrupts have been off until now */ |
| 493 | 491 | ||
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index cded25680787..594930bc4bcf 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c | |||
| @@ -36,8 +36,8 @@ | |||
| 36 | /* xtime and wall_jiffies keep wall-clock time */ | 36 | /* xtime and wall_jiffies keep wall-clock time */ |
| 37 | extern unsigned long wall_jiffies; | 37 | extern unsigned long wall_jiffies; |
| 38 | 38 | ||
| 39 | static long clocktick; /* timer cycles per tick */ | 39 | static long clocktick __read_mostly; /* timer cycles per tick */ |
| 40 | static long halftick; | 40 | static long halftick __read_mostly; |
| 41 | 41 | ||
| 42 | #ifdef CONFIG_SMP | 42 | #ifdef CONFIG_SMP |
| 43 | extern void smp_do_timer(struct pt_regs *regs); | 43 | extern void smp_do_timer(struct pt_regs *regs); |
diff --git a/arch/parisc/kernel/topology.c b/arch/parisc/kernel/topology.c index ac2a40681414..3ba040050e4c 100644 --- a/arch/parisc/kernel/topology.c +++ b/arch/parisc/kernel/topology.c | |||
| @@ -20,8 +20,9 @@ | |||
| 20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
| 21 | #include <linux/smp.h> | 21 | #include <linux/smp.h> |
| 22 | #include <linux/cpu.h> | 22 | #include <linux/cpu.h> |
| 23 | #include <linux/cache.h> | ||
| 23 | 24 | ||
| 24 | static struct cpu cpu_devices[NR_CPUS]; | 25 | static struct cpu cpu_devices[NR_CPUS] __read_mostly; |
| 25 | 26 | ||
| 26 | static int __init topology_init(void) | 27 | static int __init topology_init(void) |
| 27 | { | 28 | { |
diff --git a/arch/parisc/kernel/unaligned.c b/arch/parisc/kernel/unaligned.c index eaae8a021f9f..de0a1b21cb40 100644 --- a/arch/parisc/kernel/unaligned.c +++ b/arch/parisc/kernel/unaligned.c | |||
| @@ -122,7 +122,7 @@ | |||
| 122 | #define ERR_NOTHANDLED -1 | 122 | #define ERR_NOTHANDLED -1 |
| 123 | #define ERR_PAGEFAULT -2 | 123 | #define ERR_PAGEFAULT -2 |
| 124 | 124 | ||
| 125 | int unaligned_enabled = 1; | 125 | int unaligned_enabled __read_mostly = 1; |
| 126 | 126 | ||
| 127 | void die_if_kernel (char *str, struct pt_regs *regs, long err); | 127 | void die_if_kernel (char *str, struct pt_regs *regs, long err); |
| 128 | 128 | ||
diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c index db141108412e..cc1c1afc3187 100644 --- a/arch/parisc/kernel/unwind.c +++ b/arch/parisc/kernel/unwind.c | |||
| @@ -35,7 +35,7 @@ static spinlock_t unwind_lock; | |||
| 35 | * we can call unwind_init as early in the bootup process as | 35 | * we can call unwind_init as early in the bootup process as |
| 36 | * possible (before the slab allocator is initialized) | 36 | * possible (before the slab allocator is initialized) |
| 37 | */ | 37 | */ |
| 38 | static struct unwind_table kernel_unwind_table; | 38 | static struct unwind_table kernel_unwind_table __read_mostly; |
| 39 | static LIST_HEAD(unwind_tables); | 39 | static LIST_HEAD(unwind_tables); |
| 40 | 40 | ||
| 41 | static inline const struct unwind_table_entry * | 41 | static inline const struct unwind_table_entry * |
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S index e5fac3e08c7a..6d6436a6b624 100644 --- a/arch/parisc/kernel/vmlinux.lds.S +++ b/arch/parisc/kernel/vmlinux.lds.S | |||
| @@ -68,7 +68,7 @@ SECTIONS | |||
| 68 | RODATA | 68 | RODATA |
| 69 | 69 | ||
| 70 | /* writeable */ | 70 | /* writeable */ |
| 71 | . = ALIGN(4096); /* Make sure this is paged aligned so | 71 | . = ALIGN(4096); /* Make sure this is page aligned so |
| 72 | that we can properly leave these | 72 | that we can properly leave these |
| 73 | as writable */ | 73 | as writable */ |
| 74 | data_start = .; | 74 | data_start = .; |
| @@ -105,6 +105,10 @@ SECTIONS | |||
| 105 | . = ALIGN(16); | 105 | . = ALIGN(16); |
| 106 | .data.lock_aligned : { *(.data.lock_aligned) } | 106 | .data.lock_aligned : { *(.data.lock_aligned) } |
| 107 | 107 | ||
| 108 | /* rarely changed data like cpu maps */ | ||
| 109 | . = ALIGN(16); | ||
| 110 | .data.read_mostly : { *(.data.read_mostly) } | ||
| 111 | |||
| 108 | _edata = .; /* End of data section */ | 112 | _edata = .; /* End of data section */ |
| 109 | 113 | ||
| 110 | . = ALIGN(16384); /* init_task */ | 114 | . = ALIGN(16384); /* init_task */ |
| @@ -194,14 +198,7 @@ SECTIONS | |||
| 194 | #endif | 198 | #endif |
| 195 | } | 199 | } |
| 196 | 200 | ||
| 197 | /* Stabs debugging sections. */ | 201 | STABS_DEBUG |
| 198 | .stab 0 : { *(.stab) } | ||
| 199 | .stabstr 0 : { *(.stabstr) } | ||
| 200 | .stab.excl 0 : { *(.stab.excl) } | ||
| 201 | .stab.exclstr 0 : { *(.stab.exclstr) } | ||
| 202 | .stab.index 0 : { *(.stab.index) } | ||
| 203 | .stab.indexstr 0 : { *(.stab.indexstr) } | ||
| 204 | .comment 0 : { *(.comment) } | ||
| 205 | .note 0 : { *(.note) } | 202 | .note 0 : { *(.note) } |
| 206 | 203 | ||
| 207 | } | 204 | } |
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 29b998e430e6..720287d46e55 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
| @@ -36,9 +36,9 @@ extern char _end; /* end of BSS, defined by linker */ | |||
| 36 | extern char __init_begin, __init_end; | 36 | extern char __init_begin, __init_end; |
| 37 | 37 | ||
| 38 | #ifdef CONFIG_DISCONTIGMEM | 38 | #ifdef CONFIG_DISCONTIGMEM |
| 39 | struct node_map_data node_data[MAX_NUMNODES]; | 39 | struct node_map_data node_data[MAX_NUMNODES] __read_mostly; |
| 40 | bootmem_data_t bmem_data[MAX_NUMNODES]; | 40 | bootmem_data_t bmem_data[MAX_NUMNODES] __read_mostly; |
| 41 | unsigned char pfnnid_map[PFNNID_MAP_MAX]; | 41 | unsigned char pfnnid_map[PFNNID_MAP_MAX] __read_mostly; |
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
| 44 | static struct resource data_resource = { | 44 | static struct resource data_resource = { |
| @@ -58,14 +58,14 @@ static struct resource pdcdata_resource = { | |||
| 58 | .flags = IORESOURCE_BUSY | IORESOURCE_MEM, | 58 | .flags = IORESOURCE_BUSY | IORESOURCE_MEM, |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | static struct resource sysram_resources[MAX_PHYSMEM_RANGES]; | 61 | static struct resource sysram_resources[MAX_PHYSMEM_RANGES] __read_mostly; |
| 62 | 62 | ||
| 63 | /* The following array is initialized from the firmware specific | 63 | /* The following array is initialized from the firmware specific |
| 64 | * information retrieved in kernel/inventory.c. | 64 | * information retrieved in kernel/inventory.c. |
| 65 | */ | 65 | */ |
| 66 | 66 | ||
| 67 | physmem_range_t pmem_ranges[MAX_PHYSMEM_RANGES]; | 67 | physmem_range_t pmem_ranges[MAX_PHYSMEM_RANGES] __read_mostly; |
| 68 | int npmem_ranges; | 68 | int npmem_ranges __read_mostly; |
| 69 | 69 | ||
| 70 | #ifdef __LP64__ | 70 | #ifdef __LP64__ |
| 71 | #define MAX_MEM (~0UL) | 71 | #define MAX_MEM (~0UL) |
| @@ -73,7 +73,7 @@ int npmem_ranges; | |||
| 73 | #define MAX_MEM (3584U*1024U*1024U) | 73 | #define MAX_MEM (3584U*1024U*1024U) |
| 74 | #endif /* !__LP64__ */ | 74 | #endif /* !__LP64__ */ |
| 75 | 75 | ||
| 76 | static unsigned long mem_limit = MAX_MEM; | 76 | static unsigned long mem_limit __read_mostly = MAX_MEM; |
| 77 | 77 | ||
| 78 | static void __init mem_limit_func(void) | 78 | static void __init mem_limit_func(void) |
| 79 | { | 79 | { |
| @@ -300,6 +300,13 @@ static void __init setup_bootmem(void) | |||
| 300 | max_pfn = start_pfn + npages; | 300 | max_pfn = start_pfn + npages; |
| 301 | } | 301 | } |
| 302 | 302 | ||
| 303 | /* IOMMU is always used to access "high mem" on those boxes | ||
| 304 | * that can support enough mem that a PCI device couldn't | ||
| 305 | * directly DMA to any physical addresses. | ||
| 306 | * ISA DMA support will need to revisit this. | ||
| 307 | */ | ||
| 308 | max_low_pfn = max_pfn; | ||
| 309 | |||
| 303 | if ((bootmap_pfn - bootmap_start_pfn) != bootmap_pages) { | 310 | if ((bootmap_pfn - bootmap_start_pfn) != bootmap_pages) { |
| 304 | printk(KERN_WARNING "WARNING! bootmap sizing is messed up!\n"); | 311 | printk(KERN_WARNING "WARNING! bootmap sizing is messed up!\n"); |
| 305 | BUG(); | 312 | BUG(); |
| @@ -431,11 +438,11 @@ void free_initmem(void) | |||
| 431 | #define SET_MAP_OFFSET(x) ((void *)(((unsigned long)(x) + VM_MAP_OFFSET) \ | 438 | #define SET_MAP_OFFSET(x) ((void *)(((unsigned long)(x) + VM_MAP_OFFSET) \ |
| 432 | & ~(VM_MAP_OFFSET-1))) | 439 | & ~(VM_MAP_OFFSET-1))) |
| 433 | 440 | ||
| 434 | void *vmalloc_start; | 441 | void *vmalloc_start __read_mostly; |
| 435 | EXPORT_SYMBOL(vmalloc_start); | 442 | EXPORT_SYMBOL(vmalloc_start); |
| 436 | 443 | ||
| 437 | #ifdef CONFIG_PA11 | 444 | #ifdef CONFIG_PA11 |
| 438 | unsigned long pcxl_dma_start; | 445 | unsigned long pcxl_dma_start __read_mostly; |
| 439 | #endif | 446 | #endif |
| 440 | 447 | ||
| 441 | void __init mem_init(void) | 448 | void __init mem_init(void) |
| @@ -475,7 +482,7 @@ int do_check_pgt_cache(int low, int high) | |||
| 475 | return 0; | 482 | return 0; |
| 476 | } | 483 | } |
| 477 | 484 | ||
| 478 | unsigned long *empty_zero_page; | 485 | unsigned long *empty_zero_page __read_mostly; |
| 479 | 486 | ||
| 480 | void show_mem(void) | 487 | void show_mem(void) |
| 481 | { | 488 | { |
| @@ -998,7 +1005,7 @@ void flush_tlb_all(void) | |||
| 998 | void flush_tlb_all(void) | 1005 | void flush_tlb_all(void) |
| 999 | { | 1006 | { |
| 1000 | spin_lock(&sid_lock); | 1007 | spin_lock(&sid_lock); |
| 1001 | flush_tlb_all_local(); | 1008 | flush_tlb_all_local(NULL); |
| 1002 | recycle_sids(); | 1009 | recycle_sids(); |
| 1003 | spin_unlock(&sid_lock); | 1010 | spin_unlock(&sid_lock); |
| 1004 | } | 1011 | } |
diff --git a/arch/parisc/mm/ioremap.c b/arch/parisc/mm/ioremap.c index 5c7a1b3b9326..edd9a9559cba 100644 --- a/arch/parisc/mm/ioremap.c +++ b/arch/parisc/mm/ioremap.c | |||
| @@ -1,12 +1,9 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/parisc/mm/ioremap.c | 2 | * arch/parisc/mm/ioremap.c |
| 3 | * | 3 | * |
| 4 | * Re-map IO memory to kernel address space so that we can access it. | ||
| 5 | * This is needed for high PCI addresses that aren't mapped in the | ||
| 6 | * 640k-1MB IO memory area on PC's | ||
| 7 | * | ||
| 8 | * (C) Copyright 1995 1996 Linus Torvalds | 4 | * (C) Copyright 1995 1996 Linus Torvalds |
| 9 | * (C) Copyright 2001 Helge Deller <deller@gmx.de> | 5 | * (C) Copyright 2001 Helge Deller <deller@gmx.de> |
| 6 | * (C) Copyright 2005 Kyle McMartin <kyle@parisc-linux.org> | ||
| 10 | */ | 7 | */ |
| 11 | 8 | ||
| 12 | #include <linux/vmalloc.h> | 9 | #include <linux/vmalloc.h> |
| @@ -14,81 +11,107 @@ | |||
| 14 | #include <linux/module.h> | 11 | #include <linux/module.h> |
| 15 | #include <asm/io.h> | 12 | #include <asm/io.h> |
| 16 | #include <asm/pgalloc.h> | 13 | #include <asm/pgalloc.h> |
| 14 | #include <asm/tlbflush.h> | ||
| 15 | #include <asm/cacheflush.h> | ||
| 17 | 16 | ||
| 18 | static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, | 17 | static inline void |
| 19 | unsigned long phys_addr, unsigned long flags) | 18 | remap_area_pte(pte_t *pte, unsigned long address, unsigned long size, |
| 19 | unsigned long phys_addr, unsigned long flags) | ||
| 20 | { | 20 | { |
| 21 | unsigned long end; | 21 | unsigned long end, pfn; |
| 22 | pgprot_t pgprot = __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | | ||
| 23 | _PAGE_ACCESSED | flags); | ||
| 22 | 24 | ||
| 23 | address &= ~PMD_MASK; | 25 | address &= ~PMD_MASK; |
| 26 | |||
| 24 | end = address + size; | 27 | end = address + size; |
| 25 | if (end > PMD_SIZE) | 28 | if (end > PMD_SIZE) |
| 26 | end = PMD_SIZE; | 29 | end = PMD_SIZE; |
| 27 | if (address >= end) | 30 | |
| 28 | BUG(); | 31 | BUG_ON(address >= end); |
| 32 | |||
| 33 | pfn = phys_addr >> PAGE_SHIFT; | ||
| 29 | do { | 34 | do { |
| 30 | if (!pte_none(*pte)) { | 35 | BUG_ON(!pte_none(*pte)); |
| 31 | printk(KERN_ERR "remap_area_pte: page already exists\n"); | 36 | |
| 32 | BUG(); | 37 | set_pte(pte, pfn_pte(pfn, pgprot)); |
| 33 | } | 38 | |
| 34 | set_pte(pte, mk_pte_phys(phys_addr, __pgprot(_PAGE_PRESENT | _PAGE_RW | | ||
| 35 | _PAGE_DIRTY | _PAGE_ACCESSED | flags))); | ||
| 36 | address += PAGE_SIZE; | 39 | address += PAGE_SIZE; |
| 37 | phys_addr += PAGE_SIZE; | 40 | pfn++; |
| 38 | pte++; | 41 | pte++; |
| 39 | } while (address && (address < end)); | 42 | } while (address && (address < end)); |
| 40 | } | 43 | } |
| 41 | 44 | ||
| 42 | static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size, | 45 | static inline int |
| 43 | unsigned long phys_addr, unsigned long flags) | 46 | remap_area_pmd(pmd_t *pmd, unsigned long address, unsigned long size, |
| 47 | unsigned long phys_addr, unsigned long flags) | ||
| 44 | { | 48 | { |
| 45 | unsigned long end; | 49 | unsigned long end; |
| 46 | 50 | ||
| 47 | address &= ~PGDIR_MASK; | 51 | address &= ~PGDIR_MASK; |
| 52 | |||
| 48 | end = address + size; | 53 | end = address + size; |
| 49 | if (end > PGDIR_SIZE) | 54 | if (end > PGDIR_SIZE) |
| 50 | end = PGDIR_SIZE; | 55 | end = PGDIR_SIZE; |
| 56 | |||
| 57 | BUG_ON(address >= end); | ||
| 58 | |||
| 51 | phys_addr -= address; | 59 | phys_addr -= address; |
| 52 | if (address >= end) | ||
| 53 | BUG(); | ||
| 54 | do { | 60 | do { |
| 55 | pte_t * pte = pte_alloc_kernel(pmd, address); | 61 | pte_t *pte = pte_alloc_kernel(pmd, address); |
| 56 | if (!pte) | 62 | if (!pte) |
| 57 | return -ENOMEM; | 63 | return -ENOMEM; |
| 58 | remap_area_pte(pte, address, end - address, address + phys_addr, flags); | 64 | |
| 65 | remap_area_pte(pte, address, end - address, | ||
| 66 | address + phys_addr, flags); | ||
| 67 | |||
| 59 | address = (address + PMD_SIZE) & PMD_MASK; | 68 | address = (address + PMD_SIZE) & PMD_MASK; |
| 60 | pmd++; | 69 | pmd++; |
| 61 | } while (address && (address < end)); | 70 | } while (address && (address < end)); |
| 71 | |||
| 62 | return 0; | 72 | return 0; |
| 63 | } | 73 | } |
| 64 | 74 | ||
| 65 | #if (USE_HPPA_IOREMAP) | 75 | #if USE_HPPA_IOREMAP |
| 66 | static int remap_area_pages(unsigned long address, unsigned long phys_addr, | 76 | static int |
| 67 | unsigned long size, unsigned long flags) | 77 | remap_area_pages(unsigned long address, unsigned long phys_addr, |
| 78 | unsigned long size, unsigned long flags) | ||
| 68 | { | 79 | { |
| 69 | int error; | 80 | pgd_t *dir; |
| 70 | pgd_t * dir; | 81 | int error = 0; |
| 71 | unsigned long end = address + size; | 82 | unsigned long end = address + size; |
| 72 | 83 | ||
| 84 | BUG_ON(address >= end); | ||
| 85 | |||
| 73 | phys_addr -= address; | 86 | phys_addr -= address; |
| 74 | dir = pgd_offset(&init_mm, address); | 87 | dir = pgd_offset_k(address); |
| 88 | |||
| 75 | flush_cache_all(); | 89 | flush_cache_all(); |
| 76 | if (address >= end) | 90 | |
| 77 | BUG(); | ||
| 78 | do { | 91 | do { |
| 92 | pud_t *pud; | ||
| 79 | pmd_t *pmd; | 93 | pmd_t *pmd; |
| 80 | pmd = pmd_alloc(&init_mm, dir, address); | 94 | |
| 81 | error = -ENOMEM; | 95 | error = -ENOMEM; |
| 96 | pud = pud_alloc(&init_mm, dir, address); | ||
| 97 | if (!pud) | ||
| 98 | break; | ||
| 99 | |||
| 100 | pmd = pmd_alloc(&init_mm, pud, address); | ||
| 82 | if (!pmd) | 101 | if (!pmd) |
| 83 | break; | 102 | break; |
| 103 | |||
| 84 | if (remap_area_pmd(pmd, address, end - address, | 104 | if (remap_area_pmd(pmd, address, end - address, |
| 85 | phys_addr + address, flags)) | 105 | phys_addr + address, flags)) |
| 86 | break; | 106 | break; |
| 107 | |||
| 87 | error = 0; | 108 | error = 0; |
| 88 | address = (address + PGDIR_SIZE) & PGDIR_MASK; | 109 | address = (address + PGDIR_SIZE) & PGDIR_MASK; |
| 89 | dir++; | 110 | dir++; |
| 90 | } while (address && (address < end)); | 111 | } while (address && (address < end)); |
| 112 | |||
| 91 | flush_tlb_all(); | 113 | flush_tlb_all(); |
| 114 | |||
| 92 | return error; | 115 | return error; |
| 93 | } | 116 | } |
| 94 | #endif /* USE_HPPA_IOREMAP */ | 117 | #endif /* USE_HPPA_IOREMAP */ |
| @@ -123,8 +146,7 @@ EXPORT_SYMBOL(__raw_bad_addr); | |||
| 123 | 146 | ||
| 124 | /* | 147 | /* |
| 125 | * Remap an arbitrary physical address space into the kernel virtual | 148 | * Remap an arbitrary physical address space into the kernel virtual |
| 126 | * address space. Needed when the kernel wants to access high addresses | 149 | * address space. |
| 127 | * directly. | ||
| 128 | * | 150 | * |
| 129 | * NOTE! We need to allow non-page-aligned mappings too: we will obviously | 151 | * NOTE! We need to allow non-page-aligned mappings too: we will obviously |
| 130 | * have to convert them into an offset in a page-aligned mapping, but the | 152 | * have to convert them into an offset in a page-aligned mapping, but the |
| @@ -148,8 +170,8 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l | |||
| 148 | #endif | 170 | #endif |
| 149 | 171 | ||
| 150 | #else | 172 | #else |
| 151 | void * addr; | 173 | void *addr; |
| 152 | struct vm_struct * area; | 174 | struct vm_struct *area; |
| 153 | unsigned long offset, last_addr; | 175 | unsigned long offset, last_addr; |
| 154 | 176 | ||
| 155 | /* Don't allow wraparound or zero size */ | 177 | /* Don't allow wraparound or zero size */ |
| @@ -167,9 +189,11 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l | |||
| 167 | t_addr = __va(phys_addr); | 189 | t_addr = __va(phys_addr); |
| 168 | t_end = t_addr + (size - 1); | 190 | t_end = t_addr + (size - 1); |
| 169 | 191 | ||
| 170 | for(page = virt_to_page(t_addr); page <= virt_to_page(t_end); page++) | 192 | for (page = virt_to_page(t_addr); |
| 193 | page <= virt_to_page(t_end); page++) { | ||
| 171 | if(!PageReserved(page)) | 194 | if(!PageReserved(page)) |
| 172 | return NULL; | 195 | return NULL; |
| 196 | } | ||
| 173 | } | 197 | } |
| 174 | 198 | ||
| 175 | /* | 199 | /* |
| @@ -185,11 +209,13 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l | |||
| 185 | area = get_vm_area(size, VM_IOREMAP); | 209 | area = get_vm_area(size, VM_IOREMAP); |
| 186 | if (!area) | 210 | if (!area) |
| 187 | return NULL; | 211 | return NULL; |
| 212 | |||
| 188 | addr = area->addr; | 213 | addr = area->addr; |
| 189 | if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { | 214 | if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { |
| 190 | vfree(addr); | 215 | vfree(addr); |
| 191 | return NULL; | 216 | return NULL; |
| 192 | } | 217 | } |
| 218 | |||
| 193 | return (void __iomem *) (offset + (char *)addr); | 219 | return (void __iomem *) (offset + (char *)addr); |
| 194 | #endif | 220 | #endif |
| 195 | } | 221 | } |
diff --git a/drivers/net/gianfar_sysfs.c b/drivers/net/gianfar_sysfs.c index 10d34cb19192..51ef181b1368 100644 --- a/drivers/net/gianfar_sysfs.c +++ b/drivers/net/gianfar_sysfs.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Based on 8260_io/fcc_enet.c | 7 | * Based on 8260_io/fcc_enet.c |
| 8 | * | 8 | * |
| 9 | * Author: Andy Fleming | 9 | * Author: Andy Fleming |
| 10 | * Maintainer: Kumar Gala (kumar.gala@freescale.com) | 10 | * Maintainer: Kumar Gala (galak@kernel.crashing.org) |
| 11 | * | 11 | * |
| 12 | * Copyright (c) 2002-2005 Freescale Semiconductor, Inc. | 12 | * Copyright (c) 2002-2005 Freescale Semiconductor, Inc. |
| 13 | * | 13 | * |
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index 5ab75334c579..216d1d859326 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c | |||
| @@ -83,7 +83,8 @@ | |||
| 83 | ** bus number for each dino. | 83 | ** bus number for each dino. |
| 84 | */ | 84 | */ |
| 85 | 85 | ||
| 86 | #define is_card_dino(id) ((id)->hw_type == HPHW_A_DMA) | 86 | #define is_card_dino(id) ((id)->hw_type == HPHW_A_DMA) |
| 87 | #define is_cujo(id) ((id)->hversion == 0x682) | ||
| 87 | 88 | ||
| 88 | #define DINO_IAR0 0x004 | 89 | #define DINO_IAR0 0x004 |
| 89 | #define DINO_IODC_ADDR 0x008 | 90 | #define DINO_IODC_ADDR 0x008 |
| @@ -124,6 +125,7 @@ | |||
| 124 | 125 | ||
| 125 | #define DINO_IRQS 11 /* bits 0-10 are architected */ | 126 | #define DINO_IRQS 11 /* bits 0-10 are architected */ |
| 126 | #define DINO_IRR_MASK 0x5ff /* only 10 bits are implemented */ | 127 | #define DINO_IRR_MASK 0x5ff /* only 10 bits are implemented */ |
| 128 | #define DINO_LOCAL_IRQS (DINO_IRQS+1) | ||
| 127 | 129 | ||
| 128 | #define DINO_MASK_IRQ(x) (1<<(x)) | 130 | #define DINO_MASK_IRQ(x) (1<<(x)) |
| 129 | 131 | ||
| @@ -146,7 +148,7 @@ struct dino_device | |||
| 146 | unsigned long txn_addr; /* EIR addr to generate interrupt */ | 148 | unsigned long txn_addr; /* EIR addr to generate interrupt */ |
| 147 | u32 txn_data; /* EIR data assign to each dino */ | 149 | u32 txn_data; /* EIR data assign to each dino */ |
| 148 | u32 imr; /* IRQ's which are enabled */ | 150 | u32 imr; /* IRQ's which are enabled */ |
| 149 | int global_irq[12]; /* map IMR bit to global irq */ | 151 | int global_irq[DINO_LOCAL_IRQS]; /* map IMR bit to global irq */ |
| 150 | #ifdef DINO_DEBUG | 152 | #ifdef DINO_DEBUG |
| 151 | unsigned int dino_irr0; /* save most recent IRQ line stat */ | 153 | unsigned int dino_irr0; /* save most recent IRQ line stat */ |
| 152 | #endif | 154 | #endif |
| @@ -297,7 +299,7 @@ struct pci_port_ops dino_port_ops = { | |||
| 297 | static void dino_disable_irq(unsigned int irq) | 299 | static void dino_disable_irq(unsigned int irq) |
| 298 | { | 300 | { |
| 299 | struct dino_device *dino_dev = irq_desc[irq].handler_data; | 301 | struct dino_device *dino_dev = irq_desc[irq].handler_data; |
| 300 | int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, irq); | 302 | int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); |
| 301 | 303 | ||
| 302 | DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq); | 304 | DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq); |
| 303 | 305 | ||
| @@ -309,7 +311,7 @@ static void dino_disable_irq(unsigned int irq) | |||
| 309 | static void dino_enable_irq(unsigned int irq) | 311 | static void dino_enable_irq(unsigned int irq) |
| 310 | { | 312 | { |
| 311 | struct dino_device *dino_dev = irq_desc[irq].handler_data; | 313 | struct dino_device *dino_dev = irq_desc[irq].handler_data; |
| 312 | int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, irq); | 314 | int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); |
| 313 | u32 tmp; | 315 | u32 tmp; |
| 314 | 316 | ||
| 315 | DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq); | 317 | DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq); |
| @@ -435,6 +437,21 @@ static void dino_choose_irq(struct parisc_device *dev, void *ctrl) | |||
| 435 | dino_assign_irq(dino, irq, &dev->irq); | 437 | dino_assign_irq(dino, irq, &dev->irq); |
| 436 | } | 438 | } |
| 437 | 439 | ||
| 440 | |||
| 441 | /* | ||
| 442 | * Cirrus 6832 Cardbus reports wrong irq on RDI Tadpole PARISC Laptop (deller@gmx.de) | ||
| 443 | * (the irqs are off-by-one, not sure yet if this is a cirrus, dino-hardware or dino-driver problem...) | ||
| 444 | */ | ||
| 445 | static void __devinit quirk_cirrus_cardbus(struct pci_dev *dev) | ||
| 446 | { | ||
| 447 | u8 new_irq = dev->irq - 1; | ||
| 448 | printk(KERN_INFO "PCI: Cirrus Cardbus IRQ fixup for %s, from %d to %d\n", | ||
| 449 | pci_name(dev), dev->irq, new_irq); | ||
| 450 | dev->irq = new_irq; | ||
| 451 | } | ||
| 452 | DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_6832, quirk_cirrus_cardbus ); | ||
| 453 | |||
| 454 | |||
| 438 | static void __init | 455 | static void __init |
| 439 | dino_bios_init(void) | 456 | dino_bios_init(void) |
| 440 | { | 457 | { |
| @@ -666,7 +683,6 @@ dino_fixup_bus(struct pci_bus *bus) | |||
| 666 | printk(KERN_WARNING "Device %s has unassigned IRQ\n", pci_name(dev)); | 683 | printk(KERN_WARNING "Device %s has unassigned IRQ\n", pci_name(dev)); |
| 667 | #endif | 684 | #endif |
| 668 | } else { | 685 | } else { |
| 669 | |||
| 670 | /* Adjust INT_LINE for that busses region */ | 686 | /* Adjust INT_LINE for that busses region */ |
| 671 | dino_assign_irq(dino_dev, dev->irq, &dev->irq); | 687 | dino_assign_irq(dino_dev, dev->irq, &dev->irq); |
| 672 | } | 688 | } |
| @@ -872,7 +888,7 @@ static int __init dino_common_init(struct parisc_device *dev, | |||
| 872 | 888 | ||
| 873 | /* allocate I/O Port resource region */ | 889 | /* allocate I/O Port resource region */ |
| 874 | res = &dino_dev->hba.io_space; | 890 | res = &dino_dev->hba.io_space; |
| 875 | if (dev->id.hversion == 0x680 || is_card_dino(&dev->id)) { | 891 | if (!is_cujo(&dev->id)) { |
| 876 | res->name = "Dino I/O Port"; | 892 | res->name = "Dino I/O Port"; |
| 877 | } else { | 893 | } else { |
| 878 | res->name = "Cujo I/O Port"; | 894 | res->name = "Cujo I/O Port"; |
| @@ -927,7 +943,7 @@ static int __init dino_probe(struct parisc_device *dev) | |||
| 927 | if (is_card_dino(&dev->id)) { | 943 | if (is_card_dino(&dev->id)) { |
| 928 | version = "3.x (card mode)"; | 944 | version = "3.x (card mode)"; |
| 929 | } else { | 945 | } else { |
| 930 | if(dev->id.hversion == 0x680) { | 946 | if (!is_cujo(&dev->id)) { |
| 931 | if (dev->id.hversion_rev < 4) { | 947 | if (dev->id.hversion_rev < 4) { |
| 932 | version = dino_vers[dev->id.hversion_rev]; | 948 | version = dino_vers[dev->id.hversion_rev]; |
| 933 | } | 949 | } |
diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c index 6362bf99eff6..3d94d86c1c9f 100644 --- a/drivers/parisc/eisa.c +++ b/drivers/parisc/eisa.c | |||
| @@ -57,7 +57,7 @@ | |||
| 57 | 57 | ||
| 58 | static DEFINE_SPINLOCK(eisa_irq_lock); | 58 | static DEFINE_SPINLOCK(eisa_irq_lock); |
| 59 | 59 | ||
| 60 | void __iomem *eisa_eeprom_addr; | 60 | void __iomem *eisa_eeprom_addr __read_mostly; |
| 61 | 61 | ||
| 62 | /* We can only have one EISA adapter in the system because neither | 62 | /* We can only have one EISA adapter in the system because neither |
| 63 | * implementation can be flexed. | 63 | * implementation can be flexed. |
| @@ -141,7 +141,7 @@ static int slave_mask; | |||
| 141 | * in the furure. | 141 | * in the furure. |
| 142 | */ | 142 | */ |
| 143 | /* irq 13,8,2,1,0 must be edge */ | 143 | /* irq 13,8,2,1,0 must be edge */ |
| 144 | static unsigned int eisa_irq_level; /* default to edge triggered */ | 144 | static unsigned int eisa_irq_level __read_mostly; /* default to edge triggered */ |
| 145 | 145 | ||
| 146 | 146 | ||
| 147 | /* called by free irq */ | 147 | /* called by free irq */ |
diff --git a/drivers/parisc/eisa_eeprom.c b/drivers/parisc/eisa_eeprom.c index 3a1b4826e5c1..e13aafa70bf5 100644 --- a/drivers/parisc/eisa_eeprom.c +++ b/drivers/parisc/eisa_eeprom.c | |||
| @@ -48,7 +48,7 @@ static loff_t eisa_eeprom_llseek(struct file *file, loff_t offset, int origin ) | |||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | static ssize_t eisa_eeprom_read(struct file * file, | 50 | static ssize_t eisa_eeprom_read(struct file * file, |
| 51 | char *buf, size_t count, loff_t *ppos ) | 51 | char __user *buf, size_t count, loff_t *ppos ) |
| 52 | { | 52 | { |
| 53 | unsigned char *tmp; | 53 | unsigned char *tmp; |
| 54 | ssize_t ret; | 54 | ssize_t ret; |
diff --git a/drivers/parisc/lasi.c b/drivers/parisc/lasi.c index a8c20396ffbe..2b3ba1dcf332 100644 --- a/drivers/parisc/lasi.c +++ b/drivers/parisc/lasi.c | |||
| @@ -150,7 +150,7 @@ void __init lasi_led_init(unsigned long lasi_hpa) | |||
| 150 | * | 150 | * |
| 151 | */ | 151 | */ |
| 152 | 152 | ||
| 153 | static unsigned long lasi_power_off_hpa; | 153 | static unsigned long lasi_power_off_hpa __read_mostly; |
| 154 | 154 | ||
| 155 | static void lasi_power_off(void) | 155 | static void lasi_power_off(void) |
| 156 | { | 156 | { |
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c index 5e495dcbc58a..cbae8c8963fa 100644 --- a/drivers/parisc/lba_pci.c +++ b/drivers/parisc/lba_pci.c | |||
| @@ -167,7 +167,7 @@ | |||
| 167 | 167 | ||
| 168 | /* non-postable I/O port space, densely packed */ | 168 | /* non-postable I/O port space, densely packed */ |
| 169 | #define LBA_PORT_BASE (PCI_F_EXTEND | 0xfee00000UL) | 169 | #define LBA_PORT_BASE (PCI_F_EXTEND | 0xfee00000UL) |
| 170 | static void __iomem *astro_iop_base; | 170 | static void __iomem *astro_iop_base __read_mostly; |
| 171 | 171 | ||
| 172 | #define ELROY_HVERS 0x782 | 172 | #define ELROY_HVERS 0x782 |
| 173 | #define MERCURY_HVERS 0x783 | 173 | #define MERCURY_HVERS 0x783 |
| @@ -695,11 +695,71 @@ lba_claim_dev_resources(struct pci_dev *dev) | |||
| 695 | } | 695 | } |
| 696 | } | 696 | } |
| 697 | } | 697 | } |
| 698 | |||
| 699 | |||
| 700 | /* | ||
| 701 | * truncate_pat_collision: Deal with overlaps or outright collisions | ||
| 702 | * between PAT PDC reported ranges. | ||
| 703 | * | ||
| 704 | * Broken PA8800 firmware will report lmmio range that | ||
| 705 | * overlaps with CPU HPA. Just truncate the lmmio range. | ||
| 706 | * | ||
| 707 | * BEWARE: conflicts with this lmmio range may be an | ||
| 708 | * elmmio range which is pointing down another rope. | ||
| 709 | * | ||
| 710 | * FIXME: only deals with one collision per range...theoretically we | ||
| 711 | * could have several. Supporting more than one collision will get messy. | ||
| 712 | */ | ||
| 713 | static unsigned long | ||
| 714 | truncate_pat_collision(struct resource *root, struct resource *new) | ||
| 715 | { | ||
| 716 | unsigned long start = new->start; | ||
| 717 | unsigned long end = new->end; | ||
| 718 | struct resource *tmp = root->child; | ||
| 719 | |||
| 720 | if (end <= start || start < root->start || !tmp) | ||
| 721 | return 0; | ||
| 722 | |||
| 723 | /* find first overlap */ | ||
| 724 | while (tmp && tmp->end < start) | ||
| 725 | tmp = tmp->sibling; | ||
| 726 | |||
| 727 | /* no entries overlap */ | ||
| 728 | if (!tmp) return 0; | ||
| 729 | |||
| 730 | /* found one that starts behind the new one | ||
| 731 | ** Don't need to do anything. | ||
| 732 | */ | ||
| 733 | if (tmp->start >= end) return 0; | ||
| 734 | |||
| 735 | if (tmp->start <= start) { | ||
| 736 | /* "front" of new one overlaps */ | ||
| 737 | new->start = tmp->end + 1; | ||
| 738 | |||
| 739 | if (tmp->end >= end) { | ||
| 740 | /* AACCKK! totally overlaps! drop this range. */ | ||
| 741 | return 1; | ||
| 742 | } | ||
| 743 | } | ||
| 744 | |||
| 745 | if (tmp->end < end ) { | ||
| 746 | /* "end" of new one overlaps */ | ||
| 747 | new->end = tmp->start - 1; | ||
| 748 | } | ||
| 749 | |||
| 750 | printk(KERN_WARNING "LBA: Truncating lmmio_space [%lx/%lx] " | ||
| 751 | "to [%lx,%lx]\n", | ||
| 752 | start, end, | ||
| 753 | new->start, new->end ); | ||
| 754 | |||
| 755 | return 0; /* truncation successful */ | ||
| 756 | } | ||
| 757 | |||
| 698 | #else | 758 | #else |
| 699 | #define lba_claim_dev_resources(dev) | 759 | #define lba_claim_dev_resources(dev) do { } while (0) |
| 760 | #define truncate_pat_collision(r,n) (0) | ||
| 700 | #endif | 761 | #endif |
| 701 | 762 | ||
| 702 | |||
| 703 | /* | 763 | /* |
| 704 | ** The algorithm is generic code. | 764 | ** The algorithm is generic code. |
| 705 | ** But it needs to access local data structures to get the IRQ base. | 765 | ** But it needs to access local data structures to get the IRQ base. |
| @@ -747,6 +807,9 @@ lba_fixup_bus(struct pci_bus *bus) | |||
| 747 | lba_dump_res(&ioport_resource, 2); | 807 | lba_dump_res(&ioport_resource, 2); |
| 748 | BUG(); | 808 | BUG(); |
| 749 | } | 809 | } |
| 810 | /* advertize Host bridge resources to PCI bus */ | ||
| 811 | bus->resource[0] = &(ldev->hba.io_space); | ||
| 812 | i = 1; | ||
| 750 | 813 | ||
| 751 | if (ldev->hba.elmmio_space.start) { | 814 | if (ldev->hba.elmmio_space.start) { |
| 752 | err = request_resource(&iomem_resource, | 815 | err = request_resource(&iomem_resource, |
| @@ -760,23 +823,35 @@ lba_fixup_bus(struct pci_bus *bus) | |||
| 760 | 823 | ||
| 761 | /* lba_dump_res(&iomem_resource, 2); */ | 824 | /* lba_dump_res(&iomem_resource, 2); */ |
| 762 | /* BUG(); */ | 825 | /* BUG(); */ |
| 763 | } | 826 | } else |
| 827 | bus->resource[i++] = &(ldev->hba.elmmio_space); | ||
| 764 | } | 828 | } |
| 765 | 829 | ||
| 766 | err = request_resource(&iomem_resource, &(ldev->hba.lmmio_space)); | 830 | |
| 767 | if (err < 0) { | 831 | /* Overlaps with elmmio can (and should) fail here. |
| 768 | /* FIXME overlaps with elmmio will fail here. | 832 | * We will prune (or ignore) the distributed range. |
| 769 | * Need to prune (or disable) the distributed range. | 833 | * |
| 770 | * | 834 | * FIXME: SBA code should register all elmmio ranges first. |
| 771 | * BEWARE: conflicts with this lmmio range may be | 835 | * that would take care of elmmio ranges routed |
| 772 | * elmmio range which is pointing down another rope. | 836 | * to a different rope (already discovered) from |
| 773 | */ | 837 | * getting registered *after* LBA code has already |
| 774 | 838 | * registered it's distributed lmmio range. | |
| 775 | printk("FAILED: lba_fixup_bus() request for " | 839 | */ |
| 840 | if (truncate_pat_collision(&iomem_resource, | ||
| 841 | &(ldev->hba.lmmio_space))) { | ||
| 842 | |||
| 843 | printk(KERN_WARNING "LBA: lmmio_space [%lx/%lx] duplicate!\n", | ||
| 844 | ldev->hba.lmmio_space.start, | ||
| 845 | ldev->hba.lmmio_space.end); | ||
| 846 | } else { | ||
| 847 | err = request_resource(&iomem_resource, &(ldev->hba.lmmio_space)); | ||
| 848 | if (err < 0) { | ||
| 849 | printk(KERN_ERR "FAILED: lba_fixup_bus() request for " | ||
| 776 | "lmmio_space [%lx/%lx]\n", | 850 | "lmmio_space [%lx/%lx]\n", |
| 777 | ldev->hba.lmmio_space.start, | 851 | ldev->hba.lmmio_space.start, |
| 778 | ldev->hba.lmmio_space.end); | 852 | ldev->hba.lmmio_space.end); |
| 779 | /* lba_dump_res(&iomem_resource, 2); */ | 853 | } else |
| 854 | bus->resource[i++] = &(ldev->hba.lmmio_space); | ||
| 780 | } | 855 | } |
| 781 | 856 | ||
| 782 | #ifdef CONFIG_64BIT | 857 | #ifdef CONFIG_64BIT |
| @@ -791,18 +866,10 @@ lba_fixup_bus(struct pci_bus *bus) | |||
| 791 | lba_dump_res(&iomem_resource, 2); | 866 | lba_dump_res(&iomem_resource, 2); |
| 792 | BUG(); | 867 | BUG(); |
| 793 | } | 868 | } |
| 869 | bus->resource[i++] = &(ldev->hba.gmmio_space); | ||
| 794 | } | 870 | } |
| 795 | #endif | 871 | #endif |
| 796 | 872 | ||
| 797 | /* advertize Host bridge resources to PCI bus */ | ||
| 798 | bus->resource[0] = &(ldev->hba.io_space); | ||
| 799 | bus->resource[1] = &(ldev->hba.lmmio_space); | ||
| 800 | i=2; | ||
| 801 | if (ldev->hba.elmmio_space.start) | ||
| 802 | bus->resource[i++] = &(ldev->hba.elmmio_space); | ||
| 803 | if (ldev->hba.gmmio_space.start) | ||
| 804 | bus->resource[i++] = &(ldev->hba.gmmio_space); | ||
| 805 | |||
| 806 | } | 873 | } |
| 807 | 874 | ||
| 808 | list_for_each(ln, &bus->devices) { | 875 | list_for_each(ln, &bus->devices) { |
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index 315be4770d3e..f357d3f60360 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * (c) Copyright 2000 Red Hat Software | 4 | * (c) Copyright 2000 Red Hat Software |
| 5 | * (c) Copyright 2000 Helge Deller <hdeller@redhat.com> | 5 | * (c) Copyright 2000 Helge Deller <hdeller@redhat.com> |
| 6 | * (c) Copyright 2001-2004 Helge Deller <deller@gmx.de> | 6 | * (c) Copyright 2001-2005 Helge Deller <deller@gmx.de> |
| 7 | * (c) Copyright 2001 Randolph Chung <tausq@debian.org> | 7 | * (c) Copyright 2001 Randolph Chung <tausq@debian.org> |
| 8 | * | 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
| @@ -56,13 +56,13 @@ | |||
| 56 | relatively large amount of CPU time, some of the calculations can be | 56 | relatively large amount of CPU time, some of the calculations can be |
| 57 | turned off with the following variables (controlled via procfs) */ | 57 | turned off with the following variables (controlled via procfs) */ |
| 58 | 58 | ||
| 59 | static int led_type = -1; | 59 | static int led_type __read_mostly = -1; |
| 60 | static unsigned char lastleds; /* LED state from most recent update */ | 60 | static unsigned char lastleds; /* LED state from most recent update */ |
| 61 | static unsigned int led_heartbeat = 1; | 61 | static unsigned int led_heartbeat __read_mostly = 1; |
| 62 | static unsigned int led_diskio = 1; | 62 | static unsigned int led_diskio __read_mostly = 1; |
| 63 | static unsigned int led_lanrxtx = 1; | 63 | static unsigned int led_lanrxtx __read_mostly = 1; |
| 64 | static char lcd_text[32]; | 64 | static char lcd_text[32] __read_mostly; |
| 65 | static char lcd_text_default[32]; | 65 | static char lcd_text_default[32] __read_mostly; |
| 66 | 66 | ||
| 67 | 67 | ||
| 68 | static struct workqueue_struct *led_wq; | 68 | static struct workqueue_struct *led_wq; |
| @@ -108,7 +108,7 @@ struct pdc_chassis_lcd_info_ret_block { | |||
| 108 | /* lcd_info is pre-initialized to the values needed to program KittyHawk LCD's | 108 | /* lcd_info is pre-initialized to the values needed to program KittyHawk LCD's |
| 109 | * HP seems to have used Sharp/Hitachi HD44780 LCDs most of the time. */ | 109 | * HP seems to have used Sharp/Hitachi HD44780 LCDs most of the time. */ |
| 110 | static struct pdc_chassis_lcd_info_ret_block | 110 | static struct pdc_chassis_lcd_info_ret_block |
| 111 | lcd_info __attribute__((aligned(8))) = | 111 | lcd_info __attribute__((aligned(8))) __read_mostly = |
| 112 | { | 112 | { |
| 113 | .model = DISPLAY_MODEL_LCD, | 113 | .model = DISPLAY_MODEL_LCD, |
| 114 | .lcd_width = 16, | 114 | .lcd_width = 16, |
| @@ -144,7 +144,7 @@ static int start_task(void) | |||
| 144 | device_initcall(start_task); | 144 | device_initcall(start_task); |
| 145 | 145 | ||
| 146 | /* ptr to LCD/LED-specific function */ | 146 | /* ptr to LCD/LED-specific function */ |
| 147 | static void (*led_func_ptr) (unsigned char); | 147 | static void (*led_func_ptr) (unsigned char) __read_mostly; |
| 148 | 148 | ||
| 149 | #ifdef CONFIG_PROC_FS | 149 | #ifdef CONFIG_PROC_FS |
| 150 | static int led_proc_read(char *page, char **start, off_t off, int count, | 150 | static int led_proc_read(char *page, char **start, off_t off, int count, |
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c index 273a74179720..38bdca2fac6b 100644 --- a/drivers/parisc/pdc_stable.c +++ b/drivers/parisc/pdc_stable.c | |||
| @@ -56,7 +56,7 @@ | |||
| 56 | #include <asm/uaccess.h> | 56 | #include <asm/uaccess.h> |
| 57 | #include <asm/hardware.h> | 57 | #include <asm/hardware.h> |
| 58 | 58 | ||
| 59 | #define PDCS_VERSION "0.09" | 59 | #define PDCS_VERSION "0.10" |
| 60 | 60 | ||
| 61 | #define PDCS_ADDR_PPRI 0x00 | 61 | #define PDCS_ADDR_PPRI 0x00 |
| 62 | #define PDCS_ADDR_OSID 0x40 | 62 | #define PDCS_ADDR_OSID 0x40 |
| @@ -70,7 +70,7 @@ MODULE_DESCRIPTION("sysfs interface to HP PDC Stable Storage data"); | |||
| 70 | MODULE_LICENSE("GPL"); | 70 | MODULE_LICENSE("GPL"); |
| 71 | MODULE_VERSION(PDCS_VERSION); | 71 | MODULE_VERSION(PDCS_VERSION); |
| 72 | 72 | ||
| 73 | static unsigned long pdcs_size = 0; | 73 | static unsigned long pdcs_size __read_mostly; |
| 74 | 74 | ||
| 75 | /* This struct defines what we need to deal with a parisc pdc path entry */ | 75 | /* This struct defines what we need to deal with a parisc pdc path entry */ |
| 76 | struct pdcspath_entry { | 76 | struct pdcspath_entry { |
| @@ -194,7 +194,8 @@ pdcspath_store(struct pdcspath_entry *entry) | |||
| 194 | return -EIO; | 194 | return -EIO; |
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | entry->ready = 1; | 197 | /* kobject is already registered */ |
| 198 | entry->ready = 2; | ||
| 198 | 199 | ||
| 199 | DPRINTK("%s: device: 0x%p\n", __func__, entry->dev); | 200 | DPRINTK("%s: device: 0x%p\n", __func__, entry->dev); |
| 200 | 201 | ||
| @@ -653,15 +654,21 @@ pdcs_register_pathentries(void) | |||
| 653 | { | 654 | { |
| 654 | unsigned short i; | 655 | unsigned short i; |
| 655 | struct pdcspath_entry *entry; | 656 | struct pdcspath_entry *entry; |
| 657 | int err; | ||
| 656 | 658 | ||
| 657 | for (i = 0; (entry = pdcspath_entries[i]); i++) { | 659 | for (i = 0; (entry = pdcspath_entries[i]); i++) { |
| 658 | if (pdcspath_fetch(entry) < 0) | 660 | if (pdcspath_fetch(entry) < 0) |
| 659 | continue; | 661 | continue; |
| 660 | 662 | ||
| 661 | kobject_set_name(&entry->kobj, "%s", entry->name); | 663 | if ((err = kobject_set_name(&entry->kobj, "%s", entry->name))) |
| 664 | return err; | ||
| 662 | kobj_set_kset_s(entry, paths_subsys); | 665 | kobj_set_kset_s(entry, paths_subsys); |
| 663 | kobject_register(&entry->kobj); | 666 | if ((err = kobject_register(&entry->kobj))) |
| 664 | 667 | return err; | |
| 668 | |||
| 669 | /* kobject is now registered */ | ||
| 670 | entry->ready = 2; | ||
| 671 | |||
| 665 | if (!entry->dev) | 672 | if (!entry->dev) |
| 666 | continue; | 673 | continue; |
| 667 | 674 | ||
| @@ -675,14 +682,14 @@ pdcs_register_pathentries(void) | |||
| 675 | /** | 682 | /** |
| 676 | * pdcs_unregister_pathentries - Routine called when unregistering the module. | 683 | * pdcs_unregister_pathentries - Routine called when unregistering the module. |
| 677 | */ | 684 | */ |
| 678 | static inline void __exit | 685 | static inline void |
| 679 | pdcs_unregister_pathentries(void) | 686 | pdcs_unregister_pathentries(void) |
| 680 | { | 687 | { |
| 681 | unsigned short i; | 688 | unsigned short i; |
| 682 | struct pdcspath_entry *entry; | 689 | struct pdcspath_entry *entry; |
| 683 | 690 | ||
| 684 | for (i = 0; (entry = pdcspath_entries[i]); i++) | 691 | for (i = 0; (entry = pdcspath_entries[i]); i++) |
| 685 | if (entry->ready) | 692 | if (entry->ready >= 2) |
| 686 | kobject_unregister(&entry->kobj); | 693 | kobject_unregister(&entry->kobj); |
| 687 | } | 694 | } |
| 688 | 695 | ||
| @@ -704,7 +711,7 @@ pdc_stable_init(void) | |||
| 704 | 711 | ||
| 705 | /* For now we'll register the pdc subsys within this driver */ | 712 | /* For now we'll register the pdc subsys within this driver */ |
| 706 | if ((rc = firmware_register(&pdc_subsys))) | 713 | if ((rc = firmware_register(&pdc_subsys))) |
| 707 | return rc; | 714 | goto fail_firmreg; |
| 708 | 715 | ||
| 709 | /* Don't forget the info entry */ | 716 | /* Don't forget the info entry */ |
| 710 | for (i = 0; (attr = pdcs_subsys_attrs[i]) && !error; i++) | 717 | for (i = 0; (attr = pdcs_subsys_attrs[i]) && !error; i++) |
| @@ -713,12 +720,25 @@ pdc_stable_init(void) | |||
| 713 | 720 | ||
| 714 | /* register the paths subsys as a subsystem of pdc subsys */ | 721 | /* register the paths subsys as a subsystem of pdc subsys */ |
| 715 | kset_set_kset_s(&paths_subsys, pdc_subsys); | 722 | kset_set_kset_s(&paths_subsys, pdc_subsys); |
| 716 | subsystem_register(&paths_subsys); | 723 | if ((rc= subsystem_register(&paths_subsys))) |
| 724 | goto fail_subsysreg; | ||
| 717 | 725 | ||
| 718 | /* now we create all "files" for the paths subsys */ | 726 | /* now we create all "files" for the paths subsys */ |
| 719 | pdcs_register_pathentries(); | 727 | if ((rc = pdcs_register_pathentries())) |
| 728 | goto fail_pdcsreg; | ||
| 729 | |||
| 730 | return rc; | ||
| 720 | 731 | ||
| 721 | return 0; | 732 | fail_pdcsreg: |
| 733 | pdcs_unregister_pathentries(); | ||
| 734 | subsystem_unregister(&paths_subsys); | ||
| 735 | |||
| 736 | fail_subsysreg: | ||
| 737 | firmware_unregister(&pdc_subsys); | ||
| 738 | |||
| 739 | fail_firmreg: | ||
| 740 | printk(KERN_INFO "PDC Stable Storage bailing out\n"); | ||
| 741 | return rc; | ||
| 722 | } | 742 | } |
| 723 | 743 | ||
| 724 | static void __exit | 744 | static void __exit |
diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c index ff75e9296df9..54b2b7f20b96 100644 --- a/drivers/parisc/power.c +++ b/drivers/parisc/power.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * linux/arch/parisc/kernel/power.c | 2 | * linux/arch/parisc/kernel/power.c |
| 3 | * HP PARISC soft power switch support driver | 3 | * HP PARISC soft power switch support driver |
| 4 | * | 4 | * |
| 5 | * Copyright (c) 2001-2002 Helge Deller <deller@gmx.de> | 5 | * Copyright (c) 2001-2005 Helge Deller <deller@gmx.de> |
| 6 | * All rights reserved. | 6 | * All rights reserved. |
| 7 | * | 7 | * |
| 8 | * | 8 | * |
| @@ -102,7 +102,7 @@ static DECLARE_WORK(poweroff_work, deferred_poweroff, NULL); | |||
| 102 | 102 | ||
| 103 | static void poweroff(void) | 103 | static void poweroff(void) |
| 104 | { | 104 | { |
| 105 | static int powering_off; | 105 | static int powering_off __read_mostly; |
| 106 | 106 | ||
| 107 | if (powering_off) | 107 | if (powering_off) |
| 108 | return; | 108 | return; |
| @@ -113,7 +113,7 @@ static void poweroff(void) | |||
| 113 | 113 | ||
| 114 | 114 | ||
| 115 | /* local time-counter for shutdown */ | 115 | /* local time-counter for shutdown */ |
| 116 | static int shutdown_timer; | 116 | static int shutdown_timer __read_mostly; |
| 117 | 117 | ||
| 118 | /* check, give feedback and start shutdown after one second */ | 118 | /* check, give feedback and start shutdown after one second */ |
| 119 | static void process_shutdown(void) | 119 | static void process_shutdown(void) |
| @@ -139,7 +139,7 @@ static void process_shutdown(void) | |||
| 139 | DECLARE_TASKLET_DISABLED(power_tasklet, NULL, 0); | 139 | DECLARE_TASKLET_DISABLED(power_tasklet, NULL, 0); |
| 140 | 140 | ||
| 141 | /* soft power switch enabled/disabled */ | 141 | /* soft power switch enabled/disabled */ |
| 142 | int pwrsw_enabled = 1; | 142 | int pwrsw_enabled __read_mostly = 1; |
| 143 | 143 | ||
| 144 | /* | 144 | /* |
| 145 | * On gecko style machines (e.g. 712/xx and 715/xx) | 145 | * On gecko style machines (e.g. 712/xx and 715/xx) |
| @@ -149,7 +149,7 @@ int pwrsw_enabled = 1; | |||
| 149 | */ | 149 | */ |
| 150 | static void gecko_tasklet_func(unsigned long unused) | 150 | static void gecko_tasklet_func(unsigned long unused) |
| 151 | { | 151 | { |
| 152 | if (!pwrsw_enabled) | 152 | if (unlikely(!pwrsw_enabled)) |
| 153 | return; | 153 | return; |
| 154 | 154 | ||
| 155 | if (__getDIAG(25) & 0x80000000) { | 155 | if (__getDIAG(25) & 0x80000000) { |
| @@ -173,7 +173,7 @@ static void polling_tasklet_func(unsigned long soft_power_reg) | |||
| 173 | { | 173 | { |
| 174 | unsigned long current_status; | 174 | unsigned long current_status; |
| 175 | 175 | ||
| 176 | if (!pwrsw_enabled) | 176 | if (unlikely(!pwrsw_enabled)) |
| 177 | return; | 177 | return; |
| 178 | 178 | ||
| 179 | current_status = gsc_readl(soft_power_reg); | 179 | current_status = gsc_readl(soft_power_reg); |
diff --git a/drivers/parport/Kconfig b/drivers/parport/Kconfig index a665951b1586..f605dea57224 100644 --- a/drivers/parport/Kconfig +++ b/drivers/parport/Kconfig | |||
| @@ -121,6 +121,7 @@ config PARPORT_GSC | |||
| 121 | tristate | 121 | tristate |
| 122 | default GSC | 122 | default GSC |
| 123 | depends on PARPORT | 123 | depends on PARPORT |
| 124 | select PARPORT_NOT_PC | ||
| 124 | 125 | ||
| 125 | config PARPORT_SUNBPP | 126 | config PARPORT_SUNBPP |
| 126 | tristate "Sparc hardware (EXPERIMENTAL)" | 127 | tristate "Sparc hardware (EXPERIMENTAL)" |
diff --git a/drivers/video/stifb.c b/drivers/video/stifb.c index fbb17332afd7..56d71d6e9a72 100644 --- a/drivers/video/stifb.c +++ b/drivers/video/stifb.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * Low level Frame buffer driver for HP workstations with | 3 | * Low level Frame buffer driver for HP workstations with |
| 4 | * STI (standard text interface) video firmware. | 4 | * STI (standard text interface) video firmware. |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2001-2004 Helge Deller <deller@gmx.de> | 6 | * Copyright (C) 2001-2005 Helge Deller <deller@gmx.de> |
| 7 | * Portions Copyright (C) 2001 Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 7 | * Portions Copyright (C) 2001 Thomas Bogendoerfer <tsbogend@alpha.franken.de> |
| 8 | * | 8 | * |
| 9 | * Based on: | 9 | * Based on: |
| @@ -73,16 +73,13 @@ | |||
| 73 | #include "sticore.h" | 73 | #include "sticore.h" |
| 74 | 74 | ||
| 75 | /* REGION_BASE(fb_info, index) returns the virtual address for region <index> */ | 75 | /* REGION_BASE(fb_info, index) returns the virtual address for region <index> */ |
| 76 | #ifdef __LP64__ | 76 | #define REGION_BASE(fb_info, index) \ |
| 77 | #define REGION_BASE(fb_info, index) \ | 77 | F_EXTEND(fb_info->sti->glob_cfg->region_ptrs[index]) |
| 78 | (fb_info->sti->glob_cfg->region_ptrs[index] | 0xffffffff00000000) | ||
| 79 | #else | ||
| 80 | #define REGION_BASE(fb_info, index) \ | ||
| 81 | fb_info->sti->glob_cfg->region_ptrs[index] | ||
| 82 | #endif | ||
| 83 | 78 | ||
| 84 | #define NGLEDEVDEPROM_CRT_REGION 1 | 79 | #define NGLEDEVDEPROM_CRT_REGION 1 |
| 85 | 80 | ||
| 81 | #define NR_PALETTE 256 | ||
| 82 | |||
| 86 | typedef struct { | 83 | typedef struct { |
| 87 | __s32 video_config_reg; | 84 | __s32 video_config_reg; |
| 88 | __s32 misc_video_start; | 85 | __s32 misc_video_start; |
| @@ -112,7 +109,7 @@ struct stifb_info { | |||
| 112 | ngle_rom_t ngle_rom; | 109 | ngle_rom_t ngle_rom; |
| 113 | struct sti_struct *sti; | 110 | struct sti_struct *sti; |
| 114 | int deviceSpecificConfig; | 111 | int deviceSpecificConfig; |
| 115 | u32 pseudo_palette[256]; | 112 | u32 pseudo_palette[16]; |
| 116 | }; | 113 | }; |
| 117 | 114 | ||
| 118 | static int __initdata stifb_bpp_pref[MAX_STI_ROMS]; | 115 | static int __initdata stifb_bpp_pref[MAX_STI_ROMS]; |
| @@ -352,10 +349,10 @@ ARTIST_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable) | |||
| 352 | #define IS_888_DEVICE(fb) \ | 349 | #define IS_888_DEVICE(fb) \ |
| 353 | (!(IS_24_DEVICE(fb))) | 350 | (!(IS_24_DEVICE(fb))) |
| 354 | 351 | ||
| 355 | #define GET_FIFO_SLOTS(fb, cnt, numslots) \ | 352 | #define GET_FIFO_SLOTS(fb, cnt, numslots) \ |
| 356 | { while (cnt < numslots) \ | 353 | { while (cnt < numslots) \ |
| 357 | cnt = READ_WORD(fb, REG_34); \ | 354 | cnt = READ_WORD(fb, REG_34); \ |
| 358 | cnt -= numslots; \ | 355 | cnt -= numslots; \ |
| 359 | } | 356 | } |
| 360 | 357 | ||
| 361 | #define IndexedDcd 0 /* Pixel data is indexed (pseudo) color */ | 358 | #define IndexedDcd 0 /* Pixel data is indexed (pseudo) color */ |
| @@ -995,7 +992,7 @@ stifb_setcolreg(u_int regno, u_int red, u_int green, | |||
| 995 | struct stifb_info *fb = (struct stifb_info *) info; | 992 | struct stifb_info *fb = (struct stifb_info *) info; |
| 996 | u32 color; | 993 | u32 color; |
| 997 | 994 | ||
| 998 | if (regno >= 256) /* no. of hw registers */ | 995 | if (regno >= NR_PALETTE) |
| 999 | return 1; | 996 | return 1; |
| 1000 | 997 | ||
| 1001 | red >>= 8; | 998 | red >>= 8; |
| @@ -1005,8 +1002,8 @@ stifb_setcolreg(u_int regno, u_int red, u_int green, | |||
| 1005 | DEBUG_OFF(); | 1002 | DEBUG_OFF(); |
| 1006 | 1003 | ||
| 1007 | START_IMAGE_COLORMAP_ACCESS(fb); | 1004 | START_IMAGE_COLORMAP_ACCESS(fb); |
| 1008 | 1005 | ||
| 1009 | if (fb->info.var.grayscale) { | 1006 | if (unlikely(fb->info.var.grayscale)) { |
| 1010 | /* gray = 0.30*R + 0.59*G + 0.11*B */ | 1007 | /* gray = 0.30*R + 0.59*G + 0.11*B */ |
| 1011 | color = ((red * 77) + | 1008 | color = ((red * 77) + |
| 1012 | (green * 151) + | 1009 | (green * 151) + |
| @@ -1017,17 +1014,17 @@ stifb_setcolreg(u_int regno, u_int red, u_int green, | |||
| 1017 | (blue)); | 1014 | (blue)); |
| 1018 | } | 1015 | } |
| 1019 | 1016 | ||
| 1020 | if (info->var.bits_per_pixel == 32) { | 1017 | if (fb->info.fix.visual == FB_VISUAL_DIRECTCOLOR) { |
| 1021 | ((u32 *)(info->pseudo_palette))[regno] = | 1018 | struct fb_var_screeninfo *var = &fb->info.var; |
| 1022 | (red << info->var.red.offset) | | 1019 | if (regno < 16) |
| 1023 | (green << info->var.green.offset) | | 1020 | ((u32 *)fb->info.pseudo_palette)[regno] = |
| 1024 | (blue << info->var.blue.offset); | 1021 | regno << var->red.offset | |
| 1025 | } else { | 1022 | regno << var->green.offset | |
| 1026 | ((u32 *)(info->pseudo_palette))[regno] = regno; | 1023 | regno << var->blue.offset; |
| 1027 | } | 1024 | } |
| 1028 | 1025 | ||
| 1029 | WRITE_IMAGE_COLOR(fb, regno, color); | 1026 | WRITE_IMAGE_COLOR(fb, regno, color); |
| 1030 | 1027 | ||
| 1031 | if (fb->id == S9000_ID_HCRX) { | 1028 | if (fb->id == S9000_ID_HCRX) { |
| 1032 | NgleLutBltCtl lutBltCtl; | 1029 | NgleLutBltCtl lutBltCtl; |
| 1033 | 1030 | ||
| @@ -1066,9 +1063,9 @@ stifb_blank(int blank_mode, struct fb_info *info) | |||
| 1066 | case S9000_ID_HCRX: | 1063 | case S9000_ID_HCRX: |
| 1067 | HYPER_ENABLE_DISABLE_DISPLAY(fb, enable); | 1064 | HYPER_ENABLE_DISABLE_DISPLAY(fb, enable); |
| 1068 | break; | 1065 | break; |
| 1069 | case S9000_ID_A1659A:; /* fall through */ | 1066 | case S9000_ID_A1659A: /* fall through */ |
| 1070 | case S9000_ID_TIMBER:; | 1067 | case S9000_ID_TIMBER: |
| 1071 | case CRX24_OVERLAY_PLANES:; | 1068 | case CRX24_OVERLAY_PLANES: |
| 1072 | default: | 1069 | default: |
| 1073 | ENABLE_DISABLE_DISPLAY(fb, enable); | 1070 | ENABLE_DISABLE_DISPLAY(fb, enable); |
| 1074 | break; | 1071 | break; |
| @@ -1250,12 +1247,10 @@ stifb_init_fb(struct sti_struct *sti, int bpp_pref) | |||
| 1250 | memset(&fb->ngle_rom, 0, sizeof(fb->ngle_rom)); | 1247 | memset(&fb->ngle_rom, 0, sizeof(fb->ngle_rom)); |
| 1251 | if ((fb->sti->regions_phys[0] & 0xfc000000) == | 1248 | if ((fb->sti->regions_phys[0] & 0xfc000000) == |
| 1252 | (fb->sti->regions_phys[2] & 0xfc000000)) | 1249 | (fb->sti->regions_phys[2] & 0xfc000000)) |
| 1253 | sti_rom_address = fb->sti->regions_phys[0]; | 1250 | sti_rom_address = F_EXTEND(fb->sti->regions_phys[0]); |
| 1254 | else | 1251 | else |
| 1255 | sti_rom_address = fb->sti->regions_phys[1]; | 1252 | sti_rom_address = F_EXTEND(fb->sti->regions_phys[1]); |
| 1256 | #ifdef __LP64__ | 1253 | |
| 1257 | sti_rom_address |= 0xffffffff00000000; | ||
| 1258 | #endif | ||
| 1259 | fb->deviceSpecificConfig = gsc_readl(sti_rom_address); | 1254 | fb->deviceSpecificConfig = gsc_readl(sti_rom_address); |
| 1260 | if (IS_24_DEVICE(fb)) { | 1255 | if (IS_24_DEVICE(fb)) { |
| 1261 | if (bpp_pref == 8 || bpp_pref == 32) | 1256 | if (bpp_pref == 8 || bpp_pref == 32) |
| @@ -1315,7 +1310,7 @@ stifb_init_fb(struct sti_struct *sti, int bpp_pref) | |||
| 1315 | break; | 1310 | break; |
| 1316 | case 32: | 1311 | case 32: |
| 1317 | fix->type = FB_TYPE_PACKED_PIXELS; | 1312 | fix->type = FB_TYPE_PACKED_PIXELS; |
| 1318 | fix->visual = FB_VISUAL_TRUECOLOR; | 1313 | fix->visual = FB_VISUAL_DIRECTCOLOR; |
| 1319 | var->red.length = var->green.length = var->blue.length = var->transp.length = 8; | 1314 | var->red.length = var->green.length = var->blue.length = var->transp.length = 8; |
| 1320 | var->blue.offset = 0; | 1315 | var->blue.offset = 0; |
| 1321 | var->green.offset = 8; | 1316 | var->green.offset = 8; |
| @@ -1337,7 +1332,7 @@ stifb_init_fb(struct sti_struct *sti, int bpp_pref) | |||
| 1337 | info->pseudo_palette = &fb->pseudo_palette; | 1332 | info->pseudo_palette = &fb->pseudo_palette; |
| 1338 | 1333 | ||
| 1339 | /* This has to been done !!! */ | 1334 | /* This has to been done !!! */ |
| 1340 | fb_alloc_cmap(&info->cmap, 256, 0); | 1335 | fb_alloc_cmap(&info->cmap, NR_PALETTE, 0); |
| 1341 | stifb_init_display(fb); | 1336 | stifb_init_display(fb); |
| 1342 | 1337 | ||
| 1343 | if (!request_mem_region(fix->smem_start, fix->smem_len, "stifb fb")) { | 1338 | if (!request_mem_region(fix->smem_start, fix->smem_len, "stifb fb")) { |
| @@ -1488,7 +1483,3 @@ module_exit(stifb_cleanup); | |||
| 1488 | MODULE_AUTHOR("Helge Deller <deller@gmx.de>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>"); | 1483 | MODULE_AUTHOR("Helge Deller <deller@gmx.de>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>"); |
| 1489 | MODULE_DESCRIPTION("Framebuffer driver for HP's NGLE series graphics cards in HP PARISC machines"); | 1484 | MODULE_DESCRIPTION("Framebuffer driver for HP's NGLE series graphics cards in HP PARISC machines"); |
| 1490 | MODULE_LICENSE("GPL v2"); | 1485 | MODULE_LICENSE("GPL v2"); |
| 1491 | |||
| 1492 | MODULE_PARM(bpp, "i"); | ||
| 1493 | MODULE_PARM_DESC(mem, "Bits per pixel (default: 8)"); | ||
| 1494 | |||
diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c index 0a57fd7c726f..9eef6bf156ab 100644 --- a/fs/afs/cmservice.c +++ b/fs/afs/cmservice.c | |||
| @@ -118,7 +118,7 @@ static int kafscmd(void *arg) | |||
| 118 | _SRXAFSCM_xxxx_t func; | 118 | _SRXAFSCM_xxxx_t func; |
| 119 | int die; | 119 | int die; |
| 120 | 120 | ||
| 121 | printk("kAFS: Started kafscmd %d\n", current->pid); | 121 | printk(KERN_INFO "kAFS: Started kafscmd %d\n", current->pid); |
| 122 | 122 | ||
| 123 | daemonize("kafscmd"); | 123 | daemonize("kafscmd"); |
| 124 | 124 | ||
| @@ -14,7 +14,6 @@ | |||
| 14 | #include <linux/fcntl.h> | 14 | #include <linux/fcntl.h> |
| 15 | #include <linux/quotaops.h> | 15 | #include <linux/quotaops.h> |
| 16 | #include <linux/security.h> | 16 | #include <linux/security.h> |
| 17 | #include <linux/time.h> | ||
| 18 | 17 | ||
| 19 | /* Taken over from the old code... */ | 18 | /* Taken over from the old code... */ |
| 20 | 19 | ||
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index a4f6f57d91aa..f979ebbce49c 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
| @@ -1634,17 +1634,17 @@ static int elf_core_dump(long signr, struct pt_regs * regs, struct file * file) | |||
| 1634 | ELF_CORE_WRITE_EXTRA_DATA; | 1634 | ELF_CORE_WRITE_EXTRA_DATA; |
| 1635 | #endif | 1635 | #endif |
| 1636 | 1636 | ||
| 1637 | if ((off_t) file->f_pos != offset) { | 1637 | if ((off_t)file->f_pos != offset) { |
| 1638 | /* Sanity check */ | 1638 | /* Sanity check */ |
| 1639 | printk("elf_core_dump: file->f_pos (%ld) != offset (%ld)\n", | 1639 | printk(KERN_WARNING "elf_core_dump: file->f_pos (%ld) != offset (%ld)\n", |
| 1640 | (off_t) file->f_pos, offset); | 1640 | (off_t)file->f_pos, offset); |
| 1641 | } | 1641 | } |
| 1642 | 1642 | ||
| 1643 | end_coredump: | 1643 | end_coredump: |
| 1644 | set_fs(fs); | 1644 | set_fs(fs); |
| 1645 | 1645 | ||
| 1646 | cleanup: | 1646 | cleanup: |
| 1647 | while(!list_empty(&thread_list)) { | 1647 | while (!list_empty(&thread_list)) { |
| 1648 | struct list_head *tmp = thread_list.next; | 1648 | struct list_head *tmp = thread_list.next; |
| 1649 | list_del(tmp); | 1649 | list_del(tmp); |
| 1650 | kfree(list_entry(tmp, struct elf_thread_status, list)); | 1650 | kfree(list_entry(tmp, struct elf_thread_status, list)); |
diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index 5b5f52876b42..7442bdd1267a 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c | |||
| @@ -592,7 +592,7 @@ int ext2_make_empty(struct inode *inode, struct inode *parent) | |||
| 592 | goto fail; | 592 | goto fail; |
| 593 | } | 593 | } |
| 594 | kaddr = kmap_atomic(page, KM_USER0); | 594 | kaddr = kmap_atomic(page, KM_USER0); |
| 595 | memset(kaddr, 0, chunk_size); | 595 | memset(kaddr, 0, chunk_size); |
| 596 | de = (struct ext2_dir_entry_2 *)kaddr; | 596 | de = (struct ext2_dir_entry_2 *)kaddr; |
| 597 | de->name_len = 1; | 597 | de->name_len = 1; |
| 598 | de->rec_len = cpu_to_le16(EXT2_DIR_REC_LEN(1)); | 598 | de->rec_len = cpu_to_le16(EXT2_DIR_REC_LEN(1)); |
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index 5378d7c78419..124e35442ac8 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c | |||
| @@ -14,7 +14,6 @@ | |||
| 14 | #include <linux/a.out.h> | 14 | #include <linux/a.out.h> |
| 15 | #include <linux/elf.h> | 15 | #include <linux/elf.h> |
| 16 | #include <linux/elfcore.h> | 16 | #include <linux/elfcore.h> |
| 17 | #include <linux/proc_fs.h> | ||
| 18 | #include <linux/highmem.h> | 17 | #include <linux/highmem.h> |
| 19 | #include <linux/bootmem.h> | 18 | #include <linux/bootmem.h> |
| 20 | #include <linux/init.h> | 19 | #include <linux/init.h> |
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index 5c6d873e292c..788917f355c4 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c | |||
| @@ -40,7 +40,6 @@ | |||
| 40 | #include "xfs_ialloc.h" | 40 | #include "xfs_ialloc.h" |
| 41 | #include "xfs_btree.h" | 41 | #include "xfs_btree.h" |
| 42 | #include "xfs_bmap.h" | 42 | #include "xfs_bmap.h" |
| 43 | #include "xfs_bit.h" | ||
| 44 | #include "xfs_rtalloc.h" | 43 | #include "xfs_rtalloc.h" |
| 45 | #include "xfs_error.h" | 44 | #include "xfs_error.h" |
| 46 | #include "xfs_itable.h" | 45 | #include "xfs_itable.h" |
diff --git a/include/asm-parisc/cache.h b/include/asm-parisc/cache.h index 38d201b5652d..93f179f13ce8 100644 --- a/include/asm-parisc/cache.h +++ b/include/asm-parisc/cache.h | |||
| @@ -29,14 +29,14 @@ | |||
| 29 | 29 | ||
| 30 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | 30 | #define SMP_CACHE_BYTES L1_CACHE_BYTES |
| 31 | 31 | ||
| 32 | extern void flush_data_cache_local(void); /* flushes local data-cache only */ | 32 | extern void flush_data_cache_local(void *); /* flushes local data-cache only */ |
| 33 | extern void flush_instruction_cache_local(void); /* flushes local code-cache only */ | 33 | extern void flush_instruction_cache_local(void *); /* flushes local code-cache only */ |
| 34 | #ifdef CONFIG_SMP | 34 | #ifdef CONFIG_SMP |
| 35 | extern void flush_data_cache(void); /* flushes data-cache only (all processors) */ | 35 | extern void flush_data_cache(void); /* flushes data-cache only (all processors) */ |
| 36 | extern void flush_instruction_cache(void); /* flushes i-cache only (all processors) */ | 36 | extern void flush_instruction_cache(void); /* flushes i-cache only (all processors) */ |
| 37 | #else | 37 | #else |
| 38 | #define flush_data_cache flush_data_cache_local | 38 | #define flush_data_cache() flush_data_cache_local(NULL) |
| 39 | #define flush_instruction_cache flush_instruction_cache_local | 39 | #define flush_instruction_cache() flush_instruction_cache_local(NULL) |
| 40 | #endif | 40 | #endif |
| 41 | 41 | ||
| 42 | extern void parisc_cache_init(void); /* initializes cache-flushing */ | 42 | extern void parisc_cache_init(void); /* initializes cache-flushing */ |
diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h index b9bb5946ecc9..0db00adc942a 100644 --- a/include/asm-parisc/io.h +++ b/include/asm-parisc/io.h | |||
| @@ -41,7 +41,7 @@ extern void __raw_bad_addr(const volatile void __iomem *addr); | |||
| 41 | #define __raw_check_addr(addr) \ | 41 | #define __raw_check_addr(addr) \ |
| 42 | if (((unsigned long)addr >> NYBBLE_SHIFT) != 0xe) \ | 42 | if (((unsigned long)addr >> NYBBLE_SHIFT) != 0xe) \ |
| 43 | __raw_bad_addr(addr); \ | 43 | __raw_bad_addr(addr); \ |
| 44 | addr = (void *)((unsigned long)addr | (0xfUL << NYBBLE_SHIFT)); | 44 | addr = (void __iomem *)((unsigned long)addr | (0xfUL << NYBBLE_SHIFT)); |
| 45 | #else | 45 | #else |
| 46 | #define gsc_check_addr(addr) | 46 | #define gsc_check_addr(addr) |
| 47 | #define __raw_check_addr(addr) | 47 | #define __raw_check_addr(addr) |
diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h index 44eae9f8274d..4a6752b0afed 100644 --- a/include/asm-parisc/page.h +++ b/include/asm-parisc/page.h | |||
| @@ -135,6 +135,13 @@ extern int npmem_ranges; | |||
| 135 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 135 | #define pfn_valid(pfn) ((pfn) < max_mapnr) |
| 136 | #endif /* CONFIG_DISCONTIGMEM */ | 136 | #endif /* CONFIG_DISCONTIGMEM */ |
| 137 | 137 | ||
| 138 | #ifdef CONFIG_HUGETLB_PAGE | ||
| 139 | #define HPAGE_SHIFT 22 /* 4MB (is this fixed?) */ | ||
| 140 | #define HPAGE_SIZE ((1UL) << HPAGE_SHIFT) | ||
| 141 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) | ||
| 142 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | ||
| 143 | #endif | ||
| 144 | |||
| 138 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | 145 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) |
| 139 | 146 | ||
| 140 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | 147 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) |
diff --git a/include/asm-parisc/pci.h b/include/asm-parisc/pci.h index fa39d07d49e9..f277254159b7 100644 --- a/include/asm-parisc/pci.h +++ b/include/asm-parisc/pci.h | |||
| @@ -84,11 +84,17 @@ static __inline__ int pci_is_lmmio(struct pci_hba_data *hba, unsigned long a) | |||
| 84 | /* | 84 | /* |
| 85 | ** Convert between PCI (IO_VIEW) addresses and processor (PA_VIEW) addresses. | 85 | ** Convert between PCI (IO_VIEW) addresses and processor (PA_VIEW) addresses. |
| 86 | ** See pcibios.c for more conversions used by Generic PCI code. | 86 | ** See pcibios.c for more conversions used by Generic PCI code. |
| 87 | ** | ||
| 88 | ** Platform characteristics/firmware guarantee that | ||
| 89 | ** (1) PA_VIEW - IO_VIEW = lmmio_offset for both LMMIO and ELMMIO | ||
| 90 | ** (2) PA_VIEW == IO_VIEW for GMMIO | ||
| 87 | */ | 91 | */ |
| 88 | #define PCI_BUS_ADDR(hba,a) (PCI_IS_LMMIO(hba,a) \ | 92 | #define PCI_BUS_ADDR(hba,a) (PCI_IS_LMMIO(hba,a) \ |
| 89 | ? ((a) - hba->lmmio_space_offset) /* mangle LMMIO */ \ | 93 | ? ((a) - hba->lmmio_space_offset) /* mangle LMMIO */ \ |
| 90 | : (a)) /* GMMIO */ | 94 | : (a)) /* GMMIO */ |
| 91 | #define PCI_HOST_ADDR(hba,a) ((a) + hba->lmmio_space_offset) | 95 | #define PCI_HOST_ADDR(hba,a) (((a) & PCI_F_EXTEND) == 0 \ |
| 96 | ? (a) + hba->lmmio_space_offset \ | ||
| 97 | : (a)) | ||
| 92 | 98 | ||
| 93 | #else /* !CONFIG_64BIT */ | 99 | #else /* !CONFIG_64BIT */ |
| 94 | 100 | ||
diff --git a/include/asm-parisc/processor.h b/include/asm-parisc/processor.h index aae40e8c3aa8..89f2f1c16c12 100644 --- a/include/asm-parisc/processor.h +++ b/include/asm-parisc/processor.h | |||
| @@ -144,16 +144,16 @@ struct thread_struct { | |||
| 144 | }) | 144 | }) |
| 145 | 145 | ||
| 146 | #define INIT_THREAD { \ | 146 | #define INIT_THREAD { \ |
| 147 | regs: { gr: { 0, }, \ | 147 | .regs = { .gr = { 0, }, \ |
| 148 | fr: { 0, }, \ | 148 | .fr = { 0, }, \ |
| 149 | sr: { 0, }, \ | 149 | .sr = { 0, }, \ |
| 150 | iasq: { 0, }, \ | 150 | .iasq = { 0, }, \ |
| 151 | iaoq: { 0, }, \ | 151 | .iaoq = { 0, }, \ |
| 152 | cr27: 0, \ | 152 | .cr27 = 0, \ |
| 153 | }, \ | 153 | }, \ |
| 154 | task_size: DEFAULT_TASK_SIZE, \ | 154 | .task_size = DEFAULT_TASK_SIZE, \ |
| 155 | map_base: DEFAULT_MAP_BASE, \ | 155 | .map_base = DEFAULT_MAP_BASE, \ |
| 156 | flags: 0 \ | 156 | .flags = 0 \ |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | /* | 159 | /* |
diff --git a/include/asm-parisc/tlbflush.h b/include/asm-parisc/tlbflush.h index c9ec39c6fc6c..825994a90e2d 100644 --- a/include/asm-parisc/tlbflush.h +++ b/include/asm-parisc/tlbflush.h | |||
| @@ -22,6 +22,7 @@ extern spinlock_t pa_tlb_lock; | |||
| 22 | #define purge_tlb_end(x) spin_unlock(&pa_tlb_lock) | 22 | #define purge_tlb_end(x) spin_unlock(&pa_tlb_lock) |
| 23 | 23 | ||
| 24 | extern void flush_tlb_all(void); | 24 | extern void flush_tlb_all(void); |
| 25 | extern void flush_tlb_all_local(void *); | ||
| 25 | 26 | ||
| 26 | /* | 27 | /* |
| 27 | * flush_tlb_mm() | 28 | * flush_tlb_mm() |
diff --git a/include/asm-powerpc/elf.h b/include/asm-powerpc/elf.h index c5a635d9bba4..45f2af6f89c4 100644 --- a/include/asm-powerpc/elf.h +++ b/include/asm-powerpc/elf.h | |||
| @@ -92,7 +92,6 @@ | |||
| 92 | * as published by the Free Software Foundation; either version | 92 | * as published by the Free Software Foundation; either version |
| 93 | * 2 of the License, or (at your option) any later version. | 93 | * 2 of the License, or (at your option) any later version. |
| 94 | */ | 94 | */ |
| 95 | #include <asm/ptrace.h> | ||
| 96 | 95 | ||
| 97 | #define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ | 96 | #define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ |
| 98 | #define ELF_NFPREG 33 /* includes fpscr */ | 97 | #define ELF_NFPREG 33 /* includes fpscr */ |
diff --git a/include/linux/cache.h b/include/linux/cache.h index ffe52210fc4f..d22e632f41fb 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | 13 | #define SMP_CACHE_BYTES L1_CACHE_BYTES |
| 14 | #endif | 14 | #endif |
| 15 | 15 | ||
| 16 | #if defined(CONFIG_X86) || defined(CONFIG_SPARC64) || defined(CONFIG_IA64) | 16 | #if defined(CONFIG_X86) || defined(CONFIG_SPARC64) || defined(CONFIG_IA64) || defined(CONFIG_PARISC) |
| 17 | #define __read_mostly __attribute__((__section__(".data.read_mostly"))) | 17 | #define __read_mostly __attribute__((__section__(".data.read_mostly"))) |
| 18 | #else | 18 | #else |
| 19 | #define __read_mostly | 19 | #define __read_mostly |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 3f1fafc0245e..e53d2c6fd5f4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -1027,7 +1027,7 @@ kernel_map_pages(struct page *page, int numpages, int enable) | |||
| 1027 | { | 1027 | { |
| 1028 | if (!PageHighMem(page) && !enable) | 1028 | if (!PageHighMem(page) && !enable) |
| 1029 | mutex_debug_check_no_locks_freed(page_address(page), | 1029 | mutex_debug_check_no_locks_freed(page_address(page), |
| 1030 | page_address(page + numpages)); | 1030 | numpages * PAGE_SIZE); |
| 1031 | } | 1031 | } |
| 1032 | #endif | 1032 | #endif |
| 1033 | 1033 | ||
diff --git a/include/linux/mutex-debug.h b/include/linux/mutex-debug.h index 8138d9eb58ec..8b5769f00467 100644 --- a/include/linux/mutex-debug.h +++ b/include/linux/mutex-debug.h | |||
| @@ -18,6 +18,6 @@ extern void FASTCALL(mutex_destroy(struct mutex *lock)); | |||
| 18 | extern void mutex_debug_show_all_locks(void); | 18 | extern void mutex_debug_show_all_locks(void); |
| 19 | extern void mutex_debug_show_held_locks(struct task_struct *filter); | 19 | extern void mutex_debug_show_held_locks(struct task_struct *filter); |
| 20 | extern void mutex_debug_check_no_locks_held(struct task_struct *task); | 20 | extern void mutex_debug_check_no_locks_held(struct task_struct *task); |
| 21 | extern void mutex_debug_check_no_locks_freed(const void *from, const void *to); | 21 | extern void mutex_debug_check_no_locks_freed(const void *from, unsigned long len); |
| 22 | 22 | ||
| 23 | #endif | 23 | #endif |
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 9bce0fee68d4..f1ac507fa20d 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
| 14 | #include <linux/spinlock_types.h> | 14 | #include <linux/spinlock_types.h> |
| 15 | #include <linux/linkage.h> | ||
| 15 | 16 | ||
| 16 | #include <asm/atomic.h> | 17 | #include <asm/atomic.h> |
| 17 | 18 | ||
| @@ -78,7 +79,7 @@ struct mutex_waiter { | |||
| 78 | # define mutex_debug_show_all_locks() do { } while (0) | 79 | # define mutex_debug_show_all_locks() do { } while (0) |
| 79 | # define mutex_debug_show_held_locks(p) do { } while (0) | 80 | # define mutex_debug_show_held_locks(p) do { } while (0) |
| 80 | # define mutex_debug_check_no_locks_held(task) do { } while (0) | 81 | # define mutex_debug_check_no_locks_held(task) do { } while (0) |
| 81 | # define mutex_debug_check_no_locks_freed(from, to) do { } while (0) | 82 | # define mutex_debug_check_no_locks_freed(from, len) do { } while (0) |
| 82 | #endif | 83 | #endif |
| 83 | 84 | ||
| 84 | #define __MUTEX_INITIALIZER(lockname) \ | 85 | #define __MUTEX_INITIALIZER(lockname) \ |
diff --git a/kernel/mutex-debug.c b/kernel/mutex-debug.c index 3dec75363786..f4913c376950 100644 --- a/kernel/mutex-debug.c +++ b/kernel/mutex-debug.c | |||
| @@ -333,9 +333,10 @@ void mutex_debug_check_no_locks_held(struct task_struct *task) | |||
| 333 | * is destroyed or reinitialized - this code checks whether there is | 333 | * is destroyed or reinitialized - this code checks whether there is |
| 334 | * any held lock in the memory range of <from> to <to>: | 334 | * any held lock in the memory range of <from> to <to>: |
| 335 | */ | 335 | */ |
| 336 | void mutex_debug_check_no_locks_freed(const void *from, const void *to) | 336 | void mutex_debug_check_no_locks_freed(const void *from, unsigned long len) |
| 337 | { | 337 | { |
| 338 | struct list_head *curr, *next; | 338 | struct list_head *curr, *next; |
| 339 | const void *to = from + len; | ||
| 339 | unsigned long flags; | 340 | unsigned long flags; |
| 340 | struct mutex *lock; | 341 | struct mutex *lock; |
| 341 | void *lock_addr; | 342 | void *lock_addr; |
| @@ -437,7 +438,7 @@ void debug_mutex_init(struct mutex *lock, const char *name) | |||
| 437 | /* | 438 | /* |
| 438 | * Make sure we are not reinitializing a held lock: | 439 | * Make sure we are not reinitializing a held lock: |
| 439 | */ | 440 | */ |
| 440 | mutex_debug_check_no_locks_freed((void *)lock, (void *)(lock + 1)); | 441 | mutex_debug_check_no_locks_freed((void *)lock, sizeof(*lock)); |
| 441 | lock->owner = NULL; | 442 | lock->owner = NULL; |
| 442 | INIT_LIST_HEAD(&lock->held_list); | 443 | INIT_LIST_HEAD(&lock->held_list); |
| 443 | lock->name = name; | 444 | lock->name = name; |
| @@ -459,4 +460,3 @@ void fastcall mutex_destroy(struct mutex *lock) | |||
| 459 | } | 460 | } |
| 460 | 461 | ||
| 461 | EXPORT_SYMBOL_GPL(mutex_destroy); | 462 | EXPORT_SYMBOL_GPL(mutex_destroy); |
| 462 | |||
diff --git a/kernel/mutex.c b/kernel/mutex.c index 5c2561844196..5449b210d9ed 100644 --- a/kernel/mutex.c +++ b/kernel/mutex.c | |||
| @@ -202,7 +202,7 @@ __mutex_lock_slowpath(atomic_t *lock_count __IP_DECL__) | |||
| 202 | static fastcall noinline void | 202 | static fastcall noinline void |
| 203 | __mutex_unlock_slowpath(atomic_t *lock_count __IP_DECL__) | 203 | __mutex_unlock_slowpath(atomic_t *lock_count __IP_DECL__) |
| 204 | { | 204 | { |
| 205 | struct mutex *lock = container_of(lock_count, struct mutex, count); | 205 | struct mutex *lock = container_of(lock_count, struct mutex, count); |
| 206 | 206 | ||
| 207 | DEBUG_WARN_ON(lock->owner != current_thread_info()); | 207 | DEBUG_WARN_ON(lock->owner != current_thread_info()); |
| 208 | 208 | ||
| @@ -313,6 +313,3 @@ int fastcall mutex_trylock(struct mutex *lock) | |||
| 313 | } | 313 | } |
| 314 | 314 | ||
| 315 | EXPORT_SYMBOL(mutex_trylock); | 315 | EXPORT_SYMBOL(mutex_trylock); |
| 316 | |||
| 317 | |||
| 318 | |||
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a5e6891f7bb6..8e363536e2da 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
| @@ -417,7 +417,7 @@ static void __free_pages_ok(struct page *page, unsigned int order) | |||
| 417 | arch_free_page(page, order); | 417 | arch_free_page(page, order); |
| 418 | if (!PageHighMem(page)) | 418 | if (!PageHighMem(page)) |
| 419 | mutex_debug_check_no_locks_freed(page_address(page), | 419 | mutex_debug_check_no_locks_freed(page_address(page), |
| 420 | page_address(page+(1<<order))); | 420 | PAGE_SIZE<<order); |
| 421 | 421 | ||
| 422 | #ifndef CONFIG_MMU | 422 | #ifndef CONFIG_MMU |
| 423 | for (i = 1 ; i < (1 << order) ; ++i) | 423 | for (i = 1 ; i < (1 << order) ; ++i) |
| @@ -3071,7 +3071,7 @@ void kfree(const void *objp) | |||
| 3071 | local_irq_save(flags); | 3071 | local_irq_save(flags); |
| 3072 | kfree_debugcheck(objp); | 3072 | kfree_debugcheck(objp); |
| 3073 | c = page_get_cache(virt_to_page(objp)); | 3073 | c = page_get_cache(virt_to_page(objp)); |
| 3074 | mutex_debug_check_no_locks_freed(objp, objp+obj_reallen(c)); | 3074 | mutex_debug_check_no_locks_freed(objp, obj_reallen(c)); |
| 3075 | __cache_free(c, (void *)objp); | 3075 | __cache_free(c, (void *)objp); |
| 3076 | local_irq_restore(flags); | 3076 | local_irq_restore(flags); |
| 3077 | } | 3077 | } |
diff --git a/mm/swapfile.c b/mm/swapfile.c index 6544565a7c0f..d8a5afc8b2a3 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
| @@ -1442,7 +1442,7 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) | |||
| 1442 | else if (!memcmp("SWAPSPACE2",swap_header->magic.magic,10)) | 1442 | else if (!memcmp("SWAPSPACE2",swap_header->magic.magic,10)) |
| 1443 | swap_header_version = 2; | 1443 | swap_header_version = 2; |
| 1444 | else { | 1444 | else { |
| 1445 | printk("Unable to find swap-space signature\n"); | 1445 | printk(KERN_ERR "Unable to find swap-space signature\n"); |
| 1446 | error = -EINVAL; | 1446 | error = -EINVAL; |
| 1447 | goto bad_swap; | 1447 | goto bad_swap; |
| 1448 | } | 1448 | } |
diff --git a/net/core/wireless.c b/net/core/wireless.c index f88b0affb3b9..2add7ed609e9 100644 --- a/net/core/wireless.c +++ b/net/core/wireless.c | |||
| @@ -78,6 +78,7 @@ | |||
| 78 | #include <linux/seq_file.h> | 78 | #include <linux/seq_file.h> |
| 79 | #include <linux/init.h> /* for __init */ | 79 | #include <linux/init.h> /* for __init */ |
| 80 | #include <linux/if_arp.h> /* ARPHRD_ETHER */ | 80 | #include <linux/if_arp.h> /* ARPHRD_ETHER */ |
| 81 | #include <linux/etherdevice.h> /* compare_ether_addr */ | ||
| 81 | 82 | ||
| 82 | #include <linux/wireless.h> /* Pretty obvious */ | 83 | #include <linux/wireless.h> /* Pretty obvious */ |
| 83 | #include <net/iw_handler.h> /* New driver API */ | 84 | #include <net/iw_handler.h> /* New driver API */ |
diff --git a/net/decnet/netfilter/dn_rtmsg.c b/net/decnet/netfilter/dn_rtmsg.c index 1ab94c6e22ed..16a5a31e2126 100644 --- a/net/decnet/netfilter/dn_rtmsg.c +++ b/net/decnet/netfilter/dn_rtmsg.c | |||
| @@ -26,8 +26,6 @@ | |||
| 26 | #include <net/dn.h> | 26 | #include <net/dn.h> |
| 27 | #include <net/dn_route.h> | 27 | #include <net/dn_route.h> |
| 28 | 28 | ||
| 29 | #include <linux/netfilter_decnet.h> | ||
| 30 | |||
| 31 | static struct sock *dnrmg = NULL; | 29 | static struct sock *dnrmg = NULL; |
| 32 | 30 | ||
| 33 | 31 | ||
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c index f2a90e2743d7..3021af0910f1 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c | |||
| @@ -16,7 +16,6 @@ | |||
| 16 | #include <linux/skbuff.h> | 16 | #include <linux/skbuff.h> |
| 17 | #include <net/ip.h> | 17 | #include <net/ip.h> |
| 18 | #include <net/checksum.h> | 18 | #include <net/checksum.h> |
| 19 | #include <linux/netfilter.h> | ||
| 20 | #include <linux/netfilter_ipv4.h> | 19 | #include <linux/netfilter_ipv4.h> |
| 21 | #include <linux/netfilter_ipv4/ip_conntrack.h> | 20 | #include <linux/netfilter_ipv4/ip_conntrack.h> |
| 22 | #include <linux/netfilter_ipv4/ip_conntrack_core.h> | 21 | #include <linux/netfilter_ipv4/ip_conntrack_core.h> |
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c index ea2b39c18050..e0dc37063545 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c | |||
| @@ -32,7 +32,6 @@ | |||
| 32 | 32 | ||
| 33 | #include <net/tcp.h> | 33 | #include <net/tcp.h> |
| 34 | 34 | ||
| 35 | #include <linux/netfilter.h> | ||
| 36 | #include <linux/netfilter_ipv4.h> | 35 | #include <linux/netfilter_ipv4.h> |
| 37 | #include <linux/netfilter_ipv4/ip_conntrack.h> | 36 | #include <linux/netfilter_ipv4/ip_conntrack.h> |
| 38 | #include <linux/netfilter_ipv4/ip_conntrack_protocol.h> | 37 | #include <linux/netfilter_ipv4/ip_conntrack_protocol.h> |
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_udp.c b/net/ipv4/netfilter/ip_conntrack_proto_udp.c index 004003fd6117..55b7d3210adf 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_udp.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_udp.c | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | #include <linux/udp.h> | 15 | #include <linux/udp.h> |
| 16 | #include <linux/seq_file.h> | 16 | #include <linux/seq_file.h> |
| 17 | #include <net/checksum.h> | 17 | #include <net/checksum.h> |
| 18 | #include <linux/netfilter.h> | ||
| 19 | #include <linux/netfilter_ipv4.h> | 18 | #include <linux/netfilter_ipv4.h> |
| 20 | #include <linux/netfilter_ipv4/ip_conntrack_protocol.h> | 19 | #include <linux/netfilter_ipv4/ip_conntrack_protocol.h> |
| 21 | 20 | ||
diff --git a/net/ipv6/Makefile b/net/ipv6/Makefile index bf18cff13120..41877abd22e6 100644 --- a/net/ipv6/Makefile +++ b/net/ipv6/Makefile | |||
| @@ -12,13 +12,14 @@ ipv6-objs := af_inet6.o anycast.o ip6_output.o ip6_input.o addrconf.o sit.o \ | |||
| 12 | 12 | ||
| 13 | ipv6-$(CONFIG_XFRM) += xfrm6_policy.o xfrm6_state.o xfrm6_input.o \ | 13 | ipv6-$(CONFIG_XFRM) += xfrm6_policy.o xfrm6_state.o xfrm6_input.o \ |
| 14 | xfrm6_output.o | 14 | xfrm6_output.o |
| 15 | ipv6-$(CONFIG_NETFILTER) += netfilter.o | ||
| 15 | ipv6-objs += $(ipv6-y) | 16 | ipv6-objs += $(ipv6-y) |
| 16 | 17 | ||
| 17 | obj-$(CONFIG_INET6_AH) += ah6.o | 18 | obj-$(CONFIG_INET6_AH) += ah6.o |
| 18 | obj-$(CONFIG_INET6_ESP) += esp6.o | 19 | obj-$(CONFIG_INET6_ESP) += esp6.o |
| 19 | obj-$(CONFIG_INET6_IPCOMP) += ipcomp6.o | 20 | obj-$(CONFIG_INET6_IPCOMP) += ipcomp6.o |
| 20 | obj-$(CONFIG_INET6_TUNNEL) += xfrm6_tunnel.o | 21 | obj-$(CONFIG_INET6_TUNNEL) += xfrm6_tunnel.o |
| 21 | obj-$(CONFIG_NETFILTER) += netfilter.o netfilter/ | 22 | obj-$(CONFIG_NETFILTER) += netfilter/ |
| 22 | 23 | ||
| 23 | obj-$(CONFIG_IPV6_TUNNEL) += ip6_tunnel.o | 24 | obj-$(CONFIG_IPV6_TUNNEL) += ip6_tunnel.o |
| 24 | 25 | ||
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c index 1ab62f033664..d750cfc019dc 100644 --- a/net/ipv6/netfilter.c +++ b/net/ipv6/netfilter.c | |||
| @@ -90,7 +90,10 @@ int __init ipv6_netfilter_init(void) | |||
| 90 | return nf_register_queue_rerouter(PF_INET6, &ip6_reroute); | 90 | return nf_register_queue_rerouter(PF_INET6, &ip6_reroute); |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | void __exit ipv6_netfilter_fini(void) | 93 | /* This can be called from inet6_init() on errors, so it cannot |
| 94 | * be marked __exit. -DaveM | ||
| 95 | */ | ||
| 96 | void ipv6_netfilter_fini(void) | ||
| 94 | { | 97 | { |
| 95 | nf_unregister_queue_rerouter(PF_INET6); | 98 | nf_unregister_queue_rerouter(PF_INET6); |
| 96 | } | 99 | } |
diff --git a/sound/oss/harmony.c b/sound/oss/harmony.c index bee9d344cd26..591683c55f27 100644 --- a/sound/oss/harmony.c +++ b/sound/oss/harmony.c | |||
| @@ -1236,7 +1236,7 @@ harmony_driver_probe(struct parisc_device *dev) | |||
| 1236 | } | 1236 | } |
| 1237 | 1237 | ||
| 1238 | /* Set the HPA of harmony */ | 1238 | /* Set the HPA of harmony */ |
| 1239 | harmony.hpa = (struct harmony_hpa *)dev->hpa; | 1239 | harmony.hpa = (struct harmony_hpa *)dev->hpa.start; |
| 1240 | harmony.dev = dev; | 1240 | harmony.dev = dev; |
| 1241 | 1241 | ||
| 1242 | /* Grab the ID and revision from the device */ | 1242 | /* Grab the ID and revision from the device */ |
| @@ -1250,7 +1250,7 @@ harmony_driver_probe(struct parisc_device *dev) | |||
| 1250 | 1250 | ||
| 1251 | printk(KERN_INFO "Lasi Harmony Audio driver " HARMONY_VERSION ", " | 1251 | printk(KERN_INFO "Lasi Harmony Audio driver " HARMONY_VERSION ", " |
| 1252 | "h/w id %i, rev. %i at 0x%lx, IRQ %i\n", | 1252 | "h/w id %i, rev. %i at 0x%lx, IRQ %i\n", |
| 1253 | id, rev, dev->hpa, harmony.dev->irq); | 1253 | id, rev, dev->hpa.start, harmony.dev->irq); |
| 1254 | 1254 | ||
| 1255 | /* Make sure the control bit isn't set, although I don't think it | 1255 | /* Make sure the control bit isn't set, although I don't think it |
| 1256 | ever is. */ | 1256 | ever is. */ |
