1 diff -ruN linux-2.6.28.10_o/arch/ubicom32/configs/IP5160EVAL_defconfig linux-2.6.28.10/arch/ubicom32/configs/IP5160EVAL_defconfig
2 --- linux-2.6.28.10_o/arch/ubicom32/configs/IP5160EVAL_defconfig 1970-01-01 02:00:00.000000000 +0200
3 +++ linux-2.6.28.10/arch/ubicom32/configs/IP5160EVAL_defconfig 2009-08-12 13:08:37.000000000 +0300
6 +# Automatically generated make config: don't edit
7 +# Linux kernel version: 2.6.28.10
9 +CONFIG_RAMBASE=0x40000000
12 +CONFIG_CPU_BIG_ENDIAN=y
13 +CONFIG_FORCE_MAX_ZONEORDER=14
15 +# CONFIG_MMU is not set
16 +# CONFIG_FPU is not set
18 +CONFIG_RWSEM_GENERIC_SPINLOCK=y
19 +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
20 +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
21 +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
22 +CONFIG_GENERIC_FIND_NEXT_BIT=y
23 +CONFIG_GENERIC_GPIO=y
25 +CONFIG_GENERIC_HWEIGHT=y
26 +CONFIG_GENERIC_HARDIRQS=y
27 +CONFIG_STACKTRACE_SUPPORT=y
28 +CONFIG_LOCKDEP_SUPPORT=y
29 +CONFIG_GENERIC_CALIBRATE_DELAY=y
30 +CONFIG_GENERIC_TIME=y
31 +CONFIG_TIME_LOW_RES=y
32 +CONFIG_GENERIC_CLOCKEVENTS=y
34 +CONFIG_ARCH_SUPPORTS_AOUT=y
36 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
39 +# Processor type and features
44 +# Processor type will be selected by Board
51 +# CONFIG_NOBOARD is not set
52 +# CONFIG_IP5170DPF is not set
53 +# CONFIG_IP5160DEV is not set
55 +# CONFIG_IP7145DPF is not set
56 +# CONFIG_IP7160RGW is not set
57 +# CONFIG_IP7160BRINGUP is not set
58 +# CONFIG_IP7160DPF is not set
59 +# CONFIG_IP7500MODULE is not set
60 +# CONFIG_IP7500AV is not set
61 +# CONFIG_IP7500MEDIA is not set
66 +# CONFIG_SMP is not set
67 +CONFIG_TIMER_EXTRA_ALLOC=0
68 +# CONFIG_IRQSTACKS is not set
69 +CONFIG_UBICOM32_OCM_MODULES=y
70 +CONFIG_OCM_MODULES_RESERVATION=41
71 +CONFIG_OCM_MODULES_MAY_CONSUME_REMAINING_CODESPACE=y
77 +CONFIG_RAMSIZE=0x02000000
78 +CONFIG_KERNELBASE=0x40400000
83 +CONFIG_LINKER_RELAXATION=y
92 +# CONFIG_PCI is not set
93 +# CONFIG_ARCH_SUPPORTS_MSI is not set
98 +# CONFIG_UBICOM_INPUT is not set
99 +# CONFIG_UBICOM_INPUT_I2C is not set
100 +CONFIG_UBICOM_SWITCH=y
105 +# CONFIG_UBICOM_HID is not set
106 +CONFIG_CMDLINE_BOOL=y
107 +CONFIG_CMDLINE="console=ttyUM0"
108 +# CONFIG_CMDLINE_OVERRIDE is not set
113 +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
114 +CONFIG_PROTECT_KERNEL=y
115 +# CONFIG_NO_KERNEL_MSG is not set
116 +# CONFIG_EARLY_PRINTK is not set
117 +# CONFIG_STOP_ON_TRAP is not set
118 +# CONFIG_STOP_ON_BUG is not set
119 +# CONFIG_DEBUG_IRQMEASURE is not set
120 +# CONFIG_DEBUG_PCIMEASURE is not set
121 +# CONFIG_ACCESS_OK_CHECKS_ENABLED is not set
122 +CONFIG_UNALIGNED_ACCESS_ENABLED=y
123 +# CONFIG_UNALIGNED_ACCESS_USERSPACE_ONLY is not set
124 +# CONFIG_UNALIGNED_ACCESS_DISABLED is not set
125 +# CONFIG_DEBUG_STACKOVERFLOW is not set
126 +# CONFIG_DEBUG_STACK_USAGE is not set
127 +# CONFIG_PRINTK_TIME is not set
128 +CONFIG_ENABLE_WARN_DEPRECATED=y
129 +CONFIG_ENABLE_MUST_CHECK=y
130 +CONFIG_FRAME_WARN=1024
131 +# CONFIG_MAGIC_SYSRQ is not set
132 +# CONFIG_UNUSED_SYMBOLS is not set
133 +# CONFIG_HEADERS_CHECK is not set
134 +CONFIG_DEBUG_KERNEL=y
135 +# CONFIG_DEBUG_SHIRQ is not set
136 +CONFIG_DETECT_SOFTLOCKUP=y
137 +# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
138 +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
139 +CONFIG_SCHED_DEBUG=y
140 +# CONFIG_SCHEDSTATS is not set
141 +# CONFIG_TIMER_STATS is not set
142 +# CONFIG_DEBUG_OBJECTS is not set
143 +# CONFIG_DEBUG_SLAB is not set
144 +# CONFIG_DEBUG_SPINLOCK is not set
145 +# CONFIG_DEBUG_MUTEXES is not set
146 +# CONFIG_DEBUG_LOCK_ALLOC is not set
147 +# CONFIG_PROVE_LOCKING is not set
148 +# CONFIG_LOCK_STAT is not set
149 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
150 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
151 +# CONFIG_DEBUG_KOBJECT is not set
153 +# CONFIG_DEBUG_VM is not set
154 +# CONFIG_DEBUG_WRITECOUNT is not set
155 +# CONFIG_DEBUG_MEMORY_INIT is not set
156 +# CONFIG_DEBUG_LIST is not set
157 +# CONFIG_DEBUG_SG is not set
158 +# CONFIG_FRAME_POINTER is not set
159 +# CONFIG_BOOT_PRINTK_DELAY is not set
160 +# CONFIG_RCU_TORTURE_TEST is not set
161 +# CONFIG_RCU_CPU_STALL_DETECTOR is not set
162 +# CONFIG_BACKTRACE_SELF_TEST is not set
163 +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
164 +# CONFIG_FAULT_INJECTION is not set
165 +# CONFIG_SYSCTL_SYSCALL_CHECK is not set
170 +# CONFIG_IRQSOFF_TRACER is not set
171 +# CONFIG_SCHED_TRACER is not set
172 +# CONFIG_CONTEXT_SWITCH_TRACER is not set
173 +# CONFIG_BOOT_TRACER is not set
174 +# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
175 +# CONFIG_SAMPLES is not set
178 +# Executable file formats
180 +CONFIG_BINFMT_ELF_FDPIC=y
181 +CONFIG_BINFMT_FLAT=y
182 +# CONFIG_BINFMT_ZFLAT is not set
183 +# CONFIG_BINFMT_SHARED_FLAT is not set
184 +# CONFIG_HAVE_AOUT is not set
185 +# CONFIG_BINFMT_MISC is not set
186 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
191 +CONFIG_EXPERIMENTAL=y
192 +CONFIG_BROKEN_ON_SMP=y
193 +CONFIG_INIT_ENV_ARG_LIMIT=32
194 +CONFIG_LOCALVERSION=""
195 +CONFIG_LOCALVERSION_AUTO=y
196 +# CONFIG_SYSVIPC is not set
197 +# CONFIG_BSD_PROCESS_ACCT is not set
198 +# CONFIG_IKCONFIG is not set
199 +CONFIG_LOG_BUF_SHIFT=14
200 +# CONFIG_CGROUPS is not set
201 +# CONFIG_GROUP_SCHED is not set
202 +# CONFIG_RELAY is not set
203 +# CONFIG_NAMESPACES is not set
204 +CONFIG_BLK_DEV_INITRD=y
205 +CONFIG_INITRAMFS_SOURCE=""
206 +CONFIG_INITRAMFS_ROOT_UID=0
207 +CONFIG_INITRAMFS_ROOT_GID=0
208 +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
211 +CONFIG_SYSCTL_SYSCALL=y
212 +# CONFIG_KALLSYMS is not set
213 +# CONFIG_HOTPLUG is not set
216 +# CONFIG_ELF_CORE is not set
218 +# CONFIG_FUTEX is not set
219 +# CONFIG_EPOLL is not set
220 +# CONFIG_SIGNALFD is not set
221 +# CONFIG_TIMERFD is not set
222 +# CONFIG_EVENTFD is not set
224 +# CONFIG_VM_EVENT_COUNTERS is not set
225 +# CONFIG_COMPAT_BRK is not set
227 +# CONFIG_SLUB is not set
228 +# CONFIG_SLOB is not set
229 +# CONFIG_PROFILING is not set
230 +# CONFIG_MARKERS is not set
231 +CONFIG_HAVE_OPROFILE=y
232 +# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
236 +# CONFIG_MODULES is not set
238 +# CONFIG_LBD is not set
239 +# CONFIG_LSF is not set
240 +# CONFIG_BLK_DEV_BSG is not set
241 +# CONFIG_BLK_DEV_INTEGRITY is not set
246 +CONFIG_IOSCHED_NOOP=y
247 +# CONFIG_IOSCHED_AS is not set
248 +# CONFIG_IOSCHED_DEADLINE is not set
249 +# CONFIG_IOSCHED_CFQ is not set
250 +# CONFIG_DEFAULT_AS is not set
251 +# CONFIG_DEFAULT_DEADLINE is not set
252 +# CONFIG_DEFAULT_CFQ is not set
253 +CONFIG_DEFAULT_NOOP=y
254 +CONFIG_DEFAULT_IOSCHED="noop"
255 +CONFIG_CLASSIC_RCU=y
256 +CONFIG_PREEMPT_NONE=y
257 +# CONFIG_PREEMPT_VOLUNTARY is not set
258 +# CONFIG_PREEMPT is not set
259 +# CONFIG_NO_HZ is not set
260 +# CONFIG_HIGH_RES_TIMERS is not set
261 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
262 +CONFIG_SELECT_MEMORY_MODEL=y
263 +CONFIG_FLATMEM_MANUAL=y
264 +# CONFIG_DISCONTIGMEM_MANUAL is not set
265 +# CONFIG_SPARSEMEM_MANUAL is not set
267 +CONFIG_FLAT_NODE_MEM_MAP=y
268 +CONFIG_PAGEFLAGS_EXTENDED=y
269 +CONFIG_SPLIT_PTLOCK_CPUS=4
270 +# CONFIG_RESOURCES_64BIT is not set
271 +# CONFIG_PHYS_ADDR_T_64BIT is not set
272 +CONFIG_ZONE_DMA_FLAG=1
273 +CONFIG_VIRT_TO_BUS=y
274 +# CONFIG_NET is not set
281 +# Generic Driver Options
284 +CONFIG_PREVENT_FIRMWARE_BUILD=y
285 +CONFIG_DEBUG_DRIVER=y
286 +CONFIG_DEBUG_DEVRES=y
287 +# CONFIG_SYS_HYPERVISOR is not set
288 +# CONFIG_MTD is not set
289 +# CONFIG_PARPORT is not set
291 +# CONFIG_BLK_DEV_COW_COMMON is not set
292 +# CONFIG_BLK_DEV_LOOP is not set
293 +CONFIG_BLK_DEV_RAM=y
294 +CONFIG_BLK_DEV_RAM_COUNT=16
295 +CONFIG_BLK_DEV_RAM_SIZE=4096
296 +# CONFIG_BLK_DEV_XIP is not set
297 +# CONFIG_CDROM_PKTCDVD is not set
298 +# CONFIG_MISC_DEVICES is not set
301 +# SCSI device support
303 +# CONFIG_RAID_ATTRS is not set
304 +# CONFIG_SCSI is not set
305 +# CONFIG_SCSI_DMA is not set
306 +# CONFIG_SCSI_NETLINK is not set
307 +# CONFIG_ATA is not set
308 +# CONFIG_MD is not set
309 +# CONFIG_PHONE is not set
312 +# Input device support
314 +# CONFIG_INPUT is not set
317 +# Hardware I/O ports
319 +# CONFIG_SERIO is not set
320 +# CONFIG_GAMEPORT is not set
325 +# CONFIG_VT is not set
327 +# CONFIG_SERIAL_NONSTANDARD is not set
332 +# CONFIG_SERIAL_8250 is not set
335 +# Non-8250 serial port support
337 +CONFIG_SERIAL_UBI32_SERDES=y
338 +CONFIG_SERIAL_UBI32_SERDES_CONSOLE=y
339 +# CONFIG_SERIAL_UBI32_MAILBOX is not set
340 +CONFIG_SERIAL_CORE=y
341 +CONFIG_SERIAL_CORE_CONSOLE=y
342 +# CONFIG_UNIX98_PTYS is not set
343 +CONFIG_LEGACY_PTYS=y
344 +CONFIG_LEGACY_PTY_COUNT=256
345 +# CONFIG_IPMI_HANDLER is not set
346 +# CONFIG_HW_RANDOM is not set
347 +# CONFIG_RTC is not set
348 +# CONFIG_GEN_RTC is not set
349 +# CONFIG_R3964 is not set
350 +# CONFIG_RAW_DRIVER is not set
351 +# CONFIG_TCG_TPM is not set
352 +# CONFIG_I2C is not set
353 +# CONFIG_SPI is not set
354 +# CONFIG_DEBUG_GPIO is not set
357 +# Memory mapped GPIO expanders:
361 +# I2C GPIO expanders:
365 +# PCI GPIO expanders:
369 +# SPI GPIO expanders:
371 +# CONFIG_W1 is not set
372 +# CONFIG_POWER_SUPPLY is not set
373 +# CONFIG_HWMON is not set
374 +# CONFIG_THERMAL is not set
375 +# CONFIG_THERMAL_HWMON is not set
376 +# CONFIG_WATCHDOG is not set
377 +CONFIG_SSB_POSSIBLE=y
380 +# Sonics Silicon Backplane
382 +# CONFIG_SSB is not set
385 +# Multifunction device drivers
387 +# CONFIG_MFD_CORE is not set
388 +# CONFIG_MFD_SM501 is not set
389 +# CONFIG_HTC_PASIC3 is not set
390 +# CONFIG_MFD_TMIO is not set
391 +# CONFIG_REGULATOR is not set
394 +# Multimedia devices
398 +# Multimedia core support
400 +# CONFIG_VIDEO_DEV is not set
401 +# CONFIG_VIDEO_MEDIA is not set
404 +# Multimedia drivers
406 +# CONFIG_DAB is not set
411 +# CONFIG_VGASTATE is not set
412 +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
413 +# CONFIG_FB is not set
414 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
417 +# Display device support
419 +# CONFIG_DISPLAY_SUPPORT is not set
420 +# CONFIG_SOUND is not set
421 +# CONFIG_USB_SUPPORT is not set
422 +# CONFIG_MMC is not set
423 +# CONFIG_MEMSTICK is not set
424 +# CONFIG_NEW_LEDS is not set
425 +# CONFIG_ACCESSIBILITY is not set
426 +# CONFIG_RTC_CLASS is not set
427 +# CONFIG_DMADEVICES is not set
428 +# CONFIG_UIO is not set
429 +# CONFIG_STAGING is not set
434 +# CONFIG_EXT2_FS is not set
435 +# CONFIG_EXT3_FS is not set
436 +# CONFIG_EXT4_FS is not set
437 +# CONFIG_REISERFS_FS is not set
438 +# CONFIG_JFS_FS is not set
439 +# CONFIG_FS_POSIX_ACL is not set
440 +CONFIG_FILE_LOCKING=y
441 +# CONFIG_XFS_FS is not set
442 +# CONFIG_DNOTIFY is not set
443 +# CONFIG_INOTIFY is not set
444 +# CONFIG_QUOTA is not set
445 +# CONFIG_AUTOFS_FS is not set
446 +# CONFIG_AUTOFS4_FS is not set
447 +# CONFIG_FUSE_FS is not set
450 +# CD-ROM/DVD Filesystems
452 +# CONFIG_ISO9660_FS is not set
453 +# CONFIG_UDF_FS is not set
456 +# DOS/FAT/NT Filesystems
458 +# CONFIG_MSDOS_FS is not set
459 +# CONFIG_VFAT_FS is not set
460 +# CONFIG_NTFS_FS is not set
463 +# Pseudo filesystems
466 +CONFIG_PROC_SYSCTL=y
467 +# CONFIG_SYSFS is not set
468 +# CONFIG_TMPFS is not set
469 +# CONFIG_HUGETLB_PAGE is not set
472 +# Layered filesystems
474 +# CONFIG_UNION_FS is not set
477 +# Miscellaneous filesystems
479 +# CONFIG_ADFS_FS is not set
480 +# CONFIG_AFFS_FS is not set
481 +# CONFIG_HFS_FS is not set
482 +# CONFIG_HFSPLUS_FS is not set
483 +# CONFIG_BEFS_FS is not set
484 +# CONFIG_BFS_FS is not set
485 +# CONFIG_EFS_FS is not set
486 +# CONFIG_CRAMFS is not set
487 +# CONFIG_VXFS_FS is not set
488 +# CONFIG_MINIX_FS is not set
489 +# CONFIG_OMFS_FS is not set
490 +# CONFIG_HPFS_FS is not set
491 +# CONFIG_QNX4FS_FS is not set
493 +# CONFIG_SYSV_FS is not set
494 +# CONFIG_UFS_FS is not set
499 +# CONFIG_PARTITION_ADVANCED is not set
500 +CONFIG_MSDOS_PARTITION=y
501 +# CONFIG_NLS is not set
506 +# CONFIG_KEYS is not set
507 +# CONFIG_SECURITYFS is not set
508 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
509 +# CONFIG_CRYPTO is not set
514 +# CONFIG_OCF_OCF is not set
520 +# CONFIG_CRC_CCITT is not set
521 +# CONFIG_CRC16 is not set
522 +# CONFIG_CRC_T10DIF is not set
523 +# CONFIG_CRC_ITU_T is not set
525 +# CONFIG_CRC7 is not set
526 +# CONFIG_LIBCRC32C is not set
529 diff -ruN linux-2.6.28.10_o/arch/ubicom32/configs/IP7160RGW_defconfig linux-2.6.28.10/arch/ubicom32/configs/IP7160RGW_defconfig
530 --- linux-2.6.28.10_o/arch/ubicom32/configs/IP7160RGW_defconfig 1970-01-01 02:00:00.000000000 +0200
531 +++ linux-2.6.28.10/arch/ubicom32/configs/IP7160RGW_defconfig 2009-08-12 13:08:37.000000000 +0300
534 +# Automatically generated make config: don't edit
535 +# Linux kernel version: 2.6.28.10
537 +CONFIG_RAMBASE=0x40000000
540 +CONFIG_CPU_BIG_ENDIAN=y
541 +CONFIG_FORCE_MAX_ZONEORDER=14
543 +# CONFIG_MMU is not set
544 +# CONFIG_FPU is not set
546 +CONFIG_RWSEM_GENERIC_SPINLOCK=y
547 +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
548 +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
549 +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
550 +CONFIG_GENERIC_FIND_NEXT_BIT=y
551 +CONFIG_GENERIC_GPIO=y
553 +CONFIG_GENERIC_HWEIGHT=y
554 +CONFIG_GENERIC_HARDIRQS=y
555 +CONFIG_STACKTRACE_SUPPORT=y
556 +CONFIG_LOCKDEP_SUPPORT=y
557 +CONFIG_GENERIC_CALIBRATE_DELAY=y
558 +CONFIG_GENERIC_TIME=y
559 +CONFIG_TIME_LOW_RES=y
560 +CONFIG_GENERIC_CLOCKEVENTS=y
562 +CONFIG_ARCH_SUPPORTS_AOUT=y
563 +CONFIG_IRQ_PER_CPU=y
564 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
567 +# Processor type and features
572 +# Processor type will be selected by Board
574 +CONFIG_UBICOM32_V4=y
579 +# CONFIG_NOBOARD is not set
580 +# CONFIG_IP5170DPF is not set
581 +# CONFIG_IP5160DEV is not set
582 +# CONFIG_IP5160EVAL is not set
583 +# CONFIG_IP7145DPF is not set
585 +# CONFIG_IP7160BRINGUP is not set
586 +# CONFIG_IP7160DPF is not set
587 +# CONFIG_IP7500MODULE is not set
588 +# CONFIG_IP7500AV is not set
589 +# CONFIG_IP7500MEDIA is not set
594 +# CONFIG_SMP is not set
595 +CONFIG_TIMER_EXTRA_ALLOC=0
596 +# CONFIG_IRQSTACKS is not set
597 +CONFIG_UBICOM32_OCM_MODULES=y
598 +CONFIG_OCM_MODULES_RESERVATION=41
599 +CONFIG_OCM_MODULES_MAY_CONSUME_REMAINING_CODESPACE=y
605 +CONFIG_RAMSIZE=0x04000000
606 +CONFIG_KERNELBASE=0x40400000
611 +# CONFIG_LINKER_RELAXATION is not set
621 +# CONFIG_ARCH_SUPPORTS_MSI is not set
622 +# CONFIG_PCI_LEGACY is not set
623 +# CONFIG_PCI_DEBUG is not set
624 +CONFIG_PCI_DEV0_IDSEL=0x001000000
625 +CONFIG_PCI_DEV1_IDSEL=0x002000000
630 +CONFIG_UBICOM_INPUT=y
631 +# CONFIG_UBICOM_INPUT_I2C is not set
632 +CONFIG_UBICOM_SWITCH=y
633 +CONFIG_UBICOM_SWITCH_BCM539X=y
638 +# CONFIG_UBICOM_HID is not set
639 +CONFIG_CMDLINE_BOOL=y
640 +CONFIG_CMDLINE="console=ttyUM0 console=ttyUS0 serdes=0x02004000,61,250000000"
641 +# CONFIG_CMDLINE_OVERRIDE is not set
646 +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
647 +CONFIG_PROTECT_KERNEL=y
648 +# CONFIG_NO_KERNEL_MSG is not set
649 +CONFIG_EARLY_PRINTK=y
650 +# CONFIG_STOP_ON_TRAP is not set
651 +# CONFIG_STOP_ON_BUG is not set
652 +# CONFIG_DEBUG_IRQMEASURE is not set
653 +# CONFIG_DEBUG_PCIMEASURE is not set
654 +# CONFIG_ACCESS_OK_CHECKS_ENABLED is not set
655 +CONFIG_UNALIGNED_ACCESS_ENABLED=y
656 +# CONFIG_UNALIGNED_ACCESS_USERSPACE_ONLY is not set
657 +# CONFIG_UNALIGNED_ACCESS_DISABLED is not set
658 +# CONFIG_DEBUG_STACKOVERFLOW is not set
659 +# CONFIG_DEBUG_STACK_USAGE is not set
660 +CONFIG_PRINTK_TIME=y
661 +CONFIG_ENABLE_WARN_DEPRECATED=y
662 +CONFIG_ENABLE_MUST_CHECK=y
663 +CONFIG_FRAME_WARN=1024
664 +# CONFIG_MAGIC_SYSRQ is not set
665 +# CONFIG_UNUSED_SYMBOLS is not set
666 +# CONFIG_DEBUG_FS is not set
667 +# CONFIG_HEADERS_CHECK is not set
668 +CONFIG_DEBUG_KERNEL=y
669 +# CONFIG_DEBUG_SHIRQ is not set
670 +# CONFIG_DETECT_SOFTLOCKUP is not set
671 +# CONFIG_SCHED_DEBUG is not set
672 +# CONFIG_SCHEDSTATS is not set
673 +# CONFIG_TIMER_STATS is not set
674 +# CONFIG_DEBUG_OBJECTS is not set
675 +# CONFIG_DEBUG_SLAB is not set
676 +# CONFIG_DEBUG_SPINLOCK is not set
677 +# CONFIG_DEBUG_MUTEXES is not set
678 +# CONFIG_DEBUG_LOCK_ALLOC is not set
679 +# CONFIG_PROVE_LOCKING is not set
680 +# CONFIG_LOCK_STAT is not set
681 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
682 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
683 +# CONFIG_DEBUG_KOBJECT is not set
685 +# CONFIG_DEBUG_VM is not set
686 +# CONFIG_DEBUG_WRITECOUNT is not set
687 +# CONFIG_DEBUG_MEMORY_INIT is not set
688 +# CONFIG_DEBUG_LIST is not set
689 +# CONFIG_DEBUG_SG is not set
690 +# CONFIG_FRAME_POINTER is not set
691 +# CONFIG_BOOT_PRINTK_DELAY is not set
692 +# CONFIG_RCU_TORTURE_TEST is not set
693 +# CONFIG_RCU_CPU_STALL_DETECTOR is not set
694 +# CONFIG_BACKTRACE_SELF_TEST is not set
695 +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
696 +# CONFIG_FAULT_INJECTION is not set
697 +# CONFIG_SYSCTL_SYSCALL_CHECK is not set
702 +# CONFIG_IRQSOFF_TRACER is not set
703 +# CONFIG_SCHED_TRACER is not set
704 +# CONFIG_CONTEXT_SWITCH_TRACER is not set
705 +# CONFIG_BOOT_TRACER is not set
706 +# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
707 +# CONFIG_SAMPLES is not set
710 +# Executable file formats
712 +CONFIG_BINFMT_ELF_FDPIC=y
713 +CONFIG_BINFMT_FLAT=y
714 +CONFIG_BINFMT_ZFLAT=y
715 +# CONFIG_BINFMT_SHARED_FLAT is not set
716 +# CONFIG_HAVE_AOUT is not set
717 +# CONFIG_BINFMT_MISC is not set
718 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
723 +CONFIG_EXPERIMENTAL=y
724 +CONFIG_BROKEN_ON_SMP=y
725 +CONFIG_INIT_ENV_ARG_LIMIT=32
726 +CONFIG_LOCALVERSION=""
727 +# CONFIG_LOCALVERSION_AUTO is not set
729 +CONFIG_SYSVIPC_SYSCTL=y
730 +# CONFIG_POSIX_MQUEUE is not set
731 +# CONFIG_BSD_PROCESS_ACCT is not set
732 +# CONFIG_TASKSTATS is not set
733 +# CONFIG_AUDIT is not set
734 +# CONFIG_IKCONFIG is not set
735 +CONFIG_LOG_BUF_SHIFT=14
736 +# CONFIG_CGROUPS is not set
737 +# CONFIG_GROUP_SCHED is not set
738 +CONFIG_SYSFS_DEPRECATED=y
739 +CONFIG_SYSFS_DEPRECATED_V2=y
740 +# CONFIG_RELAY is not set
741 +# CONFIG_NAMESPACES is not set
742 +CONFIG_BLK_DEV_INITRD=y
743 +CONFIG_INITRAMFS_SOURCE=""
744 +CONFIG_INITRAMFS_ROOT_UID=0
745 +CONFIG_INITRAMFS_ROOT_GID=0
746 +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
749 +CONFIG_SYSCTL_SYSCALL=y
750 +# CONFIG_KALLSYMS is not set
751 +# CONFIG_HOTPLUG is not set
754 +# CONFIG_ELF_CORE is not set
756 +# CONFIG_FUTEX is not set
757 +# CONFIG_EPOLL is not set
758 +# CONFIG_SIGNALFD is not set
759 +# CONFIG_TIMERFD is not set
760 +# CONFIG_EVENTFD is not set
762 +# CONFIG_VM_EVENT_COUNTERS is not set
764 +# CONFIG_COMPAT_BRK is not set
766 +# CONFIG_SLUB is not set
767 +# CONFIG_SLOB is not set
768 +# CONFIG_PROFILING is not set
769 +# CONFIG_MARKERS is not set
770 +CONFIG_HAVE_OPROFILE=y
771 +# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
776 +CONFIG_MODULE_FORCE_LOAD=y
777 +# CONFIG_MODULE_UNLOAD is not set
778 +# CONFIG_MODVERSIONS is not set
779 +# CONFIG_MODULE_SRCVERSION_ALL is not set
782 +# CONFIG_LBD is not set
783 +# CONFIG_BLK_DEV_IO_TRACE is not set
784 +# CONFIG_LSF is not set
785 +# CONFIG_BLK_DEV_BSG is not set
786 +# CONFIG_BLK_DEV_INTEGRITY is not set
791 +CONFIG_IOSCHED_NOOP=y
792 +# CONFIG_IOSCHED_AS is not set
793 +# CONFIG_IOSCHED_DEADLINE is not set
794 +# CONFIG_IOSCHED_CFQ is not set
795 +# CONFIG_DEFAULT_AS is not set
796 +# CONFIG_DEFAULT_DEADLINE is not set
797 +# CONFIG_DEFAULT_CFQ is not set
798 +CONFIG_DEFAULT_NOOP=y
799 +CONFIG_DEFAULT_IOSCHED="noop"
800 +CONFIG_CLASSIC_RCU=y
801 +CONFIG_PREEMPT_NONE=y
802 +# CONFIG_PREEMPT_VOLUNTARY is not set
803 +# CONFIG_PREEMPT is not set
804 +CONFIG_TICK_ONESHOT=y
806 +CONFIG_HIGH_RES_TIMERS=y
807 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
808 +CONFIG_SELECT_MEMORY_MODEL=y
809 +CONFIG_FLATMEM_MANUAL=y
810 +# CONFIG_DISCONTIGMEM_MANUAL is not set
811 +# CONFIG_SPARSEMEM_MANUAL is not set
813 +CONFIG_FLAT_NODE_MEM_MAP=y
814 +CONFIG_PAGEFLAGS_EXTENDED=y
815 +CONFIG_SPLIT_PTLOCK_CPUS=4
816 +# CONFIG_RESOURCES_64BIT is not set
817 +# CONFIG_PHYS_ADDR_T_64BIT is not set
818 +CONFIG_ZONE_DMA_FLAG=1
819 +CONFIG_VIRT_TO_BUS=y
823 +# Networking options
826 +# CONFIG_PACKET_MMAP is not set
828 +# CONFIG_NET_KEY is not set
830 +CONFIG_IP_MULTICAST=y
831 +CONFIG_IP_ADVANCED_ROUTER=y
832 +CONFIG_ASK_IP_FIB_HASH=y
833 +# CONFIG_IP_FIB_TRIE is not set
834 +CONFIG_IP_FIB_HASH=y
835 +# CONFIG_IP_MULTIPLE_TABLES is not set
836 +# CONFIG_IP_ROUTE_MULTIPATH is not set
837 +CONFIG_IP_ROUTE_VERBOSE=y
839 +CONFIG_IP_PNP_DHCP=y
840 +CONFIG_IP_PNP_BOOTP=y
841 +CONFIG_IP_PNP_RARP=y
844 +# CONFIG_NET_IPGRE_BROADCAST is not set
845 +# CONFIG_IP_MROUTE is not set
846 +# CONFIG_ARPD is not set
847 +# CONFIG_SYN_COOKIES is not set
848 +# CONFIG_INET_AH is not set
849 +# CONFIG_INET_ESP is not set
850 +# CONFIG_INET_IPCOMP is not set
851 +# CONFIG_INET_XFRM_TUNNEL is not set
852 +CONFIG_INET_TUNNEL=y
853 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
854 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
855 +# CONFIG_INET_XFRM_MODE_BEET is not set
856 +# CONFIG_INET_LRO is not set
858 +CONFIG_INET_TCP_DIAG=y
859 +# CONFIG_TCP_CONG_ADVANCED is not set
860 +CONFIG_TCP_CONG_CUBIC=y
861 +CONFIG_DEFAULT_TCP_CONG="cubic"
862 +# CONFIG_TCP_MD5SIG is not set
863 +# CONFIG_IPV6 is not set
864 +# CONFIG_NETWORK_SECMARK is not set
866 +# CONFIG_NETFILTER_DEBUG is not set
867 +CONFIG_NETFILTER_ADVANCED=y
868 +# CONFIG_BRIDGE_NETFILTER is not set
871 +# Core Netfilter Configuration
873 +# CONFIG_NETFILTER_NETLINK_QUEUE is not set
874 +# CONFIG_NETFILTER_NETLINK_LOG is not set
875 +CONFIG_NF_CONNTRACK=y
876 +# CONFIG_NF_CT_ACCT is not set
877 +# CONFIG_NF_CONNTRACK_MARK is not set
878 +# CONFIG_NF_CONNTRACK_EVENTS is not set
879 +# CONFIG_NF_CT_PROTO_DCCP is not set
880 +CONFIG_NF_CT_PROTO_GRE=y
881 +# CONFIG_NF_CT_PROTO_SCTP is not set
882 +# CONFIG_NF_CT_PROTO_UDPLITE is not set
883 +# CONFIG_NF_CONNTRACK_AMANDA is not set
884 +# CONFIG_NF_CONNTRACK_FTP is not set
885 +# CONFIG_NF_CONNTRACK_H323 is not set
886 +# CONFIG_NF_CONNTRACK_IRC is not set
887 +# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
888 +CONFIG_NF_CONNTRACK_PPTP=y
889 +# CONFIG_NF_CONNTRACK_SANE is not set
890 +# CONFIG_NF_CONNTRACK_SIP is not set
891 +# CONFIG_NF_CONNTRACK_TFTP is not set
892 +# CONFIG_NF_CT_NETLINK is not set
893 +# CONFIG_NETFILTER_TPROXY is not set
894 +CONFIG_NETFILTER_XTABLES=y
895 +# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
896 +# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set
897 +# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
898 +# CONFIG_NETFILTER_XT_TARGET_MARK is not set
899 +# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
900 +# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
901 +# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
902 +CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
903 +# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set
904 +# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
905 +# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set
906 +# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set
907 +# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set
908 +# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set
909 +# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
910 +# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
911 +CONFIG_NETFILTER_XT_MATCH_ESP=y
912 +# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
913 +# CONFIG_NETFILTER_XT_MATCH_HELPER is not set
914 +CONFIG_NETFILTER_XT_MATCH_IPRANGE=y
915 +# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
916 +CONFIG_NETFILTER_XT_MATCH_LIMIT=y
917 +CONFIG_NETFILTER_XT_MATCH_MAC=y
918 +# CONFIG_NETFILTER_XT_MATCH_MARK is not set
919 +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y
920 +# CONFIG_NETFILTER_XT_MATCH_OWNER is not set
921 +# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
922 +# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
923 +# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
924 +# CONFIG_NETFILTER_XT_MATCH_REALM is not set
925 +# CONFIG_NETFILTER_XT_MATCH_RECENT is not set
926 +# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
927 +CONFIG_NETFILTER_XT_MATCH_STATE=y
928 +# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
929 +CONFIG_NETFILTER_XT_MATCH_STRING=y
930 +CONFIG_NETFILTER_XT_MATCH_TCPMSS=y
931 +# CONFIG_NETFILTER_XT_MATCH_TIME is not set
932 +# CONFIG_NETFILTER_XT_MATCH_U32 is not set
933 +# CONFIG_IP_VS is not set
936 +# IP: Netfilter Configuration
938 +CONFIG_NF_DEFRAG_IPV4=y
939 +CONFIG_NF_CONNTRACK_IPV4=y
940 +CONFIG_NF_CONNTRACK_PROC_COMPAT=y
941 +# CONFIG_IP_NF_QUEUE is not set
942 +CONFIG_IP_NF_IPTABLES=y
943 +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
944 +CONFIG_IP_NF_MATCH_AH=y
945 +# CONFIG_IP_NF_MATCH_ECN is not set
946 +CONFIG_IP_NF_MATCH_TTL=y
947 +CONFIG_IP_NF_FILTER=y
948 +CONFIG_IP_NF_TARGET_REJECT=y
949 +CONFIG_IP_NF_TARGET_LOG=y
950 +# CONFIG_IP_NF_TARGET_ULOG is not set
951 +# CONFIG_NF_QOS_UBICOM_STREAMENGINE_DEFAULT_CLASSIFIER is not set
953 +CONFIG_NF_NAT_NEEDED=y
954 +CONFIG_IP_NF_TARGET_MASQUERADE=y
955 +CONFIG_IP_NF_TARGET_NETMAP=y
956 +CONFIG_IP_NF_TARGET_REDIRECT=y
957 +CONFIG_NF_NAT_SNMP_BASIC=y
958 +CONFIG_NF_NAT_PROTO_GRE=y
959 +# CONFIG_NF_NAT_FTP is not set
960 +# CONFIG_NF_NAT_IRC is not set
961 +# CONFIG_NF_NAT_TFTP is not set
962 +# CONFIG_NF_NAT_AMANDA is not set
963 +CONFIG_NF_NAT_PPTP=y
964 +# CONFIG_NF_NAT_H323 is not set
965 +# CONFIG_NF_NAT_SIP is not set
966 +CONFIG_IP_NF_MANGLE=y
967 +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set
968 +# CONFIG_IP_NF_TARGET_ECN is not set
969 +CONFIG_IP_NF_TARGET_TTL=y
970 +# CONFIG_IP_NF_RAW is not set
971 +# CONFIG_IP_NF_ARPTABLES is not set
972 +# CONFIG_IP_DCCP is not set
973 +# CONFIG_IP_SCTP is not set
974 +# CONFIG_TIPC is not set
975 +# CONFIG_ATM is not set
978 +# CONFIG_NET_DSA is not set
980 +# CONFIG_VLAN_8021Q_GVRP is not set
981 +# CONFIG_DECNET is not set
983 +# CONFIG_LLC2 is not set
984 +# CONFIG_IPX is not set
985 +# CONFIG_ATALK is not set
986 +# CONFIG_X25 is not set
987 +# CONFIG_LAPB is not set
988 +# CONFIG_ECONET is not set
989 +# CONFIG_WAN_ROUTER is not set
990 +# CONFIG_NET_SCHED is not set
995 +# CONFIG_NET_PKTGEN is not set
996 +# CONFIG_HAMRADIO is not set
997 +# CONFIG_CAN is not set
998 +# CONFIG_IRDA is not set
999 +# CONFIG_BT is not set
1000 +# CONFIG_AF_RXRPC is not set
1001 +# CONFIG_PHONET is not set
1003 +# CONFIG_CFG80211 is not set
1004 +# CONFIG_WIRELESS_OLD_REGULATORY is not set
1005 +CONFIG_WIRELESS_EXT=y
1006 +CONFIG_WIRELESS_EXT_SYSFS=y
1007 +# CONFIG_MAC80211 is not set
1008 +# CONFIG_IEEE80211 is not set
1009 +# CONFIG_RFKILL is not set
1010 +# CONFIG_NET_9P is not set
1017 +# Generic Driver Options
1019 +CONFIG_STANDALONE=y
1020 +CONFIG_PREVENT_FIRMWARE_BUILD=y
1021 +# CONFIG_DEBUG_DRIVER is not set
1022 +# CONFIG_DEBUG_DEVRES is not set
1023 +# CONFIG_SYS_HYPERVISOR is not set
1024 +# CONFIG_CONNECTOR is not set
1026 +# CONFIG_MTD_DEBUG is not set
1027 +# CONFIG_MTD_CONCAT is not set
1028 +CONFIG_MTD_PARTITIONS=y
1029 +# CONFIG_MTD_REDBOOT_PARTS is not set
1030 +CONFIG_MTD_CMDLINE_PARTS=y
1031 +# CONFIG_MTD_AR7_PARTS is not set
1034 +# User Modules And Translation Layers
1037 +CONFIG_MTD_BLKDEVS=y
1039 +# CONFIG_FTL is not set
1040 +# CONFIG_NFTL is not set
1041 +# CONFIG_INFTL is not set
1042 +# CONFIG_RFD_FTL is not set
1043 +# CONFIG_SSFDC is not set
1044 +# CONFIG_MTD_OOPS is not set
1047 +# RAM/ROM/Flash chip drivers
1049 +# CONFIG_MTD_CFI is not set
1050 +# CONFIG_MTD_JEDECPROBE is not set
1051 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
1052 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
1053 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
1054 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
1055 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
1056 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
1057 +CONFIG_MTD_CFI_I1=y
1058 +CONFIG_MTD_CFI_I2=y
1059 +# CONFIG_MTD_CFI_I4 is not set
1060 +# CONFIG_MTD_CFI_I8 is not set
1061 +# CONFIG_MTD_RAM is not set
1062 +# CONFIG_MTD_ROM is not set
1063 +# CONFIG_MTD_ABSENT is not set
1066 +# Mapping drivers for chip access
1068 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
1069 +# CONFIG_MTD_INTEL_VR_NOR is not set
1070 +# CONFIG_MTD_PLATRAM is not set
1073 +# Self-contained MTD device drivers
1075 +# CONFIG_MTD_PMC551 is not set
1076 +# CONFIG_MTD_DATAFLASH is not set
1077 +# CONFIG_MTD_M25P80 is not set
1078 +CONFIG_MTD_UBI32_M25P80=y
1079 +# CONFIG_MTD_SLRAM is not set
1080 +# CONFIG_MTD_PHRAM is not set
1081 +# CONFIG_MTD_MTDRAM is not set
1082 +# CONFIG_MTD_BLOCK2MTD is not set
1085 +# Disk-On-Chip Device Drivers
1087 +# CONFIG_MTD_DOC2000 is not set
1088 +# CONFIG_MTD_DOC2001 is not set
1089 +# CONFIG_MTD_DOC2001PLUS is not set
1090 +# CONFIG_MTD_NAND is not set
1091 +# CONFIG_MTD_ONENAND is not set
1094 +# UBI - Unsorted block images
1096 +# CONFIG_MTD_UBI is not set
1097 +# CONFIG_PARPORT is not set
1099 +# CONFIG_BLK_CPQ_DA is not set
1100 +# CONFIG_BLK_CPQ_CISS_DA is not set
1101 +# CONFIG_BLK_DEV_DAC960 is not set
1102 +# CONFIG_BLK_DEV_UMEM is not set
1103 +# CONFIG_BLK_DEV_COW_COMMON is not set
1104 +# CONFIG_BLK_DEV_LOOP is not set
1105 +# CONFIG_BLK_DEV_NBD is not set
1106 +# CONFIG_BLK_DEV_SX8 is not set
1107 +# CONFIG_BLK_DEV_UB is not set
1108 +CONFIG_BLK_DEV_RAM=y
1109 +CONFIG_BLK_DEV_RAM_COUNT=16
1110 +CONFIG_BLK_DEV_RAM_SIZE=4096
1111 +# CONFIG_BLK_DEV_XIP is not set
1112 +# CONFIG_CDROM_PKTCDVD is not set
1113 +# CONFIG_ATA_OVER_ETH is not set
1114 +# CONFIG_MISC_DEVICES is not set
1117 +# SCSI device support
1119 +# CONFIG_RAID_ATTRS is not set
1122 +# CONFIG_SCSI_TGT is not set
1123 +# CONFIG_SCSI_NETLINK is not set
1124 +CONFIG_SCSI_PROC_FS=y
1127 +# SCSI support type (disk, tape, CD-ROM)
1129 +CONFIG_BLK_DEV_SD=y
1130 +# CONFIG_CHR_DEV_ST is not set
1131 +# CONFIG_CHR_DEV_OSST is not set
1132 +# CONFIG_BLK_DEV_SR is not set
1133 +CONFIG_CHR_DEV_SG=y
1134 +# CONFIG_CHR_DEV_SCH is not set
1137 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
1139 +CONFIG_SCSI_MULTI_LUN=y
1140 +# CONFIG_SCSI_CONSTANTS is not set
1141 +# CONFIG_SCSI_LOGGING is not set
1142 +# CONFIG_SCSI_SCAN_ASYNC is not set
1143 +CONFIG_SCSI_WAIT_SCAN=m
1148 +# CONFIG_SCSI_SPI_ATTRS is not set
1149 +# CONFIG_SCSI_FC_ATTRS is not set
1150 +# CONFIG_SCSI_ISCSI_ATTRS is not set
1151 +# CONFIG_SCSI_SAS_LIBSAS is not set
1152 +# CONFIG_SCSI_SRP_ATTRS is not set
1153 +# CONFIG_SCSI_LOWLEVEL is not set
1154 +# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
1155 +# CONFIG_SCSI_DH is not set
1156 +# CONFIG_ATA is not set
1157 +# CONFIG_MD is not set
1158 +# CONFIG_FUSION is not set
1161 +# IEEE 1394 (FireWire) support
1165 +# Enable only one of the two stacks, unless you know what you are doing
1167 +# CONFIG_FIREWIRE is not set
1168 +# CONFIG_IEEE1394 is not set
1169 +# CONFIG_I2O is not set
1170 +CONFIG_NETDEVICES=y
1171 +# CONFIG_DUMMY is not set
1172 +# CONFIG_BONDING is not set
1173 +# CONFIG_MACVLAN is not set
1174 +# CONFIG_EQUALIZER is not set
1175 +# CONFIG_TUN is not set
1176 +# CONFIG_VETH is not set
1177 +# CONFIG_ARCNET is not set
1178 +# CONFIG_NET_ETHERNET is not set
1180 +CONFIG_NETDEV_1000=y
1181 +# CONFIG_ACENIC is not set
1182 +# CONFIG_DL2K is not set
1183 +# CONFIG_E1000 is not set
1184 +# CONFIG_E1000E is not set
1185 +# CONFIG_IP1000 is not set
1186 +# CONFIG_IGB is not set
1187 +# CONFIG_NS83820 is not set
1188 +# CONFIG_HAMACHI is not set
1189 +# CONFIG_YELLOWFIN is not set
1190 +# CONFIG_R8169 is not set
1191 +# CONFIG_SIS190 is not set
1192 +# CONFIG_SKGE is not set
1193 +# CONFIG_SKY2 is not set
1194 +# CONFIG_VIA_VELOCITY is not set
1195 +# CONFIG_TIGON3 is not set
1196 +# CONFIG_BNX2 is not set
1197 +# CONFIG_QLA3XXX is not set
1198 +# CONFIG_ATL1 is not set
1199 +# CONFIG_ATL1E is not set
1200 +# CONFIG_JME is not set
1201 +CONFIG_UBICOM32_GMAC=y
1202 +CONFIG_UBICOM32_NAPI=y
1203 +CONFIG_UBICOM32_OCM_FOR_SKB=y
1204 +# CONFIG_NETDEV_10000 is not set
1205 +# CONFIG_TR is not set
1210 +# CONFIG_WLAN_PRE80211 is not set
1211 +# CONFIG_WLAN_80211 is not set
1212 +# CONFIG_IWLWIFI_LEDS is not set
1215 +# USB Network Adapters
1217 +# CONFIG_USB_CATC is not set
1218 +# CONFIG_USB_KAWETH is not set
1219 +# CONFIG_USB_PEGASUS is not set
1220 +# CONFIG_USB_RTL8150 is not set
1221 +CONFIG_USB_USBNET=y
1222 +CONFIG_USB_NET_AX8817X=y
1223 +CONFIG_USB_NET_CDCETHER=y
1224 +# CONFIG_USB_NET_DM9601 is not set
1225 +# CONFIG_USB_NET_SMSC95XX is not set
1226 +# CONFIG_USB_NET_GL620A is not set
1227 +# CONFIG_USB_NET_NET1080 is not set
1228 +# CONFIG_USB_NET_PLUSB is not set
1229 +# CONFIG_USB_NET_MCS7830 is not set
1230 +# CONFIG_USB_NET_RNDIS_HOST is not set
1231 +# CONFIG_USB_NET_CDC_SUBSET is not set
1232 +# CONFIG_USB_NET_ZAURUS is not set
1233 +# CONFIG_WAN is not set
1234 +# CONFIG_FDDI is not set
1235 +# CONFIG_HIPPI is not set
1237 +# CONFIG_PPP_MULTILINK is not set
1238 +# CONFIG_PPP_FILTER is not set
1240 +# CONFIG_PPP_SYNC_TTY is not set
1241 +# CONFIG_PPP_DEFLATE is not set
1242 +# CONFIG_PPP_BSDCOMP is not set
1243 +# CONFIG_PPP_MPPE is not set
1244 +# CONFIG_PPPOE is not set
1245 +# CONFIG_PPPOL2TP is not set
1246 +# CONFIG_SLIP is not set
1248 +# CONFIG_NET_FC is not set
1249 +# CONFIG_NETCONSOLE is not set
1250 +# CONFIG_NETPOLL is not set
1251 +# CONFIG_NET_POLL_CONTROLLER is not set
1252 +# CONFIG_ISDN is not set
1253 +# CONFIG_PHONE is not set
1256 +# Input device support
1259 +# CONFIG_INPUT_FF_MEMLESS is not set
1260 +CONFIG_INPUT_POLLDEV=y
1263 +# Userland interfaces
1265 +# CONFIG_INPUT_MOUSEDEV is not set
1266 +# CONFIG_INPUT_JOYDEV is not set
1267 +# CONFIG_INPUT_EVDEV is not set
1268 +# CONFIG_INPUT_EVBUG is not set
1271 +# Input Device Drivers
1273 +# CONFIG_INPUT_KEYBOARD is not set
1274 +# CONFIG_INPUT_MOUSE is not set
1275 +# CONFIG_INPUT_JOYSTICK is not set
1276 +# CONFIG_INPUT_TABLET is not set
1277 +# CONFIG_INPUT_TOUCHSCREEN is not set
1278 +# CONFIG_INPUT_MISC is not set
1281 +# Hardware I/O ports
1283 +# CONFIG_SERIO is not set
1284 +# CONFIG_GAMEPORT is not set
1287 +# Character devices
1289 +# CONFIG_VT is not set
1291 +# CONFIG_SERIAL_NONSTANDARD is not set
1292 +# CONFIG_NOZOMI is not set
1297 +# CONFIG_SERIAL_8250 is not set
1300 +# Non-8250 serial port support
1302 +# CONFIG_SERIAL_UBI32_SERDES is not set
1303 +CONFIG_SERIAL_UBI32_MAILBOX=y
1304 +CONFIG_SERIAL_UBI32_MAILBOX_CONSOLE=y
1305 +CONFIG_SERIAL_CORE=y
1306 +CONFIG_SERIAL_CORE_CONSOLE=y
1307 +# CONFIG_SERIAL_JSM is not set
1308 +CONFIG_UNIX98_PTYS=y
1309 +CONFIG_LEGACY_PTYS=y
1310 +CONFIG_LEGACY_PTY_COUNT=256
1311 +# CONFIG_IPMI_HANDLER is not set
1313 +CONFIG_HW_RANDOM_UBICOM32=y
1314 +# CONFIG_RTC is not set
1315 +# CONFIG_GEN_RTC is not set
1316 +# CONFIG_R3964 is not set
1317 +# CONFIG_APPLICOM is not set
1318 +# CONFIG_RAW_DRIVER is not set
1319 +# CONFIG_TCG_TPM is not set
1321 +# CONFIG_I2C is not set
1323 +# CONFIG_SPI_DEBUG is not set
1324 +CONFIG_SPI_MASTER=y
1327 +# SPI Master Controller Drivers
1329 +CONFIG_SPI_BITBANG=y
1330 +CONFIG_SPI_UBICOM32_GPIO=y
1333 +# SPI Protocol Masters
1335 +# CONFIG_SPI_AT25 is not set
1336 +# CONFIG_SPI_SPIDEV is not set
1337 +# CONFIG_SPI_TLE62X0 is not set
1338 +# CONFIG_DEBUG_GPIO is not set
1339 +# CONFIG_GPIO_SYSFS is not set
1342 +# Memory mapped GPIO expanders:
1346 +# I2C GPIO expanders:
1350 +# PCI GPIO expanders:
1352 +# CONFIG_GPIO_BT8XX is not set
1355 +# SPI GPIO expanders:
1357 +# CONFIG_GPIO_MAX7301 is not set
1358 +# CONFIG_GPIO_MCP23S08 is not set
1359 +# CONFIG_W1 is not set
1360 +# CONFIG_POWER_SUPPLY is not set
1361 +# CONFIG_HWMON is not set
1362 +# CONFIG_THERMAL is not set
1363 +# CONFIG_THERMAL_HWMON is not set
1365 +# CONFIG_WATCHDOG_NOWAYOUT is not set
1368 +# Watchdog Device Drivers
1370 +# CONFIG_SOFT_WATCHDOG is not set
1371 +# CONFIG_ALIM7101_WDT is not set
1375 +# PCI-based Watchdog Cards
1377 +# CONFIG_PCIPCWATCHDOG is not set
1378 +# CONFIG_WDTPCI is not set
1381 +# USB-based Watchdog Cards
1383 +# CONFIG_USBPCWATCHDOG is not set
1384 +CONFIG_SSB_POSSIBLE=y
1387 +# Sonics Silicon Backplane
1389 +# CONFIG_SSB is not set
1392 +# Multifunction device drivers
1394 +# CONFIG_MFD_CORE is not set
1395 +# CONFIG_MFD_SM501 is not set
1396 +# CONFIG_HTC_PASIC3 is not set
1397 +# CONFIG_MFD_TMIO is not set
1398 +# CONFIG_REGULATOR is not set
1401 +# Multimedia devices
1405 +# Multimedia core support
1407 +# CONFIG_VIDEO_DEV is not set
1408 +# CONFIG_DVB_CORE is not set
1409 +# CONFIG_VIDEO_MEDIA is not set
1412 +# Multimedia drivers
1414 +# CONFIG_DAB is not set
1419 +# CONFIG_VGASTATE is not set
1420 +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
1421 +# CONFIG_FB is not set
1422 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1425 +# Display device support
1427 +# CONFIG_DISPLAY_SUPPORT is not set
1428 +# CONFIG_SOUND is not set
1429 +# CONFIG_HID_SUPPORT is not set
1430 +CONFIG_USB_SUPPORT=y
1431 +CONFIG_USB_ARCH_HAS_HCD=y
1432 +CONFIG_USB_ARCH_HAS_OHCI=y
1433 +CONFIG_USB_ARCH_HAS_EHCI=y
1435 +# CONFIG_USB_DEBUG is not set
1436 +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
1439 +# Miscellaneous USB options
1441 +CONFIG_USB_DEVICEFS=y
1442 +# CONFIG_USB_DEVICE_CLASS is not set
1443 +# CONFIG_USB_DYNAMIC_MINORS is not set
1444 +# CONFIG_USB_OTG is not set
1445 +# CONFIG_USB_OTG_WHITELIST is not set
1446 +# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1447 +# CONFIG_USB_MON is not set
1448 +# CONFIG_USB_WUSB is not set
1449 +# CONFIG_USB_WUSB_CBAF is not set
1452 +# USB Host Controller Drivers
1454 +# CONFIG_USB_C67X00_HCD is not set
1455 +# CONFIG_USB_EHCI_HCD is not set
1456 +# CONFIG_USB_ISP116X_HCD is not set
1457 +# CONFIG_USB_ISP1760_HCD is not set
1458 +# CONFIG_USB_OHCI_HCD is not set
1459 +# CONFIG_USB_UHCI_HCD is not set
1460 +# CONFIG_USB_SL811_HCD is not set
1461 +# CONFIG_USB_R8A66597_HCD is not set
1462 +# CONFIG_USB_WHCI_HCD is not set
1463 +# CONFIG_USB_HWA_HCD is not set
1464 +CONFIG_USB_MUSB_HDRC=y
1465 +# CONFIG_USB_TUSB6010 is not set
1466 +CONFIG_USB_MUSB_HOST=y
1467 +# CONFIG_USB_MUSB_PERIPHERAL is not set
1468 +# CONFIG_USB_MUSB_OTG is not set
1469 +CONFIG_USB_MUSB_HDRC_HCD=y
1470 +CONFIG_MUSB_PIO_ONLY=y
1471 +# CONFIG_USB_MUSB_DEBUG is not set
1474 +# USB Device Class drivers
1476 +# CONFIG_USB_ACM is not set
1477 +# CONFIG_USB_PRINTER is not set
1478 +# CONFIG_USB_WDM is not set
1479 +# CONFIG_USB_TMC is not set
1482 +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
1486 +# see USB_STORAGE Help for more information
1488 +CONFIG_USB_STORAGE=y
1489 +# CONFIG_USB_STORAGE_DEBUG is not set
1490 +# CONFIG_USB_STORAGE_DATAFAB is not set
1491 +# CONFIG_USB_STORAGE_FREECOM is not set
1492 +# CONFIG_USB_STORAGE_ISD200 is not set
1493 +# CONFIG_USB_STORAGE_DPCM is not set
1494 +# CONFIG_USB_STORAGE_USBAT is not set
1495 +# CONFIG_USB_STORAGE_SDDR09 is not set
1496 +# CONFIG_USB_STORAGE_SDDR55 is not set
1497 +# CONFIG_USB_STORAGE_JUMPSHOT is not set
1498 +# CONFIG_USB_STORAGE_ALAUDA is not set
1499 +# CONFIG_USB_STORAGE_ONETOUCH is not set
1500 +# CONFIG_USB_STORAGE_KARMA is not set
1501 +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1502 +CONFIG_USB_LIBUSUAL=y
1505 +# USB Imaging devices
1507 +# CONFIG_USB_MDC800 is not set
1508 +# CONFIG_USB_MICROTEK is not set
1513 +# CONFIG_USB_SERIAL is not set
1516 +# USB Miscellaneous drivers
1518 +# CONFIG_USB_EMI62 is not set
1519 +# CONFIG_USB_EMI26 is not set
1520 +# CONFIG_USB_ADUTUX is not set
1521 +# CONFIG_USB_SEVSEG is not set
1522 +# CONFIG_USB_RIO500 is not set
1523 +# CONFIG_USB_LEGOTOWER is not set
1524 +# CONFIG_USB_LCD is not set
1525 +# CONFIG_USB_BERRY_CHARGE is not set
1526 +# CONFIG_USB_LED is not set
1527 +# CONFIG_USB_CYPRESS_CY7C63 is not set
1528 +# CONFIG_USB_CYTHERM is not set
1529 +# CONFIG_USB_PHIDGET is not set
1530 +# CONFIG_USB_IDMOUSE is not set
1531 +# CONFIG_USB_FTDI_ELAN is not set
1532 +# CONFIG_USB_APPLEDISPLAY is not set
1533 +# CONFIG_USB_LD is not set
1534 +# CONFIG_USB_TRANCEVIBRATOR is not set
1535 +# CONFIG_USB_IOWARRIOR is not set
1536 +# CONFIG_USB_TEST is not set
1537 +# CONFIG_USB_ISIGHTFW is not set
1538 +# CONFIG_USB_VST is not set
1539 +# CONFIG_USB_GADGET is not set
1540 +# CONFIG_UWB is not set
1541 +# CONFIG_MMC is not set
1542 +# CONFIG_MEMSTICK is not set
1544 +CONFIG_LEDS_CLASS=y
1554 +# CONFIG_LEDS_TRIGGERS is not set
1555 +# CONFIG_ACCESSIBILITY is not set
1556 +# CONFIG_INFINIBAND is not set
1557 +# CONFIG_RTC_CLASS is not set
1558 +# CONFIG_DMADEVICES is not set
1559 +# CONFIG_UIO is not set
1560 +# CONFIG_STAGING is not set
1565 +# CONFIG_EXT2_FS is not set
1566 +# CONFIG_EXT3_FS is not set
1567 +# CONFIG_EXT4_FS is not set
1568 +# CONFIG_REISERFS_FS is not set
1569 +# CONFIG_JFS_FS is not set
1570 +# CONFIG_FS_POSIX_ACL is not set
1571 +CONFIG_FILE_LOCKING=y
1572 +# CONFIG_XFS_FS is not set
1573 +# CONFIG_OCFS2_FS is not set
1574 +# CONFIG_DNOTIFY is not set
1575 +# CONFIG_INOTIFY is not set
1576 +# CONFIG_QUOTA is not set
1578 +# CONFIG_AUTOFS4_FS is not set
1579 +# CONFIG_FUSE_FS is not set
1582 +# CD-ROM/DVD Filesystems
1584 +# CONFIG_ISO9660_FS is not set
1585 +# CONFIG_UDF_FS is not set
1588 +# DOS/FAT/NT Filesystems
1593 +CONFIG_FAT_DEFAULT_CODEPAGE=437
1594 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1595 +# CONFIG_NTFS_FS is not set
1598 +# Pseudo filesystems
1601 +CONFIG_PROC_SYSCTL=y
1603 +# CONFIG_TMPFS is not set
1604 +# CONFIG_HUGETLB_PAGE is not set
1605 +# CONFIG_CONFIGFS_FS is not set
1608 +# Layered filesystems
1611 +# CONFIG_UNION_FS_XATTR is not set
1612 +# CONFIG_UNION_FS_DEBUG is not set
1615 +# Miscellaneous filesystems
1617 +# CONFIG_ADFS_FS is not set
1618 +# CONFIG_AFFS_FS is not set
1619 +# CONFIG_HFS_FS is not set
1620 +# CONFIG_HFSPLUS_FS is not set
1621 +# CONFIG_BEFS_FS is not set
1622 +# CONFIG_BFS_FS is not set
1623 +# CONFIG_EFS_FS is not set
1625 +CONFIG_JFFS2_FS_DEBUG=0
1626 +CONFIG_JFFS2_FS_WRITEBUFFER=y
1627 +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1628 +# CONFIG_JFFS2_SUMMARY is not set
1629 +# CONFIG_JFFS2_FS_XATTR is not set
1630 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1631 +CONFIG_JFFS2_ZLIB=y
1632 +# CONFIG_JFFS2_LZO is not set
1633 +CONFIG_JFFS2_RTIME=y
1634 +# CONFIG_JFFS2_RUBIN is not set
1635 +# CONFIG_CRAMFS is not set
1636 +# CONFIG_VXFS_FS is not set
1637 +# CONFIG_MINIX_FS is not set
1638 +# CONFIG_OMFS_FS is not set
1639 +# CONFIG_HPFS_FS is not set
1640 +# CONFIG_QNX4FS_FS is not set
1642 +# CONFIG_SYSV_FS is not set
1643 +# CONFIG_UFS_FS is not set
1644 +# CONFIG_NETWORK_FILESYSTEMS is not set
1649 +CONFIG_PARTITION_ADVANCED=y
1650 +# CONFIG_ACORN_PARTITION is not set
1651 +# CONFIG_OSF_PARTITION is not set
1652 +# CONFIG_AMIGA_PARTITION is not set
1653 +# CONFIG_ATARI_PARTITION is not set
1654 +# CONFIG_MAC_PARTITION is not set
1655 +CONFIG_MSDOS_PARTITION=y
1656 +# CONFIG_BSD_DISKLABEL is not set
1657 +# CONFIG_MINIX_SUBPARTITION is not set
1658 +# CONFIG_SOLARIS_X86_PARTITION is not set
1659 +# CONFIG_UNIXWARE_DISKLABEL is not set
1660 +CONFIG_LDM_PARTITION=y
1662 +# CONFIG_SGI_PARTITION is not set
1663 +# CONFIG_ULTRIX_PARTITION is not set
1664 +# CONFIG_SUN_PARTITION is not set
1665 +# CONFIG_KARMA_PARTITION is not set
1666 +# CONFIG_EFI_PARTITION is not set
1667 +# CONFIG_SYSV68_PARTITION is not set
1669 +CONFIG_NLS_DEFAULT="iso8859-1"
1670 +CONFIG_NLS_CODEPAGE_437=y
1671 +# CONFIG_NLS_CODEPAGE_737 is not set
1672 +# CONFIG_NLS_CODEPAGE_775 is not set
1673 +# CONFIG_NLS_CODEPAGE_850 is not set
1674 +# CONFIG_NLS_CODEPAGE_852 is not set
1675 +# CONFIG_NLS_CODEPAGE_855 is not set
1676 +# CONFIG_NLS_CODEPAGE_857 is not set
1677 +# CONFIG_NLS_CODEPAGE_860 is not set
1678 +# CONFIG_NLS_CODEPAGE_861 is not set
1679 +# CONFIG_NLS_CODEPAGE_862 is not set
1680 +# CONFIG_NLS_CODEPAGE_863 is not set
1681 +# CONFIG_NLS_CODEPAGE_864 is not set
1682 +# CONFIG_NLS_CODEPAGE_865 is not set
1683 +# CONFIG_NLS_CODEPAGE_866 is not set
1684 +# CONFIG_NLS_CODEPAGE_869 is not set
1685 +# CONFIG_NLS_CODEPAGE_936 is not set
1686 +# CONFIG_NLS_CODEPAGE_950 is not set
1687 +# CONFIG_NLS_CODEPAGE_932 is not set
1688 +# CONFIG_NLS_CODEPAGE_949 is not set
1689 +# CONFIG_NLS_CODEPAGE_874 is not set
1690 +# CONFIG_NLS_ISO8859_8 is not set
1691 +# CONFIG_NLS_CODEPAGE_1250 is not set
1692 +# CONFIG_NLS_CODEPAGE_1251 is not set
1694 +CONFIG_NLS_ISO8859_1=y
1695 +# CONFIG_NLS_ISO8859_2 is not set
1696 +# CONFIG_NLS_ISO8859_3 is not set
1697 +# CONFIG_NLS_ISO8859_4 is not set
1698 +# CONFIG_NLS_ISO8859_5 is not set
1699 +# CONFIG_NLS_ISO8859_6 is not set
1700 +# CONFIG_NLS_ISO8859_7 is not set
1701 +# CONFIG_NLS_ISO8859_9 is not set
1702 +# CONFIG_NLS_ISO8859_13 is not set
1703 +# CONFIG_NLS_ISO8859_14 is not set
1704 +CONFIG_NLS_ISO8859_15=y
1705 +# CONFIG_NLS_KOI8_R is not set
1706 +# CONFIG_NLS_KOI8_U is not set
1708 +# CONFIG_DLM is not set
1713 +# CONFIG_KEYS is not set
1714 +# CONFIG_SECURITY is not set
1715 +# CONFIG_SECURITYFS is not set
1716 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1720 +# Crypto core or helper
1722 +# CONFIG_CRYPTO_FIPS is not set
1723 +CONFIG_CRYPTO_ALGAPI=y
1724 +CONFIG_CRYPTO_ALGAPI2=y
1725 +CONFIG_CRYPTO_AEAD2=y
1726 +CONFIG_CRYPTO_BLKCIPHER=y
1727 +CONFIG_CRYPTO_BLKCIPHER2=y
1728 +CONFIG_CRYPTO_HASH2=y
1729 +CONFIG_CRYPTO_RNG2=y
1730 +CONFIG_CRYPTO_MANAGER=y
1731 +CONFIG_CRYPTO_MANAGER2=y
1732 +# CONFIG_CRYPTO_GF128MUL is not set
1733 +# CONFIG_CRYPTO_NULL is not set
1734 +# CONFIG_CRYPTO_CRYPTD is not set
1735 +# CONFIG_CRYPTO_AUTHENC is not set
1736 +# CONFIG_CRYPTO_TEST is not set
1739 +# Authenticated Encryption with Associated Data
1741 +# CONFIG_CRYPTO_CCM is not set
1742 +# CONFIG_CRYPTO_GCM is not set
1743 +# CONFIG_CRYPTO_SEQIV is not set
1748 +# CONFIG_CRYPTO_CBC is not set
1749 +# CONFIG_CRYPTO_CTR is not set
1750 +# CONFIG_CRYPTO_CTS is not set
1751 +CONFIG_CRYPTO_ECB=y
1752 +# CONFIG_CRYPTO_LRW is not set
1753 +# CONFIG_CRYPTO_PCBC is not set
1754 +# CONFIG_CRYPTO_XTS is not set
1759 +# CONFIG_CRYPTO_HMAC is not set
1760 +# CONFIG_CRYPTO_XCBC is not set
1765 +# CONFIG_CRYPTO_CRC32C is not set
1766 +# CONFIG_CRYPTO_MD4 is not set
1767 +# CONFIG_CRYPTO_MD5 is not set
1768 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
1769 +# CONFIG_CRYPTO_RMD128 is not set
1770 +# CONFIG_CRYPTO_RMD160 is not set
1771 +# CONFIG_CRYPTO_RMD256 is not set
1772 +# CONFIG_CRYPTO_RMD320 is not set
1773 +# CONFIG_CRYPTO_SHA1 is not set
1774 +# CONFIG_CRYPTO_SHA256 is not set
1775 +# CONFIG_CRYPTO_SHA512 is not set
1776 +# CONFIG_CRYPTO_TGR192 is not set
1777 +# CONFIG_CRYPTO_WP512 is not set
1782 +CONFIG_CRYPTO_AES=y
1783 +# CONFIG_CRYPTO_ANUBIS is not set
1784 +CONFIG_CRYPTO_ARC4=y
1785 +# CONFIG_CRYPTO_BLOWFISH is not set
1786 +# CONFIG_CRYPTO_CAMELLIA is not set
1787 +# CONFIG_CRYPTO_CAST5 is not set
1788 +# CONFIG_CRYPTO_CAST6 is not set
1789 +# CONFIG_CRYPTO_DES is not set
1790 +# CONFIG_CRYPTO_FCRYPT is not set
1791 +# CONFIG_CRYPTO_KHAZAD is not set
1792 +# CONFIG_CRYPTO_SALSA20 is not set
1793 +# CONFIG_CRYPTO_SEED is not set
1794 +# CONFIG_CRYPTO_SERPENT is not set
1795 +# CONFIG_CRYPTO_TEA is not set
1796 +# CONFIG_CRYPTO_TWOFISH is not set
1801 +# CONFIG_CRYPTO_DEFLATE is not set
1802 +# CONFIG_CRYPTO_LZO is not set
1805 +# Random Number Generation
1807 +# CONFIG_CRYPTO_ANSI_CPRNG is not set
1808 +# CONFIG_CRYPTO_HW is not set
1811 +# OCF Configuration
1813 +# CONFIG_OCF_OCF is not set
1818 +CONFIG_BITREVERSE=y
1820 +# CONFIG_CRC16 is not set
1821 +# CONFIG_CRC_T10DIF is not set
1822 +# CONFIG_CRC_ITU_T is not set
1824 +# CONFIG_CRC7 is not set
1825 +# CONFIG_LIBCRC32C is not set
1826 +CONFIG_ZLIB_INFLATE=y
1827 +CONFIG_ZLIB_DEFLATE=y
1828 +CONFIG_TEXTSEARCH=y
1829 +CONFIG_TEXTSEARCH_KMP=y
1830 +CONFIG_TEXTSEARCH_BM=y
1831 +CONFIG_TEXTSEARCH_FSM=y
1834 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/a.out.h linux-2.6.28.10/arch/ubicom32/include/asm/a.out.h
1835 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/a.out.h 1970-01-01 02:00:00.000000000 +0200
1836 +++ linux-2.6.28.10/arch/ubicom32/include/asm/a.out.h 2009-08-06 10:31:02.000000000 +0300
1839 + * arch/ubicom32/include/asm/a.out.h
1840 + * Definitions for Ubicom32 a.out executable format.
1842 + * (C) Copyright 2009, Ubicom, Inc.
1844 + * This file is part of the Ubicom32 Linux Kernel Port.
1846 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
1847 + * it and/or modify it under the terms of the GNU General Public License
1848 + * as published by the Free Software Foundation, either version 2 of the
1849 + * License, or (at your option) any later version.
1851 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
1852 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
1853 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
1854 + * the GNU General Public License for more details.
1856 + * You should have received a copy of the GNU General Public License
1857 + * along with the Ubicom32 Linux Kernel Port. If not,
1858 + * see <http://www.gnu.org/licenses/>.
1860 + * Ubicom32 implementation derived from (with many thanks):
1865 +#ifndef _ASM_UBICOM32_A_OUT_H
1866 +#define _ASM_UBICOM32_A_OUT_H
1870 + unsigned long a_info; /* Use macros N_MAGIC, etc for access */
1871 + unsigned a_text; /* length of text, in bytes */
1872 + unsigned a_data; /* length of data, in bytes */
1873 + unsigned a_bss; /* length of uninitialized data area for file, in bytes */
1874 + unsigned a_syms; /* length of symbol table data in file, in bytes */
1875 + unsigned a_entry; /* start address */
1876 + unsigned a_trsize; /* length of relocation info for text, in bytes */
1877 + unsigned a_drsize; /* length of relocation info for data, in bytes */
1880 +#define N_TRSIZE(a) ((a).a_trsize)
1881 +#define N_DRSIZE(a) ((a).a_drsize)
1882 +#define N_SYMSIZE(a) ((a).a_syms)
1884 +#endif /* _ASM_UBICOM32_A_OUT_H */
1885 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/atomic.h linux-2.6.28.10/arch/ubicom32/include/asm/atomic.h
1886 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/atomic.h 1970-01-01 02:00:00.000000000 +0200
1887 +++ linux-2.6.28.10/arch/ubicom32/include/asm/atomic.h 2009-08-06 10:31:02.000000000 +0300
1890 + * arch/ubicom32/include/asm/atomic.h
1891 + * Atomic operations definitions for Ubicom32 architecture.
1893 + * (C) Copyright 2009, Ubicom, Inc.
1895 + * This file is part of the Ubicom32 Linux Kernel Port.
1897 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
1898 + * it and/or modify it under the terms of the GNU General Public License
1899 + * as published by the Free Software Foundation, either version 2 of the
1900 + * License, or (at your option) any later version.
1902 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
1903 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
1904 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
1905 + * the GNU General Public License for more details.
1907 + * You should have received a copy of the GNU General Public License
1908 + * along with the Ubicom32 Linux Kernel Port. If not,
1909 + * see <http://www.gnu.org/licenses/>.
1911 + * Ubicom32 implementation derived from (with many thanks):
1916 +#ifndef _ASM_UBICOM32_ATOMIC_H
1917 +#define _ASM_UBICOM32_ATOMIC_H
1919 +#include <asm/system.h>
1920 +#include <asm/ubicom32-common.h>
1921 +#include <asm/types.h>
1924 + * Most instructions on the Ubicom32 processor are atomic in that they
1925 + * execute in one clock cycle. However, Linux has several operations
1926 + * (e.g. compare and swap) which will require more than a single instruction
1927 + * to perform. To achieve this, the Ubicom32 processor uses a single
1928 + * global bit in a scratchpad register as a critical section lock. All
1929 + * atomic operations acquire this lock.
1931 + * NOTE: To AVOID DEADLOCK(s), the atomic lock must only be used for atomic
1932 + * operations or by the ldsr to avoid disabling a thread performing an atomic
1935 + * Do not attempt to disable interrupts while holding the atomic operations
1936 + * lock or you will DEADLOCK the system.
1940 + volatile int counter;
1943 +#define ATOMIC_INIT(i) { (i) }
1947 + * Add i to v and return the result.
1949 +static inline void __atomic_add(int i, atomic_t *v)
1953 + __atomic_lock_acquire();
1955 + __atomic_lock_release();
1960 + * Subtract i from v and return the result.
1962 +static inline void __atomic_sub(int i, atomic_t *v)
1966 + __atomic_lock_acquire();
1968 + __atomic_lock_release();
1972 + * __atomic_add_return()
1973 + * Add i to v and return the result.
1975 + * The implementation here looks rather odd because we appear to be doing
1976 + * the addition twice. In fact that's exactly what we're doing but with
1977 + * the ubicom32 instruction set we can do the inner load and add with two
1978 + * instructions whereas generating both the atomic result and the "ret"
1979 + * result requires three instructions. The second add is generally only as
1980 + * costly as a move instruction and in cases where we compare the result
1981 + * with a constant the compiler can fold two constant values and do a
1982 + * single instruction, thus saving an instruction overall!
1984 + * At the worst we save one instruction inside the atomic lock.
1986 +static inline int __atomic_add_return(int i, atomic_t *v)
1991 + __atomic_lock_acquire();
1992 + ret = vt->counter;
1993 + vt->counter = ret + i;
1994 + __atomic_lock_release();
2000 + * __atomic_sub_return()
2001 + * Subtract i from v and return the result.
2003 + * The implementation here looks rather odd because we appear to be doing
2004 + * the subtraction twice. In fact that's exactly what we're doing but with
2005 + * the ubicom32 instruction set we can do the inner load and sub with two
2006 + * instructions whereas generating both the atomic result and the "ret"
2007 + * result requires three instructions. The second sub is generally only as
2008 + * costly as a move instruction and in cases where we compare the result
2009 + * with a constant the compiler can fold two constant values and do a
2010 + * single instruction, thus saving an instruction overall!
2012 + * At the worst we save one instruction inside the atomic lock.
2014 +static inline int __atomic_sub_return(int i, atomic_t *v)
2019 + __atomic_lock_acquire();
2020 + ret = vt->counter;
2021 + vt->counter = ret - i;
2022 + __atomic_lock_release();
2028 + * PUBLIC API FOR ATOMIC!
2030 +#define atomic_add(i,v) (__atomic_add( ((int)i),(v)))
2031 +#define atomic_sub(i,v) (__atomic_sub( ((int)i),(v)))
2032 +#define atomic_inc(v) (__atomic_add( 1,(v)))
2033 +#define atomic_dec(v) (__atomic_sub( 1,(v)))
2034 +#define atomic_add_return(i,v) (__atomic_add_return( ((int)i),(v)))
2035 +#define atomic_sub_return(i,v) (__atomic_sub_return( ((int)i),(v)))
2036 +#define atomic_inc_return(v) (__atomic_add_return( 1,(v)))
2037 +#define atomic_dec_return(v) (__atomic_sub_return( 1,(v)))
2038 +#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)
2039 +#define atomic_dec_and_test(v) (atomic_dec_return(v) == 0)
2040 +#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)
2041 +#define atomic_sub_and_test(i,v) (atomic_sub_return((i),(v)) == 0)
2045 + * Acquire the atomic lock and read the variable.
2047 +static inline int atomic_read(const atomic_t *v)
2050 + const atomic_t *vt = v;
2052 + __atomic_lock_acquire();
2053 + ret = vt->counter;
2054 + __atomic_lock_release();
2061 + * Acquire the atomic lock and set the variable.
2063 +static inline void atomic_set(atomic_t *v, int i)
2067 + __atomic_lock_acquire();
2069 + __atomic_lock_release();
2074 + * Acquire the atomic lock and exchange if current == old.
2076 +static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
2081 + __atomic_lock_acquire();
2082 + prev = vt->counter;
2083 + if (prev == old) {
2084 + vt->counter = new;
2086 + __atomic_lock_release();
2093 + * Acquire the atomic lock and exchange values.
2095 +static inline int atomic_xchg(atomic_t *v, int new)
2100 + __atomic_lock_acquire();
2101 + prev = vt->counter;
2102 + vt->counter = new;
2103 + __atomic_lock_release();
2109 + * atomic_add_unless()
2110 + * Acquire the atomic lock and add a unless the value is u.
2112 +static inline int atomic_add_unless(atomic_t *v, int a, int u)
2117 + __atomic_lock_acquire();
2118 + prev = vt->counter;
2121 + __atomic_lock_release();
2125 + __atomic_lock_release();
2129 +#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
2131 +#include <asm-generic/atomic.h>
2134 + * The following is not a real function. The compiler should remove the function
2135 + * call as long as the user does not pass in a size that __xchg and __cmpxchg
2136 + * are not prepared for. If the user does pass in an unknown size, the user
2137 + * will get a link time error.
2139 + * The no return is to prevent a compiler error that can occur when dealing with
2140 + * uninitialized variables. Given that the function doesn't exist there is no
2141 + * net effect (and if it did it would not return).
2143 +extern void __xchg_called_with_bad_pointer(void) __attribute__((noreturn));
2147 + * Xchange *ptr for x atomically.
2149 + * Must be both locally atomic and atomic on SMP. Ubicom32 does not have an
2150 + * atomic exchange instruction so we use the global atomic_lock.
2152 +static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
2154 + unsigned long ret;
2156 + __atomic_lock_acquire();
2160 + ret = *(volatile unsigned char *)ptr;
2161 + *(volatile unsigned char *)ptr = x;
2165 + ret = *(volatile unsigned short *)ptr;
2166 + *(volatile unsigned short *)ptr = x;
2170 + ret = *(volatile unsigned int *)ptr;
2171 + *(volatile unsigned int *)ptr = x;
2175 + __xchg_called_with_bad_pointer();
2178 + __atomic_lock_release();
2182 +#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
2186 + * Compare and Xchange *ptr for x atomically.
2188 + * Must be both locally atomic and atomic on SMP. Ubicom32 does not have an
2189 + * atomic exchange instruction so we use the global atomic_lock.
2191 +static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, unsigned long next, int size)
2193 + unsigned long prev;
2195 + __atomic_lock_acquire();
2198 + prev = *(u8 *)ptr;
2199 + if (prev == old) {
2200 + *(u8 *)ptr = (u8)next;
2205 + prev = *(u16 *)ptr;
2206 + if (prev == old) {
2207 + *(u16 *)ptr = (u16)next;
2212 + prev = *(u32 *)ptr;
2213 + if (prev == old) {
2214 + *(u32 *)ptr = (u32)next;
2219 + __xchg_called_with_bad_pointer();
2222 + __atomic_lock_release();
2227 + * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
2230 +#define cmpxchg_local(ptr, o, n) \
2231 + ((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(o), (unsigned long)(n), sizeof(*(ptr))))
2233 +#define cmpxchg(ptr, o, n) __cmpxchg((ptr), (o), (n), sizeof(*(ptr)))
2235 +#define smp_mb__before_atomic_inc() asm volatile ("" : : : "memory")
2236 +#define smp_mb__after_atomic_inc() asm volatile ("" : : : "memory")
2237 +#define smp_mb__before_atomic_dec() asm volatile ("" : : : "memory")
2238 +#define smp_mb__after_atomic_dec() asm volatile ("" : : : "memory")
2240 +#endif /* _ASM_UBICOM32_ATOMIC_H */
2241 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/audio_tio.h linux-2.6.28.10/arch/ubicom32/include/asm/audio_tio.h
2242 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/audio_tio.h 1970-01-01 02:00:00.000000000 +0200
2243 +++ linux-2.6.28.10/arch/ubicom32/include/asm/audio_tio.h 2009-08-06 10:31:02.000000000 +0300
2246 + * arch/ubicom32/include/asm/audio_tio.h
2247 + * AudioTIO include file
2249 + * (C) Copyright 2009, Ubicom, Inc.
2251 + * This file is part of the Ubicom32 Linux Kernel Port.
2253 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
2254 + * it and/or modify it under the terms of the GNU General Public License
2255 + * as published by the Free Software Foundation, either version 2 of the
2256 + * License, or (at your option) any later version.
2258 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
2259 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
2260 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
2261 + * the GNU General Public License for more details.
2263 + * You should have received a copy of the GNU General Public License
2264 + * along with the Ubicom32 Linux Kernel Port. If not,
2265 + * see <http://www.gnu.org/licenses/>.
2268 +#ifndef _AUDIO_TIO_H
2269 +#define _AUDIO_TIO_H
2271 +#include <asm/devtree.h>
2272 +#include <asm/ubi32-pcm.h>
2274 +#define UBI32_AUDIO_INT_FLAG_MORE_SAMPLES 0x00000001
2275 +#define UBI32_AUDIO_INT_FLAG_COMMAND 0x00000002
2278 + * Commands the Primary OS sends to the audio device
2280 +enum ubi32_audio_command {
2281 + UBI32_AUDIO_CMD_NONE,
2282 + UBI32_AUDIO_CMD_START,
2283 + UBI32_AUDIO_CMD_STOP,
2284 + UBI32_AUDIO_CMD_PAUSE,
2285 + UBI32_AUDIO_CMD_RESUME,
2286 + UBI32_AUDIO_CMD_MUTE,
2287 + UBI32_AUDIO_CMD_UNMUTE,
2288 + UBI32_AUDIO_CMD_SETUP,
2289 + UBI32_AUDIO_CMD_ENABLE,
2290 + UBI32_AUDIO_CMD_DISABLE,
2294 + * Flag bits passed in the registers
2296 +#define UBI32_CMD_SETUP_FLAG_LE (1 << 0) /* Use Little Endian Mode */
2299 + * Status bits that audio device can set to indicate reason
2300 + * for interrupting the Primary OS
2302 +#define UBI32_AUDIO_STATUS_PLAY_DMA0_REQUEST (1 << 0) /* Audio device needs samples in DMA0 for playback */
2303 +#define UBI32_AUDIO_STATUS_PLAY_DMA1_REQUEST (1 << 1) /* Audio device needs samples in DMA1 for playback */
2305 +struct ubi32_audio_dma {
2307 + * NOTE: The active flag shall only be SET by the producer and CLEARED
2308 + * by the consumer, NEVER the other way around. For playback, the
2309 + * Primary OS sets this flag and ipAudioTIO clears it.
2311 + * The producer shall not modify the ptr or ctr fields when the transfer
2312 + * is marked as active, as these are used by the consumer to do the
2315 + volatile uint32_t active; /* Nonzero if data in ptr/ctr ready to be transferred */
2316 + //volatile u32_t active; /* Nonzero if data in ptr/ctr ready to be transferred */
2317 + volatile void *ptr; /* Pointer to data to be transferred */
2318 + volatile uint32_t ctr; /* Counter: number of data units to transfer */
2319 + //volatile u32_t ctr; /* Counter: number of data units to transfer */
2322 +#define AUDIOTIONODE_CAP_BE (1 << 0)
2323 +#define AUDIOTIONODE_CAP_LE (1 << 1)
2326 + * Resource indices used to access IRQs via platform_get_resource
2328 +#define AUDIOTIO_MEM_RESOURCE 0
2329 +#define AUDIOTIO_TX_IRQ_RESOURCE 0
2330 +#define AUDIOTIO_RX_IRQ_RESOURCE 1
2332 +#define AUDIOTIONODE_VERSION 5
2333 +struct audiotionode {
2334 + struct devtree_node dn;
2335 + uint32_t version; /* Version of this node */
2336 + struct audiotioregs *regs;
2339 +#define AUDIOTIOREGS_VERSION 3
2340 +struct audiotioregs {
2342 + uint32_t caps; /* Capabilities of the driver */
2343 + u32_t *sample_rates; /* Sample Rates supported by this driver */
2344 + u32_t n_sample_rates; /* Number of sample rates supported by this driver */
2345 + u32_t channel_mask; /* The channel configs supported by this driver (bit 1 = 1 channel, etc) */
2346 + volatile uint32_t int_flags; /* Reason for interrupting audio device */
2347 + volatile enum ubi32_audio_command command; /* Command from Primary OS */
2348 + volatile uint32_t flags; /* Flag bits for this command */
2349 + volatile uint32_t channels; /* Number of channels in stream */
2350 + volatile uint32_t sample_rate; /* Sample rate */
2351 + volatile uint32_t status; /* Status bits sent from AudioTIO to Primary OS */
2352 + volatile void *current_read_pos; /* Position of next sample to be removed from Primary OS sample buffer */
2355 + * These are the transfer requests. They are used in alternating
2356 + * order so that when ipAudioTIO is processing one request, the
2357 + * Primary OS can fill in the other one.
2359 + * NOTE: The active bit shall always be SET by the producer and
2360 + * CLEARED by the consumer, NEVER the other way around.
2362 + struct ubi32_audio_dma playback_xfer_requests[2];
2365 +extern struct platform_device * __init audio_tio_alloc(const char *driver_name, const char *node_name, int priv_size);
2367 +#define audio_tio_priv(pdev) (((struct ubi32pcm_platform_data *)(((struct platform_device *)(pdev))->dev.platform_data))->priv_data)
2369 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/auxvec.h linux-2.6.28.10/arch/ubicom32/include/asm/auxvec.h
2370 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/auxvec.h 1970-01-01 02:00:00.000000000 +0200
2371 +++ linux-2.6.28.10/arch/ubicom32/include/asm/auxvec.h 2009-08-06 10:31:02.000000000 +0300
2374 + * arch/ubicom32/include/asm/auxvec.h
2375 + * Symbolic values for the entries in the auxiliary table
2376 + * put on the initial stack.
2378 + * (C) Copyright 2009, Ubicom, Inc.
2380 + * This file is part of the Ubicom32 Linux Kernel Port.
2382 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
2383 + * it and/or modify it under the terms of the GNU General Public License
2384 + * as published by the Free Software Foundation, either version 2 of the
2385 + * License, or (at your option) any later version.
2387 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
2388 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
2389 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
2390 + * the GNU General Public License for more details.
2392 + * You should have received a copy of the GNU General Public License
2393 + * along with the Ubicom32 Linux Kernel Port. If not,
2394 + * see <http://www.gnu.org/licenses/>.
2396 + * Ubicom32 implementation derived from (with many thanks):
2401 +#ifndef _ASM_UBICOM32_AUXVEC_H
2402 +#define _ASM_UBICOM32_AUXVEC_H
2404 +#endif /* _ASM_UBICOM32_AUXVEC_H */
2405 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/bitops.h linux-2.6.28.10/arch/ubicom32/include/asm/bitops.h
2406 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/bitops.h 1970-01-01 02:00:00.000000000 +0200
2407 +++ linux-2.6.28.10/arch/ubicom32/include/asm/bitops.h 2009-08-06 10:31:02.000000000 +0300
2410 + * arch/ubicom32/include/asm/bitops.h
2411 + * Bit manipulation definitions for Ubicom32 architecture.
2413 + * (C) Copyright 2009, Ubicom, Inc.
2415 + * This file is part of the Ubicom32 Linux Kernel Port.
2417 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
2418 + * it and/or modify it under the terms of the GNU General Public License
2419 + * as published by the Free Software Foundation, either version 2 of the
2420 + * License, or (at your option) any later version.
2422 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
2423 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
2424 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
2425 + * the GNU General Public License for more details.
2427 + * You should have received a copy of the GNU General Public License
2428 + * along with the Ubicom32 Linux Kernel Port. If not,
2429 + * see <http://www.gnu.org/licenses/>.
2431 + * Ubicom32 implementation derived from (with many thanks):
2436 +#ifndef _ASM_UBICOM32_BITOPS_H
2437 +#define _ASM_UBICOM32_BITOPS_H
2440 + * Copyright 1992, Linus Torvalds.
2443 +#include <linux/compiler.h>
2444 +#include <asm/byteorder.h> /* swab32 */
2448 +#ifndef _LINUX_BITOPS_H
2449 +#error only <linux/bitops.h> can be included directly
2452 +#include <asm-generic/bitops/ffs.h>
2453 +#include <asm-generic/bitops/__ffs.h>
2455 +#include <asm-generic/bitops/sched.h>
2456 +#include <asm-generic/bitops/ffz.h>
2458 +#include <asm/ubicom32-common.h>
2460 +static inline void set_bit(int bit, volatile unsigned long *p)
2462 + unsigned long mask = 1UL << (bit & 31);
2466 + __atomic_lock_acquire();
2468 + __atomic_lock_release();
2471 +static inline void clear_bit(int bit, volatile unsigned long *p)
2473 + unsigned long mask = 1UL << (bit & 31);
2477 + __atomic_lock_acquire();
2479 + __atomic_lock_release();
2483 + * clear_bit() doesn't provide any barrier for the compiler.
2485 +#define smp_mb__before_clear_bit() barrier()
2486 +#define smp_mb__after_clear_bit() barrier()
2488 +static inline void change_bit(int bit, volatile unsigned long *p)
2490 + unsigned long mask = 1UL << (bit & 31);
2494 + __atomic_lock_acquire();
2496 + __atomic_lock_release();
2499 +static inline int test_and_set_bit(int bit, volatile unsigned long *p)
2502 + unsigned long mask = 1UL << (bit & 31);
2506 + __atomic_lock_acquire();
2509 + __atomic_lock_release();
2511 + return res & mask;
2514 +static inline int test_and_clear_bit(int bit, volatile unsigned long *p)
2517 + unsigned long mask = 1UL << (bit & 31);
2521 + __atomic_lock_acquire();
2524 + __atomic_lock_release();
2526 + return res & mask;
2529 +static inline int test_and_change_bit(int bit, volatile unsigned long *p)
2532 + unsigned long mask = 1UL << (bit & 31);
2536 + __atomic_lock_acquire();
2539 + __atomic_lock_release();
2541 + return res & mask;
2544 +#include <asm-generic/bitops/non-atomic.h>
2547 + * This routine doesn't need to be atomic.
2549 +static inline int __constant_test_bit(int nr, const volatile unsigned long *addr)
2551 + return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0;
2554 +static inline int __test_bit(int nr, const volatile unsigned long *addr)
2556 + int * a = (int *) addr;
2560 + mask = 1 << (nr & 0x1f);
2561 + return ((mask & *a) != 0);
2564 +#define test_bit(nr,addr) (__builtin_constant_p(nr) ? __constant_test_bit((nr),(addr)) : __test_bit((nr),(addr)))
2566 +#include <asm-generic/bitops/find.h>
2567 +#include <asm-generic/bitops/hweight.h>
2568 +#include <asm-generic/bitops/lock.h>
2570 +#include <asm-generic/bitops/ext2-non-atomic.h>
2571 +#include <asm-generic/bitops/ext2-atomic.h>
2572 +#include <asm-generic/bitops/minix.h>
2574 +#endif /* __KERNEL__ */
2576 +#include <asm-generic/bitops/fls.h>
2577 +#include <asm-generic/bitops/fls64.h>
2579 +#endif /* _ASM_UBICOM32_BITOPS_H */
2580 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/board.h linux-2.6.28.10/arch/ubicom32/include/asm/board.h
2581 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/board.h 1970-01-01 02:00:00.000000000 +0200
2582 +++ linux-2.6.28.10/arch/ubicom32/include/asm/board.h 2009-08-06 10:31:02.000000000 +0300
2585 + * arch/ubicom32/include/asm/board.h
2586 + * Board init and revision definitions for Ubicom32 architecture.
2588 + * (C) Copyright 2009, Ubicom, Inc.
2590 + * This file is part of the Ubicom32 Linux Kernel Port.
2592 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
2593 + * it and/or modify it under the terms of the GNU General Public License
2594 + * as published by the Free Software Foundation, either version 2 of the
2595 + * License, or (at your option) any later version.
2597 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
2598 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
2599 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
2600 + * the GNU General Public License for more details.
2602 + * You should have received a copy of the GNU General Public License
2603 + * along with the Ubicom32 Linux Kernel Port. If not,
2604 + * see <http://www.gnu.org/licenses/>.
2606 + * Ubicom32 implementation derived from (with many thanks):
2611 +#ifndef _ASM_UBICOM32_BOARD_H
2612 +#define _ASM_UBICOM32_BOARD_H
2614 +extern const char *board_get_revision(void);
2615 +extern void __init board_init(void);
2617 +#endif /* _ASM_UBICOM32_BOARD_H */
2618 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/bootargs.h linux-2.6.28.10/arch/ubicom32/include/asm/bootargs.h
2619 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/bootargs.h 1970-01-01 02:00:00.000000000 +0200
2620 +++ linux-2.6.28.10/arch/ubicom32/include/asm/bootargs.h 2009-08-06 10:31:02.000000000 +0300
2623 + * arch/ubicom32/include/asm/bootargs.h
2624 + * Kernel command line via the devtree API.
2626 + * (C) Copyright 2009, Ubicom, Inc.
2628 + * This file is part of the Ubicom32 Linux Kernel Port.
2630 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
2631 + * it and/or modify it under the terms of the GNU General Public License
2632 + * as published by the Free Software Foundation, either version 2 of the
2633 + * License, or (at your option) any later version.
2635 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
2636 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
2637 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
2638 + * the GNU General Public License for more details.
2640 + * You should have received a copy of the GNU General Public License
2641 + * along with the Ubicom32 Linux Kernel Port. If not,
2642 + * see <http://www.gnu.org/licenses/>.
2644 + * Ubicom32 implementation derived from (with many thanks):
2649 +#ifndef _ASM_UBICOM32_BOOTARGS_H
2650 +#define _ASM_UBICOM32_BOOTARGS_H
2652 +extern const char *bootargs_get_cmdline(void);
2653 +extern void __init bootargs_init(void);
2655 +#endif /* _ASM_UBICOM32_BOOTARGS_H */
2656 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/bootinfo.h linux-2.6.28.10/arch/ubicom32/include/asm/bootinfo.h
2657 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/bootinfo.h 1970-01-01 02:00:00.000000000 +0200
2658 +++ linux-2.6.28.10/arch/ubicom32/include/asm/bootinfo.h 2009-08-06 10:31:02.000000000 +0300
2661 + * arch/ubicom32/include/asm/bootinfo.h
2662 + * Definitions of firmware boot parameters passed to the kernel.
2664 + * (C) Copyright 2009, Ubicom, Inc.
2666 + * This file is part of the Ubicom32 Linux Kernel Port.
2668 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
2669 + * it and/or modify it under the terms of the GNU General Public License
2670 + * as published by the Free Software Foundation, either version 2 of the
2671 + * License, or (at your option) any later version.
2673 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
2674 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
2675 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
2676 + * the GNU General Public License for more details.
2678 + * You should have received a copy of the GNU General Public License
2679 + * along with the Ubicom32 Linux Kernel Port. If not,
2680 + * see <http://www.gnu.org/licenses/>.
2682 + * Ubicom32 implementation derived from (with many thanks):
2688 +#ifndef _ASM_UBICOM32_BOOTINFO_H
2689 +#define _ASM_UBICOM32_BOOTINFO_H
2691 +/* Nothing for ubicom32 */
2693 +#endif /* _ASM_UBICOM32_BOOTINFO_H */
2694 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/bug.h linux-2.6.28.10/arch/ubicom32/include/asm/bug.h
2695 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/bug.h 1970-01-01 02:00:00.000000000 +0200
2696 +++ linux-2.6.28.10/arch/ubicom32/include/asm/bug.h 2009-08-06 10:31:02.000000000 +0300
2699 + * arch/ubicom32/include/asm/bug.h
2700 + * Generic bug.h for Ubicom32 architecture.
2702 + * (C) Copyright 2009, Ubicom, Inc.
2704 + * This file is part of the Ubicom32 Linux Kernel Port.
2706 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
2707 + * it and/or modify it under the terms of the GNU General Public License
2708 + * as published by the Free Software Foundation, either version 2 of the
2709 + * License, or (at your option) any later version.
2711 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
2712 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
2713 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
2714 + * the GNU General Public License for more details.
2716 + * You should have received a copy of the GNU General Public License
2717 + * along with the Ubicom32 Linux Kernel Port. If not,
2718 + * see <http://www.gnu.org/licenses/>.
2720 + * Ubicom32 implementation derived from (with many thanks):
2725 +#ifndef _ASM_UBICOM32_BUG_H
2726 +#define _ASM_UBICOM32_BUG_H
2728 +#include <linux/kernel.h>
2729 +#include <asm/thread.h>
2731 +#if defined(CONFIG_STOP_ON_BUG)
2734 + * Stall all threads to enable debugging.
2736 +static inline void __BUG_ON(unsigned long c)
2738 + if (unlikely(c)) {
2744 +#define BUG_ON(c) __BUG_ON((unsigned long)(c))
2745 +#define HAVE_ARCH_BUG_ON
2748 +#include <asm-generic/bug.h>
2750 +#endif /* _ASM_UBICOM32_BUG_H */
2751 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/bugs.h linux-2.6.28.10/arch/ubicom32/include/asm/bugs.h
2752 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/bugs.h 1970-01-01 02:00:00.000000000 +0200
2753 +++ linux-2.6.28.10/arch/ubicom32/include/asm/bugs.h 2009-08-06 10:31:02.000000000 +0300
2756 + * arch/ubicom32/include/asm/bugs.h
2757 + * Definition of check_bugs() for Ubicom32 architecture.
2759 + * (C) Copyright 2009, Ubicom, Inc.
2760 + * Copyright (C) 1994 Linus Torvalds
2762 + * This file is part of the Ubicom32 Linux Kernel Port.
2764 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
2765 + * it and/or modify it under the terms of the GNU General Public License
2766 + * as published by the Free Software Foundation, either version 2 of the
2767 + * License, or (at your option) any later version.
2769 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
2770 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
2771 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
2772 + * the GNU General Public License for more details.
2774 + * You should have received a copy of the GNU General Public License
2775 + * along with the Ubicom32 Linux Kernel Port. If not,
2776 + * see <http://www.gnu.org/licenses/>.
2778 + * Ubicom32 implementation derived from (with many thanks):
2785 + * This is included by init/main.c to check for architecture-dependent bugs.
2788 + * void check_bugs(void);
2791 +#ifndef _ASM_UBICOM32_BUGS_H
2792 +#define _ASM_UBICOM32_BUGS_H
2794 +static void check_bugs(void)
2798 +#endif /* _ASM_UBICOM32_BUGS_H */
2799 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/byteorder.h linux-2.6.28.10/arch/ubicom32/include/asm/byteorder.h
2800 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/byteorder.h 1970-01-01 02:00:00.000000000 +0200
2801 +++ linux-2.6.28.10/arch/ubicom32/include/asm/byteorder.h 2009-08-06 10:31:02.000000000 +0300
2804 + * arch/ubicom32/include/asm/byteorder.h
2805 + * Byte order swapping utility routines.
2807 + * (C) Copyright 2009, Ubicom, Inc.
2809 + * This file is part of the Ubicom32 Linux Kernel Port.
2811 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
2812 + * it and/or modify it under the terms of the GNU General Public License
2813 + * as published by the Free Software Foundation, either version 2 of the
2814 + * License, or (at your option) any later version.
2816 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
2817 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
2818 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
2819 + * the GNU General Public License for more details.
2821 + * You should have received a copy of the GNU General Public License
2822 + * along with the Ubicom32 Linux Kernel Port. If not,
2823 + * see <http://www.gnu.org/licenses/>.
2825 + * Ubicom32 implementation derived from (with many thanks):
2830 +#ifndef _ASM_UBICOM32_BYTEORDER_H
2831 +#define _ASM_UBICOM32_BYTEORDER_H
2833 +#include <linux/types.h>
2835 +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
2836 +# define __BYTEORDER_HAS_U64__
2837 +# define __SWAB_64_THRU_32__
2840 +#if defined(IP7000) || defined(IP7000_REV2)
2842 +#define __arch__swab16 __builtin_ubicom32_swapb_2
2843 +#define __arch__swab32 __builtin_ubicom32_swapb_4
2845 +#endif /* IP7000 */
2847 +#include <linux/byteorder/big_endian.h>
2849 +#endif /* _ASM_UBICOM32_BYTEORDER_H */
2851 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/cachectl.h linux-2.6.28.10/arch/ubicom32/include/asm/cachectl.h
2852 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/cachectl.h 1970-01-01 02:00:00.000000000 +0200
2853 +++ linux-2.6.28.10/arch/ubicom32/include/asm/cachectl.h 2009-08-06 10:31:02.000000000 +0300
2856 + * arch/ubicom32/include/asm/cachectl.h
2857 + * Ubicom32 cache control definitions.
2859 + * (C) Copyright 2009, Ubicom, Inc.
2861 + * This file is part of the Ubicom32 Linux Kernel Port.
2863 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
2864 + * it and/or modify it under the terms of the GNU General Public License
2865 + * as published by the Free Software Foundation, either version 2 of the
2866 + * License, or (at your option) any later version.
2868 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
2869 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
2870 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
2871 + * the GNU General Public License for more details.
2873 + * You should have received a copy of the GNU General Public License
2874 + * along with the Ubicom32 Linux Kernel Port. If not,
2875 + * see <http://www.gnu.org/licenses/>.
2877 + * Ubicom32 implementation derived from (with many thanks):
2882 +#ifndef _ASM_UBICOM32_CACHECTL_H
2883 +#define _ASM_UBICOM32_CACHECTL_H
2885 +#include <asm/ip5000.h>
2888 + * mem_cache_control()
2889 + * Special cache control operation
2891 +extern void mem_cache_control(unsigned long cc, unsigned long begin_addr, unsigned long end_addr, unsigned long op);
2893 +#endif /* _ASM_UBICOM32_CACHECTL_H */
2894 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/cacheflush.h linux-2.6.28.10/arch/ubicom32/include/asm/cacheflush.h
2895 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/cacheflush.h 1970-01-01 02:00:00.000000000 +0200
2896 +++ linux-2.6.28.10/arch/ubicom32/include/asm/cacheflush.h 2009-08-06 10:31:02.000000000 +0300
2899 + * arch/ubicom32/include/asm/cacheflush.h
2900 + * Cache flushing definitions for Ubicom32 architecture.
2902 + * (C) Copyright 2009, Ubicom, Inc.
2904 + * This file is part of the Ubicom32 Linux Kernel Port.
2906 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
2907 + * it and/or modify it under the terms of the GNU General Public License
2908 + * as published by the Free Software Foundation, either version 2 of the
2909 + * License, or (at your option) any later version.
2911 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
2912 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
2913 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
2914 + * the GNU General Public License for more details.
2916 + * You should have received a copy of the GNU General Public License
2917 + * along with the Ubicom32 Linux Kernel Port. If not,
2918 + * see <http://www.gnu.org/licenses/>.
2920 + * Ubicom32 implementation derived from (with many thanks):
2925 +#ifndef _ASM_UBICOM32_CACHEFLUSH_H
2926 +#define _ASM_UBICOM32_CACHEFLUSH_H
2929 + * (C) Copyright 2000-2004, Greg Ungerer <gerg@snapgear.com>
2931 +#include <linux/mm.h>
2932 +#include <asm/cachectl.h>
2933 +#include <asm/ip5000.h>
2935 +#define flush_cache_all() __flush_cache_all()
2936 +#define flush_cache_mm(mm) do { } while (0)
2937 +#define flush_cache_dup_mm(mm) do { } while (0)
2938 +#define flush_cache_range(vma, start, end) __flush_cache_all()
2939 +#define flush_cache_page(vma, vmaddr) do { } while (0)
2940 +#define flush_dcache_page(page) do { } while (0)
2941 +#define flush_dcache_mmap_lock(mapping) do { } while (0)
2942 +#define flush_dcache_mmap_unlock(mapping) do { } while (0)
2944 +#define flush_dcache_range(start, end) \
2946 + /* Flush the data cache and invalidate the I cache. */ \
2947 + local_irq_disable(); \
2948 + mem_cache_control(DCCR_BASE, start, end, CCR_CTRL_FLUSH_ADDR); \
2949 + mem_cache_control(ICCR_BASE, start, end, CCR_CTRL_INV_ADDR); \
2950 + local_irq_enable(); \
2953 +#define flush_icache_range(start, end) \
2955 + /* Flush the data cache and invalidate the I cache. */ \
2956 + local_irq_disable(); \
2957 + mem_cache_control(DCCR_BASE, start, end, CCR_CTRL_FLUSH_ADDR); \
2958 + mem_cache_control(ICCR_BASE, start, end, CCR_CTRL_INV_ADDR); \
2959 + local_irq_enable(); \
2962 +#define flush_icache_page(vma,pg) do { } while (0)
2963 +#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
2964 +#define flush_cache_vmap(start, end) do { } while (0)
2965 +#define flush_cache_vunmap(start, end) do { } while (0)
2967 +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
2968 + memcpy(dst, src, len)
2969 +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
2970 + memcpy(dst, src, len)
2973 + * Cache handling for IP5000
2975 +extern inline void mem_cache_invalidate_all(unsigned long cc)
2978 + " bset "D(CCR_CTRL)"(%0), "D(CCR_CTRL)"(%0), #"D(CCR_CTRL_RESET)" \n\t"
2980 + " bclr "D(CCR_CTRL)"(%0), "D(CCR_CTRL)"(%0), #"D(CCR_CTRL_RESET)" \n\t"
2981 + " pipe_flush 0 \n\t"
2988 +static inline void __flush_cache_all(void)
2993 + mem_cache_invalidate_all(ICCR_BASE);
2998 + mem_cache_invalidate_all(DCCR_BASE);
3001 +#endif /* _ASM_UBICOM32_CACHEFLUSH_H */
3002 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/cache.h linux-2.6.28.10/arch/ubicom32/include/asm/cache.h
3003 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/cache.h 1970-01-01 02:00:00.000000000 +0200
3004 +++ linux-2.6.28.10/arch/ubicom32/include/asm/cache.h 2009-08-06 10:31:02.000000000 +0300
3007 + * arch/ubicom32/include/asm/cache.h
3008 + * Cache line definitions for Ubicom32 architecture.
3010 + * (C) Copyright 2009, Ubicom, Inc.
3012 + * This file is part of the Ubicom32 Linux Kernel Port.
3014 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
3015 + * it and/or modify it under the terms of the GNU General Public License
3016 + * as published by the Free Software Foundation, either version 2 of the
3017 + * License, or (at your option) any later version.
3019 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
3020 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
3021 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
3022 + * the GNU General Public License for more details.
3024 + * You should have received a copy of the GNU General Public License
3025 + * along with the Ubicom32 Linux Kernel Port. If not,
3026 + * see <http://www.gnu.org/licenses/>.
3028 + * Ubicom32 implementation derived from (with many thanks):
3033 +#ifndef _ASM_UBICOM32_CACHE_H
3034 +#define _ASM_UBICOM32_CACHE_H
3037 + * bytes per L1 cache line
3039 +#define L1_CACHE_SHIFT 5
3040 +#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
3042 +#define __cacheline_aligned
3043 +#define ____cacheline_aligned
3045 +#endif /* _ASM_UBICOM32_CACHE_H */
3046 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/checksum.h linux-2.6.28.10/arch/ubicom32/include/asm/checksum.h
3047 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/checksum.h 1970-01-01 02:00:00.000000000 +0200
3048 +++ linux-2.6.28.10/arch/ubicom32/include/asm/checksum.h 2009-08-06 10:31:02.000000000 +0300
3051 + * arch/ubicom32/include/asm/checksum.h
3052 + * Checksum utilities for Ubicom32 architecture.
3054 + * (C) Copyright 2009, Ubicom, Inc.
3056 + * This file is part of the Ubicom32 Linux Kernel Port.
3058 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
3059 + * it and/or modify it under the terms of the GNU General Public License
3060 + * as published by the Free Software Foundation, either version 2 of the
3061 + * License, or (at your option) any later version.
3063 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
3064 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
3065 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
3066 + * the GNU General Public License for more details.
3068 + * You should have received a copy of the GNU General Public License
3069 + * along with the Ubicom32 Linux Kernel Port. If not,
3070 + * see <http://www.gnu.org/licenses/>.
3072 + * Ubicom32 implementation derived from (with many thanks):
3077 +#ifndef _ASM_UBICOM32_CHECKSUM_H
3078 +#define _ASM_UBICOM32_CHECKSUM_H
3080 +#include <linux/in6.h>
3083 + * computes the checksum of a memory block at buff, length len,
3084 + * and adds in "sum" (32-bit)
3086 + * returns a 32-bit number suitable for feeding into itself
3087 + * or csum_tcpudp_magic
3089 + * this function must be called with even lengths, except
3090 + * for the last fragment, which may be odd
3092 + * it's best to have buff aligned on a 32-bit boundary
3094 +__wsum csum_partial(const void *buff, int len, __wsum sum);
3097 + * the same as csum_partial, but copies from src while it
3100 + * here even more important to align src and dst on a 32-bit (or even
3101 + * better 64-bit) boundary
3104 +__wsum csum_partial_copy_nocheck(const void *src, void *dst,
3105 + int len, __wsum sum);
3109 + * the same as csum_partial_copy, but copies from user space.
3111 + * here even more important to align src and dst on a 32-bit (or even
3112 + * better 64-bit) boundary
3115 +extern __wsum csum_partial_copy_from_user(const void __user *src,
3116 + void *dst, int len, __wsum sum, int *csum_err);
3118 +__sum16 ip_fast_csum(const void *iph, unsigned int ihl);
3121 + * Fold a partial checksum
3124 +static inline __sum16 csum_fold(__wsum sum)
3127 + " lsr.4 d15, %0, #16 \n\t"
3128 + " bfextu %0, %0, #16 \n\t"
3129 + " add.4 %0, d15, %0 \n\t"
3130 + " lsr.4 d15, %0, #16 \n\t"
3131 + " bfextu %0, %0, #16 \n\t"
3132 + " add.4 %0, d15, %0 \n\t"
3137 + return (__force __sum16)~sum;
3142 + * computes the checksum of the TCP/UDP pseudo-header
3143 + * returns a 16-bit checksum, already complemented
3146 +static inline __wsum
3147 +csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
3148 + unsigned short proto, __wsum sum)
3151 + " add.4 %0, %2, %0 \n\t"
3152 + " addc %0, %3, %0 \n\t"
3153 + " addc %0, %4, %0 \n\t"
3154 + " addc %0, %5, %0 \n\t"
3155 + " addc %0, #0, %0 \n\t"
3157 + : "0"(sum), "r" (saddr), "r" (daddr), "r" (len), "r"(proto)
3162 +static inline __sum16
3163 +csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len,
3164 + unsigned short proto, __wsum sum)
3166 + return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
3170 + * this routine is used for miscellaneous IP-like checksums, mainly
3173 +extern __sum16 ip_compute_csum(const void *buff, int len);
3175 +#define _HAVE_ARCH_IPV6_CSUM
3177 +static __inline__ __sum16
3178 +csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr,
3179 + __u32 len, unsigned short proto, __wsum sum)
3182 + " add.4 %0, 0(%2), %0 \n\t"
3183 + " addc %0, 4(%2), %0 \n\t"
3184 + " addc %0, 8(%2), %0 \n\t"
3185 + " addc %0, 12(%2), %0 \n\t"
3186 + " addc %0, 0(%3), %0 \n\t"
3187 + " addc %0, 4(%3), %0 \n\t"
3188 + " addc %0, 8(%3), %0 \n\t"
3189 + " addc %0, 12(%3), %0 \n\t"
3190 + " addc %0, %4, %0 \n\t"
3191 + " addc %0, #0, %0 \n\t"
3193 + : "0" (sum), "a" (saddr), "a" (daddr), "d" (len + proto)
3195 + return csum_fold(sum);
3198 +#endif /* _ASM_UBICOM32_CHECKSUM_H */
3199 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/cpu.h linux-2.6.28.10/arch/ubicom32/include/asm/cpu.h
3200 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/cpu.h 1970-01-01 02:00:00.000000000 +0200
3201 +++ linux-2.6.28.10/arch/ubicom32/include/asm/cpu.h 2009-08-06 10:31:02.000000000 +0300
3204 + * arch/ubicom32/include/asm/cpu.h
3205 + * CPU definitions for Ubicom32 architecture.
3207 + * (C) Copyright 2009, Ubicom, Inc.
3208 + * Copyright (C) 2004-2005 ARM Ltd.
3210 + * This file is part of the Ubicom32 Linux Kernel Port.
3212 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
3213 + * it and/or modify it under the terms of the GNU General Public License
3214 + * as published by the Free Software Foundation, either version 2 of the
3215 + * License, or (at your option) any later version.
3217 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
3218 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
3219 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
3220 + * the GNU General Public License for more details.
3222 + * You should have received a copy of the GNU General Public License
3223 + * along with the Ubicom32 Linux Kernel Port. If not,
3224 + * see <http://www.gnu.org/licenses/>.
3226 + * Ubicom32 implementation derived from (with many thanks):
3231 +#ifndef _ASM_UBICOM32_CPU_H
3232 +#define _ASM_UBICOM32_CPU_H
3234 +#include <linux/percpu.h>
3236 +struct cpuinfo_ubicom32 {
3237 + unsigned long tid; /* Hardware thread number */
3240 + volatile unsigned long ipi_pending; /* Bit map of operations to execute */
3241 + unsigned long ipi_count; /* Number of IPI(s) taken on this cpu */
3245 +DECLARE_PER_CPU(struct cpuinfo_ubicom32, cpu_data);
3247 +#endif /* _ASM_UBICOM32_CPU_H */
3248 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/cputime.h linux-2.6.28.10/arch/ubicom32/include/asm/cputime.h
3249 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/cputime.h 1970-01-01 02:00:00.000000000 +0200
3250 +++ linux-2.6.28.10/arch/ubicom32/include/asm/cputime.h 2009-08-06 10:31:02.000000000 +0300
3253 + * arch/ubicom32/include/asm/cputime.h
3254 + * Generic cputime.h for Ubicom32 architecture.
3256 + * (C) Copyright 2009, Ubicom, Inc.
3258 + * This file is part of the Ubicom32 Linux Kernel Port.
3260 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
3261 + * it and/or modify it under the terms of the GNU General Public License
3262 + * as published by the Free Software Foundation, either version 2 of the
3263 + * License, or (at your option) any later version.
3265 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
3266 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
3267 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
3268 + * the GNU General Public License for more details.
3270 + * You should have received a copy of the GNU General Public License
3271 + * along with the Ubicom32 Linux Kernel Port. If not,
3272 + * see <http://www.gnu.org/licenses/>.
3274 + * Ubicom32 implementation derived from (with many thanks):
3279 +#ifndef _ASM_UBICOM32_CPUTIME_H
3280 +#define _ASM_UBICOM32_CPUTIME_H
3282 +#include <asm-generic/cputime.h>
3284 +#endif /* _ASM_UBICOM32_CPUTIME_H */
3285 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/current.h linux-2.6.28.10/arch/ubicom32/include/asm/current.h
3286 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/current.h 1970-01-01 02:00:00.000000000 +0200
3287 +++ linux-2.6.28.10/arch/ubicom32/include/asm/current.h 2009-08-06 10:31:02.000000000 +0300
3290 + * arch/ubicom32/include/asm/current.h
3291 + * Definition of get_current() for Ubicom32 architecture.
3293 + * (C) Copyright 2009, Ubicom, Inc.
3294 + * (C) Copyright 2000, Lineo, David McCullough <davidm@uclinux.org>
3295 + * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
3297 + * This file is part of the Ubicom32 Linux Kernel Port.
3299 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
3300 + * it and/or modify it under the terms of the GNU General Public License
3301 + * as published by the Free Software Foundation, either version 2 of the
3302 + * License, or (at your option) any later version.
3304 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
3305 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
3306 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
3307 + * the GNU General Public License for more details.
3309 + * You should have received a copy of the GNU General Public License
3310 + * along with the Ubicom32 Linux Kernel Port. If not,
3311 + * see <http://www.gnu.org/licenses/>.
3313 + * Ubicom32 implementation derived from (with many thanks):
3318 +#ifndef _ASM_UBICOM32_CURRENT_H
3319 +#define _ASM_UBICOM32_CURRENT_H
3321 +#include <linux/thread_info.h>
3323 +struct task_struct;
3325 +static inline struct task_struct *get_current(void)
3327 + return(current_thread_info()->task);
3330 +#define current get_current()
3332 +#endif /* _ASM_UBICOM32_CURRENT_H */
3333 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/delay.h linux-2.6.28.10/arch/ubicom32/include/asm/delay.h
3334 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/delay.h 1970-01-01 02:00:00.000000000 +0200
3335 +++ linux-2.6.28.10/arch/ubicom32/include/asm/delay.h 2009-08-06 10:31:02.000000000 +0300
3338 + * arch/ubicom32/include/asm/delay.h
3339 + * Definition of delay routines for Ubicom32 architecture.
3341 + * (C) Copyright 2009, Ubicom, Inc.
3343 + * This file is part of the Ubicom32 Linux Kernel Port.
3345 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
3346 + * it and/or modify it under the terms of the GNU General Public License
3347 + * as published by the Free Software Foundation, either version 2 of the
3348 + * License, or (at your option) any later version.
3350 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
3351 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
3352 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
3353 + * the GNU General Public License for more details.
3355 + * You should have received a copy of the GNU General Public License
3356 + * along with the Ubicom32 Linux Kernel Port. If not,
3357 + * see <http://www.gnu.org/licenses/>.
3359 + * Ubicom32 implementation derived from (with many thanks):
3364 +#ifndef _ASM_UBICOM32_DELAY_H
3365 +#define _ASM_UBICOM32_DELAY_H
3367 +#include <asm/param.h>
3368 +#include <asm/ip5000.h>
3370 +static inline void __delay(unsigned long loops)
3377 + "1: add.4 %0, #-1, %0 \n\t"
3378 + " jmpne.t 1b \n\t"
3384 + * Ubicom32 processor uses fixed 12MHz external OSC.
3385 + * So we use that as reference to count 12 cycles/us
3388 +extern unsigned long loops_per_jiffy;
3390 +static inline void _udelay(unsigned long usecs)
3392 +#if defined(CONFIG_UBICOM32_V4) || defined(CONFIG_UBICOM32_V3)
3394 + " add.4 d15, 0(%0), %1 \n\t"
3395 + " sub.4 #0, 0(%0), d15 \n\t"
3396 + " jmpmi.w.f .-4 \n\t"
3398 + : "a"(TIMER_BASE + TIMER_MPTVAL), "d"(usecs * (12000000/1000000))
3407 + * Moved the udelay() function into library code, no longer inlined.
3409 +extern void udelay(unsigned long usecs);
3411 +#endif /* _ASM_UBICOM32_DELAY_H */
3412 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/device.h linux-2.6.28.10/arch/ubicom32/include/asm/device.h
3413 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/device.h 1970-01-01 02:00:00.000000000 +0200
3414 +++ linux-2.6.28.10/arch/ubicom32/include/asm/device.h 2009-08-06 10:31:02.000000000 +0300
3417 + * arch/ubicom32/include/asm/device.h
3418 + * Generic device.h for Ubicom32 architecture.
3420 + * Used for arch specific extensions to struct device
3422 + * (C) Copyright 2009, Ubicom, Inc.
3424 + * This file is part of the Ubicom32 Linux Kernel Port.
3426 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
3427 + * it and/or modify it under the terms of the GNU General Public License
3428 + * as published by the Free Software Foundation, either version 2 of the
3429 + * License, or (at your option) any later version.
3431 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
3432 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
3433 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
3434 + * the GNU General Public License for more details.
3436 + * You should have received a copy of the GNU General Public License
3437 + * along with the Ubicom32 Linux Kernel Port. If not,
3438 + * see <http://www.gnu.org/licenses/>.
3440 + * Ubicom32 implementation derived from (with many thanks):
3445 +#ifndef _ASM_UBICOM32_DEVICE_H
3446 +#define _ASM_UBICOM32_DEVICE_H
3448 +#include <asm-generic/device.h>
3450 +#endif /* _ASM_UBICOM32_DEVICE_H */
3451 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/devtree.h linux-2.6.28.10/arch/ubicom32/include/asm/devtree.h
3452 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/devtree.h 1970-01-01 02:00:00.000000000 +0200
3453 +++ linux-2.6.28.10/arch/ubicom32/include/asm/devtree.h 2009-08-06 10:31:02.000000000 +0300
3456 + * arch/ubicom32/include/asm/devtree.h
3457 + * Device Tree Header File (Shared between ultra and the Host OS)
3459 + * (C) Copyright 2009, Ubicom, Inc.
3461 + * This file is part of the Ubicom32 Linux Kernel Port.
3463 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
3464 + * it and/or modify it under the terms of the GNU General Public License
3465 + * as published by the Free Software Foundation, either version 2 of the
3466 + * License, or (at your option) any later version.
3468 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
3469 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
3470 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
3471 + * the GNU General Public License for more details.
3473 + * You should have received a copy of the GNU General Public License
3474 + * along with the Ubicom32 Linux Kernel Port. If not,
3475 + * see <http://www.gnu.org/licenses/>.
3477 + * Ubicom32 implementation derived from (with many thanks):
3483 +#ifndef _ASM_UBICOM32_DEVTREE_H
3484 +#define _ASM_UBICOM32_DEVTREE_H
3486 +#define DEVTREE_MAX_NAME 32
3487 +#define DEVTREE_IRQ_NONE 0xff
3488 +#define DEVTREE_IRQ_DONTCARE 0xff
3489 +#define DEVTREE_NODE_MAGIC 0x10203040
3491 +struct devtree_node {
3492 + struct devtree_node *next;
3493 + unsigned char sendirq;
3494 + unsigned char recvirq;
3495 + char name[DEVTREE_MAX_NAME];
3496 + unsigned int magic;
3499 +extern struct devtree_node *devtree;
3500 +extern struct devtree_node *devtree_find_by_irq(uint8_t sendirq, uint8_t recvirq);
3501 +extern struct devtree_node *devtree_find_node(const char *str);
3502 +extern struct devtree_node *devtree_find_next(struct devtree_node **cur);
3503 +extern int devtree_irq(struct devtree_node *dn, unsigned char *sendirq, unsigned char *recvirq);
3504 +extern void devtree_print(void);
3506 +#endif /* _ASM_UBICOM32_DEVTREE_H */
3507 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/div64.h linux-2.6.28.10/arch/ubicom32/include/asm/div64.h
3508 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/div64.h 1970-01-01 02:00:00.000000000 +0200
3509 +++ linux-2.6.28.10/arch/ubicom32/include/asm/div64.h 2009-08-06 10:31:02.000000000 +0300
3512 + * arch/ubicom32/include/asm/div64.h
3513 + * Generic div64.h for Ubicom32 architecture.
3515 + * (C) Copyright 2009, Ubicom, Inc.
3517 + * This file is part of the Ubicom32 Linux Kernel Port.
3519 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
3520 + * it and/or modify it under the terms of the GNU General Public License
3521 + * as published by the Free Software Foundation, either version 2 of the
3522 + * License, or (at your option) any later version.
3524 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
3525 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
3526 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
3527 + * the GNU General Public License for more details.
3529 + * You should have received a copy of the GNU General Public License
3530 + * along with the Ubicom32 Linux Kernel Port. If not,
3531 + * see <http://www.gnu.org/licenses/>.
3533 + * Ubicom32 implementation derived from (with many thanks):
3538 +#ifndef _ASM_UBICOM32_DIV64_H
3539 +#define _ASM_UBICOM32_DIV64_H
3541 +#include <asm-generic/div64.h>
3543 +#endif /* _ASM_UBICOM32_DIV64_H */
3544 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/dma.h linux-2.6.28.10/arch/ubicom32/include/asm/dma.h
3545 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/dma.h 1970-01-01 02:00:00.000000000 +0200
3546 +++ linux-2.6.28.10/arch/ubicom32/include/asm/dma.h 2009-08-06 10:31:02.000000000 +0300
3549 + * arch/ubicom32/include/asm/dma.h
3550 + * DMA definitions for Ubicom32 architecture.
3552 + * (C) Copyright 2009, Ubicom, Inc.
3554 + * This file is part of the Ubicom32 Linux Kernel Port.
3556 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
3557 + * it and/or modify it under the terms of the GNU General Public License
3558 + * as published by the Free Software Foundation, either version 2 of the
3559 + * License, or (at your option) any later version.
3561 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
3562 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
3563 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
3564 + * the GNU General Public License for more details.
3566 + * You should have received a copy of the GNU General Public License
3567 + * along with the Ubicom32 Linux Kernel Port. If not,
3568 + * see <http://www.gnu.org/licenses/>.
3570 + * Ubicom32 implementation derived from (with many thanks):
3575 +#ifndef _ASM_UBICOM32_DMA_H
3576 +#define _ASM_UBICOM32_DMA_H
3578 +/* Nothing so far */
3579 +#define MAX_DMA_ADDRESS 0x00 /* This is quite suspicious */
3581 +#endif /* _ASM_UBICOM32_DMA_H */
3582 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/dma-mapping.h linux-2.6.28.10/arch/ubicom32/include/asm/dma-mapping.h
3583 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/dma-mapping.h 1970-01-01 02:00:00.000000000 +0200
3584 +++ linux-2.6.28.10/arch/ubicom32/include/asm/dma-mapping.h 2009-08-06 10:31:02.000000000 +0300
3587 + * arch/ubicom32/include/asm/dma-mapping.h
3588 + * Generic dma-mapping.h for Ubicom32 architecture.
3590 + * (C) Copyright 2009, Ubicom, Inc.
3592 + * This file is part of the Ubicom32 Linux Kernel Port.
3594 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
3595 + * it and/or modify it under the terms of the GNU General Public License
3596 + * as published by the Free Software Foundation, either version 2 of the
3597 + * License, or (at your option) any later version.
3599 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
3600 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
3601 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
3602 + * the GNU General Public License for more details.
3604 + * You should have received a copy of the GNU General Public License
3605 + * along with the Ubicom32 Linux Kernel Port. If not,
3606 + * see <http://www.gnu.org/licenses/>.
3608 + * Ubicom32 implementation derived from (with many thanks):
3613 +#ifndef _ASM_UBICOM32_DMA_MAPPING_H
3614 +#define _ASM_UBICOM32_DMA_MAPPING_H
3616 +#include <linux/scatterlist.h>
3617 +#include <asm-generic/dma-mapping.h>
3619 +#endif /* _ASM_UBICOM32_DMA_MAPPING_H */
3620 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/elf.h linux-2.6.28.10/arch/ubicom32/include/asm/elf.h
3621 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/elf.h 1970-01-01 02:00:00.000000000 +0200
3622 +++ linux-2.6.28.10/arch/ubicom32/include/asm/elf.h 2009-08-18 22:35:42.571202890 +0300
3625 + * arch/ubicom32/include/asm/elf.h
3626 + * Definitions for elf executable format for Ubicom32 architecture.
3628 + * (C) Copyright 2009, Ubicom, Inc.
3630 + * This file is part of the Ubicom32 Linux Kernel Port.
3632 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
3633 + * it and/or modify it under the terms of the GNU General Public License
3634 + * as published by the Free Software Foundation, either version 2 of the
3635 + * License, or (at your option) any later version.
3637 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
3638 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
3639 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
3640 + * the GNU General Public License for more details.
3642 + * You should have received a copy of the GNU General Public License
3643 + * along with the Ubicom32 Linux Kernel Port. If not,
3644 + * see <http://www.gnu.org/licenses/>.
3646 + * Ubicom32 implementation derived from (with many thanks):
3651 +#ifndef _ASM_UBICOM32_ELF_H
3652 +#define _ASM_UBICOM32_ELF_H
3655 + * ELF register definitions..
3658 +#include <asm/ptrace.h>
3659 +#include <asm/user.h>
3662 + * Processor specific flags for the ELF header e_flags field.
3664 +#define EF_UBICOM32_V3 0x00000001 /* -fmarch=ubicom32v3 */
3665 +#define EF_UBICOM32_V4 0x00000002 /* -fmarch=ubicom32v4 */
3666 +#define EF_UBICOM32_PIC 0x80000000 /* -fpic */
3667 +#define EF_UBICOM32_FDPIC 0x40000000 /* -mfdpic */
3670 + * Ubicom32 ELF relocation types
3672 +#define R_UBICOM32_NONE 0
3673 +#define R_UBICOM32_16 1
3674 +#define R_UBICOM32_32 2
3675 +#define R_UBICOM32_LO16 3
3676 +#define R_UBICOM32_HI16 4
3677 +#define R_UBICOM32_21_PCREL 5
3678 +#define R_UBICOM32_24_PCREL 6
3679 +#define R_UBICOM32_HI24 7
3680 +#define R_UBICOM32_LO7_S 8
3681 +#define R_UBICOM32_LO7_2_S 9
3682 +#define R_UBICOM32_LO7_4_S 10
3683 +#define R_UBICOM32_LO7_D 11
3684 +#define R_UBICOM32_LO7_2_D 12
3685 +#define R_UBICOM32_LO7_4_D 13
3686 +#define R_UBICOM32_32_HARVARD 14
3687 +#define R_UBICOM32_LO7_CALLI 15
3688 +#define R_UBICOM32_LO16_CALLI 16
3689 +#define R_UBICOM32_GOT_HI24 17
3690 +#define R_UBICOM32_GOT_LO7_S 18
3691 +#define R_UBICOM32_GOT_LO7_2_S 19
3692 +#define R_UBICOM32_GOT_LO7_4_S 20
3693 +#define R_UBICOM32_GOT_LO7_D 21
3694 +#define R_UBICOM32_GOT_LO7_2_D 22
3695 +#define R_UBICOM32_GOT_LO7_4_D 23
3696 +#define R_UBICOM32_FUNCDESC_GOT_HI24 24
3697 +#define R_UBICOM32_FUNCDESC_GOT_LO7_S 25
3698 +#define R_UBICOM32_FUNCDESC_GOT_LO7_2_S 26
3699 +#define R_UBICOM32_FUNCDESC_GOT_LO7_4_S 27
3700 +#define R_UBICOM32_FUNCDESC_GOT_LO7_D 28
3701 +#define R_UBICOM32_FUNCDESC_GOT_LO7_2_D 29
3702 +#define R_UBICOM32_FUNCDESC_GOT_LO7_4_D 30
3703 +#define R_UBICOM32_GOT_LO7_CALLI 31
3704 +#define R_UBICOM32_FUNCDESC_GOT_LO7_CALLI 32
3705 +#define R_UBICOM32_FUNCDESC_VALUE 33
3706 +#define R_UBICOM32_FUNCDESC 34
3707 +#define R_UBICOM32_GOTOFFSET_LO 35
3708 +#define R_UBICOM32_GOTOFFSET_HI 36
3709 +#define R_UBICOM32_FUNCDESC_GOTOFFSET_LO 37
3710 +#define R_UBICOM32_FUNCDESC_GOTOFFSET_HI 38
3711 +#define R_UBICOM32_GNU_VTINHERIT 200
3712 +#define R_UBICOM32_GNU_VTENTRY 201
3714 +typedef unsigned long elf_greg_t;
3716 +#define ELF_NGREG (sizeof(struct pt_regs) / sizeof(elf_greg_t))
3717 +typedef elf_greg_t elf_gregset_t[ELF_NGREG];
3719 +typedef struct user_ubicom32fp_struct elf_fpregset_t;
3722 + * This is used to ensure we don't load something for the wrong architecture.
3724 +#define elf_check_arch(x) ((x)->e_machine == EM_UBICOM32)
3726 +#define elf_check_fdpic(x) ((x)->e_flags & EF_UBICOM32_FDPIC)
3728 +#define elf_check_const_displacement(x) ((x)->e_flags & EF_UBICOM32_PIC)
3731 + * These are used to set parameters in the core dumps.
3733 +#define ELF_CLASS ELFCLASS32
3734 +#define ELF_DATA ELFDATA2MSB
3735 +#define ELF_ARCH EM_UBICOM32
3737 +/* For SVR4/m68k the function pointer to be registered with `atexit' is
3738 + passed in %a1. Although my copy of the ABI has no such statement, it
3739 + is actually used on ASV. */
3740 +#define ELF_PLAT_INIT(_r, load_addr) _r->a1 = 0
3742 +#define ELF_FDPIC_PLAT_INIT(_regs, _exec_map_addr, _interp_map_addr, \
3745 + _regs->dn[1] = _exec_map_addr; \
3746 + _regs->dn[2] = _interp_map_addr; \
3747 + _regs->dn[3] = _dynamic_addr; \
3748 + _regs->an[1] = 0; /* dl_fini will be set by ldso */ \
3751 +#define USE_ELF_CORE_DUMP
3752 +#define ELF_EXEC_PAGESIZE 4096
3755 +#ifdef CONFIG_UBICOM32_V4
3756 +#define ELF_FDPIC_CORE_EFLAGS (EF_UBICOM32_FDPIC | EF_UBICOM32_V4)
3757 +#elif defined CONFIG_UBICOM32_V3
3758 +#define ELF_FDPIC_CORE_EFLAGS (EF_UBICOM32_FDPIC | EF_UBICOM32_V3)
3760 +#error Unknown/Unsupported ubicom32 architecture.
3764 +/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
3765 + use of this is to invoke "./ld.so someprog" to test out a new version of
3766 + the loader. We need to make sure that it is out of the way of the program
3767 + that it will "exec", and that there is sufficient room for the brk. */
3769 +#define ELF_ET_DYN_BASE 0xD0000000UL
3772 + * For Ubicom32, the elf_gregset_t and struct pt_regs are the same size
3773 + * data structure so a copy is performed instead of providing the
3774 + * ELF_CORE_COPY_REGS macro.
3777 +/* This yields a mask that user programs can use to figure out what
3778 + instruction set this cpu supports. */
3780 +#define ELF_HWCAP (0)
3782 +/* This yields a string that ld.so will use to load implementation
3783 + specific libraries for optimization. This is more specific in
3784 + intent than poking at uname or /proc/cpuinfo. */
3786 +#define ELF_PLATFORM (NULL)
3788 +#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
3790 +#endif /* _ASM_UBICOM32_ELF_H */
3791 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/emergency-restart.h linux-2.6.28.10/arch/ubicom32/include/asm/emergency-restart.h
3792 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/emergency-restart.h 1970-01-01 02:00:00.000000000 +0200
3793 +++ linux-2.6.28.10/arch/ubicom32/include/asm/emergency-restart.h 2009-08-06 10:31:02.000000000 +0300
3796 + * arch/ubicom32/include/asm/emergency-restart.h
3797 + * Generic emergency-restart.h for Ubicom32 architecture.
3799 + * (C) Copyright 2009, Ubicom, Inc.
3801 + * This file is part of the Ubicom32 Linux Kernel Port.
3803 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
3804 + * it and/or modify it under the terms of the GNU General Public License
3805 + * as published by the Free Software Foundation, either version 2 of the
3806 + * License, or (at your option) any later version.
3808 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
3809 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
3810 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
3811 + * the GNU General Public License for more details.
3813 + * You should have received a copy of the GNU General Public License
3814 + * along with the Ubicom32 Linux Kernel Port. If not,
3815 + * see <http://www.gnu.org/licenses/>.
3817 + * Ubicom32 implementation derived from (with many thanks):
3822 +#ifndef _ASM_UBICOM32_EMERGENCY_RESTART_H
3823 +#define _ASM_UBICOM32_EMERGENCY_RESTART_H
3825 +#include <asm-generic/emergency-restart.h>
3827 +#endif /* _ASM_UBICOM32_EMERGENCY_RESTART_H */
3828 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/entry.h linux-2.6.28.10/arch/ubicom32/include/asm/entry.h
3829 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/entry.h 1970-01-01 02:00:00.000000000 +0200
3830 +++ linux-2.6.28.10/arch/ubicom32/include/asm/entry.h 2009-08-06 10:31:02.000000000 +0300
3833 + * arch/ubicom32/include/asm/entry.h
3834 + * Entry register/stack definitions for Ubicom32 architecture.
3836 + * (C) Copyright 2009, Ubicom, Inc.
3838 + * This file is part of the Ubicom32 Linux Kernel Port.
3840 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
3841 + * it and/or modify it under the terms of the GNU General Public License
3842 + * as published by the Free Software Foundation, either version 2 of the
3843 + * License, or (at your option) any later version.
3845 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
3846 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
3847 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
3848 + * the GNU General Public License for more details.
3850 + * You should have received a copy of the GNU General Public License
3851 + * along with the Ubicom32 Linux Kernel Port. If not,
3852 + * see <http://www.gnu.org/licenses/>.
3854 + * Ubicom32 implementation derived from (with many thanks):
3859 +#ifndef _ASM_UBICOM32_ENTRY_H
3860 +#define _ASM_UBICOM32_ENTRY_H
3862 +#include <asm/setup.h>
3863 +#include <asm/page.h>
3865 +#endif /* _ASM_UBICOM32_ENTRY_H */
3866 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/errno.h linux-2.6.28.10/arch/ubicom32/include/asm/errno.h
3867 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/errno.h 1970-01-01 02:00:00.000000000 +0200
3868 +++ linux-2.6.28.10/arch/ubicom32/include/asm/errno.h 2009-08-06 10:31:02.000000000 +0300
3871 + * arch/ubicom32/include/asm/errno.h
3872 + * Generic errno.h for Ubicom32 architecture.
3874 + * (C) Copyright 2009, Ubicom, Inc.
3876 + * This file is part of the Ubicom32 Linux Kernel Port.
3878 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
3879 + * it and/or modify it under the terms of the GNU General Public License
3880 + * as published by the Free Software Foundation, either version 2 of the
3881 + * License, or (at your option) any later version.
3883 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
3884 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
3885 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
3886 + * the GNU General Public License for more details.
3888 + * You should have received a copy of the GNU General Public License
3889 + * along with the Ubicom32 Linux Kernel Port. If not,
3890 + * see <http://www.gnu.org/licenses/>.
3892 + * Ubicom32 implementation derived from (with many thanks):
3897 +#ifndef _ASM_UBICOM32_ERRNO_H
3898 +#define _ASM_UBICOM32_ERRNO_H
3900 +#include <asm-generic/errno.h>
3902 +#endif /* _ASM_UBICOM32_ERRNO_H */
3903 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/fb.h linux-2.6.28.10/arch/ubicom32/include/asm/fb.h
3904 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/fb.h 1970-01-01 02:00:00.000000000 +0200
3905 +++ linux-2.6.28.10/arch/ubicom32/include/asm/fb.h 2009-08-06 10:31:02.000000000 +0300
3908 + * arch/ubicom32/include/asm/fb.h
3909 + * Definition of fb_is_primary_device() for Ubicom32 architecture.
3911 + * (C) Copyright 2009, Ubicom, Inc.
3913 + * This file is part of the Ubicom32 Linux Kernel Port.
3915 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
3916 + * it and/or modify it under the terms of the GNU General Public License
3917 + * as published by the Free Software Foundation, either version 2 of the
3918 + * License, or (at your option) any later version.
3920 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
3921 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
3922 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
3923 + * the GNU General Public License for more details.
3925 + * You should have received a copy of the GNU General Public License
3926 + * along with the Ubicom32 Linux Kernel Port. If not,
3927 + * see <http://www.gnu.org/licenses/>.
3929 + * Ubicom32 implementation derived from (with many thanks):
3934 +#ifndef _ASM_UBICOM32_FB_H
3935 +#define _ASM_UBICOM32_FB_H
3936 +#include <linux/fb.h>
3938 +#define fb_pgprotect(...) do {} while (0)
3940 +static inline int fb_is_primary_device(struct fb_info *info)
3945 +#endif /* _ASM_UBICOM32_FB_H */
3946 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/fcntl.h linux-2.6.28.10/arch/ubicom32/include/asm/fcntl.h
3947 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/fcntl.h 1970-01-01 02:00:00.000000000 +0200
3948 +++ linux-2.6.28.10/arch/ubicom32/include/asm/fcntl.h 2009-08-06 10:31:02.000000000 +0300
3951 + * arch/ubicom32/include/asm/fcntl.h
3952 + * File control bit definitions for Ubicom32 architecture.
3954 + * (C) Copyright 2009, Ubicom, Inc.
3956 + * This file is part of the Ubicom32 Linux Kernel Port.
3958 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
3959 + * it and/or modify it under the terms of the GNU General Public License
3960 + * as published by the Free Software Foundation, either version 2 of the
3961 + * License, or (at your option) any later version.
3963 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
3964 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
3965 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
3966 + * the GNU General Public License for more details.
3968 + * You should have received a copy of the GNU General Public License
3969 + * along with the Ubicom32 Linux Kernel Port. If not,
3970 + * see <http://www.gnu.org/licenses/>.
3972 + * Ubicom32 implementation derived from (with many thanks):
3977 +#ifndef _ASM_UBICOM32_FCNTL_H
3978 +#define _ASM_UBICOM32_FCNTL_H
3980 +#define O_DIRECTORY 040000 /* must be a directory */
3981 +#define O_NOFOLLOW 0100000 /* don't follow links */
3982 +#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
3983 +#define O_LARGEFILE 0400000
3985 +#include <asm-generic/fcntl.h>
3987 +#endif /* _ASM_UBICOM32_FCNTL_H */
3988 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/flat.h linux-2.6.28.10/arch/ubicom32/include/asm/flat.h
3989 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/flat.h 1970-01-01 02:00:00.000000000 +0200
3990 +++ linux-2.6.28.10/arch/ubicom32/include/asm/flat.h 2009-08-06 10:31:02.000000000 +0300
3993 + * arch/ubicom32/include/asm/flat.h
3994 + * Definitions to support flat-format executables.
3996 + * (C) Copyright 2009, Ubicom, Inc.
3998 + * This file is part of the Ubicom32 Linux Kernel Port.
4000 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
4001 + * it and/or modify it under the terms of the GNU General Public License
4002 + * as published by the Free Software Foundation, either version 2 of the
4003 + * License, or (at your option) any later version.
4005 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
4006 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
4007 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
4008 + * the GNU General Public License for more details.
4010 + * You should have received a copy of the GNU General Public License
4011 + * along with the Ubicom32 Linux Kernel Port. If not,
4012 + * see <http://www.gnu.org/licenses/>.
4014 + * Ubicom32 implementation derived from (with many thanks):
4020 +#ifndef _ASM_UBICOM32_FLAT_H
4021 +#define _ASM_UBICOM32_FLAT_H
4023 +#define ARCH_FLAT_ALIGN 0x80
4024 +#define ARCH_FLAT_ALIGN_TEXT 1
4026 +#define R_UBICOM32_32 2
4027 +#define R_UBICOM32_HI24 7
4028 +#define R_UBICOM32_LO7_S 8
4029 +#define R_UBICOM32_LO7_2_S 9
4030 +#define R_UBICOM32_LO7_4_S 10
4031 +#define R_UBICOM32_LO7_D 11
4032 +#define R_UBICOM32_LO7_2_D 12
4033 +#define R_UBICOM32_LO7_4_D 13
4034 +#define R_UBICOM32_LO7_CALLI 15
4035 +#define R_UBICOM32_LO16_CALLI 16
4037 +extern void ubicom32_flat_put_addr_at_rp(unsigned long *rp, u32_t val, u32_t rval, unsigned long *p);
4038 +extern unsigned long ubicom32_flat_get_addr_from_rp(unsigned long *rp, u32_t relval, u32_t flags, unsigned long *p);
4040 +#define flat_stack_align(sp) /* nothing needed */
4041 +#define flat_argvp_envp_on_stack() 1
4042 +#define flat_old_ram_flag(flags) (flags)
4043 +#define flat_reloc_valid(reloc, size) ((reloc) <= (size))
4044 +#define flat_get_addr_from_rp(rp, relval, flags, p) (ubicom32_flat_get_addr_from_rp(rp, relval,flags, p))
4045 +#define flat_put_addr_at_rp(rp, val, relval) do {ubicom32_flat_put_addr_at_rp(rp, val, relval, &persistent);} while(0)
4046 +#define flat_get_relocate_addr(rel) ((persistent) ? (persistent & 0x07ffffff) : (rel & 0x07ffffff))
4048 +static inline int flat_set_persistent(unsigned int relval, unsigned long *p)
4053 + if ((relval >> 27) != R_UBICOM32_32) {
4055 + * Something other than UBICOM32_32. The next entry has the relocation.
4064 +#endif /* _ASM_UBICOM32_FLAT_H */
4065 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/fpu.h linux-2.6.28.10/arch/ubicom32/include/asm/fpu.h
4066 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/fpu.h 1970-01-01 02:00:00.000000000 +0200
4067 +++ linux-2.6.28.10/arch/ubicom32/include/asm/fpu.h 2009-08-06 10:31:02.000000000 +0300
4070 + * arch/ubicom32/include/asm/fpu.h
4071 + * Floating point state definitions for Ubicom32 architecture.
4073 + * (C) Copyright 2009, Ubicom, Inc.
4075 + * This file is part of the Ubicom32 Linux Kernel Port.
4077 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
4078 + * it and/or modify it under the terms of the GNU General Public License
4079 + * as published by the Free Software Foundation, either version 2 of the
4080 + * License, or (at your option) any later version.
4082 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
4083 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
4084 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
4085 + * the GNU General Public License for more details.
4087 + * You should have received a copy of the GNU General Public License
4088 + * along with the Ubicom32 Linux Kernel Port. If not,
4089 + * see <http://www.gnu.org/licenses/>.
4091 + * Ubicom32 implementation derived from (with many thanks):
4096 +#ifndef _ASM_UBICOM32_FPU_H
4097 +#define _ASM_UBICOM32_FPU_H
4100 + * MAX floating point unit state size (FSAVE/FRESTORE)
4102 +/* No FP unit present then... */
4103 +#define FPSTATESIZE (2) /* dummy size */
4105 +#endif /* _ASM_UBICOM32_FPU_H */
4106 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/futex.h linux-2.6.28.10/arch/ubicom32/include/asm/futex.h
4107 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/futex.h 1970-01-01 02:00:00.000000000 +0200
4108 +++ linux-2.6.28.10/arch/ubicom32/include/asm/futex.h 2009-08-06 10:31:02.000000000 +0300
4111 + * arch/ubicom32/include/asm/futex.h
4112 + * Generic futex.h for Ubicom32 architecture.
4114 + * (C) Copyright 2009, Ubicom, Inc.
4116 + * This file is part of the Ubicom32 Linux Kernel Port.
4118 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
4119 + * it and/or modify it under the terms of the GNU General Public License
4120 + * as published by the Free Software Foundation, either version 2 of the
4121 + * License, or (at your option) any later version.
4123 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
4124 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
4125 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
4126 + * the GNU General Public License for more details.
4128 + * You should have received a copy of the GNU General Public License
4129 + * along with the Ubicom32 Linux Kernel Port. If not,
4130 + * see <http://www.gnu.org/licenses/>.
4132 + * Ubicom32 implementation derived from (with many thanks):
4137 +#ifndef _ASM_UBICOM32_FUTEX_H
4138 +#define _ASM_UBICOM32_FUTEX_H
4140 +#include <asm-generic/futex.h>
4142 +#endif /* _ASM_UBICOM32_FUTEX_H */
4143 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/gpio.h linux-2.6.28.10/arch/ubicom32/include/asm/gpio.h
4144 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/gpio.h 1970-01-01 02:00:00.000000000 +0200
4145 +++ linux-2.6.28.10/arch/ubicom32/include/asm/gpio.h 2009-08-12 13:08:37.000000000 +0300
4148 + * arch/ubicom32/include/asm/gpio.h
4149 + * Definitions for GPIO operations on Ubicom32 architecture.
4151 + * (C) Copyright 2009, Ubicom, Inc.
4153 + * This file is part of the Ubicom32 Linux Kernel Port.
4155 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
4156 + * it and/or modify it under the terms of the GNU General Public License
4157 + * as published by the Free Software Foundation, either version 2 of the
4158 + * License, or (at your option) any later version.
4160 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
4161 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
4162 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
4163 + * the GNU General Public License for more details.
4165 + * You should have received a copy of the GNU General Public License
4166 + * along with the Ubicom32 Linux Kernel Port. If not,
4167 + * see <http://www.gnu.org/licenses/>.
4169 + * Ubicom32 implementation derived from (with many thanks):
4174 +#ifndef _ASM_UBICOM32_GPIO_H
4175 +#define _ASM_UBICOM32_GPIO_H
4177 +#include <linux/compiler.h>
4178 +#include <asm/irq.h>
4180 +#include <asm/ip5000.h>
4182 +#define ARCH_NR_GPIOS 512
4183 +#define MAX_UBICOM_ONCHIP_GPIO (9 * 32)
4186 + * Macros for manipulating GPIO numbers
4188 +#define gpio_bit(gn) (1 << (gn & 0x1f))
4189 +#define gpio_bank(gn) (gn >> 5)
4191 +#define gpio_pin_index(gn) (gn & 0x1f)
4192 +#define gpio_port_index(gn) (gn >> 5)
4194 +#define GPIO_RA_0 ((32 * 0) + 0)
4195 +#define GPIO_RA_1 ((32 * 0) + 1)
4196 +#define GPIO_RA_2 ((32 * 0) + 2)
4197 +#define GPIO_RA_3 ((32 * 0) + 3)
4198 +#define GPIO_RA_4 ((32 * 0) + 4)
4199 +#define GPIO_RA_5 ((32 * 0) + 5)
4200 +#define GPIO_RA_6 ((32 * 0) + 6)
4201 +#define GPIO_RA_7 ((32 * 0) + 7)
4203 +#define GPIO_RB_0 ((32 * 1) + 0)
4204 +#define GPIO_RB_1 ((32 * 1) + 1)
4205 +#define GPIO_RB_2 ((32 * 1) + 2)
4206 +#define GPIO_RB_3 ((32 * 1) + 3)
4207 +#define GPIO_RB_4 ((32 * 1) + 4)
4208 +#define GPIO_RB_5 ((32 * 1) + 5)
4209 +#define GPIO_RB_6 ((32 * 1) + 6)
4210 +#define GPIO_RB_7 ((32 * 1) + 7)
4211 +#define GPIO_RB_8 ((32 * 1) + 8)
4212 +#define GPIO_RB_9 ((32 * 1) + 9)
4213 +#define GPIO_RB_10 ((32 * 1) + 10)
4214 +#define GPIO_RB_11 ((32 * 1) + 11)
4215 +#define GPIO_RB_12 ((32 * 1) + 12)
4216 +#define GPIO_RB_13 ((32 * 1) + 13)
4217 +#define GPIO_RB_14 ((32 * 1) + 14)
4218 +#define GPIO_RB_15 ((32 * 1) + 15)
4219 +#define GPIO_RB_16 ((32 * 1) + 16)
4220 +#define GPIO_RB_17 ((32 * 1) + 17)
4221 +#define GPIO_RB_18 ((32 * 1) + 18)
4222 +#define GPIO_RB_19 ((32 * 1) + 19)
4224 +#define GPIO_RC_0 ((32 * 2) + 0)
4225 +#define GPIO_RC_1 ((32 * 2) + 1)
4226 +#define GPIO_RC_2 ((32 * 2) + 2)
4227 +#define GPIO_RC_3 ((32 * 2) + 3)
4228 +#define GPIO_RC_4 ((32 * 2) + 4)
4229 +#define GPIO_RC_5 ((32 * 2) + 5)
4230 +#define GPIO_RC_6 ((32 * 2) + 6)
4231 +#define GPIO_RC_7 ((32 * 2) + 7)
4232 +#define GPIO_RC_8 ((32 * 2) + 8)
4233 +#define GPIO_RC_9 ((32 * 2) + 9)
4234 +#define GPIO_RC_10 ((32 * 2) + 10)
4235 +#define GPIO_RC_11 ((32 * 2) + 11)
4236 +#define GPIO_RC_12 ((32 * 2) + 12)
4237 +#define GPIO_RC_13 ((32 * 2) + 13)
4238 +#define GPIO_RC_14 ((32 * 2) + 14)
4239 +#define GPIO_RC_15 ((32 * 2) + 15)
4240 +#define GPIO_RC_16 ((32 * 2) + 16)
4241 +#define GPIO_RC_17 ((32 * 2) + 17)
4242 +#define GPIO_RC_18 ((32 * 2) + 18)
4243 +#define GPIO_RC_19 ((32 * 2) + 19)
4244 +#define GPIO_RC_20 ((32 * 2) + 20)
4245 +#define GPIO_RC_21 ((32 * 2) + 21)
4246 +#define GPIO_RC_22 ((32 * 2) + 22)
4247 +#define GPIO_RC_23 ((32 * 2) + 23)
4248 +#define GPIO_RC_24 ((32 * 2) + 24)
4249 +#define GPIO_RC_25 ((32 * 2) + 25)
4250 +#define GPIO_RC_26 ((32 * 2) + 26)
4251 +#define GPIO_RC_27 ((32 * 2) + 27)
4252 +#define GPIO_RC_28 ((32 * 2) + 28)
4253 +#define GPIO_RC_29 ((32 * 2) + 29)
4254 +#define GPIO_RC_30 ((32 * 2) + 30)
4255 +#define GPIO_RC_31 ((32 * 2) + 31)
4257 +#define GPIO_RD_0 ((32 * 3) + 0)
4258 +#define GPIO_RD_1 ((32 * 3) + 1)
4259 +#define GPIO_RD_2 ((32 * 3) + 2)
4260 +#define GPIO_RD_3 ((32 * 3) + 3)
4261 +#define GPIO_RD_4 ((32 * 3) + 4)
4262 +#define GPIO_RD_5 ((32 * 3) + 5)
4263 +#define GPIO_RD_6 ((32 * 3) + 6)
4264 +#define GPIO_RD_7 ((32 * 3) + 7)
4265 +#define GPIO_RD_8 ((32 * 3) + 8)
4266 +#define GPIO_RD_9 ((32 * 3) + 9)
4267 +#define GPIO_RD_10 ((32 * 3) + 10)
4268 +#define GPIO_RD_11 ((32 * 3) + 11)
4270 +#define GPIO_RE_0 ((32 * 4) + 0)
4271 +#define GPIO_RE_1 ((32 * 4) + 1)
4272 +#define GPIO_RE_2 ((32 * 4) + 2)
4273 +#define GPIO_RE_3 ((32 * 4) + 3)
4274 +#define GPIO_RE_4 ((32 * 4) + 4)
4275 +#define GPIO_RE_5 ((32 * 4) + 5)
4276 +#define GPIO_RE_6 ((32 * 4) + 6)
4277 +#define GPIO_RE_7 ((32 * 4) + 7)
4279 +#define GPIO_RF_0 ((32 * 5) + 0)
4280 +#define GPIO_RF_1 ((32 * 5) + 1)
4281 +#define GPIO_RF_2 ((32 * 5) + 2)
4282 +#define GPIO_RF_3 ((32 * 5) + 3)
4283 +#define GPIO_RF_4 ((32 * 5) + 4)
4284 +#define GPIO_RF_5 ((32 * 5) + 5)
4285 +#define GPIO_RF_6 ((32 * 5) + 6)
4286 +#define GPIO_RF_7 ((32 * 5) + 7)
4287 +#define GPIO_RF_8 ((32 * 5) + 8)
4288 +#define GPIO_RF_9 ((32 * 5) + 9)
4289 +#define GPIO_RF_10 ((32 * 5) + 10)
4290 +#define GPIO_RF_11 ((32 * 5) + 11)
4291 +#define GPIO_RF_12 ((32 * 5) + 12)
4292 +#define GPIO_RF_13 ((32 * 5) + 13)
4293 +#define GPIO_RF_14 ((32 * 5) + 14)
4294 +#define GPIO_RF_15 ((32 * 5) + 15)
4296 +#define GPIO_RG_0 ((32 * 6) + 0)
4297 +#define GPIO_RG_1 ((32 * 6) + 1)
4298 +#define GPIO_RG_2 ((32 * 6) + 2)
4299 +#define GPIO_RG_3 ((32 * 6) + 3)
4300 +#define GPIO_RG_4 ((32 * 6) + 4)
4301 +#define GPIO_RG_5 ((32 * 6) + 5)
4302 +#define GPIO_RG_6 ((32 * 6) + 6)
4303 +#define GPIO_RG_7 ((32 * 6) + 7)
4304 +#define GPIO_RG_8 ((32 * 6) + 8)
4305 +#define GPIO_RG_9 ((32 * 6) + 9)
4306 +#define GPIO_RG_10 ((32 * 6) + 10)
4307 +#define GPIO_RG_11 ((32 * 6) + 11)
4308 +#define GPIO_RG_12 ((32 * 6) + 12)
4309 +#define GPIO_RG_13 ((32 * 6) + 13)
4310 +#define GPIO_RG_14 ((32 * 6) + 14)
4311 +#define GPIO_RG_15 ((32 * 6) + 15)
4312 +#define GPIO_RG_16 ((32 * 6) + 16)
4313 +#define GPIO_RG_17 ((32 * 6) + 17)
4314 +#define GPIO_RG_18 ((32 * 6) + 18)
4315 +#define GPIO_RG_19 ((32 * 6) + 19)
4316 +#define GPIO_RG_20 ((32 * 6) + 20)
4317 +#define GPIO_RG_21 ((32 * 6) + 21)
4318 +#define GPIO_RG_22 ((32 * 6) + 22)
4319 +#define GPIO_RG_23 ((32 * 6) + 23)
4320 +#define GPIO_RG_24 ((32 * 6) + 24)
4321 +#define GPIO_RG_25 ((32 * 6) + 25)
4322 +#define GPIO_RG_26 ((32 * 6) + 26)
4323 +#define GPIO_RG_27 ((32 * 6) + 27)
4324 +#define GPIO_RG_28 ((32 * 6) + 28)
4325 +#define GPIO_RG_29 ((32 * 6) + 29)
4326 +#define GPIO_RG_30 ((32 * 6) + 30)
4327 +#define GPIO_RG_31 ((32 * 6) + 31)
4329 +#define GPIO_RH_0 ((32 * 7) + 0)
4330 +#define GPIO_RH_1 ((32 * 7) + 1)
4331 +#define GPIO_RH_2 ((32 * 7) + 2)
4332 +#define GPIO_RH_3 ((32 * 7) + 3)
4333 +#define GPIO_RH_4 ((32 * 7) + 4)
4334 +#define GPIO_RH_5 ((32 * 7) + 5)
4335 +#define GPIO_RH_6 ((32 * 7) + 6)
4336 +#define GPIO_RH_7 ((32 * 7) + 7)
4337 +#define GPIO_RH_8 ((32 * 7) + 8)
4338 +#define GPIO_RH_9 ((32 * 7) + 9)
4340 +#define GPIO_RI_0 ((32 * 8) + 0)
4341 +#define GPIO_RI_1 ((32 * 8) + 1)
4342 +#define GPIO_RI_2 ((32 * 8) + 2)
4343 +#define GPIO_RI_3 ((32 * 8) + 3)
4344 +#define GPIO_RI_4 ((32 * 8) + 4)
4345 +#define GPIO_RI_5 ((32 * 8) + 5)
4346 +#define GPIO_RI_6 ((32 * 8) + 6)
4347 +#define GPIO_RI_7 ((32 * 8) + 7)
4348 +#define GPIO_RI_8 ((32 * 8) + 8)
4349 +#define GPIO_RI_9 ((32 * 8) + 9)
4350 +#define GPIO_RI_10 ((32 * 8) + 10)
4351 +#define GPIO_RI_11 ((32 * 8) + 11)
4352 +#define GPIO_RI_12 ((32 * 8) + 12)
4353 +#define GPIO_RI_13 ((32 * 8) + 13)
4356 + * The following section defines extra GPIO available to some boards.
4357 + * These GPIO are generally external to the processor (i.e. SPI/I2C
4358 + * expander chips).
4360 + * Note that these defines show all possible GPIO available, however,
4361 + * depending on the actual board configuration, some GPIO are not
4362 + * available for use.
4364 +#ifdef CONFIG_IP7500MEDIA
4368 +#define IP7500MEDIA_U15_BASE (32 * 10)
4369 +#define IP7500MEDIA_IO0 (IP7500MEDIA_U15_BASE + 0)
4370 +#define IP7500MEDIA_IO1 (IP7500MEDIA_U15_BASE + 1)
4371 +#define IP7500MEDIA_IO2 (IP7500MEDIA_U15_BASE + 2)
4372 +#define IP7500MEDIA_IO3 (IP7500MEDIA_U15_BASE + 3)
4373 +#define IP7500MEDIA_IO4 (IP7500MEDIA_U15_BASE + 4)
4374 +#define IP7500MEDIA_IO5 (IP7500MEDIA_U15_BASE + 5)
4375 +#define IP7500MEDIA_IO6 (IP7500MEDIA_U15_BASE + 6)
4376 +#define IP7500MEDIA_IO7 (IP7500MEDIA_U15_BASE + 7)
4381 +#define IP7500MEDIA_U16_BASE (32 * 11)
4382 +#define IP7500MEDIA_IO8 (IP7500MEDIA_U16_BASE + 0)
4383 +#define IP7500MEDIA_IO9 (IP7500MEDIA_U16_BASE + 1)
4384 +#define IP7500MEDIA_IO10 (IP7500MEDIA_U16_BASE + 2)
4385 +#define IP7500MEDIA_IO11 (IP7500MEDIA_U16_BASE + 3)
4386 +#define IP7500MEDIA_IO12 (IP7500MEDIA_U16_BASE + 4)
4387 +#define IP7500MEDIA_IO13 (IP7500MEDIA_U16_BASE + 5)
4388 +#define IP7500MEDIA_IO14 (IP7500MEDIA_U16_BASE + 6)
4389 +#define IP7500MEDIA_IO15 (IP7500MEDIA_U16_BASE + 7)
4394 +#define IP7500MEDIA_U17_BASE (32 * 12)
4395 +#define IP7500MEDIA_IO16 (IP7500MEDIA_U17_BASE + 0)
4396 +#define IP7500MEDIA_IO17 (IP7500MEDIA_U17_BASE + 1)
4397 +#define IP7500MEDIA_IO18 (IP7500MEDIA_U17_BASE + 2)
4398 +#define IP7500MEDIA_IO19 (IP7500MEDIA_U17_BASE + 3)
4399 +#define IP7500MEDIA_IO20 (IP7500MEDIA_U17_BASE + 4)
4400 +#define IP7500MEDIA_IO21 (IP7500MEDIA_U17_BASE + 5)
4401 +#define IP7500MEDIA_IO22 (IP7500MEDIA_U17_BASE + 6)
4402 +#define IP7500MEDIA_IO23 (IP7500MEDIA_U17_BASE + 7)
4407 +#define IP7500MEDIA_U18_BASE (32 * 13)
4408 +#define IP7500MEDIA_IO24 (IP7500MEDIA_U18_BASE + 0)
4409 +#define IP7500MEDIA_IO25 (IP7500MEDIA_U18_BASE + 1)
4410 +#define IP7500MEDIA_IO26 (IP7500MEDIA_U18_BASE + 2)
4411 +#define IP7500MEDIA_IO27 (IP7500MEDIA_U18_BASE + 3)
4412 +#define IP7500MEDIA_IO28 (IP7500MEDIA_U18_BASE + 4)
4413 +#define IP7500MEDIA_IO29 (IP7500MEDIA_U18_BASE + 5)
4414 +#define IP7500MEDIA_IO30 (IP7500MEDIA_U18_BASE + 6)
4415 +#define IP7500MEDIA_IO31 (IP7500MEDIA_U18_BASE + 7)
4418 +#ifdef CONFIG_IP7145DPF
4422 +#define IP7145DPF_U48_BASE (32 * 10)
4423 +#define IP7145DPF_IO0 (IP7145DPF_U48_BASE + 0)
4424 +#define IP7145DPF_IO1 (IP7145DPF_U48_BASE + 1)
4425 +#define IP7145DPF_IO2 (IP7145DPF_U48_BASE + 2)
4426 +#define IP7145DPF_IO3 (IP7145DPF_U48_BASE + 3)
4427 +#define IP7145DPF_IO4 (IP7145DPF_U48_BASE + 4)
4428 +#define IP7145DPF_IO5 (IP7145DPF_U48_BASE + 5)
4429 +#define IP7145DPF_IO6 (IP7145DPF_U48_BASE + 6)
4430 +#define IP7145DPF_IO7 (IP7145DPF_U48_BASE + 7)
4435 +#define IP7145DPF_U72_BASE (32 * 11)
4436 +#define IP7145DPF_IOB0 (IP7145DPF_U72_BASE + 0)
4437 +#define IP7145DPF_IOB1 (IP7145DPF_U72_BASE + 1)
4438 +#define IP7145DPF_IOB2 (IP7145DPF_U72_BASE + 2)
4439 +#define IP7145DPF_IOB3 (IP7145DPF_U72_BASE + 3)
4440 +#define IP7145DPF_IOB4 (IP7145DPF_U72_BASE + 4)
4441 +#define IP7145DPF_IOB5 (IP7145DPF_U72_BASE + 5)
4442 +#define IP7145DPF_IOB6 (IP7145DPF_U72_BASE + 6)
4443 +#define IP7145DPF_IOB7 (IP7145DPF_U72_BASE + 7)
4446 +#include <asm-generic/gpio.h>
4449 + * The following macros bypass gpiolib to generate direct references
4450 + * to the port registers. These assume, minimally, that either
4451 + * gpio_direction_input() or gpio_direction_output() have already been
4452 + * called to setup the pin direction and to enable the pin function to
4453 + * be gpio. These macros generate the hardware port address based on
4454 + * the assumption that all ports are 32 bits wide (even though we know
4455 + * they are not). This is so we can efficiently turn pin numbers into
4456 + * port addresses without a lookup.
4458 + * These operations must be done in one instruction to prevent clobbering
4459 + * other thread's accesses to the same port.
4461 +#define UBICOM32_GPIO_ENABLE(pin) \
4463 + asm volatile ("or.4 (%[port]), (%[port]), %[mask]\n\t" \
4465 + : [port] "a" (&UBICOM32_IO_PORT(IO_BASE + (gpio_bank(pin) << 12))->gpio_mask), \
4466 + [mask] "d" (gpio_bit(pin)) \
4467 + : "cc", "memory" \
4471 +#define UBICOM32_GPIO_DISABLE(pin) \
4473 + asm volatile ("and.4 (%[port]), (%[port]), %[mask]\n\t" \
4475 + : [port] "a" (&UBICOM32_IO_PORT(IO_BASE + (gpio_bank(pin) << 12))->gpio_mask), \
4476 + [mask] "d" (~gpio_bit(pin)) \
4477 + : "cc", "memory" \
4481 +#define UBICOM32_GPIO_SET_PIN_INPUT(pin) \
4483 + asm volatile ("and.4 (%[port]), (%[port]), %[mask]\n\t" \
4485 + : [port] "a" (&UBICOM32_IO_PORT(IO_BASE + (gpio_bank(pin) << 12))->gpio_ctl), \
4486 + [mask] "d" (~gpio_bit(pin)) \
4487 + : "cc", "memory" \
4491 +#define UBICOM32_GPIO_SET_PIN_OUTPUT(pin) \
4493 + asm volatile ("or.4 (%[port]), (%[port]), %[mask]\n\t" \
4495 + : [port] "a" (&UBICOM32_IO_PORT(IO_BASE + (gpio_bank(pin) << 12))->gpio_ctl), \
4496 + [mask] "d" (gpio_bit(pin)) \
4497 + : "cc", "memory" \
4501 +#define UBICOM32_GPIO_SET_PIN_TOGGLE(pin) \
4503 + asm volatile ("xor.4 (%[port]), (%[port]), %[mask]\n\t" \
4505 + : [port] "a" (&UBICOM32_IO_PORT(IO_BASE + (gpio_bank(pin) << 12))->gpio_out), \
4506 + [mask] "d" (gpio_bit(pin)) \
4507 + : "cc", "memory" \
4511 +#define UBICOM32_GPIO_SET_PIN_HIGH(pin) \
4513 + asm volatile ("or.4 (%[port]), (%[port]), %[mask]\n\t" \
4515 + : [port] "a" (&UBICOM32_IO_PORT(IO_BASE + (gpio_bank(pin) << 12))->gpio_out), \
4516 + [mask] "d" (gpio_bit(pin)) \
4517 + : "cc", "memory" \
4521 +#define UBICOM32_GPIO_SET_PIN_LOW(pin) \
4523 + asm volatile ("and.4 (%[port]), (%[port]), %[mask]\n\t" \
4525 + : [port] "a" (&UBICOM32_IO_PORT(IO_BASE + (gpio_bank(pin) << 12))->gpio_out), \
4526 + [mask] "d" (~gpio_bit(pin)) \
4527 + : "cc", "memory" \
4531 +#define UBICOM32_GPIO_SET_PIN(pin, val) \
4533 + UBICOM32_GPIO_SET_PIN_HIGH(pin); \
4535 + UBICOM32_GPIO_SET_PIN_LOW(pin); \
4538 +#define UBICOM32_GPIO_GET_PIN(pin) \
4539 + (0 != (UBICOM32_IO_PORT(IO_BASE + (gpio_bank(pin) << 12))->gpio_in \
4543 +static inline int gpio_get_value(unsigned gpio)
4545 + if (gpio <= MAX_UBICOM_ONCHIP_GPIO)
4546 + return UBICOM32_GPIO_GET_PIN(gpio);
4548 + return __gpio_get_value(gpio);
4551 +static inline void gpio_set_value(unsigned gpio, int value)
4553 + if (gpio <= MAX_UBICOM_ONCHIP_GPIO)
4555 + UBICOM32_GPIO_SET_PIN(gpio, value);
4559 + __gpio_set_value(gpio, value);
4563 +static inline int gpio_cansleep(unsigned gpio)
4565 + return __gpio_cansleep(gpio);
4568 +static inline int gpio_to_irq(unsigned gpio)
4570 +#if defined(IP5000) || defined(IP5000_REV2)
4571 + if ((gpio >= GPIO_RA_4) && (gpio <= GPIO_RA_6))
4576 +#elif defined(IP7000) || defined(IP7000_REV2)
4577 + if ((gpio >= GPIO_RA_4) && (gpio <= GPIO_RA_6))
4578 + return 44 + (gpio - GPIO_RA_4);
4588 +static inline int irq_to_gpio(unsigned gpio)
4593 +extern struct ubicom32_io_port *ubi_gpio_get_port(unsigned gpio);
4595 +extern int __init ubi_gpio_init(void);
4597 +#endif /* _ASM_UBICOM32_GPIO_H */
4598 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/hardirq.h linux-2.6.28.10/arch/ubicom32/include/asm/hardirq.h
4599 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/hardirq.h 1970-01-01 02:00:00.000000000 +0200
4600 +++ linux-2.6.28.10/arch/ubicom32/include/asm/hardirq.h 2009-08-06 10:31:02.000000000 +0300
4603 + * arch/ubicom32/include/asm/hardirq.h
4604 + * Definition of ack_bad_irq() for Ubicom32 architecture.
4606 + * (C) Copyright 2009, Ubicom, Inc.
4607 + * Copyright (C) 1997, 98, 99, 2000, 01, 05 Ralf Baechle (ralf@linux-mips.org)
4608 + * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
4609 + * Copyright (C) 2001 MIPS Technologies, Inc.
4611 + * This file is part of the Ubicom32 Linux Kernel Port.
4613 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
4614 + * it and/or modify it under the terms of the GNU General Public License
4615 + * as published by the Free Software Foundation, either version 2 of the
4616 + * License, or (at your option) any later version.
4618 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
4619 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
4620 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
4621 + * the GNU General Public License for more details.
4623 + * You should have received a copy of the GNU General Public License
4624 + * along with the Ubicom32 Linux Kernel Port. If not,
4625 + * see <http://www.gnu.org/licenses/>.
4627 + * Ubicom32 implementation derived from (with many thanks):
4632 +#ifndef _ASM_UBICOM32_HARDIRQ_H
4633 +#define _ASM_UBICOM32_HARDIRQ_H
4635 +#include <linux/threads.h>
4636 +#include <linux/irq.h>
4639 + * The hardirq mask has to be large enough to have space
4640 + * for potentially all IRQ sources in the system nesting
4641 + * on a single CPU. For Ubicom32, we have 64 IRQ sources.
4643 +#define HARDIRQ_BITS 6
4644 +#if (1 << HARDIRQ_BITS) < NR_IRQS
4645 +# error HARDIRQ_BITS is too low!
4649 + unsigned int __softirq_pending;
4650 +} ____cacheline_aligned irq_cpustat_t;
4652 +#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
4654 +extern void ack_bad_irq(unsigned int irq);
4656 +#endif /* _ASM_UBICOM32_HARDIRQ_H */
4657 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/hw_irq.h linux-2.6.28.10/arch/ubicom32/include/asm/hw_irq.h
4658 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/hw_irq.h 1970-01-01 02:00:00.000000000 +0200
4659 +++ linux-2.6.28.10/arch/ubicom32/include/asm/hw_irq.h 2009-08-06 10:31:02.000000000 +0300
4662 + * arch/ubicom32/include/asm/hw_irq.h
4663 + * Ubicom32 architecture APIC support.
4665 + * (C) Copyright 2009, Ubicom, Inc.
4667 + * This file is part of the Ubicom32 Linux Kernel Port.
4669 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
4670 + * it and/or modify it under the terms of the GNU General Public License
4671 + * as published by the Free Software Foundation, either version 2 of the
4672 + * License, or (at your option) any later version.
4674 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
4675 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
4676 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
4677 + * the GNU General Public License for more details.
4679 + * You should have received a copy of the GNU General Public License
4680 + * along with the Ubicom32 Linux Kernel Port. If not,
4681 + * see <http://www.gnu.org/licenses/>.
4683 + * Ubicom32 implementation derived from (with many thanks):
4688 +#ifndef _ASM_UBICOM32_HW_IRQ_H
4689 +#define _ASM_UBICOM32_HW_IRQ_H
4691 +#endif /* _ASM_UBICOM32_HW_IRQ_H */
4692 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/ioctl.h linux-2.6.28.10/arch/ubicom32/include/asm/ioctl.h
4693 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/ioctl.h 1970-01-01 02:00:00.000000000 +0200
4694 +++ linux-2.6.28.10/arch/ubicom32/include/asm/ioctl.h 2009-08-06 10:31:02.000000000 +0300
4697 + * arch/ubicom32/include/asm/ioctl.h
4698 + * Generic ioctl.h for Ubicom32 architecture.
4700 + * (C) Copyright 2009, Ubicom, Inc.
4702 + * This file is part of the Ubicom32 Linux Kernel Port.
4704 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
4705 + * it and/or modify it under the terms of the GNU General Public License
4706 + * as published by the Free Software Foundation, either version 2 of the
4707 + * License, or (at your option) any later version.
4709 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
4710 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
4711 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
4712 + * the GNU General Public License for more details.
4714 + * You should have received a copy of the GNU General Public License
4715 + * along with the Ubicom32 Linux Kernel Port. If not,
4716 + * see <http://www.gnu.org/licenses/>.
4718 + * Ubicom32 implementation derived from (with many thanks):
4723 +#ifndef _ASM_UBICOM32_IOCTL_H
4724 +#define _ASM_UBICOM32_IOCTL_H
4726 +#include <asm-generic/ioctl.h>
4728 +#endif /* _ASM_UBICOM32_IOCTL_H */
4729 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/ioctls.h linux-2.6.28.10/arch/ubicom32/include/asm/ioctls.h
4730 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/ioctls.h 1970-01-01 02:00:00.000000000 +0200
4731 +++ linux-2.6.28.10/arch/ubicom32/include/asm/ioctls.h 2009-08-06 10:31:02.000000000 +0300
4734 + * arch/ubicom32/include/asm/ioctls.h
4735 + * Definitions of ioctls for Ubicom32 architecture.
4737 + * (C) Copyright 2009, Ubicom, Inc.
4739 + * This file is part of the Ubicom32 Linux Kernel Port.
4741 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
4742 + * it and/or modify it under the terms of the GNU General Public License
4743 + * as published by the Free Software Foundation, either version 2 of the
4744 + * License, or (at your option) any later version.
4746 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
4747 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
4748 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
4749 + * the GNU General Public License for more details.
4751 + * You should have received a copy of the GNU General Public License
4752 + * along with the Ubicom32 Linux Kernel Port. If not,
4753 + * see <http://www.gnu.org/licenses/>.
4755 + * Ubicom32 implementation derived from (with many thanks):
4760 +#ifndef _ASM_UBICOM32_IOCTLS_H
4761 +#define _ASM_UBICOM32_IOCTLS_H
4763 +#include <asm/ioctl.h>
4765 +/* 0x54 is just a magic number to make these relatively unique ('T') */
4767 +#define TCGETS 0x5401
4768 +#define TCSETS 0x5402
4769 +#define TCSETSW 0x5403
4770 +#define TCSETSF 0x5404
4771 +#define TCGETA 0x5405
4772 +#define TCSETA 0x5406
4773 +#define TCSETAW 0x5407
4774 +#define TCSETAF 0x5408
4775 +#define TCSBRK 0x5409
4776 +#define TCXONC 0x540A
4777 +#define TCFLSH 0x540B
4778 +#define TIOCEXCL 0x540C
4779 +#define TIOCNXCL 0x540D
4780 +#define TIOCSCTTY 0x540E
4781 +#define TIOCGPGRP 0x540F
4782 +#define TIOCSPGRP 0x5410
4783 +#define TIOCOUTQ 0x5411
4784 +#define TIOCSTI 0x5412
4785 +#define TIOCGWINSZ 0x5413
4786 +#define TIOCSWINSZ 0x5414
4787 +#define TIOCMGET 0x5415
4788 +#define TIOCMBIS 0x5416
4789 +#define TIOCMBIC 0x5417
4790 +#define TIOCMSET 0x5418
4791 +#define TIOCGSOFTCAR 0x5419
4792 +#define TIOCSSOFTCAR 0x541A
4793 +#define FIONREAD 0x541B
4794 +#define TIOCINQ FIONREAD
4795 +#define TIOCLINUX 0x541C
4796 +#define TIOCCONS 0x541D
4797 +#define TIOCGSERIAL 0x541E
4798 +#define TIOCSSERIAL 0x541F
4799 +#define TIOCPKT 0x5420
4800 +#define FIONBIO 0x5421
4801 +#define TIOCNOTTY 0x5422
4802 +#define TIOCSETD 0x5423
4803 +#define TIOCGETD 0x5424
4804 +#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
4805 +#define TIOCSBRK 0x5427 /* BSD compatibility */
4806 +#define TIOCCBRK 0x5428 /* BSD compatibility */
4807 +#define TIOCGSID 0x5429 /* Return the session ID of FD */
4808 +#define TCGETS2 _IOR('T',0x2A, struct termios2)
4809 +#define TCSETS2 _IOW('T',0x2B, struct termios2)
4810 +#define TCSETSW2 _IOW('T',0x2C, struct termios2)
4811 +#define TCSETSF2 _IOW('T',0x2D, struct termios2)
4812 +#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
4813 +#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
4815 +#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
4816 +#define FIOCLEX 0x5451
4817 +#define FIOASYNC 0x5452
4818 +#define TIOCSERCONFIG 0x5453
4819 +#define TIOCSERGWILD 0x5454
4820 +#define TIOCSERSWILD 0x5455
4821 +#define TIOCGLCKTRMIOS 0x5456
4822 +#define TIOCSLCKTRMIOS 0x5457
4823 +#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
4824 +#define TIOCSERGETLSR 0x5459 /* Get line status register */
4825 +#define TIOCSERGETMULTI 0x545A /* Get multiport config */
4826 +#define TIOCSERSETMULTI 0x545B /* Set multiport config */
4828 +#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
4829 +#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
4830 +#define FIOQSIZE 0x545E
4832 +/* Used for packet mode */
4833 +#define TIOCPKT_DATA 0
4834 +#define TIOCPKT_FLUSHREAD 1
4835 +#define TIOCPKT_FLUSHWRITE 2
4836 +#define TIOCPKT_STOP 4
4837 +#define TIOCPKT_START 8
4838 +#define TIOCPKT_NOSTOP 16
4839 +#define TIOCPKT_DOSTOP 32
4841 +#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
4843 +#endif /* _ASM_UBICOM32_IOCTLS_H */
4844 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/io.h linux-2.6.28.10/arch/ubicom32/include/asm/io.h
4845 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/io.h 1970-01-01 02:00:00.000000000 +0200
4846 +++ linux-2.6.28.10/arch/ubicom32/include/asm/io.h 2009-08-06 10:31:02.000000000 +0300
4849 + * arch/ubicom32/include/asm/io.h
4850 + * I/O memory accessor functions for Ubicom32 architecture.
4852 + * (C) Copyright 2009, Ubicom, Inc.
4854 + * This file is part of the Ubicom32 Linux Kernel Port.
4856 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
4857 + * it and/or modify it under the terms of the GNU General Public License
4858 + * as published by the Free Software Foundation, either version 2 of the
4859 + * License, or (at your option) any later version.
4861 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
4862 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
4863 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
4864 + * the GNU General Public License for more details.
4866 + * You should have received a copy of the GNU General Public License
4867 + * along with the Ubicom32 Linux Kernel Port. If not,
4868 + * see <http://www.gnu.org/licenses/>.
4870 + * Ubicom32 implementation derived from (with many thanks):
4875 +#ifndef _ASM_UBICOM32_IO_H
4876 +#define _ASM_UBICOM32_IO_H
4879 +#include <linux/string.h>
4880 +#include <linux/compiler.h>
4882 +static inline unsigned short _swapw(volatile unsigned short v)
4884 + return ((v << 8) | (v >> 8));
4887 +static inline unsigned int _swapl(volatile unsigned long v)
4889 + return ((v << 24) | ((v & 0xff00) << 8) | ((v & 0xff0000) >> 8) | (v >> 24));
4893 +#define readb(addr) \
4894 + ({ unsigned char __v = (*(volatile unsigned char *) (addr)); __v; })
4895 +#define readw(addr) \
4896 + ({ unsigned short __v = (*(volatile unsigned short *) (addr)); __v; })
4897 +#define readl(addr) \
4898 + ({ unsigned int __v = (*(volatile unsigned int *) (addr)); __v; })
4900 +#define writeb(b,addr) (void)((*(volatile unsigned char *) (addr)) = (b))
4901 +#define writew(b,addr) (void)((*(volatile unsigned short *) (addr)) = (b))
4902 +#define writel(b,addr) (void)((*(volatile unsigned int *) (addr)) = (b))
4903 +#else /*CONFIG_PCI */
4905 +#define PCI_CPU_REG_BASE (0x00000000UL) /* taking lower 2GB space */
4906 +#define PCI_DEV_REG_BASE (0x80000000UL)
4908 +#if PCI_CPU_REG_BASE > PCI_DEV_REG_BASE
4909 +#define IS_PCI_ADDRESS(x) (((unsigned int)(x)&(PCI_CPU_REG_BASE)) == 0)
4911 +#define IS_PCI_ADDRESS(x) ((unsigned int)(x)&(PCI_DEV_REG_BASE))
4914 +extern unsigned int ubi32_pci_read_u32(const volatile void __iomem *addr);
4915 +extern unsigned short ubi32_pci_read_u16(const volatile void __iomem *addr);
4916 +extern unsigned char ubi32_pci_read_u8(const volatile void __iomem *addr);
4917 +extern void ubi32_pci_write_u32(unsigned int val, const volatile void __iomem *addr);
4918 +extern void ubi32_pci_write_u16(unsigned short val, const volatile void __iomem *addr);
4919 +extern void ubi32_pci_write_u8(unsigned char val, const volatile void __iomem *addr);
4921 +static inline unsigned char readb(const volatile void __iomem *addr)
4923 + if (IS_PCI_ADDRESS(addr))
4924 + return ubi32_pci_read_u8(addr);
4926 + return (unsigned char)(*(volatile unsigned char *)addr);
4928 +static inline unsigned short readw(const volatile void __iomem *addr)
4930 + if (IS_PCI_ADDRESS(addr))
4931 + return ubi32_pci_read_u16(addr);
4933 + return (unsigned short)(*(volatile unsigned short *)addr);
4936 +static inline unsigned int readl(const volatile void __iomem *addr)
4938 + if (IS_PCI_ADDRESS(addr))
4939 + return ubi32_pci_read_u32(addr);
4941 + return (unsigned int)(*(volatile unsigned int *)addr);
4944 +static inline void writel(unsigned int val, volatile void __iomem *addr)
4946 + if (IS_PCI_ADDRESS(addr))
4947 + ubi32_pci_write_u32(val, addr);
4949 + *(volatile unsigned int *)addr = val;
4952 +static inline void writew(unsigned short val, volatile void __iomem *addr)
4954 + if (IS_PCI_ADDRESS(addr))
4955 + ubi32_pci_write_u16(val, addr);
4957 + *(volatile unsigned short *)addr = val;
4960 +static inline void writeb(unsigned char val, volatile void __iomem *addr)
4962 + if (IS_PCI_ADDRESS(addr))
4963 + ubi32_pci_write_u8(val, addr);
4965 + *(volatile unsigned char *)addr = val;
4969 +#define readb_relaxed(addr) readb(addr)
4970 +#define readw_relaxed(addr) readw(addr)
4971 +#define readl_relaxed(addr) readl(addr)
4974 +#define __raw_readb readb
4975 +#define __raw_readw readw
4976 +#define __raw_readl readl
4977 +#define __raw_writeb writeb
4978 +#define __raw_writew writew
4979 +#define __raw_writel writel
4981 +static inline void io_outsb(unsigned int addr, const void *buf, int len)
4983 + volatile unsigned char *ap = (volatile unsigned char *) addr;
4984 + unsigned char *bp = (unsigned char *) buf;
4989 +static inline void io_outsw(unsigned int addr, const void *buf, int len)
4991 + volatile unsigned short *ap = (volatile unsigned short *) addr;
4992 + unsigned short *bp = (unsigned short *) buf;
4994 + *ap = _swapw(*bp++);
4997 +static inline void io_outsl(unsigned int addr, const void *buf, int len)
4999 + volatile unsigned int *ap = (volatile unsigned int *) addr;
5000 + unsigned int *bp = (unsigned int *) buf;
5002 + *ap = _swapl(*bp++);
5005 +static inline void io_insb(unsigned int addr, void *buf, int len)
5007 + volatile unsigned char *ap = (volatile unsigned char *) addr;
5008 + unsigned char *bp = (unsigned char *) buf;
5013 +static inline void io_insw(unsigned int addr, void *buf, int len)
5015 + volatile unsigned short *ap = (volatile unsigned short *) addr;
5016 + unsigned short *bp = (unsigned short *) buf;
5018 + *bp++ = _swapw(*ap);
5021 +static inline void io_insl(unsigned int addr, void *buf, int len)
5023 + volatile unsigned int *ap = (volatile unsigned int *) addr;
5024 + unsigned int *bp = (unsigned int *) buf;
5026 + *bp++ = _swapl(*ap);
5032 + * make the short names macros so specific devices
5033 + * can override them as required
5036 +#define memset_io(a,b,c) memset((void *)(a),(b),(c))
5037 +#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c))
5038 +#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c))
5040 +extern void memcpy_fromio(void *to, const volatile void __iomem *from, unsigned len);
5041 +extern void memcpy_toio(volatile void __iomem *to, const void *from, unsigned len);
5042 +extern void memset_io(volatile void __iomem *addr, int val, size_t count);
5045 +#define inb(addr) readb(addr)
5046 +#define inw(addr) readw(addr)
5047 +#define inl(addr) readl(addr)
5048 +#define outb(x,addr) ((void) writeb(x,addr))
5049 +#define outw(x,addr) ((void) writew(x,addr))
5050 +#define outl(x,addr) ((void) writel(x,addr))
5052 +#define inb_p(addr) inb(addr)
5053 +#define inw_p(addr) inw(addr)
5054 +#define inl_p(addr) inl(addr)
5055 +#define outb_p(x,addr) outb(x,addr)
5056 +#define outw_p(x,addr) outw(x,addr)
5057 +#define outl_p(x,addr) outl(x,addr)
5059 +#define outsb(a,b,l) io_outsb(a,b,l)
5060 +#define outsw(a,b,l) io_outsw(a,b,l)
5061 +#define outsl(a,b,l) io_outsl(a,b,l)
5063 +#define insb(a,b,l) io_insb(a,b,l)
5064 +#define insw(a,b,l) io_insw(a,b,l)
5065 +#define insl(a,b,l) io_insl(a,b,l)
5068 +#define ioread8_rep(a,d,c) insb(a,d,c)
5069 +#define ioread16_rep(a,d,c) insw(a,d,c)
5070 +#define ioread32_rep(a,d,c) insl(a,d,c)
5071 +#define iowrite8_rep(a,s,c) outsb(a,s,c)
5072 +#define iowrite16_rep(a,s,c) outsw(a,s,c)
5073 +#define iowrite32_rep(a,s,c) outsl(a,s,c)
5075 +extern void ioread8_rep(void __iomem *port, void *buf, unsigned long count);
5076 +extern void ioread16_rep(void __iomem *port, void *buf, unsigned long count);
5077 +extern void ioread32_rep(void __iomem *port, void *buf, unsigned long count);
5078 +extern void iowrite8_rep(void __iomem *port, const void *buf, unsigned long count);
5079 +extern void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count);
5080 +extern void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count);
5085 +#define ioread8(X) readb(X)
5086 +#define ioread16(X) readw(X)
5087 +#define ioread32(X) readl(X)
5088 +#define iowrite8(val,X) writeb(val,X)
5089 +#define iowrite16(val,X) writew(val,X)
5090 +#define iowrite32(val,X) writel(val,X)
5091 +#else /*CONFIG_PCI */
5092 +extern unsigned char ioread8(void __iomem *addr);
5093 +extern unsigned short ioread16(void __iomem *addr);
5094 +extern unsigned int ioread32(void __iomem *addr);
5095 +extern void iowrite8(unsigned char val, void __iomem *addr);
5096 +extern void iowrite16(unsigned short val, void __iomem *addr);
5097 +extern void iowrite32(unsigned int val, void __iomem *addr);
5098 +#endif /* CONFIG_PCI */
5100 +#define IO_SPACE_LIMIT 0xffff
5102 +/* Values for nocacheflag and cmode */
5103 +#define IOMAP_FULL_CACHING 0
5104 +#define IOMAP_NOCACHE_SER 1
5105 +#define IOMAP_NOCACHE_NONSER 2
5106 +#define IOMAP_WRITETHROUGH 3
5108 +extern void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag);
5109 +extern void __iounmap(void *addr, unsigned long size);
5111 +static inline void *ioremap(unsigned long physaddr, unsigned long size)
5113 + return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
5115 +static inline void *ioremap_nocache(unsigned long physaddr, unsigned long size)
5117 + return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
5119 +static inline void *ioremap_writethrough(unsigned long physaddr, unsigned long size)
5121 + return __ioremap(physaddr, size, IOMAP_WRITETHROUGH);
5123 +static inline void *ioremap_fullcache(unsigned long physaddr, unsigned long size)
5125 + return __ioremap(physaddr, size, IOMAP_FULL_CACHING);
5128 +extern void iounmap(void *addr);
5130 +#define ioport_map(port, nr) ((void __iomem*)(port))
5131 +#define ioport_unmap(addr)
5134 +/* Pages to physical address... */
5135 +#define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT)
5136 +#define page_to_bus(page) ((page - mem_map) << PAGE_SHIFT)
5139 + * Macros used for converting between virtual and physical mappings.
5141 +#define phys_to_virt(vaddr) ((void *) (vaddr))
5142 +#define virt_to_phys(vaddr) ((unsigned long) (vaddr))
5144 +#define virt_to_bus virt_to_phys
5145 +#define bus_to_virt phys_to_virt
5148 + * Convert a physical pointer to a virtual kernel pointer for /dev/mem
5151 +#define xlate_dev_mem_ptr(p) __va(p)
5154 + * Convert a virtual cached pointer to an uncached pointer
5156 +#define xlate_dev_kmem_ptr(p) p
5158 +#endif /* __KERNEL__ */
5160 +#endif /* _ASM_UBICOM32_IO_H */
5161 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/ip5000-asm.h linux-2.6.28.10/arch/ubicom32/include/asm/ip5000-asm.h
5162 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/ip5000-asm.h 1970-01-01 02:00:00.000000000 +0200
5163 +++ linux-2.6.28.10/arch/ubicom32/include/asm/ip5000-asm.h 2009-08-12 13:08:37.000000000 +0300
5166 + * arch/ubicom32/include/asm/ip5000-asm.h
5167 + * Instruction macros for the IP5000.
5169 + * (C) Copyright 2009, Ubicom, Inc.
5171 + * This file is part of the Ubicom32 Linux Kernel Port.
5173 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
5174 + * it and/or modify it under the terms of the GNU General Public License
5175 + * as published by the Free Software Foundation, either version 2 of the
5176 + * License, or (at your option) any later version.
5178 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
5179 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
5180 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
5181 + * the GNU General Public License for more details.
5183 + * You should have received a copy of the GNU General Public License
5184 + * along with the Ubicom32 Linux Kernel Port. If not,
5185 + * see <http://www.gnu.org/licenses/>.
5187 + * Ubicom32 implementation derived from (with many thanks):
5193 +#ifndef _ASM_UBICOM32_IP5000_ASM_H
5194 +#define _ASM_UBICOM32_IP5000_ASM_H
5196 +#if !defined(__LINKER__)
5198 +#if defined(__ASSEMBLY__)
5199 +.macro cycles quant
5203 +.if (((\quant) + 3) / 8) > 0
5204 +.rept (((\quant) + 3) / 8)
5208 +.if ((((\quant) + 3) % 8) / 4) > 0
5215 + * Same macro as above just in C inline asm
5218 +.macro cycles quant \n\
5219 +.if (\\quant) == 1 \n\
5222 +.if (((\\quant) + 3) / 8) > 0 \n\
5223 +.rept (((\\quant) + 3) / 8) \n\
5227 +.if ((((\\quant) + 3) % 8) / 4) > 0 \n\
5236 +#if defined(__ASSEMBLY__)
5237 +.macro pipe_flush cyc
5238 + cycles 11 - (\cyc)
5242 + * Same macro as above just in C inline asm
5245 +.macro pipe_flush cyc \n\
5246 + cycles 11 - (\\cyc) \n\
5252 +#if defined(__ASSEMBLY__)
5253 +.macro setcsr_flush cyc
5258 + * Same macro as above just in C inline asm
5261 +.macro setcsr_flush cyc \n\
5262 + cycles 5 - (\\cyc) \n\
5268 + * Macros for prefetch (using miss-aligned memory write)
5270 +#if defined(__ASSEMBLY__)
5272 +.macro pre_fetch_macro thread_num, Ascratch, Aaddress length
5273 + bclr MT_TRAP_EN, MT_TRAP_EN, #(\thread_num)
5274 + bset \Ascratch, \Aaddress, #0 ; force a miss-aligned address
5275 + jmpt.t .+4 ; delay for both address setup and trap disable
5276 + move.4 (\Ascratch), #0
5277 + .if (\length > 32)
5278 + move.4 32(\Ascratch), #0
5280 + .if (\length > 64)
5281 + move.4 64(\Ascratch), #0
5283 + .if (\length > 96)
5284 + move.4 96(\Ascratch), #0
5286 + .if (\length > 128)
5287 + invalid_instruction ; maximum pre-fetch size is 4 cache lines
5289 + bset MT_TRAP_EN, MT_TRAP_EN, #(\thread_num)
5294 + * Same macro as above just in C inline asm
5297 +.macro pre_fetch_macro thread_num, Ascratch, Aaddress length \n\
5298 + bclr MT_TRAP_EN, MT_TRAP_EN, #(\thread_num) \n\
5299 + bset \\Ascratch, \\Aaddress, #0 ; force a miss-aligned address \n\
5300 + jmpt.t .+4 ; delay for both address setup and trap disable \n\
5301 + move.4 (\\Ascratch), #0 \n\
5302 + .if (\\length > 32) \n\
5303 + move.4 32(\\Ascratch), #0 \n\
5305 + .if (\\length > 64) \n\
5306 + move.4 64(\\Ascratch), #0 \n\
5308 + .if (\\length > 96) \n\
5309 + move.4 96(\\Ascratch), #0 \n\
5311 + .if (\\length > 128) \n\
5312 + invalid_instruction ; maximum pre-fetch size is 4 cache lines \n\
5314 + bset MT_TRAP_EN, MT_TRAP_EN, #(\\thread_num) \n\
5319 +#endif /* !defined(__LINKER__) */
5320 +#endif /* defined _ASM_UBICOM32_IP5000_ASM_H */
5321 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/ip5000.h linux-2.6.28.10/arch/ubicom32/include/asm/ip5000.h
5322 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/ip5000.h 1970-01-01 02:00:00.000000000 +0200
5323 +++ linux-2.6.28.10/arch/ubicom32/include/asm/ip5000.h 2009-08-12 13:08:37.000000000 +0300
5326 + * arch/ubicom32/include/asm/ip5000.h
5327 + * Specific details for the Ubicom IP5000 processor.
5329 + * (C) Copyright 2009, Ubicom, Inc.
5331 + * This file is part of the Ubicom32 Linux Kernel Port.
5333 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
5334 + * it and/or modify it under the terms of the GNU General Public License
5335 + * as published by the Free Software Foundation, either version 2 of the
5336 + * License, or (at your option) any later version.
5338 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
5339 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
5340 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
5341 + * the GNU General Public License for more details.
5343 + * You should have received a copy of the GNU General Public License
5344 + * along with the Ubicom32 Linux Kernel Port. If not,
5345 + * see <http://www.gnu.org/licenses/>.
5347 + * Ubicom32 implementation derived from (with many thanks):
5353 +#ifndef _ASM_UBICOM32_IP5000_H
5354 +#define _ASM_UBICOM32_IP5000_H
5357 + * Inline assembly define
5359 +#define S(arg) #arg
5360 +#define D(arg) S(arg)
5363 + * Assembler include file
5365 +#include <asm/ip5000-asm.h>
5370 +#define JMPT_PENALTY 3
5371 +#define JMPF_PENALTY 7
5372 +#define RET_PENALTY 7
5377 +#if defined(IP5000) || defined(IP5000_REV2)
5378 +#define THREAD_COUNT 10
5379 +#elif defined(IP7000) || defined(IP7000_REV2)
5380 +#define THREAD_COUNT 12
5382 +#error "Unknown IP5K silicon"
5388 +#if defined(IP5000) || defined(IP5000_REV2)
5389 +#define UBICOM32_ARCH_VERSION 3
5390 +#elif defined(IP7000) || defined(IP7000_REV2)
5391 +#define UBICOM32_ARCH_VERSION 4
5393 +#error "Unknown IP5K silicon"
5399 +#define OCM_SECTOR_SIZE 0x00008000 /* 32K */
5401 +#if defined(IP5000) || defined(IP5000_REV2)
5402 +#define OCMSIZE 0x00030000 /* 192K on-chip RAM for both program and data */
5403 +#elif defined(IP7000) || defined(IP7000_REV2)
5404 +#define OCMSIZE 0x0003C000 /* 240K on-chip RAM for both program and data */
5406 +#error "Unknown IP5K silicon"
5409 +#define OCMSTART 0x3ffc0000 /* alias from 0x03000000 for easy jump to/from SDRAM */
5410 +#define OCMEND (OCMSTART + OCMSIZE)
5411 +#define SDRAMSTART 0x40000000
5412 +#define FLASHSTART 0x60000000
5417 +#define ROSR_INT (1 << 0)
5420 +#define INT_CHIP(reg, bit) (((reg) << 5) | (bit))
5421 +#define INT_REG(interrupt) (((interrupt) >> 5) * 4)
5422 +#define INT_SET(interrupt) 0x0114 + INT_REG(interrupt)
5423 +#define INT_CLR(interrupt) 0x0124 + INT_REG(interrupt)
5424 +#define INT_STAT(interrupt) 0x0104 + INT_REG(interrupt)
5425 +#define INT_MASK(interrupt) 0x00C0 + INT_REG(interrupt)
5426 +#define INT_BIT(interrupt) ((interrupt) & 0x1F)
5427 +#define INT_BIT_MASK(interrupt) (1 << INT_BIT(interrupt))
5430 + * The LOCK_INT and THREAD_INT are used to wake up corresponding thread. They are sharing
5431 + * the same set of SW interrupt resource.
5433 + * LOCK_INT(n): One SW INT per NRT thread that can participate lock operation.
5434 + * The threads that can participate lock are application threads and DSR thread.
5435 + * (Lock locks - numbers are hard-coded in lock.h)
5436 + * THREAD_INT(n): One SW INT per HRT thread for wake up trigger.
5438 +#define LOCK_INT(thread) INT_CHIP(0, (thread))
5439 +#define THREAD_INT(thread) INT_CHIP(0, (thread))
5442 + * The SYSTEM_INT and DSR_INT are sharing the same set of SW interrupt resource.
5444 + * SYSTEM_INT(n): One SW INT per NRT threads (application threads) as system queue interrupt,
5445 + * and for DSR as self-trigger interrupt.
5446 + * (The application threads include at least thread 0)
5447 + * DSR_INT(n): One SW INT per HRT thread to request DSR service.
5449 +#define SYSTEM_INT(thread) INT_CHIP(0, THREAD_COUNT + (thread))
5450 +#define DSR_INT(thread) INT_CHIP(0, THREAD_COUNT + (thread))
5453 +#define GLOBAL_CTRL_TRAP_RST_EN (1 << 9)
5454 +#define GLOBAL_CTRL_AERROR_RST_EN (1 << 8)
5455 +#define GLOBAL_CTRL_MT_MIN_DELAY(x) ((x) << 3)
5456 +#define GLOBAL_CTRL_HRT_BANK_SELECT (1 << 2)
5457 +#define GLOBAL_CTRL_INT_EN (1 << 0)
5462 +#define HRT_TABLE0_BASE 0x0800
5463 +#define HRT_TABLE1_BASE 0x0900
5464 +#define HRT_TABLE_SIZE 64
5467 + * Break Point Trap Register
5469 +#define ASYNCERROR_INT INT_CHIP(0, 31)
5470 +#define BREAKPOINT_INT INT_CHIP(1, 31)
5474 + * The non-existing FIFO INTs are mapped to INT2 for the ports.
5476 +#define IO_PORT_PTR_TO_NUM(port) (((port) & 0x0000ffff) >> 12)
5477 +#define RX_FIFO_INT(port) \
5478 + ((IO_PORT_PTR_TO_NUM(port) == 0) ? INT_CHIP(0, 25) : \
5479 + ((IO_PORT_PTR_TO_NUM(port) == 1) ? INT_CHIP(0, 26) : \
5480 + ((IO_PORT_PTR_TO_NUM(port) == 2) ? INT_CHIP(0, 29) : \
5481 + ((IO_PORT_PTR_TO_NUM(port) == 3) ? INT_CHIP(1, 24) : \
5482 + ((IO_PORT_PTR_TO_NUM(port) == 4) ? INT_CHIP(1, 27) : \
5483 + ((IO_PORT_PTR_TO_NUM(port) == 5) ? INT_CHIP(1, 16) : \
5484 + ((IO_PORT_PTR_TO_NUM(port) == 6) ? INT_CHIP(1, 19) : \
5485 + ((IO_PORT_PTR_TO_NUM(port) == 7) ? INT_CHIP(1, 20) : \
5486 + ((IO_PORT_PTR_TO_NUM(port) == 8) ? INT_CHIP(1, 21) : \
5487 + INT_CHIP(1, 15))))))))))
5488 +#define TX_FIFO_INT(port) \
5489 + ((IO_PORT_PTR_TO_NUM(port) == 0) ? INT_CHIP(0, 24) : \
5490 + ((IO_PORT_PTR_TO_NUM(port) == 1) ? INT_CHIP(0, 27) : \
5491 + ((IO_PORT_PTR_TO_NUM(port) == 2) ? INT_CHIP(0, 29) : \
5492 + ((IO_PORT_PTR_TO_NUM(port) == 3) ? INT_CHIP(1, 25) : \
5493 + ((IO_PORT_PTR_TO_NUM(port) == 4) ? INT_CHIP(1, 28) : \
5494 + ((IO_PORT_PTR_TO_NUM(port) == 5) ? INT_CHIP(1, 17) : \
5495 + ((IO_PORT_PTR_TO_NUM(port) == 6) ? INT_CHIP(1, 19) : \
5496 + ((IO_PORT_PTR_TO_NUM(port) == 7) ? INT_CHIP(1, 20) : \
5497 + ((IO_PORT_PTR_TO_NUM(port) == 8) ? INT_CHIP(1, 22) : \
5498 + INT_CHIP(1, 15))))))))))
5499 +#define PORT_OTHER_INT(port) \
5500 + ((IO_PORT_PTR_TO_NUM(port) == 0) ? INT_CHIP(0, 25) : \
5501 + ((IO_PORT_PTR_TO_NUM(port) == 1) ? INT_CHIP(0, 28) : \
5502 + ((IO_PORT_PTR_TO_NUM(port) == 2) ? INT_CHIP(0, 29) : \
5503 + ((IO_PORT_PTR_TO_NUM(port) == 3) ? INT_CHIP(1, 26) : \
5504 + ((IO_PORT_PTR_TO_NUM(port) == 4) ? INT_CHIP(1, 29) : \
5505 + ((IO_PORT_PTR_TO_NUM(port) == 5) ? INT_CHIP(1, 18) : \
5506 + ((IO_PORT_PTR_TO_NUM(port) == 6) ? INT_CHIP(1, 19) : \
5507 + ((IO_PORT_PTR_TO_NUM(port) == 7) ? INT_CHIP(1, 20) : \
5508 + ((IO_PORT_PTR_TO_NUM(port) == 8) ? INT_CHIP(1, 23) : \
5509 + INT_CHIP(1, 15))))))))))
5512 + * On Chip Peripherals Base.
5514 +#define OCP_BASE 0x01000000
5515 +#define OCP_GENERAL 0x000
5516 +#define OCP_TIMERS 0x100
5517 +#define OCP_TRNG 0x200 /* True Random Number Generator Control Reigsters */
5518 +#define OCP_DEBUG 0x300
5519 +#define OCP_SECURITY 0x400
5520 +#define OCP_ICCR 0x500 /* I-Cache Control Registers */
5521 +#define OCP_DCCR 0x600 /* D-Cache Control Registers */
5522 +#define OCP_OCMC 0x700 /* On Chip Memory Control Registers */
5523 +#define OCP_STATISTICS 0x800 /* Statistics Counters */
5524 +#define OCP_MTEST 0x900 /* Memory Test Registers */
5525 +#define OCP_MCFG 0xa00 /* Memory Configuration Registers -- IP7000 only */
5526 +#define OCP_DEBUG_INST 0x000 /* Up to 16M */
5529 + * General Configuration Registers (PLL)
5531 +#define GENERAL_CFG_BASE (OCP_BASE + OCP_GENERAL)
5532 +#define GEN_CLK_CORE_CFG 0x00
5533 +#define GEN_CLK_IO_CFG 0x04
5534 +#define GEN_CLK_DDR_CFG 0x08
5535 +#define GEN_CLK_DDRDS_CFG 0x0c
5536 +#define GEN_CLK_SLIP_CLR 0x10
5537 +#define GEN_CLK_SLIP_START 0x14
5538 +#define GEN_CLK_SERDES_SEL 0x18 /* IP7000 only */
5539 +#define GEN_CLK_DDR_CFG2 0x1c /* IP7000 only */
5540 +#define GEN_DDR_CAL_CTRL 0x30 /* IP5000 only */
5541 +#define GEN_DDR_CAL_STAT 0x34 /* IP5000 only */
5542 +#define GEN_USB_DFT_CTRL 0x38 /* IP5000 only */
5543 +#define GEN_USB_DFT_STAT 0x3c /* IP5000 only */
5544 +#define GEN_USB_PHY_CFG 0x40 /* IP7000 only */
5545 +#define GEN_USB_PHY_TEST 0x44 /* IP7000 only */
5546 +#define GEN_USB_PHY_STAT 0x48 /* IP7000 only */
5547 +#define GEN_SW_RESET 0x80
5548 +#define GEN_RESET_REASON 0x84
5549 +#define GEN_BOND_CFG 0x88
5550 +#define GEN_IO_PU_CFG 0x8c
5551 +#define GEN_MEM_RM_CFG 0x90
5552 +#define GEN_IO_CONFIG 0x94
5554 +#define GEN_CLK_PLL_SECURITY_BIT_NO 31
5555 +#define GEN_CLK_PLL_SECURITY (1 << GEN_CLK_PLL_SECURITY_BIT_NO)
5556 +#define GEN_CLK_PLL_ENSAT (1 << 30)
5557 +#define GEN_CLK_PLL_FASTEN (1 << 29)
5558 +#define GEN_CLK_PLL_NR(v) (((v) - 1) << 23)
5559 +#define GEN_CLK_PLL_NF(v) (((v) - 1) << 11)
5560 +#define GEN_CLK_PLL_OD(v) (((v) - 1) << 8)
5561 +#define GEN_CLK_PLL_RESET (1 << 7)
5562 +#define GEN_CLK_PLL_BYPASS (1 << 6)
5563 +#define GEN_CLK_PLL_POWERDOWN (1 << 5)
5564 +#define GEN_CLK_PLL_SELECT (1 << 4)
5566 +#define GEN_GET_CLK_PLL_NR(v) ((((v) >> 23) & 0x003f) + 1)
5567 +#define GEN_GET_CLK_PLL_NF(v) ((((v) >> 11) & 0x0fff) + 1)
5568 +#define GEN_GET_CLK_PLL_OD(v) ((((v) >> 8) & 0x7) + 1)
5571 +#define RESET_FLAG_DST_MEM_ERROR (1 << 18)
5572 +#define RESET_FLAG_SRC1_MEM_ERROR (1 << 17)
5573 +#define RESET_FLAG_WRITE_ADDR (1 << 16)
5574 +#define RESET_FLAG_DST_SYNC_ERROR (1 << 15)
5575 +#define RESET_FLAG_SRC1_SYNC_ERROR (1 << 14)
5576 +#define RESET_FLAG_DST_ALGN_ERROR (1 << 13)
5577 +#define RESET_FLAG_SRC1_ALGN_ERROR (1 << 12)
5578 +#define RESET_FLAG_DST_ADDR_ERROR (1 << 11)
5579 +#define RESET_FLAG_SRC1_ADDR_ERROR (1 << 10)
5580 +#define RESET_FLAG_ILLEGAL_INST (1 << 9)
5581 +#define RESET_FLAG_INST_SYNC_ERROR (1 << 8)
5582 +#define RESET_FLAG_INST_ADDR_ERROR (1 << 7)
5583 +#define RESET_FLAG_DATA_PORT_ERROR (1 << 6)
5584 +#define RESET_FLAG_INST_PORT_ERROR (1 << 5)
5585 +#define RESET_FLAG_SW_RESET (1 << 4)
5586 +#define RESET_FLAG_DEBUG (1 << 3)
5587 +#define RESET_FLAG_WATCHDOG (1 << 2)
5588 +#define RESET_FLAG_POWER_ON (1 << 1)
5589 +#define RESET_FLAG_EXTERNAL (1 << 0)
5594 +#define TIMER_BASE (OCP_BASE + OCP_TIMERS)
5595 +#define TIMER_MPTVAL 0x00
5596 +#define TIMER_RTCOM 0x04
5597 +#define TIMER_TKEY 0x08
5598 +#define TIMER_WDCOM 0x0c
5599 +#define TIMER_WDCFG 0x10
5600 +#define TIMER_SYSVAL 0x14
5601 +#define TIMER_SYSCOM(tmr) (0x18 + (tmr) * 4)
5602 +#define TIMER_TRN_CFG 0x100
5603 +#define TIMER_TRN 0x104
5605 +#define TIMER_COUNT 10
5606 +#define TIMER_INT(tmr) INT_CHIP(1, (tmr))
5607 +#define TIMER_TKEYVAL 0xa1b2c3d4
5608 +#define TIMER_WATCHDOG_DISABLE 0x4d3c2b1a
5609 +#define TIMER_TRN_CFG_ENABLE_OSC 0x00000007
5611 +#ifndef __ASSEMBLY__
5613 + * ubicom32_io_timer
5615 +struct ubicom32_io_timer {
5616 + volatile u32_t mptval;
5617 + volatile u32_t rtcom;
5618 + volatile u32_t tkey;
5619 + volatile u32_t wdcom;
5620 + volatile u32_t wdcfg;
5621 + volatile u32_t sysval;
5622 + volatile u32_t syscom[TIMER_COUNT];
5623 + volatile u32_t reserved[64 - 6 - TIMER_COUNT]; // skip all the way to OCP-TRNG section
5624 + volatile u32_t rsgcfg;
5625 + volatile u32_t trn;
5628 +#define UBICOM32_IO_TIMER ((struct ubicom32_io_timer *)TIMER_BASE)
5631 +#define UBICOM32_VECTOR_TO_TIMER_INDEX(vector) (vector - TIMER_INT(0))
5634 + * OCP-Debug Module (Mailbox)
5636 +#define ISD_MAILBOX_BASE (OCP_BASE + OCP_DEBUG)
5637 +#define ISD_MAILBOX_IN 0x00
5638 +#define ISD_MAILBOX_OUT 0x04
5639 +#define ISD_MAILBOX_STATUS 0x08
5641 +#define ISD_MAILBOX_INT INT_CHIP(1, 30)
5643 +#define ISD_MAILBOX_STATUS_IN_FULL (1 << 31)
5644 +#define ISD_MAILBOX_STATUS_IN_EMPTY (1 << 30)
5645 +#define ISD_MAILBOX_STATUS_OUT_FULL (1 << 29)
5646 +#define ISD_MAILBOX_STATUS_OUT_EMPTY (1 << 28)
5651 +#define SECURITY_BASE (OCP_BASE + OCP_SECURITY)
5652 +#define SECURITY_BASE_EFFECTIVE_ADDRESS (SECURITY_BASE >> 7) // To load the base address in a single instruction
5653 +#define SECURITY_CTRL 0x00
5654 +#define SECURITY_CTRL_BYTE_OFFSET(x) ((x) << 16)
5655 +#define SECURITY_CTRL_KEY_SIZE(x) ((x) << 8)
5656 +#define SECURITY_CTRL_HASH_ALG_NONE (0 << 4)
5657 +#define SECURITY_CTRL_HASH_ALG_MD5 (1 << 4)
5658 +#define SECURITY_CTRL_HASH_ALG_SHA1 (2 << 4)
5659 +#define SECURITY_CTRL_CBC (1 << 3)
5660 +#define SECURITY_CTRL_CIPHER_ALG_AES (0 << 1)
5661 +#define SECURITY_CTRL_CIPHER_ALG_NONE (1 << 1)
5662 +#define SECURITY_CTRL_CIPHER_ALG_DES (2 << 1)
5663 +#define SECURITY_CTRL_CIPHER_ALG_3DES (3 << 1)
5664 +#define SECURITY_CTRL_ENCIPHER (1 << 0)
5665 +#define SECURITY_CTRL_DECIPHER (0 << 0)
5666 +#define SECURITY_STAT 0x04
5667 +#define SECURITY_STAT_BUSY (1 << 0)
5668 +#define SECURITY_KEY_VALUE(x) (0x10 + (x) * 4)
5669 +#define SECURITY_KEY_IN(x) (0x30 + (x) * 4)
5670 +#define SECURITY_KEY_OUT(x) (0x50 + (x) * 4)
5671 +#define SECURITY_KEY_HASH(x) (0x70 + (x) * 4)
5676 +#define ICCR_BASE (OCP_BASE + OCP_ICCR)
5677 +#define ICACHE_TOTAL_SIZE 16384 /* in bytes */
5682 +#define DCCR_BASE (OCP_BASE + OCP_DCCR)
5683 +#if defined(IP5000) || defined(IP5000_REV2)
5684 +#define DCACHE_TOTAL_SIZE 8192 /* in bytes */
5685 +#elif defined(IP7000) || defined(IP7000_REV2)
5686 +#define DCACHE_TOTAL_SIZE 16384 /* in bytes */
5689 +#if defined(IP5000) || defined(IP5000_REV2) || defined(IP7000) || defined(IP7000_REV2)
5690 +#define DCACHE_WRITE_QUEUE_LENGTH 6
5692 +#error "Unknown IP5K silicon"
5695 +#define CACHE_LINE_SIZE 32 /* in bytes */
5697 +#define CCR_ADDR 0x00
5698 +#define CCR_RDD 0x04
5699 +#define CCR_WRD 0x08
5700 +#define CCR_STAT 0x0c
5701 +#define CCR_CTRL 0x10
5703 +#define CCR_STAT_MCBE 0
5704 +#define CCR_STAT_WIDEL 1 /* D-cache only */
5706 +#define CCR_CTRL_DONE 0
5707 +#define CCR_CTRL_RESET 2
5708 +#define CCR_CTRL_VALID 3
5709 +#define CCR_CTRL_RD_DATA (1 << 4)
5710 +#define CCR_CTRL_RD_TAG (2 << 4)
5711 +#define CCR_CTRL_WR_DATA (3 << 4)
5712 +#define CCR_CTRL_WR_TAG (4 << 4)
5713 +#define CCR_CTRL_INV_INDEX (5 << 4)
5714 +#define CCR_CTRL_INV_ADDR (6 << 4)
5715 +#define CCR_CTRL_FLUSH_INDEX (7 << 4) /* D-cache only */
5716 +#define CCR_CTRL_FLUSH_INV_INDEX (8 << 4) /* D-cache only */
5717 +#define CCR_CTRL_FLUSH_ADDR (9 << 4) /* D-cache only */
5718 +#define CCR_CTRL_FLUSH_INV_ADDR (10 << 4) /* D-cache only */
5723 +#define OCMC_BASE (OCP_BASE + OCP_OCMC)
5724 +#define OCMC_BANK_MASK 0x00
5725 +#define OCMC_BIST_CNTL 0x04 /* IP5000 only */
5726 +#define OCMC_BIST_STAT 0x08 /* IP5000 only */
5728 +#define OCMC_BANK_PROG(n) ((1<<(n))-1)
5730 +#define OCMC_BIST_WRCK (1 << 7)
5731 +#define OCMC_BIST_RESET (1 << 5)
5732 +#define OCMC_BIST_SMART (1 << 4)
5733 +#define OCMC_BIST_RUN (1 << 3)
5734 +#define OCMC_BIST_REPAIR (1 << 2)
5736 +#define OCMC_BIST_READY (1 << 3)
5737 +#define OCMC_BIST_FAIL (1 << 2)
5742 +#define STATISTICS_BASE (OCP_BASE + OCP_STATISTICS)
5743 +#define STAT_COUNTER_CTRL(n) ((n)*8)
5744 +#define STAT_COUNTER(n) ((n)*8 + 4)
5746 +#define STAT_EVENT_MP_INST 0
5747 +#define STAT_EVENT_OCM_ACCESS 4
5748 +#define STAT_EVENT_OCM_REQ 5
5749 +#define STAT_EVENT_IC_REQ_INVAL 13
5750 +#define STAT_EVENT_IC_MISS_INVAL 14
5751 +#define STAT_EVENT_IC_REQ_INVAL_NACK 15
5752 +#define STAT_EVENT_IC_REQ_VAL 16
5753 +#define STAT_EVENT_IC_MISS_VAL 17
5754 +#define STAT_EVENT_IC_REQ_VAL_NACK 18
5755 +#define STAT_EVENT_IC_MISS_Q 19
5756 +#define STAT_EVENT_DC_RD_REQ 20
5757 +#define STAT_EVENT_DC_RD_MISS 21
5758 +#define STAT_EVENT_DC_WR_REQ 22
5759 +#define STAT_EVENT_DC_WR_MISS 23
5760 +#define STAT_EVENT_DC_MISS_Q 24
5761 +#define STAT_EVENT_DC_WB_FULL 25
5762 +#define STAT_EVENT_DC_REQ_NACK 26
5763 +#define STAT_EVENT_DC_CORE_REQ 27
5764 +#define STAT_EVENT_DC_MISS 28
5765 +#define STAT_EVENT_DC_EVICT 29
5766 +#define STAT_EVENT_TRUE 30
5767 +#define STAT_EVENT_FALSE 31
5772 +#define MTEST_BASE (OCP_BASE + OCP_MTEST)
5773 +#define MTEST_ADDR 0x00
5774 +#define MTEST_WR 0x04
5775 +#define MTEST_RD 0x08
5776 +#define MTEST_CTRL 0x0c
5779 + * OCP_MCFG (IP7000 only)
5781 +#define MCFG_BASE (OCP_BASE + OCP_MCFG)
5782 +#define MCFG_CTRL 0x00
5783 +#define MCFG_WCFG 0x04
5784 +#define MCFG_RCFG 0x08
5789 +#define IO_BASE 0x02000000
5790 +#define RA (IO_BASE + 0x00000000)
5791 +#define RB (IO_BASE + 0x00001000)
5792 +#define RC (IO_BASE + 0x00002000)
5793 +#define RD (IO_BASE + 0x00003000)
5794 +#define RE (IO_BASE + 0x00004000)
5795 +#define RF (IO_BASE + 0x00005000)
5796 +#define RG (IO_BASE + 0x00006000)
5797 +#define RH (IO_BASE + 0x00007000)
5798 +#define RI (IO_BASE + 0x00008000)
5799 +#define RJ (IO_BASE + 0x00009000)
5800 +#define RLATCH (IO_BASE + 0x00ff0000) // For latched output only
5801 +#define IO_PORT_BR_OFFSET 0x00000800
5804 + * General I/O Register Map (per port)
5806 +#define IO_FUNC 0x00
5807 +#define IO_GPIO_CTL 0x04
5808 +#define IO_GPIO_OUT 0x08
5809 +#define IO_GPIO_IN 0x0C
5810 +#define IO_INT_STATUS 0x10
5811 +#define IO_INT_MASK 0x14
5812 +#define IO_INT_SET 0x18
5813 +#define IO_INT_CLR 0x1C
5814 +#define IO_TX_FIFO 0x20
5815 +#define IO_TX_FIFO_HI 0x24
5816 +#define IO_RX_FIFO 0x28
5817 +#define IO_RX_FIFO_HI 0x2c
5818 +#define IO_CTL0 0x30
5819 +#define IO_CTL1 0x34
5820 +#define IO_CTL2 0x38
5821 +#define IO_STATUS0 0x3c
5822 +#define IO_STATUS1 0x40
5823 +#define IO_STATUS2 0x44
5824 +#define IO_FIFO_WATER 0x48
5825 +#define IO_FIFO_LEVEL 0x4c
5826 +#define IO_GPIO_MASK 0x50
5828 +#define IO_FUNC_FUNCTION_RESET(func) ((1 << ((func) - 1)) << 4) /* Function 0 doesn't need reset */
5829 +#define IO_FUNC_RX_FIFO (1 << 3)
5830 +#define IO_FUNC_SELECT(func) ((func) << 0)
5833 + * External interrupt pins.
5835 +#define EXT_INT_IO_BIT(pin) ((pin) + 5) // Interrupt pin number -> I/O INT bit
5836 +#define EXT_INT_RISING_EDGE(pin) (0x2 << (2*(pin) + 7))
5837 +#define EXT_INT_FALLING_EDGE(pin) (0x1 << (2*(pin) + 7))
5842 +#define IO_XFL_BASE RA
5844 +#define IO_XFL_INT_START (1 << 16)
5845 +#define IO_XFL_INT_ERR (1 << 8)
5846 +#define IO_XFL_INT_DONE (1 << 0)
5848 +#define IO_XFL_CTL0_MASK (0xffe07fff)
5849 +#define IO_XFL_CTL0_RD_CMD(cmd) (((cmd) & 0xff) << 24)
5850 +#define IO_XFL_CTL0_RD_DUMMY(n) (((n) & 0x7) << 21)
5851 +#define IO_XFL_CTL0_CLK_WIDTH(core_cycles) ((((core_cycles) + 1) & 0x7e) << 8) /* must be even number */
5852 +#define IO_XFL_CTL0_CE_WAIT(spi_cycles) (((spi_cycles) & 0x3f) << 2)
5853 +#define IO_XFL_CTL0_MCB_LOCK (1 << 1)
5854 +#define IO_XFL_CTL0_ENABLE (1 << 0)
5855 +#define IO_XFL_CTL0_FAST_VALUE(div, wait) (IO_XFL_CTL0_RD_CMD(0xb) | IO_XFL_CTL0_RD_DUMMY(1) | IO_XFL_CTL0_CLK_WIDTH(div) | IO_XFL_CTL0_CE_WAIT(wait) | IO_XFL_CTL0_ENABLE)
5856 +#define IO_XFL_CTL0_VALUE(div, wait) (IO_XFL_CTL0_RD_CMD(3) | IO_XFL_CTL0_CLK_WIDTH(div) | IO_XFL_CTL0_CE_WAIT(wait) | IO_XFL_CTL0_ENABLE)
5858 +#define IO_XFL_CTL1_MASK (0xc0003fff)
5859 +#define IO_XFL_CTL1_FC_INST(inst) (((inst) & 0x3) << 30)
5860 +#define IO_XFL_CTL1_FC_DATA(n) (((n) & 0x3ff) << 4)
5861 +#define IO_XFL_CTL1_FC_DUMMY(n) (((n) & 0x7) << 1)
5862 +#define IO_XFL_CTL1_FC_ADDR (1 << 0)
5864 +#define IO_XFL_CTL2_FC_CMD(cmd) (((cmd) & 0xff) << 24)
5865 +#define IO_XFL_CTL2_FC_ADDR(addr) ((addr) & 0x00ffffff) /* Only up to 24 bits */
5867 +#define IO_XFL_STATUS0_MCB_ACTIVE (1 << 0)
5868 +#define IO_XFL_STATUS0_IOPCS_ACTIVE (1 << 1)
5873 +#define IO_SDRAM_DATA_BASE RG
5874 +#define IO_SDRAM_CNTL_BASE RH
5876 +#define IO_SDRAM_CTRL0_EN_REF (1 << 0)
5879 + * Port function code (common fucntion codes for all I/O ports)
5881 +#define IO_PORTX_FUNC_GPIO 0x00
5882 +#define IO_PORTX_FUNC_XFL 0x01
5883 +#define IO_PORTX_FUNC_PCI 0x01
5884 +#define IO_PORTX_FUNC_SERDES 0x01
5885 +#define IO_PORTX_FUNC_GMII 0x01
5886 +#define IO_PORTX_FUNC_DDR 0x01
5887 +#define IO_PORTX_FUNC_PCIX 0x01
5888 +#define IO_PORTX_FUNC_USB2_0 0x01
5889 +#define IO_PORTX_FUNC_GPIO_INT_CLK 0x02
5890 +#define IO_PORTX_FUNC_PLIO 0x02
5891 +#define IO_PORTX_FUNC_GPIO_INT 0x03
5892 +#define IO_PORTX_FUNC_MII 0x03
5897 +#define IO_PORT0_FUNC_GPIO IO_PORTX_FUNC_GPIO
5898 +#define IO_PORT0_FUNC_XFL_INT_CLK IO_PORTX_FUNC_XFL // Default mode after reset
5899 +#define IO_PORT0_FUNC_GPIO_INT_CLK IO_PORTX_FUNC_GPIO_INT_CLK
5900 +#define IO_PORT0_FUNC_GPIO_INT IO_PORTX_FUNC_GPIO_INT
5905 +#define IO_PORT1_FUNC_GPIO IO_PORTX_FUNC_GPIO
5906 +#define IO_PORT1_FUNC_PCI IO_PORTX_FUNC_PCI // PCI control
5907 +#define IO_PORT1_FUNC_MII IO_PORTX_FUNC_MII // port 4 MII extension
5912 +#define IO_PORT2_FUNC_GPIO IO_PORTX_FUNC_GPIO
5913 +#define IO_PORT2_FUNC_PCI IO_PORTX_FUNC_PCI // PCI data I/O
5914 +#define IO_PORT2_FUNC_PLIO IO_PORTX_FUNC_PLIO // Extended LM
5919 +#define IO_PORT3_FUNC_GPIO IO_PORTX_FUNC_GPIO
5920 +#define IO_PORT3_FUNC_SERDES IO_PORTX_FUNC_SERDES
5921 +#define IO_PORT3_FUNC_PLIO IO_PORTX_FUNC_PLIO
5926 +#define IO_PORT4_FUNC_GPIO IO_PORTX_FUNC_GPIO
5927 +#define IO_PORT4_FUNC_SERDES IO_PORTX_FUNC_SERDES
5928 +#define IO_PORT4_FUNC_PLIO IO_PORTX_FUNC_PLIO // Extended LM
5929 +#define IO_PORT4_FUNC_MII IO_PORTX_FUNC_MII
5934 +#define IO_PORT5_FUNC_GPIO IO_PORTX_FUNC_GPIO
5935 +#define IO_PORT5_FUNC_GMII IO_PORTX_FUNC_GMII
5940 +#define IO_PORT6_FUNC_GPIO IO_PORTX_FUNC_GPIO
5941 +#define IO_PORT6_FUNC_DDR IO_PORTX_FUNC_DDR
5946 +#define IO_PORT7_FUNC_GPIO IO_PORTX_FUNC_GPIO
5947 +#define IO_PORT7_FUNC_DDR IO_PORTX_FUNC_DDR
5952 +#define IO_PORT8_FUNC_GPIO IO_PORTX_FUNC_GPIO
5953 +#define IO_PORT8_FUNC_PCIX IO_PORTX_FUNC_PCIX
5954 +#define IO_PORT8_FUNC_PLIO IO_PORTX_FUNC_PLIO // Extended LM
5955 +#define IO_PORT8_FUNC_MII IO_PORTX_FUNC_MII // port 4 MII extension
5960 +#define IO_PORT9_FUNC_USB2_0 IO_PORTX_FUNC_USB2_0
5965 +#define IO_PORTX_INT_FIFO_TX_RESET (1 << 31)
5966 +#define IO_PORTX_INT_FIFO_RX_RESET (1 << 30)
5967 +#define IO_PORTX_INT_FIFO_TX_UF (1 << 15)
5968 +#define IO_PORTX_INT_FIFO_TX_WM (1 << 14)
5969 +#define IO_PORTX_INT_FIFO_RX_OF (1 << 13)
5970 +#define IO_PORTX_INT_FIFO_RX_WM (1 << 12)
5972 +#define IO_PORTX_FUNC_FIFO_TX_WM(n) ((n) << 16)
5973 +#define IO_PORTX_FUNC_FIFO_RX_WM(n) ((n) << 0)
5978 +#define IO_PORTX_INT_MII_TX_ERR_SEND (1 << 18)
5979 +#define IO_PORTX_INT_MII_TX_HALT (1 << 17)
5980 +#define IO_PORTX_INT_MII_TX_START (1 << 16)
5981 +#define IO_PORTX_INT_MII_THRESHOLD (1 << 8)
5982 +#define IO_PORTX_INT_MII_RX_EOP (1 << 7)
5983 +#define IO_PORTX_INT_MII_RX_SFD (1 << 6)
5984 +#define IO_PORTX_INT_MII_RX_ERR (1 << 5)
5985 +#define IO_PORTX_INT_MII_TX_EOP (1 << 4)
5986 +#define IO_PORTX_INT_MII_COL (1 << 3)
5987 +#define IO_PORTX_INT_MII_CRS (1 << 2)
5988 +#define IO_PORTX_INT_MII_ODD_NIB_ERR (1 << 1)
5989 +#define IO_PORTX_INT_MII_FALSE_CARRIER (1 << 0)
5994 +#define IO_PORTX_INT_SERDES_TXBUF_VALID (1 << 16)
5995 +#define IO_PORTX_INT_SERDES_RXERR (1 << 7)
5996 +#define IO_PORTX_INT_SERDES_RXEOP (1 << 6)
5997 +#define IO_PORTX_INT_SERDES_SYND (1 << 5)
5998 +#define IO_PORTX_INT_SERDES_TXBE (1 << 4)
5999 +#define IO_PORTX_INT_SERDES_TXEOP (1 << 3)
6000 +#define IO_PORTX_INT_SERDES_SXLP (1 << 2)
6001 +#define IO_PORTX_INT_SERDES_RXBF (1 << 1)
6002 +#define IO_PORTX_INT_SERDES_RXCRS (1 << 0)
6004 +#ifndef __ASSEMBLY__
6005 +struct ubicom32_io_port {
6006 + volatile u32_t function;
6007 + volatile u32_t gpio_ctl;
6008 + volatile u32_t gpio_out;
6009 + volatile u32_t gpio_in;
6010 + volatile u32_t int_status;
6011 + volatile u32_t int_mask;
6012 + volatile u32_t int_set;
6013 + volatile u32_t int_clr;
6014 + volatile u32_t tx_fifo;
6015 + volatile u32_t tx_fifo_hi;
6016 + volatile u32_t rx_fifo;
6017 + volatile u32_t rx_fifo_hi;
6018 + volatile u32_t ctl0;
6019 + volatile u32_t ctl1;
6020 + volatile u32_t ctl2;
6021 + volatile u32_t status0;
6022 + volatile u32_t status1;
6023 + volatile u32_t status2;
6024 + volatile u32_t fifo_watermark;
6025 + volatile u32_t fifo_level;
6026 + volatile u32_t gpio_mask;
6029 +#define UBICOM32_IO_PORT(port) ((struct ubicom32_io_port *)((port)))
6032 +#ifndef __ASSEMBLY__
6034 + * ubicom32_set_interrupt()
6036 +extern inline void ubicom32_set_interrupt(u8_t interrupt)
6038 + u32_t ibit = INT_BIT_MASK(interrupt);
6040 + if (INT_REG(interrupt) == INT_REG(INT_CHIP(0, 0))) {
6042 + "move.4 "D(INT_SET(INT_CHIP(0, 0)))", %0\n\t"
6051 + "move.4 "D(INT_SET(INT_CHIP(1, 0)))", %0\n\t"
6058 + * ubicom32_clear_interrupt()
6060 +extern inline void ubicom32_clear_interrupt(u8_t interrupt)
6062 + u32_t ibit = INT_BIT_MASK(interrupt);
6064 + if (INT_REG(interrupt) == INT_REG(INT_CHIP(0, 0))) {
6066 + "move.4 "D(INT_CLR(INT_CHIP(0, 0)))", %0\n\t"
6075 + "move.4 "D(INT_CLR(INT_CHIP(1, 0)))", %0\n\t"
6082 + * ubicom32_enable_interrupt()
6084 +extern inline void ubicom32_enable_interrupt(u8_t interrupt)
6086 + u32_t ibit = INT_BIT_MASK(interrupt);
6088 + if (INT_REG(interrupt) == INT_REG(INT_CHIP(0, 0))) {
6090 + "or.4 "D(INT_MASK(INT_CHIP(0, 0)))", "D(INT_MASK(INT_CHIP(0, 0)))", %0\n\t"
6099 + "or.4 "D(INT_MASK(INT_CHIP(1, 0)))", "D(INT_MASK(INT_CHIP(1, 0)))", %0\n\t"
6106 + * ubicom32_disable_interrupt()
6108 +extern inline void ubicom32_disable_interrupt(u8_t interrupt)
6110 + u32_t ibit = ~INT_BIT_MASK(interrupt);
6112 + if (INT_REG(interrupt) == INT_REG(INT_CHIP(0, 0))) {
6114 + "and.4 "D(INT_MASK(INT_CHIP(0, 0)))", "D(INT_MASK(INT_CHIP(0, 0)))", %0\n\t"
6123 + "and.4 "D(INT_MASK(INT_CHIP(1, 0)))", "D(INT_MASK(INT_CHIP(1, 0)))", %0\n\t"
6130 + * ubicom32_enable_global_interrupts()
6132 +extern inline void ubicom32_enable_global_interrupts(void)
6135 + "bset GLOBAL_CTRL, GLOBAL_CTRL, #%bit("D(GLOBAL_CTRL_INT_EN)")"
6140 + * ubicom32_disable_global_interrupts()
6142 +extern inline void ubicom32_disable_global_interrupts(void)
6145 + "bclr GLOBAL_CTRL, GLOBAL_CTRL, #%bit("D(GLOBAL_CTRL_INT_EN)")"
6150 + * ubicom32_get_reset_reason()
6152 +extern inline u32_t ubicom32_get_reset_reason(void)
6154 + return *(u32_t *)(GENERAL_CFG_BASE + GEN_RESET_REASON);
6158 + * ubicom32_read_reg()
6160 +extern inline u32_t ubicom32_read_reg(volatile void *reg)
6164 + "move.4 %[dest], %[src] \n\t"
6166 + : [src] "m" (*(u32_t *)reg)
6172 + * ubicom32_write_reg()
6174 +extern inline void ubicom32_write_reg(volatile void *reg, u32_t v)
6177 + "move.4 %[dest], %[src] \n\t"
6179 + : [src] "r" (v), [dest] "m" (*(u32_t *)reg)
6183 +#endif /* __ASSEMBLY__ */
6184 +#endif /* _ASM_UBICOM32_IP5000_H */
6185 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/ipcbuf.h linux-2.6.28.10/arch/ubicom32/include/asm/ipcbuf.h
6186 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/ipcbuf.h 1970-01-01 02:00:00.000000000 +0200
6187 +++ linux-2.6.28.10/arch/ubicom32/include/asm/ipcbuf.h 2009-08-06 10:31:02.000000000 +0300
6190 + * arch/ubicom32/include/asm/ipcbuf.h
6191 + * Definition of ipc64_perm struct for Ubicom32 architecture.
6193 + * (C) Copyright 2009, Ubicom, Inc.
6195 + * This file is part of the Ubicom32 Linux Kernel Port.
6197 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
6198 + * it and/or modify it under the terms of the GNU General Public License
6199 + * as published by the Free Software Foundation, either version 2 of the
6200 + * License, or (at your option) any later version.
6202 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
6203 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
6204 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
6205 + * the GNU General Public License for more details.
6207 + * You should have received a copy of the GNU General Public License
6208 + * along with the Ubicom32 Linux Kernel Port. If not,
6209 + * see <http://www.gnu.org/licenses/>.
6211 + * Ubicom32 implementation derived from (with many thanks):
6216 +#ifndef _ASM_UBICOM32_IPCBUF_H
6217 +#define _ASM_UBICOM32_IPCBUF_H
6220 + * The user_ipc_perm structure for m68k architecture.
6221 + * Note extra padding because this structure is passed back and forth
6222 + * between kernel and user space.
6224 + * Pad space is left for:
6225 + * - 32-bit mode_t and seq
6226 + * - 2 miscellaneous 32-bit values
6230 + __kernel_key_t key;
6231 + __kernel_uid32_t uid;
6232 + __kernel_gid32_t gid;
6233 + __kernel_uid32_t cuid;
6234 + __kernel_gid32_t cgid;
6235 + __kernel_mode_t mode;
6236 + unsigned short __pad1;
6237 + unsigned short seq;
6238 + unsigned short __pad2;
6239 + unsigned long __unused1;
6240 + unsigned long __unused2;
6243 +#endif /* _ASM_UBICOM32_IPCBUF_H */
6244 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/irqflags.h linux-2.6.28.10/arch/ubicom32/include/asm/irqflags.h
6245 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/irqflags.h 1970-01-01 02:00:00.000000000 +0200
6246 +++ linux-2.6.28.10/arch/ubicom32/include/asm/irqflags.h 2009-08-06 10:31:02.000000000 +0300
6249 + * arch/ubicom32/include/asm/irqflags.h
6250 + * Raw implementation of local IRQ functions.
6252 + * (C) Copyright 2009, Ubicom, Inc.
6254 + * This file is part of the Ubicom32 Linux Kernel Port.
6256 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
6257 + * it and/or modify it under the terms of the GNU General Public License
6258 + * as published by the Free Software Foundation, either version 2 of the
6259 + * License, or (at your option) any later version.
6261 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
6262 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
6263 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
6264 + * the GNU General Public License for more details.
6266 + * You should have received a copy of the GNU General Public License
6267 + * along with the Ubicom32 Linux Kernel Port. If not,
6268 + * see <http://www.gnu.org/licenses/>.
6270 + * Ubicom32 implementation derived from (with many thanks):
6275 +#ifndef _ASM_UBICOM32_IRQFLAGS_H
6276 +#define _ASM_UBICOM32_IRQFLAGS_H
6278 +#include <linux/thread_info.h>
6279 +#include <asm/ubicom32-common.h>
6280 +#include <asm/smp.h>
6281 +#include <asm/ldsr.h>
6283 +#if defined(CONFIG_PREEMPT)
6284 +#error Not supported by Ubicom32 irq handling, yet!
6288 + * raw_local_irq_enable()
6289 + * Enable interrupts for this thread.
6291 +static inline void raw_local_irq_enable(void)
6293 + ldsr_local_irq_enable();
6297 + * raw_local_irq_disable()
6298 + * Disable interrupts for this thread.
6300 +static inline void raw_local_irq_disable(void)
6302 + ldsr_local_irq_disable();
6306 + * raw_local_save_flags()
6307 + * Get the current IRQ state.
6309 +#define raw_local_save_flags(flags) \
6311 + (flags) = ldsr_local_irq_is_disabled(); \
6315 + * raw_local_irq_save()
6316 + * Save the current interrupt state and disable interrupts.
6318 +#define raw_local_irq_save(flags) \
6320 + (flags) = ldsr_local_irq_save(); \
6324 + * raw_local_irq_restore()
6325 + * Restore the IRQ state back to flags.
6327 +static inline void raw_local_irq_restore(unsigned long flags)
6329 + ldsr_local_irq_restore(flags);
6333 + * raw_irqs_disabled_flags()
6334 + * Return true if the flags indicate that IRQ(s) are disabled.
6336 +static inline int raw_irqs_disabled_flags(unsigned long flags)
6341 +#endif /* _ASM_UBICOM32_IRQFLAGS_H */
6342 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/irq.h linux-2.6.28.10/arch/ubicom32/include/asm/irq.h
6343 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/irq.h 1970-01-01 02:00:00.000000000 +0200
6344 +++ linux-2.6.28.10/arch/ubicom32/include/asm/irq.h 2009-08-06 10:31:02.000000000 +0300
6347 + * arch/ubicom32/include/asm/irq.h
6348 + * IRQ definitions for Ubicom32 architecture.
6350 + * (C) Copyright 2009, Ubicom, Inc.
6352 + * This file is part of the Ubicom32 Linux Kernel Port.
6354 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
6355 + * it and/or modify it under the terms of the GNU General Public License
6356 + * as published by the Free Software Foundation, either version 2 of the
6357 + * License, or (at your option) any later version.
6359 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
6360 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
6361 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
6362 + * the GNU General Public License for more details.
6364 + * You should have received a copy of the GNU General Public License
6365 + * along with the Ubicom32 Linux Kernel Port. If not,
6366 + * see <http://www.gnu.org/licenses/>.
6368 + * Ubicom32 implementation derived from (with many thanks):
6373 +#ifndef _ASM_UBICOM32_IRQ_H
6374 +#define _ASM_UBICOM32_IRQ_H
6376 +#include <asm/irqflags.h>
6379 + * We setup the IRQS to cover the full range of interrupt registers in
6384 +#define irq_canonicalize(irq) (irq)
6386 +extern int irq_soft_alloc(unsigned int *soft);
6387 +extern void ack_bad_irq(unsigned int irq);
6388 +extern void do_IRQ(int irq, struct pt_regs *fp);
6390 +#endif /* _ASM_UBICOM32_IRQ_H */
6391 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/irq_regs.h linux-2.6.28.10/arch/ubicom32/include/asm/irq_regs.h
6392 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/irq_regs.h 1970-01-01 02:00:00.000000000 +0200
6393 +++ linux-2.6.28.10/arch/ubicom32/include/asm/irq_regs.h 2009-08-06 10:31:02.000000000 +0300
6396 + * arch/ubicom32/include/asm/irq_regs.h
6397 + * Generic irq_regs.h for Ubicom32 architecture.
6399 + * (C) Copyright 2009, Ubicom, Inc.
6401 + * This file is part of the Ubicom32 Linux Kernel Port.
6403 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
6404 + * it and/or modify it under the terms of the GNU General Public License
6405 + * as published by the Free Software Foundation, either version 2 of the
6406 + * License, or (at your option) any later version.
6408 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
6409 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
6410 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
6411 + * the GNU General Public License for more details.
6413 + * You should have received a copy of the GNU General Public License
6414 + * along with the Ubicom32 Linux Kernel Port. If not,
6415 + * see <http://www.gnu.org/licenses/>.
6417 + * Ubicom32 implementation derived from (with many thanks):
6422 +#ifndef _ASM_UBICOM32_IRQ_REGS_H
6423 +#define _ASM_UBICOM32_IRQ_REGS_H
6425 +#include <asm-generic/irq_regs.h>
6427 +#endif /* _ASM_UBICOM32_IRQ_REGS_H */
6428 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/Kbuild linux-2.6.28.10/arch/ubicom32/include/asm/Kbuild
6429 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/Kbuild 1970-01-01 02:00:00.000000000 +0200
6430 +++ linux-2.6.28.10/arch/ubicom32/include/asm/Kbuild 2009-08-06 10:31:02.000000000 +0300
6432 +include include/asm-generic/Kbuild.asm
6433 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/kdebug.h linux-2.6.28.10/arch/ubicom32/include/asm/kdebug.h
6434 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/kdebug.h 1970-01-01 02:00:00.000000000 +0200
6435 +++ linux-2.6.28.10/arch/ubicom32/include/asm/kdebug.h 2009-08-06 10:31:02.000000000 +0300
6438 + * arch/ubicom32/include/asm/kdebug.h
6439 + * Generic kdebug.h for Ubicom32 architecture.
6441 + * (C) Copyright 2009, Ubicom, Inc.
6443 + * This file is part of the Ubicom32 Linux Kernel Port.
6445 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
6446 + * it and/or modify it under the terms of the GNU General Public License
6447 + * as published by the Free Software Foundation, either version 2 of the
6448 + * License, or (at your option) any later version.
6450 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
6451 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
6452 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
6453 + * the GNU General Public License for more details.
6455 + * You should have received a copy of the GNU General Public License
6456 + * along with the Ubicom32 Linux Kernel Port. If not,
6457 + * see <http://www.gnu.org/licenses/>.
6459 + * Ubicom32 implementation derived from (with many thanks):
6464 +#ifndef _ASM_UBICOM32_KDEBUG_H
6465 +#define _ASM_UBICOM32_KDEBUG_H
6467 +#include <asm-generic/kdebug.h>
6469 +#endif /* _ASM_UBICOM32_KDEBUG_H */
6470 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/kmap_types.h linux-2.6.28.10/arch/ubicom32/include/asm/kmap_types.h
6471 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/kmap_types.h 1970-01-01 02:00:00.000000000 +0200
6472 +++ linux-2.6.28.10/arch/ubicom32/include/asm/kmap_types.h 2009-08-06 10:31:02.000000000 +0300
6475 + * arch/ubicom32/include/asm/kmap_types.h
6476 + * Definition of km_type's for Ubicom32 architecture.
6478 + * (C) Copyright 2009, Ubicom, Inc.
6480 + * This file is part of the Ubicom32 Linux Kernel Port.
6482 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
6483 + * it and/or modify it under the terms of the GNU General Public License
6484 + * as published by the Free Software Foundation, either version 2 of the
6485 + * License, or (at your option) any later version.
6487 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
6488 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
6489 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
6490 + * the GNU General Public License for more details.
6492 + * You should have received a copy of the GNU General Public License
6493 + * along with the Ubicom32 Linux Kernel Port. If not,
6494 + * see <http://www.gnu.org/licenses/>.
6496 + * Ubicom32 implementation derived from (with many thanks):
6501 +#ifndef _ASM_UBICOM32_KMAP_TYPES_H
6502 +#define _ASM_UBICOM32_KMAP_TYPES_H
6506 + KM_SKB_SUNRPC_DATA,
6507 + KM_SKB_DATA_SOFTIRQ,
6521 +#endif /* _ASM_UBICOM32_KMAP_TYPES_H */
6522 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/ldsr.h linux-2.6.28.10/arch/ubicom32/include/asm/ldsr.h
6523 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/ldsr.h 1970-01-01 02:00:00.000000000 +0200
6524 +++ linux-2.6.28.10/arch/ubicom32/include/asm/ldsr.h 2009-08-06 10:31:02.000000000 +0300
6527 + * arch/ubicom32/include/asm/ldsr.h
6528 + * Ubicom32 LDSR interface definitions.
6530 + * (C) Copyright 2009, Ubicom, Inc.
6532 + * This file is part of the Ubicom32 Linux Kernel Port.
6534 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
6535 + * it and/or modify it under the terms of the GNU General Public License
6536 + * as published by the Free Software Foundation, either version 2 of the
6537 + * License, or (at your option) any later version.
6539 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
6540 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
6541 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
6542 + * the GNU General Public License for more details.
6544 + * You should have received a copy of the GNU General Public License
6545 + * along with the Ubicom32 Linux Kernel Port. If not,
6546 + * see <http://www.gnu.org/licenses/>.
6548 + * Ubicom32 implementation derived from (with many thanks):
6553 +#ifndef _ASM_UBICOM32_LDSR_H
6554 +#define _ASM_UBICOM32_LDSR_H
6556 +#include <asm/ubicom32-common.h>
6557 +#include <asm/types.h>
6558 +#include <asm/thread.h>
6560 +extern unsigned int ldsr_soft_irq_mask;
6563 + * ldsr_local_irq_is_disabled()
6564 + * Test if interrupts are disabled for this thread?
6566 +static inline int ldsr_local_irq_is_disabled(void)
6569 + thread_t self = thread_get_self();
6570 + unsigned int mask = (1 << self);
6573 + " and.4 %0, scratchpad1, %1 \n\t"
6580 + * We return a simple 1 == disabled, 0 == enabled
6581 + * losing which tid this is for, because Linux
6582 + * can restore interrupts on a different thread.
6584 + return ret >> self;
6588 + * ldsr_local_irq_save()
6589 + * Get the current interrupt state and disable interrupts.
6591 +static inline unsigned int ldsr_local_irq_save(void)
6594 + thread_t self = thread_get_self();
6595 + unsigned int mask = (1 << self);
6598 + * Ensure the compiler can not optimize out the code
6599 + * (volatile) and that it does not "cache" values around
6600 + * the interrupt state change (memory). This ensures
6601 + * that interrupt changes are treated as a critical
6605 + " and.4 %0, scratchpad1, %1 \n\t"
6606 + " or.4 scratchpad1, scratchpad1, %1 \n\t"
6613 + * We return a simple 1 == disabled, 0 == enabled
6614 + * losing which tid this is for, because Linux
6615 + * can restore interrupts on a different thread.
6617 + return ret >> self;
6621 + * ldsr_local_irq_restore()
6622 + * Restore this cpu's interrupt enable/disable state.
6624 + * Note: flags is either 0 or 1.
6626 +static inline void ldsr_local_irq_restore(unsigned int flags)
6628 + unsigned int temp;
6629 + thread_t self = thread_get_self();
6630 + unsigned int mask = (1 << self);
6631 + flags = (flags << self);
6634 + * Ensure the compiler can not optimize out the code
6635 + * (volatile) and that it does not "cache" values around
6636 + * the interrupt state change (memory). This ensures
6637 + * that interrupt changes are treated as a critical
6640 + * Atomic change to our bit in scratchpad1 without
6641 + * causing any temporary glitch in the value and
6642 + * without effecting other values. Also this uses
6643 + * no branches so no penalties.
6646 + " xor.4 %0, scratchpad1, %1 \n\t"
6647 + " and.4 %0, %2, %0 \n\t"
6648 + " xor.4 scratchpad1, scratchpad1, %0 \n\t"
6649 + " move.4 int_set0, %3 \n\t"
6651 + : "d"(flags), "r"(mask), "r"(ldsr_soft_irq_mask)
6657 + * ldsr_local_irq_disable_interrupt()
6658 + * Disable ints for this thread.
6660 +static inline void ldsr_local_irq_disable(void)
6662 + unsigned int mask = (1 << thread_get_self());
6665 + * Ensure the compiler can not optimize out the code
6666 + * (volatile) and that it does not "cache" values around
6667 + * the interrupt state change (memory). This ensures
6668 + * that interrupt changes are treated as a critical
6672 + " or.4 scratchpad1, scratchpad1, %0 \n\t"
6680 + * ldsr_local_irq_enable_interrupt
6681 + * Enable ints for this thread.
6683 +static inline void ldsr_local_irq_enable(void)
6685 + unsigned int mask = (1 << thread_get_self());
6688 + * Ensure the compiler can not optimize out the code
6689 + * (volatile) and that it does not "cache" values around
6690 + * the interrupt state change (memory). This ensures
6691 + * that interrupt changes are treated as a critical
6695 + " and.4 scratchpad1, scratchpad1, %0 \n\t"
6696 + " move.4 int_set0, %1 \n\t"
6698 + : "d" (~mask), "r" (ldsr_soft_irq_mask)
6703 +extern void ldsr_init(void);
6704 +extern void ldsr_set_trap_irq(unsigned int irq);
6705 +extern void ldsr_mask_vector(unsigned int vector);
6706 +extern void ldsr_unmask_vector(unsigned int vector);
6707 +extern void ldsr_enable_vector(unsigned int vector);
6708 +extern void ldsr_disable_vector(unsigned int vector);
6709 +extern thread_t ldsr_get_threadid(void);
6711 +#endif /* _ASM_UBICOM32_LDSR_H */
6712 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/linkage.h linux-2.6.28.10/arch/ubicom32/include/asm/linkage.h
6713 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/linkage.h 1970-01-01 02:00:00.000000000 +0200
6714 +++ linux-2.6.28.10/arch/ubicom32/include/asm/linkage.h 2009-08-06 10:31:02.000000000 +0300
6717 + * arch/ubicom32/include/asm/linkage.h
6718 + * Definition of Ubicom32 architecture specific linkage types.
6720 + * (C) Copyright 2009, Ubicom, Inc.
6722 + * This file is part of the Ubicom32 Linux Kernel Port.
6724 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
6725 + * it and/or modify it under the terms of the GNU General Public License
6726 + * as published by the Free Software Foundation, either version 2 of the
6727 + * License, or (at your option) any later version.
6729 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
6730 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
6731 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
6732 + * the GNU General Public License for more details.
6734 + * You should have received a copy of the GNU General Public License
6735 + * along with the Ubicom32 Linux Kernel Port. If not,
6736 + * see <http://www.gnu.org/licenses/>.
6738 + * Ubicom32 implementation derived from (with many thanks):
6743 +#ifndef _ASM_UBICOM32_LINKAGE_H
6744 +#define _ASM_UBICOM32_LINKAGE_H
6746 +#define __ocm_text __section(.ocm_text)
6747 +#define __ocm_data __section(.ocm_data)
6749 +#endif /* _ASM_UBICOM32_LINKAGE_H */
6750 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/local.h linux-2.6.28.10/arch/ubicom32/include/asm/local.h
6751 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/local.h 1970-01-01 02:00:00.000000000 +0200
6752 +++ linux-2.6.28.10/arch/ubicom32/include/asm/local.h 2009-08-06 10:31:02.000000000 +0300
6755 + * arch/ubicom32/include/asm/local.h
6756 + * Generic local.h for Ubicom32 architecture.
6758 + * (C) Copyright 2009, Ubicom, Inc.
6760 + * This file is part of the Ubicom32 Linux Kernel Port.
6762 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
6763 + * it and/or modify it under the terms of the GNU General Public License
6764 + * as published by the Free Software Foundation, either version 2 of the
6765 + * License, or (at your option) any later version.
6767 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
6768 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
6769 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
6770 + * the GNU General Public License for more details.
6772 + * You should have received a copy of the GNU General Public License
6773 + * along with the Ubicom32 Linux Kernel Port. If not,
6774 + * see <http://www.gnu.org/licenses/>.
6776 + * Ubicom32 implementation derived from (with many thanks):
6781 +#ifndef _ASM_UBICOM32_LOCAL_H
6782 +#define _ASM_UBICOM32_LOCAL_H
6784 +#include <asm-generic/local.h>
6786 +#endif /* _ASM_UBICOM32_LOCAL_H */
6787 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/machdep.h linux-2.6.28.10/arch/ubicom32/include/asm/machdep.h
6788 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/machdep.h 1970-01-01 02:00:00.000000000 +0200
6789 +++ linux-2.6.28.10/arch/ubicom32/include/asm/machdep.h 2009-08-06 10:31:02.000000000 +0300
6792 + * arch/ubicom32/include/asm/machdep.h
6793 + * Machine dependent utility routines.
6795 + * (C) Copyright 2009, Ubicom, Inc.
6797 + * This file is part of the Ubicom32 Linux Kernel Port.
6799 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
6800 + * it and/or modify it under the terms of the GNU General Public License
6801 + * as published by the Free Software Foundation, either version 2 of the
6802 + * License, or (at your option) any later version.
6804 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
6805 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
6806 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
6807 + * the GNU General Public License for more details.
6809 + * You should have received a copy of the GNU General Public License
6810 + * along with the Ubicom32 Linux Kernel Port. If not,
6811 + * see <http://www.gnu.org/licenses/>.
6813 + * Ubicom32 implementation derived from (with many thanks):
6818 +#ifndef _ASM_UBICOM32_MACHDEP_H
6819 +#define _ASM_UBICOM32_MACHDEP_H
6821 +#include <linux/interrupt.h>
6823 +/* Hardware clock functions */
6824 +extern unsigned long hw_timer_offset(void);
6826 +/* machine dependent power off functions */
6827 +extern void (*mach_reset)(void);
6828 +extern void (*mach_halt)(void);
6829 +extern void (*mach_power_off)(void);
6831 +extern void config_BSP(char *command, int len);
6833 +#endif /* _ASM_UBICOM32_MACHDEP_H */
6834 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/mc146818rtc.h linux-2.6.28.10/arch/ubicom32/include/asm/mc146818rtc.h
6835 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/mc146818rtc.h 1970-01-01 02:00:00.000000000 +0200
6836 +++ linux-2.6.28.10/arch/ubicom32/include/asm/mc146818rtc.h 2009-08-06 10:31:02.000000000 +0300
6839 + * arch/ubicom32/include/asm/mc146818rtc.h
6840 + * Generic mc146818rtc.h for Ubicom32 architecture.
6842 + * (C) Copyright 2009, Ubicom, Inc.
6844 + * This file is part of the Ubicom32 Linux Kernel Port.
6846 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
6847 + * it and/or modify it under the terms of the GNU General Public License
6848 + * as published by the Free Software Foundation, either version 2 of the
6849 + * License, or (at your option) any later version.
6851 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
6852 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
6853 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
6854 + * the GNU General Public License for more details.
6856 + * You should have received a copy of the GNU General Public License
6857 + * along with the Ubicom32 Linux Kernel Port. If not,
6858 + * see <http://www.gnu.org/licenses/>.
6860 + * Ubicom32 implementation derived from (with many thanks):
6866 + * Machine dependent access functions for RTC registers.
6868 +#ifndef _ASM_UBICOM32_MC146818RTC_H
6869 +#define _ASM_UBICOM32_MC146818RTC_H
6871 +/* empty include file to satisfy the include in genrtc.c/ide-geometry.c */
6873 +#endif /* _ASM_UBICOM32_MC146818RTC_H */
6874 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/mman.h linux-2.6.28.10/arch/ubicom32/include/asm/mman.h
6875 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/mman.h 1970-01-01 02:00:00.000000000 +0200
6876 +++ linux-2.6.28.10/arch/ubicom32/include/asm/mman.h 2009-08-06 10:31:02.000000000 +0300
6879 + * arch/ubicom32/include/asm/mman.h
6880 + * Memory mapping definitions for Ubicom32 architecture.
6882 + * (C) Copyright 2009, Ubicom, Inc.
6884 + * This file is part of the Ubicom32 Linux Kernel Port.
6886 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
6887 + * it and/or modify it under the terms of the GNU General Public License
6888 + * as published by the Free Software Foundation, either version 2 of the
6889 + * License, or (at your option) any later version.
6891 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
6892 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
6893 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
6894 + * the GNU General Public License for more details.
6896 + * You should have received a copy of the GNU General Public License
6897 + * along with the Ubicom32 Linux Kernel Port. If not,
6898 + * see <http://www.gnu.org/licenses/>.
6900 + * Ubicom32 implementation derived from (with many thanks):
6905 +#ifndef _ASM_UBICOM32_MMAN_H
6906 +#define _ASM_UBICOM32_MMAN_H
6908 +#include <asm-generic/mman.h>
6910 +#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
6911 +#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
6912 +#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
6913 +#define MAP_LOCKED 0x2000 /* pages are locked */
6914 +#define MAP_NORESERVE 0x4000 /* don't check for reservations */
6915 +#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
6916 +#define MAP_NONBLOCK 0x10000 /* do not block on IO */
6918 +#define MCL_CURRENT 1 /* lock all current mappings */
6919 +#define MCL_FUTURE 2 /* lock all future mappings */
6921 +#endif /* _ASM_UBICOM32_MMAN_H */
6922 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/mmu_context.h linux-2.6.28.10/arch/ubicom32/include/asm/mmu_context.h
6923 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/mmu_context.h 1970-01-01 02:00:00.000000000 +0200
6924 +++ linux-2.6.28.10/arch/ubicom32/include/asm/mmu_context.h 2009-08-06 10:31:02.000000000 +0300
6927 + * arch/ubicom32/include/asm/mmu_context.h
6928 + * MMU context definitions for Ubicom32 architecture.
6930 + * (C) Copyright 2009, Ubicom, Inc.
6931 + * Copyright (C) 2004, Microtronix Datacom Ltd., All rights reserved.
6933 + * This file is part of the Ubicom32 Linux Kernel Port.
6935 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
6936 + * it and/or modify it under the terms of the GNU General Public License
6937 + * as published by the Free Software Foundation, either version 2 of the
6938 + * License, or (at your option) any later version.
6940 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
6941 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
6942 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
6943 + * the GNU General Public License for more details.
6945 + * You should have received a copy of the GNU General Public License
6946 + * along with the Ubicom32 Linux Kernel Port. If not,
6947 + * see <http://www.gnu.org/licenses/>.
6949 + * Ubicom32 implementation derived from (with many thanks):
6955 +#ifndef _ASM_UBICOM32_MMU_CONTEXT_H
6956 +#define _ASM_UBICOM32_MMU_CONTEXT_H
6958 +#include <asm/setup.h>
6959 +#include <asm/page.h>
6960 +#include <asm/pgalloc.h>
6962 +static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
6967 +init_new_context(struct task_struct *tsk, struct mm_struct *mm)
6969 + // mm->context = virt_to_phys(mm->pgd);
6973 +#define destroy_context(mm) do { } while(0)
6975 +static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
6979 +#define deactivate_mm(tsk,mm) do { } while (0)
6981 +extern inline void activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm)
6985 +#endif /* _ASM_UBICOM32_MMU_CONTEXT_H */
6986 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/mmu.h linux-2.6.28.10/arch/ubicom32/include/asm/mmu.h
6987 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/mmu.h 1970-01-01 02:00:00.000000000 +0200
6988 +++ linux-2.6.28.10/arch/ubicom32/include/asm/mmu.h 2009-08-06 10:31:02.000000000 +0300
6991 + * arch/ubicom32/include/asm/mmu.h
6992 + * Definition of mm_context_t struct for Ubicom32 architecture.
6994 + * (C) Copyright 2009, Ubicom, Inc.
6995 + * Copyright (C) 2002, David McCullough <davidm@snapgear.com>
6997 + * This file is part of the Ubicom32 Linux Kernel Port.
6999 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
7000 + * it and/or modify it under the terms of the GNU General Public License
7001 + * as published by the Free Software Foundation, either version 2 of the
7002 + * License, or (at your option) any later version.
7004 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
7005 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
7006 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
7007 + * the GNU General Public License for more details.
7009 + * You should have received a copy of the GNU General Public License
7010 + * along with the Ubicom32 Linux Kernel Port. If not,
7011 + * see <http://www.gnu.org/licenses/>.
7013 + * Ubicom32 implementation derived from (with many thanks):
7018 +#ifndef _ASM_UBICOM32_MMU_H
7019 +#define _ASM_UBICOM32_MMU_H
7022 + struct vm_list_struct *vmlist;
7023 + unsigned long end_brk;
7024 +#ifdef CONFIG_BINFMT_ELF_FDPIC
7025 + unsigned long exec_fdpic_loadmap;
7026 + unsigned long interp_fdpic_loadmap;
7030 +#endif /* _ASM_UBICOM32_MMU_H */
7031 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/module.h linux-2.6.28.10/arch/ubicom32/include/asm/module.h
7032 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/module.h 1970-01-01 02:00:00.000000000 +0200
7033 +++ linux-2.6.28.10/arch/ubicom32/include/asm/module.h 2009-08-12 13:08:37.000000000 +0300
7036 + * arch/ubicom32/include/asm/module.h
7037 + * Ubicom32 architecture specific module definitions.
7039 + * (C) Copyright 2009, Ubicom, Inc.
7041 + * This file is part of the Ubicom32 Linux Kernel Port.
7043 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
7044 + * it and/or modify it under the terms of the GNU General Public License
7045 + * as published by the Free Software Foundation, either version 2 of the
7046 + * License, or (at your option) any later version.
7048 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
7049 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
7050 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
7051 + * the GNU General Public License for more details.
7053 + * You should have received a copy of the GNU General Public License
7054 + * along with the Ubicom32 Linux Kernel Port. If not,
7055 + * see <http://www.gnu.org/licenses/>.
7057 + * Ubicom32 implementation derived from (with many thanks):
7062 +#ifndef _ASM_UBICOM32_MODULE_H
7063 +#define _ASM_UBICOM32_MODULE_H
7065 +struct mod_arch_specific {
7067 + int ocm_inst_size;
7070 +#define Elf_Shdr Elf32_Shdr
7071 +#define Elf_Sym Elf32_Sym
7072 +#define Elf_Ehdr Elf32_Ehdr
7074 +#define ARCH_PROC_MODULES_EXTRA(m,mod) \
7075 + seq_printf(m, " OCM(%d bytes @ 0x%p)", \
7076 + (mod)->arch.ocm_inst_size, (mod)->arch.ocm_inst)
7078 +#endif /* _ASM_UBICOM32_MODULE_H */
7079 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/msgbuf.h linux-2.6.28.10/arch/ubicom32/include/asm/msgbuf.h
7080 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/msgbuf.h 1970-01-01 02:00:00.000000000 +0200
7081 +++ linux-2.6.28.10/arch/ubicom32/include/asm/msgbuf.h 2009-08-06 10:31:02.000000000 +0300
7084 + * arch/ubicom32/include/asm/msgbuf.h
7085 + * Definition of msqid64_ds struct for Ubicom32 architecture.
7087 + * (C) Copyright 2009, Ubicom, Inc.
7089 + * This file is part of the Ubicom32 Linux Kernel Port.
7091 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
7092 + * it and/or modify it under the terms of the GNU General Public License
7093 + * as published by the Free Software Foundation, either version 2 of the
7094 + * License, or (at your option) any later version.
7096 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
7097 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
7098 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
7099 + * the GNU General Public License for more details.
7101 + * You should have received a copy of the GNU General Public License
7102 + * along with the Ubicom32 Linux Kernel Port. If not,
7103 + * see <http://www.gnu.org/licenses/>.
7105 + * Ubicom32 implementation derived from (with many thanks):
7110 +#ifndef _ASM_UBICOM32_MSGBUF_H
7111 +#define _ASM_UBICOM32_MSGBUF_H
7114 + * The msqid64_ds structure for ubicom32 architecture.
7115 + * Note extra padding because this structure is passed back and forth
7116 + * between kernel and user space.
7118 + * Pad space is left for:
7119 + * - 64-bit time_t to solve y2038 problem
7120 + * - 2 miscellaneous 32-bit values
7123 +struct msqid64_ds {
7124 + struct ipc64_perm msg_perm;
7125 + __kernel_time_t msg_stime; /* last msgsnd time */
7126 + unsigned long __unused1;
7127 + __kernel_time_t msg_rtime; /* last msgrcv time */
7128 + unsigned long __unused2;
7129 + __kernel_time_t msg_ctime; /* last change time */
7130 + unsigned long __unused3;
7131 + unsigned long msg_cbytes; /* current number of bytes on queue */
7132 + unsigned long msg_qnum; /* number of messages in queue */
7133 + unsigned long msg_qbytes; /* max number of bytes on queue */
7134 + __kernel_pid_t msg_lspid; /* pid of last msgsnd */
7135 + __kernel_pid_t msg_lrpid; /* last receive pid */
7136 + unsigned long __unused4;
7137 + unsigned long __unused5;
7140 +#endif /* _ASM_UBICOM32_MSGBUF_H */
7141 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/mutex.h linux-2.6.28.10/arch/ubicom32/include/asm/mutex.h
7142 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/mutex.h 1970-01-01 02:00:00.000000000 +0200
7143 +++ linux-2.6.28.10/arch/ubicom32/include/asm/mutex.h 2009-08-06 10:31:02.000000000 +0300
7146 + * arch/ubicom32/include/asm/mutex.h
7147 + * Generic mutex.h for Ubicom32 architecture.
7149 + * (C) Copyright 2009, Ubicom, Inc.
7151 + * This file is part of the Ubicom32 Linux Kernel Port.
7153 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
7154 + * it and/or modify it under the terms of the GNU General Public License
7155 + * as published by the Free Software Foundation, either version 2 of the
7156 + * License, or (at your option) any later version.
7158 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
7159 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
7160 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
7161 + * the GNU General Public License for more details.
7163 + * You should have received a copy of the GNU General Public License
7164 + * along with the Ubicom32 Linux Kernel Port. If not,
7165 + * see <http://www.gnu.org/licenses/>.
7167 + * Ubicom32 implementation derived from (with many thanks):
7173 + * Pull in the generic implementation for the mutex fastpath.
7175 + * TODO: implement optimized primitives instead, or leave the generic
7176 + * implementation in place, or pick the atomic_xchg() based generic
7177 + * implementation. (see asm-generic/mutex-xchg.h for details)
7180 +#ifndef _ASM_UBICOM32_MUTEX_H
7181 +#define _ASM_UBICOM32_MUTEX_H
7183 +#include <asm-generic/mutex-dec.h>
7185 +#endif /* _ASM_UBICOM32_MUTEX_H */
7186 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/namei.h linux-2.6.28.10/arch/ubicom32/include/asm/namei.h
7187 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/namei.h 1970-01-01 02:00:00.000000000 +0200
7188 +++ linux-2.6.28.10/arch/ubicom32/include/asm/namei.h 2009-08-06 10:31:02.000000000 +0300
7191 + * arch/ubicom32/include/asm/namei.h
7192 + * Definition of __emul_prefix() for Ubicom32 architecture.
7194 + * (C) Copyright 2009, Ubicom, Inc.
7196 + * This file is part of the Ubicom32 Linux Kernel Port.
7198 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
7199 + * it and/or modify it under the terms of the GNU General Public License
7200 + * as published by the Free Software Foundation, either version 2 of the
7201 + * License, or (at your option) any later version.
7203 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
7204 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
7205 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
7206 + * the GNU General Public License for more details.
7208 + * You should have received a copy of the GNU General Public License
7209 + * along with the Ubicom32 Linux Kernel Port. If not,
7210 + * see <http://www.gnu.org/licenses/>.
7212 + * Ubicom32 implementation derived from (with many thanks):
7217 +#ifndef _ASM_UBICOM32_NAMEI_H
7218 +#define _ASM_UBICOM32_NAMEI_H
7220 +/* This dummy routine maybe changed to something useful
7221 + * for /usr/gnemul/ emulation stuff.
7222 + * Look at asm-sparc/namei.h for details.
7225 +#define __emul_prefix() NULL
7227 +#endif /* _ASM_UBICOM32_NAMEI_H */
7228 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/ocm-alloc.h linux-2.6.28.10/arch/ubicom32/include/asm/ocm-alloc.h
7229 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/ocm-alloc.h 1970-01-01 02:00:00.000000000 +0200
7230 +++ linux-2.6.28.10/arch/ubicom32/include/asm/ocm-alloc.h 2009-08-12 13:08:37.000000000 +0300
7233 + * arch/ubicom32/include/asm/ocm-alloc.h
7234 + * Ubicom32 architecture specific ocm definitions.
7236 + * (C) Copyright 2009, Ubicom, Inc.
7238 + * This file is part of the Ubicom32 Linux Kernel Port.
7240 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
7241 + * it and/or modify it under the terms of the GNU General Public License
7242 + * as published by the Free Software Foundation, either version 2 of the
7243 + * License, or (at your option) any later version.
7245 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
7246 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
7247 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
7248 + * the GNU General Public License for more details.
7250 + * You should have received a copy of the GNU General Public License
7251 + * along with the Ubicom32 Linux Kernel Port. If not,
7252 + * see <http://www.gnu.org/licenses/>.
7254 + * Ubicom32 implementation derived from (with many thanks):
7259 +#ifndef _ASM_UBICOM32_OCM_ALLOC_H
7260 +#define _ASM_UBICOM32_OCM_ALLOC_H
7263 +extern void *ocm_inst_alloc(size_t size, pid_t pid);
7264 +extern int ocm_free(const void *ptr);
7265 +extern int ocm_inst_free(const void *ptr);
7267 +#endif /* _ASM_UBICOM32_OCM_ALLOC_H */
7268 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/ocm_size.h linux-2.6.28.10/arch/ubicom32/include/asm/ocm_size.h
7269 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/ocm_size.h 1970-01-01 02:00:00.000000000 +0200
7270 +++ linux-2.6.28.10/arch/ubicom32/include/asm/ocm_size.h 2009-08-06 11:15:34.000000000 +0300
7272 +#define APP_OCM_CODE_SIZE (0x3ffc2e00-0x3ffc0000)
7273 +#define APP_OCM_DATA_SIZE (0x3ffd3500-0x3ffc8000)
7274 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/ocm_text.lds.inc linux-2.6.28.10/arch/ubicom32/include/asm/ocm_text.lds.inc
7275 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/ocm_text.lds.inc 1970-01-01 02:00:00.000000000 +0200
7276 +++ linux-2.6.28.10/arch/ubicom32/include/asm/ocm_text.lds.inc 2009-08-06 10:31:02.000000000 +0300
7279 + * arch/ubicom32/include/asm/ocm_text.lds.inc
7280 + * <TODO: Replace with short file description>
7282 + * (C) Copyright 2009, Ubicom, Inc.
7284 + * This file is part of the Ubicom32 Linux Kernel Port.
7286 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
7287 + * it and/or modify it under the terms of the GNU General Public License
7288 + * as published by the Free Software Foundation, either version 2 of the
7289 + * License, or (at your option) any later version.
7291 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
7292 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
7293 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
7294 + * the GNU General Public License for more details.
7296 + * You should have received a copy of the GNU General Public License
7297 + * along with the Ubicom32 Linux Kernel Port. If not,
7298 + * see <http://www.gnu.org/licenses/>.
7300 + * Ubicom32 implementation derived from (with many thanks):
7306 +*(.text.tcp_packet)
7307 +*(.text.ipt_do_table)
7308 +*(.text.nf_conntrack_in)
7309 +*(.text.ip_forward)
7310 +*(.text.dev_queue_xmit)
7311 +*(.text.netif_receive_skb)
7312 +*(.text.ip_route_input)
7313 +*(.text.ip_finish_output)
7314 +*(.text.nf_iterate)
7315 +*(.text.__hash_conntrack)
7319 +*(.text.__nf_conntrack_find)
7320 +*(.text.dev_hard_start_xmit)
7321 +*(.text.vlan_dev_hard_start_xmit)
7322 +*(.text.vlan_dev_hard_header)
7323 +*(.text.__nf_ct_refresh_acct)
7325 +*(.text.pfifo_fast_enqueue)
7326 +*(.text.ipv4_confirm)
7328 +*(.text.neigh_connected_output)
7329 +*(.text.nf_hook_slow)
7330 +*(.text.nf_nat_packet)
7331 +*(.text.local_bh_enable)
7332 +*(.text.pfifo_fast_dequeue)
7333 +*(.text.ubi32_eth_receive)
7335 +*(.text.skb_checksum)
7337 +*(.text.ubi32_eth_tx_done)
7338 +*(.text.eth_header)
7339 +*(.text.skb_release_data)
7340 +*(.text.nf_conntrack_find_get)
7341 +*(.text.process_backlog)
7342 +*(.text.vlan_skb_recv)
7343 +*(.text.ip_rcv_finish)
7344 +*(.text.__qdisc_run)
7346 +*(.text.eth_type_trans)
7347 +*(.text.__alloc_skb)
7349 +*(.text.nf_ip_checksum)
7350 +*(.text.__skb_checksum_complete_head)
7351 +*(.text.ipv4_conntrack_defrag)
7352 +*(.text.tcp_pkt_to_tuple)
7354 +*(.text.tcp_manip_pkt)
7356 +*(.text.nf_ct_get_tuple)
7358 +*(.text.ubi32_eth_start_xmit)
7359 +*(.text.free_block)
7361 +*(.text.kmem_cache_free)
7362 +*(.text.skb_pull_rcsum)
7363 +*(.text.cache_alloc_refill)
7364 +*(.text.skb_release_head_state)
7366 +*(.text.ip_sabotage_in)
7367 +*(.text.ip_forward_finish)
7368 +*(.text.kmem_cache_alloc)
7369 +*(.text.local_bh_disable)
7370 +*(.text.ipv4_pkt_to_tuple)
7371 +*(.text.inet_proto_csum_replace4)
7372 +*(.text.__nf_ct_l4proto_find)
7373 +*(.text.csum_partial)
7374 +*(.text.neigh_resolve_output)
7375 +*(.text.__kfree_skb)
7377 +*(.text.__find_vlan_dev)
7378 +*(.text.ldsr_ctxsw_thread)
7381 +*(.text.ipv4_invert_tuple)
7382 +*(.text.nf_ct_invert_tuplepr)
7383 +*(.text.skb_make_writable)
7384 +*(.text.ipv4_get_l4proto)
7385 +*(.text.handle_IRQ_event)
7386 +*(.text.net_rx_action)
7387 +*(.text.__do_softirq)
7389 +*(.text.note_interrupt)
7390 +*(.text.ipv4_conntrack_in)
7391 +*(.text.dst_release)
7392 +*(.text.tasklet_action)
7393 +*(.text.nf_nat_out)
7394 +*(.text.nf_ct_invert_tuple)
7396 +*(.text.__tasklet_schedule)
7397 +*(.text.__skb_checksum_complete)
7398 +*(.text.ubi32_eth_interrupt)
7399 +*(.text.dev_kfree_skb_any)
7400 +*(.text.ret_from_interrupt_to_kernel)
7401 +*(.text.preemptive_context_save)
7402 +*(.text.irq_ack_vector)
7403 +*(.text.update_wall_time)
7404 +*(.text.ldsr_thread)
7406 +*(.text.ubi32_eth_do_tasklet)
7407 +*(.text.__napi_schedule)
7409 +*(.text.run_timer_softirq)
7410 +*(.text.ldsr_mask_vector)
7412 +*(.text.ldsr_get_lsb)
7413 +*(.text.ldsr_unmask_vector)
7414 +*(.text.ip_fast_csum)
7415 +*(.text.hrtimer_run_queues)
7416 +*(.text.tcp_invert_tuple)
7418 +*(.text.run_posix_cpu_timers)
7419 +*(.text.free_hot_cold_page)
7420 +*(.text.lock_timer_base)
7421 +*(.text.calc_delta_mine)
7422 +*(.text.slab_destroy)
7423 +*(.text.rcu_pending)
7424 +*(.text.scheduler_tick)
7425 +*(.text.hrtimer_run_pending)
7426 +*(.text.do_softirq)
7428 +*(.text.irq_end_vector)
7429 +*(.text.pci_read_u32)
7430 +*(.text.udivmodsi4)
7433 +*(.text.__slab_alloc)
7434 +*(.text.br_handle_frame)
7435 +*(.text.br_fdb_update)
7436 +*(.text.__br_fdb_get)
7437 +*(.text.br_forward)
7438 +*(.text.br_handle_frame_finish)
7439 +*(.text.pci_write_u32)
7440 +*(.text.kmem_freepages)
7441 +*(.text.br_dev_queue_push_xmit)
7443 +*(.text.next_zones_zonelist)
7444 +*(.text.ubi32_pci_read_u32)
7445 +*(.text.zone_watermark_ok)
7446 +*(.text.__rmqueue_smallest)
7447 +*(.text.ubi32_eth_napi_poll)
7448 +*(.text.ubi32_pci_write_u32)
7449 +*(.text.ubi32_pci_read_u32)
7450 +*(.text._local_bh_enable)
7451 +*(.text._local_bh_disable)
7453 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/page.h linux-2.6.28.10/arch/ubicom32/include/asm/page.h
7454 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/page.h 1970-01-01 02:00:00.000000000 +0200
7455 +++ linux-2.6.28.10/arch/ubicom32/include/asm/page.h 2009-08-06 10:31:02.000000000 +0300
7458 + * arch/ubicom32/include/asm/page.h
7459 + * Memory page related operations and definitions.
7461 + * (C) Copyright 2009, Ubicom, Inc.
7463 + * This file is part of the Ubicom32 Linux Kernel Port.
7465 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
7466 + * it and/or modify it under the terms of the GNU General Public License
7467 + * as published by the Free Software Foundation, either version 2 of the
7468 + * License, or (at your option) any later version.
7470 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
7471 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
7472 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
7473 + * the GNU General Public License for more details.
7475 + * You should have received a copy of the GNU General Public License
7476 + * along with the Ubicom32 Linux Kernel Port. If not,
7477 + * see <http://www.gnu.org/licenses/>.
7479 + * Ubicom32 implementation derived from (with many thanks):
7484 +#ifndef _ASM_UBICOM32_PAGE_H
7485 +#define _ASM_UBICOM32_PAGE_H
7487 +/* PAGE_SHIFT determines the page size */
7489 +#define PAGE_SHIFT 12
7490 +#define PAGE_SIZE (1 << PAGE_SHIFT)
7491 +#define PAGE_MASK (~(PAGE_SIZE-1))
7493 +#include <asm/setup.h>
7495 +#ifndef __ASSEMBLY__
7497 +#define get_user_page(vaddr) __get_free_page(GFP_KERNEL)
7498 +#define free_user_page(page, addr) free_page(addr)
7500 +#define clear_page(page) memset((page), 0, PAGE_SIZE)
7501 +#define copy_page(to,from) memcpy((to), (from), PAGE_SIZE)
7503 +#define clear_user_page(page, vaddr, pg) clear_page(page)
7504 +#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
7506 +#define __alloc_zeroed_user_highpage(movableflags, vma, vaddr) \
7507 + alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr)
7508 +#define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
7511 + * These are used to make use of C type-checking..
7513 +typedef struct { unsigned long pte; } pte_t;
7514 +typedef struct { unsigned long pmd[16]; } pmd_t;
7515 +typedef struct { unsigned long pgd; } pgd_t;
7516 +typedef struct { unsigned long pgprot; } pgprot_t;
7517 +typedef struct page *pgtable_t;
7519 +#define pte_val(x) ((x).pte)
7520 +#define pmd_val(x) ((&x)->pmd[0])
7521 +#define pgd_val(x) ((x).pgd)
7522 +#define pgprot_val(x) ((x).pgprot)
7524 +#define __pte(x) ((pte_t) { (x) } )
7525 +#define __pmd(x) ((pmd_t) { (x) } )
7526 +#define __pgd(x) ((pgd_t) { (x) } )
7527 +#define __pgprot(x) ((pgprot_t) { (x) } )
7529 +extern unsigned long memory_start;
7530 +extern unsigned long memory_end;
7532 +#endif /* !__ASSEMBLY__ */
7534 +#include <asm/page_offset.h>
7536 +#define PAGE_OFFSET (PAGE_OFFSET_RAW)
7538 +#ifndef __ASSEMBLY__
7540 +#define __pa(vaddr) virt_to_phys((void *)(vaddr))
7541 +#define __va(paddr) phys_to_virt((unsigned long)(paddr))
7543 +#define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT)
7544 +#define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT)
7546 +#define virt_to_page(addr) (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT))
7547 +#define page_to_virt(page) ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET)
7549 +#define pfn_to_page(pfn) virt_to_page(pfn_to_virt(pfn))
7550 +#define page_to_pfn(page) virt_to_pfn(page_to_virt(page))
7551 +#define pfn_valid(pfn) ((pfn) < max_mapnr)
7553 +#define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
7554 + ((void *)(kaddr) < (void *)memory_end))
7556 +#endif /* __ASSEMBLY__ */
7559 +#include <asm-generic/page.h>
7562 +#endif /* _ASM_UBICOM32_PAGE_H */
7563 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/page_offset.h linux-2.6.28.10/arch/ubicom32/include/asm/page_offset.h
7564 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/page_offset.h 1970-01-01 02:00:00.000000000 +0200
7565 +++ linux-2.6.28.10/arch/ubicom32/include/asm/page_offset.h 2009-08-06 10:31:02.000000000 +0300
7568 + * arch/ubicom32/include/asm/page_offset.h
7569 + * Definition of PAGE_OFFSET_RAW for Ubicom32 architecture.
7571 + * (C) Copyright 2009, Ubicom, Inc.
7573 + * This file is part of the Ubicom32 Linux Kernel Port.
7575 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
7576 + * it and/or modify it under the terms of the GNU General Public License
7577 + * as published by the Free Software Foundation, either version 2 of the
7578 + * License, or (at your option) any later version.
7580 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
7581 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
7582 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
7583 + * the GNU General Public License for more details.
7585 + * You should have received a copy of the GNU General Public License
7586 + * along with the Ubicom32 Linux Kernel Port. If not,
7587 + * see <http://www.gnu.org/licenses/>.
7589 + * Ubicom32 implementation derived from (with many thanks):
7595 +#ifndef _ASM_UBICOM32_PAGE_OFFSET_H
7596 +#define _ASM_UBICOM32_PAGE_OFFSET_H
7598 +/* This handles the memory map.. */
7599 +#define PAGE_OFFSET_RAW 0x3ffc0000
7601 +#endif /* _ASM_UBICOM32_PAGE_OFFSET_H */
7602 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/param.h linux-2.6.28.10/arch/ubicom32/include/asm/param.h
7603 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/param.h 1970-01-01 02:00:00.000000000 +0200
7604 +++ linux-2.6.28.10/arch/ubicom32/include/asm/param.h 2009-08-06 10:31:02.000000000 +0300
7607 + * arch/ubicom32/include/asm/param.h
7608 + * Definition of miscellaneous constants, including HZ.
7610 + * (C) Copyright 2009, Ubicom, Inc.
7612 + * This file is part of the Ubicom32 Linux Kernel Port.
7614 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
7615 + * it and/or modify it under the terms of the GNU General Public License
7616 + * as published by the Free Software Foundation, either version 2 of the
7617 + * License, or (at your option) any later version.
7619 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
7620 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
7621 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
7622 + * the GNU General Public License for more details.
7624 + * You should have received a copy of the GNU General Public License
7625 + * along with the Ubicom32 Linux Kernel Port. If not,
7626 + * see <http://www.gnu.org/licenses/>.
7628 + * Ubicom32 implementation derived from (with many thanks):
7633 +#ifndef _ASM_UBICOM32_PARAM_H
7634 +#define _ASM_UBICOM32_PARAM_H
7637 +#define HZ CONFIG_HZ
7639 +#define CLOCKS_PER_SEC (USER_HZ)
7646 +#define EXEC_PAGESIZE 4096
7649 +#define NOGROUP (-1)
7652 +#define MAXHOSTNAMELEN 64 /* max length of hostname */
7654 +#endif /* _ASM_UBICOM32_PARAM_H */
7655 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/pci.h linux-2.6.28.10/arch/ubicom32/include/asm/pci.h
7656 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/pci.h 1970-01-01 02:00:00.000000000 +0200
7657 +++ linux-2.6.28.10/arch/ubicom32/include/asm/pci.h 2009-08-06 10:31:02.000000000 +0300
7660 + * arch/ubicom32/include/asm/pci.h
7661 + * Definitions of PCI operations for Ubicom32 architecture.
7663 + * (C) Copyright 2009, Ubicom, Inc.
7665 + * This file is part of the Ubicom32 Linux Kernel Port.
7667 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
7668 + * it and/or modify it under the terms of the GNU General Public License
7669 + * as published by the Free Software Foundation, either version 2 of the
7670 + * License, or (at your option) any later version.
7672 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
7673 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
7674 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
7675 + * the GNU General Public License for more details.
7677 + * You should have received a copy of the GNU General Public License
7678 + * along with the Ubicom32 Linux Kernel Port. If not,
7679 + * see <http://www.gnu.org/licenses/>.
7681 + * Ubicom32 implementation derived from (with many thanks):
7686 +#ifndef _ASM_UBICOM32_PCI_H
7687 +#define _ASM_UBICOM32_PCI_H
7689 +#include <asm/io.h>
7691 +/* The PCI address space does equal the physical memory
7692 + * address space. The networking and block device layers use
7693 + * this boolean for bounce buffer decisions.
7695 +#define PCI_DMA_BUS_IS_PHYS (1)
7700 + * Perform a master read/write to the PCI bus.
7701 + * These functions return a PCI_RESP_xxx code.
7703 +extern u8 pci_read_u32(u8 pci_cmd, u32 address, u32 *data);
7704 +extern u8 pci_write_u32(u8 pci_cmd, u32 address, u32 data);
7705 +extern u8 pci_read_u16(u8 pci_cmd, u32 address, u16 *data);
7706 +extern u8 pci_write_u16(u8 pci_cmd, u32 address, u16 data);
7707 +extern u8 pci_read_u8(u8 pci_cmd, u32 address, u8 *data);
7708 +extern u8 pci_write_u8(u8 pci_cmd, u32 address, u8 data);
7711 +#define PCIBIOS_MIN_IO 0x100
7712 +#define PCIBIOS_MIN_MEM 0x10000000
7714 +#define pcibios_assign_all_busses() 0
7715 +#define pcibios_scan_all_fns(a, b) 0
7716 +extern void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
7717 + struct resource *res);
7719 +extern void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
7720 + struct pci_bus_region *region);
7722 +struct pci_sys_data;
7726 + struct list_head buses;
7727 + int nr_controllers;
7728 + int (*setup)(int nr, struct pci_sys_data *);
7729 + struct pci_bus *(*scan)(int nr, struct pci_sys_data *);
7730 + void (*preinit)(void);
7731 + void (*postinit)(void);
7732 + u8 (*swizzle)(struct pci_dev *dev, u8 *pin);
7733 + int (*map_irq)(struct pci_dev *dev, u8 slot, u8 pin);
7737 + * Per-controller structure
7739 +struct pci_sys_data {
7740 + struct list_head node;
7741 + int busnr; /* primary bus number */
7742 + u64 mem_offset; /* bus->cpu memory mapping offset */
7743 + unsigned long io_offset; /* bus->cpu IO mapping offset */
7744 + struct pci_bus *bus; /* PCI bus */
7745 + struct resource *resource[3]; /* Primary PCI bus resources */
7746 + /* Bridge swizzling */
7747 + u8 (*swizzle)(struct pci_dev *, u8 *);
7749 + int (*map_irq)(struct pci_dev *, u8, u8);
7750 + struct hw_pci *hw;
7753 +static inline struct resource *
7754 +pcibios_select_root(struct pci_dev *pdev, struct resource *res)
7756 + struct resource *root = NULL;
7758 + if (res->flags & IORESOURCE_IO)
7759 + root = &ioport_resource;
7760 + if (res->flags & IORESOURCE_MEM)
7761 + root = &iomem_resource;
7766 +static inline void pcibios_set_master(struct pci_dev *dev)
7768 + /* No special bus mastering setup handling */
7770 +#define HAVE_ARCH_PCI_SET_DMA_MAX_SEGMENT_SIZE 1
7771 +#define HAVE_ARCH_PCI_SET_DMA_SEGMENT_BOUNDARY 1
7774 +static inline void * pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
7775 + dma_addr_t *dma_handle)
7777 + void *vaddr = kmalloc(size, GFP_KERNEL);
7778 + if(vaddr != NULL) {
7779 + *dma_handle = virt_to_phys(vaddr);
7784 +static inline int pci_dma_supported(struct pci_dev *hwdev, dma_addr_t mask)
7789 +static inline void pci_free_consistent(struct pci_dev *hwdev, size_t size,
7790 + void *cpu_addr, dma_addr_t dma_handle)
7796 +static inline dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr,
7797 + size_t size, int direction)
7799 + return virt_to_phys(ptr);
7802 +static inline void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
7803 + size_t size, int direction)
7808 +static inline dma_addr_t
7809 +pci_map_page(struct pci_dev *hwdev, struct page *page,
7810 + unsigned long offset, size_t size, int direction)
7812 + return pci_map_single(hwdev, page_address(page) + offset, size, (int)direction);
7816 +pci_unmap_page(struct pci_dev *hwdev, dma_addr_t dma_address,
7817 + size_t size, int direction)
7819 + pci_unmap_single(hwdev, dma_address, size, direction);
7823 +pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
7824 + int nents, int direction)
7830 +pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg,
7831 + int nents, int direction)
7836 +pci_dma_sync_sg_for_cpu(struct pci_dev *hwdev, struct scatterlist *sg,
7837 + int nelems, int direction)
7842 +pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sg,
7843 + int nelems, int direction)
7848 +pci_dma_sync_single_for_cpu(struct pci_dev *hwdev, dma_addr_t dma_handle,
7849 + size_t size, int direction)
7854 +pci_dma_sync_single_for_device(struct pci_dev *hwdev, dma_addr_t dma_handle,
7855 + size_t size, int direction)
7860 +pci_dma_mapping_error(struct pci_dev *hwdev, dma_addr_t dma_addr)
7862 + return dma_addr == 0;
7864 +extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
7865 +extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
7868 +#endif /* _ASM_UBICOM32_PCI_H */
7869 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/percpu.h linux-2.6.28.10/arch/ubicom32/include/asm/percpu.h
7870 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/percpu.h 1970-01-01 02:00:00.000000000 +0200
7871 +++ linux-2.6.28.10/arch/ubicom32/include/asm/percpu.h 2009-08-06 10:31:02.000000000 +0300
7874 + * arch/ubicom32/include/asm/percpu.h
7875 + * Generic percpu.h for the Ubicom32 architecture.
7877 + * (C) Copyright 2009, Ubicom, Inc.
7879 + * This file is part of the Ubicom32 Linux Kernel Port.
7881 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
7882 + * it and/or modify it under the terms of the GNU General Public License
7883 + * as published by the Free Software Foundation, either version 2 of the
7884 + * License, or (at your option) any later version.
7886 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
7887 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
7888 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
7889 + * the GNU General Public License for more details.
7891 + * You should have received a copy of the GNU General Public License
7892 + * along with the Ubicom32 Linux Kernel Port. If not,
7893 + * see <http://www.gnu.org/licenses/>.
7895 + * Ubicom32 implementation derived from (with many thanks):
7900 +#ifndef _ASM_UBICOM32_PERCPU_H
7901 +#define _ASM_UBICOM32_PERCPU_H
7903 +#include <asm-generic/percpu.h>
7905 +#endif /* _ASM_UBICOM32_PERCPU_H */
7906 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/pgalloc.h linux-2.6.28.10/arch/ubicom32/include/asm/pgalloc.h
7907 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/pgalloc.h 1970-01-01 02:00:00.000000000 +0200
7908 +++ linux-2.6.28.10/arch/ubicom32/include/asm/pgalloc.h 2009-08-06 10:31:02.000000000 +0300
7911 + * arch/ubicom32/include/asm/pgalloc.h
7912 + * Page table allocation definitions.
7914 + * (C) Copyright 2009, Ubicom, Inc.
7916 + * This file is part of the Ubicom32 Linux Kernel Port.
7918 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
7919 + * it and/or modify it under the terms of the GNU General Public License
7920 + * as published by the Free Software Foundation, either version 2 of the
7921 + * License, or (at your option) any later version.
7923 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
7924 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
7925 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
7926 + * the GNU General Public License for more details.
7928 + * You should have received a copy of the GNU General Public License
7929 + * along with the Ubicom32 Linux Kernel Port. If not,
7930 + * see <http://www.gnu.org/licenses/>.
7932 + * Ubicom32 implementation derived from (with many thanks):
7937 +#ifndef _ASM_UBICOM32_PGALLOC_H
7938 +#define _ASM_UBICOM32_PGALLOC_H
7940 +#include <linux/mm.h>
7941 +#include <asm/setup.h>
7943 +#define check_pgt_cache() do { } while (0)
7945 +#endif /* _ASM_UBICOM32_PGALLOC_H */
7946 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/pgtable.h linux-2.6.28.10/arch/ubicom32/include/asm/pgtable.h
7947 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/pgtable.h 1970-01-01 02:00:00.000000000 +0200
7948 +++ linux-2.6.28.10/arch/ubicom32/include/asm/pgtable.h 2009-08-06 10:31:02.000000000 +0300
7951 + * arch/ubicom32/include/asm/pgtable.h
7952 + * Ubicom32 pseudo page table definitions and operations.
7954 + * (C) Copyright 2009, Ubicom, Inc.
7955 + * Copyright (C) 2004 Microtronix Datacom Ltd
7957 + * This file is part of the Ubicom32 Linux Kernel Port.
7959 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
7960 + * it and/or modify it under the terms of the GNU General Public License
7961 + * as published by the Free Software Foundation, either version 2 of the
7962 + * License, or (at your option) any later version.
7964 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
7965 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
7966 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
7967 + * the GNU General Public License for more details.
7969 + * You should have received a copy of the GNU General Public License
7970 + * along with the Ubicom32 Linux Kernel Port. If not,
7971 + * see <http://www.gnu.org/licenses/>.
7973 + * Ubicom32 implementation derived from (with many thanks):
7977 + * and various works, Alpha, ix86, M68K, Sparc, ...et al
7979 +#ifndef _ASM_UBICOM32_PGTABLE_H
7980 +#define _ASM_UBICOM32_PGTABLE_H
7982 +#include <asm-generic/4level-fixup.h>
7984 +//vic - this bit copied from m68knommu version
7985 +#include <asm/setup.h>
7986 +#include <asm/io.h>
7987 +#include <linux/sched.h>
7989 +typedef pte_t *pte_addr_t;
7991 +#define pgd_present(pgd) (1) /* pages are always present on NO_MM */
7992 +#define pgd_none(pgd) (0)
7993 +#define pgd_bad(pgd) (0)
7994 +#define pgd_clear(pgdp)
7995 +#define kern_addr_valid(addr) (1)
7996 +#define pmd_offset(a, b) ((void *)0)
7998 +#define PAGE_NONE __pgprot(0) /* these mean nothing to NO_MM */
7999 +#define PAGE_SHARED __pgprot(0) /* these mean nothing to NO_MM */
8000 +#define PAGE_COPY __pgprot(0) /* these mean nothing to NO_MM */
8001 +#define PAGE_READONLY __pgprot(0) /* these mean nothing to NO_MM */
8002 +#define PAGE_KERNEL __pgprot(0) /* these mean nothing to NO_MM */
8003 +//vic - this bit copied from m68knommu version
8005 +extern void paging_init(void);
8006 +#define swapper_pg_dir ((pgd_t *) 0)
8008 +#define __swp_type(x) (0)
8009 +#define __swp_offset(x) (0)
8010 +#define __swp_entry(typ,off) ((swp_entry_t) { ((typ) | ((off) << 7)) })
8011 +#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
8012 +#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
8015 + * pgprot_noncached() is only for infiniband pci support, and a real
8016 + * implementation for RAM would be more complicated.
8018 +#define pgprot_noncached(prot) (prot)
8020 +static inline int pte_file(pte_t pte) { return 0; }
8023 + * ZERO_PAGE is a global shared page that is always zero: used
8024 + * for zero-mapped memory areas etc..
8026 +#define ZERO_PAGE(vaddr) (virt_to_page(0))
8028 +extern unsigned int kobjsize(const void *objp);
8029 +extern int is_in_rom(unsigned long);
8032 + * No page table caches to initialise
8034 +#define pgtable_cache_init() do { } while (0)
8036 +#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
8037 + remap_pfn_range(vma, vaddr, pfn, size, prot)
8039 +extern inline void flush_cache_mm(struct mm_struct *mm)
8043 +extern inline void flush_cache_range(struct mm_struct *mm,
8044 + unsigned long start,
8045 + unsigned long end)
8049 +/* Push the page at kernel virtual address and clear the icache */
8050 +extern inline void flush_page_to_ram (unsigned long address)
8054 +/* Push n pages at kernel virtual address and clear the icache */
8055 +extern inline void flush_pages_to_ram (unsigned long address, int n)
8060 + * All 32bit addresses are effectively valid for vmalloc...
8061 + * Sort of meaningless for non-VM targets.
8063 +#define VMALLOC_START 0
8064 +#define VMALLOC_END 0xffffffff
8066 +#define arch_enter_lazy_mmu_mode() do {} while (0)
8067 +#define arch_leave_lazy_mmu_mode() do {} while (0)
8068 +#define arch_flush_lazy_mmu_mode() do {} while (0)
8069 +#define arch_enter_lazy_cpu_mode() do {} while (0)
8070 +#define arch_leave_lazy_cpu_mode() do {} while (0)
8071 +#define arch_flush_lazy_cpu_mode() do {} while (0)
8073 +#endif /* _ASM_UBICOM32_PGTABLE_H */
8074 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/poll.h linux-2.6.28.10/arch/ubicom32/include/asm/poll.h
8075 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/poll.h 1970-01-01 02:00:00.000000000 +0200
8076 +++ linux-2.6.28.10/arch/ubicom32/include/asm/poll.h 2009-08-06 10:31:02.000000000 +0300
8079 + * arch/ubicom32/include/asm/poll.h
8080 + * Ubicom32 specific poll() related flags definitions.
8082 + * (C) Copyright 2009, Ubicom, Inc.
8084 + * This file is part of the Ubicom32 Linux Kernel Port.
8086 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
8087 + * it and/or modify it under the terms of the GNU General Public License
8088 + * as published by the Free Software Foundation, either version 2 of the
8089 + * License, or (at your option) any later version.
8091 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
8092 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
8093 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
8094 + * the GNU General Public License for more details.
8096 + * You should have received a copy of the GNU General Public License
8097 + * along with the Ubicom32 Linux Kernel Port. If not,
8098 + * see <http://www.gnu.org/licenses/>.
8100 + * Ubicom32 implementation derived from (with many thanks):
8105 +#ifndef _ASM_UBICOM32_POLL_H
8106 +#define _ASM_UBICOM32_POLL_H
8108 +#define POLLWRNORM POLLOUT
8109 +#define POLLWRBAND 0x0100
8111 +#include <asm-generic/poll.h>
8113 +#endif /* _ASM_UBICOM32_POLL_H */
8114 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/posix_types.h linux-2.6.28.10/arch/ubicom32/include/asm/posix_types.h
8115 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/posix_types.h 1970-01-01 02:00:00.000000000 +0200
8116 +++ linux-2.6.28.10/arch/ubicom32/include/asm/posix_types.h 2009-08-06 10:31:02.000000000 +0300
8119 + * arch/ubicom32/include/asm/posix_types.h
8120 + * Ubicom32 architecture posix types.
8122 + * (C) Copyright 2009, Ubicom, Inc.
8123 + * Copyright (C) 2004 Microtronix Datacom Ltd
8125 + * This file is part of the Ubicom32 Linux Kernel Port.
8127 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
8128 + * it and/or modify it under the terms of the GNU General Public License
8129 + * as published by the Free Software Foundation, either version 2 of the
8130 + * License, or (at your option) any later version.
8132 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
8133 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
8134 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
8135 + * the GNU General Public License for more details.
8137 + * You should have received a copy of the GNU General Public License
8138 + * along with the Ubicom32 Linux Kernel Port. If not,
8139 + * see <http://www.gnu.org/licenses/>.
8141 + * Ubicom32 implementation derived from (with many thanks):
8146 +#ifndef __ARCH_UBICOM32_POSIX_TYPES_H
8147 +#define __ARCH_UBICOM32_POSIX_TYPES_H
8150 + * This file is generally used by user-level software, so you need to
8151 + * be a little careful about namespace pollution etc. Also, we cannot
8152 + * assume GCC is being used.
8155 +typedef unsigned long __kernel_ino_t;
8156 +typedef unsigned short __kernel_mode_t;
8157 +typedef unsigned short __kernel_nlink_t;
8158 +typedef long __kernel_off_t;
8159 +typedef int __kernel_pid_t;
8160 +typedef unsigned short __kernel_ipc_pid_t;
8161 +typedef unsigned short __kernel_uid_t;
8162 +typedef unsigned short __kernel_gid_t;
8163 +typedef unsigned int __kernel_size_t;
8164 +typedef int __kernel_ssize_t;
8165 +typedef int __kernel_ptrdiff_t;
8166 +typedef long __kernel_time_t;
8167 +typedef long __kernel_suseconds_t;
8168 +typedef long __kernel_clock_t;
8169 +typedef int __kernel_timer_t;
8170 +typedef int __kernel_clockid_t;
8171 +typedef int __kernel_daddr_t;
8172 +typedef char * __kernel_caddr_t;
8173 +typedef unsigned short __kernel_uid16_t;
8174 +typedef unsigned short __kernel_gid16_t;
8175 +typedef unsigned int __kernel_uid32_t;
8176 +typedef unsigned int __kernel_gid32_t;
8178 +typedef unsigned short __kernel_old_uid_t;
8179 +typedef unsigned short __kernel_old_gid_t;
8180 +typedef unsigned short __kernel_old_dev_t;
8183 +typedef long long __kernel_loff_t;
8187 +#if defined(__KERNEL__) || defined(__USE_ALL)
8189 +#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
8191 +#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
8194 +#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
8197 +#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
8200 +#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
8203 +#define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))
8206 +#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
8208 +#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
8211 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/processor.h linux-2.6.28.10/arch/ubicom32/include/asm/processor.h
8212 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/processor.h 1970-01-01 02:00:00.000000000 +0200
8213 +++ linux-2.6.28.10/arch/ubicom32/include/asm/processor.h 2009-08-06 10:31:02.000000000 +0300
8216 + * arch/ubicom32/include/asm/processor.h
8217 + * Thread related definitions for Ubicom32 architecture.
8219 + * (C) Copyright 2009, Ubicom, Inc.
8220 + * Copyright (C) 1995 Hamish Macdonald
8222 + * This file is part of the Ubicom32 Linux Kernel Port.
8224 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
8225 + * it and/or modify it under the terms of the GNU General Public License
8226 + * as published by the Free Software Foundation, either version 2 of the
8227 + * License, or (at your option) any later version.
8229 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
8230 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
8231 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
8232 + * the GNU General Public License for more details.
8234 + * You should have received a copy of the GNU General Public License
8235 + * along with the Ubicom32 Linux Kernel Port. If not,
8236 + * see <http://www.gnu.org/licenses/>.
8238 + * Ubicom32 implementation derived from (with many thanks):
8244 +#ifndef _ASM_UBICOM32_PROCESSOR_H
8245 +#define _ASM_UBICOM32_PROCESSOR_H
8248 + * Default implementation of macro that returns current
8249 + * instruction pointer ("program counter").
8251 +#define current_text_addr() ({ __label__ _l; _l: &&_l;})
8253 +#include <linux/compiler.h>
8254 +#include <linux/threads.h>
8255 +#include <asm/types.h>
8256 +#include <asm/segment.h>
8257 +#include <asm/fpu.h>
8258 +#include <asm/ptrace.h>
8259 +#include <asm/current.h>
8260 +#include <asm/thread_info.h>
8262 +#if defined(CONFIG_UBICOM32_V3)
8263 + #define CPU "IP5K"
8265 +#if defined(CONFIG_UBICOM32_V4)
8266 + #define CPU "IP7K"
8269 + #define CPU "UNKNOWN"
8273 + * User space process size: 1st byte beyond user address space.
8275 +extern unsigned long memory_end;
8276 +#define TASK_SIZE (memory_end)
8279 + * This decides where the kernel will search for a free chunk of vm
8280 + * space during mmap's. We won't be using it
8282 +#define TASK_UNMAPPED_BASE 0
8285 + * This is the structure where we are going to save callee-saved registers.
8286 + * A5 is the return address, A7 is the stack pointer, A6 is the frame
8287 + * pointer. This is the frame that is created because of switch_to. This
8288 + * is not the frame due to interrupt preemption or because of syscall entry.
8291 +struct thread_struct {
8292 + unsigned long d10; /* D10 */
8293 + unsigned long d11; /* D11 */
8294 + unsigned long d12; /* D12 */
8295 + unsigned long d13; /* D13 */
8296 + unsigned long a1; /* A1 */
8297 + unsigned long a2; /* A2 */
8298 + unsigned long a5; /* A5 return address. */
8299 + unsigned long a6; /* A6 */
8300 + unsigned long sp; /* A7 kernel stack pointer. */
8303 +#define INIT_THREAD { \
8304 + 0, 0, 0, 0, 0, 0, 0, 0, \
8305 + sizeof(init_stack) + (unsigned long) init_stack - 8, \
8309 + * Do necessary setup to start up a newly executed thread.
8311 + * pass the data segment into user programs if it exists,
8312 + * it can't hurt anything as far as I can tell
8315 + * Do necessary setup to start up a newly executed thread.
8317 +#define start_thread(regs, new_pc, new_sp) \
8319 + regs->pc = new_pc & ~3; \
8320 + regs->an[5] = new_pc & ~3; \
8321 + regs->an[7] = new_sp; \
8322 + regs->nesting_level = -1; \
8323 + regs->frame_type = UBICOM32_FRAME_TYPE_NEW_THREAD; \
8324 + regs->thread_type = NORMAL_THREAD; \
8327 +/* Forward declaration, a strange C thing */
8328 +struct task_struct;
8330 +/* Free all resources held by a thread. */
8331 +static inline void release_thread(struct task_struct *dead_task)
8335 +/* Prepare to copy thread state - unlazy all lazy status */
8336 +#define prepare_to_copy(tsk) do { } while (0)
8338 +extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
8341 + * Free current thread data structures etc..
8343 +static inline void exit_thread(void)
8347 +unsigned long thread_saved_pc(struct task_struct *tsk);
8348 +unsigned long get_wchan(struct task_struct *p);
8350 +#define KSTK_EIP(tsk) (tsk->thread.a5)
8351 +#define KSTK_ESP(tsk) (tsk->thread.sp)
8353 +#define cpu_relax() barrier()
8355 +extern void processor_init(void);
8356 +extern unsigned int processor_timers(void);
8357 +extern unsigned int processor_threads(void);
8358 +extern unsigned int processor_frequency(void);
8359 +extern int processor_interrupts(unsigned int *int0, unsigned int *int1);
8360 +extern int processor_ocm(void **socm, void **eocm);
8361 +extern int processor_dram(void **sdram, void **edram);
8363 +#define THREAD_SIZE_LONGS (THREAD_SIZE/sizeof(unsigned long))
8364 +#define KSTK_TOP(info) \
8366 + unsigned long *__ptr = (unsigned long *)(info); \
8367 + (unsigned long)(&__ptr[THREAD_SIZE_LONGS]); \
8370 +#define task_pt_regs(task) \
8372 + struct pt_regs *__regs__; \
8373 + __regs__ = (struct pt_regs *)(KSTK_TOP(task_stack_page(task))-8); \
8377 +#endif /* _ASM_UBICOM32_PROCESSOR_H */
8378 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/ptrace.h linux-2.6.28.10/arch/ubicom32/include/asm/ptrace.h
8379 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/ptrace.h 1970-01-01 02:00:00.000000000 +0200
8380 +++ linux-2.6.28.10/arch/ubicom32/include/asm/ptrace.h 2009-08-06 10:31:02.000000000 +0300
8383 + * arch/ubicom32/include/asm/ptrace.h
8384 + * Ubicom32 architecture ptrace support.
8386 + * (C) Copyright 2009, Ubicom, Inc.
8388 + * This file is part of the Ubicom32 Linux Kernel Port.
8390 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
8391 + * it and/or modify it under the terms of the GNU General Public License
8392 + * as published by the Free Software Foundation, either version 2 of the
8393 + * License, or (at your option) any later version.
8395 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
8396 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
8397 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
8398 + * the GNU General Public License for more details.
8400 + * You should have received a copy of the GNU General Public License
8401 + * along with the Ubicom32 Linux Kernel Port. If not,
8402 + * see <http://www.gnu.org/licenses/>.
8404 + * Ubicom32 implementation derived from (with many thanks):
8409 +#ifndef _ASM_UBICOM32_PTRACE_H
8410 +#define _ASM_UBICOM32_PTRACE_H
8412 +#ifndef __ASSEMBLY__
8415 + * We use hard coded constants because this is shared with user
8416 + * space and the values are NOT allowed to change. Only fields
8417 + * that are intended to be exposed get values.
8444 +#define PT_ACC0HI 96
8445 +#define PT_ACC0LO 100
8446 +#define PT_MAC_RC16 104
8447 +#define PT_ACC1HI 108
8448 +#define PT_ACC1LO 112
8449 +#define PT_SOURCE3 116
8450 +#define PT_INST_CNT 120
8452 +#define PT_DUMMY_UNUSED 128
8453 +#define PT_INT_MASK0 132
8454 +#define PT_INT_MASK1 136
8455 +#define PT_TRAP_CAUSE 140
8457 +#define PT_ORIGINAL_D0 148
8458 +#define PT_FRAME_TYPE 152
8461 + * The following 'registers' are not registers at all but are used
8462 + * locate the relocated sections.
8464 +#define PT_TEXT_ADDR 200
8465 +#define PT_TEXT_END_ADDR 204
8466 +#define PT_DATA_ADDR 208
8467 +#define PT_EXEC_FDPIC_LOADMAP 212
8468 +#define PT_INTERP_FDPIC_LOADMAP 216
8471 + * This struct defines the way the registers are stored on the
8472 + * stack during a system call.
8479 +#define UBICOM32_FRAME_TYPE_SYSCALL -1 /* System call frame */
8480 +#define UBICOM32_FRAME_TYPE_INVALID 0 /* Invalid frame, no longer in use */
8481 +#define UBICOM32_FRAME_TYPE_INTERRUPT 1 /* Interrupt frame */
8482 +#define UBICOM32_FRAME_TYPE_TRAP 2 /* Trap frame */
8483 +#define UBICOM32_FRAME_TYPE_SIGTRAMP 3 /* Signal trampoline frame. */
8484 +#define UBICOM32_FRAME_TYPE_NEW_THREAD 4 /* New Thread. */
8490 + unsigned long dn[16];
8493 + * Address Registers
8495 + unsigned long an[8];
8498 + * Per thread misc registers.
8500 + unsigned long acc0[2];
8501 + unsigned long mac_rc16;
8502 + unsigned long acc1[2];
8503 + unsigned long source3;
8504 + unsigned long inst_cnt;
8505 + unsigned long csr;
8506 + unsigned long dummy_unused;
8507 + unsigned long int_mask0;
8508 + unsigned long int_mask1;
8509 + unsigned long trap_cause;
8511 + unsigned long original_dn_0;
8514 + * Frame type. Syscall frames are -1. For other types look above.
8516 + unsigned long frame_type;
8519 + * These fields are not exposed to ptrace.
8521 + unsigned long previous_pc;
8522 + long nesting_level; /* When the kernel in in user space this
8524 + unsigned long thread_type; /* This indicates if this is a kernel
8529 + * This is the extended stack used by signal handlers and the context
8530 + * switcher: it's pushed after the normal "struct pt_regs".
8532 +struct switch_stack {
8533 + unsigned long dummy;
8538 +/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
8539 +#define PTRACE_GETREGS 12
8540 +#define PTRACE_SETREGS 13
8543 +#define PS_S (0x2000)
8544 +#define PS_M (0x1000)
8547 +extern int __user_mode(unsigned long sp);
8549 +#define user_mode(regs) (__user_mode((regs->an[7])))
8550 +#define user_stack(regs) ((regs)->an[7])
8551 +#define instruction_pointer(regs) ((regs)->pc)
8552 +#define profile_pc(regs) instruction_pointer(regs)
8553 +extern void show_regs(struct pt_regs *);
8554 +#endif /* __KERNEL__ */
8556 +#endif /* __ASSEMBLY__ */
8558 +#endif /* _ASM_UBICOM32_PTRACE_H */
8559 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/range-protect-asm.h linux-2.6.28.10/arch/ubicom32/include/asm/range-protect-asm.h
8560 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/range-protect-asm.h 1970-01-01 02:00:00.000000000 +0200
8561 +++ linux-2.6.28.10/arch/ubicom32/include/asm/range-protect-asm.h 2009-08-06 10:31:02.000000000 +0300
8564 + * arch/ubicom32/include/asm/range-protect-asm.h
8565 + * Assembly macros for enabling memory protection.
8567 + * (C) Copyright 2009, Ubicom, Inc.
8569 + * This file is part of the Ubicom32 Linux Kernel Port.
8571 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
8572 + * it and/or modify it under the terms of the GNU General Public License
8573 + * as published by the Free Software Foundation, either version 2 of the
8574 + * License, or (at your option) any later version.
8576 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
8577 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
8578 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
8579 + * the GNU General Public License for more details.
8581 + * You should have received a copy of the GNU General Public License
8582 + * along with the Ubicom32 Linux Kernel Port. If not,
8583 + * see <http://www.gnu.org/licenses/>.
8585 + * Ubicom32 implementation derived from (with many thanks):
8591 +#ifndef _ASM_UBICOM32_RANGE_PROTECT_ASM_H
8592 +#define _ASM_UBICOM32_RANGE_PROTECT_ASM_H
8594 +#if defined(__ASSEMBLY__)
8596 +#include <asm/thread-asm.h>
8599 + * You should only use the enable/disable ranges when you have the atomic lock,
8600 + * if you do not there will be problems.
8604 + * enable_kernel_ranges
8605 + * Enable the kernel ranges (disabling protection) for thread,
8606 + * where thread == (1 << thread number)
8608 +.macro enable_kernel_ranges thread
8609 +#ifdef CONFIG_PROTECT_KERNEL
8610 + or.4 I_RANGE0_EN, I_RANGE0_EN, \thread /* Enable Range Register */
8611 + or.4 D_RANGE0_EN, D_RANGE0_EN, \thread
8612 + or.4 D_RANGE1_EN, D_RANGE1_EN, \thread
8617 + * enable_kernel_ranges_for_current
8618 + * Enable the kernel ranges (disabling protection) for this thread
8620 +.macro enable_kernel_ranges_for_current scratch_reg
8621 +#ifdef CONFIG_PROTECT_KERNEL
8622 + thread_get_self_mask \scratch_reg
8623 + enable_kernel_ranges \scratch_reg
8628 + * disable_kernel_ranges
8629 + * Disables the kernel ranges (enabling protection) for thread
8630 + * where thread == (1 << thread number)
8632 +.macro disable_kernel_ranges thread
8633 +#ifdef CONFIG_PROTECT_KERNEL
8634 + not.4 \thread, \thread
8635 + and.4 I_RANGE0_EN, I_RANGE0_EN, \thread /* Disable Range Register */
8636 + and.4 D_RANGE0_EN, D_RANGE0_EN, \thread
8637 + and.4 D_RANGE1_EN, D_RANGE1_EN, \thread
8642 + * disable_kernel_ranges_for_current
8643 + * Disable kernel ranges (enabling protection) for this thread
8645 +.macro disable_kernel_ranges_for_current scratch_reg
8646 +#ifdef CONFIG_PROTECT_KERNEL
8647 + thread_get_self_mask \scratch_reg
8648 + disable_kernel_ranges \scratch_reg
8653 +#endif /* _ASM_UBICOM32_RANGE_PROTECT_ASM_H */
8654 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/range-protect.h linux-2.6.28.10/arch/ubicom32/include/asm/range-protect.h
8655 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/range-protect.h 1970-01-01 02:00:00.000000000 +0200
8656 +++ linux-2.6.28.10/arch/ubicom32/include/asm/range-protect.h 2009-08-06 10:31:02.000000000 +0300
8659 + * arch/ubicom32/include/asm/range-protect.h
8660 + * Assembly macros declared in C for enabling memory protection.
8662 + * (C) Copyright 2009, Ubicom, Inc.
8664 + * This file is part of the Ubicom32 Linux Kernel Port.
8666 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
8667 + * it and/or modify it under the terms of the GNU General Public License
8668 + * as published by the Free Software Foundation, either version 2 of the
8669 + * License, or (at your option) any later version.
8671 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
8672 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
8673 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
8674 + * the GNU General Public License for more details.
8676 + * You should have received a copy of the GNU General Public License
8677 + * along with the Ubicom32 Linux Kernel Port. If not,
8678 + * see <http://www.gnu.org/licenses/>.
8680 + * Ubicom32 implementation derived from (with many thanks):
8686 +#ifndef _ASM_UBICOM32_RANGE_PROTECT_H
8687 +#define _ASM_UBICOM32_RANGE_PROTECT_H
8689 +#if !defined(__ASSEMBLY__)
8690 +#include <asm/thread.h>
8692 + * The following macros should be the identical to the ones in
8693 + * range-protect-asm.h
8695 + * You should only use the enable/disable ranges when you have the atomic lock,
8696 + * if you do not there will be problems.
8700 + * enable_kernel_ranges
8701 + * Enable the kernel ranges (disabling protection) for thread,
8702 + * where thread == (1 << thread number)
8705 + ".macro enable_kernel_ranges thread \n\t"
8706 +#ifdef CONFIG_PROTECT_KERNEL
8707 + " or.4 I_RANGE0_EN, I_RANGE0_EN, \\thread \n\t" /* Enable Range Register */
8708 + " or.4 D_RANGE0_EN, D_RANGE0_EN, \\thread \n\t"
8709 + " or.4 D_RANGE1_EN, D_RANGE1_EN, \\thread \n\t"
8714 +#else /* __ASSEMBLY__ */
8716 +#include <asm/range-protect-asm.h>
8719 +#endif /* _ASM_UBICOM32_RANGE_PROTECT_H */
8720 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/resource.h linux-2.6.28.10/arch/ubicom32/include/asm/resource.h
8721 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/resource.h 1970-01-01 02:00:00.000000000 +0200
8722 +++ linux-2.6.28.10/arch/ubicom32/include/asm/resource.h 2009-08-06 10:31:02.000000000 +0300
8725 + * arch/ubicom32/include/asm/resource.h
8726 + * Generic definitions for Ubicom32 architecture.
8728 + * (C) Copyright 2009, Ubicom, Inc.
8730 + * This file is part of the Ubicom32 Linux Kernel Port.
8732 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
8733 + * it and/or modify it under the terms of the GNU General Public License
8734 + * as published by the Free Software Foundation, either version 2 of the
8735 + * License, or (at your option) any later version.
8737 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
8738 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
8739 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
8740 + * the GNU General Public License for more details.
8742 + * You should have received a copy of the GNU General Public License
8743 + * along with the Ubicom32 Linux Kernel Port. If not,
8744 + * see <http://www.gnu.org/licenses/>.
8746 + * Ubicom32 implementation derived from (with many thanks):
8751 +#ifndef _ASM_UBICOM32_RESOURCE_H
8752 +#define _ASM_UBICOM32_RESOURCE_H
8754 +#include <asm-generic/resource.h>
8756 +#endif /* _ASM_UBICOM32_RESOURCE_H */
8757 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/ring_tio.h linux-2.6.28.10/arch/ubicom32/include/asm/ring_tio.h
8758 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/ring_tio.h 1970-01-01 02:00:00.000000000 +0200
8759 +++ linux-2.6.28.10/arch/ubicom32/include/asm/ring_tio.h 2009-08-06 10:31:02.000000000 +0300
8762 + * arch/ubicom32/include/asm/ring_tio.h
8763 + * Ubicom32 architecture Ring TIO definitions.
8765 + * (C) Copyright 2009, Ubicom, Inc.
8767 + * This file is part of the Ubicom32 Linux Kernel Port.
8769 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
8770 + * it and/or modify it under the terms of the GNU General Public License
8771 + * as published by the Free Software Foundation, either version 2 of the
8772 + * License, or (at your option) any later version.
8774 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
8775 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
8776 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
8777 + * the GNU General Public License for more details.
8779 + * You should have received a copy of the GNU General Public License
8780 + * along with the Ubicom32 Linux Kernel Port. If not,
8781 + * see <http://www.gnu.org/licenses/>.
8783 +#ifndef _ASM_UBICOM32_RING_TIO_H
8784 +#define _ASM_UBICOM32_RING_TIO_H
8786 +#include <asm/devtree.h>
8788 +#define RING_TIO_NODE_VERSION 2
8791 + * Devtree node for ring
8793 +struct ring_tio_node {
8794 + struct devtree_node dn;
8800 +extern void ring_tio_init(const char *node_name);
8802 +#endif /* _ASM_UBICOM32_RING_TIO_H */
8803 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/scatterlist.h linux-2.6.28.10/arch/ubicom32/include/asm/scatterlist.h
8804 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/scatterlist.h 1970-01-01 02:00:00.000000000 +0200
8805 +++ linux-2.6.28.10/arch/ubicom32/include/asm/scatterlist.h 2009-08-06 10:31:02.000000000 +0300
8808 + * arch/ubicom32/include/asm/scatterlist.h
8809 + * Definitions of struct scatterlist for Ubicom32 architecture.
8811 + * (C) Copyright 2009, Ubicom, Inc.
8813 + * This file is part of the Ubicom32 Linux Kernel Port.
8815 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
8816 + * it and/or modify it under the terms of the GNU General Public License
8817 + * as published by the Free Software Foundation, either version 2 of the
8818 + * License, or (at your option) any later version.
8820 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
8821 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
8822 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
8823 + * the GNU General Public License for more details.
8825 + * You should have received a copy of the GNU General Public License
8826 + * along with the Ubicom32 Linux Kernel Port. If not,
8827 + * see <http://www.gnu.org/licenses/>.
8829 + * Ubicom32 implementation derived from (with many thanks):
8834 +#ifndef _ASM_UBICOM32_SCATTERLIST_H
8835 +#define _ASM_UBICOM32_SCATTERLIST_H
8837 +#include <linux/mm.h>
8838 +#include <asm/types.h>
8840 +struct scatterlist {
8841 +#ifdef CONFIG_DEBUG_SG
8842 + unsigned long sg_magic;
8844 + unsigned long page_link;
8845 + unsigned int offset;
8846 + dma_addr_t dma_address;
8847 + unsigned int length;
8850 +#define sg_dma_address(sg) ((sg)->dma_address)
8851 +#define sg_dma_len(sg) ((sg)->length)
8853 +#define ISA_DMA_THRESHOLD (0xffffffff)
8855 +#endif /* _ASM_UBICOM32_SCATTERLIST_H */
8856 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/sections.h linux-2.6.28.10/arch/ubicom32/include/asm/sections.h
8857 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/sections.h 1970-01-01 02:00:00.000000000 +0200
8858 +++ linux-2.6.28.10/arch/ubicom32/include/asm/sections.h 2009-08-06 10:31:02.000000000 +0300
8861 + * arch/ubicom32/include/asm/sections.h
8862 + * Generic sections.h definitions for Ubicom32 architecture.
8864 + * (C) Copyright 2009, Ubicom, Inc.
8866 + * This file is part of the Ubicom32 Linux Kernel Port.
8868 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
8869 + * it and/or modify it under the terms of the GNU General Public License
8870 + * as published by the Free Software Foundation, either version 2 of the
8871 + * License, or (at your option) any later version.
8873 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
8874 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
8875 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
8876 + * the GNU General Public License for more details.
8878 + * You should have received a copy of the GNU General Public License
8879 + * along with the Ubicom32 Linux Kernel Port. If not,
8880 + * see <http://www.gnu.org/licenses/>.
8882 + * Ubicom32 implementation derived from (with many thanks):
8887 +#ifndef _ASM_UBICOM32_SECTIONS_H
8888 +#define _ASM_UBICOM32_SECTIONS_H
8890 +#include <asm-generic/sections.h>
8892 +#endif /* _ASM_UBICOM32_SECTIONS_H */
8893 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/segment.h linux-2.6.28.10/arch/ubicom32/include/asm/segment.h
8894 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/segment.h 1970-01-01 02:00:00.000000000 +0200
8895 +++ linux-2.6.28.10/arch/ubicom32/include/asm/segment.h 2009-08-06 10:31:02.000000000 +0300
8898 + * arch/ubicom32/include/asm/segment.h
8899 + * Memory segment definitions for Ubicom32 architecture.
8901 + * (C) Copyright 2009, Ubicom, Inc.
8903 + * This file is part of the Ubicom32 Linux Kernel Port.
8905 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
8906 + * it and/or modify it under the terms of the GNU General Public License
8907 + * as published by the Free Software Foundation, either version 2 of the
8908 + * License, or (at your option) any later version.
8910 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
8911 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
8912 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
8913 + * the GNU General Public License for more details.
8915 + * You should have received a copy of the GNU General Public License
8916 + * along with the Ubicom32 Linux Kernel Port. If not,
8917 + * see <http://www.gnu.org/licenses/>.
8919 + * Ubicom32 implementation derived from (with many thanks):
8924 +#ifndef _ASM_UBICOM32_SEGMENT_H
8925 +#define _ASM_UBICOM32_SEGMENT_H
8927 +/* define constants */
8928 +/* Address spaces (FC0-FC2) */
8929 +#define USER_DATA (1)
8931 +#define __USER_DS (USER_DATA)
8933 +#define USER_PROGRAM (2)
8934 +#define SUPER_DATA (5)
8935 +#ifndef __KERNEL_DS
8936 +#define __KERNEL_DS (SUPER_DATA)
8938 +#define SUPER_PROGRAM (6)
8939 +#define CPU_SPACE (7)
8941 +#ifndef __ASSEMBLY__
8944 + unsigned long seg;
8947 +#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
8948 +#define USER_DS MAKE_MM_SEG(__USER_DS)
8949 +#define KERNEL_DS MAKE_MM_SEG(__KERNEL_DS)
8952 + * Get/set the SFC/DFC registers for MOVES instructions
8955 +static inline mm_segment_t get_fs(void)
8960 +static inline mm_segment_t get_ds(void)
8962 + /* return the supervisor data space code */
8966 +static inline void set_fs(mm_segment_t val)
8970 +#define segment_eq(a,b) ((a).seg == (b).seg)
8972 +#endif /* __ASSEMBLY__ */
8974 +#endif /* _ASM_UBICOM32_SEGMENT_H */
8975 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/semaphore.h linux-2.6.28.10/arch/ubicom32/include/asm/semaphore.h
8976 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/semaphore.h 1970-01-01 02:00:00.000000000 +0200
8977 +++ linux-2.6.28.10/arch/ubicom32/include/asm/semaphore.h 2009-08-06 10:31:02.000000000 +0300
8980 + * arch/ubicom32/include/asm/semaphore.h
8981 + * Interrupt-safe semaphores for Ubicom32 architecture.
8983 + * (C) Copyright 2009, Ubicom, Inc.
8984 + * (C) Copyright 1996 Linus Torvalds
8985 + * m68k version by Andreas Schwab
8986 + * Copyright (C) 2004 Microtronix Datacom Ltd
8988 + * This file is part of the Ubicom32 Linux Kernel Port.
8990 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
8991 + * it and/or modify it under the terms of the GNU General Public License
8992 + * as published by the Free Software Foundation, either version 2 of the
8993 + * License, or (at your option) any later version.
8995 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
8996 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
8997 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
8998 + * the GNU General Public License for more details.
9000 + * You should have received a copy of the GNU General Public License
9001 + * along with the Ubicom32 Linux Kernel Port. If not,
9002 + * see <http://www.gnu.org/licenses/>.
9004 + * Ubicom32 implementation derived from (with many thanks):
9009 +#ifndef _ASM_UBICOM32_SEMAPHORE_H
9010 +#define _ASM_UBICOM32_SEMAPHORE_H
9012 +#define RW_LOCK_BIAS 0x01000000
9014 +#ifndef __ASSEMBLY__
9016 +#include <linux/linkage.h>
9017 +#include <linux/wait.h>
9018 +#include <linux/spinlock.h>
9019 +#include <linux/rwsem.h>
9021 +#include <asm/system.h>
9022 +#include <asm/atomic.h>
9027 + wait_queue_head_t wait;
9030 +#define __SEMAPHORE_INITIALIZER(name, n) \
9032 + .count = ATOMIC_INIT(n), \
9033 + .waking = ATOMIC_INIT(0), \
9034 + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
9037 +#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
9038 + struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
9040 +#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
9041 +#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
9043 +static inline void sema_init (struct semaphore *sem, int val)
9045 + *sem = (struct semaphore)__SEMAPHORE_INITIALIZER(*sem, val);
9048 +static inline void init_MUTEX (struct semaphore *sem)
9050 + sema_init(sem, 1);
9053 +static inline void init_MUTEX_LOCKED (struct semaphore *sem)
9055 + sema_init(sem, 0);
9058 +asmlinkage void __down_failed(void /* special register calling convention */);
9059 +asmlinkage int __down_failed_interruptible(void /* params in registers */);
9060 +asmlinkage int __down_failed_trylock(void /* params in registers */);
9061 +asmlinkage void __up_wakeup(void /* special register calling convention */);
9063 +asmlinkage void __down(struct semaphore * sem);
9064 +asmlinkage int __down_interruptible(struct semaphore * sem);
9065 +asmlinkage int __down_trylock(struct semaphore * sem);
9066 +asmlinkage void __up(struct semaphore * sem);
9068 +extern spinlock_t semaphore_wake_lock;
9071 + * This is ugly, but we want the default case to fall through.
9072 + * "down_failed" is a special asm handler that calls the C
9073 + * routine that actually waits.
9075 +static inline void down(struct semaphore * sem)
9079 + if (atomic_dec_return(&sem->count) < 0)
9083 +static inline int down_interruptible(struct semaphore * sem)
9090 + if(atomic_dec_return(&sem->count) < 0)
9091 + ret = __down_interruptible(sem);
9095 +static inline int down_trylock(struct semaphore * sem)
9099 + if (atomic_dec_return (&sem->count) < 0)
9100 + ret = __down_trylock(sem);
9105 + * Note! This is subtle. We jump to wake people up only if
9106 + * the semaphore was negative (== somebody was waiting on it).
9107 + * The default case (no contention) will result in NO
9108 + * jumps for both down() and up().
9110 +static inline void up(struct semaphore * sem)
9112 + if (atomic_inc_return(&sem->count) <= 0)
9116 +#endif /* __ASSEMBLY__ */
9118 +#endif /* _ASM_UBICOM32_SEMAPHORE_H */
9119 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/semaphore-helper.h linux-2.6.28.10/arch/ubicom32/include/asm/semaphore-helper.h
9120 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/semaphore-helper.h 1970-01-01 02:00:00.000000000 +0200
9121 +++ linux-2.6.28.10/arch/ubicom32/include/asm/semaphore-helper.h 2009-08-06 10:31:02.000000000 +0300
9124 + * arch/ubicom32/include/asm/semaphore-helper.h
9125 + * Semaphore related definitions for Ubicom32 architecture.
9127 + * (C) Copyright 2009, Ubicom, Inc.
9129 + * This file is part of the Ubicom32 Linux Kernel Port.
9131 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
9132 + * it and/or modify it under the terms of the GNU General Public License
9133 + * as published by the Free Software Foundation, either version 2 of the
9134 + * License, or (at your option) any later version.
9136 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
9137 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
9138 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
9139 + * the GNU General Public License for more details.
9141 + * You should have received a copy of the GNU General Public License
9142 + * along with the Ubicom32 Linux Kernel Port. If not,
9143 + * see <http://www.gnu.org/licenses/>.
9145 + * Ubicom32 implementation derived from (with many thanks):
9150 +#ifndef _ASM_UBICOM32_SEMAPHORE_HELPER_H
9151 +#define _ASM_UBICOM32_SEMAPHORE_HELPER_H
9154 + * SMP- and interrupt-safe semaphores helper functions.
9156 + * (C) Copyright 1996 Linus Torvalds
9158 + * m68k version by Andreas Schwab
9163 + * These two _must_ execute atomically wrt each other.
9165 +static inline void wake_one_more(struct semaphore * sem)
9167 + atomic_inc(&sem->waking);
9170 +static inline int waking_non_zero(struct semaphore *sem)
9173 + unsigned long flags;
9175 + spin_lock_irqsave(&semaphore_wake_lock, flags);
9177 + if (atomic_read(&sem->waking) > 0) {
9178 + atomic_dec(&sem->waking);
9181 + spin_unlock_irqrestore(&semaphore_wake_lock, flags);
9186 + * waking_non_zero_interruptible:
9189 + * -EINTR interrupted
9191 +static inline int waking_non_zero_interruptible(struct semaphore *sem,
9192 + struct task_struct *tsk)
9195 + unsigned long flags;
9197 + spin_lock_irqsave(&semaphore_wake_lock, flags);
9199 + if (atomic_read(&sem->waking) > 0) {
9200 + atomic_dec(&sem->waking);
9202 + } else if (signal_pending(tsk)) {
9203 + atomic_inc(&sem->count);
9206 + spin_unlock_irqrestore(&semaphore_wake_lock, flags);
9211 + * waking_non_zero_trylock:
9212 + * 1 failed to lock
9215 +static inline int waking_non_zero_trylock(struct semaphore *sem)
9218 + unsigned long flags;
9220 + spin_lock_irqsave(&semaphore_wake_lock, flags);
9222 + if (atomic_read(&sem->waking) > 0) {
9223 + atomic_dec(&sem->waking);
9226 + atomic_inc(&sem->count);
9227 + spin_unlock_irqrestore(&semaphore_wake_lock, flags);
9231 +#endif /* _ASM_UBICOM32_SEMAPHORE_HELPER_H */
9232 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/sembuf.h linux-2.6.28.10/arch/ubicom32/include/asm/sembuf.h
9233 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/sembuf.h 1970-01-01 02:00:00.000000000 +0200
9234 +++ linux-2.6.28.10/arch/ubicom32/include/asm/sembuf.h 2009-08-06 10:31:02.000000000 +0300
9237 + * arch/ubicom32/include/asm/sembuf.h
9238 + * The semid64_ds structure for Ubicom32 architecture.
9240 + * (C) Copyright 2009, Ubicom, Inc.
9242 + * This file is part of the Ubicom32 Linux Kernel Port.
9244 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
9245 + * it and/or modify it under the terms of the GNU General Public License
9246 + * as published by the Free Software Foundation, either version 2 of the
9247 + * License, or (at your option) any later version.
9249 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
9250 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
9251 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
9252 + * the GNU General Public License for more details.
9254 + * You should have received a copy of the GNU General Public License
9255 + * along with the Ubicom32 Linux Kernel Port. If not,
9256 + * see <http://www.gnu.org/licenses/>.
9258 + * Ubicom32 implementation derived from (with many thanks):
9263 +#ifndef _ASM_UBICOM32_SEMBUF_H
9264 +#define _ASM_UBICOM32_SEMBUF_H
9267 + * The semid64_ds structure for ubicom32 architecture.
9268 + * Note extra padding because this structure is passed back and forth
9269 + * between kernel and user space.
9271 + * Pad space is left for:
9272 + * - 64-bit time_t to solve y2038 problem
9273 + * - 2 miscellaneous 32-bit values
9276 +struct semid64_ds {
9277 + struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
9278 + __kernel_time_t sem_otime; /* last semop time */
9279 + unsigned long __unused1;
9280 + __kernel_time_t sem_ctime; /* last change time */
9281 + unsigned long __unused2;
9282 + unsigned long sem_nsems; /* no. of semaphores in array */
9283 + unsigned long __unused3;
9284 + unsigned long __unused4;
9287 +#endif /* _ASM_UBICOM32_SEMBUF_H */
9288 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/setup.h linux-2.6.28.10/arch/ubicom32/include/asm/setup.h
9289 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/setup.h 1970-01-01 02:00:00.000000000 +0200
9290 +++ linux-2.6.28.10/arch/ubicom32/include/asm/setup.h 2009-08-06 10:31:02.000000000 +0300
9293 + * arch/ubicom32/include/asm/setup.h
9294 + * Kernel command line length definition.
9296 + * (C) Copyright 2009, Ubicom, Inc.
9297 + * Copyright (C) 2004, Microtronix Datacom Ltd., All rights reserved.
9299 + * This file is part of the Ubicom32 Linux Kernel Port.
9301 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
9302 + * it and/or modify it under the terms of the GNU General Public License
9303 + * as published by the Free Software Foundation, either version 2 of the
9304 + * License, or (at your option) any later version.
9306 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
9307 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
9308 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
9309 + * the GNU General Public License for more details.
9311 + * You should have received a copy of the GNU General Public License
9312 + * along with the Ubicom32 Linux Kernel Port. If not,
9313 + * see <http://www.gnu.org/licenses/>.
9315 + * Ubicom32 implementation derived from (with many thanks):
9321 +#ifndef _ASM_UBICOM32_SETUP_H
9322 +#define _ASM_UBICOM32_SETUP_H
9324 +#define COMMAND_LINE_SIZE 512
9326 +#endif /* _ASM_UBICOM32_SETUP_H */
9327 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/shmbuf.h linux-2.6.28.10/arch/ubicom32/include/asm/shmbuf.h
9328 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/shmbuf.h 1970-01-01 02:00:00.000000000 +0200
9329 +++ linux-2.6.28.10/arch/ubicom32/include/asm/shmbuf.h 2009-08-06 10:31:02.000000000 +0300
9332 + * arch/ubicom32/include/asm/shmbuf.h
9333 + * The shmid64_ds structure for the Ubicom32 architecture.
9335 + * (C) Copyright 2009, Ubicom, Inc.
9337 + * This file is part of the Ubicom32 Linux Kernel Port.
9339 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
9340 + * it and/or modify it under the terms of the GNU General Public License
9341 + * as published by the Free Software Foundation, either version 2 of the
9342 + * License, or (at your option) any later version.
9344 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
9345 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
9346 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
9347 + * the GNU General Public License for more details.
9349 + * You should have received a copy of the GNU General Public License
9350 + * along with the Ubicom32 Linux Kernel Port. If not,
9351 + * see <http://www.gnu.org/licenses/>.
9353 + * Ubicom32 implementation derived from (with many thanks):
9358 +#ifndef _ASM_UBICOM32_SHMBUF_H
9359 +#define _ASM_UBICOM32_SHMBUF_H
9362 + * The shmid64_ds structure for m68k architecture.
9363 + * Note extra padding because this structure is passed back and forth
9364 + * between kernel and user space.
9366 + * Pad space is left for:
9367 + * - 64-bit time_t to solve y2038 problem
9368 + * - 2 miscellaneous 32-bit values
9371 +struct shmid64_ds {
9372 + struct ipc64_perm shm_perm; /* operation perms */
9373 + size_t shm_segsz; /* size of segment (bytes) */
9374 + __kernel_time_t shm_atime; /* last attach time */
9375 + unsigned long __unused1;
9376 + __kernel_time_t shm_dtime; /* last detach time */
9377 + unsigned long __unused2;
9378 + __kernel_time_t shm_ctime; /* last change time */
9379 + unsigned long __unused3;
9380 + __kernel_pid_t shm_cpid; /* pid of creator */
9381 + __kernel_pid_t shm_lpid; /* pid of last operator */
9382 + unsigned long shm_nattch; /* no. of current attaches */
9383 + unsigned long __unused4;
9384 + unsigned long __unused5;
9388 + unsigned long shmmax;
9389 + unsigned long shmmin;
9390 + unsigned long shmmni;
9391 + unsigned long shmseg;
9392 + unsigned long shmall;
9393 + unsigned long __unused1;
9394 + unsigned long __unused2;
9395 + unsigned long __unused3;
9396 + unsigned long __unused4;
9399 +#endif /* _ASM_UBICOM32_SHMBUF_H */
9400 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/shmparam.h linux-2.6.28.10/arch/ubicom32/include/asm/shmparam.h
9401 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/shmparam.h 1970-01-01 02:00:00.000000000 +0200
9402 +++ linux-2.6.28.10/arch/ubicom32/include/asm/shmparam.h 2009-08-06 10:31:02.000000000 +0300
9405 + * arch/ubicom32/include/asm/shmparam.h
9406 + * Shared memory definitions for Ubicom32 architecture.
9408 + * (C) Copyright 2009, Ubicom, Inc.
9409 + * Copyright (C) 2004 Microtronix Datacom Ltd
9411 + * This file is part of the Ubicom32 Linux Kernel Port.
9413 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
9414 + * it and/or modify it under the terms of the GNU General Public License
9415 + * as published by the Free Software Foundation, either version 2 of the
9416 + * License, or (at your option) any later version.
9418 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
9419 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
9420 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
9421 + * the GNU General Public License for more details.
9423 + * You should have received a copy of the GNU General Public License
9424 + * along with the Ubicom32 Linux Kernel Port. If not,
9425 + * see <http://www.gnu.org/licenses/>.
9427 + * Ubicom32 implementation derived from (with many thanks):
9431 + * Alpha, ix86, M68K, Sparc, ...et al
9433 +#ifndef _ASM_UBICOM32_SHMPARAM_H
9434 +#define _ASM_UBICOM32_SHMPARAM_H
9436 +#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
9438 +#endif /* _ASM_UBICOM32_SHMPARAM_H */
9439 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/sigcontext.h linux-2.6.28.10/arch/ubicom32/include/asm/sigcontext.h
9440 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/sigcontext.h 1970-01-01 02:00:00.000000000 +0200
9441 +++ linux-2.6.28.10/arch/ubicom32/include/asm/sigcontext.h 2009-08-06 10:31:02.000000000 +0300
9444 + * arch/ubicom32/include/asm/sigcontext.h
9445 + * Definition of sigcontext struct for Ubicom32 architecture.
9447 + * (C) Copyright 2009, Ubicom, Inc.
9449 + * This file is part of the Ubicom32 Linux Kernel Port.
9451 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
9452 + * it and/or modify it under the terms of the GNU General Public License
9453 + * as published by the Free Software Foundation, either version 2 of the
9454 + * License, or (at your option) any later version.
9456 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
9457 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
9458 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
9459 + * the GNU General Public License for more details.
9461 + * You should have received a copy of the GNU General Public License
9462 + * along with the Ubicom32 Linux Kernel Port. If not,
9463 + * see <http://www.gnu.org/licenses/>.
9465 + * Ubicom32 implementation derived from (with many thanks):
9470 +#ifndef _ASM_UBICOM32_SIGCONTEXT_H
9471 +#define _ASM_UBICOM32_SIGCONTEXT_H
9473 +#include <asm/ptrace.h>
9475 +struct sigcontext {
9476 + struct pt_regs sc_regs;
9479 +#endif /* _ASM_UBICOM32_SIGCONTEXT_H */
9480 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/siginfo.h linux-2.6.28.10/arch/ubicom32/include/asm/siginfo.h
9481 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/siginfo.h 1970-01-01 02:00:00.000000000 +0200
9482 +++ linux-2.6.28.10/arch/ubicom32/include/asm/siginfo.h 2009-08-06 10:31:02.000000000 +0300
9485 + * arch/ubicom32/include/asm/siginfo.h
9486 + * Generic siginfo.h definitions for Ubicom32 architecture.
9488 + * (C) Copyright 2009, Ubicom, Inc.
9490 + * This file is part of the Ubicom32 Linux Kernel Port.
9492 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
9493 + * it and/or modify it under the terms of the GNU General Public License
9494 + * as published by the Free Software Foundation, either version 2 of the
9495 + * License, or (at your option) any later version.
9497 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
9498 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
9499 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
9500 + * the GNU General Public License for more details.
9502 + * You should have received a copy of the GNU General Public License
9503 + * along with the Ubicom32 Linux Kernel Port. If not,
9504 + * see <http://www.gnu.org/licenses/>.
9506 + * Ubicom32 implementation derived from (with many thanks):
9511 +#ifndef _ASM_UBICOM32_SIGINFO_H
9512 +#define _ASM_UBICOM32_SIGINFO_H
9514 +#include <asm-generic/siginfo.h>
9516 +#endif /* _ASM_UBICOM32_SIGINFO_H */
9517 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/signal.h linux-2.6.28.10/arch/ubicom32/include/asm/signal.h
9518 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/signal.h 1970-01-01 02:00:00.000000000 +0200
9519 +++ linux-2.6.28.10/arch/ubicom32/include/asm/signal.h 2009-08-12 13:08:37.000000000 +0300
9522 + * arch/ubicom32/include/asm/signal.h
9523 + * Signal related definitions for Ubicom32 architecture.
9525 + * (C) Copyright 2009, Ubicom, Inc.
9527 + * This file is part of the Ubicom32 Linux Kernel Port.
9529 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
9530 + * it and/or modify it under the terms of the GNU General Public License
9531 + * as published by the Free Software Foundation, either version 2 of the
9532 + * License, or (at your option) any later version.
9534 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
9535 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
9536 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
9537 + * the GNU General Public License for more details.
9539 + * You should have received a copy of the GNU General Public License
9540 + * along with the Ubicom32 Linux Kernel Port. If not,
9541 + * see <http://www.gnu.org/licenses/>.
9543 + * Ubicom32 implementation derived from (with many thanks):
9548 +#ifndef _ASM_UBICOM32_SIGNAL_H
9549 +#define _ASM_UBICOM32_SIGNAL_H
9551 +#include <linux/types.h>
9553 +/* Avoid too many header ordering problems. */
9557 +/* Most things should be clean enough to redefine this at will, if care
9558 + is taken to make libc match. */
9561 +#define _NSIG_BPW 32
9562 +#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
9564 +typedef unsigned long old_sigset_t; /* at least 32 bits */
9567 + unsigned long sig[_NSIG_WORDS];
9570 +#endif /* __KERNEL__ */
9588 +#define SIGSTKFLT 16
9598 +#define SIGVTALRM 26
9600 +#define SIGWINCH 28
9602 +#define SIGPOLL SIGIO
9608 +#define SIGUNUSED 31
9610 +/* These should not be considered constants from userland. */
9611 +#define SIGRTMIN 32
9612 +#define SIGRTMAX _NSIG
9615 + * SA_FLAGS values:
9617 + * SA_ONSTACK indicates that a registered stack_t will be used.
9618 + * SA_RESTART flag to get restarting signals (which were the default long ago)
9619 + * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
9620 + * SA_RESETHAND clears the handler when the signal is delivered.
9621 + * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
9622 + * SA_NODEFER prevents the current signal from being masked in the handler.
9624 + * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
9625 + * Unix names RESETHAND and NODEFER respectively.
9627 +#define SA_NOCLDSTOP 0x00000001
9628 +#define SA_NOCLDWAIT 0x00000002
9629 +#define SA_SIGINFO 0x00000004
9630 +#define SA_ONSTACK 0x08000000
9631 +#define SA_RESTART 0x10000000
9632 +#define SA_NODEFER 0x40000000
9633 +#define SA_RESETHAND 0x80000000
9635 +#define SA_NOMASK SA_NODEFER
9636 +#define SA_ONESHOT SA_RESETHAND
9639 + * sigaltstack controls
9641 +#define SS_ONSTACK 1
9642 +#define SS_DISABLE 2
9644 +#define MINSIGSTKSZ 2048
9645 +#define SIGSTKSZ 8192
9647 +#include <asm-generic/signal.h>
9650 +struct old_sigaction {
9651 + __sighandler_t sa_handler;
9652 + old_sigset_t sa_mask;
9653 + unsigned long sa_flags;
9654 + void (*sa_restorer)(void);
9658 + __sighandler_t sa_handler;
9659 + unsigned long sa_flags;
9660 + void (*sa_restorer)(void);
9661 + sigset_t sa_mask; /* mask last for extensibility */
9664 +struct k_sigaction {
9665 + struct sigaction sa;
9668 +/* Here we must cater to libcs that poke about in kernel headers. */
9672 + __sighandler_t _sa_handler;
9673 + void (*_sa_sigaction)(int, struct siginfo *, void *);
9676 + unsigned long sa_flags;
9677 + void (*sa_restorer)(void);
9680 +#define sa_handler _u._sa_handler
9681 +#define sa_sigaction _u._sa_sigaction
9683 +#endif /* __KERNEL__ */
9685 +typedef struct sigaltstack {
9693 +#include <asm/sigcontext.h>
9694 +#undef __HAVE_ARCH_SIG_BITOPS
9696 +#define ptrace_signal_deliver(regs, cookie) do { } while (0)
9698 +#endif /* __KERNEL__ */
9700 +#endif /* _ASM_UBICOM32_SIGNAL_H */
9701 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/smp.h linux-2.6.28.10/arch/ubicom32/include/asm/smp.h
9702 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/smp.h 1970-01-01 02:00:00.000000000 +0200
9703 +++ linux-2.6.28.10/arch/ubicom32/include/asm/smp.h 2009-08-06 10:31:02.000000000 +0300
9706 + * arch/ubicom32/include/asm/smp.h
9707 + * SMP definitions for Ubicom32 architecture.
9709 + * (C) Copyright 2009, Ubicom, Inc.
9711 + * This file is part of the Ubicom32 Linux Kernel Port.
9713 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
9714 + * it and/or modify it under the terms of the GNU General Public License
9715 + * as published by the Free Software Foundation, either version 2 of the
9716 + * License, or (at your option) any later version.
9718 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
9719 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
9720 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
9721 + * the GNU General Public License for more details.
9723 + * You should have received a copy of the GNU General Public License
9724 + * along with the Ubicom32 Linux Kernel Port. If not,
9725 + * see <http://www.gnu.org/licenses/>.
9727 + * Ubicom32 implementation derived from (with many thanks):
9732 +#ifndef _ASM_UBICOM32_SMP_H
9733 +#define _ASM_UBICOM32_SMP_H
9736 +#include <linux/bitops.h>
9737 +#include <linux/threads.h>
9738 +#include <linux/cpumask.h>
9739 +#include <asm/ip5000.h>
9741 +typedef unsigned long address_t;
9742 +extern cpumask_t cpu_online_map;
9743 +extern unsigned int smp_ipi_irq;
9746 + * This magic constant controls our willingness to transfer
9747 + * a process across CPUs.
9749 + * Such a transfer incurs cache and tlb
9750 + * misses. The current value is inherited from i386. Still needs
9751 + * to be tuned for parisc.
9753 +#define PROC_CHANGE_PENALTY 15 /* Schedule penalty */
9754 +#define NO_PROC_ID 0xFF /* No processor magic marker */
9755 +#define ANY_PROC_ID 0xFF /* Any processor magic marker */
9758 +#define raw_smp_processor_id() (current_thread_info()->cpu)
9759 +#endif /* CONFIG_SMP */
9761 +static inline int __cpu_disable (void)
9766 +static inline void __cpu_die (unsigned int cpu)
9772 +extern int __cpu_up(unsigned int cpu);
9773 +extern void smp_send_timer_all(void);
9774 +extern void smp_timer_broadcast(cpumask_t mask);
9775 +extern void smp_set_affinity(unsigned int irq, cpumask_t dest);
9776 +extern void arch_send_call_function_single_ipi(int cpu);
9777 +extern void arch_send_call_function_ipi(cpumask_t mask);
9780 + * TODO: Once these are fully tested, we should turn them into
9781 + * inline macros for performance.
9783 +extern unsigned long smp_get_affinity(unsigned int irq, int *all);
9784 +extern void smp_reset_ipi(unsigned long mask);
9786 +#endif /* !ASSEMBLY */
9787 +#endif /* _ASM_UBICOM32_SMP_H */
9788 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/socket.h linux-2.6.28.10/arch/ubicom32/include/asm/socket.h
9789 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/socket.h 1970-01-01 02:00:00.000000000 +0200
9790 +++ linux-2.6.28.10/arch/ubicom32/include/asm/socket.h 2009-08-06 10:31:02.000000000 +0300
9793 + * arch/ubicom32/include/asm/socket.h
9794 + * Socket options definitions for Ubicom32 architecture.
9796 + * (C) Copyright 2009, Ubicom, Inc.
9798 + * This file is part of the Ubicom32 Linux Kernel Port.
9800 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
9801 + * it and/or modify it under the terms of the GNU General Public License
9802 + * as published by the Free Software Foundation, either version 2 of the
9803 + * License, or (at your option) any later version.
9805 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
9806 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
9807 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
9808 + * the GNU General Public License for more details.
9810 + * You should have received a copy of the GNU General Public License
9811 + * along with the Ubicom32 Linux Kernel Port. If not,
9812 + * see <http://www.gnu.org/licenses/>.
9814 + * Ubicom32 implementation derived from (with many thanks):
9819 +#ifndef _ASM_UBICOM32_SOCKET_H
9820 +#define _ASM_UBICOM32_SOCKET_H
9822 +#include <asm/sockios.h>
9824 +/* For setsockopt(2) */
9825 +#define SOL_SOCKET 1
9828 +#define SO_REUSEADDR 2
9831 +#define SO_DONTROUTE 5
9832 +#define SO_BROADCAST 6
9833 +#define SO_SNDBUF 7
9834 +#define SO_RCVBUF 8
9835 +#define SO_SNDBUFFORCE 32
9836 +#define SO_RCVBUFFORCE 33
9837 +#define SO_KEEPALIVE 9
9838 +#define SO_OOBINLINE 10
9839 +#define SO_NO_CHECK 11
9840 +#define SO_PRIORITY 12
9841 +#define SO_LINGER 13
9842 +#define SO_BSDCOMPAT 14
9843 +/* To add :#define SO_REUSEPORT 15 */
9844 +#define SO_PASSCRED 16
9845 +#define SO_PEERCRED 17
9846 +#define SO_RCVLOWAT 18
9847 +#define SO_SNDLOWAT 19
9848 +#define SO_RCVTIMEO 20
9849 +#define SO_SNDTIMEO 21
9851 +/* Security levels - as per NRL IPv6 - don't actually do anything */
9852 +#define SO_SECURITY_AUTHENTICATION 22
9853 +#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
9854 +#define SO_SECURITY_ENCRYPTION_NETWORK 24
9856 +#define SO_BINDTODEVICE 25
9858 +/* Socket filtering */
9859 +#define SO_ATTACH_FILTER 26
9860 +#define SO_DETACH_FILTER 27
9862 +#define SO_PEERNAME 28
9863 +#define SO_TIMESTAMP 29
9864 +#define SCM_TIMESTAMP SO_TIMESTAMP
9866 +#define SO_ACCEPTCONN 30
9868 +#define SO_PEERSEC 31
9869 +#define SO_PASSSEC 34
9870 +#define SO_TIMESTAMPNS 35
9871 +#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
9875 +#endif /* _ASM_UBICOM32_SOCKET_H */
9876 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/sockios.h linux-2.6.28.10/arch/ubicom32/include/asm/sockios.h
9877 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/sockios.h 1970-01-01 02:00:00.000000000 +0200
9878 +++ linux-2.6.28.10/arch/ubicom32/include/asm/sockios.h 2009-08-06 10:31:02.000000000 +0300
9881 + * arch/ubicom32/include/asm/sockios.h
9882 + * Socket-level ioctl definitions for Ubicom32 architecture.
9884 + * (C) Copyright 2009, Ubicom, Inc.
9886 + * This file is part of the Ubicom32 Linux Kernel Port.
9888 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
9889 + * it and/or modify it under the terms of the GNU General Public License
9890 + * as published by the Free Software Foundation, either version 2 of the
9891 + * License, or (at your option) any later version.
9893 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
9894 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
9895 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
9896 + * the GNU General Public License for more details.
9898 + * You should have received a copy of the GNU General Public License
9899 + * along with the Ubicom32 Linux Kernel Port. If not,
9900 + * see <http://www.gnu.org/licenses/>.
9902 + * Ubicom32 implementation derived from (with many thanks):
9907 +#ifndef _ASM_UBICOM32_SOCKIOS_H
9908 +#define _ASM_UBICOM32_SOCKIOS_H
9910 +/* Socket-level I/O control calls. */
9911 +#define FIOSETOWN 0x8901
9912 +#define SIOCSPGRP 0x8902
9913 +#define FIOGETOWN 0x8903
9914 +#define SIOCGPGRP 0x8904
9915 +#define SIOCATMARK 0x8905
9916 +#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
9917 +#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
9919 +#endif /* _ASM_UBICOM32_SOCKIOS_H */
9920 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/spinlock.h linux-2.6.28.10/arch/ubicom32/include/asm/spinlock.h
9921 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/spinlock.h 1970-01-01 02:00:00.000000000 +0200
9922 +++ linux-2.6.28.10/arch/ubicom32/include/asm/spinlock.h 2009-08-06 10:31:02.000000000 +0300
9925 + * arch/ubicom32/include/asm/spinlock.h
9926 + * Spinlock related definitions for Ubicom32 architecture.
9928 + * (C) Copyright 2009, Ubicom, Inc.
9930 + * This file is part of the Ubicom32 Linux Kernel Port.
9932 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
9933 + * it and/or modify it under the terms of the GNU General Public License
9934 + * as published by the Free Software Foundation, either version 2 of the
9935 + * License, or (at your option) any later version.
9937 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
9938 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
9939 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
9940 + * the GNU General Public License for more details.
9942 + * You should have received a copy of the GNU General Public License
9943 + * along with the Ubicom32 Linux Kernel Port. If not,
9944 + * see <http://www.gnu.org/licenses/>.
9946 + * Ubicom32 implementation derived from (with many thanks):
9951 +#ifndef _ASM_UBICOM32_SPINLOCK_H
9952 +#define _ASM_UBICOM32_SPINLOCK_H
9954 +#include <asm/system.h>
9955 +#include <asm/processor.h>
9956 +#include <asm/spinlock_types.h>
9959 + * __raw_spin_lock()
9962 +static inline void __raw_spin_lock(raw_spinlock_t *x)
9965 + "1: bset %0, %0, #0 \n\t"
9966 + " jmpne.f 1b \n\t"
9974 + * __raw_spin_unlock()
9975 + * Unlock the lock.
9977 +static inline void __raw_spin_unlock(raw_spinlock_t *x)
9980 + " bclr %0, %0, #0 \n\t"
9988 + * __raw_spin_is_locked()
9989 + * Test if the lock is locked.
9991 +static inline int __raw_spin_is_locked(raw_spinlock_t *x)
9997 + * __raw_spin_unlock_wait()
9998 + * Wait for the lock to be unlocked.
10000 + * Note: the caller has not guarantee that the lock will not
10001 + * be acquired before they get to it.
10003 +static inline void __raw_spin_unlock_wait(raw_spinlock_t *x)
10007 + } while (__raw_spin_is_locked(x));
10011 + * __raw_spin_trylock()
10012 + * Try the lock, return 0 on failure, 1 on success.
10014 +static inline int __raw_spin_trylock(raw_spinlock_t *x)
10019 + " bset %1, %1, #0 \n\t"
10020 + " jmpne.f 1f \n\t"
10021 + " move.4 %0, #1 \n\t"
10023 + : "+r" (ret), "+U4" (x->lock)
10032 + * __raw_spin_lock_flags()
10033 + * Spin waiting for the lock (enabling IRQ(s))
10035 +static inline void __raw_spin_lock_flags(raw_spinlock_t *x, unsigned long flags)
10038 + while (!__raw_spin_trylock(x)) {
10040 + * If the flags from the IRQ are set, interrupts are disabled and we
10041 + * need to re-enable them.
10046 + raw_local_irq_enable();
10048 + raw_local_irq_disable();
10055 + * Read-write spinlocks, allowing multiple readers but only one writer.
10056 + * Linux rwlocks are unfair to writers; they can be starved for an indefinite
10057 + * time by readers. With care, they can also be taken in interrupt context.
10059 + * In Ubicom32 architecture implementation, we have a spinlock and a counter.
10060 + * Readers use the lock to serialise their access to the counter (which
10061 + * records how many readers currently hold the lock).
10062 + * Writers hold the spinlock, preventing any readers or other writers from
10063 + * grabbing the rwlock.
10067 + * __raw_read_lock()
10068 + * Increment the counter in the rwlock.
10070 + * Note that we have to ensure interrupts are disabled in case we're
10071 + * interrupted by some other code that wants to grab the same read lock
10073 +static inline void __raw_read_lock(raw_rwlock_t *rw)
10075 + unsigned long flags;
10076 + raw_local_irq_save(flags);
10077 + __raw_spin_lock_flags(&rw->lock, flags);
10079 + __raw_spin_unlock(&rw->lock);
10080 + raw_local_irq_restore(flags);
10084 + * __raw_read_unlock()
10085 + * Decrement the counter.
10087 + * Note that we have to ensure interrupts are disabled in case we're
10088 + * interrupted by some other code that wants to grab the same read lock
10090 +static inline void __raw_read_unlock(raw_rwlock_t *rw)
10092 + unsigned long flags;
10093 + raw_local_irq_save(flags);
10094 + __raw_spin_lock_flags(&rw->lock, flags);
10096 + __raw_spin_unlock(&rw->lock);
10097 + raw_local_irq_restore(flags);
10101 + * __raw_read_trylock()
10102 + * Increment the counter if we can.
10104 + * Note that we have to ensure interrupts are disabled in case we're
10105 + * interrupted by some other code that wants to grab the same read lock
10107 +static inline int __raw_read_trylock(raw_rwlock_t *rw)
10109 + unsigned long flags;
10111 + raw_local_irq_save(flags);
10112 + if (__raw_spin_trylock(&rw->lock)) {
10114 + __raw_spin_unlock(&rw->lock);
10115 + raw_local_irq_restore(flags);
10119 + raw_local_irq_restore(flags);
10122 + * If write-locked, we fail to acquire the lock
10124 + if (rw->counter < 0) {
10129 + * Wait until we have a realistic chance at the lock
10131 + while (__raw_spin_is_locked(&rw->lock) && rw->counter >= 0) {
10139 + * __raw_write_lock()
10141 + * Note that we have to ensure interrupts are disabled in case we're
10142 + * interrupted by some other code that wants to read_trylock() this lock
10144 +static inline void __raw_write_lock(raw_rwlock_t *rw)
10146 + unsigned long flags;
10148 + raw_local_irq_save(flags);
10149 + __raw_spin_lock_flags(&rw->lock, flags);
10151 + if (rw->counter != 0) {
10152 + __raw_spin_unlock(&rw->lock);
10153 + raw_local_irq_restore(flags);
10155 + while (rw->counter != 0)
10161 + rw->counter = -1; /* mark as write-locked */
10163 + raw_local_irq_restore(flags);
10166 +static inline void __raw_write_unlock(raw_rwlock_t *rw)
10169 + __raw_spin_unlock(&rw->lock);
10172 +/* Note that we have to ensure interrupts are disabled in case we're
10173 + * interrupted by some other code that wants to read_trylock() this lock */
10174 +static inline int __raw_write_trylock(raw_rwlock_t *rw)
10176 + unsigned long flags;
10179 + raw_local_irq_save(flags);
10180 + if (__raw_spin_trylock(&rw->lock)) {
10181 + if (rw->counter == 0) {
10182 + rw->counter = -1;
10185 + /* Read-locked. Oh well. */
10186 + __raw_spin_unlock(&rw->lock);
10189 + raw_local_irq_restore(flags);
10195 + * read_can_lock - would read_trylock() succeed?
10196 + * @lock: the rwlock in question.
10198 +static inline int __raw_read_can_lock(raw_rwlock_t *rw)
10200 + return rw->counter >= 0;
10204 + * write_can_lock - would write_trylock() succeed?
10205 + * @lock: the rwlock in question.
10207 +static inline int __raw_write_can_lock(raw_rwlock_t *rw)
10209 + return !rw->counter;
10212 +#define _raw_spin_relax(lock) cpu_relax()
10213 +#define _raw_read_relax(lock) cpu_relax()
10214 +#define _raw_write_relax(lock) cpu_relax()
10216 +#endif /* _ASM_UBICOM32_SPINLOCK_H */
10217 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/spinlock_types.h linux-2.6.28.10/arch/ubicom32/include/asm/spinlock_types.h
10218 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/spinlock_types.h 1970-01-01 02:00:00.000000000 +0200
10219 +++ linux-2.6.28.10/arch/ubicom32/include/asm/spinlock_types.h 2009-08-06 10:31:02.000000000 +0300
10222 + * arch/ubicom32/include/asm/spinlock_types.h
10223 + * Spinlock related structure definitions for Ubicom32 architecture.
10225 + * (C) Copyright 2009, Ubicom, Inc.
10227 + * This file is part of the Ubicom32 Linux Kernel Port.
10229 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
10230 + * it and/or modify it under the terms of the GNU General Public License
10231 + * as published by the Free Software Foundation, either version 2 of the
10232 + * License, or (at your option) any later version.
10234 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
10235 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
10236 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
10237 + * the GNU General Public License for more details.
10239 + * You should have received a copy of the GNU General Public License
10240 + * along with the Ubicom32 Linux Kernel Port. If not,
10241 + * see <http://www.gnu.org/licenses/>.
10243 + * Ubicom32 implementation derived from (with many thanks):
10248 +#ifndef _ASM_UBICOM32_SPINLOCK_TYPES_H
10249 +#define _ASM_UBICOM32_SPINLOCK_TYPES_H
10252 + volatile unsigned int lock;
10256 + raw_spinlock_t lock;
10257 + volatile int counter;
10260 +#define __RAW_SPIN_LOCK_UNLOCKED { 0 }
10261 +#define __RAW_RW_LOCK_UNLOCKED { __RAW_SPIN_LOCK_UNLOCKED, 0 }
10263 +#endif /* _ASM_UBICOM32_SPINLOCK_TYPES_H */
10264 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/stacktrace.h linux-2.6.28.10/arch/ubicom32/include/asm/stacktrace.h
10265 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/stacktrace.h 1970-01-01 02:00:00.000000000 +0200
10266 +++ linux-2.6.28.10/arch/ubicom32/include/asm/stacktrace.h 2009-08-06 10:31:02.000000000 +0300
10269 + * arch/ubicom32/include/asm/stacktrace.h
10270 + * Stacktrace functions for the Ubicom32 architecture.
10272 + * (C) Copyright 2009, Ubicom, Inc.
10274 + * This file is part of the Ubicom32 Linux Kernel Port.
10276 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
10277 + * it and/or modify it under the terms of the GNU General Public License
10278 + * as published by the Free Software Foundation, either version 2 of the
10279 + * License, or (at your option) any later version.
10281 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
10282 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
10283 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
10284 + * the GNU General Public License for more details.
10286 + * You should have received a copy of the GNU General Public License
10287 + * along with the Ubicom32 Linux Kernel Port. If not,
10288 + * see <http://www.gnu.org/licenses/>.
10290 + * Ubicom32 implementation derived from (with many thanks):
10295 +#ifndef _ASM_UBICOM32_STACKTRACE_H
10296 +#define _ASM_UBICOM32_STACKTRACE_H
10298 +#define between(a, b, c) (( \
10299 + ((unsigned long) a) >= ((unsigned long) b)) && \
10300 + (((unsigned long)a) <= ((unsigned long)c)))
10303 + * These symbols are filled in by the linker.
10305 +extern unsigned long _stext;
10306 +extern unsigned long _etext;
10308 +/* OCM text goes from __ocm_text_run_begin to __data_begin */
10309 +extern unsigned long __ocm_text_run_begin;
10310 +extern unsigned long __data_begin;
10312 +/* Account for OCM case - see stacktrace.c maybe combine(also trap.c) */
10314 + * ubicom32_is_kernel()
10316 + * Check to see if the given address belongs to the kernel.
10317 + * NOMMU does not permit any other means.
10319 +static inline int ubicom32_is_kernel(unsigned long addr)
10321 + int is_kernel = between(addr, &_stext, &_etext) || \
10322 + between(addr, &__ocm_text_run_begin, &__data_begin);
10324 +#ifdef CONFIG_MODULES
10326 + is_kernel = is_module_address(addr);
10328 + return is_kernel;
10331 +extern unsigned long stacktrace_iterate(
10332 + unsigned long **trace,
10333 + unsigned long stext, unsigned long etext,
10334 + unsigned long ocm_stext, unsigned long ocm_etext,
10335 + unsigned long sstack, unsigned long estack);
10336 +#ifdef CONFIG_STACKTRACE
10337 +void stacktrace_save_entries(struct task_struct *tsk, struct stack_trace *trace, unsigned long sp);
10339 +#endif /* _ASM_UBICOM32_STACKTRACE_H */
10340 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/statfs.h linux-2.6.28.10/arch/ubicom32/include/asm/statfs.h
10341 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/statfs.h 1970-01-01 02:00:00.000000000 +0200
10342 +++ linux-2.6.28.10/arch/ubicom32/include/asm/statfs.h 2009-08-06 10:31:02.000000000 +0300
10345 + * arch/ubicom32/include/asm/statfs.h
10346 + * Generic statfs.h definitions
10348 + * (C) Copyright 2009, Ubicom, Inc.
10350 + * This file is part of the Ubicom32 Linux Kernel Port.
10352 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
10353 + * it and/or modify it under the terms of the GNU General Public License
10354 + * as published by the Free Software Foundation, either version 2 of the
10355 + * License, or (at your option) any later version.
10357 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
10358 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
10359 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
10360 + * the GNU General Public License for more details.
10362 + * You should have received a copy of the GNU General Public License
10363 + * along with the Ubicom32 Linux Kernel Port. If not,
10364 + * see <http://www.gnu.org/licenses/>.
10366 + * Ubicom32 implementation derived from (with many thanks):
10371 +#ifndef _ASM_UBICOM32_STATFS_H
10372 +#define _ASM_UBICOM32_STATFS_H
10374 +#include <asm-generic/statfs.h>
10376 +#endif /* _ASM_UBICOM32_STATFS_H */
10377 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/stat.h linux-2.6.28.10/arch/ubicom32/include/asm/stat.h
10378 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/stat.h 1970-01-01 02:00:00.000000000 +0200
10379 +++ linux-2.6.28.10/arch/ubicom32/include/asm/stat.h 2009-08-06 10:31:02.000000000 +0300
10382 + * arch/ubicom32/include/asm/stat.h
10383 + * File status definitions for Ubicom32 architecture.
10385 + * (C) Copyright 2009, Ubicom, Inc.
10387 + * This file is part of the Ubicom32 Linux Kernel Port.
10389 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
10390 + * it and/or modify it under the terms of the GNU General Public License
10391 + * as published by the Free Software Foundation, either version 2 of the
10392 + * License, or (at your option) any later version.
10394 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
10395 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
10396 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
10397 + * the GNU General Public License for more details.
10399 + * You should have received a copy of the GNU General Public License
10400 + * along with the Ubicom32 Linux Kernel Port. If not,
10401 + * see <http://www.gnu.org/licenses/>.
10403 + * Ubicom32 implementation derived from (with many thanks):
10408 +#ifndef _ASM_UBICOM32_STAT_H
10409 +#define _ASM_UBICOM32_STAT_H
10411 +struct __old_kernel_stat {
10412 + unsigned short st_dev;
10413 + unsigned short st_ino;
10414 + unsigned short st_mode;
10415 + unsigned short st_nlink;
10416 + unsigned short st_uid;
10417 + unsigned short st_gid;
10418 + unsigned short st_rdev;
10419 + unsigned long st_size;
10420 + unsigned long st_atime;
10421 + unsigned long st_mtime;
10422 + unsigned long st_ctime;
10426 + unsigned short st_dev;
10427 + unsigned short __pad1;
10428 + unsigned long st_ino;
10429 + unsigned short st_mode;
10430 + unsigned short st_nlink;
10431 + unsigned short st_uid;
10432 + unsigned short st_gid;
10433 + unsigned short st_rdev;
10434 + unsigned short __pad2;
10435 + unsigned long st_size;
10436 + unsigned long st_blksize;
10437 + unsigned long st_blocks;
10438 + unsigned long st_atime;
10439 + unsigned long __unused1;
10440 + unsigned long st_mtime;
10441 + unsigned long __unused2;
10442 + unsigned long st_ctime;
10443 + unsigned long __unused3;
10444 + unsigned long __unused4;
10445 + unsigned long __unused5;
10448 +/* This matches struct stat64 in glibc2.1, hence the absolutely
10449 + * insane amounts of padding around dev_t's.
10452 + unsigned long long st_dev;
10453 + unsigned char __pad1[2];
10455 +#define STAT64_HAS_BROKEN_ST_INO 1
10456 + unsigned long __st_ino;
10458 + unsigned int st_mode;
10459 + unsigned int st_nlink;
10461 + unsigned long st_uid;
10462 + unsigned long st_gid;
10464 + unsigned long long st_rdev;
10465 + unsigned char __pad3[2];
10467 + long long st_size;
10468 + unsigned long st_blksize;
10470 + unsigned long long st_blocks; /* Number 512-byte blocks allocated. */
10472 + unsigned long st_atime;
10473 + unsigned long st_atime_nsec;
10475 + unsigned long st_mtime;
10476 + unsigned long st_mtime_nsec;
10478 + unsigned long st_ctime;
10479 + unsigned long st_ctime_nsec;
10481 + unsigned long long st_ino;
10484 +#endif /* _ASM_UBICOM32_STAT_H */
10485 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/string.h linux-2.6.28.10/arch/ubicom32/include/asm/string.h
10486 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/string.h 1970-01-01 02:00:00.000000000 +0200
10487 +++ linux-2.6.28.10/arch/ubicom32/include/asm/string.h 2009-08-06 10:31:02.000000000 +0300
10490 + * arch/ubicom32/include/asm/string.h
10491 + * String operation definitions for Ubicom32 architecture.
10493 + * (C) Copyright 2009, Ubicom, Inc.
10495 + * This file is part of the Ubicom32 Linux Kernel Port.
10497 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
10498 + * it and/or modify it under the terms of the GNU General Public License
10499 + * as published by the Free Software Foundation, either version 2 of the
10500 + * License, or (at your option) any later version.
10502 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
10503 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
10504 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
10505 + * the GNU General Public License for more details.
10507 + * You should have received a copy of the GNU General Public License
10508 + * along with the Ubicom32 Linux Kernel Port. If not,
10509 + * see <http://www.gnu.org/licenses/>.
10511 + * Ubicom32 implementation derived from (with many thanks):
10516 +#ifndef _ASM_UBICOM32_STRING_H
10517 +#define _ASM_UBICOM32_STRING_H
10519 +#define __HAVE_ARCH_MEMSET
10520 +extern void *memset(void *b, int c, size_t len);
10522 +#define __HAVE_ARCH_MEMCPY
10523 +extern void *memcpy(void *to, const void *from, size_t len);
10525 +#endif /* _ASM_UBICOM32_STRING_H */
10526 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/system.h linux-2.6.28.10/arch/ubicom32/include/asm/system.h
10527 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/system.h 1970-01-01 02:00:00.000000000 +0200
10528 +++ linux-2.6.28.10/arch/ubicom32/include/asm/system.h 2009-08-06 10:31:02.000000000 +0300
10531 + * arch/ubicom32/include/asm/system.h
10532 + * Low level switching definitions.
10534 + * (C) Copyright 2009, Ubicom, Inc.
10536 + * This file is part of the Ubicom32 Linux Kernel Port.
10538 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
10539 + * it and/or modify it under the terms of the GNU General Public License
10540 + * as published by the Free Software Foundation, either version 2 of the
10541 + * License, or (at your option) any later version.
10543 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
10544 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
10545 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
10546 + * the GNU General Public License for more details.
10548 + * You should have received a copy of the GNU General Public License
10549 + * along with the Ubicom32 Linux Kernel Port. If not,
10550 + * see <http://www.gnu.org/licenses/>.
10552 + * Ubicom32 implementation derived from (with many thanks):
10557 +#ifndef _ASM_UBICOM32_SYSTEM_H
10558 +#define _ASM_UBICOM32_SYSTEM_H
10560 +#include <linux/irqflags.h>
10561 +#include <linux/linkage.h>
10562 +#include <asm/segment.h>
10563 +#include <asm/entry.h>
10564 +#include <asm/ldsr.h>
10565 +#include <asm/irq.h>
10566 +#include <asm/percpu.h>
10567 +#include <asm/ubicom32-common.h>
10568 +#include <asm/processor.h>
10571 + * switch_to(n) should switch tasks to task ptr, first checking that
10572 + * ptr isn't the current task, in which case it does nothing.
10574 +asmlinkage void resume(void);
10575 +extern void *__switch_to(struct task_struct *prev,
10576 + struct thread_struct *prev_switch,
10577 + struct thread_struct *next_switch);
10580 + * We will need a per linux thread sw_ksp for the switch_to macro to
10581 + * track the kernel stack pointer for the current thread on that linux thread.
10583 +#define switch_to(prev,next,last) \
10586 + _last = (void *) \
10587 + __switch_to(prev, &prev->thread, &next->thread); \
10588 + (last) = _last; \
10592 + * Force strict CPU ordering.
10593 + * Not really required on ubicom32...
10595 +#define nop() asm volatile ("nop"::)
10596 +#define mb() asm volatile ("" : : :"memory")
10597 +#define rmb() asm volatile ("" : : :"memory")
10598 +#define wmb() asm volatile ("" : : :"memory")
10599 +#define set_mb(var, value) ({ (var) = (value); wmb(); })
10602 +#define smp_mb() mb()
10603 +#define smp_rmb() rmb()
10604 +#define smp_wmb() wmb()
10605 +#define smp_read_barrier_depends() read_barrier_depends()
10607 +#define smp_mb() mb()
10608 +#define smp_rmb() rmb()
10609 +#define smp_wmb() wmb()
10610 +#define smp_read_barrier_depends() do { } while(0)
10613 +#define read_barrier_depends() ((void)0)
10616 + * The following defines change how the scheduler calls the switch_to()
10619 + * 1) The first causes the runqueue to be unlocked on entry to
10620 + * switch_to(). Since our ctx code does not play with the runqueue
10621 + * we do not need it unlocked.
10623 + * 2) The later turns interrupts on during a ctxsw to reduce the latency of
10624 + * interrupts during ctx. At this point in the port, we believe that this
10625 + * latency is not a problem since we have very little code to perform a ctxsw.
10627 +// #define __ARCH_WANT_UNLOCKED_CTXSW
10628 +// #define __ARCH_WANT_INTERRUPTS_ON_CTXSW
10630 +#endif /* _ASM_UBICOM32_SYSTEM_H */
10631 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/termbits.h linux-2.6.28.10/arch/ubicom32/include/asm/termbits.h
10632 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/termbits.h 1970-01-01 02:00:00.000000000 +0200
10633 +++ linux-2.6.28.10/arch/ubicom32/include/asm/termbits.h 2009-08-06 10:31:02.000000000 +0300
10636 + * arch/ubicom32/include/asm/termbits.h
10637 + * Terminal/serial port definitions for Ubicom32 architecture.
10639 + * (C) Copyright 2009, Ubicom, Inc.
10641 + * This file is part of the Ubicom32 Linux Kernel Port.
10643 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
10644 + * it and/or modify it under the terms of the GNU General Public License
10645 + * as published by the Free Software Foundation, either version 2 of the
10646 + * License, or (at your option) any later version.
10648 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
10649 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
10650 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
10651 + * the GNU General Public License for more details.
10653 + * You should have received a copy of the GNU General Public License
10654 + * along with the Ubicom32 Linux Kernel Port. If not,
10655 + * see <http://www.gnu.org/licenses/>.
10657 + * Ubicom32 implementation derived from (with many thanks):
10662 +#ifndef _ASM_UBICOM32_TERMBITS_H
10663 +#define _ASM_UBICOM32_TERMBITS_H
10665 +#include <linux/posix_types.h>
10667 +typedef unsigned char cc_t;
10668 +typedef unsigned int speed_t;
10669 +typedef unsigned int tcflag_t;
10673 + tcflag_t c_iflag; /* input mode flags */
10674 + tcflag_t c_oflag; /* output mode flags */
10675 + tcflag_t c_cflag; /* control mode flags */
10676 + tcflag_t c_lflag; /* local mode flags */
10677 + cc_t c_line; /* line discipline */
10678 + cc_t c_cc[NCCS]; /* control characters */
10682 + tcflag_t c_iflag; /* input mode flags */
10683 + tcflag_t c_oflag; /* output mode flags */
10684 + tcflag_t c_cflag; /* control mode flags */
10685 + tcflag_t c_lflag; /* local mode flags */
10686 + cc_t c_line; /* line discipline */
10687 + cc_t c_cc[NCCS]; /* control characters */
10688 + speed_t c_ispeed; /* input speed */
10689 + speed_t c_ospeed; /* output speed */
10693 + tcflag_t c_iflag; /* input mode flags */
10694 + tcflag_t c_oflag; /* output mode flags */
10695 + tcflag_t c_cflag; /* control mode flags */
10696 + tcflag_t c_lflag; /* local mode flags */
10697 + cc_t c_line; /* line discipline */
10698 + cc_t c_cc[NCCS]; /* control characters */
10699 + speed_t c_ispeed; /* input speed */
10700 + speed_t c_ospeed; /* output speed */
10703 +/* c_cc characters */
10716 +#define VREPRINT 12
10717 +#define VDISCARD 13
10718 +#define VWERASE 14
10723 +/* c_iflag bits */
10724 +#define IGNBRK 0000001
10725 +#define BRKINT 0000002
10726 +#define IGNPAR 0000004
10727 +#define PARMRK 0000010
10728 +#define INPCK 0000020
10729 +#define ISTRIP 0000040
10730 +#define INLCR 0000100
10731 +#define IGNCR 0000200
10732 +#define ICRNL 0000400
10733 +#define IUCLC 0001000
10734 +#define IXON 0002000
10735 +#define IXANY 0004000
10736 +#define IXOFF 0010000
10737 +#define IMAXBEL 0020000
10738 +#define IUTF8 0040000
10740 +/* c_oflag bits */
10741 +#define OPOST 0000001
10742 +#define OLCUC 0000002
10743 +#define ONLCR 0000004
10744 +#define OCRNL 0000010
10745 +#define ONOCR 0000020
10746 +#define ONLRET 0000040
10747 +#define OFILL 0000100
10748 +#define OFDEL 0000200
10749 +#define NLDLY 0000400
10750 +#define NL0 0000000
10751 +#define NL1 0000400
10752 +#define CRDLY 0003000
10753 +#define CR0 0000000
10754 +#define CR1 0001000
10755 +#define CR2 0002000
10756 +#define CR3 0003000
10757 +#define TABDLY 0014000
10758 +#define TAB0 0000000
10759 +#define TAB1 0004000
10760 +#define TAB2 0010000
10761 +#define TAB3 0014000
10762 +#define XTABS 0014000
10763 +#define BSDLY 0020000
10764 +#define BS0 0000000
10765 +#define BS1 0020000
10766 +#define VTDLY 0040000
10767 +#define VT0 0000000
10768 +#define VT1 0040000
10769 +#define FFDLY 0100000
10770 +#define FF0 0000000
10771 +#define FF1 0100000
10773 +/* c_cflag bit meaning */
10774 +#define CBAUD 0010017
10775 +#define B0 0000000 /* hang up */
10776 +#define B50 0000001
10777 +#define B75 0000002
10778 +#define B110 0000003
10779 +#define B134 0000004
10780 +#define B150 0000005
10781 +#define B200 0000006
10782 +#define B300 0000007
10783 +#define B600 0000010
10784 +#define B1200 0000011
10785 +#define B1800 0000012
10786 +#define B2400 0000013
10787 +#define B4800 0000014
10788 +#define B9600 0000015
10789 +#define B19200 0000016
10790 +#define B38400 0000017
10791 +#define EXTA B19200
10792 +#define EXTB B38400
10793 +#define CSIZE 0000060
10794 +#define CS5 0000000
10795 +#define CS6 0000020
10796 +#define CS7 0000040
10797 +#define CS8 0000060
10798 +#define CSTOPB 0000100
10799 +#define CREAD 0000200
10800 +#define PARENB 0000400
10801 +#define PARODD 0001000
10802 +#define HUPCL 0002000
10803 +#define CLOCAL 0004000
10804 +#define CBAUDEX 0010000
10805 +#define BOTHER 0010000
10806 +#define B57600 0010001
10807 +#define B115200 0010002
10808 +#define B230400 0010003
10809 +#define B460800 0010004
10810 +#define B500000 0010005
10811 +#define B576000 0010006
10812 +#define B921600 0010007
10813 +#define B1000000 0010010
10814 +#define B1152000 0010011
10815 +#define B1500000 0010012
10816 +#define B2000000 0010013
10817 +#define B2500000 0010014
10818 +#define B3000000 0010015
10819 +#define B3500000 0010016
10820 +#define B4000000 0010017
10821 +#define CIBAUD 002003600000 /* input baud rate */
10822 +#define CMSPAR 010000000000 /* mark or space (stick) parity */
10823 +#define CRTSCTS 020000000000 /* flow control */
10825 +#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
10827 +/* c_lflag bits */
10828 +#define ISIG 0000001
10829 +#define ICANON 0000002
10830 +#define XCASE 0000004
10831 +#define ECHO 0000010
10832 +#define ECHOE 0000020
10833 +#define ECHOK 0000040
10834 +#define ECHONL 0000100
10835 +#define NOFLSH 0000200
10836 +#define TOSTOP 0000400
10837 +#define ECHOCTL 0001000
10838 +#define ECHOPRT 0002000
10839 +#define ECHOKE 0004000
10840 +#define FLUSHO 0010000
10841 +#define PENDIN 0040000
10842 +#define IEXTEN 0100000
10845 +/* tcflow() and TCXONC use these */
10851 +/* tcflush() and TCFLSH use these */
10852 +#define TCIFLUSH 0
10853 +#define TCOFLUSH 1
10854 +#define TCIOFLUSH 2
10856 +/* tcsetattr uses these */
10858 +#define TCSADRAIN 1
10859 +#define TCSAFLUSH 2
10861 +#endif /* _ASM_UBICOM32_TERMBITS_H */
10862 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/termios.h linux-2.6.28.10/arch/ubicom32/include/asm/termios.h
10863 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/termios.h 1970-01-01 02:00:00.000000000 +0200
10864 +++ linux-2.6.28.10/arch/ubicom32/include/asm/termios.h 2009-08-06 10:31:02.000000000 +0300
10867 + * arch/ubicom32/include/asm/termios.h
10868 + * Ubicom32 termio definitions.
10870 + * (C) Copyright 2009, Ubicom, Inc.
10872 + * This file is part of the Ubicom32 Linux Kernel Port.
10874 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
10875 + * it and/or modify it under the terms of the GNU General Public License
10876 + * as published by the Free Software Foundation, either version 2 of the
10877 + * License, or (at your option) any later version.
10879 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
10880 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
10881 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
10882 + * the GNU General Public License for more details.
10884 + * You should have received a copy of the GNU General Public License
10885 + * along with the Ubicom32 Linux Kernel Port. If not,
10886 + * see <http://www.gnu.org/licenses/>.
10888 + * Ubicom32 implementation derived from (with many thanks):
10893 +#ifndef _ASM_UBICOM32_TERMIOS_H
10894 +#define _ASM_UBICOM32_TERMIOS_H
10896 +#include <asm/termbits.h>
10897 +#include <asm/ioctls.h>
10900 + unsigned short ws_row;
10901 + unsigned short ws_col;
10902 + unsigned short ws_xpixel;
10903 + unsigned short ws_ypixel;
10908 + unsigned short c_iflag; /* input mode flags */
10909 + unsigned short c_oflag; /* output mode flags */
10910 + unsigned short c_cflag; /* control mode flags */
10911 + unsigned short c_lflag; /* local mode flags */
10912 + unsigned char c_line; /* line discipline */
10913 + unsigned char c_cc[NCC]; /* control characters */
10917 +/* intr=^C quit=^| erase=del kill=^U
10918 + eof=^D vtime=\0 vmin=\1 sxtc=\0
10919 + start=^Q stop=^S susp=^Z eol=\0
10920 + reprint=^R discard=^U werase=^W lnext=^V
10923 +#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
10927 +#define TIOCM_LE 0x001
10928 +#define TIOCM_DTR 0x002
10929 +#define TIOCM_RTS 0x004
10930 +#define TIOCM_ST 0x008
10931 +#define TIOCM_SR 0x010
10932 +#define TIOCM_CTS 0x020
10933 +#define TIOCM_CAR 0x040
10934 +#define TIOCM_RNG 0x080
10935 +#define TIOCM_DSR 0x100
10936 +#define TIOCM_CD TIOCM_CAR
10937 +#define TIOCM_RI TIOCM_RNG
10938 +#define TIOCM_OUT1 0x2000
10939 +#define TIOCM_OUT2 0x4000
10940 +#define TIOCM_LOOP 0x8000
10942 +/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
10947 + * Translate a "termio" structure into a "termios". Ugh.
10949 +#define user_termio_to_kernel_termios(termios, termio) \
10951 + unsigned short tmp; \
10952 + get_user(tmp, &(termio)->c_iflag); \
10953 + (termios)->c_iflag = (0xffff0000 & ((termios)->c_iflag)) | tmp; \
10954 + get_user(tmp, &(termio)->c_oflag); \
10955 + (termios)->c_oflag = (0xffff0000 & ((termios)->c_oflag)) | tmp; \
10956 + get_user(tmp, &(termio)->c_cflag); \
10957 + (termios)->c_cflag = (0xffff0000 & ((termios)->c_cflag)) | tmp; \
10958 + get_user(tmp, &(termio)->c_lflag); \
10959 + (termios)->c_lflag = (0xffff0000 & ((termios)->c_lflag)) | tmp; \
10960 + get_user((termios)->c_line, &(termio)->c_line); \
10961 + copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
10965 + * Translate a "termios" structure into a "termio". Ugh.
10967 +#define kernel_termios_to_user_termio(termio, termios) \
10969 + put_user((termios)->c_iflag, &(termio)->c_iflag); \
10970 + put_user((termios)->c_oflag, &(termio)->c_oflag); \
10971 + put_user((termios)->c_cflag, &(termio)->c_cflag); \
10972 + put_user((termios)->c_lflag, &(termio)->c_lflag); \
10973 + put_user((termios)->c_line, &(termio)->c_line); \
10974 + copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
10977 +#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2))
10978 +#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
10979 +#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
10980 +#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
10982 +#endif /* __KERNEL__ */
10984 +#endif /* _ASM_UBICOM32_TERMIOS_H */
10985 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/thread-asm.h linux-2.6.28.10/arch/ubicom32/include/asm/thread-asm.h
10986 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/thread-asm.h 1970-01-01 02:00:00.000000000 +0200
10987 +++ linux-2.6.28.10/arch/ubicom32/include/asm/thread-asm.h 2009-08-06 10:31:02.000000000 +0300
10990 + * arch/ubicom32/include/asm/thread-asm.h
10991 + * Ubicom32 architecture specific thread definitions.
10993 + * (C) Copyright 2009, Ubicom, Inc.
10995 + * This file is part of the Ubicom32 Linux Kernel Port.
10997 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
10998 + * it and/or modify it under the terms of the GNU General Public License
10999 + * as published by the Free Software Foundation, either version 2 of the
11000 + * License, or (at your option) any later version.
11002 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
11003 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
11004 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11005 + * the GNU General Public License for more details.
11007 + * You should have received a copy of the GNU General Public License
11008 + * along with the Ubicom32 Linux Kernel Port. If not,
11009 + * see <http://www.gnu.org/licenses/>.
11011 + * Ubicom32 implementation derived from (with many thanks):
11016 +#ifndef _ASM_UBICOM32_THREAD_ASM_H
11017 +#define _ASM_UBICOM32_THREAD_ASM_H
11020 + * thread_get_self
11021 + * Read and shift the current thread into reg
11023 +.macro thread_get_self reg
11024 + lsr.4 \reg, ROSR, #2
11025 + and.4 \reg, #31, \reg /* Mask to get thread number into register */
11029 + * thread_get_self_mask
11030 + * Read and shift the current thread mask into reg
11032 +.macro thread_get_self_mask reg
11033 + lsr.4 \reg, ROSR, #2
11034 + lsl.4 \reg, #1, \reg /* Thread bit */
11037 +#endif /* _ASM_UBICOM32_THREAD_ASM_H */
11038 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/thread.h linux-2.6.28.10/arch/ubicom32/include/asm/thread.h
11039 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/thread.h 1970-01-01 02:00:00.000000000 +0200
11040 +++ linux-2.6.28.10/arch/ubicom32/include/asm/thread.h 2009-08-06 10:31:02.000000000 +0300
11043 + * arch/ubicom32/include/asm/thread.h
11044 + * Ubicom32 architecture specific thread definitions.
11046 + * (C) Copyright 2009, Ubicom, Inc.
11048 + * This file is part of the Ubicom32 Linux Kernel Port.
11050 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
11051 + * it and/or modify it under the terms of the GNU General Public License
11052 + * as published by the Free Software Foundation, either version 2 of the
11053 + * License, or (at your option) any later version.
11055 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
11056 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
11057 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11058 + * the GNU General Public License for more details.
11060 + * You should have received a copy of the GNU General Public License
11061 + * along with the Ubicom32 Linux Kernel Port. If not,
11062 + * see <http://www.gnu.org/licenses/>.
11064 + * Ubicom32 implementation derived from (with many thanks):
11069 +#ifndef _ASM_UBICOM32_THREAD_H
11070 +#define _ASM_UBICOM32_THREAD_H
11072 +#if !defined(__ASSEMBLY__)
11074 +#include <asm/ptrace.h>
11075 +#include <asm/ubicom32-common.h>
11077 +typedef int thread_t;
11078 +typedef unsigned char thread_type_t;
11079 +typedef void (*thread_exec_fn_t)(void *arg);
11081 +#define THREAD_NULL 0x40
11082 +#define THREAD_TYPE_HRT (1 << 0)
11083 +#define THREAD_TYPE_SPECIAL 0
11084 +#define THREAD_TYPE_NORMAL 0
11085 +#define THREAD_TYPE_BACKGROUND (1 << 1)
11088 + * This is the upper bound on the maximum hardware threads that one will find
11089 + * on a Ubicom processor. It is used to size per hardware thread data structures.
11091 +#define THREAD_ARCHITECTURAL_MAX 16
11094 + * TODO: Rename this at some point to be thread_
11096 +extern unsigned int sw_ksp[THREAD_ARCHITECTURAL_MAX];
11100 + * thread_get_self()
11102 +static inline thread_t thread_get_self(void)
11106 + "lsr.4 %0, ROSR, #2 \n\t"
11111 + return result & 31;
11115 + * thread_suspend()
11117 +static inline void thread_suspend(void)
11127 + * thread_resume()
11129 +static inline void thread_resume(thread_t thread)
11132 + "move.4 MT_ACTIVE_SET, %0 \n\t"
11133 + "pipe_flush 0 \n\t"
11134 + "pipe_flush 0 \n\t"
11136 + : "d" (1 << thread)
11143 + * thread_enable_mask()
11144 + * Enable all threads in the mask.
11146 + * All writes to MT_EN must be protected by the MT_EN_LOCK bit
11148 +static inline void thread_enable_mask(unsigned int mask)
11151 + * must flush the pipeline twice.
11152 + * first pipe_flush is to ensure write to MT_EN is completed
11153 + * second one is to ensure any new instructions from
11154 + * the targeted thread (the one being disabled), that
11155 + * are issued while the write to MT_EN is being executed,
11158 + UBICOM32_LOCK(MT_EN_LOCK_BIT);
11160 + "or.4 MT_EN, MT_EN, %0 \n\t"
11161 + "pipe_flush 0 \n\t"
11162 + "pipe_flush 0 \n\t"
11167 + UBICOM32_UNLOCK(MT_EN_LOCK_BIT);
11171 + * thread_enable()
11173 +static inline void thread_enable(thread_t thread)
11175 + thread_enable_mask(1 << thread);
11179 + * thread_disable_mask()
11180 + * Disable all threads in the mask.
11182 + * All writes to MT_EN must be protected by the MT_EN_LOCK bit
11184 +static inline void thread_disable_mask(unsigned int mask)
11187 + * must flush the pipeline twice.
11188 + * first pipe_flush is to ensure write to MT_EN is completed
11189 + * second one is to ensure any new instructions from
11190 + * the targeted thread (the one being disabled), that
11191 + * are issued while the write to MT_EN is being executed,
11194 + UBICOM32_LOCK(MT_EN_LOCK_BIT);
11196 + "and.4 MT_EN, MT_EN, %0 \n\t"
11197 + "pipe_flush 0 \n\t"
11198 + "pipe_flush 0 \n\t"
11203 + UBICOM32_UNLOCK(MT_EN_LOCK_BIT);
11207 + * thread_disable()
11209 +static inline void thread_disable(thread_t thread)
11211 + thread_disable_mask(1 << thread);
11215 + * thread_disable_others()
11216 + * Disable all other threads
11218 +static inline void thread_disable_others(void)
11220 + thread_t self = thread_get_self();
11221 + thread_disable_mask(~(1 << self));
11225 + * thread_is_trapped()
11226 + * Is the specified tid trapped?
11228 +static inline int thread_is_trapped(thread_t tid)
11230 + int thread_mask = (1 << tid);
11234 + "move.4 %0, MT_TRAP \n\t"
11235 + : "=d" (trap_thread)
11238 + return (trap_thread & thread_mask);
11242 + * thread_is_enabled()
11243 + * Is the specified tid enabled?
11245 +static inline int thread_is_enabled(thread_t tid)
11247 + int thread_mask = (1 << tid);
11248 + int enabled_threads;
11251 + "move.4 %0, MT_EN \n\t"
11252 + : "=d" (enabled_threads)
11255 + return (enabled_threads & thread_mask);
11259 + * thread_get_instruction_count()
11261 +static inline unsigned int thread_get_instruction_count(void)
11263 + unsigned int result;
11265 + "move.4 %0, INST_CNT \n\t"
11272 + * thread_get_pc()
11273 + * pc could point to a speculative and cancelled instruction unless thread is disabled
11275 +static inline void *thread_get_pc(thread_t thread)
11279 + "move.4 csr, %1 \n\t"
11280 + "setcsr_flush 0 \n\t"
11281 + "move.4 %0, pc \n\t"
11282 + "move.4 csr, #0 \n\t"
11283 + "setcsr_flush 0 \n\t"
11285 + : "r" ((thread << 9) | (1 << 8))
11291 + * thread_get_trap_cause()
11292 + * This should be called only when the thread is not running
11294 +static inline unsigned int thread_get_trap_cause(thread_t thread)
11296 + unsigned int result;
11298 + "move.4 csr, %1 \n\t"
11299 + "setcsr_flush 0 \n\t"
11300 + "move.4 %0, trap_cause \n\t"
11301 + "move.4 csr, #0 \n\t"
11302 + "setcsr_flush 0 \n\t"
11304 + : "r" ((thread << 9) | (1 << 8))
11310 + * THREAD_STALL macro.
11312 +#define THREAD_STALL \
11314 + "move.4 mt_dbg_active_clr, #-1 \n\t" \
11315 + "pipe_flush 0 \n\t" \
11320 +extern unsigned int thread_get_mainline(void);
11321 +extern void thread_set_mainline(thread_t tid);
11322 +extern thread_t thread_alloc(void);
11323 +extern thread_t thread_start(thread_t thread, thread_exec_fn_t exec, void *arg, unsigned int *sp_high, thread_type_t type);
11330 + * thread_get_self
11331 + * Read and shift the current thread into reg
11333 +".macro thread_get_self reg \n\t"
11334 +" lsr.4 \\reg, ROSR, #2 \n\t"
11335 +" and.4 \\reg, #31, \\reg \n\t"/* Mask to get thread number into
11340 + * thread_get_self_mask
11341 + * Read and shift the current thread mask into reg
11343 +".macro thread_get_self_mask reg \n\t"
11344 +" lsr.4 \\reg, ROSR, #2 \n\t"
11345 +" lsl.4 \\reg, #1, \\reg \n\t" /* Thread bit */
11349 +#else /* __ASSEMBLY__ */
11351 +#include <asm/thread-asm.h>
11353 +#endif /* __ASSEMBLY__ */
11354 +#endif /* _ASM_UBICOM32_THREAD_H */
11355 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/thread_info.h linux-2.6.28.10/arch/ubicom32/include/asm/thread_info.h
11356 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/thread_info.h 1970-01-01 02:00:00.000000000 +0200
11357 +++ linux-2.6.28.10/arch/ubicom32/include/asm/thread_info.h 2009-08-06 10:31:02.000000000 +0300
11360 + * arch/ubicom32/include/asm/thread_info.h
11361 + * Ubicom32 architecture low-level thread information.
11363 + * (C) Copyright 2009, Ubicom, Inc.
11364 + * Adapted from the i386 and PPC versions by Greg Ungerer (gerg@snapgear.com)
11365 + * Copyright (C) 2002 David Howells (dhowells@redhat.com)
11366 + * - Incorporating suggestions made by Linus Torvalds and Dave Miller
11368 + * This file is part of the Ubicom32 Linux Kernel Port.
11370 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
11371 + * it and/or modify it under the terms of the GNU General Public License
11372 + * as published by the Free Software Foundation, either version 2 of the
11373 + * License, or (at your option) any later version.
11375 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
11376 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
11377 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11378 + * the GNU General Public License for more details.
11380 + * You should have received a copy of the GNU General Public License
11381 + * along with the Ubicom32 Linux Kernel Port. If not,
11382 + * see <http://www.gnu.org/licenses/>.
11384 + * Ubicom32 implementation derived from (with many thanks):
11390 +#ifndef _ASM_UBICOM32_THREAD_INFO_H
11391 +#define _ASM_UBICOM32_THREAD_INFO_H
11393 +#include <asm/page.h>
11396 + * Size of kernel stack for each process. This must be a power of 2...
11398 +#ifdef CONFIG_4KSTACKS
11399 +#define THREAD_SIZE_ORDER (0)
11401 +#define THREAD_SIZE_ORDER (1)
11405 + * for asm files, THREAD_SIZE is now generated by asm-offsets.c
11407 +#define THREAD_SIZE (PAGE_SIZE<<THREAD_SIZE_ORDER)
11411 +#ifndef __ASSEMBLY__
11414 + * low level task data.
11416 +struct thread_info {
11417 + struct task_struct *task; /* main task structure */
11418 + struct exec_domain *exec_domain; /* execution domain */
11419 + unsigned long flags; /* low level flags */
11420 + int cpu; /* cpu we're on */
11421 + int preempt_count; /* 0 => preemptable, <0 => BUG */
11422 + int interrupt_nesting; /* Interrupt nesting level. */
11423 + struct restart_block restart_block;
11427 + * macros/functions for gaining access to the thread information structure
11429 +#define INIT_THREAD_INFO(tsk) \
11432 + .exec_domain = &default_exec_domain, \
11435 + .interrupt_nesting = 0, \
11436 + .restart_block = { \
11437 + .fn = do_no_restart_syscall, \
11441 +#define init_thread_info (init_thread_union.thread_info)
11442 +#define init_stack (init_thread_union.stack)
11445 +/* how to get the thread information struct from C */
11446 +static inline struct thread_info *current_thread_info(void)
11448 + struct thread_info *ti;
11451 + "and.4 %0, sp, %1\n\t"
11453 + : "d" (~(THREAD_SIZE-1))
11460 +#define STACK_WARN (THREAD_SIZE / 8)
11462 +#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR 1
11464 +/* thread information allocation */
11465 +#define alloc_thread_info(tsk) ((struct thread_info *) \
11466 + __get_free_pages(GFP_KERNEL, THREAD_SIZE_ORDER))
11467 +#define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_SIZE_ORDER)
11468 +#endif /* __ASSEMBLY__ */
11470 +#define PREEMPT_ACTIVE 0x4000000
11473 + * thread information flag bit numbers
11475 +#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
11476 +#define TIF_SIGPENDING 1 /* signal pending */
11477 +#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
11478 +#define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling
11479 + TIF_NEED_RESCHED */
11480 +#define TIF_MEMDIE 4
11482 +/* as above, but as bit values */
11483 +#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
11484 +#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
11485 +#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
11486 +#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
11488 +#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
11490 +#endif /* __KERNEL__ */
11492 +#endif /* _ASM_UBICOM32_THREAD_INFO_H */
11493 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/timex.h linux-2.6.28.10/arch/ubicom32/include/asm/timex.h
11494 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/timex.h 1970-01-01 02:00:00.000000000 +0200
11495 +++ linux-2.6.28.10/arch/ubicom32/include/asm/timex.h 2009-08-06 10:31:02.000000000 +0300
11498 + * arch/ubicom32/include/asm/timex.h
11499 + * Ubicom32 architecture timex specifications.
11501 + * (C) Copyright 2009, Ubicom, Inc.
11503 + * This file is part of the Ubicom32 Linux Kernel Port.
11505 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
11506 + * it and/or modify it under the terms of the GNU General Public License
11507 + * as published by the Free Software Foundation, either version 2 of the
11508 + * License, or (at your option) any later version.
11510 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
11511 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
11512 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11513 + * the GNU General Public License for more details.
11515 + * You should have received a copy of the GNU General Public License
11516 + * along with the Ubicom32 Linux Kernel Port. If not,
11517 + * see <http://www.gnu.org/licenses/>.
11519 + * Ubicom32 implementation derived from (with many thanks):
11524 +#ifndef _ASM_UBICOM32_TIMEX_H
11525 +#define _ASM_UBICOM32_TIMEX_H
11527 +#define CLOCK_TICK_RATE 266000000
11529 +// #define ARCH_HAS_READ_CURRENT_TIMER
11531 +typedef unsigned long cycles_t;
11533 +static inline cycles_t get_cycles(void)
11538 +extern int timer_alloc(void);
11539 +extern void timer_set(int timervector, unsigned int cycles);
11540 +extern int timer_reset(int timervector, unsigned int cycles);
11541 +extern void timer_tick_init(void);
11542 +extern void timer_device_init(void);
11544 +#if defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST)
11545 +extern void local_timer_interrupt(void);
11548 +#if defined(CONFIG_LOCAL_TIMERS) || defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST)
11549 +extern int local_timer_setup(unsigned int cpu);
11552 +#endif /* _ASM_UBICOM32_TIMEX_H */
11553 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/tlbflush.h linux-2.6.28.10/arch/ubicom32/include/asm/tlbflush.h
11554 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/tlbflush.h 1970-01-01 02:00:00.000000000 +0200
11555 +++ linux-2.6.28.10/arch/ubicom32/include/asm/tlbflush.h 2009-08-06 10:31:02.000000000 +0300
11558 + * arch/ubicom32/include/asm/tlbflush.h
11559 + * TLB operations for Ubicom32 architecture.
11561 + * (C) Copyright 2009, Ubicom, Inc.
11562 + * Copyright (C) 2000 Lineo, David McCullough <davidm@uclinux.org>
11563 + * Copyright (C) 2000-2002, Greg Ungerer <gerg@snapgear.com>
11565 + * This file is part of the Ubicom32 Linux Kernel Port.
11567 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
11568 + * it and/or modify it under the terms of the GNU General Public License
11569 + * as published by the Free Software Foundation, either version 2 of the
11570 + * License, or (at your option) any later version.
11572 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
11573 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
11574 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11575 + * the GNU General Public License for more details.
11577 + * You should have received a copy of the GNU General Public License
11578 + * along with the Ubicom32 Linux Kernel Port. If not,
11579 + * see <http://www.gnu.org/licenses/>.
11581 + * Ubicom32 implementation derived from (with many thanks):
11586 +#ifndef _ASM_UBICOM32_TLB_FLUSH_H
11587 +#define _ASM_UBICOM32_TLB_FLUSH_H
11589 +#include <asm/setup.h>
11592 + * flush all user-space atc entries.
11594 +static inline void __flush_tlb(void)
11599 +static inline void __flush_tlb_one(unsigned long addr)
11604 +#define flush_tlb() __flush_tlb()
11607 + * flush all atc entries (both kernel and user-space entries).
11609 +static inline void flush_tlb_all(void)
11614 +static inline void flush_tlb_mm(struct mm_struct *mm)
11619 +static inline void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr)
11624 +static inline void flush_tlb_range(struct mm_struct *mm,
11625 + unsigned long start, unsigned long end)
11630 +static inline void flush_tlb_kernel_page(unsigned long addr)
11635 +#endif /* _ASM_UBICOM32_TLB_FLUSH_H */
11636 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/tlb.h linux-2.6.28.10/arch/ubicom32/include/asm/tlb.h
11637 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/tlb.h 1970-01-01 02:00:00.000000000 +0200
11638 +++ linux-2.6.28.10/arch/ubicom32/include/asm/tlb.h 2009-08-06 10:31:02.000000000 +0300
11641 + * arch/ubicom32/include/asm/tlb.h
11642 + * Ubicom32 architecture TLB operations.
11644 + * (C) Copyright 2009, Ubicom, Inc.
11646 + * This file is part of the Ubicom32 Linux Kernel Port.
11648 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
11649 + * it and/or modify it under the terms of the GNU General Public License
11650 + * as published by the Free Software Foundation, either version 2 of the
11651 + * License, or (at your option) any later version.
11653 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
11654 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
11655 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11656 + * the GNU General Public License for more details.
11658 + * You should have received a copy of the GNU General Public License
11659 + * along with the Ubicom32 Linux Kernel Port. If not,
11660 + * see <http://www.gnu.org/licenses/>.
11662 + * Ubicom32 implementation derived from (with many thanks):
11667 +#ifndef _ASM_UBICOM32_TLB_H
11668 +#define _ASM_UBICOM32_TLB_H
11671 + * ubicom32 doesn't need any special per-pte or
11672 + * per-vma handling..
11674 +#define tlb_start_vma(tlb, vma) do { } while (0)
11675 +#define tlb_end_vma(tlb, vma) do { } while (0)
11676 +#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
11679 + * .. because we flush the whole mm when it
11682 +#define tlb_flush(tlb)
11684 +#include <asm-generic/tlb.h>
11686 +#endif /* _ASM_UBICOM32_TLB_H */
11687 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/topology.h linux-2.6.28.10/arch/ubicom32/include/asm/topology.h
11688 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/topology.h 1970-01-01 02:00:00.000000000 +0200
11689 +++ linux-2.6.28.10/arch/ubicom32/include/asm/topology.h 2009-08-06 10:31:02.000000000 +0300
11692 + * arch/ubicom32/include/asm/topology.h
11693 + * Generic topology.h definitions for Ubicom32 architecture.
11695 + * (C) Copyright 2009, Ubicom, Inc.
11697 + * This file is part of the Ubicom32 Linux Kernel Port.
11699 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
11700 + * it and/or modify it under the terms of the GNU General Public License
11701 + * as published by the Free Software Foundation, either version 2 of the
11702 + * License, or (at your option) any later version.
11704 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
11705 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
11706 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11707 + * the GNU General Public License for more details.
11709 + * You should have received a copy of the GNU General Public License
11710 + * along with the Ubicom32 Linux Kernel Port. If not,
11711 + * see <http://www.gnu.org/licenses/>.
11713 + * Ubicom32 implementation derived from (with many thanks):
11718 +#ifndef _ASM_UBICOM32_TOPOLOGY_H
11719 +#define _ASM_UBICOM32_TOPOLOGY_H
11721 +#include <asm-generic/topology.h>
11723 +#endif /* _ASM_UBICOM32_TOPOLOGY_H */
11724 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/traps.h linux-2.6.28.10/arch/ubicom32/include/asm/traps.h
11725 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/traps.h 1970-01-01 02:00:00.000000000 +0200
11726 +++ linux-2.6.28.10/arch/ubicom32/include/asm/traps.h 2009-08-06 10:31:02.000000000 +0300
11729 + * arch/ubicom32/include/asm/traps.h
11730 + * Trap related definitions for Ubicom32 architecture.
11732 + * (C) Copyright 2009, Ubicom, Inc.
11734 + * This file is part of the Ubicom32 Linux Kernel Port.
11736 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
11737 + * it and/or modify it under the terms of the GNU General Public License
11738 + * as published by the Free Software Foundation, either version 2 of the
11739 + * License, or (at your option) any later version.
11741 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
11742 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
11743 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11744 + * the GNU General Public License for more details.
11746 + * You should have received a copy of the GNU General Public License
11747 + * along with the Ubicom32 Linux Kernel Port. If not,
11748 + * see <http://www.gnu.org/licenses/>.
11750 + * Ubicom32 implementation derived from (with many thanks):
11756 +#ifndef _ASM_UBICOM32_TRAPS_H
11757 +#define _ASM_UBICOM32_TRAPS_H
11760 + * Trap causes passed from ultra to Host OS
11762 +#define TRAP_CAUSE_TOTAL 13
11763 +#define TRAP_CAUSE_DST_RANGE_ERR 12
11764 +#define TRAP_CAUSE_SRC1_RANGE_ERR 11
11765 +#define TRAP_CAUSE_I_RANGE_ERR 10
11766 +#define TRAP_CAUSE_DCAPT 9
11767 +#define TRAP_CAUSE_DST_SERROR 8
11768 +#define TRAP_CAUSE_SRC1_SERROR 7
11769 +#define TRAP_CAUSE_DST_MISALIGNED 6
11770 +#define TRAP_CAUSE_SRC1_MISALIGNED 5
11771 +#define TRAP_CAUSE_DST_DECODE_ERR 4
11772 +#define TRAP_CAUSE_SRC1_DECODE_ERR 3
11773 +#define TRAP_CAUSE_ILLEGAL_INST 2
11774 +#define TRAP_CAUSE_I_SERROR 1
11775 +#define TRAP_CAUSE_I_DECODE_ERR 0
11777 +extern void trap_handler(int irq, struct pt_regs *regs);
11778 +extern void trap_init_interrupt(void);
11779 +extern void unaligned_emulate(unsigned int thread);
11780 +extern int unaligned_only(unsigned int cause);
11782 +#endif /* _ASM_UBICOM32_TRAPS_H */
11783 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/types.h linux-2.6.28.10/arch/ubicom32/include/asm/types.h
11784 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/types.h 1970-01-01 02:00:00.000000000 +0200
11785 +++ linux-2.6.28.10/arch/ubicom32/include/asm/types.h 2009-08-06 10:31:02.000000000 +0300
11788 + * arch/ubicom32/include/asm/types.h
11789 + * Date type definitions for Ubicom32 architecture.
11791 + * (C) Copyright 2009, Ubicom, Inc.
11793 + * This file is part of the Ubicom32 Linux Kernel Port.
11795 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
11796 + * it and/or modify it under the terms of the GNU General Public License
11797 + * as published by the Free Software Foundation, either version 2 of the
11798 + * License, or (at your option) any later version.
11800 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
11801 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
11802 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11803 + * the GNU General Public License for more details.
11805 + * You should have received a copy of the GNU General Public License
11806 + * along with the Ubicom32 Linux Kernel Port. If not,
11807 + * see <http://www.gnu.org/licenses/>.
11809 + * Ubicom32 implementation derived from (with many thanks):
11814 +#ifndef _ASM_UBICOM32_TYPES_H
11815 +#define _ASM_UBICOM32_TYPES_H
11818 + * This file is never included by application software unless
11819 + * explicitly requested (e.g., via linux/types.h) in which case the
11820 + * application is Linux specific so (user-) name space pollution is
11821 + * not a major issue. However, for interoperability, libraries still
11822 + * need to be careful to avoid a name clashes.
11825 +#include <asm-generic/int-ll64.h>
11827 +#ifndef __ASSEMBLY__
11829 +typedef unsigned short umode_t;
11831 +#endif /* __ASSEMBLY__ */
11834 + * These aren't exported outside the kernel to avoid name space clashes
11838 +#define BITS_PER_LONG 32
11840 +#ifndef __ASSEMBLY__
11842 +/* DMA addresses are always 32-bits wide */
11844 +typedef u32 dma_addr_t;
11845 +typedef u32 dma64_addr_t;
11848 + * XXX These are "Ubicom style" typedefs. They should be removed in all files used by linux.
11850 +typedef u32 u32_t;
11851 +typedef s32 s32_t;
11852 +typedef u16 u16_t;
11853 +typedef s16 s16_t;
11857 +#endif /* __ASSEMBLY__ */
11859 +#endif /* __KERNEL__ */
11861 +#endif /* _ASM_UBICOM32_TYPES_H */
11862 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/uaccess.h linux-2.6.28.10/arch/ubicom32/include/asm/uaccess.h
11863 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/uaccess.h 1970-01-01 02:00:00.000000000 +0200
11864 +++ linux-2.6.28.10/arch/ubicom32/include/asm/uaccess.h 2009-08-06 10:31:02.000000000 +0300
11867 + * arch/ubicom32/include/asm/uaccess.h
11868 + * User space memory access functions for Ubicom32 architecture.
11870 + * (C) Copyright 2009, Ubicom, Inc.
11872 + * This file is part of the Ubicom32 Linux Kernel Port.
11874 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
11875 + * it and/or modify it under the terms of the GNU General Public License
11876 + * as published by the Free Software Foundation, either version 2 of the
11877 + * License, or (at your option) any later version.
11879 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
11880 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
11881 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11882 + * the GNU General Public License for more details.
11884 + * You should have received a copy of the GNU General Public License
11885 + * along with the Ubicom32 Linux Kernel Port. If not,
11886 + * see <http://www.gnu.org/licenses/>.
11888 + * Ubicom32 implementation derived from (with many thanks):
11894 +#ifndef _ASM_UBICOM32_UACCESS_H
11895 +#define _ASM_UBICOM32_UACCESS_H
11898 + * User space memory access functions
11900 +#include <linux/sched.h>
11901 +#include <linux/mm.h>
11902 +#include <linux/string.h>
11904 +#include <asm/segment.h>
11906 +#define VERIFY_READ 0
11907 +#define VERIFY_WRITE 1
11910 + * The exception table consists of pairs of addresses: the first is the
11911 + * address of an instruction that is allowed to fault, and the second is
11912 + * the address at which the program should continue. No registers are
11913 + * modified, so it is entirely up to the continuation code to figure out
11916 + * All the routines below use bits of fixup code that are out of line
11917 + * with the main instruction path. This means when everything is well,
11918 + * we don't even have to jump over them. Further, they do not intrude
11919 + * on our cache or tlb entries.
11921 +struct exception_table_entry
11923 + unsigned long insn, fixup;
11927 + * Ubicom32 does not currently support the exception table handling.
11929 +extern unsigned long search_exception_table(unsigned long);
11932 +#if defined(CONFIG_ACCESS_OK_CHECKS_ENABLED)
11933 +extern int __access_ok(unsigned long addr, unsigned long size);
11935 +static inline int __access_ok(unsigned long addr, unsigned long size)
11940 +#define access_ok(type, addr, size) \
11941 + likely(__access_ok((unsigned long)(addr), (size)))
11944 + * The following functions do not exist. They keep callers
11945 + * of put_user and get_user from passing unsupported argument
11946 + * types. They result in a link time error.
11948 +extern int __put_user_bad(void);
11949 +extern int __get_user_bad(void);
11952 + * __put_user_no_check()
11953 + * Put the requested data into the user space verifying the address
11956 + * (a) re-use the arguments for side effects (sizeof/typeof is ok)
11957 + * (b) require any knowledge of processes at this stage
11959 +#define __put_user_no_check(x, ptr, size) \
11961 + int __pu_err = 0; \
11962 + __typeof__(*(ptr)) __user *__pu_addr = (ptr); \
11963 + switch (size) { \
11968 + *__pu_addr = (__typeof__(*(ptr)))x; \
11971 + __pu_err = __put_user_bad(); \
11978 + * __put_user_check()
11979 + * Put the requested data into the user space verifying the address
11982 + * (a) re-use the arguments for side effects (sizeof/typeof is ok)
11983 + * (b) require any knowledge of processes at this stage
11985 + * If requested, access_ok() will verify that ptr is a valid user
11988 +#define __put_user_check(x, ptr, size) \
11990 + int __pu_err = -EFAULT; \
11991 + __typeof__(*(ptr)) __user *__pu_addr = (ptr); \
11992 + if (access_ok(VERIFY_WRITE, __pu_addr, size)) { \
11994 + switch (size) { \
11999 + *__pu_addr = (__typeof__(*(ptr)))x; \
12002 + __pu_err = __put_user_bad(); \
12010 + * __get_user_no_check()
12011 + * Read the value at ptr into x.
12013 + * If requested, access_ok() will verify that ptr is a valid user
12014 + * pointer. If the caller passes a modifying argument for ptr (e.g. x++)
12015 + * this macro will not work.
12017 +#define __get_user_no_check(x, ptr, size) \
12019 + int __gu_err = 0; \
12020 + __typeof__((x)) __gu_val = 0; \
12021 + const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \
12022 + switch (size) { \
12027 + __gu_val = (__typeof__((x)))*(__gu_addr); \
12030 + __gu_err = __get_user_bad(); \
12034 + (x) = __gu_val; \
12039 + * __get_user_check()
12040 + * Read the value at ptr into x.
12042 + * If requested, access_ok() will verify that ptr is a valid user
12045 +#define __get_user_check(x, ptr, size) \
12047 + int __gu_err = -EFAULT; \
12048 + __typeof__(x) __gu_val = 0; \
12049 + const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \
12050 + if (access_ok(VERIFY_READ, __gu_addr, size)) { \
12052 + switch (size) { \
12057 + __gu_val = (__typeof__((x)))*(__gu_addr); \
12060 + __gu_err = __get_user_bad(); \
12065 + (x) = __gu_val; \
12070 + * The "xxx" versions are allowed to perform some amount of address
12071 + * space checking. See access_ok().
12073 +#define put_user(x,ptr) \
12074 + __put_user_check((__typeof__(*(ptr)))(x),(ptr), sizeof(*(ptr)))
12075 +#define get_user(x,ptr) \
12076 + __get_user_check((x), (ptr), sizeof(*(ptr)))
12079 + * The "__xxx" versions do not do address space checking, useful when
12080 + * doing multiple accesses to the same area (the programmer has to do the
12081 + * checks by hand with "access_ok()")
12083 +#define __put_user(x,ptr) \
12084 + __put_user_no_check((__typeof__(*(ptr)))(x),(ptr), sizeof(*(ptr)))
12085 +#define __get_user(x,ptr) \
12086 + __get_user_no_check((x), (ptr), sizeof(*(ptr)))
12089 + * __copy_tofrom_user_no_check()
12090 + * Copy the data either to or from user space.
12092 + * Return the number of bytes NOT copied.
12094 +static inline unsigned long
12095 +__copy_tofrom_user_no_check(void *to, const void *from, unsigned long n)
12097 + memcpy(to, from, n);
12103 + * Copy the kernel data to user space.
12105 + * Return the number of bytes that were copied.
12107 +static inline unsigned long
12108 +copy_to_user(void __user *to, const void *from, unsigned long n)
12110 + if (!access_ok(VERIFY_WRITE, to, n)) {
12113 + return __copy_tofrom_user_no_check((__force void *)to, from, n);
12117 + * copy_from_user()
12118 + * Copy the user data to kernel space.
12120 + * Return the number of bytes that were copied. On error, we zero
12121 + * out the destination.
12123 +static inline unsigned long
12124 +copy_from_user(void *to, const void __user *from, unsigned long n)
12126 + if (!access_ok(VERIFY_READ, from, n)) {
12129 + return __copy_tofrom_user_no_check(to, (__force void *)from, n);
12132 +#define __copy_to_user(to, from, n) \
12133 + __copy_tofrom_user_no_check((__force void *)to, from, n)
12134 +#define __copy_from_user(to, from, n) \
12135 + __copy_tofrom_user_no_check(to, (__force void *)from, n)
12136 +#define __copy_to_user_inatomic(to, from, n) \
12137 + __copy_tofrom_user_no_check((__force void *)to, from, n)
12138 +#define __copy_from_user_inatomic(to, from, n) \
12139 + __copy_tofrom_user_no_check(to, (__force void *)from, n)
12141 +#define copy_to_user_ret(to, from, n, retval) \
12142 + ({ if (copy_to_user(to, from, n)) return retval; })
12144 +#define copy_from_user_ret(to, from, n, retval) \
12145 + ({ if (copy_from_user(to, from, n)) return retval; })
12148 + * strncpy_from_user()
12149 + * Copy a null terminated string from userspace.
12151 + * dst - Destination in kernel space. The buffer must be at least count.
12152 + * src - Address of string in user space.
12153 + * count - Maximum number of bytes to copy (including the trailing NULL).
12155 + * Returns the length of the string (not including the trailing NULL. If
12156 + * count is smaller than the length of the string, we copy count bytes
12157 + * and return count.
12160 +static inline long strncpy_from_user(char *dst, const __user char *src, long count)
12163 + if (!access_ok(VERIFY_READ, src, 1)) {
12167 + strncpy(dst, src, count);
12168 + for (tmp = dst; *tmp && count > 0; tmp++, count--) {
12171 + return(tmp - dst);
12176 + * Return the size of a string (including the ending 0)
12178 + * Return -EFAULT on exception, a value greater than <n> if too long
12180 +static inline long strnlen_user(const __user char *src, long n)
12182 + if (!access_ok(VERIFY_READ, src, 1)) {
12185 + return(strlen(src) + 1);
12188 +#define strlen_user(str) strnlen_user(str, 32767)
12194 +static inline unsigned long __clear_user(__user void *to, unsigned long n)
12196 + memset(to, 0, n);
12202 + * Zero user space (check for valid addresses)
12204 +static inline unsigned long clear_user(__user void *to, unsigned long n)
12206 + if (!access_ok(VERIFY_WRITE, to, n)) {
12209 + return __clear_user(to, n);
12212 +#endif /* _ASM_UBICOM32_UACCESS_H */
12213 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/ubicom32-common-asm.h linux-2.6.28.10/arch/ubicom32/include/asm/ubicom32-common-asm.h
12214 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/ubicom32-common-asm.h 1970-01-01 02:00:00.000000000 +0200
12215 +++ linux-2.6.28.10/arch/ubicom32/include/asm/ubicom32-common-asm.h 2009-08-06 10:31:02.000000000 +0300
12218 + * arch/ubicom32/include/asm/ubicom32-common-asm.h
12219 + * Ubicom32 atomic lock operations.
12221 + * (C) Copyright 2009, Ubicom, Inc.
12223 + * This file is part of the Ubicom32 Linux Kernel Port.
12225 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
12226 + * it and/or modify it under the terms of the GNU General Public License
12227 + * as published by the Free Software Foundation, either version 2 of the
12228 + * License, or (at your option) any later version.
12230 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
12231 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12232 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
12233 + * the GNU General Public License for more details.
12235 + * You should have received a copy of the GNU General Public License
12236 + * along with the Ubicom32 Linux Kernel Port. If not,
12237 + * see <http://www.gnu.org/licenses/>.
12239 + * Ubicom32 implementation derived from (with many thanks):
12245 +#ifndef _ASM_UBICOM32_UBICOM32_COMMON_ASM_H
12246 +#define _ASM_UBICOM32_UBICOM32_COMMON_ASM_H
12249 + * atomic_lock_acquire macro
12250 + * Equivalent to __atomic_lock_acquire()
12252 +.macro atomic_lock_acquire
12253 + bset scratchpad1, scratchpad1, #ATOMIC_LOCK_BIT
12258 + * atomic_lock_release macro
12259 + * Equivalent to __atomic_lock_release()
12261 +.macro atomic_lock_release
12262 + bclr scratchpad1, scratchpad1, #ATOMIC_LOCK_BIT
12265 +#endif /* _ASM_UBICOM32_UBICOM32_COMMON_ASM_H */
12266 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/ubicom32-common.h linux-2.6.28.10/arch/ubicom32/include/asm/ubicom32-common.h
12267 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/ubicom32-common.h 1970-01-01 02:00:00.000000000 +0200
12268 +++ linux-2.6.28.10/arch/ubicom32/include/asm/ubicom32-common.h 2009-08-06 10:31:02.000000000 +0300
12271 + * arch/ubicom32/include/asm/ubicom32-common.h
12272 + * Ubicom32 atomic lock operations.
12274 + * (C) Copyright 2009, Ubicom, Inc.
12276 + * This file is part of the Ubicom32 Linux Kernel Port.
12278 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
12279 + * it and/or modify it under the terms of the GNU General Public License
12280 + * as published by the Free Software Foundation, either version 2 of the
12281 + * License, or (at your option) any later version.
12283 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
12284 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12285 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
12286 + * the GNU General Public License for more details.
12288 + * You should have received a copy of the GNU General Public License
12289 + * along with the Ubicom32 Linux Kernel Port. If not,
12290 + * see <http://www.gnu.org/licenses/>.
12292 + * Ubicom32 implementation derived from (with many thanks):
12298 +#ifndef _ASM_UBICOM32_UBICOM32_COMMON_H
12299 +#define _ASM_UBICOM32_UBICOM32_COMMON_H
12301 +#define S(arg) #arg
12302 +#define D(arg) S(arg)
12304 + * scratchpad1 is owned by the LDSR.
12306 + * The upper bits provide 16 global spinlocks. Acquiring one of these
12307 + * global spinlocks synchornizes across multiple threads and prevents
12308 + * the LDSR from delivering any interrupts while the lock is held.
12309 + * Use these locks only when absolutely required.
12311 + * The lower 16 bits of scratchpad1 are used as per thread interrupt
12312 + * enable/disable bits. These bits will prevent a thread from receiving
12313 + * any interrupts.
12316 + * - MT_EN_LOCK_BIT - Protects writes to MT_EN, so code can read current value
12317 + * then write a new value atomically (profiler for example)
12318 + * - ATOMIC_LOCK_BIT - Used to provide general purpose atomic handling.
12319 + * - LDSR_LOCK_BIT - Used by the LDSR exclusively to provide protection.
12320 + * - LSB 16 bits - Used by the LDSR to represent thread enable/disable bits.
12322 +#define MT_EN_LOCK_BIT 31
12323 +#define ATOMIC_LOCK_BIT 30
12324 +#define LDSR_LOCK_BIT 29
12325 +#define PCI_LOCK_BIT 28
12327 +#if !defined(__ASSEMBLY__)
12329 +#define UBICOM32_TRYLOCK(bit) \
12331 + " move.4 %0, #0 \n\t" \
12332 + " bset scratchpad1, scratchpad1, #"D(bit)" \n\t" \
12333 + " jmpne.f 1f \n\t" \
12334 + " move.4 %0, #1 \n\t" \
12338 + : "cc", "memory" \
12341 +#define UBICOM32_UNLOCK(bit) \
12343 + " bclr scratchpad1, scratchpad1, #"D(bit)" \n\t" \
12346 + : "cc", "memory" \
12349 +#define UBICOM32_LOCK(bit) \
12351 + "1: bset scratchpad1, scratchpad1, #"D(bit)" \n\t" \
12352 + " jmpne.f 1b \n\t" \
12355 + : "cc", "memory" \
12359 + * __atomic_lock_trylock()
12360 + * Attempt to acquire the lock, return TRUE if acquired.
12362 +static inline int __atomic_lock_trylock(void)
12365 + UBICOM32_TRYLOCK(ATOMIC_LOCK_BIT);
12370 + * __atomic_lock_release()
12371 + * Release the global atomic lock.
12373 + * Note: no one is suspended waiting since this lock is a spinning lock.
12375 +static inline void __atomic_lock_release(void)
12377 + UBICOM32_UNLOCK(ATOMIC_LOCK_BIT);
12381 + * __atomic_lock_acquire()
12382 + * Acquire the global atomic lock, spin if not available.
12384 +static inline void __atomic_lock_acquire(void)
12386 + UBICOM32_LOCK(ATOMIC_LOCK_BIT);
12388 +#else /* __ASSEMBLY__ */
12390 +#include <asm/ubicom32-common-asm.h>
12392 +#endif /* __ASSEMBLY__ */
12393 +#endif /* _ASM_UBICOM32_UBICOM32_COMMON_H */
12394 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/ucontext.h linux-2.6.28.10/arch/ubicom32/include/asm/ucontext.h
12395 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/ucontext.h 1970-01-01 02:00:00.000000000 +0200
12396 +++ linux-2.6.28.10/arch/ubicom32/include/asm/ucontext.h 2009-08-06 10:31:02.000000000 +0300
12399 + * arch/ubicom32/include/asm/ucontext.h
12400 + * Definition of ucontext structure for Ubicom32 architecture.
12402 + * (C) Copyright 2009, Ubicom, Inc.
12404 + * This file is part of the Ubicom32 Linux Kernel Port.
12406 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
12407 + * it and/or modify it under the terms of the GNU General Public License
12408 + * as published by the Free Software Foundation, either version 2 of the
12409 + * License, or (at your option) any later version.
12411 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
12412 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12413 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
12414 + * the GNU General Public License for more details.
12416 + * You should have received a copy of the GNU General Public License
12417 + * along with the Ubicom32 Linux Kernel Port. If not,
12418 + * see <http://www.gnu.org/licenses/>.
12420 + * Ubicom32 implementation derived from (with many thanks):
12425 +#ifndef _ASM_UBICOM32_UCONTEXT_H
12426 +#define _ASM_UBICOM32_UCONTEXT_H
12429 + unsigned long uc_flags;
12430 + struct ucontext *uc_link;
12431 + stack_t uc_stack;
12432 + struct sigcontext uc_mcontext;
12433 + sigset_t uc_sigmask; /* mask last for extensibility */
12436 +#endif /* _ASM_UBICOM32_UCONTEXT_H */
12437 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/unaligned.h linux-2.6.28.10/arch/ubicom32/include/asm/unaligned.h
12438 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/unaligned.h 1970-01-01 02:00:00.000000000 +0200
12439 +++ linux-2.6.28.10/arch/ubicom32/include/asm/unaligned.h 2009-08-06 10:31:02.000000000 +0300
12442 + * arch/ubicom32/include/asm/unaligned.h
12443 + * Ubicom32 architecture unaligned memory access definitions.
12445 + * (C) Copyright 2009, Ubicom, Inc.
12447 + * This file is part of the Ubicom32 Linux Kernel Port.
12449 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
12450 + * it and/or modify it under the terms of the GNU General Public License
12451 + * as published by the Free Software Foundation, either version 2 of the
12452 + * License, or (at your option) any later version.
12454 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
12455 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12456 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
12457 + * the GNU General Public License for more details.
12459 + * You should have received a copy of the GNU General Public License
12460 + * along with the Ubicom32 Linux Kernel Port. If not,
12461 + * see <http://www.gnu.org/licenses/>.
12463 + * Ubicom32 implementation derived from (with many thanks):
12468 + * TODO: This is a copy of arm unaligned handling that probably needs
12469 + * to be optimized for UBICOM32, but it works for now.
12472 +#ifndef _ASM_UBICOM32_UNALIGNED_H
12473 +#define _ASM_UBICOM32_UNALIGNED_H
12475 +#include <asm/types.h>
12477 +#include <linux/unaligned/le_byteshift.h>
12478 +#include <linux/unaligned/be_byteshift.h>
12479 +#include <linux/unaligned/generic.h>
12481 +#define get_unaligned __get_unaligned_be
12482 +#define put_unaligned __put_unaligned_be
12484 +#endif /* _ASM_UBICOM32_UNALIGNED_H */
12485 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/unistd.h linux-2.6.28.10/arch/ubicom32/include/asm/unistd.h
12486 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/unistd.h 1970-01-01 02:00:00.000000000 +0200
12487 +++ linux-2.6.28.10/arch/ubicom32/include/asm/unistd.h 2009-08-06 10:31:02.000000000 +0300
12490 + * arch/ubicom32/include/asm/unistd.h
12491 + * Ubicom32 architecture syscall definitions.
12493 + * (C) Copyright 2009, Ubicom, Inc.
12495 + * This file is part of the Ubicom32 Linux Kernel Port.
12497 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
12498 + * it and/or modify it under the terms of the GNU General Public License
12499 + * as published by the Free Software Foundation, either version 2 of the
12500 + * License, or (at your option) any later version.
12502 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
12503 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12504 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
12505 + * the GNU General Public License for more details.
12507 + * You should have received a copy of the GNU General Public License
12508 + * along with the Ubicom32 Linux Kernel Port. If not,
12509 + * see <http://www.gnu.org/licenses/>.
12511 + * Ubicom32 implementation derived from (with many thanks):
12516 +#ifndef _ASM_UBICOM32_UNISTD_H
12517 +#define _ASM_UBICOM32_UNISTD_H
12520 + * This file contains the system call numbers.
12523 +#define __NR_restart_syscall 0
12524 +#define __NR_exit 1
12525 +#define __NR_fork 2
12526 +#define __NR_read 3
12527 +#define __NR_write 4
12528 +#define __NR_open 5
12529 +#define __NR_close 6
12530 +#define __NR_waitpid 7
12531 +#define __NR_creat 8
12532 +#define __NR_link 9
12533 +#define __NR_unlink 10
12534 +#define __NR_execve 11
12535 +#define __NR_chdir 12
12536 +#define __NR_time 13
12537 +#define __NR_mknod 14
12538 +#define __NR_chmod 15
12539 +#define __NR_chown 16
12540 +#define __NR_break 17
12541 +#define __NR_oldstat 18
12542 +#define __NR_lseek 19
12543 +#define __NR_getpid 20
12544 +#define __NR_mount 21
12545 +#define __NR_umount 22
12546 +#define __NR_setuid 23
12547 +#define __NR_getuid 24
12548 +#define __NR_stime 25
12549 +#define __NR_ptrace 26
12550 +#define __NR_alarm 27
12551 +#define __NR_oldfstat 28
12552 +#define __NR_pause 29
12553 +#define __NR_utime 30
12554 +#define __NR_stty 31
12555 +#define __NR_gtty 32
12556 +#define __NR_access 33
12557 +#define __NR_nice 34
12558 +#define __NR_ftime 35
12559 +#define __NR_sync 36
12560 +#define __NR_kill 37
12561 +#define __NR_rename 38
12562 +#define __NR_mkdir 39
12563 +#define __NR_rmdir 40
12564 +#define __NR_dup 41
12565 +#define __NR_pipe 42
12566 +#define __NR_times 43
12567 +#define __NR_prof 44
12568 +#define __NR_brk 45
12569 +#define __NR_setgid 46
12570 +#define __NR_getgid 47
12571 +#define __NR_signal 48
12572 +#define __NR_geteuid 49
12573 +#define __NR_getegid 50
12574 +#define __NR_acct 51
12575 +#define __NR_umount2 52
12576 +#define __NR_lock 53
12577 +#define __NR_ioctl 54
12578 +#define __NR_fcntl 55
12579 +#define __NR_mpx 56
12580 +#define __NR_setpgid 57
12581 +#define __NR_ulimit 58
12582 +#define __NR_oldolduname 59
12583 +#define __NR_umask 60
12584 +#define __NR_chroot 61
12585 +#define __NR_ustat 62
12586 +#define __NR_dup2 63
12587 +#define __NR_getppid 64
12588 +#define __NR_getpgrp 65
12589 +#define __NR_setsid 66
12590 +#define __NR_sigaction 67
12591 +#define __NR_sgetmask 68
12592 +#define __NR_ssetmask 69
12593 +#define __NR_setreuid 70
12594 +#define __NR_setregid 71
12595 +#define __NR_sigsuspend 72
12596 +#define __NR_sigpending 73
12597 +#define __NR_sethostname 74
12598 +#define __NR_setrlimit 75
12599 +#define __NR_getrlimit 76
12600 +#define __NR_getrusage 77
12601 +#define __NR_gettimeofday 78
12602 +#define __NR_settimeofday 79
12603 +#define __NR_getgroups 80
12604 +#define __NR_setgroups 81
12605 +#define __NR_select 82
12606 +#define __NR_symlink 83
12607 +#define __NR_oldlstat 84
12608 +#define __NR_readlink 85
12609 +#define __NR_uselib 86
12610 +#define __NR_swapon 87
12611 +#define __NR_reboot 88
12612 +#define __NR_readdir 89
12613 +#define __NR_mmap 90
12614 +#define __NR_munmap 91
12615 +#define __NR_truncate 92
12616 +#define __NR_ftruncate 93
12617 +#define __NR_fchmod 94
12618 +#define __NR_fchown 95
12619 +#define __NR_getpriority 96
12620 +#define __NR_setpriority 97
12621 +#define __NR_profil 98
12622 +#define __NR_statfs 99
12623 +#define __NR_fstatfs 100
12624 +#define __NR_ioperm 101
12625 +#define __NR_socketcall 102
12626 +#define __NR_syslog 103
12627 +#define __NR_setitimer 104
12628 +#define __NR_getitimer 105
12629 +#define __NR_stat 106
12630 +#define __NR_lstat 107
12631 +#define __NR_fstat 108
12632 +#define __NR_olduname 109
12633 +#define __NR_iopl /* 110 */ not supported
12634 +#define __NR_vhangup 111
12635 +#define __NR_idle /* 112 */ Obsolete
12636 +#define __NR_vm86 /* 113 */ not supported
12637 +#define __NR_wait4 114
12638 +#define __NR_swapoff 115
12639 +#define __NR_sysinfo 116
12640 +#define __NR_ipc 117
12641 +#define __NR_fsync 118
12642 +#define __NR_sigreturn 119
12643 +#define __NR_clone 120
12644 +#define __NR_setdomainname 121
12645 +#define __NR_uname 122
12646 +#define __NR_cacheflush 123
12647 +#define __NR_adjtimex 124
12648 +#define __NR_mprotect 125
12649 +#define __NR_sigprocmask 126
12650 +#define __NR_create_module 127
12651 +#define __NR_init_module 128
12652 +#define __NR_delete_module 129
12653 +#define __NR_get_kernel_syms 130
12654 +#define __NR_quotactl 131
12655 +#define __NR_getpgid 132
12656 +#define __NR_fchdir 133
12657 +#define __NR_bdflush 134
12658 +#define __NR_sysfs 135
12659 +#define __NR_personality 136
12660 +#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
12661 +#define __NR_setfsuid 138
12662 +#define __NR_setfsgid 139
12663 +#define __NR__llseek 140
12664 +#define __NR_getdents 141
12665 +#define __NR__newselect 142
12666 +#define __NR_flock 143
12667 +#define __NR_msync 144
12668 +#define __NR_readv 145
12669 +#define __NR_writev 146
12670 +#define __NR_getsid 147
12671 +#define __NR_fdatasync 148
12672 +#define __NR__sysctl 149
12673 +#define __NR_mlock 150
12674 +#define __NR_munlock 151
12675 +#define __NR_mlockall 152
12676 +#define __NR_munlockall 153
12677 +#define __NR_sched_setparam 154
12678 +#define __NR_sched_getparam 155
12679 +#define __NR_sched_setscheduler 156
12680 +#define __NR_sched_getscheduler 157
12681 +#define __NR_sched_yield 158
12682 +#define __NR_sched_get_priority_max 159
12683 +#define __NR_sched_get_priority_min 160
12684 +#define __NR_sched_rr_get_interval 161
12685 +#define __NR_nanosleep 162
12686 +#define __NR_mremap 163
12687 +#define __NR_setresuid 164
12688 +#define __NR_getresuid 165
12689 +#define __NR_getpagesize 166
12690 +#define __NR_query_module 167
12691 +#define __NR_poll 168
12692 +#define __NR_nfsservctl 169
12693 +#define __NR_setresgid 170
12694 +#define __NR_getresgid 171
12695 +#define __NR_prctl 172
12696 +#define __NR_rt_sigreturn 173
12697 +#define __NR_rt_sigaction 174
12698 +#define __NR_rt_sigprocmask 175
12699 +#define __NR_rt_sigpending 176
12700 +#define __NR_rt_sigtimedwait 177
12701 +#define __NR_rt_sigqueueinfo 178
12702 +#define __NR_rt_sigsuspend 179
12703 +#define __NR_pread64 180
12704 +#define __NR_pwrite64 181
12705 +#define __NR_lchown 182
12706 +#define __NR_getcwd 183
12707 +#define __NR_capget 184
12708 +#define __NR_capset 185
12709 +#define __NR_sigaltstack 186
12710 +#define __NR_sendfile 187
12711 +#define __NR_getpmsg 188 /* some people actually want streams */
12712 +#define __NR_putpmsg 189 /* some people actually want streams */
12713 +#define __NR_vfork 190
12714 +#define __NR_ugetrlimit 191
12715 +#define __NR_mmap2 192
12716 +#define __NR_truncate64 193
12717 +#define __NR_ftruncate64 194
12718 +#define __NR_stat64 195
12719 +#define __NR_lstat64 196
12720 +#define __NR_fstat64 197
12721 +#define __NR_chown32 198
12722 +#define __NR_getuid32 199
12723 +#define __NR_getgid32 200
12724 +#define __NR_geteuid32 201
12725 +#define __NR_getegid32 202
12726 +#define __NR_setreuid32 203
12727 +#define __NR_setregid32 204
12728 +#define __NR_getgroups32 205
12729 +#define __NR_setgroups32 206
12730 +#define __NR_fchown32 207
12731 +#define __NR_setresuid32 208
12732 +#define __NR_getresuid32 209
12733 +#define __NR_setresgid32 210
12734 +#define __NR_getresgid32 211
12735 +#define __NR_lchown32 212
12736 +#define __NR_setuid32 213
12737 +#define __NR_setgid32 214
12738 +#define __NR_setfsuid32 215
12739 +#define __NR_setfsgid32 216
12740 +#define __NR_pivot_root 217
12741 +#define __NR_getdents64 220
12742 +#define __NR_gettid 221
12743 +#define __NR_tkill 222
12744 +#define __NR_setxattr 223
12745 +#define __NR_lsetxattr 224
12746 +#define __NR_fsetxattr 225
12747 +#define __NR_getxattr 226
12748 +#define __NR_lgetxattr 227
12749 +#define __NR_fgetxattr 228
12750 +#define __NR_listxattr 229
12751 +#define __NR_llistxattr 230
12752 +#define __NR_flistxattr 231
12753 +#define __NR_removexattr 232
12754 +#define __NR_lremovexattr 233
12755 +#define __NR_fremovexattr 234
12756 +#define __NR_futex 235
12757 +#define __NR_sendfile64 236
12758 +#define __NR_mincore 237
12759 +#define __NR_madvise 238
12760 +#define __NR_fcntl64 239
12761 +#define __NR_readahead 240
12762 +#define __NR_io_setup 241
12763 +#define __NR_io_destroy 242
12764 +#define __NR_io_getevents 243
12765 +#define __NR_io_submit 244
12766 +#define __NR_io_cancel 245
12767 +#define __NR_fadvise64 246
12768 +#define __NR_exit_group 247
12769 +#define __NR_lookup_dcookie 248
12770 +#define __NR_epoll_create 249
12771 +#define __NR_epoll_ctl 250
12772 +#define __NR_epoll_wait 251
12773 +#define __NR_remap_file_pages 252
12774 +#define __NR_set_tid_address 253
12775 +#define __NR_timer_create 254
12776 +#define __NR_timer_settime 255
12777 +#define __NR_timer_gettime 256
12778 +#define __NR_timer_getoverrun 257
12779 +#define __NR_timer_delete 258
12780 +#define __NR_clock_settime 259
12781 +#define __NR_clock_gettime 260
12782 +#define __NR_clock_getres 261
12783 +#define __NR_clock_nanosleep 262
12784 +#define __NR_statfs64 263
12785 +#define __NR_fstatfs64 264
12786 +#define __NR_tgkill 265
12787 +#define __NR_utimes 266
12788 +#define __NR_fadvise64_64 267
12789 +#define __NR_mbind 268
12790 +#define __NR_get_mempolicy 269
12791 +#define __NR_set_mempolicy 270
12792 +#define __NR_mq_open 271
12793 +#define __NR_mq_unlink 272
12794 +#define __NR_mq_timedsend 273
12795 +#define __NR_mq_timedreceive 274
12796 +#define __NR_mq_notify 275
12797 +#define __NR_mq_getsetattr 276
12798 +#define __NR_waitid 277
12799 +#define __NR_vserver 278
12800 +#define __NR_add_key 279
12801 +#define __NR_request_key 280
12802 +#define __NR_keyctl 281
12803 +#define __NR_ioprio_set 282
12804 +#define __NR_ioprio_get 283
12805 +#define __NR_inotify_init 284
12806 +#define __NR_inotify_add_watch 285
12807 +#define __NR_inotify_rm_watch 286
12808 +#define __NR_migrate_pages 287
12809 +#define __NR_openat 288
12810 +#define __NR_mkdirat 289
12811 +#define __NR_mknodat 290
12812 +#define __NR_fchownat 291
12813 +#define __NR_futimesat 292
12814 +#define __NR_fstatat64 293
12815 +#define __NR_unlinkat 294
12816 +#define __NR_renameat 295
12817 +#define __NR_linkat 296
12818 +#define __NR_symlinkat 297
12819 +#define __NR_readlinkat 298
12820 +#define __NR_fchmodat 299
12821 +#define __NR_faccessat 300
12822 +#define __NR_pselect6 301
12823 +#define __NR_ppoll 302
12824 +#define __NR_unshare 303
12825 +#define __NR_set_robust_list 304
12826 +#define __NR_get_robust_list 305
12827 +#define __NR_splice 306
12828 +#define __NR_sync_file_range 307
12829 +#define __NR_tee 308
12830 +#define __NR_vmsplice 309
12831 +#define __NR_move_pages 310
12832 +#define __NR_sched_setaffinity 311
12833 +#define __NR_sched_getaffinity 312
12834 +#define __NR_kexec_load 313
12835 +#define __NR_getcpu 314
12836 +#define __NR_epoll_pwait 315
12837 +#define __NR_utimensat 316
12838 +#define __NR_signalfd 317
12839 +#define __NR_timerfd_create 318
12840 +#define __NR_eventfd 319
12841 +#define __NR_fallocate 320
12842 +#define __NR_timerfd_settime 321
12843 +#define __NR_timerfd_gettime 322
12844 +#define __NR_signalfd4 323
12845 +#define __NR_eventfd2 324
12846 +#define __NR_epoll_create1 325
12847 +#define __NR_dup3 326
12848 +#define __NR_pipe2 327
12849 +#define __NR_inotify_init1 328
12853 +#define NR_syscalls 329
12855 +#define __ARCH_WANT_IPC_PARSE_VERSION
12856 +#define __ARCH_WANT_OLD_READDIR
12857 +#define __ARCH_WANT_OLD_STAT
12858 +#define __ARCH_WANT_STAT64
12859 +#define __ARCH_WANT_SYS_ALARM
12860 +#define __ARCH_WANT_SYS_GETHOSTNAME
12861 +#define __ARCH_WANT_SYS_PAUSE
12862 +#define __ARCH_WANT_SYS_SGETMASK
12863 +#define __ARCH_WANT_SYS_SIGNAL
12864 +#define __ARCH_WANT_SYS_TIME
12865 +#define __ARCH_WANT_SYS_UTIME
12866 +#define __ARCH_WANT_SYS_WAITPID
12867 +#define __ARCH_WANT_SYS_SOCKETCALL
12868 +#define __ARCH_WANT_SYS_FADVISE64
12869 +#define __ARCH_WANT_SYS_GETPGRP
12870 +#define __ARCH_WANT_SYS_LLSEEK
12871 +#define __ARCH_WANT_SYS_NICE
12872 +#define __ARCH_WANT_SYS_OLD_GETRLIMIT
12873 +#define __ARCH_WANT_SYS_OLDUMOUNT
12874 +#define __ARCH_WANT_SYS_SIGPENDING
12875 +#define __ARCH_WANT_SYS_SIGPROCMASK
12876 +#define __ARCH_WANT_SYS_RT_SIGACTION
12879 + * "Conditional" syscalls
12881 + * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
12882 + * but it doesn't work on all toolchains, so we just do it by hand
12884 +//#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
12885 +#define cond_syscall(x) long x(void) __attribute__((weak,alias("sys_ni_syscall")))
12886 +#endif /* __KERNEL__ */
12888 +#endif /* _ASM_UBICOM32_UNISTD_H */
12889 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/user.h linux-2.6.28.10/arch/ubicom32/include/asm/user.h
12890 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/user.h 1970-01-01 02:00:00.000000000 +0200
12891 +++ linux-2.6.28.10/arch/ubicom32/include/asm/user.h 2009-08-12 13:08:37.000000000 +0300
12894 + * arch/ubicom32/include/asm/user.h
12895 + * Ubicom32 architecture core file definitions.
12897 + * (C) Copyright 2009, Ubicom, Inc.
12899 + * This file is part of the Ubicom32 Linux Kernel Port.
12901 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
12902 + * it and/or modify it under the terms of the GNU General Public License
12903 + * as published by the Free Software Foundation, either version 2 of the
12904 + * License, or (at your option) any later version.
12906 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
12907 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12908 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
12909 + * the GNU General Public License for more details.
12911 + * You should have received a copy of the GNU General Public License
12912 + * along with the Ubicom32 Linux Kernel Port. If not,
12913 + * see <http://www.gnu.org/licenses/>.
12915 + * Ubicom32 implementation derived from (with many thanks):
12920 +#ifndef _ASM_UBICOM32_USER_H
12921 +#define _ASM_UBICOM32_USER_H
12923 +#include <asm/ptrace.h>
12924 +#include <asm/page.h>
12926 + * Adapted from <asm-powerpc/user.h>
12928 + * Core file format: The core file is written in such a way that gdb
12929 + * can understand it and provide useful information to the user (under
12930 + * linux we use the `trad-core' bfd, NOT the osf-core). The file contents
12931 + * are as follows:
12933 + * upage: 1 page consisting of a user struct that tells gdb
12934 + * what is present in the file. Directly after this is a
12935 + * copy of the task_struct, which is currently not used by gdb,
12936 + * but it may come in handy at some point. All of the registers
12937 + * are stored as part of the upage. The upage should always be
12938 + * only one page long.
12939 + * data: The data segment follows next. We use current->end_text to
12940 + * current->brk to pick up all of the user variables, plus any memory
12941 + * that may have been sbrk'ed. No attempt is made to determine if a
12942 + * page is demand-zero or if a page is totally unused, we just cover
12943 + * the entire range. All of the addresses are rounded in such a way
12944 + * that an integral number of pages is written.
12945 + * stack: We need the stack information in order to get a meaningful
12946 + * backtrace. We need to write the data from usp to
12947 + * current->start_stack, so we round each of these in order to be able
12948 + * to write an integer number of pages.
12951 +struct user_ubicom32fp_struct {
12955 + struct pt_regs regs; /* entire machine state */
12956 + size_t u_tsize; /* text size (pages) */
12957 + size_t u_dsize; /* data size (pages) */
12958 + size_t u_ssize; /* stack size (pages) */
12959 + unsigned long start_code; /* text starting address */
12960 + unsigned long start_data; /* data starting address */
12961 + unsigned long start_stack; /* stack starting address */
12962 + long int signal; /* signal causing core dump */
12963 + unsigned long u_ar0; /* help gdb find registers */
12964 + unsigned long magic; /* identifies a core file */
12965 + char u_comm[32]; /* user command name */
12968 +#define NBPG PAGE_SIZE
12970 +#define HOST_TEXT_START_ADDR (u.start_code)
12971 +#define HOST_DATA_START_ADDR (u.start_data)
12972 +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
12974 +#endif /* _ASM_UBICOM32_USER_H */
12975 diff -ruN linux-2.6.28.10_o/arch/ubicom32/include/asm/xor.h linux-2.6.28.10/arch/ubicom32/include/asm/xor.h
12976 --- linux-2.6.28.10_o/arch/ubicom32/include/asm/xor.h 1970-01-01 02:00:00.000000000 +0200
12977 +++ linux-2.6.28.10/arch/ubicom32/include/asm/xor.h 2009-08-06 10:31:02.000000000 +0300
12980 + * arch/ubicom32/include/asm/xor.h
12981 + * Generic xor.h definitions for Ubicom32 architecture.
12983 + * (C) Copyright 2009, Ubicom, Inc.
12985 + * This file is part of the Ubicom32 Linux Kernel Port.
12987 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
12988 + * it and/or modify it under the terms of the GNU General Public License
12989 + * as published by the Free Software Foundation, either version 2 of the
12990 + * License, or (at your option) any later version.
12992 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
12993 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12994 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
12995 + * the GNU General Public License for more details.
12997 + * You should have received a copy of the GNU General Public License
12998 + * along with the Ubicom32 Linux Kernel Port. If not,
12999 + * see <http://www.gnu.org/licenses/>.
13001 + * Ubicom32 implementation derived from (with many thanks):
13006 +#ifndef _ASM_UBICOM32_XOR_H
13007 +#define _ASM_UBICOM32_XOR_H
13009 +#include <asm-generic/xor.h>
13011 +#endif /* _ASM_UBICOM32_XOR_H */
13012 diff -ruN linux-2.6.28.10_o/arch/ubicom32/Kconfig linux-2.6.28.10/arch/ubicom32/Kconfig
13013 --- linux-2.6.28.10_o/arch/ubicom32/Kconfig 1970-01-01 02:00:00.000000000 +0200
13014 +++ linux-2.6.28.10/arch/ubicom32/Kconfig 2009-08-12 13:08:37.000000000 +0300
13017 +# For a description of the syntax of this configuration file,
13018 +# see Documentation/kbuild/kconfig-language.txt.
13021 +mainmenu "uClinux/ubicom32 (w/o MMU) Kernel Configuration"
13025 + default "0x40000000"
13027 + Define the address that RAM starts at.
13031 + select HAVE_OPROFILE
13038 +config CPU_BIG_ENDIAN
13042 +config FORCE_MAX_ZONEORDER
13062 +config RWSEM_GENERIC_SPINLOCK
13066 +config RWSEM_XCHGADD_ALGORITHM
13070 +config ARCH_HAS_ILOG2_U32
13074 +config ARCH_HAS_ILOG2_U64
13078 +config GENERIC_FIND_NEXT_BIT
13082 +config GENERIC_GPIO
13090 +config GENERIC_HWEIGHT
13094 +config GENERIC_HARDIRQS
13098 +config STACKTRACE_SUPPORT
13102 +config LOCKDEP_SUPPORT
13106 +config GENERIC_CALIBRATE_DELAY
13110 +config GENERIC_TIME
13114 +config TIME_LOW_RES
13118 +config GENERIC_CLOCKEVENTS
13122 +config GENERIC_CLOCKEVENTS_BROADCAST
13124 + depends on GENERIC_CLOCKEVENTS
13125 + default y if SMP && !LOCAL_TIMERS
13130 +config ARCH_SUPPORTS_AOUT
13133 +config IRQ_PER_CPU
13137 +config SCHED_NO_NO_OMIT_FRAME_POINTER
13141 +menu "Processor type and features"
13145 + depends on IP5160EVAL
13147 + Board has 32MB of RAM on it. It is a hidden option used to select default for size of RAM
13152 + depends on IP7145DPF || IP7160RGW || IP7160BRINGUP || IP7160DPF || IP5170DPF || IP5160DEV
13154 + Board has 64MB of RAM on it. It is a hidden option used to select default for size of RAM
13159 + depends on IP7500MODULE || IP7500AV || IP7500MEDIA
13161 + Board has 128MB of RAM on it. It is a hidden option used to select default for size of RAM
13164 +comment "Processor type will be selected by Board"
13166 +config UBICOM32_V3
13169 + Ubicom IP5xxx series processor support.
13171 +config UBICOM32_V4
13174 + Ubicom IP7xxx series processor support.
13178 + prompt "Board type"
13180 + Select your board.
13183 + bool "No board selected"
13185 + Default. Don't select any board specific config. Will not build unless you change!
13187 +# Add your boards here
13188 +source "arch/ubicom32/mach-ip5k/Kconfig"
13189 +source "arch/ubicom32/mach-ip7k/Kconfig"
13193 +comment "Kernel Options"
13195 + bool "Symmetric multi-processing support"
13196 + select USE_GENERIC_SMP_HELPERS
13199 + Enables multithreading support. Enabling SMP support increases
13200 + the size of system data structures. SMP support can have either
13201 + positive or negative impact on performance depending on workloads.
13203 + If you do not know what to do here, say N.
13206 + int "Number of configured CPUs"
13211 + Upper bound on the number of CPUs. Space is reserved
13212 + at compile time for this many CPUs.
13214 +config LOCAL_TIMERS
13215 + bool "Use local timer interrupts"
13219 + Enable support for local timers on SMP platforms, rather then the
13220 + legacy IPI broadcast method. Local timers allows the system
13221 + accounting to be spread across the timer interval, preventing a
13222 + "thundering herd" at every timer tick. A physical timer is allocated
13225 +config TIMER_EXTRA_ALLOC
13226 + int "Number of additional physical timer events to create"
13227 + depends on GENERIC_CLOCKEVENTS
13230 + The Ubicom32 processor has a number of event timers that can be wrapped
13231 + in Linux clock event structures (assuming that the timers are not being
13232 + used for another purpose). Based on the value of LOCAL_TIMERS, either
13233 + 2 timers will be used or a timer will be used for every CPU. This value
13234 + allows the programmer to select additional timers over that amount.
13237 + bool "Create separate stacks for interrupt handling"
13240 + Selecting this causes interrupts to be created on a separate
13241 + stack instead of nesting the interrupts on the kernel stack.
13243 +config IRQSTACKS_USEOCM
13244 + bool "Use OCM for interrupt stacks"
13246 + depends on IRQSTACKS
13248 + Selecting this cause the interrupt stacks to be placed in OCM
13249 + reducing cache misses at the expense of using the OCM for servicing
13252 +menu "OCM Instruction Heap"
13254 +config OCM_MODULES_RESERVATION
13255 + int "OCM Instruction heap reservation. 0-192 kB"
13259 + The minimum amount of OCM memory to reserve for kernel loadable module
13260 + code. If you are not using this memory it cannot be used for anything
13261 + else. Leave it as 0 if you have prebuilt modules that are compiled with
13264 +config OCM_MODULES_MAY_CONSUME_REMAINING_CODESPACE
13265 + bool "Give all unused ocm code space to the ocm instruction heap."
13268 + Allow the OCM instruction heap allocation to consume any remaining
13269 + unused OCM code space. The result of this is that you will not have
13270 + and deterministic results, but you will not have any waste either.
13272 +config OCM_MODULES_FALLBACK_TO_DDR
13273 + bool "Loadable Modules requiring OCM may fallback to use DDR."
13276 + If a module cannot get the OCM code it requires allow DDR to
13281 + int "Frequency of 'jiffies' (for polling)"
13284 + 100 is common for embedded systems, but 1000 allows
13285 + you to do more drivers without actually having
13286 + interrupts working properly.
13288 +comment "RAM configuration"
13293 + hex "Size of RAM (in bytes)"
13294 + range 0x00000000 0x02000000
13295 + default "0x02000000"
13297 + Define the size of the system RAM. If you select 0 then the
13298 + kernel will try to probe the RAM size at runtime. This is not
13299 + supported on all CPU types.
13306 + hex "Size of RAM (in bytes)"
13307 + range 0x00000000 0x04000000
13308 + default "0x04000000"
13310 + Define the size of the system RAM. If you select 0 then the
13311 + kernel will try to probe the RAM size at runtime. This is not
13312 + supported on all CPU types.
13319 + hex "Size of RAM (in bytes)"
13320 + range 0x00000000 0x08000000
13321 + default "0x08000000"
13323 + Define the size of the system RAM. If you select 0 then the
13324 + kernel will try to probe the RAM size at runtime. This is not
13325 + supported on all CPU types.
13330 + hex "Address of the base of kernel code"
13331 + default "0x40400000"
13333 + For the time being we are going to start the Kernel at a 4 meg offset.
13335 +comment "Build options"
13336 +config LINKER_RELAXATION
13337 + bool "Linker Relaxation"
13340 + Turns on linker relaxation that will produce smaller
13341 + faster code. Increases link time.
13343 +comment "Driver options"
13349 + Enable/Disable PCI bus
13350 + source "drivers/pci/Kconfig"
13353 +config PCI_DEV0_IDSEL
13354 + hex "slot 0 address"
13356 + default "0x01000000"
13358 + Slot 0 address. This address should correspond to the address line
13359 + which the IDSEL bit for this slot is connected to.
13361 +config PCI_DEV1_IDSEL
13362 + hex "slot 1 address"
13364 + default "0x02000000"
13366 + Slot 1 address. This address should correspond to the address line
13367 + which the IDSEL bit for this slot is connected to.
13371 +menu "Input devices"
13372 +config UBICOM_INPUT
13373 + bool "Ubicom polled GPIO input driver"
13375 + select INPUT_POLLDEV
13377 + Polling input driver, much like the GPIO input driver, except that it doesn't
13378 + rely on interrupts. It will report events via the input subsystem.
13381 +config UBICOM_INPUT_I2C
13382 + bool "Ubicom polled GPIO input driver over I2C"
13384 + select INPUT_POLLDEV
13386 + Polling input driver, much like the PCA953x driver, it can support a variety of
13387 + different I2C I/O expanders. This device polls the I2C I/O expander for events
13388 + and reports them via the input subsystem.
13395 +menu "Misc devices"
13397 + bool "Ubicom HID driver"
13399 + select INPUT_POLLDEV
13400 + select LCD_CLASS_DEVICE
13402 + Driver for HID chip found on some Ubicom reference designs. This chip handles
13403 + PWM, button input, and IR remote control. It registers as an input device and
13404 + a backlight device.
13409 +config CMDLINE_BOOL
13410 + bool "Built-in kernel command line"
13413 + Allow for specifying boot arguments to the kernel at
13414 + build time. On some systems (e.g. embedded ones), it is
13415 + necessary or convenient to provide some or all of the
13416 + kernel boot arguments with the kernel itself (that is,
13417 + to not rely on the boot loader to provide them.)
13419 + To compile command line arguments into the kernel,
13420 + set this option to 'Y', then fill in the
13421 + the boot arguments in CONFIG_CMDLINE.
13423 + Systems with fully functional boot loaders (i.e. non-embedded)
13424 + should leave this option set to 'N'.
13427 + string "Built-in kernel command string"
13428 + depends on CMDLINE_BOOL
13431 + Enter arguments here that should be compiled into the kernel
13432 + image and used at boot time. If the boot loader provides a
13433 + command line at boot time, it is appended to this string to
13434 + form the full kernel command line, when the system boots.
13436 + However, you can use the CONFIG_CMDLINE_OVERRIDE option to
13437 + change this behavior.
13439 + In most cases, the command line (whether built-in or provided
13440 + by the boot loader) should specify the device for the root
13443 +config CMDLINE_OVERRIDE
13444 + bool "Built-in command line overrides boot loader arguments"
13446 + depends on CMDLINE_BOOL
13448 + Set this option to 'Y' to have the kernel ignore the boot loader
13449 + command line, and use ONLY the built-in command line.
13451 + This is used to work around broken boot loaders. This should
13452 + be set to 'N' under normal conditions.
13455 +# End Processor type and features
13457 +source "arch/ubicom32/Kconfig.debug"
13459 +menu "Executable file formats"
13460 +source "fs/Kconfig.binfmt"
13463 +source "init/Kconfig"
13464 +source "kernel/Kconfig.preempt"
13465 +source "kernel/time/Kconfig"
13466 +source "mm/Kconfig"
13467 +source "net/Kconfig"
13468 +source "drivers/Kconfig"
13469 +source "fs/Kconfig"
13470 +source "security/Kconfig"
13471 +source "crypto/Kconfig"
13472 +source "lib/Kconfig"
13473 diff -ruN linux-2.6.28.10_o/arch/ubicom32/Kconfig.debug linux-2.6.28.10/arch/ubicom32/Kconfig.debug
13474 --- linux-2.6.28.10_o/arch/ubicom32/Kconfig.debug 1970-01-01 02:00:00.000000000 +0200
13475 +++ linux-2.6.28.10/arch/ubicom32/Kconfig.debug 2009-08-06 10:31:02.000000000 +0300
13477 +menu "Kernel hacking"
13479 +config TRACE_IRQFLAGS_SUPPORT
13482 +config PROTECT_KERNEL
13484 + bool 'Enable Kernel range register Protection'
13486 + Adds code to enable/disable range registers to protect static
13487 + kernel code/data from userspace. Currently the ranges covered
13488 + do no protect kernel loadable modules or dynamically allocated
13491 +config NO_KERNEL_MSG
13492 + bool "Suppress Kernel BUG Messages"
13494 + Do not output any debug BUG messages within the kernel.
13496 +config EARLY_PRINTK
13497 + bool "Use the driver that you selected as console also for early printk (to debug kernel bootup)."
13500 + If you want to use the serdes driver (console=ttyUS0) for
13501 + early printk, you must also supply an additional kernel boot
13502 + parameter like this:
13504 + serdes=ioportaddr,irq,clockrate,baud
13506 + For an IP7160RGW eval board, you could use this:
13508 + serdes=0x2004000,61,250000000,57600
13510 + which will let you see early printk output at 57600 baud.
13512 +config STOP_ON_TRAP
13513 + bool "Enable stopping at the LDSR for all traps"
13516 + Cause the LDSR to stop all threads whenever a trap is about to be serviced
13518 +config STOP_ON_BUG
13519 + bool "Enable stopping on failed BUG_ON()"
13522 + Cause all BUG_ON failures to stop all threads
13524 +config DEBUG_IRQMEASURE
13525 + bool "Enable IRQ handler measurements"
13528 + When enabled each IRQ's min/avg/max times will be printed. If the handler
13529 + re-enables interrupt, the times will show the full time including to service
13530 + nested interrupts. See /proc/irq_measurements.
13532 +config DEBUG_PCIMEASURE
13533 + bool "Enable PCI transaction measurements"
13536 + When enabled the system will measure the min/avg/max timer for each PCI transactions.
13537 + See /proc/pci_measurements.
13539 +config ACCESS_OK_CHECKS_ENABLED
13540 + bool "Enable user space access checks"
13543 + Enabling this check causes the kernel to verify that addresses passed
13544 + to the kernel by the user space code are within the processes
13545 + address space. On a no-mmu system, this is done by examining the
13546 + processes memory data structures (adversly affecting performance) but
13547 + ensuring that a process does not ask the kernel to violate another
13548 + processes address space. Sadly, the kernel uses access_ok() for
13549 + address that are in the kernel which results in a large volume of
13553 + prompt "Unaligned Access Support"
13554 + default UNALIGNED_ACCESS_ENABLED
13556 + Kernel / Userspace unaligned access handling.
13558 +config UNALIGNED_ACCESS_ENABLED
13559 + bool "Kernel and Userspace"
13562 +config UNALIGNED_ACCESS_USERSPACE_ONLY
13563 + bool "Userspace Only"
13566 +config UNALIGNED_ACCESS_DISABLED
13572 +config DEBUG_STACKOVERFLOW
13573 + bool "Check for stack overflows"
13575 + depends on DEBUG_KERNEL
13577 + This option will cause messages to be printed if free kernel stack space
13578 + drops below a certain limit (THREAD_SIZE /8).
13580 +config DEBUG_STACK_USAGE
13581 + bool "Stack utilization instrumentation"
13583 + depends on DEBUG_KERNEL
13585 + Enables the display of the minimum amount of free kernel stack which each
13586 + task has ever had available in the sysrq-T and sysrq-P debug output.
13588 + This option will slow down process creation somewhat.
13590 +source "lib/Kconfig.debug"
13594 diff -ruN linux-2.6.28.10_o/arch/ubicom32/kernel/asm-offsets.c linux-2.6.28.10/arch/ubicom32/kernel/asm-offsets.c
13595 --- linux-2.6.28.10_o/arch/ubicom32/kernel/asm-offsets.c 1970-01-01 02:00:00.000000000 +0200
13596 +++ linux-2.6.28.10/arch/ubicom32/kernel/asm-offsets.c 2009-08-06 10:31:02.000000000 +0300
13599 + * arch/ubicom32/kernel/asm-offsets.c
13600 + * Ubicom32 architecture definitions needed by assembly language modules.
13602 + * (C) Copyright 2009, Ubicom, Inc.
13604 + * This file is part of the Ubicom32 Linux Kernel Port.
13606 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
13607 + * it and/or modify it under the terms of the GNU General Public License
13608 + * as published by the Free Software Foundation, either version 2 of the
13609 + * License, or (at your option) any later version.
13611 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
13612 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
13613 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
13614 + * the GNU General Public License for more details.
13616 + * You should have received a copy of the GNU General Public License
13617 + * along with the Ubicom32 Linux Kernel Port. If not,
13618 + * see <http://www.gnu.org/licenses/>.
13620 + * Ubicom32 implementation derived from (with many thanks):
13626 + * This program is used to generate definitions needed by
13627 + * assembly language modules.
13629 + * We use the technique used in the OSF Mach kernel code:
13630 + * generate asm statements containing #defines,
13631 + * compile this file to assembler, and then extract the
13632 + * #defines from the assembly-language output.
13635 +#include <linux/module.h>
13636 +#include <linux/stddef.h>
13637 +#include <linux/sched.h>
13638 +#include <linux/kernel_stat.h>
13639 +#include <linux/ptrace.h>
13640 +#include <linux/hardirq.h>
13641 +#include <asm/bootinfo.h>
13642 +#include <asm/irq.h>
13643 +#include <asm/thread_info.h>
13645 +#define DEFINE(sym, val) \
13646 + asm volatile("\n->" #sym " %0 " #val : : "i" (val))
13648 +#define BLANK() asm volatile("\n->" : : )
13652 + /* offsets into the task struct */
13653 + DEFINE(TASK_STATE, offsetof(struct task_struct, state));
13654 + DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
13655 + DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
13656 + DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked));
13657 + DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
13658 + DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, stack));
13659 + DEFINE(TASK_MM, offsetof(struct task_struct, mm));
13660 + DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
13662 + /* offsets into the kernel_stat struct */
13663 + DEFINE(STAT_IRQ, offsetof(struct kernel_stat, irqs));
13665 + /* offsets into the irq_cpustat_t struct */
13666 + DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t, __softirq_pending));
13668 + /* offsets into the thread struct */
13669 + DEFINE(THREAD_D10, offsetof(struct thread_struct, d10));
13670 + DEFINE(THREAD_D11, offsetof(struct thread_struct, d11));
13671 + DEFINE(THREAD_D12, offsetof(struct thread_struct, d12));
13672 + DEFINE(THREAD_D13, offsetof(struct thread_struct, d13));
13673 + DEFINE(THREAD_A1, offsetof(struct thread_struct, a1));
13674 + DEFINE(THREAD_A2, offsetof(struct thread_struct, a2));
13675 + DEFINE(THREAD_A5, offsetof(struct thread_struct, a5));
13676 + DEFINE(THREAD_A6, offsetof(struct thread_struct, a6));
13677 + DEFINE(THREAD_SP, offsetof(struct thread_struct, sp));
13679 + /* offsets into the pt_regs */
13680 + DEFINE(PT_D0, offsetof(struct pt_regs, dn[0]));
13681 + DEFINE(PT_D1, offsetof(struct pt_regs, dn[1]));
13682 + DEFINE(PT_D2, offsetof(struct pt_regs, dn[2]));
13683 + DEFINE(PT_D3, offsetof(struct pt_regs, dn[3]));
13684 + DEFINE(PT_D4, offsetof(struct pt_regs, dn[4]));
13685 + DEFINE(PT_D5, offsetof(struct pt_regs, dn[5]));
13686 + DEFINE(PT_D6, offsetof(struct pt_regs, dn[6]));
13687 + DEFINE(PT_D7, offsetof(struct pt_regs, dn[7]));
13688 + DEFINE(PT_D8, offsetof(struct pt_regs, dn[8]));
13689 + DEFINE(PT_D9, offsetof(struct pt_regs, dn[9]));
13690 + DEFINE(PT_D10, offsetof(struct pt_regs, dn[10]));
13691 + DEFINE(PT_D11, offsetof(struct pt_regs, dn[11]));
13692 + DEFINE(PT_D12, offsetof(struct pt_regs, dn[12]));
13693 + DEFINE(PT_D13, offsetof(struct pt_regs, dn[13]));
13694 + DEFINE(PT_D14, offsetof(struct pt_regs, dn[14]));
13695 + DEFINE(PT_D15, offsetof(struct pt_regs, dn[15]));
13696 + DEFINE(PT_A0, offsetof(struct pt_regs, an[0]));
13697 + DEFINE(PT_A1, offsetof(struct pt_regs, an[1]));
13698 + DEFINE(PT_A2, offsetof(struct pt_regs, an[2]));
13699 + DEFINE(PT_A3, offsetof(struct pt_regs, an[3]));
13700 + DEFINE(PT_A4, offsetof(struct pt_regs, an[4]));
13701 + DEFINE(PT_A5, offsetof(struct pt_regs, an[5]));
13702 + DEFINE(PT_A6, offsetof(struct pt_regs, an[6]));
13703 + DEFINE(PT_A7, offsetof(struct pt_regs, an[7]));
13704 + DEFINE(PT_SP, offsetof(struct pt_regs, an[7]));
13706 + DEFINE(PT_ACC0HI, offsetof(struct pt_regs, acc0[0]));
13707 + DEFINE(PT_ACC0LO, offsetof(struct pt_regs, acc0[1]));
13708 + DEFINE(PT_MAC_RC16, offsetof(struct pt_regs, mac_rc16));
13710 + DEFINE(PT_ACC1HI, offsetof(struct pt_regs, acc1[0]));
13711 + DEFINE(PT_ACC1LO, offsetof(struct pt_regs, acc1[1]));
13713 + DEFINE(PT_SOURCE3, offsetof(struct pt_regs, source3));
13714 + DEFINE(PT_INST_CNT, offsetof(struct pt_regs, inst_cnt));
13715 + DEFINE(PT_CSR, offsetof(struct pt_regs, csr));
13716 + DEFINE(PT_DUMMY_UNUSED, offsetof(struct pt_regs, dummy_unused));
13718 + DEFINE(PT_INT_MASK0, offsetof(struct pt_regs, int_mask0));
13719 + DEFINE(PT_INT_MASK1, offsetof(struct pt_regs, int_mask1));
13721 + DEFINE(PT_PC, offsetof(struct pt_regs, pc));
13723 + DEFINE(PT_TRAP_CAUSE, offsetof(struct pt_regs, trap_cause));
13725 + DEFINE(PT_SIZE, sizeof(struct pt_regs));
13727 + DEFINE(PT_FRAME_TYPE, offsetof(struct pt_regs, frame_type));
13729 + DEFINE(PT_ORIGINAL_D0, offsetof(struct pt_regs, original_dn_0));
13730 + DEFINE(PT_PREVIOUS_PC, offsetof(struct pt_regs, previous_pc));
13732 + /* offsets into the kernel_stat struct */
13733 + DEFINE(STAT_IRQ, offsetof(struct kernel_stat, irqs));
13735 + /* signal defines */
13736 + DEFINE(SIGSEGV, SIGSEGV);
13737 + //DEFINE(SEGV_MAPERR, SEGV_MAPERR);
13738 + DEFINE(SIGTRAP, SIGTRAP);
13739 + //DEFINE(TRAP_TRACE, TRAP_TRACE);
13741 + DEFINE(PT_PTRACED, PT_PTRACED);
13742 + DEFINE(PT_DTRACE, PT_DTRACE);
13744 + DEFINE(ASM_THREAD_SIZE, THREAD_SIZE);
13746 + /* Offsets in thread_info structure */
13747 + DEFINE(TI_TASK, offsetof(struct thread_info, task));
13748 + DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain));
13749 + DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
13750 + DEFINE(TI_PREEMPTCOUNT, offsetof(struct thread_info, preempt_count));
13751 + DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
13752 + DEFINE(TI_INTR_NESTING, offsetof(struct thread_info, interrupt_nesting));
13753 + DEFINE(ASM_TIF_NEED_RESCHED, TIF_NEED_RESCHED);
13754 + DEFINE(ASM_TIF_SYSCALL_TRACE, TIF_SYSCALL_TRACE);
13755 + DEFINE(ASM_TIF_SIGPENDING, TIF_SIGPENDING);
13757 + DEFINE(ASM_RAM_END, (CONFIG_RAMBASE + CONFIG_RAMSIZE));
13760 diff -ruN linux-2.6.28.10_o/arch/ubicom32/kernel/Makefile linux-2.6.28.10/arch/ubicom32/kernel/Makefile
13761 --- linux-2.6.28.10_o/arch/ubicom32/kernel/Makefile 1970-01-01 02:00:00.000000000 +0200
13762 +++ linux-2.6.28.10/arch/ubicom32/kernel/Makefile 2009-08-06 10:31:02.000000000 +0300
13765 +# arch/ubicom32/kernel/Makefile
13766 +# Main Makefile for the Ubicom32 arch directory.
13768 +# (C) Copyright 2009, Ubicom, Inc.
13770 +# This file is part of the Ubicom32 Linux Kernel Port.
13772 +# The Ubicom32 Linux Kernel Port is free software: you can redistribute
13773 +# it and/or modify it under the terms of the GNU General Public License
13774 +# as published by the Free Software Foundation, either version 2 of the
13775 +# License, or (at your option) any later version.
13777 +# The Ubicom32 Linux Kernel Port is distributed in the hope that it
13778 +# will be useful, but WITHOUT ANY WARRANTY; without even the implied
13779 +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
13780 +# the GNU General Public License for more details.
13782 +# You should have received a copy of the GNU General Public License
13783 +# along with the Ubicom32 Linux Kernel Port. If not,
13784 +# see <http://www.gnu.org/licenses/>.
13786 +# Ubicom32 implementation derived from (with many thanks):
13792 +extra-y := head.o vmlinux.lds
13813 + ubicom32_context_switch.o \
13814 + ubicom32_ksyms.o \
13815 + ubicom32_syscall.o \
13818 +obj-$(CONFIG_MODULES) += module.o
13819 +obj-$(CONFIG_COMEMPCI) += comempci.o
13820 +obj-$(CONFIG_SMP) += smp.o topology.o
13821 +obj-$(CONFIG_ACCESS_OK_CHECKS_ENABLED) += uaccess.o
13822 +obj-$(CONFIG_GENERIC_CLOCKEVENTS) += timer_device.o
13823 +obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) += timer_broadcast.o
13825 +ifndef CONFIG_GENERIC_CLOCKEVENTS
13826 +obj-y += timer_tick.o
13828 diff -ruN linux-2.6.28.10_o/arch/ubicom32/kernel/syscalltable.S linux-2.6.28.10/arch/ubicom32/kernel/syscalltable.S
13829 --- linux-2.6.28.10_o/arch/ubicom32/kernel/syscalltable.S 1970-01-01 02:00:00.000000000 +0200
13830 +++ linux-2.6.28.10/arch/ubicom32/kernel/syscalltable.S 2009-08-06 10:31:02.000000000 +0300
13833 + * arch/ubicom32/kernel/syscalltable.S
13834 + * <TODO: Replace with short file description>
13836 + * (C) Copyright 2009, Ubicom, Inc.
13838 + * This file is part of the Ubicom32 Linux Kernel Port.
13840 + * The Ubicom32 Linux Kernel Port is free software: you can redistribute
13841 + * it and/or modify it under the terms of the GNU General Public License
13842 + * as published by the Free Software Foundation, either version 2 of the
13843 + * License, or (at your option) any later version.
13845 + * The Ubicom32 Linux Kernel Port is distributed in the hope that it
13846 + * will be useful, but WITHOUT ANY WARRANTY; without even the implied
13847 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
13848 + * the GNU General Public License for more details.
13850 + * You should have received a copy of the GNU General Public License
13851 + * along with the Ubicom32 Linux Kernel Port. If not,
13852 + * see <http://www.gnu.org/licenses/>.
13854 + * Ubicom32 implementation derived from (with many thanks):
13861 + * Copyright (C) 2002, Greg Ungerer (gerg@snapgear.com)
13862 + * Copyright (C) 1998 D. Jeff Dionne <jeff@lineo.ca>, Kenneth Albanowski <kjahds@kjahds.com>,
13863 + * Copyright (C) 2000 Lineo Inc. (www.lineo.com)
13864 + * Copyright (C) 1991, 1992 Linus Torvalds
13867 +#include <linux/sys.h>
13868 +#include <linux/linkage.h>
13869 +#include <asm/unistd.h>
13873 + .global sys_call_table
13875 + .long sys_ni_syscall /* 0 - old "setup()" system call*/
13880 + .long sys_open /* 5 */
13882 + .long sys_waitpid
13885 + .long sys_unlink /* 10 */
13886 + .long execve_intercept
13890 + .long sys_chmod /* 15 */
13891 + .long sys_chown16
13892 + .long sys_ni_syscall /* old break syscall holder */
13895 + .long sys_getpid /* 20 */
13897 + .long sys_oldumount
13898 + .long sys_setuid16
13899 + .long sys_getuid16
13900 + .long sys_stime /* 25 */
13905 + .long sys_utime /* 30 */
13906 + .long sys_ni_syscall /* old stty syscall holder */
13907 + .long sys_ni_syscall /* old gtty syscall holder */
13910 + .long sys_ni_syscall /* 35 */ /* old ftime syscall holder */
13915 + .long sys_rmdir /* 40 */
13919 + .long sys_ni_syscall /* old prof syscall holder */
13920 + .long sys_brk /* 45 */
13921 + .long sys_setgid16
13922 + .long sys_getgid16
13924 + .long sys_geteuid16
13925 + .long sys_getegid16 /* 50 */
13927 + .long sys_umount /* recycled never used phys() */
13928 + .long sys_ni_syscall /* old lock syscall holder */
13930 + .long sys_fcntl /* 55 */
13931 + .long sys_ni_syscall /* old mpx syscall holder */
13932 + .long sys_setpgid
13933 + .long sys_ni_syscall /* old ulimit syscall holder */
13934 + .long sys_ni_syscall
13935 + .long sys_umask /* 60 */
13939 + .long sys_getppid
13940 + .long sys_getpgrp /* 65 */
13942 + .long sys_sigaction
13943 + .long sys_sgetmask
13944 + .long sys_ssetmask
13945 + .long sys_setreuid16 /* 70 */
13946 + .long sys_setregid16
13947 + .long sys_sigsuspend
13948 + .long sys_sigpending
13949 + .long sys_sethostname
13950 + .long sys_setrlimit /* 75 */
13951 + .long sys_old_getrlimit
13952 + .long sys_getrusage
13953 + .long sys_gettimeofday
13954 + .long sys_settimeofday
13955 + .long sys_getgroups16 /* 80 */
13956 + .long sys_setgroups16
13958 + .long sys_symlink
13960 + .long sys_readlink /* 85 */
13962 + .long sys_ni_syscall /* _sys_swapon */
13964 + .long sys_old_readdir
13965 + .long old_mmap /* 90 */
13967 + .long sys_truncate
13968 + .long sys_ftruncate
13970 + .long sys_fchown16 /* 95 */
13971 + .long sys_getpriority
13972 + .long sys_setpriority
13973 + .long sys_ni_syscall /* old profil syscall holder */
13975 + .long sys_fstatfs /* 100 */
13976 + .long sys_ni_syscall /* ioperm for i386 */
13977 + .long sys_socketcall
13979 + .long sys_setitimer
13980 + .long sys_getitimer /* 105 */
13981 + .long sys_newstat
13982 + .long sys_newlstat
13983 + .long sys_newfstat
13984 + .long sys_ni_syscall
13985 + .long sys_ni_syscall /* iopl for i386 */ /* 110 */
13986 + .long sys_vhangup
13987 + .long sys_ni_syscall /* obsolete idle() syscall */
13988 + .long sys_ni_syscall /* vm86old for i386 */
13990 + .long sys_ni_syscall /* 115 */ /* _sys_swapoff */
13991 + .long sys_sysinfo
13994 + .long sys_sigreturn
13995 + .long clone_intercept /* 120 */
13996 + .long sys_setdomainname
13997 + .long sys_newuname
13998 + .long sys_cacheflush /* modify_ldt for i386 */
13999 + .long sys_adjtimex
14000 + .long sys_ni_syscall /* 125 */ /* _sys_mprotect */
14001 + .long sys_sigprocmask
14002 + .long sys_ni_syscall /* old "creat_module" */
14003 + .long sys_init_module
14004 + .long sys_delete_module
14005 + .long sys_ni_syscall /* 130: old "get_kernel_syms" */
14006 + .long sys_quotactl
14007 + .long sys_getpgid
14009 + .long sys_bdflush
14010 + .long sys_sysfs /* 135 */
14011 + .long sys_personality
14012 + .long sys_ni_syscall /* for afs_syscall */
14013 + .long sys_setfsuid16
14014 + .long sys_setfsgid16
14015 + .long sys_llseek /* 140 */
14016 + .long sys_getdents
14019 + .long sys_ni_syscall /* _sys_msync */
14020 + .long sys_readv /* 145 */
14023 + .long sys_fdatasync
14025 + .long sys_ni_syscall /* 150 */ /* _sys_mlock */
14026 + .long sys_ni_syscall /* _sys_munlock */
14027 + .long sys_ni_syscall /* _sys_mlockall */
14028 + .long sys_ni_syscall /* _sys_munlockall */
14029 + .long sys_sched_setparam
14030 + .long sys_sched_getparam /* 155 */
14031 + .long sys_sched_setscheduler
14032 + .long sys_sched_getscheduler
14033 + .long sys_sched_yield
14034 + .long sys_sched_get_priority_max
14035 + .long sys_sched_get_priority_min /* 160 */
14036 + .long sys_sched_rr_get_interval
14037 + .long sys_nanosleep
14038 + .long sys_ni_syscall /* _sys_mremap */
14039 + .long sys_setresuid16
14040 + .long sys_getresuid16 /* 165 */
14041 + .long sys_getpagesize /* _sys_getpagesize */
14042 + .long sys_ni_syscall /* old "query_module" */
14044 + .long sys_ni_syscall /* _sys_nfsservctl */
14045 + .long sys_setresgid16 /* 170 */
14046 + .long sys_getresgid16
14048 + .long sys_rt_sigreturn
14049 + .long sys_rt_sigaction
14050 + .long sys_rt_sigprocmask /* 175 */
14051 + .long sys_rt_sigpending
14052 + .long sys_rt_sigtimedwait
14053 + .long sys_rt_sigqueueinfo
14054 + .long sys_rt_sigsuspend
14055 + .long sys_pread64 /* 180 */
14056 + .long sys_pwrite64
14057 + .long sys_lchown16
14060 + .long sys_capset /* 185 */
14061 + .long sys_sigaltstack
14062 + .long sys_sendfile
14063 + .long sys_ni_syscall /* streams1 */
14064 + .long sys_ni_syscall /* streams2 */
14065 + .long vfork_intercept /* 190 */
14066 + .long sys_getrlimit
14068 + .long sys_truncate64
14069 + .long sys_ftruncate64
14070 + .long sys_stat64 /* 195 */
14071 + .long sys_lstat64
14072 + .long sys_fstat64
14075 + .long sys_getgid /* 200 */
14076 + .long sys_geteuid
14077 + .long sys_getegid
14078 + .long sys_setreuid
14079 + .long sys_setregid
14080 + .long sys_getgroups /* 205 */
14081 + .long sys_setgroups
14083 + .long sys_setresuid
14084 + .long sys_getresuid
14085 + .long sys_setresgid /* 210 */
14086 + .long sys_getresgid
14090 + .long sys_setfsuid /* 215 */
14091 + .long sys_setfsgid
14092 + .long sys_pivot_root
14093 + .long sys_ni_syscall
14094 + .long sys_ni_syscall
14095 + .long sys_getdents64 /* 220 */
14098 + .long sys_setxattr
14099 + .long sys_lsetxattr
14100 + .long sys_fsetxattr /* 225 */
14101 + .long sys_getxattr
14102 + .long sys_lgetxattr
14103 + .long sys_fgetxattr
14104 + .long sys_listxattr
14105 + .long sys_llistxattr /* 230 */
14106 + .long sys_flistxattr
14107 + .long sys_removexattr
14108 + .long sys_lremovexattr
14109 + .long sys_fremovexattr
14110 + .long sys_futex /* 235 */
14111 + .long sys_sendfile64
14112 + .long sys_ni_syscall /* _sys_mincore */
14113 + .long sys_ni_syscall /* _sys_madvise */
14114 + .long sys_fcntl64
14115 + .long sys_readahead /* 240 */
14116 + .long sys_io_setup
14117 + .long sys_io_destroy
14118 + .long sys_io_getevents
14119 + .long sys_io_submit
14120 + .long sys_io_cancel /* 245 */
14121 + .long sys_fadvise64
14122 + .long sys_exit_group
14123 + .long sys_lookup_dcookie
14124 + .long sys_epoll_create
14125 + .long sys_epoll_ctl /* 250 */
14126 + .long sys_epoll_wait
14127 + .long sys_ni_syscall /* _sys_remap_file_pages */
14128 + .long sys_set_tid_address
14129 + .long sys_timer_create
14130 + .long sys_timer_settime /* 255 */
14131 + .long sys_timer_gettime
14132 + .long sys_timer_getoverrun
14133 + .long sys_timer_delete
14134 + .long sys_clock_settime
14135 + .long sys_clock_gettime /* 260 */
14136 + .long sys_clock_getres
14137 + .long sys_clock_nanosleep
14138 + .long sys_statfs64
14139 + .long sys_fstatfs64
14140 + .long sys_tgkill /* 265 */
14142 + .long sys_fadvise64_64
14144 + .long sys_get_mempolicy
14145 + .long sys_set_mempolicy /* 270 */
14146 + .long sys_mq_open
14147 + .long sys_mq_unlink
14148 + .long sys_mq_timedsend
14149 + .long sys_mq_timedreceive
14150 + .long sys_mq_notify /* 275 */
14151 + .long sys_mq_getsetattr
14153 + .long sys_ni_syscall /* for _sys_vserver */
14154 + .long sys_add_key
14155 + .long sys_request_key /* 280 */
14157 + .long sys_ioprio_set
14158 + .long sys_ioprio_get
14159 + .long sys_inotify_init
14160 + .long sys_inotify_add_watch /* 285 */
14161 + .long sys_inotify_rm_watch
14162 + .long sys_migrate_pages
14164 + .long sys_mkdirat
14165 + .long sys_mknodat /* 290 */
14166 + .long sys_fchownat
14167 + .long sys_futimesat
14168 + .long sys_fstatat64
14169 + .long sys_unlinkat
14170 + .long sys_renameat /* 295 */
14172 + .long sys_symlinkat
14173 + .long sys_readlinkat
14174 + .long sys_fchmodat
14175 + .long sys_faccessat /* 300 */
14176 + .long sys_ni_syscall /* Reserved for pselect6 */
14177 + .long sys_ni_syscall /* Reserved for ppoll */
14178 + .long sys_unshare
14179 + .long sys_set_robust_list
14180 + .long sys_get_robust_list /* 305 */
14182 + .long sys_sync_file_range
14184 + .long sys_vmsplice
14185 + .long sys_move_pages /* 310 */
14186 + .long sys_sched_setaffinity
14187 + .long sys_sched_getaffinity
14188 + .long sys_kexec_load
14190 + .long sys_epoll_pwait /* 315 */
14191 + .long sys_utimensat
14192 + .long sys_signalfd
14193 + .long sys_timerfd_create
14194 + .long sys_eventfd
14195 + .long sys_fallocate /* 320 */
14196 + .long sys_timerfd_settime
14197 + .long sys_timerfd_gettime
14198 + .long sys_ni_syscall /* sys_signalfd4 */
14199 + .long sys_ni_syscall /* sys_eventfd2 */
14200 + .long sys_ni_syscall /* sys_epoll_create1 */
14202 + .long sys_ni_syscall /* sys_dup3 */
14203 + .long sys_ni_syscall /* sys_pipe2 */
14204 + .long sys_ni_syscall /* sys_inotify_init1 */
14205 + .rept NR_syscalls-(.-sys_call_table)/4
14206 + .long sys_ni_syscall
14209 diff -ruN linux-2.6.28.10_o/arch/ubicom32/lib/Makefile linux-2.6.28.10/arch/ubicom32/lib/Makefile
14210 --- linux-2.6.28.10_o/arch/ubicom32/lib/Makefile 1970-01-01 02:00:00.000000000 +0200
14211 +++ linux-2.6.28.10/arch/ubicom32/lib/Makefile 2009-08-06 10:31:02.000000000 +0300
14214 +# arch/ubicom32/lib/Makefile
14215 +# <TODO: Replace with short file description>
14217 +# (C) Copyright 2009, Ubicom, Inc.
14219 +# This file is part of the Ubicom32 Linux Kernel Port.
14221 +# The Ubicom32 Linux Kernel Port is free software: you can redistribute
14222 +# it and/or modify it under the terms of the GNU General Public License
14223 +# as published by the Free Software Foundation, either version 2 of the
14224 +# License, or (at your option) any later version.
14226 +# The Ubicom32 Linux Kernel Port is distributed in the hope that it
14227 +# will be useful, but WITHOUT ANY WARRANTY; without even the implied
14228 +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
14229 +# the GNU General Public License for more details.
14231 +# You should have received a copy of the GNU General Public License
14232 +# along with the Ubicom32 Linux Kernel Port. If not,
14233 +# see <http://www.gnu.org/licenses/>.
14235 +# Ubicom32 implementation derived from (with many thanks):
14241 +# Makefile for m68knommu specific library files..
14244 +lib-y := checksum.o delay.o mem_ubicom32.o
14245 diff -ruN linux-2.6.28.10_o/arch/ubicom32/mach-common/Makefile linux-2.6.28.10/arch/ubicom32/mach-common/Makefile
14246 --- linux-2.6.28.10_o/arch/ubicom32/mach-common/Makefile 1970-01-01 02:00:00.000000000 +0200
14247 +++ linux-2.6.28.10/arch/ubicom32/mach-common/Makefile 2009-08-06 10:31:02.000000000 +0300
14250 +# arch/ubicom32/mach-common/Makefile
14251 +# Makefile for Ubicom32 generic drivers/code.
14253 +# (C) Copyright 2009, Ubicom, Inc.
14255 +# This file is part of the Ubicom32 Linux Kernel Port.
14257 +# The Ubicom32 Linux Kernel Port is free software: you can redistribute
14258 +# it and/or modify it under the terms of the GNU General Public License
14259 +# as published by the Free Software Foundation, either version 2 of the
14260 +# License, or (at your option) any later version.
14262 +# The Ubicom32 Linux Kernel Port is distributed in the hope that it
14263 +# will be useful, but WITHOUT ANY WARRANTY; without even the implied
14264 +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
14265 +# the GNU General Public License for more details.
14267 +# You should have received a copy of the GNU General Public License
14268 +# along with the Ubicom32 Linux Kernel Port. If not,
14269 +# see <http://www.gnu.org/licenses/>.
14271 +# Ubicom32 implementation derived from (with many thanks):
14277 +obj-y += cachectl.o common.o usb_tio.o usb.o ubi32-gpio.o board.o bootargs.o
14278 +obj-$(CONFIG_PCI) += pci.o io.o
14280 +obj-$(CONFIG_FB_UBICOM32) += vdc_tio.o
14281 +obj-$(CONFIG_UBICOM_HID) += ubicom32hid.o
14282 +obj-$(CONFIG_UBICOM_INPUT) += ubicom32input.o
14283 +obj-$(CONFIG_UBICOM_INPUT_I2C) += ubicom32input_i2c.o
14284 +obj-$(CONFIG_UBICOM_SWITCH) += switch-core.o
14285 +obj-$(CONFIG_UBICOM_SWITCH_BCM539X) += switch-bcm539x.o
14286 +obj-$(CONFIG_UIO_UBICOM32RING) += ring_tio.o
14287 +obj-$(CONFIG_SND_UBI32) += audio_tio.o
14289 diff -ruN linux-2.6.28.10_o/arch/ubicom32/mach-ip5k/Kconfig linux-2.6.28.10/arch/ubicom32/mach-ip5k/Kconfig
14290 --- linux-2.6.28.10_o/arch/ubicom32/mach-ip5k/Kconfig 1970-01-01 02:00:00.000000000 +0200
14291 +++ linux-2.6.28.10/arch/ubicom32/mach-ip5k/Kconfig 2009-08-06 10:31:02.000000000 +0300
14296 + select UBICOM32_V3
14300 + select FB_UBICOM32
14301 + select BACKLIGHT_LCD_SUPPORT
14302 + select BACKLIGHT_CLASS_DEVICE
14303 + select UBICOM_HID
14305 + select LEDS_CLASS
14309 + IP5170 Digital Picture Frame board, 8005-1113, IP5K-BEV-0011-13 v1.3
14312 + bool "IP5160Dev_Ver1Dot1"
14313 + select UBICOM32_V3
14316 + Ubicom StreamEngine 5000 Development Board, IP5K-BDV-0004-11 v1.1
14319 + bool "IP5160RGWEval_Ver2Rev2"
14320 + select UBICOM32_V3
14323 + Ubicom StreamEngine 5000 RGW Evaluation Board, IP5K-RGW-0004-11 v2.2
14325 diff -ruN linux-2.6.28.10_o/arch/ubicom32/mach-ip5k/Makefile linux-2.6.28.10/arch/ubicom32/mach-ip5k/Makefile
14326 --- linux-2.6.28.10_o/arch/ubicom32/mach-ip5k/Makefile 1970-01-01 02:00:00.000000000 +0200
14327 +++ linux-2.6.28.10/arch/ubicom32/mach-ip5k/Makefile 2009-08-06 10:31:02.000000000 +0300
14330 +# arch/ubicom32/mach-ip5k/Makefile
14331 +# Makefile for boards which have an ip5k on them.
14333 +# (C) Copyright 2009, Ubicom, Inc.
14335 +# This file is part of the Ubicom32 Linux Kernel Port.
14337 +# The Ubicom32 Linux Kernel Port is free software: you can redistribute
14338 +# it and/or modify it under the terms of the GNU General Public License
14339 +# as published by the Free Software Foundation, either version 2 of the
14340 +# License, or (at your option) any later version.
14342 +# The Ubicom32 Linux Kernel Port is distributed in the hope that it
14343 +# will be useful, but WITHOUT ANY WARRANTY; without even the implied
14344 +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
14345 +# the GNU General Public License for more details.
14347 +# You should have received a copy of the GNU General Public License
14348 +# along with the Ubicom32 Linux Kernel Port. If not,
14349 +# see <http://www.gnu.org/licenses/>.
14351 +# Ubicom32 implementation derived from (with many thanks):
14357 +obj-$(CONFIG_IP5170DPF) += board-ip5170dpf.o
14358 +obj-$(CONFIG_IP5160DEV) += board-ip5160dev.o
14359 +obj-$(CONFIG_IP5160EVAL) += board-ip5160rgw.o
14361 diff -ruN linux-2.6.28.10_o/arch/ubicom32/mach-ip7k/Kconfig linux-2.6.28.10/arch/ubicom32/mach-ip7k/Kconfig
14362 --- linux-2.6.28.10_o/arch/ubicom32/mach-ip7k/Kconfig 1970-01-01 02:00:00.000000000 +0200
14363 +++ linux-2.6.28.10/arch/ubicom32/mach-ip7k/Kconfig 2009-08-06 10:31:02.000000000 +0300
14367 + select UBICOM32_V4
14368 + select UBICOM_INPUT
14369 + select UBICOM_INPUT_I2C
14371 + select RTC_DRV_S35390A
14374 + select GPIO_PCA953X
14376 + select FB_UBICOM32
14377 + select BACKLIGHT_LCD_SUPPORT
14378 + select LCD_CLASS_DEVICE
14379 + select LCD_UBICOM32
14380 + select BACKLIGHT_CLASS_DEVICE
14381 + select BACKLIGHT_UBICOM32
14383 + select MMC_UBICOM32
14388 + IP7145 Digital Picture Frame reference design, supports:
14393 + select UBICOM32_V4
14394 + select UBICOM_INPUT
14396 + select LEDS_CLASS
14400 + select SPI_UBICOM32_GPIO
14401 + select VLAN_8021Q
14402 + select UBICOM_SWITCH
14403 + select UBICOM_SWITCH_BCM539X
14405 + Ubicom IP7160 RGW Eval, supports:
14410 +config IP7160BRINGUP
14411 + bool "IP7160BRINGUP"
14412 + select UBICOM32_V4
14414 + select LEDS_CLASS
14418 + Ubicom IP7160 Bringup, supports:
14423 + select UBICOM32_V4
14427 + select FB_UBICOM32
14428 + select BACKLIGHT_LCD_SUPPORT
14429 + select BACKLIGHT_CLASS_DEVICE
14431 + select SND_UBI32_AUDIO_CS4350
14432 + select UBICOM_HID
14435 + IP7160 Digital Picture Frame board, supports:
14436 + 8007-0211 Rev 1.1
14438 +config IP7500MODULE
14439 + bool "IP7500MODULE"
14440 + select UBICOM32_V4
14443 + Ubicom IP7500 CPU Module board, supports:
14447 + Please see ip7500module.c for more details.
14451 + select UBICOM32_V4
14456 + select SND_UBI32_AUDIO_CS4384
14458 + select FB_UBICOM32
14460 + Ubicom IP7500 Audio Video board, supports:
14463 + With Ubicom IP7500 CPU Module board:
14464 + 8007-0510 v1.0 -or-
14467 + Please see ip7500av.c for more details.
14469 +config IP7500MEDIA
14470 + bool "IP7500MEDIA"
14471 + select UBICOM32_V4
14472 + select UBICOM_INPUT_I2C
14474 + select RTC_DRV_S35390A
14477 + select GPIO_PCA953X
14479 + select FB_UBICOM32
14480 + select BACKLIGHT_LCD_SUPPORT
14481 + select LCD_CLASS_DEVICE
14482 + select LCD_UBICOM32
14483 + select BACKLIGHT_CLASS_DEVICE
14484 + select BACKLIGHT_UBICOM32
14486 + select SND_UBI32_AUDIO_CS4350
14487 + select MMC_UBICOM32
14492 + IP7500 Media Board w/ IP7500 CPU Module board, supports:
14493 + 8007-0610 v1.0 w/ 8007-0510 v1.0
14495 + Please see ip7500media.c for more details.
14497 diff -ruN linux-2.6.28.10_o/arch/ubicom32/mach-ip7k/Makefile linux-2.6.28.10/arch/ubicom32/mach-ip7k/Makefile
14498 --- linux-2.6.28.10_o/arch/ubicom32/mach-ip7k/Makefile 1970-01-01 02:00:00.000000000 +0200
14499 +++ linux-2.6.28.10/arch/ubicom32/mach-ip7k/Makefile 2009-08-06 10:31:02.000000000 +0300
14502 +# arch/ubicom32/mach-ip7k/Makefile
14503 +# Makefile for ip7k based boards.
14505 +# (C) Copyright 2009, Ubicom, Inc.
14507 +# This file is part of the Ubicom32 Linux Kernel Port.
14509 +# The Ubicom32 Linux Kernel Port is free software: you can redistribute
14510 +# it and/or modify it under the terms of the GNU General Public License
14511 +# as published by the Free Software Foundation, either version 2 of the
14512 +# License, or (at your option) any later version.
14514 +# The Ubicom32 Linux Kernel Port is distributed in the hope that it
14515 +# will be useful, but WITHOUT ANY WARRANTY; without even the implied
14516 +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
14517 +# the GNU General Public License for more details.
14519 +# You should have received a copy of the GNU General Public License
14520 +# along with the Ubicom32 Linux Kernel Port. If not,
14521 +# see <http://www.gnu.org/licenses/>.
14523 +# Ubicom32 implementation derived from (with many thanks):
14529 +obj-$(CONFIG_IP7145DPF) += board-ip7145dpf.o
14530 +obj-$(CONFIG_IP7160RGW) += board-ip7160rgw.o
14531 +obj-$(CONFIG_IP7160BRINGUP) += board-ip7160bringup.o
14532 +obj-$(CONFIG_IP7160DPF) += board-ip7160dpf.o
14533 +obj-$(CONFIG_IP7500MODULE) += board-ip7500module.o
14534 +obj-$(CONFIG_IP7500MEDIA) += board-ip7500media.o
14535 +obj-$(CONFIG_IP7500AV) += board-ip7500av.o
14536 diff -ruN linux-2.6.28.10_o/arch/ubicom32/Makefile linux-2.6.28.10/arch/ubicom32/Makefile
14537 --- linux-2.6.28.10_o/arch/ubicom32/Makefile 1970-01-01 02:00:00.000000000 +0200
14538 +++ linux-2.6.28.10/arch/ubicom32/Makefile 2009-08-06 10:31:02.000000000 +0300
14541 +# arch/ubicom32/Makefile
14542 +# <TODO: Replace with short file description>
14544 +# (C) Copyright 2009, Ubicom, Inc.
14546 +# This file is part of the Ubicom32 Linux Kernel Port.
14548 +# The Ubicom32 Linux Kernel Port is free software: you can redistribute
14549 +# it and/or modify it under the terms of the GNU General Public License
14550 +# as published by the Free Software Foundation, either version 2 of the
14551 +# License, or (at your option) any later version.
14553 +# The Ubicom32 Linux Kernel Port is distributed in the hope that it
14554 +# will be useful, but WITHOUT ANY WARRANTY; without even the implied
14555 +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
14556 +# the GNU General Public License for more details.
14558 +# You should have received a copy of the GNU General Public License
14559 +# along with the Ubicom32 Linux Kernel Port. If not,
14560 +# see <http://www.gnu.org/licenses/>.
14562 +# Ubicom32 implementation derived from (with many thanks):
14568 +KBUILD_DEFCONFIG :=
14570 +# setup the machine name and machine dependent settings
14571 +machine-$(CONFIG_UBICOM32_V3) := ip5k
14572 +machine-$(CONFIG_UBICOM32_V4) := ip7k
14573 +MACHINE := $(machine-y)
14576 +model-$(CONFIG_RAMKERNEL) := ram
14577 +model-$(CONFIG_ROMKERNEL) := rom
14578 +MODEL := $(model-y)
14581 +CPUCLASS := $(cpuclass-y)
14586 +# We want the core kernel built using the fastcall ABI but modules need
14587 +# to be built using the slower calling convention because they could be
14588 +# loaded out of range for fast calls.
14590 +CFLAGS_KERNEL += -mfastcall
14591 +CFLAGS_MODULE += -mno-fastcall
14594 +# Some CFLAG additions based on specific CPU type.
14596 +cflags-$(CONFIG_UBICOM32_V3) := -march=ubicom32v3 -DIP5000
14597 +cflags-$(CONFIG_UBICOM32_V4) := -march=ubicom32v4 -DIP7000
14599 +ldflags-$(CONFIG_LINKER_RELAXATION) := --relax
14600 +LDFLAGS_vmlinux := $(ldflags-y)
14602 +GCCLIBDIR := $(dir $(shell $(CC) $(cflags-y) -print-libgcc-file-name))
14603 +GCC_LIBS := $(GCCLIBDIR)/libgcc.a
14605 +KBUILD_CFLAGS += $(cflags-y) -ffunction-sections
14606 +KBUILD_AFLAGS += $(cflags-y)
14608 +KBUILD_CFLAGS += -D__linux__ -Dlinux
14609 +KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
14611 +# include any machine specific directory
14612 +ifneq ($(machine-y),)
14613 +core-y += arch/$(ARCH)/mach-$(MACHINE)/
14616 +head-y := arch/$(ARCH)/kernel/head.o
14618 +core-y += arch/$(ARCH)/kernel/ \
14619 + arch/$(ARCH)/mm/ \
14620 + arch/$(ARCH)/crypto/ \
14621 + arch/$(ARCH)/mach-common/
14623 +drivers-$(CONFIG_OPROFILE) += arch/ubicom32/oprofile/
14625 +libs-y += arch/$(ARCH)/lib/
14626 +libs-y += $(GCC_LIBS)
14630 +# make sure developer has selected a valid board
14631 +ifeq ($(CONFIG_NOBOARD),y)
14632 +# $(error have to select a valid board file $(CONFIG_NOBOARD), please run kernel config again)
14633 +_all: config_board_error
14636 +config_board_error:
14637 + @echo "*************************************************"
14638 + @echo "You have not selected a proper board."
14639 + @echo "Please run menuconfig (or config) against your"
14640 + @echo "kernel and choose your board under Processor"
14642 + @echo "*************************************************"
14645 diff -ruN linux-2.6.28.10_o/arch/ubicom32/mm/Makefile linux-2.6.28.10/arch/ubicom32/mm/Makefile
14646 --- linux-2.6.28.10_o/arch/ubicom32/mm/Makefile 1970-01-01 02:00:00.000000000 +0200
14647 +++ linux-2.6.28.10/arch/ubicom32/mm/Makefile 2009-08-12 13:08:37.000000000 +0300
14650 +# arch/ubicom32/mm/Makefile
14651 +# <TODO: Replace with short file description>
14653 +# (C) Copyright 2009, Ubicom, Inc.
14655 +# This file is part of the Ubicom32 Linux Kernel Port.
14657 +# The Ubicom32 Linux Kernel Port is free software: you can redistribute
14658 +# it and/or modify it under the terms of the GNU General Public License
14659 +# as published by the Free Software Foundation, either version 2 of the
14660 +# License, or (at your option) any later version.
14662 +# The Ubicom32 Linux Kernel Port is distributed in the hope that it
14663 +# will be useful, but WITHOUT ANY WARRANTY; without even the implied
14664 +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
14665 +# the GNU General Public License for more details.
14667 +# You should have received a copy of the GNU General Public License
14668 +# along with the Ubicom32 Linux Kernel Port. If not,
14669 +# see <http://www.gnu.org/licenses/>.
14671 +# Ubicom32 implementation derived from (with many thanks):
14677 +# Makefile for the linux m68knommu specific parts of the memory manager.
14680 +obj-y += init.o fault.o memory.o kmap.o ocm-alloc.o
14681 diff -ruN linux-2.6.28.10_o/include/linux/elf-em.h linux-2.6.28.10/include/linux/elf-em.h
14682 --- linux-2.6.28.10_o/include/linux/elf-em.h 2009-05-02 21:54:43.000000000 +0300
14683 +++ linux-2.6.28.10/include/linux/elf-em.h 2009-08-06 10:31:10.000000000 +0300
14685 * up with a final number.
14687 #define EM_ALPHA 0x9026
14688 +#define EM_UBICOM32 0xde3d /* Ubicom32; no ABI */
14690 /* Bogus old v850 magic number, used by old tools. */
14691 #define EM_CYGNUS_V850 0x9080
14692 diff -ruN linux-2.6.28.10_o/lib/Kconfig.debug linux-2.6.28.10/lib/Kconfig.debug
14693 --- linux-2.6.28.10_o/lib/Kconfig.debug 2009-05-02 21:54:43.000000000 +0300
14694 +++ linux-2.6.28.10/lib/Kconfig.debug 2009-08-06 10:31:11.000000000 +0300
14695 @@ -549,7 +549,7 @@
14696 bool "Compile the kernel with frame pointers"
14697 depends on DEBUG_KERNEL && \
14698 (X86 || CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \
14699 - AVR32 || SUPERH || BLACKFIN || MN10300)
14700 + AVR32 || SUPERH || BLACKFIN || MN10300 || UBICOM32)
14701 default y if DEBUG_INFO && UML
14703 If you say Y here the resulting kernel image will be slightly larger
14704 diff -ruN linux-2.6.28.10_o/scripts/mod/file2alias.c linux-2.6.28.10/scripts/mod/file2alias.c
14705 --- linux-2.6.28.10_o/scripts/mod/file2alias.c 2009-05-02 21:54:43.000000000 +0300
14706 +++ linux-2.6.28.10/scripts/mod/file2alias.c 2009-08-06 10:31:12.000000000 +0300
14707 @@ -753,6 +753,15 @@
14712 + * somehow our gcc is not generating st_size correctly and set 0 for some symbols.
14713 + * and 0 size will break do_table since it adjust size to (size - id_size)
14714 + * this is to make sure st_size fall in range.
14716 + if (sym->st_size == 0 || sym->st_size > info->sechdrs[sym->st_shndx].sh_size) {
14717 + sym->st_size = info->sechdrs[sym->st_shndx].sh_size;
14720 if (sym_is(symname, "__mod_pci_device_table"))
14721 do_table(symval, sym->st_size,
14722 sizeof(struct pci_device_id), "pci",