aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/image
Commit message (Expand)AuthorAgeFilesLines
* brcm47xx: image: build firmware for Asus WL-500g DeluxeRafał Miłecki2017-12-291-0/+8
* brcm47xx: remove versions from linksys-e1000 targetMoritz Warning2017-12-111-2/+2
* brcm47xx: use proper region code in image nameMoritz Warning2017-12-111-9/+9
* brcm47xx: relocate the stack in loaderHauke Mehrtens2017-10-112-2/+4
* brcm47xx: relocate loader to higher addressHauke Mehrtens2017-10-111-1/+1
* brcm47xx: fix USB driver choice for Asus WL-500WMirko Parthey2017-02-151-1/+1
* brcm47xx: generic: include Ethernet drivers in standard imageRafał Miłecki2017-01-041-0/+5
* brcm47xx: generic: specify DEVICE_PACKAGES for all devicesRafał Miłecki2017-01-041-0/+6
* brcm47xx: mips74k: specify DEVICE_PACKAGES for all devicesRafał Miłecki2017-01-041-0/+39
* brcm47xx: legacy: specify DEVICE_PACKAGES for all devicesRafał Miłecki2017-01-041-1/+29
* brcm47xx: specify DEVICE_PACKAGES for Netgear WGT634URafał Miłecki2016-12-301-0/+3
* brcm47xx: mips74k: fix typo in Netgear WN3000RP model nameRafał Miłecki2016-12-291-8/+8
* brcm47xx: fix initramfs image build errorFelix Fietkau2016-11-291-0/+1
* brcm47xx: image: use append-rootfs step for per-device rootfs supportRafał Miłecki2016-10-281-18/+18
* brcm47xx: image: make TRX steps work with rootfs passed as $@Rafał Miłecki2016-10-281-2/+4
* brcm47xx: image: make linksys-pattern-partition leave specific fileRafał Miłecki2016-10-281-2/+2
* brcm47xx: add support for per-device rootfsRafał Miłecki2016-10-271-4/+95
* brcm47xx: reorder older entries in image MakefileRafał Miłecki2016-10-241-64/+63
* brcm47xx: build also TRX image for Linksys WRT300N V1Rafał Miłecki2016-10-241-0/+1
* brcm47xx: open code Makefile entries for all devicesRafał Miłecki2016-10-241-115/+527
* image: add a helper variable for getting kernel/rootfs from within image Buil...Felix Fietkau2016-07-311-2/+2
* brcm47xx: lzma-loader: fix cache invalidationGabor Juhos2016-03-211-4/+4
* brcm47xx: lzma-loader: remove trailing whitespaces from head.SGabor Juhos2016-03-211-9/+9
* brcm47xx: image: create standard TRX images using new building systemRafał Miłecki2016-03-111-15/+20
* brcm47xx: image: move disabled devices to the new building systemRafał Miłecki2016-03-091-13/+3
* brcm47xx: image: switch Linksys WRT54G3GV2-VF to the new building systemRafał Miłecki2016-03-091-45/+28
* brcm47xx: image: switch Netgear WGT634U to the new building systemRafał Miłecki2016-03-081-6/+13
* brcm47xx: image: switch rest of 64k block devices to the new building systemRafał Miłecki2016-03-081-28/+45
* brcm47xx: image: switch Motorola devices to the new building systemRafał Miłecki2016-03-081-7/+22
* brcm47xx: image: switch D-Link DWL-3150 to the new building systemRafał Miłecki2016-03-081-7/+13
* brcm47xx: add Netgear WN2500RP supportRafał Miłecki2015-12-021-0/+1
* brcm47xx: increase max image sizeHauke Mehrtens2015-09-111-0/+7
* brcm47xx: break long lines in image MakefileHauke Mehrtens2015-09-111-7/+18
* brcm47xx: fix Linksys E1200 V2 image filenameRafał Miłecki2015-08-291-1/+1
* image.mk: replace all Build/netgear-chk with a generic implementationJonas Gorski2015-08-141-9/+0
* brcm47xx: prefix netgear specific device variables with NETGEAR_Jonas Gorski2015-08-141-5/+5
* brcm47xx: image: fix typo in Asus WL-500gP v2 fw file nameRafał Miłecki2015-05-281-1/+1
* brcm47xx: build images for Asus devicesRafał Miłecki2015-05-271-1/+27
* brcm47xx: use common image prefixJo-Philipp Wich2015-05-271-16/+16
* brcm47xx: build image for Asus RT-N66URafał Miłecki2015-05-271-0/+20
* brcm47xx: image: use "-" separator for device versionRafał Miłecki2015-04-091-6/+6
* brcm47xx: image: use new (& fixed) FILESYSTEM variable for trx commandRafał Miłecki2015-04-081-1/+1
* brcm47xx: image: convert legacy Linksys & Netgear devicesRafał Miłecki2015-03-311-12/+31
* brcm47xx: image: convert generic subtarget to the new images systemRafał Miłecki2015-03-311-18/+11
* brcm47xx: image: convert all mips74k images to the new building systemRafał Miłecki2015-03-311-47/+28
* brcm47xx: image: add helpers for defining devicesRafał Miłecki2015-03-311-15/+20
* brcm47xx: image: use standard KERNEL_IMAGE to avoid warningsRafał Miłecki2015-03-311-1/+2
* brcm47xx: update Linksys firmwares (add new E2500 versions)Rafał Miłecki2015-03-311-2/+5
* brcm47xx: convert Netgear WNDR3700 V3 to the new image building systemRafał Miłecki2015-03-291-3/+25
* brcm47xx: convert Linksys E1200 V2 to the new image building systemRafał Miłecki2015-03-291-1/+46
p">; if ( heap[nxt]->expires > t->expires ) break; heap[pos] = heap[nxt]; heap[pos]->heap_offset = pos; pos = nxt; } heap[pos] = t; t->heap_offset = pos; } /* Float element @pos up @heap. */ static void up_heap(struct ac_timer **heap, int pos) { struct ac_timer *t = heap[pos]; while ( (pos > 1) && (t->expires < heap[pos>>1]->expires) ) { heap[pos] = heap[pos>>1]; heap[pos]->heap_offset = pos; pos >>= 1; } heap[pos] = t; t->heap_offset = pos; } /* Delete @t from @heap. Return TRUE if new top of heap. */ static int remove_entry(struct ac_timer **heap, struct ac_timer *t) { int sz = GET_HEAP_SIZE(heap); int pos = t->heap_offset; t->heap_offset = 0; if ( unlikely(pos == sz) ) { SET_HEAP_SIZE(heap, sz-1); goto out; } heap[pos] = heap[sz]; heap[pos]->heap_offset = pos; SET_HEAP_SIZE(heap, --sz); if ( (pos > 1) && (heap[pos]->expires < heap[pos>>1]->expires) ) up_heap(heap, pos); else down_heap(heap, pos); out: return (pos == 1); } /* Add new entry @t to @heap. Return TRUE if new top of heap. */ static int add_entry(struct ac_timer **heap, struct ac_timer *t) { int sz = GET_HEAP_SIZE(heap); /* Copy the heap if it is full. */ if ( unlikely(sz == GET_HEAP_LIMIT(heap)) ) { int i, limit = (GET_HEAP_LIMIT(heap)+1) << 1; struct ac_timer **new_heap = xmalloc(limit*sizeof(struct ac_timer *)); if ( new_heap == NULL ) BUG(); memcpy(new_heap, heap, (limit>>1)*sizeof(struct ac_timer *)); for ( i = 0; i < smp_num_cpus; i++ ) if ( ac_timers[i].heap == heap ) ac_timers[i].heap = new_heap; xfree(heap); heap = new_heap; SET_HEAP_LIMIT(heap, limit-1); } SET_HEAP_SIZE(heap, ++sz); heap[sz] = t; t->heap_offset = sz; up_heap(heap, sz); return (t->heap_offset == 1); } /**************************************************************************** * TIMER OPERATIONS. */ static inline void __add_ac_timer(struct ac_timer *timer) { int cpu = timer->cpu; if ( add_entry(ac_timers[cpu].heap, timer) ) cpu_raise_softirq(cpu, AC_TIMER_SOFTIRQ); } void add_ac_timer(struct ac_timer *timer) { int cpu = timer->cpu; unsigned long flags; spin_lock_irqsave(&ac_timers[cpu].lock, flags); ASSERT(timer != NULL); ASSERT(!active_ac_timer(timer)); __add_ac_timer(timer); spin_unlock_irqrestore(&ac_timers[cpu].lock, flags); } static inline void __rem_ac_timer(struct ac_timer *timer) { int cpu = timer->cpu; if ( remove_entry(ac_timers[cpu].heap, timer) ) cpu_raise_softirq(cpu, AC_TIMER_SOFTIRQ); } void rem_ac_timer(struct ac_timer *timer) { int cpu = timer->cpu; unsigned long flags; spin_lock_irqsave(&ac_timers[cpu].lock, flags); ASSERT(timer != NULL); if ( active_ac_timer(timer) ) __rem_ac_timer(timer); spin_unlock_irqrestore(&ac_timers[cpu].lock, flags); } void mod_ac_timer(struct ac_timer *timer, s_time_t new_time) { int cpu = timer->cpu; unsigned long flags; spin_lock_irqsave(&ac_timers[cpu].lock, flags); ASSERT(timer != NULL); if ( active_ac_timer(timer) ) __rem_ac_timer(timer); timer->expires = new_time; __add_ac_timer(timer); spin_unlock_irqrestore(&ac_timers[cpu].lock, flags); } static void ac_timer_softirq_action(void) { int cpu = smp_processor_id(); struct ac_timer *t, **heap; s_time_t now; void (*fn)(unsigned long); spin_lock_irq(&ac_timers[cpu].lock); do { heap = ac_timers[cpu].heap; now = NOW(); while ( (GET_HEAP_SIZE(heap) != 0) && ((t = heap[1])->expires < (now + TIMER_SLOP)) ) { remove_entry(heap, t); if ( (fn = t->function) != NULL ) { unsigned long data = t->data; spin_unlock_irq(&ac_timers[cpu].lock); (*fn)(data); spin_lock_irq(&ac_timers[cpu].lock); } /* Heap may have grown while the lock was released. */ heap = ac_timers[cpu].heap; } } while ( !reprogram_ac_timer(GET_HEAP_SIZE(heap) ? heap[1]->expires : 0) ); spin_unlock_irq(&ac_timers[cpu].lock); } static void dump_timerq(u_char key, void *dev_id, struct pt_regs *regs) { struct ac_timer *t; unsigned long flags; s_time_t now = NOW(); int i, j; printk("Dumping ac_timer queues: NOW=0x%08X%08X\n", (u32)(now>>32), (u32)now); for ( i = 0; i < smp_num_cpus; i++ ) { printk("CPU[%02d] ", i); spin_lock_irqsave(&ac_timers[i].lock, flags); for ( j = 1; j <= GET_HEAP_SIZE(ac_timers[i].heap); j++ ) { t = ac_timers[i].heap[j]; printk (" %d : %p ex=0x%08X%08X %lu\n", j, t, (u32)(t->expires>>32), (u32)t->expires, t->data); } spin_unlock_irqrestore(&ac_timers[i].lock, flags); printk("\n"); } } void __init ac_timer_init(void) { int i; open_softirq(AC_TIMER_SOFTIRQ, ac_timer_softirq_action); for ( i = 0; i < smp_num_cpus; i++ ) { ac_timers[i].heap = xmalloc( (DEFAULT_HEAP_LIMIT+1) * sizeof(struct ac_timer *)); if ( ac_timers[i].heap == NULL ) BUG(); SET_HEAP_SIZE(ac_timers[i].heap, 0); SET_HEAP_LIMIT(ac_timers[i].heap, DEFAULT_HEAP_LIMIT); spin_lock_init(&ac_timers[i].lock); } add_key_handler('a', dump_timerq, "dump ac_timer queues"); }