diff --git a/[refs] b/[refs] index 49bbe8cd5183..efe842752fb6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 56ac36d722d0d27c03599d1245ac0ab59e474e5c +refs/heads/master: 3141eb6c50f1dafa99874e702d8b444034e2bb10 diff --git a/trunk/Documentation/00-INDEX b/trunk/Documentation/00-INDEX index 6de71308a906..5b5aba404aac 100644 --- a/trunk/Documentation/00-INDEX +++ b/trunk/Documentation/00-INDEX @@ -89,8 +89,6 @@ cciss.txt - info, major/minor #'s for Compaq's SMART Array Controllers. cdrom/ - directory with information on the CD-ROM drivers that Linux has. -cli-sti-removal.txt - - cli()/sti() removal guide. computone.txt - info on Computone Intelliport II/Plus Multiport Serial Driver. connector/ diff --git a/trunk/Documentation/DocBook/Makefile b/trunk/Documentation/DocBook/Makefile index 0eb0d027eb32..1615350b7b53 100644 --- a/trunk/Documentation/DocBook/Makefile +++ b/trunk/Documentation/DocBook/Makefile @@ -12,7 +12,7 @@ DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \ kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \ gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ - mac80211.xml debugobjects.xml + mac80211.xml debugobjects.xml sh.xml ### # The build process is as follows (targets): @@ -102,6 +102,13 @@ C-procfs-example = procfs_example.xml C-procfs-example2 = $(addprefix $(obj)/,$(C-procfs-example)) $(obj)/procfs-guide.xml: $(C-procfs-example2) +# List of programs to build +##oops, this is a kernel module::hostprogs-y := procfs_example +obj-m += procfs_example.o + +# Tell kbuild to always build the programs +always := $(hostprogs-y) + notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \ exit 1 db2xtemplate = db2TYPE -o $(dir $@) $< diff --git a/trunk/Documentation/DocBook/procfs_example.c b/trunk/Documentation/DocBook/procfs_example.c index 7064084c1c5e..2f3de0fb8365 100644 --- a/trunk/Documentation/DocBook/procfs_example.c +++ b/trunk/Documentation/DocBook/procfs_example.c @@ -189,8 +189,6 @@ static int __init init_procfs_example(void) return 0; no_symlink: - remove_proc_entry("tty", example_dir); -no_tty: remove_proc_entry("bar", example_dir); no_bar: remove_proc_entry("foo", example_dir); @@ -206,7 +204,6 @@ static int __init init_procfs_example(void) static void __exit cleanup_procfs_example(void) { remove_proc_entry("jiffies_too", example_dir); - remove_proc_entry("tty", example_dir); remove_proc_entry("bar", example_dir); remove_proc_entry("foo", example_dir); remove_proc_entry("jiffies", example_dir); @@ -222,3 +219,4 @@ module_exit(cleanup_procfs_example); MODULE_AUTHOR("Erik Mouw"); MODULE_DESCRIPTION("procfs examples"); +MODULE_LICENSE("GPL"); diff --git a/trunk/Documentation/DocBook/s390-drivers.tmpl b/trunk/Documentation/DocBook/s390-drivers.tmpl index 4acc73240a6d..95bfc12e5439 100644 --- a/trunk/Documentation/DocBook/s390-drivers.tmpl +++ b/trunk/Documentation/DocBook/s390-drivers.tmpl @@ -100,7 +100,7 @@ the hardware structures represented here, please consult the Principles of Operation. -!Iinclude/asm-s390/cio.h +!Iarch/s390/include/asm/cio.h ccw devices @@ -114,7 +114,7 @@ ccw device structure. Device drivers must not bypass those functions or strange side effects may happen. -!Iinclude/asm-s390/ccwdev.h +!Iarch/s390/include/asm/ccwdev.h !Edrivers/s390/cio/device.c !Edrivers/s390/cio/device_ops.c @@ -125,7 +125,7 @@ measurement data which is made available by the channel subsystem for each channel attached device. -!Iinclude/asm-s390/cmb.h +!Iarch/s390/include/asm/cmb.h !Edrivers/s390/cio/cmf.c @@ -142,7 +142,7 @@ ccw group devices -!Iinclude/asm-s390/ccwgroup.h +!Iarch/s390/include/asm/ccwgroup.h !Edrivers/s390/cio/ccwgroup.c diff --git a/trunk/Documentation/DocBook/sh.tmpl b/trunk/Documentation/DocBook/sh.tmpl new file mode 100644 index 000000000000..0c3dc4c69dd1 --- /dev/null +++ b/trunk/Documentation/DocBook/sh.tmpl @@ -0,0 +1,105 @@ + + + + + + SuperH Interfaces Guide + + + + Paul + Mundt + +
+ lethal@linux-sh.org +
+
+
+
+ + + 2008 + Paul Mundt + + + 2008 + Renesas Technology Corp. + + + + + This documentation is free software; you can redistribute + it and/or modify it under the terms of the GNU General Public + License version 2 as published by the Free Software Foundation. + + + + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + + + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + + + + For more details see the file COPYING in the source + distribution of Linux. + + +
+ + + + + Memory Management + + SH-4 + + Store Queue API +!Earch/sh/kernel/cpu/sh4/sq.c + + + + SH-5 + + TLB Interfaces +!Iarch/sh/mm/tlb-sh5.c +!Iarch/sh/include/asm/tlb_64.h + + + + + Clock Framework Extensions +!Iarch/sh/include/asm/clock.h + + + Machine Specific Interfaces + + mach-dreamcast +!Iarch/sh/boards/mach-dreamcast/rtc.c + + + mach-x3proto +!Earch/sh/boards/mach-x3proto/ilsel.c + + + + Busses + + SuperHyway +!Edrivers/sh/superhyway/superhyway.c + + + + Maple +!Edrivers/sh/maple/maple.c + + +
diff --git a/trunk/Documentation/DocBook/videobook.tmpl b/trunk/Documentation/DocBook/videobook.tmpl index 89817795e668..0bc25949b668 100644 --- a/trunk/Documentation/DocBook/videobook.tmpl +++ b/trunk/Documentation/DocBook/videobook.tmpl @@ -1648,7 +1648,7 @@ static struct video_buffer capture_fb; Public Functions Provided -!Edrivers/media/video/videodev.c +!Edrivers/media/video/v4l2-dev.c diff --git a/trunk/Documentation/DocBook/z8530book.tmpl b/trunk/Documentation/DocBook/z8530book.tmpl index 42c75ba71ba2..a42a8a4c7689 100644 --- a/trunk/Documentation/DocBook/z8530book.tmpl +++ b/trunk/Documentation/DocBook/z8530book.tmpl @@ -69,12 +69,6 @@ device to be used as both a tty interface and as a synchronous controller is a project for Linux post the 2.4 release - - The support code handles most common card configurations and - supports running both Cisco HDLC and Synchronous PPP. With extra - glue the frame relay and X.25 protocols can also be used with this - driver. - @@ -179,35 +173,27 @@ If you wish to use the network interface facilities of the driver, then you need to attach a network device to each channel that is - present and in use. In addition to use the SyncPPP and Cisco HDLC + present and in use. In addition to use the generic HDLC you need to follow some additional plumbing rules. They may seem complex but a look at the example hostess_sv11 driver should reassure you. The network device used for each channel should be pointed to by - the netdevice field of each channel. The dev-> priv field of the + the netdevice field of each channel. The hdlc-> priv field of the network device points to your private data - you will need to be - able to find your ppp device from this. In addition to use the - sync ppp layer the private data must start with a void * pointer - to the syncppp structures. + able to find your private data from this. The way most drivers approach this particular problem is to create a structure holding the Z8530 device definition and - put that and the syncppp pointer into the private field of - the network device. The network device fields of the channels - then point back to the network devices. The ppp_device can also - be put in the private structure conveniently. + put that into the private field of the network device. The + network device fields of the channels then point back to the + network devices. - If you wish to use the synchronous ppp then you need to attach - the syncppp layer to the network device. You should do this before - you register the network device. The - sppp_attach requires that the first void * - pointer in your private data is pointing to an empty struct - ppp_device. The function fills in the initial data for the - ppp/hdlc layer. + If you wish to use the generic HDLC then you need to register + the HDLC device. Before you register your network device you will also need to @@ -314,10 +300,10 @@ buffer in sk_buff format and queues it for transmission. The caller must provide the entire packet with the exception of the bitstuffing and CRC. This is normally done by the caller via - the syncppp interface layer. It returns 0 if the buffer has been - queued and non zero values for queue full. If the function accepts - the buffer it becomes property of the Z8530 layer and the caller - should not free it. + the generic HDLC interface layer. It returns 0 if the buffer has been + queued and non zero values for queue full. If the function accepts + the buffer it becomes property of the Z8530 layer and the caller + should not free it. The function z8530_get_stats returns a pointer diff --git a/trunk/Documentation/Makefile b/trunk/Documentation/Makefile new file mode 100644 index 000000000000..94b945733534 --- /dev/null +++ b/trunk/Documentation/Makefile @@ -0,0 +1,3 @@ +obj-m := DocBook/ accounting/ auxdisplay/ connector/ \ + filesystems/configfs/ ia64/ networking/ \ + pcmcia/ spi/ video4linux/ vm/ watchdog/src/ diff --git a/trunk/Documentation/accounting/Makefile b/trunk/Documentation/accounting/Makefile new file mode 100644 index 000000000000..31929eb875b1 --- /dev/null +++ b/trunk/Documentation/accounting/Makefile @@ -0,0 +1,10 @@ +# kbuild trick to avoid linker error. Can be omitted if a module is built. +obj- := dummy.o + +# List of programs to build +hostprogs-y := getdelays + +# Tell kbuild to always build the programs +always := $(hostprogs-y) + +HOSTCFLAGS_getdelays.o += -I$(objtree)/usr/include diff --git a/trunk/Documentation/accounting/getdelays.c b/trunk/Documentation/accounting/getdelays.c index 3f7755f3963f..cc49400b4af8 100644 --- a/trunk/Documentation/accounting/getdelays.c +++ b/trunk/Documentation/accounting/getdelays.c @@ -201,13 +201,19 @@ void print_delayacct(struct taskstats *t) "RECLAIM %12s%15s\n" " %15llu%15llu\n", "count", "real total", "virtual total", "delay total", - t->cpu_count, t->cpu_run_real_total, t->cpu_run_virtual_total, - t->cpu_delay_total, + (unsigned long long)t->cpu_count, + (unsigned long long)t->cpu_run_real_total, + (unsigned long long)t->cpu_run_virtual_total, + (unsigned long long)t->cpu_delay_total, "count", "delay total", - t->blkio_count, t->blkio_delay_total, - "count", "delay total", t->swapin_count, t->swapin_delay_total, + (unsigned long long)t->blkio_count, + (unsigned long long)t->blkio_delay_total, "count", "delay total", - t->freepages_count, t->freepages_delay_total); + (unsigned long long)t->swapin_count, + (unsigned long long)t->swapin_delay_total, + "count", "delay total", + (unsigned long long)t->freepages_count, + (unsigned long long)t->freepages_delay_total); } void task_context_switch_counts(struct taskstats *t) @@ -215,14 +221,17 @@ void task_context_switch_counts(struct taskstats *t) printf("\n\nTask %15s%15s\n" " %15llu%15llu\n", "voluntary", "nonvoluntary", - t->nvcsw, t->nivcsw); + (unsigned long long)t->nvcsw, (unsigned long long)t->nivcsw); } void print_cgroupstats(struct cgroupstats *c) { printf("sleeping %llu, blocked %llu, running %llu, stopped %llu, " - "uninterruptible %llu\n", c->nr_sleeping, c->nr_io_wait, - c->nr_running, c->nr_stopped, c->nr_uninterruptible); + "uninterruptible %llu\n", (unsigned long long)c->nr_sleeping, + (unsigned long long)c->nr_io_wait, + (unsigned long long)c->nr_running, + (unsigned long long)c->nr_stopped, + (unsigned long long)c->nr_uninterruptible); } diff --git a/trunk/Documentation/arm/IXP4xx b/trunk/Documentation/arm/IXP4xx index 43edb4ecf27d..72fbcc4fcab0 100644 --- a/trunk/Documentation/arm/IXP4xx +++ b/trunk/Documentation/arm/IXP4xx @@ -32,7 +32,7 @@ Linux currently supports the following features on the IXP4xx chips: - Flash access (MTD/JFFS) - I2C through GPIO on IXP42x - GPIO for input/output/interrupts - See include/asm-arm/arch-ixp4xx/platform.h for access functions. + See arch/arm/mach-ixp4xx/include/mach/platform.h for access functions. - Timers (watchdog, OS) The following components of the chips are not supported by Linux and diff --git a/trunk/Documentation/arm/Interrupts b/trunk/Documentation/arm/Interrupts index c202ed35d7d6..f09ab1b90ef1 100644 --- a/trunk/Documentation/arm/Interrupts +++ b/trunk/Documentation/arm/Interrupts @@ -158,7 +158,7 @@ So, what's changed? be re-checked for pending events. (see the Neponset IRQ handler for details). -7. fixup_irq() is gone, as is include/asm-arm/arch-*/irq.h +7. fixup_irq() is gone, as is arch/arm/mach-*/include/mach/irq.h Please note that this will not solve all problems - some of them are hardware based. Mixing level-based and edge-based IRQs on the same diff --git a/trunk/Documentation/arm/README b/trunk/Documentation/arm/README index 9b9c8226fdc4..d98783fbe0c7 100644 --- a/trunk/Documentation/arm/README +++ b/trunk/Documentation/arm/README @@ -79,7 +79,7 @@ Machine/Platform support To this end, we now have arch/arm/mach-$(MACHINE) directories which are designed to house the non-driver files for a particular machine (eg, PCI, memory management, architecture definitions etc). For all future - machines, there should be a corresponding include/asm-arm/arch-$(MACHINE) + machines, there should be a corresponding arch/arm/mach-$(MACHINE)/include/mach directory. @@ -176,7 +176,7 @@ Kernel entry (head.S) class typically based around one or more system on a chip devices, and acts as a natural container around the actual implementations. These classes are given directories - arch/arm/mach- and - include/asm-arm/arch- - which contain the source files to + arch/arm/mach- - which contain the source files to/include/mach support the machine class. This directories also contain any machine specific supporting code. diff --git a/trunk/Documentation/arm/Samsung-S3C24XX/GPIO.txt b/trunk/Documentation/arm/Samsung-S3C24XX/GPIO.txt index 8caea8c237ee..b5d20c0b2ab4 100644 --- a/trunk/Documentation/arm/Samsung-S3C24XX/GPIO.txt +++ b/trunk/Documentation/arm/Samsung-S3C24XX/GPIO.txt @@ -16,13 +16,13 @@ Introduction Headers ------- - See include/asm-arm/arch-s3c2410/regs-gpio.h for the list + See arch/arm/mach-s3c2410/include/mach/regs-gpio.h for the list of GPIO pins, and the configuration values for them. This - is included by using #include + is included by using #include The GPIO management functions are defined in the hardware - header include/asm-arm/arch-s3c2410/hardware.h which can be - included by #include + header arch/arm/mach-s3c2410/include/mach/hardware.h which can be + included by #include A useful amount of documentation can be found in the hardware header on how the GPIO functions (and others) work. diff --git a/trunk/Documentation/arm/Samsung-S3C24XX/Overview.txt b/trunk/Documentation/arm/Samsung-S3C24XX/Overview.txt index d04e1e30c47f..014a8ec4877d 100644 --- a/trunk/Documentation/arm/Samsung-S3C24XX/Overview.txt +++ b/trunk/Documentation/arm/Samsung-S3C24XX/Overview.txt @@ -36,7 +36,7 @@ Layout in arch/arm/mach-s3c2410 and S3C2440 in arch/arm/mach-s3c2440 Register, kernel and platform data definitions are held in the - include/asm-arm/arch-s3c2410 directory. + arch/arm/mach-s3c2410 directory./include/mach Machines diff --git a/trunk/Documentation/arm/Samsung-S3C24XX/USB-Host.txt b/trunk/Documentation/arm/Samsung-S3C24XX/USB-Host.txt index b93b68e2b143..67671eba4231 100644 --- a/trunk/Documentation/arm/Samsung-S3C24XX/USB-Host.txt +++ b/trunk/Documentation/arm/Samsung-S3C24XX/USB-Host.txt @@ -49,7 +49,7 @@ Board Support Platform Data ------------- - See linux/include/asm-arm/arch-s3c2410/usb-control.h for the + See arch/arm/mach-s3c2410/include/mach/usb-control.h for the descriptions of the platform device data. An implementation can be found in linux/arch/arm/mach-s3c2410/usb-simtec.c . diff --git a/trunk/Documentation/auxdisplay/Makefile b/trunk/Documentation/auxdisplay/Makefile new file mode 100644 index 000000000000..51fe23332c81 --- /dev/null +++ b/trunk/Documentation/auxdisplay/Makefile @@ -0,0 +1,10 @@ +# kbuild trick to avoid linker error. Can be omitted if a module is built. +obj- := dummy.o + +# List of programs to build +hostprogs-y := cfag12864b-example + +# Tell kbuild to always build the programs +always := $(hostprogs-y) + +HOSTCFLAGS_cfag12864b-example.o += -I$(objtree)/usr/include diff --git a/trunk/Documentation/cciss.txt b/trunk/Documentation/cciss.txt index 63e59b8847c5..8244c6442faa 100644 --- a/trunk/Documentation/cciss.txt +++ b/trunk/Documentation/cciss.txt @@ -112,27 +112,18 @@ Hot plug support for SCSI tape drives Hot plugging of SCSI tape drives is supported, with some caveats. The cciss driver must be informed that changes to the SCSI bus -have been made, in addition to and prior to informing the SCSI -mid layer. This may be done via the /proc filesystem. For example: +have been made. This may be done via the /proc filesystem. +For example: echo "rescan" > /proc/scsi/cciss0/1 -This causes the adapter to query the adapter about changes to the -physical SCSI buses and/or fibre channel arbitrated loop and the +This causes the driver to query the adapter about changes to the +physical SCSI buses and/or fibre channel arbitrated loop and the driver to make note of any new or removed sequential access devices or medium changers. The driver will output messages indicating what devices have been added or removed and the controller, bus, target and -lun used to address the device. Once this is done, the SCSI mid layer -can be informed of changes to the virtual SCSI bus which the driver -presents to it in the usual way. For example: - - echo scsi add-single-device 3 2 1 0 > /proc/scsi/scsi - -to add a device on controller 3, bus 2, target 1, lun 0. Note that -the driver makes an effort to preserve the devices positions -in the virtual SCSI bus, so if you are only moving tape drives -around on the same adapter and not adding or removing tape drives -from the adapter, informing the SCSI mid layer may not be necessary. +lun used to address the device. It then notifies the SCSI mid layer +of these changes. Note that the naming convention of the /proc filesystem entries contains a number in addition to the driver name. (E.g. "cciss0" diff --git a/trunk/Documentation/cli-sti-removal.txt b/trunk/Documentation/cli-sti-removal.txt deleted file mode 100644 index 60932b02fcb3..000000000000 --- a/trunk/Documentation/cli-sti-removal.txt +++ /dev/null @@ -1,133 +0,0 @@ - -#### cli()/sti() removal guide, started by Ingo Molnar - - -as of 2.5.28, five popular macros have been removed on SMP, and -are being phased out on UP: - - cli(), sti(), save_flags(flags), save_flags_cli(flags), restore_flags(flags) - -until now it was possible to protect driver code against interrupt -handlers via a cli(), but from now on other, more lightweight methods -have to be used for synchronization, such as spinlocks or semaphores. - -for example, driver code that used to do something like: - - struct driver_data; - - irq_handler (...) - { - .... - driver_data.finish = 1; - driver_data.new_work = 0; - .... - } - - ... - - ioctl_func (...) - { - ... - cli(); - ... - driver_data.finish = 0; - driver_data.new_work = 2; - ... - sti(); - ... - } - -was SMP-correct because the cli() function ensured that no -interrupt handler (amongst them the above irq_handler()) function -would execute while the cli()-ed section is executing. - -but from now on a more direct method of locking has to be used: - - DEFINE_SPINLOCK(driver_lock); - struct driver_data; - - irq_handler (...) - { - unsigned long flags; - .... - spin_lock_irqsave(&driver_lock, flags); - .... - driver_data.finish = 1; - driver_data.new_work = 0; - .... - spin_unlock_irqrestore(&driver_lock, flags); - .... - } - - ... - - ioctl_func (...) - { - ... - spin_lock_irq(&driver_lock); - ... - driver_data.finish = 0; - driver_data.new_work = 2; - ... - spin_unlock_irq(&driver_lock); - ... - } - -the above code has a number of advantages: - -- the locking relation is easier to understand - actual lock usage - pinpoints the critical sections. cli() usage is too opaque. - Easier to understand means it's easier to debug. - -- it's faster, because spinlocks are faster to acquire than the - potentially heavily-used IRQ lock. Furthermore, your driver does - not have to wait eg. for a big heavy SCSI interrupt to finish, - because the driver_lock spinlock is only used by your driver. - cli() on the other hand was used by many drivers, and extended - the critical section to the whole IRQ handler function - creating - serious lock contention. - - -to make the transition easier, we've still kept the cli(), sti(), -save_flags(), save_flags_cli() and restore_flags() macros defined -on UP systems - but their usage will be phased out until 2.6 is -released. - -drivers that want to disable local interrupts (interrupts on the -current CPU), can use the following five macros: - - local_irq_disable(), local_irq_enable(), local_save_flags(flags), - local_irq_save(flags), local_irq_restore(flags) - -but beware, their meaning and semantics are much simpler, far from -that of the old cli(), sti(), save_flags(flags) and restore_flags(flags) -SMP meaning: - - local_irq_disable() => turn local IRQs off - - local_irq_enable() => turn local IRQs on - - local_save_flags(flags) => save the current IRQ state into flags. The - state can be on or off. (on some - architectures there's even more bits in it.) - - local_irq_save(flags) => save the current IRQ state into flags and - disable interrupts. - - local_irq_restore(flags) => restore the IRQ state from flags. - -(local_irq_save can save both irqs on and irqs off state, and -local_irq_restore can restore into both irqs on and irqs off state.) - -another related change is that synchronize_irq() now takes a parameter: -synchronize_irq(irq). This change too has the purpose of making SMP -synchronization more lightweight - this way you can wait for your own -interrupt handler to finish, no need to wait for other IRQ sources. - - -why were these changes done? The main reason was the architectural burden -of maintaining the cli()/sti() interface - it became a real problem. The -new interrupt system is much more streamlined, easier to understand, debug, -and it's also a bit faster - the same happened to it that will happen to -cli()/sti() using drivers once they convert to spinlocks :-) - diff --git a/trunk/Documentation/connector/Makefile b/trunk/Documentation/connector/Makefile new file mode 100644 index 000000000000..8df1a7285a06 --- /dev/null +++ b/trunk/Documentation/connector/Makefile @@ -0,0 +1,11 @@ +ifneq ($(CONFIG_CONNECTOR),) +obj-m += cn_test.o +endif + +# List of programs to build +hostprogs-y := ucon + +# Tell kbuild to always build the programs +always := $(hostprogs-y) + +HOSTCFLAGS_ucon.o += -I$(objtree)/usr/include diff --git a/trunk/Documentation/cpu-hotplug.txt b/trunk/Documentation/cpu-hotplug.txt index ba0aacde94fb..94bbc27ddd4f 100644 --- a/trunk/Documentation/cpu-hotplug.txt +++ b/trunk/Documentation/cpu-hotplug.txt @@ -59,15 +59,10 @@ apicid values in those tables for disabled apics. In the event BIOS doesn't mark such hot-pluggable cpus as disabled entries, one could use this parameter "additional_cpus=x" to represent those cpus in the cpu_possible_map. -s390 uses the number of cpus it detects at IPL time to also the number of bits -in cpu_possible_map. If it is desired to add additional cpus at a later time -the number should be specified using this option or the possible_cpus option. - possible_cpus=n [s390 only] use this to set hotpluggable cpus. This option sets possible_cpus bits in cpu_possible_map. Thus keeping the numbers of bits set constant even if the machine gets rebooted. - This option overrides additional_cpus. CPU maps and such ----------------- diff --git a/trunk/Documentation/devices.txt b/trunk/Documentation/devices.txt index e6244cde26e9..05c80645e4ee 100644 --- a/trunk/Documentation/devices.txt +++ b/trunk/Documentation/devices.txt @@ -2560,9 +2560,6 @@ Your cooperation is appreciated. 96 = /dev/usb/hiddev0 1st USB HID device ... 111 = /dev/usb/hiddev15 16th USB HID device - 112 = /dev/usb/auer0 1st auerswald ISDN device - ... - 127 = /dev/usb/auer15 16th auerswald ISDN device 128 = /dev/usb/brlvgr0 First Braille Voyager device ... 131 = /dev/usb/brlvgr3 Fourth Braille Voyager device diff --git a/trunk/Documentation/feature-removal-schedule.txt b/trunk/Documentation/feature-removal-schedule.txt index c23955404bf5..eb1a47b97427 100644 --- a/trunk/Documentation/feature-removal-schedule.txt +++ b/trunk/Documentation/feature-removal-schedule.txt @@ -19,15 +19,6 @@ Who: Pavel Machek --------------------------- -What: old NCR53C9x driver -When: October 2007 -Why: Replaced by the much better esp_scsi driver. Actual low-level - driver can be ported over almost trivially. -Who: David Miller - Christoph Hellwig - ---------------------------- - What: Video4Linux API 1 ioctls and video_decoder.h from Video devices. When: December 2008 Files: include/linux/video_decoder.h include/linux/videodev.h @@ -205,19 +196,6 @@ Who: Tejun Heo --------------------------- -What: The arch/ppc and include/asm-ppc directories -When: Jun 2008 -Why: The arch/powerpc tree is the merged architecture for ppc32 and ppc64 - platforms. Currently there are efforts underway to port the remaining - arch/ppc platforms to the merged tree. New submissions to the arch/ppc - tree have been frozen with the 2.6.22 kernel release and that tree will - remain in bug-fix only mode until its scheduled removal. Platforms - that are not ported by June 2008 will be removed due to the lack of an - interested maintainer. -Who: linuxppc-dev@ozlabs.org - ---------------------------- - What: i386/x86_64 bzImage symlinks When: April 2010 diff --git a/trunk/Documentation/filesystems/configfs/Makefile b/trunk/Documentation/filesystems/configfs/Makefile new file mode 100644 index 000000000000..be7ec5e67dbc --- /dev/null +++ b/trunk/Documentation/filesystems/configfs/Makefile @@ -0,0 +1,3 @@ +ifneq ($(CONFIG_CONFIGFS_FS),) +obj-m += configfs_example_explicit.o configfs_example_macros.o +endif diff --git a/trunk/Documentation/filesystems/quota.txt b/trunk/Documentation/filesystems/quota.txt index a590c4093eff..5e8de25bf0f1 100644 --- a/trunk/Documentation/filesystems/quota.txt +++ b/trunk/Documentation/filesystems/quota.txt @@ -3,14 +3,14 @@ Quota subsystem =============== Quota subsystem allows system administrator to set limits on used space and -number of used inodes (inode is a filesystem structure which is associated -with each file or directory) for users and/or groups. For both used space and -number of used inodes there are actually two limits. The first one is called -softlimit and the second one hardlimit. An user can never exceed a hardlimit -for any resource. User is allowed to exceed softlimit but only for limited -period of time. This period is called "grace period" or "grace time". When -grace time is over, user is not able to allocate more space/inodes until he -frees enough of them to get below softlimit. +number of used inodes (inode is a filesystem structure which is associated with +each file or directory) for users and/or groups. For both used space and number +of used inodes there are actually two limits. The first one is called softlimit +and the second one hardlimit. An user can never exceed a hardlimit for any +resource (unless he has CAP_SYS_RESOURCE capability). User is allowed to exceed +softlimit but only for limited period of time. This period is called "grace +period" or "grace time". When grace time is over, user is not able to allocate +more space/inodes until he frees enough of them to get below softlimit. Quota limits (and amount of grace time) are set independently for each filesystem. @@ -53,6 +53,12 @@ in parentheses): QUOTA_NL_BSOFTLONGWARN - space (block) softlimit is exceeded longer than given grace period. QUOTA_NL_BSOFTWARN - space (block) softlimit + - four warnings are also defined for the event when user stops + exceeding some limit: + QUOTA_NL_IHARDBELOW - inode hardlimit + QUOTA_NL_ISOFTBELOW - inode softlimit + QUOTA_NL_BHARDBELOW - space (block) hardlimit + QUOTA_NL_BSOFTBELOW - space (block) softlimit QUOTA_NL_A_DEV_MAJOR (u32) - major number of a device with the affected filesystem QUOTA_NL_A_DEV_MINOR (u32) diff --git a/trunk/Documentation/hwmon/dme1737 b/trunk/Documentation/hwmon/dme1737 index b1fe00999439..001d2e70bc11 100644 --- a/trunk/Documentation/hwmon/dme1737 +++ b/trunk/Documentation/hwmon/dme1737 @@ -10,6 +10,10 @@ Supported chips: Prefix: 'sch311x' Addresses scanned: none, address read from Super-I/O config space Datasheet: http://www.nuhorizons.com/FeaturedProducts/Volume1/SMSC/311x.pdf + * SMSC SCH5027 + Prefix: 'sch5027' + Addresses scanned: I2C 0x2c, 0x2d, 0x2e + Datasheet: Provided by SMSC upon request and under NDA Authors: Juerg Haefliger @@ -27,33 +31,31 @@ Module Parameters following boards: - VIA EPIA SN18000 -Note that there is no need to use this parameter if the driver loads without -complaining. The driver will say so if it is necessary. - Description ----------- This driver implements support for the hardware monitoring capabilities of the -SMSC DME1737 and Asus A8000 (which are the same) and SMSC SCH311x Super-I/O -chips. These chips feature monitoring of 3 temp sensors temp[1-3] (2 remote -diodes and 1 internal), 7 voltages in[0-6] (6 external and 1 internal) and up -to 6 fan speeds fan[1-6]. Additionally, the chips implement up to 5 PWM -outputs pwm[1-3,5-6] for controlling fan speeds both manually and +SMSC DME1737 and Asus A8000 (which are the same), SMSC SCH5027, and SMSC +SCH311x Super-I/O chips. These chips feature monitoring of 3 temp sensors +temp[1-3] (2 remote diodes and 1 internal), 7 voltages in[0-6] (6 external and +1 internal) and up to 6 fan speeds fan[1-6]. Additionally, the chips implement +up to 5 PWM outputs pwm[1-3,5-6] for controlling fan speeds both manually and automatically. -For the DME1737 and A8000, fan[1-2] and pwm[1-2] are always present. Fan[3-6] -and pwm[3,5-6] are optional features and their availability depends on the -configuration of the chip. The driver will detect which features are present -during initialization and create the sysfs attributes accordingly. +For the DME1737, A8000 and SCH5027, fan[1-2] and pwm[1-2] are always present. +Fan[3-6] and pwm[3,5-6] are optional features and their availability depends on +the configuration of the chip. The driver will detect which features are +present during initialization and create the sysfs attributes accordingly. For the SCH311x, fan[1-3] and pwm[1-3] are always present and fan[4-6] and pwm[5-6] don't exist. -The hardware monitoring features of the DME1737 and A8000 are only accessible -via SMBus, while the SCH311x only provides access via the ISA bus. The driver -will therefore register itself as an I2C client driver if it detects a DME1737 -or A8000 and as a platform driver if it detects a SCH311x chip. +The hardware monitoring features of the DME1737, A8000, and SCH5027 are only +accessible via SMBus, while the SCH311x only provides access via the ISA bus. +The driver will therefore register itself as an I2C client driver if it detects +a DME1737, A8000, or SCH5027 and as a platform driver if it detects a SCH311x +chip. Voltage Monitoring @@ -64,6 +66,7 @@ scaling resistors. The values returned by the driver therefore reflect true millivolts and don't need scaling. The voltage inputs are mapped as follows (the last column indicates the input ranges): +DME1737, A8000: in0: +5VTR (+5V standby) 0V - 6.64V in1: Vccp (processor core) 0V - 3V in2: VCC (internal +3.3V) 0V - 4.38V @@ -72,6 +75,24 @@ millivolts and don't need scaling. The voltage inputs are mapped as follows in5: VTR (+3.3V standby) 0V - 4.38V in6: Vbat (+3.0V) 0V - 4.38V +SCH311x: + in0: +2.5V 0V - 6.64V + in1: Vccp (processor core) 0V - 2V + in2: VCC (internal +3.3V) 0V - 4.38V + in3: +5V 0V - 6.64V + in4: +12V 0V - 16V + in5: VTR (+3.3V standby) 0V - 4.38V + in6: Vbat (+3.0V) 0V - 4.38V + +SCH5027: + in0: +5VTR (+5V standby) 0V - 6.64V + in1: Vccp (processor core) 0V - 3V + in2: VCC (internal +3.3V) 0V - 4.38V + in3: V2_IN 0V - 1.5V + in4: V1_IN 0V - 1.5V + in5: VTR (+3.3V standby) 0V - 4.38V + in6: Vbat (+3.0V) 0V - 4.38V + Each voltage input has associated min and max limits which trigger an alarm when crossed. diff --git a/trunk/Documentation/hwmon/ibmaem b/trunk/Documentation/hwmon/ibmaem index 2fefaf582a43..e98bdfea3467 100644 --- a/trunk/Documentation/hwmon/ibmaem +++ b/trunk/Documentation/hwmon/ibmaem @@ -1,8 +1,11 @@ Kernel driver ibmaem ====================== +This driver talks to the IBM Systems Director Active Energy Manager, known +henceforth as AEM. + Supported systems: - * Any recent IBM System X server with Active Energy Manager support. + * Any recent IBM System X server with AEM support. This includes the x3350, x3550, x3650, x3655, x3755, x3850 M2, x3950 M2, and certain HS2x/LS2x/QS2x blades. The IPMI host interface driver ("ipmi-si") needs to be loaded for this driver to do anything. @@ -14,24 +17,22 @@ Author: Darrick J. Wong Description ----------- -This driver implements sensor reading support for the energy and power -meters available on various IBM System X hardware through the BMC. All -sensor banks will be exported as platform devices; this driver can talk -to both v1 and v2 interfaces. This driver is completely separate from the -older ibmpex driver. +This driver implements sensor reading support for the energy and power meters +available on various IBM System X hardware through the BMC. All sensor banks +will be exported as platform devices; this driver can talk to both v1 and v2 +interfaces. This driver is completely separate from the older ibmpex driver. -The v1 AEM interface has a simple set of features to monitor energy use. -There is a register that displays an estimate of raw energy consumption -since the last BMC reset, and a power sensor that returns average power -use over a configurable interval. +The v1 AEM interface has a simple set of features to monitor energy use. There +is a register that displays an estimate of raw energy consumption since the +last BMC reset, and a power sensor that returns average power use over a +configurable interval. -The v2 AEM interface is a bit more sophisticated, being able to present -a wider range of energy and power use registers, the power cap as -set by the AEM software, and temperature sensors. +The v2 AEM interface is a bit more sophisticated, being able to present a wider +range of energy and power use registers, the power cap as set by the AEM +software, and temperature sensors. Special Features ---------------- -The "power_cap" value displays the current system power cap, as set by -the Active Energy Manager software. Setting the power cap from the host -is not currently supported. +The "power_cap" value displays the current system power cap, as set by the AEM +software. Setting the power cap from the host is not currently supported. diff --git a/trunk/Documentation/hwmon/it87 b/trunk/Documentation/hwmon/it87 index f4ce1fdbeff6..3496b7020e7c 100644 --- a/trunk/Documentation/hwmon/it87 +++ b/trunk/Documentation/hwmon/it87 @@ -6,12 +6,14 @@ Supported chips: Prefix: 'it87' Addresses scanned: from Super I/O config space (8 I/O ports) Datasheet: Publicly available at the ITE website - http://www.ite.com.tw/ + http://www.ite.com.tw/product_info/file/pc/IT8705F_V.0.4.1.pdf * IT8712F Prefix: 'it8712' Addresses scanned: from Super I/O config space (8 I/O ports) Datasheet: Publicly available at the ITE website - http://www.ite.com.tw/ + http://www.ite.com.tw/product_info/file/pc/IT8712F_V0.9.1.pdf + http://www.ite.com.tw/product_info/file/pc/Errata%20V0.1%20for%20IT8712F%20V0.9.1.pdf + http://www.ite.com.tw/product_info/file/pc/IT8712F_V0.9.3.pdf * IT8716F/IT8726F Prefix: 'it8716' Addresses scanned: from Super I/O config space (8 I/O ports) @@ -90,14 +92,13 @@ upper VID bits share their pins with voltage inputs (in5 and in6) so you can't have both on a given board. The IT8716F, IT8718F and later IT8712F revisions have support for -2 additional fans. They are supported by the driver for the IT8716F and -IT8718F but not for the IT8712F +2 additional fans. The additional fans are supported by the driver. The IT8716F and IT8718F, and late IT8712F and IT8705F also have optional 16-bit tachometer counters for fans 1 to 3. This is better (no more fan clock divider mess) but not compatible with the older chips and -revisions. For now, the driver only uses the 16-bit mode on the -IT8716F and IT8718F. +revisions. The 16-bit tachometer mode is enabled by the driver when one +of the above chips is detected. The IT8726F is just bit enhanced IT8716F with additional hardware for AMD power sequencing. Therefore the chip will appear as IT8716F diff --git a/trunk/Documentation/hwmon/w83627hf b/trunk/Documentation/hwmon/w83627hf index 880a59f53da9..6ee36dbafd64 100644 --- a/trunk/Documentation/hwmon/w83627hf +++ b/trunk/Documentation/hwmon/w83627hf @@ -40,10 +40,6 @@ Module Parameters (default is 1) Use 'init=0' to bypass initializing the chip. Try this if your computer crashes when you load the module. -* reset: int - (default is 0) - The driver used to reset the chip on load, but does no more. Use - 'reset=1' to restore the old behavior. Report if you need to do this. Description ----------- diff --git a/trunk/Documentation/hwmon/w83791d b/trunk/Documentation/hwmon/w83791d index f153b2f6d62c..a67d3b7a7098 100644 --- a/trunk/Documentation/hwmon/w83791d +++ b/trunk/Documentation/hwmon/w83791d @@ -22,6 +22,7 @@ Credits: Additional contributors: Sven Anders + Marc Hulsman Module Parameters ----------------- @@ -67,9 +68,8 @@ on until the temperature falls below the Hysteresis value. Fan rotation speeds are reported in RPM (rotations per minute). An alarm is triggered if the rotation speed has dropped below a programmable limit. Fan -readings can be divided by a programmable divider (1, 2, 4, 8 for fan 1/2/3 -and 1, 2, 4, 8, 16, 32, 64 or 128 for fan 4/5) to give the readings more -range or accuracy. +readings can be divided by a programmable divider (1, 2, 4, 8, 16, +32, 64 or 128 for all fans) to give the readings more range or accuracy. Voltage sensors (also known as IN sensors) report their values in millivolts. An alarm is triggered if the voltage has crossed a programmable minimum diff --git a/trunk/Documentation/ia64/Makefile b/trunk/Documentation/ia64/Makefile new file mode 100644 index 000000000000..b75db69ec483 --- /dev/null +++ b/trunk/Documentation/ia64/Makefile @@ -0,0 +1,8 @@ +# kbuild trick to avoid linker error. Can be omitted if a module is built. +obj- := dummy.o + +# List of programs to build +hostprogs-y := aliasing-test + +# Tell kbuild to always build the programs +always := $(hostprogs-y) diff --git a/trunk/Documentation/ioctl-number.txt b/trunk/Documentation/ioctl-number.txt index 3bb5f466a90d..1c6b545635a2 100644 --- a/trunk/Documentation/ioctl-number.txt +++ b/trunk/Documentation/ioctl-number.txt @@ -105,7 +105,6 @@ Code Seq# Include File Comments 'T' all linux/soundcard.h conflict! 'T' all asm-i386/ioctls.h conflict! 'U' 00-EF linux/drivers/usb/usb.h -'U' F0-FF drivers/usb/auerswald.c 'V' all linux/vt.h 'W' 00-1F linux/watchdog.h conflict! 'W' 00-1F linux/wanrouter.h conflict! diff --git a/trunk/Documentation/lguest/lguest.c b/trunk/Documentation/lguest/lguest.c index b88b0ea54e90..655414821edc 100644 --- a/trunk/Documentation/lguest/lguest.c +++ b/trunk/Documentation/lguest/lguest.c @@ -1447,21 +1447,6 @@ static void configure_device(int fd, const char *tapif, u32 ipaddr) err(1, "Bringing interface %s up", tapif); } -static void get_mac(int fd, const char *tapif, unsigned char hwaddr[6]) -{ - struct ifreq ifr; - - memset(&ifr, 0, sizeof(ifr)); - strcpy(ifr.ifr_name, tapif); - - /* SIOC stands for Socket I/O Control. G means Get (vs S for Set - * above). IF means Interface, and HWADDR is hardware address. - * Simple! */ - if (ioctl(fd, SIOCGIFHWADDR, &ifr) != 0) - err(1, "getting hw address for %s", tapif); - memcpy(hwaddr, ifr.ifr_hwaddr.sa_data, 6); -} - static int get_tun_device(char tapif[IFNAMSIZ]) { struct ifreq ifr; @@ -1531,11 +1516,8 @@ static void setup_tun_net(char *arg) p = strchr(arg, ':'); if (p) { str2mac(p+1, conf.mac); + add_feature(dev, VIRTIO_NET_F_MAC); *p = '\0'; - } else { - p = arg + strlen(arg); - /* None supplied; query the randomly assigned mac. */ - get_mac(ipfd, tapif, conf.mac); } /* arg is now either an IP address or a bridge name */ @@ -1547,13 +1529,10 @@ static void setup_tun_net(char *arg) /* Set up the tun device. */ configure_device(ipfd, tapif, ip); - /* Tell Guest what MAC address to use. */ - add_feature(dev, VIRTIO_NET_F_MAC); add_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY); /* Expect Guest to handle everything except UFO */ add_feature(dev, VIRTIO_NET_F_CSUM); add_feature(dev, VIRTIO_NET_F_GUEST_CSUM); - add_feature(dev, VIRTIO_NET_F_MAC); add_feature(dev, VIRTIO_NET_F_GUEST_TSO4); add_feature(dev, VIRTIO_NET_F_GUEST_TSO6); add_feature(dev, VIRTIO_NET_F_GUEST_ECN); diff --git a/trunk/Documentation/networking/Makefile b/trunk/Documentation/networking/Makefile new file mode 100644 index 000000000000..6d8af1ac56c4 --- /dev/null +++ b/trunk/Documentation/networking/Makefile @@ -0,0 +1,8 @@ +# kbuild trick to avoid linker error. Can be omitted if a module is built. +obj- := dummy.o + +# List of programs to build +hostprogs-y := ifenslave + +# Tell kbuild to always build the programs +always := $(hostprogs-y) diff --git a/trunk/Documentation/networking/ifenslave.c b/trunk/Documentation/networking/ifenslave.c index a12059886755..1b96ccda3836 100644 --- a/trunk/Documentation/networking/ifenslave.c +++ b/trunk/Documentation/networking/ifenslave.c @@ -1081,7 +1081,7 @@ static int set_if_addr(char *master_ifname, char *slave_ifname) } - ipaddr = ifr.ifr_addr.sa_data; + ipaddr = (unsigned char *)ifr.ifr_addr.sa_data; v_print("Interface '%s': set IP %s to %d.%d.%d.%d\n", slave_ifname, ifra[i].desc, ipaddr[0], ipaddr[1], ipaddr[2], ipaddr[3]); diff --git a/trunk/Documentation/pcmcia/Makefile b/trunk/Documentation/pcmcia/Makefile new file mode 100644 index 000000000000..accde871ae77 --- /dev/null +++ b/trunk/Documentation/pcmcia/Makefile @@ -0,0 +1,10 @@ +# kbuild trick to avoid linker error. Can be omitted if a module is built. +obj- := dummy.o + +# List of programs to build +hostprogs-y := crc32hash + +# Tell kbuild to always build the programs +always := $(hostprogs-y) + +HOSTCFLAGS_crc32hash.o += -I$(objtree)/usr/include diff --git a/trunk/Documentation/pcmcia/crc32hash.c b/trunk/Documentation/pcmcia/crc32hash.c index cbc36d299af8..4210e5abab8a 100644 --- a/trunk/Documentation/pcmcia/crc32hash.c +++ b/trunk/Documentation/pcmcia/crc32hash.c @@ -26,7 +26,7 @@ int main(int argc, char **argv) { printf("no string passed as argument\n"); return -1; } - result = crc32(argv[1], strlen(argv[1])); + result = crc32((unsigned char const *)argv[1], strlen(argv[1])); printf("0x%x\n", result); return 0; } diff --git a/trunk/Documentation/power/pm_qos_interface.txt b/trunk/Documentation/power/pm_qos_interface.txt index 49adb1a33514..c40866e8b957 100644 --- a/trunk/Documentation/power/pm_qos_interface.txt +++ b/trunk/Documentation/power/pm_qos_interface.txt @@ -1,4 +1,4 @@ -PM quality of Service interface. +PM Quality Of Service Interface. This interface provides a kernel and user mode interface for registering performance expectations by drivers, subsystems and user space applications on @@ -7,6 +7,11 @@ one of the parameters. Currently we have {cpu_dma_latency, network_latency, network_throughput} as the initial set of pm_qos parameters. +Each parameters have defined units: + * latency: usec + * timeout: usec + * throughput: kbs (kilo bit / sec) + The infrastructure exposes multiple misc device nodes one per implemented parameter. The set of parameters implement is defined by pm_qos_power_init() and pm_qos_params.h. This is done because having the available parameters diff --git a/trunk/Documentation/powerpc/booting-without-of.txt b/trunk/Documentation/powerpc/booting-without-of.txt index 928a79ceb7aa..de4063cb4fdc 100644 --- a/trunk/Documentation/powerpc/booting-without-of.txt +++ b/trunk/Documentation/powerpc/booting-without-of.txt @@ -278,7 +278,7 @@ it with special cases. a 64-bit platform. d) request and get assigned a platform number (see PLATFORM_* - constants in include/asm-powerpc/processor.h + constants in arch/powerpc/include/asm/processor.h 32-bit embedded kernels: @@ -340,7 +340,7 @@ the block to RAM before passing it to the kernel. --------- The kernel is entered with r3 pointing to an area of memory that is - roughly described in include/asm-powerpc/prom.h by the structure + roughly described in arch/powerpc/include/asm/prom.h by the structure boot_param_header: struct boot_param_header { diff --git a/trunk/Documentation/powerpc/eeh-pci-error-recovery.txt b/trunk/Documentation/powerpc/eeh-pci-error-recovery.txt index df7afe43d462..9d4e33df624c 100644 --- a/trunk/Documentation/powerpc/eeh-pci-error-recovery.txt +++ b/trunk/Documentation/powerpc/eeh-pci-error-recovery.txt @@ -133,7 +133,7 @@ error. Given an arbitrary address, the routine pci_get_device_by_addr() will find the pci device associated with that address (if any). -The default include/asm-powerpc/io.h macros readb(), inb(), insb(), +The default arch/powerpc/include/asm/io.h macros readb(), inb(), insb(), etc. include a check to see if the i/o read returned all-0xff's. If so, these make a call to eeh_dn_check_failure(), which in turn asks the firmware if the all-ff's value is the sign of a true EEH diff --git a/trunk/Documentation/spi/Makefile b/trunk/Documentation/spi/Makefile new file mode 100644 index 000000000000..a5b03c88beae --- /dev/null +++ b/trunk/Documentation/spi/Makefile @@ -0,0 +1,11 @@ +# kbuild trick to avoid linker error. Can be omitted if a module is built. +obj- := dummy.o + +# List of programs to build +hostprogs-y := spidev_test spidev_fdx + +# Tell kbuild to always build the programs +always := $(hostprogs-y) + +HOSTCFLAGS_spidev_test.o += -I$(objtree)/usr/include +HOSTCFLAGS_spidev_fdx.o += -I$(objtree)/usr/include diff --git a/trunk/Documentation/spi/pxa2xx b/trunk/Documentation/spi/pxa2xx index f3853cc37bde..bbe8dee681a5 100644 --- a/trunk/Documentation/spi/pxa2xx +++ b/trunk/Documentation/spi/pxa2xx @@ -19,7 +19,7 @@ Declaring PXA2xx Master Controllers ----------------------------------- Typically a SPI master is defined in the arch/.../mach-*/board-*.c as a "platform device". The master configuration is passed to the driver via a table -found in include/asm-arm/arch-pxa/pxa2xx_spi.h: +found in arch/arm/mach-pxa/include/mach/pxa2xx_spi.h: struct pxa2xx_spi_master { enum pxa_ssp_type ssp_type; @@ -94,7 +94,7 @@ using the "spi_board_info" structure found in "linux/spi/spi.h". See Each slave device attached to the PXA must provide slave specific configuration information via the structure "pxa2xx_spi_chip" found in -"include/asm-arm/arch-pxa/pxa2xx_spi.h". The pxa2xx_spi master controller driver +"arch/arm/mach-pxa/include/mach/pxa2xx_spi.h". The pxa2xx_spi master controller driver will uses the configuration whenever the driver communicates with the slave device. diff --git a/trunk/Documentation/spi/spi-summary b/trunk/Documentation/spi/spi-summary index 6d5f18143c50..8bae2f018d34 100644 --- a/trunk/Documentation/spi/spi-summary +++ b/trunk/Documentation/spi/spi-summary @@ -210,7 +210,7 @@ board should normally be set up and registered. So for example arch/.../mach-*/board-*.c files might have code like: - #include /* for mysoc_spi_data */ + #include /* for mysoc_spi_data */ /* if your mach-* infrastructure doesn't support kernels that can * run on multiple boards, pdata wouldn't benefit from "__init". @@ -227,7 +227,7 @@ So for example arch/.../mach-*/board-*.c files might have code like: And SOC-specific utility code might look something like: - #include + #include static struct platform_device spi2 = { ... }; diff --git a/trunk/Documentation/usb/auerswald.txt b/trunk/Documentation/usb/auerswald.txt deleted file mode 100644 index 7ee4d8f69116..000000000000 --- a/trunk/Documentation/usb/auerswald.txt +++ /dev/null @@ -1,30 +0,0 @@ - Auerswald USB kernel driver - =========================== - -What is it? What can I do with it? -================================== -The auerswald USB kernel driver connects your linux 2.4.x -system to the auerswald usb-enabled devices. - -There are two types of auerswald usb devices: -a) small PBX systems (ISDN) -b) COMfort system telephones (ISDN) - -The driver installation creates the devices -/dev/usb/auer0..15. These devices carry a vendor- -specific protocol. You may run all auerswald java -software on it. The java software needs a native -library "libAuerUsbJNINative.so" installed on -your system. This library is available from -auerswald and shipped as part of the java software. - -You may create the devices with: - mknod -m 666 /dev/usb/auer0 c 180 112 - ... - mknod -m 666 /dev/usb/auer15 c 180 127 - -Future plans -============ -- Connection to ISDN4LINUX (the hisax interface) - -The maintainer of this driver is wolfgang@iksw-muees.de diff --git a/trunk/Documentation/usb/power-management.txt b/trunk/Documentation/usb/power-management.txt index b2fc4d4a9917..9d31140e3f5b 100644 --- a/trunk/Documentation/usb/power-management.txt +++ b/trunk/Documentation/usb/power-management.txt @@ -436,7 +436,12 @@ post_reset; the USB core guarantees that this is true of internal suspend/resume events as well. If a driver wants to block all suspend/resume calls during some -critical section, it can simply acquire udev->pm_mutex. +critical section, it can simply acquire udev->pm_mutex. Note that +calls to resume may be triggered indirectly. Block IO due to memory +allocations can make the vm subsystem resume a device. Thus while +holding this lock you must not allocate memory with GFP_KERNEL or +GFP_NOFS. + Alternatively, if the critical section might call some of the usb_autopm_* routines, the driver can avoid deadlock by doing: diff --git a/trunk/Documentation/video4linux/Makefile b/trunk/Documentation/video4linux/Makefile new file mode 100644 index 000000000000..1ed0e98d057d --- /dev/null +++ b/trunk/Documentation/video4linux/Makefile @@ -0,0 +1,8 @@ +# kbuild trick to avoid linker error. Can be omitted if a module is built. +obj- := dummy.o + +# List of programs to build +hostprogs-y := v4lgrab + +# Tell kbuild to always build the programs +always := $(hostprogs-y) diff --git a/trunk/Documentation/video4linux/gspca.txt b/trunk/Documentation/video4linux/gspca.txt index bcaf4ab383be..78a863ab8a5a 100644 --- a/trunk/Documentation/video4linux/gspca.txt +++ b/trunk/Documentation/video4linux/gspca.txt @@ -226,6 +226,7 @@ sonixj 0c45:6130 Sonix Pccam sonixj 0c45:6138 Sn9c120 Mo4000 sonixj 0c45:613b Surfer SN-206 sonixj 0c45:613c Sonix Pccam168 +sonixj 0c45:6143 Sonix Pccam168 sunplus 0d64:0303 Sunplus FashionCam DXG etoms 102c:6151 Qcam Sangha CIF etoms 102c:6251 Qcam xxxxxx VGA diff --git a/trunk/Documentation/vm/Makefile b/trunk/Documentation/vm/Makefile new file mode 100644 index 000000000000..6f562f778b28 --- /dev/null +++ b/trunk/Documentation/vm/Makefile @@ -0,0 +1,8 @@ +# kbuild trick to avoid linker error. Can be omitted if a module is built. +obj- := dummy.o + +# List of programs to build +hostprogs-y := slabinfo + +# Tell kbuild to always build the programs +always := $(hostprogs-y) diff --git a/trunk/Documentation/vm/page_migration b/trunk/Documentation/vm/page_migration index 99f89aa10169..d5fdfd34bbaf 100644 --- a/trunk/Documentation/vm/page_migration +++ b/trunk/Documentation/vm/page_migration @@ -18,10 +18,11 @@ migrate_pages function call takes two sets of nodes and moves pages of a process that are located on the from nodes to the destination nodes. Page migration functions are provided by the numactl package by Andi Kleen (a version later than 0.9.3 is required. Get it from -ftp://ftp.suse.com/pub/people/ak). numactl provided libnuma which -provides an interface similar to other numa functionality for page migration. -cat /proc//numa_maps allows an easy review of where the pages of -a process are located. See also the numa_maps manpage in the numactl package. +ftp://oss.sgi.com/www/projects/libnuma/download/). numactl provides libnuma +which provides an interface similar to other numa functionality for page +migration. cat /proc//numa_maps allows an easy review of where the +pages of a process are located. See also the numa_maps documentation in the +proc(5) man page. Manual migration is useful if for example the scheduler has relocated a process to a processor on a distant node. A batch scheduler or an diff --git a/trunk/Documentation/watchdog/src/Makefile b/trunk/Documentation/watchdog/src/Makefile new file mode 100644 index 000000000000..40e5f46e4740 --- /dev/null +++ b/trunk/Documentation/watchdog/src/Makefile @@ -0,0 +1,8 @@ +# kbuild trick to avoid linker error. Can be omitted if a module is built. +obj- := dummy.o + +# List of programs to build +hostprogs-y := watchdog-simple watchdog-test + +# Tell kbuild to always build the programs +always := $(hostprogs-y) diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 5e6d6ab82433..663485b004fb 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -175,12 +175,18 @@ M: bcrl@kvack.org L: linux-aio@kvack.org S: Supported -ABIT UGURU HARDWARE MONITOR DRIVER +ABIT UGURU 1,2 HARDWARE MONITOR DRIVER P: Hans de Goede M: j.w.r.degoede@hhs.nl L: lm-sensors@lm-sensors.org S: Maintained +ABIT UGURU 3 HARDWARE MONITOR DRIVER +P: Alistair John Strachan +M: alistair@devzero.co.uk +L: lm-sensors@lm-sensors.org +S: Maintained + ACENIC DRIVER P: Jes Sorensen M: jes@trained-monkey.org @@ -502,6 +508,12 @@ L: openezx-devel@lists.openezx.org (subscribers-only) W: http://www.openezx.org/ S: Maintained +ARM/FREESCALE IMX / MXC ARM ARCHITECTURE +P: Sascha Hauer +M: kernel@pengutronix.de +L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) +S: Maintained + ARM/GLOMATION GESBC9312SX MACHINE SUPPORT P: Lennert Buytenhek M: kernel@wantstofly.org @@ -588,6 +600,11 @@ M: kernel@wantstofly.org L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) S: Maintained +ARM/MAGICIAN MACHINE SUPPORT +P: Philipp Zabel +M: philipp.zabel@gmail.com +S: Maintained + ARM/TOSA MACHINE SUPPORT P: Dmitry Baryshkov M: dbaryshkov@gmail.com @@ -714,6 +731,15 @@ L: linux-wireless@vger.kernel.org L: ath5k-devel@lists.ath5k.org S: Maintained +ATHEROS ATH9K WIRELESS DRIVER +P: Luis R. Rodriguez +M: lrodriguez@atheros.com +P: Jouni Malinen +M: jmalinen@atheros.com +L: linux-wireless@vger.kernel.org +L: ath9k-devel@lists.ath9k.org +S: Supported + ATI_REMOTE2 DRIVER P: Ville Syrjala M: syrjala@sci.fi @@ -1229,7 +1255,7 @@ S: Maintained CPU FREQUENCY DRIVERS P: Dave Jones M: davej@codemonkey.org.uk -L: cpufreq@lists.linux.org.uk +L: cpufreq@vger.kernel.org W: http://www.codemonkey.org.uk/projects/cpufreq/ T: git kernel.org/pub/scm/linux/kernel/git/davej/cpufreq.git S: Maintained @@ -2442,7 +2468,7 @@ L: kernel-janitors@vger.kernel.org W: http://www.kerneljanitors.org/ S: Maintained -KERNEL NFSD +KERNEL NFSD, SUNRPC, AND LOCKD SERVERS P: J. Bruce Fields M: bfields@fieldses.org P: Neil Brown @@ -2908,6 +2934,12 @@ M: jirislaby@gmail.com L: linux-kernel@vger.kernel.org S: Maintained +MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER +P: Felipe Balbi +M: felipe.balbi@nokia.com +L: linux-usb@vger.kernel.org +S: Maintained + MYRICOM MYRI-10G 10GbE DRIVER (MYRI10GE) P: Andrew Gallatin M: gallatin@myri.com @@ -3056,9 +3088,10 @@ M: horms@verge.net.au P: Julian Anastasov M: ja@ssi.bg L: netdev@vger.kernel.org +L: lvs-devel@vger.kernel.org S: Maintained -NFS CLIENT +NFS, SUNRPC, AND LOCKD CLIENTS P: Trond Myklebust M: Trond.Myklebust@netapp.com L: linux-nfs@vger.kernel.org @@ -3721,6 +3754,16 @@ L: linux-visws-devel@lists.sf.net W: http://linux-visws.sf.net S: Maintained for 2.6. +SGI GRU DRIVER +P: Jack Steiner +M: steiner@sgi.com +S: Maintained + +SGI XP/XPC/XPNET DRIVER +P: Dean Nelson +M: dcn@sgi.com +S: Maintained + SIMTEC EB110ATX (Chalice CATS) P: Ben Dooks P: Vincent Sanders @@ -4175,12 +4218,6 @@ M: oliver@neukum.name L: linux-usb@vger.kernel.org S: Maintained -USB AUERSWALD DRIVER -P: Wolfgang Muees -M: wolfgang@iksw-muees.de -L: linux-usb@vger.kernel.org -S: Maintained - USB BLOCK DRIVER (UB ub) P: Pete Zaitcev M: zaitcev@redhat.com @@ -4663,12 +4700,6 @@ L: linux-wireless@vger.kernel.org L: zd1211-devs@lists.sourceforge.net (subscribers-only) S: Maintained -ZF MACHZ WATCHDOG -P: Fernando Fuganti -M: fuganti@netbank.com.br -W: http://cvs.conectiva.com.br/drivers/ZFL-watchdog/ -S: Maintained - ZR36067 VIDEO FOR LINUX DRIVER P: Ronald Bultje M: rbultje@ronald.bitfreak.net diff --git a/trunk/Makefile b/trunk/Makefile index f156f40d6334..53bf6ec1af9d 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 27 -EXTRAVERSION = -rc1 +EXTRAVERSION = -rc3 NAME = Rotary Wombat # *DOCUMENTATION* @@ -821,6 +821,9 @@ ifdef CONFIG_HEADERS_CHECK endif ifdef CONFIG_SAMPLES $(Q)$(MAKE) $(build)=samples +endif +ifdef CONFIG_BUILD_DOCSRC + $(Q)$(MAKE) $(build)=Documentation endif $(call vmlinux-modpost) $(call if_changed_rule,vmlinux__) @@ -929,10 +932,10 @@ ifneq ($(KBUILD_SRC),) echo " in the '$(srctree)' directory.";\ /bin/false; \ fi; - $(Q)if [ ! -d include2 ]; then mkdir -p include2; fi; - $(Q)if [ -e $(srctree)/include/asm-$(SRCARCH)/errno.h ]; then \ + $(Q)if [ ! -d include2 ]; then \ + mkdir -p include2; \ ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm; \ - fi + fi endif # prepare2 creates a makefile if using a separate output directory @@ -1166,7 +1169,7 @@ MRPROPER_FILES += .config .config.old include/asm .version .old_version \ # clean: rm-dirs := $(CLEAN_DIRS) clean: rm-files := $(CLEAN_FILES) -clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs)) +clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs) Documentation) PHONY += $(clean-dirs) clean archclean $(clean-dirs): @@ -1492,7 +1495,7 @@ quiet_cmd_cscope-file = FILELST cscope.files cmd_cscope-file = (echo \-k; echo \-q; $(all-sources)) > cscope.files quiet_cmd_cscope = MAKE cscope.out - cmd_cscope = cscope -b + cmd_cscope = cscope -b -f cscope.out cscope: FORCE $(call cmd,cscope-file) diff --git a/trunk/include/asm-alpha/8253pit.h b/trunk/arch/alpha/include/asm/8253pit.h similarity index 100% rename from trunk/include/asm-alpha/8253pit.h rename to trunk/arch/alpha/include/asm/8253pit.h diff --git a/trunk/include/asm-alpha/Kbuild b/trunk/arch/alpha/include/asm/Kbuild similarity index 100% rename from trunk/include/asm-alpha/Kbuild rename to trunk/arch/alpha/include/asm/Kbuild diff --git a/trunk/include/asm-alpha/a.out-core.h b/trunk/arch/alpha/include/asm/a.out-core.h similarity index 100% rename from trunk/include/asm-alpha/a.out-core.h rename to trunk/arch/alpha/include/asm/a.out-core.h diff --git a/trunk/include/asm-alpha/a.out.h b/trunk/arch/alpha/include/asm/a.out.h similarity index 100% rename from trunk/include/asm-alpha/a.out.h rename to trunk/arch/alpha/include/asm/a.out.h diff --git a/trunk/include/asm-alpha/agp.h b/trunk/arch/alpha/include/asm/agp.h similarity index 100% rename from trunk/include/asm-alpha/agp.h rename to trunk/arch/alpha/include/asm/agp.h diff --git a/trunk/include/asm-alpha/agp_backend.h b/trunk/arch/alpha/include/asm/agp_backend.h similarity index 100% rename from trunk/include/asm-alpha/agp_backend.h rename to trunk/arch/alpha/include/asm/agp_backend.h diff --git a/trunk/include/asm-alpha/atomic.h b/trunk/arch/alpha/include/asm/atomic.h similarity index 100% rename from trunk/include/asm-alpha/atomic.h rename to trunk/arch/alpha/include/asm/atomic.h diff --git a/trunk/include/asm-alpha/auxvec.h b/trunk/arch/alpha/include/asm/auxvec.h similarity index 100% rename from trunk/include/asm-alpha/auxvec.h rename to trunk/arch/alpha/include/asm/auxvec.h diff --git a/trunk/include/asm-alpha/barrier.h b/trunk/arch/alpha/include/asm/barrier.h similarity index 100% rename from trunk/include/asm-alpha/barrier.h rename to trunk/arch/alpha/include/asm/barrier.h diff --git a/trunk/include/asm-alpha/bitops.h b/trunk/arch/alpha/include/asm/bitops.h similarity index 100% rename from trunk/include/asm-alpha/bitops.h rename to trunk/arch/alpha/include/asm/bitops.h diff --git a/trunk/include/asm-alpha/bug.h b/trunk/arch/alpha/include/asm/bug.h similarity index 100% rename from trunk/include/asm-alpha/bug.h rename to trunk/arch/alpha/include/asm/bug.h diff --git a/trunk/include/asm-alpha/bugs.h b/trunk/arch/alpha/include/asm/bugs.h similarity index 100% rename from trunk/include/asm-alpha/bugs.h rename to trunk/arch/alpha/include/asm/bugs.h diff --git a/trunk/include/asm-alpha/byteorder.h b/trunk/arch/alpha/include/asm/byteorder.h similarity index 100% rename from trunk/include/asm-alpha/byteorder.h rename to trunk/arch/alpha/include/asm/byteorder.h diff --git a/trunk/include/asm-alpha/cache.h b/trunk/arch/alpha/include/asm/cache.h similarity index 100% rename from trunk/include/asm-alpha/cache.h rename to trunk/arch/alpha/include/asm/cache.h diff --git a/trunk/include/asm-alpha/cacheflush.h b/trunk/arch/alpha/include/asm/cacheflush.h similarity index 100% rename from trunk/include/asm-alpha/cacheflush.h rename to trunk/arch/alpha/include/asm/cacheflush.h diff --git a/trunk/include/asm-alpha/checksum.h b/trunk/arch/alpha/include/asm/checksum.h similarity index 100% rename from trunk/include/asm-alpha/checksum.h rename to trunk/arch/alpha/include/asm/checksum.h diff --git a/trunk/include/asm-alpha/compiler.h b/trunk/arch/alpha/include/asm/compiler.h similarity index 100% rename from trunk/include/asm-alpha/compiler.h rename to trunk/arch/alpha/include/asm/compiler.h diff --git a/trunk/include/asm-alpha/console.h b/trunk/arch/alpha/include/asm/console.h similarity index 100% rename from trunk/include/asm-alpha/console.h rename to trunk/arch/alpha/include/asm/console.h diff --git a/trunk/include/asm-alpha/core_apecs.h b/trunk/arch/alpha/include/asm/core_apecs.h similarity index 100% rename from trunk/include/asm-alpha/core_apecs.h rename to trunk/arch/alpha/include/asm/core_apecs.h diff --git a/trunk/include/asm-alpha/core_cia.h b/trunk/arch/alpha/include/asm/core_cia.h similarity index 100% rename from trunk/include/asm-alpha/core_cia.h rename to trunk/arch/alpha/include/asm/core_cia.h diff --git a/trunk/include/asm-alpha/core_irongate.h b/trunk/arch/alpha/include/asm/core_irongate.h similarity index 100% rename from trunk/include/asm-alpha/core_irongate.h rename to trunk/arch/alpha/include/asm/core_irongate.h diff --git a/trunk/include/asm-alpha/core_lca.h b/trunk/arch/alpha/include/asm/core_lca.h similarity index 100% rename from trunk/include/asm-alpha/core_lca.h rename to trunk/arch/alpha/include/asm/core_lca.h diff --git a/trunk/include/asm-alpha/core_marvel.h b/trunk/arch/alpha/include/asm/core_marvel.h similarity index 100% rename from trunk/include/asm-alpha/core_marvel.h rename to trunk/arch/alpha/include/asm/core_marvel.h diff --git a/trunk/include/asm-alpha/core_mcpcia.h b/trunk/arch/alpha/include/asm/core_mcpcia.h similarity index 100% rename from trunk/include/asm-alpha/core_mcpcia.h rename to trunk/arch/alpha/include/asm/core_mcpcia.h diff --git a/trunk/include/asm-alpha/core_polaris.h b/trunk/arch/alpha/include/asm/core_polaris.h similarity index 100% rename from trunk/include/asm-alpha/core_polaris.h rename to trunk/arch/alpha/include/asm/core_polaris.h diff --git a/trunk/include/asm-alpha/core_t2.h b/trunk/arch/alpha/include/asm/core_t2.h similarity index 100% rename from trunk/include/asm-alpha/core_t2.h rename to trunk/arch/alpha/include/asm/core_t2.h diff --git a/trunk/include/asm-alpha/core_titan.h b/trunk/arch/alpha/include/asm/core_titan.h similarity index 100% rename from trunk/include/asm-alpha/core_titan.h rename to trunk/arch/alpha/include/asm/core_titan.h diff --git a/trunk/include/asm-alpha/core_tsunami.h b/trunk/arch/alpha/include/asm/core_tsunami.h similarity index 100% rename from trunk/include/asm-alpha/core_tsunami.h rename to trunk/arch/alpha/include/asm/core_tsunami.h diff --git a/trunk/include/asm-alpha/core_wildfire.h b/trunk/arch/alpha/include/asm/core_wildfire.h similarity index 100% rename from trunk/include/asm-alpha/core_wildfire.h rename to trunk/arch/alpha/include/asm/core_wildfire.h diff --git a/trunk/include/asm-alpha/cputime.h b/trunk/arch/alpha/include/asm/cputime.h similarity index 100% rename from trunk/include/asm-alpha/cputime.h rename to trunk/arch/alpha/include/asm/cputime.h diff --git a/trunk/include/asm-alpha/current.h b/trunk/arch/alpha/include/asm/current.h similarity index 100% rename from trunk/include/asm-alpha/current.h rename to trunk/arch/alpha/include/asm/current.h diff --git a/trunk/include/asm-alpha/delay.h b/trunk/arch/alpha/include/asm/delay.h similarity index 100% rename from trunk/include/asm-alpha/delay.h rename to trunk/arch/alpha/include/asm/delay.h diff --git a/trunk/include/asm-alpha/device.h b/trunk/arch/alpha/include/asm/device.h similarity index 100% rename from trunk/include/asm-alpha/device.h rename to trunk/arch/alpha/include/asm/device.h diff --git a/trunk/include/asm-alpha/div64.h b/trunk/arch/alpha/include/asm/div64.h similarity index 100% rename from trunk/include/asm-alpha/div64.h rename to trunk/arch/alpha/include/asm/div64.h diff --git a/trunk/include/asm-alpha/dma-mapping.h b/trunk/arch/alpha/include/asm/dma-mapping.h similarity index 100% rename from trunk/include/asm-alpha/dma-mapping.h rename to trunk/arch/alpha/include/asm/dma-mapping.h diff --git a/trunk/include/asm-alpha/dma.h b/trunk/arch/alpha/include/asm/dma.h similarity index 100% rename from trunk/include/asm-alpha/dma.h rename to trunk/arch/alpha/include/asm/dma.h diff --git a/trunk/include/asm-alpha/elf.h b/trunk/arch/alpha/include/asm/elf.h similarity index 100% rename from trunk/include/asm-alpha/elf.h rename to trunk/arch/alpha/include/asm/elf.h diff --git a/trunk/include/asm-alpha/emergency-restart.h b/trunk/arch/alpha/include/asm/emergency-restart.h similarity index 100% rename from trunk/include/asm-alpha/emergency-restart.h rename to trunk/arch/alpha/include/asm/emergency-restart.h diff --git a/trunk/include/asm-alpha/err_common.h b/trunk/arch/alpha/include/asm/err_common.h similarity index 100% rename from trunk/include/asm-alpha/err_common.h rename to trunk/arch/alpha/include/asm/err_common.h diff --git a/trunk/include/asm-alpha/err_ev6.h b/trunk/arch/alpha/include/asm/err_ev6.h similarity index 100% rename from trunk/include/asm-alpha/err_ev6.h rename to trunk/arch/alpha/include/asm/err_ev6.h diff --git a/trunk/include/asm-alpha/err_ev7.h b/trunk/arch/alpha/include/asm/err_ev7.h similarity index 100% rename from trunk/include/asm-alpha/err_ev7.h rename to trunk/arch/alpha/include/asm/err_ev7.h diff --git a/trunk/include/asm-alpha/errno.h b/trunk/arch/alpha/include/asm/errno.h similarity index 100% rename from trunk/include/asm-alpha/errno.h rename to trunk/arch/alpha/include/asm/errno.h diff --git a/trunk/include/asm-alpha/fb.h b/trunk/arch/alpha/include/asm/fb.h similarity index 100% rename from trunk/include/asm-alpha/fb.h rename to trunk/arch/alpha/include/asm/fb.h diff --git a/trunk/include/asm-alpha/fcntl.h b/trunk/arch/alpha/include/asm/fcntl.h similarity index 100% rename from trunk/include/asm-alpha/fcntl.h rename to trunk/arch/alpha/include/asm/fcntl.h diff --git a/trunk/include/asm-alpha/floppy.h b/trunk/arch/alpha/include/asm/floppy.h similarity index 100% rename from trunk/include/asm-alpha/floppy.h rename to trunk/arch/alpha/include/asm/floppy.h diff --git a/trunk/include/asm-alpha/fpu.h b/trunk/arch/alpha/include/asm/fpu.h similarity index 100% rename from trunk/include/asm-alpha/fpu.h rename to trunk/arch/alpha/include/asm/fpu.h diff --git a/trunk/include/asm-alpha/futex.h b/trunk/arch/alpha/include/asm/futex.h similarity index 100% rename from trunk/include/asm-alpha/futex.h rename to trunk/arch/alpha/include/asm/futex.h diff --git a/trunk/include/asm-alpha/gct.h b/trunk/arch/alpha/include/asm/gct.h similarity index 100% rename from trunk/include/asm-alpha/gct.h rename to trunk/arch/alpha/include/asm/gct.h diff --git a/trunk/include/asm-alpha/gentrap.h b/trunk/arch/alpha/include/asm/gentrap.h similarity index 100% rename from trunk/include/asm-alpha/gentrap.h rename to trunk/arch/alpha/include/asm/gentrap.h diff --git a/trunk/include/asm-alpha/hardirq.h b/trunk/arch/alpha/include/asm/hardirq.h similarity index 100% rename from trunk/include/asm-alpha/hardirq.h rename to trunk/arch/alpha/include/asm/hardirq.h diff --git a/trunk/include/asm-alpha/hw_irq.h b/trunk/arch/alpha/include/asm/hw_irq.h similarity index 100% rename from trunk/include/asm-alpha/hw_irq.h rename to trunk/arch/alpha/include/asm/hw_irq.h diff --git a/trunk/include/asm-alpha/hwrpb.h b/trunk/arch/alpha/include/asm/hwrpb.h similarity index 100% rename from trunk/include/asm-alpha/hwrpb.h rename to trunk/arch/alpha/include/asm/hwrpb.h diff --git a/trunk/include/asm-alpha/io.h b/trunk/arch/alpha/include/asm/io.h similarity index 100% rename from trunk/include/asm-alpha/io.h rename to trunk/arch/alpha/include/asm/io.h diff --git a/trunk/include/asm-alpha/io_trivial.h b/trunk/arch/alpha/include/asm/io_trivial.h similarity index 100% rename from trunk/include/asm-alpha/io_trivial.h rename to trunk/arch/alpha/include/asm/io_trivial.h diff --git a/trunk/include/asm-alpha/ioctl.h b/trunk/arch/alpha/include/asm/ioctl.h similarity index 100% rename from trunk/include/asm-alpha/ioctl.h rename to trunk/arch/alpha/include/asm/ioctl.h diff --git a/trunk/include/asm-alpha/ioctls.h b/trunk/arch/alpha/include/asm/ioctls.h similarity index 100% rename from trunk/include/asm-alpha/ioctls.h rename to trunk/arch/alpha/include/asm/ioctls.h diff --git a/trunk/include/asm-alpha/ipcbuf.h b/trunk/arch/alpha/include/asm/ipcbuf.h similarity index 100% rename from trunk/include/asm-alpha/ipcbuf.h rename to trunk/arch/alpha/include/asm/ipcbuf.h diff --git a/trunk/include/asm-alpha/irq.h b/trunk/arch/alpha/include/asm/irq.h similarity index 100% rename from trunk/include/asm-alpha/irq.h rename to trunk/arch/alpha/include/asm/irq.h diff --git a/trunk/include/asm-alpha/irq_regs.h b/trunk/arch/alpha/include/asm/irq_regs.h similarity index 100% rename from trunk/include/asm-alpha/irq_regs.h rename to trunk/arch/alpha/include/asm/irq_regs.h diff --git a/trunk/include/asm-alpha/jensen.h b/trunk/arch/alpha/include/asm/jensen.h similarity index 100% rename from trunk/include/asm-alpha/jensen.h rename to trunk/arch/alpha/include/asm/jensen.h diff --git a/trunk/include/asm-alpha/kdebug.h b/trunk/arch/alpha/include/asm/kdebug.h similarity index 100% rename from trunk/include/asm-alpha/kdebug.h rename to trunk/arch/alpha/include/asm/kdebug.h diff --git a/trunk/include/asm-alpha/kmap_types.h b/trunk/arch/alpha/include/asm/kmap_types.h similarity index 100% rename from trunk/include/asm-alpha/kmap_types.h rename to trunk/arch/alpha/include/asm/kmap_types.h diff --git a/trunk/include/asm-alpha/linkage.h b/trunk/arch/alpha/include/asm/linkage.h similarity index 100% rename from trunk/include/asm-alpha/linkage.h rename to trunk/arch/alpha/include/asm/linkage.h diff --git a/trunk/include/asm-alpha/local.h b/trunk/arch/alpha/include/asm/local.h similarity index 100% rename from trunk/include/asm-alpha/local.h rename to trunk/arch/alpha/include/asm/local.h diff --git a/trunk/include/asm-alpha/machvec.h b/trunk/arch/alpha/include/asm/machvec.h similarity index 100% rename from trunk/include/asm-alpha/machvec.h rename to trunk/arch/alpha/include/asm/machvec.h diff --git a/trunk/include/asm-alpha/mc146818rtc.h b/trunk/arch/alpha/include/asm/mc146818rtc.h similarity index 100% rename from trunk/include/asm-alpha/mc146818rtc.h rename to trunk/arch/alpha/include/asm/mc146818rtc.h diff --git a/trunk/include/asm-alpha/md.h b/trunk/arch/alpha/include/asm/md.h similarity index 100% rename from trunk/include/asm-alpha/md.h rename to trunk/arch/alpha/include/asm/md.h diff --git a/trunk/include/asm-alpha/mman.h b/trunk/arch/alpha/include/asm/mman.h similarity index 100% rename from trunk/include/asm-alpha/mman.h rename to trunk/arch/alpha/include/asm/mman.h diff --git a/trunk/include/asm-alpha/mmu.h b/trunk/arch/alpha/include/asm/mmu.h similarity index 100% rename from trunk/include/asm-alpha/mmu.h rename to trunk/arch/alpha/include/asm/mmu.h diff --git a/trunk/include/asm-alpha/mmu_context.h b/trunk/arch/alpha/include/asm/mmu_context.h similarity index 100% rename from trunk/include/asm-alpha/mmu_context.h rename to trunk/arch/alpha/include/asm/mmu_context.h diff --git a/trunk/include/asm-alpha/mmzone.h b/trunk/arch/alpha/include/asm/mmzone.h similarity index 100% rename from trunk/include/asm-alpha/mmzone.h rename to trunk/arch/alpha/include/asm/mmzone.h diff --git a/trunk/include/asm-alpha/module.h b/trunk/arch/alpha/include/asm/module.h similarity index 100% rename from trunk/include/asm-alpha/module.h rename to trunk/arch/alpha/include/asm/module.h diff --git a/trunk/include/asm-alpha/msgbuf.h b/trunk/arch/alpha/include/asm/msgbuf.h similarity index 100% rename from trunk/include/asm-alpha/msgbuf.h rename to trunk/arch/alpha/include/asm/msgbuf.h diff --git a/trunk/include/asm-alpha/mutex.h b/trunk/arch/alpha/include/asm/mutex.h similarity index 100% rename from trunk/include/asm-alpha/mutex.h rename to trunk/arch/alpha/include/asm/mutex.h diff --git a/trunk/include/asm-alpha/page.h b/trunk/arch/alpha/include/asm/page.h similarity index 100% rename from trunk/include/asm-alpha/page.h rename to trunk/arch/alpha/include/asm/page.h diff --git a/trunk/include/asm-alpha/pal.h b/trunk/arch/alpha/include/asm/pal.h similarity index 100% rename from trunk/include/asm-alpha/pal.h rename to trunk/arch/alpha/include/asm/pal.h diff --git a/trunk/include/asm-alpha/param.h b/trunk/arch/alpha/include/asm/param.h similarity index 100% rename from trunk/include/asm-alpha/param.h rename to trunk/arch/alpha/include/asm/param.h diff --git a/trunk/include/asm-alpha/parport.h b/trunk/arch/alpha/include/asm/parport.h similarity index 100% rename from trunk/include/asm-alpha/parport.h rename to trunk/arch/alpha/include/asm/parport.h diff --git a/trunk/include/asm-alpha/pci.h b/trunk/arch/alpha/include/asm/pci.h similarity index 100% rename from trunk/include/asm-alpha/pci.h rename to trunk/arch/alpha/include/asm/pci.h diff --git a/trunk/include/asm-alpha/percpu.h b/trunk/arch/alpha/include/asm/percpu.h similarity index 100% rename from trunk/include/asm-alpha/percpu.h rename to trunk/arch/alpha/include/asm/percpu.h diff --git a/trunk/include/asm-alpha/pgalloc.h b/trunk/arch/alpha/include/asm/pgalloc.h similarity index 100% rename from trunk/include/asm-alpha/pgalloc.h rename to trunk/arch/alpha/include/asm/pgalloc.h diff --git a/trunk/include/asm-alpha/pgtable.h b/trunk/arch/alpha/include/asm/pgtable.h similarity index 100% rename from trunk/include/asm-alpha/pgtable.h rename to trunk/arch/alpha/include/asm/pgtable.h diff --git a/trunk/include/asm-alpha/poll.h b/trunk/arch/alpha/include/asm/poll.h similarity index 100% rename from trunk/include/asm-alpha/poll.h rename to trunk/arch/alpha/include/asm/poll.h diff --git a/trunk/include/asm-alpha/posix_types.h b/trunk/arch/alpha/include/asm/posix_types.h similarity index 100% rename from trunk/include/asm-alpha/posix_types.h rename to trunk/arch/alpha/include/asm/posix_types.h diff --git a/trunk/include/asm-alpha/processor.h b/trunk/arch/alpha/include/asm/processor.h similarity index 100% rename from trunk/include/asm-alpha/processor.h rename to trunk/arch/alpha/include/asm/processor.h diff --git a/trunk/include/asm-alpha/ptrace.h b/trunk/arch/alpha/include/asm/ptrace.h similarity index 100% rename from trunk/include/asm-alpha/ptrace.h rename to trunk/arch/alpha/include/asm/ptrace.h diff --git a/trunk/include/asm-alpha/reg.h b/trunk/arch/alpha/include/asm/reg.h similarity index 100% rename from trunk/include/asm-alpha/reg.h rename to trunk/arch/alpha/include/asm/reg.h diff --git a/trunk/include/asm-alpha/regdef.h b/trunk/arch/alpha/include/asm/regdef.h similarity index 100% rename from trunk/include/asm-alpha/regdef.h rename to trunk/arch/alpha/include/asm/regdef.h diff --git a/trunk/include/asm-alpha/resource.h b/trunk/arch/alpha/include/asm/resource.h similarity index 100% rename from trunk/include/asm-alpha/resource.h rename to trunk/arch/alpha/include/asm/resource.h diff --git a/trunk/include/asm-alpha/rtc.h b/trunk/arch/alpha/include/asm/rtc.h similarity index 100% rename from trunk/include/asm-alpha/rtc.h rename to trunk/arch/alpha/include/asm/rtc.h diff --git a/trunk/include/asm-alpha/rwsem.h b/trunk/arch/alpha/include/asm/rwsem.h similarity index 100% rename from trunk/include/asm-alpha/rwsem.h rename to trunk/arch/alpha/include/asm/rwsem.h diff --git a/trunk/include/asm-alpha/scatterlist.h b/trunk/arch/alpha/include/asm/scatterlist.h similarity index 100% rename from trunk/include/asm-alpha/scatterlist.h rename to trunk/arch/alpha/include/asm/scatterlist.h diff --git a/trunk/include/asm-alpha/sections.h b/trunk/arch/alpha/include/asm/sections.h similarity index 100% rename from trunk/include/asm-alpha/sections.h rename to trunk/arch/alpha/include/asm/sections.h diff --git a/trunk/include/asm-alpha/segment.h b/trunk/arch/alpha/include/asm/segment.h similarity index 100% rename from trunk/include/asm-alpha/segment.h rename to trunk/arch/alpha/include/asm/segment.h diff --git a/trunk/include/asm-alpha/sembuf.h b/trunk/arch/alpha/include/asm/sembuf.h similarity index 100% rename from trunk/include/asm-alpha/sembuf.h rename to trunk/arch/alpha/include/asm/sembuf.h diff --git a/trunk/include/asm-alpha/serial.h b/trunk/arch/alpha/include/asm/serial.h similarity index 100% rename from trunk/include/asm-alpha/serial.h rename to trunk/arch/alpha/include/asm/serial.h diff --git a/trunk/include/asm-alpha/setup.h b/trunk/arch/alpha/include/asm/setup.h similarity index 100% rename from trunk/include/asm-alpha/setup.h rename to trunk/arch/alpha/include/asm/setup.h diff --git a/trunk/include/asm-alpha/sfp-machine.h b/trunk/arch/alpha/include/asm/sfp-machine.h similarity index 100% rename from trunk/include/asm-alpha/sfp-machine.h rename to trunk/arch/alpha/include/asm/sfp-machine.h diff --git a/trunk/include/asm-alpha/shmbuf.h b/trunk/arch/alpha/include/asm/shmbuf.h similarity index 100% rename from trunk/include/asm-alpha/shmbuf.h rename to trunk/arch/alpha/include/asm/shmbuf.h diff --git a/trunk/include/asm-alpha/shmparam.h b/trunk/arch/alpha/include/asm/shmparam.h similarity index 100% rename from trunk/include/asm-alpha/shmparam.h rename to trunk/arch/alpha/include/asm/shmparam.h diff --git a/trunk/include/asm-alpha/sigcontext.h b/trunk/arch/alpha/include/asm/sigcontext.h similarity index 100% rename from trunk/include/asm-alpha/sigcontext.h rename to trunk/arch/alpha/include/asm/sigcontext.h diff --git a/trunk/include/asm-alpha/siginfo.h b/trunk/arch/alpha/include/asm/siginfo.h similarity index 100% rename from trunk/include/asm-alpha/siginfo.h rename to trunk/arch/alpha/include/asm/siginfo.h diff --git a/trunk/include/asm-alpha/signal.h b/trunk/arch/alpha/include/asm/signal.h similarity index 100% rename from trunk/include/asm-alpha/signal.h rename to trunk/arch/alpha/include/asm/signal.h diff --git a/trunk/include/asm-alpha/smp.h b/trunk/arch/alpha/include/asm/smp.h similarity index 100% rename from trunk/include/asm-alpha/smp.h rename to trunk/arch/alpha/include/asm/smp.h diff --git a/trunk/include/asm-alpha/socket.h b/trunk/arch/alpha/include/asm/socket.h similarity index 100% rename from trunk/include/asm-alpha/socket.h rename to trunk/arch/alpha/include/asm/socket.h diff --git a/trunk/include/asm-alpha/sockios.h b/trunk/arch/alpha/include/asm/sockios.h similarity index 100% rename from trunk/include/asm-alpha/sockios.h rename to trunk/arch/alpha/include/asm/sockios.h diff --git a/trunk/include/asm-alpha/spinlock.h b/trunk/arch/alpha/include/asm/spinlock.h similarity index 100% rename from trunk/include/asm-alpha/spinlock.h rename to trunk/arch/alpha/include/asm/spinlock.h diff --git a/trunk/include/asm-alpha/spinlock_types.h b/trunk/arch/alpha/include/asm/spinlock_types.h similarity index 100% rename from trunk/include/asm-alpha/spinlock_types.h rename to trunk/arch/alpha/include/asm/spinlock_types.h diff --git a/trunk/include/asm-alpha/stat.h b/trunk/arch/alpha/include/asm/stat.h similarity index 100% rename from trunk/include/asm-alpha/stat.h rename to trunk/arch/alpha/include/asm/stat.h diff --git a/trunk/include/asm-alpha/statfs.h b/trunk/arch/alpha/include/asm/statfs.h similarity index 100% rename from trunk/include/asm-alpha/statfs.h rename to trunk/arch/alpha/include/asm/statfs.h diff --git a/trunk/include/asm-alpha/string.h b/trunk/arch/alpha/include/asm/string.h similarity index 100% rename from trunk/include/asm-alpha/string.h rename to trunk/arch/alpha/include/asm/string.h diff --git a/trunk/include/asm-alpha/suspend.h b/trunk/arch/alpha/include/asm/suspend.h similarity index 100% rename from trunk/include/asm-alpha/suspend.h rename to trunk/arch/alpha/include/asm/suspend.h diff --git a/trunk/include/asm-alpha/sysinfo.h b/trunk/arch/alpha/include/asm/sysinfo.h similarity index 100% rename from trunk/include/asm-alpha/sysinfo.h rename to trunk/arch/alpha/include/asm/sysinfo.h diff --git a/trunk/include/asm-alpha/system.h b/trunk/arch/alpha/include/asm/system.h similarity index 100% rename from trunk/include/asm-alpha/system.h rename to trunk/arch/alpha/include/asm/system.h diff --git a/trunk/include/asm-alpha/termbits.h b/trunk/arch/alpha/include/asm/termbits.h similarity index 100% rename from trunk/include/asm-alpha/termbits.h rename to trunk/arch/alpha/include/asm/termbits.h diff --git a/trunk/include/asm-alpha/termios.h b/trunk/arch/alpha/include/asm/termios.h similarity index 100% rename from trunk/include/asm-alpha/termios.h rename to trunk/arch/alpha/include/asm/termios.h diff --git a/trunk/include/asm-alpha/thread_info.h b/trunk/arch/alpha/include/asm/thread_info.h similarity index 100% rename from trunk/include/asm-alpha/thread_info.h rename to trunk/arch/alpha/include/asm/thread_info.h diff --git a/trunk/include/asm-alpha/timex.h b/trunk/arch/alpha/include/asm/timex.h similarity index 100% rename from trunk/include/asm-alpha/timex.h rename to trunk/arch/alpha/include/asm/timex.h diff --git a/trunk/include/asm-alpha/tlb.h b/trunk/arch/alpha/include/asm/tlb.h similarity index 100% rename from trunk/include/asm-alpha/tlb.h rename to trunk/arch/alpha/include/asm/tlb.h diff --git a/trunk/include/asm-alpha/tlbflush.h b/trunk/arch/alpha/include/asm/tlbflush.h similarity index 100% rename from trunk/include/asm-alpha/tlbflush.h rename to trunk/arch/alpha/include/asm/tlbflush.h diff --git a/trunk/include/asm-alpha/topology.h b/trunk/arch/alpha/include/asm/topology.h similarity index 100% rename from trunk/include/asm-alpha/topology.h rename to trunk/arch/alpha/include/asm/topology.h diff --git a/trunk/include/asm-alpha/types.h b/trunk/arch/alpha/include/asm/types.h similarity index 100% rename from trunk/include/asm-alpha/types.h rename to trunk/arch/alpha/include/asm/types.h diff --git a/trunk/include/asm-alpha/uaccess.h b/trunk/arch/alpha/include/asm/uaccess.h similarity index 100% rename from trunk/include/asm-alpha/uaccess.h rename to trunk/arch/alpha/include/asm/uaccess.h diff --git a/trunk/include/asm-alpha/ucontext.h b/trunk/arch/alpha/include/asm/ucontext.h similarity index 100% rename from trunk/include/asm-alpha/ucontext.h rename to trunk/arch/alpha/include/asm/ucontext.h diff --git a/trunk/include/asm-alpha/unaligned.h b/trunk/arch/alpha/include/asm/unaligned.h similarity index 100% rename from trunk/include/asm-alpha/unaligned.h rename to trunk/arch/alpha/include/asm/unaligned.h diff --git a/trunk/include/asm-alpha/unistd.h b/trunk/arch/alpha/include/asm/unistd.h similarity index 100% rename from trunk/include/asm-alpha/unistd.h rename to trunk/arch/alpha/include/asm/unistd.h diff --git a/trunk/include/asm-alpha/user.h b/trunk/arch/alpha/include/asm/user.h similarity index 100% rename from trunk/include/asm-alpha/user.h rename to trunk/arch/alpha/include/asm/user.h diff --git a/trunk/include/asm-alpha/vga.h b/trunk/arch/alpha/include/asm/vga.h similarity index 100% rename from trunk/include/asm-alpha/vga.h rename to trunk/arch/alpha/include/asm/vga.h diff --git a/trunk/include/asm-alpha/xor.h b/trunk/arch/alpha/include/asm/xor.h similarity index 100% rename from trunk/include/asm-alpha/xor.h rename to trunk/arch/alpha/include/asm/xor.h diff --git a/trunk/arch/arm/Makefile b/trunk/arch/arm/Makefile index 2f0747744236..703a44fa0f9b 100644 --- a/trunk/arch/arm/Makefile +++ b/trunk/arch/arm/Makefile @@ -97,9 +97,7 @@ textofs-y := 0x00008000 machine-$(CONFIG_ARCH_RPC) := rpc machine-$(CONFIG_ARCH_EBSA110) := ebsa110 machine-$(CONFIG_ARCH_CLPS7500) := clps7500 - incdir-$(CONFIG_ARCH_CLPS7500) := cl7500 machine-$(CONFIG_FOOTBRIDGE) := footbridge - incdir-$(CONFIG_FOOTBRIDGE) := ebsa285 machine-$(CONFIG_ARCH_SHARK) := shark machine-$(CONFIG_ARCH_SA1100) := sa1100 ifeq ($(CONFIG_ARCH_SA1100),y) @@ -114,13 +112,15 @@ endif machine-$(CONFIG_ARCH_IOP32X) := iop32x machine-$(CONFIG_ARCH_IOP33X) := iop33x machine-$(CONFIG_ARCH_IOP13XX) := iop13xx + plat-$(CONFIG_PLAT_IOP) := iop machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx machine-$(CONFIG_ARCH_IXP2000) := ixp2000 machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx machine-$(CONFIG_ARCH_OMAP1) := omap1 machine-$(CONFIG_ARCH_OMAP2) := omap2 - incdir-$(CONFIG_ARCH_OMAP) := omap - machine-$(CONFIG_ARCH_S3C2410) := s3c2410 + plat-$(CONFIG_ARCH_OMAP) := omap + machine-$(CONFIG_ARCH_S3C2410) := s3c2410 s3c2400 s3c2412 s3c2440 s3c2442 s3c2443 + plat-$(CONFIG_PLAT_S3C24XX) := s3c24xx machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x machine-$(CONFIG_ARCH_VERSATILE) := versatile machine-$(CONFIG_ARCH_IMX) := imx @@ -135,10 +135,11 @@ endif machine-$(CONFIG_ARCH_DAVINCI) := davinci machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood machine-$(CONFIG_ARCH_KS8695) := ks8695 - incdir-$(CONFIG_ARCH_MXC) := mxc + plat-$(CONFIG_ARCH_MXC) := mxc machine-$(CONFIG_ARCH_MX2) := mx2 machine-$(CONFIG_ARCH_MX3) := mx3 machine-$(CONFIG_ARCH_ORION5X) := orion5x + plat-$(CONFIG_PLAT_ORION) := orion machine-$(CONFIG_ARCH_MSM7X00A) := msm machine-$(CONFIG_ARCH_LOKI) := loki machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0 @@ -153,17 +154,22 @@ endif # The byte offset of the kernel image in RAM from the start of RAM. TEXT_OFFSET := $(textofs-y) -ifeq ($(incdir-y),) -incdir-y := $(machine-y) -endif -INCDIR := arch-$(incdir-y) - +# The first directory contains additional information for the boot setup code ifneq ($(machine-y),) -MACHINE := arch/arm/mach-$(machine-y)/ +MACHINE := arch/arm/mach-$(word 1,$(machine-y))/ else MACHINE := endif +machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) +platdirs := $(patsubst %,arch/arm/plat-%/,$(plat-y)) + +ifeq ($(KBUILD_SRC),) +KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs) $(platdirs)) +else +KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs)) +endif + export TEXT_OFFSET GZFLAGS MMUEXT # Do we have FASTFPE? @@ -174,23 +180,11 @@ endif # If we have a machine-specific directory, then include it in the build. core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/ -core-y += $(MACHINE) -core-$(CONFIG_ARCH_S3C2410) += arch/arm/mach-s3c2400/ -core-$(CONFIG_ARCH_S3C2410) += arch/arm/mach-s3c2412/ -core-$(CONFIG_ARCH_S3C2410) += arch/arm/mach-s3c2440/ -core-$(CONFIG_ARCH_S3C2410) += arch/arm/mach-s3c2442/ -core-$(CONFIG_ARCH_S3C2410) += arch/arm/mach-s3c2443/ +core-y += $(machdirs) $(platdirs) core-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/ core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ) core-$(CONFIG_VFP) += arch/arm/vfp/ -# If we have a common platform directory, then include it in the build. -core-$(CONFIG_PLAT_IOP) += arch/arm/plat-iop/ -core-$(CONFIG_PLAT_ORION) += arch/arm/plat-orion/ -core-$(CONFIG_ARCH_OMAP) += arch/arm/plat-omap/ -core-$(CONFIG_PLAT_S3C24XX) += arch/arm/plat-s3c24xx/ -core-$(CONFIG_ARCH_MXC) += arch/arm/plat-mxc/ - drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ libs-y := arch/arm/lib/ $(libs-y) @@ -210,20 +204,10 @@ boot := arch/arm/boot # them changed. We use .arch to indicate when they were updated # last, otherwise make uses the target directory mtime. -include/asm-arm/.arch: $(wildcard include/config/arch/*.h) include/config/auto.conf - @echo ' SYMLINK include/asm-arm/arch -> include/asm-arm/$(INCDIR)' -ifneq ($(KBUILD_SRC),) - $(Q)mkdir -p include/asm-arm - $(Q)ln -fsn $(srctree)/include/asm-arm/$(INCDIR) include/asm-arm/arch -else - $(Q)ln -fsn $(INCDIR) include/asm-arm/arch -endif - @touch $@ - archprepare: maketools PHONY += maketools FORCE -maketools: include/linux/version.h include/asm-arm/.arch FORCE +maketools: include/linux/version.h FORCE $(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h # Convert bzImage to zImage diff --git a/trunk/arch/arm/boot/compressed/Makefile b/trunk/arch/arm/boot/compressed/Makefile index 95baac4939e0..94462a097f86 100644 --- a/trunk/arch/arm/boot/compressed/Makefile +++ b/trunk/arch/arm/boot/compressed/Makefile @@ -112,6 +112,3 @@ $(obj)/font.c: $(FONTC) $(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile .config @sed "$(SEDFLAGS)" < $< > $@ - -$(obj)/misc.o: $(obj)/misc.c include/asm/arch/uncompress.h lib/inflate.c - diff --git a/trunk/arch/arm/boot/compressed/head-xscale.S b/trunk/arch/arm/boot/compressed/head-xscale.S index dd3fbd6766e1..aa5ee49c5c5a 100644 --- a/trunk/arch/arm/boot/compressed/head-xscale.S +++ b/trunk/arch/arm/boot/compressed/head-xscale.S @@ -6,7 +6,6 @@ */ #include -#include .section ".start", "ax" diff --git a/trunk/arch/arm/boot/compressed/head.S b/trunk/arch/arm/boot/compressed/head.S index de41daeab5e9..d42f89b7760b 100644 --- a/trunk/arch/arm/boot/compressed/head.S +++ b/trunk/arch/arm/boot/compressed/head.S @@ -37,7 +37,7 @@ #else -#include +#include .macro writeb, ch, rb senduart \ch, \rb diff --git a/trunk/arch/arm/boot/compressed/misc.c b/trunk/arch/arm/boot/compressed/misc.c index 7145cc7c04f0..65ce8fff29db 100644 --- a/trunk/arch/arm/boot/compressed/misc.c +++ b/trunk/arch/arm/boot/compressed/misc.c @@ -27,7 +27,7 @@ unsigned int __machine_arch_type; static void putstr(const char *ptr); #include -#include +#include #ifdef CONFIG_DEBUG_ICEDCC diff --git a/trunk/arch/arm/common/locomo.c b/trunk/arch/arm/common/locomo.c index 85579654d3b7..283051eaf931 100644 --- a/trunk/arch/arm/common/locomo.c +++ b/trunk/arch/arm/common/locomo.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include diff --git a/trunk/arch/arm/common/sa1111.c b/trunk/arch/arm/common/sa1111.c index f6d3fdda7067..ec8a5471bf06 100644 --- a/trunk/arch/arm/common/sa1111.c +++ b/trunk/arch/arm/common/sa1111.c @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include #include diff --git a/trunk/arch/arm/common/sharpsl_pm.c b/trunk/arch/arm/common/sharpsl_pm.c index 8822b684d474..db8309161408 100644 --- a/trunk/arch/arm/common/sharpsl_pm.c +++ b/trunk/arch/arm/common/sharpsl_pm.c @@ -26,13 +26,12 @@ #include #include -#include -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include /* diff --git a/trunk/arch/arm/common/time-acorn.c b/trunk/arch/arm/common/time-acorn.c index d544da414731..df0983aafe69 100644 --- a/trunk/arch/arm/common/time-acorn.c +++ b/trunk/arch/arm/common/time-acorn.c @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/trunk/arch/arm/common/uengine.c b/trunk/arch/arm/common/uengine.c index 117cab30bd36..7ecd3c0ab011 100644 --- a/trunk/arch/arm/common/uengine.c +++ b/trunk/arch/arm/common/uengine.c @@ -16,8 +16,7 @@ #include #include #include -#include -#include +#include #include #include diff --git a/trunk/include/asm-arm/Kbuild b/trunk/arch/arm/include/asm/Kbuild similarity index 100% rename from trunk/include/asm-arm/Kbuild rename to trunk/arch/arm/include/asm/Kbuild diff --git a/trunk/include/asm-arm/a.out-core.h b/trunk/arch/arm/include/asm/a.out-core.h similarity index 100% rename from trunk/include/asm-arm/a.out-core.h rename to trunk/arch/arm/include/asm/a.out-core.h diff --git a/trunk/include/asm-arm/a.out.h b/trunk/arch/arm/include/asm/a.out.h similarity index 100% rename from trunk/include/asm-arm/a.out.h rename to trunk/arch/arm/include/asm/a.out.h diff --git a/trunk/include/asm-arm/assembler.h b/trunk/arch/arm/include/asm/assembler.h similarity index 98% rename from trunk/include/asm-arm/assembler.h rename to trunk/arch/arm/include/asm/assembler.h index 911393b2c6f0..6116e4893c0a 100644 --- a/trunk/include/asm-arm/assembler.h +++ b/trunk/arch/arm/include/asm/assembler.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/assembler.h + * arch/arm/include/asm/assembler.h * * Copyright (C) 1996-2000 Russell King * diff --git a/trunk/include/asm-arm/atomic.h b/trunk/arch/arm/include/asm/atomic.h similarity index 99% rename from trunk/include/asm-arm/atomic.h rename to trunk/arch/arm/include/asm/atomic.h index 3b59f94b5a3d..325f881ccb50 100644 --- a/trunk/include/asm-arm/atomic.h +++ b/trunk/arch/arm/include/asm/atomic.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/atomic.h + * arch/arm/include/asm/atomic.h * * Copyright (C) 1996 Russell King. * Copyright (C) 2002 Deep Blue Solutions Ltd. diff --git a/trunk/include/asm-arm/auxvec.h b/trunk/arch/arm/include/asm/auxvec.h similarity index 100% rename from trunk/include/asm-arm/auxvec.h rename to trunk/arch/arm/include/asm/auxvec.h diff --git a/trunk/include/asm-arm/bitops.h b/trunk/arch/arm/include/asm/bitops.h similarity index 100% rename from trunk/include/asm-arm/bitops.h rename to trunk/arch/arm/include/asm/bitops.h diff --git a/trunk/include/asm-arm/bug.h b/trunk/arch/arm/include/asm/bug.h similarity index 100% rename from trunk/include/asm-arm/bug.h rename to trunk/arch/arm/include/asm/bug.h diff --git a/trunk/include/asm-arm/bugs.h b/trunk/arch/arm/include/asm/bugs.h similarity index 93% rename from trunk/include/asm-arm/bugs.h rename to trunk/arch/arm/include/asm/bugs.h index ca54eb0f12d7..a97f1ea708d1 100644 --- a/trunk/include/asm-arm/bugs.h +++ b/trunk/arch/arm/include/asm/bugs.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/bugs.h + * arch/arm/include/asm/bugs.h * * Copyright (C) 1995-2003 Russell King * diff --git a/trunk/arch/arm/include/asm/byteorder.h b/trunk/arch/arm/include/asm/byteorder.h new file mode 100644 index 000000000000..4fbfb22f65a0 --- /dev/null +++ b/trunk/arch/arm/include/asm/byteorder.h @@ -0,0 +1,58 @@ +/* + * arch/arm/include/asm/byteorder.h + * + * ARM Endian-ness. In little endian mode, the data bus is connected such + * that byte accesses appear as: + * 0 = d0...d7, 1 = d8...d15, 2 = d16...d23, 3 = d24...d31 + * and word accesses (data or instruction) appear as: + * d0...d31 + * + * When in big endian mode, byte accesses appear as: + * 0 = d24...d31, 1 = d16...d23, 2 = d8...d15, 3 = d0...d7 + * and word accesses (data or instruction) appear as: + * d0...d31 + */ +#ifndef __ASM_ARM_BYTEORDER_H +#define __ASM_ARM_BYTEORDER_H + +#include +#include + +static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) +{ + __u32 t; + +#ifndef __thumb__ + if (!__builtin_constant_p(x)) { + /* + * The compiler needs a bit of a hint here to always do the + * right thing and not screw it up to different degrees + * depending on the gcc version. + */ + asm ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x)); + } else +#endif + t = x ^ ((x << 16) | (x >> 16)); /* eor r1,r0,r0,ror #16 */ + + x = (x << 24) | (x >> 8); /* mov r0,r0,ror #8 */ + t &= ~0x00FF0000; /* bic r1,r1,#0x00FF0000 */ + x ^= (t >> 8); /* eor r0,r0,r1,lsr #8 */ + + return x; +} + +#define __arch__swab32(x) ___arch__swab32(x) + +#if !defined(__STRICT_ANSI__) || defined(__KERNEL__) +# define __BYTEORDER_HAS_U64__ +# define __SWAB_64_THRU_32__ +#endif + +#ifdef __ARMEB__ +#include +#else +#include +#endif + +#endif + diff --git a/trunk/include/asm-arm/cache.h b/trunk/arch/arm/include/asm/cache.h similarity index 80% rename from trunk/include/asm-arm/cache.h rename to trunk/arch/arm/include/asm/cache.h index 31332c8ac04e..cb7a9e97fd7e 100644 --- a/trunk/include/asm-arm/cache.h +++ b/trunk/arch/arm/include/asm/cache.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/cache.h + * arch/arm/include/asm/cache.h */ #ifndef __ASMARM_CACHE_H #define __ASMARM_CACHE_H diff --git a/trunk/arch/arm/include/asm/cacheflush.h b/trunk/arch/arm/include/asm/cacheflush.h new file mode 100644 index 000000000000..9073d9c6567e --- /dev/null +++ b/trunk/arch/arm/include/asm/cacheflush.h @@ -0,0 +1,537 @@ +/* + * arch/arm/include/asm/cacheflush.h + * + * Copyright (C) 1999-2002 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef _ASMARM_CACHEFLUSH_H +#define _ASMARM_CACHEFLUSH_H + +#include +#include + +#include +#include + +#define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) + +/* + * Cache Model + * =========== + */ +#undef _CACHE +#undef MULTI_CACHE + +#if defined(CONFIG_CPU_CACHE_V3) +# ifdef _CACHE +# define MULTI_CACHE 1 +# else +# define _CACHE v3 +# endif +#endif + +#if defined(CONFIG_CPU_CACHE_V4) +# ifdef _CACHE +# define MULTI_CACHE 1 +# else +# define _CACHE v4 +# endif +#endif + +#if defined(CONFIG_CPU_ARM920T) || defined(CONFIG_CPU_ARM922T) || \ + defined(CONFIG_CPU_ARM925T) || defined(CONFIG_CPU_ARM1020) +# define MULTI_CACHE 1 +#endif + +#if defined(CONFIG_CPU_ARM926T) +# ifdef _CACHE +# define MULTI_CACHE 1 +# else +# define _CACHE arm926 +# endif +#endif + +#if defined(CONFIG_CPU_ARM940T) +# ifdef _CACHE +# define MULTI_CACHE 1 +# else +# define _CACHE arm940 +# endif +#endif + +#if defined(CONFIG_CPU_ARM946E) +# ifdef _CACHE +# define MULTI_CACHE 1 +# else +# define _CACHE arm946 +# endif +#endif + +#if defined(CONFIG_CPU_CACHE_V4WB) +# ifdef _CACHE +# define MULTI_CACHE 1 +# else +# define _CACHE v4wb +# endif +#endif + +#if defined(CONFIG_CPU_XSCALE) +# ifdef _CACHE +# define MULTI_CACHE 1 +# else +# define _CACHE xscale +# endif +#endif + +#if defined(CONFIG_CPU_XSC3) +# ifdef _CACHE +# define MULTI_CACHE 1 +# else +# define _CACHE xsc3 +# endif +#endif + +#if defined(CONFIG_CPU_FEROCEON) +# define MULTI_CACHE 1 +#endif + +#if defined(CONFIG_CPU_V6) +//# ifdef _CACHE +# define MULTI_CACHE 1 +//# else +//# define _CACHE v6 +//# endif +#endif + +#if defined(CONFIG_CPU_V7) +//# ifdef _CACHE +# define MULTI_CACHE 1 +//# else +//# define _CACHE v7 +//# endif +#endif + +#if !defined(_CACHE) && !defined(MULTI_CACHE) +#error Unknown cache maintainence model +#endif + +/* + * This flag is used to indicate that the page pointed to by a pte + * is dirty and requires cleaning before returning it to the user. + */ +#define PG_dcache_dirty PG_arch_1 + +/* + * MM Cache Management + * =================== + * + * The arch/arm/mm/cache-*.S and arch/arm/mm/proc-*.S files + * implement these methods. + * + * Start addresses are inclusive and end addresses are exclusive; + * start addresses should be rounded down, end addresses up. + * + * See Documentation/cachetlb.txt for more information. + * Please note that the implementation of these, and the required + * effects are cache-type (VIVT/VIPT/PIPT) specific. + * + * flush_cache_kern_all() + * + * Unconditionally clean and invalidate the entire cache. + * + * flush_cache_user_mm(mm) + * + * Clean and invalidate all user space cache entries + * before a change of page tables. + * + * flush_cache_user_range(start, end, flags) + * + * Clean and invalidate a range of cache entries in the + * specified address space before a change of page tables. + * - start - user start address (inclusive, page aligned) + * - end - user end address (exclusive, page aligned) + * - flags - vma->vm_flags field + * + * coherent_kern_range(start, end) + * + * Ensure coherency between the Icache and the Dcache in the + * region described by start, end. If you have non-snooping + * Harvard caches, you need to implement this function. + * - start - virtual start address + * - end - virtual end address + * + * DMA Cache Coherency + * =================== + * + * dma_inv_range(start, end) + * + * Invalidate (discard) the specified virtual address range. + * May not write back any entries. If 'start' or 'end' + * are not cache line aligned, those lines must be written + * back. + * - start - virtual start address + * - end - virtual end address + * + * dma_clean_range(start, end) + * + * Clean (write back) the specified virtual address range. + * - start - virtual start address + * - end - virtual end address + * + * dma_flush_range(start, end) + * + * Clean and invalidate the specified virtual address range. + * - start - virtual start address + * - end - virtual end address + */ + +struct cpu_cache_fns { + void (*flush_kern_all)(void); + void (*flush_user_all)(void); + void (*flush_user_range)(unsigned long, unsigned long, unsigned int); + + void (*coherent_kern_range)(unsigned long, unsigned long); + void (*coherent_user_range)(unsigned long, unsigned long); + void (*flush_kern_dcache_page)(void *); + + void (*dma_inv_range)(const void *, const void *); + void (*dma_clean_range)(const void *, const void *); + void (*dma_flush_range)(const void *, const void *); +}; + +struct outer_cache_fns { + void (*inv_range)(unsigned long, unsigned long); + void (*clean_range)(unsigned long, unsigned long); + void (*flush_range)(unsigned long, unsigned long); +}; + +/* + * Select the calling method + */ +#ifdef MULTI_CACHE + +extern struct cpu_cache_fns cpu_cache; + +#define __cpuc_flush_kern_all cpu_cache.flush_kern_all +#define __cpuc_flush_user_all cpu_cache.flush_user_all +#define __cpuc_flush_user_range cpu_cache.flush_user_range +#define __cpuc_coherent_kern_range cpu_cache.coherent_kern_range +#define __cpuc_coherent_user_range cpu_cache.coherent_user_range +#define __cpuc_flush_dcache_page cpu_cache.flush_kern_dcache_page + +/* + * These are private to the dma-mapping API. Do not use directly. + * Their sole purpose is to ensure that data held in the cache + * is visible to DMA, or data written by DMA to system memory is + * visible to the CPU. + */ +#define dmac_inv_range cpu_cache.dma_inv_range +#define dmac_clean_range cpu_cache.dma_clean_range +#define dmac_flush_range cpu_cache.dma_flush_range + +#else + +#define __cpuc_flush_kern_all __glue(_CACHE,_flush_kern_cache_all) +#define __cpuc_flush_user_all __glue(_CACHE,_flush_user_cache_all) +#define __cpuc_flush_user_range __glue(_CACHE,_flush_user_cache_range) +#define __cpuc_coherent_kern_range __glue(_CACHE,_coherent_kern_range) +#define __cpuc_coherent_user_range __glue(_CACHE,_coherent_user_range) +#define __cpuc_flush_dcache_page __glue(_CACHE,_flush_kern_dcache_page) + +extern void __cpuc_flush_kern_all(void); +extern void __cpuc_flush_user_all(void); +extern void __cpuc_flush_user_range(unsigned long, unsigned long, unsigned int); +extern void __cpuc_coherent_kern_range(unsigned long, unsigned long); +extern void __cpuc_coherent_user_range(unsigned long, unsigned long); +extern void __cpuc_flush_dcache_page(void *); + +/* + * These are private to the dma-mapping API. Do not use directly. + * Their sole purpose is to ensure that data held in the cache + * is visible to DMA, or data written by DMA to system memory is + * visible to the CPU. + */ +#define dmac_inv_range __glue(_CACHE,_dma_inv_range) +#define dmac_clean_range __glue(_CACHE,_dma_clean_range) +#define dmac_flush_range __glue(_CACHE,_dma_flush_range) + +extern void dmac_inv_range(const void *, const void *); +extern void dmac_clean_range(const void *, const void *); +extern void dmac_flush_range(const void *, const void *); + +#endif + +#ifdef CONFIG_OUTER_CACHE + +extern struct outer_cache_fns outer_cache; + +static inline void outer_inv_range(unsigned long start, unsigned long end) +{ + if (outer_cache.inv_range) + outer_cache.inv_range(start, end); +} +static inline void outer_clean_range(unsigned long start, unsigned long end) +{ + if (outer_cache.clean_range) + outer_cache.clean_range(start, end); +} +static inline void outer_flush_range(unsigned long start, unsigned long end) +{ + if (outer_cache.flush_range) + outer_cache.flush_range(start, end); +} + +#else + +static inline void outer_inv_range(unsigned long start, unsigned long end) +{ } +static inline void outer_clean_range(unsigned long start, unsigned long end) +{ } +static inline void outer_flush_range(unsigned long start, unsigned long end) +{ } + +#endif + +/* + * flush_cache_vmap() is used when creating mappings (eg, via vmap, + * vmalloc, ioremap etc) in kernel space for pages. Since the + * direct-mappings of these pages may contain cached data, we need + * to do a full cache flush to ensure that writebacks don't corrupt + * data placed into these pages via the new mappings. + */ +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() + +/* + * Copy user data from/to a page which is mapped into a different + * processes address space. Really, we want to allow our "user + * space" model to handle this. + */ +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + do { \ + memcpy(dst, src, len); \ + flush_ptrace_access(vma, page, vaddr, dst, len, 1);\ + } while (0) + +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + do { \ + memcpy(dst, src, len); \ + } while (0) + +/* + * Convert calls to our calling convention. + */ +#define flush_cache_all() __cpuc_flush_kern_all() +#ifndef CONFIG_CPU_CACHE_VIPT +static inline void flush_cache_mm(struct mm_struct *mm) +{ + if (cpu_isset(smp_processor_id(), mm->cpu_vm_mask)) + __cpuc_flush_user_all(); +} + +static inline void +flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) +{ + if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) + __cpuc_flush_user_range(start & PAGE_MASK, PAGE_ALIGN(end), + vma->vm_flags); +} + +static inline void +flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn) +{ + if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { + unsigned long addr = user_addr & PAGE_MASK; + __cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags); + } +} + +static inline void +flush_ptrace_access(struct vm_area_struct *vma, struct page *page, + unsigned long uaddr, void *kaddr, + unsigned long len, int write) +{ + if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { + unsigned long addr = (unsigned long)kaddr; + __cpuc_coherent_kern_range(addr, addr + len); + } +} +#else +extern void flush_cache_mm(struct mm_struct *mm); +extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); +extern void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn); +extern void flush_ptrace_access(struct vm_area_struct *vma, struct page *page, + unsigned long uaddr, void *kaddr, + unsigned long len, int write); +#endif + +#define flush_cache_dup_mm(mm) flush_cache_mm(mm) + +/* + * flush_cache_user_range is used when we want to ensure that the + * Harvard caches are synchronised for the user space address range. + * This is used for the ARM private sys_cacheflush system call. + */ +#define flush_cache_user_range(vma,start,end) \ + __cpuc_coherent_user_range((start) & PAGE_MASK, PAGE_ALIGN(end)) + +/* + * Perform necessary cache operations to ensure that data previously + * stored within this range of addresses can be executed by the CPU. + */ +#define flush_icache_range(s,e) __cpuc_coherent_kern_range(s,e) + +/* + * Perform necessary cache operations to ensure that the TLB will + * see data written in the specified area. + */ +#define clean_dcache_area(start,size) cpu_dcache_clean_area(start, size) + +/* + * flush_dcache_page is used when the kernel has written to the page + * cache page at virtual address page->virtual. + * + * If this page isn't mapped (ie, page_mapping == NULL), or it might + * have userspace mappings, then we _must_ always clean + invalidate + * the dcache entries associated with the kernel mapping. + * + * Otherwise we can defer the operation, and clean the cache when we are + * about to change to user space. This is the same method as used on SPARC64. + * See update_mmu_cache for the user space part. + */ +extern void flush_dcache_page(struct page *); + +extern void __flush_dcache_page(struct address_space *mapping, struct page *page); + +static inline void __flush_icache_all(void) +{ + asm("mcr p15, 0, %0, c7, c5, 0 @ invalidate I-cache\n" + : + : "r" (0)); +} + +#define ARCH_HAS_FLUSH_ANON_PAGE +static inline void flush_anon_page(struct vm_area_struct *vma, + struct page *page, unsigned long vmaddr) +{ + extern void __flush_anon_page(struct vm_area_struct *vma, + struct page *, unsigned long); + if (PageAnon(page)) + __flush_anon_page(vma, page, vmaddr); +} + +#define flush_dcache_mmap_lock(mapping) \ + spin_lock_irq(&(mapping)->tree_lock) +#define flush_dcache_mmap_unlock(mapping) \ + spin_unlock_irq(&(mapping)->tree_lock) + +#define flush_icache_user_range(vma,page,addr,len) \ + flush_dcache_page(page) + +/* + * We don't appear to need to do anything here. In fact, if we did, we'd + * duplicate cache flushing elsewhere performed by flush_dcache_page(). + */ +#define flush_icache_page(vma,page) do { } while (0) + +static inline void flush_ioremap_region(unsigned long phys, void __iomem *virt, + unsigned offset, size_t size) +{ + const void *start = (void __force *)virt + offset; + dmac_inv_range(start, start + size); +} + +#define __cacheid_present(val) (val != read_cpuid(CPUID_ID)) +#define __cacheid_type_v7(val) ((val & (7 << 29)) == (4 << 29)) + +#define __cacheid_vivt_prev7(val) ((val & (15 << 25)) != (14 << 25)) +#define __cacheid_vipt_prev7(val) ((val & (15 << 25)) == (14 << 25)) +#define __cacheid_vipt_nonaliasing_prev7(val) ((val & (15 << 25 | 1 << 23)) == (14 << 25)) +#define __cacheid_vipt_aliasing_prev7(val) ((val & (15 << 25 | 1 << 23)) == (14 << 25 | 1 << 23)) + +#define __cacheid_vivt(val) (__cacheid_type_v7(val) ? 0 : __cacheid_vivt_prev7(val)) +#define __cacheid_vipt(val) (__cacheid_type_v7(val) ? 1 : __cacheid_vipt_prev7(val)) +#define __cacheid_vipt_nonaliasing(val) (__cacheid_type_v7(val) ? 1 : __cacheid_vipt_nonaliasing_prev7(val)) +#define __cacheid_vipt_aliasing(val) (__cacheid_type_v7(val) ? 0 : __cacheid_vipt_aliasing_prev7(val)) +#define __cacheid_vivt_asid_tagged_instr(val) (__cacheid_type_v7(val) ? ((val & (3 << 14)) == (1 << 14)) : 0) + +#if defined(CONFIG_CPU_CACHE_VIVT) && !defined(CONFIG_CPU_CACHE_VIPT) +/* + * VIVT caches only + */ +#define cache_is_vivt() 1 +#define cache_is_vipt() 0 +#define cache_is_vipt_nonaliasing() 0 +#define cache_is_vipt_aliasing() 0 +#define icache_is_vivt_asid_tagged() 0 + +#elif !defined(CONFIG_CPU_CACHE_VIVT) && defined(CONFIG_CPU_CACHE_VIPT) +/* + * VIPT caches only + */ +#define cache_is_vivt() 0 +#define cache_is_vipt() 1 +#define cache_is_vipt_nonaliasing() \ + ({ \ + unsigned int __val = read_cpuid(CPUID_CACHETYPE); \ + __cacheid_vipt_nonaliasing(__val); \ + }) + +#define cache_is_vipt_aliasing() \ + ({ \ + unsigned int __val = read_cpuid(CPUID_CACHETYPE); \ + __cacheid_vipt_aliasing(__val); \ + }) + +#define icache_is_vivt_asid_tagged() \ + ({ \ + unsigned int __val = read_cpuid(CPUID_CACHETYPE); \ + __cacheid_vivt_asid_tagged_instr(__val); \ + }) + +#else +/* + * VIVT or VIPT caches. Note that this is unreliable since ARM926 + * and V6 CPUs satisfy the "(val & (15 << 25)) == (14 << 25)" test. + * There's no way to tell from the CacheType register what type (!) + * the cache is. + */ +#define cache_is_vivt() \ + ({ \ + unsigned int __val = read_cpuid(CPUID_CACHETYPE); \ + (!__cacheid_present(__val)) || __cacheid_vivt(__val); \ + }) + +#define cache_is_vipt() \ + ({ \ + unsigned int __val = read_cpuid(CPUID_CACHETYPE); \ + __cacheid_present(__val) && __cacheid_vipt(__val); \ + }) + +#define cache_is_vipt_nonaliasing() \ + ({ \ + unsigned int __val = read_cpuid(CPUID_CACHETYPE); \ + __cacheid_present(__val) && \ + __cacheid_vipt_nonaliasing(__val); \ + }) + +#define cache_is_vipt_aliasing() \ + ({ \ + unsigned int __val = read_cpuid(CPUID_CACHETYPE); \ + __cacheid_present(__val) && \ + __cacheid_vipt_aliasing(__val); \ + }) + +#define icache_is_vivt_asid_tagged() \ + ({ \ + unsigned int __val = read_cpuid(CPUID_CACHETYPE); \ + __cacheid_present(__val) && \ + __cacheid_vivt_asid_tagged_instr(__val); \ + }) + +#endif + +#endif diff --git a/trunk/include/asm-arm/checksum.h b/trunk/arch/arm/include/asm/checksum.h similarity index 98% rename from trunk/include/asm-arm/checksum.h rename to trunk/arch/arm/include/asm/checksum.h index eaa0efd8d0d4..6dcc16430868 100644 --- a/trunk/include/asm-arm/checksum.h +++ b/trunk/arch/arm/include/asm/checksum.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/checksum.h + * arch/arm/include/asm/checksum.h * * IP checksum routines * diff --git a/trunk/include/asm-arm/cnt32_to_63.h b/trunk/arch/arm/include/asm/cnt32_to_63.h similarity index 100% rename from trunk/include/asm-arm/cnt32_to_63.h rename to trunk/arch/arm/include/asm/cnt32_to_63.h diff --git a/trunk/include/asm-arm/cpu-multi32.h b/trunk/arch/arm/include/asm/cpu-multi32.h similarity index 97% rename from trunk/include/asm-arm/cpu-multi32.h rename to trunk/arch/arm/include/asm/cpu-multi32.h index 3479de9266e5..e2b5b0b2116a 100644 --- a/trunk/include/asm-arm/cpu-multi32.h +++ b/trunk/arch/arm/include/asm/cpu-multi32.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/cpu-multi32.h + * arch/arm/include/asm/cpu-multi32.h * * Copyright (C) 2000 Russell King * diff --git a/trunk/include/asm-arm/cpu-single.h b/trunk/arch/arm/include/asm/cpu-single.h similarity index 97% rename from trunk/include/asm-arm/cpu-single.h rename to trunk/arch/arm/include/asm/cpu-single.h index 0b120ee36091..f073a6d2a406 100644 --- a/trunk/include/asm-arm/cpu-single.h +++ b/trunk/arch/arm/include/asm/cpu-single.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/cpu-single.h + * arch/arm/include/asm/cpu-single.h * * Copyright (C) 2000 Russell King * diff --git a/trunk/arch/arm/include/asm/cpu.h b/trunk/arch/arm/include/asm/cpu.h new file mode 100644 index 000000000000..634b2d7c612a --- /dev/null +++ b/trunk/arch/arm/include/asm/cpu.h @@ -0,0 +1,25 @@ +/* + * arch/arm/include/asm/cpu.h + * + * Copyright (C) 2004-2005 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __ASM_ARM_CPU_H +#define __ASM_ARM_CPU_H + +#include + +struct cpuinfo_arm { + struct cpu cpu; +#ifdef CONFIG_SMP + struct task_struct *idle; + unsigned int loops_per_jiffy; +#endif +}; + +DECLARE_PER_CPU(struct cpuinfo_arm, cpu_data); + +#endif diff --git a/trunk/include/asm-arm/cputime.h b/trunk/arch/arm/include/asm/cputime.h similarity index 100% rename from trunk/include/asm-arm/cputime.h rename to trunk/arch/arm/include/asm/cputime.h diff --git a/trunk/include/asm-arm/current.h b/trunk/arch/arm/include/asm/current.h similarity index 100% rename from trunk/include/asm-arm/current.h rename to trunk/arch/arm/include/asm/current.h diff --git a/trunk/include/asm-arm/delay.h b/trunk/arch/arm/include/asm/delay.h similarity index 100% rename from trunk/include/asm-arm/delay.h rename to trunk/arch/arm/include/asm/delay.h diff --git a/trunk/include/asm-arm/device.h b/trunk/arch/arm/include/asm/device.h similarity index 100% rename from trunk/include/asm-arm/device.h rename to trunk/arch/arm/include/asm/device.h diff --git a/trunk/include/asm-arm/div64.h b/trunk/arch/arm/include/asm/div64.h similarity index 100% rename from trunk/include/asm-arm/div64.h rename to trunk/arch/arm/include/asm/div64.h diff --git a/trunk/include/asm-arm/dma-mapping.h b/trunk/arch/arm/include/asm/dma-mapping.h similarity index 100% rename from trunk/include/asm-arm/dma-mapping.h rename to trunk/arch/arm/include/asm/dma-mapping.h diff --git a/trunk/arch/arm/include/asm/dma.h b/trunk/arch/arm/include/asm/dma.h new file mode 100644 index 000000000000..75154b193117 --- /dev/null +++ b/trunk/arch/arm/include/asm/dma.h @@ -0,0 +1,143 @@ +#ifndef __ASM_ARM_DMA_H +#define __ASM_ARM_DMA_H + +typedef unsigned int dmach_t; + +#include +#include +#include +#include + +/* + * This is the maximum virtual address which can be DMA'd from. + */ +#ifndef MAX_DMA_ADDRESS +#define MAX_DMA_ADDRESS 0xffffffff +#endif + +/* + * DMA modes + */ +typedef unsigned int dmamode_t; + +#define DMA_MODE_MASK 3 + +#define DMA_MODE_READ 0 +#define DMA_MODE_WRITE 1 +#define DMA_MODE_CASCADE 2 +#define DMA_AUTOINIT 4 + +extern spinlock_t dma_spin_lock; + +static inline unsigned long claim_dma_lock(void) +{ + unsigned long flags; + spin_lock_irqsave(&dma_spin_lock, flags); + return flags; +} + +static inline void release_dma_lock(unsigned long flags) +{ + spin_unlock_irqrestore(&dma_spin_lock, flags); +} + +/* Clear the 'DMA Pointer Flip Flop'. + * Write 0 for LSB/MSB, 1 for MSB/LSB access. + */ +#define clear_dma_ff(channel) + +/* Set only the page register bits of the transfer address. + * + * NOTE: This is an architecture specific function, and should + * be hidden from the drivers + */ +extern void set_dma_page(dmach_t channel, char pagenr); + +/* Request a DMA channel + * + * Some architectures may need to do allocate an interrupt + */ +extern int request_dma(dmach_t channel, const char * device_id); + +/* Free a DMA channel + * + * Some architectures may need to do free an interrupt + */ +extern void free_dma(dmach_t channel); + +/* Enable DMA for this channel + * + * On some architectures, this may have other side effects like + * enabling an interrupt and setting the DMA registers. + */ +extern void enable_dma(dmach_t channel); + +/* Disable DMA for this channel + * + * On some architectures, this may have other side effects like + * disabling an interrupt or whatever. + */ +extern void disable_dma(dmach_t channel); + +/* Test whether the specified channel has an active DMA transfer + */ +extern int dma_channel_active(dmach_t channel); + +/* Set the DMA scatter gather list for this channel + * + * This should not be called if a DMA channel is enabled, + * especially since some DMA architectures don't update the + * DMA address immediately, but defer it to the enable_dma(). + */ +extern void set_dma_sg(dmach_t channel, struct scatterlist *sg, int nr_sg); + +/* Set the DMA address for this channel + * + * This should not be called if a DMA channel is enabled, + * especially since some DMA architectures don't update the + * DMA address immediately, but defer it to the enable_dma(). + */ +extern void __set_dma_addr(dmach_t channel, void *addr); +#define set_dma_addr(channel, addr) \ + __set_dma_addr(channel, bus_to_virt(addr)) + +/* Set the DMA byte count for this channel + * + * This should not be called if a DMA channel is enabled, + * especially since some DMA architectures don't update the + * DMA count immediately, but defer it to the enable_dma(). + */ +extern void set_dma_count(dmach_t channel, unsigned long count); + +/* Set the transfer direction for this channel + * + * This should not be called if a DMA channel is enabled, + * especially since some DMA architectures don't update the + * DMA transfer direction immediately, but defer it to the + * enable_dma(). + */ +extern void set_dma_mode(dmach_t channel, dmamode_t mode); + +/* Set the transfer speed for this channel + */ +extern void set_dma_speed(dmach_t channel, int cycle_ns); + +/* Get DMA residue count. After a DMA transfer, this + * should return zero. Reading this while a DMA transfer is + * still in progress will return unpredictable results. + * If called before the channel has been used, it may return 1. + * Otherwise, it returns the number of _bytes_ left to transfer. + */ +extern int get_dma_residue(dmach_t channel); + +#ifndef NO_DMA +#define NO_DMA 255 +#endif + +#ifdef CONFIG_PCI +extern int isa_dma_bridge_buggy; +#else +#define isa_dma_bridge_buggy (0) +#endif + +#endif /* _ARM_DMA_H */ diff --git a/trunk/include/asm-arm/domain.h b/trunk/arch/arm/include/asm/domain.h similarity index 98% rename from trunk/include/asm-arm/domain.h rename to trunk/arch/arm/include/asm/domain.h index 3c12a7625304..cc7ef4080711 100644 --- a/trunk/include/asm-arm/domain.h +++ b/trunk/arch/arm/include/asm/domain.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/domain.h + * arch/arm/include/asm/domain.h * * Copyright (C) 1999 Russell King. * diff --git a/trunk/include/asm-arm/ecard.h b/trunk/arch/arm/include/asm/ecard.h similarity index 99% rename from trunk/include/asm-arm/ecard.h rename to trunk/arch/arm/include/asm/ecard.h index 5e22881a630d..29f2610efc70 100644 --- a/trunk/include/asm-arm/ecard.h +++ b/trunk/arch/arm/include/asm/ecard.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/ecard.h + * arch/arm/include/asm/ecard.h * * definitions for expansion cards * diff --git a/trunk/include/asm-arm/elf.h b/trunk/arch/arm/include/asm/elf.h similarity index 100% rename from trunk/include/asm-arm/elf.h rename to trunk/arch/arm/include/asm/elf.h diff --git a/trunk/include/asm-arm/emergency-restart.h b/trunk/arch/arm/include/asm/emergency-restart.h similarity index 100% rename from trunk/include/asm-arm/emergency-restart.h rename to trunk/arch/arm/include/asm/emergency-restart.h diff --git a/trunk/include/asm-arm/errno.h b/trunk/arch/arm/include/asm/errno.h similarity index 100% rename from trunk/include/asm-arm/errno.h rename to trunk/arch/arm/include/asm/errno.h diff --git a/trunk/include/asm-arm/fb.h b/trunk/arch/arm/include/asm/fb.h similarity index 100% rename from trunk/include/asm-arm/fb.h rename to trunk/arch/arm/include/asm/fb.h diff --git a/trunk/include/asm-arm/fcntl.h b/trunk/arch/arm/include/asm/fcntl.h similarity index 100% rename from trunk/include/asm-arm/fcntl.h rename to trunk/arch/arm/include/asm/fcntl.h diff --git a/trunk/include/asm-arm/fiq.h b/trunk/arch/arm/include/asm/fiq.h similarity index 96% rename from trunk/include/asm-arm/fiq.h rename to trunk/arch/arm/include/asm/fiq.h index a3bad09e825c..2242ce22ec6c 100644 --- a/trunk/include/asm-arm/fiq.h +++ b/trunk/arch/arm/include/asm/fiq.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/fiq.h + * arch/arm/include/asm/fiq.h * * Support for FIQ on ARM architectures. * Written by Philip Blundell , 1998 diff --git a/trunk/include/asm-arm/flat.h b/trunk/arch/arm/include/asm/flat.h similarity index 90% rename from trunk/include/asm-arm/flat.h rename to trunk/arch/arm/include/asm/flat.h index 9918aa46d9e5..1d77e51907f6 100644 --- a/trunk/include/asm-arm/flat.h +++ b/trunk/arch/arm/include/asm/flat.h @@ -1,5 +1,5 @@ /* - * include/asm-arm/flat.h -- uClinux flat-format executables + * arch/arm/include/asm/flat.h -- uClinux flat-format executables */ #ifndef __ARM_FLAT_H__ diff --git a/trunk/include/asm-arm/floppy.h b/trunk/arch/arm/include/asm/floppy.h similarity index 98% rename from trunk/include/asm-arm/floppy.h rename to trunk/arch/arm/include/asm/floppy.h index 41a5e9d6bb69..c9f03eccc9d8 100644 --- a/trunk/include/asm-arm/floppy.h +++ b/trunk/arch/arm/include/asm/floppy.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/floppy.h + * arch/arm/include/asm/floppy.h * * Copyright (C) 1996-2000 Russell King * @@ -12,7 +12,7 @@ #ifndef __ASM_ARM_FLOPPY_H #define __ASM_ARM_FLOPPY_H #if 0 -#include +#include #endif #define fd_outb(val,port) \ diff --git a/trunk/include/asm-arm/fpstate.h b/trunk/arch/arm/include/asm/fpstate.h similarity index 97% rename from trunk/include/asm-arm/fpstate.h rename to trunk/arch/arm/include/asm/fpstate.h index 392eb5332323..ee5e03efc1bb 100644 --- a/trunk/include/asm-arm/fpstate.h +++ b/trunk/arch/arm/include/asm/fpstate.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/fpstate.h + * arch/arm/include/asm/fpstate.h * * Copyright (C) 1995 Russell King * diff --git a/trunk/include/asm-arm/ftrace.h b/trunk/arch/arm/include/asm/ftrace.h similarity index 100% rename from trunk/include/asm-arm/ftrace.h rename to trunk/arch/arm/include/asm/ftrace.h diff --git a/trunk/include/asm-arm/futex.h b/trunk/arch/arm/include/asm/futex.h similarity index 100% rename from trunk/include/asm-arm/futex.h rename to trunk/arch/arm/include/asm/futex.h diff --git a/trunk/include/asm-arm/glue.h b/trunk/arch/arm/include/asm/glue.h similarity index 99% rename from trunk/include/asm-arm/glue.h rename to trunk/arch/arm/include/asm/glue.h index a97a182ba287..a0e39d5d00c9 100644 --- a/trunk/include/asm-arm/glue.h +++ b/trunk/arch/arm/include/asm/glue.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/glue.h + * arch/arm/include/asm/glue.h * * Copyright (C) 1997-1999 Russell King * Copyright (C) 2000-2002 Deep Blue Solutions Ltd. diff --git a/trunk/arch/arm/include/asm/gpio.h b/trunk/arch/arm/include/asm/gpio.h new file mode 100644 index 000000000000..166a7a3e2840 --- /dev/null +++ b/trunk/arch/arm/include/asm/gpio.h @@ -0,0 +1,7 @@ +#ifndef _ARCH_ARM_GPIO_H +#define _ARCH_ARM_GPIO_H + +/* not all ARM platforms necessarily support this API ... */ +#include + +#endif /* _ARCH_ARM_GPIO_H */ diff --git a/trunk/include/asm-arm/hardirq.h b/trunk/arch/arm/include/asm/hardirq.h similarity index 100% rename from trunk/include/asm-arm/hardirq.h rename to trunk/arch/arm/include/asm/hardirq.h diff --git a/trunk/include/asm-arm/hardware/arm_timer.h b/trunk/arch/arm/include/asm/hardware/arm_timer.h similarity index 100% rename from trunk/include/asm-arm/hardware/arm_timer.h rename to trunk/arch/arm/include/asm/hardware/arm_timer.h diff --git a/trunk/include/asm-arm/hardware/arm_twd.h b/trunk/arch/arm/include/asm/hardware/arm_twd.h similarity index 100% rename from trunk/include/asm-arm/hardware/arm_twd.h rename to trunk/arch/arm/include/asm/hardware/arm_twd.h diff --git a/trunk/include/asm-arm/hardware/cache-l2x0.h b/trunk/arch/arm/include/asm/hardware/cache-l2x0.h similarity index 97% rename from trunk/include/asm-arm/hardware/cache-l2x0.h rename to trunk/arch/arm/include/asm/hardware/cache-l2x0.h index 54029a740396..64f2252a25cd 100644 --- a/trunk/include/asm-arm/hardware/cache-l2x0.h +++ b/trunk/arch/arm/include/asm/hardware/cache-l2x0.h @@ -1,5 +1,5 @@ /* - * include/asm-arm/hardware/cache-l2x0.h + * arch/arm/include/asm/hardware/cache-l2x0.h * * Copyright (C) 2007 ARM Limited * diff --git a/trunk/include/asm-arm/hardware/clps7111.h b/trunk/arch/arm/include/asm/hardware/clps7111.h similarity index 99% rename from trunk/include/asm-arm/hardware/clps7111.h rename to trunk/arch/arm/include/asm/hardware/clps7111.h index 8d3228dc1778..44477225aed6 100644 --- a/trunk/include/asm-arm/hardware/clps7111.h +++ b/trunk/arch/arm/include/asm/hardware/clps7111.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/hardware/clps7111.h + * arch/arm/include/asm/hardware/clps7111.h * * This file contains the hardware definitions of the CLPS7111 internal * registers. diff --git a/trunk/include/asm-arm/hardware/cs89712.h b/trunk/arch/arm/include/asm/hardware/cs89712.h similarity index 97% rename from trunk/include/asm-arm/hardware/cs89712.h rename to trunk/arch/arm/include/asm/hardware/cs89712.h index ad99a3e1b802..f75626933e94 100644 --- a/trunk/include/asm-arm/hardware/cs89712.h +++ b/trunk/arch/arm/include/asm/hardware/cs89712.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/hardware/cs89712.h + * arch/arm/include/asm/hardware/cs89712.h * * This file contains the hardware definitions of the CS89712 * additional internal registers. diff --git a/trunk/include/asm-arm/hardware/debug-8250.S b/trunk/arch/arm/include/asm/hardware/debug-8250.S similarity index 93% rename from trunk/include/asm-arm/hardware/debug-8250.S rename to trunk/arch/arm/include/asm/hardware/debug-8250.S index 07c97fb233fc..22c689255e6e 100644 --- a/trunk/include/asm-arm/hardware/debug-8250.S +++ b/trunk/arch/arm/include/asm/hardware/debug-8250.S @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/hardware/debug-8250.S + * arch/arm/include/asm/hardware/debug-8250.S * * Copyright (C) 1994-1999 Russell King * diff --git a/trunk/include/asm-arm/hardware/debug-pl01x.S b/trunk/arch/arm/include/asm/hardware/debug-pl01x.S similarity index 93% rename from trunk/include/asm-arm/hardware/debug-pl01x.S rename to trunk/arch/arm/include/asm/hardware/debug-pl01x.S index 23c541a9e89a..f9fd083eff63 100644 --- a/trunk/include/asm-arm/hardware/debug-pl01x.S +++ b/trunk/arch/arm/include/asm/hardware/debug-pl01x.S @@ -1,4 +1,4 @@ -/* linux/include/asm-arm/hardware/debug-pl01x.S +/* arch/arm/include/asm/hardware/debug-pl01x.S * * Debugging macro include header * diff --git a/trunk/include/asm-arm/hardware/dec21285.h b/trunk/arch/arm/include/asm/hardware/dec21285.h similarity index 98% rename from trunk/include/asm-arm/hardware/dec21285.h rename to trunk/arch/arm/include/asm/hardware/dec21285.h index 546f7077be9c..0d7552751aaf 100644 --- a/trunk/include/asm-arm/hardware/dec21285.h +++ b/trunk/arch/arm/include/asm/hardware/dec21285.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/hardware/dec21285.h + * arch/arm/include/asm/hardware/dec21285.h * * Copyright (C) 1998 Russell King * @@ -19,7 +19,7 @@ #define DC21285_PCI_MEM 0x80000000 #ifndef __ASSEMBLY__ -#include +#include #define DC21285_IO(x) ((volatile unsigned long *)(ARMCSR_BASE+(x))) #else #define DC21285_IO(x) (x) diff --git a/trunk/include/asm-arm/hardware/entry-macro-iomd.S b/trunk/arch/arm/include/asm/hardware/entry-macro-iomd.S similarity index 99% rename from trunk/include/asm-arm/hardware/entry-macro-iomd.S rename to trunk/arch/arm/include/asm/hardware/entry-macro-iomd.S index 9bb580a5b15e..e0af4983723f 100644 --- a/trunk/include/asm-arm/hardware/entry-macro-iomd.S +++ b/trunk/arch/arm/include/asm/hardware/entry-macro-iomd.S @@ -1,5 +1,5 @@ /* - * include/asm-arm/hardware/entry-macro-iomd.S + * arch/arm/include/asm/hardware/entry-macro-iomd.S * * Low-level IRQ helper macros for IOC/IOMD based platforms * diff --git a/trunk/include/asm-arm/hardware/ep7211.h b/trunk/arch/arm/include/asm/hardware/ep7211.h similarity index 96% rename from trunk/include/asm-arm/hardware/ep7211.h rename to trunk/arch/arm/include/asm/hardware/ep7211.h index 017aa68f612d..654d5f625c49 100644 --- a/trunk/include/asm-arm/hardware/ep7211.h +++ b/trunk/arch/arm/include/asm/hardware/ep7211.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/hardware/ep7211.h + * arch/arm/include/asm/hardware/ep7211.h * * This file contains the hardware definitions of the EP7211 internal * registers. diff --git a/trunk/include/asm-arm/hardware/ep7212.h b/trunk/arch/arm/include/asm/hardware/ep7212.h similarity index 98% rename from trunk/include/asm-arm/hardware/ep7212.h rename to trunk/arch/arm/include/asm/hardware/ep7212.h index 0e952e747073..3b43bbeaf1db 100644 --- a/trunk/include/asm-arm/hardware/ep7212.h +++ b/trunk/arch/arm/include/asm/hardware/ep7212.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/hardware/ep7212.h + * arch/arm/include/asm/hardware/ep7212.h * * This file contains the hardware definitions of the EP7212 internal * registers. diff --git a/trunk/include/asm-arm/hardware/gic.h b/trunk/arch/arm/include/asm/hardware/gic.h similarity index 96% rename from trunk/include/asm-arm/hardware/gic.h rename to trunk/arch/arm/include/asm/hardware/gic.h index 966e428ad32c..4924914af188 100644 --- a/trunk/include/asm-arm/hardware/gic.h +++ b/trunk/arch/arm/include/asm/hardware/gic.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/hardware/gic.h + * arch/arm/include/asm/hardware/gic.h * * Copyright (C) 2002 ARM Limited, All Rights Reserved. * diff --git a/trunk/include/asm-arm/hardware/icst307.h b/trunk/arch/arm/include/asm/hardware/icst307.h similarity index 96% rename from trunk/include/asm-arm/hardware/icst307.h rename to trunk/arch/arm/include/asm/hardware/icst307.h index ff8618a441c0..554f128a1046 100644 --- a/trunk/include/asm-arm/hardware/icst307.h +++ b/trunk/arch/arm/include/asm/hardware/icst307.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/hardware/icst307.h + * arch/arm/include/asm/hardware/icst307.h * * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. * diff --git a/trunk/include/asm-arm/hardware/icst525.h b/trunk/arch/arm/include/asm/hardware/icst525.h similarity index 96% rename from trunk/include/asm-arm/hardware/icst525.h rename to trunk/arch/arm/include/asm/hardware/icst525.h index edd5a5704406..58f0dc43e2ed 100644 --- a/trunk/include/asm-arm/hardware/icst525.h +++ b/trunk/arch/arm/include/asm/hardware/icst525.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/hardware/icst525.h + * arch/arm/include/asm/hardware/icst525.h * * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. * diff --git a/trunk/include/asm-arm/hardware/ioc.h b/trunk/arch/arm/include/asm/hardware/ioc.h similarity index 97% rename from trunk/include/asm-arm/hardware/ioc.h rename to trunk/arch/arm/include/asm/hardware/ioc.h index b3b46ef65943..1f6b8013becb 100644 --- a/trunk/include/asm-arm/hardware/ioc.h +++ b/trunk/arch/arm/include/asm/hardware/ioc.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/hardware/ioc.h + * arch/arm/include/asm/hardware/ioc.h * * Copyright (C) Russell King * diff --git a/trunk/include/asm-arm/hardware/iomd.h b/trunk/arch/arm/include/asm/hardware/iomd.h similarity index 99% rename from trunk/include/asm-arm/hardware/iomd.h rename to trunk/arch/arm/include/asm/hardware/iomd.h index 396e55ad06c6..9c5afbd71a69 100644 --- a/trunk/include/asm-arm/hardware/iomd.h +++ b/trunk/arch/arm/include/asm/hardware/iomd.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/hardware/iomd.h + * arch/arm/include/asm/hardware/iomd.h * * Copyright (C) 1999 Russell King * diff --git a/trunk/include/asm-arm/hardware/iop3xx-adma.h b/trunk/arch/arm/include/asm/hardware/iop3xx-adma.h similarity index 99% rename from trunk/include/asm-arm/hardware/iop3xx-adma.h rename to trunk/arch/arm/include/asm/hardware/iop3xx-adma.h index af64676650a2..87bff09633aa 100644 --- a/trunk/include/asm-arm/hardware/iop3xx-adma.h +++ b/trunk/arch/arm/include/asm/hardware/iop3xx-adma.h @@ -19,7 +19,7 @@ #define _ADMA_H #include #include -#include +#include #include /* Memory copy units */ diff --git a/trunk/include/asm-arm/hardware/iop3xx-gpio.h b/trunk/arch/arm/include/asm/hardware/iop3xx-gpio.h similarity index 95% rename from trunk/include/asm-arm/hardware/iop3xx-gpio.h rename to trunk/arch/arm/include/asm/hardware/iop3xx-gpio.h index 0c9331f9ac24..b69d972b1f7d 100644 --- a/trunk/include/asm-arm/hardware/iop3xx-gpio.h +++ b/trunk/arch/arm/include/asm/hardware/iop3xx-gpio.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/hardware/iop3xx-gpio.h + * arch/arm/include/asm/hardware/iop3xx-gpio.h * * IOP3xx GPIO wrappers * @@ -25,7 +25,7 @@ #ifndef __ASM_ARM_HARDWARE_IOP3XX_GPIO_H #define __ASM_ARM_HARDWARE_IOP3XX_GPIO_H -#include +#include #include #define IOP3XX_N_GPIOS 8 diff --git a/trunk/include/asm-arm/hardware/iop3xx.h b/trunk/arch/arm/include/asm/hardware/iop3xx.h similarity index 99% rename from trunk/include/asm-arm/hardware/iop3xx.h rename to trunk/arch/arm/include/asm/hardware/iop3xx.h index 18f6937f5010..4b8e7f559929 100644 --- a/trunk/include/asm-arm/hardware/iop3xx.h +++ b/trunk/arch/arm/include/asm/hardware/iop3xx.h @@ -1,5 +1,5 @@ /* - * include/asm-arm/hardware/iop3xx.h + * arch/arm/include/asm/hardware/iop3xx.h * * Intel IOP32X and IOP33X register definitions * diff --git a/trunk/include/asm-arm/hardware/iop_adma.h b/trunk/arch/arm/include/asm/hardware/iop_adma.h similarity index 100% rename from trunk/include/asm-arm/hardware/iop_adma.h rename to trunk/arch/arm/include/asm/hardware/iop_adma.h diff --git a/trunk/include/asm-arm/hardware/it8152.h b/trunk/arch/arm/include/asm/hardware/it8152.h similarity index 100% rename from trunk/include/asm-arm/hardware/it8152.h rename to trunk/arch/arm/include/asm/hardware/it8152.h diff --git a/trunk/include/asm-arm/hardware/linkup-l1110.h b/trunk/arch/arm/include/asm/hardware/linkup-l1110.h similarity index 100% rename from trunk/include/asm-arm/hardware/linkup-l1110.h rename to trunk/arch/arm/include/asm/hardware/linkup-l1110.h diff --git a/trunk/include/asm-arm/hardware/locomo.h b/trunk/arch/arm/include/asm/hardware/locomo.h similarity index 99% rename from trunk/include/asm-arm/hardware/locomo.h rename to trunk/arch/arm/include/asm/hardware/locomo.h index fb0645de6f31..954b1be991b4 100644 --- a/trunk/include/asm-arm/hardware/locomo.h +++ b/trunk/arch/arm/include/asm/hardware/locomo.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/hardware/locomo.h + * arch/arm/include/asm/hardware/locomo.h * * This file contains the definitions for the LoCoMo G/A Chip * diff --git a/trunk/include/asm-arm/hardware/memc.h b/trunk/arch/arm/include/asm/hardware/memc.h similarity index 93% rename from trunk/include/asm-arm/hardware/memc.h rename to trunk/arch/arm/include/asm/hardware/memc.h index 8aef5aa0e01b..42ba7c167d1f 100644 --- a/trunk/include/asm-arm/hardware/memc.h +++ b/trunk/arch/arm/include/asm/hardware/memc.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/hardware/memc.h + * arch/arm/include/asm/hardware/memc.h * * Copyright (C) Russell King. * diff --git a/trunk/include/asm-arm/hardware/pci_v3.h b/trunk/arch/arm/include/asm/hardware/pci_v3.h similarity index 99% rename from trunk/include/asm-arm/hardware/pci_v3.h rename to trunk/arch/arm/include/asm/hardware/pci_v3.h index 4d497bdb9a97..2811c7e2cfdf 100644 --- a/trunk/include/asm-arm/hardware/pci_v3.h +++ b/trunk/arch/arm/include/asm/hardware/pci_v3.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/hardware/pci_v3.h + * arch/arm/include/asm/hardware/pci_v3.h * * Internal header file PCI V3 chip * diff --git a/trunk/include/asm-arm/hardware/sa1111.h b/trunk/arch/arm/include/asm/hardware/sa1111.h similarity index 99% rename from trunk/include/asm-arm/hardware/sa1111.h rename to trunk/arch/arm/include/asm/hardware/sa1111.h index 61b1d05c7df7..5da2595759e5 100644 --- a/trunk/include/asm-arm/hardware/sa1111.h +++ b/trunk/arch/arm/include/asm/hardware/sa1111.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/hardware/sa1111.h + * arch/arm/include/asm/hardware/sa1111.h * * Copyright (C) 2000 John G Dorsey * @@ -12,7 +12,7 @@ #ifndef _ASM_ARCH_SA1111 #define _ASM_ARCH_SA1111 -#include +#include /* * The SA1111 is always located at virtual 0xf4000000, and is always diff --git a/trunk/include/asm-arm/hardware/scoop.h b/trunk/arch/arm/include/asm/hardware/scoop.h similarity index 100% rename from trunk/include/asm-arm/hardware/scoop.h rename to trunk/arch/arm/include/asm/hardware/scoop.h diff --git a/trunk/include/asm-arm/hardware/sharpsl_pm.h b/trunk/arch/arm/include/asm/hardware/sharpsl_pm.h similarity index 100% rename from trunk/include/asm-arm/hardware/sharpsl_pm.h rename to trunk/arch/arm/include/asm/hardware/sharpsl_pm.h diff --git a/trunk/include/asm-arm/hardware/ssp.h b/trunk/arch/arm/include/asm/hardware/ssp.h similarity index 100% rename from trunk/include/asm-arm/hardware/ssp.h rename to trunk/arch/arm/include/asm/hardware/ssp.h diff --git a/trunk/include/asm-arm/hardware/uengine.h b/trunk/arch/arm/include/asm/hardware/uengine.h similarity index 100% rename from trunk/include/asm-arm/hardware/uengine.h rename to trunk/arch/arm/include/asm/hardware/uengine.h diff --git a/trunk/include/asm-arm/hardware/vic.h b/trunk/arch/arm/include/asm/hardware/vic.h similarity index 97% rename from trunk/include/asm-arm/hardware/vic.h rename to trunk/arch/arm/include/asm/hardware/vic.h index ed9ca3736a0b..263f2c362a30 100644 --- a/trunk/include/asm-arm/hardware/vic.h +++ b/trunk/arch/arm/include/asm/hardware/vic.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/hardware/vic.h + * arch/arm/include/asm/hardware/vic.h * * Copyright (c) ARM Limited 2003. All rights reserved. * diff --git a/trunk/arch/arm/include/asm/hw_irq.h b/trunk/arch/arm/include/asm/hw_irq.h new file mode 100644 index 000000000000..90831f6f5f5c --- /dev/null +++ b/trunk/arch/arm/include/asm/hw_irq.h @@ -0,0 +1,27 @@ +/* + * Nothing to see here yet + */ +#ifndef _ARCH_ARM_HW_IRQ_H +#define _ARCH_ARM_HW_IRQ_H + +static inline void ack_bad_irq(int irq) +{ + extern unsigned long irq_err_count; + irq_err_count++; +} + +/* + * Obsolete inline function for calling irq descriptor handlers. + */ +static inline void desc_handle_irq(unsigned int irq, struct irq_desc *desc) +{ + desc->handle_irq(irq, desc); +} + +void set_irq_flags(unsigned int irq, unsigned int flags); + +#define IRQF_VALID (1 << 0) +#define IRQF_PROBE (1 << 1) +#define IRQF_NOAUTOEN (1 << 2) + +#endif diff --git a/trunk/include/asm-arm/hwcap.h b/trunk/arch/arm/include/asm/hwcap.h similarity index 100% rename from trunk/include/asm-arm/hwcap.h rename to trunk/arch/arm/include/asm/hwcap.h diff --git a/trunk/arch/arm/include/asm/ide.h b/trunk/arch/arm/include/asm/ide.h new file mode 100644 index 000000000000..b507ce8e5019 --- /dev/null +++ b/trunk/arch/arm/include/asm/ide.h @@ -0,0 +1,23 @@ +/* + * arch/arm/include/asm/ide.h + * + * Copyright (C) 1994-1996 Linus Torvalds & authors + */ + +/* + * This file contains the ARM architecture specific IDE code. + */ + +#ifndef __ASMARM_IDE_H +#define __ASMARM_IDE_H + +#ifdef __KERNEL__ + +#define __ide_mm_insw(port,addr,len) readsw(port,addr,len) +#define __ide_mm_insl(port,addr,len) readsl(port,addr,len) +#define __ide_mm_outsw(port,addr,len) writesw(port,addr,len) +#define __ide_mm_outsl(port,addr,len) writesl(port,addr,len) + +#endif /* __KERNEL__ */ + +#endif /* __ASMARM_IDE_H */ diff --git a/trunk/arch/arm/include/asm/io.h b/trunk/arch/arm/include/asm/io.h new file mode 100644 index 000000000000..94a95d7fafd6 --- /dev/null +++ b/trunk/arch/arm/include/asm/io.h @@ -0,0 +1,287 @@ +/* + * arch/arm/include/asm/io.h + * + * Copyright (C) 1996-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Modifications: + * 16-Sep-1996 RMK Inlined the inx/outx functions & optimised for both + * constant addresses and variable addresses. + * 04-Dec-1997 RMK Moved a lot of this stuff to the new architecture + * specific IO header files. + * 27-Mar-1999 PJB Second parameter of memcpy_toio is const.. + * 04-Apr-1999 PJB Added check_signature. + * 12-Dec-1999 RMK More cleanups + * 18-Jun-2000 RMK Removed virt_to_* and friends definitions + * 05-Oct-2004 BJD Moved memory string functions to use void __iomem + */ +#ifndef __ASM_ARM_IO_H +#define __ASM_ARM_IO_H + +#ifdef __KERNEL__ + +#include +#include +#include + +/* + * ISA I/O bus memory addresses are 1:1 with the physical address. + */ +#define isa_virt_to_bus virt_to_phys +#define isa_page_to_bus page_to_phys +#define isa_bus_to_virt phys_to_virt + +/* + * Generic IO read/write. These perform native-endian accesses. Note + * that some architectures will want to re-define __raw_{read,write}w. + */ +extern void __raw_writesb(void __iomem *addr, const void *data, int bytelen); +extern void __raw_writesw(void __iomem *addr, const void *data, int wordlen); +extern void __raw_writesl(void __iomem *addr, const void *data, int longlen); + +extern void __raw_readsb(const void __iomem *addr, void *data, int bytelen); +extern void __raw_readsw(const void __iomem *addr, void *data, int wordlen); +extern void __raw_readsl(const void __iomem *addr, void *data, int longlen); + +#define __raw_writeb(v,a) (__chk_io_ptr(a), *(volatile unsigned char __force *)(a) = (v)) +#define __raw_writew(v,a) (__chk_io_ptr(a), *(volatile unsigned short __force *)(a) = (v)) +#define __raw_writel(v,a) (__chk_io_ptr(a), *(volatile unsigned int __force *)(a) = (v)) + +#define __raw_readb(a) (__chk_io_ptr(a), *(volatile unsigned char __force *)(a)) +#define __raw_readw(a) (__chk_io_ptr(a), *(volatile unsigned short __force *)(a)) +#define __raw_readl(a) (__chk_io_ptr(a), *(volatile unsigned int __force *)(a)) + +/* + * Architecture ioremap implementation. + */ +#define MT_DEVICE 0 +#define MT_DEVICE_NONSHARED 1 +#define MT_DEVICE_CACHED 2 +#define MT_DEVICE_IXP2000 3 +/* + * types 4 onwards can be found in asm/mach/map.h and are undefined + * for ioremap + */ + +/* + * __arm_ioremap takes CPU physical address. + * __arm_ioremap_pfn takes a Page Frame Number and an offset into that page + */ +extern void __iomem * __arm_ioremap_pfn(unsigned long, unsigned long, size_t, unsigned int); +extern void __iomem * __arm_ioremap(unsigned long, size_t, unsigned int); +extern void __iounmap(volatile void __iomem *addr); + +/* + * Bad read/write accesses... + */ +extern void __readwrite_bug(const char *fn); + +/* + * Now, pick up the machine-defined IO definitions + */ +#include + +/* + * IO port access primitives + * ------------------------- + * + * The ARM doesn't have special IO access instructions; all IO is memory + * mapped. Note that these are defined to perform little endian accesses + * only. Their primary purpose is to access PCI and ISA peripherals. + * + * Note that for a big endian machine, this implies that the following + * big endian mode connectivity is in place, as described by numerous + * ARM documents: + * + * PCI: D0-D7 D8-D15 D16-D23 D24-D31 + * ARM: D24-D31 D16-D23 D8-D15 D0-D7 + * + * The machine specific io.h include defines __io to translate an "IO" + * address to a memory address. + * + * Note that we prevent GCC re-ordering or caching values in expressions + * by introducing sequence points into the in*() definitions. Note that + * __raw_* do not guarantee this behaviour. + * + * The {in,out}[bwl] macros are for emulating x86-style PCI/ISA IO space. + */ +#ifdef __io +#define outb(v,p) __raw_writeb(v,__io(p)) +#define outw(v,p) __raw_writew((__force __u16) \ + cpu_to_le16(v),__io(p)) +#define outl(v,p) __raw_writel((__force __u32) \ + cpu_to_le32(v),__io(p)) + +#define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __v; }) +#define inw(p) ({ __u16 __v = le16_to_cpu((__force __le16) \ + __raw_readw(__io(p))); __v; }) +#define inl(p) ({ __u32 __v = le32_to_cpu((__force __le32) \ + __raw_readl(__io(p))); __v; }) + +#define outsb(p,d,l) __raw_writesb(__io(p),d,l) +#define outsw(p,d,l) __raw_writesw(__io(p),d,l) +#define outsl(p,d,l) __raw_writesl(__io(p),d,l) + +#define insb(p,d,l) __raw_readsb(__io(p),d,l) +#define insw(p,d,l) __raw_readsw(__io(p),d,l) +#define insl(p,d,l) __raw_readsl(__io(p),d,l) +#endif + +#define outb_p(val,port) outb((val),(port)) +#define outw_p(val,port) outw((val),(port)) +#define outl_p(val,port) outl((val),(port)) +#define inb_p(port) inb((port)) +#define inw_p(port) inw((port)) +#define inl_p(port) inl((port)) + +#define outsb_p(port,from,len) outsb(port,from,len) +#define outsw_p(port,from,len) outsw(port,from,len) +#define outsl_p(port,from,len) outsl(port,from,len) +#define insb_p(port,to,len) insb(port,to,len) +#define insw_p(port,to,len) insw(port,to,len) +#define insl_p(port,to,len) insl(port,to,len) + +/* + * String version of IO memory access ops: + */ +extern void _memcpy_fromio(void *, const volatile void __iomem *, size_t); +extern void _memcpy_toio(volatile void __iomem *, const void *, size_t); +extern void _memset_io(volatile void __iomem *, int, size_t); + +#define mmiowb() + +/* + * Memory access primitives + * ------------------------ + * + * These perform PCI memory accesses via an ioremap region. They don't + * take an address as such, but a cookie. + * + * Again, this are defined to perform little endian accesses. See the + * IO port primitives for more information. + */ +#ifdef __mem_pci +#define readb(c) ({ __u8 __v = __raw_readb(__mem_pci(c)); __v; }) +#define readw(c) ({ __u16 __v = le16_to_cpu((__force __le16) \ + __raw_readw(__mem_pci(c))); __v; }) +#define readl(c) ({ __u32 __v = le32_to_cpu((__force __le32) \ + __raw_readl(__mem_pci(c))); __v; }) +#define readb_relaxed(addr) readb(addr) +#define readw_relaxed(addr) readw(addr) +#define readl_relaxed(addr) readl(addr) + +#define readsb(p,d,l) __raw_readsb(__mem_pci(p),d,l) +#define readsw(p,d,l) __raw_readsw(__mem_pci(p),d,l) +#define readsl(p,d,l) __raw_readsl(__mem_pci(p),d,l) + +#define writeb(v,c) __raw_writeb(v,__mem_pci(c)) +#define writew(v,c) __raw_writew((__force __u16) \ + cpu_to_le16(v),__mem_pci(c)) +#define writel(v,c) __raw_writel((__force __u32) \ + cpu_to_le32(v),__mem_pci(c)) + +#define writesb(p,d,l) __raw_writesb(__mem_pci(p),d,l) +#define writesw(p,d,l) __raw_writesw(__mem_pci(p),d,l) +#define writesl(p,d,l) __raw_writesl(__mem_pci(p),d,l) + +#define memset_io(c,v,l) _memset_io(__mem_pci(c),(v),(l)) +#define memcpy_fromio(a,c,l) _memcpy_fromio((a),__mem_pci(c),(l)) +#define memcpy_toio(c,a,l) _memcpy_toio(__mem_pci(c),(a),(l)) + +#elif !defined(readb) + +#define readb(c) (__readwrite_bug("readb"),0) +#define readw(c) (__readwrite_bug("readw"),0) +#define readl(c) (__readwrite_bug("readl"),0) +#define writeb(v,c) __readwrite_bug("writeb") +#define writew(v,c) __readwrite_bug("writew") +#define writel(v,c) __readwrite_bug("writel") + +#define check_signature(io,sig,len) (0) + +#endif /* __mem_pci */ + +/* + * ioremap and friends. + * + * ioremap takes a PCI memory address, as specified in + * Documentation/IO-mapping.txt. + * + */ +#ifndef __arch_ioremap +#define ioremap(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE) +#define ioremap_nocache(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE) +#define ioremap_cached(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE_CACHED) +#define iounmap(cookie) __iounmap(cookie) +#else +#define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE) +#define ioremap_nocache(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE) +#define ioremap_cached(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_CACHED) +#define iounmap(cookie) __arch_iounmap(cookie) +#endif + +/* + * io{read,write}{8,16,32} macros + */ +#ifndef ioread8 +#define ioread8(p) ({ unsigned int __v = __raw_readb(p); __v; }) +#define ioread16(p) ({ unsigned int __v = le16_to_cpu((__force __le16)__raw_readw(p)); __v; }) +#define ioread32(p) ({ unsigned int __v = le32_to_cpu((__force __le32)__raw_readl(p)); __v; }) + +#define iowrite8(v,p) __raw_writeb(v, p) +#define iowrite16(v,p) __raw_writew((__force __u16)cpu_to_le16(v), p) +#define iowrite32(v,p) __raw_writel((__force __u32)cpu_to_le32(v), p) + +#define ioread8_rep(p,d,c) __raw_readsb(p,d,c) +#define ioread16_rep(p,d,c) __raw_readsw(p,d,c) +#define ioread32_rep(p,d,c) __raw_readsl(p,d,c) + +#define iowrite8_rep(p,s,c) __raw_writesb(p,s,c) +#define iowrite16_rep(p,s,c) __raw_writesw(p,s,c) +#define iowrite32_rep(p,s,c) __raw_writesl(p,s,c) + +extern void __iomem *ioport_map(unsigned long port, unsigned int nr); +extern void ioport_unmap(void __iomem *addr); +#endif + +struct pci_dev; + +extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen); +extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr); + +/* + * can the hardware map this into one segment or not, given no other + * constraints. + */ +#define BIOVEC_MERGEABLE(vec1, vec2) \ + ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2))) + +#ifdef CONFIG_MMU +#define ARCH_HAS_VALID_PHYS_ADDR_RANGE +extern int valid_phys_addr_range(unsigned long addr, size_t size); +extern int valid_mmap_phys_addr_range(unsigned long pfn, size_t size); +#endif + +/* + * Convert a physical pointer to a virtual kernel pointer for /dev/mem + * access + */ +#define xlate_dev_mem_ptr(p) __va(p) + +/* + * Convert a virtual cached pointer to an uncached pointer + */ +#define xlate_dev_kmem_ptr(p) p + +/* + * Register ISA memory and port locations for glibc iopl/inb/outb + * emulation. + */ +extern void register_isa_ports(unsigned int mmio, unsigned int io, + unsigned int io_shift); + +#endif /* __KERNEL__ */ +#endif /* __ASM_ARM_IO_H */ diff --git a/trunk/include/asm-arm/ioctl.h b/trunk/arch/arm/include/asm/ioctl.h similarity index 100% rename from trunk/include/asm-arm/ioctl.h rename to trunk/arch/arm/include/asm/ioctl.h diff --git a/trunk/include/asm-arm/ioctls.h b/trunk/arch/arm/include/asm/ioctls.h similarity index 100% rename from trunk/include/asm-arm/ioctls.h rename to trunk/arch/arm/include/asm/ioctls.h diff --git a/trunk/include/asm-arm/ipcbuf.h b/trunk/arch/arm/include/asm/ipcbuf.h similarity index 100% rename from trunk/include/asm-arm/ipcbuf.h rename to trunk/arch/arm/include/asm/ipcbuf.h diff --git a/trunk/arch/arm/include/asm/irq.h b/trunk/arch/arm/include/asm/irq.h new file mode 100644 index 000000000000..d6786090d02c --- /dev/null +++ b/trunk/arch/arm/include/asm/irq.h @@ -0,0 +1,28 @@ +#ifndef __ASM_ARM_IRQ_H +#define __ASM_ARM_IRQ_H + +#include + +#ifndef irq_canonicalize +#define irq_canonicalize(i) (i) +#endif + +#ifndef NR_IRQS +#define NR_IRQS 128 +#endif + +/* + * Use this value to indicate lack of interrupt + * capability + */ +#ifndef NO_IRQ +#define NO_IRQ ((unsigned int)(-1)) +#endif + +#ifndef __ASSEMBLY__ +struct irqaction; +extern void migrate_irqs(void); +#endif + +#endif + diff --git a/trunk/include/asm-arm/irq_regs.h b/trunk/arch/arm/include/asm/irq_regs.h similarity index 100% rename from trunk/include/asm-arm/irq_regs.h rename to trunk/arch/arm/include/asm/irq_regs.h diff --git a/trunk/include/asm-arm/irqflags.h b/trunk/arch/arm/include/asm/irqflags.h similarity index 100% rename from trunk/include/asm-arm/irqflags.h rename to trunk/arch/arm/include/asm/irqflags.h diff --git a/trunk/include/asm-arm/kdebug.h b/trunk/arch/arm/include/asm/kdebug.h similarity index 100% rename from trunk/include/asm-arm/kdebug.h rename to trunk/arch/arm/include/asm/kdebug.h diff --git a/trunk/arch/arm/include/asm/kexec.h b/trunk/arch/arm/include/asm/kexec.h new file mode 100644 index 000000000000..df15a0dc228e --- /dev/null +++ b/trunk/arch/arm/include/asm/kexec.h @@ -0,0 +1,31 @@ +#ifndef _ARM_KEXEC_H +#define _ARM_KEXEC_H + +#ifdef CONFIG_KEXEC + +/* Maximum physical address we can use pages from */ +#define KEXEC_SOURCE_MEMORY_LIMIT (-1UL) +/* Maximum address we can reach in physical address mode */ +#define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL) +/* Maximum address we can use for the control code buffer */ +#define KEXEC_CONTROL_MEMORY_LIMIT (-1UL) + +#define KEXEC_CONTROL_PAGE_SIZE 4096 + +#define KEXEC_ARCH KEXEC_ARCH_ARM + +#define KEXEC_ARM_ATAGS_OFFSET 0x1000 +#define KEXEC_ARM_ZIMAGE_OFFSET 0x8000 + +#ifndef __ASSEMBLY__ + +struct kimage; +/* Provide a dummy definition to avoid build failures. */ +static inline void crash_setup_regs(struct pt_regs *newregs, + struct pt_regs *oldregs) { } + +#endif /* __ASSEMBLY__ */ + +#endif /* CONFIG_KEXEC */ + +#endif /* _ARM_KEXEC_H */ diff --git a/trunk/include/asm-arm/kgdb.h b/trunk/arch/arm/include/asm/kgdb.h similarity index 100% rename from trunk/include/asm-arm/kgdb.h rename to trunk/arch/arm/include/asm/kgdb.h diff --git a/trunk/include/asm-arm/kmap_types.h b/trunk/arch/arm/include/asm/kmap_types.h similarity index 100% rename from trunk/include/asm-arm/kmap_types.h rename to trunk/arch/arm/include/asm/kmap_types.h diff --git a/trunk/include/asm-arm/kprobes.h b/trunk/arch/arm/include/asm/kprobes.h similarity index 98% rename from trunk/include/asm-arm/kprobes.h rename to trunk/arch/arm/include/asm/kprobes.h index b1a37876942d..a5d0d99ad387 100644 --- a/trunk/include/asm-arm/kprobes.h +++ b/trunk/arch/arm/include/asm/kprobes.h @@ -1,5 +1,5 @@ /* - * include/asm-arm/kprobes.h + * arch/arm/include/asm/kprobes.h * * Copyright (C) 2006, 2007 Motorola Inc. * diff --git a/trunk/include/asm-arm/leds.h b/trunk/arch/arm/include/asm/leds.h similarity index 96% rename from trunk/include/asm-arm/leds.h rename to trunk/arch/arm/include/asm/leds.h index 12290ea55801..c545739f39b7 100644 --- a/trunk/include/asm-arm/leds.h +++ b/trunk/arch/arm/include/asm/leds.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/leds.h + * arch/arm/include/asm/leds.h * * Copyright (C) 1998 Russell King * diff --git a/trunk/include/asm-arm/limits.h b/trunk/arch/arm/include/asm/limits.h similarity index 100% rename from trunk/include/asm-arm/limits.h rename to trunk/arch/arm/include/asm/limits.h diff --git a/trunk/include/asm-arm/linkage.h b/trunk/arch/arm/include/asm/linkage.h similarity index 100% rename from trunk/include/asm-arm/linkage.h rename to trunk/arch/arm/include/asm/linkage.h diff --git a/trunk/include/asm-arm/local.h b/trunk/arch/arm/include/asm/local.h similarity index 100% rename from trunk/include/asm-arm/local.h rename to trunk/arch/arm/include/asm/local.h diff --git a/trunk/include/asm-arm/locks.h b/trunk/arch/arm/include/asm/locks.h similarity index 99% rename from trunk/include/asm-arm/locks.h rename to trunk/arch/arm/include/asm/locks.h index 852220eecdbc..ef4c897772d1 100644 --- a/trunk/include/asm-arm/locks.h +++ b/trunk/arch/arm/include/asm/locks.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/locks.h + * arch/arm/include/asm/locks.h * * Copyright (C) 2000 Russell King * diff --git a/trunk/include/asm-arm/mach/arch.h b/trunk/arch/arm/include/asm/mach/arch.h similarity index 97% rename from trunk/include/asm-arm/mach/arch.h rename to trunk/arch/arm/include/asm/mach/arch.h index bcc8aed7c9a9..c59842dc7cb8 100644 --- a/trunk/include/asm-arm/mach/arch.h +++ b/trunk/arch/arm/include/asm/mach/arch.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/mach/arch.h + * arch/arm/include/asm/mach/arch.h * * Copyright (C) 2000 Russell King * diff --git a/trunk/arch/arm/include/asm/mach/dma.h b/trunk/arch/arm/include/asm/mach/dma.h new file mode 100644 index 000000000000..fc7278ea7146 --- /dev/null +++ b/trunk/arch/arm/include/asm/mach/dma.h @@ -0,0 +1,57 @@ +/* + * arch/arm/include/asm/mach/dma.h + * + * Copyright (C) 1998-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This header file describes the interface between the generic DMA handler + * (dma.c) and the architecture-specific DMA backends (dma-*.c) + */ + +struct dma_struct; +typedef struct dma_struct dma_t; + +struct dma_ops { + int (*request)(dmach_t, dma_t *); /* optional */ + void (*free)(dmach_t, dma_t *); /* optional */ + void (*enable)(dmach_t, dma_t *); /* mandatory */ + void (*disable)(dmach_t, dma_t *); /* mandatory */ + int (*residue)(dmach_t, dma_t *); /* optional */ + int (*setspeed)(dmach_t, dma_t *, int); /* optional */ + char *type; +}; + +struct dma_struct { + void *addr; /* single DMA address */ + unsigned long count; /* single DMA size */ + struct scatterlist buf; /* single DMA */ + int sgcount; /* number of DMA SG */ + struct scatterlist *sg; /* DMA Scatter-Gather List */ + + unsigned int active:1; /* Transfer active */ + unsigned int invalid:1; /* Address/Count changed */ + + dmamode_t dma_mode; /* DMA mode */ + int speed; /* DMA speed */ + + unsigned int lock; /* Device is allocated */ + const char *device_id; /* Device name */ + + unsigned int dma_base; /* Controller base address */ + int dma_irq; /* Controller IRQ */ + struct scatterlist cur_sg; /* Current controller buffer */ + unsigned int state; + + struct dma_ops *d_ops; +}; + +/* Prototype: void arch_dma_init(dma) + * Purpose : Initialise architecture specific DMA + * Params : dma - pointer to array of DMA structures + */ +extern void arch_dma_init(dma_t *dma); + +extern void isa_init_dma(dma_t *dma); diff --git a/trunk/include/asm-arm/mach/flash.h b/trunk/arch/arm/include/asm/mach/flash.h similarity index 96% rename from trunk/include/asm-arm/mach/flash.h rename to trunk/arch/arm/include/asm/mach/flash.h index 05b029ef6371..4ca69fe2c850 100644 --- a/trunk/include/asm-arm/mach/flash.h +++ b/trunk/arch/arm/include/asm/mach/flash.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/mach/flash.h + * arch/arm/include/asm/mach/flash.h * * Copyright (C) 2003 Russell King, All Rights Reserved. * diff --git a/trunk/arch/arm/include/asm/mach/irda.h b/trunk/arch/arm/include/asm/mach/irda.h new file mode 100644 index 000000000000..38f77b5e56cf --- /dev/null +++ b/trunk/arch/arm/include/asm/mach/irda.h @@ -0,0 +1,20 @@ +/* + * arch/arm/include/asm/mach/irda.h + * + * Copyright (C) 2004 Russell King. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __ASM_ARM_MACH_IRDA_H +#define __ASM_ARM_MACH_IRDA_H + +struct irda_platform_data { + int (*startup)(struct device *); + void (*shutdown)(struct device *); + int (*set_power)(struct device *, unsigned int state); + void (*set_speed)(struct device *, unsigned int speed); +}; + +#endif diff --git a/trunk/arch/arm/include/asm/mach/irq.h b/trunk/arch/arm/include/asm/mach/irq.h new file mode 100644 index 000000000000..acac5302e4ea --- /dev/null +++ b/trunk/arch/arm/include/asm/mach/irq.h @@ -0,0 +1,34 @@ +/* + * arch/arm/include/asm/mach/irq.h + * + * Copyright (C) 1995-2000 Russell King. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __ASM_ARM_MACH_IRQ_H +#define __ASM_ARM_MACH_IRQ_H + +#include + +struct seq_file; + +/* + * This is internal. Do not use it. + */ +extern void (*init_arch_irq)(void); +extern void init_FIQ(void); +extern int show_fiq_list(struct seq_file *, void *); + +/* + * This is for easy migration, but should be changed in the source + */ +#define do_bad_IRQ(irq,desc) \ +do { \ + spin_lock(&desc->lock); \ + handle_bad_irq(irq, desc); \ + spin_unlock(&desc->lock); \ +} while(0) + +#endif diff --git a/trunk/arch/arm/include/asm/mach/map.h b/trunk/arch/arm/include/asm/mach/map.h new file mode 100644 index 000000000000..06f583b13999 --- /dev/null +++ b/trunk/arch/arm/include/asm/mach/map.h @@ -0,0 +1,36 @@ +/* + * arch/arm/include/asm/map.h + * + * Copyright (C) 1999-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Page table mapping constructs and function prototypes + */ +#include + +struct map_desc { + unsigned long virtual; + unsigned long pfn; + unsigned long length; + unsigned int type; +}; + +/* types 0-3 are defined in asm/io.h */ +#define MT_CACHECLEAN 4 +#define MT_MINICLEAN 5 +#define MT_LOW_VECTORS 6 +#define MT_HIGH_VECTORS 7 +#define MT_MEMORY 8 +#define MT_ROM 9 + +#define MT_NONSHARED_DEVICE MT_DEVICE_NONSHARED +#define MT_IXP2000_DEVICE MT_DEVICE_IXP2000 + +#ifdef CONFIG_MMU +extern void iotable_init(struct map_desc *, int); +#else +#define iotable_init(map,num) do { } while (0) +#endif diff --git a/trunk/arch/arm/include/asm/mach/mmc.h b/trunk/arch/arm/include/asm/mach/mmc.h new file mode 100644 index 000000000000..4da332b03144 --- /dev/null +++ b/trunk/arch/arm/include/asm/mach/mmc.h @@ -0,0 +1,15 @@ +/* + * arch/arm/include/asm/mach/mmc.h + */ +#ifndef ASMARM_MACH_MMC_H +#define ASMARM_MACH_MMC_H + +#include + +struct mmc_platform_data { + unsigned int ocr_mask; /* available voltages */ + u32 (*translate_vdd)(struct device *, unsigned int); + unsigned int (*status)(struct device *); +}; + +#endif diff --git a/trunk/arch/arm/include/asm/mach/pci.h b/trunk/arch/arm/include/asm/mach/pci.h new file mode 100644 index 000000000000..32da1ae17e06 --- /dev/null +++ b/trunk/arch/arm/include/asm/mach/pci.h @@ -0,0 +1,72 @@ +/* + * arch/arm/include/asm/mach/pci.h + * + * Copyright (C) 2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +struct pci_sys_data; +struct pci_bus; + +struct hw_pci { + struct list_head buses; + int nr_controllers; + int (*setup)(int nr, struct pci_sys_data *); + struct pci_bus *(*scan)(int nr, struct pci_sys_data *); + void (*preinit)(void); + void (*postinit)(void); + u8 (*swizzle)(struct pci_dev *dev, u8 *pin); + int (*map_irq)(struct pci_dev *dev, u8 slot, u8 pin); +}; + +/* + * Per-controller structure + */ +struct pci_sys_data { + struct list_head node; + int busnr; /* primary bus number */ + u64 mem_offset; /* bus->cpu memory mapping offset */ + unsigned long io_offset; /* bus->cpu IO mapping offset */ + struct pci_bus *bus; /* PCI bus */ + struct resource *resource[3]; /* Primary PCI bus resources */ + /* Bridge swizzling */ + u8 (*swizzle)(struct pci_dev *, u8 *); + /* IRQ mapping */ + int (*map_irq)(struct pci_dev *, u8, u8); + struct hw_pci *hw; +}; + +/* + * This is the standard PCI-PCI bridge swizzling algorithm. + */ +u8 pci_std_swizzle(struct pci_dev *dev, u8 *pinp); + +/* + * Call this with your hw_pci struct to initialise the PCI system. + */ +void pci_common_init(struct hw_pci *); + +/* + * PCI controllers + */ +extern int iop3xx_pci_setup(int nr, struct pci_sys_data *); +extern struct pci_bus *iop3xx_pci_scan_bus(int nr, struct pci_sys_data *); +extern void iop3xx_pci_preinit(void); +extern void iop3xx_pci_preinit_cond(void); + +extern int dc21285_setup(int nr, struct pci_sys_data *); +extern struct pci_bus *dc21285_scan_bus(int nr, struct pci_sys_data *); +extern void dc21285_preinit(void); +extern void dc21285_postinit(void); + +extern int via82c505_setup(int nr, struct pci_sys_data *); +extern struct pci_bus *via82c505_scan_bus(int nr, struct pci_sys_data *); +extern void via82c505_init(void *sysdata); + +extern int pci_v3_setup(int nr, struct pci_sys_data *); +extern struct pci_bus *pci_v3_scan_bus(int nr, struct pci_sys_data *); +extern void pci_v3_preinit(void); +extern void pci_v3_postinit(void); diff --git a/trunk/include/asm-avr32/mach/serial_at91.h b/trunk/arch/arm/include/asm/mach/serial_at91.h similarity index 94% rename from trunk/include/asm-avr32/mach/serial_at91.h rename to trunk/arch/arm/include/asm/mach/serial_at91.h index 55b317a89061..ea6d063923b8 100644 --- a/trunk/include/asm-avr32/mach/serial_at91.h +++ b/trunk/arch/arm/include/asm/mach/serial_at91.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/mach/serial_at91.h + * arch/arm/include/asm/mach/serial_at91.h * * Based on serial_sa1100.h by Nicolas Pitre * diff --git a/trunk/include/asm-arm/mach/serial_sa1100.h b/trunk/arch/arm/include/asm/mach/serial_sa1100.h similarity index 86% rename from trunk/include/asm-arm/mach/serial_sa1100.h rename to trunk/arch/arm/include/asm/mach/serial_sa1100.h index 20c22bb218d9..d09064bf95a0 100644 --- a/trunk/include/asm-arm/mach/serial_sa1100.h +++ b/trunk/arch/arm/include/asm/mach/serial_sa1100.h @@ -1,9 +1,9 @@ /* - * linux/include/asm-arm/mach/serial_sa1100.h + * arch/arm/include/asm/mach/serial_sa1100.h * * Author: Nicolas Pitre * - * Moved to include/asm-arm/mach and changed lots, Russell King + * Moved and changed lots, Russell King * * Low level machine dependent UART functions. */ diff --git a/trunk/include/asm-arm/mach/sharpsl_param.h b/trunk/arch/arm/include/asm/mach/sharpsl_param.h similarity index 100% rename from trunk/include/asm-arm/mach/sharpsl_param.h rename to trunk/arch/arm/include/asm/mach/sharpsl_param.h diff --git a/trunk/arch/arm/include/asm/mach/time.h b/trunk/arch/arm/include/asm/mach/time.h new file mode 100644 index 000000000000..b2cc1fcd0400 --- /dev/null +++ b/trunk/arch/arm/include/asm/mach/time.h @@ -0,0 +1,57 @@ +/* + * arch/arm/include/asm/mach/time.h + * + * Copyright (C) 2004 MontaVista Software, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __ASM_ARM_MACH_TIME_H +#define __ASM_ARM_MACH_TIME_H + +#include + +/* + * This is our kernel timer structure. + * + * - init + * Initialise the kernels jiffy timer source, claim interrupt + * using setup_irq. This is called early on during initialisation + * while interrupts are still disabled on the local CPU. + * - suspend + * Suspend the kernel jiffy timer source, if necessary. This + * is called with interrupts disabled, after all normal devices + * have been suspended. If no action is required, set this to + * NULL. + * - resume + * Resume the kernel jiffy timer source, if necessary. This + * is called with interrupts disabled before any normal devices + * are resumed. If no action is required, set this to NULL. + * - offset + * Return the timer offset in microseconds since the last timer + * interrupt. Note: this must take account of any unprocessed + * timer interrupt which may be pending. + */ +struct sys_timer { + struct sys_device dev; + void (*init)(void); + void (*suspend)(void); + void (*resume)(void); +#ifndef CONFIG_GENERIC_TIME + unsigned long (*offset)(void); +#endif +}; + +extern struct sys_timer *system_timer; +extern void timer_tick(void); + +/* + * Kernel time keeping support. + */ +struct timespec; +extern int (*set_rtc)(void); +extern void save_time_delta(struct timespec *delta, struct timespec *rtc); +extern void restore_time_delta(struct timespec *delta, struct timespec *rtc); + +#endif diff --git a/trunk/include/asm-arm/mach/udc_pxa2xx.h b/trunk/arch/arm/include/asm/mach/udc_pxa2xx.h similarity index 95% rename from trunk/include/asm-arm/mach/udc_pxa2xx.h rename to trunk/arch/arm/include/asm/mach/udc_pxa2xx.h index 9e5ed7c0f27f..270902c353fd 100644 --- a/trunk/include/asm-arm/mach/udc_pxa2xx.h +++ b/trunk/arch/arm/include/asm/mach/udc_pxa2xx.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/mach/udc_pxa2xx.h + * arch/arm/include/asm/mach/udc_pxa2xx.h * * This supports machine-specific differences in how the PXA2xx * USB Device Controller (UDC) is wired. diff --git a/trunk/include/asm-arm/mc146818rtc.h b/trunk/arch/arm/include/asm/mc146818rtc.h similarity index 95% rename from trunk/include/asm-arm/mc146818rtc.h rename to trunk/arch/arm/include/asm/mc146818rtc.h index 7b81e0c42543..e1ca48a9e973 100644 --- a/trunk/include/asm-arm/mc146818rtc.h +++ b/trunk/arch/arm/include/asm/mc146818rtc.h @@ -4,7 +4,7 @@ #ifndef _ASM_MC146818RTC_H #define _ASM_MC146818RTC_H -#include +#include #include #ifndef RTC_PORT diff --git a/trunk/arch/arm/include/asm/memory.h b/trunk/arch/arm/include/asm/memory.h new file mode 100644 index 000000000000..1e070a2b561a --- /dev/null +++ b/trunk/arch/arm/include/asm/memory.h @@ -0,0 +1,334 @@ +/* + * arch/arm/include/asm/memory.h + * + * Copyright (C) 2000-2002 Russell King + * modification for nommu, Hyok S. Choi, 2004 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Note: this file should not be included by non-asm/.h files + */ +#ifndef __ASM_ARM_MEMORY_H +#define __ASM_ARM_MEMORY_H + +/* + * Allow for constants defined here to be used from assembly code + * by prepending the UL suffix only with actual C code compilation. + */ +#ifndef __ASSEMBLY__ +#define UL(x) (x##UL) +#else +#define UL(x) (x) +#endif + +#include +#include +#include + +#ifdef CONFIG_MMU + +#ifndef TASK_SIZE +/* + * TASK_SIZE - the maximum size of a user space task. + * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area + */ +#define TASK_SIZE UL(0xbf000000) +#define TASK_UNMAPPED_BASE UL(0x40000000) +#endif + +/* + * The maximum size of a 26-bit user space task. + */ +#define TASK_SIZE_26 UL(0x04000000) + +/* + * Page offset: 3GB + */ +#ifndef PAGE_OFFSET +#define PAGE_OFFSET UL(0xc0000000) +#endif + +/* + * The module space lives between the addresses given by TASK_SIZE + * and PAGE_OFFSET - it must be within 32MB of the kernel text. + */ +#define MODULE_END (PAGE_OFFSET) +#define MODULE_START (MODULE_END - 16*1048576) + +#if TASK_SIZE > MODULE_START +#error Top of user space clashes with start of module space +#endif + +/* + * The XIP kernel gets mapped at the bottom of the module vm area. + * Since we use sections to map it, this macro replaces the physical address + * with its virtual address while keeping offset from the base section. + */ +#define XIP_VIRT_ADDR(physaddr) (MODULE_START + ((physaddr) & 0x000fffff)) + +/* + * Allow 16MB-aligned ioremap pages + */ +#define IOREMAP_MAX_ORDER 24 + +#else /* CONFIG_MMU */ + +/* + * The limitation of user task size can grow up to the end of free ram region. + * It is difficult to define and perhaps will never meet the original meaning + * of this define that was meant to. + * Fortunately, there is no reference for this in noMMU mode, for now. + */ +#ifndef TASK_SIZE +#define TASK_SIZE (CONFIG_DRAM_SIZE) +#endif + +#ifndef TASK_UNMAPPED_BASE +#define TASK_UNMAPPED_BASE UL(0x00000000) +#endif + +#ifndef PHYS_OFFSET +#define PHYS_OFFSET (CONFIG_DRAM_BASE) +#endif + +#ifndef END_MEM +#define END_MEM (CONFIG_DRAM_BASE + CONFIG_DRAM_SIZE) +#endif + +#ifndef PAGE_OFFSET +#define PAGE_OFFSET (PHYS_OFFSET) +#endif + +/* + * The module can be at any place in ram in nommu mode. + */ +#define MODULE_END (END_MEM) +#define MODULE_START (PHYS_OFFSET) + +#endif /* !CONFIG_MMU */ + +/* + * Size of DMA-consistent memory region. Must be multiple of 2M, + * between 2MB and 14MB inclusive. + */ +#ifndef CONSISTENT_DMA_SIZE +#define CONSISTENT_DMA_SIZE SZ_2M +#endif + +/* + * Physical vs virtual RAM address space conversion. These are + * private definitions which should NOT be used outside memory.h + * files. Use virt_to_phys/phys_to_virt/__pa/__va instead. + */ +#ifndef __virt_to_phys +#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET) +#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET) +#endif + +/* + * Convert a physical address to a Page Frame Number and back + */ +#define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT) +#define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT) + +#ifndef __ASSEMBLY__ + +/* + * The DMA mask corresponding to the maximum bus address allocatable + * using GFP_DMA. The default here places no restriction on DMA + * allocations. This must be the smallest DMA mask in the system, + * so a successful GFP_DMA allocation will always satisfy this. + */ +#ifndef ISA_DMA_THRESHOLD +#define ISA_DMA_THRESHOLD (0xffffffffULL) +#endif + +#ifndef arch_adjust_zones +#define arch_adjust_zones(node,size,holes) do { } while (0) +#endif + +/* + * PFNs are used to describe any physical page; this means + * PFN 0 == physical address 0. + * + * This is the PFN of the first RAM page in the kernel + * direct-mapped view. We assume this is the first page + * of RAM in the mem_map as well. + */ +#define PHYS_PFN_OFFSET (PHYS_OFFSET >> PAGE_SHIFT) + +/* + * These are *only* valid on the kernel direct mapped RAM memory. + * Note: Drivers should NOT use these. They are the wrong + * translation for translating DMA addresses. Use the driver + * DMA support - see dma-mapping.h. + */ +static inline unsigned long virt_to_phys(void *x) +{ + return __virt_to_phys((unsigned long)(x)); +} + +static inline void *phys_to_virt(unsigned long x) +{ + return (void *)(__phys_to_virt((unsigned long)(x))); +} + +/* + * Drivers should NOT use these either. + */ +#define __pa(x) __virt_to_phys((unsigned long)(x)) +#define __va(x) ((void *)__phys_to_virt((unsigned long)(x))) +#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) + +/* + * Virtual <-> DMA view memory address translations + * Again, these are *only* valid on the kernel direct mapped RAM + * memory. Use of these is *deprecated* (and that doesn't mean + * use the __ prefixed forms instead.) See dma-mapping.h. + */ +static inline __deprecated unsigned long virt_to_bus(void *x) +{ + return __virt_to_bus((unsigned long)x); +} + +static inline __deprecated void *bus_to_virt(unsigned long x) +{ + return (void *)__bus_to_virt(x); +} + +/* + * Conversion between a struct page and a physical address. + * + * Note: when converting an unknown physical address to a + * struct page, the resulting pointer must be validated + * using VALID_PAGE(). It must return an invalid struct page + * for any physical address not corresponding to a system + * RAM address. + * + * page_to_pfn(page) convert a struct page * to a PFN number + * pfn_to_page(pfn) convert a _valid_ PFN number to struct page * + * pfn_valid(pfn) indicates whether a PFN number is valid + * + * virt_to_page(k) convert a _valid_ virtual address to struct page * + * virt_addr_valid(k) indicates whether a virtual address is valid + */ +#ifndef CONFIG_DISCONTIGMEM + +#define ARCH_PFN_OFFSET PHYS_PFN_OFFSET + +#ifndef CONFIG_SPARSEMEM +#define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr)) +#endif + +#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) +#define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) + +#define PHYS_TO_NID(addr) (0) + +#else /* CONFIG_DISCONTIGMEM */ + +/* + * This is more complex. We have a set of mem_map arrays spread + * around in memory. + */ +#include + +#define arch_pfn_to_nid(pfn) PFN_TO_NID(pfn) +#define arch_local_page_offset(pfn, nid) LOCAL_MAP_NR((pfn) << PAGE_SHIFT) + +#define pfn_valid(pfn) \ + ({ \ + unsigned int nid = PFN_TO_NID(pfn); \ + int valid = nid < MAX_NUMNODES; \ + if (valid) { \ + pg_data_t *node = NODE_DATA(nid); \ + valid = (pfn - node->node_start_pfn) < \ + node->node_spanned_pages; \ + } \ + valid; \ + }) + +#define virt_to_page(kaddr) \ + (ADDR_TO_MAPBASE(kaddr) + LOCAL_MAP_NR(kaddr)) + +#define virt_addr_valid(kaddr) (KVADDR_TO_NID(kaddr) < MAX_NUMNODES) + +/* + * Common discontigmem stuff. + * PHYS_TO_NID is used by the ARM kernel/setup.c + */ +#define PHYS_TO_NID(addr) PFN_TO_NID((addr) >> PAGE_SHIFT) + +/* + * Given a kaddr, ADDR_TO_MAPBASE finds the owning node of the memory + * and returns the mem_map of that node. + */ +#define ADDR_TO_MAPBASE(kaddr) NODE_MEM_MAP(KVADDR_TO_NID(kaddr)) + +/* + * Given a page frame number, find the owning node of the memory + * and returns the mem_map of that node. + */ +#define PFN_TO_MAPBASE(pfn) NODE_MEM_MAP(PFN_TO_NID(pfn)) + +#ifdef NODE_MEM_SIZE_BITS +#define NODE_MEM_SIZE_MASK ((1 << NODE_MEM_SIZE_BITS) - 1) + +/* + * Given a kernel address, find the home node of the underlying memory. + */ +#define KVADDR_TO_NID(addr) \ + (((unsigned long)(addr) - PAGE_OFFSET) >> NODE_MEM_SIZE_BITS) + +/* + * Given a page frame number, convert it to a node id. + */ +#define PFN_TO_NID(pfn) \ + (((pfn) - PHYS_PFN_OFFSET) >> (NODE_MEM_SIZE_BITS - PAGE_SHIFT)) + +/* + * Given a kaddr, LOCAL_MEM_MAP finds the owning node of the memory + * and returns the index corresponding to the appropriate page in the + * node's mem_map. + */ +#define LOCAL_MAP_NR(addr) \ + (((unsigned long)(addr) & NODE_MEM_SIZE_MASK) >> PAGE_SHIFT) + +#endif /* NODE_MEM_SIZE_BITS */ + +#endif /* !CONFIG_DISCONTIGMEM */ + +/* + * For BIO. "will die". Kill me when bio_to_phys() and bvec_to_phys() die. + */ +#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) + +/* + * Optional device DMA address remapping. Do _not_ use directly! + * We should really eliminate virt_to_bus() here - it's deprecated. + */ +#ifndef __arch_page_to_dma +#define page_to_dma(dev, page) ((dma_addr_t)__virt_to_bus((unsigned long)page_address(page))) +#define dma_to_virt(dev, addr) ((void *)__bus_to_virt(addr)) +#define virt_to_dma(dev, addr) ((dma_addr_t)__virt_to_bus((unsigned long)(addr))) +#else +#define page_to_dma(dev, page) (__arch_page_to_dma(dev, page)) +#define dma_to_virt(dev, addr) (__arch_dma_to_virt(dev, addr)) +#define virt_to_dma(dev, addr) (__arch_virt_to_dma(dev, addr)) +#endif + +/* + * Optional coherency support. Currently used only by selected + * Intel XSC3-based systems. + */ +#ifndef arch_is_coherent +#define arch_is_coherent() 0 +#endif + +#endif + +#include + +#endif diff --git a/trunk/include/asm-arm/mman.h b/trunk/arch/arm/include/asm/mman.h similarity index 100% rename from trunk/include/asm-arm/mman.h rename to trunk/arch/arm/include/asm/mman.h diff --git a/trunk/include/asm-arm/mmu.h b/trunk/arch/arm/include/asm/mmu.h similarity index 100% rename from trunk/include/asm-arm/mmu.h rename to trunk/arch/arm/include/asm/mmu.h diff --git a/trunk/include/asm-arm/mmu_context.h b/trunk/arch/arm/include/asm/mmu_context.h similarity index 98% rename from trunk/include/asm-arm/mmu_context.h rename to trunk/arch/arm/include/asm/mmu_context.h index 91b9dfdfed52..a301e446007f 100644 --- a/trunk/include/asm-arm/mmu_context.h +++ b/trunk/arch/arm/include/asm/mmu_context.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/mmu_context.h + * arch/arm/include/asm/mmu_context.h * * Copyright (C) 1996 Russell King. * diff --git a/trunk/include/asm-arm/mmzone.h b/trunk/arch/arm/include/asm/mmzone.h similarity index 90% rename from trunk/include/asm-arm/mmzone.h rename to trunk/arch/arm/include/asm/mmzone.h index b87de151f0a4..ae63a4fd28c8 100644 --- a/trunk/include/asm-arm/mmzone.h +++ b/trunk/arch/arm/include/asm/mmzone.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/mmzone.h + * arch/arm/include/asm/mmzone.h * * 1999-12-29 Nicolas Pitre Created * @@ -25,6 +25,6 @@ extern pg_data_t discontig_node_data[]; */ #define NODE_MEM_MAP(nid) (NODE_DATA(nid)->node_mem_map) -#include +#include #endif diff --git a/trunk/include/asm-arm/module.h b/trunk/arch/arm/include/asm/module.h similarity index 100% rename from trunk/include/asm-arm/module.h rename to trunk/arch/arm/include/asm/module.h diff --git a/trunk/include/asm-arm/msgbuf.h b/trunk/arch/arm/include/asm/msgbuf.h similarity index 100% rename from trunk/include/asm-arm/msgbuf.h rename to trunk/arch/arm/include/asm/msgbuf.h diff --git a/trunk/arch/arm/include/asm/mtd-xip.h b/trunk/arch/arm/include/asm/mtd-xip.h new file mode 100644 index 000000000000..4225372a26f3 --- /dev/null +++ b/trunk/arch/arm/include/asm/mtd-xip.h @@ -0,0 +1,26 @@ +/* + * MTD primitives for XIP support. Architecture specific functions + * + * Do not include this file directly. It's included from linux/mtd/xip.h + * + * Author: Nicolas Pitre + * Created: Nov 2, 2004 + * Copyright: (C) 2004 MontaVista Software, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * $Id: xip.h,v 1.2 2004/12/01 15:49:10 nico Exp $ + */ + +#ifndef __ARM_MTD_XIP_H__ +#define __ARM_MTD_XIP_H__ + +#include +#include + +/* fill instruction prefetch */ +#define xip_iprefetch() do { asm volatile (".rep 8; nop; .endr"); } while (0) + +#endif /* __ARM_MTD_XIP_H__ */ diff --git a/trunk/include/asm-arm/mutex.h b/trunk/arch/arm/include/asm/mutex.h similarity index 98% rename from trunk/include/asm-arm/mutex.h rename to trunk/arch/arm/include/asm/mutex.h index 020bd98710a1..93226cf23ae0 100644 --- a/trunk/include/asm-arm/mutex.h +++ b/trunk/arch/arm/include/asm/mutex.h @@ -1,5 +1,5 @@ /* - * include/asm-arm/mutex.h + * arch/arm/include/asm/mutex.h * * ARM optimized mutex locking primitives * diff --git a/trunk/include/asm-arm/nwflash.h b/trunk/arch/arm/include/asm/nwflash.h similarity index 100% rename from trunk/include/asm-arm/nwflash.h rename to trunk/arch/arm/include/asm/nwflash.h diff --git a/trunk/include/asm-arm/page-nommu.h b/trunk/arch/arm/include/asm/page-nommu.h similarity index 96% rename from trunk/include/asm-arm/page-nommu.h rename to trunk/arch/arm/include/asm/page-nommu.h index ea1cde84f500..3574c0deb37f 100644 --- a/trunk/include/asm-arm/page-nommu.h +++ b/trunk/arch/arm/include/asm/page-nommu.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/page-nommu.h + * arch/arm/include/asm/page-nommu.h * * Copyright (C) 2004 Hyok S. Choi * diff --git a/trunk/include/asm-arm/page.h b/trunk/arch/arm/include/asm/page.h similarity index 99% rename from trunk/include/asm-arm/page.h rename to trunk/arch/arm/include/asm/page.h index 7c5fc5582e5d..cf2e2680daaa 100644 --- a/trunk/include/asm-arm/page.h +++ b/trunk/arch/arm/include/asm/page.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/page.h + * arch/arm/include/asm/page.h * * Copyright (C) 1995-2003 Russell King * diff --git a/trunk/arch/arm/include/asm/param.h b/trunk/arch/arm/include/asm/param.h new file mode 100644 index 000000000000..8b24bf94c06b --- /dev/null +++ b/trunk/arch/arm/include/asm/param.h @@ -0,0 +1,31 @@ +/* + * arch/arm/include/asm/param.h + * + * Copyright (C) 1995-1999 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __ASM_PARAM_H +#define __ASM_PARAM_H + +#ifdef __KERNEL__ +# define HZ CONFIG_HZ /* Internal kernel timer frequency */ +# define USER_HZ 100 /* User interfaces are in "ticks" */ +# define CLOCKS_PER_SEC (USER_HZ) /* like times() */ +#else +# define HZ 100 +#endif + +#define EXEC_PAGESIZE 4096 + +#ifndef NOGROUP +#define NOGROUP (-1) +#endif + +/* max length of hostname */ +#define MAXHOSTNAMELEN 64 + +#endif + diff --git a/trunk/include/asm-arm/parport.h b/trunk/arch/arm/include/asm/parport.h similarity index 86% rename from trunk/include/asm-arm/parport.h rename to trunk/arch/arm/include/asm/parport.h index f2f90c76ddd1..26e94b09035a 100644 --- a/trunk/include/asm-arm/parport.h +++ b/trunk/arch/arm/include/asm/parport.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/parport.h: ARM-specific parport initialisation + * arch/arm/include/asm/parport.h: ARM-specific parport initialisation * * Copyright (C) 1999, 2000 Tim Waugh * diff --git a/trunk/arch/arm/include/asm/pci.h b/trunk/arch/arm/include/asm/pci.h new file mode 100644 index 000000000000..721c03d53f4b --- /dev/null +++ b/trunk/arch/arm/include/asm/pci.h @@ -0,0 +1,91 @@ +#ifndef ASMARM_PCI_H +#define ASMARM_PCI_H + +#ifdef __KERNEL__ +#include + +#include /* for PCIBIOS_MIN_* */ + +#define pcibios_scan_all_fns(a, b) 0 + +#ifdef CONFIG_PCI_HOST_ITE8152 +/* ITE bridge requires setting latency timer to avoid early bus access + termination by PIC bus mater devices +*/ +extern void pcibios_set_master(struct pci_dev *dev); +#else +static inline void pcibios_set_master(struct pci_dev *dev) +{ + /* No special bus mastering setup handling */ +} +#endif + +static inline void pcibios_penalize_isa_irq(int irq, int active) +{ + /* We don't do dynamic PCI IRQ allocation */ +} + +/* + * The PCI address space does equal the physical memory address space. + * The networking and block device layers use this boolean for bounce + * buffer decisions. + */ +#define PCI_DMA_BUS_IS_PHYS (0) + +/* + * Whether pci_unmap_{single,page} is a nop depends upon the + * configuration. + */ +#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME; +#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) __u32 LEN_NAME; +#define pci_unmap_addr(PTR, ADDR_NAME) ((PTR)->ADDR_NAME) +#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) (((PTR)->ADDR_NAME) = (VAL)) +#define pci_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME) +#define pci_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL)) + +#ifdef CONFIG_PCI +static inline void pci_dma_burst_advice(struct pci_dev *pdev, + enum pci_dma_burst_strategy *strat, + unsigned long *strategy_parameter) +{ + *strat = PCI_DMA_BURST_INFINITY; + *strategy_parameter = ~0UL; +} +#endif + +#define HAVE_PCI_MMAP +extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, + enum pci_mmap_state mmap_state, int write_combine); + +extern void +pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, + struct resource *res); + +extern void +pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, + struct pci_bus_region *region); + +static inline struct resource * +pcibios_select_root(struct pci_dev *pdev, struct resource *res) +{ + struct resource *root = NULL; + + if (res->flags & IORESOURCE_IO) + root = &ioport_resource; + if (res->flags & IORESOURCE_MEM) + root = &iomem_resource; + + return root; +} + +/* + * Dummy implementation; always return 0. + */ +static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) +{ + return 0; +} + +#endif /* __KERNEL__ */ + +#endif diff --git a/trunk/include/asm-arm/percpu.h b/trunk/arch/arm/include/asm/percpu.h similarity index 100% rename from trunk/include/asm-arm/percpu.h rename to trunk/arch/arm/include/asm/percpu.h diff --git a/trunk/include/asm-arm/pgalloc.h b/trunk/arch/arm/include/asm/pgalloc.h similarity index 98% rename from trunk/include/asm-arm/pgalloc.h rename to trunk/arch/arm/include/asm/pgalloc.h index 163b0305dd76..3dcd64bf1824 100644 --- a/trunk/include/asm-arm/pgalloc.h +++ b/trunk/arch/arm/include/asm/pgalloc.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/pgalloc.h + * arch/arm/include/asm/pgalloc.h * * Copyright (C) 2000-2001 Russell King * diff --git a/trunk/include/asm-arm/pgtable-hwdef.h b/trunk/arch/arm/include/asm/pgtable-hwdef.h similarity index 98% rename from trunk/include/asm-arm/pgtable-hwdef.h rename to trunk/arch/arm/include/asm/pgtable-hwdef.h index f3b5120c99fe..fd1521d5cb9d 100644 --- a/trunk/include/asm-arm/pgtable-hwdef.h +++ b/trunk/arch/arm/include/asm/pgtable-hwdef.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/pgtable-hwdef.h + * arch/arm/include/asm/pgtable-hwdef.h * * Copyright (C) 1995-2002 Russell King * diff --git a/trunk/include/asm-arm/pgtable-nommu.h b/trunk/arch/arm/include/asm/pgtable-nommu.h similarity index 98% rename from trunk/include/asm-arm/pgtable-nommu.h rename to trunk/arch/arm/include/asm/pgtable-nommu.h index 386fcc10a973..b011f2e939aa 100644 --- a/trunk/include/asm-arm/pgtable-nommu.h +++ b/trunk/arch/arm/include/asm/pgtable-nommu.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/pgtable-nommu.h + * arch/arm/include/asm/pgtable-nommu.h * * Copyright (C) 1995-2002 Russell King * Copyright (C) 2004 Hyok S. Choi diff --git a/trunk/include/asm-arm/pgtable.h b/trunk/arch/arm/include/asm/pgtable.h similarity index 99% rename from trunk/include/asm-arm/pgtable.h rename to trunk/arch/arm/include/asm/pgtable.h index 5571c13c3f3b..8e21ef15bd74 100644 --- a/trunk/include/asm-arm/pgtable.h +++ b/trunk/arch/arm/include/asm/pgtable.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/pgtable.h + * arch/arm/include/asm/pgtable.h * * Copyright (C) 1995-2002 Russell King * @@ -20,7 +20,7 @@ #else #include -#include +#include #include /* diff --git a/trunk/include/asm-arm/poll.h b/trunk/arch/arm/include/asm/poll.h similarity index 100% rename from trunk/include/asm-arm/poll.h rename to trunk/arch/arm/include/asm/poll.h diff --git a/trunk/include/asm-arm/posix_types.h b/trunk/arch/arm/include/asm/posix_types.h similarity index 98% rename from trunk/include/asm-arm/posix_types.h rename to trunk/arch/arm/include/asm/posix_types.h index c37379dadcb2..2446d23bfdbf 100644 --- a/trunk/include/asm-arm/posix_types.h +++ b/trunk/arch/arm/include/asm/posix_types.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/posix_types.h + * arch/arm/include/asm/posix_types.h * * Copyright (C) 1996-1998 Russell King. * diff --git a/trunk/include/asm-arm/proc-fns.h b/trunk/arch/arm/include/asm/proc-fns.h similarity index 99% rename from trunk/include/asm-arm/proc-fns.h rename to trunk/arch/arm/include/asm/proc-fns.h index 75ec760f4c74..db80203b68e0 100644 --- a/trunk/include/asm-arm/proc-fns.h +++ b/trunk/arch/arm/include/asm/proc-fns.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/proc-fns.h + * arch/arm/include/asm/proc-fns.h * * Copyright (C) 1997-1999 Russell King * Copyright (C) 2000 Deep Blue Solutions Ltd diff --git a/trunk/arch/arm/include/asm/processor.h b/trunk/arch/arm/include/asm/processor.h new file mode 100644 index 000000000000..b01d5e7e3d5a --- /dev/null +++ b/trunk/arch/arm/include/asm/processor.h @@ -0,0 +1,131 @@ +/* + * arch/arm/include/asm/processor.h + * + * Copyright (C) 1995-1999 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ASM_ARM_PROCESSOR_H +#define __ASM_ARM_PROCESSOR_H + +/* + * Default implementation of macro that returns current + * instruction pointer ("program counter"). + */ +#define current_text_addr() ({ __label__ _l; _l: &&_l;}) + +#ifdef __KERNEL__ + +#include +#include + +#ifdef __KERNEL__ +#define STACK_TOP ((current->personality == PER_LINUX_32BIT) ? \ + TASK_SIZE : TASK_SIZE_26) +#define STACK_TOP_MAX TASK_SIZE +#endif + +union debug_insn { + u32 arm; + u16 thumb; +}; + +struct debug_entry { + u32 address; + union debug_insn insn; +}; + +struct debug_info { + int nsaved; + struct debug_entry bp[2]; +}; + +struct thread_struct { + /* fault info */ + unsigned long address; + unsigned long trap_no; + unsigned long error_code; + /* debugging */ + struct debug_info debug; +}; + +#define INIT_THREAD { } + +#ifdef CONFIG_MMU +#define nommu_start_thread(regs) do { } while (0) +#else +#define nommu_start_thread(regs) regs->ARM_r10 = current->mm->start_data +#endif + +#define start_thread(regs,pc,sp) \ +({ \ + unsigned long *stack = (unsigned long *)sp; \ + set_fs(USER_DS); \ + memzero(regs->uregs, sizeof(regs->uregs)); \ + if (current->personality & ADDR_LIMIT_32BIT) \ + regs->ARM_cpsr = USR_MODE; \ + else \ + regs->ARM_cpsr = USR26_MODE; \ + if (elf_hwcap & HWCAP_THUMB && pc & 1) \ + regs->ARM_cpsr |= PSR_T_BIT; \ + regs->ARM_pc = pc & ~1; /* pc */ \ + regs->ARM_sp = sp; /* sp */ \ + regs->ARM_r2 = stack[2]; /* r2 (envp) */ \ + regs->ARM_r1 = stack[1]; /* r1 (argv) */ \ + regs->ARM_r0 = stack[0]; /* r0 (argc) */ \ + nommu_start_thread(regs); \ +}) + +/* Forward declaration, a strange C thing */ +struct task_struct; + +/* Free all resources held by a thread. */ +extern void release_thread(struct task_struct *); + +/* Prepare to copy thread state - unlazy all lazy status */ +#define prepare_to_copy(tsk) do { } while (0) + +unsigned long get_wchan(struct task_struct *p); + +#define cpu_relax() barrier() + +/* + * Create a new kernel thread + */ +extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); + +#define task_pt_regs(p) \ + ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1) + +#define KSTK_EIP(tsk) task_pt_regs(tsk)->ARM_pc +#define KSTK_ESP(tsk) task_pt_regs(tsk)->ARM_sp + +/* + * Prefetching support - only ARMv5. + */ +#if __LINUX_ARM_ARCH__ >= 5 + +#define ARCH_HAS_PREFETCH +static inline void prefetch(const void *ptr) +{ + __asm__ __volatile__( + "pld\t%0" + : + : "o" (*(char *)ptr) + : "cc"); +} + +#define ARCH_HAS_PREFETCHW +#define prefetchw(ptr) prefetch(ptr) + +#define ARCH_HAS_SPINLOCK_PREFETCH +#define spin_lock_prefetch(x) do { } while (0) + +#endif + +#endif + +#endif /* __ASM_ARM_PROCESSOR_H */ diff --git a/trunk/include/asm-arm/procinfo.h b/trunk/arch/arm/include/asm/procinfo.h similarity index 97% rename from trunk/include/asm-arm/procinfo.h rename to trunk/arch/arm/include/asm/procinfo.h index 4d3c685075e0..ca52e584ef74 100644 --- a/trunk/include/asm-arm/procinfo.h +++ b/trunk/arch/arm/include/asm/procinfo.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/procinfo.h + * arch/arm/include/asm/procinfo.h * * Copyright (C) 1996-1999 Russell King * diff --git a/trunk/include/asm-arm/ptrace.h b/trunk/arch/arm/include/asm/ptrace.h similarity index 99% rename from trunk/include/asm-arm/ptrace.h rename to trunk/arch/arm/include/asm/ptrace.h index 8382b7510f94..b415c0e85458 100644 --- a/trunk/include/asm-arm/ptrace.h +++ b/trunk/arch/arm/include/asm/ptrace.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/ptrace.h + * arch/arm/include/asm/ptrace.h * * Copyright (C) 1996-2003 Russell King * diff --git a/trunk/include/asm-arm/resource.h b/trunk/arch/arm/include/asm/resource.h similarity index 100% rename from trunk/include/asm-arm/resource.h rename to trunk/arch/arm/include/asm/resource.h diff --git a/trunk/include/asm-arm/scatterlist.h b/trunk/arch/arm/include/asm/scatterlist.h similarity index 100% rename from trunk/include/asm-arm/scatterlist.h rename to trunk/arch/arm/include/asm/scatterlist.h diff --git a/trunk/include/asm-arm/sections.h b/trunk/arch/arm/include/asm/sections.h similarity index 100% rename from trunk/include/asm-arm/sections.h rename to trunk/arch/arm/include/asm/sections.h diff --git a/trunk/include/asm-arm/segment.h b/trunk/arch/arm/include/asm/segment.h similarity index 100% rename from trunk/include/asm-arm/segment.h rename to trunk/arch/arm/include/asm/segment.h diff --git a/trunk/include/asm-arm/sembuf.h b/trunk/arch/arm/include/asm/sembuf.h similarity index 100% rename from trunk/include/asm-arm/sembuf.h rename to trunk/arch/arm/include/asm/sembuf.h diff --git a/trunk/arch/arm/include/asm/serial.h b/trunk/arch/arm/include/asm/serial.h new file mode 100644 index 000000000000..ebb049091e26 --- /dev/null +++ b/trunk/arch/arm/include/asm/serial.h @@ -0,0 +1,19 @@ +/* + * arch/arm/include/asm/serial.h + * + * Copyright (C) 1996 Russell King. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Changelog: + * 15-10-1996 RMK Created + */ + +#ifndef __ASM_SERIAL_H +#define __ASM_SERIAL_H + +#define BASE_BAUD (1843200 / 16) + +#endif diff --git a/trunk/include/asm-arm/setup.h b/trunk/arch/arm/include/asm/setup.h similarity index 100% rename from trunk/include/asm-arm/setup.h rename to trunk/arch/arm/include/asm/setup.h diff --git a/trunk/include/asm-arm/shmbuf.h b/trunk/arch/arm/include/asm/shmbuf.h similarity index 100% rename from trunk/include/asm-arm/shmbuf.h rename to trunk/arch/arm/include/asm/shmbuf.h diff --git a/trunk/include/asm-arm/shmparam.h b/trunk/arch/arm/include/asm/shmparam.h similarity index 100% rename from trunk/include/asm-arm/shmparam.h rename to trunk/arch/arm/include/asm/shmparam.h diff --git a/trunk/include/asm-arm/sigcontext.h b/trunk/arch/arm/include/asm/sigcontext.h similarity index 100% rename from trunk/include/asm-arm/sigcontext.h rename to trunk/arch/arm/include/asm/sigcontext.h diff --git a/trunk/include/asm-arm/siginfo.h b/trunk/arch/arm/include/asm/siginfo.h similarity index 100% rename from trunk/include/asm-arm/siginfo.h rename to trunk/arch/arm/include/asm/siginfo.h diff --git a/trunk/include/asm-arm/signal.h b/trunk/arch/arm/include/asm/signal.h similarity index 100% rename from trunk/include/asm-arm/signal.h rename to trunk/arch/arm/include/asm/signal.h diff --git a/trunk/include/asm-arm/sizes.h b/trunk/arch/arm/include/asm/sizes.h similarity index 100% rename from trunk/include/asm-arm/sizes.h rename to trunk/arch/arm/include/asm/sizes.h diff --git a/trunk/include/asm-arm/smp.h b/trunk/arch/arm/include/asm/smp.h similarity index 96% rename from trunk/include/asm-arm/smp.h rename to trunk/arch/arm/include/asm/smp.h index 7fffa2404b8e..727b5c042e52 100644 --- a/trunk/include/asm-arm/smp.h +++ b/trunk/arch/arm/include/asm/smp.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/smp.h + * arch/arm/include/asm/smp.h * * Copyright (C) 2004-2005 ARM Ltd. * @@ -14,10 +14,10 @@ #include #include -#include +#include #ifndef CONFIG_SMP -# error " included in non-SMP build" +# error " included in non-SMP build" #endif #define raw_smp_processor_id() (current_thread_info()->cpu) diff --git a/trunk/include/asm-arm/socket.h b/trunk/arch/arm/include/asm/socket.h similarity index 100% rename from trunk/include/asm-arm/socket.h rename to trunk/arch/arm/include/asm/socket.h diff --git a/trunk/include/asm-arm/sockios.h b/trunk/arch/arm/include/asm/sockios.h similarity index 100% rename from trunk/include/asm-arm/sockios.h rename to trunk/arch/arm/include/asm/sockios.h diff --git a/trunk/include/asm-arm/sparsemem.h b/trunk/arch/arm/include/asm/sparsemem.h similarity index 100% rename from trunk/include/asm-arm/sparsemem.h rename to trunk/arch/arm/include/asm/sparsemem.h diff --git a/trunk/include/asm-arm/spinlock.h b/trunk/arch/arm/include/asm/spinlock.h similarity index 100% rename from trunk/include/asm-arm/spinlock.h rename to trunk/arch/arm/include/asm/spinlock.h diff --git a/trunk/include/asm-arm/spinlock_types.h b/trunk/arch/arm/include/asm/spinlock_types.h similarity index 100% rename from trunk/include/asm-arm/spinlock_types.h rename to trunk/arch/arm/include/asm/spinlock_types.h diff --git a/trunk/include/asm-arm/stat.h b/trunk/arch/arm/include/asm/stat.h similarity index 100% rename from trunk/include/asm-arm/stat.h rename to trunk/arch/arm/include/asm/stat.h diff --git a/trunk/include/asm-arm/statfs.h b/trunk/arch/arm/include/asm/statfs.h similarity index 100% rename from trunk/include/asm-arm/statfs.h rename to trunk/arch/arm/include/asm/statfs.h diff --git a/trunk/include/asm-arm/string.h b/trunk/arch/arm/include/asm/string.h similarity index 100% rename from trunk/include/asm-arm/string.h rename to trunk/arch/arm/include/asm/string.h diff --git a/trunk/include/asm-arm/suspend.h b/trunk/arch/arm/include/asm/suspend.h similarity index 100% rename from trunk/include/asm-arm/suspend.h rename to trunk/arch/arm/include/asm/suspend.h diff --git a/trunk/include/asm-arm/system.h b/trunk/arch/arm/include/asm/system.h similarity index 100% rename from trunk/include/asm-arm/system.h rename to trunk/arch/arm/include/asm/system.h diff --git a/trunk/include/asm-arm/termbits.h b/trunk/arch/arm/include/asm/termbits.h similarity index 100% rename from trunk/include/asm-arm/termbits.h rename to trunk/arch/arm/include/asm/termbits.h diff --git a/trunk/include/asm-arm/termios.h b/trunk/arch/arm/include/asm/termios.h similarity index 100% rename from trunk/include/asm-arm/termios.h rename to trunk/arch/arm/include/asm/termios.h diff --git a/trunk/include/asm-arm/therm.h b/trunk/arch/arm/include/asm/therm.h similarity index 88% rename from trunk/include/asm-arm/therm.h rename to trunk/arch/arm/include/asm/therm.h index e51c923ecdf3..f002f0197d78 100644 --- a/trunk/include/asm-arm/therm.h +++ b/trunk/arch/arm/include/asm/therm.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/therm.h: Definitions for Dallas Semiconductor + * arch/arm/include/asm/therm.h: Definitions for Dallas Semiconductor * DS1620 thermometer driver (as used in the Rebel.com NetWinder) */ #ifndef __ASM_THERM_H diff --git a/trunk/include/asm-arm/thread_info.h b/trunk/arch/arm/include/asm/thread_info.h similarity index 97% rename from trunk/include/asm-arm/thread_info.h rename to trunk/arch/arm/include/asm/thread_info.h index d4be2d646160..e56fa48e4ae7 100644 --- a/trunk/include/asm-arm/thread_info.h +++ b/trunk/arch/arm/include/asm/thread_info.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/thread_info.h + * arch/arm/include/asm/thread_info.h * * Copyright (C) 2002 Russell King. * @@ -117,7 +117,7 @@ extern void iwmmxt_task_switch(struct thread_info *); /* * We use bit 30 of the preempt_count to indicate that kernel - * preemption is occurring. See include/asm-arm/hardirq.h. + * preemption is occurring. See . */ #define PREEMPT_ACTIVE 0x40000000 diff --git a/trunk/include/asm-arm/thread_notify.h b/trunk/arch/arm/include/asm/thread_notify.h similarity index 96% rename from trunk/include/asm-arm/thread_notify.h rename to trunk/arch/arm/include/asm/thread_notify.h index 8866e5216840..f27379d7f72a 100644 --- a/trunk/include/asm-arm/thread_notify.h +++ b/trunk/arch/arm/include/asm/thread_notify.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/thread_notify.h + * arch/arm/include/asm/thread_notify.h * * Copyright (C) 2006 Russell King. * diff --git a/trunk/arch/arm/include/asm/timex.h b/trunk/arch/arm/include/asm/timex.h new file mode 100644 index 000000000000..3be8de3adaba --- /dev/null +++ b/trunk/arch/arm/include/asm/timex.h @@ -0,0 +1,24 @@ +/* + * arch/arm/include/asm/timex.h + * + * Copyright (C) 1997,1998 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Architecture Specific TIME specifications + */ +#ifndef _ASMARM_TIMEX_H +#define _ASMARM_TIMEX_H + +#include + +typedef unsigned long cycles_t; + +static inline cycles_t get_cycles (void) +{ + return 0; +} + +#endif diff --git a/trunk/include/asm-arm/tlb.h b/trunk/arch/arm/include/asm/tlb.h similarity index 98% rename from trunk/include/asm-arm/tlb.h rename to trunk/arch/arm/include/asm/tlb.h index 36bd402a21cb..857f1dfac794 100644 --- a/trunk/include/asm-arm/tlb.h +++ b/trunk/arch/arm/include/asm/tlb.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/tlb.h + * arch/arm/include/asm/tlb.h * * Copyright (C) 2002 Russell King * diff --git a/trunk/include/asm-arm/tlbflush.h b/trunk/arch/arm/include/asm/tlbflush.h similarity index 99% rename from trunk/include/asm-arm/tlbflush.h rename to trunk/arch/arm/include/asm/tlbflush.h index 909656c747ef..0d0d40f1b599 100644 --- a/trunk/include/asm-arm/tlbflush.h +++ b/trunk/arch/arm/include/asm/tlbflush.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/tlbflush.h + * arch/arm/include/asm/tlbflush.h * * Copyright (C) 1999-2003 Russell King * diff --git a/trunk/include/asm-arm/topology.h b/trunk/arch/arm/include/asm/topology.h similarity index 100% rename from trunk/include/asm-arm/topology.h rename to trunk/arch/arm/include/asm/topology.h diff --git a/trunk/include/asm-arm/traps.h b/trunk/arch/arm/include/asm/traps.h similarity index 100% rename from trunk/include/asm-arm/traps.h rename to trunk/arch/arm/include/asm/traps.h diff --git a/trunk/include/asm-arm/types.h b/trunk/arch/arm/include/asm/types.h similarity index 100% rename from trunk/include/asm-arm/types.h rename to trunk/arch/arm/include/asm/types.h diff --git a/trunk/include/asm-arm/uaccess.h b/trunk/arch/arm/include/asm/uaccess.h similarity index 99% rename from trunk/include/asm-arm/uaccess.h rename to trunk/arch/arm/include/asm/uaccess.h index 4c1a3fa9f259..d0f51ff900b5 100644 --- a/trunk/include/asm-arm/uaccess.h +++ b/trunk/arch/arm/include/asm/uaccess.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/uaccess.h + * arch/arm/include/asm/uaccess.h * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/trunk/include/asm-arm/ucontext.h b/trunk/arch/arm/include/asm/ucontext.h similarity index 100% rename from trunk/include/asm-arm/ucontext.h rename to trunk/arch/arm/include/asm/ucontext.h diff --git a/trunk/include/asm-arm/unaligned.h b/trunk/arch/arm/include/asm/unaligned.h similarity index 100% rename from trunk/include/asm-arm/unaligned.h rename to trunk/arch/arm/include/asm/unaligned.h diff --git a/trunk/arch/arm/include/asm/unistd.h b/trunk/arch/arm/include/asm/unistd.h new file mode 100644 index 000000000000..f95fbb2fcb5f --- /dev/null +++ b/trunk/arch/arm/include/asm/unistd.h @@ -0,0 +1,450 @@ +/* + * arch/arm/include/asm/unistd.h + * + * Copyright (C) 2001-2005 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Please forward _all_ changes to this file to rmk@arm.linux.org.uk, + * no matter what the change is. Thanks! + */ +#ifndef __ASM_ARM_UNISTD_H +#define __ASM_ARM_UNISTD_H + +#define __NR_OABI_SYSCALL_BASE 0x900000 + +#if defined(__thumb__) || defined(__ARM_EABI__) +#define __NR_SYSCALL_BASE 0 +#else +#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE +#endif + +/* + * This file contains the system call numbers. + */ + +#define __NR_restart_syscall (__NR_SYSCALL_BASE+ 0) +#define __NR_exit (__NR_SYSCALL_BASE+ 1) +#define __NR_fork (__NR_SYSCALL_BASE+ 2) +#define __NR_read (__NR_SYSCALL_BASE+ 3) +#define __NR_write (__NR_SYSCALL_BASE+ 4) +#define __NR_open (__NR_SYSCALL_BASE+ 5) +#define __NR_close (__NR_SYSCALL_BASE+ 6) + /* 7 was sys_waitpid */ +#define __NR_creat (__NR_SYSCALL_BASE+ 8) +#define __NR_link (__NR_SYSCALL_BASE+ 9) +#define __NR_unlink (__NR_SYSCALL_BASE+ 10) +#define __NR_execve (__NR_SYSCALL_BASE+ 11) +#define __NR_chdir (__NR_SYSCALL_BASE+ 12) +#define __NR_time (__NR_SYSCALL_BASE+ 13) +#define __NR_mknod (__NR_SYSCALL_BASE+ 14) +#define __NR_chmod (__NR_SYSCALL_BASE+ 15) +#define __NR_lchown (__NR_SYSCALL_BASE+ 16) + /* 17 was sys_break */ + /* 18 was sys_stat */ +#define __NR_lseek (__NR_SYSCALL_BASE+ 19) +#define __NR_getpid (__NR_SYSCALL_BASE+ 20) +#define __NR_mount (__NR_SYSCALL_BASE+ 21) +#define __NR_umount (__NR_SYSCALL_BASE+ 22) +#define __NR_setuid (__NR_SYSCALL_BASE+ 23) +#define __NR_getuid (__NR_SYSCALL_BASE+ 24) +#define __NR_stime (__NR_SYSCALL_BASE+ 25) +#define __NR_ptrace (__NR_SYSCALL_BASE+ 26) +#define __NR_alarm (__NR_SYSCALL_BASE+ 27) + /* 28 was sys_fstat */ +#define __NR_pause (__NR_SYSCALL_BASE+ 29) +#define __NR_utime (__NR_SYSCALL_BASE+ 30) + /* 31 was sys_stty */ + /* 32 was sys_gtty */ +#define __NR_access (__NR_SYSCALL_BASE+ 33) +#define __NR_nice (__NR_SYSCALL_BASE+ 34) + /* 35 was sys_ftime */ +#define __NR_sync (__NR_SYSCALL_BASE+ 36) +#define __NR_kill (__NR_SYSCALL_BASE+ 37) +#define __NR_rename (__NR_SYSCALL_BASE+ 38) +#define __NR_mkdir (__NR_SYSCALL_BASE+ 39) +#define __NR_rmdir (__NR_SYSCALL_BASE+ 40) +#define __NR_dup (__NR_SYSCALL_BASE+ 41) +#define __NR_pipe (__NR_SYSCALL_BASE+ 42) +#define __NR_times (__NR_SYSCALL_BASE+ 43) + /* 44 was sys_prof */ +#define __NR_brk (__NR_SYSCALL_BASE+ 45) +#define __NR_setgid (__NR_SYSCALL_BASE+ 46) +#define __NR_getgid (__NR_SYSCALL_BASE+ 47) + /* 48 was sys_signal */ +#define __NR_geteuid (__NR_SYSCALL_BASE+ 49) +#define __NR_getegid (__NR_SYSCALL_BASE+ 50) +#define __NR_acct (__NR_SYSCALL_BASE+ 51) +#define __NR_umount2 (__NR_SYSCALL_BASE+ 52) + /* 53 was sys_lock */ +#define __NR_ioctl (__NR_SYSCALL_BASE+ 54) +#define __NR_fcntl (__NR_SYSCALL_BASE+ 55) + /* 56 was sys_mpx */ +#define __NR_setpgid (__NR_SYSCALL_BASE+ 57) + /* 58 was sys_ulimit */ + /* 59 was sys_olduname */ +#define __NR_umask (__NR_SYSCALL_BASE+ 60) +#define __NR_chroot (__NR_SYSCALL_BASE+ 61) +#define __NR_ustat (__NR_SYSCALL_BASE+ 62) +#define __NR_dup2 (__NR_SYSCALL_BASE+ 63) +#define __NR_getppid (__NR_SYSCALL_BASE+ 64) +#define __NR_getpgrp (__NR_SYSCALL_BASE+ 65) +#define __NR_setsid (__NR_SYSCALL_BASE+ 66) +#define __NR_sigaction (__NR_SYSCALL_BASE+ 67) + /* 68 was sys_sgetmask */ + /* 69 was sys_ssetmask */ +#define __NR_setreuid (__NR_SYSCALL_BASE+ 70) +#define __NR_setregid (__NR_SYSCALL_BASE+ 71) +#define __NR_sigsuspend (__NR_SYSCALL_BASE+ 72) +#define __NR_sigpending (__NR_SYSCALL_BASE+ 73) +#define __NR_sethostname (__NR_SYSCALL_BASE+ 74) +#define __NR_setrlimit (__NR_SYSCALL_BASE+ 75) +#define __NR_getrlimit (__NR_SYSCALL_BASE+ 76) /* Back compat 2GB limited rlimit */ +#define __NR_getrusage (__NR_SYSCALL_BASE+ 77) +#define __NR_gettimeofday (__NR_SYSCALL_BASE+ 78) +#define __NR_settimeofday (__NR_SYSCALL_BASE+ 79) +#define __NR_getgroups (__NR_SYSCALL_BASE+ 80) +#define __NR_setgroups (__NR_SYSCALL_BASE+ 81) +#define __NR_select (__NR_SYSCALL_BASE+ 82) +#define __NR_symlink (__NR_SYSCALL_BASE+ 83) + /* 84 was sys_lstat */ +#define __NR_readlink (__NR_SYSCALL_BASE+ 85) +#define __NR_uselib (__NR_SYSCALL_BASE+ 86) +#define __NR_swapon (__NR_SYSCALL_BASE+ 87) +#define __NR_reboot (__NR_SYSCALL_BASE+ 88) +#define __NR_readdir (__NR_SYSCALL_BASE+ 89) +#define __NR_mmap (__NR_SYSCALL_BASE+ 90) +#define __NR_munmap (__NR_SYSCALL_BASE+ 91) +#define __NR_truncate (__NR_SYSCALL_BASE+ 92) +#define __NR_ftruncate (__NR_SYSCALL_BASE+ 93) +#define __NR_fchmod (__NR_SYSCALL_BASE+ 94) +#define __NR_fchown (__NR_SYSCALL_BASE+ 95) +#define __NR_getpriority (__NR_SYSCALL_BASE+ 96) +#define __NR_setpriority (__NR_SYSCALL_BASE+ 97) + /* 98 was sys_profil */ +#define __NR_statfs (__NR_SYSCALL_BASE+ 99) +#define __NR_fstatfs (__NR_SYSCALL_BASE+100) + /* 101 was sys_ioperm */ +#define __NR_socketcall (__NR_SYSCALL_BASE+102) +#define __NR_syslog (__NR_SYSCALL_BASE+103) +#define __NR_setitimer (__NR_SYSCALL_BASE+104) +#define __NR_getitimer (__NR_SYSCALL_BASE+105) +#define __NR_stat (__NR_SYSCALL_BASE+106) +#define __NR_lstat (__NR_SYSCALL_BASE+107) +#define __NR_fstat (__NR_SYSCALL_BASE+108) + /* 109 was sys_uname */ + /* 110 was sys_iopl */ +#define __NR_vhangup (__NR_SYSCALL_BASE+111) + /* 112 was sys_idle */ +#define __NR_syscall (__NR_SYSCALL_BASE+113) /* syscall to call a syscall! */ +#define __NR_wait4 (__NR_SYSCALL_BASE+114) +#define __NR_swapoff (__NR_SYSCALL_BASE+115) +#define __NR_sysinfo (__NR_SYSCALL_BASE+116) +#define __NR_ipc (__NR_SYSCALL_BASE+117) +#define __NR_fsync (__NR_SYSCALL_BASE+118) +#define __NR_sigreturn (__NR_SYSCALL_BASE+119) +#define __NR_clone (__NR_SYSCALL_BASE+120) +#define __NR_setdomainname (__NR_SYSCALL_BASE+121) +#define __NR_uname (__NR_SYSCALL_BASE+122) + /* 123 was sys_modify_ldt */ +#define __NR_adjtimex (__NR_SYSCALL_BASE+124) +#define __NR_mprotect (__NR_SYSCALL_BASE+125) +#define __NR_sigprocmask (__NR_SYSCALL_BASE+126) + /* 127 was sys_create_module */ +#define __NR_init_module (__NR_SYSCALL_BASE+128) +#define __NR_delete_module (__NR_SYSCALL_BASE+129) + /* 130 was sys_get_kernel_syms */ +#define __NR_quotactl (__NR_SYSCALL_BASE+131) +#define __NR_getpgid (__NR_SYSCALL_BASE+132) +#define __NR_fchdir (__NR_SYSCALL_BASE+133) +#define __NR_bdflush (__NR_SYSCALL_BASE+134) +#define __NR_sysfs (__NR_SYSCALL_BASE+135) +#define __NR_personality (__NR_SYSCALL_BASE+136) + /* 137 was sys_afs_syscall */ +#define __NR_setfsuid (__NR_SYSCALL_BASE+138) +#define __NR_setfsgid (__NR_SYSCALL_BASE+139) +#define __NR__llseek (__NR_SYSCALL_BASE+140) +#define __NR_getdents (__NR_SYSCALL_BASE+141) +#define __NR__newselect (__NR_SYSCALL_BASE+142) +#define __NR_flock (__NR_SYSCALL_BASE+143) +#define __NR_msync (__NR_SYSCALL_BASE+144) +#define __NR_readv (__NR_SYSCALL_BASE+145) +#define __NR_writev (__NR_SYSCALL_BASE+146) +#define __NR_getsid (__NR_SYSCALL_BASE+147) +#define __NR_fdatasync (__NR_SYSCALL_BASE+148) +#define __NR__sysctl (__NR_SYSCALL_BASE+149) +#define __NR_mlock (__NR_SYSCALL_BASE+150) +#define __NR_munlock (__NR_SYSCALL_BASE+151) +#define __NR_mlockall (__NR_SYSCALL_BASE+152) +#define __NR_munlockall (__NR_SYSCALL_BASE+153) +#define __NR_sched_setparam (__NR_SYSCALL_BASE+154) +#define __NR_sched_getparam (__NR_SYSCALL_BASE+155) +#define __NR_sched_setscheduler (__NR_SYSCALL_BASE+156) +#define __NR_sched_getscheduler (__NR_SYSCALL_BASE+157) +#define __NR_sched_yield (__NR_SYSCALL_BASE+158) +#define __NR_sched_get_priority_max (__NR_SYSCALL_BASE+159) +#define __NR_sched_get_priority_min (__NR_SYSCALL_BASE+160) +#define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE+161) +#define __NR_nanosleep (__NR_SYSCALL_BASE+162) +#define __NR_mremap (__NR_SYSCALL_BASE+163) +#define __NR_setresuid (__NR_SYSCALL_BASE+164) +#define __NR_getresuid (__NR_SYSCALL_BASE+165) + /* 166 was sys_vm86 */ + /* 167 was sys_query_module */ +#define __NR_poll (__NR_SYSCALL_BASE+168) +#define __NR_nfsservctl (__NR_SYSCALL_BASE+169) +#define __NR_setresgid (__NR_SYSCALL_BASE+170) +#define __NR_getresgid (__NR_SYSCALL_BASE+171) +#define __NR_prctl (__NR_SYSCALL_BASE+172) +#define __NR_rt_sigreturn (__NR_SYSCALL_BASE+173) +#define __NR_rt_sigaction (__NR_SYSCALL_BASE+174) +#define __NR_rt_sigprocmask (__NR_SYSCALL_BASE+175) +#define __NR_rt_sigpending (__NR_SYSCALL_BASE+176) +#define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE+177) +#define __NR_rt_sigqueueinfo (__NR_SYSCALL_BASE+178) +#define __NR_rt_sigsuspend (__NR_SYSCALL_BASE+179) +#define __NR_pread64 (__NR_SYSCALL_BASE+180) +#define __NR_pwrite64 (__NR_SYSCALL_BASE+181) +#define __NR_chown (__NR_SYSCALL_BASE+182) +#define __NR_getcwd (__NR_SYSCALL_BASE+183) +#define __NR_capget (__NR_SYSCALL_BASE+184) +#define __NR_capset (__NR_SYSCALL_BASE+185) +#define __NR_sigaltstack (__NR_SYSCALL_BASE+186) +#define __NR_sendfile (__NR_SYSCALL_BASE+187) + /* 188 reserved */ + /* 189 reserved */ +#define __NR_vfork (__NR_SYSCALL_BASE+190) +#define __NR_ugetrlimit (__NR_SYSCALL_BASE+191) /* SuS compliant getrlimit */ +#define __NR_mmap2 (__NR_SYSCALL_BASE+192) +#define __NR_truncate64 (__NR_SYSCALL_BASE+193) +#define __NR_ftruncate64 (__NR_SYSCALL_BASE+194) +#define __NR_stat64 (__NR_SYSCALL_BASE+195) +#define __NR_lstat64 (__NR_SYSCALL_BASE+196) +#define __NR_fstat64 (__NR_SYSCALL_BASE+197) +#define __NR_lchown32 (__NR_SYSCALL_BASE+198) +#define __NR_getuid32 (__NR_SYSCALL_BASE+199) +#define __NR_getgid32 (__NR_SYSCALL_BASE+200) +#define __NR_geteuid32 (__NR_SYSCALL_BASE+201) +#define __NR_getegid32 (__NR_SYSCALL_BASE+202) +#define __NR_setreuid32 (__NR_SYSCALL_BASE+203) +#define __NR_setregid32 (__NR_SYSCALL_BASE+204) +#define __NR_getgroups32 (__NR_SYSCALL_BASE+205) +#define __NR_setgroups32 (__NR_SYSCALL_BASE+206) +#define __NR_fchown32 (__NR_SYSCALL_BASE+207) +#define __NR_setresuid32 (__NR_SYSCALL_BASE+208) +#define __NR_getresuid32 (__NR_SYSCALL_BASE+209) +#define __NR_setresgid32 (__NR_SYSCALL_BASE+210) +#define __NR_getresgid32 (__NR_SYSCALL_BASE+211) +#define __NR_chown32 (__NR_SYSCALL_BASE+212) +#define __NR_setuid32 (__NR_SYSCALL_BASE+213) +#define __NR_setgid32 (__NR_SYSCALL_BASE+214) +#define __NR_setfsuid32 (__NR_SYSCALL_BASE+215) +#define __NR_setfsgid32 (__NR_SYSCALL_BASE+216) +#define __NR_getdents64 (__NR_SYSCALL_BASE+217) +#define __NR_pivot_root (__NR_SYSCALL_BASE+218) +#define __NR_mincore (__NR_SYSCALL_BASE+219) +#define __NR_madvise (__NR_SYSCALL_BASE+220) +#define __NR_fcntl64 (__NR_SYSCALL_BASE+221) + /* 222 for tux */ + /* 223 is unused */ +#define __NR_gettid (__NR_SYSCALL_BASE+224) +#define __NR_readahead (__NR_SYSCALL_BASE+225) +#define __NR_setxattr (__NR_SYSCALL_BASE+226) +#define __NR_lsetxattr (__NR_SYSCALL_BASE+227) +#define __NR_fsetxattr (__NR_SYSCALL_BASE+228) +#define __NR_getxattr (__NR_SYSCALL_BASE+229) +#define __NR_lgetxattr (__NR_SYSCALL_BASE+230) +#define __NR_fgetxattr (__NR_SYSCALL_BASE+231) +#define __NR_listxattr (__NR_SYSCALL_BASE+232) +#define __NR_llistxattr (__NR_SYSCALL_BASE+233) +#define __NR_flistxattr (__NR_SYSCALL_BASE+234) +#define __NR_removexattr (__NR_SYSCALL_BASE+235) +#define __NR_lremovexattr (__NR_SYSCALL_BASE+236) +#define __NR_fremovexattr (__NR_SYSCALL_BASE+237) +#define __NR_tkill (__NR_SYSCALL_BASE+238) +#define __NR_sendfile64 (__NR_SYSCALL_BASE+239) +#define __NR_futex (__NR_SYSCALL_BASE+240) +#define __NR_sched_setaffinity (__NR_SYSCALL_BASE+241) +#define __NR_sched_getaffinity (__NR_SYSCALL_BASE+242) +#define __NR_io_setup (__NR_SYSCALL_BASE+243) +#define __NR_io_destroy (__NR_SYSCALL_BASE+244) +#define __NR_io_getevents (__NR_SYSCALL_BASE+245) +#define __NR_io_submit (__NR_SYSCALL_BASE+246) +#define __NR_io_cancel (__NR_SYSCALL_BASE+247) +#define __NR_exit_group (__NR_SYSCALL_BASE+248) +#define __NR_lookup_dcookie (__NR_SYSCALL_BASE+249) +#define __NR_epoll_create (__NR_SYSCALL_BASE+250) +#define __NR_epoll_ctl (__NR_SYSCALL_BASE+251) +#define __NR_epoll_wait (__NR_SYSCALL_BASE+252) +#define __NR_remap_file_pages (__NR_SYSCALL_BASE+253) + /* 254 for set_thread_area */ + /* 255 for get_thread_area */ +#define __NR_set_tid_address (__NR_SYSCALL_BASE+256) +#define __NR_timer_create (__NR_SYSCALL_BASE+257) +#define __NR_timer_settime (__NR_SYSCALL_BASE+258) +#define __NR_timer_gettime (__NR_SYSCALL_BASE+259) +#define __NR_timer_getoverrun (__NR_SYSCALL_BASE+260) +#define __NR_timer_delete (__NR_SYSCALL_BASE+261) +#define __NR_clock_settime (__NR_SYSCALL_BASE+262) +#define __NR_clock_gettime (__NR_SYSCALL_BASE+263) +#define __NR_clock_getres (__NR_SYSCALL_BASE+264) +#define __NR_clock_nanosleep (__NR_SYSCALL_BASE+265) +#define __NR_statfs64 (__NR_SYSCALL_BASE+266) +#define __NR_fstatfs64 (__NR_SYSCALL_BASE+267) +#define __NR_tgkill (__NR_SYSCALL_BASE+268) +#define __NR_utimes (__NR_SYSCALL_BASE+269) +#define __NR_arm_fadvise64_64 (__NR_SYSCALL_BASE+270) +#define __NR_pciconfig_iobase (__NR_SYSCALL_BASE+271) +#define __NR_pciconfig_read (__NR_SYSCALL_BASE+272) +#define __NR_pciconfig_write (__NR_SYSCALL_BASE+273) +#define __NR_mq_open (__NR_SYSCALL_BASE+274) +#define __NR_mq_unlink (__NR_SYSCALL_BASE+275) +#define __NR_mq_timedsend (__NR_SYSCALL_BASE+276) +#define __NR_mq_timedreceive (__NR_SYSCALL_BASE+277) +#define __NR_mq_notify (__NR_SYSCALL_BASE+278) +#define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279) +#define __NR_waitid (__NR_SYSCALL_BASE+280) +#define __NR_socket (__NR_SYSCALL_BASE+281) +#define __NR_bind (__NR_SYSCALL_BASE+282) +#define __NR_connect (__NR_SYSCALL_BASE+283) +#define __NR_listen (__NR_SYSCALL_BASE+284) +#define __NR_accept (__NR_SYSCALL_BASE+285) +#define __NR_getsockname (__NR_SYSCALL_BASE+286) +#define __NR_getpeername (__NR_SYSCALL_BASE+287) +#define __NR_socketpair (__NR_SYSCALL_BASE+288) +#define __NR_send (__NR_SYSCALL_BASE+289) +#define __NR_sendto (__NR_SYSCALL_BASE+290) +#define __NR_recv (__NR_SYSCALL_BASE+291) +#define __NR_recvfrom (__NR_SYSCALL_BASE+292) +#define __NR_shutdown (__NR_SYSCALL_BASE+293) +#define __NR_setsockopt (__NR_SYSCALL_BASE+294) +#define __NR_getsockopt (__NR_SYSCALL_BASE+295) +#define __NR_sendmsg (__NR_SYSCALL_BASE+296) +#define __NR_recvmsg (__NR_SYSCALL_BASE+297) +#define __NR_semop (__NR_SYSCALL_BASE+298) +#define __NR_semget (__NR_SYSCALL_BASE+299) +#define __NR_semctl (__NR_SYSCALL_BASE+300) +#define __NR_msgsnd (__NR_SYSCALL_BASE+301) +#define __NR_msgrcv (__NR_SYSCALL_BASE+302) +#define __NR_msgget (__NR_SYSCALL_BASE+303) +#define __NR_msgctl (__NR_SYSCALL_BASE+304) +#define __NR_shmat (__NR_SYSCALL_BASE+305) +#define __NR_shmdt (__NR_SYSCALL_BASE+306) +#define __NR_shmget (__NR_SYSCALL_BASE+307) +#define __NR_shmctl (__NR_SYSCALL_BASE+308) +#define __NR_add_key (__NR_SYSCALL_BASE+309) +#define __NR_request_key (__NR_SYSCALL_BASE+310) +#define __NR_keyctl (__NR_SYSCALL_BASE+311) +#define __NR_semtimedop (__NR_SYSCALL_BASE+312) +#define __NR_vserver (__NR_SYSCALL_BASE+313) +#define __NR_ioprio_set (__NR_SYSCALL_BASE+314) +#define __NR_ioprio_get (__NR_SYSCALL_BASE+315) +#define __NR_inotify_init (__NR_SYSCALL_BASE+316) +#define __NR_inotify_add_watch (__NR_SYSCALL_BASE+317) +#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE+318) +#define __NR_mbind (__NR_SYSCALL_BASE+319) +#define __NR_get_mempolicy (__NR_SYSCALL_BASE+320) +#define __NR_set_mempolicy (__NR_SYSCALL_BASE+321) +#define __NR_openat (__NR_SYSCALL_BASE+322) +#define __NR_mkdirat (__NR_SYSCALL_BASE+323) +#define __NR_mknodat (__NR_SYSCALL_BASE+324) +#define __NR_fchownat (__NR_SYSCALL_BASE+325) +#define __NR_futimesat (__NR_SYSCALL_BASE+326) +#define __NR_fstatat64 (__NR_SYSCALL_BASE+327) +#define __NR_unlinkat (__NR_SYSCALL_BASE+328) +#define __NR_renameat (__NR_SYSCALL_BASE+329) +#define __NR_linkat (__NR_SYSCALL_BASE+330) +#define __NR_symlinkat (__NR_SYSCALL_BASE+331) +#define __NR_readlinkat (__NR_SYSCALL_BASE+332) +#define __NR_fchmodat (__NR_SYSCALL_BASE+333) +#define __NR_faccessat (__NR_SYSCALL_BASE+334) + /* 335 for pselect6 */ + /* 336 for ppoll */ +#define __NR_unshare (__NR_SYSCALL_BASE+337) +#define __NR_set_robust_list (__NR_SYSCALL_BASE+338) +#define __NR_get_robust_list (__NR_SYSCALL_BASE+339) +#define __NR_splice (__NR_SYSCALL_BASE+340) +#define __NR_arm_sync_file_range (__NR_SYSCALL_BASE+341) +#define __NR_sync_file_range2 __NR_arm_sync_file_range +#define __NR_tee (__NR_SYSCALL_BASE+342) +#define __NR_vmsplice (__NR_SYSCALL_BASE+343) +#define __NR_move_pages (__NR_SYSCALL_BASE+344) +#define __NR_getcpu (__NR_SYSCALL_BASE+345) + /* 346 for epoll_pwait */ +#define __NR_kexec_load (__NR_SYSCALL_BASE+347) +#define __NR_utimensat (__NR_SYSCALL_BASE+348) +#define __NR_signalfd (__NR_SYSCALL_BASE+349) +#define __NR_timerfd_create (__NR_SYSCALL_BASE+350) +#define __NR_eventfd (__NR_SYSCALL_BASE+351) +#define __NR_fallocate (__NR_SYSCALL_BASE+352) +#define __NR_timerfd_settime (__NR_SYSCALL_BASE+353) +#define __NR_timerfd_gettime (__NR_SYSCALL_BASE+354) + +/* + * The following SWIs are ARM private. + */ +#define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000) +#define __ARM_NR_breakpoint (__ARM_NR_BASE+1) +#define __ARM_NR_cacheflush (__ARM_NR_BASE+2) +#define __ARM_NR_usr26 (__ARM_NR_BASE+3) +#define __ARM_NR_usr32 (__ARM_NR_BASE+4) +#define __ARM_NR_set_tls (__ARM_NR_BASE+5) + +/* + * The following syscalls are obsolete and no longer available for EABI. + */ +#if defined(__ARM_EABI__) && !defined(__KERNEL__) +#undef __NR_time +#undef __NR_umount +#undef __NR_stime +#undef __NR_alarm +#undef __NR_utime +#undef __NR_getrlimit +#undef __NR_select +#undef __NR_readdir +#undef __NR_mmap +#undef __NR_socketcall +#undef __NR_syscall +#undef __NR_ipc +#endif + +#ifdef __KERNEL__ + +#define __ARCH_WANT_IPC_PARSE_VERSION +#define __ARCH_WANT_STAT64 +#define __ARCH_WANT_SYS_GETHOSTNAME +#define __ARCH_WANT_SYS_PAUSE +#define __ARCH_WANT_SYS_GETPGRP +#define __ARCH_WANT_SYS_LLSEEK +#define __ARCH_WANT_SYS_NICE +#define __ARCH_WANT_SYS_SIGPENDING +#define __ARCH_WANT_SYS_SIGPROCMASK +#define __ARCH_WANT_SYS_RT_SIGACTION + +#if !defined(CONFIG_AEABI) || defined(CONFIG_OABI_COMPAT) +#define __ARCH_WANT_SYS_TIME +#define __ARCH_WANT_SYS_OLDUMOUNT +#define __ARCH_WANT_SYS_ALARM +#define __ARCH_WANT_SYS_UTIME +#define __ARCH_WANT_SYS_OLD_GETRLIMIT +#define __ARCH_WANT_OLD_READDIR +#define __ARCH_WANT_SYS_SOCKETCALL +#endif + +/* + * "Conditional" syscalls + * + * What we want is __attribute__((weak,alias("sys_ni_syscall"))), + * but it doesn't work on all toolchains, so we just do it by hand + */ +#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") + +/* + * Unimplemented (or alternatively implemented) syscalls + */ +#define __IGNORE_fadvise64_64 1 + +#endif /* __KERNEL__ */ +#endif /* __ASM_ARM_UNISTD_H */ diff --git a/trunk/include/asm-arm/user.h b/trunk/arch/arm/include/asm/user.h similarity index 100% rename from trunk/include/asm-arm/user.h rename to trunk/arch/arm/include/asm/user.h diff --git a/trunk/include/asm-arm/vfp.h b/trunk/arch/arm/include/asm/vfp.h similarity index 98% rename from trunk/include/asm-arm/vfp.h rename to trunk/arch/arm/include/asm/vfp.h index 5f9a2cb3d452..f4ab34fd4f72 100644 --- a/trunk/include/asm-arm/vfp.h +++ b/trunk/arch/arm/include/asm/vfp.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/vfp.h + * arch/arm/include/asm/vfp.h * * VFP register definitions. * First, the standard VFP set. diff --git a/trunk/include/asm-arm/vfpmacros.h b/trunk/arch/arm/include/asm/vfpmacros.h similarity index 97% rename from trunk/include/asm-arm/vfpmacros.h rename to trunk/arch/arm/include/asm/vfpmacros.h index cccb3892e73c..422f3cc204a2 100644 --- a/trunk/include/asm-arm/vfpmacros.h +++ b/trunk/arch/arm/include/asm/vfpmacros.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/vfpmacros.h + * arch/arm/include/asm/vfpmacros.h * * Assembler-only file containing VFP macros and register definitions. */ diff --git a/trunk/include/asm-arm/vga.h b/trunk/arch/arm/include/asm/vga.h similarity index 89% rename from trunk/include/asm-arm/vga.h rename to trunk/arch/arm/include/asm/vga.h index 1e0b913c3d71..6a3cd2a2f670 100644 --- a/trunk/include/asm-arm/vga.h +++ b/trunk/arch/arm/include/asm/vga.h @@ -1,7 +1,7 @@ #ifndef ASMARM_VGA_H #define ASMARM_VGA_H -#include +#include #include #define VGA_MAP_MEM(x,s) (PCIMEM_BASE + (x)) diff --git a/trunk/include/asm-arm/xor.h b/trunk/arch/arm/include/asm/xor.h similarity index 99% rename from trunk/include/asm-arm/xor.h rename to trunk/arch/arm/include/asm/xor.h index e7c4cf58bed1..7604673dc427 100644 --- a/trunk/include/asm-arm/xor.h +++ b/trunk/arch/arm/include/asm/xor.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/xor.h + * arch/arm/include/asm/xor.h * * Copyright (C) 2001 Russell King * diff --git a/trunk/arch/arm/kernel/crunch-bits.S b/trunk/arch/arm/kernel/crunch-bits.S index a26886758c67..0ec9bb48fab9 100644 --- a/trunk/arch/arm/kernel/crunch-bits.S +++ b/trunk/arch/arm/kernel/crunch-bits.S @@ -16,7 +16,7 @@ #include #include #include -#include +#include /* * We can't use hex constants here due to a bug in gas. diff --git a/trunk/arch/arm/kernel/crunch.c b/trunk/arch/arm/kernel/crunch.c index 627d79414c9d..3b6a1c293ee4 100644 --- a/trunk/arch/arm/kernel/crunch.c +++ b/trunk/arch/arm/kernel/crunch.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include diff --git a/trunk/arch/arm/kernel/debug.S b/trunk/arch/arm/kernel/debug.S index 5617566477b4..9550ff0ddde4 100644 --- a/trunk/arch/arm/kernel/debug.S +++ b/trunk/arch/arm/kernel/debug.S @@ -80,7 +80,7 @@ #endif /* CONFIG_CPU_V6 */ #else -#include +#include #endif /* CONFIG_DEBUG_ICEDCC */ /* diff --git a/trunk/arch/arm/kernel/ecard.c b/trunk/arch/arm/kernel/ecard.c index f5cfdabcb87d..7a50575a8d4d 100644 --- a/trunk/arch/arm/kernel/ecard.c +++ b/trunk/arch/arm/kernel/ecard.c @@ -46,7 +46,7 @@ #include #include -#include +#include #include #include #include diff --git a/trunk/arch/arm/kernel/entry-armv.S b/trunk/arch/arm/kernel/entry-armv.S index 7dca225752c1..617e509d60df 100644 --- a/trunk/arch/arm/kernel/entry-armv.S +++ b/trunk/arch/arm/kernel/entry-armv.S @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include "entry-header.S" diff --git a/trunk/arch/arm/kernel/entry-common.S b/trunk/arch/arm/kernel/entry-common.S index 84694e88b428..060d7e2e9f64 100644 --- a/trunk/arch/arm/kernel/entry-common.S +++ b/trunk/arch/arm/kernel/entry-common.S @@ -10,7 +10,7 @@ #include #include -#include +#include #include "entry-header.S" diff --git a/trunk/arch/arm/kernel/head-common.S b/trunk/arch/arm/kernel/head-common.S index 7e9c00a8a412..1c3c6ea5f9e7 100644 --- a/trunk/arch/arm/kernel/head-common.S +++ b/trunk/arch/arm/kernel/head-common.S @@ -181,7 +181,7 @@ ENTRY(lookup_processor_type) ldmfd sp!, {r4 - r7, r9, pc} /* - * Look in include/asm-arm/procinfo.h and arch/arm/kernel/arch.[ch] for + * Look in and arch/arm/kernel/arch.[ch] for * more information about the __proc_info and __arch_info structures. */ .long __proc_info_begin diff --git a/trunk/arch/arm/kernel/head-nommu.S b/trunk/arch/arm/kernel/head-nommu.S index 5d78ffb8a9a7..27329bd32037 100644 --- a/trunk/arch/arm/kernel/head-nommu.S +++ b/trunk/arch/arm/kernel/head-nommu.S @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/arm/kernel/irq.c b/trunk/arch/arm/kernel/irq.c index 11dcd52e51be..f88efb135b70 100644 --- a/trunk/arch/arm/kernel/irq.c +++ b/trunk/arch/arm/kernel/irq.c @@ -38,6 +38,7 @@ #include #include +#include #include /* diff --git a/trunk/arch/arm/kernel/machine_kexec.c b/trunk/arch/arm/kernel/machine_kexec.c index db8f54a3451f..fae5beb3c3d6 100644 --- a/trunk/arch/arm/kernel/machine_kexec.c +++ b/trunk/arch/arm/kernel/machine_kexec.c @@ -71,7 +71,7 @@ void machine_kexec(struct kimage *image) flush_icache_range((unsigned long) reboot_code_buffer, - (unsigned long) reboot_code_buffer + KEXEC_CONTROL_CODE_SIZE); + (unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE); printk(KERN_INFO "Bye!\n"); cpu_proc_fin(); diff --git a/trunk/arch/arm/kernel/process.c b/trunk/arch/arm/kernel/process.c index 89bfded70a1f..3fd882337064 100644 --- a/trunk/arch/arm/kernel/process.c +++ b/trunk/arch/arm/kernel/process.c @@ -51,7 +51,7 @@ extern void setup_mm_for_reboot(char mode); static volatile int hlt_counter; -#include +#include void disable_hlt(void) { diff --git a/trunk/arch/arm/kernel/smp.c b/trunk/arch/arm/kernel/smp.c index 5a7c09564d13..e9842f6767f9 100644 --- a/trunk/arch/arm/kernel/smp.c +++ b/trunk/arch/arm/kernel/smp.c @@ -100,7 +100,7 @@ int __cpuinit __cpu_up(unsigned int cpu) * a 1:1 mapping for the physical address of the kernel. */ pgd = pgd_alloc(&init_mm); - pmd = pmd_offset(pgd, PHYS_OFFSET); + pmd = pmd_offset(pgd + pgd_index(PHYS_OFFSET), PHYS_OFFSET); *pmd = __pmd((PHYS_OFFSET & PGDIR_MASK) | PMD_TYPE_SECT | PMD_SECT_AP_WRITE); @@ -139,7 +139,7 @@ int __cpuinit __cpu_up(unsigned int cpu) secondary_data.stack = NULL; secondary_data.pgdir = 0; - *pmd_offset(pgd, PHYS_OFFSET) = __pmd(0); + *pmd = __pmd(0); pgd_free(&init_mm, pgd); if (ret) { diff --git a/trunk/arch/arm/lib/ecard.S b/trunk/arch/arm/lib/ecard.S index c55aaa2a2088..8678eb2b7a60 100644 --- a/trunk/arch/arm/lib/ecard.S +++ b/trunk/arch/arm/lib/ecard.S @@ -12,7 +12,7 @@ */ #include #include -#include +#include #define CPSR2SPSR(rt) \ mrs rt, cpsr; \ diff --git a/trunk/arch/arm/lib/getuser.S b/trunk/arch/arm/lib/getuser.S index 1dd8ea4f9a9c..2034d4dbe6ad 100644 --- a/trunk/arch/arm/lib/getuser.S +++ b/trunk/arch/arm/lib/getuser.S @@ -20,7 +20,7 @@ * r2, r3 contains the zero-extended value * lr corrupted * - * No other registers must be altered. (see include/asm-arm/uaccess.h + * No other registers must be altered. (see * for specific ASM register usage). * * Note that ADDR_LIMIT is either 0 or 0xc0000000. diff --git a/trunk/arch/arm/lib/io-readsw-armv3.S b/trunk/arch/arm/lib/io-readsw-armv3.S index 4ef904185142..9aaf7c72065d 100644 --- a/trunk/arch/arm/lib/io-readsw-armv3.S +++ b/trunk/arch/arm/lib/io-readsw-armv3.S @@ -9,7 +9,7 @@ */ #include #include -#include +#include .Linsw_bad_alignment: adr r0, .Linsw_bad_align_msg diff --git a/trunk/arch/arm/lib/io-writesw-armv3.S b/trunk/arch/arm/lib/io-writesw-armv3.S index 1607a29f49b7..cd34503e424d 100644 --- a/trunk/arch/arm/lib/io-writesw-armv3.S +++ b/trunk/arch/arm/lib/io-writesw-armv3.S @@ -9,7 +9,7 @@ */ #include #include -#include +#include .Loutsw_bad_alignment: adr r0, .Loutsw_bad_align_msg diff --git a/trunk/arch/arm/lib/putuser.S b/trunk/arch/arm/lib/putuser.S index 8620afe54f72..08ec7dffa52e 100644 --- a/trunk/arch/arm/lib/putuser.S +++ b/trunk/arch/arm/lib/putuser.S @@ -20,7 +20,7 @@ * Outputs: r0 is the error code * lr corrupted * - * No other registers must be altered. (see include/asm-arm/uaccess.h + * No other registers must be altered. (see * for specific ASM register usage). * * Note that ADDR_LIMIT is either 0 or 0xc0000000 diff --git a/trunk/arch/arm/mach-aaec2000/aaed2000.c b/trunk/arch/arm/mach-aaec2000/aaed2000.c index 83f57da3184c..81a3ecc0d104 100644 --- a/trunk/arch/arm/mach-aaec2000/aaed2000.c +++ b/trunk/arch/arm/mach-aaec2000/aaed2000.c @@ -20,14 +20,14 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include "core.h" diff --git a/trunk/arch/arm/mach-aaec2000/core.c b/trunk/arch/arm/mach-aaec2000/core.c index b016be2b0e35..dfb26bc23d1a 100644 --- a/trunk/arch/arm/mach-aaec2000/core.c +++ b/trunk/arch/arm/mach-aaec2000/core.c @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/trunk/include/asm-arm/arch-aaec2000/aaec2000.h b/trunk/arch/arm/mach-aaec2000/include/mach/aaec2000.h similarity index 99% rename from trunk/include/asm-arm/arch-aaec2000/aaec2000.h rename to trunk/arch/arm/mach-aaec2000/include/mach/aaec2000.h index a6d1ee0980f2..bc729c42f843 100644 --- a/trunk/include/asm-arm/arch-aaec2000/aaec2000.h +++ b/trunk/arch/arm/mach-aaec2000/include/mach/aaec2000.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/arch-aaec2000/aaec2000.h + * arch/arm/mach-aaec2000/include/mach/aaec2000.h * * AAEC-2000 registers definition * diff --git a/trunk/include/asm-arm/arch-aaec2000/aaed2000.h b/trunk/arch/arm/mach-aaec2000/include/mach/aaed2000.h similarity index 96% rename from trunk/include/asm-arm/arch-aaec2000/aaed2000.h rename to trunk/arch/arm/mach-aaec2000/include/mach/aaed2000.h index bc76d2badb91..f821295ca71b 100644 --- a/trunk/include/asm-arm/arch-aaec2000/aaed2000.h +++ b/trunk/arch/arm/mach-aaec2000/include/mach/aaed2000.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/arch-aaec2000/aaed2000.h + * arch/arm/mach-aaec2000/include/mach/aaed2000.h * * AAED-2000 specific bits definition * diff --git a/trunk/arch/arm/mach-aaec2000/include/mach/debug-macro.S b/trunk/arch/arm/mach-aaec2000/include/mach/debug-macro.S new file mode 100644 index 000000000000..0b6351d7c389 --- /dev/null +++ b/trunk/arch/arm/mach-aaec2000/include/mach/debug-macro.S @@ -0,0 +1,37 @@ +/* arch/arm/mach-aaec2000/include/mach/debug-macro.S + * + * Debugging macro include header + * + * Copyright (c) 2005 Nicolas Bellido Y Ortega + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include "hardware.h" + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + moveq \rx, #0x80000000 @ physical + movne \rx, #io_p2v(0x80000000) @ virtual + orr \rx, \rx, #0x00000800 + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #0] + .endm + + .macro busyuart,rd,rx +1002: ldr \rd, [\rx, #0x10] + tst \rd, #(1 << 7) + beq 1002b + .endm + + .macro waituart,rd,rx +#if 0 +1001: ldr \rd, [\rx, #0x10] + tst \rd, #(1 << 5) + beq 1001b +#endif + .endm diff --git a/trunk/arch/arm/mach-aaec2000/include/mach/dma.h b/trunk/arch/arm/mach-aaec2000/include/mach/dma.h new file mode 100644 index 000000000000..2da846c72fe7 --- /dev/null +++ b/trunk/arch/arm/mach-aaec2000/include/mach/dma.h @@ -0,0 +1,9 @@ +/* + * arch/arm/mach-aaec2000/include/mach/dma.h + * + * Copyright (c) 2005 Nicolas Bellido Y Ortega + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ diff --git a/trunk/arch/arm/mach-aaec2000/include/mach/entry-macro.S b/trunk/arch/arm/mach-aaec2000/include/mach/entry-macro.S new file mode 100644 index 000000000000..c8fb34469007 --- /dev/null +++ b/trunk/arch/arm/mach-aaec2000/include/mach/entry-macro.S @@ -0,0 +1,40 @@ +/* + * arch/arm/mach-aaec2000/include/mach/entry-macro.S + * + * Low-level IRQ helper for aaec-2000 based platforms + * + * Copyright (c) 2005 Nicolas Bellido Y Ortega + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ +#include + + .macro disable_fiq + .endm + + .macro get_irqnr_preamble, base, tmp + .endm + + .macro arch_ret_to_user, tmp1, tmp2 + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + mov r4, #0xf8000000 + add r4, r4, #0x00000500 + mov \base, r4 + ldr \irqstat, [\base, #0] + cmp \irqstat, #0 + bne 1001f + ldr \irqnr, =NR_IRQS+1 + b 1003f +1001: mov \irqnr, #0 +1002: ands \tmp, \irqstat, #1 + mov \irqstat, \irqstat, LSR #1 + add \irqnr, \irqnr, #1 + beq 1002b + sub \irqnr, \irqnr, #1 +1003: + .endm diff --git a/trunk/arch/arm/mach-aaec2000/include/mach/hardware.h b/trunk/arch/arm/mach-aaec2000/include/mach/hardware.h new file mode 100644 index 000000000000..965a6f6672d6 --- /dev/null +++ b/trunk/arch/arm/mach-aaec2000/include/mach/hardware.h @@ -0,0 +1,50 @@ +/* + * arch/arm/mach-aaec2000/include/mach/hardware.h + * + * Copyright (c) 2005 Nicolas Bellido Y Ortega + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ASM_ARCH_HARDWARE_H +#define __ASM_ARCH_HARDWARE_H + +#include +#include + +/* The kernel is loaded at physical address 0xf8000000. + * We map the IO space a bit after + */ +#define PIO_APB_BASE 0x80000000 +#define VIO_APB_BASE 0xf8000000 +#define IO_APB_LENGTH 0x2000 +#define PIO_AHB_BASE 0x80002000 +#define VIO_AHB_BASE 0xf8002000 +#define IO_AHB_LENGTH 0x2000 + +#define VIO_BASE VIO_APB_BASE +#define PIO_BASE PIO_APB_BASE + +#define io_p2v(x) ( (x) - PIO_BASE + VIO_BASE ) +#define io_v2p(x) ( (x) + PIO_BASE - VIO_BASE ) + +#ifndef __ASSEMBLY__ + +#include + +/* FIXME: Is it needed to optimize this a la pxa ?? */ +#define __REG(x) (*((volatile u32 *)io_p2v(x))) +#define __PREG(x) (io_v2p((u32)&(x))) + +#else /* __ASSEMBLY__ */ + +#define __REG(x) io_p2v(x) +#define __PREG(x) io_v2p(x) + +#endif + +#include "aaec2000.h" + +#endif /* __ASM_ARCH_HARDWARE_H */ diff --git a/trunk/arch/arm/mach-aaec2000/include/mach/io.h b/trunk/arch/arm/mach-aaec2000/include/mach/io.h new file mode 100644 index 000000000000..c87c24de1110 --- /dev/null +++ b/trunk/arch/arm/mach-aaec2000/include/mach/io.h @@ -0,0 +1,20 @@ +/* + * arch/arm/mach-aaec2000/include/mach/io.h + * + * Copied from asm/arch/sa1100/io.h + */ +#ifndef __ASM_ARM_ARCH_IO_H +#define __ASM_ARM_ARCH_IO_H + +#include + +#define IO_SPACE_LIMIT 0xffffffff + +/* + * We don't actually have real ISA nor PCI buses, but there is so many + * drivers out there that might just work if we fake them... + */ +#define __io(a) ((void __iomem *)(a)) +#define __mem_pci(a) (a) + +#endif diff --git a/trunk/arch/arm/mach-aaec2000/include/mach/irqs.h b/trunk/arch/arm/mach-aaec2000/include/mach/irqs.h new file mode 100644 index 000000000000..bf45c6d2f294 --- /dev/null +++ b/trunk/arch/arm/mach-aaec2000/include/mach/irqs.h @@ -0,0 +1,46 @@ +/* + * arch/arm/mach-aaec2000/include/mach/irqs.h + * + * Copyright (c) 2005 Nicolas Bellido Y Ortega + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ASM_ARCH_IRQS_H +#define __ASM_ARCH_IRQS_H + + +#define INT_GPIOF0_FIQ 0 /* External GPIO Port F O Fast Interrupt Input */ +#define INT_BL_FIQ 1 /* Battery Low Fast Interrupt */ +#define INT_WE_FIQ 2 /* Watchdog Expired Fast Interrupt */ +#define INT_MV_FIQ 3 /* Media Changed Interrupt */ +#define INT_SC 4 /* Sound Codec Interrupt */ +#define INT_GPIO1 5 /* GPIO Port F Configurable Int 1 */ +#define INT_GPIO2 6 /* GPIO Port F Configurable Int 2 */ +#define INT_GPIO3 7 /* GPIO Port F Configurable Int 3 */ +#define INT_TMR1_OFL 8 /* Timer 1 Overflow Interrupt */ +#define INT_TMR2_OFL 9 /* Timer 2 Overflow Interrupt */ +#define INT_RTC_CM 10 /* RTC Compare Match Interrupt */ +#define INT_TICK 11 /* 64Hz Tick Interrupt */ +#define INT_UART1 12 /* UART1 Interrupt */ +#define INT_UART2 13 /* UART2 & Modem State Changed Interrupt */ +#define INT_LCD 14 /* LCD Interrupt */ +#define INT_SSI 15 /* SSI End of Transfer Interrupt */ +#define INT_UART3 16 /* UART3 Interrupt */ +#define INT_SCI 17 /* SCI Interrupt */ +#define INT_AAC 18 /* Advanced Audio Codec Interrupt */ +#define INT_MMC 19 /* MMC Interrupt */ +#define INT_USB 20 /* USB Interrupt */ +#define INT_DMA 21 /* DMA Interrupt */ +#define INT_TMR3_UOFL 22 /* Timer 3 Underflow Interrupt */ +#define INT_GPIO4 23 /* GPIO Port F Configurable Int 4 */ +#define INT_GPIO5 24 /* GPIO Port F Configurable Int 4 */ +#define INT_GPIO6 25 /* GPIO Port F Configurable Int 4 */ +#define INT_GPIO7 26 /* GPIO Port F Configurable Int 4 */ +#define INT_BMI 27 /* BMI Interrupt */ + +#define NR_IRQS (INT_BMI + 1) + +#endif /* __ASM_ARCH_IRQS_H */ diff --git a/trunk/arch/arm/mach-aaec2000/include/mach/memory.h b/trunk/arch/arm/mach-aaec2000/include/mach/memory.h new file mode 100644 index 000000000000..56ae900a482e --- /dev/null +++ b/trunk/arch/arm/mach-aaec2000/include/mach/memory.h @@ -0,0 +1,30 @@ +/* + * arch/arm/mach-aaec2000/include/mach/memory.h + * + * Copyright (c) 2005 Nicolas Bellido Y Ortega + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ASM_ARCH_MEMORY_H +#define __ASM_ARCH_MEMORY_H + + +#define PHYS_OFFSET UL(0xf0000000) + +#define __virt_to_bus(x) __virt_to_phys(x) +#define __bus_to_virt(x) __phys_to_virt(x) + +/* + * The nodes are the followings: + * + * node 0: 0xf000.0000 - 0xf3ff.ffff + * node 1: 0xf400.0000 - 0xf7ff.ffff + * node 2: 0xf800.0000 - 0xfbff.ffff + * node 3: 0xfc00.0000 - 0xffff.ffff + */ +#define NODE_MEM_SIZE_BITS 26 + +#endif /* __ASM_ARCH_MEMORY_H */ diff --git a/trunk/arch/arm/mach-aaec2000/include/mach/system.h b/trunk/arch/arm/mach-aaec2000/include/mach/system.h new file mode 100644 index 000000000000..8f4115d734ce --- /dev/null +++ b/trunk/arch/arm/mach-aaec2000/include/mach/system.h @@ -0,0 +1,24 @@ +/* + * arch/arm/mach-aaed2000/include/mach/system.h + * + * Copyright (c) 2005 Nicolas Bellido Y Ortega + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ASM_ARCH_SYSTEM_H +#define __ASM_ARCH_SYSTEM_H + +static inline void arch_idle(void) +{ + cpu_do_idle(); +} + +static inline void arch_reset(char mode) +{ + cpu_reset(0); +} + +#endif /* __ASM_ARCH_SYSTEM_H */ diff --git a/trunk/arch/arm/mach-aaec2000/include/mach/timex.h b/trunk/arch/arm/mach-aaec2000/include/mach/timex.h new file mode 100644 index 000000000000..6c8edf4a8828 --- /dev/null +++ b/trunk/arch/arm/mach-aaec2000/include/mach/timex.h @@ -0,0 +1,18 @@ +/* + * arch/arm/mach-aaec2000/include/mach/timex.h + * + * AAEC-2000 Architecture timex specification + * + * Copyright (c) 2005 Nicolas Bellido Y Ortega + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ASM_ARCH_TIMEX_H +#define __ASM_ARCH_TIMEX_H + +#define CLOCK_TICK_RATE 508000 + +#endif /* __ASM_ARCH_TIMEX_H */ diff --git a/trunk/arch/arm/mach-aaec2000/include/mach/uncompress.h b/trunk/arch/arm/mach-aaec2000/include/mach/uncompress.h new file mode 100644 index 000000000000..381ecad1a1bb --- /dev/null +++ b/trunk/arch/arm/mach-aaec2000/include/mach/uncompress.h @@ -0,0 +1,46 @@ +/* + * arch/arm/mach-aaec2000/include/mach/uncompress.h + * + * Copyright (c) 2005 Nicolas Bellido Y Ortega + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ASM_ARCH_UNCOMPRESS_H +#define __ASM_ARCH_UNCOMPRESS_H + +#include "hardware.h" + +#define UART(x) (*(volatile unsigned long *)(serial_port + (x))) + +static void putc(int c) +{ + unsigned long serial_port; + do { + serial_port = _UART3_BASE; + if (UART(UART_CR) & UART_CR_EN) break; + serial_port = _UART1_BASE; + if (UART(UART_CR) & UART_CR_EN) break; + serial_port = _UART2_BASE; + if (UART(UART_CR) & UART_CR_EN) break; + return; + } while (0); + + /* wait for space in the UART's transmitter */ + while ((UART(UART_SR) & UART_SR_TxFF)) + barrier(); + + /* send the character out. */ + UART(UART_DR) = c; +} + +static inline void flush(void) +{ +} + +#define arch_decomp_setup() +#define arch_decomp_wdog() + +#endif /* __ASM_ARCH_UNCOMPRESS_H */ diff --git a/trunk/arch/arm/mach-aaec2000/include/mach/vmalloc.h b/trunk/arch/arm/mach-aaec2000/include/mach/vmalloc.h new file mode 100644 index 000000000000..551f68f666bf --- /dev/null +++ b/trunk/arch/arm/mach-aaec2000/include/mach/vmalloc.h @@ -0,0 +1,16 @@ +/* + * arch/arm/mach-aaec2000/include/mach/vmalloc.h + * + * Copyright (c) 2005 Nicolas Bellido Y Ortega + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ASM_ARCH_VMALLOC_H +#define __ASM_ARCH_VMALLOC_H + +#define VMALLOC_END (PAGE_OFFSET + 0x10000000) + +#endif /* __ASM_ARCH_VMALLOC_H */ diff --git a/trunk/arch/arm/mach-at91/at91cap9.c b/trunk/arch/arm/mach-at91/at91cap9.c index 933fa8f55cbc..638948c16770 100644 --- a/trunk/arch/arm/mach-at91/at91cap9.c +++ b/trunk/arch/arm/mach-at91/at91cap9.c @@ -17,10 +17,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "generic.h" #include "clock.h" diff --git a/trunk/arch/arm/mach-at91/at91cap9_devices.c b/trunk/arch/arm/mach-at91/at91cap9_devices.c index 25765f1afca9..abb4aac8fa98 100644 --- a/trunk/arch/arm/mach-at91/at91cap9_devices.c +++ b/trunk/arch/arm/mach-at91/at91cap9_devices.c @@ -20,11 +20,11 @@ #include