Re: [PATCH 02/10] Blackfin SPI driver: use new GPIO API and add error handling
On 10/13/07, David Brownell <[EMAIL PROTECTED]> wrote: > On Thursday 11 October 2007, Bryan Wu wrote: > > On Thu, 2007-10-11 at 23:26 -0700, David Brownell wrote: > > > On Thursday 11 October 2007, Bryan Wu wrote: > > > > @@ -1182,12 +1198,9 @@ static int __init bfin5xx_spi_probe(struct > > > > platform_device *pdev) > > > > return -ENOMEM; > > > > } > > > > > > > > - if (peripheral_request(P_SPI0_SCK, DRV_NAME) || > > > > -peripheral_request(P_SPI0_MISO, DRV_NAME) || > > > > -peripheral_request(P_SPI0_MOSI, DRV_NAME) ) { > > > > - > > > > + if (setup_pin_mux(1)) { > > > > dev_err(>dev, ": Requesting Peripherals > > > > failed\n"); > > > > - goto out_error_queue_alloc; > > > > + goto out_error; > > > > } > > > > > > > > drv_data = spi_master_get_devdata(master); > > > > > > > > > > Still doesn't apply ... what tree are you generating this series against?? > > > > I apply this patch on Linus git tree at 2.6.23 tag > > Then why don't my copies of that tree have the lines flagged > above with "-" ?? > > In fact, if I look at the kernel.org GIT tree, it doesn't have > them either. Your tree must have somehow gotten a bunch of > private changes. > > Yes, the GIT tree's code is without that lines, which are introduced by the first patch of my SPI update patches: Blackfin SPI driver: Initial supporting BF54x in SPI driver. So please apply the latest whole Blackfin SPI driver update patchset including 10 patches instead of 9 patches in previous email. Thanks a lot Best Regards - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 02/10] Blackfin SPI driver: use new GPIO API and add error handling
On 10/13/07, David Brownell [EMAIL PROTECTED] wrote: On Thursday 11 October 2007, Bryan Wu wrote: On Thu, 2007-10-11 at 23:26 -0700, David Brownell wrote: On Thursday 11 October 2007, Bryan Wu wrote: @@ -1182,12 +1198,9 @@ static int __init bfin5xx_spi_probe(struct platform_device *pdev) return -ENOMEM; } - if (peripheral_request(P_SPI0_SCK, DRV_NAME) || -peripheral_request(P_SPI0_MISO, DRV_NAME) || -peripheral_request(P_SPI0_MOSI, DRV_NAME) ) { - + if (setup_pin_mux(1)) { dev_err(pdev-dev, : Requesting Peripherals failed\n); - goto out_error_queue_alloc; + goto out_error; } drv_data = spi_master_get_devdata(master); Still doesn't apply ... what tree are you generating this series against?? I apply this patch on Linus git tree at 2.6.23 tag Then why don't my copies of that tree have the lines flagged above with - ?? In fact, if I look at the kernel.org GIT tree, it doesn't have them either. Your tree must have somehow gotten a bunch of private changes. Yes, the GIT tree's code is without that lines, which are introduced by the first patch of my SPI update patches: Blackfin SPI driver: Initial supporting BF54x in SPI driver. So please apply the latest whole Blackfin SPI driver update patchset including 10 patches instead of 9 patches in previous email. Thanks a lot Best Regards - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 00/33] 2.6.20-stable review
On Thu, 2007-04-26 at 09:54 -0700, Greg KH wrote: > This is the start of the stable review cycle for the 2.6.20.10 release. > There are 33 patches in this series, all will be posted as a response to > this one. If anyone has any issues with these being applied, please let > us know. If anyone is a maintainer of the proper subsystem, and wants > to add a Signed-off-by: line to the patch, please respond with it. > > These patches are sent out with a number of different people on the Cc: > line. If you wish to be a reviewer, please email [EMAIL PROTECTED] to > add your name to the list. If you want to be off the reviewer list, > also email us. Hi Greg: I am just wondering that is there any rule for stable kernel version release? AFAIK, 2.6.x kernels are all stable release and 2.6.x.y is for stable tree bug fixing and long term supporting. But I found 2.6.16.y got 49 version updating, it is more active than other stable release such as 2.6.17 and 2.6.19. It looks like 2.6.16 is a long-long term supporting version and even number 2.6.x kernel is more active than odd number 2.6.x kernel. You know for some customer's product, they want to use the stable and long term support kernel instead to use the latest one. Could you please give us some idea about this regular? Thanks -Bryan Wu - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 00/33] 2.6.20-stable review
On Thu, 2007-04-26 at 09:54 -0700, Greg KH wrote: This is the start of the stable review cycle for the 2.6.20.10 release. There are 33 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let us know. If anyone is a maintainer of the proper subsystem, and wants to add a Signed-off-by: line to the patch, please respond with it. These patches are sent out with a number of different people on the Cc: line. If you wish to be a reviewer, please email [EMAIL PROTECTED] to add your name to the list. If you want to be off the reviewer list, also email us. Hi Greg: I am just wondering that is there any rule for stable kernel version release? AFAIK, 2.6.x kernels are all stable release and 2.6.x.y is for stable tree bug fixing and long term supporting. But I found 2.6.16.y got 49 version updating, it is more active than other stable release such as 2.6.17 and 2.6.19. It looks like 2.6.16 is a long-long term supporting version and even number 2.6.x kernel is more active than odd number 2.6.x kernel. You know for some customer's product, they want to use the stable and long term support kernel instead to use the latest one. Could you please give us some idea about this regular? Thanks -Bryan Wu - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Blackfin: blackfin on-chip SPI controller driver
On Mon, 2007-04-16 at 18:31 -0800, David Brownell wrote: > Cleaning out some of my pending-reviews queue ... after you address > these comments I think what I'd like to do is sign off on one clean > patch, rather than initial-plus-cleanups. > > Thanks a lot, David. We will try to cleanup the code and most issues pointed out in your review. > On Monday 05 March 2007 2:41 am, Wu, Bryan wrote: > > > --- linux-2.6.orig/drivers/spi/Kconfig 2007-03-01 11:33:07.0 > > +0800 > > +++ linux-2.6/drivers/spi/Kconfig 2007-03-01 11:40:22.0 +0800 > > I'm adjusting this to address the later patches you sent. > > One global comment I'll make, just in case -- please make > sure all your line-start indents only include tabs, and > there's no space-at-end-of-line stuff going on, or lines > wrapping past column 80. > > I did this review in KMail, which doesn't highlight such > minor errors; and I suspect you're mostly OK, but for a > new driver there's no reason not to be 100% OK in those > particular respects! (And I *did* notice one of your > cleanup patches clearly adding tabs-then-spaces indents.) > Yes, I sent out a coding style incremental patch appending in -mm tree. Should I send out a new patch including the coding style clean up and code updated according to this review, or still submit incremental patches to Andrew? > > > @@ -156,7 +156,11 @@ > > # > > # Add new SPI protocol masters in alphabetical order above this line > > # > > - > > +config SPI_BFIN > > + tristate "SPI controller driver for ADI Blackfin5xx" > > + depends on SPI_MASTER && BFIN > > + help > > + This is the SPI controller master driver for Blackfin 5xx processor. > > Please put this in Kconfig up with the other SPI controller drivers, in > alphabetical order. Just like the comment says. > > Likewise, please add it to the Makefile in alphabetical order. > Got it, it should be followed. > > > --- /dev/null 1970-01-01 00:00:00.0 + > > +++ linux-2.6/drivers/spi/spi_bfin5xx.c 2007-03-01 11:40:22.0 > > +0800 > > > +#ifdef DEBUG > > +#define ASSERT(expr) \ > > + if (!(expr)) { \ > > + printk(KERN_DEBUG "assertion failed! %s[%d]: %s\n", \ > > + __FUNCTION__, __LINE__, #expr); \ > > + panic(KERN_DEBUG "%s", __FUNCTION__); \ > > Seems like either WARN_ON(expr) or BUG_ON(expr) will be better. > The general rule of BUG variants is: don't, unless the system > really can't continue operating. (I see a later patch removed > this entirely, good. > > Yes, we are trying to use kernel generic BUG_ON and WARN_ON to replace our own assert function. I fixed this in other code and obviously it was missed in this driver patch. > > + } > > +#else > > +#define ASSERT(expr) > > +#endif > > + > > +#define IS_DMA_ALIGNED(x) (((u32)(x)&0x07)==0) > > + > > +#define DEFINE_SPI_REG(reg, off) \ > > +static inline u16 read_##reg(void) \ > > +{ return *(volatile unsigned short*)(SPI0_REGBASE + off); } \ > > +static inline void write_##reg(u16 v) \ > > +{*(volatile unsigned short*)(SPI0_REGBASE + off) = v;\ > > + SSYNC();} > > These should be readw() and writew() or similar... also, I can't tell > what SSYNC() does, but it sure looks like something that shouldn't be > hidden like that. I/O memory should be mapped such that writes don't > get re-ordered. And flushing any write buffer should not be forced in > such low-level accessors ... if it's needed, it should be done at the > relevant points in the driver. (Which you seem to do in a few places > below. The duplication is undesirable.) > > > > + > > +DEFINE_SPI_REG(CTRL, 0x00) > > ... this particular style of register accessor is not generally used in Linux. > The typical style is > > u16 value = __raw_readw(SPI0_REGBASE + SPI_CTRL) > __raw_writew(SPI0_REGBASE + SPI_CTRL, value); > > or wrapped in macros so spi_readw(CTRL) and spi_writew(CTRL, value) work. > > Of course, SPI1/SPI2/etc should be supported too ... so it's common to have > those take a pointer to some controller struct with a "void __iomem *regs" > pointer to the rgisters for that instance. spi_readw(master, CTRL) etc. > > > > +#define START_STATE ((void*)0) > > +#define RUNNING_STATE ((void*)1) > > +#define DONE_STATE ((void*)2) > > +#define ERROR_STATE ((void*)-1) > > Normally states would be represented by enum values, which among other > things supports "switch (state) { ... }"
Re: [PATCH] Blackfin: blackfin on-chip SPI controller driver
On Mon, 2007-04-16 at 18:31 -0800, David Brownell wrote: Cleaning out some of my pending-reviews queue ... after you address these comments I think what I'd like to do is sign off on one clean patch, rather than initial-plus-cleanups. Thanks a lot, David. We will try to cleanup the code and most issues pointed out in your review. On Monday 05 March 2007 2:41 am, Wu, Bryan wrote: --- linux-2.6.orig/drivers/spi/Kconfig 2007-03-01 11:33:07.0 +0800 +++ linux-2.6/drivers/spi/Kconfig 2007-03-01 11:40:22.0 +0800 I'm adjusting this to address the later patches you sent. One global comment I'll make, just in case -- please make sure all your line-start indents only include tabs, and there's no space-at-end-of-line stuff going on, or lines wrapping past column 80. I did this review in KMail, which doesn't highlight such minor errors; and I suspect you're mostly OK, but for a new driver there's no reason not to be 100% OK in those particular respects! (And I *did* notice one of your cleanup patches clearly adding tabs-then-spaces indents.) Yes, I sent out a coding style incremental patch appending in -mm tree. Should I send out a new patch including the coding style clean up and code updated according to this review, or still submit incremental patches to Andrew? @@ -156,7 +156,11 @@ # # Add new SPI protocol masters in alphabetical order above this line # - +config SPI_BFIN + tristate SPI controller driver for ADI Blackfin5xx + depends on SPI_MASTER BFIN + help + This is the SPI controller master driver for Blackfin 5xx processor. Please put this in Kconfig up with the other SPI controller drivers, in alphabetical order. Just like the comment says. Likewise, please add it to the Makefile in alphabetical order. Got it, it should be followed. --- /dev/null 1970-01-01 00:00:00.0 + +++ linux-2.6/drivers/spi/spi_bfin5xx.c 2007-03-01 11:40:22.0 +0800 +#ifdef DEBUG +#define ASSERT(expr) \ + if (!(expr)) { \ + printk(KERN_DEBUG assertion failed! %s[%d]: %s\n, \ + __FUNCTION__, __LINE__, #expr); \ + panic(KERN_DEBUG %s, __FUNCTION__); \ Seems like either WARN_ON(expr) or BUG_ON(expr) will be better. The general rule of BUG variants is: don't, unless the system really can't continue operating. (I see a later patch removed this entirely, good. Yes, we are trying to use kernel generic BUG_ON and WARN_ON to replace our own assert function. I fixed this in other code and obviously it was missed in this driver patch. + } +#else +#define ASSERT(expr) +#endif + +#define IS_DMA_ALIGNED(x) (((u32)(x)0x07)==0) + +#define DEFINE_SPI_REG(reg, off) \ +static inline u16 read_##reg(void) \ +{ return *(volatile unsigned short*)(SPI0_REGBASE + off); } \ +static inline void write_##reg(u16 v) \ +{*(volatile unsigned short*)(SPI0_REGBASE + off) = v;\ + SSYNC();} These should be readw() and writew() or similar... also, I can't tell what SSYNC() does, but it sure looks like something that shouldn't be hidden like that. I/O memory should be mapped such that writes don't get re-ordered. And flushing any write buffer should not be forced in such low-level accessors ... if it's needed, it should be done at the relevant points in the driver. (Which you seem to do in a few places below. The duplication is undesirable.) + +DEFINE_SPI_REG(CTRL, 0x00) ... this particular style of register accessor is not generally used in Linux. The typical style is u16 value = __raw_readw(SPI0_REGBASE + SPI_CTRL) __raw_writew(SPI0_REGBASE + SPI_CTRL, value); or wrapped in macros so spi_readw(CTRL) and spi_writew(CTRL, value) work. Of course, SPI1/SPI2/etc should be supported too ... so it's common to have those take a pointer to some controller struct with a void __iomem *regs pointer to the rgisters for that instance. spi_readw(master, CTRL) etc. +#define START_STATE ((void*)0) +#define RUNNING_STATE ((void*)1) +#define DONE_STATE ((void*)2) +#define ERROR_STATE ((void*)-1) Normally states would be represented by enum values, which among other things supports switch (state) { ... } state machine code. This driver is full of uncommon idioms, which will make it harder for most kernel developers to dive in and help. Even if you have a style guide internal to Analog which says to do things this way ... don't. Apparently, the driver author Luke wrote this driver based on drivers/spi/pxa2xx_spi.c. These things are all from pxa2xx_spi.c driver. I will update our driver according to your comments. + +#define QUEUE_RUNNING 0 +#define QUEUE_STOPPED 1 + +int dma_requested; +char chip_select_flag; These should probably be members of the per-controller state struct, and otherwise should certainly be static
Re: [PATCH 0/12] Pass MAP_FIXED down to get_unmapped_area
On Thu, 2007-04-12 at 12:20 +1000, Benjamin Herrenschmidt wrote: > This is a "first step" as there are still cleanups to be done in various > areas touched by that code but I think it's probably good to go as is and > at least enables me to implement what I need for PowerPC. > > (Andrew, this is also candidate for 2.6.22 since I haven't had any real > objection, mostly suggestion for improving further, which I'll try to > do later, and I have further powerpc patches that rely on this). > > The current get_unmapped_area code calls the f_ops->get_unmapped_area or > the arch one (via the mm) only when MAP_FIXED is not passed. That makes > it impossible for archs to impose proper constraints on regions of the > virtual address space. To work around that, get_unmapped_area() then > calls some hugetlbfs specific hacks. > > This cause several problems, among others: > > - It makes it impossible for a driver or filesystem to do the same thing > that hugetlbfs does (for example, to allow a driver to use larger page > sizes to map external hardware) if that requires applying a constraint > on the addresses (constraining that mapping in certain regions and other > mappings out of those regions). > > - Some archs like arm, mips, sparc, sparc64, sh and sh64 already want > MAP_FIXED to be passed down in order to deal with aliasing issues. > The code is there to handle it... but is never called. > Is there any support consideration for nommu arch such as blackfin which is in the -mm tree now? It is very kind of you to point out some idea about MAP_FIXED for Blackfin arch, I will do some help for this. Thanks -Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 5/5] nommu: fix bug ip_conntrack does not work on nommu
num_physpages is not exported out in mm/nommu.c, so the ip_conntrack module link will fail. Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- mm/nommu.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/mm/nommu.c b/mm/nommu.c index 0016557..db0452e 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -45,6 +45,7 @@ int heap_stack_gap = 0; EXPORT_SYMBOL(mem_map); EXPORT_SYMBOL(__vm_enough_memory); +EXPORT_SYMBOL(num_physpages); /* list of shareable VMAs */ struct rb_root nommu_vma_tree = RB_ROOT; -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/5] blackfin arch: source kernel preemption option
Signed-off-by: Aubrey Li <[EMAIL PROTECTED]> Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/Kconfig |1 + arch/blackfin/kernel/vmlinux.lds.S |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 91e6804..1a49305 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -70,6 +70,7 @@ config IRQCHIP_DEMUX_GPIO default y source "init/Kconfig" +source "kernel/Kconfig.preempt" menu "Blackfin Processor Options" diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S index 53c6a23..6ae9ebb 100644 --- a/arch/blackfin/kernel/vmlinux.lds.S +++ b/arch/blackfin/kernel/vmlinux.lds.S @@ -68,6 +68,7 @@ SECTIONS *(__vermagic) /* Kernel version magic */ *(.rodata1) *(.fixup) + *(.spinlock.text) /* Kernel symbol table: Normal symbols */ . = ALIGN(4); -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 4/5] blackfin arch: workaround BF561 anomaly 05000266
[PATCH] blackfin arch: workaround BF561 anomaly 05000266 http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit_item_id=2958 Signed-off-by: Sonic Zhang <[EMAIL PROTECTED]> Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/kernel/setup.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 9e0c3fa..76e1f10 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -210,6 +210,11 @@ void __init setup_arch(char **cmdline_p) panic("ANOMALY 05000273, SCLK can not be same as CCLK"); #endif +#if defined(ANOMALY_05000266) + bfin_read_IMDMA_D0_IRQ_STATUS(); + bfin_read_IMDMA_D1_IRQ_STATUS(); +#endif + #ifdef DEBUG_SERIAL_EARLY_INIT bfin_console_init();/* early console registration */ /* this give a chance to get printk() working before crash. */ -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/5] blackfin arch: fix bug data cannot be put into L1 DATA SRAM bank B
[PATCH] blackfin arch: fix bug data cannot be put into L1 DATA SRAM bank B Don't allocate Bank B data sram in l1_data_A_sram_alloc (). Add l1_data_sram_alloc (), which allocates data sram from either Bank A or Bank B. Change all the code which call to l1_data_A_sram_alloc () to use l1_data_sram_alloc () if appropriate. Likewise for l1_data_A_sram_free (). Signed-off-by: Jie Zhang <[EMAIL PROTECTED]> Signed-off-by: Aubrey Li <[EMAIL PROTECTED]> Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/kernel/bfin_ksyms.c |2 + arch/blackfin/kernel/module.c |8 ++-- arch/blackfin/kernel/setup.c | 31 +++-- arch/blackfin/mm/blackfin_sram.c | 64 +++ include/asm-blackfin/bfin-global.h |3 +- 5 files changed, 63 insertions(+), 45 deletions(-) diff --git a/arch/blackfin/kernel/bfin_ksyms.c b/arch/blackfin/kernel/bfin_ksyms.c index bcd21ee..f64ecb6 100644 --- a/arch/blackfin/kernel/bfin_ksyms.c +++ b/arch/blackfin/kernel/bfin_ksyms.c @@ -115,3 +115,5 @@ EXPORT_SYMBOL(_ebss_l1); EXPORT_SYMBOL(_stext_l1); EXPORT_SYMBOL(_etext_l1); EXPORT_SYMBOL(_sdata_l1); +EXPORT_SYMBOL(_ebss_b_l1); +EXPORT_SYMBOL(_sdata_b_l1); diff --git a/arch/blackfin/kernel/module.c b/arch/blackfin/kernel/module.c index 2e753d5..372f756 100644 --- a/arch/blackfin/kernel/module.c +++ b/arch/blackfin/kernel/module.c @@ -183,7 +183,7 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs, ((strcmp(".data", secstrings + s->sh_name)==0) && (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) { mod->arch.data_a_l1 = s; - dest = l1_data_A_sram_alloc(s->sh_size); + dest = l1_data_sram_alloc(s->sh_size); if (dest == NULL) { printk(KERN_ERR "module %s: L1 data memory allocation failed\n", @@ -198,7 +198,7 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs, ((strcmp(".bss", secstrings + s->sh_name)==0) && (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) { mod->arch.bss_a_l1 = s; - dest = l1_data_A_sram_alloc(s->sh_size); + dest = l1_data_sram_alloc(s->sh_size); if (dest == NULL) { printk(KERN_ERR "module %s: L1 data memory allocation failed\n", @@ -419,9 +419,9 @@ void module_arch_cleanup(struct module *mod) if ((mod->arch.text_l1) && (mod->arch.text_l1->sh_addr)) l1_inst_sram_free((void*)mod->arch.text_l1->sh_addr); if ((mod->arch.data_a_l1) && (mod->arch.data_a_l1->sh_addr)) - l1_data_A_sram_free((void*)mod->arch.data_a_l1->sh_addr); + l1_data_sram_free((void*)mod->arch.data_a_l1->sh_addr); if ((mod->arch.bss_a_l1) && (mod->arch.bss_a_l1->sh_addr)) - l1_data_A_sram_free((void*)mod->arch.bss_a_l1->sh_addr); + l1_data_sram_free((void*)mod->arch.bss_a_l1->sh_addr); if ((mod->arch.data_b_l1) && (mod->arch.data_b_l1->sh_addr)) l1_data_B_sram_free((void*)mod->arch.data_b_l1->sh_addr); if ((mod->arch.bss_b_l1) && (mod->arch.bss_b_l1->sh_addr)) diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 7d24229..9e0c3fa 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -90,25 +90,34 @@ void __init bf53x_cache_init(void) void bf53x_relocate_l1_mem(void) { - unsigned long l1_length; + unsigned long l1_code_length; + unsigned long l1_data_a_length; + unsigned long l1_data_b_length; - l1_length = _etext_l1 - _stext_l1; - if (l1_length > L1_CODE_LENGTH) - l1_length = L1_CODE_LENGTH; + l1_code_length = _etext_l1 - _stext_l1; + if (l1_code_length > L1_CODE_LENGTH) + l1_code_length = L1_CODE_LENGTH; /* cannot complain as printk is not available as yet. * But we can continue booting and complain later! */ /* Copy _stext_l1 to _etext_l1 to L1 instruction SRAM */ - dma_memcpy(_stext_l1, _l1_lma_start, l1_length); + dma_memcpy(_stext_l1, _l1_lma_start, l1_code_length); - l1_length = _ebss_l1 - _sdata_l1; - if (l1_length > L1_DATA_A_LENGTH) - l1_length = L1_DATA_A_LENGTH; + l1_data_a_length = _ebss_l1 - _sdata_l1; + if (l1_data_a_length > L1_DATA_A_LENGTH) + l1_data_a_length = L1_DATA_A_LENGTH; + + /* Copy _sdata_l1 to _ebss_l1 to L1 data bank A SRAM */ + dma_memcpy(_sdata_l1, _l1_lma_start + l1_code_length, l1_data_a_length); + + l1_data_b_length = _ebss_b_l1 - _sdata_b_l1; + if (l1_data_b_length > L1_DATA_B_LENGTH) + l1_data_b_length =
[PATCH 1/5] blackfin arch: add missing Blackfin support in lib Kconfig debug CONFIG_FRAME_POINTER
Signed-off-by: Aubrey Li <[EMAIL PROTECTED]> Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- lib/Kconfig.debug |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 558a22e..87afd62 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -385,7 +385,7 @@ config DEBUG_LIST config FRAME_POINTER bool "Compile the kernel with frame pointers" - depends on DEBUG_KERNEL && (X86 || CRIS || M68K || M68KNOMMU || FRV || UML || S390 || AVR32 || SUPERH) + depends on DEBUG_KERNEL && (X86 || CRIS || M68K || M68KNOMMU || FRV || UML || S390 || AVR32 || SUPERH || BFIN) default y help If you say Y here the resulting kernel image will be slightly larger -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/5] blackfin arch: fix bug data cannot be put into L1 DATA SRAM bank B
[PATCH] blackfin arch: fix bug data cannot be put into L1 DATA SRAM bank B Don't allocate Bank B data sram in l1_data_A_sram_alloc (). Add l1_data_sram_alloc (), which allocates data sram from either Bank A or Bank B. Change all the code which call to l1_data_A_sram_alloc () to use l1_data_sram_alloc () if appropriate. Likewise for l1_data_A_sram_free (). Signed-off-by: Jie Zhang [EMAIL PROTECTED] Signed-off-by: Aubrey Li [EMAIL PROTECTED] Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/kernel/bfin_ksyms.c |2 + arch/blackfin/kernel/module.c |8 ++-- arch/blackfin/kernel/setup.c | 31 +++-- arch/blackfin/mm/blackfin_sram.c | 64 +++ include/asm-blackfin/bfin-global.h |3 +- 5 files changed, 63 insertions(+), 45 deletions(-) diff --git a/arch/blackfin/kernel/bfin_ksyms.c b/arch/blackfin/kernel/bfin_ksyms.c index bcd21ee..f64ecb6 100644 --- a/arch/blackfin/kernel/bfin_ksyms.c +++ b/arch/blackfin/kernel/bfin_ksyms.c @@ -115,3 +115,5 @@ EXPORT_SYMBOL(_ebss_l1); EXPORT_SYMBOL(_stext_l1); EXPORT_SYMBOL(_etext_l1); EXPORT_SYMBOL(_sdata_l1); +EXPORT_SYMBOL(_ebss_b_l1); +EXPORT_SYMBOL(_sdata_b_l1); diff --git a/arch/blackfin/kernel/module.c b/arch/blackfin/kernel/module.c index 2e753d5..372f756 100644 --- a/arch/blackfin/kernel/module.c +++ b/arch/blackfin/kernel/module.c @@ -183,7 +183,7 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs, ((strcmp(.data, secstrings + s-sh_name)==0) (hdr-e_flags FLG_DATA_IN_L1) (s-sh_size 0))) { mod-arch.data_a_l1 = s; - dest = l1_data_A_sram_alloc(s-sh_size); + dest = l1_data_sram_alloc(s-sh_size); if (dest == NULL) { printk(KERN_ERR module %s: L1 data memory allocation failed\n, @@ -198,7 +198,7 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs, ((strcmp(.bss, secstrings + s-sh_name)==0) (hdr-e_flags FLG_DATA_IN_L1) (s-sh_size 0))) { mod-arch.bss_a_l1 = s; - dest = l1_data_A_sram_alloc(s-sh_size); + dest = l1_data_sram_alloc(s-sh_size); if (dest == NULL) { printk(KERN_ERR module %s: L1 data memory allocation failed\n, @@ -419,9 +419,9 @@ void module_arch_cleanup(struct module *mod) if ((mod-arch.text_l1) (mod-arch.text_l1-sh_addr)) l1_inst_sram_free((void*)mod-arch.text_l1-sh_addr); if ((mod-arch.data_a_l1) (mod-arch.data_a_l1-sh_addr)) - l1_data_A_sram_free((void*)mod-arch.data_a_l1-sh_addr); + l1_data_sram_free((void*)mod-arch.data_a_l1-sh_addr); if ((mod-arch.bss_a_l1) (mod-arch.bss_a_l1-sh_addr)) - l1_data_A_sram_free((void*)mod-arch.bss_a_l1-sh_addr); + l1_data_sram_free((void*)mod-arch.bss_a_l1-sh_addr); if ((mod-arch.data_b_l1) (mod-arch.data_b_l1-sh_addr)) l1_data_B_sram_free((void*)mod-arch.data_b_l1-sh_addr); if ((mod-arch.bss_b_l1) (mod-arch.bss_b_l1-sh_addr)) diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 7d24229..9e0c3fa 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -90,25 +90,34 @@ void __init bf53x_cache_init(void) void bf53x_relocate_l1_mem(void) { - unsigned long l1_length; + unsigned long l1_code_length; + unsigned long l1_data_a_length; + unsigned long l1_data_b_length; - l1_length = _etext_l1 - _stext_l1; - if (l1_length L1_CODE_LENGTH) - l1_length = L1_CODE_LENGTH; + l1_code_length = _etext_l1 - _stext_l1; + if (l1_code_length L1_CODE_LENGTH) + l1_code_length = L1_CODE_LENGTH; /* cannot complain as printk is not available as yet. * But we can continue booting and complain later! */ /* Copy _stext_l1 to _etext_l1 to L1 instruction SRAM */ - dma_memcpy(_stext_l1, _l1_lma_start, l1_length); + dma_memcpy(_stext_l1, _l1_lma_start, l1_code_length); - l1_length = _ebss_l1 - _sdata_l1; - if (l1_length L1_DATA_A_LENGTH) - l1_length = L1_DATA_A_LENGTH; + l1_data_a_length = _ebss_l1 - _sdata_l1; + if (l1_data_a_length L1_DATA_A_LENGTH) + l1_data_a_length = L1_DATA_A_LENGTH; + + /* Copy _sdata_l1 to _ebss_l1 to L1 data bank A SRAM */ + dma_memcpy(_sdata_l1, _l1_lma_start + l1_code_length, l1_data_a_length); + + l1_data_b_length = _ebss_b_l1 - _sdata_b_l1; + if (l1_data_b_length L1_DATA_B_LENGTH) + l1_data_b_length = L1_DATA_B_LENGTH; - /* Copy _sdata_l1 to _ebss_l1 to L1 instruction SRAM */ -
[PATCH 3/5] blackfin arch: source kernel preemption option
Signed-off-by: Aubrey Li [EMAIL PROTECTED] Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/Kconfig |1 + arch/blackfin/kernel/vmlinux.lds.S |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 91e6804..1a49305 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -70,6 +70,7 @@ config IRQCHIP_DEMUX_GPIO default y source init/Kconfig +source kernel/Kconfig.preempt menu Blackfin Processor Options diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S index 53c6a23..6ae9ebb 100644 --- a/arch/blackfin/kernel/vmlinux.lds.S +++ b/arch/blackfin/kernel/vmlinux.lds.S @@ -68,6 +68,7 @@ SECTIONS *(__vermagic) /* Kernel version magic */ *(.rodata1) *(.fixup) + *(.spinlock.text) /* Kernel symbol table: Normal symbols */ . = ALIGN(4); -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 4/5] blackfin arch: workaround BF561 anomaly 05000266
[PATCH] blackfin arch: workaround BF561 anomaly 05000266 http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdittracker_item_id=2958 Signed-off-by: Sonic Zhang [EMAIL PROTECTED] Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/kernel/setup.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 9e0c3fa..76e1f10 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -210,6 +210,11 @@ void __init setup_arch(char **cmdline_p) panic(ANOMALY 05000273, SCLK can not be same as CCLK); #endif +#if defined(ANOMALY_05000266) + bfin_read_IMDMA_D0_IRQ_STATUS(); + bfin_read_IMDMA_D1_IRQ_STATUS(); +#endif + #ifdef DEBUG_SERIAL_EARLY_INIT bfin_console_init();/* early console registration */ /* this give a chance to get printk() working before crash. */ -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 5/5] nommu: fix bug ip_conntrack does not work on nommu
num_physpages is not exported out in mm/nommu.c, so the ip_conntrack module link will fail. Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- mm/nommu.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/mm/nommu.c b/mm/nommu.c index 0016557..db0452e 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -45,6 +45,7 @@ int heap_stack_gap = 0; EXPORT_SYMBOL(mem_map); EXPORT_SYMBOL(__vm_enough_memory); +EXPORT_SYMBOL(num_physpages); /* list of shareable VMAs */ struct rb_root nommu_vma_tree = RB_ROOT; -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/5] blackfin arch: add missing Blackfin support in lib Kconfig debug CONFIG_FRAME_POINTER
Signed-off-by: Aubrey Li [EMAIL PROTECTED] Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- lib/Kconfig.debug |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 558a22e..87afd62 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -385,7 +385,7 @@ config DEBUG_LIST config FRAME_POINTER bool Compile the kernel with frame pointers - depends on DEBUG_KERNEL (X86 || CRIS || M68K || M68KNOMMU || FRV || UML || S390 || AVR32 || SUPERH) + depends on DEBUG_KERNEL (X86 || CRIS || M68K || M68KNOMMU || FRV || UML || S390 || AVR32 || SUPERH || BFIN) default y help If you say Y here the resulting kernel image will be slightly larger -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/12] Pass MAP_FIXED down to get_unmapped_area
On Thu, 2007-04-12 at 12:20 +1000, Benjamin Herrenschmidt wrote: This is a first step as there are still cleanups to be done in various areas touched by that code but I think it's probably good to go as is and at least enables me to implement what I need for PowerPC. (Andrew, this is also candidate for 2.6.22 since I haven't had any real objection, mostly suggestion for improving further, which I'll try to do later, and I have further powerpc patches that rely on this). The current get_unmapped_area code calls the f_ops-get_unmapped_area or the arch one (via the mm) only when MAP_FIXED is not passed. That makes it impossible for archs to impose proper constraints on regions of the virtual address space. To work around that, get_unmapped_area() then calls some hugetlbfs specific hacks. This cause several problems, among others: - It makes it impossible for a driver or filesystem to do the same thing that hugetlbfs does (for example, to allow a driver to use larger page sizes to map external hardware) if that requires applying a constraint on the addresses (constraining that mapping in certain regions and other mappings out of those regions). - Some archs like arm, mips, sparc, sparc64, sh and sh64 already want MAP_FIXED to be passed down in order to deal with aliasing issues. The code is there to handle it... but is never called. Is there any support consideration for nommu arch such as blackfin which is in the -mm tree now? It is very kind of you to point out some idea about MAP_FIXED for Blackfin arch, I will do some help for this. Thanks -Bryan - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU
On Mon, 2007-04-09 at 16:08 -0400, Robin Getz wrote: > On Mon 9 Apr 2007 14:43, David Miller pondered: > > From: David Miller <[EMAIL PROTECTED]> > > Date: Mon, 09 Apr 2007 09:55:23 -0700 (PDT) > > > > > > I will apply this patch. > > > > Actually I won't, the other comments in this thread make a lot > > of sense, we should try to make it build and work just as we > > do for other similar things on no-MMU. > > Great. Any pointers in the right direction to remove the requirement of > vm_insert_page() in the noMMU case? > > Thanks > -Robin OK, we will try to find other way to fix this bug according Robin's comments. Thanks -Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU
On Mon, 2007-04-09 at 11:01 +0800, Aubrey Li wrote: > The option CONFIG_PACKET_MMAP should depend on MMU. > > Signed-off-by: Aubrey.Li <[EMAIL PROTECTED]> > --- > net/packet/Kconfig |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/net/packet/Kconfig b/net/packet/Kconfig > index 34ff93f..959c272 100644 > --- a/net/packet/Kconfig > +++ b/net/packet/Kconfig > @@ -17,7 +17,7 @@ config PACKET > > config PACKET_MMAP > bool "Packet socket: mmapped IO" > - depends on PACKET > + depends on PACKET && MMU > help > If you say Y here, the Packet protocol driver will use an IO > mechanism that results in faster communication. Yeah, this is a bug found on blackfin arch and it is also for other NOMMU arch. Is there any solution for this? We think Aubrey's idea works. Thanks -Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU
On Mon, 2007-04-09 at 11:01 +0800, Aubrey Li wrote: The option CONFIG_PACKET_MMAP should depend on MMU. Signed-off-by: Aubrey.Li [EMAIL PROTECTED] --- net/packet/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/packet/Kconfig b/net/packet/Kconfig index 34ff93f..959c272 100644 --- a/net/packet/Kconfig +++ b/net/packet/Kconfig @@ -17,7 +17,7 @@ config PACKET config PACKET_MMAP bool Packet socket: mmapped IO - depends on PACKET + depends on PACKET MMU help If you say Y here, the Packet protocol driver will use an IO mechanism that results in faster communication. Yeah, this is a bug found on blackfin arch and it is also for other NOMMU arch. Is there any solution for this? We think Aubrey's idea works. Thanks -Bryan - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU
On Mon, 2007-04-09 at 16:08 -0400, Robin Getz wrote: On Mon 9 Apr 2007 14:43, David Miller pondered: From: David Miller [EMAIL PROTECTED] Date: Mon, 09 Apr 2007 09:55:23 -0700 (PDT) I will apply this patch. Actually I won't, the other comments in this thread make a lot of sense, we should try to make it build and work just as we do for other similar things on no-MMU. Great. Any pointers in the right direction to remove the requirement of vm_insert_page() in the noMMU case? Thanks -Robin OK, we will try to find other way to fix this bug according Robin's comments. Thanks -Bryan - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] USB gadget rndis: fix struct rndis_packet_msg_type unaligned bug
[PATCH] usb gadget rndis: skb_push function may return a pointer which is not aligned as required by struct rndis_packet_msg_type. Using attribute trick to fix this bug. Signed-off-by: Roy Huang <[EMAIL PROTECTED]> Signed-off-by: Jie Zhang <[EMAIL PROTECTED]> Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- drivers/usb/gadget/rndis.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/gadget/rndis.h b/drivers/usb/gadget/rndis.h index 4c3c725..397b149 100644 --- a/drivers/usb/gadget/rndis.h +++ b/drivers/usb/gadget/rndis.h @@ -195,7 +195,7 @@ struct rndis_packet_msg_type __le32 PerPacketInfoLength; __le32 VcHandle; __le32 Reserved; -}; +} __attribute__ ((packed)); struct rndis_config_parameter { -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] USB gadget rndis: fix bug skb_push function may return an unaligned pointer bug
On Thu, 2007-04-05 at 14:29 -0700, David Brownell wrote: > On Tuesday 03 April 2007 11:28 pm, Wu, Bryan wrote: > > USB gadget rndis: skb_push function may return a pointer which is not > > aligned as required by struct rndis_packet_msg_type. > > Can you instead try to update the declaration of that struct > so that it's "__attribute__((packed))"? That's less invasive, > and will address similar issues elsewhere ... > > - Dave OK, Jie and Roy will try to use this __attribute__ method and test it on blackfin platform. Sorry for missing their "Signed-off-by". I will resend a patch later for review. Thanks -Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch: 0.4 and 0.5 silicon doesnt exist for BF534, BF536 adn BF537 so dont let people select the option
Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/Kconfig |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 88e831a..91e6804 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -131,11 +131,11 @@ config BF_REV_0_3 config BF_REV_0_4 bool "0.4" - depends on (BF561 || BF537 || BF536 || BF534 || BF533 || BF532 || BF531) + depends on (BF561 || BF533 || BF532 || BF531) config BF_REV_0_5 bool "0.5" - depends on (BF561 || BF537 || BF536 || BF534 || BF533 || BF532 || BF531) + depends on (BF561 || BF533 || BF532 || BF531) endchoice -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch: fix bug asserting gpio requested doesnt make sense with GPIO whole PORT accesses
[PATCH] blackfin arch: A BUG_ON will fire in the STAMP533 board when enable ethernet support. This BUG_ON asserting is useless in the whole PORT accesses. So remove it. Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/kernel/bfin_gpio.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index bb71aaf..e9f24a9 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c @@ -316,7 +316,6 @@ SET_GPIO_P(maskb) void set_gpiop_data(unsigned short gpio, unsigned short arg) { unsigned long flags; - BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio))); local_irq_save(flags); gpio_bankb[gpio_bank(gpio)]->data = arg; bfin_read_CHIPID(); @@ -386,7 +385,6 @@ unsigned short get_gpiop_data(unsigned short gpio) { unsigned long flags; unsigned short ret; - BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio))); local_irq_save(flags); ret = gpio_bankb[gpio_bank(gpio)]->data; bfin_read_CHIPID(); -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] USB gadget rndis: fix bug skb_push function may return an unaligned pointer bug
On Thu, 2007-04-05 at 14:29 -0700, David Brownell wrote: On Tuesday 03 April 2007 11:28 pm, Wu, Bryan wrote: USB gadget rndis: skb_push function may return a pointer which is not aligned as required by struct rndis_packet_msg_type. Can you instead try to update the declaration of that struct so that it's __attribute__((packed))? That's less invasive, and will address similar issues elsewhere ... - Dave OK, Jie and Roy will try to use this __attribute__ method and test it on blackfin platform. Sorry for missing their Signed-off-by. I will resend a patch later for review. Thanks -Bryan - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] USB gadget rndis: fix struct rndis_packet_msg_type unaligned bug
[PATCH] usb gadget rndis: skb_push function may return a pointer which is not aligned as required by struct rndis_packet_msg_type. Using attribute trick to fix this bug. Signed-off-by: Roy Huang [EMAIL PROTECTED] Signed-off-by: Jie Zhang [EMAIL PROTECTED] Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- drivers/usb/gadget/rndis.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/gadget/rndis.h b/drivers/usb/gadget/rndis.h index 4c3c725..397b149 100644 --- a/drivers/usb/gadget/rndis.h +++ b/drivers/usb/gadget/rndis.h @@ -195,7 +195,7 @@ struct rndis_packet_msg_type __le32 PerPacketInfoLength; __le32 VcHandle; __le32 Reserved; -}; +} __attribute__ ((packed)); struct rndis_config_parameter { -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch: fix bug asserting gpio requested doesnt make sense with GPIO whole PORT accesses
[PATCH] blackfin arch: A BUG_ON will fire in the STAMP533 board when enable ethernet support. This BUG_ON asserting is useless in the whole PORT accesses. So remove it. Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/kernel/bfin_gpio.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index bb71aaf..e9f24a9 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c @@ -316,7 +316,6 @@ SET_GPIO_P(maskb) void set_gpiop_data(unsigned short gpio, unsigned short arg) { unsigned long flags; - BUG_ON(!(reserved_map[gpio_bank(gpio)] gpio_bit(gpio))); local_irq_save(flags); gpio_bankb[gpio_bank(gpio)]-data = arg; bfin_read_CHIPID(); @@ -386,7 +385,6 @@ unsigned short get_gpiop_data(unsigned short gpio) { unsigned long flags; unsigned short ret; - BUG_ON(!(reserved_map[gpio_bank(gpio)] gpio_bit(gpio))); local_irq_save(flags); ret = gpio_bankb[gpio_bank(gpio)]-data; bfin_read_CHIPID(); -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch: 0.4 and 0.5 silicon doesnt exist for BF534, BF536 adn BF537 so dont let people select the option
Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/Kconfig |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 88e831a..91e6804 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -131,11 +131,11 @@ config BF_REV_0_3 config BF_REV_0_4 bool 0.4 - depends on (BF561 || BF537 || BF536 || BF534 || BF533 || BF532 || BF531) + depends on (BF561 || BF533 || BF532 || BF531) config BF_REV_0_5 bool 0.5 - depends on (BF561 || BF537 || BF536 || BF534 || BF533 || BF532 || BF531) + depends on (BF561 || BF533 || BF532 || BF531) endchoice -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Blackfin arch: sync with uClibc no functional changes
> > +.text > + > +.align 2 > + > ENTRY(_memchr) > - P0 = R0 ; /* P0 = address */ > - P2 = R2 ; /* P2 = count */ > + P0 = R0; // P0 = address > + P2 = R2; // P2 = count Sorry for introducing wrong coding style source. A updated one will be posted later. Thanks Robin and Mike. -Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Blackfin arch: sync with uClibc no functional changes
Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/lib/memchr.S | 31 +--- arch/blackfin/lib/memcmp.S | 46 ++ arch/blackfin/lib/memcpy.S | 24 +++--- arch/blackfin/lib/memmove.S | 12 ++ arch/blackfin/lib/memset.S |2 + 5 files changed, 68 insertions(+), 47 deletions(-) diff --git a/arch/blackfin/lib/memchr.S b/arch/blackfin/lib/memchr.S index c4f1aab..4981222 100644 --- a/arch/blackfin/lib/memchr.S +++ b/arch/blackfin/lib/memchr.S @@ -29,24 +29,27 @@ #include -.align 2 - -/* - * C Library function MEMCHR - * R0 = address - * R1 = sought byte - * R2 = count +/* void *memchr(const void *s, int c, size_t n); + * R0 = address (s) + * R1 = sought byte (c) + * R2 = count (n) + * * Returns pointer to located character. */ +.text + +.align 2 + ENTRY(_memchr) - P0 = R0 ; /* P0 = address */ - P2 = R2 ; /* P2 = count */ + P0 = R0;/* P0 = address */ + P2 = R2;/* P2 = count */ R1 = R1.B(Z); CC = R2 == 0; IF CC JUMP .Lfailed; -.Lbytes: LSETUP (.Lbyte_loop_s , .Lbyte_loop_e) LC0=P2; +.Lbytes: + LSETUP (.Lbyte_loop_s, .Lbyte_loop_e) LC0=P2; .Lbyte_loop_s: R3 = B[P0++](Z); @@ -55,9 +58,13 @@ ENTRY(_memchr) .Lbyte_loop_e: NOP; -.Lfailed: R0=0; +.Lfailed: + R0=0; RTS; -.Lfound: R0 = P0; +.Lfound: + R0 = P0; R0 += -1; RTS; + +.size _memchr,.-_memchr diff --git a/arch/blackfin/lib/memcmp.S b/arch/blackfin/lib/memcmp.S index e36fe8c..5b95023 100644 --- a/arch/blackfin/lib/memcmp.S +++ b/arch/blackfin/lib/memcmp.S @@ -29,39 +29,39 @@ #include -.align 2 - -/* - * C Library function MEMCMP - * R0 = First Address - * R1 = Second Address - * R2 = count +/* int memcmp(const void *s1, const void *s2, size_t n); + * R0 = First Address (s1) + * R1 = Second Address (s2) + * R2 = count (n) + * * Favours word aligned data. */ +.text + +.align 2 + ENTRY(_memcmp) I1 = P3; P0 = R0;/* P0 = s1 address */ P3 = R1;/* P3 = s2 Address */ P2 = R2 ; /* P2 = count */ CC = R2 <= 7(IU); - IF CC JUMP .Ltoo_small; + IF CC JUMP .Ltoo_small; I0 = R1;/* s2 */ R1 = R1 | R0; /* OR addresses together */ R1 <<= 30; /* check bottom two bits */ CC = AZ; /* AZ set if zero. */ - IF !CC JUMP .Lbytes ; /* Jump if addrs not aligned. */ + IF !CC JUMP .Lbytes ; /* Jump if addrs not aligned. */ P1 = P2 >> 2; /* count = n/4 */ R3 = 3; R2 = R2 & R3; /* remainder */ P2 = R2;/* set remainder */ - LSETUP (.Lquad_loop_s , .Lquad_loop_e) LC0=P1; + LSETUP (.Lquad_loop_s, .Lquad_loop_e) LC0=P1; .Lquad_loop_s: - NOP; - R0 = [P0++]; - R1 = [I0++]; + MNOP || R0 = [P0++] || R1 = [I0++]; CC = R0 == R1; IF !CC JUMP .Lquad_different; .Lquad_loop_e: @@ -73,7 +73,7 @@ ENTRY(_memcmp) IF CC JUMP .Lfinished; /* very unlikely*/ .Lbytes: - LSETUP (.Lbyte_loop_s , .Lbyte_loop_e) LC0=P2; + LSETUP (.Lbyte_loop_s, .Lbyte_loop_e) LC0=P2; .Lbyte_loop_s: R1 = B[P3++](Z);/* *s2 */ R0 = B[P0++](Z);/* *s1 */ @@ -88,14 +88,14 @@ ENTRY(_memcmp) RTS; .Lquad_different: -/* We've read two quads which don't match. - * Can't just compare them, because we're - * a little-endian machine, so the MSBs of - * the regs occur at later addresses in the - * string. - * Arrange to re-read those two quads again, - * byte-by-byte. - */ + /* We've read two quads which don't match. +* Can't just compare them, because we're +* a little-endian machine, so the MSBs of +* the regs occur at later addresses in the +* string. +* Arrange to re-read those two quads again, +* byte-by-byte. +*/ P0 += -4; /* back up to the start of the */ P3 = I0;/* quads, and increase the*/ P2 += 4;/* remainder count*/ @@ -106,3 +106,5 @@ ENTRY(_memcmp) R0 = 0; P3 = I1; RTS; + +.size _memcmp,.-_memcmp diff --git a/arch/blackfin/lib/memcpy.S b/arch/blackfin/lib/memcpy.S index f757e1d..c1e00ef 100644 --- a/arch/blackfin/lib/memcpy.S +++ b/arch/blackfin/lib/memcpy.S @@ -35,6 +35,14 @@ #include +/* void *memcpy(void *dest, const void *src, size_t n); + * R0 = To Address (dest) (leave unchanged to form result) + * R1 = From Address (src) + * R2 = count + * + * Note: Favours word alignment + */ + #ifdef CONFIG_MEMCPY_L1 .section .l1.text #else @@ -44,8 +52,8 @@ .align 2 ENTRY(_memcpy) - CC = R2 <= 0; /* length not positive?*/ - IF
[PATCH] blackfin arch: use boot_command_line instead of saved_command_line in setup c file
[PATCH] blackfin arch As boot_command_line is added in init/main.c for arch-specific boot command line, replace old saved_command_line to boot_command_line for right boot command passing in -mm tree. Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/kernel/setup.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index ce51882..7d24229 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -221,8 +221,8 @@ void __init setup_arch(char **cmdline_p) /* Keep a copy of command line */ *cmdline_p = _line[0]; - memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); - saved_command_line[COMMAND_LINE_SIZE - 1] = 0; + memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); + boot_command_line[COMMAND_LINE_SIZE - 1] = 0; /* setup memory defaults from the user config */ physical_mem_end = 0; -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] blackfin arch: use boot_command_line instead of save_command_line in setup c file
On Wed, 2007-04-04 at 08:07 -0700, Randy Dunlap wrote: > On Wed, 04 Apr 2007 14:28:23 +0800 Wu, Bryan wrote: > > > > > Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> > > --- > > arch/blackfin/kernel/setup.c |2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c > > index ce51882..9870c60 100644 > > --- a/arch/blackfin/kernel/setup.c > > +++ b/arch/blackfin/kernel/setup.c > > @@ -221,7 +221,7 @@ void __init setup_arch(char **cmdline_p) > > > > /* Keep a copy of command line */ > > *cmdline_p = _line[0]; > > - memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); > > + memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); > > saved_command_line[COMMAND_LINE_SIZE - 1] = 0; > > > > /* setup memory defaults from the user config */ > > -- > > Hi Bryan, > > Patch descriptions should include _why_ a change is being made, > not just what the change is. > Thanks Randy. I am just confused by the following comments in -mm tree init/main.c: --- /* Untouched command line saved by arch-specific code. */ char __initdata boot_command_line[COMMAND_LINE_SIZE]; /* Untouched saved command line (eg. for /proc) */ char *saved_command_line; --- And you know, in the 2.6.20.x stable kernel init/main.c: --- /* Untouched command line (eg. for /proc) saved by arch-specific code. */ char saved_command_line[COMMAND_LINE_SIZE]; --- So the patch is to move saved_command_line to boot_command_line in blackfin arch code. I will resend a new patch about this, because I forgot to change :-< --- - saved_command_line[COMMAND_LINE_SIZE - 1] = 0; + boot_command_line[COMMAND_LINE_SIZE - 1] = 0; --- Did I misunderstand about this? So some other arch (ARM/AVR32 ...) should be updated, too. > --- > ~Randy > *** Remember to use Documentation/SubmitChecklist when testing your code *** Thanks again Randy. I will follow the rule. -Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch: define a new cacheline_aligned attribute to put it in L1 data memory with linkscript update
Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/Kconfig |8 arch/blackfin/kernel/vmlinux.lds.S |8 include/asm-blackfin/cache.h | 11 +++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 9ae0223..88e831a 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -513,6 +513,14 @@ config IP_CHECKSUM_L1 If enabled IP Checksum function is linked into L1 instruction memory.(less latency) +config CACHELINE_ALIGNED_L1 + bool "Locate cacheline_aligned data to L1 Data Memory" + default y + depends on !BF531 + help + If enabled cacheline_anligned data is linked + into L1 data memory.(less latency) + config SYSCALL_TAB_L1 bool "Locate Syscall Table L1 Data Memory" default n diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S index fb01ca2..53c6a23 100644 --- a/arch/blackfin/kernel/vmlinux.lds.S +++ b/arch/blackfin/kernel/vmlinux.lds.S @@ -173,6 +173,9 @@ SECTIONS __sbss_l1 = .; *(.l1.bss) + . = ALIGN(32); + *(.data_l1.cacheline_aligned) + . = ALIGN(4); __ebss_l1 = .; } > l1_data_a AT > ram @@ -197,6 +200,11 @@ SECTIONS . = ALIGN(0x2000); *(.data.init_task) *(.data) + + . = ALIGN(32); + *(.data.cacheline_aligned) + + . = ALIGN(0x2000); __edata = .; } > ram diff --git a/include/asm-blackfin/cache.h b/include/asm-blackfin/cache.h index 560e390..023d721 100644 --- a/include/asm-blackfin/cache.h +++ b/include/asm-blackfin/cache.h @@ -10,13 +10,16 @@ */ #define L1_CACHE_SHIFT 5 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) +#define SMP_CACHE_BYTESL1_CACHE_BYTES /* - * Don't make __cacheline_aligned and - * cacheline_aligned defined in include/linux/cache.h + * Put cacheline_aliged data to L1 data memory */ -#define __cacheline_aligned -#define cacheline_aligned +#ifdef CONFIG_CACHELINE_ALIGNED_L1 +#define __cacheline_aligned\ + __attribute__((__aligned__(L1_CACHE_BYTES), \ + __section__(".data_l1.cacheline_aligned"))) +#endif /* * largest L1 which this arch supports -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch: add SCM_TIMESTAMPNS and SIOCGSTAMPNS to socket header file with code style cleaning up
Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- include/asm-blackfin/socket.h | 11 ++- include/asm-blackfin/sockios.h |3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/asm-blackfin/socket.h b/include/asm-blackfin/socket.h index f337bb3..5213c96 100644 --- a/include/asm-blackfin/socket.h +++ b/include/asm-blackfin/socket.h @@ -38,15 +38,16 @@ #define SO_BINDTODEVICE25 /* Socket filtering */ -#define SO_ATTACH_FILTER26 -#define SO_DETACH_FILTER27 +#define SO_ATTACH_FILTER 26 +#define SO_DETACH_FILTER 27 -#define SO_PEERNAME 28 +#define SO_PEERNAME28 #define SO_TIMESTAMP 29 #define SCM_TIMESTAMP SO_TIMESTAMP #define SO_ACCEPTCONN 30 -#define SO_PEERSEC 31 +#define SO_PEERSEC 31 #define SO_PASSSEC 34 - +#define SO_TIMESTAMPNS 35 +#define SCM_TIMESTAMPNSSO_TIMESTAMPNS #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-blackfin/sockios.h b/include/asm-blackfin/sockios.h index 733f99c..426b89b 100644 --- a/include/asm-blackfin/sockios.h +++ b/include/asm-blackfin/sockios.h @@ -7,6 +7,7 @@ #define FIOGETOWN 0x8903 #define SIOCGPGRP 0x8904 #define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906 /* Get stamp */ +#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ +#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ #endif /* __ARCH_BFIN_SOCKIOS__ */ -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch: fix some coding style in include asm-blackin header files
Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- include/asm-blackfin/dma-mapping.h | 11 ++- include/asm-blackfin/gpio.h|2 -- include/asm-blackfin/mach-bf533/anomaly.h |1 - include/asm-blackfin/mach-bf533/blackfin.h |1 - include/asm-blackfin/mach-bf533/cdefBF532.h|1 - include/asm-blackfin/mach-bf533/defBF532.h |3 --- include/asm-blackfin/mach-bf533/dma.h |2 -- include/asm-blackfin/mach-bf533/irq.h |1 - include/asm-blackfin/mach-bf537/mem_map.h |7 +-- include/asm-blackfin/mach-bf561/anomaly.h |1 - include/asm-blackfin/mach-bf561/blackfin.h |1 - include/asm-blackfin/mach-bf561/cdefBF561.h|1 - include/asm-blackfin/mach-bf561/defBF561.h |1 - include/asm-blackfin/mach-bf561/dma.h |1 - include/asm-blackfin/mach-bf561/irq.h |1 - include/asm-blackfin/mach-bf561/mem_map.h |1 - include/asm-blackfin/mach-common/cdef_LPBlackfin.h |3 --- include/asm-blackfin/mach-common/def_LPBlackfin.h |3 --- include/asm-blackfin/mmu_context.h |2 -- include/asm-blackfin/system.h |3 --- include/asm-blackfin/thread_info.h |1 - 21 files changed, 7 insertions(+), 41 deletions(-) diff --git a/include/asm-blackfin/dma-mapping.h b/include/asm-blackfin/dma-mapping.h index ac125c9..7a77d7f 100644 --- a/include/asm-blackfin/dma-mapping.h +++ b/include/asm-blackfin/dma-mapping.h @@ -10,6 +10,12 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle); /* + * Now for the API extensions over the pci_ one + */ +#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) +#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) + +/* * Map a single buffer of the indicated size for DMA in streaming mode. * The 32-bit bus address to use is returned. * @@ -57,9 +63,4 @@ extern int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, extern void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, enum dma_data_direction direction); -/* Now for the API extensions over the pci_ one */ - -#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) -#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) - #endif /* _BLACKFIN_DMA_MAPPING_H */ diff --git a/include/asm-blackfin/gpio.h b/include/asm-blackfin/gpio.h index 14db45f..d16fe3c 100644 --- a/include/asm-blackfin/gpio.h +++ b/include/asm-blackfin/gpio.h @@ -6,8 +6,6 @@ * Created: * Description: * - * Rev: $Id: gpio.h,v 1.5 2006/12/12 12:14:56 hennerich Exp $ - * * Modified: * Copyright 2004-2006 Analog Devices Inc. * diff --git a/include/asm-blackfin/mach-bf533/anomaly.h b/include/asm-blackfin/mach-bf533/anomaly.h index 9e14110..a84d390 100644 --- a/include/asm-blackfin/mach-bf533/anomaly.h +++ b/include/asm-blackfin/mach-bf533/anomaly.h @@ -10,7 +10,6 @@ * * Modified: * - * * Bugs: Enter bugs at http://blackfin.uclinux.org/ * * This program is free software; you can redistribute it and/or modify diff --git a/include/asm-blackfin/mach-bf533/blackfin.h b/include/asm-blackfin/mach-bf533/blackfin.h index d7d403c..e438449 100644 --- a/include/asm-blackfin/mach-bf533/blackfin.h +++ b/include/asm-blackfin/mach-bf533/blackfin.h @@ -10,7 +10,6 @@ * * Modified: * - * * Bugs: Enter bugs at http://blackfin.uclinux.org/ * * This program is free software; you can redistribute it and/or modify diff --git a/include/asm-blackfin/mach-bf533/cdefBF532.h b/include/asm-blackfin/mach-bf533/cdefBF532.h index 121d3a2..1d7c494 100644 --- a/include/asm-blackfin/mach-bf533/cdefBF532.h +++ b/include/asm-blackfin/mach-bf533/cdefBF532.h @@ -10,7 +10,6 @@ * * Modified: * - * * Bugs: Enter bugs at http://blackfin.uclinux.org/ * * This program is free software; you can redistribute it and/or modify diff --git a/include/asm-blackfin/mach-bf533/defBF532.h b/include/asm-blackfin/mach-bf533/defBF532.h index 59c7557..b240a08 100644 --- a/include/asm-blackfin/mach-bf533/defBF532.h +++ b/include/asm-blackfin/mach-bf533/defBF532.h @@ -1,7 +1,5 @@ / * - * $Id: defBF532.h 2717 2007-02-02 03:58:24Z vapier $ - * * This file is subject to the terms and conditions of the GNU Public * License. See the file "COPYING" in the main directory of this archive * for more details. @@ -27,7 +25,6 @@ * * Modified: * - * * Bugs: Enter bugs at http://blackfin.uclinux.org/ * * This program is free software; you can redistribute it and/or modify diff --git a/include/asm-blackfin/mach-bf533/dma.h
Re: [PATCH] Blackfin arch: add asm-blackfin socket header files
On Wed, 2007-04-04 at 14:55 +0800, Wu, Bryan wrote: > On Wed, 2007-04-04 at 14:28 +0800, Wu, Bryan wrote: > > Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> > > --- > > include/asm-blackfin/socket.h | 55 > > > > include/asm-blackfin/sockios.h | 13 + > > 2 files changed, 68 insertions(+), 0 deletions(-) > > create mode 100644 include/asm-blackfin/socket.h > > create mode 100644 include/asm-blackfin/sockios.h > > > > Maybe we can add generic header files such as > include/asm-generic/socket.h and include/asm-generic/sockios.h. > > Cheers, > -Bryan oops, I screwed up the patch set in my local git-tree. please drop this patch and I will send a new one. Sorry for this. -Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Blackfin arch: add asm-blackfin socket header files
On Wed, 2007-04-04 at 14:28 +0800, Wu, Bryan wrote: > Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> > --- > include/asm-blackfin/socket.h | 55 > > include/asm-blackfin/sockios.h | 13 + > 2 files changed, 68 insertions(+), 0 deletions(-) > create mode 100644 include/asm-blackfin/socket.h > create mode 100644 include/asm-blackfin/sockios.h > Maybe we can add generic header files such as include/asm-generic/socket.h and include/asm-generic/sockios.h. Cheers, -Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Blackfin arch: using asm-generic pgtable header file by adding PAGE access macros based on CPLB management
Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- include/asm-blackfin/pgtable.h | 44 +++ 1 files changed, 35 insertions(+), 9 deletions(-) diff --git a/include/asm-blackfin/pgtable.h b/include/asm-blackfin/pgtable.h index 9328537..5a8f9e4 100644 --- a/include/asm-blackfin/pgtable.h +++ b/include/asm-blackfin/pgtable.h @@ -3,7 +3,8 @@ #include -#include +#include +#include typedef pte_t *pte_addr_t; /* @@ -14,7 +15,12 @@ typedef pte_t *pte_addr_t; #define pgd_bad(pgd) (0) #define pgd_clear(pgdp) #define kern_addr_valid(addr) (1) -#definepmd_offset(a, b)((void *)0) + +#define pmd_offset(a, b) ((void *)0) +#define pmd_none(x)(!pmd_val(x)) +#define pmd_present(x) (pmd_val(x)) +#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0) +#define pmd_bad(x) (pmd_val(x) & ~PAGE_MASK) #define kern_addr_valid(addr) (1) @@ -37,6 +43,32 @@ static inline int pte_file(pte_t pte) return 0; } +#define set_pte(pteptr, pteval) (*(pteptr) = pteval) +#define set_pte_at(mm, addr, ptep, pteval) set_pte(ptep, pteval) + +/* + * Page assess control based on Blackfin CPLB management + */ +#define _PAGE_RD (CPLB_USER_RD) +#define _PAGE_WR (CPLB_USER_WR) +#define _PAGE_USER (CPLB_USER_RD | CPLB_USER_WR) +#define _PAGE_ACCESSED CPLB_ALL_ACCESS +#define _PAGE_DIRTY(CPLB_DIRTY) + +#define PTE_BIT_FUNC(fn, op) \ + static inline pte_t pte_##fn(pte_t _pte) { _pte.pte op; return _pte; } + +PTE_BIT_FUNC(rdprotect, &= ~_PAGE_RD); +PTE_BIT_FUNC(mkread, |= _PAGE_RD); +PTE_BIT_FUNC(wrprotect, &= ~_PAGE_WR); +PTE_BIT_FUNC(mkwrite, |= _PAGE_WR); +PTE_BIT_FUNC(exprotect, &= ~_PAGE_USER); +PTE_BIT_FUNC(mkexec, |= _PAGE_USER); +PTE_BIT_FUNC(mkclean, &= ~_PAGE_DIRTY); +PTE_BIT_FUNC(mkdirty, |= _PAGE_DIRTY); +PTE_BIT_FUNC(mkold, &= ~_PAGE_ACCESSED); +PTE_BIT_FUNC(mkyoung, |= _PAGE_ACCESSED); + /* * ZERO_PAGE is a global shared page that is always zero: used * for zero-mapped memory areas etc.. @@ -59,12 +91,6 @@ extern unsigned int kobjsize(const void *objp); #defineVMALLOC_START 0 #defineVMALLOC_END 0x -#define __HAVE_ARCH_ENTER_LAZY_CPU_MODE -#define arch_enter_lazy_cpu_mode() do {} while (0) -#define arch_leave_lazy_cpu_mode() do {} while (0) - -#define __HAVE_ARCH_ENTER_LAZY_MMU_MODE -#define arch_enter_lazy_mmu_mode() do {} while (0) -#define arch_leave_lazy_mmu_mode() do {} while (0) +#include #endif /* _BLACKFIN_PGTABLE_H */ -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Blackfin arch: sync with uClibc no functional changes
Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/lib/memchr.S | 31 +--- arch/blackfin/lib/memcmp.S | 46 ++ arch/blackfin/lib/memcpy.S | 24 +++--- arch/blackfin/lib/memmove.S | 12 ++ arch/blackfin/lib/memset.S |2 + 5 files changed, 68 insertions(+), 47 deletions(-) diff --git a/arch/blackfin/lib/memchr.S b/arch/blackfin/lib/memchr.S index c4f1aab..3adee9e 100644 --- a/arch/blackfin/lib/memchr.S +++ b/arch/blackfin/lib/memchr.S @@ -29,24 +29,27 @@ #include -.align 2 - -/* - * C Library function MEMCHR - * R0 = address - * R1 = sought byte - * R2 = count +/* void *memchr(const void *s, int c, size_t n); + * R0 = address (s) + * R1 = sought byte (c) + * R2 = count (n) + * * Returns pointer to located character. */ +.text + +.align 2 + ENTRY(_memchr) - P0 = R0 ; /* P0 = address */ - P2 = R2 ; /* P2 = count */ + P0 = R0; // P0 = address + P2 = R2; // P2 = count R1 = R1.B(Z); CC = R2 == 0; IF CC JUMP .Lfailed; -.Lbytes: LSETUP (.Lbyte_loop_s , .Lbyte_loop_e) LC0=P2; +.Lbytes: + LSETUP (.Lbyte_loop_s, .Lbyte_loop_e) LC0=P2; .Lbyte_loop_s: R3 = B[P0++](Z); @@ -55,9 +58,13 @@ ENTRY(_memchr) .Lbyte_loop_e: NOP; -.Lfailed: R0=0; +.Lfailed: + R0=0; RTS; -.Lfound: R0 = P0; +.Lfound: + R0 = P0; R0 += -1; RTS; + +.size _memchr,.-_memchr diff --git a/arch/blackfin/lib/memcmp.S b/arch/blackfin/lib/memcmp.S index e36fe8c..5b95023 100644 --- a/arch/blackfin/lib/memcmp.S +++ b/arch/blackfin/lib/memcmp.S @@ -29,39 +29,39 @@ #include -.align 2 - -/* - * C Library function MEMCMP - * R0 = First Address - * R1 = Second Address - * R2 = count +/* int memcmp(const void *s1, const void *s2, size_t n); + * R0 = First Address (s1) + * R1 = Second Address (s2) + * R2 = count (n) + * * Favours word aligned data. */ +.text + +.align 2 + ENTRY(_memcmp) I1 = P3; P0 = R0;/* P0 = s1 address */ P3 = R1;/* P3 = s2 Address */ P2 = R2 ; /* P2 = count */ CC = R2 <= 7(IU); - IF CC JUMP .Ltoo_small; + IF CC JUMP .Ltoo_small; I0 = R1;/* s2 */ R1 = R1 | R0; /* OR addresses together */ R1 <<= 30; /* check bottom two bits */ CC = AZ; /* AZ set if zero. */ - IF !CC JUMP .Lbytes ; /* Jump if addrs not aligned. */ + IF !CC JUMP .Lbytes ; /* Jump if addrs not aligned. */ P1 = P2 >> 2; /* count = n/4 */ R3 = 3; R2 = R2 & R3; /* remainder */ P2 = R2;/* set remainder */ - LSETUP (.Lquad_loop_s , .Lquad_loop_e) LC0=P1; + LSETUP (.Lquad_loop_s, .Lquad_loop_e) LC0=P1; .Lquad_loop_s: - NOP; - R0 = [P0++]; - R1 = [I0++]; + MNOP || R0 = [P0++] || R1 = [I0++]; CC = R0 == R1; IF !CC JUMP .Lquad_different; .Lquad_loop_e: @@ -73,7 +73,7 @@ ENTRY(_memcmp) IF CC JUMP .Lfinished; /* very unlikely*/ .Lbytes: - LSETUP (.Lbyte_loop_s , .Lbyte_loop_e) LC0=P2; + LSETUP (.Lbyte_loop_s, .Lbyte_loop_e) LC0=P2; .Lbyte_loop_s: R1 = B[P3++](Z);/* *s2 */ R0 = B[P0++](Z);/* *s1 */ @@ -88,14 +88,14 @@ ENTRY(_memcmp) RTS; .Lquad_different: -/* We've read two quads which don't match. - * Can't just compare them, because we're - * a little-endian machine, so the MSBs of - * the regs occur at later addresses in the - * string. - * Arrange to re-read those two quads again, - * byte-by-byte. - */ + /* We've read two quads which don't match. +* Can't just compare them, because we're +* a little-endian machine, so the MSBs of +* the regs occur at later addresses in the +* string. +* Arrange to re-read those two quads again, +* byte-by-byte. +*/ P0 += -4; /* back up to the start of the */ P3 = I0;/* quads, and increase the*/ P2 += 4;/* remainder count*/ @@ -106,3 +106,5 @@ ENTRY(_memcmp) R0 = 0; P3 = I1; RTS; + +.size _memcmp,.-_memcmp diff --git a/arch/blackfin/lib/memcpy.S b/arch/blackfin/lib/memcpy.S index f757e1d..c1e00ef 100644 --- a/arch/blackfin/lib/memcpy.S +++ b/arch/blackfin/lib/memcpy.S @@ -35,6 +35,14 @@ #include +/* void *memcpy(void *dest, const void *src, size_t n); + * R0 = To Address (dest) (leave unchanged to form result) + * R1 = From Address (src) + * R2 = count + * + * Note: Favours word alignment + */ + #ifdef CONFIG_MEMCPY_L1 .section .l1.text #else @@ -44,8 +52,8 @@ .align 2 ENTRY(_memcpy) - CC = R2 <= 0; /* length not positive?*/ - IF CC JUMP
[PATCH] Blackfin arch: add missing __clear_user function to uaccess header file
Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- include/asm-blackfin/uaccess.h |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/include/asm-blackfin/uaccess.h b/include/asm-blackfin/uaccess.h index ed931bb..bfcb679 100644 --- a/include/asm-blackfin/uaccess.h +++ b/include/asm-blackfin/uaccess.h @@ -260,10 +260,12 @@ static inline long strnlen_user(const char *src, long n) * Zero Userspace */ -static inline unsigned long clear_user(void *to, unsigned long n) +static inline unsigned long __clear_user(void *to, unsigned long n) { memset(to, 0, n); return 0; } +#define clear_user(to, n) __clear_user(to, n) + #endif /* _BLACKFIN_UACCESS_H */ -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Blackfin arch: add asm-blackfin socket header files
Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- include/asm-blackfin/socket.h | 55 include/asm-blackfin/sockios.h | 13 + 2 files changed, 68 insertions(+), 0 deletions(-) create mode 100644 include/asm-blackfin/socket.h create mode 100644 include/asm-blackfin/sockios.h diff --git a/include/asm-blackfin/socket.h b/include/asm-blackfin/socket.h new file mode 100644 index 000..77a45d9 --- /dev/null +++ b/include/asm-blackfin/socket.h @@ -0,0 +1,55 @@ +#ifndef _ASM_BLACKFIN_SOCKET_H +#define _ASM_BLACKFIN_SOCKET_H + +#include + +/* For setsockopt(2) */ +#define SOL_SOCKET 1 + +#define SO_DEBUG 1 +#define SO_REUSEADDR 2 +#define SO_TYPE3 +#define SO_ERROR 4 +#define SO_DONTROUTE 5 +#define SO_BROADCAST 6 +#define SO_SNDBUF 7 +#define SO_RCVBUF 8 +#define SO_SNDBUFFORCE 32 +#define SO_RCVBUFFORCE 33 +#define SO_KEEPALIVE 9 +#define SO_OOBINLINE 10 +#define SO_NO_CHECK11 +#define SO_PRIORITY12 +#define SO_LINGER 13 +#define SO_BSDCOMPAT 14 +/* To add :#define SO_REUSEPORT 15 */ +#define SO_PASSCRED16 +#define SO_PEERCRED17 +#define SO_RCVLOWAT18 +#define SO_SNDLOWAT19 +#define SO_RCVTIMEO20 +#define SO_SNDTIMEO21 + +/* Security levels - as per NRL IPv6 - don't actually do anything */ +#define SO_SECURITY_AUTHENTICATION 22 +#define SO_SECURITY_ENCRYPTION_TRANSPORT 23 +#define SO_SECURITY_ENCRYPTION_NETWORK 24 + +#define SO_BINDTODEVICE25 + +/* Socket filtering */ +#define SO_ATTACH_FILTER26 +#define SO_DETACH_FILTER27 + +#define SO_PEERNAME 28 +#define SO_TIMESTAMP 29 +#define SCM_TIMESTAMP SO_TIMESTAMP + +#define SO_ACCEPTCONN 30 + +#define SO_PEERSEC 31 +#define SO_PASSSEC 34 +#define SO_TIMESTAMPNS 35 +#define SCM_TIMESTAMPNSSO_TIMESTAMPNS + +#endif /* _ASM_BLACKFIN_SOCKET_H */ diff --git a/include/asm-blackfin/sockios.h b/include/asm-blackfin/sockios.h new file mode 100644 index 000..7874234 --- /dev/null +++ b/include/asm-blackfin/sockios.h @@ -0,0 +1,13 @@ +#ifndef _ASM_BLACKFIN_SOCKIOS_H_ +#define _ASM_BLACKFIN_SOCKIOS_H_ + +/* Socket-level I/O control calls. */ +#define FIOSETOWN 0x8901 +#define SIOCSPGRP 0x8902 +#define FIOGETOWN 0x8903 +#define SIOCGPGRP 0x8904 +#define SIOCATMARK 0x8905 +#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ +#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ + +#endif /* _ASM_BLACKFIN_SOCKIOS_H_ */ -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] USB gadget rndis: fix bug skb_push function may return an unaligned pointer bug
USB gadget rndis: skb_push function may return a pointer which is not aligned as required by struct rndis_packet_msg_type. Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- drivers/usb/gadget/rndis.c | 19 --- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c index 6ec8cf1..48335bb 100644 --- a/drivers/usb/gadget/rndis.c +++ b/drivers/usb/gadget/rndis.c @@ -1211,18 +1211,23 @@ int rndis_set_param_medium (u8 configNr, u32 medium, u32 speed) return 0; } +/* The pointer of header is not aligned, it will cause alignment exception. + * Use a temporary variable to avoid it. + */ void rndis_add_hdr (struct sk_buff *skb) { - struct rndis_packet_msg_type*header; + void *buf; + struct rndis_packet_msg_type *header; if (!skb) return; - header = (void *) skb_push (skb, sizeof *header); - memset (header, 0, sizeof *header); - header->MessageType = __constant_cpu_to_le32(REMOTE_NDIS_PACKET_MSG); - header->MessageLength = cpu_to_le32(skb->len); - header->DataOffset = __constant_cpu_to_le32 (36); - header->DataLength = cpu_to_le32(skb->len - sizeof *header); + buf = (void *) skb_push (skb, sizeof *header); + memset (buf, 0, sizeof *header); + header = (struct rndis_packet_msg_type *)buf; + put_unaligned(__constant_cpu_to_le32(REMOTE_NDIS_PACKET_MSG), >MessageType); + put_unaligned(cpu_to_le32(skb->len), >MessageLength); + put_unaligned(__constant_cpu_to_le32(36), >DataOffset); + put_unaligned(cpu_to_le32(skb->len - sizeof *header), >DataLength); } void rndis_free_response (int configNr, u8 *buf) -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] move die notifier handling to common code fix vmalloc_sync_all in nommu
Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- mm/nommu.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/mm/nommu.c b/mm/nommu.c index 2d0a82f..0016557 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -261,6 +261,14 @@ void vunmap(void *addr) } /* + * Implement a stub for vmalloc_sync_all() if the architecture chose not to + * have one. + */ +void __attribute__((weak)) vmalloc_sync_all(void) +{ +} + +/* * sys_brk() for the most part doesn't need the global kernel * lock, except when an application is doing something nasty * like trying to un-brk an area that has already been mapped -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch: use boot_command_line instead of save_command_line in setup c file
Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/kernel/setup.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index ce51882..9870c60 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -221,7 +221,7 @@ void __init setup_arch(char **cmdline_p) /* Keep a copy of command line */ *cmdline_p = _line[0]; - memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); + memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); saved_command_line[COMMAND_LINE_SIZE - 1] = 0; /* setup memory defaults from the user config */ -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Blackfin arch: always include linux kallsysms header file in trap c
[PATCH] Just include linux/kallsyms.h all the time as the header will handle prototypes/defines when CONFIG_KALLSYMS is disabled ... fixes build error when disabled due to print_ip_sym not being macroed away Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/kernel/traps.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index f168521..9556b73 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c @@ -35,6 +35,8 @@ #include #include #include +#include + #ifdef CONFIG_KGDB # include # include @@ -52,9 +54,6 @@ asmlinkage void trap_c(struct pt_regs *fp); int kstack_depth_to_print = 48; -#ifdef CONFIG_KALLSYMS -#include -#endif static int printk_address(unsigned long address) { struct vm_list_struct *vml; -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Blackfin arch: always include linux kallsysms header file in trap c
[PATCH] Just include linux/kallsyms.h all the time as the header will handle prototypes/defines when CONFIG_KALLSYMS is disabled ... fixes build error when disabled due to print_ip_sym not being macroed away Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/kernel/traps.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index f168521..9556b73 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c @@ -35,6 +35,8 @@ #include asm/irq_handler.h #include linux/interrupt.h #include linux/module.h +#include linux/kallsyms.h + #ifdef CONFIG_KGDB # include linux/debugger.h # include linux/kgdb.h @@ -52,9 +54,6 @@ asmlinkage void trap_c(struct pt_regs *fp); int kstack_depth_to_print = 48; -#ifdef CONFIG_KALLSYMS -#include linux/kallsyms.h -#endif static int printk_address(unsigned long address) { struct vm_list_struct *vml; -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Blackfin arch: add asm-blackfin socket header files
Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- include/asm-blackfin/socket.h | 55 include/asm-blackfin/sockios.h | 13 + 2 files changed, 68 insertions(+), 0 deletions(-) create mode 100644 include/asm-blackfin/socket.h create mode 100644 include/asm-blackfin/sockios.h diff --git a/include/asm-blackfin/socket.h b/include/asm-blackfin/socket.h new file mode 100644 index 000..77a45d9 --- /dev/null +++ b/include/asm-blackfin/socket.h @@ -0,0 +1,55 @@ +#ifndef _ASM_BLACKFIN_SOCKET_H +#define _ASM_BLACKFIN_SOCKET_H + +#include asm/sockios.h + +/* For setsockopt(2) */ +#define SOL_SOCKET 1 + +#define SO_DEBUG 1 +#define SO_REUSEADDR 2 +#define SO_TYPE3 +#define SO_ERROR 4 +#define SO_DONTROUTE 5 +#define SO_BROADCAST 6 +#define SO_SNDBUF 7 +#define SO_RCVBUF 8 +#define SO_SNDBUFFORCE 32 +#define SO_RCVBUFFORCE 33 +#define SO_KEEPALIVE 9 +#define SO_OOBINLINE 10 +#define SO_NO_CHECK11 +#define SO_PRIORITY12 +#define SO_LINGER 13 +#define SO_BSDCOMPAT 14 +/* To add :#define SO_REUSEPORT 15 */ +#define SO_PASSCRED16 +#define SO_PEERCRED17 +#define SO_RCVLOWAT18 +#define SO_SNDLOWAT19 +#define SO_RCVTIMEO20 +#define SO_SNDTIMEO21 + +/* Security levels - as per NRL IPv6 - don't actually do anything */ +#define SO_SECURITY_AUTHENTICATION 22 +#define SO_SECURITY_ENCRYPTION_TRANSPORT 23 +#define SO_SECURITY_ENCRYPTION_NETWORK 24 + +#define SO_BINDTODEVICE25 + +/* Socket filtering */ +#define SO_ATTACH_FILTER26 +#define SO_DETACH_FILTER27 + +#define SO_PEERNAME 28 +#define SO_TIMESTAMP 29 +#define SCM_TIMESTAMP SO_TIMESTAMP + +#define SO_ACCEPTCONN 30 + +#define SO_PEERSEC 31 +#define SO_PASSSEC 34 +#define SO_TIMESTAMPNS 35 +#define SCM_TIMESTAMPNSSO_TIMESTAMPNS + +#endif /* _ASM_BLACKFIN_SOCKET_H */ diff --git a/include/asm-blackfin/sockios.h b/include/asm-blackfin/sockios.h new file mode 100644 index 000..7874234 --- /dev/null +++ b/include/asm-blackfin/sockios.h @@ -0,0 +1,13 @@ +#ifndef _ASM_BLACKFIN_SOCKIOS_H_ +#define _ASM_BLACKFIN_SOCKIOS_H_ + +/* Socket-level I/O control calls. */ +#define FIOSETOWN 0x8901 +#define SIOCSPGRP 0x8902 +#define FIOGETOWN 0x8903 +#define SIOCGPGRP 0x8904 +#define SIOCATMARK 0x8905 +#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ +#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ + +#endif /* _ASM_BLACKFIN_SOCKIOS_H_ */ -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] USB gadget rndis: fix bug skb_push function may return an unaligned pointer bug
USB gadget rndis: skb_push function may return a pointer which is not aligned as required by struct rndis_packet_msg_type. Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- drivers/usb/gadget/rndis.c | 19 --- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c index 6ec8cf1..48335bb 100644 --- a/drivers/usb/gadget/rndis.c +++ b/drivers/usb/gadget/rndis.c @@ -1211,18 +1211,23 @@ int rndis_set_param_medium (u8 configNr, u32 medium, u32 speed) return 0; } +/* The pointer of header is not aligned, it will cause alignment exception. + * Use a temporary variable to avoid it. + */ void rndis_add_hdr (struct sk_buff *skb) { - struct rndis_packet_msg_type*header; + void *buf; + struct rndis_packet_msg_type *header; if (!skb) return; - header = (void *) skb_push (skb, sizeof *header); - memset (header, 0, sizeof *header); - header-MessageType = __constant_cpu_to_le32(REMOTE_NDIS_PACKET_MSG); - header-MessageLength = cpu_to_le32(skb-len); - header-DataOffset = __constant_cpu_to_le32 (36); - header-DataLength = cpu_to_le32(skb-len - sizeof *header); + buf = (void *) skb_push (skb, sizeof *header); + memset (buf, 0, sizeof *header); + header = (struct rndis_packet_msg_type *)buf; + put_unaligned(__constant_cpu_to_le32(REMOTE_NDIS_PACKET_MSG), header-MessageType); + put_unaligned(cpu_to_le32(skb-len), header-MessageLength); + put_unaligned(__constant_cpu_to_le32(36), header-DataOffset); + put_unaligned(cpu_to_le32(skb-len - sizeof *header), header-DataLength); } void rndis_free_response (int configNr, u8 *buf) -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] move die notifier handling to common code fix vmalloc_sync_all in nommu
Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- mm/nommu.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/mm/nommu.c b/mm/nommu.c index 2d0a82f..0016557 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -261,6 +261,14 @@ void vunmap(void *addr) } /* + * Implement a stub for vmalloc_sync_all() if the architecture chose not to + * have one. + */ +void __attribute__((weak)) vmalloc_sync_all(void) +{ +} + +/* * sys_brk() for the most part doesn't need the global kernel * lock, except when an application is doing something nasty * like trying to un-brk an area that has already been mapped -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch: use boot_command_line instead of save_command_line in setup c file
Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/kernel/setup.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index ce51882..9870c60 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -221,7 +221,7 @@ void __init setup_arch(char **cmdline_p) /* Keep a copy of command line */ *cmdline_p = command_line[0]; - memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); + memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); saved_command_line[COMMAND_LINE_SIZE - 1] = 0; /* setup memory defaults from the user config */ -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Blackfin arch: using asm-generic pgtable header file by adding PAGE access macros based on CPLB management
Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- include/asm-blackfin/pgtable.h | 44 +++ 1 files changed, 35 insertions(+), 9 deletions(-) diff --git a/include/asm-blackfin/pgtable.h b/include/asm-blackfin/pgtable.h index 9328537..5a8f9e4 100644 --- a/include/asm-blackfin/pgtable.h +++ b/include/asm-blackfin/pgtable.h @@ -3,7 +3,8 @@ #include asm-generic/4level-fixup.h -#include asm/setup.h +#include asm/page.h +#include asm/cplb.h typedef pte_t *pte_addr_t; /* @@ -14,7 +15,12 @@ typedef pte_t *pte_addr_t; #define pgd_bad(pgd) (0) #define pgd_clear(pgdp) #define kern_addr_valid(addr) (1) -#definepmd_offset(a, b)((void *)0) + +#define pmd_offset(a, b) ((void *)0) +#define pmd_none(x)(!pmd_val(x)) +#define pmd_present(x) (pmd_val(x)) +#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0) +#define pmd_bad(x) (pmd_val(x) ~PAGE_MASK) #define kern_addr_valid(addr) (1) @@ -37,6 +43,32 @@ static inline int pte_file(pte_t pte) return 0; } +#define set_pte(pteptr, pteval) (*(pteptr) = pteval) +#define set_pte_at(mm, addr, ptep, pteval) set_pte(ptep, pteval) + +/* + * Page assess control based on Blackfin CPLB management + */ +#define _PAGE_RD (CPLB_USER_RD) +#define _PAGE_WR (CPLB_USER_WR) +#define _PAGE_USER (CPLB_USER_RD | CPLB_USER_WR) +#define _PAGE_ACCESSED CPLB_ALL_ACCESS +#define _PAGE_DIRTY(CPLB_DIRTY) + +#define PTE_BIT_FUNC(fn, op) \ + static inline pte_t pte_##fn(pte_t _pte) { _pte.pte op; return _pte; } + +PTE_BIT_FUNC(rdprotect, = ~_PAGE_RD); +PTE_BIT_FUNC(mkread, |= _PAGE_RD); +PTE_BIT_FUNC(wrprotect, = ~_PAGE_WR); +PTE_BIT_FUNC(mkwrite, |= _PAGE_WR); +PTE_BIT_FUNC(exprotect, = ~_PAGE_USER); +PTE_BIT_FUNC(mkexec, |= _PAGE_USER); +PTE_BIT_FUNC(mkclean, = ~_PAGE_DIRTY); +PTE_BIT_FUNC(mkdirty, |= _PAGE_DIRTY); +PTE_BIT_FUNC(mkold, = ~_PAGE_ACCESSED); +PTE_BIT_FUNC(mkyoung, |= _PAGE_ACCESSED); + /* * ZERO_PAGE is a global shared page that is always zero: used * for zero-mapped memory areas etc.. @@ -59,12 +91,6 @@ extern unsigned int kobjsize(const void *objp); #defineVMALLOC_START 0 #defineVMALLOC_END 0x -#define __HAVE_ARCH_ENTER_LAZY_CPU_MODE -#define arch_enter_lazy_cpu_mode() do {} while (0) -#define arch_leave_lazy_cpu_mode() do {} while (0) - -#define __HAVE_ARCH_ENTER_LAZY_MMU_MODE -#define arch_enter_lazy_mmu_mode() do {} while (0) -#define arch_leave_lazy_mmu_mode() do {} while (0) +#include asm-generic/pgtable.h #endif /* _BLACKFIN_PGTABLE_H */ -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Blackfin arch: sync with uClibc no functional changes
Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/lib/memchr.S | 31 +--- arch/blackfin/lib/memcmp.S | 46 ++ arch/blackfin/lib/memcpy.S | 24 +++--- arch/blackfin/lib/memmove.S | 12 ++ arch/blackfin/lib/memset.S |2 + 5 files changed, 68 insertions(+), 47 deletions(-) diff --git a/arch/blackfin/lib/memchr.S b/arch/blackfin/lib/memchr.S index c4f1aab..3adee9e 100644 --- a/arch/blackfin/lib/memchr.S +++ b/arch/blackfin/lib/memchr.S @@ -29,24 +29,27 @@ #include linux/linkage.h -.align 2 - -/* - * C Library function MEMCHR - * R0 = address - * R1 = sought byte - * R2 = count +/* void *memchr(const void *s, int c, size_t n); + * R0 = address (s) + * R1 = sought byte (c) + * R2 = count (n) + * * Returns pointer to located character. */ +.text + +.align 2 + ENTRY(_memchr) - P0 = R0 ; /* P0 = address */ - P2 = R2 ; /* P2 = count */ + P0 = R0; // P0 = address + P2 = R2; // P2 = count R1 = R1.B(Z); CC = R2 == 0; IF CC JUMP .Lfailed; -.Lbytes: LSETUP (.Lbyte_loop_s , .Lbyte_loop_e) LC0=P2; +.Lbytes: + LSETUP (.Lbyte_loop_s, .Lbyte_loop_e) LC0=P2; .Lbyte_loop_s: R3 = B[P0++](Z); @@ -55,9 +58,13 @@ ENTRY(_memchr) .Lbyte_loop_e: NOP; -.Lfailed: R0=0; +.Lfailed: + R0=0; RTS; -.Lfound: R0 = P0; +.Lfound: + R0 = P0; R0 += -1; RTS; + +.size _memchr,.-_memchr diff --git a/arch/blackfin/lib/memcmp.S b/arch/blackfin/lib/memcmp.S index e36fe8c..5b95023 100644 --- a/arch/blackfin/lib/memcmp.S +++ b/arch/blackfin/lib/memcmp.S @@ -29,39 +29,39 @@ #include linux/linkage.h -.align 2 - -/* - * C Library function MEMCMP - * R0 = First Address - * R1 = Second Address - * R2 = count +/* int memcmp(const void *s1, const void *s2, size_t n); + * R0 = First Address (s1) + * R1 = Second Address (s2) + * R2 = count (n) + * * Favours word aligned data. */ +.text + +.align 2 + ENTRY(_memcmp) I1 = P3; P0 = R0;/* P0 = s1 address */ P3 = R1;/* P3 = s2 Address */ P2 = R2 ; /* P2 = count */ CC = R2 = 7(IU); - IF CC JUMP .Ltoo_small; + IF CC JUMP .Ltoo_small; I0 = R1;/* s2 */ R1 = R1 | R0; /* OR addresses together */ R1 = 30; /* check bottom two bits */ CC = AZ; /* AZ set if zero. */ - IF !CC JUMP .Lbytes ; /* Jump if addrs not aligned. */ + IF !CC JUMP .Lbytes ; /* Jump if addrs not aligned. */ P1 = P2 2; /* count = n/4 */ R3 = 3; R2 = R2 R3; /* remainder */ P2 = R2;/* set remainder */ - LSETUP (.Lquad_loop_s , .Lquad_loop_e) LC0=P1; + LSETUP (.Lquad_loop_s, .Lquad_loop_e) LC0=P1; .Lquad_loop_s: - NOP; - R0 = [P0++]; - R1 = [I0++]; + MNOP || R0 = [P0++] || R1 = [I0++]; CC = R0 == R1; IF !CC JUMP .Lquad_different; .Lquad_loop_e: @@ -73,7 +73,7 @@ ENTRY(_memcmp) IF CC JUMP .Lfinished; /* very unlikely*/ .Lbytes: - LSETUP (.Lbyte_loop_s , .Lbyte_loop_e) LC0=P2; + LSETUP (.Lbyte_loop_s, .Lbyte_loop_e) LC0=P2; .Lbyte_loop_s: R1 = B[P3++](Z);/* *s2 */ R0 = B[P0++](Z);/* *s1 */ @@ -88,14 +88,14 @@ ENTRY(_memcmp) RTS; .Lquad_different: -/* We've read two quads which don't match. - * Can't just compare them, because we're - * a little-endian machine, so the MSBs of - * the regs occur at later addresses in the - * string. - * Arrange to re-read those two quads again, - * byte-by-byte. - */ + /* We've read two quads which don't match. +* Can't just compare them, because we're +* a little-endian machine, so the MSBs of +* the regs occur at later addresses in the +* string. +* Arrange to re-read those two quads again, +* byte-by-byte. +*/ P0 += -4; /* back up to the start of the */ P3 = I0;/* quads, and increase the*/ P2 += 4;/* remainder count*/ @@ -106,3 +106,5 @@ ENTRY(_memcmp) R0 = 0; P3 = I1; RTS; + +.size _memcmp,.-_memcmp diff --git a/arch/blackfin/lib/memcpy.S b/arch/blackfin/lib/memcpy.S index f757e1d..c1e00ef 100644 --- a/arch/blackfin/lib/memcpy.S +++ b/arch/blackfin/lib/memcpy.S @@ -35,6 +35,14 @@ #include linux/linkage.h +/* void *memcpy(void *dest, const void *src, size_t n); + * R0 = To Address (dest) (leave unchanged to form result) + * R1 = From Address (src) + * R2 = count + * + * Note: Favours word alignment + */ + #ifdef CONFIG_MEMCPY_L1 .section .l1.text #else @@ -44,8 +52,8 @@ .align 2 ENTRY(_memcpy) - CC = R2 = 0; /* length
[PATCH] Blackfin arch: add missing __clear_user function to uaccess header file
Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- include/asm-blackfin/uaccess.h |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/include/asm-blackfin/uaccess.h b/include/asm-blackfin/uaccess.h index ed931bb..bfcb679 100644 --- a/include/asm-blackfin/uaccess.h +++ b/include/asm-blackfin/uaccess.h @@ -260,10 +260,12 @@ static inline long strnlen_user(const char *src, long n) * Zero Userspace */ -static inline unsigned long clear_user(void *to, unsigned long n) +static inline unsigned long __clear_user(void *to, unsigned long n) { memset(to, 0, n); return 0; } +#define clear_user(to, n) __clear_user(to, n) + #endif /* _BLACKFIN_UACCESS_H */ -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Blackfin arch: add asm-blackfin socket header files
On Wed, 2007-04-04 at 14:28 +0800, Wu, Bryan wrote: Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- include/asm-blackfin/socket.h | 55 include/asm-blackfin/sockios.h | 13 + 2 files changed, 68 insertions(+), 0 deletions(-) create mode 100644 include/asm-blackfin/socket.h create mode 100644 include/asm-blackfin/sockios.h Maybe we can add generic header files such as include/asm-generic/socket.h and include/asm-generic/sockios.h. Cheers, -Bryan - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Blackfin arch: add asm-blackfin socket header files
On Wed, 2007-04-04 at 14:55 +0800, Wu, Bryan wrote: On Wed, 2007-04-04 at 14:28 +0800, Wu, Bryan wrote: Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- include/asm-blackfin/socket.h | 55 include/asm-blackfin/sockios.h | 13 + 2 files changed, 68 insertions(+), 0 deletions(-) create mode 100644 include/asm-blackfin/socket.h create mode 100644 include/asm-blackfin/sockios.h Maybe we can add generic header files such as include/asm-generic/socket.h and include/asm-generic/sockios.h. Cheers, -Bryan oops, I screwed up the patch set in my local git-tree. please drop this patch and I will send a new one. Sorry for this. -Bryan - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch: fix some coding style in include asm-blackin header files
Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- include/asm-blackfin/dma-mapping.h | 11 ++- include/asm-blackfin/gpio.h|2 -- include/asm-blackfin/mach-bf533/anomaly.h |1 - include/asm-blackfin/mach-bf533/blackfin.h |1 - include/asm-blackfin/mach-bf533/cdefBF532.h|1 - include/asm-blackfin/mach-bf533/defBF532.h |3 --- include/asm-blackfin/mach-bf533/dma.h |2 -- include/asm-blackfin/mach-bf533/irq.h |1 - include/asm-blackfin/mach-bf537/mem_map.h |7 +-- include/asm-blackfin/mach-bf561/anomaly.h |1 - include/asm-blackfin/mach-bf561/blackfin.h |1 - include/asm-blackfin/mach-bf561/cdefBF561.h|1 - include/asm-blackfin/mach-bf561/defBF561.h |1 - include/asm-blackfin/mach-bf561/dma.h |1 - include/asm-blackfin/mach-bf561/irq.h |1 - include/asm-blackfin/mach-bf561/mem_map.h |1 - include/asm-blackfin/mach-common/cdef_LPBlackfin.h |3 --- include/asm-blackfin/mach-common/def_LPBlackfin.h |3 --- include/asm-blackfin/mmu_context.h |2 -- include/asm-blackfin/system.h |3 --- include/asm-blackfin/thread_info.h |1 - 21 files changed, 7 insertions(+), 41 deletions(-) diff --git a/include/asm-blackfin/dma-mapping.h b/include/asm-blackfin/dma-mapping.h index ac125c9..7a77d7f 100644 --- a/include/asm-blackfin/dma-mapping.h +++ b/include/asm-blackfin/dma-mapping.h @@ -10,6 +10,12 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle); /* + * Now for the API extensions over the pci_ one + */ +#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) +#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) + +/* * Map a single buffer of the indicated size for DMA in streaming mode. * The 32-bit bus address to use is returned. * @@ -57,9 +63,4 @@ extern int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, extern void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, enum dma_data_direction direction); -/* Now for the API extensions over the pci_ one */ - -#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) -#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) - #endif /* _BLACKFIN_DMA_MAPPING_H */ diff --git a/include/asm-blackfin/gpio.h b/include/asm-blackfin/gpio.h index 14db45f..d16fe3c 100644 --- a/include/asm-blackfin/gpio.h +++ b/include/asm-blackfin/gpio.h @@ -6,8 +6,6 @@ * Created: * Description: * - * Rev: $Id: gpio.h,v 1.5 2006/12/12 12:14:56 hennerich Exp $ - * * Modified: * Copyright 2004-2006 Analog Devices Inc. * diff --git a/include/asm-blackfin/mach-bf533/anomaly.h b/include/asm-blackfin/mach-bf533/anomaly.h index 9e14110..a84d390 100644 --- a/include/asm-blackfin/mach-bf533/anomaly.h +++ b/include/asm-blackfin/mach-bf533/anomaly.h @@ -10,7 +10,6 @@ * * Modified: * - * * Bugs: Enter bugs at http://blackfin.uclinux.org/ * * This program is free software; you can redistribute it and/or modify diff --git a/include/asm-blackfin/mach-bf533/blackfin.h b/include/asm-blackfin/mach-bf533/blackfin.h index d7d403c..e438449 100644 --- a/include/asm-blackfin/mach-bf533/blackfin.h +++ b/include/asm-blackfin/mach-bf533/blackfin.h @@ -10,7 +10,6 @@ * * Modified: * - * * Bugs: Enter bugs at http://blackfin.uclinux.org/ * * This program is free software; you can redistribute it and/or modify diff --git a/include/asm-blackfin/mach-bf533/cdefBF532.h b/include/asm-blackfin/mach-bf533/cdefBF532.h index 121d3a2..1d7c494 100644 --- a/include/asm-blackfin/mach-bf533/cdefBF532.h +++ b/include/asm-blackfin/mach-bf533/cdefBF532.h @@ -10,7 +10,6 @@ * * Modified: * - * * Bugs: Enter bugs at http://blackfin.uclinux.org/ * * This program is free software; you can redistribute it and/or modify diff --git a/include/asm-blackfin/mach-bf533/defBF532.h b/include/asm-blackfin/mach-bf533/defBF532.h index 59c7557..b240a08 100644 --- a/include/asm-blackfin/mach-bf533/defBF532.h +++ b/include/asm-blackfin/mach-bf533/defBF532.h @@ -1,7 +1,5 @@ / * - * $Id: defBF532.h 2717 2007-02-02 03:58:24Z vapier $ - * * This file is subject to the terms and conditions of the GNU Public * License. See the file COPYING in the main directory of this archive * for more details. @@ -27,7 +25,6 @@ * * Modified: * - * * Bugs: Enter bugs at http://blackfin.uclinux.org/ * * This program is free software; you can redistribute it and/or modify diff --git a/include/asm-blackfin/mach-bf533/dma.h
[PATCH] blackfin arch: add SCM_TIMESTAMPNS and SIOCGSTAMPNS to socket header file with code style cleaning up
Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- include/asm-blackfin/socket.h | 11 ++- include/asm-blackfin/sockios.h |3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/asm-blackfin/socket.h b/include/asm-blackfin/socket.h index f337bb3..5213c96 100644 --- a/include/asm-blackfin/socket.h +++ b/include/asm-blackfin/socket.h @@ -38,15 +38,16 @@ #define SO_BINDTODEVICE25 /* Socket filtering */ -#define SO_ATTACH_FILTER26 -#define SO_DETACH_FILTER27 +#define SO_ATTACH_FILTER 26 +#define SO_DETACH_FILTER 27 -#define SO_PEERNAME 28 +#define SO_PEERNAME28 #define SO_TIMESTAMP 29 #define SCM_TIMESTAMP SO_TIMESTAMP #define SO_ACCEPTCONN 30 -#define SO_PEERSEC 31 +#define SO_PEERSEC 31 #define SO_PASSSEC 34 - +#define SO_TIMESTAMPNS 35 +#define SCM_TIMESTAMPNSSO_TIMESTAMPNS #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-blackfin/sockios.h b/include/asm-blackfin/sockios.h index 733f99c..426b89b 100644 --- a/include/asm-blackfin/sockios.h +++ b/include/asm-blackfin/sockios.h @@ -7,6 +7,7 @@ #define FIOGETOWN 0x8903 #define SIOCGPGRP 0x8904 #define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906 /* Get stamp */ +#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ +#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ #endif /* __ARCH_BFIN_SOCKIOS__ */ -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch: define a new cacheline_aligned attribute to put it in L1 data memory with linkscript update
Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/Kconfig |8 arch/blackfin/kernel/vmlinux.lds.S |8 include/asm-blackfin/cache.h | 11 +++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 9ae0223..88e831a 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -513,6 +513,14 @@ config IP_CHECKSUM_L1 If enabled IP Checksum function is linked into L1 instruction memory.(less latency) +config CACHELINE_ALIGNED_L1 + bool Locate cacheline_aligned data to L1 Data Memory + default y + depends on !BF531 + help + If enabled cacheline_anligned data is linked + into L1 data memory.(less latency) + config SYSCALL_TAB_L1 bool Locate Syscall Table L1 Data Memory default n diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S index fb01ca2..53c6a23 100644 --- a/arch/blackfin/kernel/vmlinux.lds.S +++ b/arch/blackfin/kernel/vmlinux.lds.S @@ -173,6 +173,9 @@ SECTIONS __sbss_l1 = .; *(.l1.bss) + . = ALIGN(32); + *(.data_l1.cacheline_aligned) + . = ALIGN(4); __ebss_l1 = .; } l1_data_a AT ram @@ -197,6 +200,11 @@ SECTIONS . = ALIGN(0x2000); *(.data.init_task) *(.data) + + . = ALIGN(32); + *(.data.cacheline_aligned) + + . = ALIGN(0x2000); __edata = .; } ram diff --git a/include/asm-blackfin/cache.h b/include/asm-blackfin/cache.h index 560e390..023d721 100644 --- a/include/asm-blackfin/cache.h +++ b/include/asm-blackfin/cache.h @@ -10,13 +10,16 @@ */ #define L1_CACHE_SHIFT 5 #define L1_CACHE_BYTES (1 L1_CACHE_SHIFT) +#define SMP_CACHE_BYTESL1_CACHE_BYTES /* - * Don't make __cacheline_aligned and - * cacheline_aligned defined in include/linux/cache.h + * Put cacheline_aliged data to L1 data memory */ -#define __cacheline_aligned -#define cacheline_aligned +#ifdef CONFIG_CACHELINE_ALIGNED_L1 +#define __cacheline_aligned\ + __attribute__((__aligned__(L1_CACHE_BYTES), \ + __section__(.data_l1.cacheline_aligned))) +#endif /* * largest L1 which this arch supports -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] blackfin arch: use boot_command_line instead of save_command_line in setup c file
On Wed, 2007-04-04 at 08:07 -0700, Randy Dunlap wrote: On Wed, 04 Apr 2007 14:28:23 +0800 Wu, Bryan wrote: Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/kernel/setup.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index ce51882..9870c60 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -221,7 +221,7 @@ void __init setup_arch(char **cmdline_p) /* Keep a copy of command line */ *cmdline_p = command_line[0]; - memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); + memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); saved_command_line[COMMAND_LINE_SIZE - 1] = 0; /* setup memory defaults from the user config */ -- Hi Bryan, Patch descriptions should include _why_ a change is being made, not just what the change is. Thanks Randy. I am just confused by the following comments in -mm tree init/main.c: --- /* Untouched command line saved by arch-specific code. */ char __initdata boot_command_line[COMMAND_LINE_SIZE]; /* Untouched saved command line (eg. for /proc) */ char *saved_command_line; --- And you know, in the 2.6.20.x stable kernel init/main.c: --- /* Untouched command line (eg. for /proc) saved by arch-specific code. */ char saved_command_line[COMMAND_LINE_SIZE]; --- So the patch is to move saved_command_line to boot_command_line in blackfin arch code. I will resend a new patch about this, because I forgot to change :- --- - saved_command_line[COMMAND_LINE_SIZE - 1] = 0; + boot_command_line[COMMAND_LINE_SIZE - 1] = 0; --- Did I misunderstand about this? So some other arch (ARM/AVR32 ...) should be updated, too. --- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** Thanks again Randy. I will follow the rule. -Bryan - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch: use boot_command_line instead of saved_command_line in setup c file
[PATCH] blackfin arch As boot_command_line is added in init/main.c for arch-specific boot command line, replace old saved_command_line to boot_command_line for right boot command passing in -mm tree. Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/kernel/setup.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index ce51882..7d24229 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -221,8 +221,8 @@ void __init setup_arch(char **cmdline_p) /* Keep a copy of command line */ *cmdline_p = command_line[0]; - memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); - saved_command_line[COMMAND_LINE_SIZE - 1] = 0; + memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); + boot_command_line[COMMAND_LINE_SIZE - 1] = 0; /* setup memory defaults from the user config */ physical_mem_end = 0; -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Blackfin arch: sync with uClibc no functional changes
+.text + +.align 2 + ENTRY(_memchr) - P0 = R0 ; /* P0 = address */ - P2 = R2 ; /* P2 = count */ + P0 = R0; // P0 = address + P2 = R2; // P2 = count Sorry for introducing wrong coding style source. A updated one will be posted later. Thanks Robin and Mike. -Bryan - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Blackfin arch: sync with uClibc no functional changes
Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/lib/memchr.S | 31 +--- arch/blackfin/lib/memcmp.S | 46 ++ arch/blackfin/lib/memcpy.S | 24 +++--- arch/blackfin/lib/memmove.S | 12 ++ arch/blackfin/lib/memset.S |2 + 5 files changed, 68 insertions(+), 47 deletions(-) diff --git a/arch/blackfin/lib/memchr.S b/arch/blackfin/lib/memchr.S index c4f1aab..4981222 100644 --- a/arch/blackfin/lib/memchr.S +++ b/arch/blackfin/lib/memchr.S @@ -29,24 +29,27 @@ #include linux/linkage.h -.align 2 - -/* - * C Library function MEMCHR - * R0 = address - * R1 = sought byte - * R2 = count +/* void *memchr(const void *s, int c, size_t n); + * R0 = address (s) + * R1 = sought byte (c) + * R2 = count (n) + * * Returns pointer to located character. */ +.text + +.align 2 + ENTRY(_memchr) - P0 = R0 ; /* P0 = address */ - P2 = R2 ; /* P2 = count */ + P0 = R0;/* P0 = address */ + P2 = R2;/* P2 = count */ R1 = R1.B(Z); CC = R2 == 0; IF CC JUMP .Lfailed; -.Lbytes: LSETUP (.Lbyte_loop_s , .Lbyte_loop_e) LC0=P2; +.Lbytes: + LSETUP (.Lbyte_loop_s, .Lbyte_loop_e) LC0=P2; .Lbyte_loop_s: R3 = B[P0++](Z); @@ -55,9 +58,13 @@ ENTRY(_memchr) .Lbyte_loop_e: NOP; -.Lfailed: R0=0; +.Lfailed: + R0=0; RTS; -.Lfound: R0 = P0; +.Lfound: + R0 = P0; R0 += -1; RTS; + +.size _memchr,.-_memchr diff --git a/arch/blackfin/lib/memcmp.S b/arch/blackfin/lib/memcmp.S index e36fe8c..5b95023 100644 --- a/arch/blackfin/lib/memcmp.S +++ b/arch/blackfin/lib/memcmp.S @@ -29,39 +29,39 @@ #include linux/linkage.h -.align 2 - -/* - * C Library function MEMCMP - * R0 = First Address - * R1 = Second Address - * R2 = count +/* int memcmp(const void *s1, const void *s2, size_t n); + * R0 = First Address (s1) + * R1 = Second Address (s2) + * R2 = count (n) + * * Favours word aligned data. */ +.text + +.align 2 + ENTRY(_memcmp) I1 = P3; P0 = R0;/* P0 = s1 address */ P3 = R1;/* P3 = s2 Address */ P2 = R2 ; /* P2 = count */ CC = R2 = 7(IU); - IF CC JUMP .Ltoo_small; + IF CC JUMP .Ltoo_small; I0 = R1;/* s2 */ R1 = R1 | R0; /* OR addresses together */ R1 = 30; /* check bottom two bits */ CC = AZ; /* AZ set if zero. */ - IF !CC JUMP .Lbytes ; /* Jump if addrs not aligned. */ + IF !CC JUMP .Lbytes ; /* Jump if addrs not aligned. */ P1 = P2 2; /* count = n/4 */ R3 = 3; R2 = R2 R3; /* remainder */ P2 = R2;/* set remainder */ - LSETUP (.Lquad_loop_s , .Lquad_loop_e) LC0=P1; + LSETUP (.Lquad_loop_s, .Lquad_loop_e) LC0=P1; .Lquad_loop_s: - NOP; - R0 = [P0++]; - R1 = [I0++]; + MNOP || R0 = [P0++] || R1 = [I0++]; CC = R0 == R1; IF !CC JUMP .Lquad_different; .Lquad_loop_e: @@ -73,7 +73,7 @@ ENTRY(_memcmp) IF CC JUMP .Lfinished; /* very unlikely*/ .Lbytes: - LSETUP (.Lbyte_loop_s , .Lbyte_loop_e) LC0=P2; + LSETUP (.Lbyte_loop_s, .Lbyte_loop_e) LC0=P2; .Lbyte_loop_s: R1 = B[P3++](Z);/* *s2 */ R0 = B[P0++](Z);/* *s1 */ @@ -88,14 +88,14 @@ ENTRY(_memcmp) RTS; .Lquad_different: -/* We've read two quads which don't match. - * Can't just compare them, because we're - * a little-endian machine, so the MSBs of - * the regs occur at later addresses in the - * string. - * Arrange to re-read those two quads again, - * byte-by-byte. - */ + /* We've read two quads which don't match. +* Can't just compare them, because we're +* a little-endian machine, so the MSBs of +* the regs occur at later addresses in the +* string. +* Arrange to re-read those two quads again, +* byte-by-byte. +*/ P0 += -4; /* back up to the start of the */ P3 = I0;/* quads, and increase the*/ P2 += 4;/* remainder count*/ @@ -106,3 +106,5 @@ ENTRY(_memcmp) R0 = 0; P3 = I1; RTS; + +.size _memcmp,.-_memcmp diff --git a/arch/blackfin/lib/memcpy.S b/arch/blackfin/lib/memcpy.S index f757e1d..c1e00ef 100644 --- a/arch/blackfin/lib/memcpy.S +++ b/arch/blackfin/lib/memcpy.S @@ -35,6 +35,14 @@ #include linux/linkage.h +/* void *memcpy(void *dest, const void *src, size_t n); + * R0 = To Address (dest) (leave unchanged to form result) + * R1 = From Address (src) + * R2 = count + * + * Note: Favours word alignment + */ + #ifdef CONFIG_MEMCPY_L1 .section .l1.text #else @@ -44,8 +52,8 @@ .align 2 ENTRY(_memcpy) - CC = R2 = 0;
[PATCH] nommu arch dont zero the anonymous mapping by adding UNINITIALIZE flag
On architectures with MMU, malloc takes about the same speed, indepentant of malloc size, while on the Blackfin (NOMMU), as the malloc size increases, the time that malloc consumes grows This small application, which does a bunch of mallocs, and times them with gettimeofday(): = #include #include #include int main(int argc, char* argv[]) { unsigned int i, * j, k, a, t1, t2, max, ave, min; struct timeval tim1, tim2; k = 4 ; for (i = 0; i <= 16*1024 ; i+=k ) { max = 0; ave = 0; min = 0x; for (a = 0; a < 128 ; a ++ ) { gettimeofday(, NULL); j = (int *)malloc (i*1024); gettimeofday(, NULL); free (j); t1 = (tim1.tv_sec-tim2.tv_sec) * 100 + tim1.tv_usec-tim2.tv_usec; if ( max < t1 ) max = t1; if ( min > t1 ) min = t1; ave = ave + t1; } printf("%05ik : 0x%08x %06i %06i %06i\n", i, j, min, ave/128, max); k = 1024; if ( i < 1024 ) k = 128; if ( i < 128 ) k = 4; } return 0; }; === Summary is, when I run the app "time test", on x86: real0m0.066s user0m0.008s sys 0m0.058s on Blackfin: real3m 37.69s user0m 0.04s sys 3m 37.58s when run on x86, it produces the below output - indicating that it is pretty constant: (min of arouns 2uS, aver of 3, and max of 30-15) 0k : 0x0804a008 02 03 30 4k : 0x0804a008 02 03 11 8k : 0x0804a008 02 02 07 00012k : 0x0804a008 02 03 12 00016k : 0x0804a008 02 02 08 00020k : 0x0804a008 02 02 11 00024k : 0x0804a008 02 02 09 00028k : 0x0804a008 02 02 07 00032k : 0x0804a008 02 02 07 00036k : 0x0804a008 02 03 17 00040k : 0x0804a008 02 03 15 00044k : 0x0804a008 02 02 09 00048k : 0x0804a008 02 02 11 00052k : 0x0804a008 02 03 17 00056k : 0x0804a008 02 02 09 00060k : 0x0804a008 02 02 12 00064k : 0x0804a008 02 03 14 00068k : 0x0804a008 02 03 11 00072k : 0x0804a008 02 02 09 00076k : 0x0804a008 02 03 16 00080k : 0x0804a008 02 03 13 00084k : 0x0804a008 02 02 09 00088k : 0x0804a008 02 03 18 00092k : 0x0804a008 02 03 17 00096k : 0x0804a008 02 03 12 00100k : 0x0804a008 02 03 14 00104k : 0x0804a008 02 03 12 00108k : 0x0804a008 02 02 09 00112k : 0x0804a008 02 02 11 00116k : 0x0804a008 02 02 08 00120k : 0x0804a008 02 02 09 00124k : 0x0804a008 02 02 11 00128k : 0x0804a008 02 03 11 00256k : 0x40150008 06 07 19 00384k : 0x40150008 06 07 19 00512k : 0x40150008 06 07 18 00640k : 0x40150008 06 07 19 00768k : 0x40150008 07 07 13 00896k : 0x40150008 06 07 13 01024k : 0x40150008 06 07 19 02048k : 0x40150008 06 07 18 03072k : 0x40150008 06 07 13 04096k : 0x40150008 06 07 12 05120k : 0x40150008 06 07 18 06144k : 0x40150008 06 07 15 07168k : 0x40150008 06 07 14 08192k : 0x40150008 06 07 17 09216k : 0x40150008 06 07 10 10240k : 0x40150008 06 07 15 11264k : 0x40150008 06 07 12 12288k : 0x40150008 06 07 12 13312k : 0x40150008 06 07 19 14336k : 0x40150008 06 07 19 15360k : 0x40150008 06 07 10 16384k : 0x40150008 06 07 19 When compiled with bfin-uclinux-gcc -Wl,-elf2flt -O3 ./test.c -o ./test On blackfin, the time increases, as the malloc size increases. 0k : 0x 05 05 11 4k : 0x002e4000 34 35 89 8k : 0x0300c000 56 59 000136 00012k : 0x00284000 81 83 000189 00016k : 0x00284000 000113 000116 000180 00020k : 0x034c 000140 000143 000286 00024k : 0x034c 000162 000165 000220 00028k : 0x034c 000188 000191 000239 00032k : 0x034c 000221 000225 000301 00036k : 0x0301 000288 000295 000460 00040k : 0x0301 000360 000367 000516 00044k : 0x0301 000424 000433 000563 00048k : 0x0301 000495 000502 000556 00052k : 0x0301 000565 000575 000645 00056k : 0x0301 000637 000647 000699 00060k : 0x0301 000706 000715 000769 00064k : 0x0301 000772 000781 000874 00068k : 0x002c 000819 000828 000885 00072k : 0x002c 000866 000874 000930 00076k : 0x002c 000912 000921 000977 00080k : 0x002c 000959 000968 001023 00084k : 0x002c 001005 001017 001163 00088k : 0x002c 001052 001062 001152 00092k : 0x002c 001099 001112 001471 00096k : 0x002c
[PATCH] blackfin arch PNAV and Bluetechnix CM-BF537 use the MAC address programmed by u-boot and Warn if no valid MAC address found
Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/mach-bf537/boards/eth_mac.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/blackfin/mach-bf537/boards/eth_mac.c b/arch/blackfin/mach-bf537/boards/eth_mac.c index 81544a1..e129a08 100644 --- a/arch/blackfin/mach-bf537/boards/eth_mac.c +++ b/arch/blackfin/mach-bf537/boards/eth_mac.c @@ -21,9 +21,7 @@ #include #ifdefined(CONFIG_GENERIC_BOARD) \ - || defined(CONFIG_BFIN537_STAMP) \ - || defined(CONFIG_BFIN537_BLUETECHNIX_CM) \ - || defined(CONFIG_PNAV10) + || defined(CONFIG_BFIN537_STAMP) /* * Currently the MAC address is saved in Flash by U-Boot @@ -45,6 +43,7 @@ void get_bf537_ether_addr(char *addr) */ void get_bf537_ether_addr(char *addr) { + printk(KERN_WARNING "%s: No valid Ethernet MAC address found\n",__FILE__); } #endif -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch fix bug interrupt setup problem request_irq: set_gpio_dir called before gpio_request
Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/mach-common/ints-priority-dc.c | 36 +++- arch/blackfin/mach-common/ints-priority-sc.c | 38 +- include/asm-blackfin/gpio.h |6 ++-- 3 files changed, 63 insertions(+), 17 deletions(-) diff --git a/arch/blackfin/mach-common/ints-priority-dc.c b/arch/blackfin/mach-common/ints-priority-dc.c index 01fd688..039191c 100644 --- a/arch/blackfin/mach-common/ints-priority-dc.c +++ b/arch/blackfin/mach-common/ints-priority-dc.c @@ -217,11 +217,18 @@ static void bf561_gpio_unmask_irq(unsigned int irq) static unsigned int bf561_gpio_irq_startup(unsigned int irq) { unsigned int ret; + u16 gpionr = irq - IRQ_PF0; + + if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { + + ret = gpio_request(gpionr, NULL); + if(ret) + return ret; - ret = gpio_request(irq - IRQ_PF0, NULL); + } - if (!ret) - bf561_gpio_unmask_irq(irq); + gpio_enabled[gpio_bank(gpionr)] |= gpio_bit(gpionr); + bf561_gpio_unmask_irq(irq); return ret; @@ -231,15 +238,15 @@ static void bf561_gpio_irq_shutdown(unsigned int irq) { bf561_gpio_mask_irq(irq); gpio_free(irq - IRQ_PF0); + gpio_enabled[gpio_bank(irq - IRQ_PF0)] &= ~gpio_bit(irq - IRQ_PF0); } static int bf561_gpio_irq_type(unsigned int irq, unsigned int type) { + unsigned int ret; u16 gpionr = irq - IRQ_PF0; - set_gpio_dir(gpionr, 0); - set_gpio_inen(gpionr, 1); if (type == IRQ_TYPE_PROBE) { /* only probe unenabled GPIO interrupt lines */ @@ -250,11 +257,26 @@ static int bf561_gpio_irq_type(unsigned int irq, unsigned int type) } if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING | - IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) + IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) { + + if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { + + ret = gpio_request(gpionr, NULL); + if(ret) + return ret; + + } gpio_enabled[gpio_bank(gpionr)] |= gpio_bit(gpionr); - else + } else { gpio_enabled[gpio_bank(gpionr)] &= ~gpio_bit(gpionr); + return 0; + } + + + set_gpio_dir(gpionr, 0); + set_gpio_inen(gpionr, 1); + if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) { gpio_edge_triggered[gpio_bank(gpionr)] |= gpio_bit(gpionr); diff --git a/arch/blackfin/mach-common/ints-priority-sc.c b/arch/blackfin/mach-common/ints-priority-sc.c index 8b9e68b..8197a32 100644 --- a/arch/blackfin/mach-common/ints-priority-sc.c +++ b/arch/blackfin/mach-common/ints-priority-sc.c @@ -326,11 +326,18 @@ static void bfin_gpio_unmask_irq(unsigned int irq) static unsigned int bfin_gpio_irq_startup(unsigned int irq) { unsigned int ret; + u16 gpionr = irq - IRQ_PF0; + + if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { + + ret = gpio_request(gpionr, NULL); + if(ret) + return ret; - ret = gpio_request(irq - IRQ_PF0, NULL); + } - if (!ret) - bfin_gpio_unmask_irq(irq); + gpio_enabled[gpio_bank(gpionr)] |= gpio_bit(gpionr); + bfin_gpio_unmask_irq(irq); return ret; } @@ -339,14 +346,15 @@ static void bfin_gpio_irq_shutdown(unsigned int irq) { bfin_gpio_mask_irq(irq); gpio_free(irq - IRQ_PF0); + gpio_enabled[gpio_bank(irq - IRQ_PF0)] &= ~gpio_bit(irq - IRQ_PF0); } static int bfin_gpio_irq_type(unsigned int irq, unsigned int type) { + + unsigned int ret; u16 gpionr = irq - IRQ_PF0; - set_gpio_dir(gpionr, 0); - set_gpio_inen(gpionr, 1); if (type == IRQ_TYPE_PROBE) { /* only probe unenabled GPIO interrupt lines */ @@ -357,10 +365,26 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type) } if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING | - IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) + IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) { + + if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { + + ret = gpio_request(gpionr, NULL); + if(ret) + return ret; + + } +
Re: [PATCH] blackfin arch fix stamp537 ISP1716 IRQ setting bug
Sorry for word wrap. this one is ok. Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/mach-bf537/boards/stamp.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 0f90ff9..a4219df 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c @@ -68,7 +68,7 @@ static struct resource bfin_isp1761_resources[] = { [1] = { .start = ISP1761_IRQ, .end= ISP1761_IRQ, - .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, + .flags = IORESOURCE_IRQ, }, }; -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch fix bug prevent warning in case BF531 is target
Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/kernel/setup.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 96ee2fa..ce51882 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -571,7 +571,7 @@ static void __init generate_cpl_tables(void) * rootfs size, there can be overlapping memory areas. */ - if (as_1m) { + if (as_1m && i!=L1I_MEM && i!=L1D_MEM) { #ifdef CONFIG_MTD_UCLINUX if (i == SDRAM_RAM_MTD) { if ((cplb_data[SDRAM_KERN].end + 1) > cplb_data[SDRAM_RAM_MTD].start) -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch fix stamp537 ISP1716 IRQ setting bug
Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/mach-bf537/boards/stamp.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 0f90ff9..a4219df 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c @@ -68,7 +68,7 @@ static struct resource bfin_isp1761_resources[] = { [1] = { .start = ISP1761_IRQ, .end= ISP1761_IRQ, - .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, + .flags = IORESOURCE_IRQ, }, }; -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -mm] blackfin arch fix bug bf561 rev ID are 8-bit
Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/kernel/setup.c|3 +++ include/asm-blackfin/mach-bf561/bf561.h |2 +- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index b494f73..96ee2fa 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -117,6 +117,9 @@ static u_int get_dsp_rev_id(void) { u_int id; id = bfin_read_DSPID() & 0x; +#if defined(CONFIG_BF561) + id>>=8; +#endif return id; } diff --git a/include/asm-blackfin/mach-bf561/bf561.h b/include/asm-blackfin/mach-bf561/bf561.h index cd90a1c..ded1796 100644 --- a/include/asm-blackfin/mach-bf561/bf561.h +++ b/include/asm-blackfin/mach-bf561/bf561.h @@ -30,7 +30,7 @@ #ifndef __MACH_BF561_H__ #define __MACH_BF561_H__ -#define SUPPORTED_DSPID0x300 +#define SUPPORTED_DSPID0x3 #define OFFSET_(x) ((x) & 0x) #define L1_ISRAM 0xFFA0 -- 1.5.0.5 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -mm] blackfin arch fix bug bf561 rev ID are 8-bit
Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/kernel/setup.c|3 +++ include/asm-blackfin/mach-bf561/bf561.h |2 +- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index b494f73..96ee2fa 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -117,6 +117,9 @@ static u_int get_dsp_rev_id(void) { u_int id; id = bfin_read_DSPID() 0x; +#if defined(CONFIG_BF561) + id=8; +#endif return id; } diff --git a/include/asm-blackfin/mach-bf561/bf561.h b/include/asm-blackfin/mach-bf561/bf561.h index cd90a1c..ded1796 100644 --- a/include/asm-blackfin/mach-bf561/bf561.h +++ b/include/asm-blackfin/mach-bf561/bf561.h @@ -30,7 +30,7 @@ #ifndef __MACH_BF561_H__ #define __MACH_BF561_H__ -#define SUPPORTED_DSPID0x300 +#define SUPPORTED_DSPID0x3 #define OFFSET_(x) ((x) 0x) #define L1_ISRAM 0xFFA0 -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch fix stamp537 ISP1716 IRQ setting bug
Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/mach-bf537/boards/stamp.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 0f90ff9..a4219df 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c @@ -68,7 +68,7 @@ static struct resource bfin_isp1761_resources[] = { [1] = { .start = ISP1761_IRQ, .end= ISP1761_IRQ, - .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, + .flags = IORESOURCE_IRQ, }, }; -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch fix bug prevent warning in case BF531 is target
Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/kernel/setup.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 96ee2fa..ce51882 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -571,7 +571,7 @@ static void __init generate_cpl_tables(void) * rootfs size, there can be overlapping memory areas. */ - if (as_1m) { + if (as_1m i!=L1I_MEM i!=L1D_MEM) { #ifdef CONFIG_MTD_UCLINUX if (i == SDRAM_RAM_MTD) { if ((cplb_data[SDRAM_KERN].end + 1) cplb_data[SDRAM_RAM_MTD].start) -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] blackfin arch fix stamp537 ISP1716 IRQ setting bug
Sorry for word wrap. this one is ok. Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/mach-bf537/boards/stamp.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 0f90ff9..a4219df 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c @@ -68,7 +68,7 @@ static struct resource bfin_isp1761_resources[] = { [1] = { .start = ISP1761_IRQ, .end= ISP1761_IRQ, - .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, + .flags = IORESOURCE_IRQ, }, }; -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] blackfin arch fix bug interrupt setup problem request_irq: set_gpio_dir called before gpio_request
Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/mach-common/ints-priority-dc.c | 36 +++- arch/blackfin/mach-common/ints-priority-sc.c | 38 +- include/asm-blackfin/gpio.h |6 ++-- 3 files changed, 63 insertions(+), 17 deletions(-) diff --git a/arch/blackfin/mach-common/ints-priority-dc.c b/arch/blackfin/mach-common/ints-priority-dc.c index 01fd688..039191c 100644 --- a/arch/blackfin/mach-common/ints-priority-dc.c +++ b/arch/blackfin/mach-common/ints-priority-dc.c @@ -217,11 +217,18 @@ static void bf561_gpio_unmask_irq(unsigned int irq) static unsigned int bf561_gpio_irq_startup(unsigned int irq) { unsigned int ret; + u16 gpionr = irq - IRQ_PF0; + + if (!(gpio_enabled[gpio_bank(gpionr)] gpio_bit(gpionr))) { + + ret = gpio_request(gpionr, NULL); + if(ret) + return ret; - ret = gpio_request(irq - IRQ_PF0, NULL); + } - if (!ret) - bf561_gpio_unmask_irq(irq); + gpio_enabled[gpio_bank(gpionr)] |= gpio_bit(gpionr); + bf561_gpio_unmask_irq(irq); return ret; @@ -231,15 +238,15 @@ static void bf561_gpio_irq_shutdown(unsigned int irq) { bf561_gpio_mask_irq(irq); gpio_free(irq - IRQ_PF0); + gpio_enabled[gpio_bank(irq - IRQ_PF0)] = ~gpio_bit(irq - IRQ_PF0); } static int bf561_gpio_irq_type(unsigned int irq, unsigned int type) { + unsigned int ret; u16 gpionr = irq - IRQ_PF0; - set_gpio_dir(gpionr, 0); - set_gpio_inen(gpionr, 1); if (type == IRQ_TYPE_PROBE) { /* only probe unenabled GPIO interrupt lines */ @@ -250,11 +257,26 @@ static int bf561_gpio_irq_type(unsigned int irq, unsigned int type) } if (type (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING | - IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) + IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) { + + if (!(gpio_enabled[gpio_bank(gpionr)] gpio_bit(gpionr))) { + + ret = gpio_request(gpionr, NULL); + if(ret) + return ret; + + } gpio_enabled[gpio_bank(gpionr)] |= gpio_bit(gpionr); - else + } else { gpio_enabled[gpio_bank(gpionr)] = ~gpio_bit(gpionr); + return 0; + } + + + set_gpio_dir(gpionr, 0); + set_gpio_inen(gpionr, 1); + if (type (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) { gpio_edge_triggered[gpio_bank(gpionr)] |= gpio_bit(gpionr); diff --git a/arch/blackfin/mach-common/ints-priority-sc.c b/arch/blackfin/mach-common/ints-priority-sc.c index 8b9e68b..8197a32 100644 --- a/arch/blackfin/mach-common/ints-priority-sc.c +++ b/arch/blackfin/mach-common/ints-priority-sc.c @@ -326,11 +326,18 @@ static void bfin_gpio_unmask_irq(unsigned int irq) static unsigned int bfin_gpio_irq_startup(unsigned int irq) { unsigned int ret; + u16 gpionr = irq - IRQ_PF0; + + if (!(gpio_enabled[gpio_bank(gpionr)] gpio_bit(gpionr))) { + + ret = gpio_request(gpionr, NULL); + if(ret) + return ret; - ret = gpio_request(irq - IRQ_PF0, NULL); + } - if (!ret) - bfin_gpio_unmask_irq(irq); + gpio_enabled[gpio_bank(gpionr)] |= gpio_bit(gpionr); + bfin_gpio_unmask_irq(irq); return ret; } @@ -339,14 +346,15 @@ static void bfin_gpio_irq_shutdown(unsigned int irq) { bfin_gpio_mask_irq(irq); gpio_free(irq - IRQ_PF0); + gpio_enabled[gpio_bank(irq - IRQ_PF0)] = ~gpio_bit(irq - IRQ_PF0); } static int bfin_gpio_irq_type(unsigned int irq, unsigned int type) { + + unsigned int ret; u16 gpionr = irq - IRQ_PF0; - set_gpio_dir(gpionr, 0); - set_gpio_inen(gpionr, 1); if (type == IRQ_TYPE_PROBE) { /* only probe unenabled GPIO interrupt lines */ @@ -357,10 +365,26 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type) } if (type (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING | - IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) + IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) { + + if (!(gpio_enabled[gpio_bank(gpionr)] gpio_bit(gpionr))) { + + ret = gpio_request(gpionr, NULL); + if(ret) + return ret; + + } + gpio_enabled[gpio_bank(gpionr)] |=
[PATCH] blackfin arch PNAV and Bluetechnix CM-BF537 use the MAC address programmed by u-boot and Warn if no valid MAC address found
Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- arch/blackfin/mach-bf537/boards/eth_mac.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/blackfin/mach-bf537/boards/eth_mac.c b/arch/blackfin/mach-bf537/boards/eth_mac.c index 81544a1..e129a08 100644 --- a/arch/blackfin/mach-bf537/boards/eth_mac.c +++ b/arch/blackfin/mach-bf537/boards/eth_mac.c @@ -21,9 +21,7 @@ #include asm/blackfin.h #ifdefined(CONFIG_GENERIC_BOARD) \ - || defined(CONFIG_BFIN537_STAMP) \ - || defined(CONFIG_BFIN537_BLUETECHNIX_CM) \ - || defined(CONFIG_PNAV10) + || defined(CONFIG_BFIN537_STAMP) /* * Currently the MAC address is saved in Flash by U-Boot @@ -45,6 +43,7 @@ void get_bf537_ether_addr(char *addr) */ void get_bf537_ether_addr(char *addr) { + printk(KERN_WARNING %s: No valid Ethernet MAC address found\n,__FILE__); } #endif -- 1.5.0.5 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] nommu arch dont zero the anonymous mapping by adding UNINITIALIZE flag
On architectures with MMU, malloc takes about the same speed, indepentant of malloc size, while on the Blackfin (NOMMU), as the malloc size increases, the time that malloc consumes grows This small application, which does a bunch of mallocs, and times them with gettimeofday(): = #include stdio.h #include unistd.h #include sys/time.h int main(int argc, char* argv[]) { unsigned int i, * j, k, a, t1, t2, max, ave, min; struct timeval tim1, tim2; k = 4 ; for (i = 0; i = 16*1024 ; i+=k ) { max = 0; ave = 0; min = 0x; for (a = 0; a 128 ; a ++ ) { gettimeofday(tim2, NULL); j = (int *)malloc (i*1024); gettimeofday(tim1, NULL); free (j); t1 = (tim1.tv_sec-tim2.tv_sec) * 100 + tim1.tv_usec-tim2.tv_usec; if ( max t1 ) max = t1; if ( min t1 ) min = t1; ave = ave + t1; } printf(%05ik : 0x%08x %06i %06i %06i\n, i, j, min, ave/128, max); k = 1024; if ( i 1024 ) k = 128; if ( i 128 ) k = 4; } return 0; }; === Summary is, when I run the app time test, on x86: real0m0.066s user0m0.008s sys 0m0.058s on Blackfin: real3m 37.69s user0m 0.04s sys 3m 37.58s when run on x86, it produces the below output - indicating that it is pretty constant: (min of arouns 2uS, aver of 3, and max of 30-15) 0k : 0x0804a008 02 03 30 4k : 0x0804a008 02 03 11 8k : 0x0804a008 02 02 07 00012k : 0x0804a008 02 03 12 00016k : 0x0804a008 02 02 08 00020k : 0x0804a008 02 02 11 00024k : 0x0804a008 02 02 09 00028k : 0x0804a008 02 02 07 00032k : 0x0804a008 02 02 07 00036k : 0x0804a008 02 03 17 00040k : 0x0804a008 02 03 15 00044k : 0x0804a008 02 02 09 00048k : 0x0804a008 02 02 11 00052k : 0x0804a008 02 03 17 00056k : 0x0804a008 02 02 09 00060k : 0x0804a008 02 02 12 00064k : 0x0804a008 02 03 14 00068k : 0x0804a008 02 03 11 00072k : 0x0804a008 02 02 09 00076k : 0x0804a008 02 03 16 00080k : 0x0804a008 02 03 13 00084k : 0x0804a008 02 02 09 00088k : 0x0804a008 02 03 18 00092k : 0x0804a008 02 03 17 00096k : 0x0804a008 02 03 12 00100k : 0x0804a008 02 03 14 00104k : 0x0804a008 02 03 12 00108k : 0x0804a008 02 02 09 00112k : 0x0804a008 02 02 11 00116k : 0x0804a008 02 02 08 00120k : 0x0804a008 02 02 09 00124k : 0x0804a008 02 02 11 00128k : 0x0804a008 02 03 11 00256k : 0x40150008 06 07 19 00384k : 0x40150008 06 07 19 00512k : 0x40150008 06 07 18 00640k : 0x40150008 06 07 19 00768k : 0x40150008 07 07 13 00896k : 0x40150008 06 07 13 01024k : 0x40150008 06 07 19 02048k : 0x40150008 06 07 18 03072k : 0x40150008 06 07 13 04096k : 0x40150008 06 07 12 05120k : 0x40150008 06 07 18 06144k : 0x40150008 06 07 15 07168k : 0x40150008 06 07 14 08192k : 0x40150008 06 07 17 09216k : 0x40150008 06 07 10 10240k : 0x40150008 06 07 15 11264k : 0x40150008 06 07 12 12288k : 0x40150008 06 07 12 13312k : 0x40150008 06 07 19 14336k : 0x40150008 06 07 19 15360k : 0x40150008 06 07 10 16384k : 0x40150008 06 07 19 When compiled with bfin-uclinux-gcc -Wl,-elf2flt -O3 ./test.c -o ./test On blackfin, the time increases, as the malloc size increases. 0k : 0x 05 05 11 4k : 0x002e4000 34 35 89 8k : 0x0300c000 56 59 000136 00012k : 0x00284000 81 83 000189 00016k : 0x00284000 000113 000116 000180 00020k : 0x034c 000140 000143 000286 00024k : 0x034c 000162 000165 000220 00028k : 0x034c 000188 000191 000239 00032k : 0x034c 000221 000225 000301 00036k : 0x0301 000288 000295 000460 00040k : 0x0301 000360 000367 000516 00044k : 0x0301 000424 000433 000563 00048k : 0x0301 000495 000502 000556 00052k : 0x0301 000565 000575 000645 00056k : 0x0301 000637 000647 000699 00060k : 0x0301 000706 000715 000769 00064k : 0x0301 000772 000781 000874 00068k : 0x002c 000819 000828 000885 00072k : 0x002c 000866 000874 000930 00076k : 0x002c 000912 000921 000977 00080k : 0x002c 000959 000968 001023 00084k : 0x002c 001005 001017 001163 00088k : 0x002c 001052 001062 001152 00092k : 0x002c 001099 001112
Re: [PATCH] revoke: generic_file_revoke stub for NOMMU
On Wed, 2007-03-28 at 09:24 +0300, Pekka J Enberg wrote: > From: Pekka Enberg <[EMAIL PROTECTED]> > > As NOMMU does not include fs/revoke.c, we need to provide a stub for > generic_file_revoke() so that filesystems using it compile. > > Cc: Bryan Wu <[EMAIL PROTECTED]> > Signed-off-by: Pekka Enberg <[EMAIL PROTECTED]> > --- > include/linux/fs.h |4 > 1 file changed, 4 insertions(+) > > Index: uml-2.6/include/linux/fs.h > === > --- uml-2.6.orig/include/linux/fs.h 2007-03-28 09:18:57.0 +0300 > +++ uml-2.6/include/linux/fs.h2007-03-28 09:20:48.0 +0300 > @@ -1741,7 +1741,11 @@ extern long do_splice_direct(struct file > size_t len, unsigned int flags); > > /* fs/revoke.c */ > +#ifdef CONFIG_MMU > extern int generic_file_revoke(struct file *); > +#else > +#define generic_file_revoke NULL > +#endif > > extern void > file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); Cool, you are so quick and your patchbomb tool is very efficient. I will test it on my side ASAP. Thanks -Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] revoke: generic_file_revoke stub for NOMMU
On Wed, 2007-03-28 at 09:24 +0300, Pekka J Enberg wrote: From: Pekka Enberg [EMAIL PROTECTED] As NOMMU does not include fs/revoke.c, we need to provide a stub for generic_file_revoke() so that filesystems using it compile. Cc: Bryan Wu [EMAIL PROTECTED] Signed-off-by: Pekka Enberg [EMAIL PROTECTED] --- include/linux/fs.h |4 1 file changed, 4 insertions(+) Index: uml-2.6/include/linux/fs.h === --- uml-2.6.orig/include/linux/fs.h 2007-03-28 09:18:57.0 +0300 +++ uml-2.6/include/linux/fs.h2007-03-28 09:20:48.0 +0300 @@ -1741,7 +1741,11 @@ extern long do_splice_direct(struct file size_t len, unsigned int flags); /* fs/revoke.c */ +#ifdef CONFIG_MMU extern int generic_file_revoke(struct file *); +#else +#define generic_file_revoke NULL +#endif extern void file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); Cool, you are so quick and your patchbomb tool is very efficient. I will test it on my side ASAP. Thanks -Bryan - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: revoke: no revoke for nommu
On Mon, 2007-03-26 at 15:12 +0300, Pekka J Enberg wrote: > From: Pekka Enberg <[EMAIL PROTECTED]> > > There's just no sane way to revoke shared memory mappings for NOMMU so lets > disable the thing completely when CONFIG_MMU=n. > > Cc: Bryan Wu <[EMAIL PROTECTED]> > Cc: David Howells <[EMAIL PROTECTED]> > Cc: Alan Cox <[EMAIL PROTECTED]> > Signed-off-by: Pekka Enberg <[EMAIL PROTECTED]> > --- > fs/Makefile |3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > Index: uml-2.6/fs/Makefile > === > --- uml-2.6.orig/fs/Makefile 2007-03-26 15:08:42.0 +0300 > +++ uml-2.6/fs/Makefile 2007-03-26 15:09:03.0 +0300 > @@ -11,7 +11,7 @@ obj-y :=open.o read_write.o file_table. > attr.o bad_inode.o file.o filesystems.o namespace.o aio.o \ > seq_file.o xattr.o libfs.o fs-writeback.o \ > pnode.o drop_caches.o splice.o sync.o utimes.o \ > - stack.o revoke.o revoked_inode.o > + stack.o > > ifeq ($(CONFIG_BLOCK),y) > obj-y += buffer.o bio.o block_dev.o direct-io.o mpage.o ioprio.o > @@ -19,6 +19,7 @@ else > obj-y += no-block.o > endif > > +obj-$(CONFIG_MMU)+= revoke.o revoked_inode.o > obj-$(CONFIG_INOTIFY)+= inotify.o > obj-$(CONFIG_INOTIFY_USER) += inotify_user.o > obj-$(CONFIG_EPOLL) += eventpoll.o This solution is not completed in NOMMU. at least ext2 fs can't find generic_file_revoke(): Log from 2.6.21-rc5-mm2 --- LD init/built-in.o LD .tmp_vmlinux1 fs/built-in.o:(.rodata+0x2c1c): undefined reference to `generic_file_revoke' make[1]: *** [.tmp_vmlinux1] Error 1 make[1]: Leaving directory `/opt/git-tree/linux-2.6' make: *** [linux] Error 1 $ grep -r generic_file_revoke fs/ fs/ext2/file.c: .revoke = generic_file_revoke, Binary file fs/ext2/file.o matches Binary file fs/ext2/ext2.o matches Binary file fs/ext2/built-in.o matches fs/ext3/file.c: .revoke = generic_file_revoke, fs/revoke.c:int generic_file_revoke(struct file *file) fs/revoke.c:EXPORT_SYMBOL(generic_file_revoke); fs/ext4/file.c: .revoke = generic_file_revoke, Binary file fs/built-in.o matches _ Thanks -Bryan Wu - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH -mm] Blackfin arch: add kdebug header file
On Tue, 2007-03-27 at 08:34 -0700, Randy Dunlap wrote: > On Tue, 27 Mar 2007 13:40:45 +0800 Wu, Bryan wrote: > > > On Mon, 2007-03-26 at 22:27 -0700, Randy Dunlap wrote: > > > On Tue, 27 Mar 2007 01:17:06 -0400 Mike Frysinger wrote: > > > > > > > On 3/27/07, Paul Mundt <[EMAIL PROTECTED]> wrote: > > > > > On Tue, Mar 27, 2007 at 12:34:25AM -0400, Mike Frysinger wrote: > > > > > > On 3/26/07, Paul Mundt <[EMAIL PROTECTED]> wrote: > > > > > > >You should really consider the latter for getting updates merged > > > > > > >in the > > > > > > >future > > > > > > > > > > > > we're planning for this, but the short term it isnt doable for us > > > > > > > > > > If you think mangling patches by hand is a more effective use of > > > > > time, no > > > > > one is stopping you -- some people even prefer that. On the other > > > > > hand, if > > > > > you're struggling with an effective methodology before things are > > > > > merged, > > > > > what reason is there to suspect that things will get better > > > > > afterwards? > > > > > > > > we have a lot of infrastructure that the SCM is part of and at the > > > > moment, git is not a supported SCM > > > > > > > > i'm not saying the current system is easy, just that we cant integrate > > > > git in the short term, so we'll continue spanking Bryan with the > > > > overhead :/ > > > > > > In that case, Bryan may like to know that git, mercurial (IIRC), > > > and quilt have patchbomb tools. Also GregKH has one somewhere (he > > > can tell you where). And Paul Jacksone has one at > > > http://www.speakeasy.org/~pj99/sgi/sendpatchset > > > > > > > Thanks for this guide line information. I will dig into it. > > > > But in my experience, it is difficult to find right patch email > > receivers, even in the MAINTAINERS file. If there are 20 patch emails, > > we should find 20 email receivers at least and manually add them to the > > emails. This is terrible, right? Any idea? > > Yes, well, we all have the honor of going thru that. There have > been a few suggestions, but I haven't seen any that were Real Good IMO. > > You'll learn (quickly) where most patches go (i.e., subsystems and > their major maintainers/contributors). Just put those people into > your email client address book and into the patch descriptions, like > Sam said, so that the patchbomb tools can help you out with them. > Thanks a lot, I will try on my side. And one more question: What is patchbomb tools, you mean git, quilt or other kernel patch management tool? I am using quilt and try to use git to manage patches. Is there a tool just named patchbomb? Best Regards, -Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH -mm] Blackfin arch: add kdebug header file
On Tue, 2007-03-27 at 08:34 -0700, Randy Dunlap wrote: On Tue, 27 Mar 2007 13:40:45 +0800 Wu, Bryan wrote: On Mon, 2007-03-26 at 22:27 -0700, Randy Dunlap wrote: On Tue, 27 Mar 2007 01:17:06 -0400 Mike Frysinger wrote: On 3/27/07, Paul Mundt [EMAIL PROTECTED] wrote: On Tue, Mar 27, 2007 at 12:34:25AM -0400, Mike Frysinger wrote: On 3/26/07, Paul Mundt [EMAIL PROTECTED] wrote: You should really consider the latter for getting updates merged in the future we're planning for this, but the short term it isnt doable for us If you think mangling patches by hand is a more effective use of time, no one is stopping you -- some people even prefer that. On the other hand, if you're struggling with an effective methodology before things are merged, what reason is there to suspect that things will get better afterwards? we have a lot of infrastructure that the SCM is part of and at the moment, git is not a supported SCM i'm not saying the current system is easy, just that we cant integrate git in the short term, so we'll continue spanking Bryan with the overhead :/ In that case, Bryan may like to know that git, mercurial (IIRC), and quilt have patchbomb tools. Also GregKH has one somewhere (he can tell you where). And Paul Jacksone has one at http://www.speakeasy.org/~pj99/sgi/sendpatchset Thanks for this guide line information. I will dig into it. But in my experience, it is difficult to find right patch email receivers, even in the MAINTAINERS file. If there are 20 patch emails, we should find 20 email receivers at least and manually add them to the emails. This is terrible, right? Any idea? Yes, well, we all have the honor of going thru that. There have been a few suggestions, but I haven't seen any that were Real Good IMO. You'll learn (quickly) where most patches go (i.e., subsystems and their major maintainers/contributors). Just put those people into your email client address book and into the patch descriptions, like Sam said, so that the patchbomb tools can help you out with them. Thanks a lot, I will try on my side. And one more question: What is patchbomb tools, you mean git, quilt or other kernel patch management tool? I am using quilt and try to use git to manage patches. Is there a tool just named patchbomb? Best Regards, -Bryan - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: revoke: no revoke for nommu
On Mon, 2007-03-26 at 15:12 +0300, Pekka J Enberg wrote: From: Pekka Enberg [EMAIL PROTECTED] There's just no sane way to revoke shared memory mappings for NOMMU so lets disable the thing completely when CONFIG_MMU=n. Cc: Bryan Wu [EMAIL PROTECTED] Cc: David Howells [EMAIL PROTECTED] Cc: Alan Cox [EMAIL PROTECTED] Signed-off-by: Pekka Enberg [EMAIL PROTECTED] --- fs/Makefile |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: uml-2.6/fs/Makefile === --- uml-2.6.orig/fs/Makefile 2007-03-26 15:08:42.0 +0300 +++ uml-2.6/fs/Makefile 2007-03-26 15:09:03.0 +0300 @@ -11,7 +11,7 @@ obj-y :=open.o read_write.o file_table. attr.o bad_inode.o file.o filesystems.o namespace.o aio.o \ seq_file.o xattr.o libfs.o fs-writeback.o \ pnode.o drop_caches.o splice.o sync.o utimes.o \ - stack.o revoke.o revoked_inode.o + stack.o ifeq ($(CONFIG_BLOCK),y) obj-y += buffer.o bio.o block_dev.o direct-io.o mpage.o ioprio.o @@ -19,6 +19,7 @@ else obj-y += no-block.o endif +obj-$(CONFIG_MMU)+= revoke.o revoked_inode.o obj-$(CONFIG_INOTIFY)+= inotify.o obj-$(CONFIG_INOTIFY_USER) += inotify_user.o obj-$(CONFIG_EPOLL) += eventpoll.o This solution is not completed in NOMMU. at least ext2 fs can't find generic_file_revoke(): Log from 2.6.21-rc5-mm2 --- LD init/built-in.o LD .tmp_vmlinux1 fs/built-in.o:(.rodata+0x2c1c): undefined reference to `generic_file_revoke' make[1]: *** [.tmp_vmlinux1] Error 1 make[1]: Leaving directory `/opt/git-tree/linux-2.6' make: *** [linux] Error 1 $ grep -r generic_file_revoke fs/ fs/ext2/file.c: .revoke = generic_file_revoke, Binary file fs/ext2/file.o matches Binary file fs/ext2/ext2.o matches Binary file fs/ext2/built-in.o matches fs/ext3/file.c: .revoke = generic_file_revoke, fs/revoke.c:int generic_file_revoke(struct file *file) fs/revoke.c:EXPORT_SYMBOL(generic_file_revoke); fs/ext4/file.c: .revoke = generic_file_revoke, Binary file fs/built-in.o matches _ Thanks -Bryan Wu - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH -mm] Blackfin arch: add kdebug header file
On Mon, 2007-03-26 at 22:27 -0700, Randy Dunlap wrote: > On Tue, 27 Mar 2007 01:17:06 -0400 Mike Frysinger wrote: > > > On 3/27/07, Paul Mundt <[EMAIL PROTECTED]> wrote: > > > On Tue, Mar 27, 2007 at 12:34:25AM -0400, Mike Frysinger wrote: > > > > On 3/26/07, Paul Mundt <[EMAIL PROTECTED]> wrote: > > > > >You should really consider the latter for getting updates merged in the > > > > >future > > > > > > > > we're planning for this, but the short term it isnt doable for us > > > > > > If you think mangling patches by hand is a more effective use of time, no > > > one is stopping you -- some people even prefer that. On the other hand, if > > > you're struggling with an effective methodology before things are merged, > > > what reason is there to suspect that things will get better afterwards? > > > > we have a lot of infrastructure that the SCM is part of and at the > > moment, git is not a supported SCM > > > > i'm not saying the current system is easy, just that we cant integrate > > git in the short term, so we'll continue spanking Bryan with the > > overhead :/ > > In that case, Bryan may like to know that git, mercurial (IIRC), > and quilt have patchbomb tools. Also GregKH has one somewhere (he > can tell you where). And Paul Jacksone has one at > http://www.speakeasy.org/~pj99/sgi/sendpatchset > Thanks for this guide line information. I will dig into it. But in my experience, it is difficult to find right patch email receivers, even in the MAINTAINERS file. If there are 20 patch emails, we should find 20 email receivers at least and manually add them to the emails. This is terrible, right? Any idea? Best Regards, -Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH -mm] Blackfin arch: add kdebug header file
On Tue, 2007-03-27 at 01:17 -0400, Mike Frysinger wrote: > On 3/27/07, Paul Mundt <[EMAIL PROTECTED]> wrote: > > On Tue, Mar 27, 2007 at 12:34:25AM -0400, Mike Frysinger wrote: > > > On 3/26/07, Paul Mundt <[EMAIL PROTECTED]> wrote: > > > >You should really consider the latter for getting updates merged in the > > > >future > > > > > > we're planning for this, but the short term it isnt doable for us > > > > If you think mangling patches by hand is a more effective use of time, no > > one is stopping you -- some people even prefer that. On the other hand, if > > you're struggling with an effective methodology before things are merged, > > what reason is there to suspect that things will get better afterwards? > > we have a lot of infrastructure that the SCM is part of and at the > moment, git is not a supported SCM > I hope git will one of it. You know, with git kernel development will be much easier. > i'm not saying the current system is easy, just that we cant integrate > git in the short term, so we'll continue spanking Bryan with the > overhead :/ Cool, That's my duty. -Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: revoke: no revoke for nommu
On Mon, 2007-03-26 at 13:25 +0100, David Howells wrote: > Pekka J Enberg <[EMAIL PROTECTED]> wrote: > > > There's just no sane way to revoke shared memory mappings for NOMMU so lets > > disable the thing completely when CONFIG_MMU=n. > > I think that's reasonable for now - we can always add support as far as > possible later. > Yes, we can test this on Blackfin arch and maybe add support later with Blackfin MPU. Thanks -Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH -mm] Blackfin arch: add kdebug header file
On Mon, 2007-03-26 at 23:45 +0200, Arnd Bergmann wrote: > I can see nothing wrong with your patches, but you should make the > patch descriptions a little clearer: > Thanks Arnd. I posted almost ten patches yesterday. Converting ten patches to preformatted Emails is terrible manually, you know. How does a kernel guru to do this, send out dozens of patch emails a day? Is there any convenient tools to help this? > On Monday 26 March 2007, Wu, Bryan wrote: > > Hi folks, > > No need for this line, if it's there, Andrew just needs to remove > it from the changelog. > > > This patch adds kdebug.h header file to blackfin architecture. > > This line is completely redundant, as it states the same information > as the subject. You should give some background information here, > like: > > kdebug.h is needed for kprobes. > > For trivial patches where the subject already tells the whole story > (e.g. 'remove redundant declaration of foo'), just leave out the > description entirely except for the Signed-off-by. > > Arnd <>< > you can even leave out the description I really appreciate your warmly advice. Best Regards, Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH -mm] Revoke core code: fix nommu arch compiling error bug
On Mon, 2007-03-26 at 16:21 -0400, Mike Frysinger wrote: > On 3/26/07, David Howells <[EMAIL PROTECTED]> wrote: > > [*] The FRV, for example, does have some limited protection capability - but > > it is really limited and not really useful in this case. > Sorry for late response. > how so ? the Blackfin processor lacks a MMU but it does have a MPU > (memory protection unit) which allows granularity down to 1k page > sizes ... so for future releases, we plan on integrating optional > support for this so that you could have processes protected from each > other and the kernel protected from all the processes ... so in our > case, we might actually be able to support revoking of maps because we > would have that region of memory ear marked as unaccessible ... > Agree. MPU of Blackfin can provide some processes protection. But maybe at this moment just disable revoke for NOMMU is easier for further development. When we provide the MPU stuff, maybe we can enable the revoke for NOMMU but MPU arch. > note that the Blackfin processor manuals confusingly call this aspect > of the chip an "MMU" ... dont be fooled ! > -mike Thanks -Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -mm] vdso print fatal signals: fix compiling error bug in nommu arch
Hi folks, As struct mm_struct vm_mm is hidden in struct vm_area_struct in NOMMU arch, this is a fixing method when compiling failure on blackfin arch. Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- kernel/signal.c |4 1 file changed, 4 insertions(+) Index: linux-2.6/kernel/signal.c === --- linux-2.6.orig/kernel/signal.c +++ linux-2.6/kernel/signal.c @@ -807,7 +807,11 @@ static int print_vma(struct vm_area_struct *vma) { +#ifdef CONFIG_MMU struct mm_struct *mm = vma->vm_mm; +#else + struct mm_struct *mm = 0; +#endif struct file *file = vma->vm_file; int flags = vma->vm_flags; unsigned long ino = 0; _ Thanks, -Bryan Wu - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -mm] Revoke core code: fix nommu arch compiling error bug
Hi folks, As struct mm_struct vm_mm is hidden in struct vm_area_struct in NOMMU arch, this is a fixing method when compiling failure on blackfin arch. Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- fs/revoke.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) Index: linux-2.6/fs/revoke.c === --- linux-2.6.orig/fs/revoke.c +++ linux-2.6/fs/revoke.c @@ -207,13 +207,21 @@ /* * LOCKING: spin_lock(>i_mmap_lock) */ -static int revoke_mm(struct mm_struct *mm, struct address_space *mapping, +static int revoke_mm(struct vm_area_struct *vma, struct address_space *mapping, struct file *to_exclude) { - struct vm_area_struct *vma; +#ifdef CONFIG_MMU + struct mm_struct *mm = vma->vm_mm; +#else + struct mm_struct *mm = 0; +#endif + struct vm_area_struct *_vma; struct zap_details details; int err = 0; + if (!mm) + return -ENOENT; + details.i_mmap_lock = >i_mmap_lock; /* @@ -224,11 +232,11 @@ err = -EAGAIN; goto out; } - for (vma = mm->mmap; vma != NULL; vma = vma->vm_next) { - if (!need_revoke(vma, to_exclude)) + for (_vma = mm->mmap; _vma != NULL; _vma = _vma->vm_next) { + if (!need_revoke(_vma, to_exclude)) continue; - err = revoke_vma(vma, ); + err = revoke_vma(_vma, ); if (err) break; } @@ -254,7 +262,7 @@ if (likely(!need_revoke(vma, to_exclude))) continue; - err = revoke_mm(vma->vm_mm, mapping, to_exclude); + err = revoke_mm(vma, mapping, to_exclude); if (err == -EAGAIN) { try_again = 1; continue; @@ -284,7 +292,7 @@ if (likely(!need_revoke(vma, to_exclude))) continue; - err = revoke_mm(vma->vm_mm, mapping, to_exclude); + err = revoke_mm(vma, mapping, to_exclude); if (err == -EAGAIN) { try_again = 1; continue; _ Thanks, -Bryan Wu - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -mm] Blackfin: spi driver cleanup and coding style fixing
Hi folks, This patch cleanup blackfin SPI driver code and fix some coding style problems. Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- drivers/spi/spi_bfin5xx.c | 322 +- 1 file changed, 179 insertions(+), 143 deletions(-) Index: linux-2.6/drivers/spi/spi_bfin5xx.c === --- linux-2.6.orig/drivers/spi/spi_bfin5xx.c +++ linux-2.6/drivers/spi/spi_bfin5xx.c @@ -7,8 +7,6 @@ * Description: SPI controller driver for Blackfin 5xx * Bugs: Enter bugs at http://blackfin.uclinux.org/ * - * Rev: $Id: spi_bfin5xx.c 2508 2006-12-06 07:35:43Z sonicz $ - * * Modified: * March 10, 2006 bfin5xx_spi.c Created. (Luke Yang) * August 7, 2006 added full duplex mode (Axel Weiss & Luke Yang) @@ -55,17 +53,6 @@ MODULE_DESCRIPTION("Blackfin 5xx SPI Contoller"); MODULE_LICENSE("GPL"); -#ifdef DEBUG -#define ASSERT(expr) \ - if (!(expr)) { \ - printk(KERN_DEBUG "assertion failed! %s[%d]: %s\n", \ - __FUNCTION__, __LINE__, #expr); \ - panic(KERN_DEBUG "%s", __FUNCTION__); \ - } -#else -#define ASSERT(expr) -#endif - #define IS_DMA_ALIGNED(x) (((u32)(x)&0x07)==0) #define DEFINE_SPI_REG(reg, off) \ @@ -82,15 +69,12 @@ DEFINE_SPI_REG(RDBR, 0x10) DEFINE_SPI_REG(BAUD, 0x14) DEFINE_SPI_REG(SHAW, 0x18) - #define START_STATE ((void*)0) #define RUNNING_STATE ((void*)1) #define DONE_STATE ((void*)2) #define ERROR_STATE ((void*)-1) - #define QUEUE_RUNNING 0 #define QUEUE_STOPPED 1 - int dma_requested; char chip_select_flag; @@ -175,12 +159,13 @@ static u16 hz_to_spi_baud(u32 speed_hz) { u_long sclk = get_sclk(); - u16 spi_baud = (sclk / (2*speed_hz)); + u16 spi_baud = (sclk / (2 * speed_hz)); - if ((sclk % (2*speed_hz)) > 0) + if ((sclk % (2 * speed_hz)) > 0) spi_baud++; - pr_debug("sclk = %ld, speed_hz = %d, spi_baud = %d\n", sclk, speed_hz, spi_baud); + pr_debug("sclk = %ld, speed_hz = %d, spi_baud = %d\n", sclk, speed_hz, +spi_baud); return spi_baud; } @@ -190,7 +175,8 @@ unsigned long limit = loops_per_jiffy << 1; /* wait for stop and clear stat */ - do {} while (!(read_STAT() & BIT_STAT_SPIF) && limit--); + do { + } while (!(read_STAT() & BIT_STAT_SPIF) && limit--); write_STAT(BIT_STAT_CLR); return limit; @@ -265,7 +251,8 @@ while (drv_data->tx < drv_data->tx_end) { write_TDBR(0); - do {} while ((read_STAT() & BIT_STAT_TXS)); + do { + } while ((read_STAT() & BIT_STAT_TXS)); drv_data->tx += n_bytes; } } @@ -276,7 +263,8 @@ dummy_read(); while (drv_data->rx < drv_data->rx_end) { - do {} while (!(read_STAT() & BIT_STAT_RXS)); + do { + } while (!(read_STAT() & BIT_STAT_RXS)); dummy_read(); drv_data->rx += n_bytes; } @@ -286,13 +274,15 @@ { pr_debug("cr8-s is 0x%x\n", read_STAT()); while (drv_data->tx < drv_data->tx_end) { - write_TDBR(*(u8 *)(drv_data->tx)); - do {} while (read_STAT() & BIT_STAT_TXS); + write_TDBR(*(u8 *) (drv_data->tx)); + do { + } while (read_STAT() & BIT_STAT_TXS); ++drv_data->tx; } - // poll for SPI completion before returning - do {} while (!(read_STAT() & BIT_STAT_SPIF)); + /* poll for SPI completion before returning */ + do { + } while (!(read_STAT() & BIT_STAT_SPIF)); } static void u8_cs_chg_writer(struct driver_data *drv_data) @@ -303,10 +293,12 @@ write_FLAG(chip->flag); SSYNC(); - write_TDBR(*(u8 *)(drv_data->tx)); - do {} while (read_STAT() & BIT_STAT_TXS); - do {} while (!(read_STAT() & BIT_STAT_SPIF)); - write_FLAG(0xFF00|chip->flag); + write_TDBR(*(u8 *) (drv_data->tx)); + do { + } while (read_STAT() & BIT_STAT_TXS); + do { + } while (!(read_STAT() & BIT_STAT_SPIF)); + write_FLAG(0xFF00 | chip->flag); SSYNC(); if (chip->cs_chg_udelay) udelay(chip->cs_chg_udelay); @@ -320,18 +312,20 @@ { pr_debug("cr-8 is 0x%x\n", read_STAT()); - // clear TDBR buffer before read(else it will be shifted out) + /* clear TDBR buffer before read(else it will be shifted out) */ write_TDBR(0x); dummy_read(); while (drv_data->rx < drv_data->rx_end - 1) { - do {} while (!(read_STAT() & BIT_STAT_RXS)); - *(u8 *)(drv_data->rx) = read_RDBR(); + do { + } while (!(read_STAT() & BIT_STAT_RXS)); +
[PATCH -mm] Blackfin: spi driver fix reboot kernel mounting spi flash print error bug
Hi folks, This patch fix a printing error bug when reboot kernel mounting on SPI flash. Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- drivers/spi/spi_bfin5xx.c |9 - 1 file changed, 9 deletions(-) Index: linux-2.6/drivers/spi/spi_bfin5xx.c === --- linux-2.6.orig/drivers/spi/spi_bfin5xx.c +++ linux-2.6/drivers/spi/spi_bfin5xx.c @@ -1167,14 +1167,6 @@ return 0; } -static void bfin5xx_spi_shutdown(struct platform_device *pdev) -{ - int status = 0; - - if ((status = bfin5xx_spi_remove(pdev)) != 0) - dev_err(>dev, "shutdown failed with %d\n", status); -} - /* PM, do nothing now */ #ifdef CONFIG_PM static int suspend_devices(struct device *dev, void *pm_message) @@ -1242,7 +1234,6 @@ }, .probe = bfin5xx_spi_probe, .remove = __devexit_p(bfin5xx_spi_remove), - .shutdown = bfin5xx_spi_shutdown, .suspend = bfin5xx_spi_suspend, .resume = bfin5xx_spi_resume, }; _ Thanks, -Bryan Wu - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -mm] Blackfin: rtc fix rtc_update_irq augument
Hi folks, Replacing class_dev to directly using rtc_dev. Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- drivers/rtc/rtc-bfin.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6/drivers/rtc/rtc-bfin.c === --- linux-2.6.orig/drivers/rtc/rtc-bfin.c +++ linux-2.6/drivers/rtc/rtc-bfin.c @@ -166,7 +166,7 @@ events |= RTC_UF | RTC_IRQF; } - rtc_update_irq(>rtc_dev->class_dev, 1, events); + rtc_update_irq(rtc->rtc_dev, 1, events); spin_unlock_irq(>lock); _ Thanks, -Bryan Wu - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -mm] Blackfin arch: cleanup cache header file
Hi folks, According to Paul's review, this patch cleanup the include/asm-blackfin/cache.h comments. Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- include/asm-blackfin/cache.h | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) Index: linux-2.6/include/asm-blackfin/cache.h === --- linux-2.6.orig/include/asm-blackfin/cache.h +++ linux-2.6/include/asm-blackfin/cache.h @@ -1,13 +1,21 @@ +/* + * include/asm-blackfin/cache.h + */ #ifndef __ARCH_BLACKFIN_CACHE_H #define __ARCH_BLACKFIN_CACHE_H -/* bytes per L1 cache line */ -#defineL1_CACHE_SHIFT 5 /* BlackFin loads 32 bytes for cache */ -#defineL1_CACHE_BYTES (1 << L1_CACHE_SHIFT) +/* + * Bytes per L1 cache line + * Blackfin loads 32 bytes for cache + */ +#define L1_CACHE_SHIFT 5 +#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) -/* For speed we do need to align these ...MaTed---*/ -/* But include/linux/cache.h does this for us if we DO not define ...MaTed---*/ -#define __cacheline_aligned/* maybe no need this Tony */ +/* + * Don't make __cacheline_aligned and + * cacheline_aligned defined in include/linux/cache.h + */ +#define __cacheline_aligned #define cacheline_aligned /* _ Thanks -Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -mm] Blackfin arch: fix reboot kernel mounting spi flash print error bug
Hi folks, This patch fix a printing error bug when reboot kernel mounting on SPI flash. Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/mach-bf533/boards/cm_bf533.c |2 +- arch/blackfin/mach-bf533/boards/ezkit.c |2 +- arch/blackfin/mach-bf533/boards/stamp.c |2 +- arch/blackfin/mach-bf537/boards/cm_bf537.c |2 +- arch/blackfin/mach-bf537/boards/generic_board.c |2 +- arch/blackfin/mach-bf537/boards/pnav10.c|2 +- arch/blackfin/mach-bf537/boards/stamp.c |2 +- arch/blackfin/mach-bf561/boards/cm_bf561.c |2 +- 8 files changed, 8 insertions(+), 8 deletions(-) Index: linux-2.6/arch/blackfin/mach-bf533/boards/cm_bf533.c === --- linux-2.6.orig/arch/blackfin/mach-bf533/boards/cm_bf533.c +++ linux-2.6/arch/blackfin/mach-bf533/boards/cm_bf533.c @@ -57,7 +57,7 @@ .offset = 0x2 },{ .name = "file system", - .size = 0x30, + .size = 0x70, .offset = 0x0010, } }; Index: linux-2.6/arch/blackfin/mach-bf533/boards/ezkit.c === --- linux-2.6.orig/arch/blackfin/mach-bf533/boards/ezkit.c +++ linux-2.6/arch/blackfin/mach-bf533/boards/ezkit.c @@ -91,7 +91,7 @@ .offset = 0x2 },{ .name = "file system", - .size = 0x30, + .size = 0x70, .offset = 0x0010, } }; Index: linux-2.6/arch/blackfin/mach-bf533/boards/stamp.c === --- linux-2.6.orig/arch/blackfin/mach-bf533/boards/stamp.c +++ linux-2.6/arch/blackfin/mach-bf533/boards/stamp.c @@ -114,7 +114,7 @@ .offset = 0x2 },{ .name = "file system", - .size = 0x30, + .size = 0x70, .offset = 0x0010, } }; Index: linux-2.6/arch/blackfin/mach-bf537/boards/cm_bf537.c === --- linux-2.6.orig/arch/blackfin/mach-bf537/boards/cm_bf537.c +++ linux-2.6/arch/blackfin/mach-bf537/boards/cm_bf537.c @@ -59,7 +59,7 @@ .offset = 0x2 },{ .name = "file system", - .size = 0x30, + .size = 0x70, .offset = 0x0010, } }; Index: linux-2.6/arch/blackfin/mach-bf537/boards/generic_board.c === --- linux-2.6.orig/arch/blackfin/mach-bf537/boards/generic_board.c +++ linux-2.6/arch/blackfin/mach-bf537/boards/generic_board.c @@ -259,7 +259,7 @@ .offset = 0x2 },{ .name = "file system", - .size = 0x30, + .size = 0x70, .offset = 0x0010, } }; Index: linux-2.6/arch/blackfin/mach-bf537/boards/pnav10.c === --- linux-2.6.orig/arch/blackfin/mach-bf537/boards/pnav10.c +++ linux-2.6/arch/blackfin/mach-bf537/boards/pnav10.c @@ -244,7 +244,7 @@ .offset = 0x2 },{ .name = "file system", - .size = 0x30, + .size = 0x70, .offset = 0x0010, } }; Index: linux-2.6/arch/blackfin/mach-bf537/boards/stamp.c === --- linux-2.6.orig/arch/blackfin/mach-bf537/boards/stamp.c +++ linux-2.6/arch/blackfin/mach-bf537/boards/stamp.c @@ -293,7 +293,7 @@ .offset = 0x2 },{ .name = "file system", - .size = 0x30, + .size = 0x70, .offset = 0x0010, } }; Index: linux-2.6/arch/blackfin/mach-bf561/boards/cm_bf561.c === --- linux-2.6.orig/arch/blackfin/mach-bf561/boards/cm_bf561.c +++ linux-2.6/arch/blackfin/mach-bf561/boards/cm_bf561.c @@ -58,7 +58,7 @@ .offset = 0x2 },{ .name = "file system", - .size = 0x30, + .size = 0x70, .offset = 0x0010, } }; _ Thanks -Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -mm] Blackfin arch: fix compiling error in flat c file
Hi folks, THis patch fixed including wrong header file when compiling in 2.6.21-rc4-mm. Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/kernel/flat.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6/arch/blackfin/kernel/flat.c === --- linux-2.6.orig/arch/blackfin/kernel/flat.c +++ linux-2.6/arch/blackfin/kernel/flat.c @@ -18,8 +18,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include #include +#include #include #define FLAT_BFIN_RELOC_TYPE_16_BIT 0 _ Thanks, -Bryan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -mm] Blackfin arch: power management replace firmware disk mode
Hi folks, This patches replace firmware disk mode according to include/linux/pm.h Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- arch/blackfin/mach-common/pm.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6.x/arch/blackfin/mach-common/pm.c === --- linux-2.6.x.orig/arch/blackfin/mach-common/pm.c +++ linux-2.6.x/arch/blackfin/mach-common/pm.c @@ -166,7 +166,7 @@ } struct pm_ops bfin_pm_ops = { - .pm_disk_mode = PM_DISK_FIRMWARE, + .pm_disk_mode = PM_DISK_PLATFORM, .prepare = bfin_pm_prepare, .enter = bfin_pm_enter, .finish = bfin_pm_finish, _ Thanks, -Bryan Wu - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -mm] Blackfin arch: add kdebug header file
Hi folks, This patch adds kdebug.h header file to blackfin architecture. Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- include/asm-blackfin/kdebug.h |1 + 1 file changed, 1 insertion(+) Index: linux-2.6/include/asm-blackfin/kdebug.h === --- /dev/null +++ linux-2.6/include/asm-blackfin/kdebug.h @@ -0,0 +1 @@ +#include _ Thanks, -Bryan Wu - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -mm] Blackfin arch: fix struct dmasg packing bug
Hi folks, This patch fix a bug about struct dmasg packed missing bug. Using __attribute__ instead of pragma. Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> --- include/asm-blackfin/dma.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6/include/asm-blackfin/dma.h === --- linux-2.6.orig/include/asm-blackfin/dma.h +++ linux-2.6/include/asm-blackfin/dma.h @@ -84,7 +84,7 @@ short x_modify; unsigned short y_count; short y_modify; -}; +} __attribute__((packed)); struct dma_register { unsigned long next_desc_ptr;/* DMA Next Descriptor Pointer register */ _ Thanks, -Bryan Wu - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/